nitropack-nightly 2.13.0-20260107-191535-f0969025 → 2.13.0-20260108-221133-a3ce370f
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/meta/index.mjs
CHANGED
|
@@ -47,6 +47,7 @@ export class $DurableObject extends DurableObject {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
fetch(request) {
|
|
50
|
+
globalThis.__env__ = this.env;
|
|
50
51
|
if (import.meta._websocket && request.headers.get("upgrade") === "websocket") {
|
|
51
52
|
return ws.handleDurableUpgrade(this, request);
|
|
52
53
|
}
|
|
@@ -67,11 +68,13 @@ export class $DurableObject extends DurableObject {
|
|
|
67
68
|
);
|
|
68
69
|
}
|
|
69
70
|
async webSocketMessage(client, message) {
|
|
71
|
+
globalThis.__env__ = this.env;
|
|
70
72
|
if (import.meta._websocket) {
|
|
71
73
|
return ws.handleDurableMessage(this, client, message);
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
async webSocketClose(client, code, reason, wasClean) {
|
|
77
|
+
globalThis.__env__ = this.env;
|
|
75
78
|
if (import.meta._websocket) {
|
|
76
79
|
return ws.handleDurableClose(this, client, code, reason, wasClean);
|
|
77
80
|
}
|
|
@@ -271,11 +271,14 @@ function getObservabilityRoutes(nitro) {
|
|
|
271
271
|
staticRoutes.push(route);
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
+
const prerendered = nitro._prerenderedRoutes || [];
|
|
274
275
|
return [
|
|
275
276
|
...normalizeRoutes(staticRoutes),
|
|
276
277
|
...normalizeRoutes(dynamicRoutes),
|
|
277
278
|
...normalizeRoutes(catchAllRoutes)
|
|
278
|
-
]
|
|
279
|
+
].filter((route) => {
|
|
280
|
+
return !prerendered.some((r) => route.src === r.route);
|
|
281
|
+
});
|
|
279
282
|
}
|
|
280
283
|
function normalizeRoutes(routes) {
|
|
281
284
|
return routes.sort(
|
package/package.json
CHANGED