create-nuxt-nightly 3.31.3-20251217-100442-2260a93 → 3.31.3-20251217-181959-e46541d
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/index.mjs +98 -94
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -20694,47 +20694,6 @@ async function fetchTemplates() {
|
|
|
20694
20694
|
return templates$1;
|
|
20695
20695
|
}
|
|
20696
20696
|
|
|
20697
|
-
//#endregion
|
|
20698
|
-
//#region ../nuxi/src/commands/_shared.ts
|
|
20699
|
-
const cwdArgs = { cwd: {
|
|
20700
|
-
type: "string",
|
|
20701
|
-
description: "Specify the working directory",
|
|
20702
|
-
valueHint: "directory",
|
|
20703
|
-
default: "."
|
|
20704
|
-
} };
|
|
20705
|
-
const logLevelArgs = { logLevel: {
|
|
20706
|
-
type: "string",
|
|
20707
|
-
description: "Specify build-time log level",
|
|
20708
|
-
valueHint: "silent|info|verbose"
|
|
20709
|
-
} };
|
|
20710
|
-
const envNameArgs = { envName: {
|
|
20711
|
-
type: "string",
|
|
20712
|
-
description: "The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)"
|
|
20713
|
-
} };
|
|
20714
|
-
const dotEnvArgs = { dotenv: {
|
|
20715
|
-
type: "string",
|
|
20716
|
-
description: "Path to `.env` file to load, relative to the root directory"
|
|
20717
|
-
} };
|
|
20718
|
-
const extendsArgs = { extends: {
|
|
20719
|
-
type: "string",
|
|
20720
|
-
description: "Extend from a Nuxt layer",
|
|
20721
|
-
valueHint: "layer-name",
|
|
20722
|
-
alias: ["e"]
|
|
20723
|
-
} };
|
|
20724
|
-
const legacyRootDirArgs = {
|
|
20725
|
-
cwd: {
|
|
20726
|
-
...cwdArgs.cwd,
|
|
20727
|
-
description: "Specify the working directory, this takes precedence over ROOTDIR (default: `.`)",
|
|
20728
|
-
default: void 0
|
|
20729
|
-
},
|
|
20730
|
-
rootDir: {
|
|
20731
|
-
type: "positional",
|
|
20732
|
-
description: "Specifies the working directory (default: `.`)",
|
|
20733
|
-
required: false,
|
|
20734
|
-
default: "."
|
|
20735
|
-
}
|
|
20736
|
-
};
|
|
20737
|
-
|
|
20738
20697
|
//#endregion
|
|
20739
20698
|
//#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
|
|
20740
20699
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -21348,15 +21307,104 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21348
21307
|
}));
|
|
21349
21308
|
|
|
21350
21309
|
//#endregion
|
|
21351
|
-
//#region ../nuxi/src/
|
|
21310
|
+
//#region ../nuxi/src/utils/kit.ts
|
|
21352
21311
|
var import_semver$2 = require_semver();
|
|
21312
|
+
async function loadKit(rootDir) {
|
|
21313
|
+
try {
|
|
21314
|
+
let kit = await import(pathToFileURL(resolveModulePath("@nuxt/kit", { from: tryResolveNuxt(rootDir) || rootDir })).href);
|
|
21315
|
+
if (!kit.writeTypes) kit = {
|
|
21316
|
+
...kit,
|
|
21317
|
+
writeTypes: () => {
|
|
21318
|
+
throw new Error("`writeTypes` is not available in this version of `@nuxt/kit`. Please upgrade to v3.7 or newer.");
|
|
21319
|
+
}
|
|
21320
|
+
};
|
|
21321
|
+
return kit;
|
|
21322
|
+
} catch (e$8) {
|
|
21323
|
+
if (e$8.toString().includes("Cannot find module '@nuxt/kit'")) throw new Error("nuxi requires `@nuxt/kit` to be installed in your project. Try installing `nuxt` v3+ or `@nuxt/bridge` first.");
|
|
21324
|
+
throw e$8;
|
|
21325
|
+
}
|
|
21326
|
+
}
|
|
21327
|
+
function tryResolveNuxt(rootDir) {
|
|
21328
|
+
for (const pkg of [
|
|
21329
|
+
"nuxt-nightly",
|
|
21330
|
+
"nuxt",
|
|
21331
|
+
"nuxt3",
|
|
21332
|
+
"nuxt-edge"
|
|
21333
|
+
]) {
|
|
21334
|
+
const path$1 = resolveModulePath(pkg, {
|
|
21335
|
+
from: withNodePath(rootDir),
|
|
21336
|
+
try: true
|
|
21337
|
+
});
|
|
21338
|
+
if (path$1) return path$1;
|
|
21339
|
+
}
|
|
21340
|
+
return null;
|
|
21341
|
+
}
|
|
21342
|
+
|
|
21343
|
+
//#endregion
|
|
21344
|
+
//#region ../nuxi/src/utils/versions.ts
|
|
21345
|
+
async function getNuxtVersion(cwd$3, cache$2 = true) {
|
|
21346
|
+
const nuxtPkg = await readPackageJSON("nuxt", {
|
|
21347
|
+
url: cwd$3,
|
|
21348
|
+
try: true,
|
|
21349
|
+
cache: cache$2
|
|
21350
|
+
});
|
|
21351
|
+
if (nuxtPkg) return nuxtPkg.version;
|
|
21352
|
+
const pkg = await readPackageJSON(cwd$3);
|
|
21353
|
+
const pkgDep = pkg?.dependencies?.nuxt || pkg?.devDependencies?.nuxt;
|
|
21354
|
+
return pkgDep && (0, import_semver$2.coerce)(pkgDep)?.version || "3.0.0";
|
|
21355
|
+
}
|
|
21356
|
+
|
|
21357
|
+
//#endregion
|
|
21358
|
+
//#region ../nuxi/src/commands/_shared.ts
|
|
21359
|
+
const cwdArgs = { cwd: {
|
|
21360
|
+
type: "string",
|
|
21361
|
+
description: "Specify the working directory",
|
|
21362
|
+
valueHint: "directory",
|
|
21363
|
+
default: "."
|
|
21364
|
+
} };
|
|
21365
|
+
const logLevelArgs = { logLevel: {
|
|
21366
|
+
type: "string",
|
|
21367
|
+
description: "Specify build-time log level",
|
|
21368
|
+
valueHint: "silent|info|verbose"
|
|
21369
|
+
} };
|
|
21370
|
+
const envNameArgs = { envName: {
|
|
21371
|
+
type: "string",
|
|
21372
|
+
description: "The environment to use when resolving configuration overrides (default is `production` when building, and `development` when running the dev server)"
|
|
21373
|
+
} };
|
|
21374
|
+
const dotEnvArgs = { dotenv: {
|
|
21375
|
+
type: "string",
|
|
21376
|
+
description: "Path to `.env` file to load, relative to the root directory"
|
|
21377
|
+
} };
|
|
21378
|
+
const extendsArgs = { extends: {
|
|
21379
|
+
type: "string",
|
|
21380
|
+
description: "Extend from a Nuxt layer",
|
|
21381
|
+
valueHint: "layer-name",
|
|
21382
|
+
alias: ["e"]
|
|
21383
|
+
} };
|
|
21384
|
+
const legacyRootDirArgs = {
|
|
21385
|
+
cwd: {
|
|
21386
|
+
...cwdArgs.cwd,
|
|
21387
|
+
description: "Specify the working directory, this takes precedence over ROOTDIR (default: `.`)",
|
|
21388
|
+
default: void 0
|
|
21389
|
+
},
|
|
21390
|
+
rootDir: {
|
|
21391
|
+
type: "positional",
|
|
21392
|
+
description: "Specifies the working directory (default: `.`)",
|
|
21393
|
+
required: false,
|
|
21394
|
+
default: "."
|
|
21395
|
+
}
|
|
21396
|
+
};
|
|
21397
|
+
|
|
21398
|
+
//#endregion
|
|
21399
|
+
//#region ../nuxi/src/commands/module/_utils.ts
|
|
21400
|
+
var import_semver$1 = require_semver();
|
|
21353
21401
|
async function fetchModules() {
|
|
21354
21402
|
const { modules } = await $fetch(`https://api.nuxt.com/modules?version=all`);
|
|
21355
21403
|
return modules;
|
|
21356
21404
|
}
|
|
21357
21405
|
function checkNuxtCompatibility(module$1, nuxtVersion) {
|
|
21358
21406
|
if (!module$1.compatibility?.nuxt) return true;
|
|
21359
|
-
return (0, import_semver$
|
|
21407
|
+
return (0, import_semver$1.satisfies)(nuxtVersion, module$1.compatibility.nuxt, { includePrerelease: true });
|
|
21360
21408
|
}
|
|
21361
21409
|
function getRegistryFromContent(content, scope) {
|
|
21362
21410
|
try {
|
|
@@ -25889,54 +25937,6 @@ function tryResolve(path$1, cwd$3, extensions) {
|
|
|
25889
25937
|
return res ? normalize$1(res) : void 0;
|
|
25890
25938
|
}
|
|
25891
25939
|
|
|
25892
|
-
//#endregion
|
|
25893
|
-
//#region ../nuxi/src/utils/kit.ts
|
|
25894
|
-
async function loadKit(rootDir) {
|
|
25895
|
-
try {
|
|
25896
|
-
let kit = await import(pathToFileURL(resolveModulePath("@nuxt/kit", { from: tryResolveNuxt(rootDir) || rootDir })).href);
|
|
25897
|
-
if (!kit.writeTypes) kit = {
|
|
25898
|
-
...kit,
|
|
25899
|
-
writeTypes: () => {
|
|
25900
|
-
throw new Error("`writeTypes` is not available in this version of `@nuxt/kit`. Please upgrade to v3.7 or newer.");
|
|
25901
|
-
}
|
|
25902
|
-
};
|
|
25903
|
-
return kit;
|
|
25904
|
-
} catch (e$8) {
|
|
25905
|
-
if (e$8.toString().includes("Cannot find module '@nuxt/kit'")) throw new Error("nuxi requires `@nuxt/kit` to be installed in your project. Try installing `nuxt` v3+ or `@nuxt/bridge` first.");
|
|
25906
|
-
throw e$8;
|
|
25907
|
-
}
|
|
25908
|
-
}
|
|
25909
|
-
function tryResolveNuxt(rootDir) {
|
|
25910
|
-
for (const pkg of [
|
|
25911
|
-
"nuxt-nightly",
|
|
25912
|
-
"nuxt",
|
|
25913
|
-
"nuxt3",
|
|
25914
|
-
"nuxt-edge"
|
|
25915
|
-
]) {
|
|
25916
|
-
const path$1 = resolveModulePath(pkg, {
|
|
25917
|
-
from: withNodePath(rootDir),
|
|
25918
|
-
try: true
|
|
25919
|
-
});
|
|
25920
|
-
if (path$1) return path$1;
|
|
25921
|
-
}
|
|
25922
|
-
return null;
|
|
25923
|
-
}
|
|
25924
|
-
|
|
25925
|
-
//#endregion
|
|
25926
|
-
//#region ../nuxi/src/utils/versions.ts
|
|
25927
|
-
var import_semver$1 = require_semver();
|
|
25928
|
-
async function getNuxtVersion(cwd$3, cache$2 = true) {
|
|
25929
|
-
const nuxtPkg = await readPackageJSON("nuxt", {
|
|
25930
|
-
url: cwd$3,
|
|
25931
|
-
try: true,
|
|
25932
|
-
cache: cache$2
|
|
25933
|
-
});
|
|
25934
|
-
if (nuxtPkg) return nuxtPkg.version;
|
|
25935
|
-
const pkg = await readPackageJSON(cwd$3);
|
|
25936
|
-
const pkgDep = pkg?.dependencies?.nuxt || pkg?.devDependencies?.nuxt;
|
|
25937
|
-
return pkgDep && (0, import_semver$1.coerce)(pkgDep)?.version || "3.0.0";
|
|
25938
|
-
}
|
|
25939
|
-
|
|
25940
25940
|
//#endregion
|
|
25941
25941
|
//#region ../nuxi/src/utils/fs.ts
|
|
25942
25942
|
async function clearDir(path$1, exclude) {
|
|
@@ -26558,9 +26558,13 @@ var init_default = defineCommand({
|
|
|
26558
26558
|
if (wantsUserModules) {
|
|
26559
26559
|
const modulesSpinner = Se();
|
|
26560
26560
|
modulesSpinner.start("Fetching available modules");
|
|
26561
|
-
const [response$1, templateDeps] = await Promise.all([
|
|
26561
|
+
const [response$1, templateDeps, nuxtVersion] = await Promise.all([
|
|
26562
|
+
modulesPromise,
|
|
26563
|
+
getTemplateDependencies(template.dir),
|
|
26564
|
+
getNuxtVersion(template.dir)
|
|
26565
|
+
]);
|
|
26562
26566
|
modulesSpinner.stop("Modules loaded");
|
|
26563
|
-
const officialModules = response$1.filter((module$1) => module$1.type === "official" && module$1.npm !== "@nuxt/devtools" && !templateDeps.includes(module$1.npm));
|
|
26567
|
+
const officialModules = response$1.filter((module$1) => module$1.type === "official" && module$1.npm !== "@nuxt/devtools" && !templateDeps.includes(module$1.npm) && (!module$1.compatibility.nuxt || checkNuxtCompatibility(module$1, nuxtVersion)));
|
|
26564
26568
|
if (officialModules.length === 0) logger.info("All official modules are already included in this template.");
|
|
26565
26569
|
else {
|
|
26566
26570
|
const selectedOfficialModules = await Lt({
|
|
@@ -27789,7 +27793,7 @@ async function checkEngines() {
|
|
|
27789
27793
|
//#endregion
|
|
27790
27794
|
//#region package.json
|
|
27791
27795
|
var name = "create-nuxt-nightly";
|
|
27792
|
-
var version = "3.31.3-20251217-
|
|
27796
|
+
var version = "3.31.3-20251217-181959-e46541d";
|
|
27793
27797
|
var description = "Create a Nuxt app in seconds";
|
|
27794
27798
|
|
|
27795
27799
|
//#endregion
|