@poe-platform/safe-js 0.1.263 → 0.1.264

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.
@@ -13584,7 +13584,7 @@ function createObjectArrayGlobals(options) {
13584
13584
  sandbox: true,
13585
13585
  call: async ([value, key], context) => {
13586
13586
  const descriptor = Object.getOwnPropertyDescriptor(
13587
- objectProperties(value),
13587
+ reflectionProperties(value),
13588
13588
  await toPropertyKey(key, options.budget, context)
13589
13589
  );
13590
13590
  if (descriptor === void 0) return void 0;
@@ -13599,7 +13599,7 @@ function createObjectArrayGlobals(options) {
13599
13599
  sandbox: true,
13600
13600
  call: ([value]) => {
13601
13601
  const descriptors2 = /* @__PURE__ */ Object.create(null);
13602
- const properties = objectProperties(value);
13602
+ const properties = reflectionProperties(value);
13603
13603
  for (const key of [...Object.getOwnPropertyNames(properties), ...ownSandboxSymbolKeys(value)])
13604
13604
  defineOwnDataProperty(descriptors2, key, exposePropertyDescriptor(Object.getOwnPropertyDescriptor(properties, key)));
13605
13605
  return allocateProducedSandboxValue(descriptors2, options.budget);
@@ -13608,7 +13608,7 @@ function createObjectArrayGlobals(options) {
13608
13608
  }),
13609
13609
  getOwnPropertyNames: createSandboxClosure({
13610
13610
  sandbox: true,
13611
- call: ([value]) => budgetSandboxValue2(Object.getOwnPropertyNames(objectProperties(value)), options.budget),
13611
+ call: ([value]) => budgetSandboxValue2(Object.getOwnPropertyNames(reflectionProperties(value)), options.budget),
13612
13612
  name: "getOwnPropertyNames"
13613
13613
  }),
13614
13614
  getOwnPropertySymbols: createSandboxClosure({
@@ -13963,6 +13963,11 @@ function assignSandboxValues(target, sources, budget, context) {
13963
13963
  }
13964
13964
  })();
13965
13965
  }
13966
+ function reflectionProperties(value) {
13967
+ if (value !== null && value !== void 0 && typeof value !== "object")
13968
+ value = createSandboxBox(value);
13969
+ return objectProperties(value);
13970
+ }
13966
13971
  function objectProperties(value, mutable = false) {
13967
13972
  if (isSandboxMap(value) || isSandboxSet(value)) return getCollectionProperties(value);
13968
13973
  if (isSandboxRegex(value)) return getRegexProperties(value);
@@ -40041,4 +40046,4 @@ export {
40041
40046
  FileSnapshotBackend,
40042
40047
  run
40043
40048
  };
40044
- //# sourceMappingURL=chunk-ATYG2NJO.js.map
40049
+ //# sourceMappingURL=chunk-5ICV3URR.js.map