neex 0.6.94 → 0.6.96
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.
|
@@ -59,9 +59,13 @@ function addDevCommands(program) {
|
|
|
59
59
|
nodeArgs: options.nodeArgs ? options.nodeArgs.split(',').map((arg) => arg.trim()) : []
|
|
60
60
|
});
|
|
61
61
|
// --- Signal Handlers for Dev ---
|
|
62
|
+
let isShuttingDown = false;
|
|
62
63
|
const cleanupAndExit = () => {
|
|
64
|
+
if (isShuttingDown)
|
|
65
|
+
return;
|
|
66
|
+
isShuttingDown = true;
|
|
63
67
|
if (devManager) {
|
|
64
|
-
|
|
68
|
+
// The main shutdown message is now in devManager.stop()
|
|
65
69
|
devManager.stop().then(() => process.exit(0));
|
|
66
70
|
}
|
|
67
71
|
else {
|
package/dist/src/dev-manager.js
CHANGED
|
@@ -47,6 +47,7 @@ class DevManager {
|
|
|
47
47
|
this.startTime = null;
|
|
48
48
|
this.moduleCache = new Map();
|
|
49
49
|
this.currentTempFile = null;
|
|
50
|
+
this.isShuttingDown = false;
|
|
50
51
|
this.options = options;
|
|
51
52
|
this.tempDir = path_1.default.join(process.cwd(), '.neex-temp');
|
|
52
53
|
this.debouncedRestart = (0, lodash_1.debounce)(this.restart.bind(this), Math.max(options.delay, 100));
|
|
@@ -426,8 +427,11 @@ class DevManager {
|
|
|
426
427
|
}
|
|
427
428
|
}
|
|
428
429
|
async stop() {
|
|
430
|
+
if (this.isShuttingDown)
|
|
431
|
+
return;
|
|
432
|
+
this.isShuttingDown = true;
|
|
429
433
|
if (!this.options.quiet) {
|
|
430
|
-
logger_manager_js_1.loggerManager.printLine(
|
|
434
|
+
logger_manager_js_1.loggerManager.printLine(`\n${chalk_1.default.yellow('⏹')} Shutting down...`, 'info');
|
|
431
435
|
}
|
|
432
436
|
if (this.watcher) {
|
|
433
437
|
await this.watcher.close();
|