@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.
@@ -1,5 +1,5 @@
1
1
  import "../logger-B4ge7MhP.mjs";
2
- import { t as initialize } from "../dev-BPdQ9vYt.mjs";
2
+ import { t as initialize } from "../dev-DtQo0jDZ.mjs";
3
3
  import "../kit-CPEUdXTm.mjs";
4
4
  import "../versions-CTlxnxbH.mjs";
5
5
  import "../banner-drlfl0J-.mjs";
@@ -1,5 +1,5 @@
1
1
  import "./logger-B4ge7MhP.mjs";
2
- import { t as initialize } from "./dev-BPdQ9vYt.mjs";
2
+ import { t as initialize } from "./dev-DtQo0jDZ.mjs";
3
3
  import "./kit-CPEUdXTm.mjs";
4
4
  import "./versions-CTlxnxbH.mjs";
5
5
  import "./banner-drlfl0J-.mjs";
@@ -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-BPdQ9vYt.mjs";
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, readdirSync, statSync, watch } from "node:fs";
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(resolved).mtimeMs;
306
- const lastMtime = this.mtimes.get(resolved);
307
- this.mtimes.set(resolved, currentMtime);
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(resolved);
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-BTtyQYdl.mjs");
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-C02p1dAk.mjs").then(_rDefault),
21
- dev: () => import("./dev-BjCHVbda.mjs").then(_rDefault),
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-DqlbhTcc.mjs").then(_rDefault),
25
- init: () => import("./init-DvmnH01R.mjs").then(_rDefault),
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-154009-40c967f";
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-153957-40c967f";
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() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/cli-nightly",
3
3
  "type": "module",
4
- "version": "3.31.0-20251204-154009-40c967f",
4
+ "version": "3.31.0-20251204-171225-fae1e55",
5
5
  "description": "Nuxt CLI",
6
6
  "license": "MIT",
7
7
  "repository": {