@poe-platform/safe-js 0.1.300 → 0.1.301
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-ONR2CYEH.js → chunk-M4L3EZHL.js} +34 -9
- package/dist/safe-js/chunks/chunk-M4L3EZHL.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-JBOD6COV.js → chunk-R2SP3JEZ.js} +2 -2
- 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-ONR2CYEH.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-JBOD6COV.js.map → chunk-R2SP3JEZ.js.map} +0 -0
|
@@ -7862,6 +7862,7 @@ function namedKeys(state) {
|
|
|
7862
7862
|
// packages/safe-js/src/interp/object-model.ts
|
|
7863
7863
|
var guestClosures = /* @__PURE__ */ new WeakSet();
|
|
7864
7864
|
var functionProperties = /* @__PURE__ */ new WeakMap();
|
|
7865
|
+
var functionPropertyRevisions = /* @__PURE__ */ new WeakMap();
|
|
7865
7866
|
var prototypes = /* @__PURE__ */ new WeakMap();
|
|
7866
7867
|
var intrinsicPrototypes = /* @__PURE__ */ new WeakMap();
|
|
7867
7868
|
var boxedPrototypes = /* @__PURE__ */ new WeakMap();
|
|
@@ -7906,9 +7907,23 @@ function materializeFunctionProperties(closure) {
|
|
|
7906
7907
|
descriptorObjects.add(prototype);
|
|
7907
7908
|
Object.defineProperty(properties, "prototype", { value: prototype, writable: true });
|
|
7908
7909
|
}
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7910
|
+
const state = { revision: 0 };
|
|
7911
|
+
const tracked = new Proxy(properties, {
|
|
7912
|
+
defineProperty(target, key, descriptor) {
|
|
7913
|
+
const changed = Reflect.defineProperty(target, key, descriptor);
|
|
7914
|
+
if (changed) state.revision++;
|
|
7915
|
+
return changed;
|
|
7916
|
+
},
|
|
7917
|
+
deleteProperty(target, key) {
|
|
7918
|
+
const changed = Reflect.deleteProperty(target, key);
|
|
7919
|
+
if (changed) state.revision++;
|
|
7920
|
+
return changed;
|
|
7921
|
+
}
|
|
7922
|
+
});
|
|
7923
|
+
functionPropertyRevisions.set(tracked, state);
|
|
7924
|
+
descriptorObjects.add(tracked);
|
|
7925
|
+
functionProperties.set(closure, tracked);
|
|
7926
|
+
return tracked;
|
|
7912
7927
|
}
|
|
7913
7928
|
function getGuestFunctionProperty(closure, key) {
|
|
7914
7929
|
let properties = functionProperties.get(closure);
|
|
@@ -8018,6 +8033,9 @@ function trackIntrinsicState(budget, root, owner, targets) {
|
|
|
8018
8033
|
explicit: hasExplicitSandboxPrototype(target)
|
|
8019
8034
|
})).map((record4) => ({
|
|
8020
8035
|
...record4,
|
|
8036
|
+
revision: functionPropertyRevisions.get(record4.value),
|
|
8037
|
+
capturedRevision: -1,
|
|
8038
|
+
captured: [],
|
|
8021
8039
|
extensible: Object.isExtensible(record4.value),
|
|
8022
8040
|
descriptors: new Map(Reflect.ownKeys(record4.value).map((key) => [key, Object.getOwnPropertyDescriptor(record4.value, key)]))
|
|
8023
8041
|
}));
|
|
@@ -8033,14 +8051,21 @@ function trackIntrinsicState(budget, root, owner, targets) {
|
|
|
8033
8051
|
);
|
|
8034
8052
|
budget.setRetainedValues(root, () => {
|
|
8035
8053
|
const retained = [];
|
|
8036
|
-
for (const
|
|
8054
|
+
for (const record4 of records) {
|
|
8055
|
+
const { target, value, descriptors: descriptors2, prototype: parent, revision } = record4;
|
|
8037
8056
|
const currentPrototype = getSandboxPrototype(target);
|
|
8038
8057
|
if (currentPrototype !== parent) retained.push(currentPrototype);
|
|
8039
|
-
|
|
8040
|
-
const
|
|
8041
|
-
|
|
8042
|
-
|
|
8058
|
+
if (revision === void 0 || revision.revision !== record4.capturedRevision) {
|
|
8059
|
+
const captured = [];
|
|
8060
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
8061
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
8062
|
+
if (unchanged(descriptors2.get(key), descriptor)) continue;
|
|
8063
|
+
captured.push(key, descriptor.value, ...retainedAccessorClosures(descriptor));
|
|
8064
|
+
}
|
|
8065
|
+
record4.captured = captured;
|
|
8066
|
+
record4.capturedRevision = revision?.revision ?? -1;
|
|
8043
8067
|
}
|
|
8068
|
+
for (const item of record4.captured) retained.push(item);
|
|
8044
8069
|
}
|
|
8045
8070
|
return retained;
|
|
8046
8071
|
});
|
|
@@ -41024,4 +41049,4 @@ export {
|
|
|
41024
41049
|
FileSnapshotBackend,
|
|
41025
41050
|
run
|
|
41026
41051
|
};
|
|
41027
|
-
//# sourceMappingURL=chunk-
|
|
41052
|
+
//# sourceMappingURL=chunk-M4L3EZHL.js.map
|