@poe-platform/safe-js 0.1.408 → 0.1.410
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-IP5BHXCD.js → chunk-CQVCWQYC.js} +2 -2
- package/dist/safe-js/chunks/{chunk-6GFX7QAK.js → chunk-I5MW527A.js} +32 -25
- package/dist/safe-js/chunks/{chunk-6GFX7QAK.js.map → chunk-I5MW527A.js.map} +3 -3
- 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-IP5BHXCD.js.map → chunk-CQVCWQYC.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-I5MW527A.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-CQVCWQYC.js.map
|
|
@@ -30359,6 +30359,32 @@ 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") {
|
|
30377
|
+
if (!managedArray) break;
|
|
30378
|
+
continue;
|
|
30379
|
+
}
|
|
30380
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
30381
|
+
if (descriptor !== void 0) {
|
|
30382
|
+
if (arrayDescriptors !== void 0) arrayDescriptors.push([key, descriptor]);
|
|
30383
|
+
else if ("value" in descriptor && typeof descriptor.value !== "number") arrayElements.push(descriptor.value);
|
|
30384
|
+
}
|
|
30385
|
+
}
|
|
30386
|
+
}
|
|
30387
|
+
}
|
|
30362
30388
|
const privateSlots = privateElements.get(value);
|
|
30363
30389
|
if (privateSlots !== void 0) {
|
|
30364
30390
|
for (const [name, element] of privateSlots) {
|
|
@@ -30427,36 +30453,17 @@ function measureSandboxData(values, options = {}) {
|
|
|
30427
30453
|
}
|
|
30428
30454
|
return;
|
|
30429
30455
|
}
|
|
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) {
|
|
30456
|
+
if (arrayLength !== void 0) {
|
|
30457
|
+
usage += arrayLength;
|
|
30458
|
+
if (arrayDescriptors !== void 0) {
|
|
30459
|
+
for (const [key, descriptor] of arrayDescriptors) {
|
|
30440
30460
|
usage += key.length + 1;
|
|
30441
30461
|
if ("value" in descriptor) visit(descriptor.value, depth + 1);
|
|
30442
30462
|
else for (const closure of retainedAccessorClosures(descriptor)) visit(closure, depth + 1);
|
|
30443
30463
|
}
|
|
30444
|
-
return;
|
|
30445
|
-
}
|
|
30446
|
-
const elements = [];
|
|
30447
|
-
if (nodeTypes.isProxy(value)) {
|
|
30448
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
30449
|
-
const descriptor = Object.getOwnPropertyDescriptor(value, index);
|
|
30450
|
-
if (descriptor !== void 0 && "value" in descriptor) elements.push(descriptor.value);
|
|
30451
|
-
}
|
|
30452
30464
|
} else {
|
|
30453
|
-
for (const
|
|
30454
|
-
if (!isArrayIndexKey2(key)) continue;
|
|
30455
|
-
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
30456
|
-
if (descriptor !== void 0 && "value" in descriptor) elements.push(descriptor.value);
|
|
30457
|
-
}
|
|
30465
|
+
for (const element of arrayElements) visit(element, depth + 1);
|
|
30458
30466
|
}
|
|
30459
|
-
for (const element of elements) visit(element, depth + 1);
|
|
30460
30467
|
return;
|
|
30461
30468
|
}
|
|
30462
30469
|
if (isSandboxMap(value) || isSandboxSet(value)) {
|
|
@@ -45568,4 +45575,4 @@ export {
|
|
|
45568
45575
|
FileSnapshotBackend,
|
|
45569
45576
|
run
|
|
45570
45577
|
};
|
|
45571
|
-
//# sourceMappingURL=chunk-
|
|
45578
|
+
//# sourceMappingURL=chunk-I5MW527A.js.map
|