@nuxt/nitro-server-nightly 5.0.0-29656394.48b15c25 → 5.0.0-29656656.bb4e7ef7
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/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import { ImpoundPlugin } from "impound";
|
|
|
18
18
|
import { resolveModulePath } from "exsolve";
|
|
19
19
|
import { runtimeDependencies } from "nitro/meta";
|
|
20
20
|
import { resolveModuleExportNames } from "mlly";
|
|
21
|
-
var version = "5.0.0-
|
|
21
|
+
var version = "5.0.0-29656656.bb4e7ef7";
|
|
22
22
|
function toArray(value) {
|
|
23
23
|
return Array.isArray(value) ? value : [value];
|
|
24
24
|
}
|
|
@@ -220,7 +220,7 @@ async function renderRoute(event, ssrError) {
|
|
|
220
220
|
|
|
221
221
|
ssrContext.head.push({ script: _PAYLOAD_INLINE ? renderPayloadJsonScript({
|
|
222
222
|
ssrContext,
|
|
223
|
-
data: ssrContext.payload
|
|
223
|
+
data: stripInlineOnlyPayloadFields(ssrContext.payload)
|
|
224
224
|
}) : renderPayloadJsonScript({
|
|
225
225
|
ssrContext,
|
|
226
226
|
data: splitPayload(ssrContext).initial,
|
|
@@ -284,6 +284,13 @@ function joinAttrs(chunks) {
|
|
|
284
284
|
function renderHTMLDocument(html) {
|
|
285
285
|
return "<!DOCTYPE html>" + `<html${joinAttrs(html.htmlAttrs)}>` + `<head>${joinTags(html.head)}</head>` + `<body${joinAttrs(html.bodyAttrs)}>${joinTags(html.bodyPrepend)}${joinTags(html.body)}${joinTags(html.bodyAppend)}</body>` + "</html>";
|
|
286
286
|
}
|
|
287
|
+
function stripInlineOnlyPayloadFields(payload) {
|
|
288
|
+
if (!payload.prefetchLinks) {
|
|
289
|
+
return payload;
|
|
290
|
+
}
|
|
291
|
+
const { prefetchLinks: _, ...rest } = payload;
|
|
292
|
+
return rest;
|
|
293
|
+
}
|
|
287
294
|
function returnResponse(event, response) {
|
|
288
295
|
for (const header in response.headers || {}) {
|
|
289
296
|
event.res.headers.set(header, response.headers[header]);
|
|
@@ -8,10 +8,11 @@ export declare function renderPayloadJsonScript(opts: {
|
|
|
8
8
|
src?: string;
|
|
9
9
|
}): Script[];
|
|
10
10
|
interface SplitPayload {
|
|
11
|
-
initial: Omit<NuxtPayload, "data">;
|
|
11
|
+
initial: Omit<NuxtPayload, "data" | "prefetchLinks">;
|
|
12
12
|
payload: {
|
|
13
13
|
data?: NuxtPayload["data"];
|
|
14
14
|
prerenderedAt?: NuxtPayload["prerenderedAt"];
|
|
15
|
+
prefetchLinks?: NuxtPayload["prefetchLinks"];
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
18
|
export declare function splitPayload(ssrContext: NuxtSSRContext): SplitPayload;
|
|
@@ -36,15 +36,19 @@ function encodeForwardSlashes(str) {
|
|
|
36
36
|
return str.replaceAll("/", "\\u002F");
|
|
37
37
|
}
|
|
38
38
|
export function splitPayload(ssrContext) {
|
|
39
|
-
const { data, prerenderedAt, ...initial } = ssrContext.payload;
|
|
39
|
+
const { data, prerenderedAt, prefetchLinks, ...initial } = ssrContext.payload;
|
|
40
|
+
const payload = {
|
|
41
|
+
data,
|
|
42
|
+
prerenderedAt
|
|
43
|
+
};
|
|
44
|
+
if (prefetchLinks?.length) {
|
|
45
|
+
payload.prefetchLinks = prefetchLinks;
|
|
46
|
+
}
|
|
40
47
|
return {
|
|
41
48
|
initial: {
|
|
42
49
|
...initial,
|
|
43
50
|
prerenderedAt
|
|
44
51
|
},
|
|
45
|
-
payload
|
|
46
|
-
data,
|
|
47
|
-
prerenderedAt
|
|
48
|
-
}
|
|
52
|
+
payload
|
|
49
53
|
};
|
|
50
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/nitro-server-nightly",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-29656656.bb4e7ef7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@5.0.0-
|
|
29
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@5.0.0-29656656.bb4e7ef7",
|
|
30
30
|
"@unhead/vue": "^3.1.0",
|
|
31
31
|
"@vue/shared": "3.5.34",
|
|
32
32
|
"consola": "^3.4.2",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@babel/plugin-proposal-decorators": "^7.25.0",
|
|
58
58
|
"@babel/plugin-syntax-typescript": "^7.25.0",
|
|
59
59
|
"@rollup/plugin-babel": "^6.0.0 || ^7.0.0",
|
|
60
|
-
"nuxt": "npm:nuxt-nightly@5.0.0-
|
|
60
|
+
"nuxt": "npm:nuxt-nightly@5.0.0-29656656.bb4e7ef7"
|
|
61
61
|
},
|
|
62
62
|
"peerDependenciesMeta": {
|
|
63
63
|
"@babel/plugin-proposal-decorators": {
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "7.29.0",
|
|
75
75
|
"@babel/plugin-syntax-typescript": "7.28.6",
|
|
76
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-
|
|
76
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29656656.bb4e7ef7",
|
|
77
77
|
"@rollup/plugin-babel": "7.0.0",
|
|
78
78
|
"hookable": "6.1.1",
|
|
79
|
-
"nuxt": "npm:nuxt-nightly@5.0.0-
|
|
79
|
+
"nuxt": "npm:nuxt-nightly@5.0.0-29656656.bb4e7ef7",
|
|
80
80
|
"obuild": "0.4.35",
|
|
81
81
|
"vitest": "4.1.6"
|
|
82
82
|
},
|