nuxt-nightly 4.3.0-29432006.8d3c5b37 → 4.3.0-29432784.68badc0b
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/app/composables/asyncData.js +3 -3
- package/dist/app/composables/manifest.js +2 -2
- package/dist/app/composables/payload.js +1 -1
- package/dist/app/composables/router.js +1 -1
- package/dist/app/entry.js +1 -1
- package/dist/app/nuxt.d.ts +4 -4
- package/dist/app/plugins/dev-server-logs.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
|
@@ -303,13 +303,13 @@ function pick(obj, keys) {
|
|
|
303
303
|
function createAsyncData(nuxtApp, key, _handler, options, initialCachedData) {
|
|
304
304
|
nuxtApp.payload._errors[key] ??= void 0;
|
|
305
305
|
const hasCustomGetCachedData = options.getCachedData !== getDefaultCachedData;
|
|
306
|
-
const handler = import.meta.client || !import.meta.prerender || !nuxtApp.ssrContext?.
|
|
307
|
-
const value = nuxtApp2.ssrContext.
|
|
306
|
+
const handler = import.meta.client || !import.meta.prerender || !nuxtApp.ssrContext?.["~sharedPrerenderCache"] ? _handler : (nuxtApp2, options2) => {
|
|
307
|
+
const value = nuxtApp2.ssrContext["~sharedPrerenderCache"].get(key);
|
|
308
308
|
if (value) {
|
|
309
309
|
return value;
|
|
310
310
|
}
|
|
311
311
|
const promise = Promise.resolve().then(() => nuxtApp2.runWithContext(() => _handler(nuxtApp2, options2)));
|
|
312
|
-
nuxtApp2.ssrContext.
|
|
312
|
+
nuxtApp2.ssrContext["~sharedPrerenderCache"].set(key, promise);
|
|
313
313
|
return promise;
|
|
314
314
|
};
|
|
315
315
|
const _ref = options.deep ? ref : shallowRef;
|
|
@@ -32,14 +32,14 @@ export function getAppManifest() {
|
|
|
32
32
|
throw new Error("[nuxt] app manifest should be enabled with `experimental.appManifest`");
|
|
33
33
|
}
|
|
34
34
|
if (import.meta.server) {
|
|
35
|
-
useNuxtApp().ssrContext
|
|
35
|
+
useNuxtApp().ssrContext["~preloadManifest"] = true;
|
|
36
36
|
}
|
|
37
37
|
return manifest || fetchManifest();
|
|
38
38
|
}
|
|
39
39
|
export async function getRouteRules(arg) {
|
|
40
40
|
const path = typeof arg === "string" ? arg : arg.path;
|
|
41
41
|
if (import.meta.server) {
|
|
42
|
-
useNuxtApp().ssrContext
|
|
42
|
+
useNuxtApp().ssrContext["~preloadManifest"] = true;
|
|
43
43
|
const _routeRulesMatcher = toRouteMatcher(
|
|
44
44
|
createRadixRouter({ routes: useRuntimeConfig().nitro.routeRules })
|
|
45
45
|
);
|
|
@@ -124,7 +124,7 @@ export async function parsePayload(payload) {
|
|
|
124
124
|
}
|
|
125
125
|
export function definePayloadReducer(name, reduce) {
|
|
126
126
|
if (import.meta.server) {
|
|
127
|
-
useNuxtApp().ssrContext
|
|
127
|
+
useNuxtApp().ssrContext["~payloadReducers"][name] = reduce;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
export function definePayloadReviver(name, revive) {
|
|
@@ -112,7 +112,7 @@ export const navigateTo = (to, options) => {
|
|
|
112
112
|
await nuxtApp.callHook("app:redirected");
|
|
113
113
|
const encodedLoc = location2.replace(URL_QUOTE_RE, "%22");
|
|
114
114
|
const encodedHeader = encodeURL(location2, isExternalHost);
|
|
115
|
-
nuxtApp.ssrContext
|
|
115
|
+
nuxtApp.ssrContext["~renderResponse"] = {
|
|
116
116
|
statusCode: sanitizeStatusCode(options?.redirectCode || 302, 302),
|
|
117
117
|
body: `<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${encodedLoc}"></head></html>`,
|
|
118
118
|
headers: { location: encodedHeader }
|
package/dist/app/entry.js
CHANGED
|
@@ -19,7 +19,7 @@ if (import.meta.server) {
|
|
|
19
19
|
await nuxt.hooks.callHook("app:error", error);
|
|
20
20
|
nuxt.payload.error ||= createError(error);
|
|
21
21
|
}
|
|
22
|
-
if (ssrContext
|
|
22
|
+
if (ssrContext && (ssrContext["~renderResponse"] || ssrContext._renderResponse)) {
|
|
23
23
|
throw new Error("skipping render");
|
|
24
24
|
}
|
|
25
25
|
return vueApp;
|
package/dist/app/nuxt.d.ts
CHANGED
|
@@ -64,16 +64,16 @@ export interface NuxtSSRContext extends SSRContext {
|
|
|
64
64
|
teleports?: Record<string, string>;
|
|
65
65
|
islandContext?: NuxtIslandContext;
|
|
66
66
|
/** @internal */
|
|
67
|
-
|
|
67
|
+
['~renderResponse']?: Partial<RenderResponse>;
|
|
68
68
|
/** @internal */
|
|
69
|
-
|
|
69
|
+
['~payloadReducers']: Record<string, (data: any) => any>;
|
|
70
70
|
/** @internal */
|
|
71
|
-
|
|
71
|
+
['~sharedPrerenderCache']?: {
|
|
72
72
|
get<T = unknown>(key: string): Promise<T> | undefined;
|
|
73
73
|
set<T>(key: string, value: Promise<T>): Promise<void>;
|
|
74
74
|
};
|
|
75
75
|
/** @internal */
|
|
76
|
-
|
|
76
|
+
['~preloadManifest']?: boolean;
|
|
77
77
|
}
|
|
78
78
|
export interface NuxtPayload {
|
|
79
79
|
path?: string;
|
|
@@ -12,7 +12,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
if (import.meta.server) {
|
|
15
|
-
nuxtApp.ssrContext.event.context
|
|
15
|
+
nuxtApp.ssrContext.event.context["~payloadReducers"] = nuxtApp.ssrContext["~payloadReducers"];
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
if (devLogs !== "silent") {
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-nightly",
|
|
3
|
-
"version": "4.3.0-
|
|
3
|
+
"version": "4.3.0-29432784.68badc0b",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"@dxup/nuxt": "^0.3.2",
|
|
68
68
|
"@nuxt/cli": "npm:@nuxt/cli-nightly@latest",
|
|
69
69
|
"@nuxt/devtools": "^3.1.1",
|
|
70
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-
|
|
71
|
-
"@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@4.3.0-
|
|
72
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-
|
|
70
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-29432784.68badc0b",
|
|
71
|
+
"@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@4.3.0-29432784.68badc0b",
|
|
72
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-29432784.68badc0b",
|
|
73
73
|
"@nuxt/telemetry": "^2.6.6",
|
|
74
|
-
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.3.0-
|
|
74
|
+
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.3.0-29432784.68badc0b",
|
|
75
75
|
"@unhead/vue": "^2.0.19",
|
|
76
76
|
"@vue/shared": "^3.5.25",
|
|
77
77
|
"c12": "^3.3.2",
|