@nuxt/cli-nightly 3.31.0-20251204-154009-40c967f → 3.31.0-20251204-171225-fae1e55
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-BTtyQYdl.mjs → dev-CV0MMLTC.mjs} +1 -1
- package/dist/{dev-BjCHVbda.mjs → dev-DauHVvcO.mjs} +1 -1
- package/dist/{dev-BPdQ9vYt.mjs → dev-DtQo0jDZ.mjs} +6 -26
- package/dist/{dev-child-C02p1dAk.mjs → dev-child-CJE2iuic.mjs} +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{info-DqlbhTcc.mjs → info-Dmll3Y8f.mjs} +1 -1
- package/dist/{init-DvmnH01R.mjs → init--rim7tGt.mjs} +1 -4
- package/package.json +1 -1
package/dist/dev/index.mjs
CHANGED
|
@@ -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-DtQo0jDZ.mjs";
|
|
4
4
|
import "./kit-CPEUdXTm.mjs";
|
|
5
5
|
import "./versions-CTlxnxbH.mjs";
|
|
6
6
|
import "./banner-drlfl0J-.mjs";
|
|
@@ -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,
|
|
10
|
+
import { existsSync, 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,33 +300,16 @@ 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);
|
|
304
303
|
try {
|
|
305
|
-
const currentMtime = statSync(
|
|
306
|
-
const lastMtime = this.mtimes.get(
|
|
307
|
-
this.mtimes.set(
|
|
304
|
+
const currentMtime = statSync(filePath).mtimeMs;
|
|
305
|
+
const lastMtime = this.mtimes.get(filePath);
|
|
306
|
+
this.mtimes.set(filePath, currentMtime);
|
|
308
307
|
return lastMtime === void 0 || currentMtime !== lastMtime;
|
|
309
308
|
} catch {
|
|
310
|
-
this.mtimes.delete(
|
|
309
|
+
this.mtimes.delete(filePath);
|
|
311
310
|
return true;
|
|
312
311
|
}
|
|
313
312
|
}
|
|
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
|
-
}
|
|
330
313
|
};
|
|
331
314
|
var NuxtDevServer = class extends EventEmitter {
|
|
332
315
|
#handler;
|
|
@@ -520,7 +503,6 @@ var NuxtDevServer = class extends EventEmitter {
|
|
|
520
503
|
if (!this.#currentNuxt.server) throw new Error("Nitro server has not been initialized.");
|
|
521
504
|
const distDir = resolve(this.#currentNuxt.options.buildDir, "dist");
|
|
522
505
|
await mkdir(distDir, { recursive: true });
|
|
523
|
-
this.#fileChangeTracker.prime(distDir);
|
|
524
506
|
this.#distWatcher = watch(distDir);
|
|
525
507
|
this.#distWatcher.on("change", (_event, file) => {
|
|
526
508
|
if (!this.#fileChangeTracker.shouldEmitChange(resolve(distDir, file || ""))) return;
|
|
@@ -570,11 +552,10 @@ function resolveDevServerDefaults(listenOptions, urls = []) {
|
|
|
570
552
|
return defaultConfig;
|
|
571
553
|
}
|
|
572
554
|
function createConfigWatcher(cwd, dotenvFileName = ".env", onRestart, onReload) {
|
|
573
|
-
const fileWatcher = new FileChangeTracker();
|
|
574
|
-
fileWatcher.prime(cwd);
|
|
575
555
|
const configWatcher = watch(cwd);
|
|
576
556
|
let configDirWatcher = existsSync(resolve(cwd, ".config")) ? createConfigDirWatcher(cwd, onReload) : void 0;
|
|
577
557
|
const dotenvFileNames = new Set(Array.isArray(dotenvFileName) ? dotenvFileName : [dotenvFileName]);
|
|
558
|
+
const fileWatcher = new FileChangeTracker();
|
|
578
559
|
configWatcher.on("change", (_event, file) => {
|
|
579
560
|
if (!fileWatcher.shouldEmitChange(resolve(cwd, file))) return;
|
|
580
561
|
if (dotenvFileNames.has(file)) onRestart();
|
|
@@ -589,7 +570,6 @@ function createConfigWatcher(cwd, dotenvFileName = ".env", onRestart, onReload)
|
|
|
589
570
|
function createConfigDirWatcher(cwd, onReload) {
|
|
590
571
|
const configDir = resolve(cwd, ".config");
|
|
591
572
|
const fileWatcher = new FileChangeTracker();
|
|
592
|
-
fileWatcher.prime(configDir);
|
|
593
573
|
const configDirWatcher = watch(configDir);
|
|
594
574
|
configDirWatcher.on("change", (_event, file) => {
|
|
595
575
|
if (!fileWatcher.shouldEmitChange(resolve(configDir, file))) return;
|
|
@@ -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-CV0MMLTC.mjs");
|
|
29
29
|
await initialize({
|
|
30
30
|
cwd,
|
|
31
31
|
args: ctx.args
|
package/dist/index.mjs
CHANGED
|
@@ -17,12 +17,12 @@ 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-CJE2iuic.mjs").then(_rDefault),
|
|
21
|
+
dev: () => import("./dev-DauHVvcO.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-Dmll3Y8f.mjs").then(_rDefault),
|
|
25
|
+
init: () => import("./init--rim7tGt.mjs").then(_rDefault),
|
|
26
26
|
module: () => import("./module-dUoKC1O2.mjs").then(_rDefault),
|
|
27
27
|
prepare: () => import("./prepare-DCVINTk-.mjs").then(_rDefault),
|
|
28
28
|
preview: () => import("./preview-CwSDIjlH.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.31.0-20251204-
|
|
69
|
+
var version = "3.31.0-20251204-171225-fae1e55";
|
|
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.31.0-20251204-
|
|
20
|
+
var version = "3.31.0-20251204-171214-fae1e55";
|
|
21
21
|
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region ../nuxi/src/commands/info.ts
|
|
@@ -53,10 +53,7 @@ const hiddenTemplates = [
|
|
|
53
53
|
const fetchOptions = {
|
|
54
54
|
timeout: 3e3,
|
|
55
55
|
responseType: "json",
|
|
56
|
-
headers: {
|
|
57
|
-
"user-agent": "@nuxt/cli",
|
|
58
|
-
...process.env.GITHUB_TOKEN ? { authorization: `token ${process.env.GITHUB_TOKEN}` } : {}
|
|
59
|
-
}
|
|
56
|
+
headers: { "user-agent": "@nuxt/cli" }
|
|
60
57
|
};
|
|
61
58
|
let templatesCache = null;
|
|
62
59
|
async function getTemplates() {
|