@vuetify/cli 0.0.10-beta.10 → 0.0.10-beta.11

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.
Files changed (2) hide show
  1. package/dist/index.mjs +56 -52
  2. 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": "Pluggable JavaScript linter"
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": "Use official MCP Vuetify integration"
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": "Operation cancelled."
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": "Подключаемый линтер JavaScript"
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": "Добавить официальный MCP Vuetify сервер"
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,21 @@ 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 Promise.resolve(true);
12520
- if (!args$2.interactive) return Promise.resolve(false);
12521
- return Mt({
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
+ }
12525
12519
  }
12526
- return Promise.resolve(args$2.force || false);
12520
+ return args$2.force || false;
12527
12521
  },
12528
12522
  platform: () => {
12529
12523
  if (args$2.platform) return Promise.resolve(args$2.platform);
@@ -12599,7 +12593,9 @@ async function prompt(args$2, cwd$2 = process.cwd()) {
12599
12593
  features: ({ results }) => {
12600
12594
  if (args$2.features) return Promise.resolve(args$2.features.filter((f$7) => f$7 !== "router" && f$7 !== "file-router"));
12601
12595
  if (!args$2.interactive) return Promise.resolve([]);
12602
- return (results.platform || args$2.platform) === "vue" ? Lt({
12596
+ const platform$2 = results.platform || args$2.platform;
12597
+ const type = results.type || args$2.type;
12598
+ return platform$2 === "vue" ? Lt({
12603
12599
  message: i18n.t("prompts.features.select", { hint: dim("↑/↓ to navigate, space to select, a to toggle all, enter to confirm") }),
12604
12600
  options: [
12605
12601
  {
@@ -12614,13 +12610,11 @@ async function prompt(args$2, cwd$2 = process.cwd()) {
12614
12610
  },
12615
12611
  {
12616
12612
  label: i18n.t("prompts.features.pinia.label"),
12617
- value: "pinia",
12618
- hint: i18n.t("prompts.features.pinia.hint")
12613
+ value: "pinia"
12619
12614
  },
12620
12615
  {
12621
12616
  label: i18n.t("prompts.features.i18n.label"),
12622
- value: "i18n",
12623
- hint: i18n.t("prompts.features.i18n.hint")
12617
+ value: "i18n"
12624
12618
  }
12625
12619
  ],
12626
12620
  initialValues: ["eslint", "mcp"],
@@ -12633,11 +12627,11 @@ async function prompt(args$2, cwd$2 = process.cwd()) {
12633
12627
  value: "eslint",
12634
12628
  hint: i18n.t("prompts.features.eslint.hint")
12635
12629
  },
12636
- {
12630
+ ...type === "vuetify0" ? [] : [{
12637
12631
  label: i18n.t("prompts.features.vuetify_nuxt_module.label"),
12638
12632
  value: "vuetify-nuxt-module",
12639
12633
  hint: i18n.t("prompts.features.vuetify_nuxt_module.hint")
12640
- },
12634
+ }],
12641
12635
  {
12642
12636
  label: i18n.t("prompts.features.mcp.label"),
12643
12637
  value: "mcp",
@@ -12645,18 +12639,16 @@ async function prompt(args$2, cwd$2 = process.cwd()) {
12645
12639
  },
12646
12640
  {
12647
12641
  label: i18n.t("prompts.features.pinia.label"),
12648
- value: "pinia",
12649
- hint: i18n.t("prompts.features.pinia.hint")
12642
+ value: "pinia"
12650
12643
  },
12651
12644
  {
12652
12645
  label: i18n.t("prompts.features.i18n.label"),
12653
- value: "i18n",
12654
- hint: i18n.t("prompts.features.i18n.hint")
12646
+ value: "i18n"
12655
12647
  }
12656
12648
  ],
12657
12649
  initialValues: [
12658
12650
  "eslint",
12659
- "vuetify-nuxt-module",
12651
+ ...type === "vuetify0" ? [] : ["vuetify-nuxt-module"],
12660
12652
  "mcp"
12661
12653
  ],
12662
12654
  required: false
@@ -12866,7 +12858,7 @@ function normalizeString(path$1, allowAboveRoot) {
12866
12858
  const isAbsolute$1 = function(p$3) {
12867
12859
  return _IS_ABSOLUTE_RE.test(p$3);
12868
12860
  };
12869
- const relative = function(from, to) {
12861
+ const relative$1 = function(from, to) {
12870
12862
  const _from = resolve$1(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
12871
12863
  const _to = resolve$1(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
12872
12864
  if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) return _to.join("/");
@@ -46684,7 +46676,7 @@ var require_util = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/source-map-j
46684
46676
  * @param aRoot The root path or URL.
46685
46677
  * @param aPath The path or URL to be made relative to aRoot.
46686
46678
  */
46687
- function relative$1(aRoot, aPath) {
46679
+ function relative$2(aRoot, aPath) {
46688
46680
  if (aRoot === "") aRoot = ".";
46689
46681
  aRoot = aRoot.replace(/\/$/, "");
46690
46682
  var level = 0;
@@ -46697,7 +46689,7 @@ var require_util = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/source-map-j
46697
46689
  }
46698
46690
  return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
46699
46691
  }
46700
- exports$1.relative = relative$1;
46692
+ exports$1.relative = relative$2;
46701
46693
  var supportsNullProto = function() {
46702
46694
  return !("__proto__" in Object.create(null));
46703
46695
  }();
@@ -52724,7 +52716,10 @@ const i18n$1 = {
52724
52716
  if (options$1) {
52725
52717
  options$1.modules ||= [];
52726
52718
  options$1.modules.push("@nuxtjs/i18n");
52727
- options$1.i18n = { vueI18n: "./i18n.config.ts" };
52719
+ options$1.i18n = {
52720
+ defaultLocale: "en",
52721
+ vueI18n: "./i18n.config.ts"
52722
+ };
52728
52723
  }
52729
52724
  await writeFile(configPath, mod.generate().code);
52730
52725
  await writeFile(join(cwd$2, `i18n.config.${ext}`), getNuxtI18nConfig(isTypescript));
@@ -53264,7 +53259,7 @@ async function scaffold(options$1, callbacks = {}) {
53264
53259
  pkg = await readPackageJSON(join(projectRoot, "package.json"));
53265
53260
  callbacks.onConfigStart?.();
53266
53261
  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({
53262
+ if (platform$2 === "nuxt" && type !== "vuetify0" && (!features$1 || !features$1.includes("vuetify-nuxt-module"))) await vuetifyNuxtManual.apply({
53268
53263
  cwd: projectRoot,
53269
53264
  pkg,
53270
53265
  isTypescript: !!typescript$1
@@ -53345,8 +53340,8 @@ async function createVuetify(options$1) {
53345
53340
  onConvertEnd: () => {
53346
53341
  s$9.stop(i18n.t("spinners.convert.done"));
53347
53342
  },
53348
- onInstallStart: (pm) => {
53349
- s$9.start(i18n.t("spinners.dependencies.installing_with", { pm }));
53343
+ onInstallStart: (pm$1) => {
53344
+ s$9.start(i18n.t("spinners.dependencies.installing_with", { pm: pm$1 }));
53350
53345
  },
53351
53346
  onInstallEnd: () => {
53352
53347
  s$9.stop(i18n.t("spinners.dependencies.installed"));
@@ -53357,10 +53352,19 @@ async function createVuetify(options$1) {
53357
53352
  console.error(`Failed to create project: ${error}`);
53358
53353
  throw error;
53359
53354
  }
53355
+ const relativePath = relative(cwd$2, projectRoot);
53356
+ const pm = (context.packageManager === "none" ? getUserAgent() : context.packageManager) || "npm";
53357
+ const lines = [];
53358
+ if (relativePath) lines.push(`cd ${relativePath}`);
53359
+ if (!context.install) lines.push(`${pm} install`);
53360
+ lines.push(`${pm} ${pm === "npm" ? "run " : ""}dev`);
53360
53361
  Wt(i18n.t("messages.create.generated", {
53361
53362
  name: context.name,
53362
- path: projectRoot
53363
+ path: relativePath
53363
53364
  }));
53365
+ Tt(lines.join("\n"), "Next steps", { withGuide: false });
53366
+ const blue$4 = ansi256(33);
53367
+ 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
53368
  }
53365
53369
 
53366
53370
  //#endregion
@@ -54087,7 +54091,7 @@ async function addEslint() {
54087
54091
  }
54088
54092
  }
54089
54093
  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") }));
54094
+ 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
54095
  if (overwriteConfig === true) {
54092
54096
  const configData = isNuxt ? getNuxtEslintContent(isTypescript) : getVueEslintContent(isTypescript);
54093
54097
  const s$9 = Se();
@@ -56055,7 +56059,7 @@ function commandUpgradeFabric(pkgName) {
56055
56059
 
56056
56060
  //#endregion
56057
56061
  //#region package.json
56058
- var version = "0.0.10-beta.10";
56062
+ var version = "0.0.10-beta.11";
56059
56063
 
56060
56064
  //#endregion
56061
56065
  //#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.10",
3
+ "version": "0.0.10-beta.11",
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.10"
21
+ "@vuetify/cli-shared": "0.0.10-beta.11"
22
22
  },
23
23
  "main": "./dist/index.mjs",
24
24
  "module": "./dist/index.mjs",