create-vue 3.18.2 → 3.18.4
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/LICENSE +0 -29
- package/README.md +1 -1
- package/bundle.js +276 -608
- package/package.json +8 -9
- package/template/base/package.json +4 -4
- package/template/config/cypress/package.json +2 -2
- package/template/config/cypress-ct/package.json +2 -2
- package/template/config/jsx/package.json +3 -3
- package/template/config/nightwatch/package.json +5 -5
- package/template/config/nightwatch-ct/package.json +1 -1
- package/template/config/pinia/package.json +2 -2
- package/template/config/playwright/package.json +1 -1
- package/template/config/router/package.json +2 -2
- package/template/config/typescript/package.json +3 -3
- package/template/config/vitest/package.json +3 -3
- package/template/formatting/oxfmt/.vscode/settings.json +14 -0
- package/template/formatting/oxfmt/_oxfmtrc.jsonc +5 -0
- package/template/formatting/oxfmt/_prettierrc.json +7 -0
- package/template/formatting/oxfmt/package.json +13 -0
- package/template/formatting/prettier/.vscode/extensions.json +3 -0
- package/template/formatting/prettier/.vscode/settings.json +4 -0
- package/template/formatting/prettier/package.json +8 -0
- package/template/linting/base/_editorconfig +8 -0
- package/template/linting/base/package.json +9 -0
- package/template/linting/core/js/eslint.config.js.data.mjs +15 -0
- package/template/linting/core/js/eslint.config.js.ejs +27 -0
- package/template/linting/core/js/package.json +8 -0
- package/template/linting/core/ts/eslint.config.js.data.mjs +15 -0
- package/template/linting/core/ts/eslint.config.js.ejs +24 -0
- package/template/linting/core/ts/package.json +9 -0
- package/template/linting/cypress/eslint.config.js.data.mjs +19 -0
- package/template/linting/cypress/package.json +5 -0
- package/template/linting/cypress-ct/eslint.config.js.data.mjs +25 -0
- package/template/linting/oxlint/.vscode/extensions.json +3 -0
- package/template/linting/oxlint/_ oxlintrc.json +10 -0
- package/template/linting/oxlint/eslint.config.js.data.mjs +12 -0
- package/template/linting/oxlint/package.json +12 -0
- package/template/linting/playwright/eslint.config.js.data.mjs +16 -0
- package/template/linting/playwright/package.json +5 -0
- package/template/linting/prettier/eslint.config.js.data.mjs +12 -0
- package/template/linting/prettier/package.json +6 -0
- package/template/linting/vitest/eslint.config.js.data.mjs +16 -0
- package/template/linting/vitest/package.json +5 -0
- package/template/tsconfig/base/package.json +1 -1
- package/template/tsconfig/base/tsconfig.node.json +1 -1
- package/template/tsconfig/nightwatch/nightwatch/tsconfig.json +1 -1
- package/template/tsconfig/playwright/e2e/tsconfig.json +1 -1
- package/template/config/prettier/.vscode/extensions.json +0 -3
- package/template/config/prettier/.vscode/settings.json +0 -4
- package/template/config/prettier/package.json +0 -8
- package/template/eslint/package.json +0 -7
- /package/template/{config/oxlint → formatting/oxfmt}/.vscode/extensions.json +0 -0
- /package/template/{config → formatting}/prettier/_prettierrc.json +0 -0
- /package/template/{config/eslint → linting/base}/.vscode/extensions.json +0 -0
- /package/template/{config/eslint → linting/base}/.vscode/settings.json +0 -0
- /package/template/{config/prettier → linting/base}/_gitattributes +0 -0
package/bundle.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! create-vue v3.18.
|
|
2
|
+
/*! create-vue v3.18.4 | MIT */
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
|
-
import * as path from "node:path";
|
|
5
|
+
import * as path$1 from "node:path";
|
|
6
6
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
7
7
|
import { parseArgs, stripVTControlCharacters } from "node:util";
|
|
8
8
|
import y, { stdin, stdout } from "node:process";
|
|
9
9
|
import * as g from "node:readline";
|
|
10
10
|
import O from "node:readline";
|
|
11
11
|
import { Writable } from "node:stream";
|
|
12
|
-
import * as path
|
|
12
|
+
import * as path from "path";
|
|
13
13
|
|
|
14
14
|
//#region rolldown:runtime
|
|
15
15
|
var __create = Object.create;
|
|
@@ -18,16 +18,18 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
18
18
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
19
19
|
var __getProtoOf = Object.getPrototypeOf;
|
|
20
20
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
21
|
-
var
|
|
22
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
23
|
-
};
|
|
21
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
24
22
|
var __copyProps = (to, from, except, desc) => {
|
|
25
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
24
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
25
|
+
key = keys[i];
|
|
26
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
27
|
+
__defProp(to, key, {
|
|
28
|
+
get: ((k$2) => from[k$2]).bind(null, key),
|
|
29
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
31
33
|
}
|
|
32
34
|
return to;
|
|
33
35
|
};
|
|
@@ -39,7 +41,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
39
41
|
|
|
40
42
|
//#endregion
|
|
41
43
|
//#region node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
42
|
-
var require_src = /* @__PURE__ */
|
|
44
|
+
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
43
45
|
const ESC = "\x1B";
|
|
44
46
|
const CSI = `${ESC}[`;
|
|
45
47
|
const beep = "\x07";
|
|
@@ -92,25 +94,25 @@ var require_src = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/sisteransi@1.
|
|
|
92
94
|
erase,
|
|
93
95
|
beep
|
|
94
96
|
};
|
|
95
|
-
})
|
|
97
|
+
}));
|
|
96
98
|
|
|
97
99
|
//#endregion
|
|
98
100
|
//#region node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
99
|
-
var require_picocolors = /* @__PURE__ */
|
|
100
|
-
let p
|
|
101
|
-
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p
|
|
101
|
+
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
102
|
+
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
103
|
+
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
102
104
|
let formatter = (open, close, replace = open) => (input) => {
|
|
103
105
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
104
106
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
105
107
|
};
|
|
106
108
|
let replaceClose = (string, close, replace, index) => {
|
|
107
|
-
let result = "", cursor
|
|
109
|
+
let result = "", cursor = 0;
|
|
108
110
|
do {
|
|
109
|
-
result += string.substring(cursor
|
|
110
|
-
cursor
|
|
111
|
-
index = string.indexOf(close, cursor
|
|
111
|
+
result += string.substring(cursor, index) + replace;
|
|
112
|
+
cursor = index + close.length;
|
|
113
|
+
index = string.indexOf(close, cursor);
|
|
112
114
|
} while (~index);
|
|
113
|
-
return result + string.substring(cursor
|
|
115
|
+
return result + string.substring(cursor);
|
|
114
116
|
};
|
|
115
117
|
let createColors = (enabled = isColorSupported) => {
|
|
116
118
|
let f = enabled ? formatter : () => String;
|
|
@@ -161,12 +163,12 @@ var require_picocolors = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/picoco
|
|
|
161
163
|
};
|
|
162
164
|
module.exports = createColors();
|
|
163
165
|
module.exports.createColors = createColors;
|
|
164
|
-
})
|
|
166
|
+
}));
|
|
165
167
|
|
|
166
168
|
//#endregion
|
|
167
169
|
//#region node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
|
|
168
|
-
var import_src
|
|
169
|
-
var import_picocolors
|
|
170
|
+
var import_src = require_src();
|
|
171
|
+
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
170
172
|
function DD({ onlyFirst: e$1 = !1 } = {}) {
|
|
171
173
|
const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
172
174
|
return new RegExp(t, e$1 ? void 0 : "g");
|
|
@@ -484,7 +486,7 @@ function fD({ input: e$1 = stdin, output: u$1 = stdout, overwrite: t = !0, hideC
|
|
|
484
486
|
C$1,
|
|
485
487
|
n
|
|
486
488
|
], "cancel")) {
|
|
487
|
-
F$1 && u$1.write(import_src
|
|
489
|
+
F$1 && u$1.write(import_src.cursor.show), process.exit(0);
|
|
488
490
|
return;
|
|
489
491
|
}
|
|
490
492
|
if (!t) return;
|
|
@@ -495,8 +497,8 @@ function fD({ input: e$1 = stdin, output: u$1 = stdout, overwrite: t = !0, hideC
|
|
|
495
497
|
});
|
|
496
498
|
});
|
|
497
499
|
};
|
|
498
|
-
return F$1 && u$1.write(import_src
|
|
499
|
-
e$1.off("keypress", i), F$1 && u$1.write(import_src
|
|
500
|
+
return F$1 && u$1.write(import_src.cursor.hide), e$1.once("keypress", i), () => {
|
|
501
|
+
e$1.off("keypress", i), F$1 && u$1.write(import_src.cursor.show), e$1.isTTY && !AD && e$1.setRawMode(!1), s.terminal = !1, s.close();
|
|
500
502
|
};
|
|
501
503
|
}
|
|
502
504
|
var gD = Object.defineProperty, vD = (e$1, u$1, t) => u$1 in e$1 ? gD(e$1, u$1, {
|
|
@@ -508,7 +510,7 @@ var gD = Object.defineProperty, vD = (e$1, u$1, t) => u$1 in e$1 ? gD(e$1, u$1,
|
|
|
508
510
|
var x$1 = class {
|
|
509
511
|
constructor(u$1, t = !0) {
|
|
510
512
|
h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", !1), h(this, "_prevFrame", ""), h(this, "_subscribers", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
|
|
511
|
-
const { input: F$1 = stdin, output: s = stdout, render: i, signal: D$1
|
|
513
|
+
const { input: F$1 = stdin, output: s = stdout, render: i, signal: D$1, ...C$1 } = u$1;
|
|
512
514
|
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 = t, this._abortSignal = D$1, this.input = F$1, this.output = s;
|
|
513
515
|
}
|
|
514
516
|
unsubscribe() {
|
|
@@ -551,9 +553,9 @@ var x$1 = class {
|
|
|
551
553
|
escapeCodeTimeout: 50,
|
|
552
554
|
terminal: !0
|
|
553
555
|
}), O.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), m(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
554
|
-
this.output.write(import_src
|
|
556
|
+
this.output.write(import_src.cursor.show), this.output.off("resize", this.render), m(this.input, !1), u$1(this.value);
|
|
555
557
|
}), this.once("cancel", () => {
|
|
556
|
-
this.output.write(import_src
|
|
558
|
+
this.output.write(import_src.cursor.show), this.output.off("resize", this.render), m(this.input, !1), u$1(S);
|
|
557
559
|
});
|
|
558
560
|
});
|
|
559
561
|
}
|
|
@@ -578,32 +580,32 @@ var x$1 = class {
|
|
|
578
580
|
restoreCursor() {
|
|
579
581
|
const u$1 = Y$1(this._prevFrame, process.stdout.columns, { hard: !0 }).split(`
|
|
580
582
|
`).length - 1;
|
|
581
|
-
this.output.write(import_src
|
|
583
|
+
this.output.write(import_src.cursor.move(-999, u$1 * -1));
|
|
582
584
|
}
|
|
583
585
|
render() {
|
|
584
586
|
const u$1 = Y$1(this._render(this) ?? "", process.stdout.columns, { hard: !0 });
|
|
585
587
|
if (u$1 !== this._prevFrame) {
|
|
586
|
-
if (this.state === "initial") this.output.write(import_src
|
|
588
|
+
if (this.state === "initial") this.output.write(import_src.cursor.hide);
|
|
587
589
|
else {
|
|
588
590
|
const t = BD(this._prevFrame, u$1);
|
|
589
591
|
if (this.restoreCursor(), t && t?.length === 1) {
|
|
590
592
|
const F$1 = t[0];
|
|
591
|
-
this.output.write(import_src
|
|
593
|
+
this.output.write(import_src.cursor.move(0, F$1)), this.output.write(import_src.erase.lines(1));
|
|
592
594
|
const s = u$1.split(`
|
|
593
595
|
`);
|
|
594
|
-
this.output.write(s[F$1]), this._prevFrame = u$1, this.output.write(import_src
|
|
596
|
+
this.output.write(s[F$1]), this._prevFrame = u$1, this.output.write(import_src.cursor.move(0, s.length - F$1 - 1));
|
|
595
597
|
return;
|
|
596
598
|
}
|
|
597
599
|
if (t && t?.length > 1) {
|
|
598
600
|
const F$1 = t[0];
|
|
599
|
-
this.output.write(import_src
|
|
601
|
+
this.output.write(import_src.cursor.move(0, F$1)), this.output.write(import_src.erase.down());
|
|
600
602
|
const s = u$1.split(`
|
|
601
603
|
`).slice(F$1);
|
|
602
604
|
this.output.write(s.join(`
|
|
603
605
|
`)), this._prevFrame = u$1;
|
|
604
606
|
return;
|
|
605
607
|
}
|
|
606
|
-
this.output.write(import_src
|
|
608
|
+
this.output.write(import_src.erase.down());
|
|
607
609
|
}
|
|
608
610
|
this.output.write(u$1), this.state === "initial" && (this.state = "active"), this._prevFrame = u$1;
|
|
609
611
|
}
|
|
@@ -620,7 +622,7 @@ var dD = class extends x$1 {
|
|
|
620
622
|
super(u$1, !1), this.value = !!u$1.initialValue, this.on("value", () => {
|
|
621
623
|
this.value = this._value;
|
|
622
624
|
}), this.on("confirm", (t) => {
|
|
623
|
-
this.output.write(import_src
|
|
625
|
+
this.output.write(import_src.cursor.move(0, -1)), this.value = t, this.state = "submit", this.close();
|
|
624
626
|
}), this.on("cursor", () => {
|
|
625
627
|
this.value = !this.value;
|
|
626
628
|
});
|
|
@@ -728,14 +730,14 @@ var TD = Object.defineProperty, jD = (e$1, u$1, t) => u$1 in e$1 ? TD(e$1, u$1,
|
|
|
728
730
|
value: t
|
|
729
731
|
}) : e$1[u$1] = t, U$1 = (e$1, u$1, t) => (jD(e$1, typeof u$1 != "symbol" ? u$1 + "" : u$1, t), t);
|
|
730
732
|
var MD = class extends x$1 {
|
|
731
|
-
constructor({ mask: u$1
|
|
733
|
+
constructor({ mask: u$1, ...t }) {
|
|
732
734
|
super(t), U$1(this, "valueWithCursor", ""), U$1(this, "_mask", "•"), this._mask = u$1 ?? "•", this.on("finalize", () => {
|
|
733
735
|
this.valueWithCursor = this.masked;
|
|
734
736
|
}), this.on("value", () => {
|
|
735
|
-
if (this.cursor >= this.value.length) this.valueWithCursor = `${this.masked}${import_picocolors
|
|
737
|
+
if (this.cursor >= this.value.length) this.valueWithCursor = `${this.masked}${import_picocolors.default.inverse(import_picocolors.default.hidden("_"))}`;
|
|
736
738
|
else {
|
|
737
739
|
const F$1 = this.masked.slice(0, this.cursor), s = this.masked.slice(this.cursor);
|
|
738
|
-
this.valueWithCursor = `${F$1}${import_picocolors
|
|
740
|
+
this.valueWithCursor = `${F$1}${import_picocolors.default.inverse(s[0])}${s.slice(1)}`;
|
|
739
741
|
}
|
|
740
742
|
});
|
|
741
743
|
}
|
|
@@ -797,7 +799,7 @@ var RD = class extends x$1 {
|
|
|
797
799
|
if (this.state === "submit") return this.value;
|
|
798
800
|
if (this.cursor >= this.value.length) return `${this.value}\u2588`;
|
|
799
801
|
const u$1 = this.value.slice(0, this.cursor), [t, ...F$1] = this.value.slice(this.cursor);
|
|
800
|
-
return `${u$1}${import_picocolors
|
|
802
|
+
return `${u$1}${import_picocolors.default.inverse(t)}${F$1.join("")}`;
|
|
801
803
|
}
|
|
802
804
|
get cursor() {
|
|
803
805
|
return this._cursor;
|
|
@@ -811,27 +813,25 @@ var RD = class extends x$1 {
|
|
|
811
813
|
|
|
812
814
|
//#endregion
|
|
813
815
|
//#region node_modules/.pnpm/@clack+prompts@0.11.0/node_modules/@clack/prompts/dist/index.mjs
|
|
814
|
-
var import_picocolors$1 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
815
|
-
var import_src = /* @__PURE__ */ __toESM(require_src(), 1);
|
|
816
816
|
function ce() {
|
|
817
817
|
return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
818
818
|
}
|
|
819
819
|
const V = ce(), u = (t, n) => V ? t : n, le = u("◆", "*"), L = u("■", "x"), W = u("▲", "x"), C = u("◇", "o"), ue = u("┌", "T"), o = u("│", "|"), d = u("└", "—"), k = u("●", ">"), P = u("○", " "), A = u("◻", "[•]"), T = u("◼", "[+]"), F = u("◻", "[ ]"), $e = u("▪", "•"), _ = u("─", "-"), me = u("╮", "+"), de = u("├", "+"), pe = u("╯", "+"), q = u("●", "•"), D = u("◆", "*"), U = u("▲", "!"), K = u("■", "x"), b = (t) => {
|
|
820
820
|
switch (t) {
|
|
821
821
|
case "initial":
|
|
822
|
-
case "active": return import_picocolors
|
|
823
|
-
case "cancel": return import_picocolors
|
|
824
|
-
case "error": return import_picocolors
|
|
825
|
-
case "submit": return import_picocolors
|
|
822
|
+
case "active": return import_picocolors.default.cyan(le);
|
|
823
|
+
case "cancel": return import_picocolors.default.red(L);
|
|
824
|
+
case "error": return import_picocolors.default.yellow(W);
|
|
825
|
+
case "submit": return import_picocolors.default.green(C);
|
|
826
826
|
}
|
|
827
827
|
}, G = (t) => {
|
|
828
828
|
const { cursor: n, options: r$1, style: i } = t, s = t.maxItems ?? Number.POSITIVE_INFINITY, c = Math.max(process.stdout.rows - 4, 0), a = Math.min(c, Math.max(s, 5));
|
|
829
829
|
let l$1 = 0;
|
|
830
830
|
n >= l$1 + a - 3 ? l$1 = Math.max(Math.min(n - a + 3, r$1.length - a), 0) : n < l$1 + 2 && (l$1 = Math.max(n - 2, 0));
|
|
831
831
|
const $$1 = a < r$1.length && l$1 > 0, g$1 = a < r$1.length && l$1 + a < r$1.length;
|
|
832
|
-
return r$1.slice(l$1, l$1 + a).map((p$
|
|
832
|
+
return r$1.slice(l$1, l$1 + a).map((p$1, v$1, f) => {
|
|
833
833
|
const j = v$1 === 0 && $$1, E = v$1 === f.length - 1 && g$1;
|
|
834
|
-
return j || E ? import_picocolors
|
|
834
|
+
return j || E ? import_picocolors.default.dim("...") : i(p$1, v$1 + l$1 === n);
|
|
835
835
|
});
|
|
836
836
|
}, he = (t) => new RD({
|
|
837
837
|
validate: t.validate,
|
|
@@ -839,19 +839,19 @@ const V = ce(), u = (t, n) => V ? t : n, le = u("◆", "*"), L = u("■", "x"),
|
|
|
839
839
|
defaultValue: t.defaultValue,
|
|
840
840
|
initialValue: t.initialValue,
|
|
841
841
|
render() {
|
|
842
|
-
const n = `${import_picocolors
|
|
842
|
+
const n = `${import_picocolors.default.gray(o)}
|
|
843
843
|
${b(this.state)} ${t.message}
|
|
844
|
-
`, r$1 = t.placeholder ? import_picocolors
|
|
844
|
+
`, r$1 = t.placeholder ? import_picocolors.default.inverse(t.placeholder[0]) + import_picocolors.default.dim(t.placeholder.slice(1)) : import_picocolors.default.inverse(import_picocolors.default.hidden("_")), i = this.value ? this.valueWithCursor : r$1;
|
|
845
845
|
switch (this.state) {
|
|
846
846
|
case "error": return `${n.trim()}
|
|
847
|
-
${import_picocolors
|
|
848
|
-
${import_picocolors
|
|
847
|
+
${import_picocolors.default.yellow(o)} ${i}
|
|
848
|
+
${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(this.error)}
|
|
849
849
|
`;
|
|
850
|
-
case "submit": return `${n}${import_picocolors
|
|
851
|
-
case "cancel": return `${n}${import_picocolors
|
|
852
|
-
${import_picocolors
|
|
853
|
-
default: return `${n}${import_picocolors
|
|
854
|
-
${import_picocolors
|
|
850
|
+
case "submit": return `${n}${import_picocolors.default.gray(o)} ${import_picocolors.default.dim(this.value || t.placeholder)}`;
|
|
851
|
+
case "cancel": return `${n}${import_picocolors.default.gray(o)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(this.value ?? ""))}${this.value?.trim() ? `
|
|
852
|
+
${import_picocolors.default.gray(o)}` : ""}`;
|
|
853
|
+
default: return `${n}${import_picocolors.default.cyan(o)} ${i}
|
|
854
|
+
${import_picocolors.default.cyan(d)}
|
|
855
855
|
`;
|
|
856
856
|
}
|
|
857
857
|
}
|
|
@@ -859,19 +859,19 @@ ${import_picocolors$1.default.cyan(d)}
|
|
|
859
859
|
validate: t.validate,
|
|
860
860
|
mask: t.mask ?? $e,
|
|
861
861
|
render() {
|
|
862
|
-
const n = `${import_picocolors
|
|
862
|
+
const n = `${import_picocolors.default.gray(o)}
|
|
863
863
|
${b(this.state)} ${t.message}
|
|
864
864
|
`, r$1 = this.valueWithCursor, i = this.masked;
|
|
865
865
|
switch (this.state) {
|
|
866
866
|
case "error": return `${n.trim()}
|
|
867
|
-
${import_picocolors
|
|
868
|
-
${import_picocolors
|
|
867
|
+
${import_picocolors.default.yellow(o)} ${i}
|
|
868
|
+
${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(this.error)}
|
|
869
869
|
`;
|
|
870
|
-
case "submit": return `${n}${import_picocolors
|
|
871
|
-
case "cancel": return `${n}${import_picocolors
|
|
872
|
-
${import_picocolors
|
|
873
|
-
default: return `${n}${import_picocolors
|
|
874
|
-
${import_picocolors
|
|
870
|
+
case "submit": return `${n}${import_picocolors.default.gray(o)} ${import_picocolors.default.dim(i)}`;
|
|
871
|
+
case "cancel": return `${n}${import_picocolors.default.gray(o)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(i ?? ""))}${i ? `
|
|
872
|
+
${import_picocolors.default.gray(o)}` : ""}`;
|
|
873
|
+
default: return `${n}${import_picocolors.default.cyan(o)} ${r$1}
|
|
874
|
+
${import_picocolors.default.cyan(d)}
|
|
875
875
|
`;
|
|
876
876
|
}
|
|
877
877
|
}
|
|
@@ -882,15 +882,15 @@ ${import_picocolors$1.default.cyan(d)}
|
|
|
882
882
|
inactive: r$1,
|
|
883
883
|
initialValue: t.initialValue ?? !0,
|
|
884
884
|
render() {
|
|
885
|
-
const i = `${import_picocolors
|
|
885
|
+
const i = `${import_picocolors.default.gray(o)}
|
|
886
886
|
${b(this.state)} ${t.message}
|
|
887
887
|
`, s = this.value ? n : r$1;
|
|
888
888
|
switch (this.state) {
|
|
889
|
-
case "submit": return `${i}${import_picocolors
|
|
890
|
-
case "cancel": return `${i}${import_picocolors
|
|
891
|
-
${import_picocolors
|
|
892
|
-
default: return `${i}${import_picocolors
|
|
893
|
-
${import_picocolors
|
|
889
|
+
case "submit": return `${i}${import_picocolors.default.gray(o)} ${import_picocolors.default.dim(s)}`;
|
|
890
|
+
case "cancel": return `${i}${import_picocolors.default.gray(o)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(s))}
|
|
891
|
+
${import_picocolors.default.gray(o)}`;
|
|
892
|
+
default: return `${i}${import_picocolors.default.cyan(o)} ${this.value ? `${import_picocolors.default.green(k)} ${n}` : `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(n)}`} ${import_picocolors.default.dim("/")} ${this.value ? `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(r$1)}` : `${import_picocolors.default.green(k)} ${r$1}`}
|
|
893
|
+
${import_picocolors.default.cyan(d)}
|
|
894
894
|
`;
|
|
895
895
|
}
|
|
896
896
|
}
|
|
@@ -899,31 +899,31 @@ ${import_picocolors$1.default.cyan(d)}
|
|
|
899
899
|
const n = (r$1, i) => {
|
|
900
900
|
const s = r$1.label ?? String(r$1.value);
|
|
901
901
|
switch (i) {
|
|
902
|
-
case "selected": return `${import_picocolors
|
|
903
|
-
case "active": return `${import_picocolors
|
|
904
|
-
case "cancelled": return `${import_picocolors
|
|
905
|
-
default: return `${import_picocolors
|
|
902
|
+
case "selected": return `${import_picocolors.default.dim(s)}`;
|
|
903
|
+
case "active": return `${import_picocolors.default.green(k)} ${s} ${r$1.hint ? import_picocolors.default.dim(`(${r$1.hint})`) : ""}`;
|
|
904
|
+
case "cancelled": return `${import_picocolors.default.strikethrough(import_picocolors.default.dim(s))}`;
|
|
905
|
+
default: return `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(s)}`;
|
|
906
906
|
}
|
|
907
907
|
};
|
|
908
908
|
return new LD({
|
|
909
909
|
options: t.options,
|
|
910
910
|
initialValue: t.initialValue,
|
|
911
911
|
render() {
|
|
912
|
-
const r$1 = `${import_picocolors
|
|
912
|
+
const r$1 = `${import_picocolors.default.gray(o)}
|
|
913
913
|
${b(this.state)} ${t.message}
|
|
914
914
|
`;
|
|
915
915
|
switch (this.state) {
|
|
916
|
-
case "submit": return `${r$1}${import_picocolors
|
|
917
|
-
case "cancel": return `${r$1}${import_picocolors
|
|
918
|
-
${import_picocolors
|
|
919
|
-
default: return `${r$1}${import_picocolors
|
|
916
|
+
case "submit": return `${r$1}${import_picocolors.default.gray(o)} ${n(this.options[this.cursor], "selected")}`;
|
|
917
|
+
case "cancel": return `${r$1}${import_picocolors.default.gray(o)} ${n(this.options[this.cursor], "cancelled")}
|
|
918
|
+
${import_picocolors.default.gray(o)}`;
|
|
919
|
+
default: return `${r$1}${import_picocolors.default.cyan(o)} ${G({
|
|
920
920
|
cursor: this.cursor,
|
|
921
921
|
options: this.options,
|
|
922
922
|
maxItems: t.maxItems,
|
|
923
923
|
style: (i, s) => n(i, s ? "active" : "inactive")
|
|
924
924
|
}).join(`
|
|
925
|
-
${import_picocolors
|
|
926
|
-
${import_picocolors
|
|
925
|
+
${import_picocolors.default.cyan(o)} `)}
|
|
926
|
+
${import_picocolors.default.cyan(d)}
|
|
927
927
|
`;
|
|
928
928
|
}
|
|
929
929
|
}
|
|
@@ -931,22 +931,22 @@ ${import_picocolors$1.default.cyan(d)}
|
|
|
931
931
|
}, we = (t) => {
|
|
932
932
|
const n = (r$1, i = "inactive") => {
|
|
933
933
|
const s = r$1.label ?? String(r$1.value);
|
|
934
|
-
return i === "selected" ? `${import_picocolors
|
|
934
|
+
return i === "selected" ? `${import_picocolors.default.dim(s)}` : i === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(s))}` : i === "active" ? `${import_picocolors.default.bgCyan(import_picocolors.default.gray(` ${r$1.value} `))} ${s} ${r$1.hint ? import_picocolors.default.dim(`(${r$1.hint})`) : ""}` : `${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(` ${r$1.value} `)))} ${s} ${r$1.hint ? import_picocolors.default.dim(`(${r$1.hint})`) : ""}`;
|
|
935
935
|
};
|
|
936
936
|
return new ID({
|
|
937
937
|
options: t.options,
|
|
938
938
|
initialValue: t.initialValue,
|
|
939
939
|
render() {
|
|
940
|
-
const r$1 = `${import_picocolors
|
|
940
|
+
const r$1 = `${import_picocolors.default.gray(o)}
|
|
941
941
|
${b(this.state)} ${t.message}
|
|
942
942
|
`;
|
|
943
943
|
switch (this.state) {
|
|
944
|
-
case "submit": return `${r$1}${import_picocolors
|
|
945
|
-
case "cancel": return `${r$1}${import_picocolors
|
|
946
|
-
${import_picocolors
|
|
947
|
-
default: return `${r$1}${import_picocolors
|
|
948
|
-
${import_picocolors
|
|
949
|
-
${import_picocolors
|
|
944
|
+
case "submit": return `${r$1}${import_picocolors.default.gray(o)} ${n(this.options.find((i) => i.value === this.value) ?? t.options[0], "selected")}`;
|
|
945
|
+
case "cancel": return `${r$1}${import_picocolors.default.gray(o)} ${n(this.options[0], "cancelled")}
|
|
946
|
+
${import_picocolors.default.gray(o)}`;
|
|
947
|
+
default: return `${r$1}${import_picocolors.default.cyan(o)} ${this.options.map((i, s) => n(i, s === this.cursor ? "active" : "inactive")).join(`
|
|
948
|
+
${import_picocolors.default.cyan(o)} `)}
|
|
949
|
+
${import_picocolors.default.cyan(d)}
|
|
950
950
|
`;
|
|
951
951
|
}
|
|
952
952
|
}
|
|
@@ -954,7 +954,7 @@ ${import_picocolors$1.default.cyan(d)}
|
|
|
954
954
|
}, fe = (t) => {
|
|
955
955
|
const n = (r$1, i) => {
|
|
956
956
|
const s = r$1.label ?? String(r$1.value);
|
|
957
|
-
return i === "active" ? `${import_picocolors
|
|
957
|
+
return i === "active" ? `${import_picocolors.default.cyan(A)} ${s} ${r$1.hint ? import_picocolors.default.dim(`(${r$1.hint})`) : ""}` : i === "selected" ? `${import_picocolors.default.green(T)} ${import_picocolors.default.dim(s)} ${r$1.hint ? import_picocolors.default.dim(`(${r$1.hint})`) : ""}` : i === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(s))}` : i === "active-selected" ? `${import_picocolors.default.green(T)} ${s} ${r$1.hint ? import_picocolors.default.dim(`(${r$1.hint})`) : ""}` : i === "submitted" ? `${import_picocolors.default.dim(s)}` : `${import_picocolors.default.dim(F)} ${import_picocolors.default.dim(s)}`;
|
|
958
958
|
};
|
|
959
959
|
return new SD({
|
|
960
960
|
options: t.options,
|
|
@@ -963,63 +963,63 @@ ${import_picocolors$1.default.cyan(d)}
|
|
|
963
963
|
cursorAt: t.cursorAt,
|
|
964
964
|
validate(r$1) {
|
|
965
965
|
if (this.required && r$1.length === 0) return `Please select at least one option.
|
|
966
|
-
${import_picocolors
|
|
966
|
+
${import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`))}`;
|
|
967
967
|
},
|
|
968
968
|
render() {
|
|
969
|
-
const r$1 = `${import_picocolors
|
|
969
|
+
const r$1 = `${import_picocolors.default.gray(o)}
|
|
970
970
|
${b(this.state)} ${t.message}
|
|
971
971
|
`, i = (s, c) => {
|
|
972
972
|
const a = this.value.includes(s.value);
|
|
973
973
|
return c && a ? n(s, "active-selected") : a ? n(s, "selected") : n(s, c ? "active" : "inactive");
|
|
974
974
|
};
|
|
975
975
|
switch (this.state) {
|
|
976
|
-
case "submit": return `${r$1}${import_picocolors
|
|
976
|
+
case "submit": return `${r$1}${import_picocolors.default.gray(o)} ${this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => n(s, "submitted")).join(import_picocolors.default.dim(", ")) || import_picocolors.default.dim("none")}`;
|
|
977
977
|
case "cancel": {
|
|
978
|
-
const s = this.options.filter(({ value: c }) => this.value.includes(c)).map((c) => n(c, "cancelled")).join(import_picocolors
|
|
979
|
-
return `${r$1}${import_picocolors
|
|
980
|
-
${import_picocolors
|
|
978
|
+
const s = this.options.filter(({ value: c }) => this.value.includes(c)).map((c) => n(c, "cancelled")).join(import_picocolors.default.dim(", "));
|
|
979
|
+
return `${r$1}${import_picocolors.default.gray(o)} ${s.trim() ? `${s}
|
|
980
|
+
${import_picocolors.default.gray(o)}` : ""}`;
|
|
981
981
|
}
|
|
982
982
|
case "error": {
|
|
983
983
|
const s = this.error.split(`
|
|
984
|
-
`).map((c, a) => a === 0 ? `${import_picocolors
|
|
984
|
+
`).map((c, a) => a === 0 ? `${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(c)}` : ` ${c}`).join(`
|
|
985
985
|
`);
|
|
986
|
-
return `${r$1 + import_picocolors
|
|
986
|
+
return `${r$1 + import_picocolors.default.yellow(o)} ${G({
|
|
987
987
|
options: this.options,
|
|
988
988
|
cursor: this.cursor,
|
|
989
989
|
maxItems: t.maxItems,
|
|
990
990
|
style: i
|
|
991
991
|
}).join(`
|
|
992
|
-
${import_picocolors
|
|
992
|
+
${import_picocolors.default.yellow(o)} `)}
|
|
993
993
|
${s}
|
|
994
994
|
`;
|
|
995
995
|
}
|
|
996
|
-
default: return `${r$1}${import_picocolors
|
|
996
|
+
default: return `${r$1}${import_picocolors.default.cyan(o)} ${G({
|
|
997
997
|
options: this.options,
|
|
998
998
|
cursor: this.cursor,
|
|
999
999
|
maxItems: t.maxItems,
|
|
1000
1000
|
style: i
|
|
1001
1001
|
}).join(`
|
|
1002
|
-
${import_picocolors
|
|
1003
|
-
${import_picocolors
|
|
1002
|
+
${import_picocolors.default.cyan(o)} `)}
|
|
1003
|
+
${import_picocolors.default.cyan(d)}
|
|
1004
1004
|
`;
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
}).prompt();
|
|
1008
1008
|
}, be = (t) => {
|
|
1009
1009
|
const { selectableGroups: n = !0 } = t, r$1 = (i, s, c = []) => {
|
|
1010
|
-
const a = i.label ?? String(i.value), l$1 = typeof i.group == "string", $$1 = l$1 && (c[c.indexOf(i) + 1] ?? { group: !0 }), g$1 = l$1 && $$1.group === !0, p$
|
|
1011
|
-
if (s === "active") return `${import_picocolors
|
|
1012
|
-
if (s === "group-active") return `${p$
|
|
1013
|
-
if (s === "group-active-selected") return `${p$
|
|
1010
|
+
const a = i.label ?? String(i.value), l$1 = typeof i.group == "string", $$1 = l$1 && (c[c.indexOf(i) + 1] ?? { group: !0 }), g$1 = l$1 && $$1.group === !0, p$1 = l$1 ? n ? `${g$1 ? d : o} ` : " " : "";
|
|
1011
|
+
if (s === "active") return `${import_picocolors.default.dim(p$1)}${import_picocolors.default.cyan(A)} ${a} ${i.hint ? import_picocolors.default.dim(`(${i.hint})`) : ""}`;
|
|
1012
|
+
if (s === "group-active") return `${p$1}${import_picocolors.default.cyan(A)} ${import_picocolors.default.dim(a)}`;
|
|
1013
|
+
if (s === "group-active-selected") return `${p$1}${import_picocolors.default.green(T)} ${import_picocolors.default.dim(a)}`;
|
|
1014
1014
|
if (s === "selected") {
|
|
1015
|
-
const f = l$1 || n ? import_picocolors
|
|
1016
|
-
return `${import_picocolors
|
|
1015
|
+
const f = l$1 || n ? import_picocolors.default.green(T) : "";
|
|
1016
|
+
return `${import_picocolors.default.dim(p$1)}${f} ${import_picocolors.default.dim(a)} ${i.hint ? import_picocolors.default.dim(`(${i.hint})`) : ""}`;
|
|
1017
1017
|
}
|
|
1018
|
-
if (s === "cancelled") return `${import_picocolors
|
|
1019
|
-
if (s === "active-selected") return `${import_picocolors
|
|
1020
|
-
if (s === "submitted") return `${import_picocolors
|
|
1021
|
-
const v$1 = l$1 || n ? import_picocolors
|
|
1022
|
-
return `${import_picocolors
|
|
1018
|
+
if (s === "cancelled") return `${import_picocolors.default.strikethrough(import_picocolors.default.dim(a))}`;
|
|
1019
|
+
if (s === "active-selected") return `${import_picocolors.default.dim(p$1)}${import_picocolors.default.green(T)} ${a} ${i.hint ? import_picocolors.default.dim(`(${i.hint})`) : ""}`;
|
|
1020
|
+
if (s === "submitted") return `${import_picocolors.default.dim(a)}`;
|
|
1021
|
+
const v$1 = l$1 || n ? import_picocolors.default.dim(F) : "";
|
|
1022
|
+
return `${import_picocolors.default.dim(p$1)}${v$1} ${import_picocolors.default.dim(a)}`;
|
|
1023
1023
|
};
|
|
1024
1024
|
return new _D({
|
|
1025
1025
|
options: t.options,
|
|
@@ -1029,37 +1029,37 @@ ${import_picocolors$1.default.cyan(d)}
|
|
|
1029
1029
|
selectableGroups: n,
|
|
1030
1030
|
validate(i) {
|
|
1031
1031
|
if (this.required && i.length === 0) return `Please select at least one option.
|
|
1032
|
-
${import_picocolors
|
|
1032
|
+
${import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`))}`;
|
|
1033
1033
|
},
|
|
1034
1034
|
render() {
|
|
1035
|
-
const i = `${import_picocolors
|
|
1035
|
+
const i = `${import_picocolors.default.gray(o)}
|
|
1036
1036
|
${b(this.state)} ${t.message}
|
|
1037
1037
|
`;
|
|
1038
1038
|
switch (this.state) {
|
|
1039
|
-
case "submit": return `${i}${import_picocolors
|
|
1039
|
+
case "submit": return `${i}${import_picocolors.default.gray(o)} ${this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => r$1(s, "submitted")).join(import_picocolors.default.dim(", "))}`;
|
|
1040
1040
|
case "cancel": {
|
|
1041
|
-
const s = this.options.filter(({ value: c }) => this.value.includes(c)).map((c) => r$1(c, "cancelled")).join(import_picocolors
|
|
1042
|
-
return `${i}${import_picocolors
|
|
1043
|
-
${import_picocolors
|
|
1041
|
+
const s = this.options.filter(({ value: c }) => this.value.includes(c)).map((c) => r$1(c, "cancelled")).join(import_picocolors.default.dim(", "));
|
|
1042
|
+
return `${i}${import_picocolors.default.gray(o)} ${s.trim() ? `${s}
|
|
1043
|
+
${import_picocolors.default.gray(o)}` : ""}`;
|
|
1044
1044
|
}
|
|
1045
1045
|
case "error": {
|
|
1046
1046
|
const s = this.error.split(`
|
|
1047
|
-
`).map((c, a) => a === 0 ? `${import_picocolors
|
|
1047
|
+
`).map((c, a) => a === 0 ? `${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(c)}` : ` ${c}`).join(`
|
|
1048
1048
|
`);
|
|
1049
|
-
return `${i}${import_picocolors
|
|
1049
|
+
return `${i}${import_picocolors.default.yellow(o)} ${this.options.map((c, a, l$1) => {
|
|
1050
1050
|
const $$1 = this.value.includes(c.value) || c.group === !0 && this.isGroupSelected(`${c.value}`), g$1 = a === this.cursor;
|
|
1051
1051
|
return !g$1 && typeof c.group == "string" && this.options[this.cursor].value === c.group ? r$1(c, $$1 ? "group-active-selected" : "group-active", l$1) : g$1 && $$1 ? r$1(c, "active-selected", l$1) : $$1 ? r$1(c, "selected", l$1) : r$1(c, g$1 ? "active" : "inactive", l$1);
|
|
1052
1052
|
}).join(`
|
|
1053
|
-
${import_picocolors
|
|
1053
|
+
${import_picocolors.default.yellow(o)} `)}
|
|
1054
1054
|
${s}
|
|
1055
1055
|
`;
|
|
1056
1056
|
}
|
|
1057
|
-
default: return `${i}${import_picocolors
|
|
1057
|
+
default: return `${i}${import_picocolors.default.cyan(o)} ${this.options.map((s, c, a) => {
|
|
1058
1058
|
const l$1 = this.value.includes(s.value) || s.group === !0 && this.isGroupSelected(`${s.value}`), $$1 = c === this.cursor;
|
|
1059
1059
|
return !$$1 && typeof s.group == "string" && this.options[this.cursor].value === s.group ? r$1(s, l$1 ? "group-active-selected" : "group-active", a) : $$1 && l$1 ? r$1(s, "active-selected", a) : l$1 ? r$1(s, "selected", a) : r$1(s, $$1 ? "active" : "inactive", a);
|
|
1060
1060
|
}).join(`
|
|
1061
|
-
${import_picocolors
|
|
1062
|
-
${import_picocolors
|
|
1061
|
+
${import_picocolors.default.cyan(o)} `)}
|
|
1062
|
+
${import_picocolors.default.cyan(d)}
|
|
1063
1063
|
`;
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
@@ -1071,58 +1071,58 @@ ${t}
|
|
|
1071
1071
|
`), i = stripVTControlCharacters(n).length, s = Math.max(r$1.reduce((a, l$1) => {
|
|
1072
1072
|
const $$1 = stripVTControlCharacters(l$1);
|
|
1073
1073
|
return $$1.length > a ? $$1.length : a;
|
|
1074
|
-
}, 0), i) + 2, c = r$1.map((a) => `${import_picocolors
|
|
1074
|
+
}, 0), i) + 2, c = r$1.map((a) => `${import_picocolors.default.gray(o)} ${import_picocolors.default.dim(a)}${" ".repeat(s - stripVTControlCharacters(a).length)}${import_picocolors.default.gray(o)}`).join(`
|
|
1075
1075
|
`);
|
|
1076
|
-
process.stdout.write(`${import_picocolors
|
|
1077
|
-
${import_picocolors
|
|
1076
|
+
process.stdout.write(`${import_picocolors.default.gray(o)}
|
|
1077
|
+
${import_picocolors.default.green(C)} ${import_picocolors.default.reset(n)} ${import_picocolors.default.gray(_.repeat(Math.max(s - i - 1, 1)) + me)}
|
|
1078
1078
|
${c}
|
|
1079
|
-
${import_picocolors
|
|
1079
|
+
${import_picocolors.default.gray(de + _.repeat(s + 2) + pe)}
|
|
1080
1080
|
`);
|
|
1081
1081
|
}, xe = (t = "") => {
|
|
1082
|
-
process.stdout.write(`${import_picocolors
|
|
1082
|
+
process.stdout.write(`${import_picocolors.default.gray(d)} ${import_picocolors.default.red(t)}
|
|
1083
1083
|
|
|
1084
1084
|
`);
|
|
1085
1085
|
}, Ie = (t = "") => {
|
|
1086
|
-
process.stdout.write(`${import_picocolors
|
|
1086
|
+
process.stdout.write(`${import_picocolors.default.gray(ue)} ${t}
|
|
1087
1087
|
`);
|
|
1088
1088
|
}, Se = (t = "") => {
|
|
1089
|
-
process.stdout.write(`${import_picocolors
|
|
1090
|
-
${import_picocolors
|
|
1089
|
+
process.stdout.write(`${import_picocolors.default.gray(o)}
|
|
1090
|
+
${import_picocolors.default.gray(d)} ${t}
|
|
1091
1091
|
|
|
1092
1092
|
`);
|
|
1093
1093
|
}, M = {
|
|
1094
|
-
message: (t = "", { symbol: n = import_picocolors
|
|
1095
|
-
const r$1 = [`${import_picocolors
|
|
1094
|
+
message: (t = "", { symbol: n = import_picocolors.default.gray(o) } = {}) => {
|
|
1095
|
+
const r$1 = [`${import_picocolors.default.gray(o)}`];
|
|
1096
1096
|
if (t) {
|
|
1097
1097
|
const [i, ...s] = t.split(`
|
|
1098
1098
|
`);
|
|
1099
|
-
r$1.push(`${n} ${i}`, ...s.map((c) => `${import_picocolors
|
|
1099
|
+
r$1.push(`${n} ${i}`, ...s.map((c) => `${import_picocolors.default.gray(o)} ${c}`));
|
|
1100
1100
|
}
|
|
1101
1101
|
process.stdout.write(`${r$1.join(`
|
|
1102
1102
|
`)}
|
|
1103
1103
|
`);
|
|
1104
1104
|
},
|
|
1105
1105
|
info: (t) => {
|
|
1106
|
-
M.message(t, { symbol: import_picocolors
|
|
1106
|
+
M.message(t, { symbol: import_picocolors.default.blue(q) });
|
|
1107
1107
|
},
|
|
1108
1108
|
success: (t) => {
|
|
1109
|
-
M.message(t, { symbol: import_picocolors
|
|
1109
|
+
M.message(t, { symbol: import_picocolors.default.green(D) });
|
|
1110
1110
|
},
|
|
1111
1111
|
step: (t) => {
|
|
1112
|
-
M.message(t, { symbol: import_picocolors
|
|
1112
|
+
M.message(t, { symbol: import_picocolors.default.green(C) });
|
|
1113
1113
|
},
|
|
1114
1114
|
warn: (t) => {
|
|
1115
|
-
M.message(t, { symbol: import_picocolors
|
|
1115
|
+
M.message(t, { symbol: import_picocolors.default.yellow(U) });
|
|
1116
1116
|
},
|
|
1117
1117
|
warning: (t) => {
|
|
1118
1118
|
M.warn(t);
|
|
1119
1119
|
},
|
|
1120
1120
|
error: (t) => {
|
|
1121
|
-
M.message(t, { symbol: import_picocolors
|
|
1121
|
+
M.message(t, { symbol: import_picocolors.default.red(K) });
|
|
1122
1122
|
}
|
|
1123
|
-
}, J = `${import_picocolors
|
|
1124
|
-
message: async (t, { symbol: n = import_picocolors
|
|
1125
|
-
process.stdout.write(`${import_picocolors
|
|
1123
|
+
}, J = `${import_picocolors.default.gray(o)} `, x = {
|
|
1124
|
+
message: async (t, { symbol: n = import_picocolors.default.gray(o) } = {}) => {
|
|
1125
|
+
process.stdout.write(`${import_picocolors.default.gray(o)}
|
|
1126
1126
|
${n} `);
|
|
1127
1127
|
let r$1 = 3;
|
|
1128
1128
|
for await (let i of t) {
|
|
@@ -1137,12 +1137,12 @@ ${J}${i.trimStart()}`), r$1 = 3 + stripVTControlCharacters(i.trimStart()).length
|
|
|
1137
1137
|
process.stdout.write(`
|
|
1138
1138
|
`);
|
|
1139
1139
|
},
|
|
1140
|
-
info: (t) => x.message(t, { symbol: import_picocolors
|
|
1141
|
-
success: (t) => x.message(t, { symbol: import_picocolors
|
|
1142
|
-
step: (t) => x.message(t, { symbol: import_picocolors
|
|
1143
|
-
warn: (t) => x.message(t, { symbol: import_picocolors
|
|
1140
|
+
info: (t) => x.message(t, { symbol: import_picocolors.default.blue(q) }),
|
|
1141
|
+
success: (t) => x.message(t, { symbol: import_picocolors.default.green(D) }),
|
|
1142
|
+
step: (t) => x.message(t, { symbol: import_picocolors.default.green(C) }),
|
|
1143
|
+
warn: (t) => x.message(t, { symbol: import_picocolors.default.yellow(U) }),
|
|
1144
1144
|
warning: (t) => x.warn(t),
|
|
1145
|
-
error: (t) => x.message(t, { symbol: import_picocolors
|
|
1145
|
+
error: (t) => x.message(t, { symbol: import_picocolors.default.red(K) })
|
|
1146
1146
|
}, Y = ({ indicator: t = "dots" } = {}) => {
|
|
1147
1147
|
const n = V ? [
|
|
1148
1148
|
"◒",
|
|
@@ -1156,12 +1156,12 @@ ${J}${i.trimStart()}`), r$1 = 3 + stripVTControlCharacters(i.trimStart()).length
|
|
|
1156
1156
|
"0"
|
|
1157
1157
|
], r$1 = V ? 80 : 120, i = process.env.CI === "true";
|
|
1158
1158
|
let s, c, a = !1, l$1 = "", $$1, g$1 = performance.now();
|
|
1159
|
-
const p$
|
|
1159
|
+
const p$1 = (m$1) => {
|
|
1160
1160
|
a && N$1(m$1 > 1 ? "Something went wrong" : "Canceled", m$1);
|
|
1161
|
-
}, v$1 = () => p$
|
|
1162
|
-
process.on("uncaughtExceptionMonitor", v$1), process.on("unhandledRejection", v$1), process.on("SIGINT", f), process.on("SIGTERM", f), process.on("exit", p$
|
|
1161
|
+
}, v$1 = () => p$1(2), f = () => p$1(1), j = () => {
|
|
1162
|
+
process.on("uncaughtExceptionMonitor", v$1), process.on("unhandledRejection", v$1), process.on("SIGINT", f), process.on("SIGTERM", f), process.on("exit", p$1);
|
|
1163
1163
|
}, E = () => {
|
|
1164
|
-
process.removeListener("uncaughtExceptionMonitor", v$1), process.removeListener("unhandledRejection", v$1), process.removeListener("SIGINT", f), process.removeListener("SIGTERM", f), process.removeListener("exit", p$
|
|
1164
|
+
process.removeListener("uncaughtExceptionMonitor", v$1), process.removeListener("unhandledRejection", v$1), process.removeListener("SIGINT", f), process.removeListener("SIGTERM", f), process.removeListener("exit", p$1);
|
|
1165
1165
|
}, B$1 = () => {
|
|
1166
1166
|
if ($$1 === void 0) return;
|
|
1167
1167
|
i && process.stdout.write(`
|
|
@@ -1173,13 +1173,13 @@ ${J}${i.trimStart()}`), r$1 = 3 + stripVTControlCharacters(i.trimStart()).length
|
|
|
1173
1173
|
const h$1 = (performance.now() - m$1) / 1e3, w$1 = Math.floor(h$1 / 60), I$1 = Math.floor(h$1 % 60);
|
|
1174
1174
|
return w$1 > 0 ? `[${w$1}m ${I$1}s]` : `[${I$1}s]`;
|
|
1175
1175
|
}, H$1 = (m$1 = "") => {
|
|
1176
|
-
a = !0, s = fD(), l$1 = R$1(m$1), g$1 = performance.now(), process.stdout.write(`${import_picocolors
|
|
1176
|
+
a = !0, s = fD(), l$1 = R$1(m$1), g$1 = performance.now(), process.stdout.write(`${import_picocolors.default.gray(o)}
|
|
1177
1177
|
`);
|
|
1178
1178
|
let h$1 = 0, w$1 = 0;
|
|
1179
1179
|
j(), c = setInterval(() => {
|
|
1180
1180
|
if (i && l$1 === $$1) return;
|
|
1181
1181
|
B$1(), $$1 = l$1;
|
|
1182
|
-
const I$1 = import_picocolors
|
|
1182
|
+
const I$1 = import_picocolors.default.magenta(n[h$1]);
|
|
1183
1183
|
if (i) process.stdout.write(`${I$1} ${l$1}...`);
|
|
1184
1184
|
else if (t === "timer") process.stdout.write(`${I$1} ${l$1} ${O$1(g$1)}`);
|
|
1185
1185
|
else {
|
|
@@ -1190,7 +1190,7 @@ ${J}${i.trimStart()}`), r$1 = 3 + stripVTControlCharacters(i.trimStart()).length
|
|
|
1190
1190
|
}, r$1);
|
|
1191
1191
|
}, N$1 = (m$1 = "", h$1 = 0) => {
|
|
1192
1192
|
a = !1, clearInterval(c), B$1();
|
|
1193
|
-
const w$1 = h$1 === 0 ? import_picocolors
|
|
1193
|
+
const w$1 = h$1 === 0 ? import_picocolors.default.green(C) : h$1 === 1 ? import_picocolors.default.red(L) : import_picocolors.default.red(W);
|
|
1194
1194
|
l$1 = R$1(m$1 ?? l$1), t === "timer" ? process.stdout.write(`${w$1} ${l$1} ${O$1(g$1)}
|
|
1195
1195
|
`) : process.stdout.write(`${w$1} ${l$1}
|
|
1196
1196
|
`), E(), s();
|
|
@@ -1227,7 +1227,12 @@ ${J}${i.trimStart()}`), r$1 = 3 + stripVTControlCharacters(i.trimStart()).length
|
|
|
1227
1227
|
|
|
1228
1228
|
//#endregion
|
|
1229
1229
|
//#region node_modules/.pnpm/ejs@3.1.10/node_modules/ejs/lib/utils.js
|
|
1230
|
-
|
|
1230
|
+
/**
|
|
1231
|
+
* Private utility functions
|
|
1232
|
+
* @module utils
|
|
1233
|
+
* @private
|
|
1234
|
+
*/
|
|
1235
|
+
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1231
1236
|
var regExpChars = /[|\\{}()[\]^$+*?.]/g;
|
|
1232
1237
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1233
1238
|
var hasOwn = function(obj, key) {
|
|
@@ -1304,10 +1309,10 @@ var require_utils = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/ejs@3.1.10/
|
|
|
1304
1309
|
*/
|
|
1305
1310
|
exports.shallowCopy = function(to, from) {
|
|
1306
1311
|
from = from || {};
|
|
1307
|
-
if (to !== null && to !== void 0) for (var p$
|
|
1308
|
-
if (!hasOwn(from, p$
|
|
1309
|
-
if (p$
|
|
1310
|
-
to[p$
|
|
1312
|
+
if (to !== null && to !== void 0) for (var p$1 in from) {
|
|
1313
|
+
if (!hasOwn(from, p$1)) continue;
|
|
1314
|
+
if (p$1 === "__proto__" || p$1 === "constructor") continue;
|
|
1315
|
+
to[p$1] = from[p$1];
|
|
1311
1316
|
}
|
|
1312
1317
|
return to;
|
|
1313
1318
|
};
|
|
@@ -1327,11 +1332,11 @@ var require_utils = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/ejs@3.1.10/
|
|
|
1327
1332
|
list = list || [];
|
|
1328
1333
|
from = from || {};
|
|
1329
1334
|
if (to !== null && to !== void 0) for (var i = 0; i < list.length; i++) {
|
|
1330
|
-
var p$
|
|
1331
|
-
if (typeof from[p$
|
|
1332
|
-
if (!hasOwn(from, p$
|
|
1333
|
-
if (p$
|
|
1334
|
-
to[p$
|
|
1335
|
+
var p$1 = list[i];
|
|
1336
|
+
if (typeof from[p$1] != "undefined") {
|
|
1337
|
+
if (!hasOwn(from, p$1)) continue;
|
|
1338
|
+
if (p$1 === "__proto__" || p$1 === "constructor") continue;
|
|
1339
|
+
to[p$1] = from[p$1];
|
|
1335
1340
|
}
|
|
1336
1341
|
}
|
|
1337
1342
|
return to;
|
|
@@ -1383,20 +1388,23 @@ var require_utils = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/ejs@3.1.10/
|
|
|
1383
1388
|
if (typeof Object.create == "function") return function() {
|
|
1384
1389
|
return Object.create(null);
|
|
1385
1390
|
};
|
|
1391
|
+
if (!({ __proto__: null } instanceof Object)) return function() {
|
|
1392
|
+
return { __proto__: null };
|
|
1393
|
+
};
|
|
1386
1394
|
return function() {
|
|
1387
1395
|
return {};
|
|
1388
1396
|
};
|
|
1389
1397
|
})();
|
|
1390
1398
|
exports.hasOwnOnlyObject = function(obj) {
|
|
1391
1399
|
var o$1 = exports.createNullProtoObjWherePossible();
|
|
1392
|
-
for (var p$
|
|
1400
|
+
for (var p$1 in obj) if (hasOwn(obj, p$1)) o$1[p$1] = obj[p$1];
|
|
1393
1401
|
return o$1;
|
|
1394
1402
|
};
|
|
1395
|
-
})
|
|
1403
|
+
}));
|
|
1396
1404
|
|
|
1397
1405
|
//#endregion
|
|
1398
1406
|
//#region node_modules/.pnpm/ejs@3.1.10/node_modules/ejs/package.json
|
|
1399
|
-
var require_package = /* @__PURE__ */
|
|
1407
|
+
var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1400
1408
|
module.exports = {
|
|
1401
1409
|
"name": "ejs",
|
|
1402
1410
|
"description": "Embedded JavaScript templates",
|
|
@@ -1431,11 +1439,11 @@ var require_package = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/ejs@3.1.1
|
|
|
1431
1439
|
"engines": { "node": ">=0.10.0" },
|
|
1432
1440
|
"scripts": { "test": "npx jake test" }
|
|
1433
1441
|
};
|
|
1434
|
-
})
|
|
1442
|
+
}));
|
|
1435
1443
|
|
|
1436
1444
|
//#endregion
|
|
1437
1445
|
//#region node_modules/.pnpm/ejs@3.1.10/node_modules/ejs/lib/ejs.js
|
|
1438
|
-
var require_ejs = /* @__PURE__ */
|
|
1446
|
+
var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1439
1447
|
/**
|
|
1440
1448
|
* @file Embedded JavaScript templating engine. {@link http://ejs.co}
|
|
1441
1449
|
* @author Matthew Eernisse <mde@fleegix.org>
|
|
@@ -1529,12 +1537,12 @@ var require_ejs = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/ejs@3.1.10/no
|
|
|
1529
1537
|
* @param {Boolean} [isDir=false] whether the parent file path is a directory
|
|
1530
1538
|
* @return {String}
|
|
1531
1539
|
*/
|
|
1532
|
-
exports.resolveInclude = function(name$
|
|
1540
|
+
exports.resolveInclude = function(name$1, filename, isDir) {
|
|
1533
1541
|
var dirname = path$2.dirname;
|
|
1534
1542
|
var extname = path$2.extname;
|
|
1535
1543
|
var resolve = path$2.resolve;
|
|
1536
|
-
var includePath = resolve(isDir ? filename : dirname(filename), name$
|
|
1537
|
-
if (!extname(name$
|
|
1544
|
+
var includePath = resolve(isDir ? filename : dirname(filename), name$1);
|
|
1545
|
+
if (!extname(name$1)) includePath += ".ejs";
|
|
1538
1546
|
return includePath;
|
|
1539
1547
|
};
|
|
1540
1548
|
/**
|
|
@@ -1544,10 +1552,10 @@ var require_ejs = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/ejs@3.1.10/no
|
|
|
1544
1552
|
* @param {Array<String>} paths list of possible parent directory paths
|
|
1545
1553
|
* @return {String}
|
|
1546
1554
|
*/
|
|
1547
|
-
function resolvePaths(name$
|
|
1555
|
+
function resolvePaths(name$1, paths) {
|
|
1548
1556
|
var filePath;
|
|
1549
1557
|
if (paths.some(function(v$1) {
|
|
1550
|
-
filePath = exports.resolveInclude(name$
|
|
1558
|
+
filePath = exports.resolveInclude(name$1, v$1, true);
|
|
1551
1559
|
return fs$1.existsSync(filePath);
|
|
1552
1560
|
})) return filePath;
|
|
1553
1561
|
}
|
|
@@ -1873,10 +1881,10 @@ var require_ejs = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/ejs@3.1.10/no
|
|
|
1873
1881
|
if (opts.destructuredLocals && opts.destructuredLocals.length) {
|
|
1874
1882
|
var destructuring = " var __locals = (" + opts.localsName + " || {}),\n";
|
|
1875
1883
|
for (var i = 0; i < opts.destructuredLocals.length; i++) {
|
|
1876
|
-
var name$
|
|
1877
|
-
if (!_JS_IDENTIFIER.test(name$
|
|
1884
|
+
var name$1 = opts.destructuredLocals[i];
|
|
1885
|
+
if (!_JS_IDENTIFIER.test(name$1)) throw new Error("destructuredLocals[" + i + "] is not a valid JS identifier.");
|
|
1878
1886
|
if (i > 0) destructuring += ",\n ";
|
|
1879
|
-
destructuring += name$
|
|
1887
|
+
destructuring += name$1 + " = __locals." + name$1;
|
|
1880
1888
|
}
|
|
1881
1889
|
prepended += destructuring + ";\n";
|
|
1882
1890
|
}
|
|
@@ -2099,34 +2107,34 @@ var require_ejs = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/ejs@3.1.10/no
|
|
|
2099
2107
|
exports.name = _NAME;
|
|
2100
2108
|
/* istanbul ignore if */
|
|
2101
2109
|
if (typeof window != "undefined") window.ejs = exports;
|
|
2102
|
-
})
|
|
2110
|
+
}));
|
|
2103
2111
|
|
|
2104
2112
|
//#endregion
|
|
2105
2113
|
//#region utils/banners.ts
|
|
2106
|
-
var import_ejs
|
|
2114
|
+
var import_ejs = /* @__PURE__ */ __toESM(require_ejs(), 1);
|
|
2107
2115
|
const defaultBanner = "Vue.js - The Progressive JavaScript Framework";
|
|
2108
2116
|
const gradientBanner = "\x1B[38;2;66;211;146mV\x1B[39m\x1B[38;2;66;211;146mu\x1B[39m\x1B[38;2;66;211;146me\x1B[39m\x1B[38;2;66;211;146m.\x1B[39m\x1B[38;2;66;211;146mj\x1B[39m\x1B[38;2;67;209;149ms\x1B[39m \x1B[38;2;68;206;152m-\x1B[39m \x1B[38;2;69;204;155mT\x1B[39m\x1B[38;2;70;201;158mh\x1B[39m\x1B[38;2;71;199;162me\x1B[39m \x1B[38;2;72;196;165mP\x1B[39m\x1B[38;2;73;194;168mr\x1B[39m\x1B[38;2;74;192;171mo\x1B[39m\x1B[38;2;75;189;174mg\x1B[39m\x1B[38;2;76;187;177mr\x1B[39m\x1B[38;2;77;184;180me\x1B[39m\x1B[38;2;78;182;183ms\x1B[39m\x1B[38;2;79;179;186ms\x1B[39m\x1B[38;2;80;177;190mi\x1B[39m\x1B[38;2;81;175;193mv\x1B[39m\x1B[38;2;82;172;196me\x1B[39m \x1B[38;2;83;170;199mJ\x1B[39m\x1B[38;2;83;167;202ma\x1B[39m\x1B[38;2;84;165;205mv\x1B[39m\x1B[38;2;85;162;208ma\x1B[39m\x1B[38;2;86;160;211mS\x1B[39m\x1B[38;2;87;158;215mc\x1B[39m\x1B[38;2;88;155;218mr\x1B[39m\x1B[38;2;89;153;221mi\x1B[39m\x1B[38;2;90;150;224mp\x1B[39m\x1B[38;2;91;148;227mt\x1B[39m \x1B[38;2;92;145;230mF\x1B[39m\x1B[38;2;93;143;233mr\x1B[39m\x1B[38;2;94;141;236ma\x1B[39m\x1B[38;2;95;138;239mm\x1B[39m\x1B[38;2;96;136;243me\x1B[39m\x1B[38;2;97;133;246mw\x1B[39m\x1B[38;2;98;131;249mo\x1B[39m\x1B[38;2;99;128;252mr\x1B[39m\x1B[38;2;100;126;255mk\x1B[39m";
|
|
2109
2117
|
|
|
2110
2118
|
//#endregion
|
|
2111
2119
|
//#region utils/deepMerge.ts
|
|
2112
|
-
const isObject
|
|
2113
|
-
const mergeArrayWithDedupe
|
|
2120
|
+
const isObject = (val) => val && typeof val === "object";
|
|
2121
|
+
const mergeArrayWithDedupe = (a, b$2) => Array.from(new Set([...a, ...b$2]));
|
|
2114
2122
|
/**
|
|
2115
2123
|
* Recursively merge the content of the new object to the existing one
|
|
2116
2124
|
* @param {Object} target the existing object
|
|
2117
2125
|
* @param {Object} obj the new object
|
|
2118
2126
|
*/
|
|
2119
|
-
function deepMerge
|
|
2127
|
+
function deepMerge(target, obj) {
|
|
2120
2128
|
for (const key of Object.keys(obj)) {
|
|
2121
2129
|
const oldVal = target[key];
|
|
2122
2130
|
const newVal = obj[key];
|
|
2123
|
-
if (Array.isArray(oldVal) && Array.isArray(newVal)) target[key] = mergeArrayWithDedupe
|
|
2124
|
-
else if (isObject
|
|
2131
|
+
if (Array.isArray(oldVal) && Array.isArray(newVal)) target[key] = mergeArrayWithDedupe(oldVal, newVal);
|
|
2132
|
+
else if (isObject(oldVal) && isObject(newVal)) target[key] = deepMerge(oldVal, newVal);
|
|
2125
2133
|
else target[key] = newVal;
|
|
2126
2134
|
}
|
|
2127
2135
|
return target;
|
|
2128
2136
|
}
|
|
2129
|
-
var deepMerge_default = deepMerge
|
|
2137
|
+
var deepMerge_default = deepMerge;
|
|
2130
2138
|
|
|
2131
2139
|
//#endregion
|
|
2132
2140
|
//#region utils/sortDependencies.ts
|
|
@@ -2139,8 +2147,8 @@ function sortDependencies(packageJson) {
|
|
|
2139
2147
|
"optionalDependencies"
|
|
2140
2148
|
]) if (packageJson[depType]) {
|
|
2141
2149
|
sorted[depType] = {};
|
|
2142
|
-
Object.keys(packageJson[depType]).sort().forEach((name$
|
|
2143
|
-
sorted[depType][name$
|
|
2150
|
+
Object.keys(packageJson[depType]).sort().forEach((name$1) => {
|
|
2151
|
+
sorted[depType][name$1] = packageJson[depType][name$1];
|
|
2144
2152
|
});
|
|
2145
2153
|
}
|
|
2146
2154
|
return {
|
|
@@ -2162,12 +2170,12 @@ function sortDependencies(packageJson) {
|
|
|
2162
2170
|
*/
|
|
2163
2171
|
function renderTemplate(src, dest, callbacks) {
|
|
2164
2172
|
if (fs.statSync(src).isDirectory()) {
|
|
2165
|
-
if (path.basename(src) === "node_modules") return;
|
|
2173
|
+
if (path$1.basename(src) === "node_modules") return;
|
|
2166
2174
|
fs.mkdirSync(dest, { recursive: true });
|
|
2167
|
-
for (const file of fs.readdirSync(src)) renderTemplate(path.resolve(src, file), path.resolve(dest, file), callbacks);
|
|
2175
|
+
for (const file of fs.readdirSync(src)) renderTemplate(path$1.resolve(src, file), path$1.resolve(dest, file), callbacks);
|
|
2168
2176
|
return;
|
|
2169
2177
|
}
|
|
2170
|
-
const filename = path.basename(src);
|
|
2178
|
+
const filename = path$1.basename(src);
|
|
2171
2179
|
if (filename === "package.json" && fs.existsSync(dest)) {
|
|
2172
2180
|
const pkg = sortDependencies(deepMerge_default(JSON.parse(fs.readFileSync(dest, "utf8")), JSON.parse(fs.readFileSync(src, "utf8"))));
|
|
2173
2181
|
fs.writeFileSync(dest, JSON.stringify(pkg, null, 2) + "\n");
|
|
@@ -2183,7 +2191,7 @@ function renderTemplate(src, dest, callbacks) {
|
|
|
2183
2191
|
fs.writeFileSync(dest, JSON.stringify(settings, null, 2) + "\n");
|
|
2184
2192
|
return;
|
|
2185
2193
|
}
|
|
2186
|
-
if (filename.startsWith("_")) dest = path.resolve(path.dirname(dest), filename.replace(/^_/, "."));
|
|
2194
|
+
if (filename.startsWith("_")) dest = path$1.resolve(path$1.dirname(dest), filename.replace(/^_/, "."));
|
|
2187
2195
|
if (filename === "_gitignore" && fs.existsSync(dest)) {
|
|
2188
2196
|
const existing = fs.readFileSync(dest, "utf8");
|
|
2189
2197
|
const newGitignore = fs.readFileSync(src, "utf8");
|
|
@@ -2207,7 +2215,7 @@ var renderTemplate_default = renderTemplate;
|
|
|
2207
2215
|
function preOrderDirectoryTraverse(dir, dirCallback, fileCallback) {
|
|
2208
2216
|
for (const filename of fs.readdirSync(dir)) {
|
|
2209
2217
|
if (filename === ".git") continue;
|
|
2210
|
-
const fullpath = path.resolve(dir, filename);
|
|
2218
|
+
const fullpath = path$1.resolve(dir, filename);
|
|
2211
2219
|
if (fs.lstatSync(fullpath).isDirectory()) {
|
|
2212
2220
|
dirCallback(fullpath);
|
|
2213
2221
|
if (fs.existsSync(fullpath)) preOrderDirectoryTraverse(fullpath, dirCallback, fileCallback);
|
|
@@ -2223,7 +2231,7 @@ function postOrderDirectoryTraverse(dir, dirCallback, fileCallback) {
|
|
|
2223
2231
|
dotGitDirectoryState.hasDotGitDirectory = true;
|
|
2224
2232
|
continue;
|
|
2225
2233
|
}
|
|
2226
|
-
const fullpath = path.resolve(dir, filename);
|
|
2234
|
+
const fullpath = path$1.resolve(dir, filename);
|
|
2227
2235
|
if (fs.lstatSync(fullpath).isDirectory()) {
|
|
2228
2236
|
postOrderDirectoryTraverse(fullpath, dirCallback, fileCallback);
|
|
2229
2237
|
dirCallback(fullpath);
|
|
@@ -2235,11 +2243,11 @@ function postOrderDirectoryTraverse(dir, dirCallback, fileCallback) {
|
|
|
2235
2243
|
|
|
2236
2244
|
//#endregion
|
|
2237
2245
|
//#region utils/getCommand.ts
|
|
2238
|
-
function getCommand(packageManager
|
|
2239
|
-
if (scriptName === "install") return packageManager
|
|
2240
|
-
if (scriptName === "build") return packageManager
|
|
2241
|
-
if (args) return packageManager
|
|
2242
|
-
else return packageManager
|
|
2246
|
+
function getCommand(packageManager, scriptName, args) {
|
|
2247
|
+
if (scriptName === "install") return packageManager === "yarn" ? "yarn" : `${packageManager} install`;
|
|
2248
|
+
if (scriptName === "build") return packageManager === "npm" || packageManager === "bun" ? `${packageManager} run build` : `${packageManager} build`;
|
|
2249
|
+
if (args) return packageManager === "npm" ? `npm run ${scriptName} -- ${args}` : `${packageManager} ${scriptName} ${args}`;
|
|
2250
|
+
else return packageManager === "npm" ? `npm run ${scriptName}` : `${packageManager} ${scriptName}`;
|
|
2243
2251
|
}
|
|
2244
2252
|
|
|
2245
2253
|
//#endregion
|
|
@@ -2251,8 +2259,8 @@ const sfcTypeSupportDoc = [
|
|
|
2251
2259
|
"TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.",
|
|
2252
2260
|
""
|
|
2253
2261
|
].join("\n");
|
|
2254
|
-
function generateReadme({ projectName, packageManager
|
|
2255
|
-
const commandFor = (scriptName, args) => getCommand(packageManager
|
|
2262
|
+
function generateReadme({ projectName, packageManager, needsTypeScript, needsCypress, needsNightwatch, needsCypressCT, needsNightwatchCT, needsPlaywright, needsVitest, needsEslint }) {
|
|
2263
|
+
const commandFor = (scriptName, args) => getCommand(packageManager, scriptName, args);
|
|
2256
2264
|
let readme = `# ${projectName}
|
|
2257
2265
|
|
|
2258
2266
|
This template should help get you started developing with Vue 3 in Vite.
|
|
@@ -2264,7 +2272,7 @@ This template should help get you started developing with Vue 3 in Vite.
|
|
|
2264
2272
|
## Recommended Browser Setup
|
|
2265
2273
|
|
|
2266
2274
|
- Chromium-based browsers (Chrome, Edge, Brave, etc.):
|
|
2267
|
-
- [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
|
|
2275
|
+
- [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
|
|
2268
2276
|
- [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
|
|
2269
2277
|
- Firefox:
|
|
2270
2278
|
- [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
|
|
@@ -2278,7 +2286,7 @@ See [Vite Configuration Reference](https://vite.dev/config/).
|
|
|
2278
2286
|
|
|
2279
2287
|
`;
|
|
2280
2288
|
let installCommand = commandFor("install");
|
|
2281
|
-
if (packageManager
|
|
2289
|
+
if (packageManager === "pnpm" && needsNightwatch) installCommand += `\npnpm approve-builds # for pnpm 10+`;
|
|
2282
2290
|
let npmScriptsDescriptions = `\`\`\`sh
|
|
2283
2291
|
${installCommand}
|
|
2284
2292
|
\`\`\`
|
|
@@ -2424,272 +2432,11 @@ async function loadLanguageFile(filePath) {
|
|
|
2424
2432
|
}
|
|
2425
2433
|
async function getLanguage(localesRoot) {
|
|
2426
2434
|
const locale = getLocale();
|
|
2427
|
-
const languageFilePath = path.resolve(localesRoot, `${locale}.json`);
|
|
2428
|
-
const fallbackPath = path.resolve(localesRoot, "en-US.json");
|
|
2435
|
+
const languageFilePath = path$1.resolve(localesRoot, `${locale}.json`);
|
|
2436
|
+
const fallbackPath = path$1.resolve(localesRoot, "en-US.json");
|
|
2429
2437
|
return fs.existsSync(languageFilePath) ? await loadLanguageFile(languageFilePath) : await loadLanguageFile(fallbackPath);
|
|
2430
2438
|
}
|
|
2431
2439
|
|
|
2432
|
-
//#endregion
|
|
2433
|
-
//#region node_modules/.pnpm/@vue+create-eslint-config@0.13.0/node_modules/@vue/create-eslint-config/renderEjsFile.js
|
|
2434
|
-
const templates = {
|
|
2435
|
-
"./templates/_editorconfig.ejs": "[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]\ncharset = utf-8\nindent_size = 2\nindent_style = space\ninsert_final_newline = true\ntrim_trailing_whitespace = true\nend_of_line = lf\nmax_line_length = 100\n",
|
|
2436
|
-
"./templates/_gitattributes": "* text=auto eol=lf\n",
|
|
2437
|
-
"./templates/_prettierrc.json.ejs": "<%#\n The default style follows the one used in the vuejs/create-vue repository\n <https://github.com/vuejs/create-vue/blob/main/.prettierrc>\n%>\n{\n \"$schema\": \"https://json.schemastore.org/prettierrc\",\n \"semi\": false,\n \"singleQuote\": true,\n \"printWidth\": 100<%_ if (needsOxlint) { _%>,\n \"plugins\": [\n \"@prettier/plugin-oxc\"\n ]\n <%_ } _%>\n}\n",
|
|
2438
|
-
"./templates/eslint.config.js.ejs": "<%_ for (const { importer } of configsBeforeVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\nimport { defineConfig, globalIgnores } from 'eslint/config'\nimport globals from 'globals'\nimport js from '@eslint/js'\nimport pluginVue from 'eslint-plugin-vue'\n<%_ for (const { importer } of configsAfterVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\n\nexport default defineConfig([\n {\n name: 'app/files-to-lint',\n files: ['**/*.{<%= fileExtensions.join(',') %>}'],\n },\n\n globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),\n\n {\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n },\n },\n\n<%_ for (const { content } of configsBeforeVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n js.configs.recommended,\n ...pluginVue.configs['flat/essential'],\n<%_ for (const { content } of configsAfterVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n])\n",
|
|
2439
|
-
"./templates/eslint.config.ts.ejs": "<%_ for (const { importer } of configsBeforeVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\nimport { globalIgnores } from 'eslint/config'\nimport { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'\nimport pluginVue from 'eslint-plugin-vue'\n<%_ for (const { importer } of configsAfterVuePlugin) { _%>\n<%- importer %>\n<%_ } _%>\n\n// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:\n// import { configureVueProject } from '@vue/eslint-config-typescript'\n// configureVueProject({ scriptLangs: ['ts', 'tsx'] })\n// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup\n\nexport default defineConfigWithVueTs(\n {\n name: 'app/files-to-lint',\n files: ['**/*.{<%= fileExtensions.join(',') %>}'],\n },\n\n globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),\n\n<%_ for (const { content } of configsBeforeVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n pluginVue.configs['flat/essential'],\n vueTsConfigs.recommended,\n<%_ for (const { content } of configsAfterVuePlugin) { _%>\n <%- content %><%# TODO: auto-indent if content's multi-line %>\n<%_ } _%>\n)\n"
|
|
2440
|
-
};
|
|
2441
|
-
function renderEjsFile(filePath, data) {
|
|
2442
|
-
return import_ejs$1.render(templates[filePath], data, {});
|
|
2443
|
-
}
|
|
2444
|
-
|
|
2445
|
-
//#endregion
|
|
2446
|
-
//#region node_modules/.pnpm/@vue+create-eslint-config@0.13.0/node_modules/@vue/create-eslint-config/package.json
|
|
2447
|
-
var name$1 = "@vue/create-eslint-config";
|
|
2448
|
-
var version$1 = "0.13.0";
|
|
2449
|
-
var description$1 = "Utility to setup ESLint in Vue.js projects.";
|
|
2450
|
-
var type$1 = "module";
|
|
2451
|
-
var main = "index.js";
|
|
2452
|
-
var bin$1 = { "create-eslint-config": "bin/create-eslint-config.js" };
|
|
2453
|
-
var engines$1 = { "node": "^16.14.0 || >= 18.0.0" };
|
|
2454
|
-
var scripts$1 = {
|
|
2455
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
2456
|
-
"lint": "eslint --fix ."
|
|
2457
|
-
};
|
|
2458
|
-
var repository$1 = {
|
|
2459
|
-
"type": "git",
|
|
2460
|
-
"url": "git+https://github.com/vuejs/create-eslint-config.git"
|
|
2461
|
-
};
|
|
2462
|
-
var keywords$1 = [
|
|
2463
|
-
"vue",
|
|
2464
|
-
"eslint",
|
|
2465
|
-
"config"
|
|
2466
|
-
];
|
|
2467
|
-
var author$1 = "Haoqun Jiang <haoqunjiang+npm@gmail.com>";
|
|
2468
|
-
var license$1 = "MIT";
|
|
2469
|
-
var bugs$1 = { "url": "https://github.com/vuejs/create-eslint-config/issues" };
|
|
2470
|
-
var homepage$1 = "https://github.com/vuejs/create-eslint-config#readme";
|
|
2471
|
-
var publishConfig$1 = {
|
|
2472
|
-
"access": "public",
|
|
2473
|
-
"provenance": true
|
|
2474
|
-
};
|
|
2475
|
-
var dependencies = {
|
|
2476
|
-
"ejs": "^3.1.10",
|
|
2477
|
-
"enquirer": "^2.4.1",
|
|
2478
|
-
"kolorist": "^1.8.0"
|
|
2479
|
-
};
|
|
2480
|
-
var devDependencies$2 = {
|
|
2481
|
-
"@eslint/js": "^9.37.0",
|
|
2482
|
-
"@prettier/plugin-oxc": "^0.0.4",
|
|
2483
|
-
"@types/node": "^22.18.10",
|
|
2484
|
-
"@vue/eslint-config-prettier": "^10.2.0",
|
|
2485
|
-
"@vue/eslint-config-typescript": "^14.6.0",
|
|
2486
|
-
"eslint": "^9.37.0",
|
|
2487
|
-
"eslint-plugin-oxlint": "~1.23.0",
|
|
2488
|
-
"eslint-plugin-vue": "~10.5.0",
|
|
2489
|
-
"globals": "^16.4.0",
|
|
2490
|
-
"jiti": "^2.6.1",
|
|
2491
|
-
"npm-run-all2": "^8.0.4",
|
|
2492
|
-
"oxlint": "~1.23.0",
|
|
2493
|
-
"prettier": "3.6.2",
|
|
2494
|
-
"typescript": "~5.9.0"
|
|
2495
|
-
};
|
|
2496
|
-
var package_default$2 = {
|
|
2497
|
-
name: name$1,
|
|
2498
|
-
version: version$1,
|
|
2499
|
-
description: description$1,
|
|
2500
|
-
type: type$1,
|
|
2501
|
-
main,
|
|
2502
|
-
bin: bin$1,
|
|
2503
|
-
engines: engines$1,
|
|
2504
|
-
scripts: scripts$1,
|
|
2505
|
-
repository: repository$1,
|
|
2506
|
-
keywords: keywords$1,
|
|
2507
|
-
author: author$1,
|
|
2508
|
-
license: license$1,
|
|
2509
|
-
bugs: bugs$1,
|
|
2510
|
-
homepage: homepage$1,
|
|
2511
|
-
publishConfig: publishConfig$1,
|
|
2512
|
-
dependencies,
|
|
2513
|
-
devDependencies: devDependencies$2
|
|
2514
|
-
};
|
|
2515
|
-
|
|
2516
|
-
//#endregion
|
|
2517
|
-
//#region node_modules/.pnpm/@vue+create-eslint-config@0.13.0/node_modules/@vue/create-eslint-config/index.js
|
|
2518
|
-
const versionMap = package_default$2.devDependencies;
|
|
2519
|
-
function createConfig({ styleGuide = "default", hasTypeScript = false, needsPrettier = false, needsOxlint = false, additionalConfigs = [] }) {
|
|
2520
|
-
const pickDependencies = (keys) => pickKeysFromObject(versionMap, keys);
|
|
2521
|
-
const pkg = {
|
|
2522
|
-
devDependencies: pickDependencies(["eslint", "eslint-plugin-vue"]),
|
|
2523
|
-
scripts: {}
|
|
2524
|
-
};
|
|
2525
|
-
const fileExtensions = ["vue"];
|
|
2526
|
-
if (hasTypeScript) {
|
|
2527
|
-
fileExtensions.unshift("ts", "mts", "tsx");
|
|
2528
|
-
additionalConfigs.unshift({ devDependencies: pickDependencies(["@vue/eslint-config-typescript", "jiti"]) });
|
|
2529
|
-
} else {
|
|
2530
|
-
fileExtensions.unshift("js", "mjs", "jsx");
|
|
2531
|
-
additionalConfigs.unshift({ devDependencies: pickDependencies(["@eslint/js", "globals"]) });
|
|
2532
|
-
}
|
|
2533
|
-
if (needsOxlint) {
|
|
2534
|
-
additionalConfigs.push({
|
|
2535
|
-
devDependencies: pickDependencies([
|
|
2536
|
-
"oxlint",
|
|
2537
|
-
"eslint-plugin-oxlint",
|
|
2538
|
-
"npm-run-all2"
|
|
2539
|
-
]),
|
|
2540
|
-
afterVuePlugin: [{
|
|
2541
|
-
importer: "import pluginOxlint from 'eslint-plugin-oxlint'",
|
|
2542
|
-
content: "...pluginOxlint.configs['flat/recommended'],"
|
|
2543
|
-
}]
|
|
2544
|
-
});
|
|
2545
|
-
pkg.scripts["lint:oxlint"] = "oxlint . --fix -D correctness --ignore-path .gitignore";
|
|
2546
|
-
pkg.scripts["lint:eslint"] = "eslint . --fix --cache";
|
|
2547
|
-
pkg.scripts.lint = "run-s lint:*";
|
|
2548
|
-
} else pkg.scripts.lint = "eslint . --fix --cache";
|
|
2549
|
-
if (needsPrettier) {
|
|
2550
|
-
additionalConfigs.push({
|
|
2551
|
-
devDependencies: pickDependencies(["prettier", "@vue/eslint-config-prettier"]),
|
|
2552
|
-
afterVuePlugin: [{
|
|
2553
|
-
importer: "import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'",
|
|
2554
|
-
content: "skipFormatting,"
|
|
2555
|
-
}]
|
|
2556
|
-
});
|
|
2557
|
-
pkg.scripts.format = "prettier --write src/";
|
|
2558
|
-
}
|
|
2559
|
-
if (needsOxlint && needsPrettier) additionalConfigs.push({ devDependencies: pickDependencies(["@prettier/plugin-oxc"]) });
|
|
2560
|
-
const configsBeforeVuePlugin = [], configsAfterVuePlugin = [];
|
|
2561
|
-
for (const config of additionalConfigs) {
|
|
2562
|
-
deepMerge(pkg.devDependencies, config.devDependencies ?? {});
|
|
2563
|
-
configsBeforeVuePlugin.push(...config.beforeVuePlugin ?? []);
|
|
2564
|
-
configsAfterVuePlugin.push(...config.afterVuePlugin ?? []);
|
|
2565
|
-
}
|
|
2566
|
-
const templateData = {
|
|
2567
|
-
styleGuide,
|
|
2568
|
-
needsOxlint,
|
|
2569
|
-
needsPrettier,
|
|
2570
|
-
fileExtensions,
|
|
2571
|
-
configsBeforeVuePlugin,
|
|
2572
|
-
configsAfterVuePlugin
|
|
2573
|
-
};
|
|
2574
|
-
const files$1 = { ".editorconfig": renderEjsFile("./templates/_editorconfig.ejs", templateData) };
|
|
2575
|
-
if (hasTypeScript) files$1["eslint.config.ts"] = renderEjsFile("./templates/eslint.config.ts.ejs", templateData);
|
|
2576
|
-
else files$1["eslint.config.js"] = renderEjsFile("./templates/eslint.config.js.ejs", templateData);
|
|
2577
|
-
if (needsPrettier) files$1[".prettierrc.json"] = renderEjsFile("./templates/_prettierrc.json.ejs", templateData);
|
|
2578
|
-
files$1[".gitattributes"] = renderEjsFile("./templates/_gitattributes", {});
|
|
2579
|
-
return {
|
|
2580
|
-
pkg,
|
|
2581
|
-
files: files$1
|
|
2582
|
-
};
|
|
2583
|
-
}
|
|
2584
|
-
/**
|
|
2585
|
-
* Picks specified keys from an object.
|
|
2586
|
-
*
|
|
2587
|
-
* @param {Object} obj - The source object.
|
|
2588
|
-
* @param {string[]} keys - The keys to pick from the object.
|
|
2589
|
-
* @returns {Object} - A new object with the picked keys.
|
|
2590
|
-
*/
|
|
2591
|
-
function pickKeysFromObject(obj, keys) {
|
|
2592
|
-
return keys.reduce((acc, key) => {
|
|
2593
|
-
if (key in obj) acc[key] = obj[key];
|
|
2594
|
-
return acc;
|
|
2595
|
-
}, {});
|
|
2596
|
-
}
|
|
2597
|
-
const isObject = (val) => val && typeof val === "object";
|
|
2598
|
-
const mergeArrayWithDedupe = (a, b$2) => Array.from(new Set([...a, ...b$2]));
|
|
2599
|
-
/**
|
|
2600
|
-
* Recursively merge the content of the new object to the existing one
|
|
2601
|
-
* @param {object} target the existing object
|
|
2602
|
-
* @param {object} obj the new object
|
|
2603
|
-
*/
|
|
2604
|
-
function deepMerge(target, obj) {
|
|
2605
|
-
for (const key of Object.keys(obj)) {
|
|
2606
|
-
const oldVal = target[key];
|
|
2607
|
-
const newVal = obj[key];
|
|
2608
|
-
if (Array.isArray(oldVal) && Array.isArray(newVal)) target[key] = mergeArrayWithDedupe(oldVal, newVal);
|
|
2609
|
-
else if (isObject(oldVal) && isObject(newVal)) target[key] = deepMerge(oldVal, newVal);
|
|
2610
|
-
else target[key] = newVal;
|
|
2611
|
-
}
|
|
2612
|
-
return target;
|
|
2613
|
-
}
|
|
2614
|
-
|
|
2615
|
-
//#endregion
|
|
2616
|
-
//#region template/eslint/package.json
|
|
2617
|
-
var devDependencies$1 = {
|
|
2618
|
-
"@vitest/eslint-plugin": "^1.3.23",
|
|
2619
|
-
"eslint-plugin-cypress": "^5.2.0",
|
|
2620
|
-
"eslint-plugin-playwright": "^2.2.2"
|
|
2621
|
-
};
|
|
2622
|
-
var package_default$1 = { devDependencies: devDependencies$1 };
|
|
2623
|
-
|
|
2624
|
-
//#endregion
|
|
2625
|
-
//#region utils/renderEslint.ts
|
|
2626
|
-
const eslintDeps = package_default$1.devDependencies;
|
|
2627
|
-
function renderEslint(rootDir, { needsTypeScript, needsVitest, needsCypress, needsCypressCT, needsOxlint, needsPrettier, needsPlaywright }) {
|
|
2628
|
-
const { pkg, files: files$1 } = createConfig({
|
|
2629
|
-
styleGuide: "default",
|
|
2630
|
-
hasTypeScript: needsTypeScript,
|
|
2631
|
-
needsOxlint,
|
|
2632
|
-
needsPrettier,
|
|
2633
|
-
additionalConfigs: getAdditionalConfigs({
|
|
2634
|
-
needsTypeScript,
|
|
2635
|
-
needsVitest,
|
|
2636
|
-
needsCypress,
|
|
2637
|
-
needsCypressCT,
|
|
2638
|
-
needsPlaywright
|
|
2639
|
-
})
|
|
2640
|
-
});
|
|
2641
|
-
const packageJsonPath = path.resolve(rootDir, "package.json");
|
|
2642
|
-
const updatedPkg = sortDependencies(deepMerge_default(JSON.parse(fs.readFileSync(packageJsonPath, "utf8")), pkg));
|
|
2643
|
-
fs.writeFileSync(packageJsonPath, JSON.stringify(updatedPkg, null, 2) + "\n", "utf8");
|
|
2644
|
-
for (const [fileName, content] of Object.entries(files$1)) {
|
|
2645
|
-
const fullPath = path.resolve(rootDir, fileName);
|
|
2646
|
-
fs.writeFileSync(fullPath, content, "utf8");
|
|
2647
|
-
}
|
|
2648
|
-
}
|
|
2649
|
-
function getAdditionalConfigs({ needsTypeScript, needsVitest, needsCypress, needsCypressCT, needsPlaywright }) {
|
|
2650
|
-
const additionalConfigs = [];
|
|
2651
|
-
if (needsVitest) additionalConfigs.push({
|
|
2652
|
-
devDependencies: { "@vitest/eslint-plugin": eslintDeps["@vitest/eslint-plugin"] },
|
|
2653
|
-
afterVuePlugin: [{
|
|
2654
|
-
importer: `import pluginVitest from '@vitest/eslint-plugin'`,
|
|
2655
|
-
content: `
|
|
2656
|
-
{
|
|
2657
|
-
...pluginVitest.configs.recommended,
|
|
2658
|
-
files: ['src/**/__tests__/*'],
|
|
2659
|
-
},`
|
|
2660
|
-
}]
|
|
2661
|
-
});
|
|
2662
|
-
if (needsCypress) additionalConfigs.push({
|
|
2663
|
-
devDependencies: { "eslint-plugin-cypress": eslintDeps["eslint-plugin-cypress"] },
|
|
2664
|
-
afterVuePlugin: [{
|
|
2665
|
-
importer: (needsTypeScript ? "// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\n" : "") + "import pluginCypress from 'eslint-plugin-cypress'",
|
|
2666
|
-
content: `
|
|
2667
|
-
{
|
|
2668
|
-
...pluginCypress.configs.recommended,
|
|
2669
|
-
files: [
|
|
2670
|
-
${[
|
|
2671
|
-
...needsCypressCT ? ["**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}"] : [],
|
|
2672
|
-
"cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}",
|
|
2673
|
-
"cypress/support/**/*.{js,ts,jsx,tsx}"
|
|
2674
|
-
].map(JSON.stringify.bind(JSON)).join(",\n ").replace(/"/g, "'")}
|
|
2675
|
-
],
|
|
2676
|
-
},`
|
|
2677
|
-
}]
|
|
2678
|
-
});
|
|
2679
|
-
if (needsPlaywright) additionalConfigs.push({
|
|
2680
|
-
devDependencies: { "eslint-plugin-playwright": eslintDeps["eslint-plugin-playwright"] },
|
|
2681
|
-
afterVuePlugin: [{
|
|
2682
|
-
importer: "import pluginPlaywright from 'eslint-plugin-playwright'",
|
|
2683
|
-
content: `
|
|
2684
|
-
{
|
|
2685
|
-
...pluginPlaywright.configs['flat/recommended'],
|
|
2686
|
-
files: ['e2e/**/*.{test,spec}.{js,ts,jsx,tsx}'],
|
|
2687
|
-
},`
|
|
2688
|
-
}]
|
|
2689
|
-
});
|
|
2690
|
-
return additionalConfigs;
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2693
2440
|
//#endregion
|
|
2694
2441
|
//#region utils/trimBoilerplate.ts
|
|
2695
2442
|
function replaceContent(filepath, replacer) {
|
|
@@ -2697,7 +2444,7 @@ function replaceContent(filepath, replacer) {
|
|
|
2697
2444
|
fs.writeFileSync(filepath, replacer(content));
|
|
2698
2445
|
}
|
|
2699
2446
|
function trimBoilerplate(rootDir) {
|
|
2700
|
-
const srcDir = path
|
|
2447
|
+
const srcDir = path.resolve(rootDir, "src");
|
|
2701
2448
|
for (const filename of fs.readdirSync(srcDir)) {
|
|
2702
2449
|
if ([
|
|
2703
2450
|
"main.js",
|
|
@@ -2705,103 +2452,26 @@ function trimBoilerplate(rootDir) {
|
|
|
2705
2452
|
"router",
|
|
2706
2453
|
"stores"
|
|
2707
2454
|
].includes(filename)) continue;
|
|
2708
|
-
const fullpath = path
|
|
2455
|
+
const fullpath = path.resolve(srcDir, filename);
|
|
2709
2456
|
fs.rmSync(fullpath, { recursive: true });
|
|
2710
2457
|
}
|
|
2711
2458
|
}
|
|
2712
2459
|
function removeCSSImport(rootDir, needsTypeScript, needsCypressCT) {
|
|
2713
|
-
replaceContent(path
|
|
2714
|
-
if (needsCypressCT) replaceContent(path
|
|
2460
|
+
replaceContent(path.resolve(rootDir, needsTypeScript ? "src/main.ts" : "src/main.js"), (content) => content.replace("import './assets/main.css'\n\n", ""));
|
|
2461
|
+
if (needsCypressCT) replaceContent(path.resolve(rootDir, needsTypeScript ? "cypress/support/component.ts" : "cypress/support/component.js"), (content) => content.replace("import '@/assets/main.css'", "// import '@/assets/main.css'"));
|
|
2715
2462
|
}
|
|
2716
2463
|
function emptyRouterConfig(rootDir, needsTypeScript) {
|
|
2717
|
-
const srcDir = path
|
|
2718
|
-
replaceContent(path
|
|
2464
|
+
const srcDir = path.resolve(rootDir, "src");
|
|
2465
|
+
replaceContent(path.resolve(srcDir, needsTypeScript ? "router/index.ts" : "router/index.js"), (content) => content.replace(`import HomeView from '../views/HomeView.vue'\n`, "").replace(/routes:\s*\[[\s\S]*?\],/, "routes: [],"));
|
|
2719
2466
|
}
|
|
2720
2467
|
|
|
2721
2468
|
//#endregion
|
|
2722
2469
|
//#region package.json
|
|
2723
2470
|
var name = "create-vue";
|
|
2724
|
-
var version = "3.18.
|
|
2725
|
-
var description = "🛠️ The recommended way to start a Vite-powered Vue project";
|
|
2726
|
-
var type = "module";
|
|
2727
|
-
var packageManager = "pnpm@10.18.3";
|
|
2728
|
-
var bin = { "create-vue": "bundle.js" };
|
|
2729
|
-
var files = [
|
|
2730
|
-
"locales",
|
|
2731
|
-
"bundle.js",
|
|
2732
|
-
"template",
|
|
2733
|
-
"!template/**/node_modules/.bin/*"
|
|
2734
|
-
];
|
|
2735
|
-
var engines = { "node": "^20.19.0 || >=22.12.0" };
|
|
2736
|
-
var scripts = {
|
|
2737
|
-
"prepare": "husky",
|
|
2738
|
-
"format": "prettier --write . --experimental-cli",
|
|
2739
|
-
"build": "rolldown -c rolldown.config.ts",
|
|
2740
|
-
"snapshot": "zx ./scripts/snapshot.mjs",
|
|
2741
|
-
"pretest": "pnpm run build && pnpm run snapshot",
|
|
2742
|
-
"test": "zx ./scripts/test.mjs",
|
|
2743
|
-
"test:unit": "vitest",
|
|
2744
|
-
"preversion": "git fetch && git status -uno | grep -q 'Your branch is up to date'",
|
|
2745
|
-
"postversion": "zx ./scripts/postversion.mjs",
|
|
2746
|
-
"prepublishOnly": "pnpm run build"
|
|
2747
|
-
};
|
|
2748
|
-
var repository = {
|
|
2749
|
-
"type": "git",
|
|
2750
|
-
"url": "git+https://github.com/vuejs/create-vue.git"
|
|
2751
|
-
};
|
|
2752
|
-
var keywords = [];
|
|
2753
|
-
var author = "Haoqun Jiang <npm@haoqun.me>";
|
|
2754
|
-
var license = "MIT";
|
|
2755
|
-
var bugs = { "url": "https://github.com/vuejs/create-vue/issues" };
|
|
2756
|
-
var homepage = "https://github.com/vuejs/create-vue#readme";
|
|
2757
|
-
var devDependencies = {
|
|
2758
|
-
"@clack/prompts": "^0.11.0",
|
|
2759
|
-
"@tsconfig/node22": "^22.0.2",
|
|
2760
|
-
"@types/eslint": "^9.6.1",
|
|
2761
|
-
"@types/node": "^22.18.12",
|
|
2762
|
-
"@types/prompts": "^2.4.9",
|
|
2763
|
-
"@vue/create-eslint-config": "^0.13.0",
|
|
2764
|
-
"@vue/tsconfig": "^0.8.1",
|
|
2765
|
-
"ejs": "^3.1.10",
|
|
2766
|
-
"husky": "^9.1.7",
|
|
2767
|
-
"lint-staged": "^16.2.5",
|
|
2768
|
-
"picocolors": "^1.1.1",
|
|
2769
|
-
"prettier": "3.6.2",
|
|
2770
|
-
"rolldown": "1.0.0-beta.43",
|
|
2771
|
-
"rollup-plugin-license": "^3.6.0",
|
|
2772
|
-
"vitest": "^3.2.4",
|
|
2773
|
-
"zx": "^8.8.5"
|
|
2774
|
-
};
|
|
2775
|
-
var lint_staged = { "*.{js,ts,vue,json}": ["prettier --write"] };
|
|
2776
|
-
var publishConfig = {
|
|
2777
|
-
"access": "public",
|
|
2778
|
-
"provenance": true
|
|
2779
|
-
};
|
|
2780
|
-
var package_default = {
|
|
2781
|
-
name,
|
|
2782
|
-
version,
|
|
2783
|
-
description,
|
|
2784
|
-
type,
|
|
2785
|
-
packageManager,
|
|
2786
|
-
bin,
|
|
2787
|
-
files,
|
|
2788
|
-
engines,
|
|
2789
|
-
scripts,
|
|
2790
|
-
repository,
|
|
2791
|
-
keywords,
|
|
2792
|
-
author,
|
|
2793
|
-
license,
|
|
2794
|
-
bugs,
|
|
2795
|
-
homepage,
|
|
2796
|
-
devDependencies,
|
|
2797
|
-
"lint-staged": lint_staged,
|
|
2798
|
-
publishConfig
|
|
2799
|
-
};
|
|
2471
|
+
var version = "3.18.4";
|
|
2800
2472
|
|
|
2801
2473
|
//#endregion
|
|
2802
2474
|
//#region index.ts
|
|
2803
|
-
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
2804
|
-
var import_ejs = /* @__PURE__ */ __toESM(require_ejs(), 1);
|
|
2805
2475
|
const language = await getLanguage(fileURLToPath(new URL("./locales", import.meta.url)));
|
|
2806
2476
|
const FEATURE_FLAGS = [
|
|
2807
2477
|
"default",
|
|
@@ -2872,9 +2542,9 @@ function toValidPackageName(projectName) {
|
|
|
2872
2542
|
}
|
|
2873
2543
|
function canSkipEmptying(dir) {
|
|
2874
2544
|
if (!fs.existsSync(dir)) return true;
|
|
2875
|
-
const files
|
|
2876
|
-
if (files
|
|
2877
|
-
if (files
|
|
2545
|
+
const files = fs.readdirSync(dir);
|
|
2546
|
+
if (files.length === 0) return true;
|
|
2547
|
+
if (files.length === 1 && files[0] === ".git") {
|
|
2878
2548
|
dotGitDirectoryState.hasDotGitDirectory = true;
|
|
2879
2549
|
return true;
|
|
2880
2550
|
}
|
|
@@ -2955,24 +2625,24 @@ async function init() {
|
|
|
2955
2625
|
"help",
|
|
2956
2626
|
"version"
|
|
2957
2627
|
];
|
|
2958
|
-
const { values: argv
|
|
2628
|
+
const { values: argv, positionals } = parseArgs({
|
|
2959
2629
|
args,
|
|
2960
2630
|
options: Object.fromEntries(flags.map((key) => [key, { type: "boolean" }])),
|
|
2961
2631
|
strict: true,
|
|
2962
2632
|
allowPositionals: true
|
|
2963
2633
|
});
|
|
2964
|
-
if (argv
|
|
2634
|
+
if (argv.help) {
|
|
2965
2635
|
console.log(helpMessage);
|
|
2966
2636
|
process.exit(0);
|
|
2967
2637
|
}
|
|
2968
|
-
if (argv
|
|
2969
|
-
console.log(`${
|
|
2638
|
+
if (argv.version) {
|
|
2639
|
+
console.log(`${name} v${version}`);
|
|
2970
2640
|
process.exit(0);
|
|
2971
2641
|
}
|
|
2972
|
-
const isFeatureFlagsUsed = FEATURE_FLAGS.some((flag) => typeof argv
|
|
2642
|
+
const isFeatureFlagsUsed = FEATURE_FLAGS.some((flag) => typeof argv[flag] === "boolean");
|
|
2973
2643
|
let targetDir = positionals[0];
|
|
2974
2644
|
const defaultProjectName = targetDir || "vue-project";
|
|
2975
|
-
const forceOverwrite = argv
|
|
2645
|
+
const forceOverwrite = argv.force;
|
|
2976
2646
|
const result = {
|
|
2977
2647
|
projectName: defaultProjectName,
|
|
2978
2648
|
shouldOverwrite: forceOverwrite,
|
|
@@ -3039,28 +2709,28 @@ async function init() {
|
|
|
3039
2709
|
required: false
|
|
3040
2710
|
}));
|
|
3041
2711
|
}
|
|
3042
|
-
if (argv
|
|
2712
|
+
if (argv.bare) result.needsBareboneTemplates = true;
|
|
3043
2713
|
else if (!isFeatureFlagsUsed) result.needsBareboneTemplates = await unwrapPrompt(ye({
|
|
3044
2714
|
message: language.needsBareboneTemplates.message,
|
|
3045
2715
|
initialValue: false
|
|
3046
2716
|
}));
|
|
3047
2717
|
const { features, experimentFeatures, needsBareboneTemplates } = result;
|
|
3048
|
-
const needsTypeScript = argv
|
|
3049
|
-
const needsJsx = argv
|
|
3050
|
-
const needsRouter = argv
|
|
3051
|
-
const needsPinia = argv
|
|
3052
|
-
const needsVitest = argv
|
|
3053
|
-
const needsEslint = argv
|
|
3054
|
-
const needsPrettier = argv
|
|
3055
|
-
const needsOxlint = experimentFeatures.includes("oxlint") || argv
|
|
3056
|
-
const needsRolldownVite = experimentFeatures.includes("rolldown-vite") || argv
|
|
2718
|
+
const needsTypeScript = argv.ts || argv.typescript || features.includes("typescript");
|
|
2719
|
+
const needsJsx = argv.jsx || features.includes("jsx");
|
|
2720
|
+
const needsRouter = argv.router || argv["vue-router"] || features.includes("router");
|
|
2721
|
+
const needsPinia = argv.pinia || features.includes("pinia");
|
|
2722
|
+
const needsVitest = argv.vitest || argv.tests || features.includes("vitest");
|
|
2723
|
+
const needsEslint = argv.eslint || argv["eslint-with-prettier"] || features.includes("eslint");
|
|
2724
|
+
const needsPrettier = argv.prettier || argv["eslint-with-prettier"] || features.includes("prettier");
|
|
2725
|
+
const needsOxlint = experimentFeatures.includes("oxlint") || argv["oxlint"];
|
|
2726
|
+
const needsRolldownVite = experimentFeatures.includes("rolldown-vite") || argv["rolldown-vite"];
|
|
3057
2727
|
const { e2eFramework } = result;
|
|
3058
|
-
const needsCypress = argv
|
|
2728
|
+
const needsCypress = argv.cypress || argv.tests || e2eFramework === "cypress";
|
|
3059
2729
|
const needsCypressCT = needsCypress && !needsVitest;
|
|
3060
|
-
const needsNightwatch = argv
|
|
2730
|
+
const needsNightwatch = argv.nightwatch || e2eFramework === "nightwatch";
|
|
3061
2731
|
const needsNightwatchCT = needsNightwatch && !needsVitest;
|
|
3062
|
-
const needsPlaywright = argv
|
|
3063
|
-
const root = path.join(cwd, targetDir);
|
|
2732
|
+
const needsPlaywright = argv.playwright || e2eFramework === "playwright";
|
|
2733
|
+
const root = path$1.join(cwd, targetDir);
|
|
3064
2734
|
if (fs.existsSync(root) && result.shouldOverwrite) emptyDir(root);
|
|
3065
2735
|
else if (!fs.existsSync(root)) fs.mkdirSync(root);
|
|
3066
2736
|
console.log(`\n${language.infos.scaffolding} ${root}...`);
|
|
@@ -3068,17 +2738,17 @@ async function init() {
|
|
|
3068
2738
|
name: result.packageName,
|
|
3069
2739
|
version: "0.0.0"
|
|
3070
2740
|
};
|
|
3071
|
-
fs.writeFileSync(path.resolve(root, "package.json"), JSON.stringify(pkg, null, 2));
|
|
2741
|
+
fs.writeFileSync(path$1.resolve(root, "package.json"), JSON.stringify(pkg, null, 2));
|
|
3072
2742
|
const templateRoot = fileURLToPath(new URL("./template", import.meta.url));
|
|
3073
2743
|
const callbacks = [];
|
|
3074
2744
|
const render = function render$1(templateName) {
|
|
3075
|
-
renderTemplate_default(path.resolve(templateRoot, templateName), root, callbacks);
|
|
2745
|
+
renderTemplate_default(path$1.resolve(templateRoot, templateName), root, callbacks);
|
|
3076
2746
|
};
|
|
3077
2747
|
const replaceVite = () => {
|
|
3078
|
-
const content = fs.readFileSync(path.resolve(root, "package.json"), "utf-8");
|
|
2748
|
+
const content = fs.readFileSync(path$1.resolve(root, "package.json"), "utf-8");
|
|
3079
2749
|
const json = JSON.parse(content);
|
|
3080
2750
|
json.devDependencies.vite = "npm:rolldown-vite@latest";
|
|
3081
|
-
fs.writeFileSync(path.resolve(root, "package.json"), JSON.stringify(json, null, 2));
|
|
2751
|
+
fs.writeFileSync(path$1.resolve(root, "package.json"), JSON.stringify(json, null, 2));
|
|
3082
2752
|
};
|
|
3083
2753
|
render("base");
|
|
3084
2754
|
if (needsJsx) render("config/jsx");
|
|
@@ -3115,22 +2785,20 @@ async function init() {
|
|
|
3115
2785
|
rootTsConfig.references.push({ path: "./nightwatch/tsconfig.json" });
|
|
3116
2786
|
}
|
|
3117
2787
|
if (needsNightwatchCT) render("tsconfig/nightwatch-ct");
|
|
3118
|
-
fs.writeFileSync(path.resolve(root, "tsconfig.json"), JSON.stringify(rootTsConfig, null, 2) + "\n", "utf-8");
|
|
3119
|
-
}
|
|
3120
|
-
if (needsEslint
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
if (needsOxlint) render("config/oxlint");
|
|
3133
|
-
if (needsPrettier) render("config/prettier");
|
|
2788
|
+
fs.writeFileSync(path$1.resolve(root, "tsconfig.json"), JSON.stringify(rootTsConfig, null, 2) + "\n", "utf-8");
|
|
2789
|
+
}
|
|
2790
|
+
if (needsEslint) {
|
|
2791
|
+
render("linting/base");
|
|
2792
|
+
if (needsTypeScript) render("linting/core/ts");
|
|
2793
|
+
else render("linting/core/js");
|
|
2794
|
+
if (needsCypress) render("linting/cypress");
|
|
2795
|
+
if (needsCypressCT) render("linting/cypress-ct");
|
|
2796
|
+
if (needsPlaywright) render("linting/playwright");
|
|
2797
|
+
if (needsVitest) render("linting/vitest");
|
|
2798
|
+
if (needsPrettier) render("linting/prettier");
|
|
2799
|
+
if (needsOxlint) render("linting/oxlint");
|
|
2800
|
+
}
|
|
2801
|
+
if (needsPrettier) render("formatting/prettier");
|
|
3134
2802
|
if (needsRolldownVite) replaceVite();
|
|
3135
2803
|
render(`code/${(needsTypeScript ? "typescript-" : "") + (needsRouter ? "router" : "default")}`);
|
|
3136
2804
|
if (needsPinia && needsRouter) render("entry/router-and-pinia");
|
|
@@ -3158,13 +2826,13 @@ async function init() {
|
|
|
3158
2826
|
}
|
|
3159
2827
|
if (needsTypeScript) {
|
|
3160
2828
|
preOrderDirectoryTraverse(root, () => {}, (filepath) => {
|
|
3161
|
-
if (filepath.endsWith(".js")
|
|
2829
|
+
if (filepath.endsWith(".js")) {
|
|
3162
2830
|
const tsFilePath = filepath.replace(/\.js$/, ".ts");
|
|
3163
2831
|
if (fs.existsSync(tsFilePath)) fs.unlinkSync(filepath);
|
|
3164
2832
|
else fs.renameSync(filepath, tsFilePath);
|
|
3165
|
-
} else if (path.basename(filepath) === "jsconfig.json") fs.unlinkSync(filepath);
|
|
2833
|
+
} else if (path$1.basename(filepath) === "jsconfig.json") fs.unlinkSync(filepath);
|
|
3166
2834
|
});
|
|
3167
|
-
const indexHtmlPath = path.resolve(root, "index.html");
|
|
2835
|
+
const indexHtmlPath = path$1.resolve(root, "index.html");
|
|
3168
2836
|
const indexHtmlContent = fs.readFileSync(indexHtmlPath, "utf8");
|
|
3169
2837
|
fs.writeFileSync(indexHtmlPath, indexHtmlContent.replace("src/main.js", "src/main.ts"));
|
|
3170
2838
|
} else preOrderDirectoryTraverse(root, () => {}, (filepath) => {
|
|
@@ -3175,10 +2843,10 @@ async function init() {
|
|
|
3175
2843
|
if (needsRouter) emptyRouterConfig(root, needsTypeScript);
|
|
3176
2844
|
}
|
|
3177
2845
|
const userAgent = process.env.npm_config_user_agent ?? "";
|
|
3178
|
-
const packageManager
|
|
3179
|
-
fs.writeFileSync(path.resolve(root, "README.md"), generateReadme({
|
|
2846
|
+
const packageManager = /pnpm/.test(userAgent) ? "pnpm" : /yarn/.test(userAgent) ? "yarn" : /bun/.test(userAgent) ? "bun" : "npm";
|
|
2847
|
+
fs.writeFileSync(path$1.resolve(root, "README.md"), generateReadme({
|
|
3180
2848
|
projectName: result.projectName ?? result.packageName ?? defaultProjectName,
|
|
3181
|
-
packageManager
|
|
2849
|
+
packageManager,
|
|
3182
2850
|
needsTypeScript,
|
|
3183
2851
|
needsVitest,
|
|
3184
2852
|
needsCypress,
|
|
@@ -3190,15 +2858,15 @@ async function init() {
|
|
|
3190
2858
|
}));
|
|
3191
2859
|
let outroMessage = `${language.infos.done}\n\n`;
|
|
3192
2860
|
if (root !== cwd) {
|
|
3193
|
-
const cdProjectName = path.relative(cwd, root);
|
|
2861
|
+
const cdProjectName = path$1.relative(cwd, root);
|
|
3194
2862
|
outroMessage += ` ${(0, import_picocolors.bold)((0, import_picocolors.green)(`cd ${cdProjectName.includes(" ") ? `"${cdProjectName}"` : cdProjectName}`))}\n`;
|
|
3195
2863
|
}
|
|
3196
|
-
outroMessage += ` ${(0, import_picocolors.bold)((0, import_picocolors.green)(getCommand(packageManager
|
|
3197
|
-
if (needsPrettier) outroMessage += ` ${(0, import_picocolors.bold)((0, import_picocolors.green)(getCommand(packageManager
|
|
3198
|
-
outroMessage += ` ${(0, import_picocolors.bold)((0, import_picocolors.green)(getCommand(packageManager
|
|
2864
|
+
outroMessage += ` ${(0, import_picocolors.bold)((0, import_picocolors.green)(getCommand(packageManager, "install")))}\n`;
|
|
2865
|
+
if (needsPrettier) outroMessage += ` ${(0, import_picocolors.bold)((0, import_picocolors.green)(getCommand(packageManager, "format")))}\n`;
|
|
2866
|
+
outroMessage += ` ${(0, import_picocolors.bold)((0, import_picocolors.green)(getCommand(packageManager, "dev")))}\n`;
|
|
3199
2867
|
if (!dotGitDirectoryState.hasDotGitDirectory) outroMessage += `
|
|
3200
2868
|
${(0, import_picocolors.dim)("|")} ${language.infos.optionalGitCommand}
|
|
3201
|
-
|
|
2869
|
+
|
|
3202
2870
|
${(0, import_picocolors.bold)((0, import_picocolors.green)("git init && git add -A && git commit -m \"initial commit\""))}`;
|
|
3203
2871
|
Se(outroMessage);
|
|
3204
2872
|
}
|