@poe-platform/safe-js 0.1.348 → 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.
@@ -27,7 +27,7 @@ import {
27
27
  validateMigrationSemantics,
28
28
  validateSnapshotData,
29
29
  validateSnapshotMigration
30
- } from "./chunk-HCUDGRUU.js";
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-KDBQOTJ2.js.map
8252
+ //# sourceMappingURL=chunk-7ORDSDBM.js.map
@@ -15394,15 +15394,22 @@ function getFloat32Member(value, property, budget, defaultConstructor) {
15394
15394
  }
15395
15395
  });
15396
15396
  }
15397
- function setFloat32Member(value, property, entry, budget) {
15397
+ function setFloat32Member(value, property, entry, budget, context) {
15398
15398
  const key = typeof property === "symbol" ? property : String(property);
15399
15399
  if (typeof key !== "symbol" && isFloat32Index(key)) {
15400
- Reflect.set(value, key, float32Number(entry));
15401
- return;
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
+ })();
15402
15409
  }
15403
15410
  const descriptor = Object.getOwnPropertyDescriptor(value, key);
15404
- const inherited = descriptor ?? (budget === void 0 ? void 0 : getSandboxPropertyDescriptor(value, key, budget));
15405
- if (descriptor === void 0 && typeof key === "string" && (budget === void 0 || !float32Prototypes.has(budget)) && ["length", "byteLength", "byteOffset", "buffer", "BYTES_PER_ELEMENT"].includes(key))
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))
15406
15413
  throw new TypeError(`Cannot assign to read only property '${String(key)}'.`);
15407
15414
  if (inherited !== void 0 && (!("value" in inherited) || !inherited.writable))
15408
15415
  throw new TypeError(`Cannot assign to read only property '${String(key)}'.`);
@@ -18752,8 +18759,7 @@ function setSandboxProperty(target, property, value, budget, checkInherited = tr
18752
18759
  if (isSandboxGenerator(target)) target = getGeneratorProperties(target);
18753
18760
  if (isSandboxMap(target) || isSandboxSet(target)) target = getCollectionProperties(target);
18754
18761
  if (isFloat32Array(target)) {
18755
- setFloat32Member(target, property, value, budget);
18756
- return;
18762
+ return setFloat32Member(target, property, value, budget, context);
18757
18763
  }
18758
18764
  if (isSandboxRegex(target)) {
18759
18765
  setRegexMember(target, property, value, budget);
@@ -42658,4 +42664,4 @@ export {
42658
42664
  FileSnapshotBackend,
42659
42665
  run
42660
42666
  };
42661
- //# sourceMappingURL=chunk-HCUDGRUU.js.map
42667
+ //# sourceMappingURL=chunk-SABWKUSN.js.map