@nuxt/cli-nightly 3.31.0-20251204-171225-fae1e55 → 3.32.0-20251204-165525-40c967f
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/dev/index.mjs +1 -1
- package/dist/{dev-DtQo0jDZ.mjs → dev-BPdQ9vYt.mjs} +26 -6
- package/dist/{dev-CV0MMLTC.mjs → dev-BTtyQYdl.mjs} +1 -1
- package/dist/{dev-DauHVvcO.mjs → dev-BjCHVbda.mjs} +1 -1
- package/dist/{dev-child-CJE2iuic.mjs → dev-child-C02p1dAk.mjs} +1 -1
- package/dist/index.mjs +7 -7
- package/dist/{info-Dmll3Y8f.mjs → info-Cgh4x28b.mjs} +1 -1
- package/dist/{init--rim7tGt.mjs → init-CUkHvr29.mjs} +8 -5
- package/dist/{preview-CwSDIjlH.mjs → preview-D2Y29Rfc.mjs} +1 -1
- package/package.json +4 -4
package/dist/dev/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { provider } from "std-env";
|
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
8
8
|
import defu, { defu as defu$1 } from "defu";
|
|
9
9
|
import EventEmitter from "node:events";
|
|
10
|
-
import { existsSync, statSync, watch } from "node:fs";
|
|
10
|
+
import { existsSync, readdirSync, statSync, watch } from "node:fs";
|
|
11
11
|
import { mkdir } from "node:fs/promises";
|
|
12
12
|
import { resolveModulePath } from "exsolve";
|
|
13
13
|
import { joinURL } from "ufo";
|
|
@@ -300,16 +300,33 @@ const RESTART_RE = /^(?:nuxt\.config\.[a-z0-9]+|\.nuxtignore|\.nuxtrc|\.config\/
|
|
|
300
300
|
var FileChangeTracker = class {
|
|
301
301
|
mtimes = /* @__PURE__ */ new Map();
|
|
302
302
|
shouldEmitChange(filePath) {
|
|
303
|
+
const resolved = resolve(filePath);
|
|
303
304
|
try {
|
|
304
|
-
const currentMtime = statSync(
|
|
305
|
-
const lastMtime = this.mtimes.get(
|
|
306
|
-
this.mtimes.set(
|
|
305
|
+
const currentMtime = statSync(resolved).mtimeMs;
|
|
306
|
+
const lastMtime = this.mtimes.get(resolved);
|
|
307
|
+
this.mtimes.set(resolved, currentMtime);
|
|
307
308
|
return lastMtime === void 0 || currentMtime !== lastMtime;
|
|
308
309
|
} catch {
|
|
309
|
-
this.mtimes.delete(
|
|
310
|
+
this.mtimes.delete(resolved);
|
|
310
311
|
return true;
|
|
311
312
|
}
|
|
312
313
|
}
|
|
314
|
+
prime(filePath, recursive = false) {
|
|
315
|
+
const resolved = resolve(filePath);
|
|
316
|
+
const stat = statSync(resolved);
|
|
317
|
+
this.mtimes.set(resolved, stat.mtimeMs);
|
|
318
|
+
if (stat.isDirectory()) {
|
|
319
|
+
const entries = readdirSync(resolved);
|
|
320
|
+
for (const entry of entries) {
|
|
321
|
+
const fullPath = resolve(resolved, entry);
|
|
322
|
+
try {
|
|
323
|
+
const stats = statSync(fullPath);
|
|
324
|
+
this.mtimes.set(fullPath, stats.mtimeMs);
|
|
325
|
+
if (recursive && stats.isDirectory()) this.prime(fullPath, recursive);
|
|
326
|
+
} catch {}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
313
330
|
};
|
|
314
331
|
var NuxtDevServer = class extends EventEmitter {
|
|
315
332
|
#handler;
|
|
@@ -503,6 +520,7 @@ var NuxtDevServer = class extends EventEmitter {
|
|
|
503
520
|
if (!this.#currentNuxt.server) throw new Error("Nitro server has not been initialized.");
|
|
504
521
|
const distDir = resolve(this.#currentNuxt.options.buildDir, "dist");
|
|
505
522
|
await mkdir(distDir, { recursive: true });
|
|
523
|
+
this.#fileChangeTracker.prime(distDir);
|
|
506
524
|
this.#distWatcher = watch(distDir);
|
|
507
525
|
this.#distWatcher.on("change", (_event, file) => {
|
|
508
526
|
if (!this.#fileChangeTracker.shouldEmitChange(resolve(distDir, file || ""))) return;
|
|
@@ -552,10 +570,11 @@ function resolveDevServerDefaults(listenOptions, urls = []) {
|
|
|
552
570
|
return defaultConfig;
|
|
553
571
|
}
|
|
554
572
|
function createConfigWatcher(cwd, dotenvFileName = ".env", onRestart, onReload) {
|
|
573
|
+
const fileWatcher = new FileChangeTracker();
|
|
574
|
+
fileWatcher.prime(cwd);
|
|
555
575
|
const configWatcher = watch(cwd);
|
|
556
576
|
let configDirWatcher = existsSync(resolve(cwd, ".config")) ? createConfigDirWatcher(cwd, onReload) : void 0;
|
|
557
577
|
const dotenvFileNames = new Set(Array.isArray(dotenvFileName) ? dotenvFileName : [dotenvFileName]);
|
|
558
|
-
const fileWatcher = new FileChangeTracker();
|
|
559
578
|
configWatcher.on("change", (_event, file) => {
|
|
560
579
|
if (!fileWatcher.shouldEmitChange(resolve(cwd, file))) return;
|
|
561
580
|
if (dotenvFileNames.has(file)) onRestart();
|
|
@@ -570,6 +589,7 @@ function createConfigWatcher(cwd, dotenvFileName = ".env", onRestart, onReload)
|
|
|
570
589
|
function createConfigDirWatcher(cwd, onReload) {
|
|
571
590
|
const configDir = resolve(cwd, ".config");
|
|
572
591
|
const fileWatcher = new FileChangeTracker();
|
|
592
|
+
fileWatcher.prime(configDir);
|
|
573
593
|
const configDirWatcher = watch(configDir);
|
|
574
594
|
configDirWatcher.on("change", (_event, file) => {
|
|
575
595
|
if (!fileWatcher.shouldEmitChange(resolve(configDir, file))) return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as legacyRootDirArgs, i as extendsArgs, n as dotEnvArgs, o as logLevelArgs, r as envNameArgs, t as cwdArgs } from "./_shared-BCYCnX0T.mjs";
|
|
2
2
|
import { n as logger, t as debug } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { t as initialize } from "./dev-
|
|
3
|
+
import { t as initialize } from "./dev-BPdQ9vYt.mjs";
|
|
4
4
|
import "./kit-CPEUdXTm.mjs";
|
|
5
5
|
import "./versions-CTlxnxbH.mjs";
|
|
6
6
|
import "./banner-drlfl0J-.mjs";
|
|
@@ -25,7 +25,7 @@ var dev_child_default = defineCommand({
|
|
|
25
25
|
async run(ctx) {
|
|
26
26
|
if (!process.send && !isTest) console.warn("`nuxi _dev` is an internal command and should not be used directly. Please use `nuxi dev` instead.");
|
|
27
27
|
const cwd = resolve(ctx.args.cwd || ctx.args.rootDir);
|
|
28
|
-
const { initialize } = await import("./dev-
|
|
28
|
+
const { initialize } = await import("./dev-BTtyQYdl.mjs");
|
|
29
29
|
await initialize({
|
|
30
30
|
cwd,
|
|
31
31
|
args: ctx.args
|
package/dist/index.mjs
CHANGED
|
@@ -17,16 +17,16 @@ const commands = {
|
|
|
17
17
|
analyze: () => import("./analyze-C5qqTkhe.mjs").then(_rDefault),
|
|
18
18
|
build: () => import("./build-Dx1VGivC.mjs").then(_rDefault),
|
|
19
19
|
cleanup: () => import("./cleanup-CD3OpT9X.mjs").then(_rDefault),
|
|
20
|
-
_dev: () => import("./dev-child-
|
|
21
|
-
dev: () => import("./dev-
|
|
20
|
+
_dev: () => import("./dev-child-C02p1dAk.mjs").then(_rDefault),
|
|
21
|
+
dev: () => import("./dev-BjCHVbda.mjs").then(_rDefault),
|
|
22
22
|
devtools: () => import("./devtools-BTYlIJMv.mjs").then(_rDefault),
|
|
23
23
|
generate: () => import("./generate-DSEHRPYE.mjs").then(_rDefault),
|
|
24
|
-
info: () => import("./info-
|
|
25
|
-
init: () => import("./init
|
|
24
|
+
info: () => import("./info-Cgh4x28b.mjs").then(_rDefault),
|
|
25
|
+
init: () => import("./init-CUkHvr29.mjs").then(_rDefault),
|
|
26
26
|
module: () => import("./module-dUoKC1O2.mjs").then(_rDefault),
|
|
27
27
|
prepare: () => import("./prepare-DCVINTk-.mjs").then(_rDefault),
|
|
28
|
-
preview: () => import("./preview-
|
|
29
|
-
start: () => import("./preview-
|
|
28
|
+
preview: () => import("./preview-D2Y29Rfc.mjs").then(_rDefault),
|
|
29
|
+
start: () => import("./preview-D2Y29Rfc.mjs").then(_rDefault),
|
|
30
30
|
test: () => import("./test-D9z67EJZ.mjs").then(_rDefault),
|
|
31
31
|
typecheck: () => import("./typecheck-CLdIBKcn.mjs").then(_rDefault),
|
|
32
32
|
upgrade: () => import("./upgrade-fEGIXDnO.mjs").then(_rDefault)
|
|
@@ -66,7 +66,7 @@ async function checkEngines() {
|
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region package.json
|
|
68
68
|
var name = "@nuxt/cli-nightly";
|
|
69
|
-
var version = "3.
|
|
69
|
+
var version = "3.32.0-20251204-165525-40c967f";
|
|
70
70
|
var description = "Nuxt CLI";
|
|
71
71
|
|
|
72
72
|
//#endregion
|
|
@@ -17,7 +17,7 @@ import { copy } from "copy-paste";
|
|
|
17
17
|
import { detectPackageManager } from "nypm";
|
|
18
18
|
|
|
19
19
|
//#region ../nuxi/package.json
|
|
20
|
-
var version = "3.
|
|
20
|
+
var version = "3.32.0-20251204-165514-40c967f";
|
|
21
21
|
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region ../nuxi/src/commands/info.ts
|
|
@@ -53,7 +53,10 @@ const hiddenTemplates = [
|
|
|
53
53
|
const fetchOptions = {
|
|
54
54
|
timeout: 3e3,
|
|
55
55
|
responseType: "json",
|
|
56
|
-
headers: {
|
|
56
|
+
headers: {
|
|
57
|
+
"user-agent": "@nuxt/cli",
|
|
58
|
+
...process.env.GITHUB_TOKEN ? { authorization: `token ${process.env.GITHUB_TOKEN}` } : {}
|
|
59
|
+
}
|
|
57
60
|
};
|
|
58
61
|
let templatesCache = null;
|
|
59
62
|
async function getTemplates() {
|
|
@@ -273,7 +276,7 @@ var init_default = defineCommand({
|
|
|
273
276
|
}
|
|
274
277
|
downloadSpinner.stop(`Downloaded ${colors.cyan(template.name)} template`);
|
|
275
278
|
} catch (err) {
|
|
276
|
-
downloadSpinner.
|
|
279
|
+
downloadSpinner.error("Template download failed");
|
|
277
280
|
if (process.env.DEBUG) throw err;
|
|
278
281
|
logger.error(err.toString());
|
|
279
282
|
process.exit(1);
|
|
@@ -284,13 +287,13 @@ var init_default = defineCommand({
|
|
|
284
287
|
const response = await $fetch("https://registry.npmjs.org/nuxt-nightly");
|
|
285
288
|
const nightlyChannelTag = ctx.args.nightly || "latest";
|
|
286
289
|
if (!nightlyChannelTag) {
|
|
287
|
-
nightlySpinner.
|
|
290
|
+
nightlySpinner.error("Failed to get nightly channel tag");
|
|
288
291
|
logger.error(`Error getting nightly channel tag.`);
|
|
289
292
|
process.exit(1);
|
|
290
293
|
}
|
|
291
294
|
const nightlyChannelVersion = response["dist-tags"][nightlyChannelTag];
|
|
292
295
|
if (!nightlyChannelVersion) {
|
|
293
|
-
nightlySpinner.
|
|
296
|
+
nightlySpinner.error("Nightly version not found");
|
|
294
297
|
logger.error(`Nightly channel version for tag ${colors.cyan(nightlyChannelTag)} not found.`);
|
|
295
298
|
process.exit(1);
|
|
296
299
|
}
|
|
@@ -425,7 +428,7 @@ var init_default = defineCommand({
|
|
|
425
428
|
titlePadding: 2,
|
|
426
429
|
contentPadding: 2,
|
|
427
430
|
rounded: true,
|
|
428
|
-
|
|
431
|
+
withGuide: false,
|
|
429
432
|
formatBorder: (text$1) => `${themeColor + text$1}\x1B[0m`
|
|
430
433
|
});
|
|
431
434
|
if (ctx.args.shell) startShell(template.dir);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/cli-nightly",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.32.0-20251204-165525-40c967f",
|
|
5
5
|
"description": "Nuxt CLI",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@bomb.sh/tab": "^0.0.9",
|
|
37
|
-
"@clack/prompts": "1.0.0-alpha.
|
|
37
|
+
"@clack/prompts": "1.0.0-alpha.7",
|
|
38
38
|
"c12": "^3.3.2",
|
|
39
39
|
"citty": "^0.1.6",
|
|
40
40
|
"confbox": "^0.2.2",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"pkg-types": "^2.3.0",
|
|
56
56
|
"scule": "^1.3.0",
|
|
57
57
|
"semver": "^7.7.3",
|
|
58
|
-
"srvx": "^0.9.
|
|
58
|
+
"srvx": "^0.9.7",
|
|
59
59
|
"std-env": "^3.10.0",
|
|
60
60
|
"tinyexec": "^1.0.2",
|
|
61
61
|
"ufo": "^1.6.1",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"nitropack": "^2.12.9",
|
|
74
74
|
"rollup": "^4.53.3",
|
|
75
75
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
76
|
-
"tsdown": "^0.16.
|
|
76
|
+
"tsdown": "^0.16.8",
|
|
77
77
|
"typescript": "^5.9.3",
|
|
78
78
|
"undici": "^7.16.0",
|
|
79
79
|
"unplugin-purge-polyfills": "^0.1.0",
|