@aravindc26/velu 0.12.1 → 0.12.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/package.json +1 -1
- package/src/cli.ts +8 -2
- package/src/preview-engine/next.config.mjs +1 -1
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -526,11 +526,17 @@ async function previewServer(port: number) {
|
|
|
526
526
|
},
|
|
527
527
|
});
|
|
528
528
|
|
|
529
|
-
child.on("exit", (code) => process.exit(code ?? 0));
|
|
530
|
-
|
|
531
529
|
const cleanup = () => child.kill("SIGTERM");
|
|
532
530
|
process.on("SIGINT", cleanup);
|
|
533
531
|
process.on("SIGTERM", cleanup);
|
|
532
|
+
|
|
533
|
+
// Wait for the child to exit — prevents the caller from reaching process.exit(0)
|
|
534
|
+
await new Promise<void>((res) => {
|
|
535
|
+
child.on("exit", (code) => {
|
|
536
|
+
process.exitCode = code ?? 0;
|
|
537
|
+
res();
|
|
538
|
+
});
|
|
539
|
+
});
|
|
534
540
|
}
|
|
535
541
|
|
|
536
542
|
// ── run ──────────────────────────────────────────────────────────────────────────
|