@wix/cli 1.1.87 → 1.1.88

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