@poe-platform/safe-js 0.1.376 → 0.1.377
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-7UITTELW.js → chunk-MNH75BJN.js} +25 -22
- package/dist/safe-js/chunks/{chunk-7UITTELW.js.map → chunk-MNH75BJN.js.map} +3 -3
- package/dist/safe-js/chunks/{chunk-HRCDXQXK.js → chunk-V3IQSKGJ.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-HRCDXQXK.js.map → chunk-V3IQSKGJ.js.map} +0 -0
|
@@ -28747,8 +28747,8 @@ function measureSandboxData(values, options = {}) {
|
|
|
28747
28747
|
usage += 1;
|
|
28748
28748
|
if (!isGuestHostObject(value)) {
|
|
28749
28749
|
const symbols = Object.getOwnPropertySymbols(value);
|
|
28750
|
-
const
|
|
28751
|
-
for (const [key, descriptor] of
|
|
28750
|
+
const descriptors2 = symbols.length === 0 ? [] : symbols.filter((key) => !internalSymbols.has(key)).map((key) => [key, Object.getOwnPropertyDescriptor(value, key)]);
|
|
28751
|
+
for (const [key, descriptor] of descriptors2) {
|
|
28752
28752
|
usage += 1;
|
|
28753
28753
|
visit(key, depth + 1);
|
|
28754
28754
|
if ("value" in descriptor) visit(descriptor.value, depth + 1);
|
|
@@ -28792,13 +28792,13 @@ function measureSandboxData(values, options = {}) {
|
|
|
28792
28792
|
if (Array.isArray(value)) {
|
|
28793
28793
|
usage += value.length;
|
|
28794
28794
|
if (hasManagedDescriptors(value)) {
|
|
28795
|
-
const
|
|
28795
|
+
const descriptors2 = [];
|
|
28796
28796
|
for (const key of Object.getOwnPropertyNames(value)) {
|
|
28797
28797
|
if (key === "length") continue;
|
|
28798
28798
|
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
28799
|
-
if (descriptor !== void 0)
|
|
28799
|
+
if (descriptor !== void 0) descriptors2.push([key, descriptor]);
|
|
28800
28800
|
}
|
|
28801
|
-
for (const [key, descriptor] of
|
|
28801
|
+
for (const [key, descriptor] of descriptors2) {
|
|
28802
28802
|
usage += key.length + 1;
|
|
28803
28803
|
if ("value" in descriptor) visit(descriptor.value, depth + 1);
|
|
28804
28804
|
else for (const closure of retainedAccessorClosures(descriptor)) visit(closure, depth + 1);
|
|
@@ -28865,13 +28865,13 @@ function measureSandboxData(values, options = {}) {
|
|
|
28865
28865
|
} else visit(value.properties, depth + 1);
|
|
28866
28866
|
}
|
|
28867
28867
|
if (!options.ignoreClosureCaptures)
|
|
28868
|
-
for (const
|
|
28868
|
+
for (const retained2 of value[sandboxRetainedValues]?.() ?? []) visit(retained2, depth + 1);
|
|
28869
28869
|
return;
|
|
28870
28870
|
}
|
|
28871
28871
|
if (isSandboxGenerator(value)) {
|
|
28872
|
-
const
|
|
28873
|
-
for (const key of Reflect.ownKeys(
|
|
28874
|
-
const descriptor =
|
|
28872
|
+
const descriptors2 = Object.getOwnPropertyDescriptors(getGeneratorProperties(value));
|
|
28873
|
+
for (const key of Reflect.ownKeys(descriptors2)) {
|
|
28874
|
+
const descriptor = descriptors2[key];
|
|
28875
28875
|
usage += typeof key === "string" ? key.length + 1 : 1;
|
|
28876
28876
|
if (typeof key === "symbol") visit(key, depth + 1);
|
|
28877
28877
|
if ("value" in descriptor) visit(descriptor.value, depth + 1);
|
|
@@ -28912,27 +28912,30 @@ function measureSandboxData(values, options = {}) {
|
|
|
28912
28912
|
const entries = [];
|
|
28913
28913
|
for (const key of Object.getOwnPropertyNames(value)) {
|
|
28914
28914
|
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
28915
|
-
const
|
|
28916
|
-
if (
|
|
28915
|
+
const retained2 = "value" in descriptor ? [descriptor.value] : retainedAccessorClosures(descriptor);
|
|
28916
|
+
if (retained2.length > 0) entries.push([key, retained2]);
|
|
28917
28917
|
}
|
|
28918
|
-
for (const [key,
|
|
28918
|
+
for (const [key, retained2] of entries) {
|
|
28919
28919
|
usage += 1 + key.length;
|
|
28920
|
-
for (const entry of
|
|
28920
|
+
for (const entry of retained2) visit(entry, depth + 1);
|
|
28921
28921
|
}
|
|
28922
28922
|
return;
|
|
28923
28923
|
}
|
|
28924
|
-
const
|
|
28925
|
-
|
|
28926
|
-
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
28927
|
-
if (descriptor !== void 0) descriptors2.push([key, descriptor]);
|
|
28928
|
-
}
|
|
28924
|
+
const proxyKeys = nodeTypes.isProxy(value) ? Object.getOwnPropertyNames(value) : void 0;
|
|
28925
|
+
const proxyDescriptors = proxyKeys?.map((key) => Object.getOwnPropertyDescriptor(value, key));
|
|
28929
28926
|
const includeNonEnumerable = isSandboxDate(value) || isSandboxArrayBuffer(value) || isSandboxDataView(value) || sandboxErrorTypes.has(value) || hasManagedDescriptors(value);
|
|
28930
|
-
|
|
28927
|
+
const keys = proxyKeys ?? (includeNonEnumerable ? Object.getOwnPropertyNames(value) : Object.keys(value));
|
|
28928
|
+
const retained = [];
|
|
28929
|
+
for (let index = 0; index < keys.length; index++) {
|
|
28930
|
+
const key = keys[index];
|
|
28931
|
+
const descriptor = proxyDescriptors === void 0 ? Object.getOwnPropertyDescriptor(value, key) : proxyDescriptors[index];
|
|
28932
|
+
if (descriptor === void 0) continue;
|
|
28931
28933
|
if (!descriptor.enumerable && !includeNonEnumerable) continue;
|
|
28932
28934
|
usage += 1 + key.length;
|
|
28933
|
-
if ("value" in descriptor)
|
|
28934
|
-
else for (const closure of retainedAccessorClosures(descriptor))
|
|
28935
|
+
if ("value" in descriptor) retained.push(descriptor.value);
|
|
28936
|
+
else for (const closure of retainedAccessorClosures(descriptor)) retained.push(closure);
|
|
28935
28937
|
}
|
|
28938
|
+
for (const entry of retained) visit(entry, depth + 1);
|
|
28936
28939
|
};
|
|
28937
28940
|
for (const value of values) visit(value);
|
|
28938
28941
|
return usage;
|
|
@@ -43888,4 +43891,4 @@ export {
|
|
|
43888
43891
|
FileSnapshotBackend,
|
|
43889
43892
|
run
|
|
43890
43893
|
};
|
|
43891
|
-
//# sourceMappingURL=chunk-
|
|
43894
|
+
//# sourceMappingURL=chunk-MNH75BJN.js.map
|