@nuxt/nitro-server-nightly 3.20.1-29374451.1be1abb7 → 3.20.1-29374540.22311a62
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 +4 -4
- package/dist/index.mjs +4 -3
- package/dist/runtime/handlers/error.js +1 -1
- package/dist/runtime/handlers/renderer.js +1 -0
- package/dist/runtime/templates/error-500.js +1 -1
- package/dist/runtime/utils/cache.js +1 -0
- package/dist/runtime/utils/dev.d.ts +3 -1
- package/dist/runtime/utils/dev.js +9 -3
- package/dist/runtime/utils/renderer/app.js +1 -0
- package/dist/runtime/utils/renderer/build-files.js +1 -0
- package/dist/runtime/utils/renderer/payload.js +1 -0
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
[](https://nuxt.com)
|
|
2
2
|
|
|
3
3
|
# Nuxt
|
|
4
4
|
|
|
5
5
|
<p>
|
|
6
6
|
<a href="https://www.npmjs.com/package/nuxt"><img src="https://img.shields.io/npm/v/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Version"></a>
|
|
7
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/
|
|
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
9
|
<a href="https://nuxt.com"><img src="https://img.shields.io/badge/Nuxt%20Docs-18181B?logo=nuxt" alt="Website"></a>
|
|
10
10
|
<a href="https://chat.nuxt.dev"><img src="https://img.shields.io/badge/Nuxt%20Discord-18181B?logo=discord" alt="Discord"></a>
|
|
11
11
|
<a href="https://securityscorecards.dev/"><img src="https://api.securityscorecards.dev/projects/github.com/nuxt/nuxt/badge" alt="Nuxt openssf scorecard score"></a>
|
|
@@ -109,9 +109,9 @@ Follow the docs to [Set Up Your Local Development Environment](https://nuxt.com/
|
|
|
109
109
|
## <a name="follow-us">🔗 Follow Us</a>
|
|
110
110
|
|
|
111
111
|
<p valign="center">
|
|
112
|
-
<a href="https://go.nuxt.com/discord"><img width="20px" src="https://github.com/nuxt/nuxt/
|
|
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
113
|
</p>
|
|
114
114
|
|
|
115
115
|
## <a name="license">⚖️ License</a>
|
|
116
116
|
|
|
117
|
-
[MIT](https://github.com/nuxt/nuxt/
|
|
117
|
+
[MIT](https://github.com/nuxt/nuxt/blob/main/LICENSE)
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
2
2
|
import { existsSync, promises, readFileSync } from 'node:fs';
|
|
3
3
|
import { cpus } from 'node:os';
|
|
4
|
+
import process from 'node:process';
|
|
4
5
|
import { readFile, mkdir, writeFile } from 'node:fs/promises';
|
|
5
6
|
import { randomUUID } from 'node:crypto';
|
|
6
7
|
import { dirname, relative, resolve, join, isAbsolute } from 'pathe';
|
|
@@ -8,7 +9,7 @@ import { readPackageJSON } from 'pkg-types';
|
|
|
8
9
|
import { toRouteMatcher, createRouter, exportMatcher } from 'radix3';
|
|
9
10
|
import { withTrailingSlash, joinURL } from 'ufo';
|
|
10
11
|
import { createNitro, scanHandlers, writeTypes, copyPublicAssets, prepare, build, prerender, createDevServer } from 'nitropack';
|
|
11
|
-
import { getLayerDirectories, resolveNuxtModule, addTemplate, resolveAlias, addPlugin, resolveIgnorePatterns, createIsIgnored, addVitePlugin, logger, findPath } from '@nuxt/kit';
|
|
12
|
+
import { getLayerDirectories, getDirectory, resolveNuxtModule, addTemplate, resolveAlias, addPlugin, resolveIgnorePatterns, createIsIgnored, addVitePlugin, logger, findPath } from '@nuxt/kit';
|
|
12
13
|
import escapeRE from 'escape-string-regexp';
|
|
13
14
|
import { defu } from 'defu';
|
|
14
15
|
import { dynamicEventHandler, defineEventHandler } from 'h3';
|
|
@@ -16,7 +17,7 @@ import { isWindows } from 'std-env';
|
|
|
16
17
|
import { ImpoundPlugin } from 'impound';
|
|
17
18
|
import { resolveModulePath } from 'exsolve';
|
|
18
19
|
|
|
19
|
-
const version = "3.20.1-
|
|
20
|
+
const version = "3.20.1-29374540.22311a62";
|
|
20
21
|
|
|
21
22
|
function toArray(value) {
|
|
22
23
|
return Array.isArray(value) ? value : [value];
|
|
@@ -171,7 +172,7 @@ async function bundle(nuxt) {
|
|
|
171
172
|
for (const m of nuxt.options._installedModules) {
|
|
172
173
|
const path = m.meta?.rawPath || m.entryPath;
|
|
173
174
|
if (path) {
|
|
174
|
-
moduleEntryPaths.push(path);
|
|
175
|
+
moduleEntryPaths.push(getDirectory(path));
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
const modules = await resolveNuxtModule(rootDirWithSlash, moduleEntryPaths);
|
|
@@ -58,7 +58,7 @@ export default (async function errorhandler(error, event, { defaultHandler }) {
|
|
|
58
58
|
setResponseStatus(event, res.status && res.status !== 200 ? res.status : defaultRes.status, res.statusText || defaultRes.statusText);
|
|
59
59
|
if (import.meta.dev) {
|
|
60
60
|
const prettyResponse = await defaultHandler(error, event, { json: false });
|
|
61
|
-
return send(event, html.replace("</body>", `${generateErrorOverlayHTML(prettyResponse.body)}</body>`));
|
|
61
|
+
return send(event, html.replace("</body>", `${generateErrorOverlayHTML(prettyResponse.body, { startMinimized: 300 <= statusCode && statusCode < 500 })}</body>`));
|
|
62
62
|
}
|
|
63
63
|
return send(event, html);
|
|
64
64
|
});
|
|
@@ -2,5 +2,5 @@ import { escapeHtml } from "@vue/shared";
|
|
|
2
2
|
const _messages = { "appName": "Nuxt", "version": "", "statusCode": 500, "statusMessage": "Server error", "description": "This page is temporarily unavailable." };
|
|
3
3
|
export const template = (messages) => {
|
|
4
4
|
messages = { ..._messages, ...messages };
|
|
5
|
-
return '<!DOCTYPE html><html lang="en"><head><title>' + escapeHtml(messages.statusCode) + " - " + escapeHtml(messages.statusMessage) + " | " + escapeHtml(messages.appName) + `</title><meta charset="utf-8"><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0" name="viewport"><style>.spotlight{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}*,: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}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: }.fixed{position:fixed}.-bottom-1\\/2{bottom:-50%}.left-0{left:0}.right-0{right:0}.grid{display:grid}.mb-16{margin-bottom:4rem}.mb-8{margin-bottom:2rem}.h-1\\/2{height:50%}.max-w-520px{max-width:520px}.min-h-screen{min-height:100vh}.place-content-center{place-content:center}.overflow-hidden{overflow:hidden}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8{padding-left:2rem;padding-right:2rem}.text-center{text-align:center}.text-8xl{font-size:6rem;line-height:1}.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))}.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}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media
|
|
5
|
+
return '<!DOCTYPE html><html lang="en"><head><title>' + escapeHtml(messages.statusCode) + " - " + escapeHtml(messages.statusMessage) + " | " + escapeHtml(messages.appName) + `</title><meta charset="utf-8"><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0" name="viewport"><style>.spotlight{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}*,: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}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: }.fixed{position:fixed}.-bottom-1\\/2{bottom:-50%}.left-0{left:0}.right-0{right:0}.grid{display:grid}.mb-16{margin-bottom:4rem}.mb-8{margin-bottom:2rem}.h-1\\/2{height:50%}.max-w-520px{max-width:520px}.min-h-screen{min-height:100vh}.place-content-center{place-content:center}.overflow-hidden{overflow:hidden}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8{padding-left:2rem;padding-right:2rem}.text-center{text-align:center}.text-8xl{font-size:6rem;line-height:1}.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))}.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}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-black{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\\:px-0{padding-left:0;padding-right:0}.sm\\:text-4xl{font-size:2.25rem;line-height:2.5rem}}</style><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></head><body class="antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"><div class="-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight"></div><div class="max-w-520px text-center"><h1 class="font-medium mb-8 sm:text-10xl text-8xl">` + escapeHtml(messages.statusCode) + '</h1><p class="font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl">' + escapeHtml(messages.description) + "</p></div></body></html>";
|
|
6
6
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useStorage } from "#internal/nitro";
|
|
2
|
+
import process from "node:process";
|
|
2
3
|
export const payloadCache = import.meta.prerender ? useStorage("internal:nuxt:prerender:payload") : null;
|
|
3
4
|
export const islandCache = import.meta.prerender ? useStorage("internal:nuxt:prerender:island") : null;
|
|
4
5
|
export const islandPropCache = import.meta.prerender ? useStorage("internal:nuxt:prerender:island-props") : null;
|
|
@@ -151,6 +151,7 @@ const errorCSS = (
|
|
|
151
151
|
top: 0;
|
|
152
152
|
width: 100vw;
|
|
153
153
|
height: 100vh;
|
|
154
|
+
border: none;
|
|
154
155
|
z-index: var(--z-base);
|
|
155
156
|
}
|
|
156
157
|
#frame[inert] {
|
|
@@ -212,7 +213,7 @@ const errorCSS = (
|
|
|
212
213
|
}
|
|
213
214
|
`
|
|
214
215
|
);
|
|
215
|
-
function webComponentScript(base64HTML) {
|
|
216
|
+
function webComponentScript(base64HTML, startMinimized) {
|
|
216
217
|
return (
|
|
217
218
|
/* js */
|
|
218
219
|
`
|
|
@@ -306,6 +307,11 @@ function webComponentScript(base64HTML) {
|
|
|
306
307
|
shadow.appendChild(preview);
|
|
307
308
|
shadow.appendChild(button);
|
|
308
309
|
|
|
310
|
+
if (${startMinimized}) {
|
|
311
|
+
iframe.setAttribute('inert', '');
|
|
312
|
+
button.setAttribute('aria-expanded', 'false');
|
|
313
|
+
}
|
|
314
|
+
|
|
309
315
|
// Initialize preview
|
|
310
316
|
setTimeout(updatePreview, 100);
|
|
311
317
|
|
|
@@ -316,13 +322,13 @@ function webComponentScript(base64HTML) {
|
|
|
316
322
|
`
|
|
317
323
|
);
|
|
318
324
|
}
|
|
319
|
-
export function generateErrorOverlayHTML(html) {
|
|
325
|
+
export function generateErrorOverlayHTML(html, options) {
|
|
320
326
|
const nonce = Array.from(crypto.getRandomValues(new Uint8Array(16)), (b) => b.toString(16).padStart(2, "0")).join("");
|
|
321
327
|
const errorPage = html.replace("<head>", `<head><script>${iframeStorageBridge(nonce)}<\/script>`);
|
|
322
328
|
const base64HTML = Buffer.from(errorPage, "utf8").toString("base64");
|
|
323
329
|
return `
|
|
324
330
|
<script>${parentStorageBridge(nonce)}<\/script>
|
|
325
331
|
<nuxt-error-overlay></nuxt-error-overlay>
|
|
326
|
-
<script>${webComponentScript(base64HTML)}<\/script>
|
|
332
|
+
<script>${webComponentScript(base64HTML, options?.startMinimized ?? false)}<\/script>
|
|
327
333
|
`;
|
|
328
334
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/nitro-server-nightly",
|
|
3
|
-
"version": "3.20.1-
|
|
3
|
+
"version": "3.20.1-29374540.22311a62",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@nuxt/devalue": "^2.0.2",
|
|
22
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@3.20.1-
|
|
23
|
-
"@unhead/vue": "^2.0.
|
|
24
|
-
"@vue/shared": "^3.5.
|
|
22
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@3.20.1-29374540.22311a62",
|
|
23
|
+
"@unhead/vue": "^2.0.19",
|
|
24
|
+
"@vue/shared": "^3.5.23",
|
|
25
25
|
"consola": "^3.4.2",
|
|
26
26
|
"defu": "^6.1.4",
|
|
27
27
|
"destr": "^2.0.5",
|
|
28
|
-
"devalue": "^5.
|
|
28
|
+
"devalue": "^5.4.2",
|
|
29
29
|
"errx": "^0.1.0",
|
|
30
30
|
"escape-string-regexp": "^5.0.0",
|
|
31
31
|
"exsolve": "^1.0.7",
|
|
@@ -33,24 +33,24 @@
|
|
|
33
33
|
"impound": "^1.0.0",
|
|
34
34
|
"klona": "^2.0.6",
|
|
35
35
|
"mocked-exports": "^0.1.1",
|
|
36
|
-
"nitropack": "^2.12.
|
|
36
|
+
"nitropack": "^2.12.9",
|
|
37
37
|
"pathe": "^2.0.3",
|
|
38
38
|
"pkg-types": "^2.3.0",
|
|
39
39
|
"radix3": "^1.1.2",
|
|
40
|
-
"std-env": "^3.
|
|
40
|
+
"std-env": "^3.10.0",
|
|
41
41
|
"ufo": "^1.6.1",
|
|
42
42
|
"unctx": "^2.4.1",
|
|
43
|
-
"unstorage": "^1.17.
|
|
44
|
-
"vue": "^3.5.
|
|
43
|
+
"unstorage": "^1.17.2",
|
|
44
|
+
"vue": "^3.5.23",
|
|
45
45
|
"vue-bundle-renderer": "^2.2.0",
|
|
46
46
|
"vue-devtools-stub": "^0.1.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"nuxt": "npm:nuxt-nightly@3.20.1-
|
|
49
|
+
"nuxt": "npm:nuxt-nightly@3.20.1-29374540.22311a62"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@3.20.1-
|
|
53
|
-
"nuxt": "npm:nuxt-nightly@3.20.1-
|
|
52
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@3.20.1-29374540.22311a62",
|
|
53
|
+
"nuxt": "npm:nuxt-nightly@3.20.1-29374540.22311a62",
|
|
54
54
|
"unbuild": "3.6.1",
|
|
55
55
|
"vitest": "3.2.4"
|
|
56
56
|
},
|