@poe-platform/safe-js 0.1.723 → 0.1.725
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 +3 -0
- package/dist/safe-js/chunks/{chunk-WF7HYDJ4.js → chunk-6OE64YMG.js} +2 -2
- package/dist/safe-js/chunks/{chunk-7TL6Z6LT.js → chunk-6YSHQ5ET.js} +2 -2
- package/dist/safe-js/chunks/{chunk-7FCMZUZJ.js → chunk-ECTNNLWN.js} +4 -4
- package/dist/safe-js/chunks/{chunk-5MT2LF3W.js → chunk-FYSWUSHN.js} +3 -3
- package/dist/safe-js/chunks/{chunk-3QQYJ4RQ.js → chunk-HG5QP5UC.js} +2 -2
- package/dist/safe-js/chunks/{chunk-QMZG576E.js → chunk-K6F5QLZQ.js} +3 -3
- package/dist/safe-js/chunks/{chunk-RYVHEOHM.js → chunk-KOO6YGQG.js} +21 -5
- package/dist/safe-js/chunks/chunk-KOO6YGQG.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-SWQHZKYM.js → chunk-O2CPPE6M.js} +2 -2
- package/dist/safe-js/chunks/{chunk-M6HUSN7X.js → chunk-PKRGP34X.js} +37 -10
- package/dist/safe-js/chunks/chunk-PKRGP34X.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-IZ52PAOD.js → chunk-QU2F65UQ.js} +890 -495
- package/dist/safe-js/chunks/{chunk-IZ52PAOD.js.map → chunk-QU2F65UQ.js.map} +4 -4
- package/dist/safe-js/chunks/{chunk-KHJDAEET.js → chunk-V2ESZF34.js} +4 -4
- package/dist/safe-js/chunks/{chunk-Y5ZXQHL6.js → chunk-Y7LSEUWV.js} +3 -3
- package/dist/safe-js/chunks/{chunk-HY3Q377V.js → chunk-YRALPIEZ.js} +2 -2
- package/dist/safe-js/chunks/{cli-runtime-EPXCJ5AG.js → cli-runtime-5HVEFMDB.js} +13 -13
- package/dist/safe-js/chunks/{dump-TWVEBH5W.js → dump-VKSKINUI.js} +4 -4
- package/dist/safe-js/chunks/{fs-DSNHTHBT.js → fs-CZ2TAPHK.js} +4 -4
- package/dist/safe-js/chunks/harness-WNABEKDH.js +10 -0
- package/dist/safe-js/chunks/mcp-ZZDGN5CA.js +11 -0
- package/dist/safe-js/chunks/migration-file-QVT4W464.js +12 -0
- package/dist/safe-js/chunks/restore-PTIQHGKI.js +13 -0
- package/dist/safe-js/chunks/run-WNR7QYUJ.js +17 -0
- package/dist/safe-js/chunks/runtime-modules-YEOG62RU.js +10 -0
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +7 -7
- package/dist/safe-js/extensions.d.ts +2 -0
- package/dist/safe-js/index.js +13 -13
- package/dist/safe-js/interp/arguments.d.ts +1 -2
- package/dist/safe-js/interp/host-bridge.d.ts +1 -1
- package/dist/safe-js/interp/scope.d.ts +1 -0
- package/dist/safe-js/interp/values.d.ts +1 -0
- package/dist/safe-js/parse/compact-spans.d.ts +4 -0
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-M6HUSN7X.js.map +0 -7
- package/dist/safe-js/chunks/chunk-RYVHEOHM.js.map +0 -7
- package/dist/safe-js/chunks/harness-RLA643GD.js +0 -10
- package/dist/safe-js/chunks/mcp-IEY7HXXT.js +0 -11
- package/dist/safe-js/chunks/migration-file-QMI45CSP.js +0 -12
- package/dist/safe-js/chunks/restore-R5PLLBST.js +0 -13
- package/dist/safe-js/chunks/run-QATVEFVQ.js +0 -17
- package/dist/safe-js/chunks/runtime-modules-5D7KDFMZ.js +0 -10
- /package/dist/safe-js/chunks/{chunk-WF7HYDJ4.js.map → chunk-6OE64YMG.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-7TL6Z6LT.js.map → chunk-6YSHQ5ET.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-7FCMZUZJ.js.map → chunk-ECTNNLWN.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-5MT2LF3W.js.map → chunk-FYSWUSHN.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-3QQYJ4RQ.js.map → chunk-HG5QP5UC.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-QMZG576E.js.map → chunk-K6F5QLZQ.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-SWQHZKYM.js.map → chunk-O2CPPE6M.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-KHJDAEET.js.map → chunk-V2ESZF34.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-Y5ZXQHL6.js.map → chunk-Y7LSEUWV.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-HY3Q377V.js.map → chunk-YRALPIEZ.js.map} +0 -0
- /package/dist/safe-js/chunks/{cli-runtime-EPXCJ5AG.js.map → cli-runtime-5HVEFMDB.js.map} +0 -0
- /package/dist/safe-js/chunks/{dump-TWVEBH5W.js.map → dump-VKSKINUI.js.map} +0 -0
- /package/dist/safe-js/chunks/{fs-DSNHTHBT.js.map → fs-CZ2TAPHK.js.map} +0 -0
- /package/dist/safe-js/chunks/{harness-RLA643GD.js.map → harness-WNABEKDH.js.map} +0 -0
- /package/dist/safe-js/chunks/{mcp-IEY7HXXT.js.map → mcp-ZZDGN5CA.js.map} +0 -0
- /package/dist/safe-js/chunks/{migration-file-QMI45CSP.js.map → migration-file-QVT4W464.js.map} +0 -0
- /package/dist/safe-js/chunks/{restore-R5PLLBST.js.map → restore-PTIQHGKI.js.map} +0 -0
- /package/dist/safe-js/chunks/{run-QATVEFVQ.js.map → run-WNR7QYUJ.js.map} +0 -0
- /package/dist/safe-js/chunks/{runtime-modules-5D7KDFMZ.js.map → runtime-modules-YEOG62RU.js.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
hashParsedAst,
|
|
3
3
|
hashSource,
|
|
4
4
|
validateSnapshotMigration
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Y7LSEUWV.js";
|
|
6
6
|
import {
|
|
7
7
|
SnapshotValidationError,
|
|
8
8
|
assertSnapshotInactive,
|
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
validateGuestFunctionAst,
|
|
16
16
|
validateRuntimeSnapshotDescriptors,
|
|
17
17
|
validateTemplateObjects
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QU2F65UQ.js";
|
|
19
19
|
import {
|
|
20
20
|
ParseError,
|
|
21
21
|
parseExecutableModule,
|
|
22
22
|
parseModule,
|
|
23
23
|
replaceErrorStack
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KOO6YGQG.js";
|
|
25
25
|
|
|
26
26
|
// packages/safe-js/src/restore.ts
|
|
27
27
|
var SnapshotMismatchError = class extends Error {
|
|
@@ -111,4 +111,4 @@ export {
|
|
|
111
111
|
SnapshotMismatchError,
|
|
112
112
|
restore
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=chunk-
|
|
114
|
+
//# sourceMappingURL=chunk-V2ESZF34.js.map
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
HostCallJournal,
|
|
3
3
|
decodeReplayData,
|
|
4
4
|
validateSnapshotData
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QU2F65UQ.js";
|
|
6
6
|
import {
|
|
7
7
|
CompileScope,
|
|
8
8
|
SandboxError,
|
|
9
9
|
functionSources,
|
|
10
10
|
parse,
|
|
11
11
|
parseModule
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KOO6YGQG.js";
|
|
13
13
|
|
|
14
14
|
// packages/safe-js/src/parse/hash.ts
|
|
15
15
|
var FNV_OFFSET_BASIS = 2166136261;
|
|
@@ -219,4 +219,4 @@ export {
|
|
|
219
219
|
validateMigrationReconciliation,
|
|
220
220
|
validateSnapshotMigration
|
|
221
221
|
};
|
|
222
|
-
//# sourceMappingURL=chunk-
|
|
222
|
+
//# sourceMappingURL=chunk-Y7LSEUWV.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isSandboxClosure
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QU2F65UQ.js";
|
|
4
4
|
|
|
5
5
|
// packages/safe-js/src/lint/runtime-modules.ts
|
|
6
6
|
var AsyncFunction = (async () => void 0).constructor;
|
|
@@ -34,4 +34,4 @@ function isAsyncRuntimeExport(value) {
|
|
|
34
34
|
export {
|
|
35
35
|
createLintModulesFromRuntimeRegistry
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-YRALPIEZ.js.map
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
parseFsConfig,
|
|
13
13
|
resolveFsConfig,
|
|
14
14
|
splitFrontmatter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6OE64YMG.js";
|
|
16
16
|
import {
|
|
17
17
|
parseMcpConfig
|
|
18
18
|
} from "./chunk-BRBOVGNC.js";
|
|
19
19
|
import {
|
|
20
20
|
lint
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HG5QP5UC.js";
|
|
22
22
|
import {
|
|
23
23
|
createBrokenPipeState,
|
|
24
24
|
createSafeOutputStream,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
parseModule,
|
|
35
35
|
parseSourceModule,
|
|
36
36
|
replaceErrorStack
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-KOO6YGQG.js";
|
|
38
38
|
import "./chunk-4YIDX44G.js";
|
|
39
39
|
|
|
40
40
|
// packages/safe-js/src/cli-runtime.ts
|
|
@@ -55,7 +55,7 @@ async function runCli(argv, options, usage) {
|
|
|
55
55
|
async () => {
|
|
56
56
|
try {
|
|
57
57
|
if (argv[0] === "migrate") {
|
|
58
|
-
const { migrateSnapshotFile } = await import("./migration-file-
|
|
58
|
+
const { migrateSnapshotFile } = await import("./migration-file-QVT4W464.js");
|
|
59
59
|
const result = await migrateSnapshotFile({
|
|
60
60
|
...parseMigrationArgs(argv.slice(1)),
|
|
61
61
|
cwd: options.cwd ?? readCurrentWorkingDirectory()
|
|
@@ -272,12 +272,12 @@ async function assertHarnessFile(input) {
|
|
|
272
272
|
}
|
|
273
273
|
async function runScriptFile(filepath, parsed, options) {
|
|
274
274
|
const [{ run }, { restore }, { dump, dumpCurrent }, { createLintModulesFromRuntimeRegistry }, { makeFsModule }, { makeMcpModule }] = await Promise.all([
|
|
275
|
-
import("./run-
|
|
276
|
-
import("./restore-
|
|
277
|
-
import("./dump-
|
|
278
|
-
import("./runtime-modules-
|
|
279
|
-
import("./fs-
|
|
280
|
-
import("./mcp-
|
|
275
|
+
import("./run-WNR7QYUJ.js"),
|
|
276
|
+
import("./restore-PTIQHGKI.js"),
|
|
277
|
+
import("./dump-VKSKINUI.js"),
|
|
278
|
+
import("./runtime-modules-YEOG62RU.js"),
|
|
279
|
+
import("./fs-CZ2TAPHK.js"),
|
|
280
|
+
import("./mcp-ZZDGN5CA.js")
|
|
281
281
|
]);
|
|
282
282
|
const loaded = loadExecutableSource(filepath, await options.readFile(filepath, "utf8"));
|
|
283
283
|
const meta = {
|
|
@@ -513,8 +513,8 @@ async function createRuntime(frontmatter, meta, options) {
|
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
515
|
const [{ makeHarnessModule }, { makeFsModule }] = await Promise.all([
|
|
516
|
-
import("./harness-
|
|
517
|
-
import("./fs-
|
|
516
|
+
import("./harness-WNABEKDH.js"),
|
|
517
|
+
import("./fs-CZ2TAPHK.js")
|
|
518
518
|
]);
|
|
519
519
|
const state = {
|
|
520
520
|
metricCalls: /* @__PURE__ */ new Map(),
|
|
@@ -704,4 +704,4 @@ export {
|
|
|
704
704
|
exitCodeForError,
|
|
705
705
|
runCli
|
|
706
706
|
};
|
|
707
|
-
//# sourceMappingURL=cli-runtime-
|
|
707
|
+
//# sourceMappingURL=cli-runtime-5HVEFMDB.js.map
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
dump,
|
|
5
5
|
dumpCurrent,
|
|
6
6
|
serializeRunSnapshot
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-FYSWUSHN.js";
|
|
8
|
+
import "./chunk-QU2F65UQ.js";
|
|
9
|
+
import "./chunk-KOO6YGQG.js";
|
|
10
10
|
import "./chunk-4YIDX44G.js";
|
|
11
11
|
export {
|
|
12
12
|
attachDumpController,
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
dumpCurrent,
|
|
16
16
|
serializeRunSnapshot
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=dump-
|
|
18
|
+
//# sourceMappingURL=dump-VKSKINUI.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FS_OPTION_SURFACE,
|
|
3
3
|
makeFsModule
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6YSHQ5ET.js";
|
|
5
5
|
import "./chunk-SJZWSPWD.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-QU2F65UQ.js";
|
|
7
|
+
import "./chunk-KOO6YGQG.js";
|
|
8
8
|
import "./chunk-4YIDX44G.js";
|
|
9
9
|
export {
|
|
10
10
|
FS_OPTION_SURFACE,
|
|
11
11
|
makeFsModule
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=fs-
|
|
13
|
+
//# sourceMappingURL=fs-CZ2TAPHK.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
makeMcpModule
|
|
3
|
+
} from "./chunk-K6F5QLZQ.js";
|
|
4
|
+
import "./chunk-BRBOVGNC.js";
|
|
5
|
+
import "./chunk-QU2F65UQ.js";
|
|
6
|
+
import "./chunk-KOO6YGQG.js";
|
|
7
|
+
import "./chunk-4YIDX44G.js";
|
|
8
|
+
export {
|
|
9
|
+
makeMcpModule
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=mcp-ZZDGN5CA.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
migrateSnapshotFile
|
|
3
|
+
} from "./chunk-ECTNNLWN.js";
|
|
4
|
+
import "./chunk-SJZWSPWD.js";
|
|
5
|
+
import "./chunk-Y7LSEUWV.js";
|
|
6
|
+
import "./chunk-QU2F65UQ.js";
|
|
7
|
+
import "./chunk-KOO6YGQG.js";
|
|
8
|
+
import "./chunk-4YIDX44G.js";
|
|
9
|
+
export {
|
|
10
|
+
migrateSnapshotFile
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=migration-file-QVT4W464.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SnapshotMismatchError,
|
|
3
|
+
restore
|
|
4
|
+
} from "./chunk-V2ESZF34.js";
|
|
5
|
+
import "./chunk-Y7LSEUWV.js";
|
|
6
|
+
import "./chunk-QU2F65UQ.js";
|
|
7
|
+
import "./chunk-KOO6YGQG.js";
|
|
8
|
+
import "./chunk-4YIDX44G.js";
|
|
9
|
+
export {
|
|
10
|
+
SnapshotMismatchError,
|
|
11
|
+
restore
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=restore-PTIQHGKI.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UnhandledRejectionError,
|
|
3
|
+
run
|
|
4
|
+
} from "./chunk-PKRGP34X.js";
|
|
5
|
+
import "./chunk-U7ZNMTSQ.js";
|
|
6
|
+
import "./chunk-V2ESZF34.js";
|
|
7
|
+
import "./chunk-FYSWUSHN.js";
|
|
8
|
+
import "./chunk-SJZWSPWD.js";
|
|
9
|
+
import "./chunk-Y7LSEUWV.js";
|
|
10
|
+
import "./chunk-QU2F65UQ.js";
|
|
11
|
+
import "./chunk-KOO6YGQG.js";
|
|
12
|
+
import "./chunk-4YIDX44G.js";
|
|
13
|
+
export {
|
|
14
|
+
UnhandledRejectionError,
|
|
15
|
+
run
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=run-WNR7QYUJ.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createLintModulesFromRuntimeRegistry
|
|
3
|
+
} from "./chunk-YRALPIEZ.js";
|
|
4
|
+
import "./chunk-QU2F65UQ.js";
|
|
5
|
+
import "./chunk-KOO6YGQG.js";
|
|
6
|
+
import "./chunk-4YIDX44G.js";
|
|
7
|
+
export {
|
|
8
|
+
createLintModulesFromRuntimeRegistry
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=runtime-modules-YEOG62RU.js.map
|
package/dist/safe-js/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import path from "node:path";
|
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
async function runCli(argv, options = {}) {
|
|
15
15
|
if (!argv.includes("--help") && !argv.includes("-h")) {
|
|
16
|
-
const runtime = await import("./chunks/cli-runtime-
|
|
16
|
+
const runtime = await import("./chunks/cli-runtime-5HVEFMDB.js");
|
|
17
17
|
return runtime.runCli(argv, options, createUsage());
|
|
18
18
|
}
|
|
19
19
|
const brokenPipe = createBrokenPipeState();
|
|
@@ -32,7 +32,7 @@ async function runCli(argv, options = {}) {
|
|
|
32
32
|
stderr.write(`${error instanceof Error ? error.message : String(error)}
|
|
33
33
|
`);
|
|
34
34
|
if (brokenPipe.closed) return 0;
|
|
35
|
-
const { exitCodeForError } = await import("./chunks/cli-runtime-
|
|
35
|
+
const { exitCodeForError } = await import("./chunks/cli-runtime-5HVEFMDB.js");
|
|
36
36
|
return exitCodeForError(error);
|
|
37
37
|
}
|
|
38
38
|
}
|
package/dist/safe-js/core.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lint
|
|
3
|
-
} from "./chunks/chunk-
|
|
3
|
+
} from "./chunks/chunk-HG5QP5UC.js";
|
|
4
4
|
import {
|
|
5
5
|
createRealm,
|
|
6
6
|
createReplayableRandom,
|
|
7
7
|
run
|
|
8
|
-
} from "./chunks/chunk-
|
|
8
|
+
} from "./chunks/chunk-PKRGP34X.js";
|
|
9
9
|
import "./chunks/chunk-U7ZNMTSQ.js";
|
|
10
|
-
import "./chunks/chunk-
|
|
11
|
-
import "./chunks/chunk-
|
|
10
|
+
import "./chunks/chunk-V2ESZF34.js";
|
|
11
|
+
import "./chunks/chunk-FYSWUSHN.js";
|
|
12
12
|
import "./chunks/chunk-SJZWSPWD.js";
|
|
13
|
-
import "./chunks/chunk-
|
|
13
|
+
import "./chunks/chunk-Y7LSEUWV.js";
|
|
14
14
|
import {
|
|
15
15
|
admitNativePromiseProperties,
|
|
16
16
|
defineExtension
|
|
17
|
-
} from "./chunks/chunk-
|
|
17
|
+
} from "./chunks/chunk-QU2F65UQ.js";
|
|
18
18
|
import {
|
|
19
19
|
Budget
|
|
20
|
-
} from "./chunks/chunk-
|
|
20
|
+
} from "./chunks/chunk-KOO6YGQG.js";
|
|
21
21
|
import "./chunks/chunk-4YIDX44G.js";
|
|
22
22
|
export {
|
|
23
23
|
Budget,
|
|
@@ -33,6 +33,8 @@ export type ExtensionContext = {
|
|
|
33
33
|
startCallback(callback: unknown, options?: CallbackOptions): CallbackInvocation;
|
|
34
34
|
invokeCallback(callback: unknown, options?: CallbackOptions): Promise<unknown>;
|
|
35
35
|
releaseCallback(callback: unknown): void;
|
|
36
|
+
/** Give each call independent callback wrappers, released by the receiving host. */
|
|
37
|
+
retainCallbackArguments<Operation extends HostOperation>(operation: Operation): Operation;
|
|
36
38
|
retainGuestArguments<Operation extends HostOperation>(operation: Operation, from: number): Operation;
|
|
37
39
|
releaseGuestReference(reference: unknown): void;
|
|
38
40
|
nestedOperation<Operation extends HostOperation>(operation: Operation): Operation;
|
package/dist/safe-js/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLintModulesFromRuntimeRegistry
|
|
3
|
-
} from "./chunks/chunk-
|
|
3
|
+
} from "./chunks/chunk-YRALPIEZ.js";
|
|
4
4
|
import {
|
|
5
5
|
makeFsModule
|
|
6
|
-
} from "./chunks/chunk-
|
|
6
|
+
} from "./chunks/chunk-6YSHQ5ET.js";
|
|
7
7
|
import {
|
|
8
8
|
makeHarnessModule
|
|
9
|
-
} from "./chunks/chunk-
|
|
9
|
+
} from "./chunks/chunk-O2CPPE6M.js";
|
|
10
10
|
import {
|
|
11
11
|
makeMcpModule
|
|
12
|
-
} from "./chunks/chunk-
|
|
12
|
+
} from "./chunks/chunk-K6F5QLZQ.js";
|
|
13
13
|
import {
|
|
14
14
|
AgentSpawnError,
|
|
15
15
|
EnvAccessError,
|
|
@@ -30,13 +30,13 @@ import {
|
|
|
30
30
|
runWithSpawnUsageAccumulator,
|
|
31
31
|
splitFrontmatter,
|
|
32
32
|
supportsSpawnMode
|
|
33
|
-
} from "./chunks/chunk-
|
|
33
|
+
} from "./chunks/chunk-6OE64YMG.js";
|
|
34
34
|
import {
|
|
35
35
|
parseMcpConfig
|
|
36
36
|
} from "./chunks/chunk-BRBOVGNC.js";
|
|
37
37
|
import {
|
|
38
38
|
lint
|
|
39
|
-
} from "./chunks/chunk-
|
|
39
|
+
} from "./chunks/chunk-HG5QP5UC.js";
|
|
40
40
|
import "./chunks/chunk-OZLTLIHX.js";
|
|
41
41
|
import {
|
|
42
42
|
createRootedSourceResolver
|
|
@@ -46,23 +46,23 @@ import {
|
|
|
46
46
|
createRealm,
|
|
47
47
|
createReplayableRandom,
|
|
48
48
|
run
|
|
49
|
-
} from "./chunks/chunk-
|
|
49
|
+
} from "./chunks/chunk-PKRGP34X.js";
|
|
50
50
|
import "./chunks/chunk-U7ZNMTSQ.js";
|
|
51
51
|
import {
|
|
52
52
|
restore
|
|
53
|
-
} from "./chunks/chunk-
|
|
53
|
+
} from "./chunks/chunk-V2ESZF34.js";
|
|
54
54
|
import {
|
|
55
55
|
dump
|
|
56
|
-
} from "./chunks/chunk-
|
|
56
|
+
} from "./chunks/chunk-FYSWUSHN.js";
|
|
57
57
|
import {
|
|
58
58
|
inspectSnapshotMigration,
|
|
59
59
|
migrateSnapshot,
|
|
60
60
|
migrateSnapshotFile
|
|
61
|
-
} from "./chunks/chunk-
|
|
61
|
+
} from "./chunks/chunk-ECTNNLWN.js";
|
|
62
62
|
import {
|
|
63
63
|
hasOwnErrorCode
|
|
64
64
|
} from "./chunks/chunk-SJZWSPWD.js";
|
|
65
|
-
import "./chunks/chunk-
|
|
65
|
+
import "./chunks/chunk-Y7LSEUWV.js";
|
|
66
66
|
import {
|
|
67
67
|
HostCallResumabilityError,
|
|
68
68
|
HostOperationResumePolicyError,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
deepCopyToSandbox,
|
|
75
75
|
defineExtension,
|
|
76
76
|
registerPendingHostCallPolicy
|
|
77
|
-
} from "./chunks/chunk-
|
|
77
|
+
} from "./chunks/chunk-QU2F65UQ.js";
|
|
78
78
|
import {
|
|
79
79
|
Budget,
|
|
80
80
|
SandboxError,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
parse,
|
|
83
83
|
parseModule,
|
|
84
84
|
parseSourceModule
|
|
85
|
-
} from "./chunks/chunk-
|
|
85
|
+
} from "./chunks/chunk-KOO6YGQG.js";
|
|
86
86
|
import "./chunks/chunk-4YIDX44G.js";
|
|
87
87
|
|
|
88
88
|
// packages/safe-js/src/parse.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SandboxObject, SandboxValue } from "./values.js";
|
|
2
2
|
import type { Scope } from "./scope.js";
|
|
3
|
-
declare const sandboxArgumentsBrand: unique symbol;
|
|
3
|
+
export declare const sandboxArgumentsBrand: unique symbol;
|
|
4
4
|
export type SandboxArguments = SandboxObject & {
|
|
5
5
|
readonly [sandboxArgumentsBrand]: true;
|
|
6
6
|
};
|
|
@@ -16,4 +16,3 @@ export declare function createSandboxArguments(values: readonly SandboxValue[],
|
|
|
16
16
|
export declare function isSandboxArguments(value: unknown): value is SandboxArguments;
|
|
17
17
|
export declare function getSandboxArgumentEntries(value: SandboxObject): Array<[string, SandboxValue]>;
|
|
18
18
|
export declare function copySandboxArgumentProperties(source: SandboxObject, target: object, copyValue: (value: SandboxValue, key: string | symbol) => unknown): void;
|
|
19
|
-
export {};
|
|
@@ -13,7 +13,7 @@ export type RealmBridge = {
|
|
|
13
13
|
wrapCallback(closure: SandboxClosure): (...args: readonly unknown[]) => Promise<unknown>;
|
|
14
14
|
invoke(operation: CallerInjectedFunction, call: () => unknown): unknown;
|
|
15
15
|
awaitResult(operation: CallerInjectedFunction): boolean;
|
|
16
|
-
captureArguments(operation: CallerInjectedFunction, args: readonly SandboxValue[], copy: (values: readonly SandboxValue[]) => unknown[]): {
|
|
16
|
+
captureArguments(operation: CallerInjectedFunction, args: readonly SandboxValue[], copy: (values: readonly SandboxValue[], wrapClosure?: RealmBridge["wrapCallback"]) => unknown[]): {
|
|
17
17
|
args: unknown[];
|
|
18
18
|
rollback(): void;
|
|
19
19
|
};
|
|
@@ -107,6 +107,7 @@ export declare class Scope {
|
|
|
107
107
|
}): void;
|
|
108
108
|
declareImport(name: string, target: Scope, targetName: string): void;
|
|
109
109
|
declareDeferredFunction(name: string, kind: VariableDeclarationKind, create: () => SandboxClosure, collect: (append: (value: SandboxValue) => void) => void): void;
|
|
110
|
+
declareDeferredArguments(name: string, kind: VariableDeclarationKind, values: readonly SandboxValue[]): void;
|
|
110
111
|
declareAlias(name: string, target: string): void;
|
|
111
112
|
declareVar(name: string, options?: {
|
|
112
113
|
functionValue?: InterpreterValue;
|
|
@@ -137,6 +137,7 @@ export declare function createSandboxClosure(input: {
|
|
|
137
137
|
retainedValues?: () => Iterable<SandboxValue>;
|
|
138
138
|
}): SandboxClosure;
|
|
139
139
|
export declare function registerDeferredClosureChargeIdentity(closure: SandboxClosure, identity: object): void;
|
|
140
|
+
export declare function registerClosureCaptureCollector(closure: SandboxClosure, provider: () => Iterable<SandboxValue>, collect: (append: (value: SandboxValue) => void) => void): void;
|
|
140
141
|
export declare function ownEnumerableSandboxEntries(value: SandboxValue, excludedKeys?: ReadonlySet<string>): Array<[string, SandboxValue]>;
|
|
141
142
|
export declare function ownSandboxSymbolKeys(value: SandboxValue): symbol[];
|
|
142
143
|
export declare function ownEnumerableSandboxKeys(value: SandboxValue): string[];
|
|
@@ -5,11 +5,15 @@ export declare class CompactSourcePositions {
|
|
|
5
5
|
private readonly sourceLength;
|
|
6
6
|
private readonly lines;
|
|
7
7
|
private readonly positions;
|
|
8
|
+
private readonly evictionOffsets;
|
|
9
|
+
private evictionIndex;
|
|
8
10
|
private readonly makeSpan;
|
|
9
11
|
constructor(source: string);
|
|
10
12
|
position(offset: number): Position;
|
|
11
13
|
span(start: number, end: number): SourceSpan;
|
|
12
14
|
compatiblePosition(position: Position): Position | undefined;
|
|
15
|
+
/** Packing validates coordinates without materializing or interning a point. */
|
|
16
|
+
matchesPosition(position: Position): boolean;
|
|
13
17
|
private assertOffset;
|
|
14
18
|
}
|
|
15
19
|
/** Rebased template coordinates compact only when their existing data agrees. */
|
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.725",
|
|
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.725",
|
|
62
62
|
"@petamoriken/float16": "^3.9.3",
|
|
63
63
|
"@formatjs/intl-localematcher": "0.8.13",
|
|
64
64
|
"@formatjs/bigdecimal": "0.2.7",
|