poe-code 10.0.2 → 10.0.3
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 +14 -2
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-RSK47E4C.js → chunk-A2XBEN3H.js} +14 -2
- package/packages/safejs/dist/chunks/{chunk-RSK47E4C.js.map → chunk-A2XBEN3H.js.map} +2 -2
- package/packages/safejs/dist/chunks/{chunk-EUCMIR4E.js → chunk-MRH5YDMR.js} +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/run.js +14 -1
- /package/packages/safejs/dist/chunks/{chunk-EUCMIR4E.js.map → chunk-MRH5YDMR.js.map} +0 -0
package/package.json
CHANGED
|
@@ -28308,6 +28308,7 @@ function run(source, options = {}) {
|
|
|
28308
28308
|
const lifecycle = { hostCallbackDepth: 0 };
|
|
28309
28309
|
const dumpController = createDumpController(lifecycle);
|
|
28310
28310
|
const promiseTracker = createSandboxPromiseRejectionTracker();
|
|
28311
|
+
let completedSnapshot;
|
|
28311
28312
|
const execute = async () => {
|
|
28312
28313
|
const promiseReplay = new PromiseReplay(options.snapshot?.promiseReplay);
|
|
28313
28314
|
return promiseReplayContext.run(promiseReplay, async () => {
|
|
@@ -28570,6 +28571,7 @@ function run(source, options = {}) {
|
|
|
28570
28571
|
});
|
|
28571
28572
|
if (replayError !== void 0) snapshot.replayError = replayError;
|
|
28572
28573
|
dumpController.finalize(snapshot);
|
|
28574
|
+
completedSnapshot = snapshot;
|
|
28573
28575
|
return {
|
|
28574
28576
|
...result2,
|
|
28575
28577
|
snapshot
|
|
@@ -28606,7 +28608,17 @@ function run(source, options = {}) {
|
|
|
28606
28608
|
const result = withRunResources(
|
|
28607
28609
|
options.signal,
|
|
28608
28610
|
() => withSandboxPromiseRejectionTracker(promiseTracker, execute)
|
|
28609
|
-
)
|
|
28611
|
+
).catch(async (error) => {
|
|
28612
|
+
if (completedSnapshot !== void 0) {
|
|
28613
|
+
try {
|
|
28614
|
+
await createSnapshotScheduler(options).write(completedSnapshot);
|
|
28615
|
+
} catch (snapshotError) {
|
|
28616
|
+
console.warn("Failed to write failure snapshot.", snapshotError);
|
|
28617
|
+
}
|
|
28618
|
+
}
|
|
28619
|
+
dumpController.fail(error);
|
|
28620
|
+
throw error;
|
|
28621
|
+
});
|
|
28610
28622
|
return attachDumpController(result, dumpController);
|
|
28611
28623
|
}
|
|
28612
28624
|
async function throwIfReturnedPromiseRejected(result) {
|
|
@@ -28815,4 +28827,4 @@ export {
|
|
|
28815
28827
|
FileSnapshotBackend,
|
|
28816
28828
|
run
|
|
28817
28829
|
};
|
|
28818
|
-
//# sourceMappingURL=chunk-
|
|
28830
|
+
//# sourceMappingURL=chunk-A2XBEN3H.js.map
|