@nuxt/cli-nightly 3.32.0-20260106-121815-562abd5 → 3.33.0-20260106-161904-8928d35

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.
@@ -3,7 +3,7 @@ import "./logger-B4ge7MhP.mjs";
3
3
  import "./kit-4LNqcmNp.mjs";
4
4
  import "./versions-DD7jbeRR.mjs";
5
5
  import "./fs-BNfOTIDu.mjs";
6
- import { t as add_default } from "./add-CIAi6Dmn.mjs";
6
+ import { t as add_default } from "./add-DP6EXoUb.mjs";
7
7
  import "./_utils-B8YNEdpq.mjs";
8
8
  import "./prepare-CQwaXQtb.mjs";
9
9
 
@@ -24,6 +24,7 @@ import { updateConfig } from "c12/update";
24
24
  //#region ../nuxi/src/commands/_utils.ts
25
25
  const nuxiCommands = [
26
26
  "add",
27
+ "add-template",
27
28
  "analyze",
28
29
  "build",
29
30
  "cleanup",
@@ -103,8 +104,12 @@ var add_default = defineCommand({
103
104
  });
104
105
  if (isCancel(shouldContinue) || shouldContinue !== true) process.exit(1);
105
106
  }
106
- const resolvedModules = (await Promise.all(modules.map((moduleName) => resolveModule(moduleName, cwd)))).filter((x) => !!x);
107
- if (!resolvedModules.length) {
107
+ const resolvedModules = [];
108
+ for (const moduleName of modules) {
109
+ const resolvedModule = await resolveModule(moduleName, cwd);
110
+ if (resolvedModule) resolvedModules.push(resolvedModule);
111
+ }
112
+ if (resolvedModules.length === 0) {
108
113
  cancel("No modules to add.");
109
114
  process.exit(1);
110
115
  }
@@ -239,10 +244,14 @@ async function resolveModule(moduleName, cwd) {
239
244
  const meta = await detectNpmRegistry(pkgName.startsWith("@") ? pkgName.split("/")[0] : null);
240
245
  const headers = {};
241
246
  if (meta.authToken) headers.Authorization = `Bearer ${meta.authToken}`;
242
- const pkgDetails = await $fetch(joinURL(meta.registry, `${pkgName}`), { headers });
247
+ const pkgDetails = await $fetch(joinURL(meta.registry, `${pkgName}`), { headers }).catch(() => null);
248
+ if (!pkgDetails) {
249
+ logger.error(`Failed to fetch package details for ${colors.cyan(pkgName)}.`);
250
+ return false;
251
+ }
243
252
  if (pkgDetails["dist-tags"]?.[version]) version = pkgDetails["dist-tags"][version];
244
253
  else version = Object.keys(pkgDetails.versions)?.findLast((v) => satisfies(v, version)) || version;
245
- const pkg = pkgDetails.versions[version];
254
+ const pkg = pkgDetails.versions[version] || {};
246
255
  const pkgDependencies = Object.assign(pkg.dependencies || {}, pkg.devDependencies || {});
247
256
  if (!pkgDependencies.nuxt && !pkgDependencies["nuxt-edge"] && !pkgDependencies["@nuxt/kit"]) {
248
257
  logger.warn(`It seems that ${colors.cyan(pkgName)} is not a Nuxt module.`);
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import tab from "@bomb.sh/tab/citty";
14
14
  //#region ../nuxi/src/commands/index.ts
15
15
  const _rDefault = (r) => r.default || r;
16
16
  const commands = {
17
- "add": () => import("./add-DXIjAzbd.mjs").then(_rDefault),
17
+ "add": () => import("./add-Bznb4lxU.mjs").then(_rDefault),
18
18
  "add-template": () => import("./add-template-BqK8C-av.mjs").then(_rDefault),
19
19
  "analyze": () => import("./analyze-gZGHJ1Fr.mjs").then(_rDefault),
20
20
  "build": () => import("./build-DF96Rh_E.mjs").then(_rDefault),
@@ -23,9 +23,9 @@ const commands = {
23
23
  "dev": () => import("./dev-CsAvgRwH.mjs").then(_rDefault),
24
24
  "devtools": () => import("./devtools-BTYlIJMv.mjs").then(_rDefault),
25
25
  "generate": () => import("./generate-eutQA4iL.mjs").then(_rDefault),
26
- "info": () => import("./info-CUYRtF1o.mjs").then(_rDefault),
27
- "init": () => import("./init-VER7CzSl.mjs").then(_rDefault),
28
- "module": () => import("./module-C5J-stzm.mjs").then(_rDefault),
26
+ "info": () => import("./info-CwVwJaB8.mjs").then(_rDefault),
27
+ "init": () => import("./init-CbX2kZ7b.mjs").then(_rDefault),
28
+ "module": () => import("./module-CsMeSzOg.mjs").then(_rDefault),
29
29
  "prepare": () => import("./prepare-D99IJFcY.mjs").then(_rDefault),
30
30
  "preview": () => import("./preview-C4zyHtv2.mjs").then(_rDefault),
31
31
  "start": () => import("./preview-C4zyHtv2.mjs").then(_rDefault),
@@ -68,7 +68,7 @@ async function checkEngines() {
68
68
  //#endregion
69
69
  //#region package.json
70
70
  var name = "@nuxt/cli-nightly";
71
- var version = "3.32.0-20260106-121815-562abd5";
71
+ var version = "3.33.0-20260106-161904-8928d35";
72
72
  var description = "Nuxt CLI";
73
73
 
74
74
  //#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.32.0-20260106-121804-562abd5";
20
+ var version = "3.33.0-20260106-161852-8928d35";
21
21
 
22
22
  //#endregion
23
23
  //#region ../nuxi/src/commands/info.ts
@@ -3,7 +3,7 @@ import { n as logger } from "./logger-B4ge7MhP.mjs";
3
3
  import { r as relativeToProcess } from "./kit-4LNqcmNp.mjs";
4
4
  import { t as getNuxtVersion } from "./versions-DD7jbeRR.mjs";
5
5
  import "./fs-BNfOTIDu.mjs";
6
- import { n as runCommand$1, t as add_default } from "./add-CIAi6Dmn.mjs";
6
+ import { n as runCommand$1, t as add_default } from "./add-DP6EXoUb.mjs";
7
7
  import { n as fetchModules, t as checkNuxtCompatibility } from "./_utils-B8YNEdpq.mjs";
8
8
  import "./prepare-CQwaXQtb.mjs";
9
9
  import process from "node:process";
@@ -8,7 +8,7 @@ var module_default = defineCommand({
8
8
  },
9
9
  args: {},
10
10
  subCommands: {
11
- add: () => import("./add-DXIjAzbd.mjs").then((r) => r.default || r),
11
+ add: () => import("./add-Bznb4lxU.mjs").then((r) => r.default || r),
12
12
  search: () => import("./search--NGnNBGz.mjs").then((r) => r.default || r)
13
13
  }
14
14
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/cli-nightly",
3
3
  "type": "module",
4
- "version": "3.32.0-20260106-121815-562abd5",
4
+ "version": "3.33.0-20260106-161904-8928d35",
5
5
  "description": "Nuxt CLI",
6
6
  "license": "MIT",
7
7
  "repository": {