decord/source/910_trpcMiddleware.js

81 lines
2.8 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 910
2026-07-23 10:11:24 +00:00
// Function ID: 9981
2026-07-20 16:05:17 +00:00
// Name: trpcMiddleware
2026-07-23 10:11:24 +00:00
// Dependencies: [77, 5, 845, 825, 799, 841, 842, 816]
2026-07-20 16:05:17 +00:00
// Exports: trpcMiddleware
// Module 910 (trpcMiddleware)
2026-07-23 10:11:24 +00:00
import _defineProperty from "_defineProperty";
import asyncGeneratorStep from "normalize";
2026-07-20 16:05:17 +00:00
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2026-07-23 10:11:24 +00:00
let closure_4 = { mechanism: { handled: false, type: "auto.rpc.trpc.middleware" } };
2026-07-20 16:05:17 +00:00
export const trpcMiddleware = function trpcMiddleware() {
if (arguments.length > 0) {
if (undefined !== arguments[0]) {
const first = arguments[0];
}
let closure_0 = {};
2026-07-23 10:11:24 +00:00
return (() => {
let closure_0 = outer1_3(async (arg0) => {
let c1;
2026-07-20 16:05:17 +00:00
let getRawInput;
let rawInput;
let path;
2026-07-23 10:11:24 +00:00
c1 = undefined;
2026-07-20 16:05:17 +00:00
let obj;
path = arg0.path;
2026-07-23 10:11:24 +00:00
({ next: c1, rawInput, getRawInput } = arg0);
obj = lib(outer3_1[3]);
2026-07-20 16:05:17 +00:00
const client = obj.getClient();
let options;
if (null != client) {
options = client.getOptions();
}
obj = { procedure_path: path, procedure_type: arg0.type };
let normalizeDepth;
if (null != options) {
normalizeDepth = options.normalizeDepth;
}
let num = 5;
if (null != normalizeDepth) {
num = normalizeDepth;
}
2026-07-23 10:11:24 +00:00
const result = lib(outer3_1[4]).addNonEnumerableProperty(obj, "__sentry_override_normalization_depth__", 1 + num);
if (undefined !== lib.attachRpcInput) {
let sendDefaultPii = lib.attachRpcInput;
2026-07-20 16:05:17 +00:00
} else if (null != options) {
sendDefaultPii = options.sendDefaultPii;
}
if (sendDefaultPii) {
if (undefined !== rawInput) {
2026-07-23 10:11:24 +00:00
tmp2.input = lib(outer3_1[5]).normalize(rawInput);
const obj5 = lib(outer3_1[5]);
2026-07-20 16:05:17 +00:00
}
if (undefined !== getRawInput) {
if ("function" === typeof getRawInput) {
const tmp11 = yield getRawInput();
2026-07-23 10:11:24 +00:00
tmp2.input = lib(outer3_1[5]).normalize(tmp11);
const obj6 = lib(outer3_1[5]);
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-23 10:11:24 +00:00
const obj4 = lib(outer3_1[4]);
lib(outer3_1[3]).withIsolationScope((setContext) => {
2026-07-20 16:05:17 +00:00
setContext.setContext("trpc", obj);
2026-07-23 10:11:24 +00:00
obj = path(outer4_1[6]);
obj = { name: "trpc/" + path, op: "rpc.server", attributes: outer4_2(outer4_2({}, path(outer4_1[7]).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, "route"), path(outer4_1[7]).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, "auto.rpc.trpc"), forceTransaction: path.forceTransaction };
return obj.startSpanManual(obj, (() => {
let closure_0 = outer5_3(/* F9988 */ function*() { ... });
2026-07-20 16:05:17 +00:00
return () => { ... };
2026-07-23 10:11:24 +00:00
})());
2026-07-20 16:05:17 +00:00
});
});
return function(arg0) {
return callback(...arguments);
};
2026-07-23 10:11:24 +00:00
})();
2026-07-20 16:05:17 +00:00
}
};