@nuxt/nitro-server-nightly 4.3.0-29431658.1c44667d → 4.3.0-29432778.80a2c2f7
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
|
@@ -17,7 +17,7 @@ import { isWindows } from 'std-env';
|
|
|
17
17
|
import { ImpoundPlugin } from 'impound';
|
|
18
18
|
import { resolveModulePath } from 'exsolve';
|
|
19
19
|
|
|
20
|
-
const version = "4.3.0-
|
|
20
|
+
const version = "4.3.0-29432778.80a2c2f7";
|
|
21
21
|
const nitroBuilder = {
|
|
22
22
|
version: version};
|
|
23
23
|
|
|
@@ -84,17 +84,17 @@ export default defineRenderHandler(async (event) => {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
const _rendered = await renderer.renderToString(ssrContext).catch(async (error) => {
|
|
87
|
-
if (ssrContext._renderResponse && error.message === "skipping render") {
|
|
87
|
+
if ((ssrContext["~renderResponse"] || ssrContext._renderResponse) && error.message === "skipping render") {
|
|
88
88
|
return {};
|
|
89
89
|
}
|
|
90
90
|
const _err = !ssrError && ssrContext.payload?.error || error;
|
|
91
91
|
await ssrContext.nuxt?.hooks.callHook("app:error", _err);
|
|
92
92
|
throw _err;
|
|
93
93
|
});
|
|
94
|
-
const inlinedStyles = process.env.NUXT_INLINE_STYLES && !ssrContext._renderResponse && !isRenderingPayload ? await renderInlineStyles(ssrContext.modules ?? []) : [];
|
|
94
|
+
const inlinedStyles = process.env.NUXT_INLINE_STYLES && !ssrContext["~renderResponse"] && !ssrContext._renderResponse && !isRenderingPayload ? await renderInlineStyles(ssrContext.modules ?? []) : [];
|
|
95
95
|
await ssrContext.nuxt?.hooks.callHook("app:rendered", { ssrContext, renderResult: _rendered });
|
|
96
|
-
if (ssrContext._renderResponse) {
|
|
97
|
-
return ssrContext._renderResponse;
|
|
96
|
+
if (ssrContext["~renderResponse"] || ssrContext._renderResponse) {
|
|
97
|
+
return ssrContext["~renderResponse"] || ssrContext._renderResponse;
|
|
98
98
|
}
|
|
99
99
|
if (ssrContext.payload?.error && !ssrError) {
|
|
100
100
|
throw ssrContext.payload.error;
|
|
@@ -141,7 +141,7 @@ export default defineRenderHandler(async (event) => {
|
|
|
141
141
|
]
|
|
142
142
|
}, headEntryOptions);
|
|
143
143
|
}
|
|
144
|
-
if (isAppManifestEnabled && ssrContext
|
|
144
|
+
if (isAppManifestEnabled && ssrContext["~preloadManifest"] && !NO_SCRIPTS) {
|
|
145
145
|
ssrContext.head.push({
|
|
146
146
|
link: [
|
|
147
147
|
{ rel: "preload", as: "fetch", fetchpriority: "low", crossorigin: "anonymous", href: buildAssetsURL(`builds/meta/${ssrContext.runtimeConfig.app.buildId}.json`) }
|
|
@@ -63,7 +63,7 @@ export default (nitroApp) => {
|
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
try {
|
|
66
|
-
const reducers = Object.assign(/* @__PURE__ */ Object.create(null), devReducers, ctx.event.context
|
|
66
|
+
const reducers = Object.assign(/* @__PURE__ */ Object.create(null), devReducers, ctx.event.context["~payloadReducers"]);
|
|
67
67
|
htmlContext.bodyAppend.unshift(`<script type="application/json" data-nuxt-logs="${appId}">${stringify(ctx.logs, reducers)}<\/script>`);
|
|
68
68
|
} catch (e) {
|
|
69
69
|
const shortError = e instanceof Error && "toString" in e ? ` Received \`${e.toString()}\`.` : "";
|
|
@@ -15,12 +15,12 @@ export function createSSRContext(event) {
|
|
|
15
15
|
nuxt: void 0,
|
|
16
16
|
/* NuxtApp */
|
|
17
17
|
payload: {},
|
|
18
|
-
|
|
18
|
+
["~payloadReducers"]: /* @__PURE__ */ Object.create(null),
|
|
19
19
|
modules: /* @__PURE__ */ new Set()
|
|
20
20
|
};
|
|
21
21
|
if (import.meta.prerender) {
|
|
22
22
|
if (process.env.NUXT_SHARED_DATA) {
|
|
23
|
-
ssrContext
|
|
23
|
+
ssrContext["~sharedPrerenderCache"] = sharedPrerenderCache;
|
|
24
24
|
}
|
|
25
25
|
ssrContext.payload.prerenderedAt = Date.now();
|
|
26
26
|
}
|
|
@@ -5,7 +5,7 @@ import { stringify, uneval } from "devalue";
|
|
|
5
5
|
import { appId, multiApp } from "#internal/nuxt.config.mjs";
|
|
6
6
|
export function renderPayloadResponse(ssrContext) {
|
|
7
7
|
return {
|
|
8
|
-
body: process.env.NUXT_JSON_PAYLOADS ? stringify(splitPayload(ssrContext).payload, ssrContext
|
|
8
|
+
body: process.env.NUXT_JSON_PAYLOADS ? stringify(splitPayload(ssrContext).payload, ssrContext["~payloadReducers"]) : `export default ${devalue(splitPayload(ssrContext).payload)}`,
|
|
9
9
|
statusCode: getResponseStatus(ssrContext.event),
|
|
10
10
|
statusMessage: getResponseStatusText(ssrContext.event),
|
|
11
11
|
headers: {
|
|
@@ -15,7 +15,7 @@ export function renderPayloadResponse(ssrContext) {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
export function renderPayloadJsonScript(opts) {
|
|
18
|
-
const contents = opts.data ? stringify(opts.data, opts.ssrContext
|
|
18
|
+
const contents = opts.data ? stringify(opts.data, opts.ssrContext["~payloadReducers"]) : "";
|
|
19
19
|
const payload = {
|
|
20
20
|
"type": "application/json",
|
|
21
21
|
"innerHTML": contents,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/nitro-server-nightly",
|
|
3
|
-
"version": "4.3.0-
|
|
3
|
+
"version": "4.3.0-29432778.80a2c2f7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@nuxt/devalue": "^2.0.2",
|
|
22
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-
|
|
22
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-29432778.80a2c2f7",
|
|
23
23
|
"@unhead/vue": "^2.0.19",
|
|
24
24
|
"@vue/shared": "^3.5.25",
|
|
25
25
|
"consola": "^3.4.2",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"vue-devtools-stub": "^0.1.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"nuxt": "npm:nuxt-nightly@4.3.0-
|
|
49
|
+
"nuxt": "npm:nuxt-nightly@4.3.0-29432778.80a2c2f7"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-
|
|
53
|
-
"nuxt": "npm:nuxt-nightly@4.3.0-
|
|
52
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-29432778.80a2c2f7",
|
|
53
|
+
"nuxt": "npm:nuxt-nightly@4.3.0-29432778.80a2c2f7",
|
|
54
54
|
"unbuild": "3.6.1",
|
|
55
55
|
"vitest": "3.2.4"
|
|
56
56
|
},
|