nitropack-nightly 2.11.2-20250305-141326.058819aa → 2.11.2-20250305-183631.5b5e10e7
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/core/index.mjs
CHANGED
|
@@ -2247,6 +2247,7 @@ function createHTTPProxy(defaults = {}) {
|
|
|
2247
2247
|
});
|
|
2248
2248
|
const handleEvent = async (event, opts = {}) => {
|
|
2249
2249
|
try {
|
|
2250
|
+
event._handled = true;
|
|
2250
2251
|
await proxy.web(event.node.req, event.node.res, opts);
|
|
2251
2252
|
} catch (error) {
|
|
2252
2253
|
if (error?.code !== "ECONNRESET") {
|
|
@@ -2287,7 +2288,6 @@ class NodeDevWorker {
|
|
|
2287
2288
|
statusText: "Dev worker is unavailable"
|
|
2288
2289
|
});
|
|
2289
2290
|
}
|
|
2290
|
-
event._handled = true;
|
|
2291
2291
|
await this.#proxy.handleEvent(event, { target: this.#address });
|
|
2292
2292
|
}
|
|
2293
2293
|
handleUpgrade(req, socket, head) {
|
|
@@ -2360,7 +2360,7 @@ class NodeDevWorker {
|
|
|
2360
2360
|
return;
|
|
2361
2361
|
}
|
|
2362
2362
|
this.#worker.postMessage({ event: "shutdown" });
|
|
2363
|
-
if (!this.#worker._exitCode) {
|
|
2363
|
+
if (!this.#worker._exitCode && !isTest && !isCI) {
|
|
2364
2364
|
await new Promise((resolve) => {
|
|
2365
2365
|
const gracefulShutdownTimeoutSec = Number.parseInt(process.env.NITRO_SHUTDOWN_TIMEOUT || "", 10) || 5;
|
|
2366
2366
|
const timeout = setTimeout(() => {
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/meta/index.mjs
CHANGED
|
@@ -79,8 +79,12 @@ nitroApp.router.use(
|
|
|
79
79
|
})
|
|
80
80
|
);
|
|
81
81
|
trapUnhandledNodeErrors();
|
|
82
|
-
async function onShutdown(
|
|
83
|
-
|
|
82
|
+
async function onShutdown() {
|
|
83
|
+
server.closeAllConnections?.();
|
|
84
|
+
await Promise.all([
|
|
85
|
+
new Promise((resolve) => listener.close(resolve)),
|
|
86
|
+
nitroApp.hooks.callHook("close").catch(console.error)
|
|
87
|
+
]);
|
|
84
88
|
}
|
|
85
89
|
parentPort?.on("message", async (msg) => {
|
|
86
90
|
if (msg && msg.event === "shutdown") {
|
package/package.json
CHANGED