pxnpm 5.0.0 → 6.0.0

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 (727) hide show
  1. package/README.md +276 -2
  2. package/bin/{pxnpm.cjs → pnpm.cjs} +2 -2
  3. package/bin/{pxnpx.cjs → pnpx.cjs} +1 -1
  4. package/dist/node_modules/.modules.yaml +92 -98
  5. package/dist/node_modules/.pnpm/lock.yaml +303 -412
  6. package/dist/node_modules/{set-blocking → @isaacs/cliui}/LICENSE.txt +1 -1
  7. package/dist/node_modules/@isaacs/cliui/build/index.cjs +317 -0
  8. package/dist/node_modules/@isaacs/cliui/build/index.d.cts +43 -0
  9. package/dist/node_modules/@isaacs/cliui/build/lib/index.js +302 -0
  10. package/dist/node_modules/@isaacs/cliui/index.mjs +14 -0
  11. package/dist/node_modules/@isaacs/cliui/package.json +86 -0
  12. package/dist/node_modules/@npmcli/agent/lib/agents.js +206 -0
  13. package/dist/node_modules/@npmcli/agent/lib/dns.js +53 -0
  14. package/dist/node_modules/@npmcli/agent/lib/errors.js +61 -0
  15. package/dist/node_modules/@npmcli/agent/lib/index.js +56 -0
  16. package/dist/node_modules/@npmcli/agent/lib/options.js +86 -0
  17. package/dist/node_modules/@npmcli/agent/lib/proxy.js +88 -0
  18. package/dist/node_modules/@npmcli/agent/package.json +60 -0
  19. package/dist/node_modules/@npmcli/fs/lib/cp/index.js +1 -1
  20. package/dist/node_modules/@npmcli/fs/lib/cp/polyfill.js +2 -2
  21. package/dist/node_modules/@npmcli/fs/lib/index.js +11 -10
  22. package/dist/node_modules/@npmcli/fs/lib/move-file.js +78 -0
  23. package/dist/node_modules/@npmcli/fs/lib/readdir-scoped.js +20 -0
  24. package/dist/node_modules/@npmcli/fs/lib/with-temp-dir.js +4 -6
  25. package/dist/node_modules/@npmcli/fs/package.json +13 -11
  26. package/dist/node_modules/@pkgjs/parseargs/LICENSE +201 -0
  27. package/dist/node_modules/@pkgjs/parseargs/index.js +396 -0
  28. package/dist/node_modules/@pkgjs/parseargs/internal/errors.js +47 -0
  29. package/dist/node_modules/@pkgjs/parseargs/internal/primordials.js +393 -0
  30. package/dist/node_modules/@pkgjs/parseargs/internal/util.js +14 -0
  31. package/dist/node_modules/@pkgjs/parseargs/internal/validators.js +89 -0
  32. package/dist/node_modules/@pkgjs/parseargs/package.json +36 -0
  33. package/dist/node_modules/@pkgjs/parseargs/utils.js +198 -0
  34. package/dist/node_modules/abbrev/lib/index.js +50 -0
  35. package/dist/node_modules/abbrev/package.json +33 -11
  36. package/dist/node_modules/agent-base/LICENSE +22 -0
  37. package/dist/node_modules/agent-base/dist/helpers.d.ts.map +1 -0
  38. package/dist/node_modules/agent-base/dist/helpers.js +66 -0
  39. package/dist/node_modules/agent-base/dist/helpers.js.map +1 -0
  40. package/dist/node_modules/agent-base/dist/index.d.ts.map +1 -0
  41. package/dist/node_modules/agent-base/dist/index.js +175 -0
  42. package/dist/node_modules/agent-base/dist/index.js.map +1 -0
  43. package/dist/node_modules/agent-base/package.json +26 -41
  44. package/dist/node_modules/ansi-regex/index.js +3 -5
  45. package/dist/node_modules/ansi-regex/license +1 -1
  46. package/dist/node_modules/ansi-regex/package.json +9 -6
  47. package/dist/node_modules/ansi-styles/index.js +223 -0
  48. package/dist/node_modules/ansi-styles/license +9 -0
  49. package/dist/node_modules/ansi-styles/package.json +54 -0
  50. package/dist/node_modules/brace-expansion/index.js +86 -84
  51. package/dist/node_modules/brace-expansion/package.json +3 -4
  52. package/dist/node_modules/cacache/lib/content/read.js +10 -86
  53. package/dist/node_modules/cacache/lib/content/rm.js +2 -4
  54. package/dist/node_modules/cacache/lib/content/write.js +42 -25
  55. package/dist/node_modules/cacache/lib/entry-index.js +26 -100
  56. package/dist/node_modules/cacache/lib/get.js +1 -56
  57. package/dist/node_modules/cacache/lib/index.js +0 -3
  58. package/dist/node_modules/cacache/lib/memoization.js +2 -2
  59. package/dist/node_modules/cacache/lib/rm.js +5 -5
  60. package/dist/node_modules/cacache/lib/util/glob.js +7 -0
  61. package/dist/node_modules/cacache/lib/util/tmp.js +3 -10
  62. package/dist/node_modules/cacache/lib/verify.js +31 -31
  63. package/dist/node_modules/cacache/node_modules/fs-minipass/lib/index.js +443 -0
  64. package/dist/node_modules/cacache/node_modules/fs-minipass/package.json +54 -0
  65. package/dist/node_modules/cacache/package.json +23 -25
  66. package/dist/node_modules/color-convert/LICENSE +21 -0
  67. package/dist/node_modules/color-convert/conversions.js +839 -0
  68. package/dist/node_modules/color-convert/index.js +81 -0
  69. package/dist/node_modules/color-convert/package.json +48 -0
  70. package/dist/node_modules/color-convert/route.js +97 -0
  71. package/dist/node_modules/color-name/LICENSE +8 -0
  72. package/dist/node_modules/color-name/index.js +152 -0
  73. package/dist/node_modules/color-name/package.json +28 -0
  74. package/dist/node_modules/{safe-buffer → cross-spawn}/LICENSE +1 -1
  75. package/dist/node_modules/cross-spawn/index.js +39 -0
  76. package/dist/node_modules/cross-spawn/lib/enoent.js +59 -0
  77. package/dist/node_modules/cross-spawn/lib/parse.js +91 -0
  78. package/dist/node_modules/cross-spawn/lib/util/escape.js +45 -0
  79. package/dist/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
  80. package/dist/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
  81. package/dist/node_modules/cross-spawn/package.json +73 -0
  82. package/dist/node_modules/debug/package.json +4 -3
  83. package/dist/node_modules/debug/src/node.js +2 -2
  84. package/dist/node_modules/eastasianwidth/eastasianwidth.js +311 -0
  85. package/dist/node_modules/eastasianwidth/package.json +18 -0
  86. package/dist/node_modules/emoji-regex/RGI_Emoji.js +6 -0
  87. package/dist/node_modules/emoji-regex/es2015/RGI_Emoji.js +6 -0
  88. package/dist/node_modules/emoji-regex/es2015/index.js +1 -1
  89. package/dist/node_modules/emoji-regex/es2015/text.js +1 -1
  90. package/dist/node_modules/emoji-regex/index.js +1 -1
  91. package/dist/node_modules/emoji-regex/package.json +13 -11
  92. package/dist/node_modules/emoji-regex/text.js +1 -1
  93. package/dist/node_modules/{infer-owner → foreground-child}/LICENSE +1 -1
  94. package/dist/node_modules/foreground-child/dist/commonjs/all-signals.d.ts.map +1 -0
  95. package/dist/node_modules/foreground-child/dist/commonjs/all-signals.js +58 -0
  96. package/dist/node_modules/foreground-child/dist/commonjs/all-signals.js.map +1 -0
  97. package/dist/node_modules/foreground-child/dist/commonjs/index.d.ts.map +1 -0
  98. package/dist/node_modules/foreground-child/dist/commonjs/index.js +121 -0
  99. package/dist/node_modules/foreground-child/dist/commonjs/index.js.map +1 -0
  100. package/dist/node_modules/foreground-child/dist/commonjs/package.json +3 -0
  101. package/dist/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts.map +1 -0
  102. package/dist/node_modules/foreground-child/dist/commonjs/proxy-signals.js +38 -0
  103. package/dist/node_modules/foreground-child/dist/commonjs/proxy-signals.js.map +1 -0
  104. package/dist/node_modules/foreground-child/dist/commonjs/watchdog.d.ts.map +1 -0
  105. package/dist/node_modules/foreground-child/dist/commonjs/watchdog.js +50 -0
  106. package/dist/node_modules/foreground-child/dist/commonjs/watchdog.js.map +1 -0
  107. package/dist/node_modules/foreground-child/dist/esm/all-signals.d.ts.map +1 -0
  108. package/dist/node_modules/foreground-child/dist/esm/all-signals.js +52 -0
  109. package/dist/node_modules/foreground-child/dist/esm/all-signals.js.map +1 -0
  110. package/dist/node_modules/foreground-child/dist/esm/index.d.ts.map +1 -0
  111. package/dist/node_modules/foreground-child/dist/esm/index.js +113 -0
  112. package/dist/node_modules/foreground-child/dist/esm/index.js.map +1 -0
  113. package/dist/node_modules/foreground-child/dist/esm/package.json +3 -0
  114. package/dist/node_modules/foreground-child/dist/esm/proxy-signals.d.ts.map +1 -0
  115. package/dist/node_modules/foreground-child/dist/esm/proxy-signals.js +34 -0
  116. package/dist/node_modules/foreground-child/dist/esm/proxy-signals.js.map +1 -0
  117. package/dist/node_modules/foreground-child/dist/esm/watchdog.d.ts.map +1 -0
  118. package/dist/node_modules/foreground-child/dist/esm/watchdog.js +46 -0
  119. package/dist/node_modules/foreground-child/dist/esm/watchdog.js.map +1 -0
  120. package/dist/node_modules/foreground-child/package.json +111 -0
  121. package/dist/node_modules/{cacache/node_modules/minimatch → fs-minipass/node_modules/minipass}/LICENSE +1 -1
  122. package/dist/node_modules/fs-minipass/node_modules/minipass/package.json +56 -0
  123. package/dist/node_modules/glob/LICENSE +1 -7
  124. package/dist/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
  125. package/dist/node_modules/glob/dist/commonjs/glob.js +247 -0
  126. package/dist/node_modules/glob/dist/commonjs/glob.js.map +1 -0
  127. package/dist/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
  128. package/dist/node_modules/glob/dist/commonjs/has-magic.js +27 -0
  129. package/dist/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
  130. package/dist/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
  131. package/dist/node_modules/glob/dist/commonjs/ignore.js +119 -0
  132. package/dist/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
  133. package/dist/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
  134. package/dist/node_modules/glob/dist/commonjs/index.js +68 -0
  135. package/dist/node_modules/glob/dist/commonjs/index.js.map +1 -0
  136. package/dist/node_modules/glob/dist/commonjs/package.json +3 -0
  137. package/dist/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
  138. package/dist/node_modules/glob/dist/commonjs/pattern.js +219 -0
  139. package/dist/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
  140. package/dist/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
  141. package/dist/node_modules/glob/dist/commonjs/processor.js +301 -0
  142. package/dist/node_modules/glob/dist/commonjs/processor.js.map +1 -0
  143. package/dist/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
  144. package/dist/node_modules/glob/dist/commonjs/walker.js +387 -0
  145. package/dist/node_modules/glob/dist/commonjs/walker.js.map +1 -0
  146. package/dist/node_modules/glob/dist/esm/bin.d.mts +3 -0
  147. package/dist/node_modules/glob/dist/esm/bin.d.mts.map +1 -0
  148. package/dist/node_modules/glob/dist/esm/bin.mjs +270 -0
  149. package/dist/node_modules/glob/dist/esm/bin.mjs.map +1 -0
  150. package/dist/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
  151. package/dist/node_modules/glob/dist/esm/glob.js +243 -0
  152. package/dist/node_modules/glob/dist/esm/glob.js.map +1 -0
  153. package/dist/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
  154. package/dist/node_modules/glob/dist/esm/has-magic.js +23 -0
  155. package/dist/node_modules/glob/dist/esm/has-magic.js.map +1 -0
  156. package/dist/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
  157. package/dist/node_modules/glob/dist/esm/ignore.js +115 -0
  158. package/dist/node_modules/glob/dist/esm/ignore.js.map +1 -0
  159. package/dist/node_modules/glob/dist/esm/index.d.ts.map +1 -0
  160. package/dist/node_modules/glob/dist/esm/index.js +55 -0
  161. package/dist/node_modules/glob/dist/esm/index.js.map +1 -0
  162. package/dist/node_modules/glob/dist/esm/package.json +3 -0
  163. package/dist/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
  164. package/dist/node_modules/glob/dist/esm/pattern.js +215 -0
  165. package/dist/node_modules/glob/dist/esm/pattern.js.map +1 -0
  166. package/dist/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
  167. package/dist/node_modules/glob/dist/esm/processor.js +294 -0
  168. package/dist/node_modules/glob/dist/esm/processor.js.map +1 -0
  169. package/dist/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
  170. package/dist/node_modules/glob/dist/esm/walker.js +381 -0
  171. package/dist/node_modules/glob/dist/esm/walker.js.map +1 -0
  172. package/dist/node_modules/glob/package.json +79 -35
  173. package/dist/node_modules/{agentkeepalive → http-proxy-agent}/LICENSE +2 -3
  174. package/dist/node_modules/http-proxy-agent/dist/index.d.ts.map +1 -0
  175. package/dist/node_modules/http-proxy-agent/dist/index.js +142 -8
  176. package/dist/node_modules/http-proxy-agent/dist/index.js.map +1 -1
  177. package/dist/node_modules/http-proxy-agent/package.json +22 -32
  178. package/dist/node_modules/https-proxy-agent/LICENSE +22 -0
  179. package/dist/node_modules/https-proxy-agent/dist/index.d.ts.map +1 -0
  180. package/dist/node_modules/https-proxy-agent/dist/index.js +169 -8
  181. package/dist/node_modules/https-proxy-agent/dist/index.js.map +1 -1
  182. package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +1 -0
  183. package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.js +47 -12
  184. package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -1
  185. package/dist/node_modules/https-proxy-agent/package.json +25 -31
  186. package/dist/node_modules/jackspeak/dist/commonjs/index.d.ts.map +1 -0
  187. package/dist/node_modules/jackspeak/dist/commonjs/index.js +1010 -0
  188. package/dist/node_modules/jackspeak/dist/commonjs/index.js.map +1 -0
  189. package/dist/node_modules/jackspeak/dist/commonjs/package.json +3 -0
  190. package/dist/node_modules/jackspeak/dist/commonjs/parse-args-cjs.cjs.map +1 -0
  191. package/dist/node_modules/jackspeak/dist/commonjs/parse-args-cjs.d.cts.map +1 -0
  192. package/dist/node_modules/jackspeak/dist/commonjs/parse-args.js +50 -0
  193. package/dist/node_modules/jackspeak/dist/esm/index.d.ts.map +1 -0
  194. package/dist/node_modules/jackspeak/dist/esm/index.js +1000 -0
  195. package/dist/node_modules/jackspeak/dist/esm/index.js.map +1 -0
  196. package/dist/node_modules/jackspeak/dist/esm/package.json +3 -0
  197. package/dist/node_modules/jackspeak/dist/esm/parse-args.d.ts.map +1 -0
  198. package/dist/node_modules/jackspeak/dist/esm/parse-args.js +26 -0
  199. package/dist/node_modules/jackspeak/dist/esm/parse-args.js.map +1 -0
  200. package/dist/node_modules/jackspeak/package.json +95 -0
  201. package/dist/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
  202. package/dist/node_modules/lru-cache/dist/commonjs/index.js +1546 -0
  203. package/dist/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
  204. package/dist/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
  205. package/dist/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
  206. package/dist/node_modules/lru-cache/dist/commonjs/package.json +3 -0
  207. package/dist/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
  208. package/dist/node_modules/lru-cache/dist/esm/index.js +1542 -0
  209. package/dist/node_modules/lru-cache/dist/esm/index.js.map +1 -0
  210. package/dist/node_modules/lru-cache/dist/esm/index.min.js +2 -0
  211. package/dist/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
  212. package/dist/node_modules/lru-cache/dist/esm/package.json +3 -0
  213. package/dist/node_modules/lru-cache/package.json +66 -46
  214. package/dist/node_modules/make-fetch-happen/lib/cache/entry.js +28 -1
  215. package/dist/node_modules/make-fetch-happen/lib/options.js +2 -0
  216. package/dist/node_modules/make-fetch-happen/lib/remote.js +13 -3
  217. package/dist/node_modules/make-fetch-happen/package.json +19 -23
  218. package/dist/node_modules/minimatch/LICENSE +1 -1
  219. package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
  220. package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  221. package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
  222. package/dist/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
  223. package/dist/node_modules/minimatch/dist/commonjs/ast.js +592 -0
  224. package/dist/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
  225. package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
  226. package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
  227. package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
  228. package/dist/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
  229. package/dist/node_modules/minimatch/dist/commonjs/escape.js +22 -0
  230. package/dist/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
  231. package/dist/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
  232. package/dist/node_modules/minimatch/dist/commonjs/index.js +1017 -0
  233. package/dist/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
  234. package/dist/node_modules/minimatch/dist/commonjs/package.json +3 -0
  235. package/dist/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
  236. package/dist/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
  237. package/dist/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
  238. package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
  239. package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  240. package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  241. package/dist/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
  242. package/dist/node_modules/minimatch/dist/esm/ast.js +588 -0
  243. package/dist/node_modules/minimatch/dist/esm/ast.js.map +1 -0
  244. package/dist/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
  245. package/dist/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
  246. package/dist/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
  247. package/dist/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
  248. package/dist/node_modules/minimatch/dist/esm/escape.js +18 -0
  249. package/dist/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  250. package/dist/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
  251. package/dist/node_modules/minimatch/dist/esm/index.js +1001 -0
  252. package/dist/node_modules/minimatch/dist/esm/index.js.map +1 -0
  253. package/dist/node_modules/minimatch/dist/esm/package.json +3 -0
  254. package/dist/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
  255. package/dist/node_modules/minimatch/dist/esm/unescape.js +20 -0
  256. package/dist/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  257. package/dist/node_modules/minimatch/package.json +62 -13
  258. package/dist/node_modules/minipass/LICENSE +1 -1
  259. package/dist/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  260. package/dist/node_modules/minipass/dist/commonjs/index.js +1028 -0
  261. package/dist/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  262. package/dist/node_modules/minipass/dist/commonjs/package.json +3 -0
  263. package/dist/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  264. package/dist/node_modules/minipass/dist/esm/index.js +1018 -0
  265. package/dist/node_modules/minipass/dist/esm/index.js.map +1 -0
  266. package/dist/node_modules/minipass/dist/esm/package.json +3 -0
  267. package/dist/node_modules/minipass/package.json +62 -36
  268. package/dist/node_modules/minipass-collect/LICENSE +1 -1
  269. package/dist/node_modules/minipass-collect/index.js +1 -1
  270. package/dist/node_modules/minipass-collect/package.json +7 -6
  271. package/dist/node_modules/minipass-fetch/lib/blob.js +1 -1
  272. package/dist/node_modules/minipass-fetch/lib/body.js +2 -2
  273. package/dist/node_modules/minipass-fetch/lib/index.js +16 -4
  274. package/dist/node_modules/minipass-fetch/lib/request.js +2 -1
  275. package/dist/node_modules/minipass-fetch/package.json +15 -13
  276. package/dist/node_modules/minipass-flush/node_modules/minipass/LICENSE +15 -0
  277. package/dist/node_modules/minipass-flush/node_modules/minipass/index.js +649 -0
  278. package/dist/node_modules/minipass-flush/node_modules/minipass/package.json +56 -0
  279. package/dist/node_modules/minipass-pipeline/node_modules/minipass/LICENSE +15 -0
  280. package/dist/node_modules/minipass-pipeline/node_modules/minipass/index.js +649 -0
  281. package/dist/node_modules/minipass-pipeline/node_modules/minipass/package.json +56 -0
  282. package/dist/node_modules/minipass-sized/node_modules/minipass/LICENSE +15 -0
  283. package/dist/node_modules/minipass-sized/node_modules/minipass/index.js +649 -0
  284. package/dist/node_modules/minipass-sized/node_modules/minipass/package.json +56 -0
  285. package/dist/node_modules/minizlib/node_modules/minipass/LICENSE +15 -0
  286. package/dist/node_modules/minizlib/node_modules/minipass/index.js +649 -0
  287. package/dist/node_modules/minizlib/node_modules/minipass/package.json +56 -0
  288. package/dist/node_modules/ms/index.js +1 -1
  289. package/dist/node_modules/ms/package.json +4 -5
  290. package/dist/node_modules/node-gyp/.release-please-manifest.json +3 -0
  291. package/dist/node_modules/node-gyp/bin/node-gyp.js +27 -29
  292. package/dist/node_modules/node-gyp/gyp/.release-please-manifest.json +3 -0
  293. package/dist/node_modules/node-gyp/gyp/data/ninja/build.ninja +4 -0
  294. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +12 -14
  295. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +1 -1
  296. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +3 -1
  297. package/dist/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +4 -2
  298. package/dist/node_modules/node-gyp/gyp/pylib/gyp/common.py +67 -17
  299. package/dist/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +98 -5
  300. package/dist/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +5 -1
  301. package/dist/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +4 -0
  302. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +11 -15
  303. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +4 -4
  304. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +3 -6
  305. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +10 -3
  306. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +1 -4
  307. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +3 -4
  308. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +62 -31
  309. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +47 -52
  310. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +33 -5
  311. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +12 -0
  312. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +2 -5
  313. package/dist/node_modules/node-gyp/gyp/pylib/gyp/input.py +27 -42
  314. package/dist/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +12 -23
  315. package/dist/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +4 -5
  316. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +20 -21
  317. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +53 -0
  318. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +21 -20
  319. package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE +3 -0
  320. package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE +177 -0
  321. package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD +23 -0
  322. package/dist/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +15 -0
  323. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +108 -0
  324. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +252 -0
  325. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +83 -0
  326. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +359 -0
  327. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +61 -0
  328. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +192 -0
  329. package/dist/node_modules/node-gyp/gyp/pylib/packaging/markers.py +252 -0
  330. package/dist/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +825 -0
  331. package/dist/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
  332. package/dist/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +90 -0
  333. package/dist/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +1030 -0
  334. package/dist/node_modules/node-gyp/gyp/pylib/packaging/tags.py +553 -0
  335. package/dist/node_modules/node-gyp/gyp/pylib/packaging/utils.py +172 -0
  336. package/dist/node_modules/node-gyp/gyp/pylib/packaging/version.py +563 -0
  337. package/dist/node_modules/node-gyp/gyp/pyproject.toml +84 -5
  338. package/dist/node_modules/node-gyp/gyp/release-please-config.json +11 -0
  339. package/dist/node_modules/node-gyp/lib/build.js +110 -96
  340. package/dist/node_modules/node-gyp/lib/clean.js +5 -5
  341. package/dist/node_modules/node-gyp/lib/configure.js +172 -204
  342. package/dist/node_modules/node-gyp/lib/create-config-gypi.js +14 -11
  343. package/dist/node_modules/node-gyp/lib/download.js +39 -0
  344. package/dist/node_modules/node-gyp/lib/find-node-directory.js +5 -5
  345. package/dist/node_modules/node-gyp/lib/find-python.js +128 -162
  346. package/dist/node_modules/node-gyp/lib/find-visualstudio.js +260 -133
  347. package/dist/node_modules/node-gyp/lib/install.js +27 -70
  348. package/dist/node_modules/node-gyp/lib/list.js +14 -15
  349. package/dist/node_modules/node-gyp/lib/log.js +168 -0
  350. package/dist/node_modules/node-gyp/lib/node-gyp.js +147 -174
  351. package/dist/node_modules/node-gyp/lib/process-release.js +22 -23
  352. package/dist/node_modules/node-gyp/lib/rebuild.js +1 -2
  353. package/dist/node_modules/node-gyp/lib/remove.js +18 -21
  354. package/dist/node_modules/node-gyp/lib/util.js +62 -45
  355. package/dist/node_modules/{cacache/node_modules/glob → node-gyp/node_modules/isexe}/LICENSE +1 -1
  356. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/index.d.ts.map +1 -0
  357. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/index.js +46 -0
  358. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/index.js.map +1 -0
  359. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/options.d.ts.map +1 -0
  360. package/dist/node_modules/{@tootallnate/once/dist/types.js → node-gyp/node_modules/isexe/dist/cjs/options.js} +1 -1
  361. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/options.js.map +1 -0
  362. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/package.json +3 -0
  363. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/posix.d.ts.map +1 -0
  364. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/posix.js +67 -0
  365. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/posix.js.map +1 -0
  366. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/win32.d.ts.map +1 -0
  367. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/win32.js +62 -0
  368. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/win32.js.map +1 -0
  369. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/index.d.ts.map +1 -0
  370. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/index.js +16 -0
  371. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/index.js.map +1 -0
  372. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/options.d.ts.map +1 -0
  373. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/options.js +2 -0
  374. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/options.js.map +1 -0
  375. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/package.json +3 -0
  376. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/posix.d.ts.map +1 -0
  377. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/posix.js +62 -0
  378. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/posix.js.map +1 -0
  379. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/win32.d.ts.map +1 -0
  380. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/win32.js +57 -0
  381. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/win32.js.map +1 -0
  382. package/dist/node_modules/node-gyp/node_modules/isexe/package.json +96 -0
  383. package/dist/node_modules/node-gyp/node_modules/which/bin/which.js +52 -0
  384. package/dist/node_modules/node-gyp/node_modules/which/lib/index.js +111 -0
  385. package/dist/node_modules/node-gyp/node_modules/which/package.json +57 -0
  386. package/dist/node_modules/node-gyp/package.json +12 -12
  387. package/dist/node_modules/node-gyp/release-please-config.json +40 -0
  388. package/dist/node_modules/nopt/bin/nopt.js +7 -34
  389. package/dist/node_modules/nopt/lib/debug.js +5 -0
  390. package/dist/node_modules/nopt/lib/nopt-lib.js +479 -0
  391. package/dist/node_modules/nopt/lib/nopt.js +21 -506
  392. package/dist/node_modules/nopt/lib/type-defs.js +91 -0
  393. package/dist/node_modules/nopt/package.json +13 -15
  394. package/dist/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map +1 -0
  395. package/dist/node_modules/package-json-from-dist/dist/commonjs/index.js +124 -0
  396. package/dist/node_modules/package-json-from-dist/dist/commonjs/index.js.map +1 -0
  397. package/dist/node_modules/package-json-from-dist/dist/commonjs/package.json +3 -0
  398. package/dist/node_modules/package-json-from-dist/dist/esm/index.d.ts.map +1 -0
  399. package/dist/node_modules/package-json-from-dist/dist/esm/index.js +119 -0
  400. package/dist/node_modules/package-json-from-dist/dist/esm/index.js.map +1 -0
  401. package/dist/node_modules/package-json-from-dist/dist/esm/package.json +3 -0
  402. package/dist/node_modules/package-json-from-dist/package.json +68 -0
  403. package/dist/node_modules/path-key/index.js +16 -0
  404. package/dist/node_modules/path-key/license +9 -0
  405. package/dist/node_modules/path-key/package.json +39 -0
  406. package/dist/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
  407. package/dist/node_modules/path-scurry/dist/commonjs/index.js +2014 -0
  408. package/dist/node_modules/path-scurry/dist/commonjs/index.js.map +1 -0
  409. package/dist/node_modules/path-scurry/dist/commonjs/package.json +3 -0
  410. package/dist/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
  411. package/dist/node_modules/path-scurry/dist/esm/index.js +1979 -0
  412. package/dist/node_modules/path-scurry/dist/esm/index.js.map +1 -0
  413. package/dist/node_modules/path-scurry/dist/esm/package.json +3 -0
  414. package/dist/node_modules/path-scurry/package.json +89 -0
  415. package/dist/node_modules/{inflight → proc-log}/LICENSE +1 -1
  416. package/dist/node_modules/proc-log/lib/index.js +153 -0
  417. package/dist/node_modules/proc-log/package.json +45 -0
  418. package/dist/node_modules/semver/bin/semver.js +5 -14
  419. package/dist/node_modules/semver/classes/range.js +4 -3
  420. package/dist/node_modules/semver/classes/semver.js +1 -1
  421. package/dist/node_modules/semver/functions/coerce.js +13 -5
  422. package/dist/node_modules/semver/internal/lrucache.js +40 -0
  423. package/dist/node_modules/semver/internal/re.js +7 -2
  424. package/dist/node_modules/semver/package.json +8 -18
  425. package/dist/node_modules/shebang-command/index.js +19 -0
  426. package/dist/node_modules/shebang-command/license +9 -0
  427. package/dist/node_modules/shebang-command/package.json +34 -0
  428. package/dist/node_modules/shebang-regex/index.js +2 -0
  429. package/dist/node_modules/shebang-regex/license +9 -0
  430. package/dist/node_modules/shebang-regex/package.json +35 -0
  431. package/dist/node_modules/signal-exit/LICENSE.txt +1 -1
  432. package/dist/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
  433. package/dist/node_modules/signal-exit/dist/cjs/browser.js +10 -0
  434. package/dist/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
  435. package/dist/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
  436. package/dist/node_modules/signal-exit/dist/cjs/index.js +279 -0
  437. package/dist/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
  438. package/dist/node_modules/signal-exit/dist/cjs/package.json +3 -0
  439. package/dist/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
  440. package/dist/node_modules/signal-exit/dist/cjs/signals.js +42 -0
  441. package/dist/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
  442. package/dist/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
  443. package/dist/node_modules/signal-exit/dist/mjs/browser.js +4 -0
  444. package/dist/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
  445. package/dist/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
  446. package/dist/node_modules/signal-exit/dist/mjs/index.js +275 -0
  447. package/dist/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
  448. package/dist/node_modules/signal-exit/dist/mjs/package.json +3 -0
  449. package/dist/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
  450. package/dist/node_modules/signal-exit/dist/mjs/signals.js +39 -0
  451. package/dist/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
  452. package/dist/node_modules/signal-exit/package.json +87 -19
  453. package/dist/node_modules/socks/build/common/helpers.js +5 -1
  454. package/dist/node_modules/socks/build/common/helpers.js.map +1 -1
  455. package/dist/node_modules/socks/package.json +1 -1
  456. package/dist/node_modules/socks-proxy-agent/LICENSE +22 -0
  457. package/dist/node_modules/socks-proxy-agent/dist/index.d.ts.map +1 -0
  458. package/dist/node_modules/socks-proxy-agent/dist/index.js +134 -146
  459. package/dist/node_modules/socks-proxy-agent/dist/index.js.map +1 -1
  460. package/dist/node_modules/socks-proxy-agent/package.json +33 -72
  461. package/dist/node_modules/ssri/lib/index.js +158 -102
  462. package/dist/node_modules/ssri/package.json +14 -12
  463. package/dist/node_modules/string-width/index.js +26 -19
  464. package/dist/node_modules/string-width/license +1 -1
  465. package/dist/node_modules/string-width/package.json +12 -9
  466. package/dist/node_modules/string-width-cjs/index.js +47 -0
  467. package/dist/node_modules/string-width-cjs/license +9 -0
  468. package/dist/node_modules/string-width-cjs/node_modules/ansi-regex/index.js +10 -0
  469. package/dist/node_modules/string-width-cjs/node_modules/ansi-regex/license +9 -0
  470. package/dist/node_modules/string-width-cjs/node_modules/ansi-regex/package.json +55 -0
  471. package/dist/node_modules/{delegates/License → string-width-cjs/node_modules/emoji-regex/LICENSE-MIT.txt} +1 -1
  472. package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/index.js +6 -0
  473. package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/text.js +6 -0
  474. package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/index.js +6 -0
  475. package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/package.json +50 -0
  476. package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/text.js +6 -0
  477. package/dist/node_modules/string-width-cjs/node_modules/strip-ansi/index.js +4 -0
  478. package/dist/node_modules/string-width-cjs/node_modules/strip-ansi/license +9 -0
  479. package/dist/node_modules/string-width-cjs/node_modules/strip-ansi/package.json +54 -0
  480. package/dist/node_modules/string-width-cjs/package.json +56 -0
  481. package/dist/node_modules/strip-ansi/index.js +13 -3
  482. package/dist/node_modules/strip-ansi/license +1 -1
  483. package/dist/node_modules/strip-ansi/package.json +10 -7
  484. package/dist/node_modules/strip-ansi-cjs/index.js +4 -0
  485. package/dist/node_modules/strip-ansi-cjs/license +9 -0
  486. package/dist/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js +10 -0
  487. package/dist/node_modules/strip-ansi-cjs/node_modules/ansi-regex/license +9 -0
  488. package/dist/node_modules/strip-ansi-cjs/node_modules/ansi-regex/package.json +55 -0
  489. package/dist/node_modules/strip-ansi-cjs/package.json +54 -0
  490. package/dist/node_modules/unique-filename/package.json +12 -9
  491. package/dist/node_modules/unique-slug/package.json +10 -7
  492. package/dist/node_modules/wrap-ansi/index.js +214 -0
  493. package/dist/node_modules/wrap-ansi/license +9 -0
  494. package/dist/node_modules/wrap-ansi/package.json +69 -0
  495. package/dist/node_modules/wrap-ansi-cjs/index.js +216 -0
  496. package/dist/node_modules/wrap-ansi-cjs/license +9 -0
  497. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js +10 -0
  498. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/license +9 -0
  499. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/package.json +55 -0
  500. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js +163 -0
  501. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/license +9 -0
  502. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/package.json +56 -0
  503. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  504. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/index.js +6 -0
  505. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/text.js +6 -0
  506. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.js +6 -0
  507. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/package.json +50 -0
  508. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/text.js +6 -0
  509. package/dist/node_modules/wrap-ansi-cjs/node_modules/string-width/index.js +47 -0
  510. package/dist/node_modules/wrap-ansi-cjs/node_modules/string-width/license +9 -0
  511. package/dist/node_modules/wrap-ansi-cjs/node_modules/string-width/package.json +56 -0
  512. package/dist/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js +4 -0
  513. package/dist/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/license +9 -0
  514. package/dist/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/package.json +54 -0
  515. package/dist/node_modules/wrap-ansi-cjs/package.json +62 -0
  516. package/dist/pnpm.cjs +161888 -155937
  517. package/dist/pnpmrc +0 -7
  518. package/dist/{scripts/bash.sh → templates/completion.bash} +2 -1
  519. package/dist/{scripts/fish.sh → templates/completion.fish} +1 -1
  520. package/dist/templates/completion.ps1 +193 -0
  521. package/dist/templates/completion.zsh +27 -0
  522. package/dist/worker.js +5462 -9749
  523. package/package.json +140 -6
  524. package/dist/node_modules/@gar/promisify/index.js +0 -36
  525. package/dist/node_modules/@gar/promisify/package.json +0 -32
  526. package/dist/node_modules/@npmcli/fs/lib/common/owner-sync.js +0 -96
  527. package/dist/node_modules/@npmcli/fs/lib/common/owner.js +0 -96
  528. package/dist/node_modules/@npmcli/fs/lib/copy-file.js +0 -16
  529. package/dist/node_modules/@npmcli/fs/lib/fs.js +0 -14
  530. package/dist/node_modules/@npmcli/fs/lib/mkdir.js +0 -19
  531. package/dist/node_modules/@npmcli/fs/lib/mkdtemp.js +0 -23
  532. package/dist/node_modules/@npmcli/fs/lib/rm/index.js +0 -22
  533. package/dist/node_modules/@npmcli/fs/lib/rm/polyfill.js +0 -239
  534. package/dist/node_modules/@npmcli/fs/lib/with-owner-sync.js +0 -21
  535. package/dist/node_modules/@npmcli/fs/lib/with-owner.js +0 -21
  536. package/dist/node_modules/@npmcli/fs/lib/write-file.js +0 -14
  537. package/dist/node_modules/@npmcli/move-file/lib/index.js +0 -185
  538. package/dist/node_modules/@npmcli/move-file/package.json +0 -47
  539. package/dist/node_modules/@tootallnate/once/LICENSE +0 -21
  540. package/dist/node_modules/@tootallnate/once/dist/index.js +0 -24
  541. package/dist/node_modules/@tootallnate/once/dist/index.js.map +0 -1
  542. package/dist/node_modules/@tootallnate/once/dist/overloaded-parameters.js +0 -3
  543. package/dist/node_modules/@tootallnate/once/dist/overloaded-parameters.js.map +0 -1
  544. package/dist/node_modules/@tootallnate/once/dist/types.js.map +0 -1
  545. package/dist/node_modules/@tootallnate/once/package.json +0 -52
  546. package/dist/node_modules/abbrev/abbrev.js +0 -61
  547. package/dist/node_modules/agent-base/dist/src/index.js +0 -203
  548. package/dist/node_modules/agent-base/dist/src/index.js.map +0 -1
  549. package/dist/node_modules/agent-base/dist/src/promisify.js +0 -18
  550. package/dist/node_modules/agent-base/dist/src/promisify.js.map +0 -1
  551. package/dist/node_modules/agentkeepalive/browser.js +0 -5
  552. package/dist/node_modules/agentkeepalive/index.js +0 -5
  553. package/dist/node_modules/agentkeepalive/lib/agent.js +0 -402
  554. package/dist/node_modules/agentkeepalive/lib/constants.js +0 -14
  555. package/dist/node_modules/agentkeepalive/lib/https_agent.js +0 -51
  556. package/dist/node_modules/agentkeepalive/package.json +0 -56
  557. package/dist/node_modules/aproba/LICENSE +0 -14
  558. package/dist/node_modules/aproba/index.js +0 -105
  559. package/dist/node_modules/aproba/package.json +0 -35
  560. package/dist/node_modules/are-we-there-yet/lib/index.js +0 -4
  561. package/dist/node_modules/are-we-there-yet/lib/tracker-base.js +0 -11
  562. package/dist/node_modules/are-we-there-yet/lib/tracker-group.js +0 -116
  563. package/dist/node_modules/are-we-there-yet/lib/tracker-stream.js +0 -36
  564. package/dist/node_modules/are-we-there-yet/lib/tracker.js +0 -32
  565. package/dist/node_modules/are-we-there-yet/package.json +0 -56
  566. package/dist/node_modules/cacache/lib/util/fix-owner.js +0 -145
  567. package/dist/node_modules/cacache/lib/util/move-file.js +0 -56
  568. package/dist/node_modules/cacache/node_modules/brace-expansion/LICENSE +0 -21
  569. package/dist/node_modules/cacache/node_modules/brace-expansion/index.js +0 -203
  570. package/dist/node_modules/cacache/node_modules/brace-expansion/package.json +0 -46
  571. package/dist/node_modules/cacache/node_modules/glob/common.js +0 -244
  572. package/dist/node_modules/cacache/node_modules/glob/glob.js +0 -790
  573. package/dist/node_modules/cacache/node_modules/glob/package.json +0 -55
  574. package/dist/node_modules/cacache/node_modules/glob/sync.js +0 -486
  575. package/dist/node_modules/cacache/node_modules/minimatch/lib/path.js +0 -4
  576. package/dist/node_modules/cacache/node_modules/minimatch/minimatch.js +0 -944
  577. package/dist/node_modules/cacache/node_modules/minimatch/package.json +0 -35
  578. package/dist/node_modules/color-support/bin.js +0 -3
  579. package/dist/node_modules/color-support/browser.js +0 -14
  580. package/dist/node_modules/color-support/index.js +0 -134
  581. package/dist/node_modules/color-support/package.json +0 -36
  582. package/dist/node_modules/concat-map/LICENSE +0 -18
  583. package/dist/node_modules/concat-map/README.markdown +0 -62
  584. package/dist/node_modules/concat-map/index.js +0 -13
  585. package/dist/node_modules/concat-map/package.json +0 -43
  586. package/dist/node_modules/console-control-strings/LICENSE +0 -13
  587. package/dist/node_modules/console-control-strings/README.md~ +0 -140
  588. package/dist/node_modules/console-control-strings/index.js +0 -125
  589. package/dist/node_modules/console-control-strings/package.json +0 -27
  590. package/dist/node_modules/debug/node_modules/ms/index.js +0 -162
  591. package/dist/node_modules/debug/node_modules/ms/package.json +0 -37
  592. package/dist/node_modules/delegates/index.js +0 -121
  593. package/dist/node_modules/delegates/package.json +0 -13
  594. package/dist/node_modules/fs.realpath/LICENSE +0 -43
  595. package/dist/node_modules/fs.realpath/index.js +0 -66
  596. package/dist/node_modules/fs.realpath/old.js +0 -303
  597. package/dist/node_modules/fs.realpath/package.json +0 -26
  598. package/dist/node_modules/gauge/lib/base-theme.js +0 -18
  599. package/dist/node_modules/gauge/lib/error.js +0 -24
  600. package/dist/node_modules/gauge/lib/has-color.js +0 -4
  601. package/dist/node_modules/gauge/lib/index.js +0 -289
  602. package/dist/node_modules/gauge/lib/plumbing.js +0 -50
  603. package/dist/node_modules/gauge/lib/process.js +0 -3
  604. package/dist/node_modules/gauge/lib/progress-bar.js +0 -41
  605. package/dist/node_modules/gauge/lib/render-template.js +0 -222
  606. package/dist/node_modules/gauge/lib/set-immediate.js +0 -7
  607. package/dist/node_modules/gauge/lib/set-interval.js +0 -3
  608. package/dist/node_modules/gauge/lib/spin.js +0 -5
  609. package/dist/node_modules/gauge/lib/template-item.js +0 -87
  610. package/dist/node_modules/gauge/lib/theme-set.js +0 -122
  611. package/dist/node_modules/gauge/lib/themes.js +0 -56
  612. package/dist/node_modules/gauge/lib/wide-truncate.js +0 -31
  613. package/dist/node_modules/gauge/package.json +0 -66
  614. package/dist/node_modules/glob/common.js +0 -238
  615. package/dist/node_modules/glob/glob.js +0 -790
  616. package/dist/node_modules/glob/sync.js +0 -486
  617. package/dist/node_modules/has-unicode/LICENSE +0 -14
  618. package/dist/node_modules/has-unicode/index.js +0 -16
  619. package/dist/node_modules/has-unicode/package.json +0 -30
  620. package/dist/node_modules/http-proxy-agent/dist/agent.js +0 -145
  621. package/dist/node_modules/http-proxy-agent/dist/agent.js.map +0 -1
  622. package/dist/node_modules/https-proxy-agent/dist/agent.js +0 -177
  623. package/dist/node_modules/https-proxy-agent/dist/agent.js.map +0 -1
  624. package/dist/node_modules/humanize-ms/LICENSE +0 -17
  625. package/dist/node_modules/humanize-ms/index.js +0 -24
  626. package/dist/node_modules/humanize-ms/package.json +0 -37
  627. package/dist/node_modules/infer-owner/index.js +0 -71
  628. package/dist/node_modules/infer-owner/package.json +0 -26
  629. package/dist/node_modules/inflight/inflight.js +0 -54
  630. package/dist/node_modules/inflight/package.json +0 -29
  631. package/dist/node_modules/inherits/LICENSE +0 -16
  632. package/dist/node_modules/inherits/inherits.js +0 -9
  633. package/dist/node_modules/inherits/inherits_browser.js +0 -27
  634. package/dist/node_modules/inherits/package.json +0 -29
  635. package/dist/node_modules/lru-cache/index.js +0 -1227
  636. package/dist/node_modules/lru-cache/index.mjs +0 -1227
  637. package/dist/node_modules/make-fetch-happen/lib/agent.js +0 -214
  638. package/dist/node_modules/make-fetch-happen/lib/dns.js +0 -49
  639. package/dist/node_modules/minimatch/minimatch.js +0 -947
  640. package/dist/node_modules/node-gyp/.github/workflows/release-please-v9.yml +0 -57
  641. package/dist/node_modules/node-gyp/.github/workflows/release-please.yml +0 -56
  642. package/dist/node_modules/node-gyp/.github/workflows/tests.yml +0 -59
  643. package/dist/node_modules/node-gyp/.github/workflows/visual-studio.yml +0 -37
  644. package/dist/node_modules/node-gyp/gyp/.flake8 +0 -4
  645. package/dist/node_modules/node-gyp/gyp/.github/workflows/Python_tests.yml +0 -36
  646. package/dist/node_modules/node-gyp/gyp/.github/workflows/node-gyp.yml +0 -45
  647. package/dist/node_modules/node-gyp/gyp/.github/workflows/nodejs-windows.yml +0 -32
  648. package/dist/node_modules/node-gyp/gyp/.github/workflows/release-please.yml +0 -16
  649. package/dist/node_modules/node-gyp/gyp/tools/README +0 -15
  650. package/dist/node_modules/node-gyp/gyp/tools/Xcode/README +0 -5
  651. package/dist/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec +0 -27
  652. package/dist/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec +0 -226
  653. package/dist/node_modules/node-gyp/gyp/tools/emacs/README +0 -12
  654. package/dist/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el +0 -63
  655. package/dist/node_modules/node-gyp/gyp/tools/emacs/gyp.el +0 -275
  656. package/dist/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh +0 -7
  657. package/dist/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp +0 -1105
  658. package/dist/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified +0 -1107
  659. package/dist/node_modules/node-gyp/gyp/tools/graphviz.py +0 -102
  660. package/dist/node_modules/node-gyp/gyp/tools/pretty_gyp.py +0 -156
  661. package/dist/node_modules/node-gyp/gyp/tools/pretty_sln.py +0 -181
  662. package/dist/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +0 -339
  663. package/dist/node_modules/node-gyp/update-gyp.py +0 -64
  664. package/dist/node_modules/npmlog/lib/log.js +0 -404
  665. package/dist/node_modules/npmlog/package.json +0 -51
  666. package/dist/node_modules/once/once.js +0 -42
  667. package/dist/node_modules/once/package.json +0 -33
  668. package/dist/node_modules/path-is-absolute/index.js +0 -20
  669. package/dist/node_modules/path-is-absolute/license +0 -21
  670. package/dist/node_modules/path-is-absolute/package.json +0 -43
  671. package/dist/node_modules/promise-inflight/LICENSE +0 -14
  672. package/dist/node_modules/promise-inflight/inflight.js +0 -36
  673. package/dist/node_modules/promise-inflight/package.json +0 -24
  674. package/dist/node_modules/readable-stream/LICENSE +0 -47
  675. package/dist/node_modules/readable-stream/errors-browser.js +0 -127
  676. package/dist/node_modules/readable-stream/errors.js +0 -116
  677. package/dist/node_modules/readable-stream/experimentalWarning.js +0 -17
  678. package/dist/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
  679. package/dist/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
  680. package/dist/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
  681. package/dist/node_modules/readable-stream/lib/_stream_transform.js +0 -190
  682. package/dist/node_modules/readable-stream/lib/_stream_writable.js +0 -641
  683. package/dist/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
  684. package/dist/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
  685. package/dist/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
  686. package/dist/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
  687. package/dist/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
  688. package/dist/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
  689. package/dist/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
  690. package/dist/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
  691. package/dist/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
  692. package/dist/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
  693. package/dist/node_modules/readable-stream/package.json +0 -68
  694. package/dist/node_modules/readable-stream/readable-browser.js +0 -9
  695. package/dist/node_modules/readable-stream/readable.js +0 -16
  696. package/dist/node_modules/rimraf/LICENSE +0 -15
  697. package/dist/node_modules/rimraf/bin.js +0 -68
  698. package/dist/node_modules/rimraf/package.json +0 -32
  699. package/dist/node_modules/rimraf/rimraf.js +0 -360
  700. package/dist/node_modules/safe-buffer/index.js +0 -65
  701. package/dist/node_modules/safe-buffer/package.json +0 -51
  702. package/dist/node_modules/semver/node_modules/lru-cache/LICENSE +0 -15
  703. package/dist/node_modules/semver/node_modules/lru-cache/index.js +0 -334
  704. package/dist/node_modules/semver/node_modules/lru-cache/package.json +0 -34
  705. package/dist/node_modules/set-blocking/index.js +0 -7
  706. package/dist/node_modules/set-blocking/package.json +0 -42
  707. package/dist/node_modules/signal-exit/index.js +0 -202
  708. package/dist/node_modules/signal-exit/signals.js +0 -53
  709. package/dist/node_modules/string_decoder/LICENSE +0 -48
  710. package/dist/node_modules/string_decoder/lib/string_decoder.js +0 -296
  711. package/dist/node_modules/string_decoder/package.json +0 -34
  712. package/dist/node_modules/util-deprecate/LICENSE +0 -24
  713. package/dist/node_modules/util-deprecate/browser.js +0 -67
  714. package/dist/node_modules/util-deprecate/node.js +0 -6
  715. package/dist/node_modules/util-deprecate/package.json +0 -27
  716. package/dist/node_modules/wide-align/LICENSE +0 -14
  717. package/dist/node_modules/wide-align/align.js +0 -65
  718. package/dist/node_modules/wide-align/package.json +0 -33
  719. package/dist/node_modules/wrappy/LICENSE +0 -15
  720. package/dist/node_modules/wrappy/package.json +0 -29
  721. package/dist/node_modules/wrappy/wrappy.js +0 -33
  722. package/dist/scripts/zsh.sh +0 -18
  723. /package/dist/node_modules/@npmcli/fs/lib/{errors.js → cp/errors.js} +0 -0
  724. /package/dist/node_modules/{cacache/node_modules/brace-expansion → brace-expansion}/.github/FUNDING.yml +0 -0
  725. /package/dist/node_modules/{color-support → cacache/node_modules/fs-minipass}/LICENSE +0 -0
  726. /package/dist/node_modules/{minipass → fs-minipass/node_modules/minipass}/index.js +0 -0
  727. /package/dist/node_modules/{once → node-gyp/node_modules/which}/LICENSE +0 -0
