@poe-platform/safe-js 0.1.724 → 0.1.725
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/README.md +3 -0
- package/dist/safe-js/chunks/{chunk-E5VQVLWF.js → chunk-6YSHQ5ET.js} +2 -2
- package/dist/safe-js/chunks/{chunk-GM32LIKF.js → chunk-ECTNNLWN.js} +3 -3
- package/dist/safe-js/chunks/{chunk-WYY65M7Z.js → chunk-FYSWUSHN.js} +2 -2
- package/dist/safe-js/chunks/{chunk-CSRNI5HI.js → chunk-K6F5QLZQ.js} +2 -2
- package/dist/safe-js/chunks/{chunk-GYT2ECWI.js → chunk-O2CPPE6M.js} +2 -2
- package/dist/safe-js/chunks/{chunk-5M2P3GUC.js → chunk-PKRGP34X.js} +36 -9
- package/dist/safe-js/chunks/chunk-PKRGP34X.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-ZHJPXLUJ.js → chunk-QU2F65UQ.js} +68 -10
- package/dist/safe-js/chunks/{chunk-ZHJPXLUJ.js.map → chunk-QU2F65UQ.js.map} +2 -2
- package/dist/safe-js/chunks/{chunk-TMRO2MK6.js → chunk-V2ESZF34.js} +3 -3
- package/dist/safe-js/chunks/{chunk-2DISWAVU.js → chunk-Y7LSEUWV.js} +2 -2
- package/dist/safe-js/chunks/{chunk-BYX6GUCC.js → chunk-YRALPIEZ.js} +2 -2
- package/dist/safe-js/chunks/{cli-runtime-PHNOLXPN.js → cli-runtime-5HVEFMDB.js} +10 -10
- package/dist/safe-js/chunks/{dump-HAU2HFBZ.js → dump-VKSKINUI.js} +3 -3
- package/dist/safe-js/chunks/{fs-6PHK3Q3V.js → fs-CZ2TAPHK.js} +3 -3
- package/dist/safe-js/chunks/{harness-E3FVGKIR.js → harness-WNABEKDH.js} +3 -3
- package/dist/safe-js/chunks/{mcp-HGLB4YOP.js → mcp-ZZDGN5CA.js} +3 -3
- package/dist/safe-js/chunks/{migration-file-4GNB4HDL.js → migration-file-QVT4W464.js} +4 -4
- package/dist/safe-js/chunks/{restore-ZFU4NJOM.js → restore-PTIQHGKI.js} +4 -4
- package/dist/safe-js/chunks/{run-AAOCYT5M.js → run-WNR7QYUJ.js} +6 -6
- package/dist/safe-js/chunks/{runtime-modules-OPLHKWMC.js → runtime-modules-YEOG62RU.js} +3 -3
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +5 -5
- package/dist/safe-js/extensions.d.ts +2 -0
- package/dist/safe-js/index.js +10 -10
- package/dist/safe-js/interp/host-bridge.d.ts +1 -1
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-5M2P3GUC.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-E5VQVLWF.js.map → chunk-6YSHQ5ET.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-GM32LIKF.js.map → chunk-ECTNNLWN.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-WYY65M7Z.js.map → chunk-FYSWUSHN.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-CSRNI5HI.js.map → chunk-K6F5QLZQ.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-GYT2ECWI.js.map → chunk-O2CPPE6M.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-TMRO2MK6.js.map → chunk-V2ESZF34.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-2DISWAVU.js.map → chunk-Y7LSEUWV.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-BYX6GUCC.js.map → chunk-YRALPIEZ.js.map} +0 -0
- /package/dist/safe-js/chunks/{cli-runtime-PHNOLXPN.js.map → cli-runtime-5HVEFMDB.js.map} +0 -0
- /package/dist/safe-js/chunks/{dump-HAU2HFBZ.js.map → dump-VKSKINUI.js.map} +0 -0
- /package/dist/safe-js/chunks/{fs-6PHK3Q3V.js.map → fs-CZ2TAPHK.js.map} +0 -0
- /package/dist/safe-js/chunks/{harness-E3FVGKIR.js.map → harness-WNABEKDH.js.map} +0 -0
- /package/dist/safe-js/chunks/{mcp-HGLB4YOP.js.map → mcp-ZZDGN5CA.js.map} +0 -0
- /package/dist/safe-js/chunks/{migration-file-4GNB4HDL.js.map → migration-file-QVT4W464.js.map} +0 -0
- /package/dist/safe-js/chunks/{restore-ZFU4NJOM.js.map → restore-PTIQHGKI.js.map} +0 -0
- /package/dist/safe-js/chunks/{run-AAOCYT5M.js.map → run-WNR7QYUJ.js.map} +0 -0
- /package/dist/safe-js/chunks/{runtime-modules-OPLHKWMC.js.map → runtime-modules-YEOG62RU.js.map} +0 -0
|
@@ -6440,11 +6440,30 @@ async function evaluateFunctionExpression(node, context, evaluateNode2) {
|
|
|
6440
6440
|
value: closure
|
|
6441
6441
|
};
|
|
6442
6442
|
}
|
|
6443
|
+
var captureContextHasOwn = Object.hasOwn;
|
|
6444
|
+
function createOwnedCaptureCollector(scope, sourceReference, environment, constructionState) {
|
|
6445
|
+
return (append) => {
|
|
6446
|
+
visitScopeDataRoots(scope, append);
|
|
6447
|
+
append(sourceReference);
|
|
6448
|
+
append(environment?.homeObject);
|
|
6449
|
+
append(environment?.newTarget);
|
|
6450
|
+
if (constructionState !== void 0) {
|
|
6451
|
+
append(constructionState.constructor);
|
|
6452
|
+
append(constructionState.newTarget);
|
|
6453
|
+
append(constructionState.prototype);
|
|
6454
|
+
append(constructionState.thisValue);
|
|
6455
|
+
if (constructionState.thisScope !== void 0)
|
|
6456
|
+
visitScopeDataRoots(constructionState.thisScope, append);
|
|
6457
|
+
}
|
|
6458
|
+
};
|
|
6459
|
+
}
|
|
6443
6460
|
function createInterpretedClosure(node, context, evaluateNode2, homeObject, initializeGeneratorPrototype = true) {
|
|
6461
|
+
let ownsCaptureContext = false;
|
|
6444
6462
|
if (context.callee !== void 0 || context.evalCompletion)
|
|
6445
6463
|
context = { ...context, callee: void 0, evalCompletion: void 0 };
|
|
6446
6464
|
if (node.type !== "ArrowFunctionExpression") {
|
|
6447
6465
|
context = { ...context, functionEnvironment: { homeObject } };
|
|
6466
|
+
ownsCaptureContext = true;
|
|
6448
6467
|
}
|
|
6449
6468
|
if (node.type !== "ArrowFunctionExpression" && node.generator) {
|
|
6450
6469
|
return createGeneratorClosure(node, context, evaluateNode2, initializeGeneratorPrototype);
|
|
@@ -6560,10 +6579,13 @@ function createInterpretedClosure(node, context, evaluateNode2, homeObject, init
|
|
|
6560
6579
|
}, context.budget, callContext, context.signal);
|
|
6561
6580
|
}
|
|
6562
6581
|
});
|
|
6563
|
-
registerIndexedClosureCaptures(
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6582
|
+
registerIndexedClosureCaptures(
|
|
6583
|
+
closure,
|
|
6584
|
+
ownsCaptureContext && captureContextHasOwn(context, "scope") && captureContextHasOwn(context, "sourceReference") && captureContextHasOwn(context, "functionEnvironment") ? createOwnedCaptureCollector(context.scope, context.sourceReference, context.functionEnvironment, constructionState) : (append) => {
|
|
6585
|
+
visitScopeDataRoots(context.scope, append);
|
|
6586
|
+
appendCapturedValues(append);
|
|
6587
|
+
}
|
|
6588
|
+
);
|
|
6567
6589
|
registerClosureOrigin(closure, node, context);
|
|
6568
6590
|
return closure;
|
|
6569
6591
|
}
|
|
@@ -21993,19 +22015,19 @@ function wrapCallerInjectedFunction(name, value, options, state) {
|
|
|
21993
22015
|
restored: []
|
|
21994
22016
|
};
|
|
21995
22017
|
const exportedSharedArguments = [];
|
|
21996
|
-
const copyArguments = (values) => deepCopyFromSandbox([...values], {
|
|
22018
|
+
const copyArguments = (values, wrapClosure) => deepCopyFromSandbox([...values], {
|
|
21997
22019
|
compilation,
|
|
21998
22020
|
onSharedBuffer: (value2) => {
|
|
21999
22021
|
exportedSharedArguments.push(value2);
|
|
22000
22022
|
},
|
|
22001
22023
|
unwrapHostObject: options.realm === void 0 ? void 0 : (object) => exportHostCapability(object, options.realm.owner),
|
|
22002
|
-
wrapClosure: (closure) => options.realm?.wrapCallback(closure) ?? wrapSandboxClosureForHost(
|
|
22024
|
+
wrapClosure: wrapClosure ?? ((closure) => options.realm?.wrapCallback(closure) ?? wrapSandboxClosureForHost(
|
|
22003
22025
|
closure,
|
|
22004
22026
|
stackFrames,
|
|
22005
22027
|
options.budget,
|
|
22006
22028
|
operationLease.owner,
|
|
22007
22029
|
callbacks
|
|
22008
|
-
)
|
|
22030
|
+
))
|
|
22009
22031
|
});
|
|
22010
22032
|
const captured = options.realm?.captureArguments(callable, args, copyArguments);
|
|
22011
22033
|
const hostArgs = captured?.args ?? copyArguments(args);
|
|
@@ -46493,11 +46515,35 @@ function measureSandboxDataWithSeen(values, options, seen, retainCode = false) {
|
|
|
46493
46515
|
let secondSeenCapture;
|
|
46494
46516
|
let thirdSeenCapture;
|
|
46495
46517
|
let fourthSeenCapture;
|
|
46518
|
+
let fifthSeenCapture;
|
|
46519
|
+
let sixthSeenCapture;
|
|
46520
|
+
let seventhSeenCapture;
|
|
46521
|
+
let eighthSeenCapture;
|
|
46522
|
+
let ninthSeenCapture;
|
|
46523
|
+
let tenthSeenCapture;
|
|
46524
|
+
let eleventhSeenCapture;
|
|
46525
|
+
let twelfthSeenCapture;
|
|
46526
|
+
let thirteenthSeenCapture;
|
|
46527
|
+
let fourteenthSeenCapture;
|
|
46528
|
+
let fifteenthSeenCapture;
|
|
46529
|
+
let sixteenthSeenCapture;
|
|
46496
46530
|
const appendNativeCapture = (value) => {
|
|
46497
46531
|
if (value === void 0) return;
|
|
46498
46532
|
if (typeof value === "object" && value !== null) {
|
|
46499
|
-
if (value === firstSeenCapture || value === secondSeenCapture || value === thirdSeenCapture || value === fourthSeenCapture) return;
|
|
46533
|
+
if (value === firstSeenCapture || value === secondSeenCapture || value === thirdSeenCapture || value === fourthSeenCapture || value === fifthSeenCapture || value === sixthSeenCapture || value === seventhSeenCapture || value === eighthSeenCapture || value === ninthSeenCapture || value === tenthSeenCapture || value === eleventhSeenCapture || value === twelfthSeenCapture || value === thirteenthSeenCapture || value === fourteenthSeenCapture || value === fifteenthSeenCapture || value === sixteenthSeenCapture) return;
|
|
46500
46534
|
if (seen.has(value)) {
|
|
46535
|
+
sixteenthSeenCapture = fifteenthSeenCapture;
|
|
46536
|
+
fifteenthSeenCapture = fourteenthSeenCapture;
|
|
46537
|
+
fourteenthSeenCapture = thirteenthSeenCapture;
|
|
46538
|
+
thirteenthSeenCapture = twelfthSeenCapture;
|
|
46539
|
+
twelfthSeenCapture = eleventhSeenCapture;
|
|
46540
|
+
eleventhSeenCapture = tenthSeenCapture;
|
|
46541
|
+
tenthSeenCapture = ninthSeenCapture;
|
|
46542
|
+
ninthSeenCapture = eighthSeenCapture;
|
|
46543
|
+
eighthSeenCapture = seventhSeenCapture;
|
|
46544
|
+
seventhSeenCapture = sixthSeenCapture;
|
|
46545
|
+
sixthSeenCapture = fifthSeenCapture;
|
|
46546
|
+
fifthSeenCapture = fourthSeenCapture;
|
|
46501
46547
|
fourthSeenCapture = thirdSeenCapture;
|
|
46502
46548
|
thirdSeenCapture = secondSeenCapture;
|
|
46503
46549
|
secondSeenCapture = firstSeenCapture;
|
|
@@ -47300,6 +47346,18 @@ function measureSandboxDataWithSeen(values, options, seen, retainCode = false) {
|
|
|
47300
47346
|
secondSeenCapture = void 0;
|
|
47301
47347
|
thirdSeenCapture = void 0;
|
|
47302
47348
|
fourthSeenCapture = void 0;
|
|
47349
|
+
fifthSeenCapture = void 0;
|
|
47350
|
+
sixthSeenCapture = void 0;
|
|
47351
|
+
seventhSeenCapture = void 0;
|
|
47352
|
+
eighthSeenCapture = void 0;
|
|
47353
|
+
ninthSeenCapture = void 0;
|
|
47354
|
+
tenthSeenCapture = void 0;
|
|
47355
|
+
eleventhSeenCapture = void 0;
|
|
47356
|
+
twelfthSeenCapture = void 0;
|
|
47357
|
+
thirteenthSeenCapture = void 0;
|
|
47358
|
+
fourteenthSeenCapture = void 0;
|
|
47359
|
+
fifteenthSeenCapture = void 0;
|
|
47360
|
+
sixteenthSeenCapture = void 0;
|
|
47303
47361
|
while (pendingCount > 0) {
|
|
47304
47362
|
const frame = pending[--pendingCount];
|
|
47305
47363
|
if (frame.capture !== void 0) releaseCaptures(frame.capture);
|
|
@@ -48603,7 +48661,7 @@ function materializeFunctionProperties(closure, initialProperties) {
|
|
|
48603
48661
|
name: { value: closure.name ?? "", configurable: true }
|
|
48604
48662
|
});
|
|
48605
48663
|
if (isGuestClosure(closure) && closure.construct !== void 0 && closure.boundTarget === void 0) {
|
|
48606
|
-
const prototype =
|
|
48664
|
+
const prototype = createIntrinsicObject();
|
|
48607
48665
|
nativePropertyDefineOne(prototype, "constructor", {
|
|
48608
48666
|
value: closure,
|
|
48609
48667
|
writable: true,
|
|
@@ -49280,4 +49338,4 @@ authorization of the copyright holder.
|
|
|
49280
49338
|
SPDX-License-Identifier: Unicode-3.0
|
|
49281
49339
|
|
|
49282
49340
|
*/
|
|
49283
|
-
//# sourceMappingURL=chunk-
|
|
49341
|
+
//# sourceMappingURL=chunk-QU2F65UQ.js.map
|