@nuxt/cli-nightly 3.26.0-20250607-210256-59f83b1 → 3.26.0-20250607-223602-1089c0e
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/bin/nuxi.mjs +1 -0
- package/dist/chunks/add.mjs +308 -290
- package/dist/chunks/add2.mjs +291 -307
- package/dist/chunks/analyze.mjs +8 -7
- package/dist/chunks/build.mjs +11 -11
- package/dist/chunks/cleanup.mjs +8 -7
- package/dist/chunks/dev-child.mjs +11 -71
- package/dist/chunks/dev.mjs +142 -117
- package/dist/chunks/devtools.mjs +3 -2
- package/dist/chunks/generate.mjs +8 -8
- package/dist/chunks/index.mjs +379 -12
- package/dist/chunks/index2.mjs +15 -0
- package/dist/chunks/info.mjs +8 -6
- package/dist/chunks/init.mjs +7 -5
- package/dist/chunks/prepare.mjs +7 -6
- package/dist/chunks/preview.mjs +6 -5
- package/dist/chunks/search.mjs +3 -2
- package/dist/chunks/test.mjs +3 -2
- package/dist/chunks/typecheck.mjs +6 -6
- package/dist/chunks/upgrade.mjs +9 -8
- package/dist/dev/index.d.mts +75 -0
- package/dist/dev/index.d.ts +75 -0
- package/dist/dev/index.mjs +21 -0
- package/dist/index.mjs +2 -1
- package/dist/shared/cli-nightly.B9AmABr3.mjs +5 -0
- package/dist/shared/{cli-nightly.DPQxxyDx.mjs → cli-nightly.BUFTQIaz.mjs} +1 -1
- package/dist/shared/{cli-nightly.DlcAx0De.mjs → cli-nightly.BrKZotr9.mjs} +11 -9
- package/dist/shared/{cli-nightly.DDBHWicM.mjs → cli-nightly.Bu_9IHj2.mjs} +2 -2
- package/dist/shared/{cli-nightly.DTVmTXKJ.mjs → cli-nightly.Cq6GVhe3.mjs} +7 -6
- package/dist/shared/{cli-nightly.BnfAj4iy.mjs → cli-nightly.DPmMxQ6h.mjs} +1 -1
- package/dist/shared/{cli-nightly.CjK7ZDKA.mjs → cli-nightly.DSXVWJCf.mjs} +9 -10
- package/dist/shared/cli-nightly.Dc8ncNQ_.mjs +27 -0
- package/dist/shared/{cli-nightly.DdmGgrsK.mjs → cli-nightly.DkO5RR_e.mjs} +1 -1
- package/package.json +2 -1
- package/dist/chunks/dev2.mjs +0 -293
- package/dist/shared/cli-nightly.COGWopdX.mjs +0 -26
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as listhen from 'listhen';
|
|
2
|
+
import { ListenURL, HTTPSOptions, Listener, ListenOptions } from 'listhen';
|
|
3
|
+
import { NuxtConfig } from '@nuxt/schema';
|
|
4
|
+
import { DotenvOptions } from 'c12';
|
|
5
|
+
import { RequestListener, IncomingMessage, ServerResponse } from 'node:http';
|
|
6
|
+
import EventEmitter from 'node:events';
|
|
7
|
+
|
|
8
|
+
interface NuxtDevContext {
|
|
9
|
+
cwd: string;
|
|
10
|
+
public?: boolean;
|
|
11
|
+
hostname?: string;
|
|
12
|
+
publicURLs?: string[];
|
|
13
|
+
args: {
|
|
14
|
+
clear: boolean;
|
|
15
|
+
logLevel: string;
|
|
16
|
+
dotenv: string;
|
|
17
|
+
envName: string;
|
|
18
|
+
};
|
|
19
|
+
proxy?: {
|
|
20
|
+
url?: string;
|
|
21
|
+
urls?: ListenURL[];
|
|
22
|
+
https?: boolean | HTTPSOptions;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface NuxtDevServerOptions {
|
|
26
|
+
cwd: string;
|
|
27
|
+
logLevel?: 'silent' | 'info' | 'verbose';
|
|
28
|
+
dotenv: DotenvOptions;
|
|
29
|
+
envName?: string;
|
|
30
|
+
clear?: boolean;
|
|
31
|
+
defaults: NuxtConfig;
|
|
32
|
+
overrides: NuxtConfig;
|
|
33
|
+
port?: string | number;
|
|
34
|
+
loadingTemplate?: ({ loading }: {
|
|
35
|
+
loading: string;
|
|
36
|
+
}) => string;
|
|
37
|
+
devContext: NuxtDevContext;
|
|
38
|
+
}
|
|
39
|
+
declare class NuxtDevServer extends EventEmitter {
|
|
40
|
+
private options;
|
|
41
|
+
private _handler?;
|
|
42
|
+
private _distWatcher?;
|
|
43
|
+
private _currentNuxt?;
|
|
44
|
+
private _loadingMessage?;
|
|
45
|
+
private _loadingError?;
|
|
46
|
+
private cwd;
|
|
47
|
+
loadDebounced: (reload?: boolean, reason?: string) => void;
|
|
48
|
+
handler: RequestListener;
|
|
49
|
+
listener: Listener;
|
|
50
|
+
constructor(options: NuxtDevServerOptions);
|
|
51
|
+
_renderError(req: IncomingMessage, res: ServerResponse): void;
|
|
52
|
+
resolveLoadingTemplate(): Promise<(params: {
|
|
53
|
+
loading: string;
|
|
54
|
+
}) => string>;
|
|
55
|
+
_renderLoadingScreen(req: IncomingMessage, res: ServerResponse): Promise<void>;
|
|
56
|
+
init(): Promise<void>;
|
|
57
|
+
load(reload?: boolean, reason?: string): Promise<void>;
|
|
58
|
+
close(): Promise<void>;
|
|
59
|
+
_load(reload?: boolean, reason?: string): Promise<void>;
|
|
60
|
+
_watchConfig(): Promise<void>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface InitializeOptions {
|
|
64
|
+
data?: {
|
|
65
|
+
overrides?: NuxtConfig;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
declare function initialize(devContext: NuxtDevContext, ctx?: InitializeOptions, listenOptions?: Partial<ListenOptions>): Promise<{
|
|
69
|
+
listener: listhen.Listener;
|
|
70
|
+
close: () => Promise<void>;
|
|
71
|
+
onReady: (callback: (port: number) => void) => void;
|
|
72
|
+
onRestart: (callback: (devServer: NuxtDevServer) => void) => void;
|
|
73
|
+
}>;
|
|
74
|
+
|
|
75
|
+
export { initialize };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as listhen from 'listhen';
|
|
2
|
+
import { ListenURL, HTTPSOptions, Listener, ListenOptions } from 'listhen';
|
|
3
|
+
import { NuxtConfig } from '@nuxt/schema';
|
|
4
|
+
import { DotenvOptions } from 'c12';
|
|
5
|
+
import { RequestListener, IncomingMessage, ServerResponse } from 'node:http';
|
|
6
|
+
import EventEmitter from 'node:events';
|
|
7
|
+
|
|
8
|
+
interface NuxtDevContext {
|
|
9
|
+
cwd: string;
|
|
10
|
+
public?: boolean;
|
|
11
|
+
hostname?: string;
|
|
12
|
+
publicURLs?: string[];
|
|
13
|
+
args: {
|
|
14
|
+
clear: boolean;
|
|
15
|
+
logLevel: string;
|
|
16
|
+
dotenv: string;
|
|
17
|
+
envName: string;
|
|
18
|
+
};
|
|
19
|
+
proxy?: {
|
|
20
|
+
url?: string;
|
|
21
|
+
urls?: ListenURL[];
|
|
22
|
+
https?: boolean | HTTPSOptions;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface NuxtDevServerOptions {
|
|
26
|
+
cwd: string;
|
|
27
|
+
logLevel?: 'silent' | 'info' | 'verbose';
|
|
28
|
+
dotenv: DotenvOptions;
|
|
29
|
+
envName?: string;
|
|
30
|
+
clear?: boolean;
|
|
31
|
+
defaults: NuxtConfig;
|
|
32
|
+
overrides: NuxtConfig;
|
|
33
|
+
port?: string | number;
|
|
34
|
+
loadingTemplate?: ({ loading }: {
|
|
35
|
+
loading: string;
|
|
36
|
+
}) => string;
|
|
37
|
+
devContext: NuxtDevContext;
|
|
38
|
+
}
|
|
39
|
+
declare class NuxtDevServer extends EventEmitter {
|
|
40
|
+
private options;
|
|
41
|
+
private _handler?;
|
|
42
|
+
private _distWatcher?;
|
|
43
|
+
private _currentNuxt?;
|
|
44
|
+
private _loadingMessage?;
|
|
45
|
+
private _loadingError?;
|
|
46
|
+
private cwd;
|
|
47
|
+
loadDebounced: (reload?: boolean, reason?: string) => void;
|
|
48
|
+
handler: RequestListener;
|
|
49
|
+
listener: Listener;
|
|
50
|
+
constructor(options: NuxtDevServerOptions);
|
|
51
|
+
_renderError(req: IncomingMessage, res: ServerResponse): void;
|
|
52
|
+
resolveLoadingTemplate(): Promise<(params: {
|
|
53
|
+
loading: string;
|
|
54
|
+
}) => string>;
|
|
55
|
+
_renderLoadingScreen(req: IncomingMessage, res: ServerResponse): Promise<void>;
|
|
56
|
+
init(): Promise<void>;
|
|
57
|
+
load(reload?: boolean, reason?: string): Promise<void>;
|
|
58
|
+
close(): Promise<void>;
|
|
59
|
+
_load(reload?: boolean, reason?: string): Promise<void>;
|
|
60
|
+
_watchConfig(): Promise<void>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface InitializeOptions {
|
|
64
|
+
data?: {
|
|
65
|
+
overrides?: NuxtConfig;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
declare function initialize(devContext: NuxtDevContext, ctx?: InitializeOptions, listenOptions?: Partial<ListenOptions>): Promise<{
|
|
69
|
+
listener: listhen.Listener;
|
|
70
|
+
close: () => Promise<void>;
|
|
71
|
+
onReady: (callback: (port: number) => void) => void;
|
|
72
|
+
onRestart: (callback: (devServer: NuxtDevServer) => void) => void;
|
|
73
|
+
}>;
|
|
74
|
+
|
|
75
|
+
export { initialize };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { i as initialize } from '../chunks/index.mjs';
|
|
2
|
+
import 'node:process';
|
|
3
|
+
import 'defu';
|
|
4
|
+
import 'node:events';
|
|
5
|
+
import 'chokidar';
|
|
6
|
+
import 'h3';
|
|
7
|
+
import 'listhen';
|
|
8
|
+
import 'pathe';
|
|
9
|
+
import 'perfect-debounce';
|
|
10
|
+
import 'std-env';
|
|
11
|
+
import 'ufo';
|
|
12
|
+
import '../shared/cli-nightly.DPmMxQ6h.mjs';
|
|
13
|
+
import 'node:fs';
|
|
14
|
+
import '../shared/cli-nightly.B9AmABr3.mjs';
|
|
15
|
+
import 'consola';
|
|
16
|
+
import '../shared/cli-nightly.BrKZotr9.mjs';
|
|
17
|
+
import 'node:url';
|
|
18
|
+
import 'exsolve';
|
|
19
|
+
import '../shared/cli-nightly.Bu_9IHj2.mjs';
|
|
20
|
+
import 'ohash';
|
|
21
|
+
import 'youch';
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { m as main, r as runCommand,
|
|
1
|
+
export { m as main, r as runCommand, g as runMain } from './shared/cli-nightly.DSXVWJCf.mjs';
|
|
2
2
|
import 'node:path';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import 'citty';
|
|
5
5
|
import 'std-env';
|
|
6
6
|
import 'consola';
|
|
7
|
+
import './shared/cli-nightly.B9AmABr3.mjs';
|
|
7
8
|
import 'node:url';
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { pathToFileURL } from 'node:url';
|
|
2
|
+
import { resolveModulePath } from 'exsolve';
|
|
2
3
|
|
|
3
4
|
async function loadKit(rootDir) {
|
|
4
|
-
const jiti = createJiti(rootDir);
|
|
5
5
|
try {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
let kitPath = resolveModulePath("@nuxt/kit", { try: true, from: rootDir });
|
|
7
|
+
if (!kitPath) {
|
|
8
|
+
const nuxtPath = tryResolveNuxt(rootDir);
|
|
9
|
+
kitPath = resolveModulePath("@nuxt/kit", { from: nuxtPath || rootDir });
|
|
10
|
+
}
|
|
11
|
+
let kit = await import(pathToFileURL(kitPath).href);
|
|
9
12
|
if (!kit.writeTypes) {
|
|
10
13
|
kit = {
|
|
11
14
|
...kit,
|
|
@@ -18,16 +21,15 @@ async function loadKit(rootDir) {
|
|
|
18
21
|
} catch (e) {
|
|
19
22
|
if (e.toString().includes("Cannot find module '@nuxt/kit'")) {
|
|
20
23
|
throw new Error(
|
|
21
|
-
"nuxi requires `@nuxt/kit` to be installed in your project. Try installing `nuxt` v3 or `@nuxt/bridge` first."
|
|
24
|
+
"nuxi requires `@nuxt/kit` to be installed in your project. Try installing `nuxt` v3+ or `@nuxt/bridge` first."
|
|
22
25
|
);
|
|
23
26
|
}
|
|
24
27
|
throw e;
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
|
-
|
|
28
|
-
const jiti = createJiti(rootDir);
|
|
30
|
+
function tryResolveNuxt(rootDir) {
|
|
29
31
|
for (const pkg of ["nuxt-nightly", "nuxt", "nuxt3", "nuxt-edge"]) {
|
|
30
|
-
const path =
|
|
32
|
+
const path = resolveModulePath(pkg, { from: rootDir, try: true });
|
|
31
33
|
if (path) {
|
|
32
34
|
return path;
|
|
33
35
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { promises } from 'node:fs';
|
|
2
2
|
import { hash } from 'ohash';
|
|
3
3
|
import { resolve, dirname } from 'pathe';
|
|
4
|
-
import {
|
|
5
|
-
import { r as rmRecursive } from './cli-nightly.
|
|
4
|
+
import { l as logger } from './cli-nightly.B9AmABr3.mjs';
|
|
5
|
+
import { r as rmRecursive } from './cli-nightly.DPmMxQ6h.mjs';
|
|
6
6
|
|
|
7
7
|
async function cleanupNuxtDirs(rootDir, buildDir) {
|
|
8
8
|
logger.info("Cleaning up generated Nuxt files and caches...");
|
|
@@ -1,11 +1,12 @@
|
|
|
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 {
|
|
4
|
+
import { b as commands, c as cwdArgs, s as setupGlobalConsole, f as checkEngines } from './cli-nightly.DSXVWJCf.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.BUFTQIaz.mjs';
|
|
9
|
+
import { l as logger } from './cli-nightly.B9AmABr3.mjs';
|
|
9
10
|
|
|
10
11
|
if (!globalThis.crypto) {
|
|
11
12
|
globalThis.crypto = nodeCrypto;
|
|
@@ -60,10 +61,10 @@ globalThis.__nuxt_cli__ = globalThis.__nuxt_cli__ || {
|
|
|
60
61
|
// Programmatic usage fallback
|
|
61
62
|
startTime: Date.now(),
|
|
62
63
|
entry: fileURLToPath(
|
|
63
|
-
new URL(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
)
|
|
64
|
+
new URL("../../bin/nuxi.mjs", import.meta.url)
|
|
65
|
+
),
|
|
66
|
+
devEntry: fileURLToPath(
|
|
67
|
+
new URL("../dev/index.mjs", import.meta.url)
|
|
67
68
|
)
|
|
68
69
|
};
|
|
69
70
|
async function runCommand(name, argv = process.argv.slice(2), data = {}) {
|
|
@@ -3,11 +3,12 @@ import process from 'node:process';
|
|
|
3
3
|
import { defineCommand, runMain as runMain$1, runCommand as runCommand$1 } from 'citty';
|
|
4
4
|
import { provider } from 'std-env';
|
|
5
5
|
import { consola } from 'consola';
|
|
6
|
+
import { l as logger } from './cli-nightly.B9AmABr3.mjs';
|
|
6
7
|
import { fileURLToPath } from 'node:url';
|
|
7
8
|
|
|
8
9
|
const _rDefault = (r) => r.default || r;
|
|
9
10
|
const commands = {
|
|
10
|
-
add: () => import('../chunks/
|
|
11
|
+
add: () => import('../chunks/add2.mjs').then(_rDefault),
|
|
11
12
|
analyze: () => import('../chunks/analyze.mjs').then(_rDefault),
|
|
12
13
|
build: () => import('../chunks/build.mjs').then(_rDefault),
|
|
13
14
|
cleanup: () => import('../chunks/cleanup.mjs').then(_rDefault),
|
|
@@ -17,7 +18,7 @@ const commands = {
|
|
|
17
18
|
generate: () => import('../chunks/generate.mjs').then(_rDefault),
|
|
18
19
|
info: () => import('../chunks/info.mjs').then(_rDefault),
|
|
19
20
|
init: () => import('../chunks/init.mjs').then(_rDefault),
|
|
20
|
-
module: () => import('../chunks/
|
|
21
|
+
module: () => import('../chunks/index2.mjs').then(_rDefault),
|
|
21
22
|
prepare: () => import('../chunks/prepare.mjs').then(_rDefault),
|
|
22
23
|
preview: () => import('../chunks/preview.mjs').then(_rDefault),
|
|
23
24
|
start: () => import('../chunks/preview.mjs').then(_rDefault),
|
|
@@ -105,8 +106,6 @@ function setupGlobalConsole(opts = {}) {
|
|
|
105
106
|
process.on("uncaughtException", (err) => consola.error("[uncaughtException]", err));
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
const logger = consola.withTag("nuxi");
|
|
109
|
-
|
|
110
109
|
async function checkEngines() {
|
|
111
110
|
const satisfies = await import('semver/functions/satisfies.js').then(
|
|
112
111
|
(r) => r.default || r
|
|
@@ -122,7 +121,7 @@ async function checkEngines() {
|
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
const name = "@nuxt/cli-nightly";
|
|
125
|
-
const version = "3.26.0-20250607-
|
|
124
|
+
const version = "3.26.0-20250607-223602-1089c0e";
|
|
126
125
|
const description = "Nuxt CLI";
|
|
127
126
|
|
|
128
127
|
const main = defineCommand({
|
|
@@ -174,10 +173,10 @@ globalThis.__nuxt_cli__ = globalThis.__nuxt_cli__ || {
|
|
|
174
173
|
// Programmatic usage fallback
|
|
175
174
|
startTime: Date.now(),
|
|
176
175
|
entry: fileURLToPath(
|
|
177
|
-
new URL(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
)
|
|
176
|
+
new URL("../../bin/nuxi.mjs", import.meta.url)
|
|
177
|
+
),
|
|
178
|
+
devEntry: fileURLToPath(
|
|
179
|
+
new URL("../dev/index.mjs", import.meta.url)
|
|
181
180
|
)
|
|
182
181
|
};
|
|
183
182
|
const runMain = () => runMain$1(main);
|
|
@@ -194,4 +193,4 @@ async function runCommand(name, argv = process.argv.slice(2), data = {}) {
|
|
|
194
193
|
});
|
|
195
194
|
}
|
|
196
195
|
|
|
197
|
-
export {
|
|
196
|
+
export { logLevelArgs as a, commands as b, cwdArgs as c, dotEnvArgs as d, envNameArgs as e, checkEngines as f, runMain as g, legacyRootDirArgs as l, main as m, runCommand as r, setupGlobalConsole as s };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { colors } from 'consola/utils';
|
|
3
|
+
import { resolveModulePath } from 'exsolve';
|
|
4
|
+
import { t as tryResolveNuxt } from './cli-nightly.BrKZotr9.mjs';
|
|
5
|
+
import { l as logger } from './cli-nightly.B9AmABr3.mjs';
|
|
6
|
+
|
|
7
|
+
function showVersions(cwd) {
|
|
8
|
+
const { bold, gray, green } = colors;
|
|
9
|
+
const nuxtDir = tryResolveNuxt(cwd);
|
|
10
|
+
function getPkgVersion(pkg) {
|
|
11
|
+
for (const url of [cwd, nuxtDir]) {
|
|
12
|
+
if (!url) {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
const p = resolveModulePath(`${pkg}/package.json`, { from: url, try: true });
|
|
16
|
+
if (p) {
|
|
17
|
+
return JSON.parse(readFileSync(p, "utf-8")).version;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return "";
|
|
21
|
+
}
|
|
22
|
+
const nuxtVersion = getPkgVersion("nuxt") || getPkgVersion("nuxt-nightly") || getPkgVersion("nuxt3") || getPkgVersion("nuxt-edge");
|
|
23
|
+
const nitroVersion = getPkgVersion("nitropack") || getPkgVersion("nitropack-nightly") || getPkgVersion("nitropack-edge");
|
|
24
|
+
logger.log(gray(green(`Nuxt ${bold(nuxtVersion)}`) + (nitroVersion ? ` with Nitro ${bold(nitroVersion)}` : "")));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { showVersions as s };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/cli-nightly",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.26.0-20250607-
|
|
4
|
+
"version": "3.26.0-20250607-223602-1089c0e",
|
|
5
5
|
"description": "Nuxt CLI",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"clipboardy": "^4.0.0",
|
|
40
40
|
"consola": "^3.4.2",
|
|
41
41
|
"defu": "^6.1.4",
|
|
42
|
+
"exsolve": "^1.0.5",
|
|
42
43
|
"fuse.js": "^7.1.0",
|
|
43
44
|
"giget": "^2.0.0",
|
|
44
45
|
"h3": "^1.15.3",
|