@vuetify/cli 0.0.4 → 0.0.6

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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import N, { stdin, stdout } from "node:process";
2
+ import P, { stdin, stdout } from "node:process";
3
3
  import c from "node:readline";
4
4
  import { WriteStream } from "node:tty";
5
5
 
@@ -206,7 +206,7 @@ function A$1(t, u$1 = {}) {
206
206
  }
207
207
  return e$1;
208
208
  }
209
- const m = 10, L$1 = (t = 0) => (u$1) => `\x1B[${u$1 + t}m`, N$1 = (t = 0) => (u$1) => `\x1B[${38 + t};5;${u$1}m`, I = (t = 0) => (u$1, F$1, e$1) => `\x1B[${38 + t};2;${u$1};${F$1};${e$1}m`, r = {
209
+ const m = 10, L$1 = (t = 0) => (u$1) => `\x1B[${u$1 + t}m`, N = (t = 0) => (u$1) => `\x1B[${38 + t};5;${u$1}m`, I = (t = 0) => (u$1, F$1, e$1) => `\x1B[${38 + t};2;${u$1};${F$1};${e$1}m`, r = {
210
210
  modifier: {
211
211
  reset: [0, 0],
212
212
  bold: [1, 22],
@@ -277,7 +277,7 @@ function sD() {
277
277
  return Object.defineProperty(r, "codes", {
278
278
  value: t,
279
279
  enumerable: false
280
- }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L$1(), r.color.ansi256 = N$1(), r.color.ansi16m = I(), r.bgColor.ansi = L$1(m), r.bgColor.ansi256 = N$1(m), r.bgColor.ansi16m = I(m), Object.defineProperties(r, {
280
+ }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L$1(), r.color.ansi256 = N(), r.color.ansi16m = I(), r.bgColor.ansi = L$1(m), r.bgColor.ansi256 = N(m), r.bgColor.ansi16m = I(m), Object.defineProperties(r, {
281
281
  rgbToAnsi256: {
282
282
  value: (u$1, F$1, e$1) => u$1 === F$1 && F$1 === e$1 ? u$1 < 8 ? 16 : u$1 > 248 ? 231 : Math.round((u$1 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u$1 / 255 * 5) + 6 * Math.round(F$1 / 255 * 5) + Math.round(e$1 / 255 * 5),
283
283
  enumerable: false
@@ -646,9 +646,9 @@ var PD = class extends x {
646
646
  }
647
647
  };
648
648
  function ce() {
649
- return N.platform !== "win32" ? N.env.TERM !== "linux" : !!N.env.CI || !!N.env.WT_SESSION || !!N.env.TERMINUS_SUBLIME || N.env.ConEmuTask === "{cmd::Cmder}" || N.env.TERM_PROGRAM === "Terminus-Sublime" || N.env.TERM_PROGRAM === "vscode" || N.env.TERM === "xterm-256color" || N.env.TERM === "alacritty" || N.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
649
+ return P.platform !== "win32" ? P.env.TERM !== "linux" : !!P.env.CI || !!P.env.WT_SESSION || !!P.env.TERMINUS_SUBLIME || P.env.ConEmuTask === "{cmd::Cmder}" || P.env.TERM_PROGRAM === "Terminus-Sublime" || P.env.TERM_PROGRAM === "vscode" || P.env.TERM === "xterm-256color" || P.env.TERM === "alacritty" || P.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
650
650
  }
651
- const V = ce(), u = (t, n) => V ? t : n, le = u("❯", ">"), L = u("■", "x"), W = u("▲", "x"), C = u("✔", "√"), o = u(""), d = u(""), k = u("●", ">"), P = u("○", " "), A = u("◻", "[•]"), T = u("◼", "[+]"), F = u("◻", "[ ]"), w = (t) => {
651
+ const V = ce(), u = (t, n) => V ? t : n, le = u("❯", ">"), L = u("■", "x"), W = u("▲", "x"), C = u("✔", "√"), o = u(""), d = u(""), k = u("●", ">"), P$2 = u("○", " "), A = u("◻", "[•]"), T = u("◼", "[+]"), F = u("◻", "[ ]"), w = (t) => {
652
652
  switch (t) {
653
653
  case "initial":
654
654
  case "active": return e.cyan(le);
@@ -701,7 +701,7 @@ ${w(this.state)} ${t.message}
701
701
  case "submit": return `${r$1}${e.gray(o)} ${e.dim(i)}`;
702
702
  case "cancel": return `${r$1}${e.gray(o)} ${e.strikethrough(e.dim(i))}
703
703
  ${e.gray(o)}`;
704
- default: return `${r$1}${e.cyan(o)} ${this.value ? `${e.green(k)} ${n}` : `${e.dim(P)} ${e.dim(n)}`} ${e.dim("/")} ${this.value ? `${e.dim(P)} ${e.dim(s)}` : `${e.green(k)} ${s}`}
704
+ default: return `${r$1}${e.cyan(o)} ${this.value ? `${e.green(k)} ${n}` : `${e.dim(P$2)} ${e.dim(n)}`} ${e.dim("/")} ${this.value ? `${e.dim(P$2)} ${e.dim(s)}` : `${e.green(k)} ${s}`}
705
705
  ${e.cyan(d)}
706
706
  `;
707
707
  }
@@ -714,7 +714,7 @@ ${e.cyan(d)}
714
714
  case "selected": return `${e.dim(i)}`;
715
715
  case "active": return `${e.green(k)} ${i} ${s.hint ? e.dim(`(${s.hint})`) : ""}`;
716
716
  case "cancelled": return `${e.strikethrough(e.dim(i))}`;
717
- default: return `${e.dim(P)} ${e.dim(i)}`;
717
+ default: return `${e.dim(P$2)} ${e.dim(i)}`;
718
718
  }
719
719
  };
720
720
  return new jD({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuetify/cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Vuetify CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  "author": "Andrey Yolkin <andreyyolkin@gmail.com>",
11
11
  "license": "MIT",
12
12
  "devDependencies": {
13
+ "@clack/prompts": "^1.0.0-alpha.8",
13
14
  "citty": "^0.1.6",
14
15
  "giget": "^2.0.0",
15
16
  "kolorist": "^1.8.0",
@@ -17,7 +18,7 @@
17
18
  "open": "^11.0.0",
18
19
  "pathe": "^2.0.3",
19
20
  "tsdown": "^0.16.6",
20
- "@vuetify/cli-shared": "0.0.4"
21
+ "@vuetify/cli-shared": "0.0.6"
21
22
  },
22
23
  "main": "./dist/index.mjs",
23
24
  "module": "./dist/index.mjs",
@@ -1,9 +1,7 @@
1
- import { projectArgs, type ProjectArgs } from '@vuetify/cli-shared'
1
+ import { createVuetify, projectArgs } from '@vuetify/cli-shared'
2
2
  import { i18n } from '@vuetify/cli-shared/i18n'
3
3
  import { defineCommand } from 'citty'
4
- import { relative, resolve } from 'pathe'
5
-
6
- const cwd = process.cwd()
4
+ import { version } from '../../package.json'
7
5
 
8
6
  export const init = defineCommand({
9
7
  meta: {
@@ -12,18 +10,44 @@ export const init = defineCommand({
12
10
  },
13
11
  args: {
14
12
  ...projectArgs(),
15
- v0: {
13
+ cwd: {
14
+ type: 'string',
15
+ description: 'The current working directory',
16
+ },
17
+ features: {
18
+ type: 'string',
19
+ description: 'The features to install (router, pinia, eslint)',
20
+ },
21
+ typescript: {
16
22
  type: 'boolean',
17
- description: i18n.t('commands.init.v0.description'),
23
+ description: 'Use TypeScript',
24
+ default: true,
25
+ },
26
+ packageManager: {
27
+ type: 'string',
28
+ description: 'The package manager to use (npm, pnpm, yarn, bun)',
29
+ },
30
+ debug: {
31
+ type: 'boolean',
32
+ description: 'Show debug logs',
33
+ default: false,
34
+ },
35
+ type: {
36
+ type: 'string',
37
+ description: 'The Vuetify version to use (vuetify, vuetify0)',
38
+ default: 'vuetify',
39
+ },
40
+ platform: {
41
+ type: 'string',
42
+ description: 'The framework to use (vue, nuxt)',
43
+ default: 'vue',
18
44
  },
19
45
  },
20
- run: ({ args }: { args: ProjectArgs }) => {
21
- const dir = args.dir
22
- const relativeDir = relative(cwd, resolve(cwd, dir))
23
- console.log(i18n.t('commands.init.creating_project', { dir: relativeDir }))
24
-
25
- // TODO: Implement Vuetify project template download
26
- console.log('Vuetify project initialization will be implemented here')
46
+ run: async ({ args }) => {
47
+ await createVuetify({
48
+ ...args,
49
+ version,
50
+ })
27
51
  },
28
52
  })
29
53
 
@@ -1,40 +1,5 @@
1
- import { i18n } from '@vuetify/cli-shared/i18n'
2
- import { defineCommand } from 'citty'
1
+ import { update as updateCommand } from '@vuetify/cli-shared/commands'
3
2
 
4
- const packages = ['vuetify', '@vuetify/v0', '@vuetify/paper', 'vuetify-nuxt-module']
5
-
6
- export const update = defineCommand({
7
- meta: {
8
- name: 'update',
9
- description: i18n.t('commands.update.description'),
10
- },
11
- args: {
12
- nightly: {
13
- type: 'boolean',
14
- description: i18n.t('commands.update.nightly.description'),
15
- },
16
- packages: {
17
- type: 'string',
18
- description: i18n.t('commands.update.packages.description'),
19
- default: packages.join(','),
20
- },
21
- },
22
- run: ({ args }: { args: { nightly: boolean, packages: string } }) => {
23
- console.log(i18n.t('commands.update.stub'))
24
- const nightly = Boolean(args.nightly)
25
- const list = (args.packages)
26
- .split(',')
27
- .map(s => s.trim())
28
- .filter(Boolean)
29
-
30
- console.log(i18n.t('commands.update.nightly_status', { status: i18n.t(nightly ? 'common.enabled' : 'common.disabled') }))
31
- if (list.length > 0) {
32
- console.log(i18n.t('commands.update.packages_to_update', { pkgs: list.join(', ') }))
33
- } else {
34
- console.log(i18n.t('commands.update.no_packages_specified'))
35
- }
36
- // TODO: Implement actual package update logic with optional nightly builds
37
- },
38
- })
3
+ export const update = updateCommand
39
4
 
40
5
  export default update
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { createBanner } from '@vuetify/cli-shared'
1
2
  import { add } from '@vuetify/cli-shared/commands'
2
3
  import { i18n } from '@vuetify/cli-shared/i18n'
3
4
 
@@ -23,4 +24,5 @@ export const main = defineCommand({
23
24
  },
24
25
  })
25
26
 
27
+ console.log(createBanner())
26
28
  runMain(main)