create-vue 3.5.0 → 3.6.1
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/outfile.cjs +350 -370
- package/package.json +10 -10
- package/template/base/node_modules/.bin/vite +2 -2
- package/template/base/package.json +2 -2
- package/template/base/src/assets/logo.svg +1 -1
- package/template/config/cypress/node_modules/.bin/cypress +2 -2
- package/template/config/cypress/node_modules/.bin/server-test +2 -2
- package/template/config/cypress/node_modules/.bin/start-server-and-test +2 -2
- package/template/config/cypress/node_modules/.bin/start-test +2 -2
- package/template/config/cypress/package.json +4 -4
- package/template/config/cypress-ct/node_modules/.bin/cypress +2 -2
- package/template/config/cypress-ct/package.json +2 -2
- package/template/config/jsx/node_modules/.bin/vite +2 -2
- package/template/config/jsx/package.json +2 -2
- package/template/config/pinia/package.json +2 -2
- package/template/config/playwright/node_modules/.bin/playwright +2 -2
- package/template/config/playwright/package.json +1 -1
- package/template/config/router/package.json +1 -1
- package/template/config/typescript/node_modules/.bin/tsc +2 -2
- package/template/config/typescript/node_modules/.bin/tsserver +2 -2
- package/template/config/typescript/node_modules/.bin/vue-tsc +2 -2
- package/template/config/typescript/package.json +3 -3
- package/template/config/vitest/node_modules/.bin/vitest +2 -2
- package/template/config/vitest/package.json +5 -5
- package/template/config/vitest/vitest.config.js +15 -0
- package/template/tsconfig/base/tsconfig.json +1 -1
- package/template/tsconfig/cypress-ct/tsconfig.json +1 -1
- package/template/tsconfig/vitest/package.json +1 -1
- package/template/tsconfig/vitest/tsconfig.json +1 -1
- /package/template/tsconfig/base/{tsconfig.config.json → tsconfig.node.json} +0 -0
package/outfile.cjs
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! create-vue v3.
|
|
2
|
+
/*! create-vue v3.6.1 | MIT */
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __esm = (fn, res) => function __init() {
|
|
10
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
|
-
};
|
|
12
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
13
10
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
14
11
|
};
|
|
15
12
|
var __export = (target, all) => {
|
|
16
|
-
for (var
|
|
17
|
-
__defProp(target,
|
|
13
|
+
for (var name in all)
|
|
14
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
15
|
};
|
|
19
16
|
var __copyProps = (to, from, except, desc) => {
|
|
20
17
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -25,29 +22,63 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
22
|
return to;
|
|
26
23
|
};
|
|
27
24
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
29
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
30
|
mod
|
|
30
31
|
));
|
|
31
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// node_modules/.pnpm/minimist@1.2.
|
|
33
|
+
// node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js
|
|
34
34
|
var require_minimist = __commonJS({
|
|
35
|
-
"node_modules/.pnpm/minimist@1.2.
|
|
35
|
+
"node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js"(exports, module2) {
|
|
36
|
+
"use strict";
|
|
37
|
+
function hasKey(obj, keys) {
|
|
38
|
+
var o = obj;
|
|
39
|
+
keys.slice(0, -1).forEach(function(key2) {
|
|
40
|
+
o = o[key2] || {};
|
|
41
|
+
});
|
|
42
|
+
var key = keys[keys.length - 1];
|
|
43
|
+
return key in o;
|
|
44
|
+
}
|
|
45
|
+
function isNumber(x) {
|
|
46
|
+
if (typeof x === "number") {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
if (/^0x[0-9a-f]+$/i.test(x)) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
|
53
|
+
}
|
|
54
|
+
function isConstructorOrProto(obj, key) {
|
|
55
|
+
return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
|
|
56
|
+
}
|
|
36
57
|
module2.exports = function(args, opts) {
|
|
37
|
-
if (!opts)
|
|
58
|
+
if (!opts) {
|
|
38
59
|
opts = {};
|
|
39
|
-
var flags = { bools: {}, strings: {}, unknownFn: null };
|
|
40
|
-
if (typeof opts["unknown"] === "function") {
|
|
41
|
-
flags.unknownFn = opts["unknown"];
|
|
42
60
|
}
|
|
43
|
-
|
|
61
|
+
var flags = {
|
|
62
|
+
bools: {},
|
|
63
|
+
strings: {},
|
|
64
|
+
unknownFn: null
|
|
65
|
+
};
|
|
66
|
+
if (typeof opts.unknown === "function") {
|
|
67
|
+
flags.unknownFn = opts.unknown;
|
|
68
|
+
}
|
|
69
|
+
if (typeof opts.boolean === "boolean" && opts.boolean) {
|
|
44
70
|
flags.allBools = true;
|
|
45
71
|
} else {
|
|
46
|
-
[].concat(opts
|
|
72
|
+
[].concat(opts.boolean).filter(Boolean).forEach(function(key2) {
|
|
47
73
|
flags.bools[key2] = true;
|
|
48
74
|
});
|
|
49
75
|
}
|
|
50
76
|
var aliases = {};
|
|
77
|
+
function aliasIsBoolean(key2) {
|
|
78
|
+
return aliases[key2].some(function(x) {
|
|
79
|
+
return flags.bools[x];
|
|
80
|
+
});
|
|
81
|
+
}
|
|
51
82
|
Object.keys(opts.alias || {}).forEach(function(key2) {
|
|
52
83
|
aliases[key2] = [].concat(opts.alias[key2]);
|
|
53
84
|
aliases[key2].forEach(function(x) {
|
|
@@ -59,89 +90,96 @@ var require_minimist = __commonJS({
|
|
|
59
90
|
[].concat(opts.string).filter(Boolean).forEach(function(key2) {
|
|
60
91
|
flags.strings[key2] = true;
|
|
61
92
|
if (aliases[key2]) {
|
|
62
|
-
|
|
93
|
+
[].concat(aliases[key2]).forEach(function(k) {
|
|
94
|
+
flags.strings[k] = true;
|
|
95
|
+
});
|
|
63
96
|
}
|
|
64
97
|
});
|
|
65
|
-
var defaults = opts
|
|
98
|
+
var defaults = opts.default || {};
|
|
66
99
|
var argv = { _: [] };
|
|
67
|
-
Object.keys(flags.bools).forEach(function(key2) {
|
|
68
|
-
setArg(key2, defaults[key2] === void 0 ? false : defaults[key2]);
|
|
69
|
-
});
|
|
70
|
-
var notFlags = [];
|
|
71
|
-
if (args.indexOf("--") !== -1) {
|
|
72
|
-
notFlags = args.slice(args.indexOf("--") + 1);
|
|
73
|
-
args = args.slice(0, args.indexOf("--"));
|
|
74
|
-
}
|
|
75
100
|
function argDefined(key2, arg2) {
|
|
76
101
|
return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2];
|
|
77
102
|
}
|
|
78
|
-
function setArg(key2, val, arg2) {
|
|
79
|
-
if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) {
|
|
80
|
-
if (flags.unknownFn(arg2) === false)
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val;
|
|
84
|
-
setKey(argv, key2.split("."), value2);
|
|
85
|
-
(aliases[key2] || []).forEach(function(x) {
|
|
86
|
-
setKey(argv, x.split("."), value2);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
103
|
function setKey(obj, keys, value2) {
|
|
90
104
|
var o = obj;
|
|
91
105
|
for (var i2 = 0; i2 < keys.length - 1; i2++) {
|
|
92
106
|
var key2 = keys[i2];
|
|
93
|
-
if (isConstructorOrProto(o, key2))
|
|
107
|
+
if (isConstructorOrProto(o, key2)) {
|
|
94
108
|
return;
|
|
95
|
-
|
|
109
|
+
}
|
|
110
|
+
if (o[key2] === void 0) {
|
|
96
111
|
o[key2] = {};
|
|
97
|
-
|
|
112
|
+
}
|
|
113
|
+
if (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype) {
|
|
98
114
|
o[key2] = {};
|
|
99
|
-
|
|
115
|
+
}
|
|
116
|
+
if (o[key2] === Array.prototype) {
|
|
100
117
|
o[key2] = [];
|
|
118
|
+
}
|
|
101
119
|
o = o[key2];
|
|
102
120
|
}
|
|
103
|
-
var
|
|
104
|
-
if (isConstructorOrProto(o,
|
|
121
|
+
var lastKey = keys[keys.length - 1];
|
|
122
|
+
if (isConstructorOrProto(o, lastKey)) {
|
|
105
123
|
return;
|
|
106
|
-
|
|
124
|
+
}
|
|
125
|
+
if (o === Object.prototype || o === Number.prototype || o === String.prototype) {
|
|
107
126
|
o = {};
|
|
108
|
-
|
|
127
|
+
}
|
|
128
|
+
if (o === Array.prototype) {
|
|
109
129
|
o = [];
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
130
|
+
}
|
|
131
|
+
if (o[lastKey] === void 0 || flags.bools[lastKey] || typeof o[lastKey] === "boolean") {
|
|
132
|
+
o[lastKey] = value2;
|
|
133
|
+
} else if (Array.isArray(o[lastKey])) {
|
|
134
|
+
o[lastKey].push(value2);
|
|
114
135
|
} else {
|
|
115
|
-
o[
|
|
136
|
+
o[lastKey] = [o[lastKey], value2];
|
|
116
137
|
}
|
|
117
138
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
|
|
139
|
+
function setArg(key2, val, arg2) {
|
|
140
|
+
if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) {
|
|
141
|
+
if (flags.unknownFn(arg2) === false) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val;
|
|
146
|
+
setKey(argv, key2.split("."), value2);
|
|
147
|
+
(aliases[key2] || []).forEach(function(x) {
|
|
148
|
+
setKey(argv, x.split("."), value2);
|
|
121
149
|
});
|
|
122
150
|
}
|
|
151
|
+
Object.keys(flags.bools).forEach(function(key2) {
|
|
152
|
+
setArg(key2, defaults[key2] === void 0 ? false : defaults[key2]);
|
|
153
|
+
});
|
|
154
|
+
var notFlags = [];
|
|
155
|
+
if (args.indexOf("--") !== -1) {
|
|
156
|
+
notFlags = args.slice(args.indexOf("--") + 1);
|
|
157
|
+
args = args.slice(0, args.indexOf("--"));
|
|
158
|
+
}
|
|
123
159
|
for (var i = 0; i < args.length; i++) {
|
|
124
160
|
var arg = args[i];
|
|
161
|
+
var key;
|
|
162
|
+
var next;
|
|
125
163
|
if (/^--.+=/.test(arg)) {
|
|
126
164
|
var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
|
|
127
|
-
|
|
165
|
+
key = m[1];
|
|
128
166
|
var value = m[2];
|
|
129
167
|
if (flags.bools[key]) {
|
|
130
168
|
value = value !== "false";
|
|
131
169
|
}
|
|
132
170
|
setArg(key, value, arg);
|
|
133
171
|
} else if (/^--no-.+/.test(arg)) {
|
|
134
|
-
|
|
172
|
+
key = arg.match(/^--no-(.+)/)[1];
|
|
135
173
|
setArg(key, false, arg);
|
|
136
174
|
} else if (/^--.+/.test(arg)) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
if (next !== void 0 &&
|
|
175
|
+
key = arg.match(/^--(.+)/)[1];
|
|
176
|
+
next = args[i + 1];
|
|
177
|
+
if (next !== void 0 && !/^(-|--)[^-]/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
|
140
178
|
setArg(key, next, arg);
|
|
141
|
-
i
|
|
179
|
+
i += 1;
|
|
142
180
|
} else if (/^(true|false)$/.test(next)) {
|
|
143
181
|
setArg(key, next === "true", arg);
|
|
144
|
-
i
|
|
182
|
+
i += 1;
|
|
145
183
|
} else {
|
|
146
184
|
setArg(key, flags.strings[key] ? "" : true, arg);
|
|
147
185
|
}
|
|
@@ -149,13 +187,13 @@ var require_minimist = __commonJS({
|
|
|
149
187
|
var letters = arg.slice(1, -1).split("");
|
|
150
188
|
var broken = false;
|
|
151
189
|
for (var j = 0; j < letters.length; j++) {
|
|
152
|
-
|
|
190
|
+
next = arg.slice(j + 2);
|
|
153
191
|
if (next === "-") {
|
|
154
192
|
setArg(letters[j], next, arg);
|
|
155
193
|
continue;
|
|
156
194
|
}
|
|
157
|
-
if (/[A-Za-z]/.test(letters[j]) &&
|
|
158
|
-
setArg(letters[j], next.
|
|
195
|
+
if (/[A-Za-z]/.test(letters[j]) && next[0] === "=") {
|
|
196
|
+
setArg(letters[j], next.slice(1), arg);
|
|
159
197
|
broken = true;
|
|
160
198
|
break;
|
|
161
199
|
}
|
|
@@ -172,23 +210,21 @@ var require_minimist = __commonJS({
|
|
|
172
210
|
setArg(letters[j], flags.strings[letters[j]] ? "" : true, arg);
|
|
173
211
|
}
|
|
174
212
|
}
|
|
175
|
-
|
|
213
|
+
key = arg.slice(-1)[0];
|
|
176
214
|
if (!broken && key !== "-") {
|
|
177
215
|
if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
|
178
216
|
setArg(key, args[i + 1], arg);
|
|
179
|
-
i
|
|
217
|
+
i += 1;
|
|
180
218
|
} else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
|
|
181
219
|
setArg(key, args[i + 1] === "true", arg);
|
|
182
|
-
i
|
|
220
|
+
i += 1;
|
|
183
221
|
} else {
|
|
184
222
|
setArg(key, flags.strings[key] ? "" : true, arg);
|
|
185
223
|
}
|
|
186
224
|
}
|
|
187
225
|
} else {
|
|
188
226
|
if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
|
|
189
|
-
argv._.push(
|
|
190
|
-
flags.strings["_"] || !isNumber(arg) ? arg : Number(arg)
|
|
191
|
-
);
|
|
227
|
+
argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg));
|
|
192
228
|
}
|
|
193
229
|
if (opts.stopEarly) {
|
|
194
230
|
argv._.push.apply(argv._, args.slice(i + 1));
|
|
@@ -196,44 +232,23 @@ var require_minimist = __commonJS({
|
|
|
196
232
|
}
|
|
197
233
|
}
|
|
198
234
|
}
|
|
199
|
-
Object.keys(defaults).forEach(function(
|
|
200
|
-
if (!hasKey(argv,
|
|
201
|
-
setKey(argv,
|
|
202
|
-
(aliases[
|
|
203
|
-
setKey(argv, x.split("."), defaults[
|
|
235
|
+
Object.keys(defaults).forEach(function(k) {
|
|
236
|
+
if (!hasKey(argv, k.split("."))) {
|
|
237
|
+
setKey(argv, k.split("."), defaults[k]);
|
|
238
|
+
(aliases[k] || []).forEach(function(x) {
|
|
239
|
+
setKey(argv, x.split("."), defaults[k]);
|
|
204
240
|
});
|
|
205
241
|
}
|
|
206
242
|
});
|
|
207
243
|
if (opts["--"]) {
|
|
208
|
-
argv["--"] =
|
|
209
|
-
notFlags.forEach(function(key2) {
|
|
210
|
-
argv["--"].push(key2);
|
|
211
|
-
});
|
|
244
|
+
argv["--"] = notFlags.slice();
|
|
212
245
|
} else {
|
|
213
|
-
notFlags.forEach(function(
|
|
214
|
-
argv._.push(
|
|
246
|
+
notFlags.forEach(function(k) {
|
|
247
|
+
argv._.push(k);
|
|
215
248
|
});
|
|
216
249
|
}
|
|
217
250
|
return argv;
|
|
218
251
|
};
|
|
219
|
-
function hasKey(obj, keys) {
|
|
220
|
-
var o = obj;
|
|
221
|
-
keys.slice(0, -1).forEach(function(key2) {
|
|
222
|
-
o = o[key2] || {};
|
|
223
|
-
});
|
|
224
|
-
var key = keys[keys.length - 1];
|
|
225
|
-
return key in o;
|
|
226
|
-
}
|
|
227
|
-
function isNumber(x) {
|
|
228
|
-
if (typeof x === "number")
|
|
229
|
-
return true;
|
|
230
|
-
if (/^0x[0-9a-f]+$/i.test(x))
|
|
231
|
-
return true;
|
|
232
|
-
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
|
233
|
-
}
|
|
234
|
-
function isConstructorOrProto(obj, key) {
|
|
235
|
-
return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
|
|
236
|
-
}
|
|
237
252
|
}
|
|
238
253
|
});
|
|
239
254
|
|
|
@@ -244,6 +259,7 @@ var require_kleur = __commonJS({
|
|
|
244
259
|
var { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;
|
|
245
260
|
var $ = {
|
|
246
261
|
enabled: !NODE_DISABLE_COLORS && TERM !== "dumb" && FORCE_COLOR !== "0",
|
|
262
|
+
// modifiers
|
|
247
263
|
reset: init2(0, 0),
|
|
248
264
|
bold: init2(1, 22),
|
|
249
265
|
dim: init2(2, 22),
|
|
@@ -252,6 +268,7 @@ var require_kleur = __commonJS({
|
|
|
252
268
|
inverse: init2(7, 27),
|
|
253
269
|
hidden: init2(8, 28),
|
|
254
270
|
strikethrough: init2(9, 29),
|
|
271
|
+
// colors
|
|
255
272
|
black: init2(30, 39),
|
|
256
273
|
red: init2(31, 39),
|
|
257
274
|
green: init2(32, 39),
|
|
@@ -262,6 +279,7 @@ var require_kleur = __commonJS({
|
|
|
262
279
|
white: init2(37, 39),
|
|
263
280
|
gray: init2(90, 39),
|
|
264
281
|
grey: init2(90, 39),
|
|
282
|
+
// background colors
|
|
265
283
|
bgBlack: init2(40, 49),
|
|
266
284
|
bgRed: init2(41, 49),
|
|
267
285
|
bgGreen: init2(42, 49),
|
|
@@ -491,7 +509,7 @@ var require_clear = __commonJS({
|
|
|
491
509
|
var require_figures = __commonJS({
|
|
492
510
|
"node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/figures.js"(exports, module2) {
|
|
493
511
|
"use strict";
|
|
494
|
-
var
|
|
512
|
+
var main = {
|
|
495
513
|
arrowUp: "\u2191",
|
|
496
514
|
arrowDown: "\u2193",
|
|
497
515
|
arrowLeft: "\u2190",
|
|
@@ -506,10 +524,10 @@ var require_figures = __commonJS({
|
|
|
506
524
|
pointer: "\u276F"
|
|
507
525
|
};
|
|
508
526
|
var win = {
|
|
509
|
-
arrowUp:
|
|
510
|
-
arrowDown:
|
|
511
|
-
arrowLeft:
|
|
512
|
-
arrowRight:
|
|
527
|
+
arrowUp: main.arrowUp,
|
|
528
|
+
arrowDown: main.arrowDown,
|
|
529
|
+
arrowLeft: main.arrowLeft,
|
|
530
|
+
arrowRight: main.arrowRight,
|
|
513
531
|
radioOn: "(*)",
|
|
514
532
|
radioOff: "( )",
|
|
515
533
|
tick: "\u221A",
|
|
@@ -519,7 +537,7 @@ var require_figures = __commonJS({
|
|
|
519
537
|
line: "\u2500",
|
|
520
538
|
pointer: ">"
|
|
521
539
|
};
|
|
522
|
-
var figures = process.platform === "win32" ? win :
|
|
540
|
+
var figures = process.platform === "win32" ? win : main;
|
|
523
541
|
module2.exports = figures;
|
|
524
542
|
}
|
|
525
543
|
});
|
|
@@ -536,7 +554,7 @@ var require_style = __commonJS({
|
|
|
536
554
|
invisible: { scale: 0, render: (input) => "" },
|
|
537
555
|
default: { scale: 1, render: (input) => `${input}` }
|
|
538
556
|
});
|
|
539
|
-
var render = (
|
|
557
|
+
var render = (type) => styles[type] || styles.default;
|
|
540
558
|
var symbols = Object.freeze({
|
|
541
559
|
aborted: c.red(figures.cross),
|
|
542
560
|
done: c.green(figures.tick),
|
|
@@ -1409,13 +1427,21 @@ var require_date = __commonJS({
|
|
|
1409
1427
|
var regexGroups = {
|
|
1410
1428
|
1: ({ token }) => token.replace(/\\(.)/g, "$1"),
|
|
1411
1429
|
2: (opts) => new Day(opts),
|
|
1430
|
+
// Day // TODO
|
|
1412
1431
|
3: (opts) => new Month(opts),
|
|
1432
|
+
// Month
|
|
1413
1433
|
4: (opts) => new Year(opts),
|
|
1434
|
+
// Year
|
|
1414
1435
|
5: (opts) => new Meridiem(opts),
|
|
1436
|
+
// AM/PM // TODO (special)
|
|
1415
1437
|
6: (opts) => new Hours(opts),
|
|
1438
|
+
// Hours
|
|
1416
1439
|
7: (opts) => new Minutes(opts),
|
|
1440
|
+
// Minutes
|
|
1417
1441
|
8: (opts) => new Seconds(opts),
|
|
1442
|
+
// Seconds
|
|
1418
1443
|
9: (opts) => new Milliseconds(opts)
|
|
1444
|
+
// Fractional seconds
|
|
1419
1445
|
};
|
|
1420
1446
|
var dfltLocales = {
|
|
1421
1447
|
months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","),
|
|
@@ -1929,6 +1955,7 @@ Instructions:
|
|
|
1929
1955
|
}
|
|
1930
1956
|
return prefix + title + color.gray(desc || "");
|
|
1931
1957
|
}
|
|
1958
|
+
// shared with autocompleteMultiselect
|
|
1932
1959
|
paginateOptions(options2) {
|
|
1933
1960
|
if (options2.length === 0) {
|
|
1934
1961
|
return color.red("No matches for this query.");
|
|
@@ -1947,6 +1974,7 @@ Instructions:
|
|
|
1947
1974
|
}
|
|
1948
1975
|
return "\n" + styledOptions.join("\n");
|
|
1949
1976
|
}
|
|
1977
|
+
// shared with autocomleteMultiselect
|
|
1950
1978
|
renderOptions(options2) {
|
|
1951
1979
|
if (!this.done) {
|
|
1952
1980
|
return this.paginateOptions(options2);
|
|
@@ -2479,9 +2507,9 @@ var require_prompts = __commonJS({
|
|
|
2479
2507
|
var $ = exports;
|
|
2480
2508
|
var el = require_elements();
|
|
2481
2509
|
var noop = (v) => v;
|
|
2482
|
-
function toPrompt(
|
|
2510
|
+
function toPrompt(type, args, opts = {}) {
|
|
2483
2511
|
return new Promise((res, rej) => {
|
|
2484
|
-
const p = new el[
|
|
2512
|
+
const p = new el[type](args);
|
|
2485
2513
|
const onAbort = opts.onAbort || noop;
|
|
2486
2514
|
const onSubmit = opts.onSubmit || noop;
|
|
2487
2515
|
const onExit = opts.onExit || noop;
|
|
@@ -2550,7 +2578,7 @@ var require_lib = __commonJS({
|
|
|
2550
2578
|
const answers = {};
|
|
2551
2579
|
const override2 = prompt._override || {};
|
|
2552
2580
|
questions = [].concat(questions);
|
|
2553
|
-
let answer, question, quit,
|
|
2581
|
+
let answer, question, quit, name, type, lastPrompt;
|
|
2554
2582
|
const getFormattedAnswer = async (question2, answer2, skipValidation = false) => {
|
|
2555
2583
|
if (!skipValidation && question2.validate && question2.validate(answer2) !== true) {
|
|
2556
2584
|
return;
|
|
@@ -2558,12 +2586,12 @@ var require_lib = __commonJS({
|
|
|
2558
2586
|
return question2.format ? await question2.format(answer2, answers) : answer2;
|
|
2559
2587
|
};
|
|
2560
2588
|
for (question of questions) {
|
|
2561
|
-
({ name
|
|
2562
|
-
if (typeof
|
|
2563
|
-
|
|
2564
|
-
question["type"] =
|
|
2589
|
+
({ name, type } = question);
|
|
2590
|
+
if (typeof type === "function") {
|
|
2591
|
+
type = await type(answer, { ...answers }, question);
|
|
2592
|
+
question["type"] = type;
|
|
2565
2593
|
}
|
|
2566
|
-
if (!
|
|
2594
|
+
if (!type)
|
|
2567
2595
|
continue;
|
|
2568
2596
|
for (let key in question) {
|
|
2569
2597
|
if (passOn.includes(key))
|
|
@@ -2575,20 +2603,20 @@ var require_lib = __commonJS({
|
|
|
2575
2603
|
if (typeof question.message !== "string") {
|
|
2576
2604
|
throw new Error("prompt message is required");
|
|
2577
2605
|
}
|
|
2578
|
-
({ name
|
|
2579
|
-
if (prompts2[
|
|
2580
|
-
throw new Error(`prompt type (${
|
|
2606
|
+
({ name, type } = question);
|
|
2607
|
+
if (prompts2[type] === void 0) {
|
|
2608
|
+
throw new Error(`prompt type (${type}) is not defined`);
|
|
2581
2609
|
}
|
|
2582
2610
|
if (override2[question.name] !== void 0) {
|
|
2583
2611
|
answer = await getFormattedAnswer(question, override2[question.name]);
|
|
2584
2612
|
if (answer !== void 0) {
|
|
2585
|
-
answers[
|
|
2613
|
+
answers[name] = answer;
|
|
2586
2614
|
continue;
|
|
2587
2615
|
}
|
|
2588
2616
|
}
|
|
2589
2617
|
try {
|
|
2590
|
-
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts2[
|
|
2591
|
-
answers[
|
|
2618
|
+
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts2[type](question);
|
|
2619
|
+
answers[name] = answer = await getFormattedAnswer(question, answer, true);
|
|
2592
2620
|
quit = await onSubmit(question, answer, answers);
|
|
2593
2621
|
} catch (err) {
|
|
2594
2622
|
quit = !await onCancel(question, answers);
|
|
@@ -2641,8 +2669,8 @@ var require_quote = __commonJS({
|
|
|
2641
2669
|
exports.quoteString = quoteString;
|
|
2642
2670
|
var RESERVED_WORDS = new Set("break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "));
|
|
2643
2671
|
exports.IS_VALID_IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
2644
|
-
function isValidVariableName(
|
|
2645
|
-
return typeof
|
|
2672
|
+
function isValidVariableName(name) {
|
|
2673
|
+
return typeof name === "string" && !RESERVED_WORDS.has(name) && exports.IS_VALID_IDENTIFIER.test(name);
|
|
2646
2674
|
}
|
|
2647
2675
|
exports.isValidVariableName = isValidVariableName;
|
|
2648
2676
|
function quoteKey(key, next) {
|
|
@@ -2690,10 +2718,10 @@ var require_function = __commonJS({
|
|
|
2690
2718
|
var TOKENS_PRECEDING_REGEXPS = new Set("case delete else in instanceof new return throw typeof void , ; : + - ! ~ & | ^ * / % < > ? =".split(" "));
|
|
2691
2719
|
exports.USED_METHOD_KEY = /* @__PURE__ */ new WeakSet();
|
|
2692
2720
|
var functionToString = (fn, space, next, key) => {
|
|
2693
|
-
const
|
|
2694
|
-
if (
|
|
2721
|
+
const name = typeof key === "string" ? key : void 0;
|
|
2722
|
+
if (name !== void 0)
|
|
2695
2723
|
exports.USED_METHOD_KEY.add(fn);
|
|
2696
|
-
return new FunctionParser(fn, space, next,
|
|
2724
|
+
return new FunctionParser(fn, space, next, name).stringify();
|
|
2697
2725
|
};
|
|
2698
2726
|
exports.functionToString = functionToString;
|
|
2699
2727
|
function dedentFunction(fnString) {
|
|
@@ -2774,6 +2802,12 @@ ${found}`).join("\n") : fnString;
|
|
|
2774
2802
|
}
|
|
2775
2803
|
}
|
|
2776
2804
|
}
|
|
2805
|
+
/**
|
|
2806
|
+
* Attempt to parse the function from the current position by first stripping
|
|
2807
|
+
* the function's name from the front. This is not a fool-proof method on all
|
|
2808
|
+
* JavaScript engines, but yields good results on Node.js 4 (and slightly
|
|
2809
|
+
* less good results on Node.js 6 and 8).
|
|
2810
|
+
*/
|
|
2777
2811
|
tryStrippingName() {
|
|
2778
2812
|
if (METHOD_NAMES_ARE_QUOTED) {
|
|
2779
2813
|
return;
|
|
@@ -2791,6 +2825,11 @@ ${found}`).join("\n") : fnString;
|
|
|
2791
2825
|
}
|
|
2792
2826
|
this.pos = start;
|
|
2793
2827
|
}
|
|
2828
|
+
/**
|
|
2829
|
+
* Attempt to advance the parser past the keywords expected to be at the
|
|
2830
|
+
* start of this function's definition. This method sets `this.hadKeyword`
|
|
2831
|
+
* based on whether or not a `function` keyword is consumed.
|
|
2832
|
+
*/
|
|
2794
2833
|
tryParsePrefixTokens() {
|
|
2795
2834
|
let posPrev = this.pos;
|
|
2796
2835
|
this.hadKeyword = false;
|
|
@@ -2818,6 +2857,20 @@ ${found}`).join("\n") : fnString;
|
|
|
2818
2857
|
return token === "*";
|
|
2819
2858
|
}
|
|
2820
2859
|
}
|
|
2860
|
+
/**
|
|
2861
|
+
* Advance the parser past one element of JavaScript syntax. This could be a
|
|
2862
|
+
* matched pair of delimiters, like braces or parentheses, or an atomic unit
|
|
2863
|
+
* like a keyword, variable, or operator. Return a normalized string
|
|
2864
|
+
* representation of the element parsed--for example, returns '{}' for a
|
|
2865
|
+
* matched pair of braces. Comments and whitespace are skipped.
|
|
2866
|
+
*
|
|
2867
|
+
* (This isn't a full parser, so the token scanning logic used here is as
|
|
2868
|
+
* simple as it can be. As a consequence, some things that are one token in
|
|
2869
|
+
* JavaScript, like decimal number literals or most multi-character operators
|
|
2870
|
+
* like '&&', are split into more than one token here. However, awareness of
|
|
2871
|
+
* some multi-character sequences like '=>' is necessary, so we match the few
|
|
2872
|
+
* of them that we care about.)
|
|
2873
|
+
*/
|
|
2821
2874
|
consumeSyntax(wordLikeToken) {
|
|
2822
2875
|
const m = this.consumeMatch(/^(?:([A-Za-z_0-9$\xA0-\uFFFF]+)|=>|\+\+|\-\-|.)/);
|
|
2823
2876
|
if (!m)
|
|
@@ -2864,6 +2917,10 @@ ${found}`).join("\n") : fnString;
|
|
|
2864
2917
|
this.pos += m[0].length;
|
|
2865
2918
|
return m;
|
|
2866
2919
|
}
|
|
2920
|
+
/**
|
|
2921
|
+
* Advance the parser past an arbitrary regular expression. Return `token`,
|
|
2922
|
+
* or the match object of the regexp.
|
|
2923
|
+
*/
|
|
2867
2924
|
consumeRegExp(re, token) {
|
|
2868
2925
|
const m = re.exec(this.fnString.substr(this.pos));
|
|
2869
2926
|
if (!m)
|
|
@@ -2872,6 +2929,9 @@ ${found}`).join("\n") : fnString;
|
|
|
2872
2929
|
this.consumeWhitespace();
|
|
2873
2930
|
return token;
|
|
2874
2931
|
}
|
|
2932
|
+
/**
|
|
2933
|
+
* Advance the parser past a template string.
|
|
2934
|
+
*/
|
|
2875
2935
|
consumeTemplate() {
|
|
2876
2936
|
for (; ; ) {
|
|
2877
2937
|
this.consumeMatch(/^(?:[^`$\\]|\\.|\$(?!{))*/);
|
|
@@ -2889,6 +2949,9 @@ ${found}`).join("\n") : fnString;
|
|
|
2889
2949
|
return;
|
|
2890
2950
|
}
|
|
2891
2951
|
}
|
|
2952
|
+
/**
|
|
2953
|
+
* Advance the parser past any whitespace or comments.
|
|
2954
|
+
*/
|
|
2892
2955
|
consumeWhitespace() {
|
|
2893
2956
|
this.consumeMatch(/^(?:\s|\/\/.*|\/\*[^]*?\*\/)*/);
|
|
2894
2957
|
}
|
|
@@ -3102,220 +3165,69 @@ var require_dist = __commonJS({
|
|
|
3102
3165
|
}
|
|
3103
3166
|
});
|
|
3104
3167
|
|
|
3105
|
-
// node_modules/.pnpm/@vue+create-eslint-config@0.
|
|
3106
|
-
var
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
// node_modules/.pnpm/@vue+create-eslint-config@0.1.3/node_modules/@vue/create-eslint-config/templates/prettierrc-standard.json
|
|
3161
|
-
var prettierrc_standard_exports = {};
|
|
3162
|
-
__export(prettierrc_standard_exports, {
|
|
3163
|
-
$schema: () => $schema2,
|
|
3164
|
-
arrowParens: () => arrowParens2,
|
|
3165
|
-
bracketSameLine: () => bracketSameLine2,
|
|
3166
|
-
bracketSpacing: () => bracketSpacing2,
|
|
3167
|
-
default: () => prettierrc_standard_default,
|
|
3168
|
-
jsxSingleQuote: () => jsxSingleQuote2,
|
|
3169
|
-
proseWrap: () => proseWrap2,
|
|
3170
|
-
quoteProps: () => quoteProps2,
|
|
3171
|
-
semi: () => semi2,
|
|
3172
|
-
singleQuote: () => singleQuote2,
|
|
3173
|
-
tabWidth: () => tabWidth2,
|
|
3174
|
-
trailingComma: () => trailingComma2,
|
|
3175
|
-
useTabs: () => useTabs2
|
|
3176
|
-
});
|
|
3177
|
-
var $schema2, arrowParens2, bracketSameLine2, bracketSpacing2, jsxSingleQuote2, proseWrap2, quoteProps2, semi2, singleQuote2, tabWidth2, trailingComma2, useTabs2, prettierrc_standard_default;
|
|
3178
|
-
var init_prettierrc_standard = __esm({
|
|
3179
|
-
"node_modules/.pnpm/@vue+create-eslint-config@0.1.3/node_modules/@vue/create-eslint-config/templates/prettierrc-standard.json"() {
|
|
3180
|
-
$schema2 = "https://json.schemastore.org/prettierrc";
|
|
3181
|
-
arrowParens2 = "always";
|
|
3182
|
-
bracketSameLine2 = false;
|
|
3183
|
-
bracketSpacing2 = true;
|
|
3184
|
-
jsxSingleQuote2 = true;
|
|
3185
|
-
proseWrap2 = "preserve";
|
|
3186
|
-
quoteProps2 = "as-needed";
|
|
3187
|
-
semi2 = false;
|
|
3188
|
-
singleQuote2 = true;
|
|
3189
|
-
tabWidth2 = 2;
|
|
3190
|
-
trailingComma2 = "none";
|
|
3191
|
-
useTabs2 = false;
|
|
3192
|
-
prettierrc_standard_default = {
|
|
3193
|
-
$schema: $schema2,
|
|
3194
|
-
arrowParens: arrowParens2,
|
|
3195
|
-
bracketSameLine: bracketSameLine2,
|
|
3196
|
-
bracketSpacing: bracketSpacing2,
|
|
3197
|
-
jsxSingleQuote: jsxSingleQuote2,
|
|
3198
|
-
proseWrap: proseWrap2,
|
|
3199
|
-
quoteProps: quoteProps2,
|
|
3200
|
-
semi: semi2,
|
|
3201
|
-
singleQuote: singleQuote2,
|
|
3202
|
-
tabWidth: tabWidth2,
|
|
3203
|
-
trailingComma: trailingComma2,
|
|
3204
|
-
useTabs: useTabs2
|
|
3205
|
-
};
|
|
3206
|
-
}
|
|
3207
|
-
});
|
|
3208
|
-
|
|
3209
|
-
// node_modules/.pnpm/@vue+create-eslint-config@0.1.3/node_modules/@vue/create-eslint-config/templates/prettierrcs.cjs
|
|
3210
|
-
var require_prettierrcs = __commonJS({
|
|
3211
|
-
"node_modules/.pnpm/@vue+create-eslint-config@0.1.3/node_modules/@vue/create-eslint-config/templates/prettierrcs.cjs"(exports) {
|
|
3212
|
-
exports.airbnb = (init_prettierrc_airbnb(), __toCommonJS(prettierrc_airbnb_exports));
|
|
3213
|
-
exports.standard = (init_prettierrc_standard(), __toCommonJS(prettierrc_standard_exports));
|
|
3214
|
-
}
|
|
3215
|
-
});
|
|
3216
|
-
|
|
3217
|
-
// node_modules/.pnpm/@vue+create-eslint-config@0.1.3/node_modules/@vue/create-eslint-config/package.json
|
|
3218
|
-
var package_exports = {};
|
|
3219
|
-
__export(package_exports, {
|
|
3220
|
-
author: () => author,
|
|
3221
|
-
bin: () => bin,
|
|
3222
|
-
bugs: () => bugs,
|
|
3223
|
-
default: () => package_default,
|
|
3224
|
-
dependencies: () => dependencies,
|
|
3225
|
-
description: () => description,
|
|
3226
|
-
devDependencies: () => devDependencies,
|
|
3227
|
-
engines: () => engines,
|
|
3228
|
-
homepage: () => homepage,
|
|
3229
|
-
keywords: () => keywords,
|
|
3230
|
-
license: () => license,
|
|
3231
|
-
main: () => main,
|
|
3232
|
-
name: () => name,
|
|
3233
|
-
publishConfig: () => publishConfig,
|
|
3234
|
-
repository: () => repository,
|
|
3235
|
-
scripts: () => scripts,
|
|
3236
|
-
type: () => type,
|
|
3237
|
-
version: () => version
|
|
3238
|
-
});
|
|
3239
|
-
var name, version, description, type, main, bin, engines, repository, keywords, author, license, bugs, homepage, publishConfig, dependencies, devDependencies, scripts, package_default;
|
|
3240
|
-
var init_package = __esm({
|
|
3241
|
-
"node_modules/.pnpm/@vue+create-eslint-config@0.1.3/node_modules/@vue/create-eslint-config/package.json"() {
|
|
3242
|
-
name = "@vue/create-eslint-config";
|
|
3243
|
-
version = "0.1.3";
|
|
3244
|
-
description = "Utility to setup ESLint in Vue.js projects.";
|
|
3245
|
-
type = "module";
|
|
3246
|
-
main = "index.js";
|
|
3247
|
-
bin = {
|
|
3248
|
-
"create-eslint-config": "bin/create-eslint-config.js"
|
|
3249
|
-
};
|
|
3250
|
-
engines = {
|
|
3251
|
-
node: "^14.18.0 || >=16.0.0"
|
|
3252
|
-
};
|
|
3253
|
-
repository = {
|
|
3254
|
-
type: "git",
|
|
3255
|
-
url: "git+https://github.com/vuejs/create-eslint-config.git"
|
|
3256
|
-
};
|
|
3257
|
-
keywords = [
|
|
3258
|
-
"vue",
|
|
3259
|
-
"eslint",
|
|
3260
|
-
"config"
|
|
3261
|
-
];
|
|
3262
|
-
author = "Haoqun Jiang <haoqunjiang+npm@gmail.com>";
|
|
3263
|
-
license = "MIT";
|
|
3264
|
-
bugs = {
|
|
3265
|
-
url: "https://github.com/vuejs/create-eslint-config/issues"
|
|
3266
|
-
};
|
|
3267
|
-
homepage = "https://github.com/vuejs/create-eslint-config#readme";
|
|
3268
|
-
publishConfig = {
|
|
3269
|
-
access: "public"
|
|
3270
|
-
};
|
|
3271
|
-
dependencies = {
|
|
3272
|
-
enquirer: "^2.3.6",
|
|
3273
|
-
"javascript-stringify": "^2.1.0",
|
|
3274
|
-
kolorist: "^1.5.1"
|
|
3275
|
-
};
|
|
3276
|
-
devDependencies = {
|
|
3277
|
-
"@rushstack/eslint-patch": "^1.1.4",
|
|
3278
|
-
"@vue/eslint-config-airbnb": "^7.0.0",
|
|
3279
|
-
"@vue/eslint-config-airbnb-with-typescript": "^7.0.0",
|
|
3280
|
-
"@vue/eslint-config-prettier": "^7.0.0",
|
|
3281
|
-
"@vue/eslint-config-standard": "^8.0.1",
|
|
3282
|
-
"@vue/eslint-config-standard-with-typescript": "^8.0.0",
|
|
3283
|
-
"@vue/eslint-config-typescript": "^11.0.0",
|
|
3284
|
-
eslint: "^8.22.0",
|
|
3285
|
-
"eslint-plugin-vue": "^9.3.0",
|
|
3286
|
-
prettier: "^2.7.1",
|
|
3287
|
-
standard: "^17.0.0",
|
|
3288
|
-
typescript: "~4.7.4"
|
|
3289
|
-
};
|
|
3290
|
-
scripts = {
|
|
3291
|
-
test: 'echo "Error: no test specified" && exit 1'
|
|
3292
|
-
};
|
|
3293
|
-
package_default = {
|
|
3294
|
-
name,
|
|
3295
|
-
version,
|
|
3296
|
-
description,
|
|
3297
|
-
type,
|
|
3298
|
-
main,
|
|
3299
|
-
bin,
|
|
3300
|
-
engines,
|
|
3301
|
-
repository,
|
|
3302
|
-
keywords,
|
|
3303
|
-
author,
|
|
3304
|
-
license,
|
|
3305
|
-
bugs,
|
|
3306
|
-
homepage,
|
|
3307
|
-
publishConfig,
|
|
3308
|
-
dependencies,
|
|
3309
|
-
devDependencies,
|
|
3310
|
-
scripts
|
|
3168
|
+
// node_modules/.pnpm/@vue+create-eslint-config@0.2.0/node_modules/@vue/create-eslint-config/package.json
|
|
3169
|
+
var require_package = __commonJS({
|
|
3170
|
+
"node_modules/.pnpm/@vue+create-eslint-config@0.2.0/node_modules/@vue/create-eslint-config/package.json"(exports, module2) {
|
|
3171
|
+
module2.exports = {
|
|
3172
|
+
name: "@vue/create-eslint-config",
|
|
3173
|
+
version: "0.2.0",
|
|
3174
|
+
description: "Utility to setup ESLint in Vue.js projects.",
|
|
3175
|
+
type: "module",
|
|
3176
|
+
main: "index.js",
|
|
3177
|
+
bin: {
|
|
3178
|
+
"create-eslint-config": "bin/create-eslint-config.js"
|
|
3179
|
+
},
|
|
3180
|
+
engines: {
|
|
3181
|
+
node: "^16.14.0 || >= 18.0.0"
|
|
3182
|
+
},
|
|
3183
|
+
scripts: {
|
|
3184
|
+
test: 'echo "Error: no test specified" && exit 1'
|
|
3185
|
+
},
|
|
3186
|
+
repository: {
|
|
3187
|
+
type: "git",
|
|
3188
|
+
url: "git+https://github.com/vuejs/create-eslint-config.git"
|
|
3189
|
+
},
|
|
3190
|
+
keywords: [
|
|
3191
|
+
"vue",
|
|
3192
|
+
"eslint",
|
|
3193
|
+
"config"
|
|
3194
|
+
],
|
|
3195
|
+
author: "Haoqun Jiang <haoqunjiang+npm@gmail.com>",
|
|
3196
|
+
license: "MIT",
|
|
3197
|
+
bugs: {
|
|
3198
|
+
url: "https://github.com/vuejs/create-eslint-config/issues"
|
|
3199
|
+
},
|
|
3200
|
+
homepage: "https://github.com/vuejs/create-eslint-config#readme",
|
|
3201
|
+
publishConfig: {
|
|
3202
|
+
access: "public"
|
|
3203
|
+
},
|
|
3204
|
+
dependencies: {
|
|
3205
|
+
enquirer: "^2.3.6",
|
|
3206
|
+
"javascript-stringify": "^2.1.0",
|
|
3207
|
+
kolorist: "^1.7.0"
|
|
3208
|
+
},
|
|
3209
|
+
devDependencies: {
|
|
3210
|
+
"@rushstack/eslint-patch": "^1.2.0",
|
|
3211
|
+
"@vue/eslint-config-airbnb": "^7.0.0",
|
|
3212
|
+
"@vue/eslint-config-airbnb-with-typescript": "^7.0.0",
|
|
3213
|
+
"@vue/eslint-config-prettier": "^7.1.0",
|
|
3214
|
+
"@vue/eslint-config-standard": "^8.0.1",
|
|
3215
|
+
"@vue/eslint-config-standard-with-typescript": "^8.0.0",
|
|
3216
|
+
"@vue/eslint-config-typescript": "^11.0.2",
|
|
3217
|
+
eslint: "^8.34.0",
|
|
3218
|
+
"eslint-plugin-vue": "^9.9.0",
|
|
3219
|
+
prettier: "^2.8.4",
|
|
3220
|
+
standard: "^17.0.0",
|
|
3221
|
+
typescript: "~4.9.5"
|
|
3222
|
+
}
|
|
3311
3223
|
};
|
|
3312
3224
|
}
|
|
3313
3225
|
});
|
|
3314
3226
|
|
|
3315
|
-
// node_modules/.pnpm/@vue+create-eslint-config@0.
|
|
3227
|
+
// node_modules/.pnpm/@vue+create-eslint-config@0.2.0/node_modules/@vue/create-eslint-config/versionMap.cjs
|
|
3316
3228
|
var require_versionMap = __commonJS({
|
|
3317
|
-
"node_modules/.pnpm/@vue+create-eslint-config@0.
|
|
3318
|
-
module2.exports = (
|
|
3229
|
+
"node_modules/.pnpm/@vue+create-eslint-config@0.2.0/node_modules/@vue/create-eslint-config/versionMap.cjs"(exports, module2) {
|
|
3230
|
+
module2.exports = require_package().devDependencies;
|
|
3319
3231
|
}
|
|
3320
3232
|
});
|
|
3321
3233
|
|
|
@@ -3325,15 +3237,15 @@ var path4 = __toESM(require("path"), 1);
|
|
|
3325
3237
|
var import_minimist = __toESM(require_minimist(), 1);
|
|
3326
3238
|
var import_prompts = __toESM(require_lib(), 1);
|
|
3327
3239
|
|
|
3328
|
-
// node_modules/.pnpm/kolorist@1.
|
|
3240
|
+
// node_modules/.pnpm/kolorist@1.7.0/node_modules/kolorist/dist/esm/index.mjs
|
|
3329
3241
|
var enabled = true;
|
|
3330
3242
|
var globalVar = typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
|
|
3331
3243
|
var supportLevel = 0;
|
|
3332
3244
|
if (globalVar.process && globalVar.process.env && globalVar.process.stdout) {
|
|
3333
|
-
const { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = globalVar.process.env;
|
|
3334
|
-
if (NODE_DISABLE_COLORS || FORCE_COLOR === "0") {
|
|
3245
|
+
const { FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = globalVar.process.env;
|
|
3246
|
+
if (NODE_DISABLE_COLORS || NO_COLOR || FORCE_COLOR === "0") {
|
|
3335
3247
|
enabled = false;
|
|
3336
|
-
} else if (FORCE_COLOR === "1") {
|
|
3248
|
+
} else if (FORCE_COLOR === "1" || FORCE_COLOR === "2" || FORCE_COLOR === "3") {
|
|
3337
3249
|
enabled = true;
|
|
3338
3250
|
} else if (TERM === "dumb") {
|
|
3339
3251
|
enabled = false;
|
|
@@ -3407,6 +3319,10 @@ var bgLightMagenta = kolorist(105, 49);
|
|
|
3407
3319
|
var bgLightCyan = kolorist(106, 49);
|
|
3408
3320
|
var bgLightGray = kolorist(47, 49);
|
|
3409
3321
|
|
|
3322
|
+
// utils/banners.ts
|
|
3323
|
+
var defaultBanner = "Vue.js - The Progressive JavaScript Framework";
|
|
3324
|
+
var 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";
|
|
3325
|
+
|
|
3410
3326
|
// utils/renderTemplate.ts
|
|
3411
3327
|
var fs = __toESM(require("fs"), 1);
|
|
3412
3328
|
var path = __toESM(require("path"), 1);
|
|
@@ -3437,8 +3353,8 @@ function sortDependencies(packageJson) {
|
|
|
3437
3353
|
for (const depType of depTypes) {
|
|
3438
3354
|
if (packageJson[depType]) {
|
|
3439
3355
|
sorted[depType] = {};
|
|
3440
|
-
Object.keys(packageJson[depType]).sort().forEach((
|
|
3441
|
-
sorted[depType][
|
|
3356
|
+
Object.keys(packageJson[depType]).sort().forEach((name) => {
|
|
3357
|
+
sorted[depType][name] = packageJson[depType][name];
|
|
3442
3358
|
});
|
|
3443
3359
|
}
|
|
3444
3360
|
}
|
|
@@ -3661,10 +3577,10 @@ ${commandFor("lint")}
|
|
|
3661
3577
|
var fs3 = __toESM(require("fs"), 1);
|
|
3662
3578
|
var path3 = __toESM(require("path"), 1);
|
|
3663
3579
|
|
|
3664
|
-
// node_modules/.pnpm/@vue+create-eslint-config@0.
|
|
3580
|
+
// node_modules/.pnpm/@vue+create-eslint-config@0.2.0/node_modules/@vue/create-eslint-config/index.js
|
|
3665
3581
|
var import_javascript_stringify = __toESM(require_dist(), 1);
|
|
3666
3582
|
|
|
3667
|
-
// node_modules/.pnpm/@vue+create-eslint-config@0.
|
|
3583
|
+
// node_modules/.pnpm/@vue+create-eslint-config@0.2.0/node_modules/@vue/create-eslint-config/templates/editorconfigs.js
|
|
3668
3584
|
var editorconfigs_exports = {};
|
|
3669
3585
|
__export(editorconfigs_exports, {
|
|
3670
3586
|
airbnb: () => airbnb,
|
|
@@ -3691,8 +3607,59 @@ insert_final_newline = true
|
|
|
3691
3607
|
trim_trailing_whitespace = true
|
|
3692
3608
|
`;
|
|
3693
3609
|
|
|
3694
|
-
// node_modules/.pnpm/@vue+create-eslint-config@0.
|
|
3695
|
-
var
|
|
3610
|
+
// node_modules/.pnpm/@vue+create-eslint-config@0.2.0/node_modules/@vue/create-eslint-config/templates/prettierrcs.js
|
|
3611
|
+
var prettierrcs_exports = {};
|
|
3612
|
+
__export(prettierrcs_exports, {
|
|
3613
|
+
airbnb: () => prettierrc_airbnb_default,
|
|
3614
|
+
default: () => prettierrc_default_default,
|
|
3615
|
+
standard: () => prettierrc_standard_default
|
|
3616
|
+
});
|
|
3617
|
+
|
|
3618
|
+
// node_modules/.pnpm/@vue+create-eslint-config@0.2.0/node_modules/@vue/create-eslint-config/templates/prettierrc-default.json
|
|
3619
|
+
var prettierrc_default_default = {
|
|
3620
|
+
$schema: "https://json.schemastore.org/prettierrc",
|
|
3621
|
+
semi: false,
|
|
3622
|
+
tabWidth: 2,
|
|
3623
|
+
singleQuote: true,
|
|
3624
|
+
printWidth: 100,
|
|
3625
|
+
trailingComma: "none"
|
|
3626
|
+
};
|
|
3627
|
+
|
|
3628
|
+
// node_modules/.pnpm/@vue+create-eslint-config@0.2.0/node_modules/@vue/create-eslint-config/templates/prettierrc-airbnb.json
|
|
3629
|
+
var prettierrc_airbnb_default = {
|
|
3630
|
+
$schema: "https://json.schemastore.org/prettierrc",
|
|
3631
|
+
arrowParens: "always",
|
|
3632
|
+
bracketSameLine: false,
|
|
3633
|
+
bracketSpacing: true,
|
|
3634
|
+
endOfLine: "lf",
|
|
3635
|
+
jsxSingleQuote: false,
|
|
3636
|
+
printWidth: 100,
|
|
3637
|
+
proseWrap: "preserve",
|
|
3638
|
+
quoteProps: "as-needed",
|
|
3639
|
+
semi: true,
|
|
3640
|
+
singleQuote: true,
|
|
3641
|
+
tabWidth: 2,
|
|
3642
|
+
trailingComma: "all",
|
|
3643
|
+
useTabs: false
|
|
3644
|
+
};
|
|
3645
|
+
|
|
3646
|
+
// node_modules/.pnpm/@vue+create-eslint-config@0.2.0/node_modules/@vue/create-eslint-config/templates/prettierrc-standard.json
|
|
3647
|
+
var prettierrc_standard_default = {
|
|
3648
|
+
$schema: "https://json.schemastore.org/prettierrc",
|
|
3649
|
+
arrowParens: "always",
|
|
3650
|
+
bracketSameLine: false,
|
|
3651
|
+
bracketSpacing: true,
|
|
3652
|
+
jsxSingleQuote: true,
|
|
3653
|
+
proseWrap: "preserve",
|
|
3654
|
+
quoteProps: "as-needed",
|
|
3655
|
+
semi: false,
|
|
3656
|
+
singleQuote: true,
|
|
3657
|
+
tabWidth: 2,
|
|
3658
|
+
trailingComma: "none",
|
|
3659
|
+
useTabs: false
|
|
3660
|
+
};
|
|
3661
|
+
|
|
3662
|
+
// node_modules/.pnpm/@vue+create-eslint-config@0.2.0/node_modules/@vue/create-eslint-config/index.js
|
|
3696
3663
|
var import_versionMap = __toESM(require_versionMap(), 1);
|
|
3697
3664
|
function stringifyJS(value, styleGuide) {
|
|
3698
3665
|
const result = (0, import_javascript_stringify.stringify)(value, (val, indent, stringify2, key) => {
|
|
@@ -3724,15 +3691,21 @@ function deepMerge2(target, obj) {
|
|
|
3724
3691
|
}
|
|
3725
3692
|
function createConfig({
|
|
3726
3693
|
vueVersion = "3.x",
|
|
3694
|
+
// '2.x' | '3.x' (TODO: 2.7 / vue-demi)
|
|
3727
3695
|
styleGuide = "default",
|
|
3696
|
+
// default | airbnb | typescript
|
|
3728
3697
|
hasTypeScript = false,
|
|
3698
|
+
// js | ts
|
|
3729
3699
|
needsPrettier = false,
|
|
3700
|
+
// true | false
|
|
3730
3701
|
additionalConfig = {},
|
|
3702
|
+
// e.g. Cypress, createAliasSetting for Airbnb, etc.
|
|
3731
3703
|
additionalDependencies = {}
|
|
3704
|
+
// e.g. eslint-plugin-cypress
|
|
3732
3705
|
}) {
|
|
3733
3706
|
const pkg = { devDependencies: {} };
|
|
3734
|
-
const addDependency = (
|
|
3735
|
-
pkg.devDependencies[
|
|
3707
|
+
const addDependency = (name) => {
|
|
3708
|
+
pkg.devDependencies[name] = import_versionMap.default[name];
|
|
3736
3709
|
};
|
|
3737
3710
|
addDependency("eslint");
|
|
3738
3711
|
addDependency("eslint-plugin-vue");
|
|
@@ -3746,9 +3719,9 @@ function createConfig({
|
|
|
3746
3719
|
vueVersion.startsWith("2") ? "plugin:vue/essential" : "plugin:vue/vue3-essential"
|
|
3747
3720
|
]
|
|
3748
3721
|
};
|
|
3749
|
-
const addDependencyAndExtend = (
|
|
3750
|
-
addDependency(
|
|
3751
|
-
eslintConfig.extends.push(
|
|
3722
|
+
const addDependencyAndExtend = (name) => {
|
|
3723
|
+
addDependency(name);
|
|
3724
|
+
eslintConfig.extends.push(name);
|
|
3752
3725
|
};
|
|
3753
3726
|
switch (`${styleGuide}-${language}`) {
|
|
3754
3727
|
case "default-javascript":
|
|
@@ -3769,12 +3742,13 @@ function createConfig({
|
|
|
3769
3742
|
default:
|
|
3770
3743
|
throw new Error(`unexpected combination of styleGuide and language: ${styleGuide}-${language}`);
|
|
3771
3744
|
}
|
|
3745
|
+
deepMerge2(pkg.devDependencies, additionalDependencies);
|
|
3746
|
+
deepMerge2(eslintConfig, additionalConfig);
|
|
3772
3747
|
if (needsPrettier) {
|
|
3773
3748
|
addDependency("prettier");
|
|
3774
|
-
|
|
3749
|
+
addDependency("@vue/eslint-config-prettier");
|
|
3750
|
+
eslintConfig.extends.push("@vue/eslint-config-prettier/skip-formatting");
|
|
3775
3751
|
}
|
|
3776
|
-
deepMerge2(pkg.devDependencies, additionalDependencies);
|
|
3777
|
-
deepMerge2(eslintConfig, additionalConfig);
|
|
3778
3752
|
const files = {
|
|
3779
3753
|
".eslintrc.cjs": ""
|
|
3780
3754
|
};
|
|
@@ -3793,7 +3767,7 @@ function createConfig({
|
|
|
3793
3767
|
files[".editorconfig"] = editorconfigs_exports[styleGuide];
|
|
3794
3768
|
}
|
|
3795
3769
|
if (needsPrettier) {
|
|
3796
|
-
files[".prettierrc.json"] =
|
|
3770
|
+
files[".prettierrc.json"] = JSON.stringify(prettierrcs_exports[styleGuide], void 0, 2);
|
|
3797
3771
|
}
|
|
3798
3772
|
return {
|
|
3799
3773
|
pkg,
|
|
@@ -3802,11 +3776,14 @@ function createConfig({
|
|
|
3802
3776
|
}
|
|
3803
3777
|
|
|
3804
3778
|
// template/eslint/package.json
|
|
3805
|
-
var
|
|
3806
|
-
|
|
3779
|
+
var package_default = {
|
|
3780
|
+
devDependencies: {
|
|
3781
|
+
"eslint-plugin-cypress": "^2.12.1"
|
|
3782
|
+
}
|
|
3807
3783
|
};
|
|
3808
3784
|
|
|
3809
3785
|
// utils/renderEslint.ts
|
|
3786
|
+
var eslintDeps = package_default.devDependencies;
|
|
3810
3787
|
function renderEslint(rootDir, { needsTypeScript, needsCypress, needsCypressCT, needsPrettier }) {
|
|
3811
3788
|
const additionalConfig = {};
|
|
3812
3789
|
const additionalDependencies = {};
|
|
@@ -3820,25 +3797,27 @@ function renderEslint(rootDir, { needsTypeScript, needsCypress, needsCypressCT,
|
|
|
3820
3797
|
extends: ["plugin:cypress/recommended"]
|
|
3821
3798
|
}
|
|
3822
3799
|
];
|
|
3823
|
-
additionalDependencies["eslint-plugin-cypress"] =
|
|
3800
|
+
additionalDependencies["eslint-plugin-cypress"] = eslintDeps["eslint-plugin-cypress"];
|
|
3824
3801
|
}
|
|
3825
3802
|
const { pkg, files } = createConfig({
|
|
3826
3803
|
vueVersion: "3.x",
|
|
3804
|
+
// we currently don't support other style guides
|
|
3827
3805
|
styleGuide: "default",
|
|
3828
3806
|
hasTypeScript: needsTypeScript,
|
|
3829
3807
|
needsPrettier,
|
|
3830
3808
|
additionalConfig,
|
|
3831
3809
|
additionalDependencies
|
|
3832
3810
|
});
|
|
3811
|
+
const scripts = {
|
|
3812
|
+
// Note that we reuse .gitignore here to avoid duplicating the configuration
|
|
3813
|
+
lint: needsTypeScript ? "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" : "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
|
|
3814
|
+
};
|
|
3815
|
+
if (needsPrettier) {
|
|
3816
|
+
scripts.format = "prettier --write src/";
|
|
3817
|
+
}
|
|
3833
3818
|
const packageJsonPath = path3.resolve(rootDir, "package.json");
|
|
3834
3819
|
const existingPkg = JSON.parse(fs3.readFileSync(packageJsonPath, "utf8"));
|
|
3835
|
-
const updatedPkg = sortDependencies(
|
|
3836
|
-
deepMerge_default(deepMerge_default(existingPkg, pkg), {
|
|
3837
|
-
scripts: {
|
|
3838
|
-
lint: needsTypeScript ? "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" : "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
|
|
3839
|
-
}
|
|
3840
|
-
})
|
|
3841
|
-
);
|
|
3820
|
+
const updatedPkg = sortDependencies(deepMerge_default(deepMerge_default(existingPkg, pkg), { scripts }));
|
|
3842
3821
|
fs3.writeFileSync(packageJsonPath, JSON.stringify(updatedPkg, null, 2) + "\n", "utf-8");
|
|
3843
3822
|
for (const [fileName, content] of Object.entries(files)) {
|
|
3844
3823
|
const fullPath = path3.resolve(rootDir, fileName);
|
|
@@ -3846,10 +3825,6 @@ function renderEslint(rootDir, { needsTypeScript, needsCypress, needsCypressCT,
|
|
|
3846
3825
|
}
|
|
3847
3826
|
}
|
|
3848
3827
|
|
|
3849
|
-
// utils/banner.ts
|
|
3850
|
-
var banner = "\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";
|
|
3851
|
-
var banner_default = banner;
|
|
3852
|
-
|
|
3853
3828
|
// index.ts
|
|
3854
3829
|
function isValidPackageName(projectName) {
|
|
3855
3830
|
return /^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(projectName);
|
|
@@ -3881,9 +3856,11 @@ function emptyDir(dir) {
|
|
|
3881
3856
|
);
|
|
3882
3857
|
}
|
|
3883
3858
|
async function init() {
|
|
3884
|
-
console.log(
|
|
3885
|
-
|
|
3886
|
-
|
|
3859
|
+
console.log();
|
|
3860
|
+
console.log(
|
|
3861
|
+
process.stdout.isTTY && process.stdout.getColorDepth() > 8 ? gradientBanner : defaultBanner
|
|
3862
|
+
);
|
|
3863
|
+
console.log();
|
|
3887
3864
|
const cwd = process.cwd();
|
|
3888
3865
|
const argv = (0, import_minimist.default)(process.argv.slice(2), {
|
|
3889
3866
|
alias: {
|
|
@@ -3891,6 +3868,8 @@ ${banner_default}
|
|
|
3891
3868
|
"with-tests": ["tests"],
|
|
3892
3869
|
router: ["vue-router"]
|
|
3893
3870
|
},
|
|
3871
|
+
string: ["_"],
|
|
3872
|
+
// all arguments are treated as booleans
|
|
3894
3873
|
boolean: true
|
|
3895
3874
|
});
|
|
3896
3875
|
const isFeatureFlagsUsed = typeof (argv.default ?? argv.ts ?? argv.jsx ?? argv.router ?? argv.pinia ?? argv.tests ?? argv.vitest ?? argv.cypress ?? argv.playwright ?? argv.eslint) === "boolean";
|
|
@@ -4157,11 +4136,12 @@ Scaffolding project in ${root}...`);
|
|
|
4157
4136
|
Done. Now run:
|
|
4158
4137
|
`);
|
|
4159
4138
|
if (root !== cwd) {
|
|
4160
|
-
|
|
4139
|
+
const cdProjectName = path4.relative(cwd, root);
|
|
4140
|
+
console.log(` ${bold(green(`cd ${cdProjectName.includes(" ") ? `"${cdProjectName}"` : cdProjectName}`))}`);
|
|
4161
4141
|
}
|
|
4162
4142
|
console.log(` ${bold(green(getCommand(packageManager, "install")))}`);
|
|
4163
4143
|
if (needsPrettier) {
|
|
4164
|
-
console.log(` ${bold(green(getCommand(packageManager, "
|
|
4144
|
+
console.log(` ${bold(green(getCommand(packageManager, "format")))}`);
|
|
4165
4145
|
}
|
|
4166
4146
|
console.log(` ${bold(green(getCommand(packageManager, "dev")))}`);
|
|
4167
4147
|
console.log();
|