poe-code 11.0.24 → 11.0.25
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 +37 -21
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-I5FH3SKL.js → chunk-BGO2B5YI.js} +2 -2
- package/packages/safejs/dist/chunks/{chunk-CGS4H4L3.js → chunk-DXJLYASS.js} +37 -21
- package/packages/safejs/dist/chunks/{chunk-CGS4H4L3.js.map → chunk-DXJLYASS.js.map} +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/restore.js +1 -0
- package/packages/safejs/dist/run.js +14 -8
- package/packages/safejs/dist/snapshot/dump-format.d.ts +1 -1
- package/packages/safejs/dist/snapshot/dump-format.js +1 -1
- package/packages/safejs/dist/snapshot/migration.js +2 -2
- /package/packages/safejs/dist/chunks/{chunk-I5FH3SKL.js.map → chunk-BGO2B5YI.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -136635,7 +136635,7 @@ var init_dump_format = __esm({
|
|
|
136635
136635
|
init_arguments2();
|
|
136636
136636
|
init_arrays();
|
|
136637
136637
|
DUMP_FORMAT_VERSION = 1;
|
|
136638
|
-
EXECUTION_SEMANTICS = "jobs-
|
|
136638
|
+
EXECUTION_SEMANTICS = "jobs-v7";
|
|
136639
136639
|
SKIP_VALUE = /* @__PURE__ */ Symbol("SafeJS.skip-dump-value");
|
|
136640
136640
|
}
|
|
136641
136641
|
});
|
|
@@ -140703,9 +140703,11 @@ var init_random = __esm({
|
|
|
140703
140703
|
|
|
140704
140704
|
// packages/safejs/src/snapshot/migration.ts
|
|
140705
140705
|
function validateMigrationSemantics(value) {
|
|
140706
|
-
if (!["jobs-v1", "jobs-v2", "jobs-v3", "jobs-v4", "jobs-v5", "jobs-v6"].includes(
|
|
140706
|
+
if (!["jobs-v1", "jobs-v2", "jobs-v3", "jobs-v4", "jobs-v5", "jobs-v6", "jobs-v7"].includes(
|
|
140707
|
+
value
|
|
140708
|
+
))
|
|
140707
140709
|
throw new TypeError(
|
|
140708
|
-
"Migration requires a supported execution-semantics marker (jobs-v1 through jobs-
|
|
140710
|
+
"Migration requires a supported execution-semantics marker (jobs-v1 through jobs-v7)."
|
|
140709
140711
|
);
|
|
140710
140712
|
}
|
|
140711
140713
|
function validateMigrationJournal(sourceHash, replay, hostCalls = []) {
|
|
@@ -140797,7 +140799,7 @@ function restore2(snapshot2, options) {
|
|
|
140797
140799
|
assertSnapshotInactive(snapshot2);
|
|
140798
140800
|
validateDumpEnvelope(snapshot2);
|
|
140799
140801
|
validateSnapshotMigration(snapshot2.migration, snapshot2.sourceHash);
|
|
140800
|
-
if (snapshot2.executionSemantics !== EXECUTION_SEMANTICS && (snapshot2.executionSemantics !== void 0 || snapshot2.promiseReplay !== void 0 || snapshot2.replay !== void 0 || snapshot2.initialInputs !== void 0)) {
|
|
140802
|
+
if (snapshot2.executionSemantics !== EXECUTION_SEMANTICS && snapshot2.executionSemantics !== "jobs-v6" && (snapshot2.executionSemantics !== void 0 || snapshot2.promiseReplay !== void 0 || snapshot2.replay !== void 0 || snapshot2.initialInputs !== void 0)) {
|
|
140801
140803
|
throw new SnapshotValidationError(
|
|
140802
140804
|
"unsupportedVersion",
|
|
140803
140805
|
"$.executionSemantics",
|
|
@@ -148238,6 +148240,8 @@ function run(source, options = {}) {
|
|
|
148238
148240
|
options.signal?.addEventListener("abort", captureCancellationSnapshot, { once: true });
|
|
148239
148241
|
try {
|
|
148240
148242
|
const restoredSnapshot = options.snapshot === void 0 ? void 0 : restore2(options.snapshot, { source });
|
|
148243
|
+
const executionSemantics = restoredSnapshot?.executionSemantics === "jobs-v6" ? "jobs-v6" : EXECUTION_SEMANTICS;
|
|
148244
|
+
const convertInitialInput = (convert) => executionSemantics === "jobs-v6" ? convert() : promiseReplayContext.exit(convert);
|
|
148241
148245
|
if (restoredSnapshot !== void 0) {
|
|
148242
148246
|
leaveSnapshotRun = enterSnapshotRun(restoredSnapshot);
|
|
148243
148247
|
}
|
|
@@ -148263,13 +148267,15 @@ function run(source, options = {}) {
|
|
|
148263
148267
|
...restoredSnapshot,
|
|
148264
148268
|
resumeNodeId: restoredSnapshot.pendingAwaits?.[0]?.nodeId
|
|
148265
148269
|
} : void 0;
|
|
148266
|
-
const callerBindings =
|
|
148267
|
-
|
|
148268
|
-
|
|
148269
|
-
|
|
148270
|
-
|
|
148271
|
-
|
|
148272
|
-
|
|
148270
|
+
const callerBindings = convertInitialInput(
|
|
148271
|
+
() => options.bindings === void 0 ? {} : wrapCallerInjectedBindings(options.bindings, {
|
|
148272
|
+
budget,
|
|
148273
|
+
hostCalls,
|
|
148274
|
+
moduleId: "<bindings>",
|
|
148275
|
+
signal: options.signal,
|
|
148276
|
+
lifecycle
|
|
148277
|
+
})
|
|
148278
|
+
);
|
|
148273
148279
|
const builtinBindings = {
|
|
148274
148280
|
...createConsoleJsonGlobals({
|
|
148275
148281
|
budget,
|
|
@@ -148294,7 +148300,9 @@ function run(source, options = {}) {
|
|
|
148294
148300
|
}),
|
|
148295
148301
|
...createRegexGlobals()
|
|
148296
148302
|
};
|
|
148297
|
-
const importMeta =
|
|
148303
|
+
const importMeta = convertInitialInput(
|
|
148304
|
+
() => deepCopyToSandbox(options.importMeta ?? {})
|
|
148305
|
+
);
|
|
148298
148306
|
if (restoredSnapshot?.migration !== void 0) {
|
|
148299
148307
|
if (Object.hasOwn(importMeta, "migration"))
|
|
148300
148308
|
throw new TypeError("import.meta.migration is reserved for migrated checkpoint state.");
|
|
@@ -148308,13 +148316,17 @@ function run(source, options = {}) {
|
|
|
148308
148316
|
const initialInputs = prepareReplayInputs(
|
|
148309
148317
|
{
|
|
148310
148318
|
bindings: callerBindings,
|
|
148311
|
-
imports:
|
|
148312
|
-
|
|
148313
|
-
|
|
148314
|
-
|
|
148315
|
-
|
|
148316
|
-
|
|
148317
|
-
|
|
148319
|
+
imports: convertInitialInput(
|
|
148320
|
+
() => resolveModuleImports(module, options.modules, {
|
|
148321
|
+
budget,
|
|
148322
|
+
hostCalls,
|
|
148323
|
+
signal: options.signal,
|
|
148324
|
+
allowMissing: restoredSnapshot?.initialInputs !== void 0
|
|
148325
|
+
})
|
|
148326
|
+
),
|
|
148327
|
+
entryPointArgs: convertInitialInput(
|
|
148328
|
+
() => options.entryPointArgs === void 0 ? void 0 : deepCopyToSandbox([...options.entryPointArgs])
|
|
148329
|
+
),
|
|
148318
148330
|
importMeta
|
|
148319
148331
|
},
|
|
148320
148332
|
restoredSnapshot?.initialInputs,
|
|
@@ -148380,6 +148392,7 @@ function run(source, options = {}) {
|
|
|
148380
148392
|
});
|
|
148381
148393
|
snapshotScheduler = activeSnapshotScheduler;
|
|
148382
148394
|
createFailureSnapshot = () => createRunSnapshot({
|
|
148395
|
+
executionSemantics,
|
|
148383
148396
|
migration: restoredSnapshot?.migration,
|
|
148384
148397
|
bindings: executionScope.snapshot().bindings,
|
|
148385
148398
|
clock: options.clock,
|
|
@@ -148406,6 +148419,7 @@ function run(source, options = {}) {
|
|
|
148406
148419
|
}
|
|
148407
148420
|
const interpreterSnapshot2 = yieldPoint.snapshot();
|
|
148408
148421
|
snapshot3 = createRunSnapshot({
|
|
148422
|
+
executionSemantics,
|
|
148409
148423
|
migration: restoredSnapshot?.migration,
|
|
148410
148424
|
bindings: interpreterSnapshot2.bindings,
|
|
148411
148425
|
clock: options.clock,
|
|
@@ -148448,6 +148462,7 @@ function run(source, options = {}) {
|
|
|
148448
148462
|
}
|
|
148449
148463
|
const interpreterSnapshot2 = yieldPoint.snapshot();
|
|
148450
148464
|
snapshot3 = createRunSnapshot({
|
|
148465
|
+
executionSemantics,
|
|
148451
148466
|
migration: restoredSnapshot?.migration,
|
|
148452
148467
|
bindings: interpreterSnapshot2.bindings,
|
|
148453
148468
|
clock: options.clock,
|
|
@@ -148482,6 +148497,7 @@ function run(source, options = {}) {
|
|
|
148482
148497
|
replayError = error3.message;
|
|
148483
148498
|
}
|
|
148484
148499
|
const snapshot2 = createRunSnapshot({
|
|
148500
|
+
executionSemantics,
|
|
148485
148501
|
migration: restoredSnapshot?.migration,
|
|
148486
148502
|
bindings: executionScope.snapshot().bindings,
|
|
148487
148503
|
clock: options.clock,
|
|
@@ -148651,7 +148667,7 @@ function createExecutableNode(module) {
|
|
|
148651
148667
|
function createRunSnapshot(input) {
|
|
148652
148668
|
return {
|
|
148653
148669
|
version: DUMP_FORMAT_VERSION,
|
|
148654
|
-
executionSemantics:
|
|
148670
|
+
executionSemantics: input.executionSemantics,
|
|
148655
148671
|
sourceHash: input.sourceHash,
|
|
148656
148672
|
...input.migration === void 0 ? {} : { migration: structuredClone(input.migration) },
|
|
148657
148673
|
bindings: input.bindings,
|
|
@@ -155759,7 +155775,7 @@ var init_package2 = __esm({
|
|
|
155759
155775
|
"package.json"() {
|
|
155760
155776
|
package_default2 = {
|
|
155761
155777
|
name: "poe-code",
|
|
155762
|
-
version: "11.0.
|
|
155778
|
+
version: "11.0.25",
|
|
155763
155779
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
155764
155780
|
license: "MIT",
|
|
155765
155781
|
type: "module",
|