@nuxt/nitro-server-nightly 3.20.1-29374451.1be1abb7 → 3.20.1-29374520.e9e1c5b9
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/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 +5 -5
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-29374520.e9e1c5b9";
|
|
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
|
});
|
|
@@ -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-29374520.e9e1c5b9",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@nuxt/devalue": "^2.0.2",
|
|
22
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@3.20.1-
|
|
22
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@3.20.1-29374520.e9e1c5b9",
|
|
23
23
|
"@unhead/vue": "^2.0.14",
|
|
24
24
|
"@vue/shared": "^3.5.22",
|
|
25
25
|
"consola": "^3.4.2",
|
|
@@ -46,11 +46,11 @@
|
|
|
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-29374520.e9e1c5b9"
|
|
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-29374520.e9e1c5b9",
|
|
53
|
+
"nuxt": "npm:nuxt-nightly@3.20.1-29374520.e9e1c5b9",
|
|
54
54
|
"unbuild": "3.6.1",
|
|
55
55
|
"vitest": "3.2.4"
|
|
56
56
|
},
|