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.
Files changed (2) hide show
  1. package/dist/serve.js +7 -0
  2. 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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bun-plugin-stx",
3
3
  "type": "module",
4
- "version": "0.2.81",
4
+ "version": "0.2.83",
5
5
  "description": "A Bun plugin that allows for using Laravel Blade-like syntax.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",