decord/source/935_weakSet.js

159 lines
5.2 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 935
// Function ID: 936
// Name: weakSet
// Dependencies: [5, 936, 848, 822, 937, 948]
// Exports: wrapMcpServerWithSentry
// Module 935 (weakSet)
2026-08-24 06:08:38 +00:00
import closure_2 from "asyncGeneratorStep" /* 5 */;
2026-07-29 08:29:29 +00:00
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const weakSet = new WeakSet();
export const wrapMcpServerWithSentry = function wrapMcpServerWithSentry(arg0, recordInputs) {
let obj = weakSet;
if (weakSet.has(arg0)) {
return arg0;
} else {
if (obj2.validateMcpServerInstance(arg0)) {
let tmpResult = tmp(848);
const client = tmpResult.getClient();
let sendDefaultPii;
if (client != null) {
sendDefaultPii = client.getOptions().sendDefaultPii;
}
const BooleanResult = Boolean(sendDefaultPii);
recordInputs = undefined;
if (recordInputs != null) {
recordInputs = recordInputs.recordInputs;
}
if (recordInputs == null) {
recordInputs = BooleanResult;
}
obj = { recordInputs: null, recordOutputs: null };
obj[0] = recordInputs;
let recordOutputs;
if (recordInputs != null) {
recordOutputs = recordInputs.recordOutputs;
}
if (recordOutputs == null) {
recordOutputs = BooleanResult;
}
obj[1] = recordOutputs;
tmpResult = tmp(822);
tmpResult.fill(arg0, "connect", (arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
closure_0 = closure_1_2(function(arg0) {
2026-07-29 08:29:29 +00:00
const self = this;
2026-08-24 06:08:38 +00:00
closure_1 = arg0;
closure_2 = [...arguments].slice();
c6 = 0;
c7 = 0;
2026-07-29 08:29:29 +00:00
const iter = (function*(arg0) {
2026-08-12 06:57:52 +00:00
if (c7 === 2) {
c7 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
2026-08-24 06:08:38 +00:00
obj = { value: null, done: true };
2026-08-12 06:57:52 +00:00
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-08-12 06:57:52 +00:00
}
} else {
try {
c7 = 2;
if (0 === c6) {
if (arg0 === 1) {
c7 = 3;
throw arg1;
} else if (arg0 === 2) {
c7 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
closure_5 = closure_0;
closure_4 = closure_0;
closure_3 = tmp2;
2026-08-12 06:57:52 +00:00
closure_0 = closure_1;
closure_1 = closure_2;
closure_2 = undefined;
c6 = 1;
c7 = 1;
return { value: "ct", done: true };
}
} else if (1 === tmp5) {
if (arg0 === 1) {
c7 = 3;
throw arg1;
} else if (arg0 === 2) {
c7 = 3;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: true };
2026-08-12 06:57:52 +00:00
obj1[0] = arg1;
return obj1;
} else {
const call = self.call;
const items = [closure_5, closure_0];
HermesBuiltin.arraySpread(closure_1, 2);
c6 = 2;
c7 = 1;
const obj2 = { value: null, done: false };
obj2[0] = HermesBuiltin.apply(items, self);
return obj2;
}
} else if (arg0 === 1) {
c7 = 3;
throw arg1;
} else if (arg0 === 2) {
c7 = 3;
const obj3 = { value: null, done: true };
obj3[0] = arg1;
return obj3;
} else {
closure_2 = arg1;
2026-08-24 06:08:38 +00:00
const result = obj(closure_3_1[4]).wrapTransportOnMessage(closure_0, closure_0);
const obj7 = obj(closure_3_1[4]);
obj(closure_3_1[4]).wrapTransportSend(closure_0, closure_0);
const obj8 = obj(closure_3_1[4]);
obj(closure_3_1[4]).wrapTransportOnClose(closure_0);
const obj9 = obj(closure_3_1[4]);
obj(closure_3_1[4]).wrapTransportError(closure_0);
2026-08-12 06:57:52 +00:00
c7 = 3;
obj = { value: null, done: true };
obj[0] = closure_2;
return obj;
}
} catch (tmp21) {
c7 = tmp;
throw tmp21;
}
}
2026-07-29 08:29:29 +00:00
})();
iter.next();
return iter;
});
return function(arg0) {
const self = this;
const apply = closure_0.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
};
});
tmp(948).wrapAllMCPHandlers(arg0);
obj.add(arg0);
return arg0;
} else {
return arg0;
}
obj2 = obj(936);
}
};