@poe-platform/safe-js 0.1.104 → 0.1.106

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.
@@ -25405,7 +25405,7 @@ function isSandboxSetConstructor(value) {
25405
25405
  return typeof value === "object" && value !== null && setConstructors.has(value);
25406
25406
  }
25407
25407
  function getMapEntries(source) {
25408
- if (source === void 0) {
25408
+ if (source === void 0 || source === null) {
25409
25409
  return [];
25410
25410
  }
25411
25411
  if (isSandboxMap(source)) {
@@ -25438,7 +25438,7 @@ function validateMapEntries(sourceEntries) {
25438
25438
  });
25439
25439
  }
25440
25440
  function getSetValues(source) {
25441
- if (source === void 0) {
25441
+ if (source === void 0 || source === null) {
25442
25442
  return [];
25443
25443
  }
25444
25444
  if (isSandboxSet(source)) {
@@ -30819,12 +30819,11 @@ async function arrayFromSandboxValues(args, budget, context) {
30819
30819
  if (Array.isArray(result)) budget.allocateArrayLength(index + 1);
30820
30820
  if (mapFn !== void 0) currentValue = await invokeBuiltinClosure(mapFn, [currentValue, index], budget, context, thisValue);
30821
30821
  const key = String(index);
30822
- const growth = key.length + 1 + (Array.isArray(result) ? Math.max(0, index + 1 - result.length) : 0) + (typeof currentValue === "string" ? currentValue.length : 0);
30823
- const graphChanged = typeof currentValue === "object" && currentValue !== null || isSandboxClosure(result);
30822
+ const growth = key.length + 1 + (Array.isArray(result) ? Math.max(0, index + 1 - result.length) : 0) + (budget.limits.dataSize === void 0 ? 0 : measureSandboxData([currentValue]));
30824
30823
  budget.visitNode();
30825
30824
  defineOwnDataProperty(objectProperties(result, true), key, currentValue);
30826
30825
  currentValue = void 0;
30827
- checkData(result, growth, graphChanged);
30826
+ checkData(result, growth, isSandboxClosure(result));
30828
30827
  } catch (error) {
30829
30828
  await closeOnThrow(error);
30830
30829
  }
@@ -33024,4 +33023,4 @@ export {
33024
33023
  FileSnapshotBackend,
33025
33024
  run
33026
33025
  };
33027
- //# sourceMappingURL=chunk-WNZAFVXS.js.map
33026
+ //# sourceMappingURL=chunk-FV3SMFMZ.js.map