@poe-platform/safe-js 0.1.347 → 0.1.349
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-B2YSIUFJ.js → chunk-7ORDSDBM.js} +2 -2
- package/dist/safe-js/chunks/{chunk-FBNMJ5UK.js → chunk-SABWKUSN.js} +41 -11
- package/dist/safe-js/chunks/{chunk-FBNMJ5UK.js.map → chunk-SABWKUSN.js.map} +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-B2YSIUFJ.js.map → chunk-7ORDSDBM.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-SABWKUSN.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-7ORDSDBM.js.map
|
|
@@ -14883,7 +14883,7 @@ function createFloat32ArrayPrototypes(budget, constructor) {
|
|
|
14883
14883
|
getters.push(getter);
|
|
14884
14884
|
Object.defineProperty(shared, key, { get: accessorAdapter(getter, "get"), configurable: true });
|
|
14885
14885
|
}
|
|
14886
|
-
for (const key of ["set", "slice", "subarray", "fill", "copyWithin", "reverse", "toReversed", "at", "includes", "indexOf", "lastIndexOf", "forEach", "every", "some", "find", "findIndex", "findLast", "findLastIndex", "sort", "toSorted", "reduce", "reduceRight", "map", "filter", "toLocaleString"])
|
|
14886
|
+
for (const key of ["set", "slice", "subarray", "fill", "copyWithin", "reverse", "toReversed", "at", "includes", "indexOf", "lastIndexOf", "forEach", "every", "some", "find", "findIndex", "findLast", "findLastIndex", "sort", "toSorted", "with", "reduce", "reduceRight", "map", "filter", "toLocaleString"])
|
|
14887
14887
|
Object.defineProperty(shared, key, { value: getFloat32Member(new Float32Array(0), key, budget, constructor), writable: true, configurable: true });
|
|
14888
14888
|
const arrayPrototype = resolveIntrinsicIdentity(budget, '["Array","prototype"]');
|
|
14889
14889
|
Object.defineProperty(shared, "toString", { value: getSandboxDataProperty(arrayPrototype, "toString", budget), writable: true, configurable: true });
|
|
@@ -14965,7 +14965,7 @@ function getFloat32Member(value, property, budget, defaultConstructor) {
|
|
|
14965
14965
|
if (key === "byteLength") return storage.length * 4;
|
|
14966
14966
|
if (key === "byteOffset") return storage.byteOffset;
|
|
14967
14967
|
if (key === "BYTES_PER_ELEMENT") return 4;
|
|
14968
|
-
if (!["set", "slice", "subarray", "fill", "copyWithin", "reverse", "toReversed", "at", "includes", "indexOf", "lastIndexOf", "forEach", "every", "some", "find", "findIndex", "findLast", "findLastIndex", "sort", "toSorted", "reduce", "reduceRight", "map", "filter", "toLocaleString"].includes(key)) return void 0;
|
|
14968
|
+
if (!["set", "slice", "subarray", "fill", "copyWithin", "reverse", "toReversed", "at", "includes", "indexOf", "lastIndexOf", "forEach", "every", "some", "find", "findIndex", "findLast", "findLastIndex", "sort", "toSorted", "with", "reduce", "reduceRight", "map", "filter", "toLocaleString"].includes(key)) return void 0;
|
|
14969
14969
|
const numberPrototype = key === "toLocaleString" ? getBoxedPrototype(0, budget) : void 0;
|
|
14970
14970
|
return createSandboxClosure({
|
|
14971
14971
|
guest: true,
|
|
@@ -14978,7 +14978,7 @@ function getFloat32Member(value, property, budget, defaultConstructor) {
|
|
|
14978
14978
|
const receiver = context?.thisValue;
|
|
14979
14979
|
if (!isFloat32Array(receiver))
|
|
14980
14980
|
throw new TypeError(`Float32Array#${key} requires a Float32Array receiver.`);
|
|
14981
|
-
const storage2 = float32Storage(receiver, key === "sort" || key === "toSorted" || key === "reduce" || key === "reduceRight" || key === "map" || key === "filter" || key === "slice" || key === "fill" || key === "copyWithin" || key === "reverse" || key === "toReversed" || key === "at" || key === "includes" || key === "indexOf" || key === "lastIndexOf" || key === "forEach" || key === "every" || key === "some" || key === "find" || key === "findIndex" || key === "findLast" || key === "findLastIndex" || key === "toLocaleString");
|
|
14981
|
+
const storage2 = float32Storage(receiver, key === "sort" || key === "toSorted" || key === "with" || key === "reduce" || key === "reduceRight" || key === "map" || key === "filter" || key === "slice" || key === "fill" || key === "copyWithin" || key === "reverse" || key === "toReversed" || key === "at" || key === "includes" || key === "indexOf" || key === "lastIndexOf" || key === "forEach" || key === "every" || key === "some" || key === "find" || key === "findIndex" || key === "findLast" || key === "findLastIndex" || key === "toLocaleString");
|
|
14982
14982
|
if (key === "toReversed") {
|
|
14983
14983
|
let result;
|
|
14984
14984
|
const release = retainValues(budget, () => [receiver, result, ...args]);
|
|
@@ -15178,6 +15178,30 @@ function getFloat32Member(value, property, budget, defaultConstructor) {
|
|
|
15178
15178
|
}
|
|
15179
15179
|
})();
|
|
15180
15180
|
}
|
|
15181
|
+
if (key === "with") {
|
|
15182
|
+
return (async () => {
|
|
15183
|
+
let result;
|
|
15184
|
+
const release = retainValues(budget, () => [receiver, result, ...args]);
|
|
15185
|
+
try {
|
|
15186
|
+
const number = await sandboxNumber(args[0], budget, bridge);
|
|
15187
|
+
const relative = Number.isNaN(number) ? 0 : Math.trunc(number);
|
|
15188
|
+
const index = relative < 0 ? storage2.length + relative : relative;
|
|
15189
|
+
const replacement = await sandboxNumber(args[1], budget, bridge);
|
|
15190
|
+
if (index < 0 || index >= float32Storage(receiver).length)
|
|
15191
|
+
throw new RangeError("Float32Array#with index is out of bounds.");
|
|
15192
|
+
checkFloat32Allocation(storage2.length, budget);
|
|
15193
|
+
result = new Float32Array(storage2.length);
|
|
15194
|
+
createDataCheckpoint(budget, bridge)(result, 0, true);
|
|
15195
|
+
for (let offset = 0; offset < storage2.length; offset++) {
|
|
15196
|
+
budget.visitNode();
|
|
15197
|
+
result[offset] = offset === index ? replacement : receiver[offset];
|
|
15198
|
+
}
|
|
15199
|
+
return result;
|
|
15200
|
+
} finally {
|
|
15201
|
+
release();
|
|
15202
|
+
}
|
|
15203
|
+
})();
|
|
15204
|
+
}
|
|
15181
15205
|
if (key === "at") {
|
|
15182
15206
|
return (async () => {
|
|
15183
15207
|
const release = retainValues(budget, () => [receiver, ...args]);
|
|
@@ -15370,15 +15394,22 @@ function getFloat32Member(value, property, budget, defaultConstructor) {
|
|
|
15370
15394
|
}
|
|
15371
15395
|
});
|
|
15372
15396
|
}
|
|
15373
|
-
function setFloat32Member(value, property, entry, budget) {
|
|
15397
|
+
function setFloat32Member(value, property, entry, budget, context) {
|
|
15374
15398
|
const key = typeof property === "symbol" ? property : String(property);
|
|
15375
15399
|
if (typeof key !== "symbol" && isFloat32Index(key)) {
|
|
15376
|
-
|
|
15377
|
-
|
|
15400
|
+
return (async () => {
|
|
15401
|
+
const release = retainValues(budget, () => [value, entry]);
|
|
15402
|
+
try {
|
|
15403
|
+
const number = await sandboxNumber(entry, budget, context);
|
|
15404
|
+
Reflect.set(value, key, number);
|
|
15405
|
+
} finally {
|
|
15406
|
+
release();
|
|
15407
|
+
}
|
|
15408
|
+
})();
|
|
15378
15409
|
}
|
|
15379
15410
|
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
15380
|
-
const inherited = descriptor ??
|
|
15381
|
-
if (descriptor === void 0 && typeof key === "string" &&
|
|
15411
|
+
const inherited = descriptor ?? getSandboxPropertyDescriptor(value, key, budget);
|
|
15412
|
+
if (descriptor === void 0 && typeof key === "string" && !float32Prototypes.has(budget) && ["length", "byteLength", "byteOffset", "buffer", "BYTES_PER_ELEMENT"].includes(key))
|
|
15382
15413
|
throw new TypeError(`Cannot assign to read only property '${String(key)}'.`);
|
|
15383
15414
|
if (inherited !== void 0 && (!("value" in inherited) || !inherited.writable))
|
|
15384
15415
|
throw new TypeError(`Cannot assign to read only property '${String(key)}'.`);
|
|
@@ -18728,8 +18759,7 @@ function setSandboxProperty(target, property, value, budget, checkInherited = tr
|
|
|
18728
18759
|
if (isSandboxGenerator(target)) target = getGeneratorProperties(target);
|
|
18729
18760
|
if (isSandboxMap(target) || isSandboxSet(target)) target = getCollectionProperties(target);
|
|
18730
18761
|
if (isFloat32Array(target)) {
|
|
18731
|
-
setFloat32Member(target, property, value, budget);
|
|
18732
|
-
return;
|
|
18762
|
+
return setFloat32Member(target, property, value, budget, context);
|
|
18733
18763
|
}
|
|
18734
18764
|
if (isSandboxRegex(target)) {
|
|
18735
18765
|
setRegexMember(target, property, value, budget);
|
|
@@ -42634,4 +42664,4 @@ export {
|
|
|
42634
42664
|
FileSnapshotBackend,
|
|
42635
42665
|
run
|
|
42636
42666
|
};
|
|
42637
|
-
//# sourceMappingURL=chunk-
|
|
42667
|
+
//# sourceMappingURL=chunk-SABWKUSN.js.map
|