poe-code 11.0.14 → 11.0.16
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 +15 -5
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-DZH7JZC4.js → chunk-KNMVUWS7.js} +14 -4
- package/packages/safejs/dist/chunks/{chunk-DZH7JZC4.js.map → chunk-KNMVUWS7.js.map} +2 -2
- package/packages/safejs/dist/chunks/{chunk-X745DTOB.js → chunk-X4JCDSRU.js} +2 -2
- 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/methods/array.js +12 -2
- package/packages/safejs/dist/interp/methods/regex.js +1 -1
- /package/packages/safejs/dist/chunks/{chunk-X745DTOB.js.map → chunk-X4JCDSRU.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-KNMVUWS7.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-X4JCDSRU.js.map
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
parseMcpConfig,
|
|
21
21
|
splitFrontmatter,
|
|
22
22
|
withBrokenPipeGuard
|
|
23
|
-
} from "./chunks/chunk-
|
|
23
|
+
} from "./chunks/chunk-X4JCDSRU.js";
|
|
24
24
|
import {
|
|
25
25
|
Budget,
|
|
26
26
|
SandboxError,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
replaceErrorStack,
|
|
33
33
|
restore,
|
|
34
34
|
run
|
|
35
|
-
} from "./chunks/chunk-
|
|
35
|
+
} from "./chunks/chunk-KNMVUWS7.js";
|
|
36
36
|
import "./chunks/chunk-4YIDX44G.js";
|
|
37
37
|
|
|
38
38
|
// packages/safejs/src/cli.ts
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
runWithSpawnUsageAccumulator,
|
|
28
28
|
splitFrontmatter,
|
|
29
29
|
supportsSpawnMode
|
|
30
|
-
} from "./chunks/chunk-
|
|
30
|
+
} from "./chunks/chunk-X4JCDSRU.js";
|
|
31
31
|
import {
|
|
32
32
|
Budget,
|
|
33
33
|
FileSnapshotBackend,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
registerPendingHostCallPolicy,
|
|
50
50
|
restore,
|
|
51
51
|
run
|
|
52
|
-
} from "./chunks/chunk-
|
|
52
|
+
} from "./chunks/chunk-KNMVUWS7.js";
|
|
53
53
|
import "./chunks/chunk-4YIDX44G.js";
|
|
54
54
|
|
|
55
55
|
// packages/safejs/src/runner/run-harness.ts
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSandboxClosure, isSandboxClosure, isSandboxMap, isSandboxPromise, isSandboxSet } from "../values.js";
|
|
2
2
|
import { assertCollectionMutable, enterCollectionCallback } from "../running-state.js";
|
|
3
|
+
const activeArrayCallbacks = new WeakMap();
|
|
3
4
|
const arrayMethodNames = new Set([
|
|
4
5
|
"map",
|
|
5
6
|
"filter",
|
|
@@ -73,12 +74,21 @@ export async function callArrayMethod(value, methodName, args, options, stack =
|
|
|
73
74
|
assertCollectionMutable(value);
|
|
74
75
|
}
|
|
75
76
|
if (isCallbackArrayMethod(methodName)) {
|
|
76
|
-
|
|
77
|
+
let callbackState = activeArrayCallbacks.get(value);
|
|
78
|
+
if (callbackState === undefined) {
|
|
79
|
+
callbackState = { depth: 0, leave: enterCollectionCallback(value) };
|
|
80
|
+
activeArrayCallbacks.set(value, callbackState);
|
|
81
|
+
}
|
|
82
|
+
callbackState.depth += 1;
|
|
77
83
|
try {
|
|
78
84
|
return await callArrayMethodUnlocked(value, methodName, args, options, stack);
|
|
79
85
|
}
|
|
80
86
|
finally {
|
|
81
|
-
|
|
87
|
+
callbackState.depth -= 1;
|
|
88
|
+
if (callbackState.depth === 0) {
|
|
89
|
+
activeArrayCallbacks.delete(value);
|
|
90
|
+
callbackState.leave();
|
|
91
|
+
}
|
|
82
92
|
}
|
|
83
93
|
}
|
|
84
94
|
return callArrayMethodUnlocked(value, methodName, args, options, stack);
|
|
@@ -40,6 +40,6 @@ export function toMatchArray(match, input) {
|
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
const result = [match.text, ...match.captures];
|
|
43
|
-
Object.assign(result, {
|
|
43
|
+
Object.assign(result, { index: match.index, input, groups: undefined });
|
|
44
44
|
return result;
|
|
45
45
|
}
|
|
File without changes
|