poe-code 11.0.27 → 11.0.29

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.
package/dist/index.js CHANGED
@@ -137769,7 +137769,7 @@ var init_policy = __esm({
137769
137769
  // packages/safejs/src/interp/host-call.ts
137770
137770
  import { createHash as createHash13, randomUUID as randomUUID49 } from "node:crypto";
137771
137771
  function copyOutcome(outcome) {
137772
- return outcome.status === "fulfilled" ? { status: "fulfilled", value: deepCopyToSandbox(outcome.value) } : { status: "rejected", reason: deepCopyToSandbox(outcome.reason) };
137772
+ return outcome.status === "fulfilled" ? { status: "fulfilled", value: cloneSandboxValue(outcome.value) } : { status: "rejected", reason: cloneSandboxValue(outcome.reason) };
137773
137773
  }
137774
137774
  function restoreReplayCalls(input, encodedOutcomes, callbackSizes, requiredHostCapabilities = /* @__PURE__ */ new Set()) {
137775
137775
  validateSnapshotData(input);
@@ -142098,18 +142098,23 @@ function copyHostValueToSandbox(value, stackFrames, options, state, path191) {
142098
142098
  const copy = new Array(value.length);
142099
142099
  state.seen.set(value, copy);
142100
142100
  budget.allocateArrayLength(value.length);
142101
- for (let index = 0; index < value.length; index++) {
142102
- const descriptor = Object.getOwnPropertyDescriptor(value, String(index));
142103
- if (descriptor === void 0) continue;
142101
+ for (const [key3, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(value))) {
142102
+ const indexed = isArrayIndexKey(key3);
142103
+ if (key3 === "length" || !descriptor.enumerable && !indexed) continue;
142104
+ const entryPath = indexed ? `${path191}[${key3}]` : joinPath2(path191, key3);
142104
142105
  if (!("value" in descriptor)) {
142105
- throw new TypeError(`Unsupported sandbox value at ${path191}[${index}]: accessor property`);
142106
+ throw new TypeError(`Unsupported sandbox value at ${entryPath}: accessor property`);
142106
142107
  }
142107
- copy[index] = copyHostValueToSandbox(
142108
- descriptor.value,
142109
- stackFrames,
142110
- { ...options, capabilityPath: [...options.capabilityPath ?? [], String(index)] },
142111
- state,
142112
- `${path191}[${index}]`
142108
+ defineOwnDataProperty(
142109
+ copy,
142110
+ indexed ? key3 : budget.allocateString(key3),
142111
+ copyHostValueToSandbox(
142112
+ descriptor.value,
142113
+ stackFrames,
142114
+ { ...options, capabilityPath: [...options.capabilityPath ?? [], key3] },
142115
+ state,
142116
+ entryPath
142117
+ )
142113
142118
  );
142114
142119
  }
142115
142120
  return copy;
@@ -155808,7 +155813,7 @@ var init_package2 = __esm({
155808
155813
  "package.json"() {
155809
155814
  package_default2 = {
155810
155815
  name: "poe-code",
155811
- version: "11.0.27",
155816
+ version: "11.0.29",
155812
155817
  description: "CLI tool to configure Poe API for developer workflows.",
155813
155818
  license: "MIT",
155814
155819
  type: "module",