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/dist/index.js +27 -12
- package/dist/index.js.map +3 -3
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-3OFXSTL2.js → chunk-44GTB3XV.js} +2 -2
- package/packages/safejs/dist/chunks/{chunk-FAAW5HF7.js → chunk-XPDK2VVP.js} +27 -12
- package/packages/safejs/dist/chunks/{chunk-FAAW5HF7.js.map → chunk-XPDK2VVP.js.map} +3 -3
- package/packages/safejs/dist/cli.js +2 -2
- package/packages/safejs/dist/core.js +1 -1
- package/packages/safejs/dist/index.js +2 -2
- package/packages/safejs/dist/interp/host-bridge.js +7 -6
- package/packages/safejs/dist/interp/host-call.js +13 -3
- package/packages/safejs/dist/interp/values.d.ts +2 -0
- package/packages/safejs/dist/interp/values.js +2 -2
- /package/packages/safejs/dist/chunks/{chunk-3OFXSTL2.js.map → chunk-44GTB3XV.js.map} +0 -0
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
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-
|
|
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))
|
|
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 (
|
|
22666
|
-
const
|
|
22667
|
-
if (
|
|
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 ${
|
|
22680
|
+
throw new TypeError(`Unsupported sandbox value at ${entryPath}: accessor property`);
|
|
22670
22681
|
}
|
|
22671
|
-
|
|
22672
|
-
|
|
22673
|
-
|
|
22674
|
-
|
|
22675
|
-
|
|
22676
|
-
|
|
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-
|
|
29244
|
+
//# sourceMappingURL=chunk-XPDK2VVP.js.map
|