@nuxt/cli-nightly 3.31.4-20260106-103404-7fe68e4 → 3.32.0-20260106-121815-562abd5
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/{add-cOz5A42V.mjs → add-CIAi6Dmn.mjs} +11 -7
- package/dist/add-DXIjAzbd.mjs +10 -0
- package/dist/add-template-BqK8C-av.mjs +80 -0
- package/dist/{analyze-D-Wo3bVT.mjs → analyze-gZGHJ1Fr.mjs} +4 -4
- package/dist/{banner-DMgRAl0q.mjs → banner-BrAj2w2K.mjs} +1 -1
- package/dist/{build-1TjVJ-UC.mjs → build-DF96Rh_E.mjs} +5 -5
- package/dist/{cleanup-BhQbCstD.mjs → cleanup-viSjdn1J.mjs} +3 -3
- package/dist/dev/index.mjs +7 -7
- package/dist/{dev-HhMgIfMX.mjs → dev-CsAvgRwH.mjs} +8 -8
- package/dist/dev-D9us4AeN.mjs +10 -0
- package/dist/{dev-BKPehGZf.mjs → dev-KB30iboK.mjs} +6 -6
- package/dist/{dev-child-DfGhbYXE.mjs → dev-child-D_yO61Et.mjs} +1 -1
- package/dist/{fs-CQH7NJn6.mjs → fs-BNfOTIDu.mjs} +1 -1
- package/dist/{generate-cGaHTpaK.mjs → generate-eutQA4iL.mjs} +6 -6
- package/dist/index.mjs +73 -62
- package/dist/{info-B8EM1Xqc.mjs → info-CUYRtF1o.mjs} +7 -7
- package/dist/{init-2OoXrrJB.mjs → init-VER7CzSl.mjs} +9 -9
- package/dist/{kit-B3S8uoS_.mjs → kit-4LNqcmNp.mjs} +1 -1
- package/dist/{module-CZNTz7xr.mjs → module-C5J-stzm.mjs} +2 -2
- package/dist/{nuxt-B1NSR4xh.mjs → nuxt-4ILhz74C.mjs} +2 -2
- package/dist/{prepare-CUaf6Joj.mjs → prepare-CQwaXQtb.mjs} +2 -2
- package/dist/prepare-D99IJFcY.mjs +7 -0
- package/dist/{preview-CbUSteIx.mjs → preview-C4zyHtv2.mjs} +2 -2
- package/dist/{search-CKbK1-IC.mjs → search--NGnNBGz.mjs} +5 -5
- package/dist/templates-BqauPpL_.mjs +3 -0
- package/dist/{add-Dy11jAJ1.mjs → templates-CCEGPE6-.mjs} +21 -79
- package/dist/{typecheck-DNhVOVc6.mjs → typecheck-B-jIcMjP.mjs} +2 -2
- package/dist/{upgrade-CXj1pphH.mjs → upgrade-DaYhC23f.mjs} +6 -6
- package/dist/{versions-Bly87QYZ.mjs → versions-DD7jbeRR.mjs} +1 -1
- package/package.json +1 -1
- package/dist/add-CbHKQ2Kq.mjs +0 -10
- package/dist/dev-fNXtL_VP.mjs +0 -10
- package/dist/prepare-DCPPpZ3e.mjs +0 -7
- package/dist/templates-FddTjK4U.mjs +0 -3
- /package/dist/{_utils-NB3Cn3-G.mjs → _utils-B8YNEdpq.mjs} +0 -0
- /package/dist/{devtools-ChsGaImC.mjs → devtools-BTYlIJMv.mjs} +0 -0
- /package/dist/{env-DV8TWRZt.mjs → env-BRiVSJMz.mjs} +0 -0
- /package/dist/{formatting-V2rnOEP4.mjs → formatting-PESozNtr.mjs} +0 -0
- /package/dist/{packageManagers-BKxN4oEl.mjs → packageManagers-BX7-V04a.mjs} +0 -0
- /package/dist/{templates-C0gAD--n.mjs → templates-DR3hjht5.mjs} +0 -0
- /package/dist/{test-pxuzy0gI.mjs → test-D9z67EJZ.mjs} +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { o as logLevelArgs, t as cwdArgs } from "./_shared-BCYCnX0T.mjs";
|
|
2
2
|
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { r as relativeToProcess } from "./kit-
|
|
4
|
-
import { t as getNuxtVersion } from "./versions-
|
|
5
|
-
import { n as fetchModules, r as getRegistryFromContent, t as checkNuxtCompatibility } from "./_utils-
|
|
6
|
-
import { t as prepare_default } from "./prepare-
|
|
3
|
+
import { r as relativeToProcess } from "./kit-4LNqcmNp.mjs";
|
|
4
|
+
import { t as getNuxtVersion } from "./versions-DD7jbeRR.mjs";
|
|
5
|
+
import { n as fetchModules, r as getRegistryFromContent, t as checkNuxtCompatibility } from "./_utils-B8YNEdpq.mjs";
|
|
6
|
+
import { t as prepare_default } from "./prepare-CQwaXQtb.mjs";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import process from "node:process";
|
|
9
9
|
import { defineCommand, runCommand } from "citty";
|
|
10
10
|
import { colors } from "consola/utils";
|
|
11
|
-
import { confirm, isCancel, select } from "@clack/prompts";
|
|
11
|
+
import { cancel, confirm, isCancel, select } from "@clack/prompts";
|
|
12
|
+
import { resolve as resolve$1 } from "pathe";
|
|
12
13
|
import { fileURLToPath } from "node:url";
|
|
13
14
|
import * as fs from "node:fs";
|
|
14
15
|
import { existsSync } from "node:fs";
|
|
15
16
|
import { joinURL } from "ufo";
|
|
16
|
-
import { resolve as resolve$1 } from "pathe";
|
|
17
17
|
import { readPackageJSON } from "pkg-types";
|
|
18
18
|
import { satisfies } from "semver";
|
|
19
19
|
import { homedir } from "node:os";
|
|
@@ -103,7 +103,11 @@ var add_default = defineCommand({
|
|
|
103
103
|
});
|
|
104
104
|
if (isCancel(shouldContinue) || shouldContinue !== true) process.exit(1);
|
|
105
105
|
}
|
|
106
|
-
const resolvedModules = (await Promise.all(modules.map((moduleName) => resolveModule(moduleName, cwd)))).filter((x) => x
|
|
106
|
+
const resolvedModules = (await Promise.all(modules.map((moduleName) => resolveModule(moduleName, cwd)))).filter((x) => !!x);
|
|
107
|
+
if (!resolvedModules.length) {
|
|
108
|
+
cancel("No modules to add.");
|
|
109
|
+
process.exit(1);
|
|
110
|
+
}
|
|
107
111
|
logger.info(`Resolved ${resolvedModules.map((x) => colors.cyan(x.pkgName)).join(", ")}, adding module${resolvedModules.length > 1 ? "s" : ""}...`);
|
|
108
112
|
await addModules(resolvedModules, {
|
|
109
113
|
...ctx.args,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./_shared-BCYCnX0T.mjs";
|
|
2
|
+
import "./logger-B4ge7MhP.mjs";
|
|
3
|
+
import "./kit-4LNqcmNp.mjs";
|
|
4
|
+
import "./versions-DD7jbeRR.mjs";
|
|
5
|
+
import "./fs-BNfOTIDu.mjs";
|
|
6
|
+
import { t as add_default } from "./add-CIAi6Dmn.mjs";
|
|
7
|
+
import "./_utils-B8YNEdpq.mjs";
|
|
8
|
+
import "./prepare-CQwaXQtb.mjs";
|
|
9
|
+
|
|
10
|
+
export { add_default as default };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { o as logLevelArgs, t as cwdArgs } from "./_shared-BCYCnX0T.mjs";
|
|
2
|
+
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
3
|
+
import { n as templates, t as templateNames } from "./templates-CCEGPE6-.mjs";
|
|
4
|
+
import { r as relativeToProcess, t as loadKit } from "./kit-4LNqcmNp.mjs";
|
|
5
|
+
import process from "node:process";
|
|
6
|
+
import { defineCommand } from "citty";
|
|
7
|
+
import { colors } from "consola/utils";
|
|
8
|
+
import { cancel, intro, outro } from "@clack/prompts";
|
|
9
|
+
import { dirname, extname, resolve } from "pathe";
|
|
10
|
+
import { existsSync, promises } from "node:fs";
|
|
11
|
+
|
|
12
|
+
//#region ../nuxi/src/commands/add-template.ts
|
|
13
|
+
var add_template_default = defineCommand({
|
|
14
|
+
meta: {
|
|
15
|
+
name: "add-template",
|
|
16
|
+
description: "Create a new template file."
|
|
17
|
+
},
|
|
18
|
+
args: {
|
|
19
|
+
...cwdArgs,
|
|
20
|
+
...logLevelArgs,
|
|
21
|
+
force: {
|
|
22
|
+
type: "boolean",
|
|
23
|
+
description: "Force override file if it already exists",
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
template: {
|
|
27
|
+
type: "positional",
|
|
28
|
+
required: true,
|
|
29
|
+
valueHint: templateNames.join("|"),
|
|
30
|
+
description: `Specify which template to generate`
|
|
31
|
+
},
|
|
32
|
+
name: {
|
|
33
|
+
type: "positional",
|
|
34
|
+
required: true,
|
|
35
|
+
description: "Specify name of the generated file"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
async run(ctx) {
|
|
39
|
+
const cwd = resolve(ctx.args.cwd);
|
|
40
|
+
intro(colors.cyan("Adding template..."));
|
|
41
|
+
const templateName = ctx.args.template;
|
|
42
|
+
if (!templateNames.includes(templateName)) {
|
|
43
|
+
const templateNames$1 = Object.keys(templates).map((name$1) => colors.cyan(name$1));
|
|
44
|
+
const lastTemplateName = templateNames$1.pop();
|
|
45
|
+
logger.error(`Template ${colors.cyan(templateName)} is not supported.`);
|
|
46
|
+
logger.info(`Possible values are ${templateNames$1.join(", ")} or ${lastTemplateName}.`);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
const ext = extname(ctx.args.name);
|
|
50
|
+
const name = ext === ".vue" || ext === ".ts" ? ctx.args.name.replace(ext, "") : ctx.args.name;
|
|
51
|
+
if (!name) {
|
|
52
|
+
cancel("name argument is missing!");
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
const config = await (await loadKit(cwd)).loadNuxtConfig({ cwd });
|
|
56
|
+
const template = templates[templateName];
|
|
57
|
+
const res = template({
|
|
58
|
+
name,
|
|
59
|
+
args: ctx.args,
|
|
60
|
+
nuxtOptions: config
|
|
61
|
+
});
|
|
62
|
+
if (!ctx.args.force && existsSync(res.path)) {
|
|
63
|
+
logger.error(`File exists at ${colors.cyan(relativeToProcess(res.path))}.`);
|
|
64
|
+
logger.info(`Use ${colors.cyan("--force")} to override or use a different name.`);
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
const parentDir = dirname(res.path);
|
|
68
|
+
if (!existsSync(parentDir)) {
|
|
69
|
+
logger.step(`Creating directory ${colors.cyan(relativeToProcess(parentDir))}.`);
|
|
70
|
+
if (templateName === "page") logger.info("This enables vue-router functionality!");
|
|
71
|
+
await promises.mkdir(parentDir, { recursive: true });
|
|
72
|
+
}
|
|
73
|
+
await promises.writeFile(res.path, `${res.contents.trim()}\n`);
|
|
74
|
+
logger.success(`Created ${colors.cyan(relativeToProcess(res.path))}.`);
|
|
75
|
+
outro(`Generated a new ${colors.cyan(templateName)}!`);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
//#endregion
|
|
80
|
+
export { add_template_default as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { a as legacyRootDirArgs, i as extendsArgs, n as dotEnvArgs, o as logLevelArgs, t as cwdArgs } from "./_shared-BCYCnX0T.mjs";
|
|
2
2
|
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { t as overrideEnv } from "./env-
|
|
4
|
-
import { r as relativeToProcess, t as loadKit } from "./kit-
|
|
5
|
-
import { n as clearDir } from "./fs-
|
|
3
|
+
import { t as overrideEnv } from "./env-BRiVSJMz.mjs";
|
|
4
|
+
import { r as relativeToProcess, t as loadKit } from "./kit-4LNqcmNp.mjs";
|
|
5
|
+
import { n as clearDir } from "./fs-BNfOTIDu.mjs";
|
|
6
6
|
import process from "node:process";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
8
8
|
import { colors } from "consola/utils";
|
|
9
9
|
import { intro, note, outro, taskLog } from "@clack/prompts";
|
|
10
|
+
import { join, resolve } from "pathe";
|
|
10
11
|
import { defu as defu$1 } from "defu";
|
|
11
12
|
import { promises } from "node:fs";
|
|
12
|
-
import { join, resolve } from "pathe";
|
|
13
13
|
import { FastResponse, FastURL, serve } from "srvx";
|
|
14
14
|
|
|
15
15
|
//#region ../../node_modules/.pnpm/rou3@0.7.12/node_modules/rou3/dist/index.mjs
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
2
|
-
import { n as getPkgJSON, r as getPkgVersion } from "./versions-
|
|
2
|
+
import { n as getPkgJSON, r as getPkgVersion } from "./versions-DD7jbeRR.mjs";
|
|
3
3
|
import { colors } from "consola/utils";
|
|
4
4
|
|
|
5
5
|
//#region ../nuxi/src/utils/banner.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
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 } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { t as overrideEnv } from "./env-
|
|
4
|
-
import { t as loadKit } from "./kit-
|
|
5
|
-
import "./versions-
|
|
6
|
-
import { n as showVersions } from "./banner-
|
|
7
|
-
import { t as clearBuildDir } from "./fs-
|
|
3
|
+
import { t as overrideEnv } from "./env-BRiVSJMz.mjs";
|
|
4
|
+
import { t as loadKit } from "./kit-4LNqcmNp.mjs";
|
|
5
|
+
import "./versions-DD7jbeRR.mjs";
|
|
6
|
+
import { n as showVersions } from "./banner-BrAj2w2K.mjs";
|
|
7
|
+
import { t as clearBuildDir } from "./fs-BNfOTIDu.mjs";
|
|
8
8
|
import process from "node:process";
|
|
9
9
|
import { defineCommand } from "citty";
|
|
10
10
|
import { colors } from "consola/utils";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as legacyRootDirArgs, t as cwdArgs } from "./_shared-BCYCnX0T.mjs";
|
|
2
2
|
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { t as loadKit } from "./kit-
|
|
4
|
-
import "./fs-
|
|
5
|
-
import { t as cleanupNuxtDirs } from "./nuxt-
|
|
3
|
+
import { t as loadKit } from "./kit-4LNqcmNp.mjs";
|
|
4
|
+
import "./fs-BNfOTIDu.mjs";
|
|
5
|
+
import { t as cleanupNuxtDirs } from "./nuxt-4ILhz74C.mjs";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
import { resolve } from "pathe";
|
|
8
8
|
|
package/dist/dev/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../logger-B4ge7MhP.mjs";
|
|
2
|
-
import "../env-
|
|
3
|
-
import { t as initialize } from "../dev-
|
|
4
|
-
import "../kit-
|
|
5
|
-
import "../versions-
|
|
6
|
-
import "../banner-
|
|
7
|
-
import "../fs-
|
|
8
|
-
import "../nuxt-
|
|
2
|
+
import "../env-BRiVSJMz.mjs";
|
|
3
|
+
import { t as initialize } from "../dev-KB30iboK.mjs";
|
|
4
|
+
import "../kit-4LNqcmNp.mjs";
|
|
5
|
+
import "../versions-DD7jbeRR.mjs";
|
|
6
|
+
import "../banner-BrAj2w2K.mjs";
|
|
7
|
+
import "../fs-BNfOTIDu.mjs";
|
|
8
|
+
import "../nuxt-4ILhz74C.mjs";
|
|
9
9
|
|
|
10
10
|
export { initialize };
|
|
@@ -1,16 +1,16 @@
|
|
|
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 "./env-
|
|
4
|
-
import { t as initialize } from "./dev-
|
|
5
|
-
import "./kit-
|
|
6
|
-
import "./versions-
|
|
7
|
-
import "./banner-
|
|
8
|
-
import "./fs-
|
|
9
|
-
import "./nuxt-
|
|
3
|
+
import "./env-BRiVSJMz.mjs";
|
|
4
|
+
import { t as initialize } from "./dev-KB30iboK.mjs";
|
|
5
|
+
import "./kit-4LNqcmNp.mjs";
|
|
6
|
+
import "./versions-DD7jbeRR.mjs";
|
|
7
|
+
import "./banner-BrAj2w2K.mjs";
|
|
8
|
+
import "./fs-BNfOTIDu.mjs";
|
|
9
|
+
import "./nuxt-4ILhz74C.mjs";
|
|
10
10
|
import process from "node:process";
|
|
11
11
|
import { defineCommand } from "citty";
|
|
12
|
-
import { isBun, isDeno, isTest } from "std-env";
|
|
13
12
|
import { colors } from "consola/utils";
|
|
13
|
+
import { isBun, isDeno, isTest } from "std-env";
|
|
14
14
|
import { resolve } from "pathe";
|
|
15
15
|
import { satisfies } from "semver";
|
|
16
16
|
import { getArgs, parseArgs } from "listhen/cli";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./logger-B4ge7MhP.mjs";
|
|
2
|
+
import "./env-BRiVSJMz.mjs";
|
|
3
|
+
import { t as initialize } from "./dev-KB30iboK.mjs";
|
|
4
|
+
import "./kit-4LNqcmNp.mjs";
|
|
5
|
+
import "./versions-DD7jbeRR.mjs";
|
|
6
|
+
import "./banner-BrAj2w2K.mjs";
|
|
7
|
+
import "./fs-BNfOTIDu.mjs";
|
|
8
|
+
import "./nuxt-4ILhz74C.mjs";
|
|
9
|
+
|
|
10
|
+
export { initialize };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { t as overrideEnv } from "./env-
|
|
2
|
-
import { i as withNodePath, t as loadKit } from "./kit-
|
|
3
|
-
import { r as showVersionsFromConfig } from "./banner-
|
|
4
|
-
import { t as clearBuildDir } from "./fs-
|
|
5
|
-
import { a as writeNuxtManifest, i as resolveNuxtManifest, n as loadNuxtManifest } from "./nuxt-
|
|
1
|
+
import { t as overrideEnv } from "./env-BRiVSJMz.mjs";
|
|
2
|
+
import { i as withNodePath, t as loadKit } from "./kit-4LNqcmNp.mjs";
|
|
3
|
+
import { r as showVersionsFromConfig } from "./banner-BrAj2w2K.mjs";
|
|
4
|
+
import { t as clearBuildDir } from "./fs-BNfOTIDu.mjs";
|
|
5
|
+
import { a as writeNuxtManifest, i as resolveNuxtManifest, n as loadNuxtManifest } from "./nuxt-4ILhz74C.mjs";
|
|
6
6
|
import process from "node:process";
|
|
7
7
|
import { provider } from "std-env";
|
|
8
|
+
import { join, resolve } from "pathe";
|
|
8
9
|
import { pathToFileURL } from "node:url";
|
|
9
10
|
import defu, { defu as defu$1 } from "defu";
|
|
10
11
|
import EventEmitter from "node:events";
|
|
@@ -13,7 +14,6 @@ import { mkdir } from "node:fs/promises";
|
|
|
13
14
|
import { resolveModulePath } from "exsolve";
|
|
14
15
|
import { joinURL } from "ufo";
|
|
15
16
|
import { listen } from "listhen";
|
|
16
|
-
import { join, resolve } from "pathe";
|
|
17
17
|
import { debounce } from "perfect-debounce";
|
|
18
18
|
import { toNodeHandler } from "srvx/node";
|
|
19
19
|
import { Youch } from "youch";
|
|
@@ -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-D9us4AeN.mjs");
|
|
29
29
|
await initialize({
|
|
30
30
|
cwd,
|
|
31
31
|
args: ctx.args
|
|
@@ -1,11 +1,11 @@
|
|
|
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 "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import "./env-
|
|
4
|
-
import "./kit-
|
|
5
|
-
import "./versions-
|
|
6
|
-
import "./banner-
|
|
7
|
-
import "./fs-
|
|
8
|
-
import build_default from "./build-
|
|
3
|
+
import "./env-BRiVSJMz.mjs";
|
|
4
|
+
import "./kit-4LNqcmNp.mjs";
|
|
5
|
+
import "./versions-DD7jbeRR.mjs";
|
|
6
|
+
import "./banner-BrAj2w2K.mjs";
|
|
7
|
+
import "./fs-BNfOTIDu.mjs";
|
|
8
|
+
import build_default from "./build-DF96Rh_E.mjs";
|
|
9
9
|
import { defineCommand } from "citty";
|
|
10
10
|
|
|
11
11
|
//#region ../nuxi/src/commands/generate.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
import { t as cwdArgs } from "./_shared-BCYCnX0T.mjs";
|
|
2
2
|
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { t as
|
|
3
|
+
import { t as templateNames } from "./templates-CCEGPE6-.mjs";
|
|
4
|
+
import { t as templates } from "./templates-DR3hjht5.mjs";
|
|
4
5
|
import { resolve } from "node:path";
|
|
5
6
|
import process from "node:process";
|
|
6
7
|
import { defineCommand, runCommand as runCommand$1, runMain as runMain$1 } from "citty";
|
|
8
|
+
import { colors } from "consola/utils";
|
|
7
9
|
import { provider } from "std-env";
|
|
8
10
|
import { consola } from "consola";
|
|
9
|
-
import { colors } from "consola/utils";
|
|
10
11
|
import { fileURLToPath } from "node:url";
|
|
11
12
|
import tab from "@bomb.sh/tab/citty";
|
|
12
13
|
|
|
13
14
|
//#region ../nuxi/src/commands/index.ts
|
|
14
15
|
const _rDefault = (r) => r.default || r;
|
|
15
16
|
const commands = {
|
|
16
|
-
add: () => import("./add-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
"add": () => import("./add-DXIjAzbd.mjs").then(_rDefault),
|
|
18
|
+
"add-template": () => import("./add-template-BqK8C-av.mjs").then(_rDefault),
|
|
19
|
+
"analyze": () => import("./analyze-gZGHJ1Fr.mjs").then(_rDefault),
|
|
20
|
+
"build": () => import("./build-DF96Rh_E.mjs").then(_rDefault),
|
|
21
|
+
"cleanup": () => import("./cleanup-viSjdn1J.mjs").then(_rDefault),
|
|
22
|
+
"_dev": () => import("./dev-child-D_yO61Et.mjs").then(_rDefault),
|
|
23
|
+
"dev": () => import("./dev-CsAvgRwH.mjs").then(_rDefault),
|
|
24
|
+
"devtools": () => import("./devtools-BTYlIJMv.mjs").then(_rDefault),
|
|
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),
|
|
29
|
+
"prepare": () => import("./prepare-D99IJFcY.mjs").then(_rDefault),
|
|
30
|
+
"preview": () => import("./preview-C4zyHtv2.mjs").then(_rDefault),
|
|
31
|
+
"start": () => import("./preview-C4zyHtv2.mjs").then(_rDefault),
|
|
32
|
+
"test": () => import("./test-D9z67EJZ.mjs").then(_rDefault),
|
|
33
|
+
"typecheck": () => import("./typecheck-B-jIcMjP.mjs").then(_rDefault),
|
|
34
|
+
"upgrade": () => import("./upgrade-DaYhC23f.mjs").then(_rDefault)
|
|
33
35
|
};
|
|
34
36
|
|
|
35
37
|
//#endregion
|
|
@@ -66,51 +68,9 @@ async function checkEngines() {
|
|
|
66
68
|
//#endregion
|
|
67
69
|
//#region package.json
|
|
68
70
|
var name = "@nuxt/cli-nightly";
|
|
69
|
-
var version = "3.
|
|
71
|
+
var version = "3.32.0-20260106-121815-562abd5";
|
|
70
72
|
var description = "Nuxt CLI";
|
|
71
73
|
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/main.ts
|
|
74
|
-
const _main = defineCommand({
|
|
75
|
-
meta: {
|
|
76
|
-
name: name.endsWith("nightly") ? name : "nuxi",
|
|
77
|
-
version,
|
|
78
|
-
description
|
|
79
|
-
},
|
|
80
|
-
args: {
|
|
81
|
-
...cwdArgs,
|
|
82
|
-
command: {
|
|
83
|
-
type: "positional",
|
|
84
|
-
required: false
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
subCommands: commands,
|
|
88
|
-
async setup(ctx) {
|
|
89
|
-
const command = ctx.args._[0];
|
|
90
|
-
setupGlobalConsole({ dev: command === "dev" });
|
|
91
|
-
let backgroundTasks;
|
|
92
|
-
if (command !== "_dev" && provider !== "stackblitz") backgroundTasks = Promise.all([checkEngines()]).catch((err) => logger.error(err));
|
|
93
|
-
if (command === "init") await backgroundTasks;
|
|
94
|
-
if (ctx.args.command && !(ctx.args.command in commands)) {
|
|
95
|
-
const cwd = resolve(ctx.args.cwd);
|
|
96
|
-
try {
|
|
97
|
-
const { x } = await import("tinyexec");
|
|
98
|
-
await x(`nuxt-${ctx.args.command}`, ctx.rawArgs.slice(1), {
|
|
99
|
-
nodeOptions: {
|
|
100
|
-
stdio: "inherit",
|
|
101
|
-
cwd
|
|
102
|
-
},
|
|
103
|
-
throwOnError: true
|
|
104
|
-
});
|
|
105
|
-
} catch (err) {
|
|
106
|
-
if (err instanceof Error && "code" in err && err.code === "ENOENT") return;
|
|
107
|
-
}
|
|
108
|
-
process.exit();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
const main = _main;
|
|
113
|
-
|
|
114
74
|
//#endregion
|
|
115
75
|
//#region ../nuxi/src/data/nitro-presets.ts
|
|
116
76
|
const nitroPresets = [
|
|
@@ -248,5 +208,56 @@ async function runCommand(name$1, argv = process.argv.slice(2), data = {}) {
|
|
|
248
208
|
});
|
|
249
209
|
}
|
|
250
210
|
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region src/main.ts
|
|
213
|
+
const _main = defineCommand({
|
|
214
|
+
meta: {
|
|
215
|
+
name: name.endsWith("nightly") ? name : "nuxi",
|
|
216
|
+
version,
|
|
217
|
+
description
|
|
218
|
+
},
|
|
219
|
+
args: {
|
|
220
|
+
...cwdArgs,
|
|
221
|
+
command: {
|
|
222
|
+
type: "positional",
|
|
223
|
+
required: false
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
subCommands: commands,
|
|
227
|
+
async setup(ctx) {
|
|
228
|
+
const command = ctx.args._[0];
|
|
229
|
+
setupGlobalConsole({ dev: command === "dev" });
|
|
230
|
+
let backgroundTasks;
|
|
231
|
+
if (command !== "_dev" && provider !== "stackblitz") backgroundTasks = Promise.all([checkEngines()]).catch((err) => logger.error(err));
|
|
232
|
+
if (command === "init") await backgroundTasks;
|
|
233
|
+
if (command === "add" && ctx.rawArgs[1] && templateNames.includes(ctx.rawArgs[1])) {
|
|
234
|
+
logger.warn(`${colors.yellow("Deprecated:")} Using ${colors.cyan("nuxt add <template> <name>")} is deprecated.`);
|
|
235
|
+
logger.info(`Please use ${colors.cyan("nuxt add-template <template> <name>")} instead.`);
|
|
236
|
+
await runCommand("add-template", [...ctx.rawArgs.slice(1)]).catch((err) => {
|
|
237
|
+
console.error(err.message);
|
|
238
|
+
process.exit(1);
|
|
239
|
+
});
|
|
240
|
+
process.exit(0);
|
|
241
|
+
}
|
|
242
|
+
if (ctx.args.command && !(ctx.args.command in commands)) {
|
|
243
|
+
const cwd = resolve(ctx.args.cwd);
|
|
244
|
+
try {
|
|
245
|
+
const { x } = await import("tinyexec");
|
|
246
|
+
await x(`nuxt-${ctx.args.command}`, ctx.rawArgs.slice(1), {
|
|
247
|
+
nodeOptions: {
|
|
248
|
+
stdio: "inherit",
|
|
249
|
+
cwd
|
|
250
|
+
},
|
|
251
|
+
throwOnError: true
|
|
252
|
+
});
|
|
253
|
+
} catch (err) {
|
|
254
|
+
if (err instanceof Error && "code" in err && err.code === "ENOENT") return;
|
|
255
|
+
}
|
|
256
|
+
process.exit();
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
const main = _main;
|
|
261
|
+
|
|
251
262
|
//#endregion
|
|
252
263
|
export { main, runCommand, runMain };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as legacyRootDirArgs, t as cwdArgs } from "./_shared-BCYCnX0T.mjs";
|
|
2
2
|
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { n as tryResolveNuxt } from "./kit-
|
|
4
|
-
import "./versions-
|
|
5
|
-
import { t as getBuilder } from "./banner-
|
|
6
|
-
import { t as formatInfoBox } from "./formatting-
|
|
7
|
-
import { t as getPackageManagerVersion } from "./packageManagers-
|
|
3
|
+
import { n as tryResolveNuxt } from "./kit-4LNqcmNp.mjs";
|
|
4
|
+
import "./versions-DD7jbeRR.mjs";
|
|
5
|
+
import { t as getBuilder } from "./banner-BrAj2w2K.mjs";
|
|
6
|
+
import { t as formatInfoBox } from "./formatting-PESozNtr.mjs";
|
|
7
|
+
import { t as getPackageManagerVersion } from "./packageManagers-BX7-V04a.mjs";
|
|
8
8
|
import process from "node:process";
|
|
9
9
|
import { defineCommand } from "citty";
|
|
10
|
-
import { isBun, isDeno, isMinimal } from "std-env";
|
|
11
10
|
import { colors } from "consola/utils";
|
|
11
|
+
import { isBun, isDeno, isMinimal } from "std-env";
|
|
12
12
|
import { box } from "@clack/prompts";
|
|
13
13
|
import { resolve } from "pathe";
|
|
14
14
|
import { readPackageJSON } from "pkg-types";
|
|
@@ -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.
|
|
20
|
+
var version = "3.32.0-20260106-121804-562abd5";
|
|
21
21
|
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region ../nuxi/src/commands/info.ts
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { o as logLevelArgs, t as cwdArgs } from "./_shared-BCYCnX0T.mjs";
|
|
2
2
|
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { r as relativeToProcess } from "./kit-
|
|
4
|
-
import { t as getNuxtVersion } from "./versions-
|
|
5
|
-
import "./fs-
|
|
6
|
-
import { n as runCommand$1, t as add_default } from "./add-
|
|
7
|
-
import { n as fetchModules, t as checkNuxtCompatibility } from "./_utils-
|
|
8
|
-
import "./prepare-
|
|
3
|
+
import { r as relativeToProcess } from "./kit-4LNqcmNp.mjs";
|
|
4
|
+
import { t as getNuxtVersion } from "./versions-DD7jbeRR.mjs";
|
|
5
|
+
import "./fs-BNfOTIDu.mjs";
|
|
6
|
+
import { n as runCommand$1, t as add_default } from "./add-CIAi6Dmn.mjs";
|
|
7
|
+
import { n as fetchModules, t as checkNuxtCompatibility } from "./_utils-B8YNEdpq.mjs";
|
|
8
|
+
import "./prepare-CQwaXQtb.mjs";
|
|
9
9
|
import process from "node:process";
|
|
10
10
|
import { defineCommand } from "citty";
|
|
11
|
-
import { hasTTY } from "std-env";
|
|
12
11
|
import { colors } from "consola/utils";
|
|
12
|
+
import { hasTTY } from "std-env";
|
|
13
13
|
import { box, cancel, confirm, intro, isCancel, multiselect, outro, select, spinner, tasks, text } from "@clack/prompts";
|
|
14
|
-
import { existsSync } from "node:fs";
|
|
15
14
|
import { basename, join, relative, resolve } from "pathe";
|
|
15
|
+
import { existsSync } from "node:fs";
|
|
16
16
|
import { findFile, readPackageJSON, writePackageJSON } from "pkg-types";
|
|
17
17
|
import { x } from "tinyexec";
|
|
18
18
|
import { installDependencies } from "nypm";
|
|
@@ -153,7 +153,7 @@ var init_default = defineCommand({
|
|
|
153
153
|
intro(colors.bold(`Welcome to Nuxt!`.split("").map((m) => `${themeColor}${m}`).join("")));
|
|
154
154
|
let availableTemplates = {};
|
|
155
155
|
if (!ctx.args.template || !ctx.args.dir) {
|
|
156
|
-
const defaultTemplates = await import("./templates-
|
|
156
|
+
const defaultTemplates = await import("./templates-BqauPpL_.mjs").then((r) => r.templates);
|
|
157
157
|
if (ctx.args.offline || ctx.args.preferOffline) availableTemplates = defaultTemplates;
|
|
158
158
|
else {
|
|
159
159
|
const templatesSpinner = spinner();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
|
+
import { relative } from "pathe";
|
|
2
3
|
import { pathToFileURL } from "node:url";
|
|
3
4
|
import { resolveModulePath } from "exsolve";
|
|
4
|
-
import { relative } from "pathe";
|
|
5
5
|
|
|
6
6
|
//#region ../nuxi/src/utils/paths.ts
|
|
7
7
|
const cwd = process.cwd();
|
|
@@ -8,8 +8,8 @@ var module_default = defineCommand({
|
|
|
8
8
|
},
|
|
9
9
|
args: {},
|
|
10
10
|
subCommands: {
|
|
11
|
-
add: () => import("./add-
|
|
12
|
-
search: () => import("./search
|
|
11
|
+
add: () => import("./add-DXIjAzbd.mjs").then((r) => r.default || r),
|
|
12
|
+
search: () => import("./search--NGnNBGz.mjs").then((r) => r.default || r)
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
2
|
-
import { r as rmRecursive } from "./fs-
|
|
3
|
-
import { promises } from "node:fs";
|
|
2
|
+
import { r as rmRecursive } from "./fs-BNfOTIDu.mjs";
|
|
4
3
|
import { dirname, resolve } from "pathe";
|
|
4
|
+
import { promises } from "node:fs";
|
|
5
5
|
import { hash } from "ohash";
|
|
6
6
|
|
|
7
7
|
//#region ../nuxi/src/utils/nuxt.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
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 } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { r as relativeToProcess, t as loadKit } from "./kit-
|
|
4
|
-
import { t as clearBuildDir } from "./fs-
|
|
3
|
+
import { r as relativeToProcess, t as loadKit } from "./kit-4LNqcmNp.mjs";
|
|
4
|
+
import { t as clearBuildDir } from "./fs-BNfOTIDu.mjs";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
import { colors } from "consola/utils";
|
|
@@ -1,13 +1,13 @@
|
|
|
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 } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { r as relativeToProcess, t as loadKit } from "./kit-
|
|
3
|
+
import { r as relativeToProcess, t as loadKit } from "./kit-4LNqcmNp.mjs";
|
|
4
4
|
import { dirname } from "node:path";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
import { colors } from "consola/utils";
|
|
8
8
|
import { box, outro } from "@clack/prompts";
|
|
9
|
-
import { existsSync, promises } from "node:fs";
|
|
10
9
|
import { resolve as resolve$1 } from "pathe";
|
|
10
|
+
import { existsSync, promises } from "node:fs";
|
|
11
11
|
import { x } from "tinyexec";
|
|
12
12
|
import { setupDotenv } from "c12";
|
|
13
13
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as cwdArgs } from "./_shared-BCYCnX0T.mjs";
|
|
2
2
|
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import "./kit-
|
|
4
|
-
import { t as getNuxtVersion } from "./versions-
|
|
5
|
-
import { t as formatInfoBox } from "./formatting-
|
|
6
|
-
import { n as fetchModules, t as checkNuxtCompatibility } from "./_utils-
|
|
3
|
+
import "./kit-4LNqcmNp.mjs";
|
|
4
|
+
import { t as getNuxtVersion } from "./versions-DD7jbeRR.mjs";
|
|
5
|
+
import { t as formatInfoBox } from "./formatting-PESozNtr.mjs";
|
|
6
|
+
import { n as fetchModules, t as checkNuxtCompatibility } from "./_utils-B8YNEdpq.mjs";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
8
8
|
import { colors } from "consola/utils";
|
|
9
9
|
import { box } from "@clack/prompts";
|
|
@@ -84,7 +84,7 @@ async function findModuleByKeywords(query, nuxtVersion) {
|
|
|
84
84
|
compatibility: `nuxt: ${result.item.compatibility?.nuxt || "*"}`,
|
|
85
85
|
repository: result.item.github,
|
|
86
86
|
description: result.item.description,
|
|
87
|
-
install: `npx nuxt
|
|
87
|
+
install: `npx nuxt add ${result.item.name}`,
|
|
88
88
|
stars: colors.yellow(formatNumber(result.item.stats.stars)),
|
|
89
89
|
monthlyDownloads: colors.yellow(formatNumber(result.item.stats.downloads))
|
|
90
90
|
};
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { r as relativeToProcess, t as loadKit } from "./kit-B3S8uoS_.mjs";
|
|
4
|
-
import process from "node:process";
|
|
5
|
-
import { defineCommand } from "citty";
|
|
6
|
-
import { colors } from "consola/utils";
|
|
7
|
-
import { cancel, intro, outro } from "@clack/prompts";
|
|
8
|
-
import { existsSync, promises } from "node:fs";
|
|
9
|
-
import { dirname, extname, resolve } from "pathe";
|
|
1
|
+
import { resolve } from "pathe";
|
|
10
2
|
import { camelCase, pascalCase } from "scule";
|
|
11
3
|
|
|
12
4
|
//#region ../nuxi/src/utils/templates/api.ts
|
|
@@ -261,6 +253,25 @@ const templates = {
|
|
|
261
253
|
"server-route": serverRoute,
|
|
262
254
|
"server-util": serverUtil
|
|
263
255
|
};
|
|
256
|
+
const _templateNames = {
|
|
257
|
+
"api": void 0,
|
|
258
|
+
"app": void 0,
|
|
259
|
+
"app-config": void 0,
|
|
260
|
+
"component": void 0,
|
|
261
|
+
"composable": void 0,
|
|
262
|
+
"error": void 0,
|
|
263
|
+
"layer": void 0,
|
|
264
|
+
"layout": void 0,
|
|
265
|
+
"middleware": void 0,
|
|
266
|
+
"module": void 0,
|
|
267
|
+
"page": void 0,
|
|
268
|
+
"plugin": void 0,
|
|
269
|
+
"server-middleware": void 0,
|
|
270
|
+
"server-plugin": void 0,
|
|
271
|
+
"server-route": void 0,
|
|
272
|
+
"server-util": void 0
|
|
273
|
+
};
|
|
274
|
+
const templateNames = Object.keys(_templateNames);
|
|
264
275
|
function applySuffix(args, suffixes, unwrapFrom) {
|
|
265
276
|
let suffix = "";
|
|
266
277
|
for (const s of suffixes) if (args[s]) suffix += `.${s}`;
|
|
@@ -269,73 +280,4 @@ function applySuffix(args, suffixes, unwrapFrom) {
|
|
|
269
280
|
}
|
|
270
281
|
|
|
271
282
|
//#endregion
|
|
272
|
-
|
|
273
|
-
const templateNames = Object.keys(templates);
|
|
274
|
-
var add_default = defineCommand({
|
|
275
|
-
meta: {
|
|
276
|
-
name: "add",
|
|
277
|
-
description: "Create a new template file."
|
|
278
|
-
},
|
|
279
|
-
args: {
|
|
280
|
-
...cwdArgs,
|
|
281
|
-
...logLevelArgs,
|
|
282
|
-
force: {
|
|
283
|
-
type: "boolean",
|
|
284
|
-
description: "Force override file if it already exists",
|
|
285
|
-
default: false
|
|
286
|
-
},
|
|
287
|
-
template: {
|
|
288
|
-
type: "positional",
|
|
289
|
-
required: true,
|
|
290
|
-
valueHint: templateNames.join("|"),
|
|
291
|
-
description: `Specify which template to generate`
|
|
292
|
-
},
|
|
293
|
-
name: {
|
|
294
|
-
type: "positional",
|
|
295
|
-
required: true,
|
|
296
|
-
description: "Specify name of the generated file"
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
async run(ctx) {
|
|
300
|
-
const cwd = resolve(ctx.args.cwd);
|
|
301
|
-
intro(colors.cyan("Adding template..."));
|
|
302
|
-
const templateName = ctx.args.template;
|
|
303
|
-
if (!templateNames.includes(templateName)) {
|
|
304
|
-
const templateNames$1 = Object.keys(templates).map((name$1) => colors.cyan(name$1));
|
|
305
|
-
const lastTemplateName = templateNames$1.pop();
|
|
306
|
-
logger.error(`Template ${colors.cyan(templateName)} is not supported.`);
|
|
307
|
-
logger.info(`Possible values are ${templateNames$1.join(", ")} or ${lastTemplateName}.`);
|
|
308
|
-
process.exit(1);
|
|
309
|
-
}
|
|
310
|
-
const ext = extname(ctx.args.name);
|
|
311
|
-
const name = ext === ".vue" || ext === ".ts" ? ctx.args.name.replace(ext, "") : ctx.args.name;
|
|
312
|
-
if (!name) {
|
|
313
|
-
cancel("name argument is missing!");
|
|
314
|
-
process.exit(1);
|
|
315
|
-
}
|
|
316
|
-
const config = await (await loadKit(cwd)).loadNuxtConfig({ cwd });
|
|
317
|
-
const template = templates[templateName];
|
|
318
|
-
const res = template({
|
|
319
|
-
name,
|
|
320
|
-
args: ctx.args,
|
|
321
|
-
nuxtOptions: config
|
|
322
|
-
});
|
|
323
|
-
if (!ctx.args.force && existsSync(res.path)) {
|
|
324
|
-
logger.error(`File exists at ${colors.cyan(relativeToProcess(res.path))}.`);
|
|
325
|
-
logger.info(`Use ${colors.cyan("--force")} to override or use a different name.`);
|
|
326
|
-
process.exit(1);
|
|
327
|
-
}
|
|
328
|
-
const parentDir = dirname(res.path);
|
|
329
|
-
if (!existsSync(parentDir)) {
|
|
330
|
-
logger.step(`Creating directory ${colors.cyan(relativeToProcess(parentDir))}.`);
|
|
331
|
-
if (templateName === "page") logger.info("This enables vue-router functionality!");
|
|
332
|
-
await promises.mkdir(parentDir, { recursive: true });
|
|
333
|
-
}
|
|
334
|
-
await promises.writeFile(res.path, `${res.contents.trim()}\n`);
|
|
335
|
-
logger.success(`Created ${colors.cyan(relativeToProcess(res.path))}.`);
|
|
336
|
-
outro(`Generated a new ${colors.cyan(templateName)}!`);
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
//#endregion
|
|
341
|
-
export { add_default as default };
|
|
283
|
+
export { templates as n, templateNames as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as legacyRootDirArgs, i as extendsArgs, n as dotEnvArgs, o as logLevelArgs, t as cwdArgs } from "./_shared-BCYCnX0T.mjs";
|
|
2
|
-
import { t as loadKit } from "./kit-
|
|
2
|
+
import { t as loadKit } from "./kit-4LNqcmNp.mjs";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { isBun } from "std-env";
|
|
6
|
-
import { resolveModulePath } from "exsolve";
|
|
7
6
|
import { resolve } from "pathe";
|
|
7
|
+
import { resolveModulePath } from "exsolve";
|
|
8
8
|
import { readTSConfig } from "pkg-types";
|
|
9
9
|
import { x } from "tinyexec";
|
|
10
10
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { a as legacyRootDirArgs, o as logLevelArgs, t as cwdArgs } from "./_shared-BCYCnX0T.mjs";
|
|
2
2
|
import { n as logger } from "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import { r as relativeToProcess, t as loadKit } from "./kit-
|
|
4
|
-
import { t as getNuxtVersion } from "./versions-
|
|
5
|
-
import "./fs-
|
|
6
|
-
import { r as nuxtVersionToGitIdentifier, t as cleanupNuxtDirs } from "./nuxt-
|
|
7
|
-
import { t as getPackageManagerVersion } from "./packageManagers-
|
|
3
|
+
import { r as relativeToProcess, t as loadKit } from "./kit-4LNqcmNp.mjs";
|
|
4
|
+
import { t as getNuxtVersion } from "./versions-DD7jbeRR.mjs";
|
|
5
|
+
import "./fs-BNfOTIDu.mjs";
|
|
6
|
+
import { r as nuxtVersionToGitIdentifier, t as cleanupNuxtDirs } from "./nuxt-4ILhz74C.mjs";
|
|
7
|
+
import { t as getPackageManagerVersion } from "./packageManagers-BX7-V04a.mjs";
|
|
8
8
|
import process from "node:process";
|
|
9
9
|
import { defineCommand } from "citty";
|
|
10
10
|
import { colors } from "consola/utils";
|
|
11
11
|
import { cancel, intro, isCancel, note, outro, select, spinner, tasks } from "@clack/prompts";
|
|
12
|
-
import { existsSync } from "node:fs";
|
|
13
12
|
import { resolve } from "pathe";
|
|
13
|
+
import { existsSync } from "node:fs";
|
|
14
14
|
import { findWorkspaceDir, readPackageJSON } from "pkg-types";
|
|
15
15
|
import { addDependency, dedupeDependencies, detectPackageManager } from "nypm";
|
|
16
16
|
|
package/package.json
CHANGED
package/dist/add-CbHKQ2Kq.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "./_shared-BCYCnX0T.mjs";
|
|
2
|
-
import "./logger-B4ge7MhP.mjs";
|
|
3
|
-
import "./kit-B3S8uoS_.mjs";
|
|
4
|
-
import "./versions-Bly87QYZ.mjs";
|
|
5
|
-
import "./fs-CQH7NJn6.mjs";
|
|
6
|
-
import { t as add_default } from "./add-cOz5A42V.mjs";
|
|
7
|
-
import "./_utils-NB3Cn3-G.mjs";
|
|
8
|
-
import "./prepare-CUaf6Joj.mjs";
|
|
9
|
-
|
|
10
|
-
export { add_default as default };
|
package/dist/dev-fNXtL_VP.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "./logger-B4ge7MhP.mjs";
|
|
2
|
-
import "./env-DV8TWRZt.mjs";
|
|
3
|
-
import { t as initialize } from "./dev-BKPehGZf.mjs";
|
|
4
|
-
import "./kit-B3S8uoS_.mjs";
|
|
5
|
-
import "./versions-Bly87QYZ.mjs";
|
|
6
|
-
import "./banner-DMgRAl0q.mjs";
|
|
7
|
-
import "./fs-CQH7NJn6.mjs";
|
|
8
|
-
import "./nuxt-B1NSR4xh.mjs";
|
|
9
|
-
|
|
10
|
-
export { initialize };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|