@nuxt/nitro-server-nightly 4.3.2-29531289.6a3bd23e → 4.3.2-29532038.62e1bc91
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
|
@@ -19,7 +19,7 @@ import { isWindows } from "std-env";
|
|
|
19
19
|
import { ImpoundPlugin } from "impound";
|
|
20
20
|
import { resolveModulePath } from "exsolve";
|
|
21
21
|
import { runtimeDependencies } from "nitropack/runtime/meta";
|
|
22
|
-
var version = "4.3.2-
|
|
22
|
+
var version = "4.3.2-29532038.62e1bc91";
|
|
23
23
|
function toArray(value) {
|
|
24
24
|
return Array.isArray(value) ? value : [value];
|
|
25
25
|
}
|
|
@@ -7,7 +7,7 @@ import { appId, multiApp } from "#internal/nuxt.config.mjs";
|
|
|
7
7
|
import { NUXT_JSON_PAYLOADS, NUXT_NO_SSR, NUXT_PAYLOAD_EXTRACTION, NUXT_RUNTIME_PAYLOAD_EXTRACTION } from "#internal/nuxt/nitro-config.mjs";
|
|
8
8
|
export function renderPayloadResponse(ssrContext) {
|
|
9
9
|
return {
|
|
10
|
-
body: NUXT_JSON_PAYLOADS ? stringify(splitPayload(ssrContext).payload, ssrContext["~payloadReducers"]) : `export default ${devalue(splitPayload(ssrContext).payload)}`,
|
|
10
|
+
body: NUXT_JSON_PAYLOADS ? encodeForwardSlashes(stringify(splitPayload(ssrContext).payload, ssrContext["~payloadReducers"])) : `export default ${devalue(splitPayload(ssrContext).payload)}`,
|
|
11
11
|
statusCode: getResponseStatus(ssrContext.event),
|
|
12
12
|
statusMessage: getResponseStatusText(ssrContext.event),
|
|
13
13
|
headers: {
|
|
@@ -17,7 +17,7 @@ export function renderPayloadResponse(ssrContext) {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
export function renderPayloadJsonScript(opts) {
|
|
20
|
-
const contents = opts.data ? stringify(opts.data, opts.ssrContext["~payloadReducers"]) : "";
|
|
20
|
+
const contents = opts.data ? encodeForwardSlashes(stringify(opts.data, opts.ssrContext["~payloadReducers"])) : "";
|
|
21
21
|
const payload = {
|
|
22
22
|
"type": "application/json",
|
|
23
23
|
"innerHTML": contents,
|
|
@@ -33,6 +33,14 @@ export function renderPayloadJsonScript(opts) {
|
|
|
33
33
|
const config = uneval(opts.ssrContext.config);
|
|
34
34
|
return [payload, { innerHTML: multiApp ? `window.__NUXT__=window.__NUXT__||{};window.__NUXT__[${JSON.stringify(appId)}]={config:${config}}` : `window.__NUXT__={};window.__NUXT__.config=${config}` }];
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Encode forward slashes as unicode escape sequences to prevent
|
|
38
|
+
* Google from treating them as internal links and trying to crawl them.
|
|
39
|
+
* @see https://github.com/nuxt/nuxt/issues/24175
|
|
40
|
+
*/
|
|
41
|
+
function encodeForwardSlashes(str) {
|
|
42
|
+
return str.replaceAll("/", "\\u002F");
|
|
43
|
+
}
|
|
36
44
|
export function renderPayloadScript(opts) {
|
|
37
45
|
opts.data.config = opts.ssrContext.config;
|
|
38
46
|
const _PAYLOAD_EXTRACTION = !opts.ssrContext.noSSR && (import.meta.prerender && NUXT_PAYLOAD_EXTRACTION || NUXT_RUNTIME_PAYLOAD_EXTRACTION && (opts.routeOptions.isr || opts.routeOptions.cache));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/nitro-server-nightly",
|
|
3
|
-
"version": "4.3.2-
|
|
3
|
+
"version": "4.3.2-29532038.62e1bc91",
|
|
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.2-
|
|
22
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.2-29532038.62e1bc91",
|
|
23
23
|
"@unhead/vue": "^2.1.4",
|
|
24
24
|
"@vue/shared": "^3.5.28",
|
|
25
25
|
"consola": "^3.4.2",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"vue-devtools-stub": "^0.1.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"nuxt": "npm:nuxt-nightly@4.3.2-
|
|
50
|
+
"nuxt": "npm:nuxt-nightly@4.3.2-29532038.62e1bc91"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.2-
|
|
54
|
-
"nuxt": "npm:nuxt-nightly@4.3.2-
|
|
53
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.2-29532038.62e1bc91",
|
|
54
|
+
"nuxt": "npm:nuxt-nightly@4.3.2-29532038.62e1bc91",
|
|
55
55
|
"obuild": "0.4.31",
|
|
56
56
|
"vitest": "4.0.18"
|
|
57
57
|
},
|