create-flow-os 0.0.1-dev.1771782787 → 0.0.1-dev.1771783145
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/bin/index.js
CHANGED
|
@@ -960,7 +960,19 @@ async function runDev(cwd) {
|
|
|
960
960
|
cwd,
|
|
961
961
|
stdio: ["inherit", "inherit", "inherit"]
|
|
962
962
|
});
|
|
963
|
-
|
|
963
|
+
const killChild = () => {
|
|
964
|
+
try {
|
|
965
|
+
devProc.kill();
|
|
966
|
+
} catch {}
|
|
967
|
+
process.exit(130);
|
|
968
|
+
};
|
|
969
|
+
process.on("SIGINT", killChild);
|
|
970
|
+
process.on("SIGTERM", killChild);
|
|
971
|
+
const code = await devProc.exited;
|
|
972
|
+
process.off("SIGINT", killChild);
|
|
973
|
+
process.off("SIGTERM", killChild);
|
|
974
|
+
if (code !== 0 && code !== null)
|
|
975
|
+
process.exit(code);
|
|
964
976
|
}
|
|
965
977
|
var PROFILE_LABELS = {
|
|
966
978
|
full: "Full stack (client + server)",
|
package/package.json
CHANGED
|
@@ -39,4 +39,11 @@ const getConfig = mod.default;
|
|
|
39
39
|
const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
|
|
40
40
|
const server = await createServer(config);
|
|
41
41
|
await server.listen();
|
|
42
|
+
|
|
43
|
+
const shutdown = () => {
|
|
44
|
+
server.close().then(() => process.exit(0)).catch(() => process.exit(1));
|
|
45
|
+
};
|
|
46
|
+
process.on('SIGINT', shutdown);
|
|
47
|
+
process.on('SIGTERM', shutdown);
|
|
48
|
+
|
|
42
49
|
server.watcher.on('change', () => {});
|
|
@@ -39,4 +39,11 @@ const getConfig = mod.default;
|
|
|
39
39
|
const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
|
|
40
40
|
const server = await createServer(config);
|
|
41
41
|
await server.listen();
|
|
42
|
+
|
|
43
|
+
const shutdown = () => {
|
|
44
|
+
server.close().then(() => process.exit(0)).catch(() => process.exit(1));
|
|
45
|
+
};
|
|
46
|
+
process.on('SIGINT', shutdown);
|
|
47
|
+
process.on('SIGTERM', shutdown);
|
|
48
|
+
|
|
42
49
|
server.watcher.on('change', () => {});
|