@@ -0,0 +1,270 @@
1
+ #!/usr/bin/env node
2
+ import { foregroundChild } from 'foreground-child';
3
+ import { existsSync } from 'fs';
4
+ import { jack } from 'jackspeak';
5
+ import { loadPackageJson } from 'package-json-from-dist';
6
+ import { join } from 'path';
7
+ import { globStream } from './index.js';
8
+ const { version } = loadPackageJson(import.meta.url, '../package.json');
9
+ const j = jack({
10
+ usage: 'glob [options] [<pattern> [<pattern> ...]]',
11
+ })
12
+ .description(`
13
+ Glob v${version}
14
+
15
+ Expand the positional glob expression arguments into any matching file
16
+ system paths found.
17
+ `)
18
+ .opt({
19
+ cmd: {
20
+ short: 'c',
21
+ hint: 'command',
22
+ description: `Run the command provided, passing the glob expression
23
+ matches as arguments.`,
24
+ },
25
+ })
26
+ .opt({
27
+ default: {
28
+ short: 'p',
29
+ hint: 'pattern',
30
+ description: `If no positional arguments are provided, glob will use
31
+ this pattern`,
32
+ },
33
+ })
34
+ .flag({
35
+ all: {
36
+ short: 'A',
37
+ description: `By default, the glob cli command will not expand any
38
+ arguments that are an exact match to a file on disk.
39
+
40
+ This prevents double-expanding, in case the shell expands
41
+ an argument whose filename is a glob expression.
42
+
43
+ For example, if 'app/*.ts' would match 'app/[id].ts', then
44
+ on Windows powershell or cmd.exe, 'glob app/*.ts' will
45
+ expand to 'app/[id].ts', as expected. However, in posix
46
+ shells such as bash or zsh, the shell will first expand
47
+ 'app/*.ts' to a list of filenames. Then glob will look
48
+ for a file matching 'app/[id].ts' (ie, 'app/i.ts' or
49
+ 'app/d.ts'), which is unexpected.
50
+
51
+ Setting '--all' prevents this behavior, causing glob
52
+ to treat ALL patterns as glob expressions to be expanded,
53
+ even if they are an exact match to a file on disk.
54
+
55
+ When setting this option, be sure to enquote arguments
56
+ so that the shell will not expand them prior to passing
57
+ them to the glob command process.
58
+ `,
59
+ },
60
+ absolute: {
61
+ short: 'a',
62
+ description: 'Expand to absolute paths',
63
+ },
64
+ 'dot-relative': {
65
+ short: 'd',
66
+ description: `Prepend './' on relative matches`,
67
+ },
68
+ mark: {
69
+ short: 'm',
70
+ description: `Append a / on any directories matched`,
71
+ },
72
+ posix: {
73
+ short: 'x',
74
+ description: `Always resolve to posix style paths, using '/' as the
75
+ directory separator, even on Windows. Drive letter
76
+ absolute matches on Windows will be expanded to their
77
+ full resolved UNC maths, eg instead of 'C:\\foo\\bar',
78
+ it will expand to '//?/C:/foo/bar'.
79
+ `,
80
+ },
81
+ follow: {
82
+ short: 'f',
83
+ description: `Follow symlinked directories when expanding '**'`,
84
+ },
85
+ realpath: {
86
+ short: 'R',
87
+ description: `Call 'fs.realpath' on all of the results. In the case
88
+ of an entry that cannot be resolved, the entry is
89
+ omitted. This incurs a slight performance penalty, of
90
+ course, because of the added system calls.`,
91
+ },
92
+ stat: {
93
+ short: 's',
94
+ description: `Call 'fs.lstat' on all entries, whether required or not
95
+ to determine if it's a valid match.`,
96
+ },
97
+ 'match-base': {
98
+ short: 'b',
99
+ description: `Perform a basename-only match if the pattern does not
100
+ contain any slash characters. That is, '*.js' would be
101
+ treated as equivalent to '**/*.js', matching js files
102
+ in all directories.
103
+ `,
104
+ },
105
+ dot: {
106
+ description: `Allow patterns to match files/directories that start
107
+ with '.', even if the pattern does not start with '.'
108
+ `,
109
+ },
110
+ nobrace: {
111
+ description: 'Do not expand {...} patterns',
112
+ },
113
+ nocase: {
114
+ description: `Perform a case-insensitive match. This defaults to
115
+ 'true' on macOS and Windows platforms, and false on
116
+ all others.
117
+
118
+ Note: 'nocase' should only be explicitly set when it is
119
+ known that the filesystem's case sensitivity differs
120
+ from the platform default. If set 'true' on
121
+ case-insensitive file systems, then the walk may return
122
+ more or less results than expected.
123
+ `,
124
+ },
125
+ nodir: {
126
+ description: `Do not match directories, only files.
127
+
128
+ Note: to *only* match directories, append a '/' at the
129
+ end of the pattern.
130
+ `,
131
+ },
132
+ noext: {
133
+ description: `Do not expand extglob patterns, such as '+(a|b)'`,
134
+ },
135
+ noglobstar: {
136
+ description: `Do not expand '**' against multiple path portions.
137
+ Ie, treat it as a normal '*' instead.`,
138
+ },
139
+ 'windows-path-no-escape': {
140
+ description: `Use '\\' as a path separator *only*, and *never* as an
141
+ escape character. If set, all '\\' characters are
142
+ replaced with '/' in the pattern.`,
143
+ },
144
+ })
145
+ .num({
146
+ 'max-depth': {
147
+ short: 'D',
148
+ description: `Maximum depth to traverse from the current
149
+ working directory`,
150
+ },
151
+ })
152
+ .opt({
153
+ cwd: {
154
+ short: 'C',
155
+ description: 'Current working directory to execute/match in',
156
+ default: process.cwd(),
157
+ },
158
+ root: {
159
+ short: 'r',
160
+ description: `A string path resolved against the 'cwd', which is
161
+ used as the starting point for absolute patterns that
162
+ start with '/' (but not drive letters or UNC paths
163
+ on Windows).
164
+
165
+ Note that this *doesn't* necessarily limit the walk to
166
+ the 'root' directory, and doesn't affect the cwd
167
+ starting point for non-absolute patterns. A pattern
168
+ containing '..' will still be able to traverse out of
169
+ the root directory, if it is not an actual root directory
170
+ on the filesystem, and any non-absolute patterns will
171
+ still be matched in the 'cwd'.
172
+
173
+ To start absolute and non-absolute patterns in the same
174
+ path, you can use '--root=' to set it to the empty
175
+ string. However, be aware that on Windows systems, a
176
+ pattern like 'x:/*' or '//host/share/*' will *always*
177
+ start in the 'x:/' or '//host/share/' directory,
178
+ regardless of the --root setting.
179
+ `,
180
+ },
181
+ platform: {
182
+ description: `Defaults to the value of 'process.platform' if
183
+ available, or 'linux' if not. Setting --platform=win32
184
+ on non-Windows systems may cause strange behavior!`,
185
+ validOptions: [
186
+ 'aix',
187
+ 'android',
188
+ 'darwin',
189
+ 'freebsd',
190
+ 'haiku',
191
+ 'linux',
192
+ 'openbsd',
193
+ 'sunos',
194
+ 'win32',
195
+ 'cygwin',
196
+ 'netbsd',
197
+ ],
198
+ },
199
+ })
200
+ .optList({
201
+ ignore: {
202
+ short: 'i',
203
+ description: `Glob patterns to ignore`,
204
+ },
205
+ })
206
+ .flag({
207
+ debug: {
208
+ short: 'v',
209
+ description: `Output a huge amount of noisy debug information about
210
+ patterns as they are parsed and used to match files.`,
211
+ },
212
+ })
213
+ .flag({
214
+ help: {
215
+ short: 'h',
216
+ description: 'Show this usage information',
217
+ },
218
+ });
219
+ try {
220
+ const { positionals, values } = j.parse();
221
+ if (values.help) {
222
+ console.log(j.usage());
223
+ process.exit(0);
224
+ }
225
+ if (positionals.length === 0 && !values.default)
226
+ throw 'No patterns provided';
227
+ if (positionals.length === 0 && values.default)
228
+ positionals.push(values.default);
229
+ const patterns = values.all ? positionals : positionals.filter(p => !existsSync(p));
230
+ const matches = values.all ?
231
+ []
232
+ : positionals.filter(p => existsSync(p)).map(p => join(p));
233
+ const stream = globStream(patterns, {
234
+ absolute: values.absolute,
235
+ cwd: values.cwd,
236
+ dot: values.dot,
237
+ dotRelative: values['dot-relative'],
238
+ follow: values.follow,
239
+ ignore: values.ignore,
240
+ mark: values.mark,
241
+ matchBase: values['match-base'],
242
+ maxDepth: values['max-depth'],
243
+ nobrace: values.nobrace,
244
+ nocase: values.nocase,
245
+ nodir: values.nodir,
246
+ noext: values.noext,
247
+ noglobstar: values.noglobstar,
248
+ platform: values.platform,
249
+ realpath: values.realpath,
250
+ root: values.root,
251
+ stat: values.stat,
252
+ debug: values.debug,
253
+ posix: values.posix,
254
+ });
255
+ const cmd = values.cmd;
256
+ if (!cmd) {
257
+ matches.forEach(m => console.log(m));
258
+ stream.on('data', f => console.log(f));
259
+ }
260
+ else {
261
+ stream.on('data', f => matches.push(f));
262
+ stream.on('end', () => foregroundChild(cmd, matches, { shell: true }));
263
+ }
264
+ }
265
+ catch (e) {
266
+ console.error(j.usage());
267
+ console.error(e instanceof Error ? e.message : String(e));
268
+ process.exit(1);
269
+ }
270
+ //# sourceMappingURL=bin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.mjs","sourceRoot":"","sources":["../../src/bin.mts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,MAAM,EAAE,OAAO,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAA;AAEvE,MAAM,CAAC,GAAG,IAAI,CAAC;IACb,KAAK,EAAE,4CAA4C;CACpD,CAAC;KACC,WAAW,CACV;YACQ,OAAO;;;;GAIhB,CACA;KACA,GAAG,CAAC;IACH,GAAG,EAAE;QACH,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;0CACuB;KACrC;CACF,CAAC;KACD,GAAG,CAAC;IACH,OAAO,EAAE;QACP,KAAK,EAAE,GAAG;QACV,IA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AAC,GAAG,CAAA;IACtB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;QACvC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACxE,CAAC;AACH,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IACxB,OAAO,CAAC,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { foregroundChild } from 'foreground-child'\nimport { existsSync } from 'fs'\nimport { jack } from 'jackspeak'\nimport { loadPackageJson } from 'package-json-from-dist'\nimport { join } from 'path'\nimport { globStream } from './index.js'\n\nconst { version } = loadPackageJson(import.meta.url, '../package.json')\n\nconst j = jack({\n usage: 'glob [options] [<pattern> [<pattern> ...]]',\n})\n .description(\n `\n Glob v${version}\n\n Expand the positional glob expression arguments into any matching file\n system paths found.\n `,\n )\n .opt({\n cmd: {\n short: 'c',\n hint: 'command',\n description: `Run the command provided, passing the glob expression\n matches as arguments.`,\n },\n })\n .opt({\n default: {\n short: 'p',\n hint: 'pattern',\n description: `If no positional arguments are provided, glob will use\n this pattern`,\n },\n })\n .flag({\n all: {\n short: 'A',\n description: `By default, the glob cli command will not expand any\n arguments that are an exact match to a file on disk.\n\n This prevents double-expanding, in case the shell expands\n an argument whose filename is a glob expression.\n\n For example, if 'app/*.ts' would match 'app/[id].ts', then\n on Windows powershell or cmd.exe, 'glob app/*.ts' will\n expand to 'app/[id].ts', as expected. However, in posix\n shells such as bash or zsh, the shell will first expand\n 'app/*.ts' to a list of filenames. Then glob will look\n for a file matching 'app/[id].ts' (ie, 'app/i.ts' or\n 'app/d.ts'), which is unexpected.\n\n Setting '--all' prevents this behavior, causing glob\n to treat ALL patterns as glob expressions to be expanded,\n even if they are an exact match to a file on disk.\n\n When setting this option, be sure to enquote arguments\n so that the shell will not expand them prior to passing\n them to the glob command process.\n `,\n },\n absolute: {\n short: 'a',\n description: 'Expand to absolute paths',\n },\n 'dot-relative': {\n short: 'd',\n description: `Prepend './' on relative matches`,\n },\n mark: {\n short: 'm',\n description: `Append a / on any directories matched`,\n },\n posix: {\n short: 'x',\n description: `Always resolve to posix style paths, using '/' as the\n directory separator, even on Windows. Drive letter\n absolute matches on Windows will be expanded to their\n full resolved UNC maths, eg instead of 'C:\\\\foo\\\\bar',\n it will expand to '//?/C:/foo/bar'.\n `,\n },\n\n follow: {\n short: 'f',\n description: `Follow symlinked directories when expanding '**'`,\n },\n realpath: {\n short: 'R',\n description: `Call 'fs.realpath' on all of the results. In the case\n of an entry that cannot be resolved, the entry is\n omitted. This incurs a slight performance penalty, of\n course, because of the added system calls.`,\n },\n stat: {\n short: 's',\n description: `Call 'fs.lstat' on all entries, whether required or not\n to determine if it's a valid match.`,\n },\n 'match-base': {\n short: 'b',\n description: `Perform a basename-only match if the pattern does not\n contain any slash characters. That is, '*.js' would be\n treated as equivalent to '**/*.js', matching js files\n in all directories.\n `,\n },\n\n dot: {\n description: `Allow patterns to match files/directories that start\n with '.', even if the pattern does not start with '.'\n `,\n },\n nobrace: {\n description: 'Do not expand {...} patterns',\n },\n nocase: {\n description: `Perform a case-insensitive match. This defaults to\n 'true' on macOS and Windows platforms, and false on\n all others.\n\n Note: 'nocase' should only be explicitly set when it is\n known that the filesystem's case sensitivity differs\n from the platform default. If set 'true' on\n case-insensitive file systems, then the walk may return\n more or less results than expected.\n `,\n },\n nodir: {\n description: `Do not match directories, only files.\n\n Note: to *only* match directories, append a '/' at the\n end of the pattern.\n `,\n },\n noext: {\n description: `Do not expand extglob patterns, such as '+(a|b)'`,\n },\n noglobstar: {\n description: `Do not expand '**' against multiple path portions.\n Ie, treat it as a normal '*' instead.`,\n },\n 'windows-path-no-escape': {\n description: `Use '\\\\' as a path separator *only*, and *never* as an\n escape character. If set, all '\\\\' characters are\n replaced with '/' in the pattern.`,\n },\n })\n .num({\n 'max-depth': {\n short: 'D',\n description: `Maximum depth to traverse from the current\n working directory`,\n },\n })\n .opt({\n cwd: {\n short: 'C',\n description: 'Current working directory to execute/match in',\n default: process.cwd(),\n },\n root: {\n short: 'r',\n description: `A string path resolved against the 'cwd', which is\n used as the starting point for absolute patterns that\n start with '/' (but not drive letters or UNC paths\n on Windows).\n\n Note that this *doesn't* necessarily limit the walk to\n the 'root' directory, and doesn't affect the cwd\n starting point for non-absolute patterns. A pattern\n containing '..' will still be able to traverse out of\n the root directory, if it is not an actual root directory\n on the filesystem, and any non-absolute patterns will\n still be matched in the 'cwd'.\n\n To start absolute and non-absolute patterns in the same\n path, you can use '--root=' to set it to the empty\n string. However, be aware that on Windows systems, a\n pattern like 'x:/*' or '//host/share/*' will *always*\n start in the 'x:/' or '//host/share/' directory,\n regardless of the --root setting.\n `,\n },\n platform: {\n description: `Defaults to the value of 'process.platform' if\n available, or 'linux' if not. Setting --platform=win32\n on non-Windows systems may cause strange behavior!`,\n validOptions: [\n 'aix',\n 'android',\n 'darwin',\n 'freebsd',\n 'haiku',\n 'linux',\n 'openbsd',\n 'sunos',\n 'win32',\n 'cygwin',\n 'netbsd',\n ],\n },\n })\n .optList({\n ignore: {\n short: 'i',\n description: `Glob patterns to ignore`,\n },\n })\n .flag({\n debug: {\n short: 'v',\n description: `Output a huge amount of noisy debug information about\n patterns as they are parsed and used to match files.`,\n },\n })\n .flag({\n help: {\n short: 'h',\n description: 'Show this usage information',\n },\n })\n\ntry {\n const { positionals, values } = j.parse()\n if (values.help) {\n console.log(j.usage())\n process.exit(0)\n }\n if (positionals.length === 0 && !values.default)\n throw 'No patterns provided'\n if (positionals.length === 0 && values.default)\n positionals.push(values.default)\n const patterns =\n values.all ? positionals : positionals.filter(p => !existsSync(p))\n const matches =\n values.all ?\n []\n : positionals.filter(p => existsSync(p)).map(p => join(p))\n const stream = globStream(patterns, {\n absolute: values.absolute,\n cwd: values.cwd,\n dot: values.dot,\n dotRelative: values['dot-relative'],\n follow: values.follow,\n ignore: values.ignore,\n mark: values.mark,\n matchBase: values['match-base'],\n maxDepth: values['max-depth'],\n nobrace: values.nobrace,\n nocase: values.nocase,\n nodir: values.nodir,\n noext: values.noext,\n noglobstar: values.noglobstar,\n platform: values.platform as undefined | NodeJS.Platform,\n realpath: values.realpath,\n root: values.root,\n stat: values.stat,\n debug: values.debug,\n posix: values.posix,\n })\n\n const cmd = values.cmd\n if (!cmd) {\n matches.forEach(m => console.log(m))\n stream.on('data', f => console.log(f))\n } else {\n stream.on('data', f => matches.push(f))\n stream.on('end', () => foregroundChild(cmd, matches, { shell: true }))\n }\n} catch (e) {\n console.error(j.usage())\n console.error(e instanceof Error ? e.message : String(e))\n process.exit(1)\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EAIX,MAAM,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IACH,IAAI,EAAE,IAAI,CAAA;IAEV;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAA;IAEnB;;;;;;;;;;;OAWG;gBACS,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI;IA2HlD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAoBpC;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBzB;;OAEG;IACH,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAc9C;;OAEG;IACH,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAclD;;;OAGG;IACH,WAAW,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGlD,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;OAGG;IACH,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGnD,CAAC,MAAM,CAAC,aAAa,CAAC;CAGvB"}
@@ -0,0 +1,243 @@
1
+ import { Minimatch } from 'minimatch';
2
+ import { fileURLToPath } from 'node:url';
3
+ import { PathScurry, PathScurryDarwin, PathScurryPosix, PathScurryWin32, } from 'path-scurry';
4
+ import { Pattern } from './pattern.js';
5
+ import { GlobStream, GlobWalker } from './walker.js';
6
+ // if no process global, just call it linux.
7
+ // so we default to case-sensitive, / separators
8
+ const defaultPlatform = (typeof process === 'object' &&
9
+ process &&
10
+ typeof process.platform === 'string') ?
11
+ process.platform
12
+ : 'linux';
13
+ /**
14
+ * An object that can perform glob pattern traversals.
15
+ */
16
+ export class Glob {
17
+ absolute;
18
+ cwd;
19
+ root;
20
+ dot;
21
+ dotRelative;
22
+ follow;
23
+ ignore;
24
+ magicalBraces;
25
+ mark;
26
+ matchBase;
27
+ maxDepth;
28
+ nobrace;
29
+ nocase;
30
+ nodir;
31
+ noext;
32
+ noglobstar;
33
+ pattern;
34
+ platform;
35
+ realpath;
36
+ scurry;
37
+ stat;
38
+ signal;
39
+ windowsPathsNoEscape;
40
+ withFileTypes;
41
+ includeChildMatches;
42
+ /**
43
+ * The options provided to the constructor.
44
+ */
45
+ opts;
46
+ /**
47
+ * An array of parsed immutable {@link Pattern} objects.
48
+ */
49
+ patterns;
50
+ /**
51
+ * All options are stored as properties on the `Glob` object.
52
+ *
53
+ * See {@link GlobOptions} for full options descriptions.
54
+ *
55
+ * Note that a previous `Glob` object can be passed as the
56
+ * `GlobOptions` to another `Glob` instantiation to re-use settings
57
+ * and caches with a new pattern.
58
+ *
59
+ * Traversal functions can be called multiple times to run the walk
60
+ * again.
61
+ */
62
+ constructor(pattern, opts) {
63
+ /* c8 ignore start */
64
+ if (!opts)
65
+ throw new TypeError('glob options required');
66
+ /* c8 ignore stop */
67
+ this.withFileTypes = !!opts.withFileTypes;
68
+ this.signal = opts.signal;
69
+ this.follow = !!opts.follow;
70
+ this.dot = !!opts.dot;
71
+ this.dotRelative = !!opts.dotRelative;
72
+ this.nodir = !!opts.nodir;
73
+ this.mark = !!opts.mark;
74
+ if (!opts.cwd) {
75
+ this.cwd = '';
76
+ }
77
+ else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {
78
+ opts.cwd = fileURLToPath(opts.cwd);
79
+ }
80
+ this.cwd = opts.cwd || '';
81
+ this.root = opts.root;
82
+ this.magicalBraces = !!opts.magicalBraces;
83
+ this.nobrace = !!opts.nobrace;
84
+ this.noext = !!opts.noext;
85
+ this.realpath = !!opts.realpath;
86
+ this.absolute = opts.absolute;
87
+ this.includeChildMatches = opts.includeChildMatches !== false;
88
+ this.noglobstar = !!opts.noglobstar;
89
+ this.matchBase = !!opts.matchBase;
90
+ this.maxDepth =
91
+ typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity;
92
+ this.stat = !!opts.stat;
93
+ this.ignore = opts.ignore;
94
+ if (this.withFileTypes && this.absolute !== undefined) {
95
+ throw new Error('cannot set absolute and withFileTypes:true');
96
+ }
97
+ if (typeof pattern === 'string') {
98
+ pattern = [pattern];
99
+ }
100
+ this.windowsPathsNoEscape =
101
+ !!opts.windowsPathsNoEscape ||
102
+ opts.allowWindowsEscape ===
103
+ false;
104
+ if (this.windowsPathsNoEscape) {
105
+ pattern = pattern.map(p => p.replace(/\\/g, '/'));
106
+ }
107
+ if (this.matchBase) {
108
+ if (opts.noglobstar) {
109
+ throw new TypeError('base matching requires globstar');
110
+ }
111
+ pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`));
112
+ }
113
+ this.pattern = pattern;
114
+ this.platform = opts.platform || defaultPlatform;
115
+ this.opts = { ...opts, platform: this.platform };
116
+ if (opts.scurry) {
117
+ this.scurry = opts.scurry;
118
+ if (opts.nocase !== undefined &&
119
+ opts.nocase !== opts.scurry.nocase) {
120
+ throw new Error('nocase option contradicts provided scurry option');
121
+ }
122
+ }
123
+ else {
124
+ const Scurry = opts.platform === 'win32' ? PathScurryWin32
125
+ : opts.platform === 'darwin' ? PathScurryDarwin
126
+ : opts.platform ? PathScurryPosix
127
+ : PathScurry;
128
+ this.scurry = new Scurry(this.cwd, {
129
+ nocase: opts.nocase,
130
+ fs: opts.fs,
131
+ });
132
+ }
133
+ this.nocase = this.scurry.nocase;
134
+ // If you do nocase:true on a case-sensitive file system, then
135
+ // we need to use regexps instead of strings for non-magic
136
+ // path portions, because statting `aBc` won't return results
137
+ // for the file `AbC` for example.
138
+ const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32';
139
+ const mmo = {
140
+ // default nocase based on platform
141
+ ...opts,
142
+ dot: this.dot,
143
+ matchBase: this.matchBase,
144
+ nobrace: this.nobrace,
145
+ nocase: this.nocase,
146
+ nocaseMagicOnly,
147
+ nocomment: true,
148
+ noext: this.noext,
149
+ nonegate: true,
150
+ optimizationLevel: 2,
151
+ platform: this.platform,
152
+ windowsPathsNoEscape: this.windowsPathsNoEscape,
153
+ debug: !!this.opts.debug,
154
+ };
155
+ const mms = this.pattern.map(p => new Minimatch(p, mmo));
156
+ const [matchSet, globParts] = mms.reduce((set, m) => {
157
+ set[0].push(...m.set);
158
+ set[1].push(...m.globParts);
159
+ return set;
160
+ }, [[], []]);
161
+ this.patterns = matchSet.map((set, i) => {
162
+ const g = globParts[i];
163
+ /* c8 ignore start */
164
+ if (!g)
165
+ throw new Error('invalid pattern object');
166
+ /* c8 ignore stop */
167
+ return new Pattern(set, g, 0, this.platform);
168
+ });
169
+ }
170
+ async walk() {
171
+ // Walkers always return array of Path objects, so we just have to
172
+ // coerce them into the right shape. It will have already called
173
+ // realpath() if the option was set to do so, so we know that's cached.
174
+ // start out knowing the cwd, at least
175
+ return [
176
+ ...(await new GlobWalker(this.patterns, this.scurry.cwd, {
177
+ ...this.opts,
178
+ maxDepth: this.maxDepth !== Infinity ?
179
+ this.maxDepth + this.scurry.cwd.depth()
180
+ : Infinity,
181
+ platform: this.platform,
182
+ nocase: this.nocase,
183
+ includeChildMatches: this.includeChildMatches,
184
+ }).walk()),
185
+ ];
186
+ }
187
+ walkSync() {
188
+ return [
189
+ ...new GlobWalker(this.patterns, this.scurry.cwd, {
190
+ ...this.opts,
191
+ maxDepth: this.maxDepth !== Infinity ?
192
+ this.maxDepth + this.scurry.cwd.depth()
193
+ : Infinity,
194
+ platform: this.platform,
195
+ nocase: this.nocase,
196
+ includeChildMatches: this.includeChildMatches,
197
+ }).walkSync(),
198
+ ];
199
+ }
200
+ stream() {
201
+ return new GlobStream(this.patterns, this.scurry.cwd, {
202
+ ...this.opts,
203
+ maxDepth: this.maxDepth !== Infinity ?
204
+ this.maxDepth + this.scurry.cwd.depth()
205
+ : Infinity,
206
+ platform: this.platform,
207
+ nocase: this.nocase,
208
+ includeChildMatches: this.includeChildMatches,
209
+ }).stream();
210
+ }
211
+ streamSync() {
212
+ return new GlobStream(this.patterns, this.scurry.cwd, {
213
+ ...this.opts,
214
+ maxDepth: this.maxDepth !== Infinity ?
215
+ this.maxDepth + this.scurry.cwd.depth()
216
+ : Infinity,
217
+ platform: this.platform,
218
+ nocase: this.nocase,
219
+ includeChildMatches: this.includeChildMatches,
220
+ }).streamSync();
221
+ }
222
+ /**
223
+ * Default sync iteration function. Returns a Generator that
224
+ * iterates over the results.
225
+ */
226
+ iterateSync() {
227
+ return this.streamSync()[Symbol.iterator]();
228
+ }
229
+ [Symbol.iterator]() {
230
+ return this.iterateSync();
231
+ }
232
+ /**
233
+ * Default async iteration function. Returns an AsyncGenerator that
234
+ * iterates over the results.
235
+ */
236
+ iterate() {
237
+ return this.stream()[Symbol.asyncIterator]();
238
+ }
239
+ [Symbol.asyncIterator]() {
240
+ return this.iterate();
241
+ }
242
+ }
243
+ //# sourceMappingURL=glob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glob.js","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAGL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKpD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,eAAe,GACnB,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CACrC,CAAC,CAAC;IACD,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAyVX;;GAEG;AACH,MAAM,OAAO,IAAI;IACf,QAAQ,CAAU;IAClB,GAAG,CAAQ;IACX,IAA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CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;gBAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;gBACzC,CAAC,CAAC,QAAQ;YACZ,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;SAC9C,CAAC,CAAC,UAAU,EAAE,CAAA;IACjB,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IAC9C,CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF","sourcesContent":["import { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { fileURLToPath } from 'node:url'\nimport {\n FSOption,\n Path,\n PathScurry,\n PathScurryDarwin,\n PathScurryPosix,\n PathScurryWin32,\n} from 'path-scurry'\nimport { IgnoreLike } from './ignore.js'\nimport { Pattern } from './pattern.js'\nimport { GlobStream, GlobWalker } from './walker.js'\n\nexport type MatchSet = Minimatch['set']\nexport type GlobParts = Exclude<Minimatch['globParts'], undefined>\n\n// if no process global, just call it linux.\n// so we default to case-sensitive, / separators\nconst defaultPlatform: NodeJS.Platform =\n (\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ) ?\n process.platform\n : 'linux'\n\n/**\n * A `GlobOptions` object may be provided to any of the exported methods, and\n * must be provided to the `Glob` constructor.\n *\n * All options are optional, boolean, and false by default, unless otherwise\n * noted.\n *\n * All resolved options are added to the Glob object as properties.\n *\n * If you are running many `glob` operations, you can pass a Glob object as the\n * `options` argument to a subsequent operation to share the previously loaded\n * cache.\n */\nexport interface GlobOptions {\n /**\n * Set to `true` to always receive absolute paths for\n * matched files. Set to `false` to always return relative paths.\n *\n * When this option is not set, absolute paths are returned for patterns\n * that are absolute, and otherwise paths are returned that are relative\n * to the `cwd` setting.\n *\n * This does _not_ make an extra system call to get\n * the realpath, it only does string path resolution.\n *\n * Conflicts with {@link withFileTypes}\n */\n absolute?: boolean\n\n /**\n * Set to false to enable {@link windowsPathsNoEscape}\n *\n * @deprecated\n */\n allowWindowsEscape?: boolean\n\n /**\n * The current working directory in which to search. Defaults to\n * `process.cwd()`.\n *\n * May be eiher a string path or a `file://` URL object or string.\n */\n cwd?: string | URL\n\n /**\n * Include `.dot` files in normal matches and `globstar`\n * matches. Note that an explicit dot in a portion of the pattern\n * will always match dot files.\n */\n dot?: boolean\n\n /**\n * Prepend all relative path strings with `./` (or `.\\` on Windows).\n *\n * Without this option, returned relative paths are \"bare\", so instead of\n * returning `'./foo/bar'`, they are returned as `'foo/bar'`.\n *\n * Relative patterns starting with `'../'` are not prepended with `./`, even\n * if this option is set.\n */\n dotRelative?: boolean\n\n /**\n * Follow symlinked directories when expanding `**`\n * patterns. This can result in a lot of duplicate references in\n * the presence of cyclic links, and make performance quite bad.\n *\n * By default, a `**` in a pattern will follow 1 symbolic link if\n * it is not the first item in the pattern, or none if it is the\n * first item in the pattern, following the same behavior as Bash.\n */\n follow?: boolean\n\n /**\n * string or string[], or an object with `ignore` and `ignoreChildren`\n * methods.\n *\n * If a string or string[] is provided, then this is treated as a glob\n * pattern or array of glob patterns to exclude from matches. To ignore all\n * children within a directory, as well as the entry itself, append `'/**'`\n * to the ignore pattern.\n *\n * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of\n * any other settings.\n *\n * If an object is provided that has `ignored(path)` and/or\n * `childrenIgnored(path)` methods, then these methods will be called to\n * determine whether any Path is a match or if its children should be\n * traversed, respectively.\n */\n ignore?: string | string[] | IgnoreLike\n\n /**\n * Treat brace expansion like `{a,b}` as a \"magic\" pattern. Has no\n * effect if {@link nobrace} is set.\n *\n * Only has effect on the {@link hasMagic} function.\n */\n magicalBraces?: boolean\n\n /**\n * Add a `/` character to directory matches. Note that this requires\n * additional stat calls in some cases.\n */\n mark?: boolean\n\n /**\n * Perform a basename-only match if the pattern does not contain any slash\n * characters. That is, `*.js` would be treated as equivalent to\n * `**\\/*.js`, matching all js files in all directories.\n */\n matchBase?: boolean\n\n /**\n * Limit the directory traversal to a given depth below the cwd.\n * Note that this does NOT prevent traversal to sibling folders,\n * root patterns, and so on. It only limits the maximum folder depth\n * that the walk will descend, relative to the cwd.\n */\n maxDepth?: number\n\n /**\n * Do not expand `{a,b}` and `{1..3}` brace sets.\n */\n nobrace?: boolean\n\n /**\n * Perform a case-insensitive match. This defaults to `true` on macOS and\n * Windows systems, and `false` on all others.\n *\n * **Note** `nocase` should only be explicitly set when it is\n * known that the filesystem's case sensitivity differs from the\n * platform default. If set `true` on case-sensitive file\n * systems, or `false` on case-insensitive file systems, then the\n * walk may return more or less results than expected.\n */\n nocase?: boolean\n\n /**\n * Do not match directories, only files. (Note: to match\n * _only_ directories, put a `/` at the end of the pattern.)\n */\n nodir?: boolean\n\n /**\n * Do not match \"extglob\" patterns such as `+(a|b)`.\n */\n noext?: boolean\n\n /**\n * Do not match `**` against multiple filenames. (Ie, treat it as a normal\n * `*` instead.)\n *\n * Conflicts with {@link matchBase}\n */\n noglobstar?: boolean\n\n /**\n * Defaults to value of `process.platform` if available, or `'linux'` if\n * not. Setting `platform:'win32'` on non-Windows systems may cause strange\n * behavior.\n */\n platform?: NodeJS.Platform\n\n /**\n * Set to true to call `fs.realpath` on all of the\n * results. In the case of an entry that cannot be resolved, the\n * entry is omitted. This incurs a slight performance penalty, of\n * course, because of the added system calls.\n */\n realpath?: boolean\n\n /**\n *\n * A string path resolved against the `cwd` option, which\n * is used as the starting point for absolute patterns that start\n * with `/`, (but not drive letters or UNC paths on Windows).\n *\n * Note that this _doesn't_ necessarily limit the walk to the\n * `root` directory, and doesn't affect the cwd starting point for\n * non-absolute patterns. A pattern containing `..` will still be\n * able to traverse out of the root directory, if it is not an\n * actual root directory on the filesystem, and any non-absolute\n * patterns will be matched in the `cwd`. For example, the\n * pattern `/../*` with `{root:'/some/path'}` will return all\n * files in `/some`, not all files in `/some/path`. The pattern\n * `*` with `{root:'/some/path'}` will return all the entries in\n * the cwd, not the entries in `/some/path`.\n *\n * To start absolute and non-absolute patterns in the same\n * path, you can use `{root:''}`. However, be aware that on\n * Windows systems, a pattern like `x:/*` or `//host/share/*` will\n * _always_ start in the `x:/` or `//host/share` directory,\n * regardless of the `root` setting.\n */\n root?: string\n\n /**\n * A [PathScurry](http://npm.im/path-scurry) object used\n * to traverse the file system. If the `nocase` option is set\n * explicitly, then any provided `scurry` object must match this\n * setting.\n */\n scurry?: PathScurry\n\n /**\n * Call `lstat()` on all entries, whether required or not to determine\n * if it's a valid match. When used with {@link withFileTypes}, this means\n * that matches will include data such as modified time, permissions, and\n * so on. Note that this will incur a performance cost due to the added\n * system calls.\n */\n stat?: boolean\n\n /**\n * An AbortSignal which will cancel the Glob walk when\n * triggered.\n */\n signal?: AbortSignal\n\n /**\n * Use `\\\\` as a path separator _only_, and\n * _never_ as an escape character. If set, all `\\\\` characters are\n * replaced with `/` in the pattern.\n *\n * Note that this makes it **impossible** to match against paths\n * containing literal glob pattern characters, but allows matching\n * with patterns constructed using `path.join()` and\n * `path.resolve()` on Windows platforms, mimicking the (buggy!)\n * behavior of Glob v7 and before on Windows. Please use with\n * caution, and be mindful of [the caveat below about Windows\n * paths](#windows). (For legacy reasons, this is also set if\n * `allowWindowsEscape` is set to the exact value `false`.)\n */\n windowsPathsNoEscape?: boolean\n\n /**\n * Return [PathScurry](http://npm.im/path-scurry)\n * `Path` objects instead of strings. These are similar to a\n * NodeJS `Dirent` object, but with additional methods and\n * properties.\n *\n * Conflicts with {@link absolute}\n */\n withFileTypes?: boolean\n\n /**\n * An fs implementation to override some or all of the defaults. See\n * http://npm.im/path-scurry for details about what can be overridden.\n */\n fs?: FSOption\n\n /**\n * Just passed along to Minimatch. Note that this makes all pattern\n * matching operations slower and *extremely* noisy.\n */\n debug?: boolean\n\n /**\n * Return `/` delimited paths, even on Windows.\n *\n * On posix systems, this has no effect. But, on Windows, it means that\n * paths will be `/` delimited, and absolute paths will be their full\n * resolved UNC forms, eg instead of `'C:\\\\foo\\\\bar'`, it would return\n * `'//?/C:/foo/bar'`\n */\n posix?: boolean\n\n /**\n * Do not match any children of any matches. For example, the pattern\n * `**\\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode.\n *\n * This is especially useful for cases like \"find all `node_modules`\n * folders, but not the ones in `node_modules`\".\n *\n * In order to support this, the `Ignore` implementation must support an\n * `add(pattern: string)` method. If using the default `Ignore` class, then\n * this is fine, but if this is set to `false`, and a custom `Ignore` is\n * provided that does not have an `add()` method, then it will throw an\n * error.\n *\n * **Caveat** It *only* ignores matches that would be a descendant of a\n * previous match, and only if that descendant is matched *after* the\n * ancestor is encountered. Since the file system walk happens in\n * indeterminate order, it's possible that a match will already be added\n * before its ancestor, if multiple or braced patterns are used.\n *\n * For example:\n *\n * ```ts\n * const results = await glob([\n * // likely to match first, since it's just a stat\n * 'a/b/c/d/e/f',\n *\n * // this pattern is more complicated! It must to various readdir()\n * // calls and test the results against a regular expression, and that\n * // is certainly going to take a little bit longer.\n * //\n * // So, later on, it encounters a match at 'a/b/c/d/e', but it's too\n * // late to ignore a/b/c/d/e/f, because it's already been emitted.\n * 'a/[bdf]/?/[a-z]/*',\n * ], { includeChildMatches: false })\n * ```\n *\n * It's best to only set this to `false` if you can be reasonably sure that\n * no components of the pattern will potentially match one another's file\n * system descendants, or if the occasional included child entry will not\n * cause problems.\n *\n * @default true\n */\n includeChildMatches?: boolean\n}\n\nexport type GlobOptionsWithFileTypesTrue = GlobOptions & {\n withFileTypes: true\n // string options not relevant if returning Path objects.\n absolute?: undefined\n mark?: undefined\n posix?: undefined\n}\n\nexport type GlobOptionsWithFileTypesFalse = GlobOptions & {\n withFileTypes?: false\n}\n\nexport type GlobOptionsWithFileTypesUnset = GlobOptions & {\n withFileTypes?: undefined\n}\n\nexport type Result<Opts> =\n Opts extends GlobOptionsWithFileTypesTrue ? Path\n : Opts extends GlobOptionsWithFileTypesFalse ? string\n : Opts extends GlobOptionsWithFileTypesUnset ? string\n : string | Path\nexport type Results<Opts> = Result<Opts>[]\n\nexport type FileTypes<Opts> =\n Opts extends GlobOptionsWithFileTypesTrue ? true\n : Opts extends GlobOptionsWithFileTypesFalse ? false\n : Opts extends GlobOptionsWithFileTypesUnset ? false\n : boolean\n\n/**\n * An object that can perform glob pattern traversals.\n */\nexport class Glob<Opts extends GlobOptions> implements GlobOptions {\n absolute?: boolean\n cwd: string\n root?: string\n dot: boolean\n dotRelative: boolean\n follow: boolean\n ignore?: string | string[] | IgnoreLike\n magicalBraces: boolean\n mark?: boolean\n matchBase: boolean\n maxDepth: number\n nobrace: boolean\n nocase: boolean\n nodir: boolean\n noext: boolean\n noglobstar: boolean\n pattern: string[]\n platform: NodeJS.Platform\n realpath: boolean\n scurry: PathScurry\n stat: boolean\n signal?: AbortSignal\n windowsPathsNoEscape: boolean\n withFileTypes: FileTypes<Opts>\n includeChildMatches: boolean\n\n /**\n * The options provided to the constructor.\n */\n opts: Opts\n\n /**\n * An array of parsed immutable {@link Pattern} objects.\n */\n patterns: Pattern[]\n\n /**\n * All options are stored as properties on the `Glob` object.\n *\n * See {@link GlobOptions} for full options descriptions.\n *\n * Note that a previous `Glob` object can be passed as the\n * `GlobOptions` to another `Glob` instantiation to re-use settings\n * and caches with a new pattern.\n *\n * Traversal functions can be called multiple times to run the walk\n * again.\n */\n constructor(pattern: string | string[], opts: Opts) {\n /* c8 ignore start */\n if (!opts) throw new TypeError('glob options required')\n /* c8 ignore stop */\n this.withFileTypes = !!opts.withFileTypes as FileTypes<Opts>\n this.signal = opts.signal\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.dotRelative = !!opts.dotRelative\n this.nodir = !!opts.nodir\n this.mark = !!opts.mark\n if (!opts.cwd) {\n this.cwd = ''\n } else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {\n opts.cwd = fileURLToPath(opts.cwd)\n }\n this.cwd = opts.cwd || ''\n this.root = opts.root\n this.magicalBraces = !!opts.magicalBraces\n this.nobrace = !!opts.nobrace\n this.noext = !!opts.noext\n this.realpath = !!opts.realpath\n this.absolute = opts.absolute\n this.includeChildMatches = opts.includeChildMatches !== false\n\n this.noglobstar = !!opts.noglobstar\n this.matchBase = !!opts.matchBase\n this.maxDepth =\n typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity\n this.stat = !!opts.stat\n this.ignore = opts.ignore\n\n if (this.withFileTypes && this.absolute !== undefined) {\n throw new Error('cannot set absolute and withFileTypes:true')\n }\n\n if (typeof pattern === 'string') {\n pattern = [pattern]\n }\n\n this.windowsPathsNoEscape =\n !!opts.windowsPathsNoEscape ||\n (opts as { allowWindowsEscape?: boolean }).allowWindowsEscape ===\n false\n\n if (this.windowsPathsNoEscape) {\n pattern = pattern.map(p => p.replace(/\\\\/g, '/'))\n }\n\n if (this.matchBase) {\n if (opts.noglobstar) {\n throw new TypeError('base matching requires globstar')\n }\n pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`))\n }\n\n this.pattern = pattern\n\n this.platform = opts.platform || defaultPlatform\n this.opts = { ...opts, platform: this.platform }\n if (opts.scurry) {\n this.scurry = opts.scurry\n if (\n opts.nocase !== undefined &&\n opts.nocase !== opts.scurry.nocase\n ) {\n throw new Error('nocase option contradicts provided scurry option')\n }\n } else {\n const Scurry =\n opts.platform === 'win32' ? PathScurryWin32\n : opts.platform === 'darwin' ? PathScurryDarwin\n : opts.platform ? PathScurryPosix\n : PathScurry\n this.scurry = new Scurry(this.cwd, {\n nocase: opts.nocase,\n fs: opts.fs,\n })\n }\n this.nocase = this.scurry.nocase\n\n // If you do nocase:true on a case-sensitive file system, then\n // we need to use regexps instead of strings for non-magic\n // path portions, because statting `aBc` won't return results\n // for the file `AbC` for example.\n const nocaseMagicOnly =\n this.platform === 'darwin' || this.platform === 'win32'\n\n const mmo: MinimatchOptions = {\n // default nocase based on platform\n ...opts,\n dot: this.dot,\n matchBase: this.matchBase,\n nobrace: this.nobrace,\n nocase: this.nocase,\n nocaseMagicOnly,\n nocomment: true,\n noext: this.noext,\n nonegate: true,\n optimizationLevel: 2,\n platform: this.platform,\n windowsPathsNoEscape: this.windowsPathsNoEscape,\n debug: !!this.opts.debug,\n }\n\n const mms = this.pattern.map(p => new Minimatch(p, mmo))\n const [matchSet, globParts] = mms.reduce(\n (set: [MatchSet, GlobParts], m) => {\n set[0].push(...m.set)\n set[1].push(...m.globParts)\n return set\n },\n [[], []],\n )\n this.patterns = matchSet.map((set, i) => {\n const g = globParts[i]\n /* c8 ignore start */\n if (!g) throw new Error('invalid pattern object')\n /* c8 ignore stop */\n return new Pattern(set, g, 0, this.platform)\n })\n }\n\n /**\n * Returns a Promise that resolves to the results array.\n */\n async walk(): Promise<Results<Opts>>\n async walk(): Promise<(string | Path)[]> {\n // Walkers always return array of Path objects, so we just have to\n // coerce them into the right shape. It will have already called\n // realpath() if the option was set to do so, so we know that's cached.\n // start out knowing the cwd, at least\n return [\n ...(await new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).walk()),\n ]\n }\n\n /**\n * synchronous {@link Glob.walk}\n */\n walkSync(): Results<Opts>\n walkSync(): (string | Path)[] {\n return [\n ...new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).walkSync(),\n ]\n }\n\n /**\n * Stream results asynchronously.\n */\n stream(): Minipass<Result<Opts>, Result<Opts>>\n stream(): Minipass<string | Path, string | Path> {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).stream()\n }\n\n /**\n * Stream results synchronously.\n */\n streamSync(): Minipass<Result<Opts>, Result<Opts>>\n streamSync(): Minipass<string | Path, string | Path> {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).streamSync()\n }\n\n /**\n * Default sync iteration function. Returns a Generator that\n * iterates over the results.\n */\n iterateSync(): Generator<Result<Opts>, void, void> {\n return this.streamSync()[Symbol.iterator]()\n }\n [Symbol.iterator]() {\n return this.iterateSync()\n }\n\n /**\n * Default async iteration function. Returns an AsyncGenerator that\n * iterates over the results.\n */\n iterate(): AsyncGenerator<Result<Opts>, void, void> {\n return this.stream()[Symbol.asyncIterator]()\n }\n [Symbol.asyncIterator]() {\n return this.iterate()\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"}
@@ -0,0 +1,23 @@
1
+ import { Minimatch } from 'minimatch';
2
+ /**
3
+ * Return true if the patterns provided contain any magic glob characters,
4
+ * given the options provided.
5
+ *
6
+ * Brace expansion is not considered "magic" unless the `magicalBraces` option
7
+ * is set, as brace expansion just turns one string into an array of strings.
8
+ * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and
9
+ * `'xby'` both do not contain any magic glob characters, and it's treated the
10
+ * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`
11
+ * is in the options, brace expansion _is_ treated as a pattern having magic.
12
+ */
13
+ export const hasMagic = (pattern, options = {}) => {
14
+ if (!Array.isArray(pattern)) {
15
+ pattern = [pattern];
16
+ }
17
+ for (const p of pattern) {
18
+ if (new Minimatch(p, options).hasMagic())
19
+ return true;
20
+ }
21
+ return false;
22
+ };
23
+ //# sourceMappingURL=has-magic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAGrC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;IACvD,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {},\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IACtC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B;AAWD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IACzB,MAAM,EAAE,gBAAgB,CAAA;gBAGtB,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAqBnB,GAAG,CAAC,GAAG,EAAE,MAAM;IAyCf,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"}