@nuxt/cli-nightly 3.26.0-20250701-133609-99b4136 → 3.26.0-20250701-135226-299c404

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.
@@ -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.D6YrTxAn.mjs';
14
+ import { r as runCommand } from '../shared/cli-nightly.Z2rTrIsv.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.BBa5DrL9.mjs';
16
+ import { a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.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.CNen0afL.mjs';
21
+ import '../shared/cli-nightly.Bykspvn1.mjs';
22
22
  import 'consola';
23
23
  import 'confbox';
24
24
 
@@ -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.BBa5DrL9.mjs';
8
+ import { a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
9
9
  import 'node:url';
10
10
  import 'exsolve';
11
11
  import 'consola';
@@ -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 { d as dotEnvArgs, l as legacyRootDirArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.BBa5DrL9.mjs';
12
+ import { d as dotEnvArgs, l as legacyRootDirArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
13
13
  import 'node:url';
14
14
  import 'exsolve';
15
15
  import 'consola';
@@ -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 envNameArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.BBa5DrL9.mjs';
9
+ import { l as legacyRootDirArgs, e as envNameArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
10
10
  import 'node:fs';
11
11
  import 'consola/utils';
12
12
  import 'exsolve';
@@ -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.BBa5DrL9.mjs';
5
+ import { l as legacyRootDirArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.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, e as envNameArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.BBa5DrL9.mjs';
5
+ import { l as legacyRootDirArgs, d as dotEnvArgs, e as envNameArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
6
6
  import 'node:path';
7
7
  import 'consola';
8
8
  import '../shared/cli-nightly.B9AmABr3.mjs';
@@ -12,7 +12,7 @@ import { s as showVersions } from '../shared/cli-nightly.DltNmcvh.mjs';
12
12
  import { o as overrideEnv } from '../shared/cli-nightly.DkO5RR_e.mjs';
13
13
  import { l as loadKit } from '../shared/cli-nightly.qKvs7FJ2.mjs';
14
14
  import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
15
- import { e as envNameArgs, l as legacyRootDirArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.BBa5DrL9.mjs';
15
+ import { e as envNameArgs, l as legacyRootDirArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
16
16
  import 'defu';
17
17
  import 'node:events';
18
18
  import 'node:fs';
@@ -166,6 +166,24 @@ async function createDevProxy(nuxtOptions, listenOptions) {
166
166
  let address;
167
167
  let loadingTemplate = nuxtOptions.devServer.loadingTemplate;
168
168
  const proxy = createProxyServer({});
169
+ proxy.on("proxyReq", (proxyReq, req) => {
170
+ if (!proxyReq.hasHeader("x-forwarded-for")) {
171
+ const address2 = req.socket.remoteAddress;
172
+ if (address2) {
173
+ proxyReq.appendHeader("x-forwarded-for", address2);
174
+ }
175
+ }
176
+ if (!proxyReq.hasHeader("x-forwarded-port")) {
177
+ const localPort = req?.socket?.localPort;
178
+ if (localPort) {
179
+ proxyReq.setHeader("x-forwarded-port", req.socket.localPort);
180
+ }
181
+ }
182
+ if (!proxyReq.hasHeader("x-forwarded-Proto")) {
183
+ const encrypted = req?.connection?.encrypted;
184
+ proxyReq.setHeader("x-forwarded-proto", encrypted ? "https" : "http");
185
+ }
186
+ });
169
187
  const listener = await listen((req, res) => {
170
188
  if (error) {
171
189
  renderError(req, res, error);
@@ -204,7 +222,7 @@ async function createDevProxy(nuxtOptions, listenOptions) {
204
222
  return;
205
223
  }
206
224
  const target = isSocketURL(address) ? parseSocketURL(address) : address;
207
- return proxy.ws(req, socket, { target }, head);
225
+ return proxy.ws(req, socket, { target, xfwd: true }, head);
208
226
  });
209
227
  return {
210
228
  listener,
@@ -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.BBa5DrL9.mjs';
6
+ import { l as legacyRootDirArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
7
7
  import 'consola';
8
8
  import 'node:path';
9
9
  import 'std-env';
@@ -1,5 +1,5 @@
1
1
  import { defineCommand } from 'citty';
2
- import { l as legacyRootDirArgs, e as envNameArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.BBa5DrL9.mjs';
2
+ import { l as legacyRootDirArgs, e as envNameArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
3
3
  import buildCommand from './build.mjs';
4
4
  import 'node:path';
5
5
  import 'node:process';
@@ -170,7 +170,7 @@ class NuxtDevServer extends EventEmitter {
170
170
  }
171
171
  async init() {
172
172
  await this.load();
173
- await this._watchConfig();
173
+ this._watchConfig();
174
174
  }
175
175
  async load(reload, reason) {
176
176
  try {
@@ -186,7 +186,7 @@ class NuxtDevServer extends EventEmitter {
186
186
  }
187
187
  async close() {
188
188
  this._distWatcher?.close();
189
- this._configWatcher?.close();
189
+ this._configWatcher?.();
190
190
  if (this._currentNuxt) {
191
191
  await this._currentNuxt.close();
192
192
  }
@@ -297,16 +297,13 @@ class NuxtDevServer extends EventEmitter {
297
297
  this._handler = toNodeListener(this._currentNuxt.server.app);
298
298
  this.emit("ready", "socketPath" in addr ? formatSocketURL(addr.socketPath, !!this.listener.https) : `http://127.0.0.1:${addr.port}`);
299
299
  }
300
- async _watchConfig() {
301
- this._configWatcher = watch(this.options.cwd, { recursive: true });
302
- this._configWatcher.on("change", (_event, file) => {
303
- if (file === (this.options.dotenv.fileName || ".env")) {
304
- this.emit("restart");
305
- }
306
- if (RESTART_RE.test(file)) {
307
- this.loadDebounced(true, `${file} updated`);
308
- }
309
- });
300
+ _watchConfig() {
301
+ this._configWatcher = createConfigWatcher(
302
+ this.cwd,
303
+ this.options.dotenv.fileName,
304
+ () => this.emit("restart"),
305
+ (file) => this.loadDebounced(true, `${file} updated`)
306
+ );
310
307
  }
311
308
  }
312
309
  function getAddressURL(addr, https) {
@@ -339,6 +336,35 @@ function resolveDevServerDefaults(listenOptions, urls = []) {
339
336
  }
340
337
  return defaultConfig;
341
338
  }
339
+ function createConfigWatcher(cwd, dotenvFileName = ".env", onRestart, onReload) {
340
+ const configWatcher = watch(cwd);
341
+ let configDirWatcher = existsSync(resolve(cwd, ".config")) ? createConfigDirWatcher(cwd, onReload) : void 0;
342
+ configWatcher.on("change", (_event, file) => {
343
+ if (file === dotenvFileName) {
344
+ onRestart();
345
+ }
346
+ if (RESTART_RE.test(file)) {
347
+ onReload(file);
348
+ }
349
+ if (file === ".config") {
350
+ configDirWatcher ||= createConfigDirWatcher(cwd, onReload);
351
+ }
352
+ });
353
+ return () => {
354
+ configWatcher.close();
355
+ configDirWatcher?.();
356
+ };
357
+ }
358
+ function createConfigDirWatcher(cwd, onReload) {
359
+ const configDir = resolve(cwd, ".config");
360
+ const configDirWatcher = watch(configDir);
361
+ configDirWatcher.on("change", (_event, file) => {
362
+ if (RESTART_RE.test(file)) {
363
+ onReload(file);
364
+ }
365
+ });
366
+ return () => configDirWatcher.close();
367
+ }
342
368
 
343
369
  const start = Date.now();
344
370
  process.env.NODE_ENV = "development";
@@ -8,11 +8,11 @@ import { resolve } from 'pathe';
8
8
  import { readPackageJSON } from 'pkg-types';
9
9
  import { splitByCase } from 'scule';
10
10
  import { isMinimal } from 'std-env';
11
- import { v as version } from '../shared/cli-nightly.CNen0afL.mjs';
11
+ import { v as version } from '../shared/cli-nightly.Bykspvn1.mjs';
12
12
  import { t as tryResolveNuxt } from '../shared/cli-nightly.qKvs7FJ2.mjs';
13
13
  import { l as logger } from '../shared/cli-nightly.B9AmABr3.mjs';
14
14
  import { g as getPackageManagerVersion } from '../shared/cli-nightly.BSm0_9Hr.mjs';
15
- import { l as legacyRootDirArgs, c as cwdArgs } from '../shared/cli-nightly.BBa5DrL9.mjs';
15
+ import { l as legacyRootDirArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
16
16
  import 'node:url';
17
17
  import 'exsolve';
18
18
  import 'consola';
@@ -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.D6YrTxAn.mjs';
11
+ import { r as runCommand } from '../shared/cli-nightly.Z2rTrIsv.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.BBa5DrL9.mjs';
13
+ import { a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
14
14
  import 'node:url';
15
15
  import 'node:crypto';
16
16
  import 'node:path';
17
- import '../shared/cli-nightly.CNen0afL.mjs';
17
+ import '../shared/cli-nightly.Bykspvn1.mjs';
18
18
  import 'consola';
19
19
 
20
20
  const themeColor = "\x1B[38;2;0;220;130m";
@@ -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 envNameArgs, a as logLevelArgs, c as cwdArgs, d as dotEnvArgs } from '../shared/cli-nightly.BBa5DrL9.mjs';
7
+ import { l as legacyRootDirArgs, e as envNameArgs, a as logLevelArgs, c as cwdArgs, d as dotEnvArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
8
8
  import 'node:fs';
9
9
  import 'node:url';
10
10
  import 'exsolve';
@@ -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 envNameArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.BBa5DrL9.mjs';
12
+ import { d as dotEnvArgs, l as legacyRootDirArgs, e as envNameArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
13
13
  import 'node:url';
14
14
  import 'exsolve';
15
15
  import 'consola';
@@ -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.BBa5DrL9.mjs';
6
+ import { c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.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';
@@ -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.BBa5DrL9.mjs';
5
+ import { l as legacyRootDirArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.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, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.BBa5DrL9.mjs';
9
+ import { l as legacyRootDirArgs, d as dotEnvArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
10
10
  import 'node:url';
11
11
  import 'node:path';
12
12
  import 'consola';
@@ -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.BBa5DrL9.mjs';
12
+ import { l as legacyRootDirArgs, a as logLevelArgs, c as cwdArgs } from '../shared/cli-nightly.DvI4OGUO.mjs';
13
13
  import 'node:url';
14
14
  import 'exsolve';
15
15
  import 'consola';
@@ -73,7 +73,7 @@ declare class NuxtDevServer extends EventEmitter<DevServerEventMap> {
73
73
  load(reload?: boolean, reason?: string): Promise<void>;
74
74
  close(): Promise<void>;
75
75
  _load(reload?: boolean, reason?: string): Promise<void>;
76
- _watchConfig(): Promise<void>;
76
+ _watchConfig(): void;
77
77
  }
78
78
 
79
79
  interface InitializeOptions {
@@ -73,7 +73,7 @@ declare class NuxtDevServer extends EventEmitter<DevServerEventMap> {
73
73
  load(reload?: boolean, reason?: string): Promise<void>;
74
74
  close(): Promise<void>;
75
75
  _load(reload?: boolean, reason?: string): Promise<void>;
76
- _watchConfig(): Promise<void>;
76
+ _watchConfig(): void;
77
77
  }
78
78
 
79
79
  interface InitializeOptions {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { m as main, r as runCommand, g as runMain } from './shared/cli-nightly.BBa5DrL9.mjs';
1
+ export { m as main, r as runCommand, g as runMain } from './shared/cli-nightly.DvI4OGUO.mjs';
2
2
  import 'node:path';
3
3
  import 'node:process';
4
4
  import 'citty';
@@ -1,5 +1,5 @@
1
1
  const name = "nuxi-nightly";
2
- const version = "3.26.0-20250701-133548-99b4136";
2
+ const version = "3.26.0-20250701-135205-299c404";
3
3
  const description = "Nuxt CLI";
4
4
 
5
5
  export { description as d, name as n, version as v };
@@ -121,7 +121,7 @@ async function checkEngines() {
121
121
  }
122
122
 
123
123
  const name = "@nuxt/cli-nightly";
124
- const version = "3.26.0-20250701-133609-99b4136";
124
+ const version = "3.26.0-20250701-135226-299c404";
125
125
  const description = "Nuxt CLI";
126
126
 
127
127
  const main = defineCommand({
@@ -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 { b as commands, c as cwdArgs, s as setupGlobalConsole, f as checkEngines } from './cli-nightly.BBa5DrL9.mjs';
4
+ import { b as commands, c as cwdArgs, s as setupGlobalConsole, f as checkEngines } from './cli-nightly.DvI4OGUO.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.CNen0afL.mjs';
8
+ import { d as description, v as version, n as name } from './cli-nightly.Bykspvn1.mjs';
9
9
  import { l as logger } from './cli-nightly.B9AmABr3.mjs';
10
10
 
11
11
  if (!globalThis.crypto) {
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-20250701-133609-99b4136",
4
+ "version": "3.26.0-20250701-135226-299c404",
5
5
  "description": "Nuxt CLI",
6
6
  "license": "MIT",
7
7
  "repository": {