@poe-platform/safe-js 0.1.280 → 0.1.282
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/safe-js/chunks/{chunk-5NFQL4UY.js → chunk-EQ773ION.js} +2 -2
- package/dist/safe-js/chunks/{chunk-JM3LVK7Z.js → chunk-GAVXWFZM.js} +34 -1
- package/dist/safe-js/chunks/chunk-GAVXWFZM.js.map +7 -0
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-JM3LVK7Z.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-5NFQL4UY.js.map → chunk-EQ773ION.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GAVXWFZM.js";
|
|
31
31
|
|
|
32
32
|
// packages/safe-js/src/migrate.ts
|
|
33
33
|
import { createHash } from "node:crypto";
|
|
@@ -8249,4 +8249,4 @@ export {
|
|
|
8249
8249
|
parseMcpConfig,
|
|
8250
8250
|
makeMcpModule
|
|
8251
8251
|
};
|
|
8252
|
-
//# sourceMappingURL=chunk-
|
|
8252
|
+
//# sourceMappingURL=chunk-EQ773ION.js.map
|
|
@@ -20520,6 +20520,37 @@ function createPromiseGlobals(options) {
|
|
|
20520
20520
|
name: "reject",
|
|
20521
20521
|
length: 1
|
|
20522
20522
|
}),
|
|
20523
|
+
try: createSandboxClosure({
|
|
20524
|
+
sandbox: true,
|
|
20525
|
+
guest: true,
|
|
20526
|
+
name: "try",
|
|
20527
|
+
length: 1,
|
|
20528
|
+
call: async ([callback, ...args], context) => {
|
|
20529
|
+
const capability = await createPromiseCapability(
|
|
20530
|
+
context === void 0 ? promiseConstructor : context.thisValue,
|
|
20531
|
+
options.budget,
|
|
20532
|
+
context
|
|
20533
|
+
);
|
|
20534
|
+
let result;
|
|
20535
|
+
let rejected = false;
|
|
20536
|
+
try {
|
|
20537
|
+
if (!isSandboxClosure(callback)) throw new TypeError("Promise.try callback must be callable.");
|
|
20538
|
+
result = await callPromiseClosure(callback, args, void 0, options.budget, context);
|
|
20539
|
+
} catch (error) {
|
|
20540
|
+
if (error instanceof SandboxError && (error.code === "budgetExceeded" || error.code === "reentry")) throw error;
|
|
20541
|
+
rejected = true;
|
|
20542
|
+
result = error;
|
|
20543
|
+
}
|
|
20544
|
+
await callPromiseClosure(
|
|
20545
|
+
rejected ? capability.reject : capability.resolve,
|
|
20546
|
+
[result],
|
|
20547
|
+
void 0,
|
|
20548
|
+
options.budget,
|
|
20549
|
+
context
|
|
20550
|
+
);
|
|
20551
|
+
return capability.promise;
|
|
20552
|
+
}
|
|
20553
|
+
}),
|
|
20523
20554
|
withResolvers: createSandboxClosure({
|
|
20524
20555
|
sandbox: true,
|
|
20525
20556
|
guest: true,
|
|
@@ -25697,6 +25728,7 @@ function copyToSandbox(value, state, path = "<root>", cloneSandboxCollections =
|
|
|
25697
25728
|
for (const [key, descriptor] of dateDataProperties(value)) {
|
|
25698
25729
|
Object.defineProperty(copy, key, { ...descriptor, value: copyToSandbox(descriptor.value, state, joinPath2(path, key), cloneSandboxCollections, depth + 1) });
|
|
25699
25730
|
}
|
|
25731
|
+
if (!state.structuredClone && !Object.isExtensible(value)) Object.preventExtensions(copy);
|
|
25700
25732
|
return copy;
|
|
25701
25733
|
}
|
|
25702
25734
|
if (isFloat32Array(value)) {
|
|
@@ -25895,6 +25927,7 @@ function copyFromSandbox(value, state, path = "<root>", options, depth = 0) {
|
|
|
25895
25927
|
for (const [key, descriptor] of dateDataProperties(value)) {
|
|
25896
25928
|
Object.defineProperty(copy, key, { ...descriptor, value: copyFromSandbox(descriptor.value, state, joinPath2(path, key), options, depth + 1) });
|
|
25897
25929
|
}
|
|
25930
|
+
if (!Object.isExtensible(value)) Object.preventExtensions(copy);
|
|
25898
25931
|
return copy;
|
|
25899
25932
|
}
|
|
25900
25933
|
if (isSandboxClosure(value)) {
|
|
@@ -40268,4 +40301,4 @@ export {
|
|
|
40268
40301
|
FileSnapshotBackend,
|
|
40269
40302
|
run
|
|
40270
40303
|
};
|
|
40271
|
-
//# sourceMappingURL=chunk-
|
|
40304
|
+
//# sourceMappingURL=chunk-GAVXWFZM.js.map
|