@joystick.js/cli-canary 0.0.0-canary.83 → 0.0.0-canary.85
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/lib/dev/cleanup.js
CHANGED
package/dist/lib/dev/index.js
CHANGED
|
@@ -50,7 +50,7 @@ const handleSignalEvents = (processIds = [], nodeMajorVersion = 0, __dirname = "
|
|
|
50
50
|
execArgv.push("--experimental-specifier-resolution=node");
|
|
51
51
|
}
|
|
52
52
|
const cleanupProcess = child_process.fork(
|
|
53
|
-
path.resolve(`${__dirname}/cleanup
|
|
53
|
+
path.resolve(`${__dirname}/cleanup.js`),
|
|
54
54
|
[],
|
|
55
55
|
{
|
|
56
56
|
// NOTE: Run in detached mode so when parent process dies, the child still runs
|
|
@@ -62,16 +62,15 @@ const handleSignalEvents = (processIds = [], nodeMajorVersion = 0, __dirname = "
|
|
|
62
62
|
silent: true
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
|
-
cleanupProcess.on("message", (message) => {
|
|
66
|
-
console.log("SOMETHING", message);
|
|
67
|
-
});
|
|
68
65
|
process.on("SIGINT", async () => {
|
|
69
66
|
const databaseProcessIds = getDatabaseProcessIds();
|
|
67
|
+
console.log("SIGINT", [...processIds, ...databaseProcessIds]);
|
|
70
68
|
cleanupProcess.send(JSON.stringify({ processIds: [...processIds, ...databaseProcessIds] }));
|
|
71
69
|
process.exit();
|
|
72
70
|
});
|
|
73
71
|
process.on("SIGTERM", async () => {
|
|
74
72
|
const databaseProcessIds = getDatabaseProcessIds();
|
|
73
|
+
console.log("SIGTERM", [...processIds, ...databaseProcessIds]);
|
|
75
74
|
cleanupProcess.send(JSON.stringify({ processIds: [...processIds, ...databaseProcessIds] }));
|
|
76
75
|
process.exit();
|
|
77
76
|
});
|
package/package.json
CHANGED
package/src/lib/dev/cleanup.js
CHANGED
package/src/lib/dev/index.js
CHANGED
|
@@ -62,7 +62,7 @@ const handleSignalEvents = (processIds = [], nodeMajorVersion = 0, __dirname = '
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
const cleanupProcess = child_process.fork(
|
|
65
|
-
path.resolve(`${__dirname}/cleanup
|
|
65
|
+
path.resolve(`${__dirname}/cleanup.js`),
|
|
66
66
|
[],
|
|
67
67
|
{
|
|
68
68
|
// NOTE: Run in detached mode so when parent process dies, the child still runs
|
|
@@ -75,18 +75,16 @@ const handleSignalEvents = (processIds = [], nodeMajorVersion = 0, __dirname = '
|
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
77
|
|
|
78
|
-
cleanupProcess.on('message', (message) => {
|
|
79
|
-
console.log('SOMETHING', message);
|
|
80
|
-
});
|
|
81
|
-
|
|
82
78
|
process.on("SIGINT", async () => {
|
|
83
79
|
const databaseProcessIds = getDatabaseProcessIds();
|
|
80
|
+
console.log('SIGINT', [...processIds, ...databaseProcessIds]);
|
|
84
81
|
cleanupProcess.send(JSON.stringify(({ processIds: [...processIds, ...databaseProcessIds] })));
|
|
85
82
|
process.exit();
|
|
86
83
|
});
|
|
87
84
|
|
|
88
85
|
process.on("SIGTERM", async () => {
|
|
89
86
|
const databaseProcessIds = getDatabaseProcessIds();
|
|
87
|
+
console.log('SIGTERM', [...processIds, ...databaseProcessIds]);
|
|
90
88
|
cleanupProcess.send(JSON.stringify(({ processIds: [...processIds, ...databaseProcessIds] })));
|
|
91
89
|
process.exit();
|
|
92
90
|
});
|