@poe-platform/safe-js 0.1.132 → 0.1.134
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/README.md +1 -1
- package/dist/safe-js/chunks/{chunk-TCWJR6OI.js → chunk-2I6B4TFA.js} +2 -2
- package/dist/safe-js/chunks/{chunk-7IGOMKO4.js → chunk-L74RZHUW.js} +927 -537
- package/dist/safe-js/chunks/chunk-L74RZHUW.js.map +7 -0
- 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/iteration.d.ts +5 -3
- package/dist/safe-js/interp/values.d.ts +1 -0
- package/dist/safe-js/migrate.d.ts +2 -2
- package/dist/safe-js/migration-file.d.ts +4 -4
- package/dist/safe-js/snapshot/replay-data.d.ts +5 -0
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-7IGOMKO4.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-TCWJR6OI.js.map → chunk-2I6B4TFA.js.map} +0 -0
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-2I6B4TFA.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-L74RZHUW.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-2I6B4TFA.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-L74RZHUW.js";
|
|
54
54
|
import "./chunks/chunk-4YIDX44G.js";
|
|
55
55
|
|
|
56
56
|
// packages/safe-js/src/parse.ts
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { type SandboxValue } from "./values.js";
|
|
2
|
-
import
|
|
1
|
+
import { type SandboxCallContext, type SandboxValue } from "./values.js";
|
|
2
|
+
import { Budget } from "./budget.js";
|
|
3
3
|
export type SandboxIterator = {
|
|
4
4
|
readonly generator?: true;
|
|
5
|
+
readonly asynchronous?: true;
|
|
6
|
+
readonly retainedValue?: SandboxValue;
|
|
5
7
|
snapshotIndex?(): number;
|
|
6
8
|
next(value?: SandboxValue): IteratorResult<SandboxValue> | Promise<IteratorResult<SandboxValue>>;
|
|
7
9
|
return?(value?: SandboxValue): IteratorResult<SandboxValue> | Promise<IteratorResult<SandboxValue>>;
|
|
8
10
|
throw?(error?: SandboxValue): IteratorResult<SandboxValue> | Promise<IteratorResult<SandboxValue>>;
|
|
9
11
|
};
|
|
10
|
-
export declare function getSandboxIterator(value: SandboxValue, budget?: Budget): SandboxIterator | undefined;
|
|
12
|
+
export declare function getSandboxIterator(value: SandboxValue, budget?: Budget, context?: SandboxCallContext): SandboxIterator | undefined;
|
|
@@ -134,6 +134,7 @@ export declare function deepCopyToSandbox(value: unknown): SandboxValue;
|
|
|
134
134
|
export declare function cloneSandboxValue(value: SandboxValue, options?: {
|
|
135
135
|
compilation?: CompileScope;
|
|
136
136
|
resetRegexLastIndex?: boolean;
|
|
137
|
+
structuredClone?: boolean;
|
|
137
138
|
}): SandboxValue;
|
|
138
139
|
export declare function allocateProducedSandboxValue(value: SandboxValue, budget: Budget): SandboxValue;
|
|
139
140
|
export declare function measureSandboxData(values: Iterable<unknown>, options?: {
|
|
@@ -13,14 +13,14 @@ export declare function inspectSnapshotMigration(snapshot: SafeJSSnapshot, optio
|
|
|
13
13
|
checkpointDigest: string;
|
|
14
14
|
sourceHash: string;
|
|
15
15
|
executionSemantics: string;
|
|
16
|
-
calls: (Omit<import("./index.js").HostCallRecord, "
|
|
16
|
+
calls: (Omit<import("./index.js").HostCallRecord, "asynchronous" | "outcome"> & {
|
|
17
17
|
asynchronous: boolean;
|
|
18
18
|
outcome?: {
|
|
19
19
|
status: "fulfilled" | "rejected";
|
|
20
20
|
data: import("./snapshot/replay-data.js").ReplayData;
|
|
21
21
|
};
|
|
22
22
|
})[];
|
|
23
|
-
unresolvedCalls: (Omit<import("./index.js").HostCallRecord, "
|
|
23
|
+
unresolvedCalls: (Omit<import("./index.js").HostCallRecord, "asynchronous" | "outcome"> & {
|
|
24
24
|
asynchronous: boolean;
|
|
25
25
|
outcome?: {
|
|
26
26
|
status: "fulfilled" | "rejected";
|
|
@@ -13,14 +13,14 @@ export declare function migrateSnapshotFile(options: SnapshotMigrationFileOption
|
|
|
13
13
|
checkpointDigest: string;
|
|
14
14
|
sourceHash: string;
|
|
15
15
|
executionSemantics: string;
|
|
16
|
-
calls: (Omit<import("./index.js").HostCallRecord, "
|
|
16
|
+
calls: (Omit<import("./index.js").HostCallRecord, "asynchronous" | "outcome"> & {
|
|
17
17
|
asynchronous: boolean;
|
|
18
18
|
outcome?: {
|
|
19
19
|
status: "fulfilled" | "rejected";
|
|
20
20
|
data: import("./snapshot/replay-data.js").ReplayData;
|
|
21
21
|
};
|
|
22
22
|
})[];
|
|
23
|
-
unresolvedCalls: (Omit<import("./index.js").HostCallRecord, "
|
|
23
|
+
unresolvedCalls: (Omit<import("./index.js").HostCallRecord, "asynchronous" | "outcome"> & {
|
|
24
24
|
asynchronous: boolean;
|
|
25
25
|
outcome?: {
|
|
26
26
|
status: "fulfilled" | "rejected";
|
|
@@ -35,14 +35,14 @@ export declare function migrateSnapshotFile(options: SnapshotMigrationFileOption
|
|
|
35
35
|
checkpointDigest: string;
|
|
36
36
|
sourceHash: string;
|
|
37
37
|
executionSemantics: string;
|
|
38
|
-
calls: (Omit<import("./index.js").HostCallRecord, "
|
|
38
|
+
calls: (Omit<import("./index.js").HostCallRecord, "asynchronous" | "outcome"> & {
|
|
39
39
|
asynchronous: boolean;
|
|
40
40
|
outcome?: {
|
|
41
41
|
status: "fulfilled" | "rejected";
|
|
42
42
|
data: import("./snapshot/replay-data.js").ReplayData;
|
|
43
43
|
};
|
|
44
44
|
})[];
|
|
45
|
-
unresolvedCalls: (Omit<import("./index.js").HostCallRecord, "
|
|
45
|
+
unresolvedCalls: (Omit<import("./index.js").HostCallRecord, "asynchronous" | "outcome"> & {
|
|
46
46
|
asynchronous: boolean;
|
|
47
47
|
outcome?: {
|
|
48
48
|
status: "fulfilled" | "rejected";
|
|
@@ -26,6 +26,11 @@ type Properties = Record<string, {
|
|
|
26
26
|
writable: boolean;
|
|
27
27
|
}>;
|
|
28
28
|
type DataNode = {
|
|
29
|
+
kind: "boxed";
|
|
30
|
+
value: Atom;
|
|
31
|
+
properties: Properties;
|
|
32
|
+
extensible: boolean;
|
|
33
|
+
} | {
|
|
29
34
|
kind: "collection-iterator";
|
|
30
35
|
collectionKind: "map" | "set";
|
|
31
36
|
method: CollectionIterationMethod;
|
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.134",
|
|
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.134",
|
|
62
62
|
"yaml": "^2.8.2",
|
|
63
63
|
"jose": "^6.1.3",
|
|
64
64
|
"@types/node": "^25.2.2"
|