@kitschpatrol/eslint-config 5.3.1 → 5.4.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/bin/cli.js +102 -528
- package/dist/index.d.ts +1124 -648
- package/dist/index.js +45 -20
- package/package.json +31 -31
package/bin/cli.js
CHANGED
|
@@ -33,6 +33,78 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
mod
|
|
34
34
|
));
|
|
35
35
|
|
|
36
|
+
// ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
37
|
+
var require_picocolors = __commonJS({
|
|
38
|
+
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
39
|
+
var p = process || {};
|
|
40
|
+
var argv = p.argv || [];
|
|
41
|
+
var env2 = p.env || {};
|
|
42
|
+
var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
|
|
43
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
44
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
45
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
46
|
+
};
|
|
47
|
+
var replaceClose = (string, close, replace, index) => {
|
|
48
|
+
let result = "", cursor = 0;
|
|
49
|
+
do {
|
|
50
|
+
result += string.substring(cursor, index) + replace;
|
|
51
|
+
cursor = index + close.length;
|
|
52
|
+
index = string.indexOf(close, cursor);
|
|
53
|
+
} while (~index);
|
|
54
|
+
return result + string.substring(cursor);
|
|
55
|
+
};
|
|
56
|
+
var createColors = (enabled = isColorSupported) => {
|
|
57
|
+
let f = enabled ? formatter : () => String;
|
|
58
|
+
return {
|
|
59
|
+
isColorSupported: enabled,
|
|
60
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
61
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
62
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
63
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
64
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
65
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
66
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
67
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
68
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
69
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
70
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
71
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
72
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
73
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
74
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
75
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
76
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
77
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
78
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
79
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
80
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
81
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
82
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
83
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
84
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
85
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
86
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
87
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
88
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
89
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
90
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
91
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
92
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
93
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
94
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
95
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
96
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
97
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
98
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
99
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
100
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
module.exports = createColors();
|
|
104
|
+
module.exports.createColors = createColors;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
36
108
|
// ../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js
|
|
37
109
|
var require_cjs = __commonJS({
|
|
38
110
|
"../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js"(exports, module) {
|
|
@@ -136,495 +208,6 @@ var require_cjs = __commonJS({
|
|
|
136
208
|
}
|
|
137
209
|
});
|
|
138
210
|
|
|
139
|
-
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
140
|
-
var ANSI_BACKGROUND_OFFSET = 10;
|
|
141
|
-
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
142
|
-
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
143
|
-
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
144
|
-
var styles = {
|
|
145
|
-
modifier: {
|
|
146
|
-
reset: [0, 0],
|
|
147
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
148
|
-
bold: [1, 22],
|
|
149
|
-
dim: [2, 22],
|
|
150
|
-
italic: [3, 23],
|
|
151
|
-
underline: [4, 24],
|
|
152
|
-
overline: [53, 55],
|
|
153
|
-
inverse: [7, 27],
|
|
154
|
-
hidden: [8, 28],
|
|
155
|
-
strikethrough: [9, 29]
|
|
156
|
-
},
|
|
157
|
-
color: {
|
|
158
|
-
black: [30, 39],
|
|
159
|
-
red: [31, 39],
|
|
160
|
-
green: [32, 39],
|
|
161
|
-
yellow: [33, 39],
|
|
162
|
-
blue: [34, 39],
|
|
163
|
-
magenta: [35, 39],
|
|
164
|
-
cyan: [36, 39],
|
|
165
|
-
white: [37, 39],
|
|
166
|
-
// Bright color
|
|
167
|
-
blackBright: [90, 39],
|
|
168
|
-
gray: [90, 39],
|
|
169
|
-
// Alias of `blackBright`
|
|
170
|
-
grey: [90, 39],
|
|
171
|
-
// Alias of `blackBright`
|
|
172
|
-
redBright: [91, 39],
|
|
173
|
-
greenBright: [92, 39],
|
|
174
|
-
yellowBright: [93, 39],
|
|
175
|
-
blueBright: [94, 39],
|
|
176
|
-
magentaBright: [95, 39],
|
|
177
|
-
cyanBright: [96, 39],
|
|
178
|
-
whiteBright: [97, 39]
|
|
179
|
-
},
|
|
180
|
-
bgColor: {
|
|
181
|
-
bgBlack: [40, 49],
|
|
182
|
-
bgRed: [41, 49],
|
|
183
|
-
bgGreen: [42, 49],
|
|
184
|
-
bgYellow: [43, 49],
|
|
185
|
-
bgBlue: [44, 49],
|
|
186
|
-
bgMagenta: [45, 49],
|
|
187
|
-
bgCyan: [46, 49],
|
|
188
|
-
bgWhite: [47, 49],
|
|
189
|
-
// Bright color
|
|
190
|
-
bgBlackBright: [100, 49],
|
|
191
|
-
bgGray: [100, 49],
|
|
192
|
-
// Alias of `bgBlackBright`
|
|
193
|
-
bgGrey: [100, 49],
|
|
194
|
-
// Alias of `bgBlackBright`
|
|
195
|
-
bgRedBright: [101, 49],
|
|
196
|
-
bgGreenBright: [102, 49],
|
|
197
|
-
bgYellowBright: [103, 49],
|
|
198
|
-
bgBlueBright: [104, 49],
|
|
199
|
-
bgMagentaBright: [105, 49],
|
|
200
|
-
bgCyanBright: [106, 49],
|
|
201
|
-
bgWhiteBright: [107, 49]
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
var modifierNames = Object.keys(styles.modifier);
|
|
205
|
-
var foregroundColorNames = Object.keys(styles.color);
|
|
206
|
-
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
207
|
-
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
208
|
-
function assembleStyles() {
|
|
209
|
-
const codes = /* @__PURE__ */ new Map();
|
|
210
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
211
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
212
|
-
styles[styleName] = {
|
|
213
|
-
open: `\x1B[${style[0]}m`,
|
|
214
|
-
close: `\x1B[${style[1]}m`
|
|
215
|
-
};
|
|
216
|
-
group[styleName] = styles[styleName];
|
|
217
|
-
codes.set(style[0], style[1]);
|
|
218
|
-
}
|
|
219
|
-
Object.defineProperty(styles, groupName, {
|
|
220
|
-
value: group,
|
|
221
|
-
enumerable: false
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
Object.defineProperty(styles, "codes", {
|
|
225
|
-
value: codes,
|
|
226
|
-
enumerable: false
|
|
227
|
-
});
|
|
228
|
-
styles.color.close = "\x1B[39m";
|
|
229
|
-
styles.bgColor.close = "\x1B[49m";
|
|
230
|
-
styles.color.ansi = wrapAnsi16();
|
|
231
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
232
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
233
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
234
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
235
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
236
|
-
Object.defineProperties(styles, {
|
|
237
|
-
rgbToAnsi256: {
|
|
238
|
-
value(red, green, blue) {
|
|
239
|
-
if (red === green && green === blue) {
|
|
240
|
-
if (red < 8) {
|
|
241
|
-
return 16;
|
|
242
|
-
}
|
|
243
|
-
if (red > 248) {
|
|
244
|
-
return 231;
|
|
245
|
-
}
|
|
246
|
-
return Math.round((red - 8) / 247 * 24) + 232;
|
|
247
|
-
}
|
|
248
|
-
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
249
|
-
},
|
|
250
|
-
enumerable: false
|
|
251
|
-
},
|
|
252
|
-
hexToRgb: {
|
|
253
|
-
value(hex) {
|
|
254
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
255
|
-
if (!matches) {
|
|
256
|
-
return [0, 0, 0];
|
|
257
|
-
}
|
|
258
|
-
let [colorString] = matches;
|
|
259
|
-
if (colorString.length === 3) {
|
|
260
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
261
|
-
}
|
|
262
|
-
const integer = Number.parseInt(colorString, 16);
|
|
263
|
-
return [
|
|
264
|
-
/* eslint-disable no-bitwise */
|
|
265
|
-
integer >> 16 & 255,
|
|
266
|
-
integer >> 8 & 255,
|
|
267
|
-
integer & 255
|
|
268
|
-
/* eslint-enable no-bitwise */
|
|
269
|
-
];
|
|
270
|
-
},
|
|
271
|
-
enumerable: false
|
|
272
|
-
},
|
|
273
|
-
hexToAnsi256: {
|
|
274
|
-
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
275
|
-
enumerable: false
|
|
276
|
-
},
|
|
277
|
-
ansi256ToAnsi: {
|
|
278
|
-
value(code) {
|
|
279
|
-
if (code < 8) {
|
|
280
|
-
return 30 + code;
|
|
281
|
-
}
|
|
282
|
-
if (code < 16) {
|
|
283
|
-
return 90 + (code - 8);
|
|
284
|
-
}
|
|
285
|
-
let red;
|
|
286
|
-
let green;
|
|
287
|
-
let blue;
|
|
288
|
-
if (code >= 232) {
|
|
289
|
-
red = ((code - 232) * 10 + 8) / 255;
|
|
290
|
-
green = red;
|
|
291
|
-
blue = red;
|
|
292
|
-
} else {
|
|
293
|
-
code -= 16;
|
|
294
|
-
const remainder = code % 36;
|
|
295
|
-
red = Math.floor(code / 36) / 5;
|
|
296
|
-
green = Math.floor(remainder / 6) / 5;
|
|
297
|
-
blue = remainder % 6 / 5;
|
|
298
|
-
}
|
|
299
|
-
const value = Math.max(red, green, blue) * 2;
|
|
300
|
-
if (value === 0) {
|
|
301
|
-
return 30;
|
|
302
|
-
}
|
|
303
|
-
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
304
|
-
if (value === 2) {
|
|
305
|
-
result += 60;
|
|
306
|
-
}
|
|
307
|
-
return result;
|
|
308
|
-
},
|
|
309
|
-
enumerable: false
|
|
310
|
-
},
|
|
311
|
-
rgbToAnsi: {
|
|
312
|
-
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
313
|
-
enumerable: false
|
|
314
|
-
},
|
|
315
|
-
hexToAnsi: {
|
|
316
|
-
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
317
|
-
enumerable: false
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
return styles;
|
|
321
|
-
}
|
|
322
|
-
var ansiStyles = assembleStyles();
|
|
323
|
-
var ansi_styles_default = ansiStyles;
|
|
324
|
-
|
|
325
|
-
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/supports-color/index.js
|
|
326
|
-
import process2 from "node:process";
|
|
327
|
-
import os from "node:os";
|
|
328
|
-
import tty from "node:tty";
|
|
329
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
|
|
330
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
331
|
-
const position = argv.indexOf(prefix + flag);
|
|
332
|
-
const terminatorPosition = argv.indexOf("--");
|
|
333
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
334
|
-
}
|
|
335
|
-
var { env } = process2;
|
|
336
|
-
var flagForceColor;
|
|
337
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
338
|
-
flagForceColor = 0;
|
|
339
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
340
|
-
flagForceColor = 1;
|
|
341
|
-
}
|
|
342
|
-
function envForceColor() {
|
|
343
|
-
if ("FORCE_COLOR" in env) {
|
|
344
|
-
if (env.FORCE_COLOR === "true") {
|
|
345
|
-
return 1;
|
|
346
|
-
}
|
|
347
|
-
if (env.FORCE_COLOR === "false") {
|
|
348
|
-
return 0;
|
|
349
|
-
}
|
|
350
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
function translateLevel(level) {
|
|
354
|
-
if (level === 0) {
|
|
355
|
-
return false;
|
|
356
|
-
}
|
|
357
|
-
return {
|
|
358
|
-
level,
|
|
359
|
-
hasBasic: true,
|
|
360
|
-
has256: level >= 2,
|
|
361
|
-
has16m: level >= 3
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
365
|
-
const noFlagForceColor = envForceColor();
|
|
366
|
-
if (noFlagForceColor !== void 0) {
|
|
367
|
-
flagForceColor = noFlagForceColor;
|
|
368
|
-
}
|
|
369
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
370
|
-
if (forceColor === 0) {
|
|
371
|
-
return 0;
|
|
372
|
-
}
|
|
373
|
-
if (sniffFlags) {
|
|
374
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
375
|
-
return 3;
|
|
376
|
-
}
|
|
377
|
-
if (hasFlag("color=256")) {
|
|
378
|
-
return 2;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
382
|
-
return 1;
|
|
383
|
-
}
|
|
384
|
-
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
385
|
-
return 0;
|
|
386
|
-
}
|
|
387
|
-
const min = forceColor || 0;
|
|
388
|
-
if (env.TERM === "dumb") {
|
|
389
|
-
return min;
|
|
390
|
-
}
|
|
391
|
-
if (process2.platform === "win32") {
|
|
392
|
-
const osRelease = os.release().split(".");
|
|
393
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
394
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
395
|
-
}
|
|
396
|
-
return 1;
|
|
397
|
-
}
|
|
398
|
-
if ("CI" in env) {
|
|
399
|
-
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
|
|
400
|
-
return 3;
|
|
401
|
-
}
|
|
402
|
-
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
403
|
-
return 1;
|
|
404
|
-
}
|
|
405
|
-
return min;
|
|
406
|
-
}
|
|
407
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
408
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
409
|
-
}
|
|
410
|
-
if (env.COLORTERM === "truecolor") {
|
|
411
|
-
return 3;
|
|
412
|
-
}
|
|
413
|
-
if (env.TERM === "xterm-kitty") {
|
|
414
|
-
return 3;
|
|
415
|
-
}
|
|
416
|
-
if ("TERM_PROGRAM" in env) {
|
|
417
|
-
const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
418
|
-
switch (env.TERM_PROGRAM) {
|
|
419
|
-
case "iTerm.app": {
|
|
420
|
-
return version2 >= 3 ? 3 : 2;
|
|
421
|
-
}
|
|
422
|
-
case "Apple_Terminal": {
|
|
423
|
-
return 2;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
428
|
-
return 2;
|
|
429
|
-
}
|
|
430
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
431
|
-
return 1;
|
|
432
|
-
}
|
|
433
|
-
if ("COLORTERM" in env) {
|
|
434
|
-
return 1;
|
|
435
|
-
}
|
|
436
|
-
return min;
|
|
437
|
-
}
|
|
438
|
-
function createSupportsColor(stream, options = {}) {
|
|
439
|
-
const level = _supportsColor(stream, {
|
|
440
|
-
streamIsTTY: stream && stream.isTTY,
|
|
441
|
-
...options
|
|
442
|
-
});
|
|
443
|
-
return translateLevel(level);
|
|
444
|
-
}
|
|
445
|
-
var supportsColor = {
|
|
446
|
-
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
447
|
-
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
448
|
-
};
|
|
449
|
-
var supports_color_default = supportsColor;
|
|
450
|
-
|
|
451
|
-
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/utilities.js
|
|
452
|
-
function stringReplaceAll(string, substring, replacer) {
|
|
453
|
-
let index = string.indexOf(substring);
|
|
454
|
-
if (index === -1) {
|
|
455
|
-
return string;
|
|
456
|
-
}
|
|
457
|
-
const substringLength = substring.length;
|
|
458
|
-
let endIndex = 0;
|
|
459
|
-
let returnValue = "";
|
|
460
|
-
do {
|
|
461
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
462
|
-
endIndex = index + substringLength;
|
|
463
|
-
index = string.indexOf(substring, endIndex);
|
|
464
|
-
} while (index !== -1);
|
|
465
|
-
returnValue += string.slice(endIndex);
|
|
466
|
-
return returnValue;
|
|
467
|
-
}
|
|
468
|
-
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
469
|
-
let endIndex = 0;
|
|
470
|
-
let returnValue = "";
|
|
471
|
-
do {
|
|
472
|
-
const gotCR = string[index - 1] === "\r";
|
|
473
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
474
|
-
endIndex = index + 1;
|
|
475
|
-
index = string.indexOf("\n", endIndex);
|
|
476
|
-
} while (index !== -1);
|
|
477
|
-
returnValue += string.slice(endIndex);
|
|
478
|
-
return returnValue;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/index.js
|
|
482
|
-
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
483
|
-
var GENERATOR = Symbol("GENERATOR");
|
|
484
|
-
var STYLER = Symbol("STYLER");
|
|
485
|
-
var IS_EMPTY = Symbol("IS_EMPTY");
|
|
486
|
-
var levelMapping = [
|
|
487
|
-
"ansi",
|
|
488
|
-
"ansi",
|
|
489
|
-
"ansi256",
|
|
490
|
-
"ansi16m"
|
|
491
|
-
];
|
|
492
|
-
var styles2 = /* @__PURE__ */ Object.create(null);
|
|
493
|
-
var applyOptions = (object, options = {}) => {
|
|
494
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
495
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
496
|
-
}
|
|
497
|
-
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
498
|
-
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
499
|
-
};
|
|
500
|
-
var chalkFactory = (options) => {
|
|
501
|
-
const chalk2 = (...strings) => strings.join(" ");
|
|
502
|
-
applyOptions(chalk2, options);
|
|
503
|
-
Object.setPrototypeOf(chalk2, createChalk.prototype);
|
|
504
|
-
return chalk2;
|
|
505
|
-
};
|
|
506
|
-
function createChalk(options) {
|
|
507
|
-
return chalkFactory(options);
|
|
508
|
-
}
|
|
509
|
-
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
510
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
511
|
-
styles2[styleName] = {
|
|
512
|
-
get() {
|
|
513
|
-
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
514
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
515
|
-
return builder;
|
|
516
|
-
}
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
styles2.visible = {
|
|
520
|
-
get() {
|
|
521
|
-
const builder = createBuilder(this, this[STYLER], true);
|
|
522
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
523
|
-
return builder;
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
var getModelAnsi = (model, level, type, ...arguments_) => {
|
|
527
|
-
if (model === "rgb") {
|
|
528
|
-
if (level === "ansi16m") {
|
|
529
|
-
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
530
|
-
}
|
|
531
|
-
if (level === "ansi256") {
|
|
532
|
-
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
533
|
-
}
|
|
534
|
-
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
535
|
-
}
|
|
536
|
-
if (model === "hex") {
|
|
537
|
-
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
538
|
-
}
|
|
539
|
-
return ansi_styles_default[type][model](...arguments_);
|
|
540
|
-
};
|
|
541
|
-
var usedModels = ["rgb", "hex", "ansi256"];
|
|
542
|
-
for (const model of usedModels) {
|
|
543
|
-
styles2[model] = {
|
|
544
|
-
get() {
|
|
545
|
-
const { level } = this;
|
|
546
|
-
return function(...arguments_) {
|
|
547
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
548
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
};
|
|
552
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
553
|
-
styles2[bgModel] = {
|
|
554
|
-
get() {
|
|
555
|
-
const { level } = this;
|
|
556
|
-
return function(...arguments_) {
|
|
557
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
558
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
var proto = Object.defineProperties(() => {
|
|
564
|
-
}, {
|
|
565
|
-
...styles2,
|
|
566
|
-
level: {
|
|
567
|
-
enumerable: true,
|
|
568
|
-
get() {
|
|
569
|
-
return this[GENERATOR].level;
|
|
570
|
-
},
|
|
571
|
-
set(level) {
|
|
572
|
-
this[GENERATOR].level = level;
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
var createStyler = (open, close, parent) => {
|
|
577
|
-
let openAll;
|
|
578
|
-
let closeAll;
|
|
579
|
-
if (parent === void 0) {
|
|
580
|
-
openAll = open;
|
|
581
|
-
closeAll = close;
|
|
582
|
-
} else {
|
|
583
|
-
openAll = parent.openAll + open;
|
|
584
|
-
closeAll = close + parent.closeAll;
|
|
585
|
-
}
|
|
586
|
-
return {
|
|
587
|
-
open,
|
|
588
|
-
close,
|
|
589
|
-
openAll,
|
|
590
|
-
closeAll,
|
|
591
|
-
parent
|
|
592
|
-
};
|
|
593
|
-
};
|
|
594
|
-
var createBuilder = (self, _styler, _isEmpty) => {
|
|
595
|
-
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
596
|
-
Object.setPrototypeOf(builder, proto);
|
|
597
|
-
builder[GENERATOR] = self;
|
|
598
|
-
builder[STYLER] = _styler;
|
|
599
|
-
builder[IS_EMPTY] = _isEmpty;
|
|
600
|
-
return builder;
|
|
601
|
-
};
|
|
602
|
-
var applyStyle = (self, string) => {
|
|
603
|
-
if (self.level <= 0 || !string) {
|
|
604
|
-
return self[IS_EMPTY] ? "" : string;
|
|
605
|
-
}
|
|
606
|
-
let styler = self[STYLER];
|
|
607
|
-
if (styler === void 0) {
|
|
608
|
-
return string;
|
|
609
|
-
}
|
|
610
|
-
const { openAll, closeAll } = styler;
|
|
611
|
-
if (string.includes("\x1B")) {
|
|
612
|
-
while (styler !== void 0) {
|
|
613
|
-
string = stringReplaceAll(string, styler.close, styler.open);
|
|
614
|
-
styler = styler.parent;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
const lfIndex = string.indexOf("\n");
|
|
618
|
-
if (lfIndex !== -1) {
|
|
619
|
-
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
620
|
-
}
|
|
621
|
-
return openAll + string + closeAll;
|
|
622
|
-
};
|
|
623
|
-
Object.defineProperties(createChalk.prototype, styles2);
|
|
624
|
-
var chalk = createChalk();
|
|
625
|
-
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
626
|
-
var source_default = chalk;
|
|
627
|
-
|
|
628
211
|
// ../../src/command-builder.ts
|
|
629
212
|
import { cosmiconfig } from "cosmiconfig";
|
|
630
213
|
import { TypeScriptLoader as typeScriptLoader } from "cosmiconfig-typescript-loader";
|
|
@@ -636,17 +219,17 @@ import { PassThrough } from "node:stream";
|
|
|
636
219
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
637
220
|
|
|
638
221
|
// ../../node_modules/.pnpm/package-up@5.0.0/node_modules/package-up/index.js
|
|
639
|
-
import
|
|
222
|
+
import process3 from "node:process";
|
|
640
223
|
|
|
641
224
|
// ../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
|
|
642
|
-
import
|
|
225
|
+
import process2 from "node:process";
|
|
643
226
|
import fsPromises from "node:fs/promises";
|
|
644
227
|
import { fileURLToPath } from "node:url";
|
|
645
228
|
import fs from "node:fs";
|
|
646
229
|
import path from "node:path";
|
|
647
230
|
var toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
648
231
|
async function findUp(name, {
|
|
649
|
-
cwd =
|
|
232
|
+
cwd = process2.cwd(),
|
|
650
233
|
type = "file",
|
|
651
234
|
stopAt
|
|
652
235
|
} = {}) {
|
|
@@ -670,7 +253,7 @@ async function findUp(name, {
|
|
|
670
253
|
}
|
|
671
254
|
}
|
|
672
255
|
function findUpSync(name, {
|
|
673
|
-
cwd =
|
|
256
|
+
cwd = process2.cwd(),
|
|
674
257
|
type = "file",
|
|
675
258
|
stopAt
|
|
676
259
|
} = {}) {
|
|
@@ -695,13 +278,16 @@ function findUpSync(name, {
|
|
|
695
278
|
}
|
|
696
279
|
|
|
697
280
|
// ../../node_modules/.pnpm/package-up@5.0.0/node_modules/package-up/index.js
|
|
698
|
-
async function packageUp({ cwd =
|
|
281
|
+
async function packageUp({ cwd = process3.cwd() } = {}) {
|
|
699
282
|
return findUp("package.json", { cwd });
|
|
700
283
|
}
|
|
701
|
-
function packageUpSync({ cwd =
|
|
284
|
+
function packageUpSync({ cwd = process3.cwd() } = {}) {
|
|
702
285
|
return findUpSync("package.json", { cwd });
|
|
703
286
|
}
|
|
704
287
|
|
|
288
|
+
// ../../src/command-builder.ts
|
|
289
|
+
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
290
|
+
|
|
705
291
|
// ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/lib/platform-shims/esm.mjs
|
|
706
292
|
import { notStrictEqual, strictEqual } from "assert";
|
|
707
293
|
|
|
@@ -1647,8 +1233,8 @@ var YargsParser = class {
|
|
|
1647
1233
|
if (typeof envPrefix === "undefined")
|
|
1648
1234
|
return;
|
|
1649
1235
|
const prefix = typeof envPrefix === "string" ? envPrefix : "";
|
|
1650
|
-
const
|
|
1651
|
-
Object.keys(
|
|
1236
|
+
const env2 = mixin2.env();
|
|
1237
|
+
Object.keys(env2).forEach(function(envVar) {
|
|
1652
1238
|
if (prefix === "" || envVar.lastIndexOf(prefix, 0) === 0) {
|
|
1653
1239
|
const keys = envVar.split("__").map(function(key, i) {
|
|
1654
1240
|
if (i === 0) {
|
|
@@ -1657,7 +1243,7 @@ var YargsParser = class {
|
|
|
1657
1243
|
return camelCase(key);
|
|
1658
1244
|
});
|
|
1659
1245
|
if ((configOnly && flags.configs[keys.join(".")] || !configOnly) && !hasKey(argv2, keys)) {
|
|
1660
|
-
setArg(keys.join("."),
|
|
1246
|
+
setArg(keys.join("."), env2[envVar]);
|
|
1661
1247
|
}
|
|
1662
1248
|
}
|
|
1663
1249
|
});
|
|
@@ -1967,11 +1553,11 @@ if (nodeVersion) {
|
|
|
1967
1553
|
throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
|
|
1968
1554
|
}
|
|
1969
1555
|
}
|
|
1970
|
-
var
|
|
1556
|
+
var env = process ? process.env : {};
|
|
1971
1557
|
var parser = new YargsParser({
|
|
1972
1558
|
cwd: process.cwd,
|
|
1973
1559
|
env: () => {
|
|
1974
|
-
return
|
|
1560
|
+
return env;
|
|
1975
1561
|
},
|
|
1976
1562
|
format,
|
|
1977
1563
|
normalize,
|
|
@@ -5552,11 +5138,12 @@ var Yargs = YargsFactory(esm_default);
|
|
|
5552
5138
|
var yargs_default = Yargs;
|
|
5553
5139
|
|
|
5554
5140
|
// ../../package.json
|
|
5555
|
-
var version = "5.
|
|
5141
|
+
var version = "5.4.1";
|
|
5556
5142
|
|
|
5557
5143
|
// ../../src/execa-utilities.ts
|
|
5558
5144
|
function isErrorExecaError(error) {
|
|
5559
|
-
return error instanceof Error && "exitCode" in error &&
|
|
5145
|
+
return error instanceof Error && "exitCode" in error && // eslint-disable-next-line ts/no-unsafe-type-assertion
|
|
5146
|
+
typeof error.exitCode === "number";
|
|
5560
5147
|
}
|
|
5561
5148
|
|
|
5562
5149
|
// ../../src/json-utilities.ts
|
|
@@ -5761,13 +5348,14 @@ async function formatFileInPlace(filePath) {
|
|
|
5761
5348
|
}
|
|
5762
5349
|
|
|
5763
5350
|
// ../../src/stream-utilities.ts
|
|
5351
|
+
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
5764
5352
|
import { Transform } from "node:stream";
|
|
5765
5353
|
function createStreamTransform(logPrefix, logColor) {
|
|
5766
5354
|
return new Transform({
|
|
5767
5355
|
transform(chunk, _, callback) {
|
|
5768
5356
|
const lines = chunk.toString().split(/\r?\n/).filter((line) => line.trim().length > 0);
|
|
5769
5357
|
const transformed = lines.map(
|
|
5770
|
-
(line) => `${logPrefix ? logColor === void 0 ? logPrefix :
|
|
5358
|
+
(line) => `${logPrefix ? logColor === void 0 ? logPrefix : import_picocolors.default[logColor](logPrefix) : ""} ${line}
|
|
5771
5359
|
`
|
|
5772
5360
|
).join("");
|
|
5773
5361
|
this.push(transformed);
|
|
@@ -5806,7 +5394,7 @@ async function executeFunctionCommand(logStream, positionalArguments, optionFlag
|
|
|
5806
5394
|
}
|
|
5807
5395
|
if (verbose) {
|
|
5808
5396
|
targetStream.write(
|
|
5809
|
-
|
|
5397
|
+
import_picocolors2.default.bold(
|
|
5810
5398
|
`Running: "${command2.name}() with Positional arguments: ${String(positionalArguments)} and Option flags: ${String(optionFlags)}"`
|
|
5811
5399
|
)
|
|
5812
5400
|
);
|
|
@@ -5902,17 +5490,21 @@ async function executeCommands(logStream, positionalArguments, optionFlags, comm
|
|
|
5902
5490
|
const totalCommands = exitCodes.length;
|
|
5903
5491
|
if (successfulCommands.length > 0) {
|
|
5904
5492
|
logStream.write(
|
|
5905
|
-
`\u2705 ${
|
|
5906
|
-
|
|
5907
|
-
|
|
5493
|
+
`\u2705 ${import_picocolors2.default.green(
|
|
5494
|
+
import_picocolors2.default.bold(
|
|
5495
|
+
`${successfulCommands.length} / ${totalCommands} ${pluralize("Command", successfulCommands.length)} Succeeded:`
|
|
5496
|
+
)
|
|
5497
|
+
)} ${import_picocolors2.default.green(successfulCommands.join(", "))}
|
|
5908
5498
|
`
|
|
5909
5499
|
);
|
|
5910
5500
|
}
|
|
5911
5501
|
if (failedCommands.length > 0) {
|
|
5912
5502
|
logStream.write(
|
|
5913
|
-
`\u274C ${
|
|
5914
|
-
|
|
5915
|
-
|
|
5503
|
+
`\u274C ${import_picocolors2.default.red(
|
|
5504
|
+
import_picocolors2.default.bold(
|
|
5505
|
+
`${failedCommands.length} / ${totalCommands} ${pluralize("Command", failedCommands.length)} Failed:`
|
|
5506
|
+
)
|
|
5507
|
+
)} ${import_picocolors2.default.red(failedCommands.join(", "))}
|
|
5916
5508
|
`
|
|
5917
5509
|
);
|
|
5918
5510
|
}
|
|
@@ -6288,26 +5880,8 @@ await buildCommands(commandDefinition);
|
|
|
6288
5880
|
/*! Bundled license information:
|
|
6289
5881
|
|
|
6290
5882
|
yargs-parser/build/lib/string-utils.js:
|
|
6291
|
-
(**
|
|
6292
|
-
* @license
|
|
6293
|
-
* Copyright (c) 2016, Contributors
|
|
6294
|
-
* SPDX-License-Identifier: ISC
|
|
6295
|
-
*)
|
|
6296
|
-
|
|
6297
5883
|
yargs-parser/build/lib/tokenize-arg-string.js:
|
|
6298
|
-
(**
|
|
6299
|
-
* @license
|
|
6300
|
-
* Copyright (c) 2016, Contributors
|
|
6301
|
-
* SPDX-License-Identifier: ISC
|
|
6302
|
-
*)
|
|
6303
|
-
|
|
6304
5884
|
yargs-parser/build/lib/yargs-parser-types.js:
|
|
6305
|
-
(**
|
|
6306
|
-
* @license
|
|
6307
|
-
* Copyright (c) 2016, Contributors
|
|
6308
|
-
* SPDX-License-Identifier: ISC
|
|
6309
|
-
*)
|
|
6310
|
-
|
|
6311
5885
|
yargs-parser/build/lib/yargs-parser.js:
|
|
6312
5886
|
(**
|
|
6313
5887
|
* @license
|