@poe-platform/safe-js 0.1.249 → 0.1.251

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-IKHGVNT5.js";
30
+ } from "./chunk-QN4BNY6V.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-2I5DAEWD.js.map
8252
+ //# sourceMappingURL=chunk-EEO344SX.js.map
@@ -7863,6 +7863,10 @@ function registerIntrinsicFunction(budget, closure) {
7863
7863
  registerBuiltinIdentities(budget, { [closure.name]: closure });
7864
7864
  trackIntrinsicState(budget, closure, closure, [closure]);
7865
7865
  }
7866
+ function registerIntrinsicObject(budget, value) {
7867
+ const methods = Object.values(Object.getOwnPropertyDescriptors(value)).map((descriptor) => descriptor.value).filter(isGuestClosure);
7868
+ trackIntrinsicState(budget, value, value, [value, ...methods]);
7869
+ }
7866
7870
  function trackIntrinsicState(budget, root, owner, targets) {
7867
7871
  let roots = intrinsicPrototypeRoots.get(budget);
7868
7872
  if (roots === void 0) intrinsicPrototypeRoots.set(budget, roots = /* @__PURE__ */ new Set());
@@ -21839,8 +21843,14 @@ function createConsoleJsonGlobals(options) {
21839
21843
  }
21840
21844
  )
21841
21845
  };
21846
+ const jsonMethods = Object.entries(globals.JSON);
21847
+ for (const [name] of jsonMethods) {
21848
+ Object.defineProperty(globals.JSON, name, { enumerable: false });
21849
+ }
21850
+ Object.defineProperty(globals.JSON, Symbol.toStringTag, { value: "JSON", configurable: true });
21842
21851
  registerBuiltinIdentities(options.budget, { JSON: globals.JSON });
21843
- for (const method of Object.values(globals.JSON)) registerIntrinsicFunction(options.budget, method);
21852
+ for (const [, method] of jsonMethods) registerIntrinsicFunction(options.budget, method);
21853
+ registerIntrinsicObject(options.budget, globals.JSON);
21844
21854
  return globals;
21845
21855
  }
21846
21856
  async function stringifyJson(value, replacer, indent, budget, context) {
@@ -22172,6 +22182,15 @@ function createMathGlobals(options = {}) {
22172
22182
  name
22173
22183
  });
22174
22184
  }
22185
+ for (const [name, value] of Object.entries(mathObject)) {
22186
+ const constant = typeof value === "number";
22187
+ Object.defineProperty(mathObject, name, {
22188
+ enumerable: false,
22189
+ writable: !constant,
22190
+ configurable: !constant
22191
+ });
22192
+ }
22193
+ Object.defineProperty(mathObject, Symbol.toStringTag, { value: "Math", configurable: true });
22175
22194
  return {
22176
22195
  Infinity: Infinity,
22177
22196
  Math: mathObject,
@@ -22849,6 +22868,7 @@ function createBuiltinBindings(options) {
22849
22868
  ...createRegexGlobals(options)
22850
22869
  };
22851
22870
  registerBuiltinIdentities(options.budget, bindings);
22871
+ registerIntrinsicObject(options.budget, bindings.Math);
22852
22872
  return bindings;
22853
22873
  }
22854
22874
 
@@ -39565,4 +39585,4 @@ export {
39565
39585
  FileSnapshotBackend,
39566
39586
  run
39567
39587
  };
39568
- //# sourceMappingURL=chunk-IKHGVNT5.js.map
39588
+ //# sourceMappingURL=chunk-QN4BNY6V.js.map