poe-code 11.0.28 → 11.0.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-code",
3
- "version": "11.0.28",
3
+ "version": "11.0.30",
4
4
  "description": "CLI tool to configure Poe API for developer workflows.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,7 +27,7 @@ import {
27
27
  validateMigrationSemantics,
28
28
  validateSnapshotData,
29
29
  validateSnapshotMigration
30
- } from "./chunk-FAAW5HF7.js";
30
+ } from "./chunk-XPDK2VVP.js";
31
31
 
32
32
  // packages/safejs/src/migrate.ts
33
33
  import { createHash } from "node:crypto";
@@ -8055,4 +8055,4 @@ export {
8055
8055
  parseMcpConfig,
8056
8056
  makeMcpModule
8057
8057
  };
8058
- //# sourceMappingURL=chunk-3OFXSTL2.js.map
8058
+ //# sourceMappingURL=chunk-44GTB3XV.js.map
@@ -21115,7 +21115,17 @@ function normalize(value, seen) {
21115
21115
  if (seen.has(value)) throw new TypeError("Host call arguments cannot contain cycles.");
21116
21116
  seen.add(value);
21117
21117
  try {
21118
- if (Array.isArray(value)) return value.map((entry) => normalize(entry, seen));
21118
+ if (Array.isArray(value)) {
21119
+ const normalized = new Array(value.length);
21120
+ for (const [key, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(value))) {
21121
+ if (!isArrayIndexKey(key)) continue;
21122
+ if (!("value" in descriptor)) {
21123
+ throw new TypeError("Host call arguments cannot contain accessor properties.");
21124
+ }
21125
+ defineOwnDataProperty(normalized, key, normalize(descriptor.value, seen));
21126
+ }
21127
+ return normalized;
21128
+ }
21119
21129
  return Object.fromEntries(
21120
21130
  Object.keys(value).sort().map((key) => [key, normalize(value[key], seen)])
21121
21131
  );
@@ -22662,18 +22672,23 @@ function copyHostValueToSandbox(value, stackFrames, options, state, path) {
22662
22672
  const copy = new Array(value.length);
22663
22673
  state.seen.set(value, copy);
22664
22674
  budget.allocateArrayLength(value.length);
22665
- for (let index = 0; index < value.length; index++) {
22666
- const descriptor = Object.getOwnPropertyDescriptor(value, String(index));
22667
- if (descriptor === void 0) continue;
22675
+ for (const [key, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(value))) {
22676
+ const indexed = isArrayIndexKey(key);
22677
+ if (key === "length" || !descriptor.enumerable && !indexed) continue;
22678
+ const entryPath = indexed ? `${path}[${key}]` : joinPath2(path, key);
22668
22679
  if (!("value" in descriptor)) {
22669
- throw new TypeError(`Unsupported sandbox value at ${path}[${index}]: accessor property`);
22680
+ throw new TypeError(`Unsupported sandbox value at ${entryPath}: accessor property`);
22670
22681
  }
22671
- copy[index] = copyHostValueToSandbox(
22672
- descriptor.value,
22673
- stackFrames,
22674
- { ...options, capabilityPath: [...options.capabilityPath ?? [], String(index)] },
22675
- state,
22676
- `${path}[${index}]`
22682
+ defineOwnDataProperty(
22683
+ copy,
22684
+ indexed ? key : budget.allocateString(key),
22685
+ copyHostValueToSandbox(
22686
+ descriptor.value,
22687
+ stackFrames,
22688
+ { ...options, capabilityPath: [...options.capabilityPath ?? [], key] },
22689
+ state,
22690
+ entryPath
22691
+ )
22677
22692
  );
22678
22693
  }
22679
22694
  return copy;
@@ -29226,4 +29241,4 @@ export {
29226
29241
  FileSnapshotBackend,
29227
29242
  run
29228
29243
  };
29229
- //# sourceMappingURL=chunk-FAAW5HF7.js.map
29244
+ //# sourceMappingURL=chunk-XPDK2VVP.js.map