@nuxt/nitro-server-nightly 4.3.0-29356103.2f7957ac → 4.3.0-29430616.754c35a4
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 +8 -8
- package/dist/index.mjs +12 -8
- package/dist/runtime/handlers/error.js +2 -2
- package/dist/runtime/handlers/island.js +2 -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/error.d.ts +1 -1
- 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 -11
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>
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
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.
|
|
15
15
|
|
|
16
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,
|
|
17
|
+
- Server-side rendering, static site generation, hybrid rendering and edge-side rendering
|
|
18
18
|
- Automatic routing with code-splitting and pre-fetching
|
|
19
19
|
- Data fetching and state management
|
|
20
|
-
-
|
|
20
|
+
- Search engine optimization and defining meta tags
|
|
21
21
|
- Auto imports of components, composables and utils
|
|
22
22
|
- TypeScript with zero configuration
|
|
23
|
-
- Go
|
|
23
|
+
- Go full-stack with our server/ directory
|
|
24
24
|
- Extensible with [200+ modules](https://nuxt.com/modules)
|
|
25
25
|
- Deployment to a variety of [hosting platforms](https://nuxt.com/deploy)
|
|
26
26
|
- ...[and much more](https://nuxt.com) 🚀
|
|
@@ -31,7 +31,7 @@ It provides a number of features that make it easy to build fast, SEO-friendly,
|
|
|
31
31
|
- 💻 [ Vue Development](#vue-development)
|
|
32
32
|
- 📖 [Documentation](#documentation)
|
|
33
33
|
- 🧩 [Modules](#modules)
|
|
34
|
-
- ❤️
|
|
34
|
+
- ❤️ [Contribute](#contribute)
|
|
35
35
|
- 🏠 [Local Development](#local-development)
|
|
36
36
|
- 🛟 [Professional Support](#professional-support)
|
|
37
37
|
- 🔗 [Follow Us](#follow-us)
|
|
@@ -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 = "4.3.0-
|
|
20
|
+
const version = "4.3.0-29430616.754c35a4";
|
|
20
21
|
|
|
21
22
|
function toArray(value) {
|
|
22
23
|
return Array.isArray(value) ? value : [value];
|
|
@@ -43,11 +44,13 @@ function createImportProtectionPatterns(nuxt, options) {
|
|
|
43
44
|
"Importing directly from a `nuxt.config` file is not allowed. Instead, use runtime config or a module."
|
|
44
45
|
]);
|
|
45
46
|
patterns.push([/(^|node_modules\/)@vue\/composition-api/]);
|
|
46
|
-
for (const mod of nuxt.options.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
for (const mod of nuxt.options._installedModules) {
|
|
48
|
+
if (mod.entryPath) {
|
|
49
|
+
patterns.push([
|
|
50
|
+
new RegExp(`^${escapeRE(mod.entryPath)}$`),
|
|
51
|
+
"Importing directly from module entry-points is not allowed."
|
|
52
|
+
]);
|
|
53
|
+
}
|
|
51
54
|
}
|
|
52
55
|
for (const i of [/(^|node_modules\/)@nuxt\/(cli|kit|test-utils)/, /(^|node_modules\/)nuxi/, /(^|node_modules\/)nitro(?:pack)?(?:-nightly)?(?:$|\/)(?!(?:dist\/)?(?:node_modules|presets|runtime|types))/, /(^|node_modules\/)nuxt\/(config|kit|schema)/]) {
|
|
53
56
|
patterns.push([i, `This module cannot be imported in ${context}.`]);
|
|
@@ -195,7 +198,7 @@ async function bundle(nuxt) {
|
|
|
195
198
|
for (const m of nuxt.options._installedModules) {
|
|
196
199
|
const path = m.meta?.rawPath || m.entryPath;
|
|
197
200
|
if (path) {
|
|
198
|
-
moduleEntryPaths.push(path);
|
|
201
|
+
moduleEntryPaths.push(getDirectory(path));
|
|
199
202
|
}
|
|
200
203
|
}
|
|
201
204
|
const modules = await resolveNuxtModule(rootDirWithSlash, moduleEntryPaths);
|
|
@@ -327,6 +330,7 @@ async function bundle(nuxt) {
|
|
|
327
330
|
join(moduleDir, "dist/runtime/server")
|
|
328
331
|
];
|
|
329
332
|
}),
|
|
333
|
+
...layerDirs.map((dirs) => relativeWithDot(nuxt.options.buildDir, join(dirs.server, "**/*"))),
|
|
330
334
|
...layerDirs.map((dirs) => relativeWithDot(nuxt.options.buildDir, join(dirs.shared, "**/*.d.ts")))
|
|
331
335
|
],
|
|
332
336
|
exclude: [
|
|
@@ -55,9 +55,9 @@ export default (async function errorhandler(error, event, { defaultHandler }) {
|
|
|
55
55
|
setResponseHeader(event, header, value);
|
|
56
56
|
}
|
|
57
57
|
setResponseStatus(event, res.status && res.status !== 200 ? res.status : defaultRes.status, res.statusText || defaultRes.statusText);
|
|
58
|
-
if (import.meta.dev) {
|
|
58
|
+
if (import.meta.dev && !import.meta.test && typeof html === "string") {
|
|
59
59
|
const prettyResponse = await defaultHandler(error, event, { json: false });
|
|
60
|
-
return send(event, html.replace("</body>", `${generateErrorOverlayHTML(prettyResponse.body)}</body>`));
|
|
60
|
+
return send(event, html.replace("</body>", `${generateErrorOverlayHTML(prettyResponse.body, { startMinimized: 300 <= statusCode && statusCode < 500 })}</body>`));
|
|
61
61
|
}
|
|
62
62
|
return send(event, html);
|
|
63
63
|
});
|
|
@@ -60,8 +60,9 @@ export default defineEventHandler(async (event) => {
|
|
|
60
60
|
const currentValue = islandHead[key];
|
|
61
61
|
if (Array.isArray(currentValue)) {
|
|
62
62
|
currentValue.push(...value);
|
|
63
|
+
} else {
|
|
64
|
+
islandHead[key] = value;
|
|
63
65
|
}
|
|
64
|
-
islandHead[key] = value;
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
const islandResponse = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useStorage } from "nitropack/runtime";
|
|
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
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { H3Event } from 'h3';
|
|
2
2
|
/**
|
|
3
|
-
* Nitro internal functions extracted from https://github.com/nitrojs/nitro/blob/
|
|
3
|
+
* Nitro internal functions extracted from https://github.com/nitrojs/nitro/blob/v2/src/runtime/internal/utils.ts
|
|
4
4
|
*/
|
|
5
5
|
export declare function isJsonRequest(event: H3Event): boolean;
|
|
6
6
|
export declare function hasReqHeader(event: H3Event, name: string, includes: string): boolean | "" | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/nitro-server-nightly",
|
|
3
|
-
"version": "4.3.0-
|
|
3
|
+
"version": "4.3.0-29430616.754c35a4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -19,38 +19,38 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@nuxt/devalue": "^2.0.2",
|
|
22
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-
|
|
22
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-29430616.754c35a4",
|
|
23
23
|
"@unhead/vue": "^2.0.19",
|
|
24
|
-
"@vue/shared": "^3.5.
|
|
24
|
+
"@vue/shared": "^3.5.25",
|
|
25
25
|
"consola": "^3.4.2",
|
|
26
26
|
"defu": "^6.1.4",
|
|
27
27
|
"destr": "^2.0.5",
|
|
28
|
-
"devalue": "^5.
|
|
28
|
+
"devalue": "^5.6.0",
|
|
29
29
|
"errx": "^0.1.0",
|
|
30
30
|
"escape-string-regexp": "^5.0.0",
|
|
31
|
-
"exsolve": "^1.0.
|
|
31
|
+
"exsolve": "^1.0.8",
|
|
32
32
|
"h3": "^1.15.4",
|
|
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
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.3",
|
|
44
|
+
"vue": "^3.5.25",
|
|
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@4.3.0-
|
|
49
|
+
"nuxt": "npm:nuxt-nightly@4.3.0-29430616.754c35a4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-
|
|
53
|
-
"nuxt": "npm:nuxt-nightly@4.3.0-
|
|
52
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-29430616.754c35a4",
|
|
53
|
+
"nuxt": "npm:nuxt-nightly@4.3.0-29430616.754c35a4",
|
|
54
54
|
"unbuild": "3.6.1",
|
|
55
55
|
"vitest": "3.2.4"
|
|
56
56
|
},
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"_name": "@nuxt/nitro-server",
|
|
61
61
|
"scripts": {
|
|
62
|
+
"build:stub": "unbuild --stub",
|
|
62
63
|
"test:attw": "attw --pack"
|
|
63
64
|
}
|
|
64
65
|
}
|