@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
package/README.md
CHANGED
|
@@ -1,117 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
# @depup/nuxt
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Dependency-bumped version of [nuxt](https://www.npmjs.com/package/nuxt)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<a href="https://www.npmjs.com/package/nuxt"><img src="https://img.shields.io/npm/dm/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Downloads"></a>
|
|
8
|
-
<a href="https://github.com/nuxt/nuxt/blob/main/LICENSE"><img src="https://img.shields.io/github/license/nuxt/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="License"></a>
|
|
9
|
-
<a href="https://nuxt.com"><img src="https://img.shields.io/badge/Nuxt%20Docs-18181B?logo=nuxt" alt="Website"></a>
|
|
10
|
-
<a href="https://chat.nuxt.dev"><img src="https://img.shields.io/badge/Nuxt%20Discord-18181B?logo=discord" alt="Discord"></a>
|
|
11
|
-
<a href="https://securityscorecards.dev/"><img src="https://api.securityscorecards.dev/projects/github.com/nuxt/nuxt/badge" alt="Nuxt openssf scorecard score"></a>
|
|
12
|
-
</p>
|
|
5
|
+
Generated by [DepUp](https://github.com/depup/npm) -- all production
|
|
6
|
+
dependencies bumped to latest versions.
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
It provides a number of features that make it easy to build fast, SEO-friendly, and scalable web applications, including:
|
|
17
|
-
- Server-side rendering, static site generation, hybrid rendering and edge-side rendering
|
|
18
|
-
- Automatic routing with code-splitting and pre-fetching
|
|
19
|
-
- Data fetching and state management
|
|
20
|
-
- Search engine optimization and defining meta tags
|
|
21
|
-
- Auto imports of components, composables and utils
|
|
22
|
-
- TypeScript with zero configuration
|
|
23
|
-
- Go full-stack with our server/ directory
|
|
24
|
-
- Extensible with [200+ modules](https://nuxt.com/modules)
|
|
25
|
-
- Deployment to a variety of [hosting platforms](https://nuxt.com/deploy)
|
|
26
|
-
- ...[and much more](https://nuxt.com) 🚀
|
|
27
|
-
|
|
28
|
-
### Table of Contents
|
|
29
|
-
|
|
30
|
-
- 🚀 [Getting Started](#getting-started)
|
|
31
|
-
- 💻 [ Vue Development](#vue-development)
|
|
32
|
-
- 📖 [Documentation](#documentation)
|
|
33
|
-
- 🧩 [Modules](#modules)
|
|
34
|
-
- ❤️ [Contribute](#contribute)
|
|
35
|
-
- 🏠 [Local Development](#local-development)
|
|
36
|
-
- 🛟 [Professional Support](#professional-support)
|
|
37
|
-
- 🔗 [Follow Us](#follow-us)
|
|
38
|
-
- ⚖️ [License](#license)
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## <a name="getting-started">🚀 Getting Started</a>
|
|
43
|
-
|
|
44
|
-
Use the following command to create a new starter project. This will create a starter project with all the necessary files and dependencies:
|
|
8
|
+
## Installation
|
|
45
9
|
|
|
46
10
|
```bash
|
|
47
|
-
npm
|
|
11
|
+
npm install @depup/nuxt
|
|
48
12
|
```
|
|
49
13
|
|
|
50
|
-
|
|
51
|
-
|
|
14
|
+
| Field | Value |
|
|
15
|
+
|-------|-------|
|
|
16
|
+
| Original | [nuxt](https://www.npmjs.com/package/nuxt) @ 4.4.2 |
|
|
17
|
+
| Processed | 2026-03-12 |
|
|
18
|
+
| Smoke test | passed |
|
|
19
|
+
| Deps updated | 5 |
|
|
52
20
|
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
Simple, intuitive and powerful, Nuxt lets you write Vue components in a way that makes sense. Every repetitive task is automated, so you can focus on writing your full-stack Vue application with confidence.
|
|
56
|
-
|
|
57
|
-
Example of an `app.vue`:
|
|
58
|
-
|
|
59
|
-
```vue
|
|
60
|
-
<script setup lang="ts">
|
|
61
|
-
useSeoMeta({
|
|
62
|
-
title: 'Meet Nuxt',
|
|
63
|
-
description: 'The Intuitive Vue Framework.',
|
|
64
|
-
})
|
|
65
|
-
</script>
|
|
66
|
-
|
|
67
|
-
<template>
|
|
68
|
-
<div id="app">
|
|
69
|
-
<AppHeader />
|
|
70
|
-
<NuxtPage />
|
|
71
|
-
<AppFooter />
|
|
72
|
-
</div>
|
|
73
|
-
</template>
|
|
74
|
-
|
|
75
|
-
<style scoped>
|
|
76
|
-
#app {
|
|
77
|
-
background-color: #020420;
|
|
78
|
-
color: #00DC82;
|
|
79
|
-
}
|
|
80
|
-
</style>
|
|
81
|
-
```
|
|
21
|
+
## Dependency Changes
|
|
82
22
|
|
|
83
|
-
|
|
23
|
+
| Dependency | From | To |
|
|
24
|
+
|------------|------|-----|
|
|
25
|
+
| c12 | ^3.3.3 | ^4.0.0-beta.3 |
|
|
26
|
+
| devalue | ^5.6.3 | ^5.6.4 |
|
|
27
|
+
| oxc-minify | ^0.117.0 | ^0.118.0 |
|
|
28
|
+
| oxc-parser | ^0.117.0 | ^0.118.0 |
|
|
29
|
+
| oxc-transform | ^0.117.0 | ^0.118.0 |
|
|
84
30
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## <a name="modules">🧩 Modules</a>
|
|
88
|
-
|
|
89
|
-
Discover our [list of modules](https://nuxt.com/modules) to supercharge your Nuxt project, created by the Nuxt team and community.
|
|
90
|
-
|
|
91
|
-
## <a name="contribute">❤️ Contribute</a>
|
|
92
|
-
|
|
93
|
-
We invite you to contribute and help improve Nuxt 💚
|
|
94
|
-
|
|
95
|
-
Here are a few ways you can get involved:
|
|
96
|
-
- **Reporting Bugs:** If you come across any bugs or issues, please check out the [reporting bugs guide](https://nuxt.com/docs/4.x/community/reporting-bugs) to learn how to submit a bug report.
|
|
97
|
-
- **Suggestions:** Have ideas to enhance Nuxt? We'd love to hear them! Check out the [contribution guide](https://nuxt.com/docs/4.x/community/contribution) to share your suggestions.
|
|
98
|
-
- **Questions:** If you have questions or need assistance, the [getting help guide](https://nuxt.com/docs/4.x/community/getting-help) provides resources to help you out.
|
|
99
|
-
|
|
100
|
-
## <a name="local-development">🏠 Local Development</a>
|
|
101
|
-
|
|
102
|
-
Follow the docs to [Set Up Your Local Development Environment](https://nuxt.com/docs/4.x/community/framework-contribution#setup) to contribute to the framework and documentation.
|
|
103
|
-
|
|
104
|
-
## <a name="professional-support">🛟 Professional Support</a>
|
|
105
|
-
|
|
106
|
-
- Technical audit & consulting: [Nuxt Experts](https://nuxt.com/enterprise/support)
|
|
107
|
-
- Custom development & more: [Nuxt Agencies Partners](https://nuxt.com/enterprise/agencies)
|
|
108
|
-
|
|
109
|
-
## <a name="follow-us">🔗 Follow Us</a>
|
|
110
|
-
|
|
111
|
-
<p valign="center">
|
|
112
|
-
<a href="https://go.nuxt.com/discord"><img width="20px" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/discord.svg" alt="Discord"></a> <a href="https://go.nuxt.com/x"><img width="20px" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/twitter.svg" alt="Twitter"></a> <a href="https://go.nuxt.com/github"><img width="20px" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/github.svg" alt="GitHub"></a> <a href="https://go.nuxt.com/bluesky"><img width="20px" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/bluesky.svg" alt="Bluesky"></a>
|
|
113
|
-
</p>
|
|
31
|
+
---
|
|
114
32
|
|
|
115
|
-
|
|
33
|
+
Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/nuxt
|
|
116
34
|
|
|
117
|
-
|
|
35
|
+
License inherited from the original package.
|
package/app.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/app/index'
|
|
1
|
+
export * from './dist/app/index.ts'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * from 'vue';
|
|
2
2
|
export declare const install: () => void;
|
|
3
|
-
export declare function set(target: any, key: string | number | symbol, val:
|
|
3
|
+
export declare function set<T>(target: any, key: string | number | symbol, val: T): T;
|
|
4
4
|
export declare function del(target: any, key: string | number | symbol): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const setInterval: typeof globalThis.setInterval
|
|
1
|
+
export declare const setInterval: typeof globalThis.setInterval;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createError } from "../composables/error.js";
|
|
2
2
|
const intervalError = "[nuxt] `setInterval` should not be used on the server. Consider wrapping it with an `onNuxtReady`, `onBeforeMount` or `onMounted` lifecycle hook, or ensure you only call it in the browser by checking `import.meta.client`.";
|
|
3
|
-
export const setInterval = import.meta.client ? globalThis.setInterval : () => {
|
|
3
|
+
export const setInterval = import.meta.client ? globalThis.setInterval : (() => {
|
|
4
4
|
if (import.meta.dev) {
|
|
5
5
|
throw createError({
|
|
6
|
-
|
|
6
|
+
status: 500,
|
|
7
7
|
message: intervalError
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
console.error(intervalError);
|
|
11
|
-
};
|
|
11
|
+
});
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { createElementBlock, defineComponent, onMounted, shallowRef, useId } from "vue";
|
|
2
2
|
import { useState } from "../composables/state.js";
|
|
3
|
+
const VALID_TAG_RE = /^[a-z][a-z0-9-]*$/i;
|
|
4
|
+
function sanitizeTag(tag, fallback) {
|
|
5
|
+
return VALID_TAG_RE.test(tag) ? tag : fallback;
|
|
6
|
+
}
|
|
3
7
|
export default defineComponent({
|
|
4
8
|
name: "NuxtClientFallback",
|
|
5
9
|
inheritAttrs: false,
|
|
@@ -40,7 +44,7 @@ export default defineComponent({
|
|
|
40
44
|
return slot();
|
|
41
45
|
}
|
|
42
46
|
const fallbackStr = props.placeholder || props.fallback;
|
|
43
|
-
const fallbackTag = props.placeholderTag || props.fallbackTag;
|
|
47
|
+
const fallbackTag = sanitizeTag(props.placeholderTag || props.fallbackTag, "div");
|
|
44
48
|
return createElementBlock(fallbackTag, null, fallbackStr);
|
|
45
49
|
}
|
|
46
50
|
}
|
|
@@ -3,6 +3,10 @@ import { ssrRenderAttrs, ssrRenderSlot, ssrRenderVNode } from "vue/server-render
|
|
|
3
3
|
import { isPromise } from "@vue/shared";
|
|
4
4
|
import { useState } from "../composables/state.js";
|
|
5
5
|
import { createBuffer } from "./utils.js";
|
|
6
|
+
const VALID_TAG_RE = /^[a-z][a-z0-9-]*$/i;
|
|
7
|
+
function sanitizeTag(tag, fallback) {
|
|
8
|
+
return VALID_TAG_RE.test(tag) ? tag : fallback;
|
|
9
|
+
}
|
|
6
10
|
const NuxtClientFallbackServer = defineComponent({
|
|
7
11
|
name: "NuxtClientFallback",
|
|
8
12
|
inheritAttrs: false,
|
|
@@ -67,7 +71,7 @@ const NuxtClientFallbackServer = defineComponent({
|
|
|
67
71
|
ssrRenderSlot(ctx.$slots, fallback ? "fallback" : "placeholder", {}, null, push, parent);
|
|
68
72
|
} else {
|
|
69
73
|
const content = ctx.placeholder || ctx.fallback;
|
|
70
|
-
const tag = ctx.placeholderTag || ctx.fallbackTag;
|
|
74
|
+
const tag = sanitizeTag(ctx.placeholderTag || ctx.fallbackTag, "div");
|
|
71
75
|
push(`<${tag}${ssrRenderAttrs(ctx.$attrs)}>${content}</${tag}>`);
|
|
72
76
|
}
|
|
73
77
|
} else {
|
|
@@ -5,11 +5,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
5
5
|
type: StringConstructor;
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
status: {
|
|
9
9
|
type: NumberConstructor;
|
|
10
10
|
default: number;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
statusText: {
|
|
13
13
|
type: StringConstructor;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
@@ -26,11 +26,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
26
26
|
type: StringConstructor;
|
|
27
27
|
default: string;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
status: {
|
|
30
30
|
type: NumberConstructor;
|
|
31
31
|
default: number;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
statusText: {
|
|
34
34
|
type: StringConstructor;
|
|
35
35
|
default: string;
|
|
36
36
|
};
|
|
@@ -44,8 +44,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
44
44
|
};
|
|
45
45
|
}>> & Readonly<{}>, {
|
|
46
46
|
appName: string;
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
status: number;
|
|
48
|
+
statusText: string;
|
|
49
49
|
description: string;
|
|
50
50
|
backHome: string;
|
|
51
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -5,11 +5,11 @@ const props = defineProps({
|
|
|
5
5
|
type: String,
|
|
6
6
|
default: "Nuxt"
|
|
7
7
|
},
|
|
8
|
-
|
|
8
|
+
status: {
|
|
9
9
|
type: Number,
|
|
10
10
|
default: 404
|
|
11
11
|
},
|
|
12
|
-
|
|
12
|
+
statusText: {
|
|
13
13
|
type: String,
|
|
14
14
|
default: "Page not found"
|
|
15
15
|
},
|
|
@@ -23,7 +23,7 @@ const props = defineProps({
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
useHead({
|
|
26
|
-
title: `${props.
|
|
26
|
+
title: `${props.status} - ${props.statusText} | ${props.appName}`,
|
|
27
27
|
script: [
|
|
28
28
|
{
|
|
29
29
|
innerHTML: `!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`
|
|
@@ -38,7 +38,7 @@ useHead({
|
|
|
38
38
|
</script>
|
|
39
39
|
|
|
40
40
|
<template>
|
|
41
|
-
<div class="antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"><div class="max-w-520px text-center"><h1 class="font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]" v-text="
|
|
41
|
+
<div class="antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"><div class="max-w-520px text-center"><h1 class="font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]" v-text="status" /><h2 class="font-semibold mb-2 sm:text-3xl text-2xl" v-text="statusText" /><p class="mb-4 px-2 text-[#64748B] text-md" v-text="description" /><div class="flex items-center justify-center w-full"><NuxtLink to="/" class="font-medium hover:text-[#00DC82] text-sm underline underline-offset-3">
|
|
42
42
|
{{ backHome }}
|
|
43
43
|
</NuxtLink></div></div></div>
|
|
44
44
|
</template>
|
|
@@ -5,11 +5,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
5
5
|
type: StringConstructor;
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
status: {
|
|
9
9
|
type: NumberConstructor;
|
|
10
10
|
default: number;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
statusText: {
|
|
13
13
|
type: StringConstructor;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
@@ -26,11 +26,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
26
26
|
type: StringConstructor;
|
|
27
27
|
default: string;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
status: {
|
|
30
30
|
type: NumberConstructor;
|
|
31
31
|
default: number;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
statusText: {
|
|
34
34
|
type: StringConstructor;
|
|
35
35
|
default: string;
|
|
36
36
|
};
|
|
@@ -44,8 +44,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
44
44
|
};
|
|
45
45
|
}>> & Readonly<{}>, {
|
|
46
46
|
appName: string;
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
status: number;
|
|
48
|
+
statusText: string;
|
|
49
49
|
description: string;
|
|
50
50
|
backHome: string;
|
|
51
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -5,11 +5,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
5
5
|
type: StringConstructor;
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
status: {
|
|
9
9
|
type: NumberConstructor;
|
|
10
10
|
default: number;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
statusText: {
|
|
13
13
|
type: StringConstructor;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
@@ -26,11 +26,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
26
26
|
type: StringConstructor;
|
|
27
27
|
default: string;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
status: {
|
|
30
30
|
type: NumberConstructor;
|
|
31
31
|
default: number;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
statusText: {
|
|
34
34
|
type: StringConstructor;
|
|
35
35
|
default: string;
|
|
36
36
|
};
|
|
@@ -44,8 +44,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
44
44
|
};
|
|
45
45
|
}>> & Readonly<{}>, {
|
|
46
46
|
appName: string;
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
status: number;
|
|
48
|
+
statusText: string;
|
|
49
49
|
description: string;
|
|
50
50
|
refresh: string;
|
|
51
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -5,11 +5,11 @@ const props = defineProps({
|
|
|
5
5
|
type: String,
|
|
6
6
|
default: "Nuxt"
|
|
7
7
|
},
|
|
8
|
-
|
|
8
|
+
status: {
|
|
9
9
|
type: Number,
|
|
10
10
|
default: 500
|
|
11
11
|
},
|
|
12
|
-
|
|
12
|
+
statusText: {
|
|
13
13
|
type: String,
|
|
14
14
|
default: "Internal server error"
|
|
15
15
|
},
|
|
@@ -23,7 +23,7 @@ const props = defineProps({
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
useHead({
|
|
26
|
-
title: `${props.
|
|
26
|
+
title: `${props.status} - ${props.statusText} | ${props.appName}`,
|
|
27
27
|
script: [
|
|
28
28
|
{
|
|
29
29
|
innerHTML: `!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`
|
|
@@ -38,7 +38,7 @@ useHead({
|
|
|
38
38
|
</script>
|
|
39
39
|
|
|
40
40
|
<template>
|
|
41
|
-
<div class="antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"><div class="max-w-520px text-center"><h1 class="font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]" v-text="
|
|
41
|
+
<div class="antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"><div class="max-w-520px text-center"><h1 class="font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]" v-text="status" /><h2 class="font-semibold mb-2 sm:text-3xl text-2xl" v-text="statusText" /><p class="mb-4 px-2 text-[#64748B] text-md" v-text="description" /></div></div>
|
|
42
42
|
</template>
|
|
43
43
|
|
|
44
44
|
<style scoped>
|
|
@@ -5,11 +5,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
5
5
|
type: StringConstructor;
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
status: {
|
|
9
9
|
type: NumberConstructor;
|
|
10
10
|
default: number;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
statusText: {
|
|
13
13
|
type: StringConstructor;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
@@ -26,11 +26,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
26
26
|
type: StringConstructor;
|
|
27
27
|
default: string;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
status: {
|
|
30
30
|
type: NumberConstructor;
|
|
31
31
|
default: number;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
statusText: {
|
|
34
34
|
type: StringConstructor;
|
|
35
35
|
default: string;
|
|
36
36
|
};
|
|
@@ -44,8 +44,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
44
44
|
};
|
|
45
45
|
}>> & Readonly<{}>, {
|
|
46
46
|
appName: string;
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
status: number;
|
|
48
|
+
statusText: string;
|
|
49
49
|
description: string;
|
|
50
50
|
refresh: string;
|
|
51
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -16,8 +16,8 @@ export default defineComponent({
|
|
|
16
16
|
const component = islandComponents[props.context.name];
|
|
17
17
|
if (!component) {
|
|
18
18
|
throw createError({
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
status: 404,
|
|
20
|
+
statusText: `Island component not found: ${props.context.name}`
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
onErrorCaptured((e) => {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AnnouncerPoliteness } from '../composables/announcer.js';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
atomic: {
|
|
4
|
+
type: BooleanConstructor;
|
|
5
|
+
default: boolean;
|
|
6
|
+
};
|
|
7
|
+
politeness: {
|
|
8
|
+
type: () => AnnouncerPoliteness;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
atomic: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
politeness: {
|
|
19
|
+
type: () => AnnouncerPoliteness;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
}>> & Readonly<{}>, {
|
|
23
|
+
politeness: AnnouncerPoliteness;
|
|
24
|
+
atomic: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { computed, defineComponent, h } from "vue";
|
|
2
|
+
import { useAnnouncer } from "../composables/announcer.js";
|
|
3
|
+
export default defineComponent({
|
|
4
|
+
name: "NuxtAnnouncer",
|
|
5
|
+
props: {
|
|
6
|
+
atomic: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: true
|
|
9
|
+
},
|
|
10
|
+
politeness: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "polite"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
setup(props, { slots, expose }) {
|
|
16
|
+
const { set, polite, assertive, message, politeness } = useAnnouncer({
|
|
17
|
+
politeness: props.politeness
|
|
18
|
+
});
|
|
19
|
+
const role = computed(() => {
|
|
20
|
+
if (politeness.value === "assertive") {
|
|
21
|
+
return "alert";
|
|
22
|
+
}
|
|
23
|
+
if (politeness.value === "off") {
|
|
24
|
+
return void 0;
|
|
25
|
+
}
|
|
26
|
+
return "status";
|
|
27
|
+
});
|
|
28
|
+
expose({
|
|
29
|
+
set,
|
|
30
|
+
polite,
|
|
31
|
+
assertive,
|
|
32
|
+
message,
|
|
33
|
+
politeness
|
|
34
|
+
});
|
|
35
|
+
return () => h("span", {
|
|
36
|
+
class: "nuxt-announcer",
|
|
37
|
+
style: {
|
|
38
|
+
position: "absolute"
|
|
39
|
+
}
|
|
40
|
+
}, h("span", {
|
|
41
|
+
"role": role.value,
|
|
42
|
+
"aria-live": politeness.value,
|
|
43
|
+
"aria-atomic": props.atomic,
|
|
44
|
+
"style": {
|
|
45
|
+
"border": "0",
|
|
46
|
+
"clip": "rect(0 0 0 0)",
|
|
47
|
+
"clip-path": "inset(50%)",
|
|
48
|
+
"height": "1px",
|
|
49
|
+
"width": "1px",
|
|
50
|
+
"overflow": "hidden",
|
|
51
|
+
"position": "absolute",
|
|
52
|
+
"white-space": "nowrap",
|
|
53
|
+
"word-wrap": "normal",
|
|
54
|
+
"margin": "-1px",
|
|
55
|
+
"padding": "0"
|
|
56
|
+
}
|
|
57
|
+
}, slots.default ? slots.default({ message: message.value }) : message.value));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<ErrorTemplate v-bind="{ statusCode, statusMessage, description, stack }" />
|
|
2
|
+
<ErrorTemplate v-bind="{ status, statusText, statusCode: status, statusMessage: statusText, description, stack }" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
@@ -16,9 +16,9 @@ const stacktrace = import.meta.dev && _error.stack ? _error.stack.split("\n").sp
|
|
|
16
16
|
internal: line.includes("node_modules") && !line.includes(".cache") || line.includes("internal") || line.includes("new Promise")
|
|
17
17
|
};
|
|
18
18
|
}).map((i) => `<span class="stack${i.internal ? " internal" : ""}">${escapeHtml(i.text)}</span>`).join("\n") : "";
|
|
19
|
-
const
|
|
20
|
-
const is404 =
|
|
21
|
-
const
|
|
19
|
+
const status = Number(_error.statusCode || 500);
|
|
20
|
+
const is404 = status === 404;
|
|
21
|
+
const statusText = _error.statusMessage ?? (is404 ? "Page Not Found" : "Internal Server Error");
|
|
22
22
|
const description = _error.message || _error.toString();
|
|
23
23
|
const stack = import.meta.dev && !is404 ? _error.description || `<pre>${stacktrace}</pre>` : void 0;
|
|
24
24
|
const _Error404 = defineAsyncComponent(() => import("./error-404.vue"));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, Teleport, computed, createStaticVNode, createVNode, defineComponent, getCurrentInstance, h, nextTick, onBeforeUnmount, onMounted, ref, shallowRef, toRaw, watch, withMemo } from "vue";
|
|
2
2
|
import { debounce } from "perfect-debounce";
|
|
3
3
|
import { hash } from "ohash";
|
|
4
|
-
import { appendResponseHeader } from "h3";
|
|
4
|
+
import { appendResponseHeader } from "@nuxt/nitro-server/h3";
|
|
5
5
|
import { randomUUID } from "uncrypto";
|
|
6
6
|
import { joinURL, withQuery } from "ufo";
|
|
7
7
|
import { useNuxtApp, useRuntimeConfig } from "../nuxt.js";
|
|
@@ -195,7 +195,7 @@ export default defineComponent({
|
|
|
195
195
|
props: props.props ? JSON.stringify(props.props) : void 0
|
|
196
196
|
}));
|
|
197
197
|
if (!r.ok) {
|
|
198
|
-
throw createError({
|
|
198
|
+
throw createError({ status: r.status, statusText: r.statusText });
|
|
199
199
|
}
|
|
200
200
|
try {
|
|
201
201
|
const result = await r.json();
|
|
@@ -260,6 +260,12 @@ export default defineComponent({
|
|
|
260
260
|
if (import.meta.client) {
|
|
261
261
|
watch(props, debounce(() => fetchComponent(), 100), { deep: true });
|
|
262
262
|
}
|
|
263
|
+
if (import.meta.client && instance.vnode.el) {
|
|
264
|
+
const headData = toRaw(nuxtApp.payload.data[`${props.name}_${hashId.value}`])?.head;
|
|
265
|
+
if (headData) {
|
|
266
|
+
activeHead = head.push(headData);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
263
269
|
if (import.meta.client && !instance.vnode.el && props.lazy) {
|
|
264
270
|
fetchComponent();
|
|
265
271
|
} else if (import.meta.server || !instance.vnode.el || !nuxtApp.payload.serverRendered) {
|