@vuetify/cli 0.0.10-beta.10 → 0.0.10-beta.12
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 +57 -52
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import c from "node:readline";
|
|
|
7
7
|
import * as tty from "node:tty";
|
|
8
8
|
import { ReadStream } from "node:tty";
|
|
9
9
|
import fs, { appendFileSync, cpSync, createWriteStream, existsSync, lstatSync, mkdirSync, mkdtempSync, promises, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
10
|
-
import path, { delimiter, dirname, isAbsolute, join, normalize, resolve, sep } from "node:path";
|
|
10
|
+
import path, { delimiter, dirname, isAbsolute, join, normalize, relative, resolve, sep } from "node:path";
|
|
11
11
|
import { format, formatWithOptions, inspect, promisify, stripVTControlCharacters } from "node:util";
|
|
12
12
|
import fs$1, { constants, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
13
13
|
import { createRequire as createRequire$1 } from "module";
|
|
@@ -8311,7 +8311,8 @@ var en_default = {
|
|
|
8311
8311
|
"project": {
|
|
8312
8312
|
"name": "Project name:",
|
|
8313
8313
|
"invalid": "Invalid project name: %{error}",
|
|
8314
|
-
"overwrite": "The project path: %{path} already exists, would you like to overwrite this directory?"
|
|
8314
|
+
"overwrite": "The project path: %{path} already exists, would you like to overwrite this directory?",
|
|
8315
|
+
"cancel": "Use the different name for the project."
|
|
8315
8316
|
},
|
|
8316
8317
|
"framework": {
|
|
8317
8318
|
"select": "Which framework would you like to use?",
|
|
@@ -8335,30 +8336,24 @@ var en_default = {
|
|
|
8335
8336
|
},
|
|
8336
8337
|
"features": {
|
|
8337
8338
|
"select": "Select features to install: %{hint}",
|
|
8338
|
-
"pinia": {
|
|
8339
|
-
"label": "Pinia",
|
|
8340
|
-
"hint": "Intuitive, type safe and flexible Store for Vue"
|
|
8341
|
-
},
|
|
8339
|
+
"pinia": { "label": "Pinia" },
|
|
8342
8340
|
"eslint": {
|
|
8343
8341
|
"label": "ESLint",
|
|
8344
|
-
"hint": "
|
|
8345
|
-
},
|
|
8346
|
-
"i18n": {
|
|
8347
|
-
"label": "I18n",
|
|
8348
|
-
"hint": "Internationalization support for Vue"
|
|
8342
|
+
"hint": "with eslint-config-vuetify"
|
|
8349
8343
|
},
|
|
8344
|
+
"i18n": { "label": "I18n" },
|
|
8350
8345
|
"vuetify_nuxt_module": {
|
|
8351
8346
|
"label": "Vuetify Nuxt Module",
|
|
8352
8347
|
"hint": "Use vuetify-nuxt-module instead of local plugin"
|
|
8353
8348
|
},
|
|
8354
8349
|
"mcp": {
|
|
8355
8350
|
"label": "MCP",
|
|
8356
|
-
"hint": "
|
|
8351
|
+
"hint": "with @vuetify/mcp and @intellectronica/ruler"
|
|
8357
8352
|
}
|
|
8358
8353
|
},
|
|
8359
8354
|
"client_hints": { "enable": "Enable Client Hints? (Requires SSR)" },
|
|
8360
8355
|
"package_manager": { "select": "Which package manager would you like to use?" },
|
|
8361
|
-
"cancel": "
|
|
8356
|
+
"cancel": "Setup cancelled. You can run this command again anytime."
|
|
8362
8357
|
},
|
|
8363
8358
|
spinners: {
|
|
8364
8359
|
"template": {
|
|
@@ -8512,7 +8507,8 @@ var ru_default = {
|
|
|
8512
8507
|
"project": {
|
|
8513
8508
|
"name": "Название проекта:",
|
|
8514
8509
|
"invalid": "Некорректное название проекта: %{error}",
|
|
8515
|
-
"overwrite": "Папка проекта: %{path} уже существует, хотите перезаписать её?"
|
|
8510
|
+
"overwrite": "Папка проекта: %{path} уже существует, хотите перезаписать её?",
|
|
8511
|
+
"cancel": "Используйте другое название для проекта."
|
|
8516
8512
|
},
|
|
8517
8513
|
"framework": {
|
|
8518
8514
|
"select": "Какой фреймворк вы хотите использовать?",
|
|
@@ -8536,29 +8532,23 @@ var ru_default = {
|
|
|
8536
8532
|
},
|
|
8537
8533
|
"features": {
|
|
8538
8534
|
"select": "Выберите функции для установки: %{hint}",
|
|
8539
|
-
"pinia": {
|
|
8540
|
-
"label": "Pinia",
|
|
8541
|
-
"hint": "Интуитивный, типобезопасный и гибкий Store для Vue"
|
|
8542
|
-
},
|
|
8535
|
+
"pinia": { "label": "Pinia" },
|
|
8543
8536
|
"eslint": {
|
|
8544
8537
|
"label": "ESLint",
|
|
8545
|
-
"hint": "
|
|
8546
|
-
},
|
|
8547
|
-
"i18n": {
|
|
8548
|
-
"label": "I18n",
|
|
8549
|
-
"hint": "Поддержка i18n для Vue"
|
|
8538
|
+
"hint": "с eslint-config-vuetify"
|
|
8550
8539
|
},
|
|
8540
|
+
"i18n": { "label": "I18n" },
|
|
8551
8541
|
"vuetify_nuxt_module": {
|
|
8552
8542
|
"label": "Vuetify Nuxt Module",
|
|
8553
8543
|
"hint": "Использовать vuetify-nuxt-module вместо локального плагина"
|
|
8554
8544
|
},
|
|
8555
8545
|
"mcp": {
|
|
8556
8546
|
"label": "MCP",
|
|
8557
|
-
"hint": "
|
|
8547
|
+
"hint": "с @vuetify/mcp и @intellectronica/ruler"
|
|
8558
8548
|
}
|
|
8559
8549
|
},
|
|
8560
8550
|
"package_manager": { "select": "Какой менеджер пакетов вы хотите использовать?" },
|
|
8561
|
-
"cancel": "
|
|
8551
|
+
"cancel": "Создание проекта отменено. Вы можете запустить команду снова в любое время."
|
|
8562
8552
|
},
|
|
8563
8553
|
spinners: {
|
|
8564
8554
|
"template": {
|
|
@@ -12513,17 +12503,22 @@ async function prompt(args$2, cwd$2 = process.cwd()) {
|
|
|
12513
12503
|
}
|
|
12514
12504
|
});
|
|
12515
12505
|
},
|
|
12516
|
-
force: ({ results }) => {
|
|
12506
|
+
force: async ({ results }) => {
|
|
12517
12507
|
const projectRoot = join(cwd$2, results.name || args$2.name);
|
|
12518
12508
|
if (existsSync(projectRoot) && readdirSync(projectRoot).length > 0) {
|
|
12519
|
-
if (args$2.force) return
|
|
12520
|
-
if (!args$2.interactive) return
|
|
12521
|
-
|
|
12509
|
+
if (args$2.force) return true;
|
|
12510
|
+
if (!args$2.interactive) return false;
|
|
12511
|
+
const overwrite = await Mt({
|
|
12522
12512
|
message: i18n.t("prompts.project.overwrite", { path: projectRoot }),
|
|
12523
12513
|
initialValue: false
|
|
12524
12514
|
});
|
|
12515
|
+
if (overwrite === false || typeof overwrite !== "boolean") {
|
|
12516
|
+
Pt(i18n.t("prompts.project.cancel"));
|
|
12517
|
+
process.exit(0);
|
|
12518
|
+
}
|
|
12519
|
+
return true;
|
|
12525
12520
|
}
|
|
12526
|
-
return
|
|
12521
|
+
return args$2.force || false;
|
|
12527
12522
|
},
|
|
12528
12523
|
platform: () => {
|
|
12529
12524
|
if (args$2.platform) return Promise.resolve(args$2.platform);
|
|
@@ -12599,7 +12594,9 @@ async function prompt(args$2, cwd$2 = process.cwd()) {
|
|
|
12599
12594
|
features: ({ results }) => {
|
|
12600
12595
|
if (args$2.features) return Promise.resolve(args$2.features.filter((f$7) => f$7 !== "router" && f$7 !== "file-router"));
|
|
12601
12596
|
if (!args$2.interactive) return Promise.resolve([]);
|
|
12602
|
-
|
|
12597
|
+
const platform$2 = results.platform || args$2.platform;
|
|
12598
|
+
const type = results.type || args$2.type;
|
|
12599
|
+
return platform$2 === "vue" ? Lt({
|
|
12603
12600
|
message: i18n.t("prompts.features.select", { hint: dim("↑/↓ to navigate, space to select, a to toggle all, enter to confirm") }),
|
|
12604
12601
|
options: [
|
|
12605
12602
|
{
|
|
@@ -12614,13 +12611,11 @@ async function prompt(args$2, cwd$2 = process.cwd()) {
|
|
|
12614
12611
|
},
|
|
12615
12612
|
{
|
|
12616
12613
|
label: i18n.t("prompts.features.pinia.label"),
|
|
12617
|
-
value: "pinia"
|
|
12618
|
-
hint: i18n.t("prompts.features.pinia.hint")
|
|
12614
|
+
value: "pinia"
|
|
12619
12615
|
},
|
|
12620
12616
|
{
|
|
12621
12617
|
label: i18n.t("prompts.features.i18n.label"),
|
|
12622
|
-
value: "i18n"
|
|
12623
|
-
hint: i18n.t("prompts.features.i18n.hint")
|
|
12618
|
+
value: "i18n"
|
|
12624
12619
|
}
|
|
12625
12620
|
],
|
|
12626
12621
|
initialValues: ["eslint", "mcp"],
|
|
@@ -12633,11 +12628,11 @@ async function prompt(args$2, cwd$2 = process.cwd()) {
|
|
|
12633
12628
|
value: "eslint",
|
|
12634
12629
|
hint: i18n.t("prompts.features.eslint.hint")
|
|
12635
12630
|
},
|
|
12636
|
-
{
|
|
12631
|
+
...type === "vuetify0" ? [] : [{
|
|
12637
12632
|
label: i18n.t("prompts.features.vuetify_nuxt_module.label"),
|
|
12638
12633
|
value: "vuetify-nuxt-module",
|
|
12639
12634
|
hint: i18n.t("prompts.features.vuetify_nuxt_module.hint")
|
|
12640
|
-
},
|
|
12635
|
+
}],
|
|
12641
12636
|
{
|
|
12642
12637
|
label: i18n.t("prompts.features.mcp.label"),
|
|
12643
12638
|
value: "mcp",
|
|
@@ -12645,18 +12640,16 @@ async function prompt(args$2, cwd$2 = process.cwd()) {
|
|
|
12645
12640
|
},
|
|
12646
12641
|
{
|
|
12647
12642
|
label: i18n.t("prompts.features.pinia.label"),
|
|
12648
|
-
value: "pinia"
|
|
12649
|
-
hint: i18n.t("prompts.features.pinia.hint")
|
|
12643
|
+
value: "pinia"
|
|
12650
12644
|
},
|
|
12651
12645
|
{
|
|
12652
12646
|
label: i18n.t("prompts.features.i18n.label"),
|
|
12653
|
-
value: "i18n"
|
|
12654
|
-
hint: i18n.t("prompts.features.i18n.hint")
|
|
12647
|
+
value: "i18n"
|
|
12655
12648
|
}
|
|
12656
12649
|
],
|
|
12657
12650
|
initialValues: [
|
|
12658
12651
|
"eslint",
|
|
12659
|
-
"vuetify-nuxt-module",
|
|
12652
|
+
...type === "vuetify0" ? [] : ["vuetify-nuxt-module"],
|
|
12660
12653
|
"mcp"
|
|
12661
12654
|
],
|
|
12662
12655
|
required: false
|
|
@@ -12866,7 +12859,7 @@ function normalizeString(path$1, allowAboveRoot) {
|
|
|
12866
12859
|
const isAbsolute$1 = function(p$3) {
|
|
12867
12860
|
return _IS_ABSOLUTE_RE.test(p$3);
|
|
12868
12861
|
};
|
|
12869
|
-
const relative = function(from, to) {
|
|
12862
|
+
const relative$1 = function(from, to) {
|
|
12870
12863
|
const _from = resolve$1(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
12871
12864
|
const _to = resolve$1(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
12872
12865
|
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) return _to.join("/");
|
|
@@ -46684,7 +46677,7 @@ var require_util = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/source-map-j
|
|
|
46684
46677
|
* @param aRoot The root path or URL.
|
|
46685
46678
|
* @param aPath The path or URL to be made relative to aRoot.
|
|
46686
46679
|
*/
|
|
46687
|
-
function relative$
|
|
46680
|
+
function relative$2(aRoot, aPath) {
|
|
46688
46681
|
if (aRoot === "") aRoot = ".";
|
|
46689
46682
|
aRoot = aRoot.replace(/\/$/, "");
|
|
46690
46683
|
var level = 0;
|
|
@@ -46697,7 +46690,7 @@ var require_util = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/source-map-j
|
|
|
46697
46690
|
}
|
|
46698
46691
|
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
46699
46692
|
}
|
|
46700
|
-
exports$1.relative = relative$
|
|
46693
|
+
exports$1.relative = relative$2;
|
|
46701
46694
|
var supportsNullProto = function() {
|
|
46702
46695
|
return !("__proto__" in Object.create(null));
|
|
46703
46696
|
}();
|
|
@@ -52724,7 +52717,10 @@ const i18n$1 = {
|
|
|
52724
52717
|
if (options$1) {
|
|
52725
52718
|
options$1.modules ||= [];
|
|
52726
52719
|
options$1.modules.push("@nuxtjs/i18n");
|
|
52727
|
-
options$1.i18n = {
|
|
52720
|
+
options$1.i18n = {
|
|
52721
|
+
defaultLocale: "en",
|
|
52722
|
+
vueI18n: "./i18n.config.ts"
|
|
52723
|
+
};
|
|
52728
52724
|
}
|
|
52729
52725
|
await writeFile(configPath, mod.generate().code);
|
|
52730
52726
|
await writeFile(join(cwd$2, `i18n.config.${ext}`), getNuxtI18nConfig(isTypescript));
|
|
@@ -53264,7 +53260,7 @@ async function scaffold(options$1, callbacks = {}) {
|
|
|
53264
53260
|
pkg = await readPackageJSON(join(projectRoot, "package.json"));
|
|
53265
53261
|
callbacks.onConfigStart?.();
|
|
53266
53262
|
if (features$1 && features$1.length > 0) await applyFeatures(projectRoot, features$1, pkg, !!typescript$1, clientHints, type);
|
|
53267
|
-
if (platform$2 === "nuxt" && (!features$1 || !features$1.includes("vuetify-nuxt-module"))) await vuetifyNuxtManual.apply({
|
|
53263
|
+
if (platform$2 === "nuxt" && type !== "vuetify0" && (!features$1 || !features$1.includes("vuetify-nuxt-module"))) await vuetifyNuxtManual.apply({
|
|
53268
53264
|
cwd: projectRoot,
|
|
53269
53265
|
pkg,
|
|
53270
53266
|
isTypescript: !!typescript$1
|
|
@@ -53345,8 +53341,8 @@ async function createVuetify(options$1) {
|
|
|
53345
53341
|
onConvertEnd: () => {
|
|
53346
53342
|
s$9.stop(i18n.t("spinners.convert.done"));
|
|
53347
53343
|
},
|
|
53348
|
-
onInstallStart: (pm) => {
|
|
53349
|
-
s$9.start(i18n.t("spinners.dependencies.installing_with", { pm }));
|
|
53344
|
+
onInstallStart: (pm$1) => {
|
|
53345
|
+
s$9.start(i18n.t("spinners.dependencies.installing_with", { pm: pm$1 }));
|
|
53350
53346
|
},
|
|
53351
53347
|
onInstallEnd: () => {
|
|
53352
53348
|
s$9.stop(i18n.t("spinners.dependencies.installed"));
|
|
@@ -53357,10 +53353,19 @@ async function createVuetify(options$1) {
|
|
|
53357
53353
|
console.error(`Failed to create project: ${error}`);
|
|
53358
53354
|
throw error;
|
|
53359
53355
|
}
|
|
53356
|
+
const relativePath = relative(cwd$2, projectRoot);
|
|
53357
|
+
const pm = (context.packageManager === "none" ? getUserAgent() : context.packageManager) || "npm";
|
|
53358
|
+
const lines = [];
|
|
53359
|
+
if (relativePath) lines.push(`cd ${relativePath}`);
|
|
53360
|
+
if (!context.install) lines.push(`${pm} install`);
|
|
53361
|
+
lines.push(`${pm} ${pm === "npm" ? "run " : ""}dev`);
|
|
53360
53362
|
Wt(i18n.t("messages.create.generated", {
|
|
53361
53363
|
name: context.name,
|
|
53362
|
-
path:
|
|
53364
|
+
path: relativePath
|
|
53363
53365
|
}));
|
|
53366
|
+
Tt(lines.join("\n"), "Next steps", { withGuide: false });
|
|
53367
|
+
const blue$4 = ansi256(33);
|
|
53368
|
+
console.log(`${blue$4(link("Docs", "https://0.vuetifyjs.com/guide"))} ⸱ ${blue$4(link("Discord", "https://discord.gg/vK6T89eNP7"))} ⸱ ${blue$4(link("Support Us", "https://opencollective.com/vuetify"))}\n`);
|
|
53364
53369
|
}
|
|
53365
53370
|
|
|
53366
53371
|
//#endregion
|
|
@@ -54087,7 +54092,7 @@ async function addEslint() {
|
|
|
54087
54092
|
}
|
|
54088
54093
|
}
|
|
54089
54094
|
let overwriteConfig = false;
|
|
54090
|
-
overwriteConfig = await (configUrl ? Mt({ message: i18n.t("prompts.eslint.overwrite", { file: underline(relative(process.cwd(), configUrl)) }) }) : Mt({ message: i18n.t("prompts.eslint.create") }));
|
|
54095
|
+
overwriteConfig = await (configUrl ? Mt({ message: i18n.t("prompts.eslint.overwrite", { file: underline(relative$1(process.cwd(), configUrl)) }) }) : Mt({ message: i18n.t("prompts.eslint.create") }));
|
|
54091
54096
|
if (overwriteConfig === true) {
|
|
54092
54097
|
const configData = isNuxt ? getNuxtEslintContent(isTypescript) : getVueEslintContent(isTypescript);
|
|
54093
54098
|
const s$9 = Se();
|
|
@@ -56055,7 +56060,7 @@ function commandUpgradeFabric(pkgName) {
|
|
|
56055
56060
|
|
|
56056
56061
|
//#endregion
|
|
56057
56062
|
//#region package.json
|
|
56058
|
-
var version = "0.0.10-beta.
|
|
56063
|
+
var version = "0.0.10-beta.12";
|
|
56059
56064
|
|
|
56060
56065
|
//#endregion
|
|
56061
56066
|
//#region src/commands/docs.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuetify/cli",
|
|
3
|
-
"version": "0.0.10-beta.
|
|
3
|
+
"version": "0.0.10-beta.12",
|
|
4
4
|
"description": "Vuetify CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"open": "^11.0.0",
|
|
19
19
|
"pathe": "^2.0.3",
|
|
20
20
|
"tsdown": "^0.16.6",
|
|
21
|
-
"@vuetify/cli-shared": "0.0.10-beta.
|
|
21
|
+
"@vuetify/cli-shared": "0.0.10-beta.12"
|
|
22
22
|
},
|
|
23
23
|
"main": "./dist/index.mjs",
|
|
24
24
|
"module": "./dist/index.mjs",
|