@poe-platform/safe-js 0.1.166 → 0.1.167

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-LVK2NO45.js";
30
+ } from "./chunk-QQ2J2CDJ.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-L2WEG3IX.js.map
8252
+ //# sourceMappingURL=chunk-HH5HD7AM.js.map
@@ -7536,9 +7536,9 @@ function setSandboxPrototype(value, prototype, budget) {
7536
7536
  if (budget !== void 0 && intrinsicPrototypes.get(budget) === value && prototype !== null) {
7537
7537
  throw new TypeError("Object.prototype has an immutable null prototype.");
7538
7538
  }
7539
- if (!isPrototypeRecord(value) || prototype !== null && !isPrototypeRecord(prototype)) {
7539
+ if (!Array.isArray(value) && !isPrototypeRecord(value) || prototype !== null && !Array.isArray(prototype) && !isPrototypeRecord(prototype)) {
7540
7540
  throw new TypeError(
7541
- "Prototype links require ordinary sandbox objects or guest functions."
7541
+ "Prototype links require ordinary sandbox objects, arrays, or guest functions."
7542
7542
  );
7543
7543
  }
7544
7544
  if (prototypes.has(value) && getSandboxPrototype(value, budget) === prototype) return;
@@ -9371,6 +9371,7 @@ function getSandboxIterator(value, budget, context) {
9371
9371
  if (isSandboxSet(value)) {
9372
9372
  return collectionIterator(value.values);
9373
9373
  }
9374
+ if (Array.isArray(value) && hasExplicitSandboxPrototype(value)) return void 0;
9374
9375
  if (Array.isArray(value) && context?.getProperty !== void 0) {
9375
9376
  let index = 0;
9376
9377
  return {
@@ -15713,6 +15714,8 @@ async function evaluateMemberCallExpression(node, context) {
15713
15714
  return evaluateResolvedCallExpression(node, await getPropertyValue(member.object, member.property, context, member.superReceiver.value), context, member.superReceiver.value);
15714
15715
  if (typeof member.property === "symbol")
15715
15716
  return evaluateResolvedCallExpression(node, await getPropertyValue(member.object, member.property, context), context, member.object);
15717
+ if (Array.isArray(member.object) && hasExplicitSandboxPrototype(member.object))
15718
+ return evaluateResolvedCallExpression(node, await getPropertyValue(member.object, member.property, context), context, member.object);
15716
15719
  if ((typeof member.object === "string" || typeof member.object === "number" || typeof member.object === "boolean" || typeof member.object === "symbol") && getBoxedPrototype(member.object, context.budget) !== void 0) {
15717
15720
  if (isDefaultBoxedMethod(member.object, member.property, context.budget)) {
15718
15721
  if (typeof member.object === "string" && isStringMethodName(member.property))
@@ -16081,7 +16084,7 @@ function hasSandboxProperty(value, key, context) {
16081
16084
  while (typeof current === "object" && current !== null) {
16082
16085
  if (isGuestHostObject(current)) return typeof key === "symbol" ? false : hasHostObjectMember(current, String(key));
16083
16086
  if (hasOwnSandboxProperty(current, key, false)) return true;
16084
- if (!(isGuestClosure(current) && hasExplicitSandboxPrototype(current)) && (Array.isArray(current) || !isPlainSandboxObject(current) || isSandboxDate(current) || isFloat32Array(current) || isSandboxGenerator(current) || isSandboxCollectionIterator(current))) {
16087
+ if (!((isGuestClosure(current) || Array.isArray(current)) && hasExplicitSandboxPrototype(current)) && (Array.isArray(current) || !isPlainSandboxObject(current) || isSandboxDate(current) || isFloat32Array(current) || isSandboxGenerator(current) || isSandboxCollectionIterator(current))) {
16085
16088
  return getPropertyValue(current, key, context) !== void 0;
16086
16089
  }
16087
16090
  current = getSandboxPrototype(current, context.budget);
@@ -16294,6 +16297,7 @@ function getMemberValue(target, property, context) {
16294
16297
  return void 0;
16295
16298
  }
16296
16299
  function getArrayMemberValue(target, property, context) {
16300
+ if (hasExplicitSandboxPrototype(target)) return void 0;
16297
16301
  if (property === "raw" && taggedTemplateRawArrays.has(target)) {
16298
16302
  return taggedTemplateRawArrays.get(target);
16299
16303
  }
@@ -35933,4 +35937,4 @@ export {
35933
35937
  FileSnapshotBackend,
35934
35938
  run
35935
35939
  };
35936
- //# sourceMappingURL=chunk-LVK2NO45.js.map
35940
+ //# sourceMappingURL=chunk-QQ2J2CDJ.js.map