@poe-platform/safe-js 0.1.384 → 0.1.385
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/safe-js/chunks/{chunk-N3C4UP54.js → chunk-4M2UASWA.js} +66 -9
- package/dist/safe-js/chunks/chunk-4M2UASWA.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-4OTKJDYX.js → chunk-C2JQFCZY.js} +2 -2
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/dist/safe-js/interp/collection-iterator.d.ts +3 -2
- package/dist/safe-js/snapshot/guest-heap.d.ts +9 -0
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-N3C4UP54.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-4OTKJDYX.js.map → chunk-C2JQFCZY.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-4M2UASWA.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-
|
|
8252
|
+
//# sourceMappingURL=chunk-C2JQFCZY.js.map
|
package/dist/safe-js/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
resolveFsConfig,
|
|
23
23
|
splitFrontmatter,
|
|
24
24
|
withBrokenPipeGuard
|
|
25
|
-
} from "./chunks/chunk-
|
|
25
|
+
} from "./chunks/chunk-C2JQFCZY.js";
|
|
26
26
|
import {
|
|
27
27
|
Budget,
|
|
28
28
|
SandboxError,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
replaceErrorStack,
|
|
35
35
|
restore,
|
|
36
36
|
run
|
|
37
|
-
} from "./chunks/chunk-
|
|
37
|
+
} from "./chunks/chunk-4M2UASWA.js";
|
|
38
38
|
import "./chunks/chunk-4YIDX44G.js";
|
|
39
39
|
|
|
40
40
|
// packages/safe-js/src/cli.ts
|
package/dist/safe-js/core.js
CHANGED
package/dist/safe-js/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
runWithSpawnUsageAccumulator,
|
|
27
27
|
splitFrontmatter,
|
|
28
28
|
supportsSpawnMode
|
|
29
|
-
} from "./chunks/chunk-
|
|
29
|
+
} from "./chunks/chunk-C2JQFCZY.js";
|
|
30
30
|
import {
|
|
31
31
|
Budget,
|
|
32
32
|
FileSnapshotBackend,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
registerPendingHostCallPolicy,
|
|
51
51
|
restore,
|
|
52
52
|
run
|
|
53
|
-
} from "./chunks/chunk-
|
|
53
|
+
} from "./chunks/chunk-4M2UASWA.js";
|
|
54
54
|
import "./chunks/chunk-4YIDX44G.js";
|
|
55
55
|
|
|
56
56
|
// packages/safe-js/src/parse.ts
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Budget } from "./budget.js";
|
|
2
|
-
import type { SandboxMap, SandboxSet, SandboxValue } from "./values.js";
|
|
2
|
+
import type { SandboxMap, SandboxSet, SandboxValue, SandboxObject } from "./values.js";
|
|
3
|
+
export declare const collectionIteratorPrototypes: WeakMap<Budget, Partial<Record<"set" | "map", SandboxObject>>>;
|
|
3
4
|
declare const collectionIteratorBrand: unique symbol;
|
|
4
5
|
export type SandboxCollectionIterator = {
|
|
5
6
|
readonly [collectionIteratorBrand]: true;
|
|
@@ -16,7 +17,7 @@ type IteratorState = Omit<CollectionIteratorSnapshot, "index"> & {
|
|
|
16
17
|
iterator: Iterator<SandboxValue> | undefined;
|
|
17
18
|
};
|
|
18
19
|
export declare function isSandboxCollectionIterator(value: unknown): value is SandboxCollectionIterator;
|
|
19
|
-
export declare function createSandboxCollectionIterator(collection: SandboxMap | SandboxSet, method: CollectionIterationMethod): SandboxCollectionIterator;
|
|
20
|
+
export declare function createSandboxCollectionIterator(collection: SandboxMap | SandboxSet, method: CollectionIterationMethod, budget?: Budget): SandboxCollectionIterator;
|
|
20
21
|
export declare function restoreSandboxCollectionIterator(snapshot: CollectionIteratorSnapshot, target?: SandboxCollectionIterator): SandboxCollectionIterator;
|
|
21
22
|
export declare function collectionIteratorState(value: SandboxCollectionIterator): Readonly<IteratorState>;
|
|
22
23
|
export declare function snapshotCollectionIterator(value: SandboxCollectionIterator): CollectionIteratorSnapshot;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type SandboxErrorName } from "../error/shape.js";
|
|
2
|
+
import { type CollectionIterationMethod } from "../interp/collection-iterator.js";
|
|
2
3
|
import { type ScopeFrame } from "../interp/scope.js";
|
|
3
4
|
import { type PropertyDescriptorData } from "./property-descriptors.js";
|
|
4
5
|
import type { CompletionResult } from "../interp/exceptions.js";
|
|
@@ -21,6 +22,14 @@ export type GuestHeapNode<T> = {
|
|
|
21
22
|
input: T;
|
|
22
23
|
index: number;
|
|
23
24
|
state: GuestObjectState<T>;
|
|
25
|
+
} | {
|
|
26
|
+
kind: "guest-collection-iterator";
|
|
27
|
+
collectionKind: "map" | "set";
|
|
28
|
+
method: CollectionIterationMethod;
|
|
29
|
+
collection: T;
|
|
30
|
+
index: number;
|
|
31
|
+
exhausted: boolean;
|
|
32
|
+
state: GuestObjectState<T>;
|
|
24
33
|
} | {
|
|
25
34
|
kind: "bound-function";
|
|
26
35
|
target: T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poe-platform/safe-js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.385",
|
|
4
4
|
"description": "Budgeted JavaScript interpreter with explicit host capabilities and resumable execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@poe-platform/safe-fs": "0.1.
|
|
61
|
+
"@poe-platform/safe-fs": "0.1.385",
|
|
62
62
|
"@petamoriken/float16": "^3.9.3",
|
|
63
63
|
"yaml": "^2.8.2",
|
|
64
64
|
"jose": "^6.1.3",
|