@poe-platform/safe-js 0.1.721 → 0.1.723
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 +36 -6
- package/dist/config-mutations/types.d.ts +3 -1
- package/dist/safe-js/chunks/{chunk-B4M6QVUV.js → chunk-3QQYJ4RQ.js} +3 -2
- package/dist/safe-js/chunks/chunk-3QQYJ4RQ.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-BEXRQET4.js → chunk-5MT2LF3W.js} +3 -3
- package/dist/safe-js/chunks/{chunk-JNLY7IMV.js → chunk-7FCMZUZJ.js} +4 -4
- package/dist/safe-js/chunks/{chunk-BHYBD6SY.js → chunk-7TL6Z6LT.js} +58 -8
- package/dist/safe-js/chunks/chunk-7TL6Z6LT.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-HYD4K4HN.js → chunk-BRBOVGNC.js} +63 -1
- package/dist/safe-js/chunks/chunk-BRBOVGNC.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-4CX3HYRY.js → chunk-HY3Q377V.js} +2 -2
- package/dist/safe-js/chunks/{chunk-DNA7BMBY.js → chunk-IZ52PAOD.js} +8540 -7309
- package/dist/safe-js/chunks/{chunk-DNA7BMBY.js.map → chunk-IZ52PAOD.js.map} +4 -4
- package/dist/safe-js/chunks/{chunk-A4L72WXV.js → chunk-KHJDAEET.js} +10 -11
- package/dist/safe-js/chunks/chunk-KHJDAEET.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-Q7B6JIMI.js → chunk-M6HUSN7X.js} +404 -117
- package/dist/safe-js/chunks/chunk-M6HUSN7X.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-LPBTSTDG.js → chunk-QMZG576E.js} +4 -4
- package/dist/safe-js/chunks/{chunk-ILYJBA2D.js → chunk-RYVHEOHM.js} +1109 -100
- package/dist/safe-js/chunks/chunk-RYVHEOHM.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-IS7YUCOF.js → chunk-SWQHZKYM.js} +2 -2
- package/dist/safe-js/chunks/{chunk-Y4LNCDCP.js → chunk-WF7HYDJ4.js} +4 -5
- package/dist/safe-js/chunks/{chunk-Y4LNCDCP.js.map → chunk-WF7HYDJ4.js.map} +2 -2
- package/dist/safe-js/chunks/{chunk-GMPZBMPA.js → chunk-Y5ZXQHL6.js} +3 -3
- package/dist/safe-js/chunks/{cli-runtime-YK2WE33M.js → cli-runtime-EPXCJ5AG.js} +14 -14
- package/dist/safe-js/chunks/{dump-ATWBOZWV.js → dump-TWVEBH5W.js} +4 -4
- package/dist/safe-js/chunks/{fs-D72Y52I5.js → fs-DSNHTHBT.js} +4 -4
- package/dist/safe-js/chunks/harness-RLA643GD.js +10 -0
- package/dist/safe-js/chunks/mcp-IEY7HXXT.js +11 -0
- package/dist/safe-js/chunks/migration-file-QMI45CSP.js +12 -0
- package/dist/safe-js/chunks/restore-R5PLLBST.js +13 -0
- package/dist/safe-js/chunks/run-QATVEFVQ.js +17 -0
- package/dist/safe-js/chunks/runtime-modules-5D7KDFMZ.js +10 -0
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +7 -7
- package/dist/safe-js/index.js +14 -14
- package/dist/safe-js/interp/async.d.ts +4 -1
- package/dist/safe-js/interp/budget.d.ts +12 -6
- package/dist/safe-js/interp/collection-iterator.d.ts +1 -1
- package/dist/safe-js/interp/host-bridge.d.ts +2 -0
- package/dist/safe-js/interp/host-capabilities.d.ts +13 -4
- package/dist/safe-js/interp/interpreter.d.ts +5 -1
- package/dist/safe-js/interp/intl-numberformat.d.ts +2 -2
- package/dist/safe-js/interp/jobs.d.ts +8 -0
- package/dist/safe-js/interp/scope.d.ts +9 -2
- package/dist/safe-js/interp/typed-array.d.ts +2 -2
- package/dist/safe-js/interp/values.d.ts +1 -0
- package/dist/safe-js/modules/registry.d.ts +4 -1
- package/dist/safe-js/modules/source-graph.d.ts +19 -1
- package/dist/safe-js/parse/compact-spans.d.ts +18 -0
- package/dist/safe-js/parse/dynamic-source.d.ts +3 -1
- package/dist/safe-js/parse/function-source.d.ts +1 -1
- package/dist/safe-js/parse/parser.d.ts +8 -3
- package/dist/safe-js/parse/tokenizer.d.ts +4 -0
- package/dist/safe-js/realm.d.ts +16 -3
- package/dist/safe-js/restore.d.ts +1 -0
- package/dist/safe-js/run.d.ts +10 -0
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-A4L72WXV.js.map +0 -7
- package/dist/safe-js/chunks/chunk-B4M6QVUV.js.map +0 -7
- package/dist/safe-js/chunks/chunk-BHYBD6SY.js.map +0 -7
- package/dist/safe-js/chunks/chunk-HYD4K4HN.js.map +0 -7
- package/dist/safe-js/chunks/chunk-ILYJBA2D.js.map +0 -7
- package/dist/safe-js/chunks/chunk-Q7B6JIMI.js.map +0 -7
- package/dist/safe-js/chunks/harness-LUYCGWHZ.js +0 -10
- package/dist/safe-js/chunks/mcp-IWKZB2R2.js +0 -11
- package/dist/safe-js/chunks/migration-file-IXO5MLP4.js +0 -12
- package/dist/safe-js/chunks/restore-SI7HOC6C.js +0 -13
- package/dist/safe-js/chunks/run-SHI2PYR6.js +0 -17
- package/dist/safe-js/chunks/runtime-modules-OO72HTVF.js +0 -10
- /package/dist/safe-js/chunks/{chunk-BEXRQET4.js.map → chunk-5MT2LF3W.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-JNLY7IMV.js.map → chunk-7FCMZUZJ.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-4CX3HYRY.js.map → chunk-HY3Q377V.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-LPBTSTDG.js.map → chunk-QMZG576E.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-IS7YUCOF.js.map → chunk-SWQHZKYM.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-GMPZBMPA.js.map → chunk-Y5ZXQHL6.js.map} +0 -0
- /package/dist/safe-js/chunks/{cli-runtime-YK2WE33M.js.map → cli-runtime-EPXCJ5AG.js.map} +0 -0
- /package/dist/safe-js/chunks/{dump-ATWBOZWV.js.map → dump-TWVEBH5W.js.map} +0 -0
- /package/dist/safe-js/chunks/{fs-D72Y52I5.js.map → fs-DSNHTHBT.js.map} +0 -0
- /package/dist/safe-js/chunks/{harness-LUYCGWHZ.js.map → harness-RLA643GD.js.map} +0 -0
- /package/dist/safe-js/chunks/{mcp-IWKZB2R2.js.map → mcp-IEY7HXXT.js.map} +0 -0
- /package/dist/safe-js/chunks/{migration-file-IXO5MLP4.js.map → migration-file-QMI45CSP.js.map} +0 -0
- /package/dist/safe-js/chunks/{restore-SI7HOC6C.js.map → restore-R5PLLBST.js.map} +0 -0
- /package/dist/safe-js/chunks/{run-SHI2PYR6.js.map → run-QATVEFVQ.js.map} +0 -0
- /package/dist/safe-js/chunks/{runtime-modules-OO72HTVF.js.map → runtime-modules-5D7KDFMZ.js.map} +0 -0
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
HostCallJournal,
|
|
3
3
|
decodeReplayData,
|
|
4
4
|
validateSnapshotData
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IZ52PAOD.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-RYVHEOHM.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-Y5ZXQHL6.js.map
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
parseFsConfig,
|
|
13
13
|
resolveFsConfig,
|
|
14
14
|
splitFrontmatter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WF7HYDJ4.js";
|
|
16
16
|
import {
|
|
17
17
|
parseMcpConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-BRBOVGNC.js";
|
|
19
19
|
import {
|
|
20
20
|
lint
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3QQYJ4RQ.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-RYVHEOHM.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-QMI45CSP.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-QATVEFVQ.js"),
|
|
276
|
+
import("./restore-R5PLLBST.js"),
|
|
277
|
+
import("./dump-TWVEBH5W.js"),
|
|
278
|
+
import("./runtime-modules-5D7KDFMZ.js"),
|
|
279
|
+
import("./fs-DSNHTHBT.js"),
|
|
280
|
+
import("./mcp-IEY7HXXT.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-RLA643GD.js"),
|
|
517
|
+
import("./fs-DSNHTHBT.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-EPXCJ5AG.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-5MT2LF3W.js";
|
|
8
|
+
import "./chunk-IZ52PAOD.js";
|
|
9
|
+
import "./chunk-RYVHEOHM.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-TWVEBH5W.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FS_OPTION_SURFACE,
|
|
3
3
|
makeFsModule
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7TL6Z6LT.js";
|
|
5
5
|
import "./chunk-SJZWSPWD.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-IZ52PAOD.js";
|
|
7
|
+
import "./chunk-RYVHEOHM.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-DSNHTHBT.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
makeMcpModule
|
|
3
|
+
} from "./chunk-QMZG576E.js";
|
|
4
|
+
import "./chunk-BRBOVGNC.js";
|
|
5
|
+
import "./chunk-IZ52PAOD.js";
|
|
6
|
+
import "./chunk-RYVHEOHM.js";
|
|
7
|
+
import "./chunk-4YIDX44G.js";
|
|
8
|
+
export {
|
|
9
|
+
makeMcpModule
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=mcp-IEY7HXXT.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
migrateSnapshotFile
|
|
3
|
+
} from "./chunk-7FCMZUZJ.js";
|
|
4
|
+
import "./chunk-SJZWSPWD.js";
|
|
5
|
+
import "./chunk-Y5ZXQHL6.js";
|
|
6
|
+
import "./chunk-IZ52PAOD.js";
|
|
7
|
+
import "./chunk-RYVHEOHM.js";
|
|
8
|
+
import "./chunk-4YIDX44G.js";
|
|
9
|
+
export {
|
|
10
|
+
migrateSnapshotFile
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=migration-file-QMI45CSP.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SnapshotMismatchError,
|
|
3
|
+
restore
|
|
4
|
+
} from "./chunk-KHJDAEET.js";
|
|
5
|
+
import "./chunk-Y5ZXQHL6.js";
|
|
6
|
+
import "./chunk-IZ52PAOD.js";
|
|
7
|
+
import "./chunk-RYVHEOHM.js";
|
|
8
|
+
import "./chunk-4YIDX44G.js";
|
|
9
|
+
export {
|
|
10
|
+
SnapshotMismatchError,
|
|
11
|
+
restore
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=restore-R5PLLBST.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UnhandledRejectionError,
|
|
3
|
+
run
|
|
4
|
+
} from "./chunk-M6HUSN7X.js";
|
|
5
|
+
import "./chunk-U7ZNMTSQ.js";
|
|
6
|
+
import "./chunk-KHJDAEET.js";
|
|
7
|
+
import "./chunk-5MT2LF3W.js";
|
|
8
|
+
import "./chunk-SJZWSPWD.js";
|
|
9
|
+
import "./chunk-Y5ZXQHL6.js";
|
|
10
|
+
import "./chunk-IZ52PAOD.js";
|
|
11
|
+
import "./chunk-RYVHEOHM.js";
|
|
12
|
+
import "./chunk-4YIDX44G.js";
|
|
13
|
+
export {
|
|
14
|
+
UnhandledRejectionError,
|
|
15
|
+
run
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=run-QATVEFVQ.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createLintModulesFromRuntimeRegistry
|
|
3
|
+
} from "./chunk-HY3Q377V.js";
|
|
4
|
+
import "./chunk-IZ52PAOD.js";
|
|
5
|
+
import "./chunk-RYVHEOHM.js";
|
|
6
|
+
import "./chunk-4YIDX44G.js";
|
|
7
|
+
export {
|
|
8
|
+
createLintModulesFromRuntimeRegistry
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=runtime-modules-5D7KDFMZ.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-EPXCJ5AG.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-EPXCJ5AG.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-3QQYJ4RQ.js";
|
|
4
4
|
import {
|
|
5
5
|
createRealm,
|
|
6
6
|
createReplayableRandom,
|
|
7
7
|
run
|
|
8
|
-
} from "./chunks/chunk-
|
|
8
|
+
} from "./chunks/chunk-M6HUSN7X.js";
|
|
9
9
|
import "./chunks/chunk-U7ZNMTSQ.js";
|
|
10
|
-
import "./chunks/chunk-
|
|
11
|
-
import "./chunks/chunk-
|
|
10
|
+
import "./chunks/chunk-KHJDAEET.js";
|
|
11
|
+
import "./chunks/chunk-5MT2LF3W.js";
|
|
12
12
|
import "./chunks/chunk-SJZWSPWD.js";
|
|
13
|
-
import "./chunks/chunk-
|
|
13
|
+
import "./chunks/chunk-Y5ZXQHL6.js";
|
|
14
14
|
import {
|
|
15
15
|
admitNativePromiseProperties,
|
|
16
16
|
defineExtension
|
|
17
|
-
} from "./chunks/chunk-
|
|
17
|
+
} from "./chunks/chunk-IZ52PAOD.js";
|
|
18
18
|
import {
|
|
19
19
|
Budget
|
|
20
|
-
} from "./chunks/chunk-
|
|
20
|
+
} from "./chunks/chunk-RYVHEOHM.js";
|
|
21
21
|
import "./chunks/chunk-4YIDX44G.js";
|
|
22
22
|
export {
|
|
23
23
|
Budget,
|
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-HY3Q377V.js";
|
|
4
4
|
import {
|
|
5
5
|
makeFsModule
|
|
6
|
-
} from "./chunks/chunk-
|
|
6
|
+
} from "./chunks/chunk-7TL6Z6LT.js";
|
|
7
7
|
import {
|
|
8
8
|
makeHarnessModule
|
|
9
|
-
} from "./chunks/chunk-
|
|
9
|
+
} from "./chunks/chunk-SWQHZKYM.js";
|
|
10
10
|
import {
|
|
11
11
|
makeMcpModule
|
|
12
|
-
} from "./chunks/chunk-
|
|
12
|
+
} from "./chunks/chunk-QMZG576E.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-WF7HYDJ4.js";
|
|
34
34
|
import {
|
|
35
35
|
parseMcpConfig
|
|
36
|
-
} from "./chunks/chunk-
|
|
36
|
+
} from "./chunks/chunk-BRBOVGNC.js";
|
|
37
37
|
import {
|
|
38
38
|
lint
|
|
39
|
-
} from "./chunks/chunk-
|
|
39
|
+
} from "./chunks/chunk-3QQYJ4RQ.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-M6HUSN7X.js";
|
|
50
50
|
import "./chunks/chunk-U7ZNMTSQ.js";
|
|
51
51
|
import {
|
|
52
52
|
restore
|
|
53
|
-
} from "./chunks/chunk-
|
|
53
|
+
} from "./chunks/chunk-KHJDAEET.js";
|
|
54
54
|
import {
|
|
55
55
|
dump
|
|
56
|
-
} from "./chunks/chunk-
|
|
56
|
+
} from "./chunks/chunk-5MT2LF3W.js";
|
|
57
57
|
import {
|
|
58
58
|
inspectSnapshotMigration,
|
|
59
59
|
migrateSnapshot,
|
|
60
60
|
migrateSnapshotFile
|
|
61
|
-
} from "./chunks/chunk-
|
|
61
|
+
} from "./chunks/chunk-7FCMZUZJ.js";
|
|
62
62
|
import {
|
|
63
63
|
hasOwnErrorCode
|
|
64
64
|
} from "./chunks/chunk-SJZWSPWD.js";
|
|
65
|
-
import "./chunks/chunk-
|
|
65
|
+
import "./chunks/chunk-Y5ZXQHL6.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-IZ52PAOD.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-RYVHEOHM.js";
|
|
86
86
|
import "./chunks/chunk-4YIDX44G.js";
|
|
87
87
|
|
|
88
88
|
// packages/safe-js/src/parse.ts
|
|
@@ -5,7 +5,7 @@ import { type Budget } from "./budget.js";
|
|
|
5
5
|
import { type EvaluationResult } from "./exceptions.js";
|
|
6
6
|
import type { InterpreterError, InterpreterSnapshot, LoopIterationSnapshot } from "./interpreter.js";
|
|
7
7
|
import { CompileScope } from "./regex/compile-guard.js";
|
|
8
|
-
import type
|
|
8
|
+
import { type Scope } from "./scope.js";
|
|
9
9
|
import { type SandboxCallContext, type SandboxClosure, type SandboxGenerator, type SandboxObject, type SandboxPromise, type SandboxValue } from "./values.js";
|
|
10
10
|
export type InterpreterYieldPoint = {
|
|
11
11
|
kind: "await" | "generator-yield" | "loop-iteration";
|
|
@@ -19,6 +19,9 @@ type ResumeBreakpoint = Omit<InterpreterYieldPoint, "snapshot">;
|
|
|
19
19
|
export type AsyncInterpreterError = InterpreterError;
|
|
20
20
|
export type AsyncEvaluationResult = EvaluationResult<AsyncInterpreterError>;
|
|
21
21
|
export type AsyncEvaluationContext = {
|
|
22
|
+
sourceReference?: Readonly<{
|
|
23
|
+
referrer: string;
|
|
24
|
+
}>;
|
|
22
25
|
scriptScope?: Scope;
|
|
23
26
|
evalCompletion?: boolean;
|
|
24
27
|
callee?: SandboxClosure;
|
|
@@ -4,15 +4,16 @@ export type BudgetOptions = {
|
|
|
4
4
|
deadline?: number | Date;
|
|
5
5
|
maxCallDepth?: number;
|
|
6
6
|
stringLength?: number;
|
|
7
|
+
regexSourceLength?: number;
|
|
8
|
+
regexCompileAllocations?: number;
|
|
7
9
|
arrayLength?: number;
|
|
8
10
|
dataSize?: number;
|
|
9
11
|
};
|
|
10
|
-
export declare const REGEX_STEP_LIMIT = 2000;
|
|
11
12
|
export declare const REGEX_COMPILE_LIMITS: Readonly<{
|
|
12
|
-
sourceLength:
|
|
13
|
-
flagsLength:
|
|
14
|
-
depth:
|
|
15
|
-
allocations:
|
|
13
|
+
sourceLength: number;
|
|
14
|
+
flagsLength: number;
|
|
15
|
+
depth: number;
|
|
16
|
+
allocations: number;
|
|
16
17
|
}>;
|
|
17
18
|
export declare class SandboxError extends Error {
|
|
18
19
|
readonly code: "aborted" | "budgetExceeded" | "reentry";
|
|
@@ -31,6 +32,8 @@ type BudgetLimits = {
|
|
|
31
32
|
maxSteps?: number;
|
|
32
33
|
maxCallDepth?: number;
|
|
33
34
|
stringLength?: number;
|
|
35
|
+
regexSourceLength?: number;
|
|
36
|
+
regexCompileAllocations?: number;
|
|
34
37
|
arrayLength?: number;
|
|
35
38
|
dataSize?: number;
|
|
36
39
|
};
|
|
@@ -59,15 +62,19 @@ export declare class Budget {
|
|
|
59
62
|
set peakDataSize(value: number);
|
|
60
63
|
get currentCallDepth(): number;
|
|
61
64
|
set currentCallDepth(value: number);
|
|
65
|
+
acquireDeadline(deadline: number, onExceeded?: (reason: SandboxError) => void): () => void;
|
|
62
66
|
forkRealm(): Budget;
|
|
63
67
|
acquireRealmOwner(): ReturnType<Budget["acquireCompileOwner"]>;
|
|
64
68
|
visitNode(units?: number): void;
|
|
65
69
|
allocateString(value: string): string;
|
|
70
|
+
allocateStringLength(length: number): void;
|
|
66
71
|
allocateArrayLength(length: number): void;
|
|
67
72
|
allocateCollectionEntries(count: number): void;
|
|
68
73
|
reconcileDataUsage(usage: number): void;
|
|
69
74
|
setRetainedDataUsage(owner: object, usage: number): void;
|
|
70
75
|
setRetainedValues(owner: object, values: (() => Iterable<unknown> | undefined) | undefined): void;
|
|
76
|
+
get reconciliationDeferred(): boolean;
|
|
77
|
+
deferReconciliation(): () => void;
|
|
71
78
|
retainedValues(): Iterable<unknown>;
|
|
72
79
|
acquireCompileOwner(reset?: boolean, owner?: CompileOwner): {
|
|
73
80
|
owner: CompileOwner;
|
|
@@ -90,5 +97,4 @@ export declare class Budget {
|
|
|
90
97
|
private checkSampledDeadline;
|
|
91
98
|
private enterDepth;
|
|
92
99
|
}
|
|
93
|
-
export declare function allocateRegexSteps(steps: number): void;
|
|
94
100
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Budget } from "./budget.js";
|
|
2
2
|
import type { SandboxMap, SandboxSet, SandboxValue, SandboxObject } from "./values.js";
|
|
3
|
-
export declare const collectionIteratorPrototypes: WeakMap<Budget, Partial<Record<"
|
|
3
|
+
export declare const collectionIteratorPrototypes: WeakMap<Budget, Partial<Record<"map" | "set", SandboxObject>>>;
|
|
4
4
|
declare const collectionIteratorBrand: unique symbol;
|
|
5
5
|
export type SandboxCollectionIterator = {
|
|
6
6
|
readonly [collectionIteratorBrand]: true;
|
|
@@ -6,6 +6,7 @@ import type { RunLifecycle } from "../snapshot/dump.js";
|
|
|
6
6
|
type CallerInjectedFunction = {
|
|
7
7
|
bivarianceHack(...args: readonly unknown[]): unknown;
|
|
8
8
|
}["bivarianceHack"];
|
|
9
|
+
export declare function declareBudgetedHostOperation(operation: CallerInjectedFunction, invoke: (args: readonly unknown[], budget: Budget) => unknown): void;
|
|
9
10
|
export type RealmBridge = {
|
|
10
11
|
readonly owner: object;
|
|
11
12
|
assertActive(): void;
|
|
@@ -37,6 +38,7 @@ export type CallerInjectedBinding = SandboxValue | CallerInjectedFunction | read
|
|
|
37
38
|
};
|
|
38
39
|
export declare function declareHostOperation<TFunction extends CallerInjectedFunction>(operation: TFunction, policy: PendingHostCallPolicyMode, options?: {
|
|
39
40
|
onReplay?: (args: readonly unknown[], outcome: HostCallOutcome) => void;
|
|
41
|
+
awaitResult?: boolean;
|
|
40
42
|
}): TFunction;
|
|
41
43
|
export declare function readHostOperationPolicy(operation: CallerInjectedFunction): PendingHostCallPolicyMode | undefined;
|
|
42
44
|
export declare function wrapCallerInjectedBindings(bindings: Record<string, CallerInjectedBinding>, options: HostBridgeOptions): Record<string, SandboxValue>;
|
|
@@ -19,6 +19,11 @@ export type HostObjectIndexedDefinition = {
|
|
|
19
19
|
maxLength: number;
|
|
20
20
|
};
|
|
21
21
|
export type HostObjectDefinition = {
|
|
22
|
+
expandos?: {
|
|
23
|
+
maxKeys: number;
|
|
24
|
+
maxKeyCodeUnits: number;
|
|
25
|
+
assertActive?: () => void;
|
|
26
|
+
};
|
|
22
27
|
indexed?: HostObjectIndexedDefinition;
|
|
23
28
|
named?: HostObjectNamedDefinition;
|
|
24
29
|
properties?: Record<string, {
|
|
@@ -40,6 +45,7 @@ export type HostObjectController = {
|
|
|
40
45
|
owner: object;
|
|
41
46
|
assertActive(): void;
|
|
42
47
|
chargeWork(units?: number): void;
|
|
48
|
+
chargeGuestData(units: number): void;
|
|
43
49
|
checkLength(length: number): void;
|
|
44
50
|
checkString(value: string): void;
|
|
45
51
|
checkTemporaryDataSize(size: number): void;
|
|
@@ -64,11 +70,14 @@ export declare function registerGuestCallback(callback: HostOperation, state: Gu
|
|
|
64
70
|
export declare function readGuestCallback(callback: unknown, owner: object): SandboxClosure;
|
|
65
71
|
export declare function revokeGuestCallback(callback: object, owner: object): void;
|
|
66
72
|
export declare function revokeHostObject(value: HostObject, owner: object): void;
|
|
67
|
-
export declare function getHostObjectMember(value: SandboxObject, key: string): SandboxValue;
|
|
68
|
-
export declare function setHostObjectMember(value: SandboxObject, key: string, entry: SandboxValue): void;
|
|
69
|
-
export declare function deleteHostObjectMember(value: SandboxObject, key: string): boolean;
|
|
73
|
+
export declare function getHostObjectMember(value: SandboxObject, key: string | symbol): SandboxValue;
|
|
74
|
+
export declare function setHostObjectMember(value: SandboxObject, key: string | symbol, entry: SandboxValue): void;
|
|
75
|
+
export declare function deleteHostObjectMember(value: SandboxObject, key: string | symbol): boolean;
|
|
70
76
|
export declare function getHostObjectKeys(value: SandboxObject): string[];
|
|
71
|
-
export declare function hasHostObjectMember(value: SandboxObject, key: string, enumerableOnly?: boolean): boolean;
|
|
77
|
+
export declare function hasHostObjectMember(value: SandboxObject, key: string | symbol, enumerableOnly?: boolean): boolean;
|
|
72
78
|
export declare function measureHostObjectData(value: SandboxObject): number;
|
|
73
79
|
export declare function getHostObjectIterator(value: SandboxObject): SandboxIterator | undefined;
|
|
80
|
+
export declare function getHostObjectSymbolKeys(value: SandboxObject): symbol[];
|
|
81
|
+
export declare function hostObjectGuestRoot(value: HostObject | SandboxObject): SandboxObject | undefined;
|
|
82
|
+
export declare function hostObjectGuestRoots(value: HostObject | SandboxObject): SandboxValue[];
|
|
74
83
|
export {};
|
|
@@ -22,7 +22,7 @@ export type LoopIterationSnapshot = number | {
|
|
|
22
22
|
index: number;
|
|
23
23
|
values: InterpreterValue[];
|
|
24
24
|
};
|
|
25
|
-
export type InterpreterErrorCode = "LABEL_NOT_FOUND" | "UNBOUND_IDENTIFIER" | "UNSUPPORTED_NODE";
|
|
25
|
+
export type InterpreterErrorCode = "LABEL_NOT_FOUND" | "UNBOUND_IDENTIFIER" | "UNSUPPORTED_NODE" | "UNCAUGHT_EXCEPTION";
|
|
26
26
|
export type InterpreterError = {
|
|
27
27
|
code: InterpreterErrorCode;
|
|
28
28
|
message: string;
|
|
@@ -44,7 +44,10 @@ export type InterpreterResult = {
|
|
|
44
44
|
stats: InterpreterStats;
|
|
45
45
|
};
|
|
46
46
|
export type InterpretOptions = {
|
|
47
|
+
sourceReference?: AsyncEvaluationContext["sourceReference"];
|
|
47
48
|
modulePhase?: "link" | "evaluate";
|
|
49
|
+
/** Skip unused public bindings; retained data is still reconciled. */
|
|
50
|
+
captureSnapshot?: boolean;
|
|
48
51
|
script?: {
|
|
49
52
|
strict: boolean;
|
|
50
53
|
};
|
|
@@ -61,6 +64,7 @@ export type InterpretOptions = {
|
|
|
61
64
|
scope?: Scope;
|
|
62
65
|
signal?: AbortSignal;
|
|
63
66
|
surfaceUnhandledThrows?: boolean;
|
|
67
|
+
reportUnhandledThrows?: boolean;
|
|
64
68
|
useScopeDirectly?: boolean;
|
|
65
69
|
generatorYield?: (value?: SandboxValue, yieldNodeId?: number, yieldedResult?: SandboxValue) => Promise<GeneratorCompletion>;
|
|
66
70
|
asyncGenerator?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Budget } from "./budget.js";
|
|
2
2
|
import { createNumberFormatter } from "./numberformat-backend.js";
|
|
3
3
|
import type { SandboxCallContext, SandboxClosure, SandboxObject, SandboxValue } from "./values.js";
|
|
4
4
|
export type NumberFormatOptions = Record<string, string | number | boolean>;
|
|
@@ -10,4 +10,4 @@ export declare function numberFormatState(value: unknown): {
|
|
|
10
10
|
format?: SandboxClosure;
|
|
11
11
|
};
|
|
12
12
|
export declare function numberFormatValue(value: SandboxValue, budget: Budget, context?: SandboxCallContext): Promise<number | bigint | string>;
|
|
13
|
-
export declare function formatNumberValue(receiver: unknown, method: "format" | "formatToParts" | "formatRange" | "formatRangeToParts", values: Array<number | bigint | string
|
|
13
|
+
export declare function formatNumberValue(receiver: unknown, method: "format" | "formatToParts" | "formatRange" | "formatRangeToParts", values: Array<number | bigint | string>, budget: Budget): SandboxValue;
|
|
@@ -7,17 +7,23 @@ export type ExecutionControl = {
|
|
|
7
7
|
type ExecutionJob = {
|
|
8
8
|
queue: SandboxJobQueue;
|
|
9
9
|
ownsExecution: boolean;
|
|
10
|
+
attribution?: ReadonlyMap<object, object | undefined>;
|
|
10
11
|
prefixParent?: ExecutionJob;
|
|
11
12
|
keptTargets?: Map<Budget, Set<object | symbol>>;
|
|
12
13
|
};
|
|
14
|
+
export declare function getJobAttribution(key: object): object | undefined;
|
|
15
|
+
export declare function withJobAttribution<Result>(key: object, value: object | undefined, task: () => Result): Result;
|
|
16
|
+
export declare function captureJobAttribution(): <Result>(task: () => Result) => Result;
|
|
13
17
|
export declare class SandboxJobQueue {
|
|
14
18
|
private running;
|
|
15
19
|
private pending;
|
|
16
20
|
private ready;
|
|
17
21
|
private readonly idle;
|
|
22
|
+
private readonly unsettled;
|
|
18
23
|
private generation;
|
|
19
24
|
private controlled;
|
|
20
25
|
private nodesUntilHostTurn;
|
|
26
|
+
private lastHostTurn;
|
|
21
27
|
private pauseRequest?;
|
|
22
28
|
private finished;
|
|
23
29
|
private interruption?;
|
|
@@ -33,6 +39,8 @@ export declare class SandboxJobQueue {
|
|
|
33
39
|
acquire(job: ExecutionJob): Promise<void>;
|
|
34
40
|
release(job: ExecutionJob): void;
|
|
35
41
|
run<T>(task: () => T | Promise<T>): Promise<T>;
|
|
42
|
+
track<T>(pending: Promise<T>): Promise<T>;
|
|
43
|
+
settle(): Promise<void>;
|
|
36
44
|
drain(): Promise<void>;
|
|
37
45
|
private advance;
|
|
38
46
|
}
|
|
@@ -2,7 +2,7 @@ import type { VariableDeclarationKind } from "../parse.js";
|
|
|
2
2
|
import type { PrivateName } from "./private-state.js";
|
|
3
3
|
import type { InterpreterSnapshot, InterpreterValue } from "./interpreter.js";
|
|
4
4
|
import type { ResourceScopeState } from "./resource-management.js";
|
|
5
|
-
import type { SandboxObject } from "./values.js";
|
|
5
|
+
import type { SandboxClosure, SandboxObject, SandboxValue } from "./values.js";
|
|
6
6
|
import type { ModuleEnvironment } from "../modules/registry.js";
|
|
7
7
|
type ScopeLookupResult = {
|
|
8
8
|
found: true;
|
|
@@ -99,11 +99,14 @@ export declare class Scope {
|
|
|
99
99
|
lookupModuleId(): string;
|
|
100
100
|
lookupModuleEnvironment(): ModuleEnvironment | undefined;
|
|
101
101
|
retainedValues(): InterpreterValue[];
|
|
102
|
-
retainedDataRoots(): InterpreterValue[];
|
|
102
|
+
retainedDataRoots(append?: (values: InterpreterValue[]) => void): InterpreterValue[];
|
|
103
|
+
static captureDataRoots(scope: Scope, append: (values: InterpreterValue[]) => void): InterpreterValue[];
|
|
104
|
+
static visitDataRoots(scope: Scope, append: (value: InterpreterValue) => void): void;
|
|
103
105
|
declare(name: string, kind: VariableDeclarationKind, value: InterpreterValue, options?: {
|
|
104
106
|
silentImmutable: true;
|
|
105
107
|
}): void;
|
|
106
108
|
declareImport(name: string, target: Scope, targetName: string): void;
|
|
109
|
+
declareDeferredFunction(name: string, kind: VariableDeclarationKind, create: () => SandboxClosure, collect: (append: (value: SandboxValue) => void) => void): void;
|
|
107
110
|
declareAlias(name: string, target: string): void;
|
|
108
111
|
declareVar(name: string, options?: {
|
|
109
112
|
functionValue?: InterpreterValue;
|
|
@@ -124,8 +127,12 @@ export declare class Scope {
|
|
|
124
127
|
hydrateFrame(frame: ScopeFrame): void;
|
|
125
128
|
copyInitializedBindingsFrom(source: Scope, names: readonly string[]): void;
|
|
126
129
|
private writeBindingValue;
|
|
130
|
+
private readBindingValue;
|
|
127
131
|
private resolveScope;
|
|
128
132
|
private trackReplacement;
|
|
129
133
|
private requireInitializedBinding;
|
|
130
134
|
}
|
|
135
|
+
export declare const captureScopeDataRoots: typeof Scope.captureDataRoots;
|
|
136
|
+
export declare const visitScopeDataRoots: typeof Scope.visitDataRoots;
|
|
137
|
+
export declare function appendScopeDataRoots(values: InterpreterValue[], captured: Iterable<InterpreterValue>, index?: number): number;
|
|
131
138
|
export {};
|
|
@@ -7,7 +7,7 @@ export declare const typedArrayViewLayouts: WeakMap<NumericTypedArray, {
|
|
|
7
7
|
}>;
|
|
8
8
|
export declare function createOwnedTypedArray(Native: NumericTypedArrayConstructor, args: unknown[]): NumericTypedArray;
|
|
9
9
|
export declare function nativeTypedArrayView<T extends object>(value: T): T;
|
|
10
|
-
export declare function restoreTypedArrayView(buffer: ArrayBufferLike, byteOffset: number, length?: number, budget?: Budget, Native?: NumericTypedArrayConstructor): NumericTypedArray;
|
|
10
|
+
export declare function restoreTypedArrayView(buffer: ArrayBufferLike, byteOffset: number, length?: number, budget?: Budget, Native?: NumericTypedArrayConstructor, owned?: boolean): NumericTypedArray;
|
|
11
11
|
export declare function isNumericTypedArray(value: unknown): value is NumericTypedArray;
|
|
12
12
|
export declare function typedArrayStorage(value: NumericTypedArray, requireInBounds?: boolean): {
|
|
13
13
|
buffer: ArrayBufferLike;
|
|
@@ -26,5 +26,5 @@ export declare function checkTypedArrayAllocation(length: number, budget: Budget
|
|
|
26
26
|
export declare function copyTypedArrayStorage<TValue>(value: NumericTypedArray, state: {
|
|
27
27
|
seen: WeakMap<object, TValue>;
|
|
28
28
|
float32Buffers?: WeakMap<ArrayBufferLike, ArrayBufferLike>;
|
|
29
|
-
}): NumericTypedArray;
|
|
29
|
+
}, owned?: boolean): NumericTypedArray;
|
|
30
30
|
export declare function requireUint8Array(value: unknown): Uint8Array<ArrayBuffer>;
|
|
@@ -136,6 +136,7 @@ export declare function createSandboxClosure(input: {
|
|
|
136
136
|
properties?: SandboxObject | ((closure: SandboxClosure) => SandboxObject);
|
|
137
137
|
retainedValues?: () => Iterable<SandboxValue>;
|
|
138
138
|
}): SandboxClosure;
|
|
139
|
+
export declare function registerDeferredClosureChargeIdentity(closure: SandboxClosure, identity: object): void;
|
|
139
140
|
export declare function ownEnumerableSandboxEntries(value: SandboxValue, excludedKeys?: ReadonlySet<string>): Array<[string, SandboxValue]>;
|
|
140
141
|
export declare function ownSandboxSymbolKeys(value: SandboxValue): symbol[];
|
|
141
142
|
export declare function ownEnumerableSandboxKeys(value: SandboxValue): string[];
|
|
@@ -20,6 +20,7 @@ export type ModuleEnvironmentOptions = {
|
|
|
20
20
|
prepareNamespace?: (namespace: Record<string, SandboxValue>, moduleName: string) => Record<string, SandboxValue>;
|
|
21
21
|
};
|
|
22
22
|
export declare function createModuleEnvironment(modules: ModuleRegistry | undefined, options: ModuleEnvironmentOptions, restored?: ModuleEnvironment): ModuleEnvironment;
|
|
23
|
+
export declare function createImmutableEmptyModuleEnvironment(options: ModuleEnvironmentOptions): ModuleEnvironment;
|
|
23
24
|
export declare function resolveModuleNamespace(environment: ModuleEnvironment, moduleName: string, prepare?: boolean): Record<string, SandboxValue>;
|
|
24
25
|
export declare function resolveModuleFunction(environment: ModuleEnvironment, origin: ModuleFunctionOrigin): SandboxClosure;
|
|
25
26
|
export declare function createUnknownModuleMessage(moduleName: string, moduleNames: readonly string[]): string;
|
|
@@ -28,5 +29,7 @@ export declare function resolveModuleImports(module: Module, modules: ModuleRegi
|
|
|
28
29
|
environment?: ModuleEnvironment;
|
|
29
30
|
allowMissing?: boolean;
|
|
30
31
|
}): Record<string, SandboxValue>;
|
|
31
|
-
export declare function attachSourceLoader(environment: ModuleEnvironment, loader: (specifier: string, referrer: string) => Promise<Record<string, SandboxValue
|
|
32
|
+
export declare function attachSourceLoader(environment: ModuleEnvironment, loader: (specifier: string, referrer: string) => Promise<Record<string, SandboxValue>>, options?: {
|
|
33
|
+
preserveImmutableNamespaces?: true;
|
|
34
|
+
}): void;
|
|
32
35
|
export declare function importModuleNamespace(environment: ModuleEnvironment, specifier: string, referrer: string): Record<string, SandboxValue> | Promise<Record<string, SandboxValue>>;
|