nitropack-nightly 2.11.7-20250318-123444.96e0b73b → 2.11.7-20250318-150500.ae6b683b
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 +12 -7
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/meta/index.mjs +1 -1
- package/package.json +1 -1
package/dist/core/index.mjs
CHANGED
|
@@ -2248,9 +2248,15 @@ function createHTTPProxy(defaults = {}) {
|
|
|
2248
2248
|
event._handled = true;
|
|
2249
2249
|
await proxy.web(event.node.req, event.node.res, opts);
|
|
2250
2250
|
} catch (error) {
|
|
2251
|
-
|
|
2252
|
-
|
|
2251
|
+
try {
|
|
2252
|
+
event.node.res.setHeader("refresh", "3");
|
|
2253
|
+
} catch {
|
|
2253
2254
|
}
|
|
2255
|
+
throw createError({
|
|
2256
|
+
statusCode: 503,
|
|
2257
|
+
message: "Dev server is unavailable.",
|
|
2258
|
+
cause: error
|
|
2259
|
+
});
|
|
2254
2260
|
}
|
|
2255
2261
|
};
|
|
2256
2262
|
return {
|
|
@@ -2333,11 +2339,10 @@ class NodeDevWorker {
|
|
|
2333
2339
|
this.closed = true;
|
|
2334
2340
|
this.#hooks.onClose?.(this, cause);
|
|
2335
2341
|
this.#hooks = {};
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
);
|
|
2342
|
+
const onError = (error) => consola.error(error);
|
|
2343
|
+
await this.#closeWorker().catch(onError);
|
|
2344
|
+
await this.#closeProxy().catch(onError);
|
|
2345
|
+
await this.#closeSocket().catch(onError);
|
|
2341
2346
|
}
|
|
2342
2347
|
async #closeProxy() {
|
|
2343
2348
|
this.#proxy?.proxy?.close(() => {
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/meta/index.mjs
CHANGED
package/package.json
CHANGED