@agoric/xsnap 0.14.3-dev-7cc5def.0 → 0.14.3-dev-3ce0599.0
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/package.json +8 -5
- package/src/avaXS.js +1 -0
- package/src/xsnap.js +9 -5
- package/src/xsrepl.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/xsnap",
|
|
3
|
-
"version": "0.14.3-dev-
|
|
3
|
+
"version": "0.14.3-dev-3ce0599.0+3ce0599",
|
|
4
4
|
"description": "Description forthcoming.",
|
|
5
5
|
"author": "Agoric",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"test:xs": "exit 0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@agoric/assert": "0.6.1-dev-
|
|
31
|
-
"@agoric/internal": "0.3.3-dev-
|
|
32
|
-
"@agoric/xsnap-lockdown": "0.14.1-dev-
|
|
30
|
+
"@agoric/assert": "0.6.1-dev-3ce0599.0+3ce0599",
|
|
31
|
+
"@agoric/internal": "0.3.3-dev-3ce0599.0+3ce0599",
|
|
32
|
+
"@agoric/xsnap-lockdown": "0.14.1-dev-3ce0599.0+3ce0599",
|
|
33
33
|
"@endo/bundle-source": "^2.5.2",
|
|
34
34
|
"@endo/eventual-send": "^0.17.3",
|
|
35
35
|
"@endo/init": "^0.5.57",
|
|
@@ -59,8 +59,11 @@
|
|
|
59
59
|
"files": [
|
|
60
60
|
"test/**/test-*.js"
|
|
61
61
|
],
|
|
62
|
+
"require": [
|
|
63
|
+
"@endo/init/debug.js"
|
|
64
|
+
],
|
|
62
65
|
"timeout": "2m",
|
|
63
66
|
"workerThreads": false
|
|
64
67
|
},
|
|
65
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "3ce0599d5173b802598b5bedf57d3c30f016f789"
|
|
66
69
|
}
|
package/src/avaXS.js
CHANGED
package/src/xsnap.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* global process */
|
|
2
|
+
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
2
3
|
/* eslint no-await-in-loop: ["off"] */
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -151,7 +152,7 @@ export async function xsnap(options) {
|
|
|
151
152
|
sourceStream.pipe(destStream, { end: false });
|
|
152
153
|
|
|
153
154
|
done = finished(sourceStream);
|
|
154
|
-
done.catch(noop).then(() => sourceStream.unpipe(destStream));
|
|
155
|
+
void done.catch(noop).then(() => sourceStream.unpipe(destStream));
|
|
155
156
|
};
|
|
156
157
|
|
|
157
158
|
return harden({
|
|
@@ -257,7 +258,7 @@ export async function xsnap(options) {
|
|
|
257
258
|
await loadSnapshotHandler?.afterSpawn(snapshotLoadStream);
|
|
258
259
|
|
|
259
260
|
if (loadSnapshotHandler) {
|
|
260
|
-
vatExit.promise.catch(noop).then(() => {
|
|
261
|
+
void vatExit.promise.catch(noop).then(() => {
|
|
261
262
|
if (loadSnapshotHandler) {
|
|
262
263
|
const { cleanup } = loadSnapshotHandler;
|
|
263
264
|
loadSnapshotHandler = undefined;
|
|
@@ -457,10 +458,13 @@ export async function xsnap(options) {
|
|
|
457
458
|
const handle = await fs.open(snapPath, 'w+');
|
|
458
459
|
// @ts-expect-error 'close' event added in Node 15.4
|
|
459
460
|
handle.on('close', () => {
|
|
460
|
-
|
|
461
|
+
// Safe to ignore the result because we are skipping to to clean up the temp directory.
|
|
462
|
+
void fs.unlink(snapPath);
|
|
461
463
|
});
|
|
462
464
|
sourceStream = handle.createReadStream();
|
|
463
|
-
finished(output)
|
|
465
|
+
finished(output)
|
|
466
|
+
.finally(() => sourceStream.destroy())
|
|
467
|
+
.catch(noop);
|
|
464
468
|
} else {
|
|
465
469
|
sourceStream = snapshotSaveStream;
|
|
466
470
|
snapPath = `@${SNAPSHOT_SAVE_FD}`;
|
|
@@ -469,7 +473,7 @@ export async function xsnap(options) {
|
|
|
469
473
|
// ensuring that any previous save stream usage has ended. However we
|
|
470
474
|
// must start the flow before receiving the command's response or the
|
|
471
475
|
// xsnap process would block on a full pipe, causing an IPC deadlock.
|
|
472
|
-
batonKit.promise.then(maybePipe);
|
|
476
|
+
batonKit.promise.then(maybePipe, noop);
|
|
473
477
|
}
|
|
474
478
|
|
|
475
479
|
const cleanup = () => {
|
package/src/xsrepl.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint @typescript-eslint/no-floating-promises: "warn" */
|
|
1
2
|
/* global process */
|
|
2
3
|
/* We make exceptions for test code. This is a test utility. */
|
|
3
4
|
/* eslint no-await-in-loop: ["off"] */
|
|
@@ -96,4 +97,4 @@ async function main() {
|
|
|
96
97
|
return vat.close();
|
|
97
98
|
}
|
|
98
99
|
|
|
99
|
-
main();
|
|
100
|
+
await main().catch(err => console.log(err));
|