@poe-platform/safe-js 0.1.407 → 0.1.409
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-WGMXY4HP.js → chunk-PRNIT3QM.js} +30 -16
- package/dist/safe-js/chunks/{chunk-WGMXY4HP.js.map → chunk-PRNIT3QM.js.map} +3 -3
- package/dist/safe-js/chunks/{chunk-MTMQBPY2.js → chunk-SY7CJXJN.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-MTMQBPY2.js.map → chunk-SY7CJXJN.js.map} +0 -0
|
@@ -30359,6 +30359,29 @@ function measureSandboxData(values, options = {}) {
|
|
|
30359
30359
|
assertSandboxDataDepth(depth);
|
|
30360
30360
|
seen.add(value);
|
|
30361
30361
|
usage += 1;
|
|
30362
|
+
const arrayLength = Array.isArray(value) ? value.length : void 0;
|
|
30363
|
+
const managedArray = arrayLength !== void 0 && hasManagedDescriptors(value);
|
|
30364
|
+
let arrayDescriptors;
|
|
30365
|
+
let arrayElements;
|
|
30366
|
+
if (arrayLength !== void 0) {
|
|
30367
|
+
if (managedArray) arrayDescriptors = [];
|
|
30368
|
+
else arrayElements = [];
|
|
30369
|
+
if (!managedArray && nodeTypes.isProxy(value)) {
|
|
30370
|
+
for (let index = 0; index < arrayLength; index += 1) {
|
|
30371
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, index);
|
|
30372
|
+
if (descriptor !== void 0 && "value" in descriptor) arrayElements.push(descriptor.value);
|
|
30373
|
+
}
|
|
30374
|
+
} else {
|
|
30375
|
+
for (const key of Object.getOwnPropertyNames(value)) {
|
|
30376
|
+
if (key === "length" || !managedArray && !isArrayIndexKey2(key)) continue;
|
|
30377
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
30378
|
+
if (descriptor !== void 0) {
|
|
30379
|
+
if (arrayDescriptors !== void 0) arrayDescriptors.push([key, descriptor]);
|
|
30380
|
+
else if ("value" in descriptor) arrayElements.push(descriptor.value);
|
|
30381
|
+
}
|
|
30382
|
+
}
|
|
30383
|
+
}
|
|
30384
|
+
}
|
|
30362
30385
|
const privateSlots = privateElements.get(value);
|
|
30363
30386
|
if (privateSlots !== void 0) {
|
|
30364
30387
|
for (const [name, element] of privateSlots) {
|
|
@@ -30427,25 +30450,16 @@ function measureSandboxData(values, options = {}) {
|
|
|
30427
30450
|
}
|
|
30428
30451
|
return;
|
|
30429
30452
|
}
|
|
30430
|
-
if (
|
|
30431
|
-
usage +=
|
|
30432
|
-
if (
|
|
30433
|
-
const
|
|
30434
|
-
for (const key of Object.getOwnPropertyNames(value)) {
|
|
30435
|
-
if (key === "length") continue;
|
|
30436
|
-
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
30437
|
-
if (descriptor !== void 0) descriptors2.push([key, descriptor]);
|
|
30438
|
-
}
|
|
30439
|
-
for (const [key, descriptor] of descriptors2) {
|
|
30453
|
+
if (arrayLength !== void 0) {
|
|
30454
|
+
usage += arrayLength;
|
|
30455
|
+
if (arrayDescriptors !== void 0) {
|
|
30456
|
+
for (const [key, descriptor] of arrayDescriptors) {
|
|
30440
30457
|
usage += key.length + 1;
|
|
30441
30458
|
if ("value" in descriptor) visit(descriptor.value, depth + 1);
|
|
30442
30459
|
else for (const closure of retainedAccessorClosures(descriptor)) visit(closure, depth + 1);
|
|
30443
30460
|
}
|
|
30444
|
-
|
|
30445
|
-
|
|
30446
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
30447
|
-
const descriptor = Object.getOwnPropertyDescriptor(value, index);
|
|
30448
|
-
if (descriptor !== void 0 && "value" in descriptor) visit(descriptor.value, depth + 1);
|
|
30461
|
+
} else {
|
|
30462
|
+
for (const element of arrayElements) visit(element, depth + 1);
|
|
30449
30463
|
}
|
|
30450
30464
|
return;
|
|
30451
30465
|
}
|
|
@@ -45558,4 +45572,4 @@ export {
|
|
|
45558
45572
|
FileSnapshotBackend,
|
|
45559
45573
|
run
|
|
45560
45574
|
};
|
|
45561
|
-
//# sourceMappingURL=chunk-
|
|
45575
|
+
//# sourceMappingURL=chunk-PRNIT3QM.js.map
|