@poe-platform/safe-js 0.1.266 → 0.1.267

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.
@@ -13940,8 +13940,13 @@ function assignSandboxValues(target, sources, budget, context) {
13940
13940
  if (context === void 0) {
13941
13941
  for (const source of sources) {
13942
13942
  if (source === null || source === void 0) continue;
13943
- for (const [key, value] of ownEnumerableSandboxEntries(source))
13943
+ const properties = isGuestHostObject(source) ? void 0 : reflectionProperties(source);
13944
+ const keys = properties === void 0 ? ownEnumerableSandboxKeys(source, true) : [...Object.getOwnPropertyNames(properties), ...ownSandboxSymbolKeys(source)];
13945
+ for (const key of keys) {
13946
+ if (!hasOwnSandboxProperty(source, key, true)) continue;
13947
+ const value = properties === void 0 ? getSandboxDataProperty(source, key, budget) : Reflect.get(properties, key, source);
13944
13948
  setSandboxProperty(target, key, value, budget);
13949
+ }
13945
13950
  }
13946
13951
  return target;
13947
13952
  }
@@ -13950,9 +13955,11 @@ function assignSandboxValues(target, sources, budget, context) {
13950
13955
  try {
13951
13956
  for (const source of sources) {
13952
13957
  if (source === null || source === void 0) continue;
13953
- for (const key of ownEnumerableSandboxKeys(source)) {
13958
+ const properties = isGuestHostObject(source) ? void 0 : reflectionProperties(source);
13959
+ const keys = properties === void 0 ? ownEnumerableSandboxKeys(source, true) : [...Object.getOwnPropertyNames(properties), ...ownSandboxSymbolKeys(source)];
13960
+ for (const key of keys) {
13954
13961
  if (!hasOwnSandboxProperty(source, key, true)) continue;
13955
- const value = await (context.getProperty !== void 0 ? context.getProperty(source, key) : getSandboxDataProperty(source, key, budget));
13962
+ const value = await (context?.getProperty !== void 0 ? context.getProperty(source, key) : isGuestHostObject(source) ? getSandboxDataProperty(source, key, budget) : readPropertyDescriptor(Object.getOwnPropertyDescriptor(properties, key), source, context, true));
13956
13963
  await setSandboxProperty(target, key, value, budget, true, context);
13957
13964
  }
13958
13965
  }
@@ -40082,4 +40089,4 @@ export {
40082
40089
  FileSnapshotBackend,
40083
40090
  run
40084
40091
  };
40085
- //# sourceMappingURL=chunk-2W5HRQU3.js.map
40092
+ //# sourceMappingURL=chunk-GF6I2VQR.js.map