@nuxt/cli-nightly 3.26.3-20250720-114545-ef541a6 → 3.26.3-20250720-163706-de503a3
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/chunks/add.mjs +3 -3
- package/dist/chunks/add2.mjs +1 -1
- package/dist/chunks/analyze.mjs +1 -1
- package/dist/chunks/build.mjs +1 -1
- package/dist/chunks/cleanup.mjs +1 -1
- package/dist/chunks/dev-child.mjs +1 -1
- package/dist/chunks/dev.mjs +7 -6
- package/dist/chunks/devtools.mjs +1 -1
- package/dist/chunks/generate.mjs +1 -1
- package/dist/chunks/index.mjs +56 -70
- package/dist/chunks/info.mjs +2 -2
- package/dist/chunks/init.mjs +3 -3
- package/dist/chunks/prepare.mjs +1 -1
- package/dist/chunks/preview.mjs +1 -1
- package/dist/chunks/search.mjs +1 -1
- package/dist/chunks/test.mjs +1 -1
- package/dist/chunks/typecheck.mjs +1 -1
- package/dist/chunks/upgrade.mjs +1 -1
- package/dist/dev/index.d.mts +6 -10
- package/dist/dev/index.d.ts +6 -10
- package/dist/dev/index.mjs +3 -3
- package/dist/index.mjs +1 -1
- package/dist/shared/{cli-nightly.CHXrvItL.mjs → cli-nightly.B7uth5F6.mjs} +2 -2
- package/dist/shared/{cli-nightly.e0zI8O5E.mjs → cli-nightly.Cor8S8Kw.mjs} +1 -1
- package/dist/shared/{cli-nightly.CfBFbwB8.mjs → cli-nightly._v4QqAPH.mjs} +1 -1
- package/package.json +3 -2
package/dist/chunks/add.mjs
CHANGED
|
@@ -11,14 +11,14 @@ import { resolve } from 'pathe';
|
|
|
11
11
|
import { readPackageJSON } from 'pkg-types';
|
|
12
12
|
import { satisfies } from 'semver';
|
|
13
13
|
import { joinURL } from 'ufo';
|
|
14
|
-
import { r as runCommand } from '../shared/cli-nightly.
|
|
14
|
+
import { r as runCommand } from '../shared/cli-nightly.B7uth5F6.mjs';
|
|
15
15
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
16
|
-
import { a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
16
|
+
import { a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
17
17
|
import { f as fetchModules, g as getNuxtVersion, c as checkNuxtCompatibility, a as getRegistryFromContent } from '../shared/cli-nightly.jA1DRKbi.mjs';
|
|
18
18
|
import 'node:url';
|
|
19
19
|
import 'node:crypto';
|
|
20
20
|
import 'std-env';
|
|
21
|
-
import '../shared/cli-nightly.
|
|
21
|
+
import '../shared/cli-nightly._v4QqAPH.mjs';
|
|
22
22
|
import 'consola';
|
|
23
23
|
import 'confbox';
|
|
24
24
|
|
package/dist/chunks/add2.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { resolve, extname, dirname } from 'pathe';
|
|
|
5
5
|
import { l as loadKit } from '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
6
6
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
7
7
|
import { pascalCase, camelCase } from 'scule';
|
|
8
|
-
import { a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
8
|
+
import { a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
9
9
|
import 'node:url';
|
|
10
10
|
import 'exsolve';
|
|
11
11
|
import 'consola';
|
package/dist/chunks/analyze.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { o as overrideEnv } from '../shared/cli-nightly.DkO5RR_e.mjs';
|
|
|
9
9
|
import { c as clearDir } from '../shared/cli-nightly.DPmMxQ6h.mjs';
|
|
10
10
|
import { l as loadKit } from '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
11
11
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
12
|
-
import { e as extendsArgs, d as dotEnvArgs, l as legacyRootDirArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
12
|
+
import { e as extendsArgs, d as dotEnvArgs, l as legacyRootDirArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
13
13
|
import 'node:url';
|
|
14
14
|
import 'exsolve';
|
|
15
15
|
import 'consola';
|
package/dist/chunks/build.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { o as overrideEnv } from '../shared/cli-nightly.DkO5RR_e.mjs';
|
|
|
6
6
|
import { a as clearBuildDir } from '../shared/cli-nightly.DPmMxQ6h.mjs';
|
|
7
7
|
import { l as loadKit } from '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
8
8
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
9
|
-
import { l as legacyRootDirArgs, e as extendsArgs, b as envNameArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
9
|
+
import { l as legacyRootDirArgs, e as extendsArgs, b as envNameArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
10
10
|
import 'node:fs';
|
|
11
11
|
import 'consola/utils';
|
|
12
12
|
import 'exsolve';
|
package/dist/chunks/cleanup.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { defineCommand } from 'citty';
|
|
|
2
2
|
import { resolve } from 'pathe';
|
|
3
3
|
import { l as loadKit } from '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
4
4
|
import { c as cleanupNuxtDirs } from '../shared/cli-nightly.Bu_9IHj2.mjs';
|
|
5
|
-
import { l as legacyRootDirArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
5
|
+
import { l as legacyRootDirArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'exsolve';
|
|
8
8
|
import 'node:fs';
|
|
@@ -2,7 +2,7 @@ import process from 'node:process';
|
|
|
2
2
|
import { defineCommand } from 'citty';
|
|
3
3
|
import { resolve } from 'pathe';
|
|
4
4
|
import { isTest } from 'std-env';
|
|
5
|
-
import { l as legacyRootDirArgs, d as dotEnvArgs, b as envNameArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
5
|
+
import { l as legacyRootDirArgs, d as dotEnvArgs, b as envNameArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
6
6
|
import 'node:path';
|
|
7
7
|
import 'consola';
|
|
8
8
|
import '../shared/cli-nightly.B9AmABr3.mjs';
|
package/dist/chunks/dev.mjs
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { fork } from 'node:child_process';
|
|
2
2
|
import process from 'node:process';
|
|
3
3
|
import { defineCommand } from 'citty';
|
|
4
|
+
import { isSocketSupported } from 'get-port-please';
|
|
4
5
|
import { createProxyServer } from 'httpxy';
|
|
5
6
|
import { listen } from 'listhen';
|
|
6
7
|
import { getArgs, parseArgs } from 'listhen/cli';
|
|
7
8
|
import { resolve } from 'pathe';
|
|
8
9
|
import { satisfies } from 'semver';
|
|
9
|
-
import {
|
|
10
|
+
import { isTest, isBun } from 'std-env';
|
|
10
11
|
import { i as initialize, r as resolveLoadingTemplate, a as renderError, b as isSocketURL, p as parseSocketURL } from './index.mjs';
|
|
11
12
|
import { s as showVersions } from '../shared/cli-nightly.DltNmcvh.mjs';
|
|
12
13
|
import { o as overrideEnv } from '../shared/cli-nightly.DkO5RR_e.mjs';
|
|
13
14
|
import { l as loadKit } from '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
14
15
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
15
|
-
import { e as extendsArgs, b as envNameArgs, l as legacyRootDirArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
16
|
+
import { e as extendsArgs, b as envNameArgs, l as legacyRootDirArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
16
17
|
import 'defu';
|
|
18
|
+
import 'node:http';
|
|
17
19
|
import 'node:events';
|
|
18
20
|
import 'node:fs';
|
|
19
21
|
import 'node:fs/promises';
|
|
@@ -26,8 +28,6 @@ import '../shared/cli-nightly.DPmMxQ6h.mjs';
|
|
|
26
28
|
import '../shared/cli-nightly.Bu_9IHj2.mjs';
|
|
27
29
|
import 'ohash';
|
|
28
30
|
import 'youch';
|
|
29
|
-
import 'node:http';
|
|
30
|
-
import 'node:os';
|
|
31
31
|
import 'consola/utils';
|
|
32
32
|
import 'consola';
|
|
33
33
|
import 'node:path';
|
|
@@ -130,7 +130,7 @@ const command = defineCommand({
|
|
|
130
130
|
}
|
|
131
131
|
const devProxy = await createDevProxy(cwd, nuxtOptions, listenOptions);
|
|
132
132
|
const nuxtSocketEnv = process.env.NUXT_SOCKET ? process.env.NUXT_SOCKET === "1" : void 0;
|
|
133
|
-
const useSocket = nuxtSocketEnv ?? (nuxtOptions._majorVersion === 4 &&
|
|
133
|
+
const useSocket = nuxtSocketEnv ?? (nuxtOptions._majorVersion === 4 && await isSocketSupported());
|
|
134
134
|
const urls = await devProxy.listener.getURLs();
|
|
135
135
|
const { onRestart, onReady, close } = await initialize({
|
|
136
136
|
cwd,
|
|
@@ -141,7 +141,8 @@ const command = defineCommand({
|
|
|
141
141
|
proxy: {
|
|
142
142
|
url: devProxy.listener.url,
|
|
143
143
|
urls,
|
|
144
|
-
https: devProxy.listener.https
|
|
144
|
+
https: devProxy.listener.https,
|
|
145
|
+
addr: devProxy.listener.address
|
|
145
146
|
}
|
|
146
147
|
// if running with nuxt v4 or `NUXT_SOCKET=1`, we use the socket listener
|
|
147
148
|
// otherwise pass 'true' to listen on a random port instead
|
package/dist/chunks/devtools.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { defineCommand } from 'citty';
|
|
|
3
3
|
import { resolve } from 'pathe';
|
|
4
4
|
import { x } from 'tinyexec';
|
|
5
5
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
6
|
-
import { l as legacyRootDirArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
6
|
+
import { l as legacyRootDirArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
7
7
|
import 'consola';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'std-env';
|
package/dist/chunks/generate.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineCommand } from 'citty';
|
|
2
|
-
import { l as legacyRootDirArgs, e as extendsArgs, b as envNameArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
2
|
+
import { l as legacyRootDirArgs, e as extendsArgs, b as envNameArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
3
3
|
import buildCommand from './build.mjs';
|
|
4
4
|
import 'node:path';
|
|
5
5
|
import 'node:process';
|
package/dist/chunks/index.mjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
2
|
import defu from 'defu';
|
|
3
|
+
import { listen } from 'listhen';
|
|
4
|
+
import { Server } from 'node:http';
|
|
5
|
+
import { getSocketAddress, cleanSocket } from 'get-port-please';
|
|
3
6
|
import EventEmitter from 'node:events';
|
|
4
|
-
import {
|
|
7
|
+
import { watch, existsSync } from 'node:fs';
|
|
5
8
|
import { mkdir } from 'node:fs/promises';
|
|
6
9
|
import { pathToFileURL } from 'node:url';
|
|
7
10
|
import { resolveModulePath } from 'exsolve';
|
|
8
11
|
import { toNodeListener } from 'h3';
|
|
9
|
-
import {
|
|
10
|
-
import { join, resolve } from 'pathe';
|
|
12
|
+
import { resolve } from 'pathe';
|
|
11
13
|
import { debounce } from 'perfect-debounce';
|
|
12
14
|
import { provider } from 'std-env';
|
|
13
15
|
import { joinURL } from 'ufo';
|
|
@@ -15,31 +17,7 @@ import { a as clearBuildDir } from '../shared/cli-nightly.DPmMxQ6h.mjs';
|
|
|
15
17
|
import { l as loadKit } from '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
16
18
|
import { l as loadNuxtManifest, r as resolveNuxtManifest, w as writeNuxtManifest } from '../shared/cli-nightly.Bu_9IHj2.mjs';
|
|
17
19
|
import { Youch } from 'youch';
|
|
18
|
-
import { Server } from 'node:http';
|
|
19
|
-
import os from 'node:os';
|
|
20
|
-
|
|
21
|
-
async function renderError(req, res, error) {
|
|
22
|
-
const youch = new Youch();
|
|
23
|
-
res.statusCode = 500;
|
|
24
|
-
res.setHeader("Content-Type", "text/html");
|
|
25
|
-
const html = await youch.toHTML(error, {
|
|
26
|
-
request: {
|
|
27
|
-
url: req.url,
|
|
28
|
-
method: req.method,
|
|
29
|
-
headers: req.headers
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
res.end(html);
|
|
33
|
-
}
|
|
34
20
|
|
|
35
|
-
function generateSocketPath(prefix) {
|
|
36
|
-
const timestamp = Date.now();
|
|
37
|
-
const random = Math.random().toString(36).slice(2, 8);
|
|
38
|
-
if (process.platform === "win32") {
|
|
39
|
-
return `\\\\.\\pipe\\${prefix}-${timestamp}-${random}`;
|
|
40
|
-
}
|
|
41
|
-
return join(os.tmpdir(), `${prefix}-${timestamp}-${random}.sock`);
|
|
42
|
-
}
|
|
43
21
|
function formatSocketURL(socketPath, ssl = false) {
|
|
44
22
|
const protocol = ssl ? "https" : "http";
|
|
45
23
|
const encodedPath = process.platform === "win32" ? encodeURIComponent(socketPath) : socketPath.replace(/\//g, "%2F");
|
|
@@ -57,35 +35,24 @@ function parseSocketURL(url) {
|
|
|
57
35
|
const socketPath = decodeURIComponent(path.replace(/%2F/g, "/"));
|
|
58
36
|
return { socketPath, protocol: ssl ? "https" : "http" };
|
|
59
37
|
}
|
|
60
|
-
async function createSocketListener(handler,
|
|
61
|
-
const socketPath =
|
|
38
|
+
async function createSocketListener(handler, proxyAddress) {
|
|
39
|
+
const socketPath = getSocketAddress({
|
|
40
|
+
name: "nuxt-dev",
|
|
41
|
+
random: true
|
|
42
|
+
});
|
|
62
43
|
const server = new Server(handler);
|
|
63
|
-
|
|
64
|
-
try {
|
|
65
|
-
unlinkSync(socketPath);
|
|
66
|
-
} catch {
|
|
67
|
-
}
|
|
68
|
-
}
|
|
44
|
+
await cleanSocket(socketPath);
|
|
69
45
|
await new Promise((resolve) => server.listen({ path: socketPath }, resolve));
|
|
70
|
-
const url = formatSocketURL(socketPath
|
|
46
|
+
const url = formatSocketURL(socketPath);
|
|
71
47
|
return {
|
|
72
48
|
url,
|
|
73
|
-
address: {
|
|
74
|
-
socketPath,
|
|
75
|
-
address: "localhost",
|
|
76
|
-
port: 3e3
|
|
77
|
-
},
|
|
49
|
+
address: { address: "localhost", port: 3e3, ...proxyAddress, socketPath },
|
|
78
50
|
async close() {
|
|
79
51
|
try {
|
|
80
52
|
server.removeAllListeners();
|
|
81
53
|
await new Promise((resolve, reject) => server.close((err) => err ? reject(err) : resolve()));
|
|
82
54
|
} finally {
|
|
83
|
-
|
|
84
|
-
try {
|
|
85
|
-
unlinkSync(socketPath);
|
|
86
|
-
} catch {
|
|
87
|
-
}
|
|
88
|
-
}
|
|
55
|
+
await cleanSocket(socketPath);
|
|
89
56
|
}
|
|
90
57
|
},
|
|
91
58
|
getURLs: async () => [{ url, type: "network" }],
|
|
@@ -94,22 +61,20 @@ async function createSocketListener(handler, ssl = false) {
|
|
|
94
61
|
};
|
|
95
62
|
}
|
|
96
63
|
|
|
97
|
-
async function
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
devServer.listener.getURLs = async () => Array.from(/* @__PURE__ */ new Set([...options.devContext.proxy?.urls || [], ...await _getURLs()]));
|
|
110
|
-
}
|
|
111
|
-
return devServer;
|
|
64
|
+
async function renderError(req, res, error) {
|
|
65
|
+
const youch = new Youch();
|
|
66
|
+
res.statusCode = 500;
|
|
67
|
+
res.setHeader("Content-Type", "text/html");
|
|
68
|
+
const html = await youch.toHTML(error, {
|
|
69
|
+
request: {
|
|
70
|
+
url: req.url,
|
|
71
|
+
method: req.method,
|
|
72
|
+
headers: req.headers
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
res.end(html);
|
|
112
76
|
}
|
|
77
|
+
|
|
113
78
|
const RESTART_RE = /^(?:nuxt\.config\.[a-z0-9]+|\.nuxtignore|\.nuxtrc|\.config\/nuxt(?:\.config)?\.[a-z0-9]+)$/;
|
|
114
79
|
class NuxtDevServer extends EventEmitter {
|
|
115
80
|
constructor(options) {
|
|
@@ -209,7 +174,6 @@ class NuxtDevServer extends EventEmitter {
|
|
|
209
174
|
defaults: defu(this.options.defaults, devServerDefaults),
|
|
210
175
|
overrides: {
|
|
211
176
|
logLevel: this.options.logLevel,
|
|
212
|
-
...this.options.devContext.args.extends && { extends: this.options.devContext.args.extends },
|
|
213
177
|
...this.options.overrides,
|
|
214
178
|
vite: {
|
|
215
179
|
clearScreen: this.options.clear,
|
|
@@ -272,7 +236,7 @@ class NuxtDevServer extends EventEmitter {
|
|
|
272
236
|
const addr = this.listener.address;
|
|
273
237
|
this._currentNuxt.options.devServer.host = addr.address;
|
|
274
238
|
this._currentNuxt.options.devServer.port = addr.port;
|
|
275
|
-
this._currentNuxt.options.devServer.url =
|
|
239
|
+
this._currentNuxt.options.devServer.url = getAddressURL(addr, !!this.listener.https);
|
|
276
240
|
this._currentNuxt.options.devServer.https = this.options.devContext.proxy?.https;
|
|
277
241
|
if (this.listener.https && !process.env.NODE_TLS_REJECT_UNAUTHORIZED) {
|
|
278
242
|
console.warn("You might need `NODE_TLS_REJECT_UNAUTHORIZED=0` environment variable to make https work.");
|
|
@@ -323,7 +287,11 @@ function resolveDevServerOverrides(listenOptions) {
|
|
|
323
287
|
function resolveDevServerDefaults(listenOptions, urls = []) {
|
|
324
288
|
const defaultConfig = {};
|
|
325
289
|
if (urls) {
|
|
326
|
-
defaultConfig.vite = {
|
|
290
|
+
defaultConfig.vite = {
|
|
291
|
+
server: {
|
|
292
|
+
allowedHosts: urls.filter((u) => !isSocketURL(u)).map((u) => new URL(u).hostname)
|
|
293
|
+
}
|
|
294
|
+
};
|
|
327
295
|
}
|
|
328
296
|
if (listenOptions.hostname) {
|
|
329
297
|
const protocol = listenOptions.https ? "https" : "http";
|
|
@@ -399,17 +367,35 @@ async function initialize(devContext, ctx = {}, _listenOptions) {
|
|
|
399
367
|
hostname: devContext.hostname,
|
|
400
368
|
https: devContext.proxy?.https
|
|
401
369
|
}, devContext.publicURLs);
|
|
402
|
-
const
|
|
403
|
-
const devServer = await createNuxtDevServer({
|
|
370
|
+
const devServer = new NuxtDevServer({
|
|
404
371
|
cwd: devContext.cwd,
|
|
405
|
-
overrides: defu(
|
|
372
|
+
overrides: defu(
|
|
373
|
+
ctx.data?.overrides,
|
|
374
|
+
{ extends: devContext.args.extends },
|
|
375
|
+
devServerOverrides
|
|
376
|
+
),
|
|
406
377
|
defaults: devServerDefaults,
|
|
407
378
|
logLevel: devContext.args.logLevel,
|
|
408
379
|
clear: !!devContext.args.clear,
|
|
409
380
|
dotenv: { cwd: devContext.cwd, fileName: devContext.args.dotenv },
|
|
410
381
|
envName: devContext.args.envName,
|
|
411
|
-
devContext
|
|
412
|
-
|
|
382
|
+
devContext: {
|
|
383
|
+
proxy: devContext.proxy
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
const listenOptions = _listenOptions === true || process.env._PORT ? { port: process.env._PORT ?? 0, hostname: "127.0.0.1", showURL: false } : _listenOptions;
|
|
387
|
+
devServer.listener = listenOptions ? await listen(devServer.handler, listenOptions) : await createSocketListener(devServer.handler, devContext.proxy?.addr);
|
|
388
|
+
if (process.env.DEBUG) {
|
|
389
|
+
console.debug(`Using ${listenOptions ? "network" : "socket"} listener for Nuxt dev server.`);
|
|
390
|
+
}
|
|
391
|
+
devServer.listener._url = devServer.listener.url;
|
|
392
|
+
if (devContext.proxy?.url) {
|
|
393
|
+
devServer.listener.url = devContext.proxy.url;
|
|
394
|
+
}
|
|
395
|
+
if (devContext.proxy?.urls) {
|
|
396
|
+
const _getURLs = devServer.listener.getURLs.bind(devServer.listener);
|
|
397
|
+
devServer.listener.getURLs = async () => Array.from(/* @__PURE__ */ new Set([...devContext.proxy?.urls || [], ...await _getURLs()]));
|
|
398
|
+
}
|
|
413
399
|
let address;
|
|
414
400
|
if (ipc.enabled) {
|
|
415
401
|
devServer.on("loading:error", (_error) => {
|
package/dist/chunks/info.mjs
CHANGED
|
@@ -7,11 +7,11 @@ import { resolve } from 'pathe';
|
|
|
7
7
|
import { readPackageJSON } from 'pkg-types';
|
|
8
8
|
import { splitByCase } from 'scule';
|
|
9
9
|
import { isMinimal } from 'std-env';
|
|
10
|
-
import { v as version } from '../shared/cli-nightly.
|
|
10
|
+
import { v as version } from '../shared/cli-nightly._v4QqAPH.mjs';
|
|
11
11
|
import { t as tryResolveNuxt } from '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
12
12
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
13
13
|
import { g as getPackageManagerVersion } from '../shared/cli-nightly.BSm0_9Hr.mjs';
|
|
14
|
-
import { l as legacyRootDirArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
14
|
+
import { l as legacyRootDirArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
15
15
|
import 'node:url';
|
|
16
16
|
import 'exsolve';
|
|
17
17
|
import 'consola';
|
package/dist/chunks/init.mjs
CHANGED
|
@@ -8,13 +8,13 @@ import { $fetch } from 'ofetch';
|
|
|
8
8
|
import { resolve, relative, join } from 'pathe';
|
|
9
9
|
import { hasTTY } from 'std-env';
|
|
10
10
|
import { x } from 'tinyexec';
|
|
11
|
-
import { r as runCommand } from '../shared/cli-nightly.
|
|
11
|
+
import { r as runCommand } from '../shared/cli-nightly.B7uth5F6.mjs';
|
|
12
12
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
13
|
-
import { a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
13
|
+
import { a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
14
14
|
import 'node:url';
|
|
15
15
|
import 'node:crypto';
|
|
16
16
|
import 'node:path';
|
|
17
|
-
import '../shared/cli-nightly.
|
|
17
|
+
import '../shared/cli-nightly._v4QqAPH.mjs';
|
|
18
18
|
import 'consola';
|
|
19
19
|
|
|
20
20
|
const themeColor = "\x1B[38;2;0;220;130m";
|
package/dist/chunks/prepare.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { resolve, relative } from 'pathe';
|
|
|
4
4
|
import { a as clearBuildDir } from '../shared/cli-nightly.DPmMxQ6h.mjs';
|
|
5
5
|
import { l as loadKit } from '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
6
6
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
7
|
-
import { l as legacyRootDirArgs, e as extendsArgs, b as envNameArgs, a as logLevelArgs, c as cwdArgs, d as dotEnvArgs } from '../shared/cli-nightly.
|
|
7
|
+
import { l as legacyRootDirArgs, e as extendsArgs, b as envNameArgs, a as logLevelArgs, c as cwdArgs, d as dotEnvArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
8
8
|
import 'node:fs';
|
|
9
9
|
import 'node:url';
|
|
10
10
|
import 'exsolve';
|
package/dist/chunks/preview.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { resolve } from 'pathe';
|
|
|
9
9
|
import { x } from 'tinyexec';
|
|
10
10
|
import { l as loadKit } from '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
11
11
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
12
|
-
import { d as dotEnvArgs, l as legacyRootDirArgs, e as extendsArgs, b as envNameArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
12
|
+
import { d as dotEnvArgs, l as legacyRootDirArgs, e as extendsArgs, b as envNameArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
13
13
|
import 'node:url';
|
|
14
14
|
import 'exsolve';
|
|
15
15
|
import 'consola';
|
package/dist/chunks/search.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { colors } from 'consola/utils';
|
|
|
3
3
|
import Fuse from 'fuse.js';
|
|
4
4
|
import { upperFirst, kebabCase } from 'scule';
|
|
5
5
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
6
|
-
import { c as cwdArgs } from '../shared/cli-nightly.
|
|
6
|
+
import { c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
7
7
|
import { g as getNuxtVersion, f as fetchModules, c as checkNuxtCompatibility } from '../shared/cli-nightly.jA1DRKbi.mjs';
|
|
8
8
|
import 'consola';
|
|
9
9
|
import 'node:path';
|
package/dist/chunks/test.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import process from 'node:process';
|
|
|
2
2
|
import { defineCommand } from 'citty';
|
|
3
3
|
import { resolve } from 'pathe';
|
|
4
4
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
5
|
-
import { l as legacyRootDirArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
5
|
+
import { l as legacyRootDirArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
6
6
|
import 'consola';
|
|
7
7
|
import 'node:path';
|
|
8
8
|
import 'std-env';
|
|
@@ -6,7 +6,7 @@ import { readTSConfig } from 'pkg-types';
|
|
|
6
6
|
import { isBun } from 'std-env';
|
|
7
7
|
import { x } from 'tinyexec';
|
|
8
8
|
import { l as loadKit } from '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
9
|
-
import { l as legacyRootDirArgs, e as extendsArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
9
|
+
import { l as legacyRootDirArgs, e as extendsArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
10
10
|
import 'node:url';
|
|
11
11
|
import 'node:path';
|
|
12
12
|
import 'consola';
|
package/dist/chunks/upgrade.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { l as loadKit } from '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
|
9
9
|
import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
|
|
10
10
|
import { c as cleanupNuxtDirs, n as nuxtVersionToGitIdentifier } from '../shared/cli-nightly.Bu_9IHj2.mjs';
|
|
11
11
|
import { g as getPackageManagerVersion } from '../shared/cli-nightly.BSm0_9Hr.mjs';
|
|
12
|
-
import { l as legacyRootDirArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.
|
|
12
|
+
import { l as legacyRootDirArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.Cor8S8Kw.mjs';
|
|
13
13
|
import 'node:url';
|
|
14
14
|
import 'exsolve';
|
|
15
15
|
import 'consola';
|
package/dist/dev/index.d.mts
CHANGED
|
@@ -23,6 +23,7 @@ interface NuxtDevContext {
|
|
|
23
23
|
url?: string;
|
|
24
24
|
urls?: ListenURL[];
|
|
25
25
|
https?: boolean | HTTPSOptions;
|
|
26
|
+
addr?: AddressInfo;
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
interface NuxtDevServerOptions {
|
|
@@ -33,11 +34,10 @@ interface NuxtDevServerOptions {
|
|
|
33
34
|
clear?: boolean;
|
|
34
35
|
defaults: NuxtConfig;
|
|
35
36
|
overrides: NuxtConfig;
|
|
36
|
-
port?: string | number;
|
|
37
37
|
loadingTemplate?: ({ loading }: {
|
|
38
38
|
loading: string;
|
|
39
39
|
}) => string;
|
|
40
|
-
devContext: NuxtDevContext
|
|
40
|
+
devContext: Pick<NuxtDevContext, 'proxy'>;
|
|
41
41
|
}
|
|
42
42
|
interface DevServerEventMap {
|
|
43
43
|
'loading:error': [error: Error];
|
|
@@ -58,10 +58,8 @@ declare class NuxtDevServer extends EventEmitter<DevServerEventMap> {
|
|
|
58
58
|
handler: RequestListener;
|
|
59
59
|
listener: Pick<Listener, 'server' | 'getURLs' | 'https' | 'url' | 'close'> & {
|
|
60
60
|
_url?: string;
|
|
61
|
-
address: {
|
|
61
|
+
address: Omit<AddressInfo, 'family'> & {
|
|
62
62
|
socketPath: string;
|
|
63
|
-
port: number;
|
|
64
|
-
address: string;
|
|
65
63
|
} | AddressInfo;
|
|
66
64
|
};
|
|
67
65
|
constructor(options: NuxtDevServerOptions);
|
|
@@ -81,13 +79,11 @@ interface InitializeOptions {
|
|
|
81
79
|
};
|
|
82
80
|
}
|
|
83
81
|
declare function initialize(devContext: NuxtDevContext, ctx?: InitializeOptions, _listenOptions?: true | Partial<ListenOptions>): Promise<{
|
|
84
|
-
listener: Pick<listhen.Listener, "
|
|
82
|
+
listener: Pick<listhen.Listener, "https" | "server" | "url" | "getURLs" | "close"> & {
|
|
85
83
|
_url?: string;
|
|
86
|
-
address: {
|
|
84
|
+
address: (Omit<net.AddressInfo, "family"> & {
|
|
87
85
|
socketPath: string;
|
|
88
|
-
|
|
89
|
-
address: string;
|
|
90
|
-
} | net.AddressInfo;
|
|
86
|
+
}) | net.AddressInfo;
|
|
91
87
|
};
|
|
92
88
|
close: () => void;
|
|
93
89
|
onReady: (callback: (address: string) => void) => void;
|
package/dist/dev/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ interface NuxtDevContext {
|
|
|
23
23
|
url?: string;
|
|
24
24
|
urls?: ListenURL[];
|
|
25
25
|
https?: boolean | HTTPSOptions;
|
|
26
|
+
addr?: AddressInfo;
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
interface NuxtDevServerOptions {
|
|
@@ -33,11 +34,10 @@ interface NuxtDevServerOptions {
|
|
|
33
34
|
clear?: boolean;
|
|
34
35
|
defaults: NuxtConfig;
|
|
35
36
|
overrides: NuxtConfig;
|
|
36
|
-
port?: string | number;
|
|
37
37
|
loadingTemplate?: ({ loading }: {
|
|
38
38
|
loading: string;
|
|
39
39
|
}) => string;
|
|
40
|
-
devContext: NuxtDevContext
|
|
40
|
+
devContext: Pick<NuxtDevContext, 'proxy'>;
|
|
41
41
|
}
|
|
42
42
|
interface DevServerEventMap {
|
|
43
43
|
'loading:error': [error: Error];
|
|
@@ -58,10 +58,8 @@ declare class NuxtDevServer extends EventEmitter<DevServerEventMap> {
|
|
|
58
58
|
handler: RequestListener;
|
|
59
59
|
listener: Pick<Listener, 'server' | 'getURLs' | 'https' | 'url' | 'close'> & {
|
|
60
60
|
_url?: string;
|
|
61
|
-
address: {
|
|
61
|
+
address: Omit<AddressInfo, 'family'> & {
|
|
62
62
|
socketPath: string;
|
|
63
|
-
port: number;
|
|
64
|
-
address: string;
|
|
65
63
|
} | AddressInfo;
|
|
66
64
|
};
|
|
67
65
|
constructor(options: NuxtDevServerOptions);
|
|
@@ -81,13 +79,11 @@ interface InitializeOptions {
|
|
|
81
79
|
};
|
|
82
80
|
}
|
|
83
81
|
declare function initialize(devContext: NuxtDevContext, ctx?: InitializeOptions, _listenOptions?: true | Partial<ListenOptions>): Promise<{
|
|
84
|
-
listener: Pick<listhen.Listener, "
|
|
82
|
+
listener: Pick<listhen.Listener, "https" | "server" | "url" | "getURLs" | "close"> & {
|
|
85
83
|
_url?: string;
|
|
86
|
-
address: {
|
|
84
|
+
address: (Omit<net.AddressInfo, "family"> & {
|
|
87
85
|
socketPath: string;
|
|
88
|
-
|
|
89
|
-
address: string;
|
|
90
|
-
} | net.AddressInfo;
|
|
86
|
+
}) | net.AddressInfo;
|
|
91
87
|
};
|
|
92
88
|
close: () => void;
|
|
93
89
|
onReady: (callback: (address: string) => void) => void;
|
package/dist/dev/index.mjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export { i as initialize } from '../chunks/index.mjs';
|
|
2
2
|
import 'node:process';
|
|
3
3
|
import 'defu';
|
|
4
|
+
import 'listhen';
|
|
5
|
+
import 'node:http';
|
|
6
|
+
import 'get-port-please';
|
|
4
7
|
import 'node:events';
|
|
5
8
|
import 'node:fs';
|
|
6
9
|
import 'node:fs/promises';
|
|
7
10
|
import 'node:url';
|
|
8
11
|
import 'exsolve';
|
|
9
12
|
import 'h3';
|
|
10
|
-
import 'listhen';
|
|
11
13
|
import 'pathe';
|
|
12
14
|
import 'perfect-debounce';
|
|
13
15
|
import 'std-env';
|
|
@@ -19,5 +21,3 @@ import '../shared/cli-nightly.qKvs7FJ2.mjs';
|
|
|
19
21
|
import '../shared/cli-nightly.Bu_9IHj2.mjs';
|
|
20
22
|
import 'ohash';
|
|
21
23
|
import 'youch';
|
|
22
|
-
import 'node:http';
|
|
23
|
-
import 'node:os';
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { defineCommand, runCommand as runCommand$1 } from 'citty';
|
|
4
|
-
import { f as commands, c as cwdArgs, s as setupGlobalConsole, g as checkEngines } from './cli-nightly.
|
|
4
|
+
import { f as commands, c as cwdArgs, s as setupGlobalConsole, g as checkEngines } from './cli-nightly.Cor8S8Kw.mjs';
|
|
5
5
|
import nodeCrypto from 'node:crypto';
|
|
6
6
|
import { resolve } from 'node:path';
|
|
7
7
|
import { provider } from 'std-env';
|
|
8
|
-
import { d as description, v as version, n as name } from './cli-nightly.
|
|
8
|
+
import { d as description, v as version, n as name } from './cli-nightly._v4QqAPH.mjs';
|
|
9
9
|
import { l as logger } from './cli-nightly.B9AmABr3.mjs';
|
|
10
10
|
|
|
11
11
|
if (!globalThis.crypto) {
|
|
@@ -128,7 +128,7 @@ async function checkEngines() {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
const name = "@nuxt/cli-nightly";
|
|
131
|
-
const version = "3.26.3-20250720-
|
|
131
|
+
const version = "3.26.3-20250720-163706-de503a3";
|
|
132
132
|
const description = "Nuxt CLI";
|
|
133
133
|
|
|
134
134
|
const main = defineCommand({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/cli-nightly",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.26.3-20250720-
|
|
4
|
+
"version": "3.26.3-20250720-163706-de503a3",
|
|
5
5
|
"description": "Nuxt CLI",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"defu": "^6.1.4",
|
|
42
42
|
"exsolve": "^1.0.7",
|
|
43
43
|
"fuse.js": "^7.1.0",
|
|
44
|
+
"get-port-please": "^3.2.0",
|
|
44
45
|
"giget": "^2.0.0",
|
|
45
46
|
"h3": "^1.15.3",
|
|
46
47
|
"httpxy": "^0.1.7",
|
|
@@ -60,9 +61,9 @@
|
|
|
60
61
|
"youch": "^4.1.0-beta.10"
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
64
|
+
"@nuxt/kit": "^4.0.0",
|
|
63
65
|
"@nuxt/schema": "^4.0.0",
|
|
64
66
|
"@types/node": "^22.16.3",
|
|
65
|
-
"get-port-please": "^3.2.0",
|
|
66
67
|
"rollup": "^4.45.0",
|
|
67
68
|
"rollup-plugin-visualizer": "^6.0.3",
|
|
68
69
|
"typescript": "^5.8.3",
|