vite-plus 0.1.13-alpha.4 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/global/{agent-DJMFiDyo.js → agent-BuEmv_K7.js} +4 -4
- package/dist/global/{browser-uvD86DGo.js → browser-09BZLUYM.js} +1 -1
- package/dist/global/{browser-DnJIp99-.js → browser-C-E79Nt0.js} +1 -1
- package/dist/global/{chunk-CgnkrU7a.js → chunk-BoAXSpZd.js} +1 -7
- package/dist/global/config.js +2 -2
- package/dist/global/create.js +4 -4
- package/dist/global/migrate.js +4 -4
- package/dist/global/staged.js +302 -1744
- package/dist/global/{workspace-BXUHASR6.js → workspace-CVWspacc.js} +2 -2
- package/package.json +14 -14
package/dist/global/staged.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as __toESM, t as __commonJSMin } from "./chunk-BoAXSpZd.js";
|
|
2
2
|
import { t as lib_default } from "./lib-DxappLRQ.js";
|
|
3
3
|
import { i as log, r as errorMsg, t as renderCliDoc } from "./help-HviKaKAU.js";
|
|
4
4
|
import path, { delimiter, dirname, normalize, resolve } from "node:path";
|
|
5
5
|
import { formatWithOptions, inspect, promisify } from "node:util";
|
|
6
6
|
import { cwd } from "node:process";
|
|
7
|
-
import
|
|
7
|
+
import c from "node:readline";
|
|
8
8
|
import nodeTty from "node:tty";
|
|
9
9
|
import { constants } from "node:fs";
|
|
10
10
|
import { vitePlusHeader } from "../../binding/index.js";
|
|
@@ -21,7 +21,7 @@ import { Writable as Writable$1 } from "stream";
|
|
|
21
21
|
import { randomUUID } from "crypto";
|
|
22
22
|
import { EOL as EOL$1 } from "node:os";
|
|
23
23
|
import crypto from "node:crypto";
|
|
24
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
24
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/colors.js
|
|
25
25
|
/**
|
|
26
26
|
* @example NO_COLOR
|
|
27
27
|
* @example NO_COLOR=1
|
|
@@ -99,7 +99,7 @@ const blue$1 = wrapAnsiColor("\x1B[0;34m");
|
|
|
99
99
|
const blackBright$1 = wrapAnsiColor("\x1B[0;90m");
|
|
100
100
|
const bold$1 = wrapAnsiColor("\x1B[1m");
|
|
101
101
|
//#endregion
|
|
102
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
102
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/debug.js
|
|
103
103
|
const format$1 = (...args) => formatWithOptions({ colors: SUPPORTS_COLOR }, ...args);
|
|
104
104
|
let activeLogger;
|
|
105
105
|
const enableDebug = (logger = console) => {
|
|
@@ -637,7 +637,7 @@ var L = class {
|
|
|
637
637
|
if (this._streamErr) t.push(this._streamErr);
|
|
638
638
|
if (this._streamOut) t.push(this._streamOut);
|
|
639
639
|
const n = g(t);
|
|
640
|
-
const r =
|
|
640
|
+
const r = c.createInterface({ input: n });
|
|
641
641
|
for await (const e of r) yield e.toString();
|
|
642
642
|
await this._processClosed;
|
|
643
643
|
e.removeAllListeners();
|
|
@@ -717,8 +717,10 @@ const R = (e, t, n) => {
|
|
|
717
717
|
};
|
|
718
718
|
const z = R;
|
|
719
719
|
//#endregion
|
|
720
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
720
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/execGit.js
|
|
721
721
|
const debugLog$15 = createDebug("lint-staged:execGit");
|
|
722
|
+
/** @example "warning: in the working copy of 'README.md', LF will be replaced by CRLF the next time Git touches it" */
|
|
723
|
+
const GIT_CRLF_WARNING = /^warning.*CRLF.*the next time Git touches it/i;
|
|
722
724
|
/**
|
|
723
725
|
* Explicitly never recurse commands into submodules, overriding local/global configuration.
|
|
724
726
|
* @see https://git-scm.com/docs/git-config#Documentation/git-config.txt-submodulerecurse
|
|
@@ -733,7 +735,13 @@ const execGit = async (cmd, options) => {
|
|
|
733
735
|
stdio: ["ignore"]
|
|
734
736
|
} });
|
|
735
737
|
let output = "";
|
|
736
|
-
for await (const line of result)
|
|
738
|
+
for await (const line of result) {
|
|
739
|
+
if (GIT_CRLF_WARNING.test(line)) {
|
|
740
|
+
debugLog$15("Stripped Git CRLF warning: %s", line);
|
|
741
|
+
continue;
|
|
742
|
+
}
|
|
743
|
+
output += line + "\n";
|
|
744
|
+
}
|
|
737
745
|
output = output.trimEnd();
|
|
738
746
|
if (result.exitCode > 0) throw new Error(output, { cause: result });
|
|
739
747
|
return output;
|
|
@@ -3069,12 +3077,12 @@ var Listr = class {
|
|
|
3069
3077
|
}
|
|
3070
3078
|
};
|
|
3071
3079
|
//#endregion
|
|
3072
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
3080
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/figures.js
|
|
3073
3081
|
const info = blue$1(figures.arrowRight);
|
|
3074
3082
|
const error = red$1(figures.cross);
|
|
3075
3083
|
const warning = yellow$1(figures.warning);
|
|
3076
3084
|
//#endregion
|
|
3077
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
3085
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/messages.js
|
|
3078
3086
|
const configurationError = (opt, helpMsg, value) => `${red$1(`${error} Validation Error:`)}
|
|
3079
3087
|
|
|
3080
3088
|
Invalid value for '${bold$1(opt)}': ${bold$1(inspect(value))}
|
|
@@ -3122,7 +3130,7 @@ ${error}
|
|
|
3122
3130
|
See https://github.com/okonet/lint-staged#configuration.`;
|
|
3123
3131
|
const UNSTAGED_CHANGES_BACKUP_STASH_LOCATION = `Unstaged changes have been kept back in a patch file:`;
|
|
3124
3132
|
//#endregion
|
|
3125
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
3133
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/printTaskOutput.js
|
|
3126
3134
|
/**
|
|
3127
3135
|
* Handle logging of listr `ctx.output` to the specified `logger`
|
|
3128
3136
|
* @param {Object} ctx - The listr initial state
|
|
@@ -3134,7 +3142,7 @@ const printTaskOutput = (ctx = {}, logger) => {
|
|
|
3134
3142
|
for (const line of ctx.output) log(line);
|
|
3135
3143
|
};
|
|
3136
3144
|
//#endregion
|
|
3137
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
3145
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/normalizePath.js
|
|
3138
3146
|
/**
|
|
3139
3147
|
* Reimplementation of "normalize-path"
|
|
3140
3148
|
* @see https://github.com/jonschlinkert/normalize-path/blob/52c3a95ebebc2d98c1ad7606cbafa7e658656899/index.js
|
|
@@ -3170,7 +3178,7 @@ const normalizePath = (input) => {
|
|
|
3170
3178
|
return normalized;
|
|
3171
3179
|
};
|
|
3172
3180
|
//#endregion
|
|
3173
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
3181
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/chunkFiles.js
|
|
3174
3182
|
const debugLog$14 = createDebug("lint-staged:chunkFiles");
|
|
3175
3183
|
/**
|
|
3176
3184
|
* Chunk array into sub-arrays
|
|
@@ -3221,1311 +3229,239 @@ const chunkFiles = ({ files, baseDir, maxArgLength = null, relative = false }) =
|
|
|
3221
3229
|
return chunkArray(normalizedFiles, chunkCount);
|
|
3222
3230
|
};
|
|
3223
3231
|
//#endregion
|
|
3224
|
-
//#region ../../node_modules/.pnpm/
|
|
3225
|
-
var
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
if (typeof num === "string" && num.trim() !== "") return Number.isInteger(Number(num));
|
|
3229
|
-
return false;
|
|
3230
|
-
};
|
|
3231
|
-
/**
|
|
3232
|
-
* Find a node of the given type
|
|
3233
|
-
*/
|
|
3234
|
-
exports.find = (node, type) => node.nodes.find((node) => node.type === type);
|
|
3232
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js
|
|
3233
|
+
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3234
|
+
const WIN_SLASH = "\\\\/";
|
|
3235
|
+
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
3235
3236
|
/**
|
|
3236
|
-
*
|
|
3237
|
+
* Posix glob regex
|
|
3237
3238
|
*/
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3239
|
+
const DOT_LITERAL = "\\.";
|
|
3240
|
+
const PLUS_LITERAL = "\\+";
|
|
3241
|
+
const QMARK_LITERAL = "\\?";
|
|
3242
|
+
const SLASH_LITERAL = "\\/";
|
|
3243
|
+
const ONE_CHAR = "(?=.)";
|
|
3244
|
+
const QMARK = "[^/]";
|
|
3245
|
+
const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
|
|
3246
|
+
const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
|
|
3247
|
+
const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
|
|
3248
|
+
const POSIX_CHARS = {
|
|
3249
|
+
DOT_LITERAL,
|
|
3250
|
+
PLUS_LITERAL,
|
|
3251
|
+
QMARK_LITERAL,
|
|
3252
|
+
SLASH_LITERAL,
|
|
3253
|
+
ONE_CHAR,
|
|
3254
|
+
QMARK,
|
|
3255
|
+
END_ANCHOR,
|
|
3256
|
+
DOTS_SLASH,
|
|
3257
|
+
NO_DOT: `(?!${DOT_LITERAL})`,
|
|
3258
|
+
NO_DOTS: `(?!${START_ANCHOR}${DOTS_SLASH})`,
|
|
3259
|
+
NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`,
|
|
3260
|
+
NO_DOTS_SLASH: `(?!${DOTS_SLASH})`,
|
|
3261
|
+
QMARK_NO_DOT: `[^.${SLASH_LITERAL}]`,
|
|
3262
|
+
STAR: `${QMARK}*?`,
|
|
3263
|
+
START_ANCHOR,
|
|
3264
|
+
SEP: "/"
|
|
3242
3265
|
};
|
|
3243
3266
|
/**
|
|
3244
|
-
*
|
|
3267
|
+
* Windows glob regex
|
|
3245
3268
|
*/
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
}
|
|
3269
|
+
const WINDOWS_CHARS = {
|
|
3270
|
+
...POSIX_CHARS,
|
|
3271
|
+
SLASH_LITERAL: `[${WIN_SLASH}]`,
|
|
3272
|
+
QMARK: WIN_NO_SLASH,
|
|
3273
|
+
STAR: `${WIN_NO_SLASH}*?`,
|
|
3274
|
+
DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
|
|
3275
|
+
NO_DOT: `(?!${DOT_LITERAL})`,
|
|
3276
|
+
NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
|
3277
|
+
NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
|
|
3278
|
+
NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
|
3279
|
+
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
|
|
3280
|
+
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
|
|
3281
|
+
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
|
|
3282
|
+
SEP: "\\"
|
|
3255
3283
|
};
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3284
|
+
module.exports = {
|
|
3285
|
+
MAX_LENGTH: 1024 * 64,
|
|
3286
|
+
POSIX_REGEX_SOURCE: {
|
|
3287
|
+
alnum: "a-zA-Z0-9",
|
|
3288
|
+
alpha: "a-zA-Z",
|
|
3289
|
+
ascii: "\\x00-\\x7F",
|
|
3290
|
+
blank: " \\t",
|
|
3291
|
+
cntrl: "\\x00-\\x1F\\x7F",
|
|
3292
|
+
digit: "0-9",
|
|
3293
|
+
graph: "\\x21-\\x7E",
|
|
3294
|
+
lower: "a-z",
|
|
3295
|
+
print: "\\x20-\\x7E ",
|
|
3296
|
+
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
|
|
3297
|
+
space: " \\t\\r\\n\\v\\f",
|
|
3298
|
+
upper: "A-Z",
|
|
3299
|
+
word: "A-Za-z0-9_",
|
|
3300
|
+
xdigit: "A-Fa-f0-9"
|
|
3301
|
+
},
|
|
3302
|
+
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
3303
|
+
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
3304
|
+
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
|
3305
|
+
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
|
|
3306
|
+
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
3307
|
+
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
3308
|
+
REPLACEMENTS: {
|
|
3309
|
+
__proto__: null,
|
|
3310
|
+
"***": "*",
|
|
3311
|
+
"**/**": "**",
|
|
3312
|
+
"**/**/**": "**"
|
|
3313
|
+
},
|
|
3314
|
+
CHAR_0: 48,
|
|
3315
|
+
CHAR_9: 57,
|
|
3316
|
+
CHAR_UPPERCASE_A: 65,
|
|
3317
|
+
CHAR_LOWERCASE_A: 97,
|
|
3318
|
+
CHAR_UPPERCASE_Z: 90,
|
|
3319
|
+
CHAR_LOWERCASE_Z: 122,
|
|
3320
|
+
CHAR_LEFT_PARENTHESES: 40,
|
|
3321
|
+
CHAR_RIGHT_PARENTHESES: 41,
|
|
3322
|
+
CHAR_ASTERISK: 42,
|
|
3323
|
+
CHAR_AMPERSAND: 38,
|
|
3324
|
+
CHAR_AT: 64,
|
|
3325
|
+
CHAR_BACKWARD_SLASH: 92,
|
|
3326
|
+
CHAR_CARRIAGE_RETURN: 13,
|
|
3327
|
+
CHAR_CIRCUMFLEX_ACCENT: 94,
|
|
3328
|
+
CHAR_COLON: 58,
|
|
3329
|
+
CHAR_COMMA: 44,
|
|
3330
|
+
CHAR_DOT: 46,
|
|
3331
|
+
CHAR_DOUBLE_QUOTE: 34,
|
|
3332
|
+
CHAR_EQUAL: 61,
|
|
3333
|
+
CHAR_EXCLAMATION_MARK: 33,
|
|
3334
|
+
CHAR_FORM_FEED: 12,
|
|
3335
|
+
CHAR_FORWARD_SLASH: 47,
|
|
3336
|
+
CHAR_GRAVE_ACCENT: 96,
|
|
3337
|
+
CHAR_HASH: 35,
|
|
3338
|
+
CHAR_HYPHEN_MINUS: 45,
|
|
3339
|
+
CHAR_LEFT_ANGLE_BRACKET: 60,
|
|
3340
|
+
CHAR_LEFT_CURLY_BRACE: 123,
|
|
3341
|
+
CHAR_LEFT_SQUARE_BRACKET: 91,
|
|
3342
|
+
CHAR_LINE_FEED: 10,
|
|
3343
|
+
CHAR_NO_BREAK_SPACE: 160,
|
|
3344
|
+
CHAR_PERCENT: 37,
|
|
3345
|
+
CHAR_PLUS: 43,
|
|
3346
|
+
CHAR_QUESTION_MARK: 63,
|
|
3347
|
+
CHAR_RIGHT_ANGLE_BRACKET: 62,
|
|
3348
|
+
CHAR_RIGHT_CURLY_BRACE: 125,
|
|
3349
|
+
CHAR_RIGHT_SQUARE_BRACKET: 93,
|
|
3350
|
+
CHAR_SEMICOLON: 59,
|
|
3351
|
+
CHAR_SINGLE_QUOTE: 39,
|
|
3352
|
+
CHAR_SPACE: 32,
|
|
3353
|
+
CHAR_TAB: 9,
|
|
3354
|
+
CHAR_UNDERSCORE: 95,
|
|
3355
|
+
CHAR_VERTICAL_LINE: 124,
|
|
3356
|
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
3357
|
+
extglobChars(chars) {
|
|
3358
|
+
return {
|
|
3359
|
+
"!": {
|
|
3360
|
+
type: "negate",
|
|
3361
|
+
open: "(?:(?!(?:",
|
|
3362
|
+
close: `))${chars.STAR})`
|
|
3363
|
+
},
|
|
3364
|
+
"?": {
|
|
3365
|
+
type: "qmark",
|
|
3366
|
+
open: "(?:",
|
|
3367
|
+
close: ")?"
|
|
3368
|
+
},
|
|
3369
|
+
"+": {
|
|
3370
|
+
type: "plus",
|
|
3371
|
+
open: "(?:",
|
|
3372
|
+
close: ")+"
|
|
3373
|
+
},
|
|
3374
|
+
"*": {
|
|
3375
|
+
type: "star",
|
|
3376
|
+
open: "(?:",
|
|
3377
|
+
close: ")*"
|
|
3378
|
+
},
|
|
3379
|
+
"@": {
|
|
3380
|
+
type: "at",
|
|
3381
|
+
open: "(?:",
|
|
3382
|
+
close: ")"
|
|
3383
|
+
}
|
|
3384
|
+
};
|
|
3385
|
+
},
|
|
3386
|
+
globChars(win32) {
|
|
3387
|
+
return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
|
|
3264
3388
|
}
|
|
3265
|
-
return false;
|
|
3266
3389
|
};
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3390
|
+
}));
|
|
3391
|
+
//#endregion
|
|
3392
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js
|
|
3393
|
+
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3394
|
+
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
|
|
3395
|
+
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
3396
|
+
exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
|
|
3397
|
+
exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
|
|
3398
|
+
exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
|
|
3399
|
+
exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
|
|
3400
|
+
exports.isWindows = () => {
|
|
3401
|
+
if (typeof navigator !== "undefined" && navigator.platform) {
|
|
3402
|
+
const platform = navigator.platform.toLowerCase();
|
|
3403
|
+
return platform === "win32" || platform === "windows";
|
|
3280
3404
|
}
|
|
3405
|
+
if (typeof process !== "undefined" && process.platform) return process.platform === "win32";
|
|
3281
3406
|
return false;
|
|
3282
3407
|
};
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
if (node.type === "open" || node.type === "close") return true;
|
|
3288
|
-
return node.open === true || node.close === true;
|
|
3408
|
+
exports.removeBackslashes = (str) => {
|
|
3409
|
+
return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
|
|
3410
|
+
return match === "\\" ? "" : match;
|
|
3411
|
+
});
|
|
3289
3412
|
};
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
if (node.type === "range") node.type = "text";
|
|
3296
|
-
return acc;
|
|
3297
|
-
}, []);
|
|
3298
|
-
/**
|
|
3299
|
-
* Flatten an array
|
|
3300
|
-
*/
|
|
3301
|
-
exports.flatten = (...args) => {
|
|
3302
|
-
const result = [];
|
|
3303
|
-
const flat = (arr) => {
|
|
3304
|
-
for (let i = 0; i < arr.length; i++) {
|
|
3305
|
-
const ele = arr[i];
|
|
3306
|
-
if (Array.isArray(ele)) {
|
|
3307
|
-
flat(ele);
|
|
3308
|
-
continue;
|
|
3309
|
-
}
|
|
3310
|
-
if (ele !== void 0) result.push(ele);
|
|
3311
|
-
}
|
|
3312
|
-
return result;
|
|
3313
|
-
};
|
|
3314
|
-
flat(args);
|
|
3315
|
-
return result;
|
|
3413
|
+
exports.escapeLast = (input, char, lastIdx) => {
|
|
3414
|
+
const idx = input.lastIndexOf(char, lastIdx);
|
|
3415
|
+
if (idx === -1) return input;
|
|
3416
|
+
if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
|
|
3417
|
+
return `${input.slice(0, idx)}\\${input.slice(idx)}`;
|
|
3316
3418
|
};
|
|
3317
|
-
})
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
|
|
3325
|
-
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
|
3326
|
-
let output = "";
|
|
3327
|
-
if (node.value) {
|
|
3328
|
-
if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) return "\\" + node.value;
|
|
3329
|
-
return node.value;
|
|
3330
|
-
}
|
|
3331
|
-
if (node.value) return node.value;
|
|
3332
|
-
if (node.nodes) for (const child of node.nodes) output += stringify(child);
|
|
3333
|
-
return output;
|
|
3334
|
-
};
|
|
3335
|
-
return stringify(ast);
|
|
3419
|
+
exports.removePrefix = (input, state = {}) => {
|
|
3420
|
+
let output = input;
|
|
3421
|
+
if (output.startsWith("./")) {
|
|
3422
|
+
output = output.slice(2);
|
|
3423
|
+
state.prefix = "./";
|
|
3424
|
+
}
|
|
3425
|
+
return output;
|
|
3336
3426
|
};
|
|
3337
|
-
})
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
module.exports = function(num) {
|
|
3348
|
-
if (typeof num === "number") return num - num === 0;
|
|
3349
|
-
if (typeof num === "string" && num.trim() !== "") return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
|
|
3350
|
-
return false;
|
|
3427
|
+
exports.wrapOutput = (input, state = {}, options = {}) => {
|
|
3428
|
+
let output = `${options.contains ? "" : "^"}(?:${input})${options.contains ? "" : "$"}`;
|
|
3429
|
+
if (state.negated === true) output = `(?:^(?!${output}).*$)`;
|
|
3430
|
+
return output;
|
|
3431
|
+
};
|
|
3432
|
+
exports.basename = (path, { windows } = {}) => {
|
|
3433
|
+
const segs = path.split(windows ? /[\\/]/ : "/");
|
|
3434
|
+
const last = segs[segs.length - 1];
|
|
3435
|
+
if (last === "") return segs[segs.length - 2];
|
|
3436
|
+
return last;
|
|
3351
3437
|
};
|
|
3352
3438
|
}));
|
|
3353
3439
|
//#endregion
|
|
3354
|
-
//#region ../../node_modules/.pnpm/
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
const toRegexRange = (min, max, options) => {
|
|
3364
|
-
if (isNumber(min) === false) throw new TypeError("toRegexRange: expected the first argument to be a number");
|
|
3365
|
-
if (max === void 0 || min === max) return String(min);
|
|
3366
|
-
if (isNumber(max) === false) throw new TypeError("toRegexRange: expected the second argument to be a number.");
|
|
3367
|
-
let opts = {
|
|
3368
|
-
relaxZeros: true,
|
|
3369
|
-
...options
|
|
3370
|
-
};
|
|
3371
|
-
if (typeof opts.strictZeros === "boolean") opts.relaxZeros = opts.strictZeros === false;
|
|
3372
|
-
let relax = String(opts.relaxZeros);
|
|
3373
|
-
let shorthand = String(opts.shorthand);
|
|
3374
|
-
let capture = String(opts.capture);
|
|
3375
|
-
let wrap = String(opts.wrap);
|
|
3376
|
-
let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
|
|
3377
|
-
if (toRegexRange.cache.hasOwnProperty(cacheKey)) return toRegexRange.cache[cacheKey].result;
|
|
3378
|
-
let a = Math.min(min, max);
|
|
3379
|
-
let b = Math.max(min, max);
|
|
3380
|
-
if (Math.abs(a - b) === 1) {
|
|
3381
|
-
let result = min + "|" + max;
|
|
3382
|
-
if (opts.capture) return `(${result})`;
|
|
3383
|
-
if (opts.wrap === false) return result;
|
|
3384
|
-
return `(?:${result})`;
|
|
3385
|
-
}
|
|
3386
|
-
let isPadded = hasPadding(min) || hasPadding(max);
|
|
3387
|
-
let state = {
|
|
3388
|
-
min,
|
|
3389
|
-
max,
|
|
3390
|
-
a,
|
|
3391
|
-
b
|
|
3392
|
-
};
|
|
3393
|
-
let positives = [];
|
|
3394
|
-
let negatives = [];
|
|
3395
|
-
if (isPadded) {
|
|
3396
|
-
state.isPadded = isPadded;
|
|
3397
|
-
state.maxLen = String(state.max).length;
|
|
3398
|
-
}
|
|
3399
|
-
if (a < 0) {
|
|
3400
|
-
negatives = splitToPatterns(b < 0 ? Math.abs(b) : 1, Math.abs(a), state, opts);
|
|
3401
|
-
a = state.a = 0;
|
|
3402
|
-
}
|
|
3403
|
-
if (b >= 0) positives = splitToPatterns(a, b, state, opts);
|
|
3404
|
-
state.negatives = negatives;
|
|
3405
|
-
state.positives = positives;
|
|
3406
|
-
state.result = collatePatterns(negatives, positives, opts);
|
|
3407
|
-
if (opts.capture === true) state.result = `(${state.result})`;
|
|
3408
|
-
else if (opts.wrap !== false && positives.length + negatives.length > 1) state.result = `(?:${state.result})`;
|
|
3409
|
-
toRegexRange.cache[cacheKey] = state;
|
|
3410
|
-
return state.result;
|
|
3440
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js
|
|
3441
|
+
var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3442
|
+
const utils = require_utils();
|
|
3443
|
+
const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
|
|
3444
|
+
const isPathSeparator = (code) => {
|
|
3445
|
+
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
|
3446
|
+
};
|
|
3447
|
+
const depth = (token) => {
|
|
3448
|
+
if (token.isPrefix !== true) token.depth = token.isGlobstar ? Infinity : 1;
|
|
3411
3449
|
};
|
|
3412
|
-
function collatePatterns(neg, pos, options) {
|
|
3413
|
-
let onlyNegative = filterPatterns(neg, pos, "-", false, options) || [];
|
|
3414
|
-
let onlyPositive = filterPatterns(pos, neg, "", false, options) || [];
|
|
3415
|
-
let intersected = filterPatterns(neg, pos, "-?", true, options) || [];
|
|
3416
|
-
return onlyNegative.concat(intersected).concat(onlyPositive).join("|");
|
|
3417
|
-
}
|
|
3418
|
-
function splitToRanges(min, max) {
|
|
3419
|
-
let nines = 1;
|
|
3420
|
-
let zeros = 1;
|
|
3421
|
-
let stop = countNines(min, nines);
|
|
3422
|
-
let stops = new Set([max]);
|
|
3423
|
-
while (min <= stop && stop <= max) {
|
|
3424
|
-
stops.add(stop);
|
|
3425
|
-
nines += 1;
|
|
3426
|
-
stop = countNines(min, nines);
|
|
3427
|
-
}
|
|
3428
|
-
stop = countZeros(max + 1, zeros) - 1;
|
|
3429
|
-
while (min < stop && stop <= max) {
|
|
3430
|
-
stops.add(stop);
|
|
3431
|
-
zeros += 1;
|
|
3432
|
-
stop = countZeros(max + 1, zeros) - 1;
|
|
3433
|
-
}
|
|
3434
|
-
stops = [...stops];
|
|
3435
|
-
stops.sort(compare);
|
|
3436
|
-
return stops;
|
|
3437
|
-
}
|
|
3438
3450
|
/**
|
|
3439
|
-
*
|
|
3440
|
-
*
|
|
3441
|
-
*
|
|
3442
|
-
*
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
let count = 0;
|
|
3454
|
-
for (let i = 0; i < digits; i++) {
|
|
3455
|
-
let [startDigit, stopDigit] = zipped[i];
|
|
3456
|
-
if (startDigit === stopDigit) pattern += startDigit;
|
|
3457
|
-
else if (startDigit !== "0" || stopDigit !== "9") pattern += toCharacterClass(startDigit, stopDigit, options);
|
|
3458
|
-
else count++;
|
|
3459
|
-
}
|
|
3460
|
-
if (count) pattern += options.shorthand === true ? "\\d" : "[0-9]";
|
|
3461
|
-
return {
|
|
3462
|
-
pattern,
|
|
3463
|
-
count: [count],
|
|
3464
|
-
digits
|
|
3465
|
-
};
|
|
3466
|
-
}
|
|
3467
|
-
function splitToPatterns(min, max, tok, options) {
|
|
3468
|
-
let ranges = splitToRanges(min, max);
|
|
3469
|
-
let tokens = [];
|
|
3470
|
-
let start = min;
|
|
3471
|
-
let prev;
|
|
3472
|
-
for (let i = 0; i < ranges.length; i++) {
|
|
3473
|
-
let max = ranges[i];
|
|
3474
|
-
let obj = rangeToPattern(String(start), String(max), options);
|
|
3475
|
-
let zeros = "";
|
|
3476
|
-
if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
|
|
3477
|
-
if (prev.count.length > 1) prev.count.pop();
|
|
3478
|
-
prev.count.push(obj.count[0]);
|
|
3479
|
-
prev.string = prev.pattern + toQuantifier(prev.count);
|
|
3480
|
-
start = max + 1;
|
|
3481
|
-
continue;
|
|
3482
|
-
}
|
|
3483
|
-
if (tok.isPadded) zeros = padZeros(max, tok, options);
|
|
3484
|
-
obj.string = zeros + obj.pattern + toQuantifier(obj.count);
|
|
3485
|
-
tokens.push(obj);
|
|
3486
|
-
start = max + 1;
|
|
3487
|
-
prev = obj;
|
|
3488
|
-
}
|
|
3489
|
-
return tokens;
|
|
3490
|
-
}
|
|
3491
|
-
function filterPatterns(arr, comparison, prefix, intersection, options) {
|
|
3492
|
-
let result = [];
|
|
3493
|
-
for (let ele of arr) {
|
|
3494
|
-
let { string } = ele;
|
|
3495
|
-
if (!intersection && !contains(comparison, "string", string)) result.push(prefix + string);
|
|
3496
|
-
if (intersection && contains(comparison, "string", string)) result.push(prefix + string);
|
|
3497
|
-
}
|
|
3498
|
-
return result;
|
|
3499
|
-
}
|
|
3500
|
-
/**
|
|
3501
|
-
* Zip strings
|
|
3502
|
-
*/
|
|
3503
|
-
function zip(a, b) {
|
|
3504
|
-
let arr = [];
|
|
3505
|
-
for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
|
|
3506
|
-
return arr;
|
|
3507
|
-
}
|
|
3508
|
-
function compare(a, b) {
|
|
3509
|
-
return a > b ? 1 : b > a ? -1 : 0;
|
|
3510
|
-
}
|
|
3511
|
-
function contains(arr, key, val) {
|
|
3512
|
-
return arr.some((ele) => ele[key] === val);
|
|
3513
|
-
}
|
|
3514
|
-
function countNines(min, len) {
|
|
3515
|
-
return Number(String(min).slice(0, -len) + "9".repeat(len));
|
|
3516
|
-
}
|
|
3517
|
-
function countZeros(integer, zeros) {
|
|
3518
|
-
return integer - integer % Math.pow(10, zeros);
|
|
3519
|
-
}
|
|
3520
|
-
function toQuantifier(digits) {
|
|
3521
|
-
let [start = 0, stop = ""] = digits;
|
|
3522
|
-
if (stop || start > 1) return `{${start + (stop ? "," + stop : "")}}`;
|
|
3523
|
-
return "";
|
|
3524
|
-
}
|
|
3525
|
-
function toCharacterClass(a, b, options) {
|
|
3526
|
-
return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
|
|
3527
|
-
}
|
|
3528
|
-
function hasPadding(str) {
|
|
3529
|
-
return /^-?(0+)\d/.test(str);
|
|
3530
|
-
}
|
|
3531
|
-
function padZeros(value, tok, options) {
|
|
3532
|
-
if (!tok.isPadded) return value;
|
|
3533
|
-
let diff = Math.abs(tok.maxLen - String(value).length);
|
|
3534
|
-
let relax = options.relaxZeros !== false;
|
|
3535
|
-
switch (diff) {
|
|
3536
|
-
case 0: return "";
|
|
3537
|
-
case 1: return relax ? "0?" : "0";
|
|
3538
|
-
case 2: return relax ? "0{0,2}" : "00";
|
|
3539
|
-
default: return relax ? `0{0,${diff}}` : `0{${diff}}`;
|
|
3540
|
-
}
|
|
3541
|
-
}
|
|
3542
|
-
/**
|
|
3543
|
-
* Cache
|
|
3544
|
-
*/
|
|
3545
|
-
toRegexRange.cache = {};
|
|
3546
|
-
toRegexRange.clearCache = () => toRegexRange.cache = {};
|
|
3547
|
-
/**
|
|
3548
|
-
* Expose `toRegexRange`
|
|
3549
|
-
*/
|
|
3550
|
-
module.exports = toRegexRange;
|
|
3551
|
-
}));
|
|
3552
|
-
//#endregion
|
|
3553
|
-
//#region ../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js
|
|
3554
|
-
/*!
|
|
3555
|
-
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
3556
|
-
*
|
|
3557
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
3558
|
-
* Licensed under the MIT License.
|
|
3559
|
-
*/
|
|
3560
|
-
var require_fill_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3561
|
-
const util$1 = __require("util");
|
|
3562
|
-
const toRegexRange = require_to_regex_range();
|
|
3563
|
-
const isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
3564
|
-
const transform = (toNumber) => {
|
|
3565
|
-
return (value) => toNumber === true ? Number(value) : String(value);
|
|
3566
|
-
};
|
|
3567
|
-
const isValidValue = (value) => {
|
|
3568
|
-
return typeof value === "number" || typeof value === "string" && value !== "";
|
|
3569
|
-
};
|
|
3570
|
-
const isNumber = (num) => Number.isInteger(+num);
|
|
3571
|
-
const zeros = (input) => {
|
|
3572
|
-
let value = `${input}`;
|
|
3573
|
-
let index = -1;
|
|
3574
|
-
if (value[0] === "-") value = value.slice(1);
|
|
3575
|
-
if (value === "0") return false;
|
|
3576
|
-
while (value[++index] === "0");
|
|
3577
|
-
return index > 0;
|
|
3578
|
-
};
|
|
3579
|
-
const stringify = (start, end, options) => {
|
|
3580
|
-
if (typeof start === "string" || typeof end === "string") return true;
|
|
3581
|
-
return options.stringify === true;
|
|
3582
|
-
};
|
|
3583
|
-
const pad = (input, maxLength, toNumber) => {
|
|
3584
|
-
if (maxLength > 0) {
|
|
3585
|
-
let dash = input[0] === "-" ? "-" : "";
|
|
3586
|
-
if (dash) input = input.slice(1);
|
|
3587
|
-
input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
|
|
3588
|
-
}
|
|
3589
|
-
if (toNumber === false) return String(input);
|
|
3590
|
-
return input;
|
|
3591
|
-
};
|
|
3592
|
-
const toMaxLen = (input, maxLength) => {
|
|
3593
|
-
let negative = input[0] === "-" ? "-" : "";
|
|
3594
|
-
if (negative) {
|
|
3595
|
-
input = input.slice(1);
|
|
3596
|
-
maxLength--;
|
|
3597
|
-
}
|
|
3598
|
-
while (input.length < maxLength) input = "0" + input;
|
|
3599
|
-
return negative ? "-" + input : input;
|
|
3600
|
-
};
|
|
3601
|
-
const toSequence = (parts, options, maxLen) => {
|
|
3602
|
-
parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
3603
|
-
parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
3604
|
-
let prefix = options.capture ? "" : "?:";
|
|
3605
|
-
let positives = "";
|
|
3606
|
-
let negatives = "";
|
|
3607
|
-
let result;
|
|
3608
|
-
if (parts.positives.length) positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|");
|
|
3609
|
-
if (parts.negatives.length) negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`;
|
|
3610
|
-
if (positives && negatives) result = `${positives}|${negatives}`;
|
|
3611
|
-
else result = positives || negatives;
|
|
3612
|
-
if (options.wrap) return `(${prefix}${result})`;
|
|
3613
|
-
return result;
|
|
3614
|
-
};
|
|
3615
|
-
const toRange = (a, b, isNumbers, options) => {
|
|
3616
|
-
if (isNumbers) return toRegexRange(a, b, {
|
|
3617
|
-
wrap: false,
|
|
3618
|
-
...options
|
|
3619
|
-
});
|
|
3620
|
-
let start = String.fromCharCode(a);
|
|
3621
|
-
if (a === b) return start;
|
|
3622
|
-
return `[${start}-${String.fromCharCode(b)}]`;
|
|
3623
|
-
};
|
|
3624
|
-
const toRegex = (start, end, options) => {
|
|
3625
|
-
if (Array.isArray(start)) {
|
|
3626
|
-
let wrap = options.wrap === true;
|
|
3627
|
-
let prefix = options.capture ? "" : "?:";
|
|
3628
|
-
return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
|
|
3629
|
-
}
|
|
3630
|
-
return toRegexRange(start, end, options);
|
|
3631
|
-
};
|
|
3632
|
-
const rangeError = (...args) => {
|
|
3633
|
-
return /* @__PURE__ */ new RangeError("Invalid range arguments: " + util$1.inspect(...args));
|
|
3634
|
-
};
|
|
3635
|
-
const invalidRange = (start, end, options) => {
|
|
3636
|
-
if (options.strictRanges === true) throw rangeError([start, end]);
|
|
3637
|
-
return [];
|
|
3638
|
-
};
|
|
3639
|
-
const invalidStep = (step, options) => {
|
|
3640
|
-
if (options.strictRanges === true) throw new TypeError(`Expected step "${step}" to be a number`);
|
|
3641
|
-
return [];
|
|
3642
|
-
};
|
|
3643
|
-
const fillNumbers = (start, end, step = 1, options = {}) => {
|
|
3644
|
-
let a = Number(start);
|
|
3645
|
-
let b = Number(end);
|
|
3646
|
-
if (!Number.isInteger(a) || !Number.isInteger(b)) {
|
|
3647
|
-
if (options.strictRanges === true) throw rangeError([start, end]);
|
|
3648
|
-
return [];
|
|
3649
|
-
}
|
|
3650
|
-
if (a === 0) a = 0;
|
|
3651
|
-
if (b === 0) b = 0;
|
|
3652
|
-
let descending = a > b;
|
|
3653
|
-
let startString = String(start);
|
|
3654
|
-
let endString = String(end);
|
|
3655
|
-
let stepString = String(step);
|
|
3656
|
-
step = Math.max(Math.abs(step), 1);
|
|
3657
|
-
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
|
|
3658
|
-
let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
|
|
3659
|
-
let toNumber = padded === false && stringify(start, end, options) === false;
|
|
3660
|
-
let format = options.transform || transform(toNumber);
|
|
3661
|
-
if (options.toRegex && step === 1) return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
|
|
3662
|
-
let parts = {
|
|
3663
|
-
negatives: [],
|
|
3664
|
-
positives: []
|
|
3665
|
-
};
|
|
3666
|
-
let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
|
|
3667
|
-
let range = [];
|
|
3668
|
-
let index = 0;
|
|
3669
|
-
while (descending ? a >= b : a <= b) {
|
|
3670
|
-
if (options.toRegex === true && step > 1) push(a);
|
|
3671
|
-
else range.push(pad(format(a, index), maxLen, toNumber));
|
|
3672
|
-
a = descending ? a - step : a + step;
|
|
3673
|
-
index++;
|
|
3674
|
-
}
|
|
3675
|
-
if (options.toRegex === true) return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, {
|
|
3676
|
-
wrap: false,
|
|
3677
|
-
...options
|
|
3678
|
-
});
|
|
3679
|
-
return range;
|
|
3680
|
-
};
|
|
3681
|
-
const fillLetters = (start, end, step = 1, options = {}) => {
|
|
3682
|
-
if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) return invalidRange(start, end, options);
|
|
3683
|
-
let format = options.transform || ((val) => String.fromCharCode(val));
|
|
3684
|
-
let a = `${start}`.charCodeAt(0);
|
|
3685
|
-
let b = `${end}`.charCodeAt(0);
|
|
3686
|
-
let descending = a > b;
|
|
3687
|
-
let min = Math.min(a, b);
|
|
3688
|
-
let max = Math.max(a, b);
|
|
3689
|
-
if (options.toRegex && step === 1) return toRange(min, max, false, options);
|
|
3690
|
-
let range = [];
|
|
3691
|
-
let index = 0;
|
|
3692
|
-
while (descending ? a >= b : a <= b) {
|
|
3693
|
-
range.push(format(a, index));
|
|
3694
|
-
a = descending ? a - step : a + step;
|
|
3695
|
-
index++;
|
|
3696
|
-
}
|
|
3697
|
-
if (options.toRegex === true) return toRegex(range, null, {
|
|
3698
|
-
wrap: false,
|
|
3699
|
-
options
|
|
3700
|
-
});
|
|
3701
|
-
return range;
|
|
3702
|
-
};
|
|
3703
|
-
const fill = (start, end, step, options = {}) => {
|
|
3704
|
-
if (end == null && isValidValue(start)) return [start];
|
|
3705
|
-
if (!isValidValue(start) || !isValidValue(end)) return invalidRange(start, end, options);
|
|
3706
|
-
if (typeof step === "function") return fill(start, end, 1, { transform: step });
|
|
3707
|
-
if (isObject(step)) return fill(start, end, 0, step);
|
|
3708
|
-
let opts = { ...options };
|
|
3709
|
-
if (opts.capture === true) opts.wrap = true;
|
|
3710
|
-
step = step || opts.step || 1;
|
|
3711
|
-
if (!isNumber(step)) {
|
|
3712
|
-
if (step != null && !isObject(step)) return invalidStep(step, opts);
|
|
3713
|
-
return fill(start, end, 1, step);
|
|
3714
|
-
}
|
|
3715
|
-
if (isNumber(start) && isNumber(end)) return fillNumbers(start, end, step, opts);
|
|
3716
|
-
return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
|
|
3717
|
-
};
|
|
3718
|
-
module.exports = fill;
|
|
3719
|
-
}));
|
|
3720
|
-
//#endregion
|
|
3721
|
-
//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js
|
|
3722
|
-
var require_compile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3723
|
-
const fill = require_fill_range();
|
|
3724
|
-
const utils = require_utils$1();
|
|
3725
|
-
const compile = (ast, options = {}) => {
|
|
3726
|
-
const walk = (node, parent = {}) => {
|
|
3727
|
-
const invalidBlock = utils.isInvalidBrace(parent);
|
|
3728
|
-
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
|
3729
|
-
const invalid = invalidBlock === true || invalidNode === true;
|
|
3730
|
-
const prefix = options.escapeInvalid === true ? "\\" : "";
|
|
3731
|
-
let output = "";
|
|
3732
|
-
if (node.isOpen === true) return prefix + node.value;
|
|
3733
|
-
if (node.isClose === true) {
|
|
3734
|
-
console.log("node.isClose", prefix, node.value);
|
|
3735
|
-
return prefix + node.value;
|
|
3736
|
-
}
|
|
3737
|
-
if (node.type === "open") return invalid ? prefix + node.value : "(";
|
|
3738
|
-
if (node.type === "close") return invalid ? prefix + node.value : ")";
|
|
3739
|
-
if (node.type === "comma") return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
|
|
3740
|
-
if (node.value) return node.value;
|
|
3741
|
-
if (node.nodes && node.ranges > 0) {
|
|
3742
|
-
const args = utils.reduce(node.nodes);
|
|
3743
|
-
const range = fill(...args, {
|
|
3744
|
-
...options,
|
|
3745
|
-
wrap: false,
|
|
3746
|
-
toRegex: true,
|
|
3747
|
-
strictZeros: true
|
|
3748
|
-
});
|
|
3749
|
-
if (range.length !== 0) return args.length > 1 && range.length > 1 ? `(${range})` : range;
|
|
3750
|
-
}
|
|
3751
|
-
if (node.nodes) for (const child of node.nodes) output += walk(child, node);
|
|
3752
|
-
return output;
|
|
3753
|
-
};
|
|
3754
|
-
return walk(ast);
|
|
3755
|
-
};
|
|
3756
|
-
module.exports = compile;
|
|
3757
|
-
}));
|
|
3758
|
-
//#endregion
|
|
3759
|
-
//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js
|
|
3760
|
-
var require_expand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3761
|
-
const fill = require_fill_range();
|
|
3762
|
-
const stringify = require_stringify();
|
|
3763
|
-
const utils = require_utils$1();
|
|
3764
|
-
const append = (queue = "", stash = "", enclose = false) => {
|
|
3765
|
-
const result = [];
|
|
3766
|
-
queue = [].concat(queue);
|
|
3767
|
-
stash = [].concat(stash);
|
|
3768
|
-
if (!stash.length) return queue;
|
|
3769
|
-
if (!queue.length) return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
|
|
3770
|
-
for (const item of queue) if (Array.isArray(item)) for (const value of item) result.push(append(value, stash, enclose));
|
|
3771
|
-
else for (let ele of stash) {
|
|
3772
|
-
if (enclose === true && typeof ele === "string") ele = `{${ele}}`;
|
|
3773
|
-
result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
|
|
3774
|
-
}
|
|
3775
|
-
return utils.flatten(result);
|
|
3776
|
-
};
|
|
3777
|
-
const expand = (ast, options = {}) => {
|
|
3778
|
-
const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
|
|
3779
|
-
const walk = (node, parent = {}) => {
|
|
3780
|
-
node.queue = [];
|
|
3781
|
-
let p = parent;
|
|
3782
|
-
let q = parent.queue;
|
|
3783
|
-
while (p.type !== "brace" && p.type !== "root" && p.parent) {
|
|
3784
|
-
p = p.parent;
|
|
3785
|
-
q = p.queue;
|
|
3786
|
-
}
|
|
3787
|
-
if (node.invalid || node.dollar) {
|
|
3788
|
-
q.push(append(q.pop(), stringify(node, options)));
|
|
3789
|
-
return;
|
|
3790
|
-
}
|
|
3791
|
-
if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
|
|
3792
|
-
q.push(append(q.pop(), ["{}"]));
|
|
3793
|
-
return;
|
|
3794
|
-
}
|
|
3795
|
-
if (node.nodes && node.ranges > 0) {
|
|
3796
|
-
const args = utils.reduce(node.nodes);
|
|
3797
|
-
if (utils.exceedsLimit(...args, options.step, rangeLimit)) throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
|
|
3798
|
-
let range = fill(...args, options);
|
|
3799
|
-
if (range.length === 0) range = stringify(node, options);
|
|
3800
|
-
q.push(append(q.pop(), range));
|
|
3801
|
-
node.nodes = [];
|
|
3802
|
-
return;
|
|
3803
|
-
}
|
|
3804
|
-
const enclose = utils.encloseBrace(node);
|
|
3805
|
-
let queue = node.queue;
|
|
3806
|
-
let block = node;
|
|
3807
|
-
while (block.type !== "brace" && block.type !== "root" && block.parent) {
|
|
3808
|
-
block = block.parent;
|
|
3809
|
-
queue = block.queue;
|
|
3810
|
-
}
|
|
3811
|
-
for (let i = 0; i < node.nodes.length; i++) {
|
|
3812
|
-
const child = node.nodes[i];
|
|
3813
|
-
if (child.type === "comma" && node.type === "brace") {
|
|
3814
|
-
if (i === 1) queue.push("");
|
|
3815
|
-
queue.push("");
|
|
3816
|
-
continue;
|
|
3817
|
-
}
|
|
3818
|
-
if (child.type === "close") {
|
|
3819
|
-
q.push(append(q.pop(), queue, enclose));
|
|
3820
|
-
continue;
|
|
3821
|
-
}
|
|
3822
|
-
if (child.value && child.type !== "open") {
|
|
3823
|
-
queue.push(append(queue.pop(), child.value));
|
|
3824
|
-
continue;
|
|
3825
|
-
}
|
|
3826
|
-
if (child.nodes) walk(child, node);
|
|
3827
|
-
}
|
|
3828
|
-
return queue;
|
|
3829
|
-
};
|
|
3830
|
-
return utils.flatten(walk(ast));
|
|
3831
|
-
};
|
|
3832
|
-
module.exports = expand;
|
|
3833
|
-
}));
|
|
3834
|
-
//#endregion
|
|
3835
|
-
//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js
|
|
3836
|
-
var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3837
|
-
module.exports = {
|
|
3838
|
-
MAX_LENGTH: 1e4,
|
|
3839
|
-
CHAR_0: "0",
|
|
3840
|
-
CHAR_9: "9",
|
|
3841
|
-
CHAR_UPPERCASE_A: "A",
|
|
3842
|
-
CHAR_LOWERCASE_A: "a",
|
|
3843
|
-
CHAR_UPPERCASE_Z: "Z",
|
|
3844
|
-
CHAR_LOWERCASE_Z: "z",
|
|
3845
|
-
CHAR_LEFT_PARENTHESES: "(",
|
|
3846
|
-
CHAR_RIGHT_PARENTHESES: ")",
|
|
3847
|
-
CHAR_ASTERISK: "*",
|
|
3848
|
-
CHAR_AMPERSAND: "&",
|
|
3849
|
-
CHAR_AT: "@",
|
|
3850
|
-
CHAR_BACKSLASH: "\\",
|
|
3851
|
-
CHAR_BACKTICK: "`",
|
|
3852
|
-
CHAR_CARRIAGE_RETURN: "\r",
|
|
3853
|
-
CHAR_CIRCUMFLEX_ACCENT: "^",
|
|
3854
|
-
CHAR_COLON: ":",
|
|
3855
|
-
CHAR_COMMA: ",",
|
|
3856
|
-
CHAR_DOLLAR: "$",
|
|
3857
|
-
CHAR_DOT: ".",
|
|
3858
|
-
CHAR_DOUBLE_QUOTE: "\"",
|
|
3859
|
-
CHAR_EQUAL: "=",
|
|
3860
|
-
CHAR_EXCLAMATION_MARK: "!",
|
|
3861
|
-
CHAR_FORM_FEED: "\f",
|
|
3862
|
-
CHAR_FORWARD_SLASH: "/",
|
|
3863
|
-
CHAR_HASH: "#",
|
|
3864
|
-
CHAR_HYPHEN_MINUS: "-",
|
|
3865
|
-
CHAR_LEFT_ANGLE_BRACKET: "<",
|
|
3866
|
-
CHAR_LEFT_CURLY_BRACE: "{",
|
|
3867
|
-
CHAR_LEFT_SQUARE_BRACKET: "[",
|
|
3868
|
-
CHAR_LINE_FEED: "\n",
|
|
3869
|
-
CHAR_NO_BREAK_SPACE: "\xA0",
|
|
3870
|
-
CHAR_PERCENT: "%",
|
|
3871
|
-
CHAR_PLUS: "+",
|
|
3872
|
-
CHAR_QUESTION_MARK: "?",
|
|
3873
|
-
CHAR_RIGHT_ANGLE_BRACKET: ">",
|
|
3874
|
-
CHAR_RIGHT_CURLY_BRACE: "}",
|
|
3875
|
-
CHAR_RIGHT_SQUARE_BRACKET: "]",
|
|
3876
|
-
CHAR_SEMICOLON: ";",
|
|
3877
|
-
CHAR_SINGLE_QUOTE: "'",
|
|
3878
|
-
CHAR_SPACE: " ",
|
|
3879
|
-
CHAR_TAB: " ",
|
|
3880
|
-
CHAR_UNDERSCORE: "_",
|
|
3881
|
-
CHAR_VERTICAL_LINE: "|",
|
|
3882
|
-
CHAR_ZERO_WIDTH_NOBREAK_SPACE: ""
|
|
3883
|
-
};
|
|
3884
|
-
}));
|
|
3885
|
-
//#endregion
|
|
3886
|
-
//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js
|
|
3887
|
-
var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3888
|
-
const stringify = require_stringify();
|
|
3889
|
-
/**
|
|
3890
|
-
* Constants
|
|
3891
|
-
*/
|
|
3892
|
-
const { MAX_LENGTH, CHAR_BACKSLASH, CHAR_BACKTICK, CHAR_COMMA, CHAR_DOT, CHAR_LEFT_PARENTHESES, CHAR_RIGHT_PARENTHESES, CHAR_LEFT_CURLY_BRACE, CHAR_RIGHT_CURLY_BRACE, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_DOUBLE_QUOTE, CHAR_SINGLE_QUOTE, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = require_constants$1();
|
|
3893
|
-
/**
|
|
3894
|
-
* parse
|
|
3895
|
-
*/
|
|
3896
|
-
const parse = (input, options = {}) => {
|
|
3897
|
-
if (typeof input !== "string") throw new TypeError("Expected a string");
|
|
3898
|
-
const opts = options || {};
|
|
3899
|
-
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
3900
|
-
if (input.length > max) throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
|
|
3901
|
-
const ast = {
|
|
3902
|
-
type: "root",
|
|
3903
|
-
input,
|
|
3904
|
-
nodes: []
|
|
3905
|
-
};
|
|
3906
|
-
const stack = [ast];
|
|
3907
|
-
let block = ast;
|
|
3908
|
-
let prev = ast;
|
|
3909
|
-
let brackets = 0;
|
|
3910
|
-
const length = input.length;
|
|
3911
|
-
let index = 0;
|
|
3912
|
-
let depth = 0;
|
|
3913
|
-
let value;
|
|
3914
|
-
/**
|
|
3915
|
-
* Helpers
|
|
3916
|
-
*/
|
|
3917
|
-
const advance = () => input[index++];
|
|
3918
|
-
const push = (node) => {
|
|
3919
|
-
if (node.type === "text" && prev.type === "dot") prev.type = "text";
|
|
3920
|
-
if (prev && prev.type === "text" && node.type === "text") {
|
|
3921
|
-
prev.value += node.value;
|
|
3922
|
-
return;
|
|
3923
|
-
}
|
|
3924
|
-
block.nodes.push(node);
|
|
3925
|
-
node.parent = block;
|
|
3926
|
-
node.prev = prev;
|
|
3927
|
-
prev = node;
|
|
3928
|
-
return node;
|
|
3929
|
-
};
|
|
3930
|
-
push({ type: "bos" });
|
|
3931
|
-
while (index < length) {
|
|
3932
|
-
block = stack[stack.length - 1];
|
|
3933
|
-
value = advance();
|
|
3934
|
-
/**
|
|
3935
|
-
* Invalid chars
|
|
3936
|
-
*/
|
|
3937
|
-
if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) continue;
|
|
3938
|
-
/**
|
|
3939
|
-
* Escaped chars
|
|
3940
|
-
*/
|
|
3941
|
-
if (value === CHAR_BACKSLASH) {
|
|
3942
|
-
push({
|
|
3943
|
-
type: "text",
|
|
3944
|
-
value: (options.keepEscaping ? value : "") + advance()
|
|
3945
|
-
});
|
|
3946
|
-
continue;
|
|
3947
|
-
}
|
|
3948
|
-
/**
|
|
3949
|
-
* Right square bracket (literal): ']'
|
|
3950
|
-
*/
|
|
3951
|
-
if (value === CHAR_RIGHT_SQUARE_BRACKET) {
|
|
3952
|
-
push({
|
|
3953
|
-
type: "text",
|
|
3954
|
-
value: "\\" + value
|
|
3955
|
-
});
|
|
3956
|
-
continue;
|
|
3957
|
-
}
|
|
3958
|
-
/**
|
|
3959
|
-
* Left square bracket: '['
|
|
3960
|
-
*/
|
|
3961
|
-
if (value === CHAR_LEFT_SQUARE_BRACKET) {
|
|
3962
|
-
brackets++;
|
|
3963
|
-
let next;
|
|
3964
|
-
while (index < length && (next = advance())) {
|
|
3965
|
-
value += next;
|
|
3966
|
-
if (next === CHAR_LEFT_SQUARE_BRACKET) {
|
|
3967
|
-
brackets++;
|
|
3968
|
-
continue;
|
|
3969
|
-
}
|
|
3970
|
-
if (next === CHAR_BACKSLASH) {
|
|
3971
|
-
value += advance();
|
|
3972
|
-
continue;
|
|
3973
|
-
}
|
|
3974
|
-
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
|
|
3975
|
-
brackets--;
|
|
3976
|
-
if (brackets === 0) break;
|
|
3977
|
-
}
|
|
3978
|
-
}
|
|
3979
|
-
push({
|
|
3980
|
-
type: "text",
|
|
3981
|
-
value
|
|
3982
|
-
});
|
|
3983
|
-
continue;
|
|
3984
|
-
}
|
|
3985
|
-
/**
|
|
3986
|
-
* Parentheses
|
|
3987
|
-
*/
|
|
3988
|
-
if (value === CHAR_LEFT_PARENTHESES) {
|
|
3989
|
-
block = push({
|
|
3990
|
-
type: "paren",
|
|
3991
|
-
nodes: []
|
|
3992
|
-
});
|
|
3993
|
-
stack.push(block);
|
|
3994
|
-
push({
|
|
3995
|
-
type: "text",
|
|
3996
|
-
value
|
|
3997
|
-
});
|
|
3998
|
-
continue;
|
|
3999
|
-
}
|
|
4000
|
-
if (value === CHAR_RIGHT_PARENTHESES) {
|
|
4001
|
-
if (block.type !== "paren") {
|
|
4002
|
-
push({
|
|
4003
|
-
type: "text",
|
|
4004
|
-
value
|
|
4005
|
-
});
|
|
4006
|
-
continue;
|
|
4007
|
-
}
|
|
4008
|
-
block = stack.pop();
|
|
4009
|
-
push({
|
|
4010
|
-
type: "text",
|
|
4011
|
-
value
|
|
4012
|
-
});
|
|
4013
|
-
block = stack[stack.length - 1];
|
|
4014
|
-
continue;
|
|
4015
|
-
}
|
|
4016
|
-
/**
|
|
4017
|
-
* Quotes: '|"|`
|
|
4018
|
-
*/
|
|
4019
|
-
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
|
4020
|
-
const open = value;
|
|
4021
|
-
let next;
|
|
4022
|
-
if (options.keepQuotes !== true) value = "";
|
|
4023
|
-
while (index < length && (next = advance())) {
|
|
4024
|
-
if (next === CHAR_BACKSLASH) {
|
|
4025
|
-
value += next + advance();
|
|
4026
|
-
continue;
|
|
4027
|
-
}
|
|
4028
|
-
if (next === open) {
|
|
4029
|
-
if (options.keepQuotes === true) value += next;
|
|
4030
|
-
break;
|
|
4031
|
-
}
|
|
4032
|
-
value += next;
|
|
4033
|
-
}
|
|
4034
|
-
push({
|
|
4035
|
-
type: "text",
|
|
4036
|
-
value
|
|
4037
|
-
});
|
|
4038
|
-
continue;
|
|
4039
|
-
}
|
|
4040
|
-
/**
|
|
4041
|
-
* Left curly brace: '{'
|
|
4042
|
-
*/
|
|
4043
|
-
if (value === CHAR_LEFT_CURLY_BRACE) {
|
|
4044
|
-
depth++;
|
|
4045
|
-
block = push({
|
|
4046
|
-
type: "brace",
|
|
4047
|
-
open: true,
|
|
4048
|
-
close: false,
|
|
4049
|
-
dollar: prev.value && prev.value.slice(-1) === "$" || block.dollar === true,
|
|
4050
|
-
depth,
|
|
4051
|
-
commas: 0,
|
|
4052
|
-
ranges: 0,
|
|
4053
|
-
nodes: []
|
|
4054
|
-
});
|
|
4055
|
-
stack.push(block);
|
|
4056
|
-
push({
|
|
4057
|
-
type: "open",
|
|
4058
|
-
value
|
|
4059
|
-
});
|
|
4060
|
-
continue;
|
|
4061
|
-
}
|
|
4062
|
-
/**
|
|
4063
|
-
* Right curly brace: '}'
|
|
4064
|
-
*/
|
|
4065
|
-
if (value === CHAR_RIGHT_CURLY_BRACE) {
|
|
4066
|
-
if (block.type !== "brace") {
|
|
4067
|
-
push({
|
|
4068
|
-
type: "text",
|
|
4069
|
-
value
|
|
4070
|
-
});
|
|
4071
|
-
continue;
|
|
4072
|
-
}
|
|
4073
|
-
const type = "close";
|
|
4074
|
-
block = stack.pop();
|
|
4075
|
-
block.close = true;
|
|
4076
|
-
push({
|
|
4077
|
-
type,
|
|
4078
|
-
value
|
|
4079
|
-
});
|
|
4080
|
-
depth--;
|
|
4081
|
-
block = stack[stack.length - 1];
|
|
4082
|
-
continue;
|
|
4083
|
-
}
|
|
4084
|
-
/**
|
|
4085
|
-
* Comma: ','
|
|
4086
|
-
*/
|
|
4087
|
-
if (value === CHAR_COMMA && depth > 0) {
|
|
4088
|
-
if (block.ranges > 0) {
|
|
4089
|
-
block.ranges = 0;
|
|
4090
|
-
const open = block.nodes.shift();
|
|
4091
|
-
block.nodes = [open, {
|
|
4092
|
-
type: "text",
|
|
4093
|
-
value: stringify(block)
|
|
4094
|
-
}];
|
|
4095
|
-
}
|
|
4096
|
-
push({
|
|
4097
|
-
type: "comma",
|
|
4098
|
-
value
|
|
4099
|
-
});
|
|
4100
|
-
block.commas++;
|
|
4101
|
-
continue;
|
|
4102
|
-
}
|
|
4103
|
-
/**
|
|
4104
|
-
* Dot: '.'
|
|
4105
|
-
*/
|
|
4106
|
-
if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
|
|
4107
|
-
const siblings = block.nodes;
|
|
4108
|
-
if (depth === 0 || siblings.length === 0) {
|
|
4109
|
-
push({
|
|
4110
|
-
type: "text",
|
|
4111
|
-
value
|
|
4112
|
-
});
|
|
4113
|
-
continue;
|
|
4114
|
-
}
|
|
4115
|
-
if (prev.type === "dot") {
|
|
4116
|
-
block.range = [];
|
|
4117
|
-
prev.value += value;
|
|
4118
|
-
prev.type = "range";
|
|
4119
|
-
if (block.nodes.length !== 3 && block.nodes.length !== 5) {
|
|
4120
|
-
block.invalid = true;
|
|
4121
|
-
block.ranges = 0;
|
|
4122
|
-
prev.type = "text";
|
|
4123
|
-
continue;
|
|
4124
|
-
}
|
|
4125
|
-
block.ranges++;
|
|
4126
|
-
block.args = [];
|
|
4127
|
-
continue;
|
|
4128
|
-
}
|
|
4129
|
-
if (prev.type === "range") {
|
|
4130
|
-
siblings.pop();
|
|
4131
|
-
const before = siblings[siblings.length - 1];
|
|
4132
|
-
before.value += prev.value + value;
|
|
4133
|
-
prev = before;
|
|
4134
|
-
block.ranges--;
|
|
4135
|
-
continue;
|
|
4136
|
-
}
|
|
4137
|
-
push({
|
|
4138
|
-
type: "dot",
|
|
4139
|
-
value
|
|
4140
|
-
});
|
|
4141
|
-
continue;
|
|
4142
|
-
}
|
|
4143
|
-
/**
|
|
4144
|
-
* Text
|
|
4145
|
-
*/
|
|
4146
|
-
push({
|
|
4147
|
-
type: "text",
|
|
4148
|
-
value
|
|
4149
|
-
});
|
|
4150
|
-
}
|
|
4151
|
-
do {
|
|
4152
|
-
block = stack.pop();
|
|
4153
|
-
if (block.type !== "root") {
|
|
4154
|
-
block.nodes.forEach((node) => {
|
|
4155
|
-
if (!node.nodes) {
|
|
4156
|
-
if (node.type === "open") node.isOpen = true;
|
|
4157
|
-
if (node.type === "close") node.isClose = true;
|
|
4158
|
-
if (!node.nodes) node.type = "text";
|
|
4159
|
-
node.invalid = true;
|
|
4160
|
-
}
|
|
4161
|
-
});
|
|
4162
|
-
const parent = stack[stack.length - 1];
|
|
4163
|
-
const index = parent.nodes.indexOf(block);
|
|
4164
|
-
parent.nodes.splice(index, 1, ...block.nodes);
|
|
4165
|
-
}
|
|
4166
|
-
} while (stack.length > 0);
|
|
4167
|
-
push({ type: "eos" });
|
|
4168
|
-
return ast;
|
|
4169
|
-
};
|
|
4170
|
-
module.exports = parse;
|
|
4171
|
-
}));
|
|
4172
|
-
//#endregion
|
|
4173
|
-
//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js
|
|
4174
|
-
var require_braces = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4175
|
-
const stringify = require_stringify();
|
|
4176
|
-
const compile = require_compile();
|
|
4177
|
-
const expand = require_expand();
|
|
4178
|
-
const parse = require_parse$1();
|
|
4179
|
-
/**
|
|
4180
|
-
* Expand the given pattern or create a regex-compatible string.
|
|
4181
|
-
*
|
|
4182
|
-
* ```js
|
|
4183
|
-
* const braces = require('braces');
|
|
4184
|
-
* console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
|
|
4185
|
-
* console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
|
|
4186
|
-
* ```
|
|
4187
|
-
* @param {String} `str`
|
|
4188
|
-
* @param {Object} `options`
|
|
4189
|
-
* @return {String}
|
|
4190
|
-
* @api public
|
|
4191
|
-
*/
|
|
4192
|
-
const braces = (input, options = {}) => {
|
|
4193
|
-
let output = [];
|
|
4194
|
-
if (Array.isArray(input)) for (const pattern of input) {
|
|
4195
|
-
const result = braces.create(pattern, options);
|
|
4196
|
-
if (Array.isArray(result)) output.push(...result);
|
|
4197
|
-
else output.push(result);
|
|
4198
|
-
}
|
|
4199
|
-
else output = [].concat(braces.create(input, options));
|
|
4200
|
-
if (options && options.expand === true && options.nodupes === true) output = [...new Set(output)];
|
|
4201
|
-
return output;
|
|
4202
|
-
};
|
|
4203
|
-
/**
|
|
4204
|
-
* Parse the given `str` with the given `options`.
|
|
4205
|
-
*
|
|
4206
|
-
* ```js
|
|
4207
|
-
* // braces.parse(pattern, [, options]);
|
|
4208
|
-
* const ast = braces.parse('a/{b,c}/d');
|
|
4209
|
-
* console.log(ast);
|
|
4210
|
-
* ```
|
|
4211
|
-
* @param {String} pattern Brace pattern to parse
|
|
4212
|
-
* @param {Object} options
|
|
4213
|
-
* @return {Object} Returns an AST
|
|
4214
|
-
* @api public
|
|
4215
|
-
*/
|
|
4216
|
-
braces.parse = (input, options = {}) => parse(input, options);
|
|
4217
|
-
/**
|
|
4218
|
-
* Creates a braces string from an AST, or an AST node.
|
|
4219
|
-
*
|
|
4220
|
-
* ```js
|
|
4221
|
-
* const braces = require('braces');
|
|
4222
|
-
* let ast = braces.parse('foo/{a,b}/bar');
|
|
4223
|
-
* console.log(stringify(ast.nodes[2])); //=> '{a,b}'
|
|
4224
|
-
* ```
|
|
4225
|
-
* @param {String} `input` Brace pattern or AST.
|
|
4226
|
-
* @param {Object} `options`
|
|
4227
|
-
* @return {Array} Returns an array of expanded values.
|
|
4228
|
-
* @api public
|
|
4229
|
-
*/
|
|
4230
|
-
braces.stringify = (input, options = {}) => {
|
|
4231
|
-
if (typeof input === "string") return stringify(braces.parse(input, options), options);
|
|
4232
|
-
return stringify(input, options);
|
|
4233
|
-
};
|
|
4234
|
-
/**
|
|
4235
|
-
* Compiles a brace pattern into a regex-compatible, optimized string.
|
|
4236
|
-
* This method is called by the main [braces](#braces) function by default.
|
|
4237
|
-
*
|
|
4238
|
-
* ```js
|
|
4239
|
-
* const braces = require('braces');
|
|
4240
|
-
* console.log(braces.compile('a/{b,c}/d'));
|
|
4241
|
-
* //=> ['a/(b|c)/d']
|
|
4242
|
-
* ```
|
|
4243
|
-
* @param {String} `input` Brace pattern or AST.
|
|
4244
|
-
* @param {Object} `options`
|
|
4245
|
-
* @return {Array} Returns an array of expanded values.
|
|
4246
|
-
* @api public
|
|
4247
|
-
*/
|
|
4248
|
-
braces.compile = (input, options = {}) => {
|
|
4249
|
-
if (typeof input === "string") input = braces.parse(input, options);
|
|
4250
|
-
return compile(input, options);
|
|
4251
|
-
};
|
|
4252
|
-
/**
|
|
4253
|
-
* Expands a brace pattern into an array. This method is called by the
|
|
4254
|
-
* main [braces](#braces) function when `options.expand` is true. Before
|
|
4255
|
-
* using this method it's recommended that you read the [performance notes](#performance))
|
|
4256
|
-
* and advantages of using [.compile](#compile) instead.
|
|
4257
|
-
*
|
|
4258
|
-
* ```js
|
|
4259
|
-
* const braces = require('braces');
|
|
4260
|
-
* console.log(braces.expand('a/{b,c}/d'));
|
|
4261
|
-
* //=> ['a/b/d', 'a/c/d'];
|
|
4262
|
-
* ```
|
|
4263
|
-
* @param {String} `pattern` Brace pattern
|
|
4264
|
-
* @param {Object} `options`
|
|
4265
|
-
* @return {Array} Returns an array of expanded values.
|
|
4266
|
-
* @api public
|
|
4267
|
-
*/
|
|
4268
|
-
braces.expand = (input, options = {}) => {
|
|
4269
|
-
if (typeof input === "string") input = braces.parse(input, options);
|
|
4270
|
-
let result = expand(input, options);
|
|
4271
|
-
if (options.noempty === true) result = result.filter(Boolean);
|
|
4272
|
-
if (options.nodupes === true) result = [...new Set(result)];
|
|
4273
|
-
return result;
|
|
4274
|
-
};
|
|
4275
|
-
/**
|
|
4276
|
-
* Processes a brace pattern and returns either an expanded array
|
|
4277
|
-
* (if `options.expand` is true), a highly optimized regex-compatible string.
|
|
4278
|
-
* This method is called by the main [braces](#braces) function.
|
|
4279
|
-
*
|
|
4280
|
-
* ```js
|
|
4281
|
-
* const braces = require('braces');
|
|
4282
|
-
* console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
|
|
4283
|
-
* //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
|
|
4284
|
-
* ```
|
|
4285
|
-
* @param {String} `pattern` Brace pattern
|
|
4286
|
-
* @param {Object} `options`
|
|
4287
|
-
* @return {Array} Returns an array of expanded values.
|
|
4288
|
-
* @api public
|
|
4289
|
-
*/
|
|
4290
|
-
braces.create = (input, options = {}) => {
|
|
4291
|
-
if (input === "" || input.length < 3) return [input];
|
|
4292
|
-
return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
|
|
4293
|
-
};
|
|
4294
|
-
/**
|
|
4295
|
-
* Expose "braces"
|
|
4296
|
-
*/
|
|
4297
|
-
module.exports = braces;
|
|
4298
|
-
}));
|
|
4299
|
-
//#endregion
|
|
4300
|
-
//#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
|
|
4301
|
-
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4302
|
-
const path$3 = __require("path");
|
|
4303
|
-
const WIN_SLASH = "\\\\/";
|
|
4304
|
-
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
4305
|
-
/**
|
|
4306
|
-
* Posix glob regex
|
|
4307
|
-
*/
|
|
4308
|
-
const DOT_LITERAL = "\\.";
|
|
4309
|
-
const PLUS_LITERAL = "\\+";
|
|
4310
|
-
const QMARK_LITERAL = "\\?";
|
|
4311
|
-
const SLASH_LITERAL = "\\/";
|
|
4312
|
-
const ONE_CHAR = "(?=.)";
|
|
4313
|
-
const QMARK = "[^/]";
|
|
4314
|
-
const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
|
|
4315
|
-
const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
|
|
4316
|
-
const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
|
|
4317
|
-
const POSIX_CHARS = {
|
|
4318
|
-
DOT_LITERAL,
|
|
4319
|
-
PLUS_LITERAL,
|
|
4320
|
-
QMARK_LITERAL,
|
|
4321
|
-
SLASH_LITERAL,
|
|
4322
|
-
ONE_CHAR,
|
|
4323
|
-
QMARK,
|
|
4324
|
-
END_ANCHOR,
|
|
4325
|
-
DOTS_SLASH,
|
|
4326
|
-
NO_DOT: `(?!${DOT_LITERAL})`,
|
|
4327
|
-
NO_DOTS: `(?!${START_ANCHOR}${DOTS_SLASH})`,
|
|
4328
|
-
NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`,
|
|
4329
|
-
NO_DOTS_SLASH: `(?!${DOTS_SLASH})`,
|
|
4330
|
-
QMARK_NO_DOT: `[^.${SLASH_LITERAL}]`,
|
|
4331
|
-
STAR: `${QMARK}*?`,
|
|
4332
|
-
START_ANCHOR
|
|
4333
|
-
};
|
|
4334
|
-
/**
|
|
4335
|
-
* Windows glob regex
|
|
4336
|
-
*/
|
|
4337
|
-
const WINDOWS_CHARS = {
|
|
4338
|
-
...POSIX_CHARS,
|
|
4339
|
-
SLASH_LITERAL: `[${WIN_SLASH}]`,
|
|
4340
|
-
QMARK: WIN_NO_SLASH,
|
|
4341
|
-
STAR: `${WIN_NO_SLASH}*?`,
|
|
4342
|
-
DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
|
|
4343
|
-
NO_DOT: `(?!${DOT_LITERAL})`,
|
|
4344
|
-
NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
|
4345
|
-
NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
|
|
4346
|
-
NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
|
4347
|
-
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
|
|
4348
|
-
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
|
|
4349
|
-
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
|
|
4350
|
-
};
|
|
4351
|
-
module.exports = {
|
|
4352
|
-
MAX_LENGTH: 1024 * 64,
|
|
4353
|
-
POSIX_REGEX_SOURCE: {
|
|
4354
|
-
alnum: "a-zA-Z0-9",
|
|
4355
|
-
alpha: "a-zA-Z",
|
|
4356
|
-
ascii: "\\x00-\\x7F",
|
|
4357
|
-
blank: " \\t",
|
|
4358
|
-
cntrl: "\\x00-\\x1F\\x7F",
|
|
4359
|
-
digit: "0-9",
|
|
4360
|
-
graph: "\\x21-\\x7E",
|
|
4361
|
-
lower: "a-z",
|
|
4362
|
-
print: "\\x20-\\x7E ",
|
|
4363
|
-
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
|
|
4364
|
-
space: " \\t\\r\\n\\v\\f",
|
|
4365
|
-
upper: "A-Z",
|
|
4366
|
-
word: "A-Za-z0-9_",
|
|
4367
|
-
xdigit: "A-Fa-f0-9"
|
|
4368
|
-
},
|
|
4369
|
-
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
4370
|
-
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
4371
|
-
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
|
4372
|
-
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
|
|
4373
|
-
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
4374
|
-
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
4375
|
-
REPLACEMENTS: {
|
|
4376
|
-
"***": "*",
|
|
4377
|
-
"**/**": "**",
|
|
4378
|
-
"**/**/**": "**"
|
|
4379
|
-
},
|
|
4380
|
-
CHAR_0: 48,
|
|
4381
|
-
CHAR_9: 57,
|
|
4382
|
-
CHAR_UPPERCASE_A: 65,
|
|
4383
|
-
CHAR_LOWERCASE_A: 97,
|
|
4384
|
-
CHAR_UPPERCASE_Z: 90,
|
|
4385
|
-
CHAR_LOWERCASE_Z: 122,
|
|
4386
|
-
CHAR_LEFT_PARENTHESES: 40,
|
|
4387
|
-
CHAR_RIGHT_PARENTHESES: 41,
|
|
4388
|
-
CHAR_ASTERISK: 42,
|
|
4389
|
-
CHAR_AMPERSAND: 38,
|
|
4390
|
-
CHAR_AT: 64,
|
|
4391
|
-
CHAR_BACKWARD_SLASH: 92,
|
|
4392
|
-
CHAR_CARRIAGE_RETURN: 13,
|
|
4393
|
-
CHAR_CIRCUMFLEX_ACCENT: 94,
|
|
4394
|
-
CHAR_COLON: 58,
|
|
4395
|
-
CHAR_COMMA: 44,
|
|
4396
|
-
CHAR_DOT: 46,
|
|
4397
|
-
CHAR_DOUBLE_QUOTE: 34,
|
|
4398
|
-
CHAR_EQUAL: 61,
|
|
4399
|
-
CHAR_EXCLAMATION_MARK: 33,
|
|
4400
|
-
CHAR_FORM_FEED: 12,
|
|
4401
|
-
CHAR_FORWARD_SLASH: 47,
|
|
4402
|
-
CHAR_GRAVE_ACCENT: 96,
|
|
4403
|
-
CHAR_HASH: 35,
|
|
4404
|
-
CHAR_HYPHEN_MINUS: 45,
|
|
4405
|
-
CHAR_LEFT_ANGLE_BRACKET: 60,
|
|
4406
|
-
CHAR_LEFT_CURLY_BRACE: 123,
|
|
4407
|
-
CHAR_LEFT_SQUARE_BRACKET: 91,
|
|
4408
|
-
CHAR_LINE_FEED: 10,
|
|
4409
|
-
CHAR_NO_BREAK_SPACE: 160,
|
|
4410
|
-
CHAR_PERCENT: 37,
|
|
4411
|
-
CHAR_PLUS: 43,
|
|
4412
|
-
CHAR_QUESTION_MARK: 63,
|
|
4413
|
-
CHAR_RIGHT_ANGLE_BRACKET: 62,
|
|
4414
|
-
CHAR_RIGHT_CURLY_BRACE: 125,
|
|
4415
|
-
CHAR_RIGHT_SQUARE_BRACKET: 93,
|
|
4416
|
-
CHAR_SEMICOLON: 59,
|
|
4417
|
-
CHAR_SINGLE_QUOTE: 39,
|
|
4418
|
-
CHAR_SPACE: 32,
|
|
4419
|
-
CHAR_TAB: 9,
|
|
4420
|
-
CHAR_UNDERSCORE: 95,
|
|
4421
|
-
CHAR_VERTICAL_LINE: 124,
|
|
4422
|
-
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
4423
|
-
SEP: path$3.sep,
|
|
4424
|
-
extglobChars(chars) {
|
|
4425
|
-
return {
|
|
4426
|
-
"!": {
|
|
4427
|
-
type: "negate",
|
|
4428
|
-
open: "(?:(?!(?:",
|
|
4429
|
-
close: `))${chars.STAR})`
|
|
4430
|
-
},
|
|
4431
|
-
"?": {
|
|
4432
|
-
type: "qmark",
|
|
4433
|
-
open: "(?:",
|
|
4434
|
-
close: ")?"
|
|
4435
|
-
},
|
|
4436
|
-
"+": {
|
|
4437
|
-
type: "plus",
|
|
4438
|
-
open: "(?:",
|
|
4439
|
-
close: ")+"
|
|
4440
|
-
},
|
|
4441
|
-
"*": {
|
|
4442
|
-
type: "star",
|
|
4443
|
-
open: "(?:",
|
|
4444
|
-
close: ")*"
|
|
4445
|
-
},
|
|
4446
|
-
"@": {
|
|
4447
|
-
type: "at",
|
|
4448
|
-
open: "(?:",
|
|
4449
|
-
close: ")"
|
|
4450
|
-
}
|
|
4451
|
-
};
|
|
4452
|
-
},
|
|
4453
|
-
globChars(win32) {
|
|
4454
|
-
return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
|
|
4455
|
-
}
|
|
4456
|
-
};
|
|
4457
|
-
}));
|
|
4458
|
-
//#endregion
|
|
4459
|
-
//#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js
|
|
4460
|
-
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4461
|
-
const path$2 = __require("path");
|
|
4462
|
-
const win32 = process.platform === "win32";
|
|
4463
|
-
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
|
|
4464
|
-
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
4465
|
-
exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
|
|
4466
|
-
exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
|
|
4467
|
-
exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
|
|
4468
|
-
exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
|
|
4469
|
-
exports.removeBackslashes = (str) => {
|
|
4470
|
-
return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
|
|
4471
|
-
return match === "\\" ? "" : match;
|
|
4472
|
-
});
|
|
4473
|
-
};
|
|
4474
|
-
exports.supportsLookbehinds = () => {
|
|
4475
|
-
const segs = process.version.slice(1).split(".").map(Number);
|
|
4476
|
-
if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) return true;
|
|
4477
|
-
return false;
|
|
4478
|
-
};
|
|
4479
|
-
exports.isWindows = (options) => {
|
|
4480
|
-
if (options && typeof options.windows === "boolean") return options.windows;
|
|
4481
|
-
return win32 === true || path$2.sep === "\\";
|
|
4482
|
-
};
|
|
4483
|
-
exports.escapeLast = (input, char, lastIdx) => {
|
|
4484
|
-
const idx = input.lastIndexOf(char, lastIdx);
|
|
4485
|
-
if (idx === -1) return input;
|
|
4486
|
-
if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
|
|
4487
|
-
return `${input.slice(0, idx)}\\${input.slice(idx)}`;
|
|
4488
|
-
};
|
|
4489
|
-
exports.removePrefix = (input, state = {}) => {
|
|
4490
|
-
let output = input;
|
|
4491
|
-
if (output.startsWith("./")) {
|
|
4492
|
-
output = output.slice(2);
|
|
4493
|
-
state.prefix = "./";
|
|
4494
|
-
}
|
|
4495
|
-
return output;
|
|
4496
|
-
};
|
|
4497
|
-
exports.wrapOutput = (input, state = {}, options = {}) => {
|
|
4498
|
-
let output = `${options.contains ? "" : "^"}(?:${input})${options.contains ? "" : "$"}`;
|
|
4499
|
-
if (state.negated === true) output = `(?:^(?!${output}).*$)`;
|
|
4500
|
-
return output;
|
|
4501
|
-
};
|
|
4502
|
-
}));
|
|
4503
|
-
//#endregion
|
|
4504
|
-
//#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js
|
|
4505
|
-
var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4506
|
-
const utils = require_utils();
|
|
4507
|
-
const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
|
|
4508
|
-
const isPathSeparator = (code) => {
|
|
4509
|
-
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
|
4510
|
-
};
|
|
4511
|
-
const depth = (token) => {
|
|
4512
|
-
if (token.isPrefix !== true) token.depth = token.isGlobstar ? Infinity : 1;
|
|
4513
|
-
};
|
|
4514
|
-
/**
|
|
4515
|
-
* Quickly scans a glob pattern and returns an object with a handful of
|
|
4516
|
-
* useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
|
|
4517
|
-
* `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
|
|
4518
|
-
* with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
|
|
4519
|
-
*
|
|
4520
|
-
* ```js
|
|
4521
|
-
* const pm = require('picomatch');
|
|
4522
|
-
* console.log(pm.scan('foo/bar/*.js'));
|
|
4523
|
-
* { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
|
|
4524
|
-
* ```
|
|
4525
|
-
* @param {String} `str`
|
|
4526
|
-
* @param {Object} `options`
|
|
4527
|
-
* @return {Object} Returns an object with tokens and regex source string.
|
|
4528
|
-
* @api public
|
|
3451
|
+
* Quickly scans a glob pattern and returns an object with a handful of
|
|
3452
|
+
* useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
|
|
3453
|
+
* `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
|
|
3454
|
+
* with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
|
|
3455
|
+
*
|
|
3456
|
+
* ```js
|
|
3457
|
+
* const pm = require('picomatch');
|
|
3458
|
+
* console.log(pm.scan('foo/bar/*.js'));
|
|
3459
|
+
* { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
|
|
3460
|
+
* ```
|
|
3461
|
+
* @param {String} `str`
|
|
3462
|
+
* @param {Object} `options`
|
|
3463
|
+
* @return {Object} Returns an object with tokens and regex source string.
|
|
3464
|
+
* @api public
|
|
4529
3465
|
*/
|
|
4530
3466
|
const scan = (input, options) => {
|
|
4531
3467
|
const opts = options || {};
|
|
@@ -4788,7 +3724,7 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4788
3724
|
module.exports = scan;
|
|
4789
3725
|
}));
|
|
4790
3726
|
//#endregion
|
|
4791
|
-
//#region ../../node_modules/.pnpm/picomatch@
|
|
3727
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js
|
|
4792
3728
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4793
3729
|
const constants = require_constants();
|
|
4794
3730
|
const utils = require_utils();
|
|
@@ -4836,8 +3772,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4836
3772
|
};
|
|
4837
3773
|
const tokens = [bos];
|
|
4838
3774
|
const capture = opts.capture ? "" : "?:";
|
|
4839
|
-
const
|
|
4840
|
-
const PLATFORM_CHARS = constants.globChars(win32);
|
|
3775
|
+
const PLATFORM_CHARS = constants.globChars(opts.windows);
|
|
4841
3776
|
const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
|
|
4842
3777
|
const { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS;
|
|
4843
3778
|
const globstar = (opts) => {
|
|
@@ -4929,8 +3864,8 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4929
3864
|
if (extglobs.length && tok.type !== "paren") extglobs[extglobs.length - 1].inner += tok.value;
|
|
4930
3865
|
if (tok.value || tok.output) append(tok);
|
|
4931
3866
|
if (prev && prev.type === "text" && tok.type === "text") {
|
|
3867
|
+
prev.output = (prev.output || prev.value) + tok.value;
|
|
4932
3868
|
prev.value += tok.value;
|
|
4933
|
-
prev.output = (prev.output || "") + tok.value;
|
|
4934
3869
|
return;
|
|
4935
3870
|
}
|
|
4936
3871
|
tok.prev = prev;
|
|
@@ -5320,7 +4255,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5320
4255
|
if (prev && prev.type === "paren") {
|
|
5321
4256
|
const next = peek();
|
|
5322
4257
|
let output = value;
|
|
5323
|
-
if (next === "<" && !utils.supportsLookbehinds()) throw new Error("Node.js v10 or higher is required for regex lookbehinds");
|
|
5324
4258
|
if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) output = `\\${value}`;
|
|
5325
4259
|
push({
|
|
5326
4260
|
type: "text",
|
|
@@ -5608,8 +4542,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5608
4542
|
const len = input.length;
|
|
5609
4543
|
if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
5610
4544
|
input = REPLACEMENTS[input] || input;
|
|
5611
|
-
const
|
|
5612
|
-
const { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(win32);
|
|
4545
|
+
const { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(opts.windows);
|
|
5613
4546
|
const nodot = opts.dot ? NO_DOTS : NO_DOT;
|
|
5614
4547
|
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
|
|
5615
4548
|
const capture = opts.capture ? "" : "?:";
|
|
@@ -5649,9 +4582,8 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5649
4582
|
module.exports = parse;
|
|
5650
4583
|
}));
|
|
5651
4584
|
//#endregion
|
|
5652
|
-
//#region ../../node_modules/.pnpm/picomatch@
|
|
4585
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js
|
|
5653
4586
|
var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5654
|
-
const path$1 = __require("path");
|
|
5655
4587
|
const scan = require_scan();
|
|
5656
4588
|
const parse = require_parse();
|
|
5657
4589
|
const utils = require_utils();
|
|
@@ -5693,7 +4625,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5693
4625
|
const isState = isObject(glob) && glob.tokens && glob.input;
|
|
5694
4626
|
if (glob === "" || typeof glob !== "string" && !isState) throw new TypeError("Expected pattern to be a non-empty string");
|
|
5695
4627
|
const opts = options || {};
|
|
5696
|
-
const posix =
|
|
4628
|
+
const posix = opts.windows;
|
|
5697
4629
|
const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
|
|
5698
4630
|
const state = regex.state;
|
|
5699
4631
|
delete regex.state;
|
|
@@ -5789,8 +4721,8 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5789
4721
|
* @return {Boolean}
|
|
5790
4722
|
* @api public
|
|
5791
4723
|
*/
|
|
5792
|
-
picomatch.matchBase = (input, glob, options
|
|
5793
|
-
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(
|
|
4724
|
+
picomatch.matchBase = (input, glob, options) => {
|
|
4725
|
+
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input));
|
|
5794
4726
|
};
|
|
5795
4727
|
/**
|
|
5796
4728
|
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
|
@@ -5942,404 +4874,38 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5942
4874
|
module.exports = picomatch;
|
|
5943
4875
|
}));
|
|
5944
4876
|
//#endregion
|
|
5945
|
-
//#region ../../node_modules/.pnpm/
|
|
5946
|
-
var
|
|
5947
|
-
|
|
5948
|
-
}));
|
|
5949
|
-
//#endregion
|
|
5950
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.3.2/node_modules/lint-staged/lib/generateTasks.js
|
|
5951
|
-
var import_micromatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5952
|
-
const util = __require("util");
|
|
5953
|
-
const braces = require_braces();
|
|
5954
|
-
const picomatch = require_picomatch();
|
|
4877
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/matchFiles.js
|
|
4878
|
+
var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4879
|
+
const pico = require_picomatch$1();
|
|
5955
4880
|
const utils = require_utils();
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
const index = v.indexOf("{");
|
|
5959
|
-
return index > -1 && v.indexOf("}", index) > -1;
|
|
5960
|
-
};
|
|
5961
|
-
/**
|
|
5962
|
-
* Returns an array of strings that match one or more glob patterns.
|
|
5963
|
-
*
|
|
5964
|
-
* ```js
|
|
5965
|
-
* const mm = require('micromatch');
|
|
5966
|
-
* // mm(list, patterns[, options]);
|
|
5967
|
-
*
|
|
5968
|
-
* console.log(mm(['a.js', 'a.txt'], ['*.js']));
|
|
5969
|
-
* //=> [ 'a.js' ]
|
|
5970
|
-
* ```
|
|
5971
|
-
* @param {String|Array<string>} `list` List of strings to match.
|
|
5972
|
-
* @param {String|Array<string>} `patterns` One or more glob patterns to use for matching.
|
|
5973
|
-
* @param {Object} `options` See available [options](#options)
|
|
5974
|
-
* @return {Array} Returns an array of matches
|
|
5975
|
-
* @summary false
|
|
5976
|
-
* @api public
|
|
5977
|
-
*/
|
|
5978
|
-
const micromatch = (list, patterns, options) => {
|
|
5979
|
-
patterns = [].concat(patterns);
|
|
5980
|
-
list = [].concat(list);
|
|
5981
|
-
let omit = /* @__PURE__ */ new Set();
|
|
5982
|
-
let keep = /* @__PURE__ */ new Set();
|
|
5983
|
-
let items = /* @__PURE__ */ new Set();
|
|
5984
|
-
let negatives = 0;
|
|
5985
|
-
let onResult = (state) => {
|
|
5986
|
-
items.add(state.output);
|
|
5987
|
-
if (options && options.onResult) options.onResult(state);
|
|
5988
|
-
};
|
|
5989
|
-
for (let i = 0; i < patterns.length; i++) {
|
|
5990
|
-
let isMatch = picomatch(String(patterns[i]), {
|
|
5991
|
-
...options,
|
|
5992
|
-
onResult
|
|
5993
|
-
}, true);
|
|
5994
|
-
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
|
5995
|
-
if (negated) negatives++;
|
|
5996
|
-
for (let item of list) {
|
|
5997
|
-
let matched = isMatch(item, true);
|
|
5998
|
-
if (!(negated ? !matched.isMatch : matched.isMatch)) continue;
|
|
5999
|
-
if (negated) omit.add(matched.output);
|
|
6000
|
-
else {
|
|
6001
|
-
omit.delete(matched.output);
|
|
6002
|
-
keep.add(matched.output);
|
|
6003
|
-
}
|
|
6004
|
-
}
|
|
6005
|
-
}
|
|
6006
|
-
let matches = (negatives === patterns.length ? [...items] : [...keep]).filter((item) => !omit.has(item));
|
|
6007
|
-
if (options && matches.length === 0) {
|
|
6008
|
-
if (options.failglob === true) throw new Error(`No matches found for "${patterns.join(", ")}"`);
|
|
6009
|
-
if (options.nonull === true || options.nullglob === true) return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
|
|
6010
|
-
}
|
|
6011
|
-
return matches;
|
|
6012
|
-
};
|
|
6013
|
-
/**
|
|
6014
|
-
* Backwards compatibility
|
|
6015
|
-
*/
|
|
6016
|
-
micromatch.match = micromatch;
|
|
6017
|
-
/**
|
|
6018
|
-
* Returns a matcher function from the given glob `pattern` and `options`.
|
|
6019
|
-
* The returned function takes a string to match as its only argument and returns
|
|
6020
|
-
* true if the string is a match.
|
|
6021
|
-
*
|
|
6022
|
-
* ```js
|
|
6023
|
-
* const mm = require('micromatch');
|
|
6024
|
-
* // mm.matcher(pattern[, options]);
|
|
6025
|
-
*
|
|
6026
|
-
* const isMatch = mm.matcher('*.!(*a)');
|
|
6027
|
-
* console.log(isMatch('a.a')); //=> false
|
|
6028
|
-
* console.log(isMatch('a.b')); //=> true
|
|
6029
|
-
* ```
|
|
6030
|
-
* @param {String} `pattern` Glob pattern
|
|
6031
|
-
* @param {Object} `options`
|
|
6032
|
-
* @return {Function} Returns a matcher function.
|
|
6033
|
-
* @api public
|
|
6034
|
-
*/
|
|
6035
|
-
micromatch.matcher = (pattern, options) => picomatch(pattern, options);
|
|
6036
|
-
/**
|
|
6037
|
-
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
|
6038
|
-
*
|
|
6039
|
-
* ```js
|
|
6040
|
-
* const mm = require('micromatch');
|
|
6041
|
-
* // mm.isMatch(string, patterns[, options]);
|
|
6042
|
-
*
|
|
6043
|
-
* console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true
|
|
6044
|
-
* console.log(mm.isMatch('a.a', 'b.*')); //=> false
|
|
6045
|
-
* ```
|
|
6046
|
-
* @param {String} `str` The string to test.
|
|
6047
|
-
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
|
6048
|
-
* @param {Object} `[options]` See available [options](#options).
|
|
6049
|
-
* @return {Boolean} Returns true if any patterns match `str`
|
|
6050
|
-
* @api public
|
|
6051
|
-
*/
|
|
6052
|
-
micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
6053
|
-
/**
|
|
6054
|
-
* Backwards compatibility
|
|
6055
|
-
*/
|
|
6056
|
-
micromatch.any = micromatch.isMatch;
|
|
6057
|
-
/**
|
|
6058
|
-
* Returns a list of strings that _**do not match any**_ of the given `patterns`.
|
|
6059
|
-
*
|
|
6060
|
-
* ```js
|
|
6061
|
-
* const mm = require('micromatch');
|
|
6062
|
-
* // mm.not(list, patterns[, options]);
|
|
6063
|
-
*
|
|
6064
|
-
* console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
|
|
6065
|
-
* //=> ['b.b', 'c.c']
|
|
6066
|
-
* ```
|
|
6067
|
-
* @param {Array} `list` Array of strings to match.
|
|
6068
|
-
* @param {String|Array} `patterns` One or more glob pattern to use for matching.
|
|
6069
|
-
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
|
6070
|
-
* @return {Array} Returns an array of strings that **do not match** the given patterns.
|
|
6071
|
-
* @api public
|
|
6072
|
-
*/
|
|
6073
|
-
micromatch.not = (list, patterns, options = {}) => {
|
|
6074
|
-
patterns = [].concat(patterns).map(String);
|
|
6075
|
-
let result = /* @__PURE__ */ new Set();
|
|
6076
|
-
let items = [];
|
|
6077
|
-
let onResult = (state) => {
|
|
6078
|
-
if (options.onResult) options.onResult(state);
|
|
6079
|
-
items.push(state.output);
|
|
6080
|
-
};
|
|
6081
|
-
let matches = new Set(micromatch(list, patterns, {
|
|
6082
|
-
...options,
|
|
6083
|
-
onResult
|
|
6084
|
-
}));
|
|
6085
|
-
for (let item of items) if (!matches.has(item)) result.add(item);
|
|
6086
|
-
return [...result];
|
|
6087
|
-
};
|
|
6088
|
-
/**
|
|
6089
|
-
* Returns true if the given `string` contains the given pattern. Similar
|
|
6090
|
-
* to [.isMatch](#isMatch) but the pattern can match any part of the string.
|
|
6091
|
-
*
|
|
6092
|
-
* ```js
|
|
6093
|
-
* var mm = require('micromatch');
|
|
6094
|
-
* // mm.contains(string, pattern[, options]);
|
|
6095
|
-
*
|
|
6096
|
-
* console.log(mm.contains('aa/bb/cc', '*b'));
|
|
6097
|
-
* //=> true
|
|
6098
|
-
* console.log(mm.contains('aa/bb/cc', '*d'));
|
|
6099
|
-
* //=> false
|
|
6100
|
-
* ```
|
|
6101
|
-
* @param {String} `str` The string to match.
|
|
6102
|
-
* @param {String|Array} `patterns` Glob pattern to use for matching.
|
|
6103
|
-
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
|
6104
|
-
* @return {Boolean} Returns true if any of the patterns matches any part of `str`.
|
|
6105
|
-
* @api public
|
|
6106
|
-
*/
|
|
6107
|
-
micromatch.contains = (str, pattern, options) => {
|
|
6108
|
-
if (typeof str !== "string") throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
6109
|
-
if (Array.isArray(pattern)) return pattern.some((p) => micromatch.contains(str, p, options));
|
|
6110
|
-
if (typeof pattern === "string") {
|
|
6111
|
-
if (isEmptyString(str) || isEmptyString(pattern)) return false;
|
|
6112
|
-
if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) return true;
|
|
6113
|
-
}
|
|
6114
|
-
return micromatch.isMatch(str, pattern, {
|
|
6115
|
-
...options,
|
|
6116
|
-
contains: true
|
|
6117
|
-
});
|
|
6118
|
-
};
|
|
6119
|
-
/**
|
|
6120
|
-
* Filter the keys of the given object with the given `glob` pattern
|
|
6121
|
-
* and `options`. Does not attempt to match nested keys. If you need this feature,
|
|
6122
|
-
* use [glob-object][] instead.
|
|
6123
|
-
*
|
|
6124
|
-
* ```js
|
|
6125
|
-
* const mm = require('micromatch');
|
|
6126
|
-
* // mm.matchKeys(object, patterns[, options]);
|
|
6127
|
-
*
|
|
6128
|
-
* const obj = { aa: 'a', ab: 'b', ac: 'c' };
|
|
6129
|
-
* console.log(mm.matchKeys(obj, '*b'));
|
|
6130
|
-
* //=> { ab: 'b' }
|
|
6131
|
-
* ```
|
|
6132
|
-
* @param {Object} `object` The object with keys to filter.
|
|
6133
|
-
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
|
6134
|
-
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
|
6135
|
-
* @return {Object} Returns an object with only keys that match the given patterns.
|
|
6136
|
-
* @api public
|
|
6137
|
-
*/
|
|
6138
|
-
micromatch.matchKeys = (obj, patterns, options) => {
|
|
6139
|
-
if (!utils.isObject(obj)) throw new TypeError("Expected the first argument to be an object");
|
|
6140
|
-
let keys = micromatch(Object.keys(obj), patterns, options);
|
|
6141
|
-
let res = {};
|
|
6142
|
-
for (let key of keys) res[key] = obj[key];
|
|
6143
|
-
return res;
|
|
6144
|
-
};
|
|
6145
|
-
/**
|
|
6146
|
-
* Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
|
|
6147
|
-
*
|
|
6148
|
-
* ```js
|
|
6149
|
-
* const mm = require('micromatch');
|
|
6150
|
-
* // mm.some(list, patterns[, options]);
|
|
6151
|
-
*
|
|
6152
|
-
* console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
|
|
6153
|
-
* // true
|
|
6154
|
-
* console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
|
|
6155
|
-
* // false
|
|
6156
|
-
* ```
|
|
6157
|
-
* @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.
|
|
6158
|
-
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
|
6159
|
-
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
|
6160
|
-
* @return {Boolean} Returns true if any `patterns` matches any of the strings in `list`
|
|
6161
|
-
* @api public
|
|
6162
|
-
*/
|
|
6163
|
-
micromatch.some = (list, patterns, options) => {
|
|
6164
|
-
let items = [].concat(list);
|
|
6165
|
-
for (let pattern of [].concat(patterns)) {
|
|
6166
|
-
let isMatch = picomatch(String(pattern), options);
|
|
6167
|
-
if (items.some((item) => isMatch(item))) return true;
|
|
6168
|
-
}
|
|
6169
|
-
return false;
|
|
6170
|
-
};
|
|
6171
|
-
/**
|
|
6172
|
-
* Returns true if every string in the given `list` matches
|
|
6173
|
-
* any of the given glob `patterns`.
|
|
6174
|
-
*
|
|
6175
|
-
* ```js
|
|
6176
|
-
* const mm = require('micromatch');
|
|
6177
|
-
* // mm.every(list, patterns[, options]);
|
|
6178
|
-
*
|
|
6179
|
-
* console.log(mm.every('foo.js', ['foo.js']));
|
|
6180
|
-
* // true
|
|
6181
|
-
* console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));
|
|
6182
|
-
* // true
|
|
6183
|
-
* console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
|
|
6184
|
-
* // false
|
|
6185
|
-
* console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
|
|
6186
|
-
* // false
|
|
6187
|
-
* ```
|
|
6188
|
-
* @param {String|Array} `list` The string or array of strings to test.
|
|
6189
|
-
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
|
6190
|
-
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
|
6191
|
-
* @return {Boolean} Returns true if all `patterns` matches all of the strings in `list`
|
|
6192
|
-
* @api public
|
|
6193
|
-
*/
|
|
6194
|
-
micromatch.every = (list, patterns, options) => {
|
|
6195
|
-
let items = [].concat(list);
|
|
6196
|
-
for (let pattern of [].concat(patterns)) {
|
|
6197
|
-
let isMatch = picomatch(String(pattern), options);
|
|
6198
|
-
if (!items.every((item) => isMatch(item))) return false;
|
|
6199
|
-
}
|
|
6200
|
-
return true;
|
|
6201
|
-
};
|
|
6202
|
-
/**
|
|
6203
|
-
* Returns true if **all** of the given `patterns` match
|
|
6204
|
-
* the specified string.
|
|
6205
|
-
*
|
|
6206
|
-
* ```js
|
|
6207
|
-
* const mm = require('micromatch');
|
|
6208
|
-
* // mm.all(string, patterns[, options]);
|
|
6209
|
-
*
|
|
6210
|
-
* console.log(mm.all('foo.js', ['foo.js']));
|
|
6211
|
-
* // true
|
|
6212
|
-
*
|
|
6213
|
-
* console.log(mm.all('foo.js', ['*.js', '!foo.js']));
|
|
6214
|
-
* // false
|
|
6215
|
-
*
|
|
6216
|
-
* console.log(mm.all('foo.js', ['*.js', 'foo.js']));
|
|
6217
|
-
* // true
|
|
6218
|
-
*
|
|
6219
|
-
* console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
|
|
6220
|
-
* // true
|
|
6221
|
-
* ```
|
|
6222
|
-
* @param {String|Array} `str` The string to test.
|
|
6223
|
-
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
|
6224
|
-
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
|
6225
|
-
* @return {Boolean} Returns true if any patterns match `str`
|
|
6226
|
-
* @api public
|
|
6227
|
-
*/
|
|
6228
|
-
micromatch.all = (str, patterns, options) => {
|
|
6229
|
-
if (typeof str !== "string") throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
6230
|
-
return [].concat(patterns).every((p) => picomatch(p, options)(str));
|
|
6231
|
-
};
|
|
6232
|
-
/**
|
|
6233
|
-
* Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.
|
|
6234
|
-
*
|
|
6235
|
-
* ```js
|
|
6236
|
-
* const mm = require('micromatch');
|
|
6237
|
-
* // mm.capture(pattern, string[, options]);
|
|
6238
|
-
*
|
|
6239
|
-
* console.log(mm.capture('test/*.js', 'test/foo.js'));
|
|
6240
|
-
* //=> ['foo']
|
|
6241
|
-
* console.log(mm.capture('test/*.js', 'foo/bar.css'));
|
|
6242
|
-
* //=> null
|
|
6243
|
-
* ```
|
|
6244
|
-
* @param {String} `glob` Glob pattern to use for matching.
|
|
6245
|
-
* @param {String} `input` String to match
|
|
6246
|
-
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
|
6247
|
-
* @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
|
|
6248
|
-
* @api public
|
|
6249
|
-
*/
|
|
6250
|
-
micromatch.capture = (glob, input, options) => {
|
|
6251
|
-
let posix = utils.isWindows(options);
|
|
6252
|
-
let match = picomatch.makeRe(String(glob), {
|
|
6253
|
-
...options,
|
|
6254
|
-
capture: true
|
|
6255
|
-
}).exec(posix ? utils.toPosixSlashes(input) : input);
|
|
6256
|
-
if (match) return match.slice(1).map((v) => v === void 0 ? "" : v);
|
|
6257
|
-
};
|
|
6258
|
-
/**
|
|
6259
|
-
* Create a regular expression from the given glob `pattern`.
|
|
6260
|
-
*
|
|
6261
|
-
* ```js
|
|
6262
|
-
* const mm = require('micromatch');
|
|
6263
|
-
* // mm.makeRe(pattern[, options]);
|
|
6264
|
-
*
|
|
6265
|
-
* console.log(mm.makeRe('*.js'));
|
|
6266
|
-
* //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/
|
|
6267
|
-
* ```
|
|
6268
|
-
* @param {String} `pattern` A glob pattern to convert to regex.
|
|
6269
|
-
* @param {Object} `options`
|
|
6270
|
-
* @return {RegExp} Returns a regex created from the given pattern.
|
|
6271
|
-
* @api public
|
|
6272
|
-
*/
|
|
6273
|
-
micromatch.makeRe = (...args) => picomatch.makeRe(...args);
|
|
6274
|
-
/**
|
|
6275
|
-
* Scan a glob pattern to separate the pattern into segments. Used
|
|
6276
|
-
* by the [split](#split) method.
|
|
6277
|
-
*
|
|
6278
|
-
* ```js
|
|
6279
|
-
* const mm = require('micromatch');
|
|
6280
|
-
* const state = mm.scan(pattern[, options]);
|
|
6281
|
-
* ```
|
|
6282
|
-
* @param {String} `pattern`
|
|
6283
|
-
* @param {Object} `options`
|
|
6284
|
-
* @return {Object} Returns an object with
|
|
6285
|
-
* @api public
|
|
6286
|
-
*/
|
|
6287
|
-
micromatch.scan = (...args) => picomatch.scan(...args);
|
|
6288
|
-
/**
|
|
6289
|
-
* Parse a glob pattern to create the source string for a regular
|
|
6290
|
-
* expression.
|
|
6291
|
-
*
|
|
6292
|
-
* ```js
|
|
6293
|
-
* const mm = require('micromatch');
|
|
6294
|
-
* const state = mm.parse(pattern[, options]);
|
|
6295
|
-
* ```
|
|
6296
|
-
* @param {String} `glob`
|
|
6297
|
-
* @param {Object} `options`
|
|
6298
|
-
* @return {Object} Returns an object with useful properties and output to be used as regex source string.
|
|
6299
|
-
* @api public
|
|
6300
|
-
*/
|
|
6301
|
-
micromatch.parse = (patterns, options) => {
|
|
6302
|
-
let res = [];
|
|
6303
|
-
for (let pattern of [].concat(patterns || [])) for (let str of braces(String(pattern), options)) res.push(picomatch.parse(str, options));
|
|
6304
|
-
return res;
|
|
6305
|
-
};
|
|
6306
|
-
/**
|
|
6307
|
-
* Process the given brace `pattern`.
|
|
6308
|
-
*
|
|
6309
|
-
* ```js
|
|
6310
|
-
* const { braces } = require('micromatch');
|
|
6311
|
-
* console.log(braces('foo/{a,b,c}/bar'));
|
|
6312
|
-
* //=> [ 'foo/(a|b|c)/bar' ]
|
|
6313
|
-
*
|
|
6314
|
-
* console.log(braces('foo/{a,b,c}/bar', { expand: true }));
|
|
6315
|
-
* //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]
|
|
6316
|
-
* ```
|
|
6317
|
-
* @param {String} `pattern` String with brace pattern to process.
|
|
6318
|
-
* @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.
|
|
6319
|
-
* @return {Array}
|
|
6320
|
-
* @api public
|
|
6321
|
-
*/
|
|
6322
|
-
micromatch.braces = (pattern, options) => {
|
|
6323
|
-
if (typeof pattern !== "string") throw new TypeError("Expected a string");
|
|
6324
|
-
if (options && options.nobrace === true || !hasBraces(pattern)) return [pattern];
|
|
6325
|
-
return braces(pattern, options);
|
|
6326
|
-
};
|
|
6327
|
-
/**
|
|
6328
|
-
* Expand braces
|
|
6329
|
-
*/
|
|
6330
|
-
micromatch.braceExpand = (pattern, options) => {
|
|
6331
|
-
if (typeof pattern !== "string") throw new TypeError("Expected a string");
|
|
6332
|
-
return micromatch.braces(pattern, {
|
|
4881
|
+
function picomatch(glob, options, returnState = false) {
|
|
4882
|
+
if (options && (options.windows === null || options.windows === void 0)) options = {
|
|
6333
4883
|
...options,
|
|
6334
|
-
|
|
6335
|
-
}
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
micromatch.hasBraces = hasBraces;
|
|
6341
|
-
module.exports = micromatch;
|
|
4884
|
+
windows: utils.isWindows()
|
|
4885
|
+
};
|
|
4886
|
+
return pico(glob, options, returnState);
|
|
4887
|
+
}
|
|
4888
|
+
Object.assign(picomatch, pico);
|
|
4889
|
+
module.exports = picomatch;
|
|
6342
4890
|
})))(), 1);
|
|
4891
|
+
/**
|
|
4892
|
+
* Match list of files against a pattern.
|
|
4893
|
+
*
|
|
4894
|
+
* @param {string} pattern
|
|
4895
|
+
* @param {import('./getStagedFiles.js').StagedFile[]} files
|
|
4896
|
+
*/
|
|
4897
|
+
const matchFiles = (files, pattern, cwd = process.cwd()) => {
|
|
4898
|
+
const isMatch = (0, import_picomatch.default)(pattern, {
|
|
4899
|
+
cwd,
|
|
4900
|
+
dot: true,
|
|
4901
|
+
matchBase: !pattern.includes("/"),
|
|
4902
|
+
posixSlashes: true,
|
|
4903
|
+
strictBrackets: true
|
|
4904
|
+
});
|
|
4905
|
+
return files.filter((file) => isMatch(file.filepath));
|
|
4906
|
+
};
|
|
4907
|
+
//#endregion
|
|
4908
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/generateTasks.js
|
|
6343
4909
|
const debugLog$13 = createDebug("lint-staged:generateTasks");
|
|
6344
4910
|
/**
|
|
6345
4911
|
* Generates all task commands, and filelist
|
|
@@ -6359,31 +4925,23 @@ const generateTasks = ({ config, cwd = process.cwd(), files, relative = false })
|
|
|
6359
4925
|
}));
|
|
6360
4926
|
return Object.entries(config).map(([pattern, commands]) => {
|
|
6361
4927
|
const isParentDirPattern = pattern.startsWith("../");
|
|
6362
|
-
const filteredFiles = relativeFiles.filter((file) => {
|
|
6363
|
-
if (isParentDirPattern) return true;
|
|
6364
|
-
return !file.filepath.startsWith("..") && !path.isAbsolute(file.filepath);
|
|
6365
|
-
});
|
|
6366
|
-
const matches = (0, import_micromatch.default)(filteredFiles.map((file) => file.filepath), pattern, {
|
|
6367
|
-
cwd,
|
|
6368
|
-
dot: true,
|
|
6369
|
-
matchBase: !pattern.includes("/"),
|
|
6370
|
-
posixSlashes: true,
|
|
6371
|
-
strictBrackets: true
|
|
6372
|
-
});
|
|
6373
4928
|
const task = {
|
|
6374
4929
|
pattern,
|
|
6375
4930
|
commands,
|
|
6376
|
-
fileList:
|
|
4931
|
+
fileList: matchFiles(relativeFiles.filter((file) => {
|
|
4932
|
+
if (isParentDirPattern) return true;
|
|
4933
|
+
return !file.filepath.startsWith("..") && !path.isAbsolute(file.filepath);
|
|
4934
|
+
}), pattern, cwd).map((file) => ({
|
|
6377
4935
|
filepath: normalizePath(relative ? file.filepath : path.resolve(cwd, file.filepath)),
|
|
6378
4936
|
status: file.status
|
|
6379
|
-
}
|
|
4937
|
+
}))
|
|
6380
4938
|
};
|
|
6381
4939
|
debugLog$13("Generated task: \n%O", task);
|
|
6382
4940
|
return task;
|
|
6383
4941
|
});
|
|
6384
4942
|
};
|
|
6385
4943
|
//#endregion
|
|
6386
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
4944
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/getAbortController.js
|
|
6387
4945
|
const Signal = {
|
|
6388
4946
|
SIGINT: "SIGINT",
|
|
6389
4947
|
SIGKILL: "SIGKILL"
|
|
@@ -6423,7 +4981,7 @@ function firstString() {
|
|
|
6423
4981
|
}
|
|
6424
4982
|
}
|
|
6425
4983
|
//#endregion
|
|
6426
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
4984
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/killSubprocesses.js
|
|
6427
4985
|
const execAsync = promisify(exec);
|
|
6428
4986
|
/**
|
|
6429
4987
|
* End process by pid, forcefully, including child processes
|
|
@@ -6456,7 +5014,7 @@ const killSubProcesses = async (pid, isWin32 = process.platform === "win32") =>
|
|
|
6456
5014
|
} catch {}
|
|
6457
5015
|
};
|
|
6458
5016
|
//#endregion
|
|
6459
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5017
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/symbols.js
|
|
6460
5018
|
const ApplyEmptyCommitError = Symbol("ApplyEmptyCommitError");
|
|
6461
5019
|
const ConfigNotFoundError = /* @__PURE__ */ new Error("Configuration could not be found");
|
|
6462
5020
|
const ConfigFormatError = /* @__PURE__ */ new Error("Configuration should be an object or a function");
|
|
@@ -6473,7 +5031,7 @@ const RestoreUnstagedChangesError = Symbol("RestoreUnstagedChangesError");
|
|
|
6473
5031
|
const TaskError = Symbol("TaskError");
|
|
6474
5032
|
const FailOnChangesError = Symbol("FailOnChangesError");
|
|
6475
5033
|
//#endregion
|
|
6476
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5034
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/state.js
|
|
6477
5035
|
const getInitialState = ({ failOnChanges = false, hideUnstaged = false, hidePartiallyStaged = !hideUnstaged, quiet = false, revert = true } = {}) => ({
|
|
6478
5036
|
backupHash: null,
|
|
6479
5037
|
errors: /* @__PURE__ */ new Set([]),
|
|
@@ -6511,7 +5069,7 @@ const cleanupSkipped = (ctx) => {
|
|
|
6511
5069
|
if (ctx.errors.has(RestoreOriginalStateError)) return GIT_ERROR;
|
|
6512
5070
|
};
|
|
6513
5071
|
//#endregion
|
|
6514
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5072
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/getSpawnedTask.js
|
|
6515
5073
|
const debugLog$12 = createDebug("lint-staged:getSpawnedTask");
|
|
6516
5074
|
/**
|
|
6517
5075
|
* Handle task console output.
|
|
@@ -6610,7 +5168,7 @@ const getSpawnedTask = ({ abortController, color, command, continueOnError = fal
|
|
|
6610
5168
|
};
|
|
6611
5169
|
};
|
|
6612
5170
|
//#endregion
|
|
6613
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5171
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/getFunctionTask.js
|
|
6614
5172
|
const debugLog$11 = createDebug("lint-staged:getFunctionTasks");
|
|
6615
5173
|
/**
|
|
6616
5174
|
* @typedef {{ title: string; task: Function }} FunctionTask
|
|
@@ -6640,7 +5198,7 @@ const getFunctionTask = async (command, files) => {
|
|
|
6640
5198
|
}];
|
|
6641
5199
|
};
|
|
6642
5200
|
//#endregion
|
|
6643
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5201
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/getRenderer.js
|
|
6644
5202
|
const EOLRegex = new RegExp(EOL$1 + "$");
|
|
6645
5203
|
const bindLogger = (consoleLogMethod) => new Writable({ write: function(chunk, encoding, next) {
|
|
6646
5204
|
consoleLogMethod(chunk.toString().replace(EOLRegex, ""));
|
|
@@ -6674,7 +5232,7 @@ const getRenderer = ({ color, debug, quiet }, logger, env = process.env) => {
|
|
|
6674
5232
|
};
|
|
6675
5233
|
};
|
|
6676
5234
|
//#endregion
|
|
6677
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5235
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/getSpawnedTasks.js
|
|
6678
5236
|
const debugLog$10 = createDebug("lint-staged:getSpawnedTasks");
|
|
6679
5237
|
/**
|
|
6680
5238
|
* Creates and returns an array of listr tasks which map to the given commands.
|
|
@@ -6722,7 +5280,7 @@ const getSpawnedTasks = async ({ abortController, color, commands, continueOnErr
|
|
|
6722
5280
|
return cmdTasks;
|
|
6723
5281
|
};
|
|
6724
5282
|
//#endregion
|
|
6725
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5283
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/getDiffCommand.js
|
|
6726
5284
|
/** @type {(diff?: string, diffFilter?: string) => string[]} */
|
|
6727
5285
|
const getDiffCommand = (diff, diffFilter) => {
|
|
6728
5286
|
/**
|
|
@@ -6739,7 +5297,7 @@ const getDiffCommand = (diff, diffFilter) => {
|
|
|
6739
5297
|
];
|
|
6740
5298
|
};
|
|
6741
5299
|
//#endregion
|
|
6742
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5300
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/parseGitZOutput.js
|
|
6743
5301
|
/**
|
|
6744
5302
|
* Return array of strings split from the output of `git <something> -z`.
|
|
6745
5303
|
* With `-z`, git prints `fileA\u0000fileB\u0000fileC\u0000` so we need to
|
|
@@ -6747,7 +5305,7 @@ const getDiffCommand = (diff, diffFilter) => {
|
|
|
6747
5305
|
*/
|
|
6748
5306
|
const parseGitZOutput = (input) => input ? input.replace(/\u0000$/, "").split("\0") : [];
|
|
6749
5307
|
//#endregion
|
|
6750
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5308
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/getStagedFiles.js
|
|
6751
5309
|
/**
|
|
6752
5310
|
* @typedef {'A'|'C'|'D'|'M'|'R'|'T'|'U'|'X'} FileSatus
|
|
6753
5311
|
* @typedef { { filepath: string; status: FileSatus }} StagedFile
|
|
@@ -6818,7 +5376,7 @@ const getStagedFiles = async ({ cwd = process.cwd(), diff, diffFilter } = {}) =>
|
|
|
6818
5376
|
}
|
|
6819
5377
|
};
|
|
6820
5378
|
//#endregion
|
|
6821
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5379
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/file.js
|
|
6822
5380
|
const debugLog$9 = createDebug("lint-staged:file");
|
|
6823
5381
|
/**
|
|
6824
5382
|
* Read contents of a file to buffer
|
|
@@ -6861,7 +5419,7 @@ const writeFile = async (filename, buffer) => {
|
|
|
6861
5419
|
await fsPromises.writeFile(filename, buffer);
|
|
6862
5420
|
};
|
|
6863
5421
|
//#endregion
|
|
6864
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5422
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/gitWorkflow.js
|
|
6865
5423
|
const debugLog$8 = createDebug("lint-staged:GitWorkflow");
|
|
6866
5424
|
const MERGE_HEAD = "MERGE_HEAD";
|
|
6867
5425
|
const MERGE_MODE = "MERGE_MODE";
|
|
@@ -7240,7 +5798,7 @@ var GitWorkflow = class {
|
|
|
7240
5798
|
}
|
|
7241
5799
|
};
|
|
7242
5800
|
//#endregion
|
|
7243
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5801
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/groupFilesByConfig.js
|
|
7244
5802
|
const debugLog$7 = createDebug("lint-staged:groupFilesByConfig");
|
|
7245
5803
|
/**
|
|
7246
5804
|
* @typedef {import('./getStagedFiles.js').StagedFile} StagedFile
|
|
@@ -7290,7 +5848,7 @@ const groupFilesByConfig = async ({ configs, files, singleConfigMode }) => {
|
|
|
7290
5848
|
return filesByConfig;
|
|
7291
5849
|
};
|
|
7292
5850
|
//#endregion
|
|
7293
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5851
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/resolveGitRepo.js
|
|
7294
5852
|
const debugLog$6 = createDebug("lint-staged:resolveGitRepo");
|
|
7295
5853
|
/**
|
|
7296
5854
|
* Relative path up to the repo top-level directory
|
|
@@ -7349,7 +5907,7 @@ const resolveGitRepo = async (cwd = process.cwd()) => {
|
|
|
7349
5907
|
}
|
|
7350
5908
|
};
|
|
7351
5909
|
//#endregion
|
|
7352
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5910
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/configFiles.js
|
|
7353
5911
|
const CONFIG_NAME = "lint-staged";
|
|
7354
5912
|
const PACKAGE_JSON_FILE = "package.json";
|
|
7355
5913
|
const PACKAGE_YAML_FILES = ["package.yaml", "package.yml"];
|
|
@@ -7378,7 +5936,7 @@ const CONFIG_FILE_NAMES = [
|
|
|
7378
5936
|
"lint-staged.config.cts"
|
|
7379
5937
|
];
|
|
7380
5938
|
//#endregion
|
|
7381
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5939
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/resolveConfig.js
|
|
7382
5940
|
/**
|
|
7383
5941
|
* require() does not exist for ESM, so we must create it to use require.resolve().
|
|
7384
5942
|
* @see https://nodejs.org/api/module.html#modulecreaterequirefilename
|
|
@@ -7392,7 +5950,7 @@ function resolveConfig(configPath) {
|
|
|
7392
5950
|
}
|
|
7393
5951
|
}
|
|
7394
5952
|
//#endregion
|
|
7395
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
5953
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/loadConfig.js
|
|
7396
5954
|
/** @typedef {import('./index').Logger} Logger */
|
|
7397
5955
|
const debugLog$5 = createDebug("lint-staged:loadConfig");
|
|
7398
5956
|
const readFile = async (filename) => fsPromises.readFile(path.resolve(filename), "utf-8");
|
|
@@ -7413,7 +5971,7 @@ const jsonParse = async (filename) => {
|
|
|
7413
5971
|
const yamlParse = async (filename) => {
|
|
7414
5972
|
const isPackageFile = PACKAGE_YAML_FILES.includes(path.basename(filename));
|
|
7415
5973
|
try {
|
|
7416
|
-
const [YAML, content] = await Promise.all([import("./browser-
|
|
5974
|
+
const [YAML, content] = await Promise.all([import("./browser-C-E79Nt0.js"), readFile(filename)]);
|
|
7417
5975
|
const yaml = YAML.parse(content);
|
|
7418
5976
|
return isPackageFile ? yaml[CONFIG_NAME] : yaml;
|
|
7419
5977
|
} catch (error) {
|
|
@@ -7472,7 +6030,7 @@ const loadConfig = async (configPath, logger) => {
|
|
|
7472
6030
|
}
|
|
7473
6031
|
};
|
|
7474
6032
|
//#endregion
|
|
7475
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
6033
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/validateBraces.js
|
|
7476
6034
|
/**
|
|
7477
6035
|
* A correctly-formed brace expansion must contain unquoted opening and closing braces,
|
|
7478
6036
|
* and at least one unquoted comma or a valid sequence expression.
|
|
@@ -7554,7 +6112,7 @@ const validateBraces = (pattern, logger) => {
|
|
|
7554
6112
|
return fixedPattern;
|
|
7555
6113
|
};
|
|
7556
6114
|
//#endregion
|
|
7557
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
6115
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/validateConfig.js
|
|
7558
6116
|
/** @typedef {import('./index').Logger} Logger */
|
|
7559
6117
|
const debugLog$4 = createDebug("lint-staged:validateConfig");
|
|
7560
6118
|
const validateConfigLogic = (config, configPath, logger) => {
|
|
@@ -7617,7 +6175,7 @@ const validateConfig = (config, configPath, logger) => {
|
|
|
7617
6175
|
}
|
|
7618
6176
|
};
|
|
7619
6177
|
//#endregion
|
|
7620
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
6178
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/searchConfigs.js
|
|
7621
6179
|
/** @typedef {import('./index').Logger} Logger */
|
|
7622
6180
|
const debugLog$3 = createDebug("lint-staged:searchConfigs");
|
|
7623
6181
|
const EXEC_GIT = [
|
|
@@ -7735,7 +6293,7 @@ const searchConfigs = async ({ configObject, configPath, cwd = process.cwd(), to
|
|
|
7735
6293
|
return foundConfigs;
|
|
7736
6294
|
};
|
|
7737
6295
|
//#endregion
|
|
7738
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
6296
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/runAll.js
|
|
7739
6297
|
/** @typedef {import('./index').Logger} Logger */
|
|
7740
6298
|
const debugLog$2 = createDebug("lint-staged:runAll");
|
|
7741
6299
|
/**
|
|
@@ -7964,7 +6522,7 @@ const runAll = async ({ allowEmpty = false, color = false, concurrent = true, co
|
|
|
7964
6522
|
return ctx;
|
|
7965
6523
|
};
|
|
7966
6524
|
//#endregion
|
|
7967
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
6525
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/validateOptions.js
|
|
7968
6526
|
const debugLog$1 = createDebug("lint-staged:validateOptions");
|
|
7969
6527
|
/**
|
|
7970
6528
|
* Validate lint-staged options, either from the Node.js API or the command line flags.
|
|
@@ -7986,12 +6544,12 @@ const validateOptions = async (options = {}, logger) => {
|
|
|
7986
6544
|
debugLog$1("Validated options: %o", options);
|
|
7987
6545
|
};
|
|
7988
6546
|
//#endregion
|
|
7989
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
6547
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/version.js
|
|
7990
6548
|
const getVersion = async () => {
|
|
7991
6549
|
return JSON.parse(await fsPromises.readFile(new URL("../package.json", import.meta.url))).version;
|
|
7992
6550
|
};
|
|
7993
6551
|
//#endregion
|
|
7994
|
-
//#region ../../node_modules/.pnpm/lint-staged@16.
|
|
6552
|
+
//#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/index.js
|
|
7995
6553
|
const debugLog = createDebug("lint-staged");
|
|
7996
6554
|
/**
|
|
7997
6555
|
* Get the maximum length of a command-line argument string based on current platform
|