nuxt-nightly 4.2.0-29332219.8d8a7e01 → 4.2.0-29333792.e060b969
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/components/nuxt-error-page.vue +1 -1
- package/dist/core/runtime/nitro/handlers/error.js +6 -1
- package/dist/core/runtime/nitro/utils/dev.d.ts +1 -0
- package/dist/core/runtime/nitro/utils/dev.js +328 -0
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
- package/dist/app/components/error-dev.d.vue.ts +0 -17
- package/dist/app/components/error-dev.vue +0 -46
- package/dist/app/components/error-dev.vue.d.ts +0 -17
- package/dist/core/runtime/nitro/templates/error-dev.d.ts +0 -2
- package/dist/core/runtime/nitro/templates/error-dev.js +0 -6
|
@@ -21,6 +21,6 @@ const statusMessage = _error.statusMessage ?? (is404 ? "Page Not Found" : "Inter
|
|
|
21
21
|
const description = _error.message || _error.toString();
|
|
22
22
|
const stack = import.meta.dev && !is404 ? _error.description || `<pre>${stacktrace}</pre>` : void 0;
|
|
23
23
|
const _Error404 = defineAsyncComponent(() => import("./error-404.vue"));
|
|
24
|
-
const _Error =
|
|
24
|
+
const _Error = defineAsyncComponent(() => import("./error-500.vue"));
|
|
25
25
|
const ErrorTemplate = is404 ? _Error404 : _Error;
|
|
26
26
|
</script>
|
|
@@ -2,6 +2,7 @@ import { joinURL, withQuery, withoutBase } from "ufo";
|
|
|
2
2
|
import { appendResponseHeader, getRequestHeaders, send, setResponseHeader, setResponseHeaders, setResponseStatus } from "h3";
|
|
3
3
|
import { useNitroApp, useRuntimeConfig } from "nitropack/runtime";
|
|
4
4
|
import { isJsonRequest } from "../utils/error.js";
|
|
5
|
+
import { generateErrorOverlayHTML } from "../utils/dev.js";
|
|
5
6
|
export default (async function errorhandler(error, event, { defaultHandler }) {
|
|
6
7
|
if (event.handled || isJsonRequest(event)) {
|
|
7
8
|
return;
|
|
@@ -38,7 +39,7 @@ export default (async function errorhandler(error, event, { defaultHandler }) {
|
|
|
38
39
|
return;
|
|
39
40
|
}
|
|
40
41
|
if (!res) {
|
|
41
|
-
const { template } =
|
|
42
|
+
const { template } = await import("../templates/error-500.js");
|
|
42
43
|
if (import.meta.dev) {
|
|
43
44
|
errorObject.description = errorObject.message;
|
|
44
45
|
}
|
|
@@ -54,5 +55,9 @@ export default (async function errorhandler(error, event, { defaultHandler }) {
|
|
|
54
55
|
setResponseHeader(event, header, value);
|
|
55
56
|
}
|
|
56
57
|
setResponseStatus(event, res.status && res.status !== 200 ? res.status : defaultRes.status, res.statusText || defaultRes.statusText);
|
|
58
|
+
if (import.meta.dev) {
|
|
59
|
+
const prettyResponse = await defaultHandler(error, event, { json: false });
|
|
60
|
+
return send(event, html.replace("</body>", `${generateErrorOverlayHTML(prettyResponse.body)}</body>`));
|
|
61
|
+
}
|
|
57
62
|
return send(event, html);
|
|
58
63
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function generateErrorOverlayHTML(html: string): string;
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
const iframeStorageBridge = (nonce) => (
|
|
2
|
+
/* js */
|
|
3
|
+
`
|
|
4
|
+
(function() {
|
|
5
|
+
const memoryStore = {};
|
|
6
|
+
|
|
7
|
+
const NONCE = ${JSON.stringify(nonce)}
|
|
8
|
+
|
|
9
|
+
const mockStorage = {
|
|
10
|
+
getItem: function(key) {
|
|
11
|
+
return memoryStore[key] !== undefined ? memoryStore[key] : null;
|
|
12
|
+
},
|
|
13
|
+
setItem: function(key, value) {
|
|
14
|
+
memoryStore[key] = String(value);
|
|
15
|
+
window.parent.postMessage({
|
|
16
|
+
type: 'storage-set',
|
|
17
|
+
key: key,
|
|
18
|
+
value: String(value),
|
|
19
|
+
nonce: NONCE
|
|
20
|
+
}, '*');
|
|
21
|
+
},
|
|
22
|
+
removeItem: function(key) {
|
|
23
|
+
delete memoryStore[key];
|
|
24
|
+
window.parent.postMessage({
|
|
25
|
+
type: 'storage-remove',
|
|
26
|
+
key: key,
|
|
27
|
+
nonce: NONCE
|
|
28
|
+
}, '*');
|
|
29
|
+
},
|
|
30
|
+
clear: function() {
|
|
31
|
+
for (const key in memoryStore) {
|
|
32
|
+
delete memoryStore[key];
|
|
33
|
+
}
|
|
34
|
+
window.parent.postMessage({
|
|
35
|
+
type: 'storage-clear',
|
|
36
|
+
nonce: NONCE
|
|
37
|
+
}, '*');
|
|
38
|
+
},
|
|
39
|
+
key: function(index) {
|
|
40
|
+
const keys = Object.keys(memoryStore);
|
|
41
|
+
return keys[index] !== undefined ? keys[index] : null;
|
|
42
|
+
},
|
|
43
|
+
get length() {
|
|
44
|
+
return Object.keys(memoryStore).length;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
Object.defineProperty(window, 'localStorage', {
|
|
50
|
+
value: mockStorage,
|
|
51
|
+
writable: false,
|
|
52
|
+
configurable: true
|
|
53
|
+
});
|
|
54
|
+
} catch (e) {
|
|
55
|
+
window.localStorage = mockStorage;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
window.addEventListener('message', function(event) {
|
|
59
|
+
if (event.data.type === 'storage-sync-data' && event.data.nonce === NONCE) {
|
|
60
|
+
const data = event.data.data;
|
|
61
|
+
for (const key in data) {
|
|
62
|
+
if (Object.prototype.hasOwnProperty.call(data, key)) {
|
|
63
|
+
memoryStore[key] = data[key];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (typeof window.initTheme === 'function') {
|
|
67
|
+
window.initTheme();
|
|
68
|
+
}
|
|
69
|
+
window.dispatchEvent(new Event('storage-ready'));
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
window.parent.postMessage({
|
|
74
|
+
type: 'storage-sync-request',
|
|
75
|
+
nonce: NONCE
|
|
76
|
+
}, '*');
|
|
77
|
+
})();
|
|
78
|
+
`
|
|
79
|
+
);
|
|
80
|
+
const parentStorageBridge = (nonce) => (
|
|
81
|
+
/* js */
|
|
82
|
+
`
|
|
83
|
+
(function() {
|
|
84
|
+
const host = document.querySelector('nuxt-error-overlay');
|
|
85
|
+
if (!host) return;
|
|
86
|
+
|
|
87
|
+
// Wait for shadow root to be attached
|
|
88
|
+
const checkShadow = setInterval(function() {
|
|
89
|
+
if (host.shadowRoot) {
|
|
90
|
+
clearInterval(checkShadow);
|
|
91
|
+
const iframe = host.shadowRoot.getElementById('frame');
|
|
92
|
+
if (!iframe) return;
|
|
93
|
+
|
|
94
|
+
const NONCE = ${JSON.stringify(nonce)}
|
|
95
|
+
|
|
96
|
+
window.addEventListener('message', function(event) {
|
|
97
|
+
if (!event.data || event.data.nonce !== NONCE) return;
|
|
98
|
+
|
|
99
|
+
const data = event.data;
|
|
100
|
+
|
|
101
|
+
if (data.type === 'storage-set') {
|
|
102
|
+
localStorage.setItem(data.key, data.value);
|
|
103
|
+
} else if (data.type === 'storage-remove') {
|
|
104
|
+
localStorage.removeItem(data.key);
|
|
105
|
+
} else if (data.type === 'storage-clear') {
|
|
106
|
+
localStorage.clear();
|
|
107
|
+
} else if (data.type === 'storage-sync-request') {
|
|
108
|
+
const allData = {};
|
|
109
|
+
for (let i = 0; i < localStorage.length; i++) {
|
|
110
|
+
const key = localStorage.key(i);
|
|
111
|
+
allData[key] = localStorage.getItem(key);
|
|
112
|
+
}
|
|
113
|
+
iframe.contentWindow.postMessage({
|
|
114
|
+
type: 'storage-sync-data',
|
|
115
|
+
data: allData,
|
|
116
|
+
nonce: NONCE
|
|
117
|
+
}, '*');
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}, 10);
|
|
122
|
+
})();
|
|
123
|
+
`
|
|
124
|
+
);
|
|
125
|
+
const errorCSS = (
|
|
126
|
+
/* css */
|
|
127
|
+
`
|
|
128
|
+
:host {
|
|
129
|
+
--preview-width: 240px;
|
|
130
|
+
--preview-height: 180px;
|
|
131
|
+
--base-width: 1200px;
|
|
132
|
+
--base-height: 900px;
|
|
133
|
+
--z-base: 999999998;
|
|
134
|
+
all: initial;
|
|
135
|
+
display: contents;
|
|
136
|
+
}
|
|
137
|
+
.sr-only {
|
|
138
|
+
position: absolute;
|
|
139
|
+
width: 1px;
|
|
140
|
+
height: 1px;
|
|
141
|
+
padding: 0;
|
|
142
|
+
margin: -1px;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
clip: rect(0, 0, 0, 0);
|
|
145
|
+
white-space: nowrap;
|
|
146
|
+
border-width: 0;
|
|
147
|
+
}
|
|
148
|
+
#frame {
|
|
149
|
+
position: fixed;
|
|
150
|
+
left: 0;
|
|
151
|
+
top: 0;
|
|
152
|
+
width: 100vw;
|
|
153
|
+
height: 100vh;
|
|
154
|
+
z-index: var(--z-base);
|
|
155
|
+
}
|
|
156
|
+
#frame[inert] {
|
|
157
|
+
right: 5px;
|
|
158
|
+
bottom: 5px;
|
|
159
|
+
left: auto;
|
|
160
|
+
top: auto;
|
|
161
|
+
width: var(--base-width);
|
|
162
|
+
height: var(--base-height);
|
|
163
|
+
transform: scale(calc(240 / 1200));
|
|
164
|
+
transform-origin: bottom right;
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
border-radius: calc(1200 * 8px / 240);
|
|
167
|
+
}
|
|
168
|
+
#preview {
|
|
169
|
+
position: fixed;
|
|
170
|
+
right: 5px;
|
|
171
|
+
bottom: 5px;
|
|
172
|
+
width: var(--preview-width);
|
|
173
|
+
height: var(--preview-height);
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
border-radius: 8px;
|
|
176
|
+
pointer-events: none;
|
|
177
|
+
z-index: var(--z-base);
|
|
178
|
+
background: white;
|
|
179
|
+
display: none;
|
|
180
|
+
}
|
|
181
|
+
#frame:not([inert]) + #preview {
|
|
182
|
+
display: block;
|
|
183
|
+
}
|
|
184
|
+
#toggle {
|
|
185
|
+
position: fixed;
|
|
186
|
+
right: 5px;
|
|
187
|
+
bottom: 5px;
|
|
188
|
+
width: var(--preview-width);
|
|
189
|
+
height: var(--preview-height);
|
|
190
|
+
background: none;
|
|
191
|
+
border: 3px solid #00DC82;
|
|
192
|
+
border-radius: 8px;
|
|
193
|
+
cursor: pointer;
|
|
194
|
+
opacity: 0.8;
|
|
195
|
+
transition: opacity 0.2s, box-shadow 0.2s;
|
|
196
|
+
z-index: calc(var(--z-base) + 1);
|
|
197
|
+
}
|
|
198
|
+
#toggle:hover,
|
|
199
|
+
#toggle:focus {
|
|
200
|
+
opacity: 1;
|
|
201
|
+
box-shadow: 0 0 20px rgba(0, 220, 130, 0.6);
|
|
202
|
+
}
|
|
203
|
+
#toggle:focus-visible {
|
|
204
|
+
outline: 3px solid #00DC82;
|
|
205
|
+
outline-offset: 3px;
|
|
206
|
+
box-shadow: 0 0 24px rgba(0, 220, 130, 0.8);
|
|
207
|
+
}
|
|
208
|
+
@media (prefers-reduced-motion: reduce) {
|
|
209
|
+
#toggle {
|
|
210
|
+
transition: none;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
`
|
|
214
|
+
);
|
|
215
|
+
function webComponentScript(base64HTML) {
|
|
216
|
+
return (
|
|
217
|
+
/* js */
|
|
218
|
+
`
|
|
219
|
+
(function() {
|
|
220
|
+
try {
|
|
221
|
+
const host = document.querySelector('nuxt-error-overlay');
|
|
222
|
+
if (!host) return;
|
|
223
|
+
|
|
224
|
+
const shadow = host.attachShadow({ mode: 'open' });
|
|
225
|
+
|
|
226
|
+
// Create elements
|
|
227
|
+
const style = document.createElement('style');
|
|
228
|
+
style.textContent = ${JSON.stringify(errorCSS)};
|
|
229
|
+
|
|
230
|
+
const iframe = document.createElement('iframe');
|
|
231
|
+
iframe.id = 'frame';
|
|
232
|
+
iframe.src = 'data:text/html;base64,${base64HTML}';
|
|
233
|
+
iframe.title = 'Detailed error stack trace';
|
|
234
|
+
iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin');
|
|
235
|
+
|
|
236
|
+
const preview = document.createElement('div');
|
|
237
|
+
preview.id = 'preview';
|
|
238
|
+
|
|
239
|
+
const button = document.createElement('button');
|
|
240
|
+
button.id = 'toggle';
|
|
241
|
+
button.setAttribute('aria-expanded', 'true');
|
|
242
|
+
button.setAttribute('type', 'button');
|
|
243
|
+
button.innerHTML = '<span class="sr-only">Toggle detailed error view</span>';
|
|
244
|
+
|
|
245
|
+
const liveRegion = document.createElement('div');
|
|
246
|
+
liveRegion.setAttribute('role', 'status');
|
|
247
|
+
liveRegion.setAttribute('aria-live', 'polite');
|
|
248
|
+
liveRegion.className = 'sr-only';
|
|
249
|
+
|
|
250
|
+
// Update preview snapshot
|
|
251
|
+
function updatePreview() {
|
|
252
|
+
try {
|
|
253
|
+
let previewIframe = preview.querySelector('iframe');
|
|
254
|
+
if (!previewIframe) {
|
|
255
|
+
previewIframe = document.createElement('iframe');
|
|
256
|
+
previewIframe.style.cssText = 'width: 1200px; height: 900px; transform: scale(0.2); transform-origin: top left; border: none;';
|
|
257
|
+
previewIframe.setAttribute('sandbox', 'allow-scripts allow-same-origin');
|
|
258
|
+
preview.appendChild(previewIframe);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const doctype = document.doctype ? '<!DOCTYPE ' + document.doctype.name + '>' : '';
|
|
262
|
+
const cleanedHTML = document.documentElement.outerHTML
|
|
263
|
+
.replace(/<nuxt-error-overlay[^>]*>.*?<\\/nuxt-error-overlay>/gs, '')
|
|
264
|
+
.replace(/<script[^>]*>.*?<\\/script>/gs, '');
|
|
265
|
+
|
|
266
|
+
const iframeDoc = previewIframe.contentDocument || previewIframe.contentWindow.document;
|
|
267
|
+
iframeDoc.open();
|
|
268
|
+
iframeDoc.write(doctype + cleanedHTML);
|
|
269
|
+
iframeDoc.close();
|
|
270
|
+
} catch (error) {
|
|
271
|
+
console.error('Failed to update preview:', error);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
function toggleView() {
|
|
276
|
+
const isMinimized = iframe.hasAttribute('inert');
|
|
277
|
+
|
|
278
|
+
if (isMinimized) {
|
|
279
|
+
updatePreview();
|
|
280
|
+
iframe.removeAttribute('inert');
|
|
281
|
+
button.setAttribute('aria-expanded', 'true');
|
|
282
|
+
liveRegion.textContent = 'Showing detailed error view';
|
|
283
|
+
setTimeout(function() {
|
|
284
|
+
try { iframe.contentWindow.focus(); } catch {}
|
|
285
|
+
}, 100);
|
|
286
|
+
} else {
|
|
287
|
+
iframe.setAttribute('inert', '');
|
|
288
|
+
button.setAttribute('aria-expanded', 'false');
|
|
289
|
+
liveRegion.textContent = 'Showing error page';
|
|
290
|
+
button.focus();
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
button.onclick = toggleView;
|
|
295
|
+
|
|
296
|
+
document.addEventListener('keydown', function(e) {
|
|
297
|
+
if ((e.key === 'Escape' || e.key === 'Esc') && !iframe.hasAttribute('inert')) {
|
|
298
|
+
toggleView();
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
// Append to shadow DOM
|
|
303
|
+
shadow.appendChild(style);
|
|
304
|
+
shadow.appendChild(liveRegion);
|
|
305
|
+
shadow.appendChild(iframe);
|
|
306
|
+
shadow.appendChild(preview);
|
|
307
|
+
shadow.appendChild(button);
|
|
308
|
+
|
|
309
|
+
// Initialize preview
|
|
310
|
+
setTimeout(updatePreview, 100);
|
|
311
|
+
|
|
312
|
+
} catch (error) {
|
|
313
|
+
console.error('Failed to initialize Nuxt error overlay:', error);
|
|
314
|
+
}
|
|
315
|
+
})();
|
|
316
|
+
`
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
export function generateErrorOverlayHTML(html) {
|
|
320
|
+
const nonce = Array.from(crypto.getRandomValues(new Uint8Array(16)), (b) => b.toString(16).padStart(2, "0")).join("");
|
|
321
|
+
const errorPage = html.replace("<head>", `<head><script>${iframeStorageBridge(nonce)}<\/script>`);
|
|
322
|
+
const base64HTML = Buffer.from(errorPage, "utf8").toString("base64");
|
|
323
|
+
return `
|
|
324
|
+
<script>${parentStorageBridge(nonce)}<\/script>
|
|
325
|
+
<nuxt-error-overlay></nuxt-error-overlay>
|
|
326
|
+
<script>${webComponentScript(base64HTML)}<\/script>
|
|
327
|
+
`;
|
|
328
|
+
}
|
package/dist/index.mjs
CHANGED
|
@@ -3830,7 +3830,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
3830
3830
|
});
|
|
3831
3831
|
}
|
|
3832
3832
|
|
|
3833
|
-
const version = "4.2.0-
|
|
3833
|
+
const version = "4.2.0-29333792.e060b969";
|
|
3834
3834
|
|
|
3835
3835
|
const createImportProtectionPatterns = (nuxt, options) => {
|
|
3836
3836
|
const patterns = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-nightly",
|
|
3
|
-
"version": "4.2.0-
|
|
3
|
+
"version": "4.2.0-29333792.e060b969",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"@nuxt/cli": "npm:@nuxt/cli-nightly@latest",
|
|
68
68
|
"@nuxt/devalue": "^2.0.2",
|
|
69
69
|
"@nuxt/devtools": "^2.6.5",
|
|
70
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.0-
|
|
71
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.0-
|
|
70
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.0-29333792.e060b969",
|
|
71
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.0-29333792.e060b969",
|
|
72
72
|
"@nuxt/telemetry": "^2.6.6",
|
|
73
|
-
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.2.0-
|
|
73
|
+
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.2.0-29333792.e060b969",
|
|
74
74
|
"@unhead/vue": "^2.0.14",
|
|
75
75
|
"@vue/shared": "^3.5.22",
|
|
76
76
|
"c12": "^3.3.0",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare const _default: typeof __VLS_export;
|
|
2
|
-
export default _default;
|
|
3
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
-
$props: Partial<typeof props>;
|
|
5
|
-
appName: string;
|
|
6
|
-
statusCode: number;
|
|
7
|
-
statusMessage: string;
|
|
8
|
-
description: string;
|
|
9
|
-
stack: string;
|
|
10
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
-
declare const props: {
|
|
12
|
-
readonly appName: string;
|
|
13
|
-
readonly statusCode: number;
|
|
14
|
-
readonly statusMessage: string;
|
|
15
|
-
readonly description: string;
|
|
16
|
-
readonly stack: string;
|
|
17
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { useHead } from "#imports";
|
|
3
|
-
const props = defineProps({
|
|
4
|
-
appName: {
|
|
5
|
-
type: String,
|
|
6
|
-
default: "Nuxt"
|
|
7
|
-
},
|
|
8
|
-
statusCode: {
|
|
9
|
-
type: Number,
|
|
10
|
-
default: 500
|
|
11
|
-
},
|
|
12
|
-
statusMessage: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: "Server error"
|
|
15
|
-
},
|
|
16
|
-
description: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: "An error occurred in the application and the page could not be served."
|
|
19
|
-
},
|
|
20
|
-
stack: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: ""
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
useHead({
|
|
26
|
-
title: `${props.statusCode} - ${props.statusMessage || "Internal Server Error"}`,
|
|
27
|
-
script: [
|
|
28
|
-
{
|
|
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)}}();`
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
style: [
|
|
33
|
-
{
|
|
34
|
-
innerHTML: `*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
});
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<template>
|
|
41
|
-
<div class="antialiased bg-white dark:bg-[#020420] dark:text-white flex flex-col font-sans min-h-screen pt-12 px-10 text-black"><h1 class="font-medium mb-4 sm:text-8xl text-6xl" v-text="statusCode" /><p class="font-light leading-tight mb-8 sm:text-2xl text-xl" v-text="description" /><a href="https://nuxt.com/docs/4.x/getting-started/error-handling?utm_source=nuxt-error-dev-page" target="_blank" class="absolute font-medium hover:text-[#00DC82] hover:underline inline-block mx-auto sm:right-6 text-sm top-6 underline-offset-3">Customize this page</a><div class="bg-gray-50/50 border border-b-0 border-black/5 dark:bg-white/5 dark:border-white/10 flex-1 h-auto overflow-y-auto rounded-t-md"><div class="font-light leading-tight p-8 text-xl z-10" v-html="stack" /></div></div>
|
|
42
|
-
</template>
|
|
43
|
-
|
|
44
|
-
<style scoped>
|
|
45
|
-
.absolute{position:absolute}.top-6{top:1.5rem}.z-10{z-index:10}.mx-auto{margin-left:auto;margin-right:auto}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.inline-block{display:inline-block}.h-auto{height:auto}.min-h-screen{min-height:100vh}.flex{display:flex}.flex-1{flex:1 1 0%}.flex-col{flex-direction:column}.overflow-y-auto{overflow-y:auto}.border{border-width:1px}.border-b-0{border-bottom-width:0}.border-black\/5{border-color:#0000000d}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.bg-gray-50\/50{background-color:#f5f5f580}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.p-8{padding:2rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.pt-12{padding-top:3rem}.text-6xl{font-size:3.75rem;line-height:1}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-black{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.hover\:text-\[\#00DC82\]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-light{font-weight:300}.font-medium{font-weight:500}.leading-tight{line-height:1.25}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.hover\:underline:hover{text-decoration-line:underline}.underline-offset-3{text-underline-offset:3px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:border-white\/10{border-color:#ffffff1a}.dark\:bg-\[\#020420\]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:bg-white\/5{background-color:#ffffff0d}.dark\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:right-6{right:1.5rem}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-8xl{font-size:6rem;line-height:1}}
|
|
46
|
-
</style>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare const _default: typeof __VLS_export;
|
|
2
|
-
export default _default;
|
|
3
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
-
$props: Partial<typeof props>;
|
|
5
|
-
appName: string;
|
|
6
|
-
statusCode: number;
|
|
7
|
-
statusMessage: string;
|
|
8
|
-
description: string;
|
|
9
|
-
stack: string;
|
|
10
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
-
declare const props: {
|
|
12
|
-
readonly appName: string;
|
|
13
|
-
readonly statusCode: number;
|
|
14
|
-
readonly statusMessage: string;
|
|
15
|
-
readonly description: string;
|
|
16
|
-
readonly stack: string;
|
|
17
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { escapeHtml } from "@vue/shared";
|
|
2
|
-
const _messages = { "appName": "Nuxt", "statusCode": 500, "statusMessage": "Server error", "description": "An error occurred in the application and the page could not be served.", "stack": "" };
|
|
3
|
-
export const template = (messages) => {
|
|
4
|
-
messages = { ..._messages, ...messages };
|
|
5
|
-
return '<!DOCTYPE html><html lang="en"><head><title>' + escapeHtml(messages.statusCode) + " - " + escapeHtml(messages.statusMessage || "Internal Server Error") + `</title><meta charset="utf-8"><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0" name="viewport"><script>!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)}}();<\/script><style>*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.absolute{position:absolute}.top-6{top:1.5rem}.z-10{z-index:10}.mx-auto{margin-left:auto;margin-right:auto}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.inline-block{display:inline-block}.h-auto{height:auto}.min-h-screen{min-height:100vh}.flex{display:flex}.flex-1{flex:1 1 0%}.flex-col{flex-direction:column}.overflow-y-auto{overflow-y:auto}.border{border-width:1px}.border-b-0{border-bottom-width:0}.border-black\\/5{border-color:#0000000d}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.bg-gray-50\\/50{background-color:#f5f5f580}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.p-8{padding:2rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.pt-12{padding-top:3rem}.text-6xl{font-size:3.75rem;line-height:1}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-black{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.hover\\:text-\\[\\#00DC82\\]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-light{font-weight:300}.font-medium{font-weight:500}.leading-tight{line-height:1.25}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.hover\\:underline:hover{text-decoration-line:underline}.underline-offset-3{text-underline-offset:3px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\\:border-white\\/10{border-color:#ffffff1a}.dark\\:bg-\\[\\#020420\\]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\\:bg-white\\/5{background-color:#ffffff0d}.dark\\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\\:right-6{right:1.5rem}.sm\\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\\:text-8xl{font-size:6rem;line-height:1}}</style></head><body class="antialiased bg-white dark:bg-[#020420] dark:text-white flex flex-col font-sans min-h-screen pt-12 px-10 text-black"><h1 class="font-medium mb-4 sm:text-8xl text-6xl">` + escapeHtml(messages.statusCode) + '</h1><p class="font-light leading-tight mb-8 sm:text-2xl text-xl">' + escapeHtml(messages.description) + '</p><a href="https://nuxt.com/docs/4.x/getting-started/error-handling?utm_source=nuxt-error-dev-page" target="_blank" class="absolute font-medium hover:text-[#00DC82] hover:underline inline-block mx-auto sm:right-6 text-sm top-6 underline-offset-3">Customize this page</a><div class="bg-gray-50/50 border border-b-0 border-black/5 dark:bg-white/5 dark:border-white/10 flex-1 h-auto overflow-y-auto rounded-t-md"><div class="font-light leading-tight p-8 text-xl z-10">' + escapeHtml(messages.stack) + "</div></div></body></html>";
|
|
6
|
-
};
|