storybook 10.1.0-alpha.10 → 10.1.0-alpha.11
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/_browser-chunks/Color-FTG7SQDA.js +1097 -0
- package/dist/_browser-chunks/WithTooltip-LMROHDUP.js +1651 -0
- package/dist/_browser-chunks/chunk-2FRVAXCZ.js +7 -0
- package/dist/_browser-chunks/chunk-3IAH5M2U.js +171 -0
- package/dist/_browser-chunks/chunk-3OXGAGBE.js +779 -0
- package/dist/_browser-chunks/{chunk-TMDZCWME.js → chunk-3PJE6VLG.js} +1 -3
- package/dist/_browser-chunks/{chunk-VAMFPZY3.js → chunk-45UGUKRX.js} +2 -7
- package/dist/_browser-chunks/chunk-6XWLIJQL.js +11 -0
- package/dist/_browser-chunks/{chunk-FDWKXLBI.js → chunk-74YHFU5B.js} +44 -109
- package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
- package/dist/_browser-chunks/chunk-AIOS4NGK.js +252 -0
- package/dist/_browser-chunks/chunk-AS2HQEYC.js +14 -0
- package/dist/_browser-chunks/chunk-AXG2BOBL.js +836 -0
- package/dist/_browser-chunks/chunk-BE2DAXKJ.js +2966 -0
- package/dist/_browser-chunks/{chunk-MH6AXFXB.js → chunk-CHUV5WSW.js} +0 -5
- package/dist/_browser-chunks/chunk-EBHB6RPS.js +61 -0
- package/dist/_browser-chunks/chunk-EUVGDK4H.js +93 -0
- package/dist/_browser-chunks/chunk-EZSQOHRI.js +18 -0
- package/dist/_browser-chunks/{chunk-CADGRH3P.js → chunk-FNXWN6IK.js} +3 -8
- package/dist/_browser-chunks/chunk-GFLS4VP3.js +64 -0
- package/dist/_browser-chunks/{chunk-L2D73C6Z.js → chunk-H6XK3RSC.js} +13 -21
- package/dist/_browser-chunks/chunk-IPA5A322.js +71 -0
- package/dist/_browser-chunks/chunk-JP7NCOJX.js +37 -0
- package/dist/_browser-chunks/chunk-KJHJLCBK.js +11 -0
- package/dist/_browser-chunks/{chunk-QMY4G4R2.js → chunk-L4RMQ7D7.js} +17 -64
- package/dist/_browser-chunks/{chunk-AB7OOPUX.js → chunk-QKODTO7K.js} +0 -5
- package/dist/_browser-chunks/chunk-RP5RXKFU.js +2491 -0
- package/dist/_browser-chunks/chunk-SL75JR6Y.js +9 -0
- package/dist/_browser-chunks/chunk-UD6FQLAF.js +1481 -0
- package/dist/_browser-chunks/chunk-VYJQ7RU5.js +2853 -0
- package/dist/_browser-chunks/chunk-WJYERY3R.js +136 -0
- package/dist/_browser-chunks/chunk-WXP2XJ3O.js +950 -0
- package/dist/_browser-chunks/chunk-X3DUQ5RA.js +47 -0
- package/dist/_browser-chunks/chunk-XJNX76GA.js +85 -0
- package/dist/_browser-chunks/{chunk-F4Q6SGTB.js → chunk-YKE5S47A.js} +177 -399
- package/dist/_browser-chunks/{chunk-SN4J4IQ3.js → chunk-ZUWEVLDX.js} +1 -7
- package/dist/_browser-chunks/{formatter-OMEEQ6HG.js → formatter-QJ4M4OGQ.js} +4 -9
- package/dist/_browser-chunks/{syntaxhighlighter-RJZASWHL.js → syntaxhighlighter-WKBQ5RC7.js} +704 -1848
- package/dist/_node-chunks/{builder-manager-HA7CYFCK.js → builder-manager-PMPHOSM2.js} +475 -1013
- package/dist/_node-chunks/camelcase-K3IOOFQW.js +18 -0
- package/dist/_node-chunks/{chunk-X4XU27M6.js → chunk-32NE3UE3.js} +15 -24
- package/dist/_node-chunks/chunk-4GZCFQFG.js +58 -0
- package/dist/_node-chunks/chunk-5QK5MSOI.js +943 -0
- package/dist/_node-chunks/{chunk-VPR5IBMG.js → chunk-6ZOLETQK.js} +8 -10
- package/dist/_node-chunks/chunk-7I22Y76Z.js +1047 -0
- package/dist/_node-chunks/chunk-AKTRSR3O.js +72 -0
- package/dist/_node-chunks/chunk-BBOP3XCK.js +119 -0
- package/dist/_node-chunks/chunk-C2GQVDWI.js +34 -0
- package/dist/_node-chunks/{chunk-ZHSCUGNP.js → chunk-GG2WQZSG.js} +3799 -7849
- package/dist/_node-chunks/chunk-GQJOWVVR.js +3214 -0
- package/dist/_node-chunks/chunk-JCRM2YVK.js +3009 -0
- package/dist/_node-chunks/chunk-KK4AT5F3.js +1029 -0
- package/dist/_node-chunks/chunk-L7MYXJUM.js +1114 -0
- package/dist/_node-chunks/{chunk-F3XOPI6H.js → chunk-LCZO45L7.js} +469 -983
- package/dist/_node-chunks/chunk-LR3QITDI.js +209 -0
- package/dist/_node-chunks/chunk-LXG4DK35.js +3171 -0
- package/dist/_node-chunks/chunk-MJ3WOS6F.js +37 -0
- package/dist/_node-chunks/chunk-PHOZWZZO.js +61 -0
- package/dist/_node-chunks/chunk-QECOQWRJ.js +936 -0
- package/dist/_node-chunks/chunk-QH4V5YDB.js +20 -0
- package/dist/_node-chunks/chunk-R6HWGZWD.js +26 -0
- package/dist/_node-chunks/chunk-SPQXMU2Q.js +759 -0
- package/dist/_node-chunks/chunk-TXZY6V6O.js +1564 -0
- package/dist/_node-chunks/chunk-UGDPX5LE.js +756 -0
- package/dist/_node-chunks/chunk-UY26MQLT.js +603 -0
- package/dist/_node-chunks/chunk-WK3EMYK6.js +61 -0
- package/dist/_node-chunks/{chunk-OVXB5GGT.js → chunk-WLHMN7AP.js} +292 -688
- package/dist/_node-chunks/chunk-XGVLB4UJ.js +54 -0
- package/dist/_node-chunks/{chunk-RMHAL25C.js → chunk-YHRFI6BE.js} +87 -227
- package/dist/_node-chunks/chunk-YK4KVMFW.js +18 -0
- package/dist/_node-chunks/chunk-ZZALGOA6.js +4523 -0
- package/dist/_node-chunks/chunk-ZZPBSYA5.js +301 -0
- package/dist/_node-chunks/chunk-ZZSRFAC6.js +45571 -0
- package/dist/_node-chunks/dist-4DWOCZUD.js +121 -0
- package/dist/_node-chunks/globby-AAARUKEU.js +3452 -0
- package/dist/_node-chunks/lib-HEUKGL62.js +366 -0
- package/dist/_node-chunks/mdx-N42X6CFJ-DCVRPS6N.js +14329 -0
- package/dist/_node-chunks/p-limit-F5ZKJ6WZ.js +116 -0
- package/dist/_node-chunks/plugin-7YY7JXCH.js +123 -0
- package/dist/_node-chunks/{plugin-6ZPCS4LI.js → plugin-SZP3CW6W.js} +36 -56
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-TGKNDPO6.js +46623 -0
- package/dist/_node-chunks/webpack-mock-plugin-LNTZZFBE.js +92 -0
- package/dist/actions/decorator.js +21 -42
- package/dist/actions/index.js +3 -3
- package/dist/babel/index.d.ts +671 -335
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +592 -1546
- package/dist/bin/dispatcher.js +26 -37
- package/dist/bin/loader.js +23 -34
- package/dist/channels/index.js +98 -234
- package/dist/cli/index.js +1951 -5308
- package/dist/client-logger/index.js +31 -61
- package/dist/common/index.js +20 -20
- package/dist/components/index.js +4211 -8586
- package/dist/core-events/index.js +2 -66
- package/dist/core-server/index.js +3054 -7290
- package/dist/core-server/presets/common-manager.css +2 -2
- package/dist/core-server/presets/common-manager.js +1806 -3427
- package/dist/core-server/presets/common-override-preset.js +31 -60
- package/dist/core-server/presets/common-preset.js +434 -924
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +15 -19
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +12 -17
- package/dist/csf/index.js +534 -1179
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +6 -6
- package/dist/highlight/index.js +2 -2
- package/dist/instrumenter/index.js +199 -415
- package/dist/manager/globals-runtime.js +24150 -47364
- package/dist/manager/globals.js +2 -3
- package/dist/manager/runtime.js +3961 -8373
- package/dist/manager-api/index.js +1231 -2425
- package/dist/manager-errors.d.ts +3 -0
- package/dist/manager-errors.js +3 -3
- package/dist/node-logger/index.js +1253 -2601
- package/dist/preview/globals.js +2 -3
- package/dist/preview/runtime.js +10364 -21990
- package/dist/preview-api/index.d.ts +67 -68
- package/dist/preview-api/index.js +13 -13
- package/dist/preview-errors.d.ts +3 -0
- package/dist/preview-errors.js +4 -4
- package/dist/router/index.js +347 -899
- package/dist/server-errors.d.ts +3 -0
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.js +24 -24
- package/dist/test/index.js +5860 -11645
- package/dist/theming/create.js +4 -4
- package/dist/theming/index.d.ts +3363 -2597
- package/dist/theming/index.js +490 -1086
- package/dist/types/index.js +2 -11
- package/dist/viewport/index.js +3 -3
- package/package.json +5 -5
- package/dist/_browser-chunks/Color-FQNEU7YS.js +0 -1695
- package/dist/_browser-chunks/WithTooltip-6NHN2GXF.js +0 -2343
- package/dist/_browser-chunks/chunk-6A7OIVEL.js +0 -66
- package/dist/_browser-chunks/chunk-AW46NMGV.js +0 -1308
- package/dist/_browser-chunks/chunk-B4A3ADP3.js +0 -3816
- package/dist/_browser-chunks/chunk-FSBVR7H5.js +0 -106
- package/dist/_browser-chunks/chunk-FUOHXXZT.js +0 -23
- package/dist/_browser-chunks/chunk-GTKOCWCT.js +0 -17
- package/dist/_browser-chunks/chunk-HHW4FUMO.js +0 -12
- package/dist/_browser-chunks/chunk-JVSKG4YS.js +0 -4052
- package/dist/_browser-chunks/chunk-LASUB7TL.js +0 -76
- package/dist/_browser-chunks/chunk-LYCSRYYR.js +0 -101
- package/dist/_browser-chunks/chunk-NVV6MIOE.js +0 -243
- package/dist/_browser-chunks/chunk-OBXWFEPB.js +0 -852
- package/dist/_browser-chunks/chunk-OPCDBBL3.js +0 -48
- package/dist/_browser-chunks/chunk-PB6FZ3WE.js +0 -130
- package/dist/_browser-chunks/chunk-RW5PKMWM.js +0 -4182
- package/dist/_browser-chunks/chunk-SYS437NN.js +0 -122
- package/dist/_browser-chunks/chunk-U46RQHA4.js +0 -12
- package/dist/_browser-chunks/chunk-UTNZYD2N.js +0 -311
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +0 -20
- package/dist/_browser-chunks/chunk-XDGMHOV7.js +0 -2197
- package/dist/_browser-chunks/chunk-XW6KSYKF.js +0 -16
- package/dist/_browser-chunks/chunk-Y3M7TW6K.js +0 -1041
- package/dist/_browser-chunks/chunk-ZNRFDIVA.js +0 -233
- package/dist/_node-chunks/camelcase-QALD4XFE.js +0 -18
- package/dist/_node-chunks/chunk-2XY53ALL.js +0 -420
- package/dist/_node-chunks/chunk-3CBQMG2A.js +0 -6712
- package/dist/_node-chunks/chunk-3WDAPZYQ.js +0 -28
- package/dist/_node-chunks/chunk-4ZB555EJ.js +0 -697
- package/dist/_node-chunks/chunk-52DXKXY3.js +0 -4272
- package/dist/_node-chunks/chunk-5OVB4A6F.js +0 -69
- package/dist/_node-chunks/chunk-AGHGNXGH.js +0 -18
- package/dist/_node-chunks/chunk-B23X5ZCK.js +0 -1531
- package/dist/_node-chunks/chunk-B2DAHWJK.js +0 -220
- package/dist/_node-chunks/chunk-CC4PW5MJ.js +0 -34
- package/dist/_node-chunks/chunk-D7NIZELR.js +0 -2256
- package/dist/_node-chunks/chunk-DO5Q3H4L.js +0 -1250
- package/dist/_node-chunks/chunk-ECK7WVFX.js +0 -304
- package/dist/_node-chunks/chunk-EUH3NHXA.js +0 -79
- package/dist/_node-chunks/chunk-FOQHPHCV.js +0 -1657
- package/dist/_node-chunks/chunk-G6EL47NS.js +0 -111
- package/dist/_node-chunks/chunk-GFLS4TJB.js +0 -90
- package/dist/_node-chunks/chunk-J3XZKWHE.js +0 -1586
- package/dist/_node-chunks/chunk-LE63EHJ5.js +0 -1518
- package/dist/_node-chunks/chunk-M47XA42S.js +0 -4741
- package/dist/_node-chunks/chunk-OOI74AL3.js +0 -61
- package/dist/_node-chunks/chunk-PRJHT3GJ.js +0 -61
- package/dist/_node-chunks/chunk-Q52PVUSU.js +0 -101
- package/dist/_node-chunks/chunk-SDCF5RNN.js +0 -1198
- package/dist/_node-chunks/chunk-UJ5SJ23M.js +0 -5029
- package/dist/_node-chunks/chunk-UPHK4ETU.js +0 -64658
- package/dist/_node-chunks/chunk-V7VURIPB.js +0 -1544
- package/dist/_node-chunks/dist-6TXHNR5C.js +0 -175
- package/dist/_node-chunks/globby-PBTV6PX6.js +0 -5222
- package/dist/_node-chunks/lib-4RTDZVGX.js +0 -518
- package/dist/_node-chunks/mdx-N42X6CFJ-COWEH7KR.js +0 -22017
- package/dist/_node-chunks/p-limit-PBVZQOFY.js +0 -168
- package/dist/_node-chunks/plugin-EOZKYZAG.js +0 -159
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-35HMSMR5.js +0 -69102
- package/dist/_node-chunks/webpack-mock-plugin-GT3MA5E2.js +0 -124
|
@@ -0,0 +1,3452 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_843v2rliy1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_843v2rliy1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_843v2rliy1 from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_843v2rliy1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_843v2rliy1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_843v2rliy1.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
require_picomatch,
|
|
14
|
+
require_utils
|
|
15
|
+
} from "./chunk-5QK5MSOI.js";
|
|
16
|
+
import {
|
|
17
|
+
slash
|
|
18
|
+
} from "./chunk-QH4V5YDB.js";
|
|
19
|
+
import {
|
|
20
|
+
__commonJS,
|
|
21
|
+
__require,
|
|
22
|
+
__toESM
|
|
23
|
+
} from "./chunk-XGVLB4UJ.js";
|
|
24
|
+
|
|
25
|
+
// ../node_modules/fast-glob/out/utils/array.js
|
|
26
|
+
var require_array = __commonJS({
|
|
27
|
+
"../node_modules/fast-glob/out/utils/array.js"(exports) {
|
|
28
|
+
"use strict";
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
30
|
+
exports.splitWhen = exports.flatten = void 0;
|
|
31
|
+
function flatten(items) {
|
|
32
|
+
return items.reduce((collection, item) => [].concat(collection, item), []);
|
|
33
|
+
}
|
|
34
|
+
exports.flatten = flatten;
|
|
35
|
+
function splitWhen(items, predicate) {
|
|
36
|
+
let result = [[]], groupIndex = 0;
|
|
37
|
+
for (let item of items)
|
|
38
|
+
predicate(item) ? (groupIndex++, result[groupIndex] = []) : result[groupIndex].push(item);
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
exports.splitWhen = splitWhen;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// ../node_modules/fast-glob/out/utils/errno.js
|
|
46
|
+
var require_errno = __commonJS({
|
|
47
|
+
"../node_modules/fast-glob/out/utils/errno.js"(exports) {
|
|
48
|
+
"use strict";
|
|
49
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
50
|
+
exports.isEnoentCodeError = void 0;
|
|
51
|
+
function isEnoentCodeError(error) {
|
|
52
|
+
return error.code === "ENOENT";
|
|
53
|
+
}
|
|
54
|
+
exports.isEnoentCodeError = isEnoentCodeError;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// ../node_modules/fast-glob/out/utils/fs.js
|
|
59
|
+
var require_fs = __commonJS({
|
|
60
|
+
"../node_modules/fast-glob/out/utils/fs.js"(exports) {
|
|
61
|
+
"use strict";
|
|
62
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
63
|
+
exports.createDirentFromStats = void 0;
|
|
64
|
+
var DirentFromStats = class {
|
|
65
|
+
constructor(name, stats) {
|
|
66
|
+
this.name = name, this.isBlockDevice = stats.isBlockDevice.bind(stats), this.isCharacterDevice = stats.isCharacterDevice.bind(stats), this.isDirectory = stats.isDirectory.bind(stats), this.isFIFO = stats.isFIFO.bind(stats), this.isFile = stats.isFile.bind(stats), this.isSocket = stats.isSocket.bind(stats), this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
function createDirentFromStats(name, stats) {
|
|
70
|
+
return new DirentFromStats(name, stats);
|
|
71
|
+
}
|
|
72
|
+
exports.createDirentFromStats = createDirentFromStats;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// ../node_modules/fast-glob/out/utils/path.js
|
|
77
|
+
var require_path = __commonJS({
|
|
78
|
+
"../node_modules/fast-glob/out/utils/path.js"(exports) {
|
|
79
|
+
"use strict";
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
81
|
+
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
82
|
+
var os = __require("os"), path2 = __require("path"), IS_WINDOWS_PLATFORM = os.platform() === "win32", LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2, POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g, WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g, DOS_DEVICE_PATH_RE = /^\\\\([.?])/, WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g;
|
|
83
|
+
function unixify(filepath) {
|
|
84
|
+
return filepath.replace(/\\/g, "/");
|
|
85
|
+
}
|
|
86
|
+
exports.unixify = unixify;
|
|
87
|
+
function makeAbsolute(cwd, filepath) {
|
|
88
|
+
return path2.resolve(cwd, filepath);
|
|
89
|
+
}
|
|
90
|
+
exports.makeAbsolute = makeAbsolute;
|
|
91
|
+
function removeLeadingDotSegment(entry) {
|
|
92
|
+
if (entry.charAt(0) === ".") {
|
|
93
|
+
let secondCharactery = entry.charAt(1);
|
|
94
|
+
if (secondCharactery === "/" || secondCharactery === "\\")
|
|
95
|
+
return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
|
|
96
|
+
}
|
|
97
|
+
return entry;
|
|
98
|
+
}
|
|
99
|
+
exports.removeLeadingDotSegment = removeLeadingDotSegment;
|
|
100
|
+
exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
|
|
101
|
+
function escapeWindowsPath(pattern) {
|
|
102
|
+
return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
103
|
+
}
|
|
104
|
+
exports.escapeWindowsPath = escapeWindowsPath;
|
|
105
|
+
function escapePosixPath(pattern) {
|
|
106
|
+
return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
107
|
+
}
|
|
108
|
+
exports.escapePosixPath = escapePosixPath;
|
|
109
|
+
exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
|
|
110
|
+
function convertWindowsPathToPattern(filepath) {
|
|
111
|
+
return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/");
|
|
112
|
+
}
|
|
113
|
+
exports.convertWindowsPathToPattern = convertWindowsPathToPattern;
|
|
114
|
+
function convertPosixPathToPattern(filepath) {
|
|
115
|
+
return escapePosixPath(filepath);
|
|
116
|
+
}
|
|
117
|
+
exports.convertPosixPathToPattern = convertPosixPathToPattern;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// ../node_modules/is-extglob/index.js
|
|
122
|
+
var require_is_extglob = __commonJS({
|
|
123
|
+
"../node_modules/is-extglob/index.js"(exports, module) {
|
|
124
|
+
module.exports = function(str) {
|
|
125
|
+
if (typeof str != "string" || str === "")
|
|
126
|
+
return !1;
|
|
127
|
+
for (var match; match = /(\\).|([@?!+*]\(.*\))/g.exec(str); ) {
|
|
128
|
+
if (match[2]) return !0;
|
|
129
|
+
str = str.slice(match.index + match[0].length);
|
|
130
|
+
}
|
|
131
|
+
return !1;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// ../node_modules/is-glob/index.js
|
|
137
|
+
var require_is_glob = __commonJS({
|
|
138
|
+
"../node_modules/is-glob/index.js"(exports, module) {
|
|
139
|
+
var isExtglob = require_is_extglob(), chars = { "{": "}", "(": ")", "[": "]" }, strictCheck = function(str) {
|
|
140
|
+
if (str[0] === "!")
|
|
141
|
+
return !0;
|
|
142
|
+
for (var index = 0, pipeIndex = -2, closeSquareIndex = -2, closeCurlyIndex = -2, closeParenIndex = -2, backSlashIndex = -2; index < str.length; ) {
|
|
143
|
+
if (str[index] === "*" || str[index + 1] === "?" && /[\].+)]/.test(str[index]) || closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]" && (closeSquareIndex < index && (closeSquareIndex = str.indexOf("]", index)), closeSquareIndex > index && (backSlashIndex === -1 || backSlashIndex > closeSquareIndex || (backSlashIndex = str.indexOf("\\", index), backSlashIndex === -1 || backSlashIndex > closeSquareIndex))) || closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}" && (closeCurlyIndex = str.indexOf("}", index), closeCurlyIndex > index && (backSlashIndex = str.indexOf("\\", index), backSlashIndex === -1 || backSlashIndex > closeCurlyIndex)) || closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")" && (closeParenIndex = str.indexOf(")", index), closeParenIndex > index && (backSlashIndex = str.indexOf("\\", index), backSlashIndex === -1 || backSlashIndex > closeParenIndex)) || pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|" && (pipeIndex < index && (pipeIndex = str.indexOf("|", index)), pipeIndex !== -1 && str[pipeIndex + 1] !== ")" && (closeParenIndex = str.indexOf(")", pipeIndex), closeParenIndex > pipeIndex && (backSlashIndex = str.indexOf("\\", pipeIndex), backSlashIndex === -1 || backSlashIndex > closeParenIndex))))
|
|
144
|
+
return !0;
|
|
145
|
+
if (str[index] === "\\") {
|
|
146
|
+
var open = str[index + 1];
|
|
147
|
+
index += 2;
|
|
148
|
+
var close = chars[open];
|
|
149
|
+
if (close) {
|
|
150
|
+
var n = str.indexOf(close, index);
|
|
151
|
+
n !== -1 && (index = n + 1);
|
|
152
|
+
}
|
|
153
|
+
if (str[index] === "!")
|
|
154
|
+
return !0;
|
|
155
|
+
} else
|
|
156
|
+
index++;
|
|
157
|
+
}
|
|
158
|
+
return !1;
|
|
159
|
+
}, relaxedCheck = function(str) {
|
|
160
|
+
if (str[0] === "!")
|
|
161
|
+
return !0;
|
|
162
|
+
for (var index = 0; index < str.length; ) {
|
|
163
|
+
if (/[*?{}()[\]]/.test(str[index]))
|
|
164
|
+
return !0;
|
|
165
|
+
if (str[index] === "\\") {
|
|
166
|
+
var open = str[index + 1];
|
|
167
|
+
index += 2;
|
|
168
|
+
var close = chars[open];
|
|
169
|
+
if (close) {
|
|
170
|
+
var n = str.indexOf(close, index);
|
|
171
|
+
n !== -1 && (index = n + 1);
|
|
172
|
+
}
|
|
173
|
+
if (str[index] === "!")
|
|
174
|
+
return !0;
|
|
175
|
+
} else
|
|
176
|
+
index++;
|
|
177
|
+
}
|
|
178
|
+
return !1;
|
|
179
|
+
};
|
|
180
|
+
module.exports = function(str, options) {
|
|
181
|
+
if (typeof str != "string" || str === "")
|
|
182
|
+
return !1;
|
|
183
|
+
if (isExtglob(str))
|
|
184
|
+
return !0;
|
|
185
|
+
var check = strictCheck;
|
|
186
|
+
return options && options.strict === !1 && (check = relaxedCheck), check(str);
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
// ../node_modules/fast-glob/node_modules/glob-parent/index.js
|
|
192
|
+
var require_glob_parent = __commonJS({
|
|
193
|
+
"../node_modules/fast-glob/node_modules/glob-parent/index.js"(exports, module) {
|
|
194
|
+
"use strict";
|
|
195
|
+
var isGlob = require_is_glob(), pathPosixDirname = __require("path").posix.dirname, isWin32 = __require("os").platform() === "win32", slash2 = "/", backslash = /\\/g, enclosure = /[\{\[].*[\}\]]$/, globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/, escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
|
|
196
|
+
module.exports = function(str, opts) {
|
|
197
|
+
var options = Object.assign({ flipBackslashes: !0 }, opts);
|
|
198
|
+
options.flipBackslashes && isWin32 && str.indexOf(slash2) < 0 && (str = str.replace(backslash, slash2)), enclosure.test(str) && (str += slash2), str += "a";
|
|
199
|
+
do
|
|
200
|
+
str = pathPosixDirname(str);
|
|
201
|
+
while (isGlob(str) || globby2.test(str));
|
|
202
|
+
return str.replace(escaped, "$1");
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// ../node_modules/braces/lib/utils.js
|
|
208
|
+
var require_utils2 = __commonJS({
|
|
209
|
+
"../node_modules/braces/lib/utils.js"(exports) {
|
|
210
|
+
"use strict";
|
|
211
|
+
exports.isInteger = (num) => typeof num == "number" ? Number.isInteger(num) : typeof num == "string" && num.trim() !== "" ? Number.isInteger(Number(num)) : !1;
|
|
212
|
+
exports.find = (node, type) => node.nodes.find((node2) => node2.type === type);
|
|
213
|
+
exports.exceedsLimit = (min, max, step = 1, limit) => limit === !1 || !exports.isInteger(min) || !exports.isInteger(max) ? !1 : (Number(max) - Number(min)) / Number(step) >= limit;
|
|
214
|
+
exports.escapeNode = (block, n = 0, type) => {
|
|
215
|
+
let node = block.nodes[n];
|
|
216
|
+
node && (type && node.type === type || node.type === "open" || node.type === "close") && node.escaped !== !0 && (node.value = "\\" + node.value, node.escaped = !0);
|
|
217
|
+
};
|
|
218
|
+
exports.encloseBrace = (node) => node.type !== "brace" ? !1 : node.commas >> 0 + node.ranges >> 0 === 0 ? (node.invalid = !0, !0) : !1;
|
|
219
|
+
exports.isInvalidBrace = (block) => block.type !== "brace" ? !1 : block.invalid === !0 || block.dollar ? !0 : block.commas >> 0 + block.ranges >> 0 === 0 || block.open !== !0 || block.close !== !0 ? (block.invalid = !0, !0) : !1;
|
|
220
|
+
exports.isOpenOrClose = (node) => node.type === "open" || node.type === "close" ? !0 : node.open === !0 || node.close === !0;
|
|
221
|
+
exports.reduce = (nodes) => nodes.reduce((acc, node) => (node.type === "text" && acc.push(node.value), node.type === "range" && (node.type = "text"), acc), []);
|
|
222
|
+
exports.flatten = (...args) => {
|
|
223
|
+
let result = [], flat = (arr) => {
|
|
224
|
+
for (let i = 0; i < arr.length; i++) {
|
|
225
|
+
let ele = arr[i];
|
|
226
|
+
if (Array.isArray(ele)) {
|
|
227
|
+
flat(ele);
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
ele !== void 0 && result.push(ele);
|
|
231
|
+
}
|
|
232
|
+
return result;
|
|
233
|
+
};
|
|
234
|
+
return flat(args), result;
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
// ../node_modules/braces/lib/stringify.js
|
|
240
|
+
var require_stringify = __commonJS({
|
|
241
|
+
"../node_modules/braces/lib/stringify.js"(exports, module) {
|
|
242
|
+
"use strict";
|
|
243
|
+
var utils = require_utils2();
|
|
244
|
+
module.exports = (ast, options = {}) => {
|
|
245
|
+
let stringify = (node, parent = {}) => {
|
|
246
|
+
let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent), invalidNode = node.invalid === !0 && options.escapeInvalid === !0, output = "";
|
|
247
|
+
if (node.value)
|
|
248
|
+
return (invalidBlock || invalidNode) && utils.isOpenOrClose(node) ? "\\" + node.value : node.value;
|
|
249
|
+
if (node.value)
|
|
250
|
+
return node.value;
|
|
251
|
+
if (node.nodes)
|
|
252
|
+
for (let child of node.nodes)
|
|
253
|
+
output += stringify(child);
|
|
254
|
+
return output;
|
|
255
|
+
};
|
|
256
|
+
return stringify(ast);
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
// ../node_modules/is-number/index.js
|
|
262
|
+
var require_is_number = __commonJS({
|
|
263
|
+
"../node_modules/is-number/index.js"(exports, module) {
|
|
264
|
+
"use strict";
|
|
265
|
+
module.exports = function(num) {
|
|
266
|
+
return typeof num == "number" ? num - num === 0 : typeof num == "string" && num.trim() !== "" ? Number.isFinite ? Number.isFinite(+num) : isFinite(+num) : !1;
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
// ../node_modules/to-regex-range/index.js
|
|
272
|
+
var require_to_regex_range = __commonJS({
|
|
273
|
+
"../node_modules/to-regex-range/index.js"(exports, module) {
|
|
274
|
+
"use strict";
|
|
275
|
+
var isNumber = require_is_number(), toRegexRange = (min, max, options) => {
|
|
276
|
+
if (isNumber(min) === !1)
|
|
277
|
+
throw new TypeError("toRegexRange: expected the first argument to be a number");
|
|
278
|
+
if (max === void 0 || min === max)
|
|
279
|
+
return String(min);
|
|
280
|
+
if (isNumber(max) === !1)
|
|
281
|
+
throw new TypeError("toRegexRange: expected the second argument to be a number.");
|
|
282
|
+
let opts = { relaxZeros: !0, ...options };
|
|
283
|
+
typeof opts.strictZeros == "boolean" && (opts.relaxZeros = opts.strictZeros === !1);
|
|
284
|
+
let relax = String(opts.relaxZeros), shorthand = String(opts.shorthand), capture = String(opts.capture), wrap = String(opts.wrap), cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
|
|
285
|
+
if (toRegexRange.cache.hasOwnProperty(cacheKey))
|
|
286
|
+
return toRegexRange.cache[cacheKey].result;
|
|
287
|
+
let a = Math.min(min, max), b = Math.max(min, max);
|
|
288
|
+
if (Math.abs(a - b) === 1) {
|
|
289
|
+
let result = min + "|" + max;
|
|
290
|
+
return opts.capture ? `(${result})` : opts.wrap === !1 ? result : `(?:${result})`;
|
|
291
|
+
}
|
|
292
|
+
let isPadded = hasPadding(min) || hasPadding(max), state = { min, max, a, b }, positives = [], negatives = [];
|
|
293
|
+
if (isPadded && (state.isPadded = isPadded, state.maxLen = String(state.max).length), a < 0) {
|
|
294
|
+
let newMin = b < 0 ? Math.abs(b) : 1;
|
|
295
|
+
negatives = splitToPatterns(newMin, Math.abs(a), state, opts), a = state.a = 0;
|
|
296
|
+
}
|
|
297
|
+
return b >= 0 && (positives = splitToPatterns(a, b, state, opts)), state.negatives = negatives, state.positives = positives, state.result = collatePatterns(negatives, positives, opts), opts.capture === !0 ? state.result = `(${state.result})` : opts.wrap !== !1 && positives.length + negatives.length > 1 && (state.result = `(?:${state.result})`), toRegexRange.cache[cacheKey] = state, state.result;
|
|
298
|
+
};
|
|
299
|
+
function collatePatterns(neg, pos, options) {
|
|
300
|
+
let onlyNegative = filterPatterns(neg, pos, "-", !1, options) || [], onlyPositive = filterPatterns(pos, neg, "", !1, options) || [], intersected = filterPatterns(neg, pos, "-?", !0, options) || [];
|
|
301
|
+
return onlyNegative.concat(intersected).concat(onlyPositive).join("|");
|
|
302
|
+
}
|
|
303
|
+
function splitToRanges(min, max) {
|
|
304
|
+
let nines = 1, zeros = 1, stop = countNines(min, nines), stops = /* @__PURE__ */ new Set([max]);
|
|
305
|
+
for (; min <= stop && stop <= max; )
|
|
306
|
+
stops.add(stop), nines += 1, stop = countNines(min, nines);
|
|
307
|
+
for (stop = countZeros(max + 1, zeros) - 1; min < stop && stop <= max; )
|
|
308
|
+
stops.add(stop), zeros += 1, stop = countZeros(max + 1, zeros) - 1;
|
|
309
|
+
return stops = [...stops], stops.sort(compare), stops;
|
|
310
|
+
}
|
|
311
|
+
function rangeToPattern(start, stop, options) {
|
|
312
|
+
if (start === stop)
|
|
313
|
+
return { pattern: start, count: [], digits: 0 };
|
|
314
|
+
let zipped = zip(start, stop), digits = zipped.length, pattern = "", count = 0;
|
|
315
|
+
for (let i = 0; i < digits; i++) {
|
|
316
|
+
let [startDigit, stopDigit] = zipped[i];
|
|
317
|
+
startDigit === stopDigit ? pattern += startDigit : startDigit !== "0" || stopDigit !== "9" ? pattern += toCharacterClass(startDigit, stopDigit, options) : count++;
|
|
318
|
+
}
|
|
319
|
+
return count && (pattern += options.shorthand === !0 ? "\\d" : "[0-9]"), { pattern, count: [count], digits };
|
|
320
|
+
}
|
|
321
|
+
function splitToPatterns(min, max, tok, options) {
|
|
322
|
+
let ranges = splitToRanges(min, max), tokens = [], start = min, prev;
|
|
323
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
324
|
+
let max2 = ranges[i], obj = rangeToPattern(String(start), String(max2), options), zeros = "";
|
|
325
|
+
if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
|
|
326
|
+
prev.count.length > 1 && prev.count.pop(), prev.count.push(obj.count[0]), prev.string = prev.pattern + toQuantifier(prev.count), start = max2 + 1;
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
tok.isPadded && (zeros = padZeros(max2, tok, options)), obj.string = zeros + obj.pattern + toQuantifier(obj.count), tokens.push(obj), start = max2 + 1, prev = obj;
|
|
330
|
+
}
|
|
331
|
+
return tokens;
|
|
332
|
+
}
|
|
333
|
+
function filterPatterns(arr, comparison, prefix, intersection, options) {
|
|
334
|
+
let result = [];
|
|
335
|
+
for (let ele of arr) {
|
|
336
|
+
let { string } = ele;
|
|
337
|
+
!intersection && !contains(comparison, "string", string) && result.push(prefix + string), intersection && contains(comparison, "string", string) && result.push(prefix + string);
|
|
338
|
+
}
|
|
339
|
+
return result;
|
|
340
|
+
}
|
|
341
|
+
function zip(a, b) {
|
|
342
|
+
let arr = [];
|
|
343
|
+
for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
|
|
344
|
+
return arr;
|
|
345
|
+
}
|
|
346
|
+
function compare(a, b) {
|
|
347
|
+
return a > b ? 1 : b > a ? -1 : 0;
|
|
348
|
+
}
|
|
349
|
+
function contains(arr, key, val) {
|
|
350
|
+
return arr.some((ele) => ele[key] === val);
|
|
351
|
+
}
|
|
352
|
+
function countNines(min, len) {
|
|
353
|
+
return Number(String(min).slice(0, -len) + "9".repeat(len));
|
|
354
|
+
}
|
|
355
|
+
function countZeros(integer, zeros) {
|
|
356
|
+
return integer - integer % Math.pow(10, zeros);
|
|
357
|
+
}
|
|
358
|
+
function toQuantifier(digits) {
|
|
359
|
+
let [start = 0, stop = ""] = digits;
|
|
360
|
+
return stop || start > 1 ? `{${start + (stop ? "," + stop : "")}}` : "";
|
|
361
|
+
}
|
|
362
|
+
function toCharacterClass(a, b, options) {
|
|
363
|
+
return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
|
|
364
|
+
}
|
|
365
|
+
function hasPadding(str) {
|
|
366
|
+
return /^-?(0+)\d/.test(str);
|
|
367
|
+
}
|
|
368
|
+
function padZeros(value, tok, options) {
|
|
369
|
+
if (!tok.isPadded)
|
|
370
|
+
return value;
|
|
371
|
+
let diff = Math.abs(tok.maxLen - String(value).length), relax = options.relaxZeros !== !1;
|
|
372
|
+
switch (diff) {
|
|
373
|
+
case 0:
|
|
374
|
+
return "";
|
|
375
|
+
case 1:
|
|
376
|
+
return relax ? "0?" : "0";
|
|
377
|
+
case 2:
|
|
378
|
+
return relax ? "0{0,2}" : "00";
|
|
379
|
+
default:
|
|
380
|
+
return relax ? `0{0,${diff}}` : `0{${diff}}`;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
toRegexRange.cache = {};
|
|
384
|
+
toRegexRange.clearCache = () => toRegexRange.cache = {};
|
|
385
|
+
module.exports = toRegexRange;
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
// ../node_modules/fill-range/index.js
|
|
390
|
+
var require_fill_range = __commonJS({
|
|
391
|
+
"../node_modules/fill-range/index.js"(exports, module) {
|
|
392
|
+
"use strict";
|
|
393
|
+
var util = __require("util"), toRegexRange = require_to_regex_range(), isObject = (val) => val !== null && typeof val == "object" && !Array.isArray(val), transform = (toNumber) => (value) => toNumber === !0 ? Number(value) : String(value), isValidValue = (value) => typeof value == "number" || typeof value == "string" && value !== "", isNumber = (num) => Number.isInteger(+num), zeros = (input) => {
|
|
394
|
+
let value = `${input}`, index = -1;
|
|
395
|
+
if (value[0] === "-" && (value = value.slice(1)), value === "0") return !1;
|
|
396
|
+
for (; value[++index] === "0"; ) ;
|
|
397
|
+
return index > 0;
|
|
398
|
+
}, stringify = (start, end, options) => typeof start == "string" || typeof end == "string" ? !0 : options.stringify === !0, pad = (input, maxLength, toNumber) => {
|
|
399
|
+
if (maxLength > 0) {
|
|
400
|
+
let dash = input[0] === "-" ? "-" : "";
|
|
401
|
+
dash && (input = input.slice(1)), input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
|
|
402
|
+
}
|
|
403
|
+
return toNumber === !1 ? String(input) : input;
|
|
404
|
+
}, toMaxLen = (input, maxLength) => {
|
|
405
|
+
let negative = input[0] === "-" ? "-" : "";
|
|
406
|
+
for (negative && (input = input.slice(1), maxLength--); input.length < maxLength; ) input = "0" + input;
|
|
407
|
+
return negative ? "-" + input : input;
|
|
408
|
+
}, toSequence = (parts, options, maxLen) => {
|
|
409
|
+
parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0), parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
410
|
+
let prefix = options.capture ? "" : "?:", positives = "", negatives = "", result;
|
|
411
|
+
return parts.positives.length && (positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|")), parts.negatives.length && (negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`), positives && negatives ? result = `${positives}|${negatives}` : result = positives || negatives, options.wrap ? `(${prefix}${result})` : result;
|
|
412
|
+
}, toRange = (a, b, isNumbers, options) => {
|
|
413
|
+
if (isNumbers)
|
|
414
|
+
return toRegexRange(a, b, { wrap: !1, ...options });
|
|
415
|
+
let start = String.fromCharCode(a);
|
|
416
|
+
if (a === b) return start;
|
|
417
|
+
let stop = String.fromCharCode(b);
|
|
418
|
+
return `[${start}-${stop}]`;
|
|
419
|
+
}, toRegex = (start, end, options) => {
|
|
420
|
+
if (Array.isArray(start)) {
|
|
421
|
+
let wrap = options.wrap === !0, prefix = options.capture ? "" : "?:";
|
|
422
|
+
return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
|
|
423
|
+
}
|
|
424
|
+
return toRegexRange(start, end, options);
|
|
425
|
+
}, rangeError = (...args) => new RangeError("Invalid range arguments: " + util.inspect(...args)), invalidRange = (start, end, options) => {
|
|
426
|
+
if (options.strictRanges === !0) throw rangeError([start, end]);
|
|
427
|
+
return [];
|
|
428
|
+
}, invalidStep = (step, options) => {
|
|
429
|
+
if (options.strictRanges === !0)
|
|
430
|
+
throw new TypeError(`Expected step "${step}" to be a number`);
|
|
431
|
+
return [];
|
|
432
|
+
}, fillNumbers = (start, end, step = 1, options = {}) => {
|
|
433
|
+
let a = Number(start), b = Number(end);
|
|
434
|
+
if (!Number.isInteger(a) || !Number.isInteger(b)) {
|
|
435
|
+
if (options.strictRanges === !0) throw rangeError([start, end]);
|
|
436
|
+
return [];
|
|
437
|
+
}
|
|
438
|
+
a === 0 && (a = 0), b === 0 && (b = 0);
|
|
439
|
+
let descending = a > b, startString = String(start), endString = String(end), stepString = String(step);
|
|
440
|
+
step = Math.max(Math.abs(step), 1);
|
|
441
|
+
let padded = zeros(startString) || zeros(endString) || zeros(stepString), maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0, toNumber = padded === !1 && stringify(start, end, options) === !1, format = options.transform || transform(toNumber);
|
|
442
|
+
if (options.toRegex && step === 1)
|
|
443
|
+
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), !0, options);
|
|
444
|
+
let parts = { negatives: [], positives: [] }, push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)), range = [], index = 0;
|
|
445
|
+
for (; descending ? a >= b : a <= b; )
|
|
446
|
+
options.toRegex === !0 && step > 1 ? push(a) : range.push(pad(format(a, index), maxLen, toNumber)), a = descending ? a - step : a + step, index++;
|
|
447
|
+
return options.toRegex === !0 ? step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: !1, ...options }) : range;
|
|
448
|
+
}, fillLetters = (start, end, step = 1, options = {}) => {
|
|
449
|
+
if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1)
|
|
450
|
+
return invalidRange(start, end, options);
|
|
451
|
+
let format = options.transform || ((val) => String.fromCharCode(val)), a = `${start}`.charCodeAt(0), b = `${end}`.charCodeAt(0), descending = a > b, min = Math.min(a, b), max = Math.max(a, b);
|
|
452
|
+
if (options.toRegex && step === 1)
|
|
453
|
+
return toRange(min, max, !1, options);
|
|
454
|
+
let range = [], index = 0;
|
|
455
|
+
for (; descending ? a >= b : a <= b; )
|
|
456
|
+
range.push(format(a, index)), a = descending ? a - step : a + step, index++;
|
|
457
|
+
return options.toRegex === !0 ? toRegex(range, null, { wrap: !1, options }) : range;
|
|
458
|
+
}, fill = (start, end, step, options = {}) => {
|
|
459
|
+
if (end == null && isValidValue(start))
|
|
460
|
+
return [start];
|
|
461
|
+
if (!isValidValue(start) || !isValidValue(end))
|
|
462
|
+
return invalidRange(start, end, options);
|
|
463
|
+
if (typeof step == "function")
|
|
464
|
+
return fill(start, end, 1, { transform: step });
|
|
465
|
+
if (isObject(step))
|
|
466
|
+
return fill(start, end, 0, step);
|
|
467
|
+
let opts = { ...options };
|
|
468
|
+
return opts.capture === !0 && (opts.wrap = !0), step = step || opts.step || 1, isNumber(step) ? isNumber(start) && isNumber(end) ? fillNumbers(start, end, step, opts) : fillLetters(start, end, Math.max(Math.abs(step), 1), opts) : step != null && !isObject(step) ? invalidStep(step, opts) : fill(start, end, 1, step);
|
|
469
|
+
};
|
|
470
|
+
module.exports = fill;
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
|
|
474
|
+
// ../node_modules/braces/lib/compile.js
|
|
475
|
+
var require_compile = __commonJS({
|
|
476
|
+
"../node_modules/braces/lib/compile.js"(exports, module) {
|
|
477
|
+
"use strict";
|
|
478
|
+
var fill = require_fill_range(), utils = require_utils2(), compile = (ast, options = {}) => {
|
|
479
|
+
let walk = (node, parent = {}) => {
|
|
480
|
+
let invalidBlock = utils.isInvalidBrace(parent), invalidNode = node.invalid === !0 && options.escapeInvalid === !0, invalid = invalidBlock === !0 || invalidNode === !0, prefix = options.escapeInvalid === !0 ? "\\" : "", output = "";
|
|
481
|
+
if (node.isOpen === !0)
|
|
482
|
+
return prefix + node.value;
|
|
483
|
+
if (node.isClose === !0)
|
|
484
|
+
return console.log("node.isClose", prefix, node.value), prefix + node.value;
|
|
485
|
+
if (node.type === "open")
|
|
486
|
+
return invalid ? prefix + node.value : "(";
|
|
487
|
+
if (node.type === "close")
|
|
488
|
+
return invalid ? prefix + node.value : ")";
|
|
489
|
+
if (node.type === "comma")
|
|
490
|
+
return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
|
|
491
|
+
if (node.value)
|
|
492
|
+
return node.value;
|
|
493
|
+
if (node.nodes && node.ranges > 0) {
|
|
494
|
+
let args = utils.reduce(node.nodes), range = fill(...args, { ...options, wrap: !1, toRegex: !0, strictZeros: !0 });
|
|
495
|
+
if (range.length !== 0)
|
|
496
|
+
return args.length > 1 && range.length > 1 ? `(${range})` : range;
|
|
497
|
+
}
|
|
498
|
+
if (node.nodes)
|
|
499
|
+
for (let child of node.nodes)
|
|
500
|
+
output += walk(child, node);
|
|
501
|
+
return output;
|
|
502
|
+
};
|
|
503
|
+
return walk(ast);
|
|
504
|
+
};
|
|
505
|
+
module.exports = compile;
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
// ../node_modules/braces/lib/expand.js
|
|
510
|
+
var require_expand = __commonJS({
|
|
511
|
+
"../node_modules/braces/lib/expand.js"(exports, module) {
|
|
512
|
+
"use strict";
|
|
513
|
+
var fill = require_fill_range(), stringify = require_stringify(), utils = require_utils2(), append = (queue = "", stash = "", enclose = !1) => {
|
|
514
|
+
let result = [];
|
|
515
|
+
if (queue = [].concat(queue), stash = [].concat(stash), !stash.length) return queue;
|
|
516
|
+
if (!queue.length)
|
|
517
|
+
return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
|
|
518
|
+
for (let item of queue)
|
|
519
|
+
if (Array.isArray(item))
|
|
520
|
+
for (let value of item)
|
|
521
|
+
result.push(append(value, stash, enclose));
|
|
522
|
+
else
|
|
523
|
+
for (let ele of stash)
|
|
524
|
+
enclose === !0 && typeof ele == "string" && (ele = `{${ele}}`), result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
|
|
525
|
+
return utils.flatten(result);
|
|
526
|
+
}, expand = (ast, options = {}) => {
|
|
527
|
+
let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit, walk = (node, parent = {}) => {
|
|
528
|
+
node.queue = [];
|
|
529
|
+
let p = parent, q = parent.queue;
|
|
530
|
+
for (; p.type !== "brace" && p.type !== "root" && p.parent; )
|
|
531
|
+
p = p.parent, q = p.queue;
|
|
532
|
+
if (node.invalid || node.dollar) {
|
|
533
|
+
q.push(append(q.pop(), stringify(node, options)));
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
if (node.type === "brace" && node.invalid !== !0 && node.nodes.length === 2) {
|
|
537
|
+
q.push(append(q.pop(), ["{}"]));
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
if (node.nodes && node.ranges > 0) {
|
|
541
|
+
let args = utils.reduce(node.nodes);
|
|
542
|
+
if (utils.exceedsLimit(...args, options.step, rangeLimit))
|
|
543
|
+
throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
|
|
544
|
+
let range = fill(...args, options);
|
|
545
|
+
range.length === 0 && (range = stringify(node, options)), q.push(append(q.pop(), range)), node.nodes = [];
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
let enclose = utils.encloseBrace(node), queue = node.queue, block = node;
|
|
549
|
+
for (; block.type !== "brace" && block.type !== "root" && block.parent; )
|
|
550
|
+
block = block.parent, queue = block.queue;
|
|
551
|
+
for (let i = 0; i < node.nodes.length; i++) {
|
|
552
|
+
let child = node.nodes[i];
|
|
553
|
+
if (child.type === "comma" && node.type === "brace") {
|
|
554
|
+
i === 1 && queue.push(""), queue.push("");
|
|
555
|
+
continue;
|
|
556
|
+
}
|
|
557
|
+
if (child.type === "close") {
|
|
558
|
+
q.push(append(q.pop(), queue, enclose));
|
|
559
|
+
continue;
|
|
560
|
+
}
|
|
561
|
+
if (child.value && child.type !== "open") {
|
|
562
|
+
queue.push(append(queue.pop(), child.value));
|
|
563
|
+
continue;
|
|
564
|
+
}
|
|
565
|
+
child.nodes && walk(child, node);
|
|
566
|
+
}
|
|
567
|
+
return queue;
|
|
568
|
+
};
|
|
569
|
+
return utils.flatten(walk(ast));
|
|
570
|
+
};
|
|
571
|
+
module.exports = expand;
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
// ../node_modules/braces/lib/constants.js
|
|
576
|
+
var require_constants = __commonJS({
|
|
577
|
+
"../node_modules/braces/lib/constants.js"(exports, module) {
|
|
578
|
+
"use strict";
|
|
579
|
+
module.exports = {
|
|
580
|
+
MAX_LENGTH: 1e4,
|
|
581
|
+
// Digits
|
|
582
|
+
CHAR_0: "0",
|
|
583
|
+
/* 0 */
|
|
584
|
+
CHAR_9: "9",
|
|
585
|
+
/* 9 */
|
|
586
|
+
// Alphabet chars.
|
|
587
|
+
CHAR_UPPERCASE_A: "A",
|
|
588
|
+
/* A */
|
|
589
|
+
CHAR_LOWERCASE_A: "a",
|
|
590
|
+
/* a */
|
|
591
|
+
CHAR_UPPERCASE_Z: "Z",
|
|
592
|
+
/* Z */
|
|
593
|
+
CHAR_LOWERCASE_Z: "z",
|
|
594
|
+
/* z */
|
|
595
|
+
CHAR_LEFT_PARENTHESES: "(",
|
|
596
|
+
/* ( */
|
|
597
|
+
CHAR_RIGHT_PARENTHESES: ")",
|
|
598
|
+
/* ) */
|
|
599
|
+
CHAR_ASTERISK: "*",
|
|
600
|
+
/* * */
|
|
601
|
+
// Non-alphabetic chars.
|
|
602
|
+
CHAR_AMPERSAND: "&",
|
|
603
|
+
/* & */
|
|
604
|
+
CHAR_AT: "@",
|
|
605
|
+
/* @ */
|
|
606
|
+
CHAR_BACKSLASH: "\\",
|
|
607
|
+
/* \ */
|
|
608
|
+
CHAR_BACKTICK: "`",
|
|
609
|
+
/* ` */
|
|
610
|
+
CHAR_CARRIAGE_RETURN: "\r",
|
|
611
|
+
/* \r */
|
|
612
|
+
CHAR_CIRCUMFLEX_ACCENT: "^",
|
|
613
|
+
/* ^ */
|
|
614
|
+
CHAR_COLON: ":",
|
|
615
|
+
/* : */
|
|
616
|
+
CHAR_COMMA: ",",
|
|
617
|
+
/* , */
|
|
618
|
+
CHAR_DOLLAR: "$",
|
|
619
|
+
/* . */
|
|
620
|
+
CHAR_DOT: ".",
|
|
621
|
+
/* . */
|
|
622
|
+
CHAR_DOUBLE_QUOTE: '"',
|
|
623
|
+
/* " */
|
|
624
|
+
CHAR_EQUAL: "=",
|
|
625
|
+
/* = */
|
|
626
|
+
CHAR_EXCLAMATION_MARK: "!",
|
|
627
|
+
/* ! */
|
|
628
|
+
CHAR_FORM_FEED: "\f",
|
|
629
|
+
/* \f */
|
|
630
|
+
CHAR_FORWARD_SLASH: "/",
|
|
631
|
+
/* / */
|
|
632
|
+
CHAR_HASH: "#",
|
|
633
|
+
/* # */
|
|
634
|
+
CHAR_HYPHEN_MINUS: "-",
|
|
635
|
+
/* - */
|
|
636
|
+
CHAR_LEFT_ANGLE_BRACKET: "<",
|
|
637
|
+
/* < */
|
|
638
|
+
CHAR_LEFT_CURLY_BRACE: "{",
|
|
639
|
+
/* { */
|
|
640
|
+
CHAR_LEFT_SQUARE_BRACKET: "[",
|
|
641
|
+
/* [ */
|
|
642
|
+
CHAR_LINE_FEED: `
|
|
643
|
+
`,
|
|
644
|
+
/* \n */
|
|
645
|
+
CHAR_NO_BREAK_SPACE: "\xA0",
|
|
646
|
+
/* \u00A0 */
|
|
647
|
+
CHAR_PERCENT: "%",
|
|
648
|
+
/* % */
|
|
649
|
+
CHAR_PLUS: "+",
|
|
650
|
+
/* + */
|
|
651
|
+
CHAR_QUESTION_MARK: "?",
|
|
652
|
+
/* ? */
|
|
653
|
+
CHAR_RIGHT_ANGLE_BRACKET: ">",
|
|
654
|
+
/* > */
|
|
655
|
+
CHAR_RIGHT_CURLY_BRACE: "}",
|
|
656
|
+
/* } */
|
|
657
|
+
CHAR_RIGHT_SQUARE_BRACKET: "]",
|
|
658
|
+
/* ] */
|
|
659
|
+
CHAR_SEMICOLON: ";",
|
|
660
|
+
/* ; */
|
|
661
|
+
CHAR_SINGLE_QUOTE: "'",
|
|
662
|
+
/* ' */
|
|
663
|
+
CHAR_SPACE: " ",
|
|
664
|
+
/* */
|
|
665
|
+
CHAR_TAB: " ",
|
|
666
|
+
/* \t */
|
|
667
|
+
CHAR_UNDERSCORE: "_",
|
|
668
|
+
/* _ */
|
|
669
|
+
CHAR_VERTICAL_LINE: "|",
|
|
670
|
+
/* | */
|
|
671
|
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
|
|
672
|
+
/* \uFEFF */
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
// ../node_modules/braces/lib/parse.js
|
|
678
|
+
var require_parse = __commonJS({
|
|
679
|
+
"../node_modules/braces/lib/parse.js"(exports, module) {
|
|
680
|
+
"use strict";
|
|
681
|
+
var stringify = require_stringify(), {
|
|
682
|
+
MAX_LENGTH,
|
|
683
|
+
CHAR_BACKSLASH,
|
|
684
|
+
/* \ */
|
|
685
|
+
CHAR_BACKTICK,
|
|
686
|
+
/* ` */
|
|
687
|
+
CHAR_COMMA,
|
|
688
|
+
/* , */
|
|
689
|
+
CHAR_DOT,
|
|
690
|
+
/* . */
|
|
691
|
+
CHAR_LEFT_PARENTHESES,
|
|
692
|
+
/* ( */
|
|
693
|
+
CHAR_RIGHT_PARENTHESES,
|
|
694
|
+
/* ) */
|
|
695
|
+
CHAR_LEFT_CURLY_BRACE,
|
|
696
|
+
/* { */
|
|
697
|
+
CHAR_RIGHT_CURLY_BRACE,
|
|
698
|
+
/* } */
|
|
699
|
+
CHAR_LEFT_SQUARE_BRACKET,
|
|
700
|
+
/* [ */
|
|
701
|
+
CHAR_RIGHT_SQUARE_BRACKET,
|
|
702
|
+
/* ] */
|
|
703
|
+
CHAR_DOUBLE_QUOTE,
|
|
704
|
+
/* " */
|
|
705
|
+
CHAR_SINGLE_QUOTE,
|
|
706
|
+
/* ' */
|
|
707
|
+
CHAR_NO_BREAK_SPACE,
|
|
708
|
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
|
709
|
+
} = require_constants(), parse = (input, options = {}) => {
|
|
710
|
+
if (typeof input != "string")
|
|
711
|
+
throw new TypeError("Expected a string");
|
|
712
|
+
let opts = options || {}, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
713
|
+
if (input.length > max)
|
|
714
|
+
throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
|
|
715
|
+
let ast = { type: "root", input, nodes: [] }, stack = [ast], block = ast, prev = ast, brackets = 0, length = input.length, index = 0, depth = 0, value, advance = () => input[index++], push = (node) => {
|
|
716
|
+
if (node.type === "text" && prev.type === "dot" && (prev.type = "text"), prev && prev.type === "text" && node.type === "text") {
|
|
717
|
+
prev.value += node.value;
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
return block.nodes.push(node), node.parent = block, node.prev = prev, prev = node, node;
|
|
721
|
+
};
|
|
722
|
+
for (push({ type: "bos" }); index < length; )
|
|
723
|
+
if (block = stack[stack.length - 1], value = advance(), !(value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE)) {
|
|
724
|
+
if (value === CHAR_BACKSLASH) {
|
|
725
|
+
push({ type: "text", value: (options.keepEscaping ? value : "") + advance() });
|
|
726
|
+
continue;
|
|
727
|
+
}
|
|
728
|
+
if (value === CHAR_RIGHT_SQUARE_BRACKET) {
|
|
729
|
+
push({ type: "text", value: "\\" + value });
|
|
730
|
+
continue;
|
|
731
|
+
}
|
|
732
|
+
if (value === CHAR_LEFT_SQUARE_BRACKET) {
|
|
733
|
+
brackets++;
|
|
734
|
+
let next;
|
|
735
|
+
for (; index < length && (next = advance()); ) {
|
|
736
|
+
if (value += next, next === CHAR_LEFT_SQUARE_BRACKET) {
|
|
737
|
+
brackets++;
|
|
738
|
+
continue;
|
|
739
|
+
}
|
|
740
|
+
if (next === CHAR_BACKSLASH) {
|
|
741
|
+
value += advance();
|
|
742
|
+
continue;
|
|
743
|
+
}
|
|
744
|
+
if (next === CHAR_RIGHT_SQUARE_BRACKET && (brackets--, brackets === 0))
|
|
745
|
+
break;
|
|
746
|
+
}
|
|
747
|
+
push({ type: "text", value });
|
|
748
|
+
continue;
|
|
749
|
+
}
|
|
750
|
+
if (value === CHAR_LEFT_PARENTHESES) {
|
|
751
|
+
block = push({ type: "paren", nodes: [] }), stack.push(block), push({ type: "text", value });
|
|
752
|
+
continue;
|
|
753
|
+
}
|
|
754
|
+
if (value === CHAR_RIGHT_PARENTHESES) {
|
|
755
|
+
if (block.type !== "paren") {
|
|
756
|
+
push({ type: "text", value });
|
|
757
|
+
continue;
|
|
758
|
+
}
|
|
759
|
+
block = stack.pop(), push({ type: "text", value }), block = stack[stack.length - 1];
|
|
760
|
+
continue;
|
|
761
|
+
}
|
|
762
|
+
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
|
763
|
+
let open = value, next;
|
|
764
|
+
for (options.keepQuotes !== !0 && (value = ""); index < length && (next = advance()); ) {
|
|
765
|
+
if (next === CHAR_BACKSLASH) {
|
|
766
|
+
value += next + advance();
|
|
767
|
+
continue;
|
|
768
|
+
}
|
|
769
|
+
if (next === open) {
|
|
770
|
+
options.keepQuotes === !0 && (value += next);
|
|
771
|
+
break;
|
|
772
|
+
}
|
|
773
|
+
value += next;
|
|
774
|
+
}
|
|
775
|
+
push({ type: "text", value });
|
|
776
|
+
continue;
|
|
777
|
+
}
|
|
778
|
+
if (value === CHAR_LEFT_CURLY_BRACE) {
|
|
779
|
+
depth++;
|
|
780
|
+
let brace = {
|
|
781
|
+
type: "brace",
|
|
782
|
+
open: !0,
|
|
783
|
+
close: !1,
|
|
784
|
+
dollar: prev.value && prev.value.slice(-1) === "$" || block.dollar === !0,
|
|
785
|
+
depth,
|
|
786
|
+
commas: 0,
|
|
787
|
+
ranges: 0,
|
|
788
|
+
nodes: []
|
|
789
|
+
};
|
|
790
|
+
block = push(brace), stack.push(block), push({ type: "open", value });
|
|
791
|
+
continue;
|
|
792
|
+
}
|
|
793
|
+
if (value === CHAR_RIGHT_CURLY_BRACE) {
|
|
794
|
+
if (block.type !== "brace") {
|
|
795
|
+
push({ type: "text", value });
|
|
796
|
+
continue;
|
|
797
|
+
}
|
|
798
|
+
let type = "close";
|
|
799
|
+
block = stack.pop(), block.close = !0, push({ type, value }), depth--, block = stack[stack.length - 1];
|
|
800
|
+
continue;
|
|
801
|
+
}
|
|
802
|
+
if (value === CHAR_COMMA && depth > 0) {
|
|
803
|
+
if (block.ranges > 0) {
|
|
804
|
+
block.ranges = 0;
|
|
805
|
+
let open = block.nodes.shift();
|
|
806
|
+
block.nodes = [open, { type: "text", value: stringify(block) }];
|
|
807
|
+
}
|
|
808
|
+
push({ type: "comma", value }), block.commas++;
|
|
809
|
+
continue;
|
|
810
|
+
}
|
|
811
|
+
if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
|
|
812
|
+
let siblings = block.nodes;
|
|
813
|
+
if (depth === 0 || siblings.length === 0) {
|
|
814
|
+
push({ type: "text", value });
|
|
815
|
+
continue;
|
|
816
|
+
}
|
|
817
|
+
if (prev.type === "dot") {
|
|
818
|
+
if (block.range = [], prev.value += value, prev.type = "range", block.nodes.length !== 3 && block.nodes.length !== 5) {
|
|
819
|
+
block.invalid = !0, block.ranges = 0, prev.type = "text";
|
|
820
|
+
continue;
|
|
821
|
+
}
|
|
822
|
+
block.ranges++, block.args = [];
|
|
823
|
+
continue;
|
|
824
|
+
}
|
|
825
|
+
if (prev.type === "range") {
|
|
826
|
+
siblings.pop();
|
|
827
|
+
let before = siblings[siblings.length - 1];
|
|
828
|
+
before.value += prev.value + value, prev = before, block.ranges--;
|
|
829
|
+
continue;
|
|
830
|
+
}
|
|
831
|
+
push({ type: "dot", value });
|
|
832
|
+
continue;
|
|
833
|
+
}
|
|
834
|
+
push({ type: "text", value });
|
|
835
|
+
}
|
|
836
|
+
do
|
|
837
|
+
if (block = stack.pop(), block.type !== "root") {
|
|
838
|
+
block.nodes.forEach((node) => {
|
|
839
|
+
node.nodes || (node.type === "open" && (node.isOpen = !0), node.type === "close" && (node.isClose = !0), node.nodes || (node.type = "text"), node.invalid = !0);
|
|
840
|
+
});
|
|
841
|
+
let parent = stack[stack.length - 1], index2 = parent.nodes.indexOf(block);
|
|
842
|
+
parent.nodes.splice(index2, 1, ...block.nodes);
|
|
843
|
+
}
|
|
844
|
+
while (stack.length > 0);
|
|
845
|
+
return push({ type: "eos" }), ast;
|
|
846
|
+
};
|
|
847
|
+
module.exports = parse;
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
|
|
851
|
+
// ../node_modules/braces/index.js
|
|
852
|
+
var require_braces = __commonJS({
|
|
853
|
+
"../node_modules/braces/index.js"(exports, module) {
|
|
854
|
+
"use strict";
|
|
855
|
+
var stringify = require_stringify(), compile = require_compile(), expand = require_expand(), parse = require_parse(), braces = (input, options = {}) => {
|
|
856
|
+
let output = [];
|
|
857
|
+
if (Array.isArray(input))
|
|
858
|
+
for (let pattern of input) {
|
|
859
|
+
let result = braces.create(pattern, options);
|
|
860
|
+
Array.isArray(result) ? output.push(...result) : output.push(result);
|
|
861
|
+
}
|
|
862
|
+
else
|
|
863
|
+
output = [].concat(braces.create(input, options));
|
|
864
|
+
return options && options.expand === !0 && options.nodupes === !0 && (output = [...new Set(output)]), output;
|
|
865
|
+
};
|
|
866
|
+
braces.parse = (input, options = {}) => parse(input, options);
|
|
867
|
+
braces.stringify = (input, options = {}) => stringify(typeof input == "string" ? braces.parse(input, options) : input, options);
|
|
868
|
+
braces.compile = (input, options = {}) => (typeof input == "string" && (input = braces.parse(input, options)), compile(input, options));
|
|
869
|
+
braces.expand = (input, options = {}) => {
|
|
870
|
+
typeof input == "string" && (input = braces.parse(input, options));
|
|
871
|
+
let result = expand(input, options);
|
|
872
|
+
return options.noempty === !0 && (result = result.filter(Boolean)), options.nodupes === !0 && (result = [...new Set(result)]), result;
|
|
873
|
+
};
|
|
874
|
+
braces.create = (input, options = {}) => input === "" || input.length < 3 ? [input] : options.expand !== !0 ? braces.compile(input, options) : braces.expand(input, options);
|
|
875
|
+
module.exports = braces;
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
// ../node_modules/micromatch/index.js
|
|
880
|
+
var require_micromatch = __commonJS({
|
|
881
|
+
"../node_modules/micromatch/index.js"(exports, module) {
|
|
882
|
+
"use strict";
|
|
883
|
+
var util = __require("util"), braces = require_braces(), picomatch = require_picomatch(), utils = require_utils(), isEmptyString = (v) => v === "" || v === "./", hasBraces = (v) => {
|
|
884
|
+
let index = v.indexOf("{");
|
|
885
|
+
return index > -1 && v.indexOf("}", index) > -1;
|
|
886
|
+
}, micromatch = (list, patterns, options) => {
|
|
887
|
+
patterns = [].concat(patterns), list = [].concat(list);
|
|
888
|
+
let omit = /* @__PURE__ */ new Set(), keep = /* @__PURE__ */ new Set(), items = /* @__PURE__ */ new Set(), negatives = 0, onResult = (state) => {
|
|
889
|
+
items.add(state.output), options && options.onResult && options.onResult(state);
|
|
890
|
+
};
|
|
891
|
+
for (let i = 0; i < patterns.length; i++) {
|
|
892
|
+
let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, !0), negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
|
893
|
+
negated && negatives++;
|
|
894
|
+
for (let item of list) {
|
|
895
|
+
let matched = isMatch(item, !0);
|
|
896
|
+
(negated ? !matched.isMatch : matched.isMatch) && (negated ? omit.add(matched.output) : (omit.delete(matched.output), keep.add(matched.output)));
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
let matches = (negatives === patterns.length ? [...items] : [...keep]).filter((item) => !omit.has(item));
|
|
900
|
+
if (options && matches.length === 0) {
|
|
901
|
+
if (options.failglob === !0)
|
|
902
|
+
throw new Error(`No matches found for "${patterns.join(", ")}"`);
|
|
903
|
+
if (options.nonull === !0 || options.nullglob === !0)
|
|
904
|
+
return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
|
|
905
|
+
}
|
|
906
|
+
return matches;
|
|
907
|
+
};
|
|
908
|
+
micromatch.match = micromatch;
|
|
909
|
+
micromatch.matcher = (pattern, options) => picomatch(pattern, options);
|
|
910
|
+
micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
911
|
+
micromatch.any = micromatch.isMatch;
|
|
912
|
+
micromatch.not = (list, patterns, options = {}) => {
|
|
913
|
+
patterns = [].concat(patterns).map(String);
|
|
914
|
+
let result = /* @__PURE__ */ new Set(), items = [], onResult = (state) => {
|
|
915
|
+
options.onResult && options.onResult(state), items.push(state.output);
|
|
916
|
+
}, matches = new Set(micromatch(list, patterns, { ...options, onResult }));
|
|
917
|
+
for (let item of items)
|
|
918
|
+
matches.has(item) || result.add(item);
|
|
919
|
+
return [...result];
|
|
920
|
+
};
|
|
921
|
+
micromatch.contains = (str, pattern, options) => {
|
|
922
|
+
if (typeof str != "string")
|
|
923
|
+
throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
924
|
+
if (Array.isArray(pattern))
|
|
925
|
+
return pattern.some((p) => micromatch.contains(str, p, options));
|
|
926
|
+
if (typeof pattern == "string") {
|
|
927
|
+
if (isEmptyString(str) || isEmptyString(pattern))
|
|
928
|
+
return !1;
|
|
929
|
+
if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern))
|
|
930
|
+
return !0;
|
|
931
|
+
}
|
|
932
|
+
return micromatch.isMatch(str, pattern, { ...options, contains: !0 });
|
|
933
|
+
};
|
|
934
|
+
micromatch.matchKeys = (obj, patterns, options) => {
|
|
935
|
+
if (!utils.isObject(obj))
|
|
936
|
+
throw new TypeError("Expected the first argument to be an object");
|
|
937
|
+
let keys = micromatch(Object.keys(obj), patterns, options), res = {};
|
|
938
|
+
for (let key of keys) res[key] = obj[key];
|
|
939
|
+
return res;
|
|
940
|
+
};
|
|
941
|
+
micromatch.some = (list, patterns, options) => {
|
|
942
|
+
let items = [].concat(list);
|
|
943
|
+
for (let pattern of [].concat(patterns)) {
|
|
944
|
+
let isMatch = picomatch(String(pattern), options);
|
|
945
|
+
if (items.some((item) => isMatch(item)))
|
|
946
|
+
return !0;
|
|
947
|
+
}
|
|
948
|
+
return !1;
|
|
949
|
+
};
|
|
950
|
+
micromatch.every = (list, patterns, options) => {
|
|
951
|
+
let items = [].concat(list);
|
|
952
|
+
for (let pattern of [].concat(patterns)) {
|
|
953
|
+
let isMatch = picomatch(String(pattern), options);
|
|
954
|
+
if (!items.every((item) => isMatch(item)))
|
|
955
|
+
return !1;
|
|
956
|
+
}
|
|
957
|
+
return !0;
|
|
958
|
+
};
|
|
959
|
+
micromatch.all = (str, patterns, options) => {
|
|
960
|
+
if (typeof str != "string")
|
|
961
|
+
throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
962
|
+
return [].concat(patterns).every((p) => picomatch(p, options)(str));
|
|
963
|
+
};
|
|
964
|
+
micromatch.capture = (glob, input, options) => {
|
|
965
|
+
let posix = utils.isWindows(options), match = picomatch.makeRe(String(glob), { ...options, capture: !0 }).exec(posix ? utils.toPosixSlashes(input) : input);
|
|
966
|
+
if (match)
|
|
967
|
+
return match.slice(1).map((v) => v === void 0 ? "" : v);
|
|
968
|
+
};
|
|
969
|
+
micromatch.makeRe = (...args) => picomatch.makeRe(...args);
|
|
970
|
+
micromatch.scan = (...args) => picomatch.scan(...args);
|
|
971
|
+
micromatch.parse = (patterns, options) => {
|
|
972
|
+
let res = [];
|
|
973
|
+
for (let pattern of [].concat(patterns || []))
|
|
974
|
+
for (let str of braces(String(pattern), options))
|
|
975
|
+
res.push(picomatch.parse(str, options));
|
|
976
|
+
return res;
|
|
977
|
+
};
|
|
978
|
+
micromatch.braces = (pattern, options) => {
|
|
979
|
+
if (typeof pattern != "string") throw new TypeError("Expected a string");
|
|
980
|
+
return options && options.nobrace === !0 || !hasBraces(pattern) ? [pattern] : braces(pattern, options);
|
|
981
|
+
};
|
|
982
|
+
micromatch.braceExpand = (pattern, options) => {
|
|
983
|
+
if (typeof pattern != "string") throw new TypeError("Expected a string");
|
|
984
|
+
return micromatch.braces(pattern, { ...options, expand: !0 });
|
|
985
|
+
};
|
|
986
|
+
micromatch.hasBraces = hasBraces;
|
|
987
|
+
module.exports = micromatch;
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
|
|
991
|
+
// ../node_modules/fast-glob/out/utils/pattern.js
|
|
992
|
+
var require_pattern = __commonJS({
|
|
993
|
+
"../node_modules/fast-glob/out/utils/pattern.js"(exports) {
|
|
994
|
+
"use strict";
|
|
995
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
996
|
+
exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
997
|
+
var path2 = __require("path"), globParent = require_glob_parent(), micromatch = require_micromatch(), GLOBSTAR = "**", ESCAPE_SYMBOL = "\\", COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/, REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/, REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/, GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/, BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./, DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
998
|
+
function isStaticPattern(pattern, options = {}) {
|
|
999
|
+
return !isDynamicPattern2(pattern, options);
|
|
1000
|
+
}
|
|
1001
|
+
exports.isStaticPattern = isStaticPattern;
|
|
1002
|
+
function isDynamicPattern2(pattern, options = {}) {
|
|
1003
|
+
return pattern === "" ? !1 : !!(options.caseSensitiveMatch === !1 || pattern.includes(ESCAPE_SYMBOL) || COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern) || options.extglob !== !1 && GLOB_EXTENSION_SYMBOLS_RE.test(pattern) || options.braceExpansion !== !1 && hasBraceExpansion(pattern));
|
|
1004
|
+
}
|
|
1005
|
+
exports.isDynamicPattern = isDynamicPattern2;
|
|
1006
|
+
function hasBraceExpansion(pattern) {
|
|
1007
|
+
let openingBraceIndex = pattern.indexOf("{");
|
|
1008
|
+
if (openingBraceIndex === -1)
|
|
1009
|
+
return !1;
|
|
1010
|
+
let closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1);
|
|
1011
|
+
if (closingBraceIndex === -1)
|
|
1012
|
+
return !1;
|
|
1013
|
+
let braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
|
|
1014
|
+
return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
|
|
1015
|
+
}
|
|
1016
|
+
function convertToPositivePattern(pattern) {
|
|
1017
|
+
return isNegativePattern2(pattern) ? pattern.slice(1) : pattern;
|
|
1018
|
+
}
|
|
1019
|
+
exports.convertToPositivePattern = convertToPositivePattern;
|
|
1020
|
+
function convertToNegativePattern(pattern) {
|
|
1021
|
+
return "!" + pattern;
|
|
1022
|
+
}
|
|
1023
|
+
exports.convertToNegativePattern = convertToNegativePattern;
|
|
1024
|
+
function isNegativePattern2(pattern) {
|
|
1025
|
+
return pattern.startsWith("!") && pattern[1] !== "(";
|
|
1026
|
+
}
|
|
1027
|
+
exports.isNegativePattern = isNegativePattern2;
|
|
1028
|
+
function isPositivePattern(pattern) {
|
|
1029
|
+
return !isNegativePattern2(pattern);
|
|
1030
|
+
}
|
|
1031
|
+
exports.isPositivePattern = isPositivePattern;
|
|
1032
|
+
function getNegativePatterns(patterns) {
|
|
1033
|
+
return patterns.filter(isNegativePattern2);
|
|
1034
|
+
}
|
|
1035
|
+
exports.getNegativePatterns = getNegativePatterns;
|
|
1036
|
+
function getPositivePatterns(patterns) {
|
|
1037
|
+
return patterns.filter(isPositivePattern);
|
|
1038
|
+
}
|
|
1039
|
+
exports.getPositivePatterns = getPositivePatterns;
|
|
1040
|
+
function getPatternsInsideCurrentDirectory(patterns) {
|
|
1041
|
+
return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
|
|
1042
|
+
}
|
|
1043
|
+
exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
|
|
1044
|
+
function getPatternsOutsideCurrentDirectory(patterns) {
|
|
1045
|
+
return patterns.filter(isPatternRelatedToParentDirectory);
|
|
1046
|
+
}
|
|
1047
|
+
exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
|
|
1048
|
+
function isPatternRelatedToParentDirectory(pattern) {
|
|
1049
|
+
return pattern.startsWith("..") || pattern.startsWith("./..");
|
|
1050
|
+
}
|
|
1051
|
+
exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
|
|
1052
|
+
function getBaseDirectory(pattern) {
|
|
1053
|
+
return globParent(pattern, { flipBackslashes: !1 });
|
|
1054
|
+
}
|
|
1055
|
+
exports.getBaseDirectory = getBaseDirectory;
|
|
1056
|
+
function hasGlobStar(pattern) {
|
|
1057
|
+
return pattern.includes(GLOBSTAR);
|
|
1058
|
+
}
|
|
1059
|
+
exports.hasGlobStar = hasGlobStar;
|
|
1060
|
+
function endsWithSlashGlobStar(pattern) {
|
|
1061
|
+
return pattern.endsWith("/" + GLOBSTAR);
|
|
1062
|
+
}
|
|
1063
|
+
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
1064
|
+
function isAffectDepthOfReadingPattern(pattern) {
|
|
1065
|
+
let basename = path2.basename(pattern);
|
|
1066
|
+
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
1067
|
+
}
|
|
1068
|
+
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
1069
|
+
function expandPatternsWithBraceExpansion(patterns) {
|
|
1070
|
+
return patterns.reduce((collection, pattern) => collection.concat(expandBraceExpansion(pattern)), []);
|
|
1071
|
+
}
|
|
1072
|
+
exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
|
|
1073
|
+
function expandBraceExpansion(pattern) {
|
|
1074
|
+
let patterns = micromatch.braces(pattern, { expand: !0, nodupes: !0, keepEscaping: !0 });
|
|
1075
|
+
return patterns.sort((a, b) => a.length - b.length), patterns.filter((pattern2) => pattern2 !== "");
|
|
1076
|
+
}
|
|
1077
|
+
exports.expandBraceExpansion = expandBraceExpansion;
|
|
1078
|
+
function getPatternParts(pattern, options) {
|
|
1079
|
+
let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: !0 }));
|
|
1080
|
+
return parts.length === 0 && (parts = [pattern]), parts[0].startsWith("/") && (parts[0] = parts[0].slice(1), parts.unshift("")), parts;
|
|
1081
|
+
}
|
|
1082
|
+
exports.getPatternParts = getPatternParts;
|
|
1083
|
+
function makeRe(pattern, options) {
|
|
1084
|
+
return micromatch.makeRe(pattern, options);
|
|
1085
|
+
}
|
|
1086
|
+
exports.makeRe = makeRe;
|
|
1087
|
+
function convertPatternsToRe(patterns, options) {
|
|
1088
|
+
return patterns.map((pattern) => makeRe(pattern, options));
|
|
1089
|
+
}
|
|
1090
|
+
exports.convertPatternsToRe = convertPatternsToRe;
|
|
1091
|
+
function matchAny(entry, patternsRe) {
|
|
1092
|
+
return patternsRe.some((patternRe) => patternRe.test(entry));
|
|
1093
|
+
}
|
|
1094
|
+
exports.matchAny = matchAny;
|
|
1095
|
+
function removeDuplicateSlashes(pattern) {
|
|
1096
|
+
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
1097
|
+
}
|
|
1098
|
+
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
1099
|
+
function partitionAbsoluteAndRelative(patterns) {
|
|
1100
|
+
let absolute = [], relative = [];
|
|
1101
|
+
for (let pattern of patterns)
|
|
1102
|
+
isAbsolute(pattern) ? absolute.push(pattern) : relative.push(pattern);
|
|
1103
|
+
return [absolute, relative];
|
|
1104
|
+
}
|
|
1105
|
+
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
1106
|
+
function isAbsolute(pattern) {
|
|
1107
|
+
return path2.isAbsolute(pattern);
|
|
1108
|
+
}
|
|
1109
|
+
exports.isAbsolute = isAbsolute;
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1112
|
+
|
|
1113
|
+
// ../node_modules/merge2/index.js
|
|
1114
|
+
var require_merge2 = __commonJS({
|
|
1115
|
+
"../node_modules/merge2/index.js"(exports, module) {
|
|
1116
|
+
"use strict";
|
|
1117
|
+
var Stream = __require("stream"), PassThrough = Stream.PassThrough, slice = Array.prototype.slice;
|
|
1118
|
+
module.exports = merge2;
|
|
1119
|
+
function merge2() {
|
|
1120
|
+
let streamsQueue = [], args = slice.call(arguments), merging = !1, options = args[args.length - 1];
|
|
1121
|
+
options && !Array.isArray(options) && options.pipe == null ? args.pop() : options = {};
|
|
1122
|
+
let doEnd = options.end !== !1, doPipeError = options.pipeError === !0;
|
|
1123
|
+
options.objectMode == null && (options.objectMode = !0), options.highWaterMark == null && (options.highWaterMark = 64 * 1024);
|
|
1124
|
+
let mergedStream = PassThrough(options);
|
|
1125
|
+
function addStream() {
|
|
1126
|
+
for (let i = 0, len = arguments.length; i < len; i++)
|
|
1127
|
+
streamsQueue.push(pauseStreams(arguments[i], options));
|
|
1128
|
+
return mergeStream(), this;
|
|
1129
|
+
}
|
|
1130
|
+
function mergeStream() {
|
|
1131
|
+
if (merging)
|
|
1132
|
+
return;
|
|
1133
|
+
merging = !0;
|
|
1134
|
+
let streams = streamsQueue.shift();
|
|
1135
|
+
if (!streams) {
|
|
1136
|
+
process.nextTick(endStream2);
|
|
1137
|
+
return;
|
|
1138
|
+
}
|
|
1139
|
+
Array.isArray(streams) || (streams = [streams]);
|
|
1140
|
+
let pipesCount = streams.length + 1;
|
|
1141
|
+
function next() {
|
|
1142
|
+
--pipesCount > 0 || (merging = !1, mergeStream());
|
|
1143
|
+
}
|
|
1144
|
+
function pipe(stream) {
|
|
1145
|
+
function onend() {
|
|
1146
|
+
stream.removeListener("merge2UnpipeEnd", onend), stream.removeListener("end", onend), doPipeError && stream.removeListener("error", onerror), next();
|
|
1147
|
+
}
|
|
1148
|
+
function onerror(err) {
|
|
1149
|
+
mergedStream.emit("error", err);
|
|
1150
|
+
}
|
|
1151
|
+
if (stream._readableState.endEmitted)
|
|
1152
|
+
return next();
|
|
1153
|
+
stream.on("merge2UnpipeEnd", onend), stream.on("end", onend), doPipeError && stream.on("error", onerror), stream.pipe(mergedStream, { end: !1 }), stream.resume();
|
|
1154
|
+
}
|
|
1155
|
+
for (let i = 0; i < streams.length; i++)
|
|
1156
|
+
pipe(streams[i]);
|
|
1157
|
+
next();
|
|
1158
|
+
}
|
|
1159
|
+
function endStream2() {
|
|
1160
|
+
merging = !1, mergedStream.emit("queueDrain"), doEnd && mergedStream.end();
|
|
1161
|
+
}
|
|
1162
|
+
return mergedStream.setMaxListeners(0), mergedStream.add = addStream, mergedStream.on("unpipe", function(stream) {
|
|
1163
|
+
stream.emit("merge2UnpipeEnd");
|
|
1164
|
+
}), args.length && addStream.apply(null, args), mergedStream;
|
|
1165
|
+
}
|
|
1166
|
+
function pauseStreams(streams, options) {
|
|
1167
|
+
if (Array.isArray(streams))
|
|
1168
|
+
for (let i = 0, len = streams.length; i < len; i++)
|
|
1169
|
+
streams[i] = pauseStreams(streams[i], options);
|
|
1170
|
+
else {
|
|
1171
|
+
if (!streams._readableState && streams.pipe && (streams = streams.pipe(PassThrough(options))), !streams._readableState || !streams.pause || !streams.pipe)
|
|
1172
|
+
throw new Error("Only readable stream can be merged.");
|
|
1173
|
+
streams.pause();
|
|
1174
|
+
}
|
|
1175
|
+
return streams;
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
|
|
1180
|
+
// ../node_modules/fast-glob/out/utils/stream.js
|
|
1181
|
+
var require_stream = __commonJS({
|
|
1182
|
+
"../node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
1183
|
+
"use strict";
|
|
1184
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1185
|
+
exports.merge = void 0;
|
|
1186
|
+
var merge2 = require_merge2();
|
|
1187
|
+
function merge(streams) {
|
|
1188
|
+
let mergedStream = merge2(streams);
|
|
1189
|
+
return streams.forEach((stream) => {
|
|
1190
|
+
stream.once("error", (error) => mergedStream.emit("error", error));
|
|
1191
|
+
}), mergedStream.once("close", () => propagateCloseEventToSources(streams)), mergedStream.once("end", () => propagateCloseEventToSources(streams)), mergedStream;
|
|
1192
|
+
}
|
|
1193
|
+
exports.merge = merge;
|
|
1194
|
+
function propagateCloseEventToSources(streams) {
|
|
1195
|
+
streams.forEach((stream) => stream.emit("close"));
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
});
|
|
1199
|
+
|
|
1200
|
+
// ../node_modules/fast-glob/out/utils/string.js
|
|
1201
|
+
var require_string = __commonJS({
|
|
1202
|
+
"../node_modules/fast-glob/out/utils/string.js"(exports) {
|
|
1203
|
+
"use strict";
|
|
1204
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1205
|
+
exports.isEmpty = exports.isString = void 0;
|
|
1206
|
+
function isString(input) {
|
|
1207
|
+
return typeof input == "string";
|
|
1208
|
+
}
|
|
1209
|
+
exports.isString = isString;
|
|
1210
|
+
function isEmpty(input) {
|
|
1211
|
+
return input === "";
|
|
1212
|
+
}
|
|
1213
|
+
exports.isEmpty = isEmpty;
|
|
1214
|
+
}
|
|
1215
|
+
});
|
|
1216
|
+
|
|
1217
|
+
// ../node_modules/fast-glob/out/utils/index.js
|
|
1218
|
+
var require_utils3 = __commonJS({
|
|
1219
|
+
"../node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
1220
|
+
"use strict";
|
|
1221
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1222
|
+
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0;
|
|
1223
|
+
var array = require_array();
|
|
1224
|
+
exports.array = array;
|
|
1225
|
+
var errno = require_errno();
|
|
1226
|
+
exports.errno = errno;
|
|
1227
|
+
var fs4 = require_fs();
|
|
1228
|
+
exports.fs = fs4;
|
|
1229
|
+
var path2 = require_path();
|
|
1230
|
+
exports.path = path2;
|
|
1231
|
+
var pattern = require_pattern();
|
|
1232
|
+
exports.pattern = pattern;
|
|
1233
|
+
var stream = require_stream();
|
|
1234
|
+
exports.stream = stream;
|
|
1235
|
+
var string = require_string();
|
|
1236
|
+
exports.string = string;
|
|
1237
|
+
}
|
|
1238
|
+
});
|
|
1239
|
+
|
|
1240
|
+
// ../node_modules/fast-glob/out/managers/tasks.js
|
|
1241
|
+
var require_tasks = __commonJS({
|
|
1242
|
+
"../node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
1243
|
+
"use strict";
|
|
1244
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1245
|
+
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
|
|
1246
|
+
var utils = require_utils3();
|
|
1247
|
+
function generate(input, settings) {
|
|
1248
|
+
let patterns = processPatterns(input, settings), ignore = processPatterns(settings.ignore, settings), positivePatterns = getPositivePatterns(patterns), negativePatterns = getNegativePatternsAsPositive(patterns, ignore), staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)), dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)), staticTasks = convertPatternsToTasks(
|
|
1249
|
+
staticPatterns,
|
|
1250
|
+
negativePatterns,
|
|
1251
|
+
/* dynamic */
|
|
1252
|
+
!1
|
|
1253
|
+
), dynamicTasks = convertPatternsToTasks(
|
|
1254
|
+
dynamicPatterns,
|
|
1255
|
+
negativePatterns,
|
|
1256
|
+
/* dynamic */
|
|
1257
|
+
!0
|
|
1258
|
+
);
|
|
1259
|
+
return staticTasks.concat(dynamicTasks);
|
|
1260
|
+
}
|
|
1261
|
+
exports.generate = generate;
|
|
1262
|
+
function processPatterns(input, settings) {
|
|
1263
|
+
let patterns = input;
|
|
1264
|
+
return settings.braceExpansion && (patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns)), settings.baseNameMatch && (patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`)), patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
|
|
1265
|
+
}
|
|
1266
|
+
function convertPatternsToTasks(positive, negative, dynamic) {
|
|
1267
|
+
let tasks = [], patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive), patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive), outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory), insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
|
|
1268
|
+
return tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)), "." in insideCurrentDirectoryGroup ? tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)) : tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)), tasks;
|
|
1269
|
+
}
|
|
1270
|
+
exports.convertPatternsToTasks = convertPatternsToTasks;
|
|
1271
|
+
function getPositivePatterns(patterns) {
|
|
1272
|
+
return utils.pattern.getPositivePatterns(patterns);
|
|
1273
|
+
}
|
|
1274
|
+
exports.getPositivePatterns = getPositivePatterns;
|
|
1275
|
+
function getNegativePatternsAsPositive(patterns, ignore) {
|
|
1276
|
+
return utils.pattern.getNegativePatterns(patterns).concat(ignore).map(utils.pattern.convertToPositivePattern);
|
|
1277
|
+
}
|
|
1278
|
+
exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
|
|
1279
|
+
function groupPatternsByBaseDirectory(patterns) {
|
|
1280
|
+
let group = {};
|
|
1281
|
+
return patterns.reduce((collection, pattern) => {
|
|
1282
|
+
let base = utils.pattern.getBaseDirectory(pattern);
|
|
1283
|
+
return base in collection ? collection[base].push(pattern) : collection[base] = [pattern], collection;
|
|
1284
|
+
}, group);
|
|
1285
|
+
}
|
|
1286
|
+
exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
|
|
1287
|
+
function convertPatternGroupsToTasks(positive, negative, dynamic) {
|
|
1288
|
+
return Object.keys(positive).map((base) => convertPatternGroupToTask(base, positive[base], negative, dynamic));
|
|
1289
|
+
}
|
|
1290
|
+
exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
|
|
1291
|
+
function convertPatternGroupToTask(base, positive, negative, dynamic) {
|
|
1292
|
+
return {
|
|
1293
|
+
dynamic,
|
|
1294
|
+
positive,
|
|
1295
|
+
negative,
|
|
1296
|
+
base,
|
|
1297
|
+
patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
|
|
1298
|
+
};
|
|
1299
|
+
}
|
|
1300
|
+
exports.convertPatternGroupToTask = convertPatternGroupToTask;
|
|
1301
|
+
}
|
|
1302
|
+
});
|
|
1303
|
+
|
|
1304
|
+
// ../node_modules/@nodelib/fs.stat/out/providers/async.js
|
|
1305
|
+
var require_async = __commonJS({
|
|
1306
|
+
"../node_modules/@nodelib/fs.stat/out/providers/async.js"(exports) {
|
|
1307
|
+
"use strict";
|
|
1308
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1309
|
+
exports.read = void 0;
|
|
1310
|
+
function read(path2, settings, callback) {
|
|
1311
|
+
settings.fs.lstat(path2, (lstatError, lstat) => {
|
|
1312
|
+
if (lstatError !== null) {
|
|
1313
|
+
callFailureCallback(callback, lstatError);
|
|
1314
|
+
return;
|
|
1315
|
+
}
|
|
1316
|
+
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
1317
|
+
callSuccessCallback(callback, lstat);
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
settings.fs.stat(path2, (statError, stat) => {
|
|
1321
|
+
if (statError !== null) {
|
|
1322
|
+
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
1323
|
+
callFailureCallback(callback, statError);
|
|
1324
|
+
return;
|
|
1325
|
+
}
|
|
1326
|
+
callSuccessCallback(callback, lstat);
|
|
1327
|
+
return;
|
|
1328
|
+
}
|
|
1329
|
+
settings.markSymbolicLink && (stat.isSymbolicLink = () => !0), callSuccessCallback(callback, stat);
|
|
1330
|
+
});
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
exports.read = read;
|
|
1334
|
+
function callFailureCallback(callback, error) {
|
|
1335
|
+
callback(error);
|
|
1336
|
+
}
|
|
1337
|
+
function callSuccessCallback(callback, result) {
|
|
1338
|
+
callback(null, result);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
});
|
|
1342
|
+
|
|
1343
|
+
// ../node_modules/@nodelib/fs.stat/out/providers/sync.js
|
|
1344
|
+
var require_sync = __commonJS({
|
|
1345
|
+
"../node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports) {
|
|
1346
|
+
"use strict";
|
|
1347
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1348
|
+
exports.read = void 0;
|
|
1349
|
+
function read(path2, settings) {
|
|
1350
|
+
let lstat = settings.fs.lstatSync(path2);
|
|
1351
|
+
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink)
|
|
1352
|
+
return lstat;
|
|
1353
|
+
try {
|
|
1354
|
+
let stat = settings.fs.statSync(path2);
|
|
1355
|
+
return settings.markSymbolicLink && (stat.isSymbolicLink = () => !0), stat;
|
|
1356
|
+
} catch (error) {
|
|
1357
|
+
if (!settings.throwErrorOnBrokenSymbolicLink)
|
|
1358
|
+
return lstat;
|
|
1359
|
+
throw error;
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
exports.read = read;
|
|
1363
|
+
}
|
|
1364
|
+
});
|
|
1365
|
+
|
|
1366
|
+
// ../node_modules/@nodelib/fs.stat/out/adapters/fs.js
|
|
1367
|
+
var require_fs2 = __commonJS({
|
|
1368
|
+
"../node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports) {
|
|
1369
|
+
"use strict";
|
|
1370
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1371
|
+
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
1372
|
+
var fs4 = __require("fs");
|
|
1373
|
+
exports.FILE_SYSTEM_ADAPTER = {
|
|
1374
|
+
lstat: fs4.lstat,
|
|
1375
|
+
stat: fs4.stat,
|
|
1376
|
+
lstatSync: fs4.lstatSync,
|
|
1377
|
+
statSync: fs4.statSync
|
|
1378
|
+
};
|
|
1379
|
+
function createFileSystemAdapter(fsMethods) {
|
|
1380
|
+
return fsMethods === void 0 ? exports.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
1381
|
+
}
|
|
1382
|
+
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
1383
|
+
}
|
|
1384
|
+
});
|
|
1385
|
+
|
|
1386
|
+
// ../node_modules/@nodelib/fs.stat/out/settings.js
|
|
1387
|
+
var require_settings = __commonJS({
|
|
1388
|
+
"../node_modules/@nodelib/fs.stat/out/settings.js"(exports) {
|
|
1389
|
+
"use strict";
|
|
1390
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1391
|
+
var fs4 = require_fs2(), Settings = class {
|
|
1392
|
+
constructor(_options = {}) {
|
|
1393
|
+
this._options = _options, this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, !0), this.fs = fs4.createFileSystemAdapter(this._options.fs), this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0);
|
|
1394
|
+
}
|
|
1395
|
+
_getValue(option, value) {
|
|
1396
|
+
return option ?? value;
|
|
1397
|
+
}
|
|
1398
|
+
};
|
|
1399
|
+
exports.default = Settings;
|
|
1400
|
+
}
|
|
1401
|
+
});
|
|
1402
|
+
|
|
1403
|
+
// ../node_modules/@nodelib/fs.stat/out/index.js
|
|
1404
|
+
var require_out = __commonJS({
|
|
1405
|
+
"../node_modules/@nodelib/fs.stat/out/index.js"(exports) {
|
|
1406
|
+
"use strict";
|
|
1407
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1408
|
+
exports.statSync = exports.stat = exports.Settings = void 0;
|
|
1409
|
+
var async = require_async(), sync = require_sync(), settings_1 = require_settings();
|
|
1410
|
+
exports.Settings = settings_1.default;
|
|
1411
|
+
function stat(path2, optionsOrSettingsOrCallback, callback) {
|
|
1412
|
+
if (typeof optionsOrSettingsOrCallback == "function") {
|
|
1413
|
+
async.read(path2, getSettings(), optionsOrSettingsOrCallback);
|
|
1414
|
+
return;
|
|
1415
|
+
}
|
|
1416
|
+
async.read(path2, getSettings(optionsOrSettingsOrCallback), callback);
|
|
1417
|
+
}
|
|
1418
|
+
exports.stat = stat;
|
|
1419
|
+
function statSync(path2, optionsOrSettings) {
|
|
1420
|
+
let settings = getSettings(optionsOrSettings);
|
|
1421
|
+
return sync.read(path2, settings);
|
|
1422
|
+
}
|
|
1423
|
+
exports.statSync = statSync;
|
|
1424
|
+
function getSettings(settingsOrOptions = {}) {
|
|
1425
|
+
return settingsOrOptions instanceof settings_1.default ? settingsOrOptions : new settings_1.default(settingsOrOptions);
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
});
|
|
1429
|
+
|
|
1430
|
+
// ../node_modules/queue-microtask/index.js
|
|
1431
|
+
var require_queue_microtask = __commonJS({
|
|
1432
|
+
"../node_modules/queue-microtask/index.js"(exports, module) {
|
|
1433
|
+
var promise;
|
|
1434
|
+
module.exports = typeof queueMicrotask == "function" ? queueMicrotask.bind(typeof window < "u" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => {
|
|
1435
|
+
throw err;
|
|
1436
|
+
}, 0));
|
|
1437
|
+
}
|
|
1438
|
+
});
|
|
1439
|
+
|
|
1440
|
+
// ../node_modules/run-parallel/index.js
|
|
1441
|
+
var require_run_parallel = __commonJS({
|
|
1442
|
+
"../node_modules/run-parallel/index.js"(exports, module) {
|
|
1443
|
+
module.exports = runParallel;
|
|
1444
|
+
var queueMicrotask2 = require_queue_microtask();
|
|
1445
|
+
function runParallel(tasks, cb) {
|
|
1446
|
+
let results, pending, keys, isSync = !0;
|
|
1447
|
+
Array.isArray(tasks) ? (results = [], pending = tasks.length) : (keys = Object.keys(tasks), results = {}, pending = keys.length);
|
|
1448
|
+
function done(err) {
|
|
1449
|
+
function end() {
|
|
1450
|
+
cb && cb(err, results), cb = null;
|
|
1451
|
+
}
|
|
1452
|
+
isSync ? queueMicrotask2(end) : end();
|
|
1453
|
+
}
|
|
1454
|
+
function each(i, err, result) {
|
|
1455
|
+
results[i] = result, (--pending === 0 || err) && done(err);
|
|
1456
|
+
}
|
|
1457
|
+
pending ? keys ? keys.forEach(function(key) {
|
|
1458
|
+
tasks[key](function(err, result) {
|
|
1459
|
+
each(key, err, result);
|
|
1460
|
+
});
|
|
1461
|
+
}) : tasks.forEach(function(task, i) {
|
|
1462
|
+
task(function(err, result) {
|
|
1463
|
+
each(i, err, result);
|
|
1464
|
+
});
|
|
1465
|
+
}) : done(null), isSync = !1;
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
});
|
|
1469
|
+
|
|
1470
|
+
// ../node_modules/@nodelib/fs.scandir/out/constants.js
|
|
1471
|
+
var require_constants2 = __commonJS({
|
|
1472
|
+
"../node_modules/@nodelib/fs.scandir/out/constants.js"(exports) {
|
|
1473
|
+
"use strict";
|
|
1474
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1475
|
+
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
|
|
1476
|
+
var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
|
|
1477
|
+
if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0)
|
|
1478
|
+
throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
|
|
1479
|
+
var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10), MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10), SUPPORTED_MAJOR_VERSION = 10, SUPPORTED_MINOR_VERSION = 10, IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION, IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
|
|
1480
|
+
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
|
|
1481
|
+
}
|
|
1482
|
+
});
|
|
1483
|
+
|
|
1484
|
+
// ../node_modules/@nodelib/fs.scandir/out/utils/fs.js
|
|
1485
|
+
var require_fs3 = __commonJS({
|
|
1486
|
+
"../node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports) {
|
|
1487
|
+
"use strict";
|
|
1488
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1489
|
+
exports.createDirentFromStats = void 0;
|
|
1490
|
+
var DirentFromStats = class {
|
|
1491
|
+
constructor(name, stats) {
|
|
1492
|
+
this.name = name, this.isBlockDevice = stats.isBlockDevice.bind(stats), this.isCharacterDevice = stats.isCharacterDevice.bind(stats), this.isDirectory = stats.isDirectory.bind(stats), this.isFIFO = stats.isFIFO.bind(stats), this.isFile = stats.isFile.bind(stats), this.isSocket = stats.isSocket.bind(stats), this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
|
|
1493
|
+
}
|
|
1494
|
+
};
|
|
1495
|
+
function createDirentFromStats(name, stats) {
|
|
1496
|
+
return new DirentFromStats(name, stats);
|
|
1497
|
+
}
|
|
1498
|
+
exports.createDirentFromStats = createDirentFromStats;
|
|
1499
|
+
}
|
|
1500
|
+
});
|
|
1501
|
+
|
|
1502
|
+
// ../node_modules/@nodelib/fs.scandir/out/utils/index.js
|
|
1503
|
+
var require_utils4 = __commonJS({
|
|
1504
|
+
"../node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
1505
|
+
"use strict";
|
|
1506
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1507
|
+
exports.fs = void 0;
|
|
1508
|
+
var fs4 = require_fs3();
|
|
1509
|
+
exports.fs = fs4;
|
|
1510
|
+
}
|
|
1511
|
+
});
|
|
1512
|
+
|
|
1513
|
+
// ../node_modules/@nodelib/fs.scandir/out/providers/common.js
|
|
1514
|
+
var require_common = __commonJS({
|
|
1515
|
+
"../node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports) {
|
|
1516
|
+
"use strict";
|
|
1517
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1518
|
+
exports.joinPathSegments = void 0;
|
|
1519
|
+
function joinPathSegments(a, b, separator) {
|
|
1520
|
+
return a.endsWith(separator) ? a + b : a + separator + b;
|
|
1521
|
+
}
|
|
1522
|
+
exports.joinPathSegments = joinPathSegments;
|
|
1523
|
+
}
|
|
1524
|
+
});
|
|
1525
|
+
|
|
1526
|
+
// ../node_modules/@nodelib/fs.scandir/out/providers/async.js
|
|
1527
|
+
var require_async2 = __commonJS({
|
|
1528
|
+
"../node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports) {
|
|
1529
|
+
"use strict";
|
|
1530
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1531
|
+
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
|
|
1532
|
+
var fsStat = require_out(), rpl = require_run_parallel(), constants_1 = require_constants2(), utils = require_utils4(), common = require_common();
|
|
1533
|
+
function read(directory, settings, callback) {
|
|
1534
|
+
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
1535
|
+
readdirWithFileTypes(directory, settings, callback);
|
|
1536
|
+
return;
|
|
1537
|
+
}
|
|
1538
|
+
readdir(directory, settings, callback);
|
|
1539
|
+
}
|
|
1540
|
+
exports.read = read;
|
|
1541
|
+
function readdirWithFileTypes(directory, settings, callback) {
|
|
1542
|
+
settings.fs.readdir(directory, { withFileTypes: !0 }, (readdirError, dirents) => {
|
|
1543
|
+
if (readdirError !== null) {
|
|
1544
|
+
callFailureCallback(callback, readdirError);
|
|
1545
|
+
return;
|
|
1546
|
+
}
|
|
1547
|
+
let entries = dirents.map((dirent) => ({
|
|
1548
|
+
dirent,
|
|
1549
|
+
name: dirent.name,
|
|
1550
|
+
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
|
|
1551
|
+
}));
|
|
1552
|
+
if (!settings.followSymbolicLinks) {
|
|
1553
|
+
callSuccessCallback(callback, entries);
|
|
1554
|
+
return;
|
|
1555
|
+
}
|
|
1556
|
+
let tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
|
|
1557
|
+
rpl(tasks, (rplError, rplEntries) => {
|
|
1558
|
+
if (rplError !== null) {
|
|
1559
|
+
callFailureCallback(callback, rplError);
|
|
1560
|
+
return;
|
|
1561
|
+
}
|
|
1562
|
+
callSuccessCallback(callback, rplEntries);
|
|
1563
|
+
});
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
exports.readdirWithFileTypes = readdirWithFileTypes;
|
|
1567
|
+
function makeRplTaskEntry(entry, settings) {
|
|
1568
|
+
return (done) => {
|
|
1569
|
+
if (!entry.dirent.isSymbolicLink()) {
|
|
1570
|
+
done(null, entry);
|
|
1571
|
+
return;
|
|
1572
|
+
}
|
|
1573
|
+
settings.fs.stat(entry.path, (statError, stats) => {
|
|
1574
|
+
if (statError !== null) {
|
|
1575
|
+
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
1576
|
+
done(statError);
|
|
1577
|
+
return;
|
|
1578
|
+
}
|
|
1579
|
+
done(null, entry);
|
|
1580
|
+
return;
|
|
1581
|
+
}
|
|
1582
|
+
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats), done(null, entry);
|
|
1583
|
+
});
|
|
1584
|
+
};
|
|
1585
|
+
}
|
|
1586
|
+
function readdir(directory, settings, callback) {
|
|
1587
|
+
settings.fs.readdir(directory, (readdirError, names) => {
|
|
1588
|
+
if (readdirError !== null) {
|
|
1589
|
+
callFailureCallback(callback, readdirError);
|
|
1590
|
+
return;
|
|
1591
|
+
}
|
|
1592
|
+
let tasks = names.map((name) => {
|
|
1593
|
+
let path2 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
1594
|
+
return (done) => {
|
|
1595
|
+
fsStat.stat(path2, settings.fsStatSettings, (error, stats) => {
|
|
1596
|
+
if (error !== null) {
|
|
1597
|
+
done(error);
|
|
1598
|
+
return;
|
|
1599
|
+
}
|
|
1600
|
+
let entry = {
|
|
1601
|
+
name,
|
|
1602
|
+
path: path2,
|
|
1603
|
+
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
1604
|
+
};
|
|
1605
|
+
settings.stats && (entry.stats = stats), done(null, entry);
|
|
1606
|
+
});
|
|
1607
|
+
};
|
|
1608
|
+
});
|
|
1609
|
+
rpl(tasks, (rplError, entries) => {
|
|
1610
|
+
if (rplError !== null) {
|
|
1611
|
+
callFailureCallback(callback, rplError);
|
|
1612
|
+
return;
|
|
1613
|
+
}
|
|
1614
|
+
callSuccessCallback(callback, entries);
|
|
1615
|
+
});
|
|
1616
|
+
});
|
|
1617
|
+
}
|
|
1618
|
+
exports.readdir = readdir;
|
|
1619
|
+
function callFailureCallback(callback, error) {
|
|
1620
|
+
callback(error);
|
|
1621
|
+
}
|
|
1622
|
+
function callSuccessCallback(callback, result) {
|
|
1623
|
+
callback(null, result);
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
});
|
|
1627
|
+
|
|
1628
|
+
// ../node_modules/@nodelib/fs.scandir/out/providers/sync.js
|
|
1629
|
+
var require_sync2 = __commonJS({
|
|
1630
|
+
"../node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports) {
|
|
1631
|
+
"use strict";
|
|
1632
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1633
|
+
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
|
|
1634
|
+
var fsStat = require_out(), constants_1 = require_constants2(), utils = require_utils4(), common = require_common();
|
|
1635
|
+
function read(directory, settings) {
|
|
1636
|
+
return !settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES ? readdirWithFileTypes(directory, settings) : readdir(directory, settings);
|
|
1637
|
+
}
|
|
1638
|
+
exports.read = read;
|
|
1639
|
+
function readdirWithFileTypes(directory, settings) {
|
|
1640
|
+
return settings.fs.readdirSync(directory, { withFileTypes: !0 }).map((dirent) => {
|
|
1641
|
+
let entry = {
|
|
1642
|
+
dirent,
|
|
1643
|
+
name: dirent.name,
|
|
1644
|
+
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
|
|
1645
|
+
};
|
|
1646
|
+
if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks)
|
|
1647
|
+
try {
|
|
1648
|
+
let stats = settings.fs.statSync(entry.path);
|
|
1649
|
+
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
|
|
1650
|
+
} catch (error) {
|
|
1651
|
+
if (settings.throwErrorOnBrokenSymbolicLink)
|
|
1652
|
+
throw error;
|
|
1653
|
+
}
|
|
1654
|
+
return entry;
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
exports.readdirWithFileTypes = readdirWithFileTypes;
|
|
1658
|
+
function readdir(directory, settings) {
|
|
1659
|
+
return settings.fs.readdirSync(directory).map((name) => {
|
|
1660
|
+
let entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator), stats = fsStat.statSync(entryPath, settings.fsStatSettings), entry = {
|
|
1661
|
+
name,
|
|
1662
|
+
path: entryPath,
|
|
1663
|
+
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
1664
|
+
};
|
|
1665
|
+
return settings.stats && (entry.stats = stats), entry;
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
exports.readdir = readdir;
|
|
1669
|
+
}
|
|
1670
|
+
});
|
|
1671
|
+
|
|
1672
|
+
// ../node_modules/@nodelib/fs.scandir/out/adapters/fs.js
|
|
1673
|
+
var require_fs4 = __commonJS({
|
|
1674
|
+
"../node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports) {
|
|
1675
|
+
"use strict";
|
|
1676
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1677
|
+
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
1678
|
+
var fs4 = __require("fs");
|
|
1679
|
+
exports.FILE_SYSTEM_ADAPTER = {
|
|
1680
|
+
lstat: fs4.lstat,
|
|
1681
|
+
stat: fs4.stat,
|
|
1682
|
+
lstatSync: fs4.lstatSync,
|
|
1683
|
+
statSync: fs4.statSync,
|
|
1684
|
+
readdir: fs4.readdir,
|
|
1685
|
+
readdirSync: fs4.readdirSync
|
|
1686
|
+
};
|
|
1687
|
+
function createFileSystemAdapter(fsMethods) {
|
|
1688
|
+
return fsMethods === void 0 ? exports.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
1689
|
+
}
|
|
1690
|
+
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
1691
|
+
}
|
|
1692
|
+
});
|
|
1693
|
+
|
|
1694
|
+
// ../node_modules/@nodelib/fs.scandir/out/settings.js
|
|
1695
|
+
var require_settings2 = __commonJS({
|
|
1696
|
+
"../node_modules/@nodelib/fs.scandir/out/settings.js"(exports) {
|
|
1697
|
+
"use strict";
|
|
1698
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1699
|
+
var path2 = __require("path"), fsStat = require_out(), fs4 = require_fs4(), Settings = class {
|
|
1700
|
+
constructor(_options = {}) {
|
|
1701
|
+
this._options = _options, this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !1), this.fs = fs4.createFileSystemAdapter(this._options.fs), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep), this.stats = this._getValue(this._options.stats, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0), this.fsStatSettings = new fsStat.Settings({
|
|
1702
|
+
followSymbolicLink: this.followSymbolicLinks,
|
|
1703
|
+
fs: this.fs,
|
|
1704
|
+
throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1707
|
+
_getValue(option, value) {
|
|
1708
|
+
return option ?? value;
|
|
1709
|
+
}
|
|
1710
|
+
};
|
|
1711
|
+
exports.default = Settings;
|
|
1712
|
+
}
|
|
1713
|
+
});
|
|
1714
|
+
|
|
1715
|
+
// ../node_modules/@nodelib/fs.scandir/out/index.js
|
|
1716
|
+
var require_out2 = __commonJS({
|
|
1717
|
+
"../node_modules/@nodelib/fs.scandir/out/index.js"(exports) {
|
|
1718
|
+
"use strict";
|
|
1719
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1720
|
+
exports.Settings = exports.scandirSync = exports.scandir = void 0;
|
|
1721
|
+
var async = require_async2(), sync = require_sync2(), settings_1 = require_settings2();
|
|
1722
|
+
exports.Settings = settings_1.default;
|
|
1723
|
+
function scandir(path2, optionsOrSettingsOrCallback, callback) {
|
|
1724
|
+
if (typeof optionsOrSettingsOrCallback == "function") {
|
|
1725
|
+
async.read(path2, getSettings(), optionsOrSettingsOrCallback);
|
|
1726
|
+
return;
|
|
1727
|
+
}
|
|
1728
|
+
async.read(path2, getSettings(optionsOrSettingsOrCallback), callback);
|
|
1729
|
+
}
|
|
1730
|
+
exports.scandir = scandir;
|
|
1731
|
+
function scandirSync(path2, optionsOrSettings) {
|
|
1732
|
+
let settings = getSettings(optionsOrSettings);
|
|
1733
|
+
return sync.read(path2, settings);
|
|
1734
|
+
}
|
|
1735
|
+
exports.scandirSync = scandirSync;
|
|
1736
|
+
function getSettings(settingsOrOptions = {}) {
|
|
1737
|
+
return settingsOrOptions instanceof settings_1.default ? settingsOrOptions : new settings_1.default(settingsOrOptions);
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
});
|
|
1741
|
+
|
|
1742
|
+
// ../node_modules/reusify/reusify.js
|
|
1743
|
+
var require_reusify = __commonJS({
|
|
1744
|
+
"../node_modules/reusify/reusify.js"(exports, module) {
|
|
1745
|
+
"use strict";
|
|
1746
|
+
function reusify(Constructor) {
|
|
1747
|
+
var head = new Constructor(), tail = head;
|
|
1748
|
+
function get() {
|
|
1749
|
+
var current = head;
|
|
1750
|
+
return current.next ? head = current.next : (head = new Constructor(), tail = head), current.next = null, current;
|
|
1751
|
+
}
|
|
1752
|
+
function release(obj) {
|
|
1753
|
+
tail.next = obj, tail = obj;
|
|
1754
|
+
}
|
|
1755
|
+
return {
|
|
1756
|
+
get,
|
|
1757
|
+
release
|
|
1758
|
+
};
|
|
1759
|
+
}
|
|
1760
|
+
module.exports = reusify;
|
|
1761
|
+
}
|
|
1762
|
+
});
|
|
1763
|
+
|
|
1764
|
+
// ../node_modules/fastq/queue.js
|
|
1765
|
+
var require_queue = __commonJS({
|
|
1766
|
+
"../node_modules/fastq/queue.js"(exports, module) {
|
|
1767
|
+
"use strict";
|
|
1768
|
+
var reusify = require_reusify();
|
|
1769
|
+
function fastqueue(context, worker, _concurrency) {
|
|
1770
|
+
if (typeof context == "function" && (_concurrency = worker, worker = context, context = null), !(_concurrency >= 1))
|
|
1771
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
1772
|
+
var cache = reusify(Task), queueHead = null, queueTail = null, _running = 0, errorHandler = null, self = {
|
|
1773
|
+
push,
|
|
1774
|
+
drain: noop2,
|
|
1775
|
+
saturated: noop2,
|
|
1776
|
+
pause,
|
|
1777
|
+
paused: !1,
|
|
1778
|
+
get concurrency() {
|
|
1779
|
+
return _concurrency;
|
|
1780
|
+
},
|
|
1781
|
+
set concurrency(value) {
|
|
1782
|
+
if (!(value >= 1))
|
|
1783
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
1784
|
+
if (_concurrency = value, !self.paused)
|
|
1785
|
+
for (; queueHead && _running < _concurrency; )
|
|
1786
|
+
_running++, release();
|
|
1787
|
+
},
|
|
1788
|
+
running,
|
|
1789
|
+
resume,
|
|
1790
|
+
idle,
|
|
1791
|
+
length,
|
|
1792
|
+
getQueue,
|
|
1793
|
+
unshift,
|
|
1794
|
+
empty: noop2,
|
|
1795
|
+
kill,
|
|
1796
|
+
killAndDrain,
|
|
1797
|
+
error
|
|
1798
|
+
};
|
|
1799
|
+
return self;
|
|
1800
|
+
function running() {
|
|
1801
|
+
return _running;
|
|
1802
|
+
}
|
|
1803
|
+
function pause() {
|
|
1804
|
+
self.paused = !0;
|
|
1805
|
+
}
|
|
1806
|
+
function length() {
|
|
1807
|
+
for (var current = queueHead, counter = 0; current; )
|
|
1808
|
+
current = current.next, counter++;
|
|
1809
|
+
return counter;
|
|
1810
|
+
}
|
|
1811
|
+
function getQueue() {
|
|
1812
|
+
for (var current = queueHead, tasks = []; current; )
|
|
1813
|
+
tasks.push(current.value), current = current.next;
|
|
1814
|
+
return tasks;
|
|
1815
|
+
}
|
|
1816
|
+
function resume() {
|
|
1817
|
+
if (self.paused) {
|
|
1818
|
+
if (self.paused = !1, queueHead === null) {
|
|
1819
|
+
_running++, release();
|
|
1820
|
+
return;
|
|
1821
|
+
}
|
|
1822
|
+
for (; queueHead && _running < _concurrency; )
|
|
1823
|
+
_running++, release();
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
function idle() {
|
|
1827
|
+
return _running === 0 && self.length() === 0;
|
|
1828
|
+
}
|
|
1829
|
+
function push(value, done) {
|
|
1830
|
+
var current = cache.get();
|
|
1831
|
+
current.context = context, current.release = release, current.value = value, current.callback = done || noop2, current.errorHandler = errorHandler, _running >= _concurrency || self.paused ? queueTail ? (queueTail.next = current, queueTail = current) : (queueHead = current, queueTail = current, self.saturated()) : (_running++, worker.call(context, current.value, current.worked));
|
|
1832
|
+
}
|
|
1833
|
+
function unshift(value, done) {
|
|
1834
|
+
var current = cache.get();
|
|
1835
|
+
current.context = context, current.release = release, current.value = value, current.callback = done || noop2, current.errorHandler = errorHandler, _running >= _concurrency || self.paused ? queueHead ? (current.next = queueHead, queueHead = current) : (queueHead = current, queueTail = current, self.saturated()) : (_running++, worker.call(context, current.value, current.worked));
|
|
1836
|
+
}
|
|
1837
|
+
function release(holder) {
|
|
1838
|
+
holder && cache.release(holder);
|
|
1839
|
+
var next = queueHead;
|
|
1840
|
+
next && _running <= _concurrency ? self.paused ? _running-- : (queueTail === queueHead && (queueTail = null), queueHead = next.next, next.next = null, worker.call(context, next.value, next.worked), queueTail === null && self.empty()) : --_running === 0 && self.drain();
|
|
1841
|
+
}
|
|
1842
|
+
function kill() {
|
|
1843
|
+
queueHead = null, queueTail = null, self.drain = noop2;
|
|
1844
|
+
}
|
|
1845
|
+
function killAndDrain() {
|
|
1846
|
+
queueHead = null, queueTail = null, self.drain(), self.drain = noop2;
|
|
1847
|
+
}
|
|
1848
|
+
function error(handler) {
|
|
1849
|
+
errorHandler = handler;
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
function noop2() {
|
|
1853
|
+
}
|
|
1854
|
+
function Task() {
|
|
1855
|
+
this.value = null, this.callback = noop2, this.next = null, this.release = noop2, this.context = null, this.errorHandler = null;
|
|
1856
|
+
var self = this;
|
|
1857
|
+
this.worked = function(err, result) {
|
|
1858
|
+
var callback = self.callback, errorHandler = self.errorHandler, val = self.value;
|
|
1859
|
+
self.value = null, self.callback = noop2, self.errorHandler && errorHandler(err, val), callback.call(self.context, err, result), self.release(self);
|
|
1860
|
+
};
|
|
1861
|
+
}
|
|
1862
|
+
function queueAsPromised(context, worker, _concurrency) {
|
|
1863
|
+
typeof context == "function" && (_concurrency = worker, worker = context, context = null);
|
|
1864
|
+
function asyncWrapper(arg, cb) {
|
|
1865
|
+
worker.call(this, arg).then(function(res) {
|
|
1866
|
+
cb(null, res);
|
|
1867
|
+
}, cb);
|
|
1868
|
+
}
|
|
1869
|
+
var queue = fastqueue(context, asyncWrapper, _concurrency), pushCb = queue.push, unshiftCb = queue.unshift;
|
|
1870
|
+
return queue.push = push, queue.unshift = unshift, queue.drained = drained, queue;
|
|
1871
|
+
function push(value) {
|
|
1872
|
+
var p = new Promise(function(resolve, reject) {
|
|
1873
|
+
pushCb(value, function(err, result) {
|
|
1874
|
+
if (err) {
|
|
1875
|
+
reject(err);
|
|
1876
|
+
return;
|
|
1877
|
+
}
|
|
1878
|
+
resolve(result);
|
|
1879
|
+
});
|
|
1880
|
+
});
|
|
1881
|
+
return p.catch(noop2), p;
|
|
1882
|
+
}
|
|
1883
|
+
function unshift(value) {
|
|
1884
|
+
var p = new Promise(function(resolve, reject) {
|
|
1885
|
+
unshiftCb(value, function(err, result) {
|
|
1886
|
+
if (err) {
|
|
1887
|
+
reject(err);
|
|
1888
|
+
return;
|
|
1889
|
+
}
|
|
1890
|
+
resolve(result);
|
|
1891
|
+
});
|
|
1892
|
+
});
|
|
1893
|
+
return p.catch(noop2), p;
|
|
1894
|
+
}
|
|
1895
|
+
function drained() {
|
|
1896
|
+
var p = new Promise(function(resolve) {
|
|
1897
|
+
process.nextTick(function() {
|
|
1898
|
+
if (queue.idle())
|
|
1899
|
+
resolve();
|
|
1900
|
+
else {
|
|
1901
|
+
var previousDrain = queue.drain;
|
|
1902
|
+
queue.drain = function() {
|
|
1903
|
+
typeof previousDrain == "function" && previousDrain(), resolve(), queue.drain = previousDrain;
|
|
1904
|
+
};
|
|
1905
|
+
}
|
|
1906
|
+
});
|
|
1907
|
+
});
|
|
1908
|
+
return p;
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
module.exports = fastqueue;
|
|
1912
|
+
module.exports.promise = queueAsPromised;
|
|
1913
|
+
}
|
|
1914
|
+
});
|
|
1915
|
+
|
|
1916
|
+
// ../node_modules/@nodelib/fs.walk/out/readers/common.js
|
|
1917
|
+
var require_common2 = __commonJS({
|
|
1918
|
+
"../node_modules/@nodelib/fs.walk/out/readers/common.js"(exports) {
|
|
1919
|
+
"use strict";
|
|
1920
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1921
|
+
exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
|
|
1922
|
+
function isFatalError(settings, error) {
|
|
1923
|
+
return settings.errorFilter === null ? !0 : !settings.errorFilter(error);
|
|
1924
|
+
}
|
|
1925
|
+
exports.isFatalError = isFatalError;
|
|
1926
|
+
function isAppliedFilter(filter, value) {
|
|
1927
|
+
return filter === null || filter(value);
|
|
1928
|
+
}
|
|
1929
|
+
exports.isAppliedFilter = isAppliedFilter;
|
|
1930
|
+
function replacePathSegmentSeparator(filepath, separator) {
|
|
1931
|
+
return filepath.split(/[/\\]/).join(separator);
|
|
1932
|
+
}
|
|
1933
|
+
exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
|
|
1934
|
+
function joinPathSegments(a, b, separator) {
|
|
1935
|
+
return a === "" ? b : a.endsWith(separator) ? a + b : a + separator + b;
|
|
1936
|
+
}
|
|
1937
|
+
exports.joinPathSegments = joinPathSegments;
|
|
1938
|
+
}
|
|
1939
|
+
});
|
|
1940
|
+
|
|
1941
|
+
// ../node_modules/@nodelib/fs.walk/out/readers/reader.js
|
|
1942
|
+
var require_reader = __commonJS({
|
|
1943
|
+
"../node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports) {
|
|
1944
|
+
"use strict";
|
|
1945
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1946
|
+
var common = require_common2(), Reader = class {
|
|
1947
|
+
constructor(_root, _settings) {
|
|
1948
|
+
this._root = _root, this._settings = _settings, this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
|
|
1949
|
+
}
|
|
1950
|
+
};
|
|
1951
|
+
exports.default = Reader;
|
|
1952
|
+
}
|
|
1953
|
+
});
|
|
1954
|
+
|
|
1955
|
+
// ../node_modules/@nodelib/fs.walk/out/readers/async.js
|
|
1956
|
+
var require_async3 = __commonJS({
|
|
1957
|
+
"../node_modules/@nodelib/fs.walk/out/readers/async.js"(exports) {
|
|
1958
|
+
"use strict";
|
|
1959
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
1960
|
+
var events_1 = __require("events"), fsScandir = require_out2(), fastq = require_queue(), common = require_common2(), reader_1 = require_reader(), AsyncReader = class extends reader_1.default {
|
|
1961
|
+
constructor(_root, _settings) {
|
|
1962
|
+
super(_root, _settings), this._settings = _settings, this._scandir = fsScandir.scandir, this._emitter = new events_1.EventEmitter(), this._queue = fastq(this._worker.bind(this), this._settings.concurrency), this._isFatalError = !1, this._isDestroyed = !1, this._queue.drain = () => {
|
|
1963
|
+
this._isFatalError || this._emitter.emit("end");
|
|
1964
|
+
};
|
|
1965
|
+
}
|
|
1966
|
+
read() {
|
|
1967
|
+
return this._isFatalError = !1, this._isDestroyed = !1, setImmediate(() => {
|
|
1968
|
+
this._pushToQueue(this._root, this._settings.basePath);
|
|
1969
|
+
}), this._emitter;
|
|
1970
|
+
}
|
|
1971
|
+
get isDestroyed() {
|
|
1972
|
+
return this._isDestroyed;
|
|
1973
|
+
}
|
|
1974
|
+
destroy() {
|
|
1975
|
+
if (this._isDestroyed)
|
|
1976
|
+
throw new Error("The reader is already destroyed");
|
|
1977
|
+
this._isDestroyed = !0, this._queue.killAndDrain();
|
|
1978
|
+
}
|
|
1979
|
+
onEntry(callback) {
|
|
1980
|
+
this._emitter.on("entry", callback);
|
|
1981
|
+
}
|
|
1982
|
+
onError(callback) {
|
|
1983
|
+
this._emitter.once("error", callback);
|
|
1984
|
+
}
|
|
1985
|
+
onEnd(callback) {
|
|
1986
|
+
this._emitter.once("end", callback);
|
|
1987
|
+
}
|
|
1988
|
+
_pushToQueue(directory, base) {
|
|
1989
|
+
let queueItem = { directory, base };
|
|
1990
|
+
this._queue.push(queueItem, (error) => {
|
|
1991
|
+
error !== null && this._handleError(error);
|
|
1992
|
+
});
|
|
1993
|
+
}
|
|
1994
|
+
_worker(item, done) {
|
|
1995
|
+
this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
|
|
1996
|
+
if (error !== null) {
|
|
1997
|
+
done(error, void 0);
|
|
1998
|
+
return;
|
|
1999
|
+
}
|
|
2000
|
+
for (let entry of entries)
|
|
2001
|
+
this._handleEntry(entry, item.base);
|
|
2002
|
+
done(null, void 0);
|
|
2003
|
+
});
|
|
2004
|
+
}
|
|
2005
|
+
_handleError(error) {
|
|
2006
|
+
this._isDestroyed || !common.isFatalError(this._settings, error) || (this._isFatalError = !0, this._isDestroyed = !0, this._emitter.emit("error", error));
|
|
2007
|
+
}
|
|
2008
|
+
_handleEntry(entry, base) {
|
|
2009
|
+
if (this._isDestroyed || this._isFatalError)
|
|
2010
|
+
return;
|
|
2011
|
+
let fullpath = entry.path;
|
|
2012
|
+
base !== void 0 && (entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator)), common.isAppliedFilter(this._settings.entryFilter, entry) && this._emitEntry(entry), entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry) && this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
|
|
2013
|
+
}
|
|
2014
|
+
_emitEntry(entry) {
|
|
2015
|
+
this._emitter.emit("entry", entry);
|
|
2016
|
+
}
|
|
2017
|
+
};
|
|
2018
|
+
exports.default = AsyncReader;
|
|
2019
|
+
}
|
|
2020
|
+
});
|
|
2021
|
+
|
|
2022
|
+
// ../node_modules/@nodelib/fs.walk/out/providers/async.js
|
|
2023
|
+
var require_async4 = __commonJS({
|
|
2024
|
+
"../node_modules/@nodelib/fs.walk/out/providers/async.js"(exports) {
|
|
2025
|
+
"use strict";
|
|
2026
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2027
|
+
var async_1 = require_async3(), AsyncProvider = class {
|
|
2028
|
+
constructor(_root, _settings) {
|
|
2029
|
+
this._root = _root, this._settings = _settings, this._reader = new async_1.default(this._root, this._settings), this._storage = [];
|
|
2030
|
+
}
|
|
2031
|
+
read(callback) {
|
|
2032
|
+
this._reader.onError((error) => {
|
|
2033
|
+
callFailureCallback(callback, error);
|
|
2034
|
+
}), this._reader.onEntry((entry) => {
|
|
2035
|
+
this._storage.push(entry);
|
|
2036
|
+
}), this._reader.onEnd(() => {
|
|
2037
|
+
callSuccessCallback(callback, this._storage);
|
|
2038
|
+
}), this._reader.read();
|
|
2039
|
+
}
|
|
2040
|
+
};
|
|
2041
|
+
exports.default = AsyncProvider;
|
|
2042
|
+
function callFailureCallback(callback, error) {
|
|
2043
|
+
callback(error);
|
|
2044
|
+
}
|
|
2045
|
+
function callSuccessCallback(callback, entries) {
|
|
2046
|
+
callback(null, entries);
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
});
|
|
2050
|
+
|
|
2051
|
+
// ../node_modules/@nodelib/fs.walk/out/providers/stream.js
|
|
2052
|
+
var require_stream2 = __commonJS({
|
|
2053
|
+
"../node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports) {
|
|
2054
|
+
"use strict";
|
|
2055
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2056
|
+
var stream_1 = __require("stream"), async_1 = require_async3(), StreamProvider = class {
|
|
2057
|
+
constructor(_root, _settings) {
|
|
2058
|
+
this._root = _root, this._settings = _settings, this._reader = new async_1.default(this._root, this._settings), this._stream = new stream_1.Readable({
|
|
2059
|
+
objectMode: !0,
|
|
2060
|
+
read: () => {
|
|
2061
|
+
},
|
|
2062
|
+
destroy: () => {
|
|
2063
|
+
this._reader.isDestroyed || this._reader.destroy();
|
|
2064
|
+
}
|
|
2065
|
+
});
|
|
2066
|
+
}
|
|
2067
|
+
read() {
|
|
2068
|
+
return this._reader.onError((error) => {
|
|
2069
|
+
this._stream.emit("error", error);
|
|
2070
|
+
}), this._reader.onEntry((entry) => {
|
|
2071
|
+
this._stream.push(entry);
|
|
2072
|
+
}), this._reader.onEnd(() => {
|
|
2073
|
+
this._stream.push(null);
|
|
2074
|
+
}), this._reader.read(), this._stream;
|
|
2075
|
+
}
|
|
2076
|
+
};
|
|
2077
|
+
exports.default = StreamProvider;
|
|
2078
|
+
}
|
|
2079
|
+
});
|
|
2080
|
+
|
|
2081
|
+
// ../node_modules/@nodelib/fs.walk/out/readers/sync.js
|
|
2082
|
+
var require_sync3 = __commonJS({
|
|
2083
|
+
"../node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports) {
|
|
2084
|
+
"use strict";
|
|
2085
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2086
|
+
var fsScandir = require_out2(), common = require_common2(), reader_1 = require_reader(), SyncReader = class extends reader_1.default {
|
|
2087
|
+
constructor() {
|
|
2088
|
+
super(...arguments), this._scandir = fsScandir.scandirSync, this._storage = [], this._queue = /* @__PURE__ */ new Set();
|
|
2089
|
+
}
|
|
2090
|
+
read() {
|
|
2091
|
+
return this._pushToQueue(this._root, this._settings.basePath), this._handleQueue(), this._storage;
|
|
2092
|
+
}
|
|
2093
|
+
_pushToQueue(directory, base) {
|
|
2094
|
+
this._queue.add({ directory, base });
|
|
2095
|
+
}
|
|
2096
|
+
_handleQueue() {
|
|
2097
|
+
for (let item of this._queue.values())
|
|
2098
|
+
this._handleDirectory(item.directory, item.base);
|
|
2099
|
+
}
|
|
2100
|
+
_handleDirectory(directory, base) {
|
|
2101
|
+
try {
|
|
2102
|
+
let entries = this._scandir(directory, this._settings.fsScandirSettings);
|
|
2103
|
+
for (let entry of entries)
|
|
2104
|
+
this._handleEntry(entry, base);
|
|
2105
|
+
} catch (error) {
|
|
2106
|
+
this._handleError(error);
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
_handleError(error) {
|
|
2110
|
+
if (common.isFatalError(this._settings, error))
|
|
2111
|
+
throw error;
|
|
2112
|
+
}
|
|
2113
|
+
_handleEntry(entry, base) {
|
|
2114
|
+
let fullpath = entry.path;
|
|
2115
|
+
base !== void 0 && (entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator)), common.isAppliedFilter(this._settings.entryFilter, entry) && this._pushToStorage(entry), entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry) && this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
|
|
2116
|
+
}
|
|
2117
|
+
_pushToStorage(entry) {
|
|
2118
|
+
this._storage.push(entry);
|
|
2119
|
+
}
|
|
2120
|
+
};
|
|
2121
|
+
exports.default = SyncReader;
|
|
2122
|
+
}
|
|
2123
|
+
});
|
|
2124
|
+
|
|
2125
|
+
// ../node_modules/@nodelib/fs.walk/out/providers/sync.js
|
|
2126
|
+
var require_sync4 = __commonJS({
|
|
2127
|
+
"../node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports) {
|
|
2128
|
+
"use strict";
|
|
2129
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2130
|
+
var sync_1 = require_sync3(), SyncProvider = class {
|
|
2131
|
+
constructor(_root, _settings) {
|
|
2132
|
+
this._root = _root, this._settings = _settings, this._reader = new sync_1.default(this._root, this._settings);
|
|
2133
|
+
}
|
|
2134
|
+
read() {
|
|
2135
|
+
return this._reader.read();
|
|
2136
|
+
}
|
|
2137
|
+
};
|
|
2138
|
+
exports.default = SyncProvider;
|
|
2139
|
+
}
|
|
2140
|
+
});
|
|
2141
|
+
|
|
2142
|
+
// ../node_modules/@nodelib/fs.walk/out/settings.js
|
|
2143
|
+
var require_settings3 = __commonJS({
|
|
2144
|
+
"../node_modules/@nodelib/fs.walk/out/settings.js"(exports) {
|
|
2145
|
+
"use strict";
|
|
2146
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2147
|
+
var path2 = __require("path"), fsScandir = require_out2(), Settings = class {
|
|
2148
|
+
constructor(_options = {}) {
|
|
2149
|
+
this._options = _options, this.basePath = this._getValue(this._options.basePath, void 0), this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY), this.deepFilter = this._getValue(this._options.deepFilter, null), this.entryFilter = this._getValue(this._options.entryFilter, null), this.errorFilter = this._getValue(this._options.errorFilter, null), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep), this.fsScandirSettings = new fsScandir.Settings({
|
|
2150
|
+
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
2151
|
+
fs: this._options.fs,
|
|
2152
|
+
pathSegmentSeparator: this._options.pathSegmentSeparator,
|
|
2153
|
+
stats: this._options.stats,
|
|
2154
|
+
throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
|
|
2155
|
+
});
|
|
2156
|
+
}
|
|
2157
|
+
_getValue(option, value) {
|
|
2158
|
+
return option ?? value;
|
|
2159
|
+
}
|
|
2160
|
+
};
|
|
2161
|
+
exports.default = Settings;
|
|
2162
|
+
}
|
|
2163
|
+
});
|
|
2164
|
+
|
|
2165
|
+
// ../node_modules/@nodelib/fs.walk/out/index.js
|
|
2166
|
+
var require_out3 = __commonJS({
|
|
2167
|
+
"../node_modules/@nodelib/fs.walk/out/index.js"(exports) {
|
|
2168
|
+
"use strict";
|
|
2169
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2170
|
+
exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0;
|
|
2171
|
+
var async_1 = require_async4(), stream_1 = require_stream2(), sync_1 = require_sync4(), settings_1 = require_settings3();
|
|
2172
|
+
exports.Settings = settings_1.default;
|
|
2173
|
+
function walk(directory, optionsOrSettingsOrCallback, callback) {
|
|
2174
|
+
if (typeof optionsOrSettingsOrCallback == "function") {
|
|
2175
|
+
new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
|
|
2176
|
+
return;
|
|
2177
|
+
}
|
|
2178
|
+
new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
|
|
2179
|
+
}
|
|
2180
|
+
exports.walk = walk;
|
|
2181
|
+
function walkSync(directory, optionsOrSettings) {
|
|
2182
|
+
let settings = getSettings(optionsOrSettings);
|
|
2183
|
+
return new sync_1.default(directory, settings).read();
|
|
2184
|
+
}
|
|
2185
|
+
exports.walkSync = walkSync;
|
|
2186
|
+
function walkStream(directory, optionsOrSettings) {
|
|
2187
|
+
let settings = getSettings(optionsOrSettings);
|
|
2188
|
+
return new stream_1.default(directory, settings).read();
|
|
2189
|
+
}
|
|
2190
|
+
exports.walkStream = walkStream;
|
|
2191
|
+
function getSettings(settingsOrOptions = {}) {
|
|
2192
|
+
return settingsOrOptions instanceof settings_1.default ? settingsOrOptions : new settings_1.default(settingsOrOptions);
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
});
|
|
2196
|
+
|
|
2197
|
+
// ../node_modules/fast-glob/out/readers/reader.js
|
|
2198
|
+
var require_reader2 = __commonJS({
|
|
2199
|
+
"../node_modules/fast-glob/out/readers/reader.js"(exports) {
|
|
2200
|
+
"use strict";
|
|
2201
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2202
|
+
var path2 = __require("path"), fsStat = require_out(), utils = require_utils3(), Reader = class {
|
|
2203
|
+
constructor(_settings) {
|
|
2204
|
+
this._settings = _settings, this._fsStatSettings = new fsStat.Settings({
|
|
2205
|
+
followSymbolicLink: this._settings.followSymbolicLinks,
|
|
2206
|
+
fs: this._settings.fs,
|
|
2207
|
+
throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
|
|
2208
|
+
});
|
|
2209
|
+
}
|
|
2210
|
+
_getFullEntryPath(filepath) {
|
|
2211
|
+
return path2.resolve(this._settings.cwd, filepath);
|
|
2212
|
+
}
|
|
2213
|
+
_makeEntry(stats, pattern) {
|
|
2214
|
+
let entry = {
|
|
2215
|
+
name: pattern,
|
|
2216
|
+
path: pattern,
|
|
2217
|
+
dirent: utils.fs.createDirentFromStats(pattern, stats)
|
|
2218
|
+
};
|
|
2219
|
+
return this._settings.stats && (entry.stats = stats), entry;
|
|
2220
|
+
}
|
|
2221
|
+
_isFatalError(error) {
|
|
2222
|
+
return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
|
|
2223
|
+
}
|
|
2224
|
+
};
|
|
2225
|
+
exports.default = Reader;
|
|
2226
|
+
}
|
|
2227
|
+
});
|
|
2228
|
+
|
|
2229
|
+
// ../node_modules/fast-glob/out/readers/stream.js
|
|
2230
|
+
var require_stream3 = __commonJS({
|
|
2231
|
+
"../node_modules/fast-glob/out/readers/stream.js"(exports) {
|
|
2232
|
+
"use strict";
|
|
2233
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2234
|
+
var stream_1 = __require("stream"), fsStat = require_out(), fsWalk = require_out3(), reader_1 = require_reader2(), ReaderStream = class extends reader_1.default {
|
|
2235
|
+
constructor() {
|
|
2236
|
+
super(...arguments), this._walkStream = fsWalk.walkStream, this._stat = fsStat.stat;
|
|
2237
|
+
}
|
|
2238
|
+
dynamic(root, options) {
|
|
2239
|
+
return this._walkStream(root, options);
|
|
2240
|
+
}
|
|
2241
|
+
static(patterns, options) {
|
|
2242
|
+
let filepaths = patterns.map(this._getFullEntryPath, this), stream = new stream_1.PassThrough({ objectMode: !0 });
|
|
2243
|
+
stream._write = (index, _enc, done) => this._getEntry(filepaths[index], patterns[index], options).then((entry) => {
|
|
2244
|
+
entry !== null && options.entryFilter(entry) && stream.push(entry), index === filepaths.length - 1 && stream.end(), done();
|
|
2245
|
+
}).catch(done);
|
|
2246
|
+
for (let i = 0; i < filepaths.length; i++)
|
|
2247
|
+
stream.write(i);
|
|
2248
|
+
return stream;
|
|
2249
|
+
}
|
|
2250
|
+
_getEntry(filepath, pattern, options) {
|
|
2251
|
+
return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => {
|
|
2252
|
+
if (options.errorFilter(error))
|
|
2253
|
+
return null;
|
|
2254
|
+
throw error;
|
|
2255
|
+
});
|
|
2256
|
+
}
|
|
2257
|
+
_getStat(filepath) {
|
|
2258
|
+
return new Promise((resolve, reject) => {
|
|
2259
|
+
this._stat(filepath, this._fsStatSettings, (error, stats) => error === null ? resolve(stats) : reject(error));
|
|
2260
|
+
});
|
|
2261
|
+
}
|
|
2262
|
+
};
|
|
2263
|
+
exports.default = ReaderStream;
|
|
2264
|
+
}
|
|
2265
|
+
});
|
|
2266
|
+
|
|
2267
|
+
// ../node_modules/fast-glob/out/readers/async.js
|
|
2268
|
+
var require_async5 = __commonJS({
|
|
2269
|
+
"../node_modules/fast-glob/out/readers/async.js"(exports) {
|
|
2270
|
+
"use strict";
|
|
2271
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2272
|
+
var fsWalk = require_out3(), reader_1 = require_reader2(), stream_1 = require_stream3(), ReaderAsync = class extends reader_1.default {
|
|
2273
|
+
constructor() {
|
|
2274
|
+
super(...arguments), this._walkAsync = fsWalk.walk, this._readerStream = new stream_1.default(this._settings);
|
|
2275
|
+
}
|
|
2276
|
+
dynamic(root, options) {
|
|
2277
|
+
return new Promise((resolve, reject) => {
|
|
2278
|
+
this._walkAsync(root, options, (error, entries) => {
|
|
2279
|
+
error === null ? resolve(entries) : reject(error);
|
|
2280
|
+
});
|
|
2281
|
+
});
|
|
2282
|
+
}
|
|
2283
|
+
async static(patterns, options) {
|
|
2284
|
+
let entries = [], stream = this._readerStream.static(patterns, options);
|
|
2285
|
+
return new Promise((resolve, reject) => {
|
|
2286
|
+
stream.once("error", reject), stream.on("data", (entry) => entries.push(entry)), stream.once("end", () => resolve(entries));
|
|
2287
|
+
});
|
|
2288
|
+
}
|
|
2289
|
+
};
|
|
2290
|
+
exports.default = ReaderAsync;
|
|
2291
|
+
}
|
|
2292
|
+
});
|
|
2293
|
+
|
|
2294
|
+
// ../node_modules/fast-glob/out/providers/matchers/matcher.js
|
|
2295
|
+
var require_matcher = __commonJS({
|
|
2296
|
+
"../node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
2297
|
+
"use strict";
|
|
2298
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2299
|
+
var utils = require_utils3(), Matcher = class {
|
|
2300
|
+
constructor(_patterns, _settings, _micromatchOptions) {
|
|
2301
|
+
this._patterns = _patterns, this._settings = _settings, this._micromatchOptions = _micromatchOptions, this._storage = [], this._fillStorage();
|
|
2302
|
+
}
|
|
2303
|
+
_fillStorage() {
|
|
2304
|
+
for (let pattern of this._patterns) {
|
|
2305
|
+
let segments = this._getPatternSegments(pattern), sections = this._splitSegmentsIntoSections(segments);
|
|
2306
|
+
this._storage.push({
|
|
2307
|
+
complete: sections.length <= 1,
|
|
2308
|
+
pattern,
|
|
2309
|
+
segments,
|
|
2310
|
+
sections
|
|
2311
|
+
});
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
_getPatternSegments(pattern) {
|
|
2315
|
+
return utils.pattern.getPatternParts(pattern, this._micromatchOptions).map((part) => utils.pattern.isDynamicPattern(part, this._settings) ? {
|
|
2316
|
+
dynamic: !0,
|
|
2317
|
+
pattern: part,
|
|
2318
|
+
patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
|
|
2319
|
+
} : {
|
|
2320
|
+
dynamic: !1,
|
|
2321
|
+
pattern: part
|
|
2322
|
+
});
|
|
2323
|
+
}
|
|
2324
|
+
_splitSegmentsIntoSections(segments) {
|
|
2325
|
+
return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
|
|
2326
|
+
}
|
|
2327
|
+
};
|
|
2328
|
+
exports.default = Matcher;
|
|
2329
|
+
}
|
|
2330
|
+
});
|
|
2331
|
+
|
|
2332
|
+
// ../node_modules/fast-glob/out/providers/matchers/partial.js
|
|
2333
|
+
var require_partial = __commonJS({
|
|
2334
|
+
"../node_modules/fast-glob/out/providers/matchers/partial.js"(exports) {
|
|
2335
|
+
"use strict";
|
|
2336
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2337
|
+
var matcher_1 = require_matcher(), PartialMatcher = class extends matcher_1.default {
|
|
2338
|
+
match(filepath) {
|
|
2339
|
+
let parts = filepath.split("/"), levels = parts.length, patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
|
|
2340
|
+
for (let pattern of patterns) {
|
|
2341
|
+
let section = pattern.sections[0];
|
|
2342
|
+
if (!pattern.complete && levels > section.length || parts.every((part, index) => {
|
|
2343
|
+
let segment = pattern.segments[index];
|
|
2344
|
+
return !!(segment.dynamic && segment.patternRe.test(part) || !segment.dynamic && segment.pattern === part);
|
|
2345
|
+
}))
|
|
2346
|
+
return !0;
|
|
2347
|
+
}
|
|
2348
|
+
return !1;
|
|
2349
|
+
}
|
|
2350
|
+
};
|
|
2351
|
+
exports.default = PartialMatcher;
|
|
2352
|
+
}
|
|
2353
|
+
});
|
|
2354
|
+
|
|
2355
|
+
// ../node_modules/fast-glob/out/providers/filters/deep.js
|
|
2356
|
+
var require_deep = __commonJS({
|
|
2357
|
+
"../node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
2358
|
+
"use strict";
|
|
2359
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2360
|
+
var utils = require_utils3(), partial_1 = require_partial(), DeepFilter = class {
|
|
2361
|
+
constructor(_settings, _micromatchOptions) {
|
|
2362
|
+
this._settings = _settings, this._micromatchOptions = _micromatchOptions;
|
|
2363
|
+
}
|
|
2364
|
+
getFilter(basePath, positive, negative) {
|
|
2365
|
+
let matcher = this._getMatcher(positive), negativeRe = this._getNegativePatternsRe(negative);
|
|
2366
|
+
return (entry) => this._filter(basePath, entry, matcher, negativeRe);
|
|
2367
|
+
}
|
|
2368
|
+
_getMatcher(patterns) {
|
|
2369
|
+
return new partial_1.default(patterns, this._settings, this._micromatchOptions);
|
|
2370
|
+
}
|
|
2371
|
+
_getNegativePatternsRe(patterns) {
|
|
2372
|
+
let affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
|
|
2373
|
+
return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
|
|
2374
|
+
}
|
|
2375
|
+
_filter(basePath, entry, matcher, negativeRe) {
|
|
2376
|
+
if (this._isSkippedByDeep(basePath, entry.path) || this._isSkippedSymbolicLink(entry))
|
|
2377
|
+
return !1;
|
|
2378
|
+
let filepath = utils.path.removeLeadingDotSegment(entry.path);
|
|
2379
|
+
return this._isSkippedByPositivePatterns(filepath, matcher) ? !1 : this._isSkippedByNegativePatterns(filepath, negativeRe);
|
|
2380
|
+
}
|
|
2381
|
+
_isSkippedByDeep(basePath, entryPath) {
|
|
2382
|
+
return this._settings.deep === 1 / 0 ? !1 : this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
|
|
2383
|
+
}
|
|
2384
|
+
_getEntryLevel(basePath, entryPath) {
|
|
2385
|
+
let entryPathDepth = entryPath.split("/").length;
|
|
2386
|
+
if (basePath === "")
|
|
2387
|
+
return entryPathDepth;
|
|
2388
|
+
let basePathDepth = basePath.split("/").length;
|
|
2389
|
+
return entryPathDepth - basePathDepth;
|
|
2390
|
+
}
|
|
2391
|
+
_isSkippedSymbolicLink(entry) {
|
|
2392
|
+
return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
|
|
2393
|
+
}
|
|
2394
|
+
_isSkippedByPositivePatterns(entryPath, matcher) {
|
|
2395
|
+
return !this._settings.baseNameMatch && !matcher.match(entryPath);
|
|
2396
|
+
}
|
|
2397
|
+
_isSkippedByNegativePatterns(entryPath, patternsRe) {
|
|
2398
|
+
return !utils.pattern.matchAny(entryPath, patternsRe);
|
|
2399
|
+
}
|
|
2400
|
+
};
|
|
2401
|
+
exports.default = DeepFilter;
|
|
2402
|
+
}
|
|
2403
|
+
});
|
|
2404
|
+
|
|
2405
|
+
// ../node_modules/fast-glob/out/providers/filters/entry.js
|
|
2406
|
+
var require_entry = __commonJS({
|
|
2407
|
+
"../node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
2408
|
+
"use strict";
|
|
2409
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2410
|
+
var utils = require_utils3(), EntryFilter = class {
|
|
2411
|
+
constructor(_settings, _micromatchOptions) {
|
|
2412
|
+
this._settings = _settings, this._micromatchOptions = _micromatchOptions, this.index = /* @__PURE__ */ new Map();
|
|
2413
|
+
}
|
|
2414
|
+
getFilter(positive, negative) {
|
|
2415
|
+
let [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative), patterns = {
|
|
2416
|
+
positive: {
|
|
2417
|
+
all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
|
|
2418
|
+
},
|
|
2419
|
+
negative: {
|
|
2420
|
+
absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 })),
|
|
2421
|
+
relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 }))
|
|
2422
|
+
}
|
|
2423
|
+
};
|
|
2424
|
+
return (entry) => this._filter(entry, patterns);
|
|
2425
|
+
}
|
|
2426
|
+
_filter(entry, patterns) {
|
|
2427
|
+
let filepath = utils.path.removeLeadingDotSegment(entry.path);
|
|
2428
|
+
if (this._settings.unique && this._isDuplicateEntry(filepath) || this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry))
|
|
2429
|
+
return !1;
|
|
2430
|
+
let isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());
|
|
2431
|
+
return this._settings.unique && isMatched && this._createIndexRecord(filepath), isMatched;
|
|
2432
|
+
}
|
|
2433
|
+
_isDuplicateEntry(filepath) {
|
|
2434
|
+
return this.index.has(filepath);
|
|
2435
|
+
}
|
|
2436
|
+
_createIndexRecord(filepath) {
|
|
2437
|
+
this.index.set(filepath, void 0);
|
|
2438
|
+
}
|
|
2439
|
+
_onlyFileFilter(entry) {
|
|
2440
|
+
return this._settings.onlyFiles && !entry.dirent.isFile();
|
|
2441
|
+
}
|
|
2442
|
+
_onlyDirectoryFilter(entry) {
|
|
2443
|
+
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
|
2444
|
+
}
|
|
2445
|
+
_isMatchToPatternsSet(filepath, patterns, isDirectory2) {
|
|
2446
|
+
return !(!this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2) || this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2) || this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2));
|
|
2447
|
+
}
|
|
2448
|
+
_isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) {
|
|
2449
|
+
if (patternsRe.length === 0)
|
|
2450
|
+
return !1;
|
|
2451
|
+
let fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);
|
|
2452
|
+
return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2);
|
|
2453
|
+
}
|
|
2454
|
+
_isMatchToPatterns(filepath, patternsRe, isDirectory2) {
|
|
2455
|
+
if (patternsRe.length === 0)
|
|
2456
|
+
return !1;
|
|
2457
|
+
let isMatched = utils.pattern.matchAny(filepath, patternsRe);
|
|
2458
|
+
return !isMatched && isDirectory2 ? utils.pattern.matchAny(filepath + "/", patternsRe) : isMatched;
|
|
2459
|
+
}
|
|
2460
|
+
};
|
|
2461
|
+
exports.default = EntryFilter;
|
|
2462
|
+
}
|
|
2463
|
+
});
|
|
2464
|
+
|
|
2465
|
+
// ../node_modules/fast-glob/out/providers/filters/error.js
|
|
2466
|
+
var require_error = __commonJS({
|
|
2467
|
+
"../node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
2468
|
+
"use strict";
|
|
2469
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2470
|
+
var utils = require_utils3(), ErrorFilter = class {
|
|
2471
|
+
constructor(_settings) {
|
|
2472
|
+
this._settings = _settings;
|
|
2473
|
+
}
|
|
2474
|
+
getFilter() {
|
|
2475
|
+
return (error) => this._isNonFatalError(error);
|
|
2476
|
+
}
|
|
2477
|
+
_isNonFatalError(error) {
|
|
2478
|
+
return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
|
|
2479
|
+
}
|
|
2480
|
+
};
|
|
2481
|
+
exports.default = ErrorFilter;
|
|
2482
|
+
}
|
|
2483
|
+
});
|
|
2484
|
+
|
|
2485
|
+
// ../node_modules/fast-glob/out/providers/transformers/entry.js
|
|
2486
|
+
var require_entry2 = __commonJS({
|
|
2487
|
+
"../node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
2488
|
+
"use strict";
|
|
2489
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2490
|
+
var utils = require_utils3(), EntryTransformer = class {
|
|
2491
|
+
constructor(_settings) {
|
|
2492
|
+
this._settings = _settings;
|
|
2493
|
+
}
|
|
2494
|
+
getTransformer() {
|
|
2495
|
+
return (entry) => this._transform(entry);
|
|
2496
|
+
}
|
|
2497
|
+
_transform(entry) {
|
|
2498
|
+
let filepath = entry.path;
|
|
2499
|
+
return this._settings.absolute && (filepath = utils.path.makeAbsolute(this._settings.cwd, filepath), filepath = utils.path.unixify(filepath)), this._settings.markDirectories && entry.dirent.isDirectory() && (filepath += "/"), this._settings.objectMode ? Object.assign(Object.assign({}, entry), { path: filepath }) : filepath;
|
|
2500
|
+
}
|
|
2501
|
+
};
|
|
2502
|
+
exports.default = EntryTransformer;
|
|
2503
|
+
}
|
|
2504
|
+
});
|
|
2505
|
+
|
|
2506
|
+
// ../node_modules/fast-glob/out/providers/provider.js
|
|
2507
|
+
var require_provider = __commonJS({
|
|
2508
|
+
"../node_modules/fast-glob/out/providers/provider.js"(exports) {
|
|
2509
|
+
"use strict";
|
|
2510
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2511
|
+
var path2 = __require("path"), deep_1 = require_deep(), entry_1 = require_entry(), error_1 = require_error(), entry_2 = require_entry2(), Provider = class {
|
|
2512
|
+
constructor(_settings) {
|
|
2513
|
+
this._settings = _settings, this.errorFilter = new error_1.default(this._settings), this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()), this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()), this.entryTransformer = new entry_2.default(this._settings);
|
|
2514
|
+
}
|
|
2515
|
+
_getRootDirectory(task) {
|
|
2516
|
+
return path2.resolve(this._settings.cwd, task.base);
|
|
2517
|
+
}
|
|
2518
|
+
_getReaderOptions(task) {
|
|
2519
|
+
let basePath = task.base === "." ? "" : task.base;
|
|
2520
|
+
return {
|
|
2521
|
+
basePath,
|
|
2522
|
+
pathSegmentSeparator: "/",
|
|
2523
|
+
concurrency: this._settings.concurrency,
|
|
2524
|
+
deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
|
|
2525
|
+
entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
|
|
2526
|
+
errorFilter: this.errorFilter.getFilter(),
|
|
2527
|
+
followSymbolicLinks: this._settings.followSymbolicLinks,
|
|
2528
|
+
fs: this._settings.fs,
|
|
2529
|
+
stats: this._settings.stats,
|
|
2530
|
+
throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
|
|
2531
|
+
transform: this.entryTransformer.getTransformer()
|
|
2532
|
+
};
|
|
2533
|
+
}
|
|
2534
|
+
_getMicromatchOptions() {
|
|
2535
|
+
return {
|
|
2536
|
+
dot: this._settings.dot,
|
|
2537
|
+
matchBase: this._settings.baseNameMatch,
|
|
2538
|
+
nobrace: !this._settings.braceExpansion,
|
|
2539
|
+
nocase: !this._settings.caseSensitiveMatch,
|
|
2540
|
+
noext: !this._settings.extglob,
|
|
2541
|
+
noglobstar: !this._settings.globstar,
|
|
2542
|
+
posix: !0,
|
|
2543
|
+
strictSlashes: !1
|
|
2544
|
+
};
|
|
2545
|
+
}
|
|
2546
|
+
};
|
|
2547
|
+
exports.default = Provider;
|
|
2548
|
+
}
|
|
2549
|
+
});
|
|
2550
|
+
|
|
2551
|
+
// ../node_modules/fast-glob/out/providers/async.js
|
|
2552
|
+
var require_async6 = __commonJS({
|
|
2553
|
+
"../node_modules/fast-glob/out/providers/async.js"(exports) {
|
|
2554
|
+
"use strict";
|
|
2555
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2556
|
+
var async_1 = require_async5(), provider_1 = require_provider(), ProviderAsync = class extends provider_1.default {
|
|
2557
|
+
constructor() {
|
|
2558
|
+
super(...arguments), this._reader = new async_1.default(this._settings);
|
|
2559
|
+
}
|
|
2560
|
+
async read(task) {
|
|
2561
|
+
let root = this._getRootDirectory(task), options = this._getReaderOptions(task);
|
|
2562
|
+
return (await this.api(root, task, options)).map((entry) => options.transform(entry));
|
|
2563
|
+
}
|
|
2564
|
+
api(root, task, options) {
|
|
2565
|
+
return task.dynamic ? this._reader.dynamic(root, options) : this._reader.static(task.patterns, options);
|
|
2566
|
+
}
|
|
2567
|
+
};
|
|
2568
|
+
exports.default = ProviderAsync;
|
|
2569
|
+
}
|
|
2570
|
+
});
|
|
2571
|
+
|
|
2572
|
+
// ../node_modules/fast-glob/out/providers/stream.js
|
|
2573
|
+
var require_stream4 = __commonJS({
|
|
2574
|
+
"../node_modules/fast-glob/out/providers/stream.js"(exports) {
|
|
2575
|
+
"use strict";
|
|
2576
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2577
|
+
var stream_1 = __require("stream"), stream_2 = require_stream3(), provider_1 = require_provider(), ProviderStream = class extends provider_1.default {
|
|
2578
|
+
constructor() {
|
|
2579
|
+
super(...arguments), this._reader = new stream_2.default(this._settings);
|
|
2580
|
+
}
|
|
2581
|
+
read(task) {
|
|
2582
|
+
let root = this._getRootDirectory(task), options = this._getReaderOptions(task), source = this.api(root, task, options), destination = new stream_1.Readable({ objectMode: !0, read: () => {
|
|
2583
|
+
} });
|
|
2584
|
+
return source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")), destination.once("close", () => source.destroy()), destination;
|
|
2585
|
+
}
|
|
2586
|
+
api(root, task, options) {
|
|
2587
|
+
return task.dynamic ? this._reader.dynamic(root, options) : this._reader.static(task.patterns, options);
|
|
2588
|
+
}
|
|
2589
|
+
};
|
|
2590
|
+
exports.default = ProviderStream;
|
|
2591
|
+
}
|
|
2592
|
+
});
|
|
2593
|
+
|
|
2594
|
+
// ../node_modules/fast-glob/out/readers/sync.js
|
|
2595
|
+
var require_sync5 = __commonJS({
|
|
2596
|
+
"../node_modules/fast-glob/out/readers/sync.js"(exports) {
|
|
2597
|
+
"use strict";
|
|
2598
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2599
|
+
var fsStat = require_out(), fsWalk = require_out3(), reader_1 = require_reader2(), ReaderSync = class extends reader_1.default {
|
|
2600
|
+
constructor() {
|
|
2601
|
+
super(...arguments), this._walkSync = fsWalk.walkSync, this._statSync = fsStat.statSync;
|
|
2602
|
+
}
|
|
2603
|
+
dynamic(root, options) {
|
|
2604
|
+
return this._walkSync(root, options);
|
|
2605
|
+
}
|
|
2606
|
+
static(patterns, options) {
|
|
2607
|
+
let entries = [];
|
|
2608
|
+
for (let pattern of patterns) {
|
|
2609
|
+
let filepath = this._getFullEntryPath(pattern), entry = this._getEntry(filepath, pattern, options);
|
|
2610
|
+
entry === null || !options.entryFilter(entry) || entries.push(entry);
|
|
2611
|
+
}
|
|
2612
|
+
return entries;
|
|
2613
|
+
}
|
|
2614
|
+
_getEntry(filepath, pattern, options) {
|
|
2615
|
+
try {
|
|
2616
|
+
let stats = this._getStat(filepath);
|
|
2617
|
+
return this._makeEntry(stats, pattern);
|
|
2618
|
+
} catch (error) {
|
|
2619
|
+
if (options.errorFilter(error))
|
|
2620
|
+
return null;
|
|
2621
|
+
throw error;
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2624
|
+
_getStat(filepath) {
|
|
2625
|
+
return this._statSync(filepath, this._fsStatSettings);
|
|
2626
|
+
}
|
|
2627
|
+
};
|
|
2628
|
+
exports.default = ReaderSync;
|
|
2629
|
+
}
|
|
2630
|
+
});
|
|
2631
|
+
|
|
2632
|
+
// ../node_modules/fast-glob/out/providers/sync.js
|
|
2633
|
+
var require_sync6 = __commonJS({
|
|
2634
|
+
"../node_modules/fast-glob/out/providers/sync.js"(exports) {
|
|
2635
|
+
"use strict";
|
|
2636
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2637
|
+
var sync_1 = require_sync5(), provider_1 = require_provider(), ProviderSync = class extends provider_1.default {
|
|
2638
|
+
constructor() {
|
|
2639
|
+
super(...arguments), this._reader = new sync_1.default(this._settings);
|
|
2640
|
+
}
|
|
2641
|
+
read(task) {
|
|
2642
|
+
let root = this._getRootDirectory(task), options = this._getReaderOptions(task);
|
|
2643
|
+
return this.api(root, task, options).map(options.transform);
|
|
2644
|
+
}
|
|
2645
|
+
api(root, task, options) {
|
|
2646
|
+
return task.dynamic ? this._reader.dynamic(root, options) : this._reader.static(task.patterns, options);
|
|
2647
|
+
}
|
|
2648
|
+
};
|
|
2649
|
+
exports.default = ProviderSync;
|
|
2650
|
+
}
|
|
2651
|
+
});
|
|
2652
|
+
|
|
2653
|
+
// ../node_modules/fast-glob/out/settings.js
|
|
2654
|
+
var require_settings4 = __commonJS({
|
|
2655
|
+
"../node_modules/fast-glob/out/settings.js"(exports) {
|
|
2656
|
+
"use strict";
|
|
2657
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
2658
|
+
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
2659
|
+
var fs4 = __require("fs"), os = __require("os"), CPU_COUNT = Math.max(os.cpus().length, 1);
|
|
2660
|
+
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
2661
|
+
lstat: fs4.lstat,
|
|
2662
|
+
lstatSync: fs4.lstatSync,
|
|
2663
|
+
stat: fs4.stat,
|
|
2664
|
+
statSync: fs4.statSync,
|
|
2665
|
+
readdir: fs4.readdir,
|
|
2666
|
+
readdirSync: fs4.readdirSync
|
|
2667
|
+
};
|
|
2668
|
+
var Settings = class {
|
|
2669
|
+
constructor(_options = {}) {
|
|
2670
|
+
this._options = _options, this.absolute = this._getValue(this._options.absolute, !1), this.baseNameMatch = this._getValue(this._options.baseNameMatch, !1), this.braceExpansion = this._getValue(this._options.braceExpansion, !0), this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, !0), this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT), this.cwd = this._getValue(this._options.cwd, process.cwd()), this.deep = this._getValue(this._options.deep, 1 / 0), this.dot = this._getValue(this._options.dot, !1), this.extglob = this._getValue(this._options.extglob, !0), this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !0), this.fs = this._getFileSystemMethods(this._options.fs), this.globstar = this._getValue(this._options.globstar, !0), this.ignore = this._getValue(this._options.ignore, []), this.markDirectories = this._getValue(this._options.markDirectories, !1), this.objectMode = this._getValue(this._options.objectMode, !1), this.onlyDirectories = this._getValue(this._options.onlyDirectories, !1), this.onlyFiles = this._getValue(this._options.onlyFiles, !0), this.stats = this._getValue(this._options.stats, !1), this.suppressErrors = this._getValue(this._options.suppressErrors, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !1), this.unique = this._getValue(this._options.unique, !0), this.onlyDirectories && (this.onlyFiles = !1), this.stats && (this.objectMode = !0), this.ignore = [].concat(this.ignore);
|
|
2671
|
+
}
|
|
2672
|
+
_getValue(option, value) {
|
|
2673
|
+
return option === void 0 ? value : option;
|
|
2674
|
+
}
|
|
2675
|
+
_getFileSystemMethods(methods = {}) {
|
|
2676
|
+
return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
|
|
2677
|
+
}
|
|
2678
|
+
};
|
|
2679
|
+
exports.default = Settings;
|
|
2680
|
+
}
|
|
2681
|
+
});
|
|
2682
|
+
|
|
2683
|
+
// ../node_modules/fast-glob/out/index.js
|
|
2684
|
+
var require_out4 = __commonJS({
|
|
2685
|
+
"../node_modules/fast-glob/out/index.js"(exports, module) {
|
|
2686
|
+
"use strict";
|
|
2687
|
+
var taskManager = require_tasks(), async_1 = require_async6(), stream_1 = require_stream4(), sync_1 = require_sync6(), settings_1 = require_settings4(), utils = require_utils3();
|
|
2688
|
+
async function FastGlob(source, options) {
|
|
2689
|
+
assertPatternsInput2(source);
|
|
2690
|
+
let works = getWorks(source, async_1.default, options), result = await Promise.all(works);
|
|
2691
|
+
return utils.array.flatten(result);
|
|
2692
|
+
}
|
|
2693
|
+
(function(FastGlob2) {
|
|
2694
|
+
FastGlob2.glob = FastGlob2, FastGlob2.globSync = sync, FastGlob2.globStream = stream, FastGlob2.async = FastGlob2;
|
|
2695
|
+
function sync(source, options) {
|
|
2696
|
+
assertPatternsInput2(source);
|
|
2697
|
+
let works = getWorks(source, sync_1.default, options);
|
|
2698
|
+
return utils.array.flatten(works);
|
|
2699
|
+
}
|
|
2700
|
+
FastGlob2.sync = sync;
|
|
2701
|
+
function stream(source, options) {
|
|
2702
|
+
assertPatternsInput2(source);
|
|
2703
|
+
let works = getWorks(source, stream_1.default, options);
|
|
2704
|
+
return utils.stream.merge(works);
|
|
2705
|
+
}
|
|
2706
|
+
FastGlob2.stream = stream;
|
|
2707
|
+
function generateTasks2(source, options) {
|
|
2708
|
+
assertPatternsInput2(source);
|
|
2709
|
+
let patterns = [].concat(source), settings = new settings_1.default(options);
|
|
2710
|
+
return taskManager.generate(patterns, settings);
|
|
2711
|
+
}
|
|
2712
|
+
FastGlob2.generateTasks = generateTasks2;
|
|
2713
|
+
function isDynamicPattern2(source, options) {
|
|
2714
|
+
assertPatternsInput2(source);
|
|
2715
|
+
let settings = new settings_1.default(options);
|
|
2716
|
+
return utils.pattern.isDynamicPattern(source, settings);
|
|
2717
|
+
}
|
|
2718
|
+
FastGlob2.isDynamicPattern = isDynamicPattern2;
|
|
2719
|
+
function escapePath(source) {
|
|
2720
|
+
return assertPatternsInput2(source), utils.path.escape(source);
|
|
2721
|
+
}
|
|
2722
|
+
FastGlob2.escapePath = escapePath;
|
|
2723
|
+
function convertPathToPattern2(source) {
|
|
2724
|
+
return assertPatternsInput2(source), utils.path.convertPathToPattern(source);
|
|
2725
|
+
}
|
|
2726
|
+
FastGlob2.convertPathToPattern = convertPathToPattern2;
|
|
2727
|
+
let posix;
|
|
2728
|
+
(function(posix2) {
|
|
2729
|
+
function escapePath2(source) {
|
|
2730
|
+
return assertPatternsInput2(source), utils.path.escapePosixPath(source);
|
|
2731
|
+
}
|
|
2732
|
+
posix2.escapePath = escapePath2;
|
|
2733
|
+
function convertPathToPattern3(source) {
|
|
2734
|
+
return assertPatternsInput2(source), utils.path.convertPosixPathToPattern(source);
|
|
2735
|
+
}
|
|
2736
|
+
posix2.convertPathToPattern = convertPathToPattern3;
|
|
2737
|
+
})(posix = FastGlob2.posix || (FastGlob2.posix = {}));
|
|
2738
|
+
let win32;
|
|
2739
|
+
(function(win322) {
|
|
2740
|
+
function escapePath2(source) {
|
|
2741
|
+
return assertPatternsInput2(source), utils.path.escapeWindowsPath(source);
|
|
2742
|
+
}
|
|
2743
|
+
win322.escapePath = escapePath2;
|
|
2744
|
+
function convertPathToPattern3(source) {
|
|
2745
|
+
return assertPatternsInput2(source), utils.path.convertWindowsPathToPattern(source);
|
|
2746
|
+
}
|
|
2747
|
+
win322.convertPathToPattern = convertPathToPattern3;
|
|
2748
|
+
})(win32 = FastGlob2.win32 || (FastGlob2.win32 = {}));
|
|
2749
|
+
})(FastGlob || (FastGlob = {}));
|
|
2750
|
+
function getWorks(source, _Provider, options) {
|
|
2751
|
+
let patterns = [].concat(source), settings = new settings_1.default(options), tasks = taskManager.generate(patterns, settings), provider = new _Provider(settings);
|
|
2752
|
+
return tasks.map(provider.read, provider);
|
|
2753
|
+
}
|
|
2754
|
+
function assertPatternsInput2(input) {
|
|
2755
|
+
if (![].concat(input).every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)))
|
|
2756
|
+
throw new TypeError("Patterns must be a string (non empty) or an array of strings");
|
|
2757
|
+
}
|
|
2758
|
+
module.exports = FastGlob;
|
|
2759
|
+
}
|
|
2760
|
+
});
|
|
2761
|
+
|
|
2762
|
+
// ../node_modules/globby/node_modules/ignore/index.js
|
|
2763
|
+
var require_ignore = __commonJS({
|
|
2764
|
+
"../node_modules/globby/node_modules/ignore/index.js"(exports, module) {
|
|
2765
|
+
function makeArray(subject) {
|
|
2766
|
+
return Array.isArray(subject) ? subject : [subject];
|
|
2767
|
+
}
|
|
2768
|
+
var UNDEFINED = void 0, EMPTY = "", SPACE = " ", ESCAPE = "\\", REGEX_TEST_BLANK_LINE = /^\s+$/, REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/, REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/, REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/, REGEX_SPLITALL_CRLF = /\r?\n/g, REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/, REGEX_TEST_TRAILING_SLASH = /\/$/, SLASH = "/", TMP_KEY_IGNORE = "node-ignore";
|
|
2769
|
+
typeof Symbol < "u" && (TMP_KEY_IGNORE = Symbol.for("node-ignore"));
|
|
2770
|
+
var KEY_IGNORE = TMP_KEY_IGNORE, define = (object, key, value) => (Object.defineProperty(object, key, { value }), value), REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g, RETURN_FALSE = () => !1, sanitizeRange = (range) => range.replace(
|
|
2771
|
+
REGEX_REGEXP_RANGE,
|
|
2772
|
+
(match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY
|
|
2773
|
+
), cleanRangeBackSlash = (slashes) => {
|
|
2774
|
+
let { length } = slashes;
|
|
2775
|
+
return slashes.slice(0, length - length % 2);
|
|
2776
|
+
}, REPLACERS = [
|
|
2777
|
+
[
|
|
2778
|
+
// Remove BOM
|
|
2779
|
+
// TODO:
|
|
2780
|
+
// Other similar zero-width characters?
|
|
2781
|
+
/^\uFEFF/,
|
|
2782
|
+
() => EMPTY
|
|
2783
|
+
],
|
|
2784
|
+
// > Trailing spaces are ignored unless they are quoted with backslash ("\")
|
|
2785
|
+
[
|
|
2786
|
+
// (a\ ) -> (a )
|
|
2787
|
+
// (a ) -> (a)
|
|
2788
|
+
// (a ) -> (a)
|
|
2789
|
+
// (a \ ) -> (a )
|
|
2790
|
+
/((?:\\\\)*?)(\\?\s+)$/,
|
|
2791
|
+
(_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)
|
|
2792
|
+
],
|
|
2793
|
+
// Replace (\ ) with ' '
|
|
2794
|
+
// (\ ) -> ' '
|
|
2795
|
+
// (\\ ) -> '\\ '
|
|
2796
|
+
// (\\\ ) -> '\\ '
|
|
2797
|
+
[
|
|
2798
|
+
/(\\+?)\s/g,
|
|
2799
|
+
(_, m1) => {
|
|
2800
|
+
let { length } = m1;
|
|
2801
|
+
return m1.slice(0, length - length % 2) + SPACE;
|
|
2802
|
+
}
|
|
2803
|
+
],
|
|
2804
|
+
// Escape metacharacters
|
|
2805
|
+
// which is written down by users but means special for regular expressions.
|
|
2806
|
+
// > There are 12 characters with special meanings:
|
|
2807
|
+
// > - the backslash \,
|
|
2808
|
+
// > - the caret ^,
|
|
2809
|
+
// > - the dollar sign $,
|
|
2810
|
+
// > - the period or dot .,
|
|
2811
|
+
// > - the vertical bar or pipe symbol |,
|
|
2812
|
+
// > - the question mark ?,
|
|
2813
|
+
// > - the asterisk or star *,
|
|
2814
|
+
// > - the plus sign +,
|
|
2815
|
+
// > - the opening parenthesis (,
|
|
2816
|
+
// > - the closing parenthesis ),
|
|
2817
|
+
// > - and the opening square bracket [,
|
|
2818
|
+
// > - the opening curly brace {,
|
|
2819
|
+
// > These special characters are often called "metacharacters".
|
|
2820
|
+
[
|
|
2821
|
+
/[\\$.|*+(){^]/g,
|
|
2822
|
+
(match) => `\\${match}`
|
|
2823
|
+
],
|
|
2824
|
+
[
|
|
2825
|
+
// > a question mark (?) matches a single character
|
|
2826
|
+
/(?!\\)\?/g,
|
|
2827
|
+
() => "[^/]"
|
|
2828
|
+
],
|
|
2829
|
+
// leading slash
|
|
2830
|
+
[
|
|
2831
|
+
// > A leading slash matches the beginning of the pathname.
|
|
2832
|
+
// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
|
|
2833
|
+
// A leading slash matches the beginning of the pathname
|
|
2834
|
+
/^\//,
|
|
2835
|
+
() => "^"
|
|
2836
|
+
],
|
|
2837
|
+
// replace special metacharacter slash after the leading slash
|
|
2838
|
+
[
|
|
2839
|
+
/\//g,
|
|
2840
|
+
() => "\\/"
|
|
2841
|
+
],
|
|
2842
|
+
[
|
|
2843
|
+
// > A leading "**" followed by a slash means match in all directories.
|
|
2844
|
+
// > For example, "**/foo" matches file or directory "foo" anywhere,
|
|
2845
|
+
// > the same as pattern "foo".
|
|
2846
|
+
// > "**/foo/bar" matches file or directory "bar" anywhere that is directly
|
|
2847
|
+
// > under directory "foo".
|
|
2848
|
+
// Notice that the '*'s have been replaced as '\\*'
|
|
2849
|
+
/^\^*\\\*\\\*\\\//,
|
|
2850
|
+
// '**/foo' <-> 'foo'
|
|
2851
|
+
() => "^(?:.*\\/)?"
|
|
2852
|
+
],
|
|
2853
|
+
// starting
|
|
2854
|
+
[
|
|
2855
|
+
// there will be no leading '/'
|
|
2856
|
+
// (which has been replaced by section "leading slash")
|
|
2857
|
+
// If starts with '**', adding a '^' to the regular expression also works
|
|
2858
|
+
/^(?=[^^])/,
|
|
2859
|
+
function() {
|
|
2860
|
+
return /\/(?!$)/.test(this) ? "^" : "(?:^|\\/)";
|
|
2861
|
+
}
|
|
2862
|
+
],
|
|
2863
|
+
// two globstars
|
|
2864
|
+
[
|
|
2865
|
+
// Use lookahead assertions so that we could match more than one `'/**'`
|
|
2866
|
+
/\\\/\\\*\\\*(?=\\\/|$)/g,
|
|
2867
|
+
// Zero, one or several directories
|
|
2868
|
+
// should not use '*', or it will be replaced by the next replacer
|
|
2869
|
+
// Check if it is not the last `'/**'`
|
|
2870
|
+
(_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"
|
|
2871
|
+
],
|
|
2872
|
+
// normal intermediate wildcards
|
|
2873
|
+
[
|
|
2874
|
+
// Never replace escaped '*'
|
|
2875
|
+
// ignore rule '\*' will match the path '*'
|
|
2876
|
+
// 'abc.*/' -> go
|
|
2877
|
+
// 'abc.*' -> skip this rule,
|
|
2878
|
+
// coz trailing single wildcard will be handed by [trailing wildcard]
|
|
2879
|
+
/(^|[^\\]+)(\\\*)+(?=.+)/g,
|
|
2880
|
+
// '*.js' matches '.js'
|
|
2881
|
+
// '*.js' doesn't match 'abc'
|
|
2882
|
+
(_, p1, p2) => {
|
|
2883
|
+
let unescaped = p2.replace(/\\\*/g, "[^\\/]*");
|
|
2884
|
+
return p1 + unescaped;
|
|
2885
|
+
}
|
|
2886
|
+
],
|
|
2887
|
+
[
|
|
2888
|
+
// unescape, revert step 3 except for back slash
|
|
2889
|
+
// For example, if a user escape a '\\*',
|
|
2890
|
+
// after step 3, the result will be '\\\\\\*'
|
|
2891
|
+
/\\\\\\(?=[$.|*+(){^])/g,
|
|
2892
|
+
() => ESCAPE
|
|
2893
|
+
],
|
|
2894
|
+
[
|
|
2895
|
+
// '\\\\' -> '\\'
|
|
2896
|
+
/\\\\/g,
|
|
2897
|
+
() => ESCAPE
|
|
2898
|
+
],
|
|
2899
|
+
[
|
|
2900
|
+
// > The range notation, e.g. [a-zA-Z],
|
|
2901
|
+
// > can be used to match one of the characters in a range.
|
|
2902
|
+
// `\` is escaped by step 3
|
|
2903
|
+
/(\\)?\[([^\]/]*?)(\\*)($|\])/g,
|
|
2904
|
+
(match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" && endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]"
|
|
2905
|
+
],
|
|
2906
|
+
// ending
|
|
2907
|
+
[
|
|
2908
|
+
// 'js' will not match 'js.'
|
|
2909
|
+
// 'ab' will not match 'abc'
|
|
2910
|
+
/(?:[^*])$/,
|
|
2911
|
+
// WTF!
|
|
2912
|
+
// https://git-scm.com/docs/gitignore
|
|
2913
|
+
// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
|
|
2914
|
+
// which re-fixes #24, #38
|
|
2915
|
+
// > If there is a separator at the end of the pattern then the pattern
|
|
2916
|
+
// > will only match directories, otherwise the pattern can match both
|
|
2917
|
+
// > files and directories.
|
|
2918
|
+
// 'js*' will not match 'a.js'
|
|
2919
|
+
// 'js/' will not match 'a.js'
|
|
2920
|
+
// 'js' will match 'a.js' and 'a.js/'
|
|
2921
|
+
(match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`
|
|
2922
|
+
]
|
|
2923
|
+
], REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/, MODE_IGNORE = "regex", MODE_CHECK_IGNORE = "checkRegex", UNDERSCORE = "_", TRAILING_WILD_CARD_REPLACERS = {
|
|
2924
|
+
[MODE_IGNORE](_, p1) {
|
|
2925
|
+
return `${p1 ? `${p1}[^/]+` : "[^/]*"}(?=$|\\/$)`;
|
|
2926
|
+
},
|
|
2927
|
+
[MODE_CHECK_IGNORE](_, p1) {
|
|
2928
|
+
return `${p1 ? `${p1}[^/]*` : "[^/]*"}(?=$|\\/$)`;
|
|
2929
|
+
}
|
|
2930
|
+
}, makeRegexPrefix = (pattern) => REPLACERS.reduce(
|
|
2931
|
+
(prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)),
|
|
2932
|
+
pattern
|
|
2933
|
+
), isString = (subject) => typeof subject == "string", checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0, splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean), IgnoreRule = class {
|
|
2934
|
+
constructor(pattern, mark, body, ignoreCase, negative, prefix) {
|
|
2935
|
+
this.pattern = pattern, this.mark = mark, this.negative = negative, define(this, "body", body), define(this, "ignoreCase", ignoreCase), define(this, "regexPrefix", prefix);
|
|
2936
|
+
}
|
|
2937
|
+
get regex() {
|
|
2938
|
+
let key = UNDERSCORE + MODE_IGNORE;
|
|
2939
|
+
return this[key] ? this[key] : this._make(MODE_IGNORE, key);
|
|
2940
|
+
}
|
|
2941
|
+
get checkRegex() {
|
|
2942
|
+
let key = UNDERSCORE + MODE_CHECK_IGNORE;
|
|
2943
|
+
return this[key] ? this[key] : this._make(MODE_CHECK_IGNORE, key);
|
|
2944
|
+
}
|
|
2945
|
+
_make(mode, key) {
|
|
2946
|
+
let str = this.regexPrefix.replace(
|
|
2947
|
+
REGEX_REPLACE_TRAILING_WILDCARD,
|
|
2948
|
+
// It does not need to bind pattern
|
|
2949
|
+
TRAILING_WILD_CARD_REPLACERS[mode]
|
|
2950
|
+
), regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
|
|
2951
|
+
return define(this, key, regex);
|
|
2952
|
+
}
|
|
2953
|
+
}, createRule = ({
|
|
2954
|
+
pattern,
|
|
2955
|
+
mark
|
|
2956
|
+
}, ignoreCase) => {
|
|
2957
|
+
let negative = !1, body = pattern;
|
|
2958
|
+
body.indexOf("!") === 0 && (negative = !0, body = body.substr(1)), body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
|
|
2959
|
+
let regexPrefix = makeRegexPrefix(body);
|
|
2960
|
+
return new IgnoreRule(
|
|
2961
|
+
pattern,
|
|
2962
|
+
mark,
|
|
2963
|
+
body,
|
|
2964
|
+
ignoreCase,
|
|
2965
|
+
negative,
|
|
2966
|
+
regexPrefix
|
|
2967
|
+
);
|
|
2968
|
+
}, RuleManager = class {
|
|
2969
|
+
constructor(ignoreCase) {
|
|
2970
|
+
this._ignoreCase = ignoreCase, this._rules = [];
|
|
2971
|
+
}
|
|
2972
|
+
_add(pattern) {
|
|
2973
|
+
if (pattern && pattern[KEY_IGNORE]) {
|
|
2974
|
+
this._rules = this._rules.concat(pattern._rules._rules), this._added = !0;
|
|
2975
|
+
return;
|
|
2976
|
+
}
|
|
2977
|
+
if (isString(pattern) && (pattern = {
|
|
2978
|
+
pattern
|
|
2979
|
+
}), checkPattern(pattern.pattern)) {
|
|
2980
|
+
let rule = createRule(pattern, this._ignoreCase);
|
|
2981
|
+
this._added = !0, this._rules.push(rule);
|
|
2982
|
+
}
|
|
2983
|
+
}
|
|
2984
|
+
// @param {Array<string> | string | Ignore} pattern
|
|
2985
|
+
add(pattern) {
|
|
2986
|
+
return this._added = !1, makeArray(
|
|
2987
|
+
isString(pattern) ? splitPattern(pattern) : pattern
|
|
2988
|
+
).forEach(this._add, this), this._added;
|
|
2989
|
+
}
|
|
2990
|
+
// Test one single path without recursively checking parent directories
|
|
2991
|
+
//
|
|
2992
|
+
// - checkUnignored `boolean` whether should check if the path is unignored,
|
|
2993
|
+
// setting `checkUnignored` to `false` could reduce additional
|
|
2994
|
+
// path matching.
|
|
2995
|
+
// - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
2996
|
+
// @returns {TestResult} true if a file is ignored
|
|
2997
|
+
test(path2, checkUnignored, mode) {
|
|
2998
|
+
let ignored = !1, unignored = !1, matchedRule;
|
|
2999
|
+
this._rules.forEach((rule) => {
|
|
3000
|
+
let { negative } = rule;
|
|
3001
|
+
unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored || !rule[mode].test(path2) || (ignored = !negative, unignored = negative, matchedRule = negative ? UNDEFINED : rule);
|
|
3002
|
+
});
|
|
3003
|
+
let ret = {
|
|
3004
|
+
ignored,
|
|
3005
|
+
unignored
|
|
3006
|
+
};
|
|
3007
|
+
return matchedRule && (ret.rule = matchedRule), ret;
|
|
3008
|
+
}
|
|
3009
|
+
}, throwError = (message, Ctor) => {
|
|
3010
|
+
throw new Ctor(message);
|
|
3011
|
+
}, checkPath = (path2, originalPath, doThrow) => isString(path2) ? path2 ? checkPath.isNotRelative(path2) ? doThrow(
|
|
3012
|
+
`path should be a \`path.relative()\`d string, but got "${originalPath}"`,
|
|
3013
|
+
RangeError
|
|
3014
|
+
) : !0 : doThrow("path must not be empty", TypeError) : doThrow(
|
|
3015
|
+
`path must be a string, but got \`${originalPath}\``,
|
|
3016
|
+
TypeError
|
|
3017
|
+
), isNotRelative = (path2) => REGEX_TEST_INVALID_PATH.test(path2);
|
|
3018
|
+
checkPath.isNotRelative = isNotRelative;
|
|
3019
|
+
checkPath.convert = (p) => p;
|
|
3020
|
+
var Ignore = class {
|
|
3021
|
+
constructor({
|
|
3022
|
+
ignorecase = !0,
|
|
3023
|
+
ignoreCase = ignorecase,
|
|
3024
|
+
allowRelativePaths = !1
|
|
3025
|
+
} = {}) {
|
|
3026
|
+
define(this, KEY_IGNORE, !0), this._rules = new RuleManager(ignoreCase), this._strictPathCheck = !allowRelativePaths, this._initCache();
|
|
3027
|
+
}
|
|
3028
|
+
_initCache() {
|
|
3029
|
+
this._ignoreCache = /* @__PURE__ */ Object.create(null), this._testCache = /* @__PURE__ */ Object.create(null);
|
|
3030
|
+
}
|
|
3031
|
+
add(pattern) {
|
|
3032
|
+
return this._rules.add(pattern) && this._initCache(), this;
|
|
3033
|
+
}
|
|
3034
|
+
// legacy
|
|
3035
|
+
addPattern(pattern) {
|
|
3036
|
+
return this.add(pattern);
|
|
3037
|
+
}
|
|
3038
|
+
// @returns {TestResult}
|
|
3039
|
+
_test(originalPath, cache, checkUnignored, slices) {
|
|
3040
|
+
let path2 = originalPath && checkPath.convert(originalPath);
|
|
3041
|
+
return checkPath(
|
|
3042
|
+
path2,
|
|
3043
|
+
originalPath,
|
|
3044
|
+
this._strictPathCheck ? throwError : RETURN_FALSE
|
|
3045
|
+
), this._t(path2, cache, checkUnignored, slices);
|
|
3046
|
+
}
|
|
3047
|
+
checkIgnore(path2) {
|
|
3048
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path2))
|
|
3049
|
+
return this.test(path2);
|
|
3050
|
+
let slices = path2.split(SLASH).filter(Boolean);
|
|
3051
|
+
if (slices.pop(), slices.length) {
|
|
3052
|
+
let parent = this._t(
|
|
3053
|
+
slices.join(SLASH) + SLASH,
|
|
3054
|
+
this._testCache,
|
|
3055
|
+
!0,
|
|
3056
|
+
slices
|
|
3057
|
+
);
|
|
3058
|
+
if (parent.ignored)
|
|
3059
|
+
return parent;
|
|
3060
|
+
}
|
|
3061
|
+
return this._rules.test(path2, !1, MODE_CHECK_IGNORE);
|
|
3062
|
+
}
|
|
3063
|
+
_t(path2, cache, checkUnignored, slices) {
|
|
3064
|
+
if (path2 in cache)
|
|
3065
|
+
return cache[path2];
|
|
3066
|
+
if (slices || (slices = path2.split(SLASH).filter(Boolean)), slices.pop(), !slices.length)
|
|
3067
|
+
return cache[path2] = this._rules.test(path2, checkUnignored, MODE_IGNORE);
|
|
3068
|
+
let parent = this._t(
|
|
3069
|
+
slices.join(SLASH) + SLASH,
|
|
3070
|
+
cache,
|
|
3071
|
+
checkUnignored,
|
|
3072
|
+
slices
|
|
3073
|
+
);
|
|
3074
|
+
return cache[path2] = parent.ignored ? parent : this._rules.test(path2, checkUnignored, MODE_IGNORE);
|
|
3075
|
+
}
|
|
3076
|
+
ignores(path2) {
|
|
3077
|
+
return this._test(path2, this._ignoreCache, !1).ignored;
|
|
3078
|
+
}
|
|
3079
|
+
createFilter() {
|
|
3080
|
+
return (path2) => !this.ignores(path2);
|
|
3081
|
+
}
|
|
3082
|
+
filter(paths) {
|
|
3083
|
+
return makeArray(paths).filter(this.createFilter());
|
|
3084
|
+
}
|
|
3085
|
+
// @returns {TestResult}
|
|
3086
|
+
test(path2) {
|
|
3087
|
+
return this._test(path2, this._testCache, !0);
|
|
3088
|
+
}
|
|
3089
|
+
}, factory = (options) => new Ignore(options), isPathValid = (path2) => checkPath(path2 && checkPath.convert(path2), path2, RETURN_FALSE), setupWindows = () => {
|
|
3090
|
+
let makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
3091
|
+
checkPath.convert = makePosix;
|
|
3092
|
+
let REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
3093
|
+
checkPath.isNotRelative = (path2) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path2) || isNotRelative(path2);
|
|
3094
|
+
};
|
|
3095
|
+
// Detect `process` so that it can run in browsers.
|
|
3096
|
+
typeof process < "u" && process.platform === "win32" && setupWindows();
|
|
3097
|
+
module.exports = factory;
|
|
3098
|
+
factory.default = factory;
|
|
3099
|
+
module.exports.isPathValid = isPathValid;
|
|
3100
|
+
define(module.exports, Symbol.for("setupWindows"), setupWindows);
|
|
3101
|
+
}
|
|
3102
|
+
});
|
|
3103
|
+
|
|
3104
|
+
// ../node_modules/globby/index.js
|
|
3105
|
+
import process3 from "node:process";
|
|
3106
|
+
import fs3 from "node:fs";
|
|
3107
|
+
import nodePath from "node:path";
|
|
3108
|
+
|
|
3109
|
+
// ../node_modules/globby/node_modules/@sindresorhus/merge-streams/index.js
|
|
3110
|
+
import { on, once } from "node:events";
|
|
3111
|
+
import { PassThrough as PassThroughStream } from "node:stream";
|
|
3112
|
+
import { finished } from "node:stream/promises";
|
|
3113
|
+
function mergeStreams(streams) {
|
|
3114
|
+
if (!Array.isArray(streams))
|
|
3115
|
+
throw new TypeError(`Expected an array, got \`${typeof streams}\`.`);
|
|
3116
|
+
for (let stream of streams)
|
|
3117
|
+
validateStream(stream);
|
|
3118
|
+
let objectMode = streams.some(({ readableObjectMode }) => readableObjectMode), highWaterMark = getHighWaterMark(streams, objectMode), passThroughStream = new MergedStream({
|
|
3119
|
+
objectMode,
|
|
3120
|
+
writableHighWaterMark: highWaterMark,
|
|
3121
|
+
readableHighWaterMark: highWaterMark
|
|
3122
|
+
});
|
|
3123
|
+
for (let stream of streams)
|
|
3124
|
+
passThroughStream.add(stream);
|
|
3125
|
+
return streams.length === 0 && endStream(passThroughStream), passThroughStream;
|
|
3126
|
+
}
|
|
3127
|
+
var getHighWaterMark = (streams, objectMode) => {
|
|
3128
|
+
if (streams.length === 0)
|
|
3129
|
+
return 16384;
|
|
3130
|
+
let highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark);
|
|
3131
|
+
return Math.max(...highWaterMarks);
|
|
3132
|
+
}, MergedStream = class extends PassThroughStream {
|
|
3133
|
+
#streams = /* @__PURE__ */ new Set([]);
|
|
3134
|
+
#ended = /* @__PURE__ */ new Set([]);
|
|
3135
|
+
#aborted = /* @__PURE__ */ new Set([]);
|
|
3136
|
+
#onFinished;
|
|
3137
|
+
add(stream) {
|
|
3138
|
+
validateStream(stream), !this.#streams.has(stream) && (this.#streams.add(stream), this.#onFinished ??= onMergedStreamFinished(this, this.#streams), endWhenStreamsDone({
|
|
3139
|
+
passThroughStream: this,
|
|
3140
|
+
stream,
|
|
3141
|
+
streams: this.#streams,
|
|
3142
|
+
ended: this.#ended,
|
|
3143
|
+
aborted: this.#aborted,
|
|
3144
|
+
onFinished: this.#onFinished
|
|
3145
|
+
}), stream.pipe(this, { end: !1 }));
|
|
3146
|
+
}
|
|
3147
|
+
remove(stream) {
|
|
3148
|
+
return validateStream(stream), this.#streams.has(stream) ? (stream.unpipe(this), !0) : !1;
|
|
3149
|
+
}
|
|
3150
|
+
}, onMergedStreamFinished = async (passThroughStream, streams) => {
|
|
3151
|
+
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT);
|
|
3152
|
+
let controller = new AbortController();
|
|
3153
|
+
try {
|
|
3154
|
+
await Promise.race([
|
|
3155
|
+
onMergedStreamEnd(passThroughStream, controller),
|
|
3156
|
+
onInputStreamsUnpipe(passThroughStream, streams, controller)
|
|
3157
|
+
]);
|
|
3158
|
+
} finally {
|
|
3159
|
+
controller.abort(), updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_COUNT);
|
|
3160
|
+
}
|
|
3161
|
+
}, onMergedStreamEnd = async (passThroughStream, { signal }) => {
|
|
3162
|
+
await finished(passThroughStream, { signal, cleanup: !0 });
|
|
3163
|
+
}, onInputStreamsUnpipe = async (passThroughStream, streams, { signal }) => {
|
|
3164
|
+
for await (let [unpipedStream] of on(passThroughStream, "unpipe", { signal }))
|
|
3165
|
+
streams.has(unpipedStream) && unpipedStream.emit(unpipeEvent);
|
|
3166
|
+
}, validateStream = (stream) => {
|
|
3167
|
+
if (typeof stream?.pipe != "function")
|
|
3168
|
+
throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
3169
|
+
}, endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished }) => {
|
|
3170
|
+
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
3171
|
+
let controller = new AbortController();
|
|
3172
|
+
try {
|
|
3173
|
+
await Promise.race([
|
|
3174
|
+
afterMergedStreamFinished(onFinished, stream),
|
|
3175
|
+
onInputStreamEnd({ passThroughStream, stream, streams, ended, aborted, controller }),
|
|
3176
|
+
onInputStreamUnpipe({ stream, streams, ended, aborted, controller })
|
|
3177
|
+
]);
|
|
3178
|
+
} finally {
|
|
3179
|
+
controller.abort(), updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
3180
|
+
}
|
|
3181
|
+
streams.size === ended.size + aborted.size && (ended.size === 0 && aborted.size > 0 ? abortStream(passThroughStream) : endStream(passThroughStream));
|
|
3182
|
+
}, isAbortError = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE", afterMergedStreamFinished = async (onFinished, stream) => {
|
|
3183
|
+
try {
|
|
3184
|
+
await onFinished, abortStream(stream);
|
|
3185
|
+
} catch (error) {
|
|
3186
|
+
isAbortError(error) ? abortStream(stream) : errorStream(stream, error);
|
|
3187
|
+
}
|
|
3188
|
+
}, onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted, controller: { signal } }) => {
|
|
3189
|
+
try {
|
|
3190
|
+
await finished(stream, { signal, cleanup: !0, readable: !0, writable: !1 }), streams.has(stream) && ended.add(stream);
|
|
3191
|
+
} catch (error) {
|
|
3192
|
+
if (signal.aborted || !streams.has(stream))
|
|
3193
|
+
return;
|
|
3194
|
+
isAbortError(error) ? aborted.add(stream) : errorStream(passThroughStream, error);
|
|
3195
|
+
}
|
|
3196
|
+
}, onInputStreamUnpipe = async ({ stream, streams, ended, aborted, controller: { signal } }) => {
|
|
3197
|
+
await once(stream, unpipeEvent, { signal }), streams.delete(stream), ended.delete(stream), aborted.delete(stream);
|
|
3198
|
+
}, unpipeEvent = Symbol("unpipe"), endStream = (stream) => {
|
|
3199
|
+
stream.writable && stream.end();
|
|
3200
|
+
}, abortStream = (stream) => {
|
|
3201
|
+
(stream.readable || stream.writable) && stream.destroy();
|
|
3202
|
+
}, errorStream = (stream, error) => {
|
|
3203
|
+
stream.destroyed || (stream.once("error", noop), stream.destroy(error));
|
|
3204
|
+
}, noop = () => {
|
|
3205
|
+
}, updateMaxListeners = (passThroughStream, increment) => {
|
|
3206
|
+
let maxListeners = passThroughStream.getMaxListeners();
|
|
3207
|
+
maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY && passThroughStream.setMaxListeners(maxListeners + increment);
|
|
3208
|
+
}, PASSTHROUGH_LISTENERS_COUNT = 2, PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
3209
|
+
|
|
3210
|
+
// ../node_modules/globby/index.js
|
|
3211
|
+
var import_fast_glob2 = __toESM(require_out4(), 1);
|
|
3212
|
+
|
|
3213
|
+
// ../node_modules/globby/node_modules/path-type/index.js
|
|
3214
|
+
import fs from "node:fs";
|
|
3215
|
+
import fsPromises from "node:fs/promises";
|
|
3216
|
+
async function isType(fsStatType, statsMethodName, filePath) {
|
|
3217
|
+
if (typeof filePath != "string")
|
|
3218
|
+
throw new TypeError(`Expected a string, got ${typeof filePath}`);
|
|
3219
|
+
try {
|
|
3220
|
+
return (await fsPromises[fsStatType](filePath))[statsMethodName]();
|
|
3221
|
+
} catch (error) {
|
|
3222
|
+
if (error.code === "ENOENT")
|
|
3223
|
+
return !1;
|
|
3224
|
+
throw error;
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
function isTypeSync(fsStatType, statsMethodName, filePath) {
|
|
3228
|
+
if (typeof filePath != "string")
|
|
3229
|
+
throw new TypeError(`Expected a string, got ${typeof filePath}`);
|
|
3230
|
+
try {
|
|
3231
|
+
return fs[fsStatType](filePath)[statsMethodName]();
|
|
3232
|
+
} catch (error) {
|
|
3233
|
+
if (error.code === "ENOENT")
|
|
3234
|
+
return !1;
|
|
3235
|
+
throw error;
|
|
3236
|
+
}
|
|
3237
|
+
}
|
|
3238
|
+
var isFile = isType.bind(void 0, "stat", "isFile"), isDirectory = isType.bind(void 0, "stat", "isDirectory"), isSymlink = isType.bind(void 0, "lstat", "isSymbolicLink"), isFileSync = isTypeSync.bind(void 0, "statSync", "isFile"), isDirectorySync = isTypeSync.bind(void 0, "statSync", "isDirectory"), isSymlinkSync = isTypeSync.bind(void 0, "lstatSync", "isSymbolicLink");
|
|
3239
|
+
|
|
3240
|
+
// ../node_modules/unicorn-magic/node.js
|
|
3241
|
+
import { promisify } from "node:util";
|
|
3242
|
+
import { execFile as execFileCallback, execFileSync as execFileSyncOriginal } from "node:child_process";
|
|
3243
|
+
import { fileURLToPath } from "node:url";
|
|
3244
|
+
var execFileOriginal = promisify(execFileCallback);
|
|
3245
|
+
function toPath(urlOrPath) {
|
|
3246
|
+
return urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
3247
|
+
}
|
|
3248
|
+
var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
3249
|
+
|
|
3250
|
+
// ../node_modules/globby/ignore.js
|
|
3251
|
+
var import_fast_glob = __toESM(require_out4(), 1), import_ignore = __toESM(require_ignore(), 1);
|
|
3252
|
+
import process2 from "node:process";
|
|
3253
|
+
import fs2 from "node:fs";
|
|
3254
|
+
import fsPromises2 from "node:fs/promises";
|
|
3255
|
+
import path from "node:path";
|
|
3256
|
+
|
|
3257
|
+
// ../node_modules/globby/utilities.js
|
|
3258
|
+
var isNegativePattern = (pattern) => pattern[0] === "!";
|
|
3259
|
+
|
|
3260
|
+
// ../node_modules/globby/ignore.js
|
|
3261
|
+
var defaultIgnoredDirectories = [
|
|
3262
|
+
"**/node_modules",
|
|
3263
|
+
"**/flow-typed",
|
|
3264
|
+
"**/coverage",
|
|
3265
|
+
"**/.git"
|
|
3266
|
+
], ignoreFilesGlobOptions = {
|
|
3267
|
+
absolute: !0,
|
|
3268
|
+
dot: !0
|
|
3269
|
+
}, GITIGNORE_FILES_PATTERN = "**/.gitignore", applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + path.posix.join(base, pattern.slice(1)) : path.posix.join(base, pattern), parseIgnoreFile = (file, cwd) => {
|
|
3270
|
+
let base = slash(path.relative(cwd, path.dirname(file.filePath)));
|
|
3271
|
+
return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base));
|
|
3272
|
+
}, toRelativePath = (fileOrDirectory, cwd) => {
|
|
3273
|
+
if (cwd = slash(cwd), path.isAbsolute(fileOrDirectory)) {
|
|
3274
|
+
if (slash(fileOrDirectory).startsWith(cwd))
|
|
3275
|
+
return path.relative(cwd, fileOrDirectory);
|
|
3276
|
+
throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);
|
|
3277
|
+
}
|
|
3278
|
+
return fileOrDirectory;
|
|
3279
|
+
}, getIsIgnoredPredicate = (files, cwd) => {
|
|
3280
|
+
let patterns = files.flatMap((file) => parseIgnoreFile(file, cwd)), ignores = (0, import_ignore.default)().add(patterns);
|
|
3281
|
+
return (fileOrDirectory) => (fileOrDirectory = toPath(fileOrDirectory), fileOrDirectory = toRelativePath(fileOrDirectory, cwd), fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : !1);
|
|
3282
|
+
}, normalizeOptions = (options = {}) => ({
|
|
3283
|
+
cwd: toPath(options.cwd) ?? process2.cwd(),
|
|
3284
|
+
suppressErrors: !!options.suppressErrors,
|
|
3285
|
+
deep: typeof options.deep == "number" ? options.deep : Number.POSITIVE_INFINITY,
|
|
3286
|
+
ignore: [...options.ignore ?? [], ...defaultIgnoredDirectories]
|
|
3287
|
+
}), isIgnoredByIgnoreFiles = async (patterns, options) => {
|
|
3288
|
+
let { cwd, suppressErrors, deep, ignore } = normalizeOptions(options), paths = await (0, import_fast_glob.default)(patterns, {
|
|
3289
|
+
cwd,
|
|
3290
|
+
suppressErrors,
|
|
3291
|
+
deep,
|
|
3292
|
+
ignore,
|
|
3293
|
+
...ignoreFilesGlobOptions
|
|
3294
|
+
}), files = await Promise.all(
|
|
3295
|
+
paths.map(async (filePath) => ({
|
|
3296
|
+
filePath,
|
|
3297
|
+
content: await fsPromises2.readFile(filePath, "utf8")
|
|
3298
|
+
}))
|
|
3299
|
+
);
|
|
3300
|
+
return getIsIgnoredPredicate(files, cwd);
|
|
3301
|
+
}, isIgnoredByIgnoreFilesSync = (patterns, options) => {
|
|
3302
|
+
let { cwd, suppressErrors, deep, ignore } = normalizeOptions(options), files = import_fast_glob.default.sync(patterns, {
|
|
3303
|
+
cwd,
|
|
3304
|
+
suppressErrors,
|
|
3305
|
+
deep,
|
|
3306
|
+
ignore,
|
|
3307
|
+
...ignoreFilesGlobOptions
|
|
3308
|
+
}).map((filePath) => ({
|
|
3309
|
+
filePath,
|
|
3310
|
+
content: fs2.readFileSync(filePath, "utf8")
|
|
3311
|
+
}));
|
|
3312
|
+
return getIsIgnoredPredicate(files, cwd);
|
|
3313
|
+
}, isGitIgnored = (options) => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options), isGitIgnoredSync = (options) => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN, options);
|
|
3314
|
+
|
|
3315
|
+
// ../node_modules/globby/index.js
|
|
3316
|
+
var assertPatternsInput = (patterns) => {
|
|
3317
|
+
if (patterns.some((pattern) => typeof pattern != "string"))
|
|
3318
|
+
throw new TypeError("Patterns must be a string or an array of strings");
|
|
3319
|
+
}, normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
3320
|
+
let path2 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
3321
|
+
return nodePath.isAbsolute(path2) ? path2 : nodePath.join(cwd, path2);
|
|
3322
|
+
}, getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
3323
|
+
let extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
3324
|
+
return files ? files.map((file) => nodePath.posix.join(directoryPath, `**/${nodePath.extname(file) ? file : `${file}${extensionGlob}`}`)) : [nodePath.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
3325
|
+
}, directoryToGlob = async (directoryPaths, {
|
|
3326
|
+
cwd = process3.cwd(),
|
|
3327
|
+
files,
|
|
3328
|
+
extensions
|
|
3329
|
+
} = {}) => (await Promise.all(
|
|
3330
|
+
directoryPaths.map(async (directoryPath) => await isDirectory(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath)
|
|
3331
|
+
)).flat(), directoryToGlobSync = (directoryPaths, {
|
|
3332
|
+
cwd = process3.cwd(),
|
|
3333
|
+
files,
|
|
3334
|
+
extensions
|
|
3335
|
+
} = {}) => directoryPaths.flatMap((directoryPath) => isDirectorySync(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath), toPatternsArray = (patterns) => (patterns = [...new Set([patterns].flat())], assertPatternsInput(patterns), patterns), checkCwdOption = (cwd) => {
|
|
3336
|
+
if (!cwd)
|
|
3337
|
+
return;
|
|
3338
|
+
let stat;
|
|
3339
|
+
try {
|
|
3340
|
+
stat = fs3.statSync(cwd);
|
|
3341
|
+
} catch {
|
|
3342
|
+
return;
|
|
3343
|
+
}
|
|
3344
|
+
if (!stat.isDirectory())
|
|
3345
|
+
throw new Error("The `cwd` option must be a path to a directory");
|
|
3346
|
+
}, normalizeOptions2 = (options = {}) => (options = {
|
|
3347
|
+
...options,
|
|
3348
|
+
ignore: options.ignore ?? [],
|
|
3349
|
+
expandDirectories: options.expandDirectories ?? !0,
|
|
3350
|
+
cwd: toPath(options.cwd)
|
|
3351
|
+
}, checkCwdOption(options.cwd), options), normalizeArguments = (function_) => async (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)), normalizeArgumentsSync = (function_) => (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)), getIgnoreFilesPatterns = (options) => {
|
|
3352
|
+
let { ignoreFiles, gitignore } = options, patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];
|
|
3353
|
+
return gitignore && patterns.push(GITIGNORE_FILES_PATTERN), patterns;
|
|
3354
|
+
}, getFilter = async (options) => {
|
|
3355
|
+
let ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
3356
|
+
return createFilterFunction(
|
|
3357
|
+
ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options)
|
|
3358
|
+
);
|
|
3359
|
+
}, getFilterSync = (options) => {
|
|
3360
|
+
let ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
3361
|
+
return createFilterFunction(
|
|
3362
|
+
ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options)
|
|
3363
|
+
);
|
|
3364
|
+
}, createFilterFunction = (isIgnored) => {
|
|
3365
|
+
let seen = /* @__PURE__ */ new Set();
|
|
3366
|
+
return (fastGlobResult) => {
|
|
3367
|
+
let pathKey = nodePath.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
3368
|
+
return seen.has(pathKey) || isIgnored && isIgnored(pathKey) ? !1 : (seen.add(pathKey), !0);
|
|
3369
|
+
};
|
|
3370
|
+
}, unionFastGlobResults = (results, filter) => results.flat().filter((fastGlobResult) => filter(fastGlobResult)), convertNegativePatterns = (patterns, options) => {
|
|
3371
|
+
let tasks = [];
|
|
3372
|
+
for (; patterns.length > 0; ) {
|
|
3373
|
+
let index = patterns.findIndex((pattern) => isNegativePattern(pattern));
|
|
3374
|
+
if (index === -1) {
|
|
3375
|
+
tasks.push({ patterns, options });
|
|
3376
|
+
break;
|
|
3377
|
+
}
|
|
3378
|
+
let ignorePattern = patterns[index].slice(1);
|
|
3379
|
+
for (let task of tasks)
|
|
3380
|
+
task.options.ignore.push(ignorePattern);
|
|
3381
|
+
index !== 0 && tasks.push({
|
|
3382
|
+
patterns: patterns.slice(0, index),
|
|
3383
|
+
options: {
|
|
3384
|
+
...options,
|
|
3385
|
+
ignore: [
|
|
3386
|
+
...options.ignore,
|
|
3387
|
+
ignorePattern
|
|
3388
|
+
]
|
|
3389
|
+
}
|
|
3390
|
+
}), patterns = patterns.slice(index + 1);
|
|
3391
|
+
}
|
|
3392
|
+
return tasks;
|
|
3393
|
+
}, normalizeExpandDirectoriesOption = (options, cwd) => ({
|
|
3394
|
+
...cwd ? { cwd } : {},
|
|
3395
|
+
...Array.isArray(options) ? { files: options } : options
|
|
3396
|
+
}), generateTasks = async (patterns, options) => {
|
|
3397
|
+
let globTasks = convertNegativePatterns(patterns, options), { cwd, expandDirectories } = options;
|
|
3398
|
+
if (!expandDirectories)
|
|
3399
|
+
return globTasks;
|
|
3400
|
+
let directoryToGlobOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd);
|
|
3401
|
+
return Promise.all(
|
|
3402
|
+
globTasks.map(async (task) => {
|
|
3403
|
+
let { patterns: patterns2, options: options2 } = task;
|
|
3404
|
+
return [
|
|
3405
|
+
patterns2,
|
|
3406
|
+
options2.ignore
|
|
3407
|
+
] = await Promise.all([
|
|
3408
|
+
directoryToGlob(patterns2, directoryToGlobOptions),
|
|
3409
|
+
directoryToGlob(options2.ignore, { cwd })
|
|
3410
|
+
]), { patterns: patterns2, options: options2 };
|
|
3411
|
+
})
|
|
3412
|
+
);
|
|
3413
|
+
}, generateTasksSync = (patterns, options) => {
|
|
3414
|
+
let globTasks = convertNegativePatterns(patterns, options), { cwd, expandDirectories } = options;
|
|
3415
|
+
if (!expandDirectories)
|
|
3416
|
+
return globTasks;
|
|
3417
|
+
let directoryToGlobSyncOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd);
|
|
3418
|
+
return globTasks.map((task) => {
|
|
3419
|
+
let { patterns: patterns2, options: options2 } = task;
|
|
3420
|
+
return patterns2 = directoryToGlobSync(patterns2, directoryToGlobSyncOptions), options2.ignore = directoryToGlobSync(options2.ignore, { cwd }), { patterns: patterns2, options: options2 };
|
|
3421
|
+
});
|
|
3422
|
+
}, globby = normalizeArguments(async (patterns, options) => {
|
|
3423
|
+
let [
|
|
3424
|
+
tasks,
|
|
3425
|
+
filter
|
|
3426
|
+
] = await Promise.all([
|
|
3427
|
+
generateTasks(patterns, options),
|
|
3428
|
+
getFilter(options)
|
|
3429
|
+
]), results = await Promise.all(tasks.map((task) => (0, import_fast_glob2.default)(task.patterns, task.options)));
|
|
3430
|
+
return unionFastGlobResults(results, filter);
|
|
3431
|
+
}), globbySync = normalizeArgumentsSync((patterns, options) => {
|
|
3432
|
+
let tasks = generateTasksSync(patterns, options), filter = getFilterSync(options), results = tasks.map((task) => import_fast_glob2.default.sync(task.patterns, task.options));
|
|
3433
|
+
return unionFastGlobResults(results, filter);
|
|
3434
|
+
}), globbyStream = normalizeArgumentsSync((patterns, options) => {
|
|
3435
|
+
let tasks = generateTasksSync(patterns, options), filter = getFilterSync(options), streams = tasks.map((task) => import_fast_glob2.default.stream(task.patterns, task.options));
|
|
3436
|
+
return mergeStreams(streams).filter((fastGlobResult) => filter(fastGlobResult));
|
|
3437
|
+
}), isDynamicPattern = normalizeArgumentsSync(
|
|
3438
|
+
(patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options))
|
|
3439
|
+
), generateGlobTasks = normalizeArguments(generateTasks), generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync), { convertPathToPattern } = import_fast_glob2.default;
|
|
3440
|
+
export {
|
|
3441
|
+
convertPathToPattern,
|
|
3442
|
+
generateGlobTasks,
|
|
3443
|
+
generateGlobTasksSync,
|
|
3444
|
+
globby,
|
|
3445
|
+
globbyStream,
|
|
3446
|
+
globbySync,
|
|
3447
|
+
isDynamicPattern,
|
|
3448
|
+
isGitIgnored,
|
|
3449
|
+
isGitIgnoredSync,
|
|
3450
|
+
isIgnoredByIgnoreFiles,
|
|
3451
|
+
isIgnoredByIgnoreFilesSync
|
|
3452
|
+
};
|