@depup/nuxt 4.2.2-depup.0 → 4.4.2-depup.0
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/README.md +23 -105
- package/app.d.ts +1 -1
- package/dist/app/compat/capi.d.ts +1 -1
- package/dist/app/compat/interval.d.ts +1 -1
- package/dist/app/compat/interval.js +3 -3
- package/dist/app/components/client-fallback.client.js +5 -1
- package/dist/app/components/client-fallback.server.js +5 -1
- package/dist/app/components/error-404.d.vue.ts +6 -6
- package/dist/app/components/error-404.vue +4 -4
- package/dist/app/components/error-404.vue.d.ts +6 -6
- package/dist/app/components/error-500.d.vue.ts +6 -6
- package/dist/app/components/error-500.vue +4 -4
- package/dist/app/components/error-500.vue.d.ts +6 -6
- package/dist/app/components/island-renderer.js +2 -2
- package/dist/app/components/nuxt-announcer.d.ts +26 -0
- package/dist/app/components/nuxt-announcer.js +59 -0
- package/dist/app/components/nuxt-error-page.vue +4 -4
- package/dist/app/components/nuxt-island.js +8 -2
- package/dist/app/components/nuxt-layout.js +49 -23
- package/dist/app/components/nuxt-link.js +30 -16
- package/dist/app/components/nuxt-root.vue +1 -1
- package/dist/app/components/nuxt-route-announcer.js +11 -2
- package/dist/app/components/nuxt-stubs.d.ts +2 -2
- package/dist/app/components/nuxt-stubs.js +2 -2
- package/dist/app/components/nuxt-time.vue +13 -2
- package/dist/app/components/test-component-wrapper.js +10 -2
- package/dist/app/components/utils.d.ts +7 -1
- package/dist/app/components/utils.js +18 -0
- package/dist/app/components/welcome.vue +1 -1
- package/dist/app/composables/announcer.d.ts +23 -0
- package/dist/app/composables/announcer.js +47 -0
- package/dist/app/composables/asyncData.d.ts +24 -37
- package/dist/app/composables/asyncData.js +217 -184
- package/dist/app/composables/chunk.js +1 -2
- package/dist/app/composables/component.js +1 -2
- package/dist/app/composables/cookie.d.ts +14 -0
- package/dist/app/composables/cookie.js +68 -12
- package/dist/app/composables/error.d.ts +9 -6
- package/dist/app/composables/error.js +14 -1
- package/dist/app/composables/fetch.d.ts +11 -16
- package/dist/app/composables/fetch.js +79 -76
- package/dist/app/composables/index.d.ts +2 -0
- package/dist/app/composables/index.js +1 -0
- package/dist/app/composables/manifest.d.ts +4 -6
- package/dist/app/composables/manifest.js +6 -24
- package/dist/app/composables/pages.d.ts +2 -0
- package/dist/app/composables/pages.js +1 -0
- package/dist/app/composables/payload.d.ts +4 -0
- package/dist/app/composables/payload.js +44 -17
- package/dist/app/composables/preload.js +1 -1
- package/dist/app/composables/route-announcer.d.ts +2 -2
- package/dist/app/composables/route-announcer.js +6 -6
- package/dist/app/composables/router.d.ts +14 -3
- package/dist/app/composables/router.js +15 -6
- package/dist/app/composables/script-stubs.js +2 -2
- package/dist/app/composables/ssr.d.ts +2 -2
- package/dist/app/composables/ssr.js +1 -1
- package/dist/app/composables/state.d.ts +11 -1
- package/dist/app/composables/state.js +11 -2
- package/dist/app/composables/url.d.ts +1 -1
- package/dist/app/composables/url.js +1 -1
- package/dist/app/config.d.ts +1 -2
- package/dist/app/entry.async.d.ts +2 -2
- package/dist/app/entry.d.ts +3 -2
- package/dist/app/entry.js +2 -2
- package/dist/app/index.d.ts +3 -3
- package/dist/app/index.js +1 -1
- package/dist/app/middleware/{manifest-route-rule.js → route-rules.js} +2 -2
- package/dist/app/nuxt.d.ts +58 -40
- package/dist/app/nuxt.js +6 -2
- package/dist/app/plugins/dev-server-logs.js +1 -1
- package/dist/app/plugins/payload.client.js +0 -3
- package/dist/app/plugins/preload.server.js +3 -1
- package/dist/app/plugins/restore-state.client.js +1 -2
- package/dist/app/plugins/revive-payload.client.js +9 -3
- package/dist/app/plugins/router.js +17 -18
- package/dist/app/plugins/view-transitions.client.js +39 -4
- package/dist/app/types.d.ts +1 -1
- package/dist/app/utils.d.ts +6 -9
- package/dist/compiler/runtime/index.d.ts +14 -0
- package/dist/compiler/runtime/index.js +14 -0
- package/dist/components/runtime/lazy-hydrated-component.js +2 -1
- package/dist/components/runtime/server-component.js +0 -1
- package/dist/head/runtime/components.js +70 -26
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2918 -1331
- package/dist/pages/runtime/composables.d.ts +10 -1
- package/dist/pages/runtime/index.d.ts +1 -1
- package/dist/pages/runtime/page.js +24 -24
- package/dist/pages/runtime/plugins/prerender.server.js +5 -10
- package/dist/pages/runtime/plugins/router.js +29 -20
- package/dist/pages/runtime/router.options.js +12 -6
- package/dist/pages/runtime/utils.d.ts +7 -0
- package/dist/pages/runtime/validate.js +4 -2
- package/meta.d.ts +1 -0
- package/meta.js +19 -0
- package/package.json +87 -66
- package/types.d.ts +1 -1
- /package/dist/app/middleware/{manifest-route-rule.d.ts → route-rules.d.ts} +0 -0
|
@@ -2,6 +2,9 @@ import type { KeepAliveProps, TransitionProps, UnwrapRef } from 'vue';
|
|
|
2
2
|
import type { RouteLocationNormalized, RouteLocationNormalizedLoaded, RouteRecordRaw, RouteRecordRedirectOption } from 'vue-router';
|
|
3
3
|
import type { NitroRouteConfig } from 'nitropack/types';
|
|
4
4
|
import type { NuxtError } from 'nuxt/app';
|
|
5
|
+
import type { SerializableValue } from './utils.js';
|
|
6
|
+
export interface NuxtLayouts {
|
|
7
|
+
}
|
|
5
8
|
export interface PageMeta {
|
|
6
9
|
[key: string]: unknown;
|
|
7
10
|
/**
|
|
@@ -9,7 +12,7 @@ export interface PageMeta {
|
|
|
9
12
|
*
|
|
10
13
|
* Return true if it is valid, or false if not. If another match can't be found,
|
|
11
14
|
* this will mean a 404. You can also directly return an object with
|
|
12
|
-
*
|
|
15
|
+
* status/statusText to respond immediately with an error (other matches
|
|
13
16
|
* will not be checked).
|
|
14
17
|
*/
|
|
15
18
|
validate?: (route: RouteLocationNormalized) => boolean | Partial<NuxtError> | Promise<boolean | Partial<NuxtError>>;
|
|
@@ -33,6 +36,8 @@ export interface PageMeta {
|
|
|
33
36
|
name?: string;
|
|
34
37
|
/** You may define a path matcher, if you have a more complex pattern than can be expressed with the file name. */
|
|
35
38
|
path?: string;
|
|
39
|
+
/** Route groups based on the file path, like `/(protected)/users/profile` -> ['protected'] */
|
|
40
|
+
groups?: string[];
|
|
36
41
|
/**
|
|
37
42
|
* Allows accessing the route `params` as props passed to the page component.
|
|
38
43
|
* @see https://router.vuejs.org/guide/essentials/passing-props
|
|
@@ -43,6 +48,10 @@ export interface PageMeta {
|
|
|
43
48
|
}
|
|
44
49
|
declare module 'vue-router' {
|
|
45
50
|
interface RouteMeta extends UnwrapRef<PageMeta> {
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
layoutProps?: Record<string, SerializableValue>;
|
|
46
55
|
}
|
|
47
56
|
}
|
|
48
57
|
export declare const definePageMeta: (meta: PageMeta) => void;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Fragment, Suspense, defineComponent, h, inject, nextTick, onBeforeUnmount, ref, watch } from "vue";
|
|
2
2
|
import { RouterView } from "vue-router";
|
|
3
|
-
import {
|
|
4
|
-
import { generateRouteKey, toArray, wrapInKeepAlive } from "./utils.js";
|
|
3
|
+
import { generateRouteKey, wrapInKeepAlive } from "./utils.js";
|
|
5
4
|
import { RouteProvider, defineRouteProvider } from "#app/components/route-provider";
|
|
6
5
|
import { useNuxtApp } from "#app/nuxt";
|
|
7
6
|
import { useRouter } from "#app/composables/router";
|
|
8
|
-
import { _wrapInTransition } from "#app/components/utils";
|
|
7
|
+
import { _mergeTransitionProps, _wrapInTransition } from "#app/components/utils";
|
|
9
8
|
import { LayoutMetaSymbol, PageRouteSymbol } from "#app/components/injections";
|
|
10
9
|
import { appKeepalive as defaultKeepaliveConfig, appPageTransition as defaultPageTransition } from "#build/nuxt.config.mjs";
|
|
11
10
|
const _routeProviders = import.meta.dev ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new WeakMap();
|
|
@@ -41,6 +40,8 @@ export default defineComponent({
|
|
|
41
40
|
const _layoutMeta = inject(LayoutMetaSymbol, null);
|
|
42
41
|
let vnode;
|
|
43
42
|
const done = nuxtApp.deferHydration();
|
|
43
|
+
let isSuspensePending = false;
|
|
44
|
+
let suspenseKey = 0;
|
|
44
45
|
if (import.meta.client && nuxtApp.isHydrating) {
|
|
45
46
|
const removeErrorHook = nuxtApp.hooks.hookOnce("app:error", done);
|
|
46
47
|
useRouter().beforeEach(removeErrorHook);
|
|
@@ -62,6 +63,7 @@ export default defineComponent({
|
|
|
62
63
|
});
|
|
63
64
|
onBeforeUnmount(() => {
|
|
64
65
|
unsub();
|
|
66
|
+
done();
|
|
65
67
|
});
|
|
66
68
|
}
|
|
67
69
|
return () => {
|
|
@@ -90,7 +92,7 @@ export default defineComponent({
|
|
|
90
92
|
return vnode;
|
|
91
93
|
}
|
|
92
94
|
if (isRenderingNewRouteInOldFork && forkRoute && (!_layoutMeta || _layoutMeta?.isCurrent(forkRoute))) {
|
|
93
|
-
if (hasSameChildren) {
|
|
95
|
+
if (hasSameChildren || vnode) {
|
|
94
96
|
return vnode;
|
|
95
97
|
}
|
|
96
98
|
return null;
|
|
@@ -99,10 +101,15 @@ export default defineComponent({
|
|
|
99
101
|
const willRenderAnotherChild = hasChildrenRoutes(forkRoute, routeProps.route, routeProps.Component);
|
|
100
102
|
if (!nuxtApp.isHydrating && previousPageKey === key && !willRenderAnotherChild) {
|
|
101
103
|
nextTick(() => {
|
|
102
|
-
pageLoadingEndHookAlreadyCalled
|
|
103
|
-
|
|
104
|
+
if (!pageLoadingEndHookAlreadyCalled) {
|
|
105
|
+
pageLoadingEndHookAlreadyCalled = true;
|
|
106
|
+
nuxtApp.callHook("page:loading:end");
|
|
107
|
+
}
|
|
104
108
|
});
|
|
105
109
|
}
|
|
110
|
+
if (isSuspensePending && previousPageKey !== key) {
|
|
111
|
+
suspenseKey++;
|
|
112
|
+
}
|
|
106
113
|
previousPageKey = key;
|
|
107
114
|
const hasTransition = !!(props.transition ?? routeProps.route.meta.pageTransition ?? defaultPageTransition);
|
|
108
115
|
const transitionProps = hasTransition && _mergeTransitionProps([
|
|
@@ -111,7 +118,9 @@ export default defineComponent({
|
|
|
111
118
|
defaultPageTransition,
|
|
112
119
|
{
|
|
113
120
|
onAfterLeave() {
|
|
114
|
-
|
|
121
|
+
nuxtApp["~transitionFinish"]?.();
|
|
122
|
+
delete nuxtApp["~transitionFinish"];
|
|
123
|
+
delete nuxtApp["~transitionPromise"];
|
|
115
124
|
nuxtApp.callHook("page:transition:finish", routeProps.Component);
|
|
116
125
|
}
|
|
117
126
|
}
|
|
@@ -122,19 +131,23 @@ export default defineComponent({
|
|
|
122
131
|
wrapInKeepAlive(
|
|
123
132
|
keepaliveConfig,
|
|
124
133
|
h(Suspense, {
|
|
134
|
+
key: suspenseKey,
|
|
125
135
|
suspensible: true,
|
|
126
136
|
onPending: () => {
|
|
127
|
-
|
|
128
|
-
|
|
137
|
+
isSuspensePending = true;
|
|
138
|
+
if (hasTransition && !nuxtApp["~transitionPromise"]) {
|
|
139
|
+
nuxtApp["~transitionPromise"] = new Promise((resolve) => {
|
|
140
|
+
nuxtApp["~transitionFinish"] = resolve;
|
|
141
|
+
});
|
|
129
142
|
}
|
|
130
143
|
nuxtApp.callHook("page:start", routeProps.Component);
|
|
131
144
|
},
|
|
132
145
|
onResolve: async () => {
|
|
133
|
-
|
|
146
|
+
isSuspensePending = false;
|
|
134
147
|
try {
|
|
148
|
+
await nextTick();
|
|
135
149
|
nuxtApp._route.sync?.();
|
|
136
150
|
await nuxtApp.callHook("page:finish", routeProps.Component);
|
|
137
|
-
delete nuxtApp._runningTransition;
|
|
138
151
|
if (!pageLoadingEndHookAlreadyCalled && !willRenderAnotherChild) {
|
|
139
152
|
pageLoadingEndHookAlreadyCalled = true;
|
|
140
153
|
await nuxtApp.callHook("page:loading:end");
|
|
@@ -174,19 +187,6 @@ export default defineComponent({
|
|
|
174
187
|
};
|
|
175
188
|
}
|
|
176
189
|
});
|
|
177
|
-
function _mergeTransitionProps(routeProps) {
|
|
178
|
-
const _props = [];
|
|
179
|
-
for (const prop of routeProps) {
|
|
180
|
-
if (!prop) {
|
|
181
|
-
continue;
|
|
182
|
-
}
|
|
183
|
-
_props.push({
|
|
184
|
-
...prop,
|
|
185
|
-
onAfterLeave: prop.onAfterLeave ? toArray(prop.onAfterLeave) : void 0
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
return defu(..._props);
|
|
189
|
-
}
|
|
190
190
|
function haveParentRoutesRendered(fork, newRoute, Component) {
|
|
191
191
|
if (!fork) {
|
|
192
192
|
return false;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { joinURL } from "ufo";
|
|
2
|
-
import {
|
|
3
|
-
import defu from "defu";
|
|
4
|
-
import { defineNuxtPlugin, useRuntimeConfig } from "#app/nuxt";
|
|
2
|
+
import { defineNuxtPlugin } from "#app/nuxt";
|
|
5
3
|
import { prerenderRoutes } from "#app/composables/ssr";
|
|
6
4
|
import _routes from "#build/routes";
|
|
7
|
-
import routerOptions, { hashMode } from "#build/router.options";
|
|
5
|
+
import routerOptions, { hashMode } from "#build/router.options.mjs";
|
|
8
6
|
import { crawlLinks } from "#build/nuxt.config.mjs";
|
|
7
|
+
import _routeRulesMatcher from "#build/route-rules.mjs";
|
|
8
|
+
const routeRulesMatcher = _routeRulesMatcher;
|
|
9
9
|
let routes;
|
|
10
|
-
let _routeRulesMatcher = void 0;
|
|
11
10
|
export default defineNuxtPlugin(async () => {
|
|
12
11
|
if (!import.meta.server || !import.meta.prerender || hashMode) {
|
|
13
12
|
return;
|
|
@@ -15,17 +14,13 @@ export default defineNuxtPlugin(async () => {
|
|
|
15
14
|
if (routes && !routes.length) {
|
|
16
15
|
return;
|
|
17
16
|
}
|
|
18
|
-
const routeRules = useRuntimeConfig().nitro.routeRules;
|
|
19
|
-
if (!crawlLinks && routeRules && Object.values(routeRules).some((r) => r.prerender)) {
|
|
20
|
-
_routeRulesMatcher = toRouteMatcher(createRadixRouter({ routes: routeRules }));
|
|
21
|
-
}
|
|
22
17
|
routes ||= Array.from(processRoutes(await routerOptions.routes?.(_routes) ?? _routes));
|
|
23
18
|
const batch = routes.splice(0, 10);
|
|
24
19
|
prerenderRoutes(batch);
|
|
25
20
|
});
|
|
26
21
|
const OPTIONAL_PARAM_RE = /^\/?:.*(?:\?|\(\.\*\)\*)$/;
|
|
27
22
|
function shouldPrerender(path) {
|
|
28
|
-
return
|
|
23
|
+
return crawlLinks || !!routeRulesMatcher(path).prerender;
|
|
29
24
|
}
|
|
30
25
|
function processRoutes(routes2, currentPath = "/", routesToPrerender = /* @__PURE__ */ new Set()) {
|
|
31
26
|
for (const route of routes2) {
|
|
@@ -6,9 +6,8 @@ import { getRouteRules } from "#app/composables/manifest";
|
|
|
6
6
|
import { defineNuxtPlugin, useRuntimeConfig } from "#app/nuxt";
|
|
7
7
|
import { clearError, createError, isNuxtError, showError, useError } from "#app/composables/error";
|
|
8
8
|
import { navigateTo } from "#app/composables/router";
|
|
9
|
-
import { appManifest as isAppManifestEnabled } from "#build/nuxt.config.mjs";
|
|
10
9
|
import _routes, { handleHotUpdate } from "#build/routes";
|
|
11
|
-
import routerOptions, { hashMode } from "#build/router.options";
|
|
10
|
+
import routerOptions, { hashMode } from "#build/router.options.mjs";
|
|
12
11
|
import { globalMiddleware, namedMiddleware } from "#build/middleware";
|
|
13
12
|
function createCurrentLocation(base, location, renderedPath) {
|
|
14
13
|
const { pathname, search, hash } = location;
|
|
@@ -120,6 +119,7 @@ const plugin = defineNuxtPlugin({
|
|
|
120
119
|
await nuxtApp.runWithContext(() => showError(error2));
|
|
121
120
|
}
|
|
122
121
|
const resolvedInitialRoute = import.meta.client && initialURL !== router.currentRoute.value.fullPath ? router.resolve(initialURL) : router.currentRoute.value;
|
|
122
|
+
const hasDeferredRoute = import.meta.client && nuxtApp.isHydrating && nuxtApp.payload.prerenderedAt && nuxtApp.payload.path && initialURL !== nuxtApp.payload.path && isSamePath(router.currentRoute.value.path, nuxtApp.payload.path);
|
|
123
123
|
syncCurrentRoute();
|
|
124
124
|
if (import.meta.server && nuxtApp.ssrContext?.islandContext) {
|
|
125
125
|
return { provide: { router } };
|
|
@@ -143,15 +143,13 @@ const plugin = defineNuxtPlugin({
|
|
|
143
143
|
middlewareEntries.add(entry);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
middlewareEntries.delete(key);
|
|
154
|
-
}
|
|
146
|
+
const routeRules = getRouteRules({ path: to.path });
|
|
147
|
+
if (routeRules.appMiddleware) {
|
|
148
|
+
for (const key in routeRules.appMiddleware) {
|
|
149
|
+
if (routeRules.appMiddleware[key]) {
|
|
150
|
+
middlewareEntries.add(key);
|
|
151
|
+
} else {
|
|
152
|
+
middlewareEntries.delete(key);
|
|
155
153
|
}
|
|
156
154
|
}
|
|
157
155
|
}
|
|
@@ -171,8 +169,8 @@ const plugin = defineNuxtPlugin({
|
|
|
171
169
|
if (import.meta.server || !nuxtApp.payload.serverRendered && nuxtApp.isHydrating) {
|
|
172
170
|
if (result === false || result instanceof Error) {
|
|
173
171
|
const error2 = result || createError({
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
status: 404,
|
|
173
|
+
statusText: `Page Not Found: ${initialURL}`
|
|
176
174
|
});
|
|
177
175
|
await nuxtApp.runWithContext(() => showError(error2));
|
|
178
176
|
return false;
|
|
@@ -205,11 +203,11 @@ const plugin = defineNuxtPlugin({
|
|
|
205
203
|
await nuxtApp.callHook("page:loading:end");
|
|
206
204
|
});
|
|
207
205
|
router.afterEach((to) => {
|
|
208
|
-
if (to.matched.length === 0) {
|
|
206
|
+
if (to.matched.length === 0 && !error.value) {
|
|
209
207
|
return nuxtApp.runWithContext(() => showError(createError({
|
|
210
|
-
|
|
208
|
+
status: 404,
|
|
211
209
|
fatal: false,
|
|
212
|
-
|
|
210
|
+
statusText: `Page not found: ${to.fullPath}`,
|
|
213
211
|
data: {
|
|
214
212
|
path: to.fullPath
|
|
215
213
|
}
|
|
@@ -221,10 +219,21 @@ const plugin = defineNuxtPlugin({
|
|
|
221
219
|
if ("name" in resolvedInitialRoute) {
|
|
222
220
|
resolvedInitialRoute.name = void 0;
|
|
223
221
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
222
|
+
if (hasDeferredRoute) {
|
|
223
|
+
const payloadRoute = router.resolve(nuxtApp.payload.path);
|
|
224
|
+
if ("name" in payloadRoute) {
|
|
225
|
+
payloadRoute.name = void 0;
|
|
226
|
+
}
|
|
227
|
+
await router.replace({ ...payloadRoute, force: true });
|
|
228
|
+
nuxtApp.hooks.hookOnce("app:suspense:resolve", async () => {
|
|
229
|
+
await router.replace({ ...resolvedInitialRoute, force: true });
|
|
230
|
+
});
|
|
231
|
+
} else {
|
|
232
|
+
await router.replace({
|
|
233
|
+
...resolvedInitialRoute,
|
|
234
|
+
force: true
|
|
235
|
+
});
|
|
236
|
+
}
|
|
228
237
|
router.options.scrollBehavior = routerOptions.scrollBehavior;
|
|
229
238
|
} catch (error2) {
|
|
230
239
|
await nuxtApp.runWithContext(() => showError(error2));
|
|
@@ -19,14 +19,20 @@ export default {
|
|
|
19
19
|
if (routeAllowsScrollToTop === false) {
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
if (from === START_LOCATION) {
|
|
23
|
+
return _calculatePosition(to, from, savedPosition, hashScrollBehaviour);
|
|
24
|
+
}
|
|
23
25
|
return new Promise((resolve) => {
|
|
24
|
-
|
|
25
|
-
resolve(_calculatePosition(to, from, savedPosition, hashScrollBehaviour));
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
nuxtApp.hooks.hookOnce(hookToWait, () => {
|
|
26
|
+
const doScroll = () => {
|
|
29
27
|
requestAnimationFrame(() => resolve(_calculatePosition(to, from, savedPosition, hashScrollBehaviour)));
|
|
28
|
+
};
|
|
29
|
+
nuxtApp.hooks.hookOnce("page:loading:end", () => {
|
|
30
|
+
const transitionPromise = nuxtApp["~transitionPromise"];
|
|
31
|
+
if (transitionPromise) {
|
|
32
|
+
transitionPromise.then(doScroll);
|
|
33
|
+
} else {
|
|
34
|
+
doScroll();
|
|
35
|
+
}
|
|
30
36
|
});
|
|
31
37
|
});
|
|
32
38
|
}
|
|
@@ -2,6 +2,13 @@ import type { RouteLocationNormalizedLoaded, RouterView } from 'vue-router';
|
|
|
2
2
|
type InstanceOf<T> = T extends new (...args: any[]) => infer R ? R : never;
|
|
3
3
|
type RouterViewSlot = Exclude<InstanceOf<typeof RouterView>['$slots']['default'], undefined>;
|
|
4
4
|
export type RouterViewSlotProps = Parameters<RouterViewSlot>[0];
|
|
5
|
+
type SerializablePrimitive = string | number | boolean | null | undefined;
|
|
6
|
+
/** JSON-serializable value (non-recursive definition to avoid excessive type depth) */
|
|
7
|
+
export type SerializableValue = SerializablePrimitive | SerializablePrimitive[] | Record<string, unknown>;
|
|
8
|
+
/** Constrains T to only contain serializable properties. Non-serializable properties become `never`. */
|
|
9
|
+
export type MakeSerializableObject<T> = T extends Function | symbol ? never : {
|
|
10
|
+
[K in keyof T]: T[K] extends SerializablePrimitive ? T[K] : T[K] extends (infer U)[] ? U extends SerializablePrimitive ? T[K] : never : T[K] extends Record<string, unknown> ? T[K] : never;
|
|
11
|
+
};
|
|
5
12
|
export declare const generateRouteKey: (routeProps: RouterViewSlotProps, override?: string | ((route: RouteLocationNormalizedLoaded) => string)) => string | false | undefined;
|
|
6
13
|
export declare const wrapInKeepAlive: (props: any, children: any) => {
|
|
7
14
|
default: () => any;
|
|
@@ -10,8 +10,10 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
|
|
|
10
10
|
}
|
|
11
11
|
const error = createError({
|
|
12
12
|
fatal: import.meta.client,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
14
|
+
status: result && (result.status || result.statusCode) || 404,
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
16
|
+
statusText: result && (result.statusText || result.statusMessage) || `Page Not Found: ${to.fullPath}`,
|
|
15
17
|
data: {
|
|
16
18
|
path: to.fullPath
|
|
17
19
|
}
|
package/meta.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const runtimeDependencies: string[]
|
package/meta.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const runtimeDependencies = [
|
|
2
|
+
// other deps
|
|
3
|
+
'devalue',
|
|
4
|
+
'klona',
|
|
5
|
+
// deliberate exports from nitro builder
|
|
6
|
+
'@nuxt/nitro-server/h3',
|
|
7
|
+
// unjs ecosystem
|
|
8
|
+
'defu',
|
|
9
|
+
'ufo',
|
|
10
|
+
'destr',
|
|
11
|
+
'consola',
|
|
12
|
+
'hookable',
|
|
13
|
+
'unctx',
|
|
14
|
+
'cookie-es',
|
|
15
|
+
'perfect-debounce',
|
|
16
|
+
'ohash',
|
|
17
|
+
'pathe',
|
|
18
|
+
'uncrypto',
|
|
19
|
+
]
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/nuxt",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.2-depup.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
7
7
|
"directory": "packages/nuxt"
|
|
8
8
|
},
|
|
9
9
|
"homepage": "https://nuxt.com",
|
|
10
|
-
"description": "Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.",
|
|
10
|
+
"description": "[DepUp] Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"types": "./types.d.ts",
|
|
@@ -25,33 +25,17 @@
|
|
|
25
25
|
"import": "./config.js",
|
|
26
26
|
"require": "./config.cjs"
|
|
27
27
|
},
|
|
28
|
-
"./schema":
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"./kit": {
|
|
33
|
-
"types": "./kit.d.ts",
|
|
34
|
-
"import": "./kit.js"
|
|
35
|
-
},
|
|
36
|
-
"./app": {
|
|
37
|
-
"types": "./dist/app/index.d.ts",
|
|
38
|
-
"import": "./dist/app/index.js"
|
|
39
|
-
},
|
|
28
|
+
"./schema": "./schema.js",
|
|
29
|
+
"./kit": "./kit.js",
|
|
30
|
+
"./meta": "./meta.js",
|
|
31
|
+
"./app": "./dist/app/index.js",
|
|
40
32
|
"./package.json": "./package.json"
|
|
41
33
|
},
|
|
42
34
|
"imports": {
|
|
43
|
-
"#app":
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"#app/nuxt": {
|
|
48
|
-
"types": "./dist/app/nuxt.d.ts",
|
|
49
|
-
"import": "./dist/app/nuxt.js"
|
|
50
|
-
},
|
|
51
|
-
"#unhead/composables": {
|
|
52
|
-
"types": "./dist/head/runtime/composables.d.ts",
|
|
53
|
-
"import": "./dist/head/runtime/composables.js"
|
|
54
|
-
}
|
|
35
|
+
"#app": "./dist/app/index.js",
|
|
36
|
+
"#app/nuxt": "./dist/app/nuxt.js",
|
|
37
|
+
"#unhead/composables": "./dist/head/runtime/composables.js",
|
|
38
|
+
"#pages/composables": "./dist/pages/runtime/composables.js"
|
|
55
39
|
},
|
|
56
40
|
"files": [
|
|
57
41
|
"app.d.ts",
|
|
@@ -61,77 +45,78 @@
|
|
|
61
45
|
"dist",
|
|
62
46
|
"config.*",
|
|
63
47
|
"kit.*",
|
|
48
|
+
"meta.*",
|
|
64
49
|
"schema.*"
|
|
65
50
|
],
|
|
66
51
|
"dependencies": {
|
|
67
|
-
"@dxup/nuxt": "^0.
|
|
68
|
-
"@nuxt/cli": "^3.
|
|
69
|
-
"@nuxt/devtools": "^3.
|
|
70
|
-
"@nuxt/telemetry": "^2.
|
|
71
|
-
"@unhead/vue": "^2.1.
|
|
72
|
-
"@vue/shared": "^3.5.
|
|
73
|
-
"c12": "^
|
|
52
|
+
"@dxup/nuxt": "^0.4.0",
|
|
53
|
+
"@nuxt/cli": "^3.34.0",
|
|
54
|
+
"@nuxt/devtools": "^3.2.3",
|
|
55
|
+
"@nuxt/telemetry": "^2.7.0",
|
|
56
|
+
"@unhead/vue": "^2.1.12",
|
|
57
|
+
"@vue/shared": "^3.5.30",
|
|
58
|
+
"c12": "^4.0.0-beta.3",
|
|
74
59
|
"chokidar": "^5.0.0",
|
|
75
60
|
"compatx": "^0.2.0",
|
|
76
61
|
"consola": "^3.4.2",
|
|
77
62
|
"cookie-es": "^2.0.0",
|
|
78
63
|
"defu": "^6.1.4",
|
|
79
|
-
"
|
|
80
|
-
"devalue": "^5.6.1",
|
|
64
|
+
"devalue": "^5.6.4",
|
|
81
65
|
"errx": "^0.1.0",
|
|
82
66
|
"escape-string-regexp": "^5.0.0",
|
|
83
67
|
"exsolve": "^1.0.8",
|
|
84
|
-
"h3": "^2.0.1-rc.7",
|
|
85
68
|
"hookable": "^6.0.1",
|
|
86
69
|
"ignore": "^7.0.5",
|
|
87
|
-
"impound": "^1.
|
|
70
|
+
"impound": "^1.1.5",
|
|
88
71
|
"jiti": "^2.6.1",
|
|
89
72
|
"klona": "^2.0.6",
|
|
90
73
|
"knitwork": "^1.3.0",
|
|
91
74
|
"magic-string": "^0.30.21",
|
|
92
|
-
"mlly": "^1.8.
|
|
93
|
-
"nanotar": "^0.
|
|
94
|
-
"nypm": "^0.6.
|
|
75
|
+
"mlly": "^1.8.1",
|
|
76
|
+
"nanotar": "^0.3.0",
|
|
77
|
+
"nypm": "^0.6.5",
|
|
95
78
|
"ofetch": "^1.5.1",
|
|
96
79
|
"ohash": "^2.0.11",
|
|
97
|
-
"on-change": "^6.0.
|
|
98
|
-
"oxc-minify": "^0.
|
|
99
|
-
"oxc-parser": "^0.
|
|
100
|
-
"oxc-transform": "^0.
|
|
101
|
-
"oxc-walker": "^0.
|
|
80
|
+
"on-change": "^6.0.2",
|
|
81
|
+
"oxc-minify": "^0.118.0",
|
|
82
|
+
"oxc-parser": "^0.118.0",
|
|
83
|
+
"oxc-transform": "^0.118.0",
|
|
84
|
+
"oxc-walker": "^0.7.0",
|
|
102
85
|
"pathe": "^2.0.3",
|
|
103
|
-
"perfect-debounce": "^2.
|
|
86
|
+
"perfect-debounce": "^2.1.0",
|
|
87
|
+
"picomatch": "^4.0.3",
|
|
104
88
|
"pkg-types": "^2.3.0",
|
|
105
|
-
"
|
|
89
|
+
"rou3": "^0.8.1",
|
|
106
90
|
"scule": "^1.3.0",
|
|
107
|
-
"semver": "^7.7.
|
|
108
|
-
"std-env": "^
|
|
91
|
+
"semver": "^7.7.4",
|
|
92
|
+
"std-env": "^4.0.0",
|
|
109
93
|
"tinyglobby": "^0.2.15",
|
|
110
|
-
"ufo": "^1.6.
|
|
94
|
+
"ufo": "^1.6.3",
|
|
111
95
|
"ultrahtml": "^1.6.0",
|
|
112
96
|
"uncrypto": "^0.1.3",
|
|
113
97
|
"unctx": "^2.5.0",
|
|
114
|
-
"unimport": "^
|
|
115
|
-
"unplugin": "^
|
|
116
|
-
"
|
|
98
|
+
"unimport": "^6.0.1",
|
|
99
|
+
"unplugin": "^3.0.0",
|
|
100
|
+
"unrouting": "^0.1.5",
|
|
117
101
|
"untyped": "^2.0.0",
|
|
118
|
-
"vue": "^3.5.
|
|
119
|
-
"vue-router": "^
|
|
120
|
-
"@nuxt/
|
|
121
|
-
"@nuxt/
|
|
122
|
-
"@nuxt/
|
|
123
|
-
"@nuxt/
|
|
102
|
+
"vue": "^3.5.30",
|
|
103
|
+
"vue-router": "^5.0.3",
|
|
104
|
+
"@nuxt/nitro-server": "4.4.2",
|
|
105
|
+
"@nuxt/vite-builder": "4.4.2",
|
|
106
|
+
"@nuxt/kit": "4.4.2",
|
|
107
|
+
"@nuxt/schema": "4.4.2"
|
|
124
108
|
},
|
|
125
109
|
"devDependencies": {
|
|
126
|
-
"@nuxt/scripts": "
|
|
127
|
-
"@parcel/watcher": "
|
|
110
|
+
"@nuxt/scripts": "0.13.2",
|
|
111
|
+
"@parcel/watcher": "2.5.6",
|
|
128
112
|
"@types/estree": "1.0.8",
|
|
129
|
-
"@
|
|
130
|
-
"@vitejs/plugin-vue
|
|
131
|
-
"@
|
|
113
|
+
"@types/picomatch": "4.0.2",
|
|
114
|
+
"@vitejs/plugin-vue": "6.0.4",
|
|
115
|
+
"@vitejs/plugin-vue-jsx": "5.1.4",
|
|
116
|
+
"@vue/compiler-sfc": "3.5.30",
|
|
132
117
|
"unbuild": "3.6.1",
|
|
133
|
-
"vite": "
|
|
134
|
-
"vitest": "
|
|
118
|
+
"vite": "7.3.1",
|
|
119
|
+
"vitest": "4.0.18",
|
|
135
120
|
"vue-bundle-renderer": "2.2.0",
|
|
136
121
|
"vue-sfc-transformer": "0.1.17"
|
|
137
122
|
},
|
|
@@ -151,6 +136,42 @@
|
|
|
151
136
|
"node": "^20.19.0 || >=22.12.0"
|
|
152
137
|
},
|
|
153
138
|
"scripts": {
|
|
139
|
+
"build:stub": "unbuild --stub",
|
|
154
140
|
"test:attw": "attw --pack"
|
|
141
|
+
},
|
|
142
|
+
"keywords": [
|
|
143
|
+
"depup",
|
|
144
|
+
"dependency-bumped",
|
|
145
|
+
"updated-deps",
|
|
146
|
+
"nuxt"
|
|
147
|
+
],
|
|
148
|
+
"depup": {
|
|
149
|
+
"changes": {
|
|
150
|
+
"c12": {
|
|
151
|
+
"from": "^3.3.3",
|
|
152
|
+
"to": "^4.0.0-beta.3"
|
|
153
|
+
},
|
|
154
|
+
"devalue": {
|
|
155
|
+
"from": "^5.6.3",
|
|
156
|
+
"to": "^5.6.4"
|
|
157
|
+
},
|
|
158
|
+
"oxc-minify": {
|
|
159
|
+
"from": "^0.117.0",
|
|
160
|
+
"to": "^0.118.0"
|
|
161
|
+
},
|
|
162
|
+
"oxc-parser": {
|
|
163
|
+
"from": "^0.117.0",
|
|
164
|
+
"to": "^0.118.0"
|
|
165
|
+
},
|
|
166
|
+
"oxc-transform": {
|
|
167
|
+
"from": "^0.117.0",
|
|
168
|
+
"to": "^0.118.0"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"depsUpdated": 5,
|
|
172
|
+
"originalPackage": "nuxt",
|
|
173
|
+
"originalVersion": "4.4.2",
|
|
174
|
+
"processedAt": "2026-03-12T12:19:00.214Z",
|
|
175
|
+
"smokeTest": "passed"
|
|
155
176
|
}
|
|
156
177
|
}
|
package/types.d.ts
CHANGED
|
File without changes
|