@vuetify/cli 0.0.3 → 0.0.5
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.js → index.mjs} +12693 -11497
- package/dist/{multipart-parser-BAp5_xBC.js → multipart-parser-CbtVsPSq.mjs} +1 -1
- package/dist/{node-DaMsCoIv.js → node-CcjDTqtN.mjs} +11 -7
- package/dist/{prompt-Bvac38n6.js → prompt-BIVRMyOv.mjs} +59 -59
- package/package.json +10 -8
- package/src/commands/init.ts +17 -10
- package/src/commands/update.ts +2 -37
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as __require, n as require_node_fetch_native_DhEqb06g, r as __commonJS, t as require_node } from "./node-
|
|
2
|
+
import { i as __require, n as require_node_fetch_native_DhEqb06g, r as __commonJS, t as require_node } from "./node-CcjDTqtN.mjs";
|
|
3
3
|
|
|
4
4
|
//#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs
|
|
5
5
|
var require_multipart_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs": ((exports) => {
|
|
@@ -12,12 +12,16 @@ var __commonJS = (cb, mod) => function() {
|
|
|
12
12
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
13
|
};
|
|
14
14
|
var __copyProps = (to, from, except, desc) => {
|
|
15
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (var keys = __getOwnPropNames(from), i$1 = 0, n = keys.length, key; i$1 < n; i$1++) {
|
|
17
|
+
key = keys[i$1];
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
19
|
+
__defProp(to, key, {
|
|
20
|
+
get: ((k) => from[k]).bind(null, key),
|
|
21
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
21
25
|
}
|
|
22
26
|
return to;
|
|
23
27
|
};
|
|
@@ -2957,7 +2961,7 @@ Content-Type: ${R.type || "application/octet-stream"}\r
|
|
|
2957
2961
|
for (const [R, w] of b) g.append(R, w);
|
|
2958
2962
|
return g;
|
|
2959
2963
|
}
|
|
2960
|
-
const { toFormData: d } = await import("./multipart-parser-
|
|
2964
|
+
const { toFormData: d } = await import("./multipart-parser-CbtVsPSq.mjs").then(__toDynamicImportESM(1));
|
|
2961
2965
|
return d(this.body, l$1);
|
|
2962
2966
|
}
|
|
2963
2967
|
async blob() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
2
|
+
import g$1, { stdin, stdout } from "node:process";
|
|
3
|
+
import c from "node:readline";
|
|
3
4
|
import { WriteStream } from "node:tty";
|
|
4
|
-
import f from "node:readline";
|
|
5
5
|
|
|
6
6
|
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/chunks/prompt.mjs
|
|
7
7
|
function getDefaultExportFromCjs(x$1) {
|
|
@@ -86,50 +86,50 @@ function requirePicocolors() {
|
|
|
86
86
|
return result + string.substring(cursor);
|
|
87
87
|
};
|
|
88
88
|
let createColors = (enabled = isColorSupported) => {
|
|
89
|
-
let f
|
|
89
|
+
let f = enabled ? formatter : () => String;
|
|
90
90
|
return {
|
|
91
91
|
isColorSupported: enabled,
|
|
92
|
-
reset: f
|
|
93
|
-
bold: f
|
|
94
|
-
dim: f
|
|
95
|
-
italic: f
|
|
96
|
-
underline: f
|
|
97
|
-
inverse: f
|
|
98
|
-
hidden: f
|
|
99
|
-
strikethrough: f
|
|
100
|
-
black: f
|
|
101
|
-
red: f
|
|
102
|
-
green: f
|
|
103
|
-
yellow: f
|
|
104
|
-
blue: f
|
|
105
|
-
magenta: f
|
|
106
|
-
cyan: f
|
|
107
|
-
white: f
|
|
108
|
-
gray: f
|
|
109
|
-
bgBlack: f
|
|
110
|
-
bgRed: f
|
|
111
|
-
bgGreen: f
|
|
112
|
-
bgYellow: f
|
|
113
|
-
bgBlue: f
|
|
114
|
-
bgMagenta: f
|
|
115
|
-
bgCyan: f
|
|
116
|
-
bgWhite: f
|
|
117
|
-
blackBright: f
|
|
118
|
-
redBright: f
|
|
119
|
-
greenBright: f
|
|
120
|
-
yellowBright: f
|
|
121
|
-
blueBright: f
|
|
122
|
-
magentaBright: f
|
|
123
|
-
cyanBright: f
|
|
124
|
-
whiteBright: f
|
|
125
|
-
bgBlackBright: f
|
|
126
|
-
bgRedBright: f
|
|
127
|
-
bgGreenBright: f
|
|
128
|
-
bgYellowBright: f
|
|
129
|
-
bgBlueBright: f
|
|
130
|
-
bgMagentaBright: f
|
|
131
|
-
bgCyanBright: f
|
|
132
|
-
bgWhiteBright: f
|
|
92
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
93
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
94
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
95
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
96
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
97
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
98
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
99
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
100
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
101
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
102
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
103
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
104
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
105
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
106
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
107
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
108
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
109
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
110
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
111
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
112
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
113
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
114
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
115
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
116
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
117
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
118
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
119
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
120
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
121
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
122
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
123
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
124
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
125
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
126
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
127
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
128
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
129
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
130
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
131
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
132
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
133
133
|
};
|
|
134
134
|
};
|
|
135
135
|
picocolors.exports = createColors();
|
|
@@ -400,7 +400,7 @@ function G(t, u$1, F$1) {
|
|
|
400
400
|
`).map((e$1) => oD(e$1, u$1, F$1)).join(`
|
|
401
401
|
`);
|
|
402
402
|
}
|
|
403
|
-
const c = {
|
|
403
|
+
const c$1 = {
|
|
404
404
|
actions: new Set([
|
|
405
405
|
"up",
|
|
406
406
|
"down",
|
|
@@ -420,7 +420,7 @@ const c = {
|
|
|
420
420
|
])
|
|
421
421
|
};
|
|
422
422
|
function k$1(t, u$1) {
|
|
423
|
-
if (typeof t == "string") return c.aliases.get(t) === u$1;
|
|
423
|
+
if (typeof t == "string") return c$1.aliases.get(t) === u$1;
|
|
424
424
|
for (const F$1 of t) if (F$1 !== void 0 && k$1(F$1, u$1)) return true;
|
|
425
425
|
return false;
|
|
426
426
|
}
|
|
@@ -447,7 +447,7 @@ var AD = Object.defineProperty, pD = (t, u$1, F$1) => u$1 in t ? AD(t, u$1, {
|
|
|
447
447
|
var x = class {
|
|
448
448
|
constructor(u$1, F$1 = true) {
|
|
449
449
|
h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
|
|
450
|
-
const { input: e$1 = stdin, output: s = stdout, render: i, signal: D
|
|
450
|
+
const { input: e$1 = stdin, output: s = stdout, render: i, signal: D, ...C$1 } = u$1;
|
|
451
451
|
this.opts = C$1, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i.bind(this), this._track = F$1, this._abortSignal = D, this.input = e$1, this.output = s;
|
|
452
452
|
}
|
|
453
453
|
unsubscribe() {
|
|
@@ -482,13 +482,13 @@ var x = class {
|
|
|
482
482
|
const e$1 = new WriteStream(0);
|
|
483
483
|
e$1._write = (s, i, D) => {
|
|
484
484
|
this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D();
|
|
485
|
-
}, this.input.pipe(e$1), this.rl =
|
|
485
|
+
}, this.input.pipe(e$1), this.rl = c.createInterface({
|
|
486
486
|
input: this.input,
|
|
487
487
|
output: e$1,
|
|
488
488
|
tabSize: 2,
|
|
489
489
|
prompt: "",
|
|
490
490
|
escapeCodeTimeout: 50
|
|
491
|
-
}),
|
|
491
|
+
}), c.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), d$1(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
492
492
|
this.output.write(srcExports.cursor.show), this.output.off("resize", this.render), d$1(this.input, false), u$1(this.value);
|
|
493
493
|
}), this.once("cancel", () => {
|
|
494
494
|
this.output.write(srcExports.cursor.show), this.output.off("resize", this.render), d$1(this.input, false), u$1(S);
|
|
@@ -496,7 +496,7 @@ var x = class {
|
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
498
|
onKeypress(u$1, F$1) {
|
|
499
|
-
if (this.state === "error" && (this.state = "active"), F$1?.name && (!this._track && c.aliases.has(F$1.name) && this.emit("cursor", c.aliases.get(F$1.name)), c.actions.has(F$1.name) && this.emit("cursor", F$1.name)), u$1 && (u$1.toLowerCase() === "y" || u$1.toLowerCase() === "n") && this.emit("confirm", u$1.toLowerCase() === "y"), u$1 === " " && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u$1 && this.emit("key", u$1.toLowerCase()), F$1?.name === "return") {
|
|
499
|
+
if (this.state === "error" && (this.state = "active"), F$1?.name && (!this._track && c$1.aliases.has(F$1.name) && this.emit("cursor", c$1.aliases.get(F$1.name)), c$1.actions.has(F$1.name) && this.emit("cursor", F$1.name)), u$1 && (u$1.toLowerCase() === "y" || u$1.toLowerCase() === "n") && this.emit("confirm", u$1.toLowerCase() === "y"), u$1 === " " && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u$1 && this.emit("key", u$1.toLowerCase()), F$1?.name === "return") {
|
|
500
500
|
if (this.opts.validate) {
|
|
501
501
|
const e$1 = this.opts.validate(this.value);
|
|
502
502
|
e$1 && (this.error = e$1 instanceof Error ? e$1.message : e$1, this.state = "error", this.rl?.write(this.value));
|
|
@@ -646,7 +646,7 @@ var PD = class extends x {
|
|
|
646
646
|
}
|
|
647
647
|
};
|
|
648
648
|
function ce() {
|
|
649
|
-
return
|
|
649
|
+
return g$1.platform !== "win32" ? g$1.env.TERM !== "linux" : !!g$1.env.CI || !!g$1.env.WT_SESSION || !!g$1.env.TERMINUS_SUBLIME || g$1.env.ConEmuTask === "{cmd::Cmder}" || g$1.env.TERM_PROGRAM === "Terminus-Sublime" || g$1.env.TERM_PROGRAM === "vscode" || g$1.env.TERM === "xterm-256color" || g$1.env.TERM === "alacritty" || g$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
650
650
|
}
|
|
651
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) => {
|
|
652
652
|
switch (t) {
|
|
@@ -657,11 +657,11 @@ const V = ce(), u = (t, n) => V ? t : n, le = u("❯", ">"), L = u("■", "x"),
|
|
|
657
657
|
case "submit": return e.green(C);
|
|
658
658
|
}
|
|
659
659
|
}, B = (t) => {
|
|
660
|
-
const { cursor: n, options: s, style: r$1 } = t, i = t.maxItems ?? Number.POSITIVE_INFINITY, a = Math.max(process.stdout.rows - 4, 0), c$
|
|
660
|
+
const { cursor: n, options: s, style: r$1 } = t, i = t.maxItems ?? Number.POSITIVE_INFINITY, a = Math.max(process.stdout.rows - 4, 0), c$2 = Math.min(a, Math.max(i, 5));
|
|
661
661
|
let l = 0;
|
|
662
|
-
n >= l + c$
|
|
663
|
-
const $ = c$
|
|
664
|
-
return s.slice(l, l + c$
|
|
662
|
+
n >= l + c$2 - 3 ? l = Math.max(Math.min(n - c$2 + 3, s.length - c$2), 0) : n < l + 2 && (l = Math.max(n - 2, 0));
|
|
663
|
+
const $ = c$2 < s.length && l > 0, p = c$2 < s.length && l + c$2 < s.length;
|
|
664
|
+
return s.slice(l, l + c$2).map((M, v$1, x$1) => {
|
|
665
665
|
const j = v$1 === 0 && $, E = v$1 === x$1.length - 1 && p;
|
|
666
666
|
return j || E ? e.dim("...") : r$1(M, v$1 + l === n);
|
|
667
667
|
});
|
|
@@ -758,8 +758,8 @@ ${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e
|
|
|
758
758
|
const s = `${e.gray(o)}
|
|
759
759
|
${w(this.state)} ${t.message}
|
|
760
760
|
`, r$1 = (i, a) => {
|
|
761
|
-
const c$
|
|
762
|
-
return a && c$
|
|
761
|
+
const c$2 = this.value.includes(i.value);
|
|
762
|
+
return a && c$2 ? n(i, "active-selected") : c$2 ? n(i, "selected") : n(i, a ? "active" : "inactive");
|
|
763
763
|
};
|
|
764
764
|
switch (this.state) {
|
|
765
765
|
case "submit": return `${s}${e.gray(o)} ${this.options.filter(({ value: i }) => this.value.includes(i)).map((i) => n(i, "submitted")).join(e.dim(", ")) || e.dim("none")}`;
|
|
@@ -770,7 +770,7 @@ ${e.gray(o)}` : ""}`;
|
|
|
770
770
|
}
|
|
771
771
|
case "error": {
|
|
772
772
|
const i = this.error.split(`
|
|
773
|
-
`).map((a, c$
|
|
773
|
+
`).map((a, c$2) => c$2 === 0 ? `${e.yellow(d)} ${e.yellow(a)}` : ` ${a}`).join(`
|
|
774
774
|
`);
|
|
775
775
|
return `${s + e.yellow(o)} ${B({
|
|
776
776
|
options: this.options,
|
|
@@ -845,4 +845,4 @@ async function prompt(message, opts = {}) {
|
|
|
845
845
|
}
|
|
846
846
|
|
|
847
847
|
//#endregion
|
|
848
|
-
export {
|
|
848
|
+
export { prompt };
|
package/package.json
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuetify/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Vuetify CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"vuetify": "./dist/index.
|
|
7
|
+
"vuetify": "./dist/index.mjs"
|
|
8
8
|
},
|
|
9
9
|
"keywords": [],
|
|
10
10
|
"author": "Andrey Yolkin <andreyyolkin@gmail.com>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"devDependencies": {
|
|
13
|
+
"@clack/prompts": "^1.0.0-alpha.6",
|
|
13
14
|
"citty": "^0.1.6",
|
|
14
15
|
"giget": "^2.0.0",
|
|
15
16
|
"kolorist": "^1.8.0",
|
|
16
17
|
"nypm": "^0.6.2",
|
|
17
|
-
"open": "^
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"open": "^11.0.0",
|
|
19
|
+
"pathe": "^2.0.3",
|
|
20
|
+
"tsdown": "^0.16.6",
|
|
21
|
+
"@vuetify/cli-shared": "0.0.5"
|
|
20
22
|
},
|
|
21
|
-
"main": "./dist/index.
|
|
22
|
-
"module": "./dist/index.
|
|
23
|
+
"main": "./dist/index.mjs",
|
|
24
|
+
"module": "./dist/index.mjs",
|
|
23
25
|
"exports": {
|
|
24
|
-
".": "./dist/index.
|
|
26
|
+
".": "./dist/index.mjs",
|
|
25
27
|
"./package.json": "./package.json"
|
|
26
28
|
},
|
|
27
29
|
"scripts": {
|
package/src/commands/init.ts
CHANGED
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { projectArgs, type ProjectArgs } from '@vuetify/cli-shared'
|
|
1
|
+
import { initVuetify, initVuetify0, projectArgs, type ProjectArgs } from '@vuetify/cli-shared'
|
|
3
2
|
import { i18n } from '@vuetify/cli-shared/i18n'
|
|
4
3
|
import { defineCommand } from 'citty'
|
|
5
4
|
|
|
6
5
|
const cwd = process.cwd()
|
|
7
6
|
|
|
7
|
+
const VUETIFY_0_APP_DEFAULT_NAME = 'vuetify0-app'
|
|
8
|
+
const VUETIFY_APP_DEFAULT_NAME = 'vuetify-app'
|
|
9
|
+
|
|
8
10
|
export const init = defineCommand({
|
|
9
11
|
meta: {
|
|
10
12
|
name: 'init',
|
|
11
13
|
description: i18n.t('commands.init.description'),
|
|
12
14
|
},
|
|
13
15
|
args: {
|
|
14
|
-
...projectArgs(
|
|
16
|
+
...projectArgs(),
|
|
15
17
|
v0: {
|
|
16
18
|
type: 'boolean',
|
|
17
19
|
description: i18n.t('commands.init.v0.description'),
|
|
18
20
|
},
|
|
19
21
|
},
|
|
20
|
-
run: ({ args }: { args: ProjectArgs }) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
run: async ({ args }: { args: ProjectArgs & { v0?: boolean } }) => {
|
|
23
|
+
await (args.v0
|
|
24
|
+
? initVuetify0({
|
|
25
|
+
cwd,
|
|
26
|
+
...args,
|
|
27
|
+
defaultName: VUETIFY_0_APP_DEFAULT_NAME,
|
|
28
|
+
})
|
|
29
|
+
: initVuetify({
|
|
30
|
+
cwd,
|
|
31
|
+
...args,
|
|
32
|
+
defaultName: VUETIFY_APP_DEFAULT_NAME,
|
|
33
|
+
}))
|
|
27
34
|
},
|
|
28
35
|
})
|
|
29
36
|
|
package/src/commands/update.ts
CHANGED
|
@@ -1,40 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineCommand } from 'citty'
|
|
1
|
+
import { update as updateCommand } from '@vuetify/cli-shared/commands'
|
|
3
2
|
|
|
4
|
-
const
|
|
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
|