bun-plugin-stx 0.2.81 → 0.2.83
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/serve.js +7 -0
- package/package.json +1 -1
package/dist/serve.js
CHANGED
|
@@ -10299,6 +10299,13 @@ ${pageSetupScripts.join(`
|
|
|
10299
10299
|
if (actualPort !== port && !options.quiet) {
|
|
10300
10300
|
console.warn(`\x1B[33m[stx]\x1B[0m port ${port} in use \u2014 using \x1B[1m${actualPort}\x1B[0m instead`);
|
|
10301
10301
|
}
|
|
10302
|
+
if (options.reusePort) {
|
|
10303
|
+
const graceMs = Number(process19.env.SHUTDOWN_GRACE_MS) || 15000;
|
|
10304
|
+
process19.once("SIGTERM", () => {
|
|
10305
|
+
setTimeout(() => process19.exit(0), graceMs).unref();
|
|
10306
|
+
Promise.resolve(_server?.stop()).then(() => process19.exit(0));
|
|
10307
|
+
});
|
|
10308
|
+
}
|
|
10302
10309
|
if (!options.quiet) {
|
|
10303
10310
|
const elapsed = (performance.now() - startTime).toFixed(0);
|
|
10304
10311
|
const routeCount = sourceFiles?.length || 0;
|
package/package.json
CHANGED