onbuzz 3.3.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 (506) hide show
  1. package/LICENSE +267 -0
  2. package/README.md +425 -0
  3. package/bin/cli.js +556 -0
  4. package/bin/loxia-terminal-v2.js +162 -0
  5. package/bin/loxia-terminal.js +90 -0
  6. package/bin/start-with-terminal.js +200 -0
  7. package/node_modules/@isaacs/balanced-match/LICENSE.md +23 -0
  8. package/node_modules/@isaacs/balanced-match/README.md +60 -0
  9. package/node_modules/@isaacs/balanced-match/dist/commonjs/index.d.ts +9 -0
  10. package/node_modules/@isaacs/balanced-match/dist/commonjs/index.d.ts.map +1 -0
  11. package/node_modules/@isaacs/balanced-match/dist/commonjs/index.js +59 -0
  12. package/node_modules/@isaacs/balanced-match/dist/commonjs/index.js.map +1 -0
  13. package/node_modules/@isaacs/balanced-match/dist/commonjs/package.json +3 -0
  14. package/node_modules/@isaacs/balanced-match/dist/esm/index.d.ts +9 -0
  15. package/node_modules/@isaacs/balanced-match/dist/esm/index.d.ts.map +1 -0
  16. package/node_modules/@isaacs/balanced-match/dist/esm/index.js +54 -0
  17. package/node_modules/@isaacs/balanced-match/dist/esm/index.js.map +1 -0
  18. package/node_modules/@isaacs/balanced-match/dist/esm/package.json +3 -0
  19. package/node_modules/@isaacs/balanced-match/package.json +79 -0
  20. package/node_modules/@isaacs/brace-expansion/LICENSE +23 -0
  21. package/node_modules/@isaacs/brace-expansion/README.md +97 -0
  22. package/node_modules/@isaacs/brace-expansion/dist/commonjs/index.d.ts +6 -0
  23. package/node_modules/@isaacs/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
  24. package/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js +199 -0
  25. package/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js.map +1 -0
  26. package/node_modules/@isaacs/brace-expansion/dist/commonjs/package.json +3 -0
  27. package/node_modules/@isaacs/brace-expansion/dist/esm/index.d.ts +6 -0
  28. package/node_modules/@isaacs/brace-expansion/dist/esm/index.d.ts.map +1 -0
  29. package/node_modules/@isaacs/brace-expansion/dist/esm/index.js +195 -0
  30. package/node_modules/@isaacs/brace-expansion/dist/esm/index.js.map +1 -0
  31. package/node_modules/@isaacs/brace-expansion/dist/esm/package.json +3 -0
  32. package/node_modules/@isaacs/brace-expansion/package.json +60 -0
  33. package/node_modules/glob/LICENSE.md +63 -0
  34. package/node_modules/glob/README.md +1177 -0
  35. package/node_modules/glob/dist/commonjs/glob.d.ts +388 -0
  36. package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
  37. package/node_modules/glob/dist/commonjs/glob.js +247 -0
  38. package/node_modules/glob/dist/commonjs/glob.js.map +1 -0
  39. package/node_modules/glob/dist/commonjs/has-magic.d.ts +14 -0
  40. package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
  41. package/node_modules/glob/dist/commonjs/has-magic.js +27 -0
  42. package/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
  43. package/node_modules/glob/dist/commonjs/ignore.d.ts +24 -0
  44. package/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
  45. package/node_modules/glob/dist/commonjs/ignore.js +119 -0
  46. package/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
  47. package/node_modules/glob/dist/commonjs/index.d.ts +97 -0
  48. package/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
  49. package/node_modules/glob/dist/commonjs/index.js +68 -0
  50. package/node_modules/glob/dist/commonjs/index.js.map +1 -0
  51. package/node_modules/glob/dist/commonjs/index.min.js +4 -0
  52. package/node_modules/glob/dist/commonjs/index.min.js.map +7 -0
  53. package/node_modules/glob/dist/commonjs/package.json +3 -0
  54. package/node_modules/glob/dist/commonjs/pattern.d.ts +76 -0
  55. package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
  56. package/node_modules/glob/dist/commonjs/pattern.js +219 -0
  57. package/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
  58. package/node_modules/glob/dist/commonjs/processor.d.ts +59 -0
  59. package/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
  60. package/node_modules/glob/dist/commonjs/processor.js +301 -0
  61. package/node_modules/glob/dist/commonjs/processor.js.map +1 -0
  62. package/node_modules/glob/dist/commonjs/walker.d.ts +97 -0
  63. package/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
  64. package/node_modules/glob/dist/commonjs/walker.js +387 -0
  65. package/node_modules/glob/dist/commonjs/walker.js.map +1 -0
  66. package/node_modules/glob/dist/esm/glob.d.ts +388 -0
  67. package/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
  68. package/node_modules/glob/dist/esm/glob.js +243 -0
  69. package/node_modules/glob/dist/esm/glob.js.map +1 -0
  70. package/node_modules/glob/dist/esm/has-magic.d.ts +14 -0
  71. package/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
  72. package/node_modules/glob/dist/esm/has-magic.js +23 -0
  73. package/node_modules/glob/dist/esm/has-magic.js.map +1 -0
  74. package/node_modules/glob/dist/esm/ignore.d.ts +24 -0
  75. package/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
  76. package/node_modules/glob/dist/esm/ignore.js +115 -0
  77. package/node_modules/glob/dist/esm/ignore.js.map +1 -0
  78. package/node_modules/glob/dist/esm/index.d.ts +97 -0
  79. package/node_modules/glob/dist/esm/index.d.ts.map +1 -0
  80. package/node_modules/glob/dist/esm/index.js +55 -0
  81. package/node_modules/glob/dist/esm/index.js.map +1 -0
  82. package/node_modules/glob/dist/esm/index.min.js +4 -0
  83. package/node_modules/glob/dist/esm/index.min.js.map +7 -0
  84. package/node_modules/glob/dist/esm/package.json +3 -0
  85. package/node_modules/glob/dist/esm/pattern.d.ts +76 -0
  86. package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
  87. package/node_modules/glob/dist/esm/pattern.js +215 -0
  88. package/node_modules/glob/dist/esm/pattern.js.map +1 -0
  89. package/node_modules/glob/dist/esm/processor.d.ts +59 -0
  90. package/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
  91. package/node_modules/glob/dist/esm/processor.js +294 -0
  92. package/node_modules/glob/dist/esm/processor.js.map +1 -0
  93. package/node_modules/glob/dist/esm/walker.d.ts +97 -0
  94. package/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
  95. package/node_modules/glob/dist/esm/walker.js +381 -0
  96. package/node_modules/glob/dist/esm/walker.js.map +1 -0
  97. package/node_modules/glob/node_modules/minimatch/LICENSE.md +55 -0
  98. package/node_modules/glob/node_modules/minimatch/README.md +453 -0
  99. package/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
  100. package/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
  101. package/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  102. package/node_modules/glob/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
  103. package/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts +20 -0
  104. package/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
  105. package/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.js +591 -0
  106. package/node_modules/glob/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
  107. package/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
  108. package/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
  109. package/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
  110. package/node_modules/glob/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
  111. package/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
  112. package/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
  113. package/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.js +30 -0
  114. package/node_modules/glob/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
  115. package/node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts +94 -0
  116. package/node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
  117. package/node_modules/glob/node_modules/minimatch/dist/commonjs/index.js +1029 -0
  118. package/node_modules/glob/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
  119. package/node_modules/glob/node_modules/minimatch/dist/commonjs/package.json +3 -0
  120. package/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
  121. package/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
  122. package/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
  123. package/node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
  124. package/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
  125. package/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
  126. package/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  127. package/node_modules/glob/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  128. package/node_modules/glob/node_modules/minimatch/dist/esm/ast.d.ts +20 -0
  129. package/node_modules/glob/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
  130. package/node_modules/glob/node_modules/minimatch/dist/esm/ast.js +587 -0
  131. package/node_modules/glob/node_modules/minimatch/dist/esm/ast.js.map +1 -0
  132. package/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
  133. package/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
  134. package/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
  135. package/node_modules/glob/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
  136. package/node_modules/glob/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
  137. package/node_modules/glob/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
  138. package/node_modules/glob/node_modules/minimatch/dist/esm/escape.js +26 -0
  139. package/node_modules/glob/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  140. package/node_modules/glob/node_modules/minimatch/dist/esm/index.d.ts +94 -0
  141. package/node_modules/glob/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
  142. package/node_modules/glob/node_modules/minimatch/dist/esm/index.js +1016 -0
  143. package/node_modules/glob/node_modules/minimatch/dist/esm/index.js.map +1 -0
  144. package/node_modules/glob/node_modules/minimatch/dist/esm/package.json +3 -0
  145. package/node_modules/glob/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
  146. package/node_modules/glob/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
  147. package/node_modules/glob/node_modules/minimatch/dist/esm/unescape.js +34 -0
  148. package/node_modules/glob/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  149. package/node_modules/glob/node_modules/minimatch/package.json +67 -0
  150. package/node_modules/glob/package.json +101 -0
  151. package/node_modules/minipass/LICENSE +15 -0
  152. package/node_modules/minipass/README.md +825 -0
  153. package/node_modules/minipass/dist/commonjs/index.d.ts +549 -0
  154. package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  155. package/node_modules/minipass/dist/commonjs/index.js +1028 -0
  156. package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  157. package/node_modules/minipass/dist/commonjs/package.json +3 -0
  158. package/node_modules/minipass/dist/esm/index.d.ts +549 -0
  159. package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  160. package/node_modules/minipass/dist/esm/index.js +1018 -0
  161. package/node_modules/minipass/dist/esm/index.js.map +1 -0
  162. package/node_modules/minipass/dist/esm/package.json +3 -0
  163. package/node_modules/minipass/package.json +82 -0
  164. package/node_modules/package-json-from-dist/LICENSE.md +63 -0
  165. package/node_modules/package-json-from-dist/README.md +110 -0
  166. package/node_modules/package-json-from-dist/dist/commonjs/index.d.ts +89 -0
  167. package/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map +1 -0
  168. package/node_modules/package-json-from-dist/dist/commonjs/index.js +134 -0
  169. package/node_modules/package-json-from-dist/dist/commonjs/index.js.map +1 -0
  170. package/node_modules/package-json-from-dist/dist/commonjs/package.json +3 -0
  171. package/node_modules/package-json-from-dist/dist/esm/index.d.ts +89 -0
  172. package/node_modules/package-json-from-dist/dist/esm/index.d.ts.map +1 -0
  173. package/node_modules/package-json-from-dist/dist/esm/index.js +129 -0
  174. package/node_modules/package-json-from-dist/dist/esm/index.js.map +1 -0
  175. package/node_modules/package-json-from-dist/dist/esm/package.json +3 -0
  176. package/node_modules/package-json-from-dist/package.json +68 -0
  177. package/node_modules/path-scurry/LICENSE.md +55 -0
  178. package/node_modules/path-scurry/README.md +636 -0
  179. package/node_modules/path-scurry/dist/commonjs/index.d.ts +1115 -0
  180. package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
  181. package/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
  182. package/node_modules/path-scurry/dist/commonjs/index.js.map +1 -0
  183. package/node_modules/path-scurry/dist/commonjs/package.json +3 -0
  184. package/node_modules/path-scurry/dist/esm/index.d.ts +1115 -0
  185. package/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
  186. package/node_modules/path-scurry/dist/esm/index.js +1983 -0
  187. package/node_modules/path-scurry/dist/esm/index.js.map +1 -0
  188. package/node_modules/path-scurry/dist/esm/package.json +3 -0
  189. package/node_modules/path-scurry/node_modules/lru-cache/LICENSE.md +55 -0
  190. package/node_modules/path-scurry/node_modules/lru-cache/README.md +383 -0
  191. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts +1323 -0
  192. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
  193. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js +1589 -0
  194. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
  195. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
  196. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
  197. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/package.json +3 -0
  198. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts +1323 -0
  199. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
  200. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js +1585 -0
  201. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js.map +1 -0
  202. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js +2 -0
  203. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
  204. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/package.json +3 -0
  205. package/node_modules/path-scurry/node_modules/lru-cache/package.json +101 -0
  206. package/node_modules/path-scurry/package.json +88 -0
  207. package/node_modules/rimraf/LICENSE.md +55 -0
  208. package/node_modules/rimraf/README.md +226 -0
  209. package/node_modules/rimraf/dist/commonjs/default-tmp.d.ts +3 -0
  210. package/node_modules/rimraf/dist/commonjs/default-tmp.d.ts.map +1 -0
  211. package/node_modules/rimraf/dist/commonjs/default-tmp.js +58 -0
  212. package/node_modules/rimraf/dist/commonjs/default-tmp.js.map +1 -0
  213. package/node_modules/rimraf/dist/commonjs/error.d.ts +6 -0
  214. package/node_modules/rimraf/dist/commonjs/error.d.ts.map +1 -0
  215. package/node_modules/rimraf/dist/commonjs/error.js +10 -0
  216. package/node_modules/rimraf/dist/commonjs/error.js.map +1 -0
  217. package/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts +3 -0
  218. package/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts.map +1 -0
  219. package/node_modules/rimraf/dist/commonjs/fix-eperm.js +38 -0
  220. package/node_modules/rimraf/dist/commonjs/fix-eperm.js.map +1 -0
  221. package/node_modules/rimraf/dist/commonjs/fs.d.ts +15 -0
  222. package/node_modules/rimraf/dist/commonjs/fs.d.ts.map +1 -0
  223. package/node_modules/rimraf/dist/commonjs/fs.js +33 -0
  224. package/node_modules/rimraf/dist/commonjs/fs.js.map +1 -0
  225. package/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts +3 -0
  226. package/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts.map +1 -0
  227. package/node_modules/rimraf/dist/commonjs/ignore-enoent.js +24 -0
  228. package/node_modules/rimraf/dist/commonjs/ignore-enoent.js.map +1 -0
  229. package/node_modules/rimraf/dist/commonjs/index.d.ts +50 -0
  230. package/node_modules/rimraf/dist/commonjs/index.d.ts.map +1 -0
  231. package/node_modules/rimraf/dist/commonjs/index.js +78 -0
  232. package/node_modules/rimraf/dist/commonjs/index.js.map +1 -0
  233. package/node_modules/rimraf/dist/commonjs/opt-arg.d.ts +34 -0
  234. package/node_modules/rimraf/dist/commonjs/opt-arg.d.ts.map +1 -0
  235. package/node_modules/rimraf/dist/commonjs/opt-arg.js +53 -0
  236. package/node_modules/rimraf/dist/commonjs/opt-arg.js.map +1 -0
  237. package/node_modules/rimraf/dist/commonjs/package.json +3 -0
  238. package/node_modules/rimraf/dist/commonjs/path-arg.d.ts +4 -0
  239. package/node_modules/rimraf/dist/commonjs/path-arg.d.ts.map +1 -0
  240. package/node_modules/rimraf/dist/commonjs/path-arg.js +48 -0
  241. package/node_modules/rimraf/dist/commonjs/path-arg.js.map +1 -0
  242. package/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts +3 -0
  243. package/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts.map +1 -0
  244. package/node_modules/rimraf/dist/commonjs/readdir-or-error.js +19 -0
  245. package/node_modules/rimraf/dist/commonjs/readdir-or-error.js.map +1 -0
  246. package/node_modules/rimraf/dist/commonjs/retry-busy.d.ts +8 -0
  247. package/node_modules/rimraf/dist/commonjs/retry-busy.d.ts.map +1 -0
  248. package/node_modules/rimraf/dist/commonjs/retry-busy.js +65 -0
  249. package/node_modules/rimraf/dist/commonjs/retry-busy.js.map +1 -0
  250. package/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts +3 -0
  251. package/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts.map +1 -0
  252. package/node_modules/rimraf/dist/commonjs/rimraf-manual.js +8 -0
  253. package/node_modules/rimraf/dist/commonjs/rimraf-manual.js.map +1 -0
  254. package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts +4 -0
  255. package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts.map +1 -0
  256. package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js +138 -0
  257. package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js.map +1 -0
  258. package/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts +4 -0
  259. package/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts.map +1 -0
  260. package/node_modules/rimraf/dist/commonjs/rimraf-native.js +24 -0
  261. package/node_modules/rimraf/dist/commonjs/rimraf-native.js.map +1 -0
  262. package/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts +4 -0
  263. package/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts.map +1 -0
  264. package/node_modules/rimraf/dist/commonjs/rimraf-posix.js +103 -0
  265. package/node_modules/rimraf/dist/commonjs/rimraf-posix.js.map +1 -0
  266. package/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts +4 -0
  267. package/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts.map +1 -0
  268. package/node_modules/rimraf/dist/commonjs/rimraf-windows.js +159 -0
  269. package/node_modules/rimraf/dist/commonjs/rimraf-windows.js.map +1 -0
  270. package/node_modules/rimraf/dist/commonjs/use-native.d.ts +4 -0
  271. package/node_modules/rimraf/dist/commonjs/use-native.d.ts.map +1 -0
  272. package/node_modules/rimraf/dist/commonjs/use-native.js +18 -0
  273. package/node_modules/rimraf/dist/commonjs/use-native.js.map +1 -0
  274. package/node_modules/rimraf/dist/esm/bin.d.mts +3 -0
  275. package/node_modules/rimraf/dist/esm/bin.d.mts.map +1 -0
  276. package/node_modules/rimraf/dist/esm/bin.mjs +250 -0
  277. package/node_modules/rimraf/dist/esm/bin.mjs.map +1 -0
  278. package/node_modules/rimraf/dist/esm/default-tmp.d.ts +3 -0
  279. package/node_modules/rimraf/dist/esm/default-tmp.d.ts.map +1 -0
  280. package/node_modules/rimraf/dist/esm/default-tmp.js +55 -0
  281. package/node_modules/rimraf/dist/esm/default-tmp.js.map +1 -0
  282. package/node_modules/rimraf/dist/esm/error.d.ts +6 -0
  283. package/node_modules/rimraf/dist/esm/error.d.ts.map +1 -0
  284. package/node_modules/rimraf/dist/esm/error.js +5 -0
  285. package/node_modules/rimraf/dist/esm/error.js.map +1 -0
  286. package/node_modules/rimraf/dist/esm/fix-eperm.d.ts +3 -0
  287. package/node_modules/rimraf/dist/esm/fix-eperm.d.ts.map +1 -0
  288. package/node_modules/rimraf/dist/esm/fix-eperm.js +33 -0
  289. package/node_modules/rimraf/dist/esm/fix-eperm.js.map +1 -0
  290. package/node_modules/rimraf/dist/esm/fs.d.ts +15 -0
  291. package/node_modules/rimraf/dist/esm/fs.d.ts.map +1 -0
  292. package/node_modules/rimraf/dist/esm/fs.js +18 -0
  293. package/node_modules/rimraf/dist/esm/fs.js.map +1 -0
  294. package/node_modules/rimraf/dist/esm/ignore-enoent.d.ts +3 -0
  295. package/node_modules/rimraf/dist/esm/ignore-enoent.d.ts.map +1 -0
  296. package/node_modules/rimraf/dist/esm/ignore-enoent.js +19 -0
  297. package/node_modules/rimraf/dist/esm/ignore-enoent.js.map +1 -0
  298. package/node_modules/rimraf/dist/esm/index.d.ts +50 -0
  299. package/node_modules/rimraf/dist/esm/index.d.ts.map +1 -0
  300. package/node_modules/rimraf/dist/esm/index.js +70 -0
  301. package/node_modules/rimraf/dist/esm/index.js.map +1 -0
  302. package/node_modules/rimraf/dist/esm/opt-arg.d.ts +34 -0
  303. package/node_modules/rimraf/dist/esm/opt-arg.d.ts.map +1 -0
  304. package/node_modules/rimraf/dist/esm/opt-arg.js +46 -0
  305. package/node_modules/rimraf/dist/esm/opt-arg.js.map +1 -0
  306. package/node_modules/rimraf/dist/esm/package.json +3 -0
  307. package/node_modules/rimraf/dist/esm/path-arg.d.ts +4 -0
  308. package/node_modules/rimraf/dist/esm/path-arg.d.ts.map +1 -0
  309. package/node_modules/rimraf/dist/esm/path-arg.js +46 -0
  310. package/node_modules/rimraf/dist/esm/path-arg.js.map +1 -0
  311. package/node_modules/rimraf/dist/esm/readdir-or-error.d.ts +3 -0
  312. package/node_modules/rimraf/dist/esm/readdir-or-error.d.ts.map +1 -0
  313. package/node_modules/rimraf/dist/esm/readdir-or-error.js +14 -0
  314. package/node_modules/rimraf/dist/esm/readdir-or-error.js.map +1 -0
  315. package/node_modules/rimraf/dist/esm/retry-busy.d.ts +8 -0
  316. package/node_modules/rimraf/dist/esm/retry-busy.d.ts.map +1 -0
  317. package/node_modules/rimraf/dist/esm/retry-busy.js +60 -0
  318. package/node_modules/rimraf/dist/esm/retry-busy.js.map +1 -0
  319. package/node_modules/rimraf/dist/esm/rimraf-manual.d.ts +3 -0
  320. package/node_modules/rimraf/dist/esm/rimraf-manual.d.ts.map +1 -0
  321. package/node_modules/rimraf/dist/esm/rimraf-manual.js +5 -0
  322. package/node_modules/rimraf/dist/esm/rimraf-manual.js.map +1 -0
  323. package/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts +4 -0
  324. package/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts.map +1 -0
  325. package/node_modules/rimraf/dist/esm/rimraf-move-remove.js +133 -0
  326. package/node_modules/rimraf/dist/esm/rimraf-move-remove.js.map +1 -0
  327. package/node_modules/rimraf/dist/esm/rimraf-native.d.ts +4 -0
  328. package/node_modules/rimraf/dist/esm/rimraf-native.d.ts.map +1 -0
  329. package/node_modules/rimraf/dist/esm/rimraf-native.js +19 -0
  330. package/node_modules/rimraf/dist/esm/rimraf-native.js.map +1 -0
  331. package/node_modules/rimraf/dist/esm/rimraf-posix.d.ts +4 -0
  332. package/node_modules/rimraf/dist/esm/rimraf-posix.d.ts.map +1 -0
  333. package/node_modules/rimraf/dist/esm/rimraf-posix.js +98 -0
  334. package/node_modules/rimraf/dist/esm/rimraf-posix.js.map +1 -0
  335. package/node_modules/rimraf/dist/esm/rimraf-windows.d.ts +4 -0
  336. package/node_modules/rimraf/dist/esm/rimraf-windows.d.ts.map +1 -0
  337. package/node_modules/rimraf/dist/esm/rimraf-windows.js +154 -0
  338. package/node_modules/rimraf/dist/esm/rimraf-windows.js.map +1 -0
  339. package/node_modules/rimraf/dist/esm/use-native.d.ts +4 -0
  340. package/node_modules/rimraf/dist/esm/use-native.d.ts.map +1 -0
  341. package/node_modules/rimraf/dist/esm/use-native.js +15 -0
  342. package/node_modules/rimraf/dist/esm/use-native.js.map +1 -0
  343. package/node_modules/rimraf/package.json +92 -0
  344. package/package.json +152 -0
  345. package/scripts/install-scanners.js +258 -0
  346. package/scripts/watchdog.js +147 -0
  347. package/src/analyzers/CSSAnalyzer.js +297 -0
  348. package/src/analyzers/ConfigValidator.js +690 -0
  349. package/src/analyzers/ESLintAnalyzer.js +320 -0
  350. package/src/analyzers/JavaScriptAnalyzer.js +261 -0
  351. package/src/analyzers/PrettierFormatter.js +247 -0
  352. package/src/analyzers/PythonAnalyzer.js +283 -0
  353. package/src/analyzers/SecurityAnalyzer.js +729 -0
  354. package/src/analyzers/SparrowAnalyzer.js +341 -0
  355. package/src/analyzers/TypeScriptAnalyzer.js +247 -0
  356. package/src/analyzers/codeCloneDetector/analyzer.js +344 -0
  357. package/src/analyzers/codeCloneDetector/detector.js +250 -0
  358. package/src/analyzers/codeCloneDetector/index.js +192 -0
  359. package/src/analyzers/codeCloneDetector/parser.js +199 -0
  360. package/src/analyzers/codeCloneDetector/reporter.js +148 -0
  361. package/src/analyzers/codeCloneDetector/scanner.js +88 -0
  362. package/src/core/agentPool.js +1957 -0
  363. package/src/core/agentScheduler.js +3212 -0
  364. package/src/core/contextManager.js +709 -0
  365. package/src/core/flowExecutor.js +928 -0
  366. package/src/core/messageProcessor.js +808 -0
  367. package/src/core/orchestrator.js +584 -0
  368. package/src/core/stateManager.js +1500 -0
  369. package/src/index.js +972 -0
  370. package/src/interfaces/cli.js +553 -0
  371. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +208 -0
  372. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +236 -0
  373. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +138 -0
  374. package/src/interfaces/terminal/__tests__/smoke/components.test.js +137 -0
  375. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +350 -0
  376. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +156 -0
  377. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +332 -0
  378. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +256 -0
  379. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +388 -0
  380. package/src/interfaces/terminal/api/apiClient.js +299 -0
  381. package/src/interfaces/terminal/api/messageRouter.js +262 -0
  382. package/src/interfaces/terminal/api/session.js +266 -0
  383. package/src/interfaces/terminal/api/websocket.js +497 -0
  384. package/src/interfaces/terminal/components/AgentCreator.js +705 -0
  385. package/src/interfaces/terminal/components/AgentEditor.js +678 -0
  386. package/src/interfaces/terminal/components/AgentSwitcher.js +330 -0
  387. package/src/interfaces/terminal/components/ErrorBoundary.js +92 -0
  388. package/src/interfaces/terminal/components/ErrorPanel.js +264 -0
  389. package/src/interfaces/terminal/components/Header.js +28 -0
  390. package/src/interfaces/terminal/components/HelpPanel.js +231 -0
  391. package/src/interfaces/terminal/components/InputBox.js +118 -0
  392. package/src/interfaces/terminal/components/Layout.js +603 -0
  393. package/src/interfaces/terminal/components/LoadingSpinner.js +71 -0
  394. package/src/interfaces/terminal/components/MessageList.js +281 -0
  395. package/src/interfaces/terminal/components/MultilineTextInput.js +251 -0
  396. package/src/interfaces/terminal/components/SearchPanel.js +265 -0
  397. package/src/interfaces/terminal/components/SettingsPanel.js +415 -0
  398. package/src/interfaces/terminal/components/StatusBar.js +65 -0
  399. package/src/interfaces/terminal/components/TextInput.js +127 -0
  400. package/src/interfaces/terminal/config/agentEditorConstants.js +227 -0
  401. package/src/interfaces/terminal/config/constants.js +393 -0
  402. package/src/interfaces/terminal/index.js +168 -0
  403. package/src/interfaces/terminal/state/useAgentControl.js +496 -0
  404. package/src/interfaces/terminal/state/useAgents.js +537 -0
  405. package/src/interfaces/terminal/state/useConnection.js +444 -0
  406. package/src/interfaces/terminal/state/useMessages.js +630 -0
  407. package/src/interfaces/terminal/state/useTools.js +554 -0
  408. package/src/interfaces/terminal/utils/debugLogger.js +44 -0
  409. package/src/interfaces/terminal/utils/settingsStorage.js +232 -0
  410. package/src/interfaces/terminal/utils/theme.js +85 -0
  411. package/src/interfaces/webServer.js +5457 -0
  412. package/src/modules/fileExplorer/controller.js +413 -0
  413. package/src/modules/fileExplorer/index.js +37 -0
  414. package/src/modules/fileExplorer/middleware.js +92 -0
  415. package/src/modules/fileExplorer/routes.js +158 -0
  416. package/src/modules/fileExplorer/types.js +44 -0
  417. package/src/services/agentActivityService.js +399 -0
  418. package/src/services/aiService.js +2618 -0
  419. package/src/services/apiKeyManager.js +334 -0
  420. package/src/services/benchmarkService.js +196 -0
  421. package/src/services/budgetService.js +565 -0
  422. package/src/services/contextInjectionService.js +268 -0
  423. package/src/services/conversationCompactionService.js +1103 -0
  424. package/src/services/credentialVault.js +685 -0
  425. package/src/services/errorHandler.js +810 -0
  426. package/src/services/fileAttachmentService.js +547 -0
  427. package/src/services/flowContextService.js +189 -0
  428. package/src/services/memoryService.js +521 -0
  429. package/src/services/modelRouterService.js +365 -0
  430. package/src/services/modelsService.js +323 -0
  431. package/src/services/ollamaService.js +452 -0
  432. package/src/services/portRegistry.js +336 -0
  433. package/src/services/portTracker.js +223 -0
  434. package/src/services/projectDetector.js +404 -0
  435. package/src/services/promptService.js +372 -0
  436. package/src/services/qualityInspector.js +796 -0
  437. package/src/services/scheduleService.js +725 -0
  438. package/src/services/serviceRegistry.js +386 -0
  439. package/src/services/skillsService.js +486 -0
  440. package/src/services/telegramService.js +920 -0
  441. package/src/services/tokenCountingService.js +316 -0
  442. package/src/services/visualEditorBridge.js +1033 -0
  443. package/src/services/visualEditorServer.js +1727 -0
  444. package/src/services/whatsappService.js +663 -0
  445. package/src/tools/__tests__/webTool.e2e.test.js +569 -0
  446. package/src/tools/__tests__/webTool.unit.test.js +195 -0
  447. package/src/tools/agentCommunicationTool.js +1343 -0
  448. package/src/tools/agentDelayTool.js +498 -0
  449. package/src/tools/asyncToolManager.js +604 -0
  450. package/src/tools/baseTool.js +887 -0
  451. package/src/tools/browserTool.js +897 -0
  452. package/src/tools/cloneDetectionTool.js +581 -0
  453. package/src/tools/codeMapTool.js +857 -0
  454. package/src/tools/dependencyResolverTool.js +1212 -0
  455. package/src/tools/docxTool.js +623 -0
  456. package/src/tools/excelTool.js +636 -0
  457. package/src/tools/fileContentReplaceTool.js +840 -0
  458. package/src/tools/fileTreeTool.js +833 -0
  459. package/src/tools/filesystemTool.js +1217 -0
  460. package/src/tools/helpTool.js +198 -0
  461. package/src/tools/imageTool.js +1034 -0
  462. package/src/tools/importAnalyzerTool.js +1056 -0
  463. package/src/tools/jobDoneTool.js +388 -0
  464. package/src/tools/memoryTool.js +554 -0
  465. package/src/tools/pdfTool.js +627 -0
  466. package/src/tools/seekTool.js +883 -0
  467. package/src/tools/skillsTool.js +276 -0
  468. package/src/tools/staticAnalysisTool.js +2146 -0
  469. package/src/tools/taskManagerTool.js +2836 -0
  470. package/src/tools/terminalTool.js +2486 -0
  471. package/src/tools/userPromptTool.js +474 -0
  472. package/src/tools/videoTool.js +1139 -0
  473. package/src/tools/visionTool.js +507 -0
  474. package/src/tools/visualEditorTool.js +1175 -0
  475. package/src/tools/webTool.js +3114 -0
  476. package/src/tools/whatsappTool.js +457 -0
  477. package/src/types/agent.js +519 -0
  478. package/src/types/contextReference.js +972 -0
  479. package/src/types/conversation.js +730 -0
  480. package/src/types/toolCommand.js +747 -0
  481. package/src/utilities/attachmentValidator.js +288 -0
  482. package/src/utilities/browserStealth.js +630 -0
  483. package/src/utilities/configManager.js +618 -0
  484. package/src/utilities/constants.js +870 -0
  485. package/src/utilities/directoryAccessManager.js +566 -0
  486. package/src/utilities/fileProcessor.js +307 -0
  487. package/src/utilities/humanBehavior.js +453 -0
  488. package/src/utilities/jsonRepair.js +242 -0
  489. package/src/utilities/logger.js +436 -0
  490. package/src/utilities/platformUtils.js +255 -0
  491. package/src/utilities/platformUtils.test.js +98 -0
  492. package/src/utilities/stealthConstants.js +377 -0
  493. package/src/utilities/structuredFileValidator.js +699 -0
  494. package/src/utilities/tagParser.js +878 -0
  495. package/src/utilities/toolConstants.js +415 -0
  496. package/src/utilities/userDataDir.js +300 -0
  497. package/web-ui/build/brands/autopilot/favicon.svg +1 -0
  498. package/web-ui/build/brands/autopilot/logo.webp +0 -0
  499. package/web-ui/build/brands/onbuzz/favicon.svg +1 -0
  500. package/web-ui/build/brands/onbuzz/logo-text.webp +0 -0
  501. package/web-ui/build/brands/onbuzz/logo.webp +0 -0
  502. package/web-ui/build/index.html +15 -0
  503. package/web-ui/build/logo.png +0 -0
  504. package/web-ui/build/logo2.png +0 -0
  505. package/web-ui/build/static/index-SmQFfvBs.js +746 -0
  506. package/web-ui/build/static/index-V2ySwjHp.css +1 -0
@@ -0,0 +1,1177 @@
1
+ # Glob
2
+
3
+ Match files using the patterns the shell uses.
4
+
5
+ The most correct and second fastest glob implementation in
6
+ JavaScript. (See [**Comparison to Other JavaScript Glob
7
+ Implementations**](#comparisons-to-other-fnmatchglob-implementations)
8
+ at the bottom of this readme.)
9
+
10
+ ![a fun cartoon logo made of glob
11
+ characters](https://github.com/isaacs/node-glob/raw/main/logo/glob.png)
12
+
13
+ ## Usage
14
+
15
+ Install with npm
16
+
17
+ ```
18
+ npm i glob
19
+ ```
20
+
21
+ > [!NOTE]
22
+ > The npm package name is _not_ `node-glob` that's a
23
+ > different thing that was abandoned years ago. Just `glob`.
24
+
25
+ ```js
26
+ // load using import
27
+ import { glob, globSync, globStream, globStreamSync, Glob } from 'glob'
28
+ // or using commonjs, that's fine, too
29
+ const {
30
+ glob,
31
+ globSync,
32
+ globStream,
33
+ globStreamSync,
34
+ Glob,
35
+ } = require('glob')
36
+
37
+ // the main glob() and globSync() resolve/return array of filenames
38
+
39
+ // all js files, but don't look in node_modules
40
+ const jsfiles = await glob('**/*.js', { ignore: 'node_modules/**' })
41
+
42
+ // pass in a signal to cancel the glob walk
43
+ const stopAfter100ms = await glob('**/*.css', {
44
+ signal: AbortSignal.timeout(100),
45
+ })
46
+
47
+ // multiple patterns supported as well
48
+ const images = await glob(['css/*.{png,jpeg}', 'public/*.{png,jpeg}'])
49
+
50
+ // but of course you can do that with the glob pattern also
51
+ // the sync function is the same, just returns a string[] instead
52
+ // of Promise<string[]>
53
+ const imagesAlt = globSync('{css,public}/*.{png,jpeg}')
54
+
55
+ // you can also stream them, this is a Minipass stream
56
+ const filesStream = globStream(['**/*.dat', 'logs/**/*.log'])
57
+
58
+ // construct a Glob object if you wanna do it that way, which
59
+ // allows for much faster walks if you have to look in the same
60
+ // folder multiple times.
61
+ const g = new Glob('**/foo', {})
62
+ // glob objects are async iterators, can also do globIterate() or
63
+ // g.iterate(), same deal
64
+ for await (const file of g) {
65
+ console.log('found a foo file:', file)
66
+ }
67
+ // pass a glob as the glob options to reuse its settings and caches
68
+ const g2 = new Glob('**/bar', g)
69
+ // sync iteration works as well
70
+ for (const file of g2) {
71
+ console.log('found a bar file:', file)
72
+ }
73
+
74
+ // you can also pass withFileTypes: true to get Path objects
75
+ // these are like a fs.Dirent, but with some more added powers
76
+ // check out https://isaacs.github.io/path-scurry/classes/PathBase.html
77
+ // for more info on their API
78
+ const g3 = new Glob('**/baz/**', { withFileTypes: true })
79
+ g3.stream().on('data', path => {
80
+ console.log(
81
+ 'got a path object',
82
+ path.fullpath(),
83
+ path.isDirectory(),
84
+ path.readdirSync().map(e => e.name),
85
+ )
86
+ })
87
+
88
+ // if you use stat:true and withFileTypes, you can sort results
89
+ // by things like modified time, filter by permission mode, etc.
90
+ // All Stats fields will be available in that case. Slightly
91
+ // slower, though.
92
+ // For example:
93
+ const results = await glob('**', { stat: true, withFileTypes: true })
94
+
95
+ const timeSortedFiles = results
96
+ .sort((a, b) => a.mtimeMs - b.mtimeMs)
97
+ .map(path => path.fullpath())
98
+
99
+ const groupReadableFiles = results
100
+ .filter(path => path.mode & 0o040)
101
+ .map(path => path.fullpath())
102
+
103
+ // custom ignores can be done like this, for example by saying
104
+ // you'll ignore all markdown files, and all folders named 'docs'
105
+ const customIgnoreResults = await glob('**', {
106
+ ignore: {
107
+ ignored: p => /\.md$/.test(p.name),
108
+ childrenIgnored: p => p.isNamed('docs'),
109
+ },
110
+ })
111
+
112
+ // another fun use case, only return files with the same name as
113
+ // their parent folder, plus either `.ts` or `.js`
114
+ const folderNamedModules = await glob('**/*.{ts,js}', {
115
+ ignore: {
116
+ ignored: p => {
117
+ const pp = p.parent
118
+ return !(p.isNamed(pp.name + '.ts') || p.isNamed(pp.name + '.js'))
119
+ },
120
+ },
121
+ })
122
+
123
+ // find all files edited in the last hour, to do this, we ignore
124
+ // all of them that are more than an hour old
125
+ const newFiles = await glob('**', {
126
+ // need stat so we have mtime
127
+ stat: true,
128
+ // only want the files, not the dirs
129
+ nodir: true,
130
+ ignore: {
131
+ ignored: p => {
132
+ return new Date() - p.mtime > 60 * 60 * 1000
133
+ },
134
+ // could add similar childrenIgnored here as well, but
135
+ // directory mtime is inconsistent across platforms, so
136
+ // probably better not to, unless you know the system
137
+ // tracks this reliably.
138
+ },
139
+ })
140
+ ```
141
+
142
+ > [!NOTE]
143
+ > Glob patterns should always use `/` as a path separator,
144
+ > even on Windows systems, as `\` is used to escape glob
145
+ > characters. If you wish to use `\` as a path separator _instead
146
+ > of_ using it as an escape character on Windows platforms, you may
147
+ > set `windowsPathsNoEscape:true` in the options. In this mode,
148
+ > special glob characters cannot be escaped, making it impossible
149
+ > to match a literal `*` `?` and so on in filenames.
150
+
151
+ ## Command Line Interface
152
+
153
+ The glob CLI has been moved to the `glob-bin` package, and must
154
+ be installed separately, as of version 13.
155
+
156
+ ```
157
+ npm install glob-bin
158
+ ```
159
+
160
+ ## `glob(pattern: string | string[], options?: GlobOptions) => Promise<string[] | Path[]>`
161
+
162
+ Perform an asynchronous glob search for the pattern(s) specified.
163
+ Returns
164
+ [Path](https://isaacs.github.io/path-scurry/classes/PathBase)
165
+ objects if the `withFileTypes` option is set to `true`. See below
166
+ for full options field desciptions.
167
+
168
+ ## `globSync(pattern: string | string[], options?: GlobOptions) => string[] | Path[]`
169
+
170
+ Synchronous form of `glob()`.
171
+
172
+ Alias: `glob.sync()`
173
+
174
+ ## `globIterate(pattern: string | string[], options?: GlobOptions) => AsyncGenerator<string>`
175
+
176
+ Return an async iterator for walking glob pattern matches.
177
+
178
+ Alias: `glob.iterate()`
179
+
180
+ ## `globIterateSync(pattern: string | string[], options?: GlobOptions) => Generator<string>`
181
+
182
+ Return a sync iterator for walking glob pattern matches.
183
+
184
+ Alias: `glob.iterate.sync()`, `glob.sync.iterate()`
185
+
186
+ ## `globStream(pattern: string | string[], options?: GlobOptions) => Minipass<string | Path>`
187
+
188
+ Return a stream that emits all the strings or `Path` objects and
189
+ then emits `end` when completed.
190
+
191
+ Alias: `glob.stream()`
192
+
193
+ ## `globStreamSync(pattern: string | string[], options?: GlobOptions) => Minipass<string | Path>`
194
+
195
+ Syncronous form of `globStream()`. Will read all the matches as
196
+ fast as you consume them, even all in a single tick if you
197
+ consume them immediately, but will still respond to backpressure
198
+ if they're not consumed immediately.
199
+
200
+ Alias: `glob.stream.sync()`, `glob.sync.stream()`
201
+
202
+ ## `hasMagic(pattern: string | string[], options?: GlobOptions) => boolean`
203
+
204
+ Returns `true` if the provided pattern contains any "magic" glob
205
+ characters, given the options provided.
206
+
207
+ Brace expansion is not considered "magic" unless the
208
+ `magicalBraces` option is set, as brace expansion just turns one
209
+ string into an array of strings. So a pattern like `'x{a,b}y'`
210
+ would return `false`, because `'xay'` and `'xby'` both do not
211
+ contain any magic glob characters, and it's treated the same as
212
+ if you had called it on `['xay', 'xby']`. When
213
+ `magicalBraces:true` is in the options, brace expansion _is_
214
+ treated as a pattern having magic.
215
+
216
+ ## `escape(pattern: string, options?: GlobOptions) => string`
217
+
218
+ Escape all magic characters in a glob pattern, so that it will
219
+ only ever match literal strings
220
+
221
+ If the `windowsPathsNoEscape` option is used, then characters are
222
+ escaped by wrapping in `[]`, because a magic character wrapped in
223
+ a character class can only be satisfied by that exact character.
224
+
225
+ Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot
226
+ be escaped or unescaped.
227
+
228
+ ## `unescape(pattern: string, options?: GlobOptions) => string`
229
+
230
+ Un-escape a glob string that may contain some escaped characters.
231
+
232
+ If the `windowsPathsNoEscape` option is used, then square-brace
233
+ escapes are removed, but not backslash escapes. For example, it
234
+ will turn the string `'[*]'` into `*`, but it will not turn
235
+ `'\\*'` into `'*'`, because `\` is a path separator in
236
+ `windowsPathsNoEscape` mode.
237
+
238
+ When `windowsPathsNoEscape` is not set, then both brace escapes
239
+ and backslash escapes are removed.
240
+
241
+ Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot
242
+ be escaped or unescaped.
243
+
244
+ ## Class `Glob`
245
+
246
+ An object that can perform glob pattern traversals.
247
+
248
+ ### `const g = new Glob(pattern: string | string[], options: GlobOptions)`
249
+
250
+ Options object is required.
251
+
252
+ See full options descriptions below.
253
+
254
+ > [!NOTE]
255
+ > A previous `Glob` object can be passed as the
256
+ > `GlobOptions` to another `Glob` instantiation to re-use settings
257
+ > and caches with a new pattern.
258
+
259
+ Traversal functions can be called multiple times to run the walk
260
+ again.
261
+
262
+ ### `g.stream()`
263
+
264
+ Stream results asynchronously.
265
+
266
+ ### `g.streamSync()`
267
+
268
+ Stream results synchronously.
269
+
270
+ ### `g.iterate()`
271
+
272
+ Default async iteration function. Returns an AsyncGenerator that
273
+ iterates over the results.
274
+
275
+ ### `g.iterateSync()`
276
+
277
+ Default sync iteration function. Returns a Generator that
278
+ iterates over the results.
279
+
280
+ ### `g.walk()`
281
+
282
+ Returns a Promise that resolves to the results array.
283
+
284
+ ### `g.walkSync()`
285
+
286
+ Returns a results array.
287
+
288
+ ### Properties
289
+
290
+ All options are stored as properties on the `Glob` object.
291
+
292
+ - `opts` The options provided to the constructor.
293
+ - `patterns` An array of parsed immutable `Pattern` objects.
294
+
295
+ ## Options
296
+
297
+ Exported as `GlobOptions` TypeScript interface. A `GlobOptions`
298
+ object may be provided to any of the exported methods, and must
299
+ be provided to the `Glob` constructor.
300
+
301
+ All options are optional, boolean, and false by default, unless
302
+ otherwise noted.
303
+
304
+ All resolved options are added to the Glob object as properties.
305
+
306
+ If you are running many `glob` operations, you can pass a Glob
307
+ object as the `options` argument to a subsequent operation to
308
+ share the previously loaded cache.
309
+
310
+ - `cwd` String path or `file://` string or URL object. The
311
+ current working directory in which to search. Defaults to
312
+ `process.cwd()`. See also: "Windows, CWDs, Drive Letters, and
313
+ UNC Paths", below.
314
+
315
+ This option may be either a string path or a `file://` URL
316
+ object or string.
317
+
318
+ - `root` A string path resolved against the `cwd` option, which
319
+ is used as the starting point for absolute patterns that start
320
+ with `/`, (but not drive letters or UNC paths on Windows).
321
+
322
+ To start absolute and non-absolute patterns in the same path,
323
+ you can use `{root:''}`. However, be aware that on Windows
324
+ systems, a pattern like `x:/*` or `//host/share/*` will
325
+ _always_ start in the `x:/` or `//host/share` directory,
326
+ regardless of the `root` setting.
327
+
328
+ > [!NOTE] This _doesn't_ necessarily limit the walk to the
329
+ > `root` directory, and doesn't affect the cwd starting point
330
+ > for non-absolute patterns. A pattern containing `..` will
331
+ > still be able to traverse out of the root directory, if it
332
+ > is not an actual root directory on the filesystem, and any
333
+ > non-absolute patterns will be matched in the `cwd`. For
334
+ > example, the pattern `/../*` with `{root:'/some/path'}`
335
+ > will return all files in `/some`, not all files in
336
+ > `/some/path`. The pattern `*` with `{root:'/some/path'}`
337
+ > will return all the entries in the cwd, not the entries in
338
+ > `/some/path`.
339
+
340
+ - `windowsPathsNoEscape` Use `\\` as a path separator _only_, and
341
+ _never_ as an escape character. If set, all `\\` characters are
342
+ replaced with `/` in the pattern.
343
+
344
+ > [!NOTE]
345
+ > This makes it **impossible** to match against paths
346
+ > containing literal glob pattern characters, but allows matching
347
+ > with patterns constructed using `path.join()` and
348
+ > `path.resolve()` on Windows platforms, mimicking the (buggy!)
349
+ > behavior of Glob v7 and before on Windows. Please use with
350
+ > caution, and be mindful of [the caveat below about Windows
351
+ > paths](#windows). (For legacy reasons, this is also set if
352
+ > `allowWindowsEscape` is set to the exact value `false`.)
353
+
354
+ - `dot` Include `.dot` files in normal matches and `globstar`
355
+ matches. Note that an explicit dot in a portion of the pattern
356
+ will always match dot files.
357
+
358
+ - `magicalBraces` Treat brace expansion like `{a,b}` as a "magic"
359
+ pattern. Has no effect if {@link nobrace} is set.
360
+
361
+ Only has effect on the {@link hasMagic} function, no effect on
362
+ glob pattern matching itself.
363
+
364
+ - `dotRelative` Prepend all relative path strings with `./` (or
365
+ `.\` on Windows).
366
+
367
+ Without this option, returned relative paths are "bare", so
368
+ instead of returning `'./foo/bar'`, they are returned as
369
+ `'foo/bar'`.
370
+
371
+ Relative patterns starting with `'../'` are not prepended with
372
+ `./`, even if this option is set.
373
+
374
+ - `mark` Add a `/` character to directory matches. Note that this
375
+ requires additional stat calls.
376
+
377
+ - `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
378
+
379
+ - `noglobstar` Do not match `**` against multiple filenames. (Ie,
380
+ treat it as a normal `*` instead.)
381
+
382
+ - `noext` Do not match "extglob" patterns such as `+(a|b)`.
383
+
384
+ - `nocase` Perform a case-insensitive match. This defaults to
385
+ `true` on macOS and Windows systems, and `false` on all others.
386
+
387
+ > [!NOTE]
388
+ > `nocase` should only be explicitly set when it is
389
+ > known that the filesystem's case sensitivity differs from the
390
+ > platform default. If set `true` on case-sensitive file
391
+ > systems, or `false` on case-insensitive file systems, then the
392
+ > walk may return more or less results than expected.
393
+
394
+ - `maxDepth` Specify a number to limit the depth of the directory
395
+ traversal to this many levels below the `cwd`.
396
+
397
+ - `matchBase` Perform a basename-only match if the pattern does
398
+ not contain any slash characters. That is, `*.js` would be
399
+ treated as equivalent to `**/*.js`, matching all js files in
400
+ all directories.
401
+
402
+ - `nodir` Do not match directories, only files. (Note: to match
403
+ _only_ directories, put a `/` at the end of the pattern.)
404
+
405
+ > [!NOTE]
406
+ > When `follow` and `nodir` are both set, then symbolic
407
+ > links to directories are also omitted.
408
+
409
+ - `stat` Call `lstat()` on all entries, whether required or not
410
+ to determine whether it's a valid match. When used with
411
+ `withFileTypes`, this means that matches will include data such
412
+ as modified time, permissions, and so on. Note that this will
413
+ incur a performance cost due to the added system calls.
414
+
415
+ - `ignore` string or string[], or an object with `ignored` and
416
+ `childrenIgnored` methods.
417
+
418
+ If a string or string[] is provided, then this is treated as
419
+ a glob pattern or array of glob patterns to exclude from
420
+ matches. To ignore all children within a directory, as well
421
+ as the entry itself, append `'/**'` to the ignore pattern.
422
+
423
+ If an object is provided that has `ignored(path)` and/or
424
+ `childrenIgnored(path)` methods, then these methods will be
425
+ called to determine whether any Path is a match or if its
426
+ children should be traversed, respectively.
427
+
428
+ The `path` argument to the methods will be a
429
+ [`path-scurry`](https://isaacs.github.io/path-scurry/index.html)
430
+ [`Path`](https://isaacs.github.io/path-scurry/classes/PathBase)
431
+ object, which extends
432
+ [`fs.Dirent`](https://nodejs.org/docs/latest/api/fs.html#class-fsdirent)
433
+ with additional useful methods like
434
+ [`.fullpath()`](https://isaacs.github.io/path-scurry/classes/PathBase.html#fullpath),
435
+ [`.relative()`](https://isaacs.github.io/path-scurry/classes/PathBase.html#relative),
436
+ and more.
437
+
438
+ > [!NOTE]
439
+ > `ignore` patterns are _always_ in `dot:true` mode,
440
+ > regardless of any other settings.
441
+
442
+ - `follow` Follow symlinked directories when expanding `**`
443
+ patterns. This can result in a lot of duplicate references in
444
+ the presence of cyclic links, and make performance quite bad.
445
+
446
+ By default, a `**` in a pattern will follow 1 symbolic link if
447
+ it is not the first item in the pattern, or none if it is the
448
+ first item in the pattern, following the same behavior as Bash.
449
+
450
+ > [!NOTE]
451
+ > When `follow` and `nodir` are both set, then symbolic
452
+ > links to directories are also omitted.
453
+
454
+ - `realpath` Set to true to call `fs.realpath` on all of the
455
+ results. In the case of an entry that cannot be resolved, the
456
+ entry is omitted. This incurs a slight performance penalty, of
457
+ course, because of the added system calls.
458
+
459
+ - `absolute` Set to true to always receive absolute paths for
460
+ matched files. Set to `false` to always receive relative paths
461
+ for matched files.
462
+
463
+ By default, when this option is not set, absolute paths are
464
+ returned for patterns that are absolute, and otherwise paths
465
+ are returned that are relative to the `cwd` setting.
466
+
467
+ This does _not_ make an extra system call to get the realpath,
468
+ it only does string path resolution.
469
+
470
+ `absolute` may not be used along with `withFileTypes`.
471
+
472
+ - `posix` Set to true to use `/` as the path separator in
473
+ returned results. On POSIX systems, this has no effect. On
474
+ Windows systems, this will return `/` delimited path results,
475
+ and absolute paths will be returned in their fully resolved UNC
476
+ path form, e.g. instead of `'C:\\foo\\bar'`, it will return
477
+ `//?/C:/foo/bar`.
478
+
479
+ - `platform` Defaults to the value of `process.platform` if
480
+ available, or `'linux'` if not. Setting `platform:'win32'` on
481
+ non-Windows systems may cause strange behavior.
482
+
483
+ - `withFileTypes` Return
484
+ [`path-scurry`](http://npm.im/path-scurry)
485
+ [`Path`](https://isaacs.github.io/path-scurry/classes/PathBase.html)
486
+ objects instead of strings. These are similar to a NodeJS
487
+ `fs.Dirent` object, but with additional methods and properties.
488
+
489
+ `withFileTypes` may not be used along with `absolute`.
490
+
491
+ - `signal` An AbortSignal which will cancel the Glob walk when
492
+ triggered.
493
+
494
+ - `fs` An override object to pass in custom filesystem methods.
495
+ See [`path-scurry`
496
+ docs](https://isaacs.github.io/path-scurry/interfaces/FSOption.html)
497
+ for what can be overridden.
498
+
499
+ - `scurry` A
500
+ [`PathScurry`](https://isaacs.github.io/path-scurry/classes/PathScurryBase.html)
501
+ object used to traverse the file system. If the `nocase` option
502
+ is set explicitly, then any provided `scurry` object must match
503
+ this setting.
504
+
505
+ - `includeChildMatches` boolean, default `true`. Do not match any
506
+ children of any matches. For example, the pattern `**\/foo`
507
+ would match `a/foo`, but not `a/foo/b/foo` in this mode.
508
+
509
+ This is especially useful for cases like "find all
510
+ `node_modules` folders, but not the ones in `node_modules`".
511
+
512
+ In order to support this, the `Ignore` implementation must
513
+ support an `add(pattern: string)` method. If using the default
514
+ `Ignore` class, then this is fine, but if this is set to
515
+ `false`, and a custom `Ignore` is provided that does not have
516
+ an `add()` method, then it will throw an error.
517
+
518
+ For example:
519
+
520
+ ```js
521
+ const results = await glob(
522
+ [
523
+ // likely to match first, since it's just a stat
524
+ 'a/b/c/d/e/f',
525
+
526
+ // this pattern is more complicated! It must to various readdir()
527
+ // calls and test the results against a regular expression, and that
528
+ // is certainly going to take a little bit longer.
529
+ //
530
+ // So, later on, it encounters a match at 'a/b/c/d/e', but it's too
531
+ // late to ignore a/b/c/d/e/f, because it's already been emitted.
532
+ 'a/[bdf]/?/[a-z]/*',
533
+ ],
534
+ { includeChildMatches: false },
535
+ )
536
+ ```
537
+
538
+ It's best to only set this to `false` if you can be reasonably
539
+ sure that no components of the pattern will potentially match
540
+ one another's file system descendants, or if the occasional
541
+ included child entry will not cause problems.
542
+
543
+ > [!NOTE]
544
+ > It _only_ ignores matches that would be a descendant
545
+ > of a previous match, and only if that descendant is matched
546
+ > _after_ the ancestor is encountered. Since the file system walk
547
+ > happens in indeterminate order, it's possible that a match will
548
+ > already be added before its ancestor, if multiple or braced
549
+ > patterns are used.
550
+
551
+ ## Glob Primer
552
+
553
+ Much more information about glob pattern expansion can be found
554
+ by running `man bash` and searching for `Pattern Matching`.
555
+
556
+ "Globs" are the patterns you type when you do stuff like `ls
557
+ *.js` on the command line, or put `build/*` in a `.gitignore`
558
+ file.
559
+
560
+ Before parsing the path part patterns, braced sections are
561
+ expanded into a set. Braced sections start with `{` and end with
562
+ `}`, with 2 or more comma-delimited sections within. Braced
563
+ sections may contain slash characters, so `a{/b/c,bcd}` would
564
+ expand into `a/b/c` and `abcd`.
565
+
566
+ The following characters have special magic meaning when used in
567
+ a path portion. With the exception of `**`, none of these match
568
+ path separators (ie, `/` on all platforms, and `\` on Windows).
569
+
570
+ - `*` Matches 0 or more characters in a single path portion.
571
+ When alone in a path portion, it must match at least 1
572
+ character. If `dot:true` is not specified, then `*` will not
573
+ match against a `.` character at the start of a path portion.
574
+ - `?` Matches 1 character. If `dot:true` is not specified, then
575
+ `?` will not match against a `.` character at the start of a
576
+ path portion.
577
+ - `[...]` Matches a range of characters, similar to a RegExp
578
+ range. If the first character of the range is `!` or `^` then
579
+ it matches any character not in the range. If the first
580
+ character is `]`, then it will be considered the same as `\]`,
581
+ rather than the end of the character class.
582
+ - `!(pattern|pattern|pattern)` Matches anything that does not
583
+ match any of the patterns provided. May _not_ contain `/`
584
+ characters. Similar to `*`, if alone in a path portion, then
585
+ the path portion must have at least one character.
586
+ - `?(pattern|pattern|pattern)` Matches zero or one occurrence of
587
+ the patterns provided. May _not_ contain `/` characters.
588
+ - `+(pattern|pattern|pattern)` Matches one or more occurrences of
589
+ the patterns provided. May _not_ contain `/` characters.
590
+ - `*(a|b|c)` Matches zero or more occurrences of the patterns
591
+ provided. May _not_ contain `/` characters.
592
+ - `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
593
+ provided. May _not_ contain `/` characters.
594
+ - `**` If a "globstar" is alone in a path portion, then it
595
+ matches zero or more directories and subdirectories searching
596
+ for matches. It does not crawl symlinked directories, unless
597
+ `{follow:true}` is passed in the options object. A pattern
598
+ like `a/b/**` will only match `a/b` if it is a directory.
599
+ Follows 1 symbolic link if not the first item in the pattern,
600
+ or 0 if it is the first item, unless `follow:true` is set, in
601
+ which case it follows all symbolic links.
602
+
603
+ `[:class:]` patterns are supported by this implementation, but
604
+ `[=c=]` and `[.symbol.]` style class patterns are not.
605
+
606
+ ### Dots
607
+
608
+ If a file or directory path portion has a `.` as the first
609
+ character, then it will not match any glob pattern unless that
610
+ pattern's corresponding path part also has a `.` as its first
611
+ character.
612
+
613
+ For example, the pattern `a/.*/c` would match the file at
614
+ `a/.b/c`. However the pattern `a/*/c` would not, because `*` does
615
+ not start with a dot character.
616
+
617
+ You can make glob treat dots as normal characters by setting
618
+ `dot:true` in the options.
619
+
620
+ ### Basename Matching
621
+
622
+ If you set `matchBase:true` in the options, and the pattern has
623
+ no slashes in it, then it will seek for any file anywhere in the
624
+ tree with a matching basename. For example, `*.js` would match
625
+ `test/simple/basic.js`.
626
+
627
+ ### Empty Sets
628
+
629
+ If no matching files are found, then an empty array is returned.
630
+ This differs from the shell, where the pattern itself is
631
+ returned. For example:
632
+
633
+ ```sh
634
+ $ echo a*s*d*f
635
+ a*s*d*f
636
+ ```
637
+
638
+ ## Comparisons to other fnmatch/glob implementations
639
+
640
+ While strict compliance with the existing standards is a
641
+ worthwhile goal, some discrepancies exist between node-glob and
642
+ other implementations, and are intentional.
643
+
644
+ The double-star character `**` is supported by default, unless
645
+ the `noglobstar` flag is set. This is supported in the manner of
646
+ bsdglob and bash 5, where `**` only has special significance if
647
+ it is the only thing in a path part. That is, `a/**/b` will match
648
+ `a/x/y/b`, but `a/**b` will not.
649
+
650
+ > [!NOTE]
651
+ > Symlinked directories are not traversed as part of a
652
+ > `**`, though their contents may match against subsequent portions
653
+ > of the pattern. This prevents infinite loops and duplicates and
654
+ > the like. You can force glob to traverse symlinks with `**` by
655
+ > setting `{follow:true}` in the options.
656
+
657
+ There is no equivalent of the `nonull` option. A pattern that
658
+ does not find any matches simply resolves to nothing. (An empty
659
+ array, immediately ended stream, etc.)
660
+
661
+ If brace expansion is not disabled, then it is performed before
662
+ any other interpretation of the glob pattern. Thus, a pattern
663
+ like `+(a|{b),c)}`, which would not be valid in bash or zsh, is
664
+ expanded **first** into the set of `+(a|b)` and `+(a|c)`, and
665
+ those patterns are checked for validity. Since those two are
666
+ valid, matching proceeds.
667
+
668
+ The character class patterns `[:class:]` (POSIX standard named
669
+ classes) style class patterns are supported and Unicode-aware,
670
+ but `[=c=]` (locale-specific character collation weight), and
671
+ `[.symbol.]` (collating symbol), are not.
672
+
673
+ ### Repeated Slashes
674
+
675
+ Unlike Bash and zsh, repeated `/` are always coalesced into a
676
+ single path separator.
677
+
678
+ ### Comments and Negation
679
+
680
+ Previously, this module let you mark a pattern as a "comment" if
681
+ it started with a `#` character, or a "negated" pattern if it
682
+ started with a `!` character.
683
+
684
+ These options were deprecated in version 5, and removed in
685
+ version 6.
686
+
687
+ To specify things that should not match, use the `ignore` option.
688
+
689
+ ## Windows
690
+
691
+ **Please only use forward-slashes in glob expressions.**
692
+
693
+ Though Windows uses either `/` or `\` as its path separator, only
694
+ `/` characters are used by this glob implementation. You must use
695
+ forward-slashes **only** in glob expressions. Back-slashes will
696
+ always be interpreted as escape characters, not path separators.
697
+
698
+ Results from absolute patterns such as `/foo/*` are mounted onto
699
+ the root setting using `path.join`. On Windows, this will by
700
+ default result in `/foo/*` matching `C:\foo\bar.txt`.
701
+
702
+ To automatically coerce all `\` characters to `/` in pattern
703
+ strings, **thus making it impossible to escape literal glob
704
+ characters**, you may set the `windowsPathsNoEscape` option to
705
+ `true`.
706
+
707
+ ### Windows, CWDs, Drive Letters, and UNC Paths
708
+
709
+ On POSIX systems, when a pattern starts with `/`, any `cwd`
710
+ option is ignored, and the traversal starts at `/`, plus any
711
+ non-magic path portions specified in the pattern.
712
+
713
+ On Windows systems, the behavior is similar, but the concept of
714
+ an "absolute path" is somewhat more involved.
715
+
716
+ #### UNC Paths
717
+
718
+ A UNC path may be used as the start of a pattern on Windows
719
+ platforms. For example, a pattern like: `//?/x:/*` will return
720
+ all file entries in the root of the `x:` drive. A pattern like
721
+ `//ComputerName/Share/*` will return all files in the associated
722
+ share.
723
+
724
+ UNC path roots are always compared case insensitively.
725
+
726
+ #### Drive Letters
727
+
728
+ A pattern starting with a drive letter, like `c:/*`, will search
729
+ in that drive, regardless of any `cwd` option provided.
730
+
731
+ If the pattern starts with `/`, and is not a UNC path, and there
732
+ is an explicit `cwd` option set with a drive letter, then the
733
+ drive letter in the `cwd` is used as the root of the directory
734
+ traversal.
735
+
736
+ For example, `glob('/tmp', { cwd: 'c:/any/thing' })` will return
737
+ `['c:/tmp']` as the result.
738
+
739
+ If an explicit `cwd` option is not provided, and the pattern
740
+ starts with `/`, then the traversal will run on the root of the
741
+ drive provided as the `cwd` option. (That is, it is the result of
742
+ `path.resolve('/')`.)
743
+
744
+ ## Race Conditions
745
+
746
+ Glob searching, by its very nature, is susceptible to race
747
+ conditions, since it relies on directory walking.
748
+
749
+ As a result, it is possible that a file that exists when glob
750
+ looks for it may have been deleted or modified by the time it
751
+ returns the result.
752
+
753
+ By design, this implementation caches all readdir calls that it
754
+ makes, in order to cut down on system overhead. However, this
755
+ also makes it even more susceptible to races, especially if the
756
+ cache object is reused between glob calls.
757
+
758
+ Users are thus advised not to use a glob result as a guarantee of
759
+ filesystem state in the face of rapid changes. For the vast
760
+ majority of operations, this is never a problem.
761
+
762
+ ### See Also:
763
+
764
+ - `man sh`
765
+ - `man bash` [Pattern
766
+ Matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html)
767
+ - `man 3 fnmatch`
768
+ - `man 5 gitignore`
769
+ - [minimatch documentation](https://github.com/isaacs/minimatch)
770
+
771
+ ## Glob Logo
772
+
773
+ Glob's logo was created by [Tanya
774
+ Brassie](http://tanyabrassie.com/). Logo files can be found
775
+ [here](https://github.com/isaacs/node-glob/tree/master/logo).
776
+
777
+ The logo is licensed under a [Creative Commons
778
+ Attribution-ShareAlike 4.0 International
779
+ License](https://creativecommons.org/licenses/by-sa/4.0/).
780
+
781
+ ## Contributing
782
+
783
+ Any change to behavior (including bugfixes) must come with a
784
+ test.
785
+
786
+ Patches that fail tests or reduce performance will be rejected.
787
+
788
+ ```sh
789
+ # to run tests
790
+ npm test
791
+
792
+ # to re-generate test fixtures
793
+ npm run test-regen
794
+
795
+ # run the benchmarks
796
+ npm run bench
797
+
798
+ # to profile javascript
799
+ npm run prof
800
+ ```
801
+
802
+ ## Comparison to Other JavaScript Glob Implementations
803
+
804
+ **tl;dr**
805
+
806
+ - If you want glob matching that is as faithful as possible to
807
+ Bash pattern expansion semantics, and as fast as possible
808
+ within that constraint, _use this module_.
809
+ - If you are reasonably sure that the patterns you will encounter
810
+ are relatively simple, and want the absolutely fastest glob
811
+ matcher out there, _use [fast-glob](http://npm.im/fast-glob)_.
812
+ - If you are reasonably sure that the patterns you will encounter
813
+ are relatively simple, and want the convenience of
814
+ automatically respecting `.gitignore` files, _use
815
+ [globby](http://npm.im/globby)_.
816
+
817
+ There are some other glob matcher libraries on npm, but these
818
+ three are (in my opinion, as of 2023) the best.
819
+
820
+ ---
821
+
822
+ **full explanation**
823
+
824
+ Every library reflects a set of opinions and priorities in the
825
+ trade-offs it makes. Other than this library, I can personally
826
+ recommend both [globby](http://npm.im/globby) and
827
+ [fast-glob](http://npm.im/fast-glob), though they differ in their
828
+ benefits and drawbacks.
829
+
830
+ Both have very nice APIs and are reasonably fast.
831
+
832
+ `fast-glob` is, as far as I am aware, the fastest glob
833
+ implementation in JavaScript today. However, there are many
834
+ cases where the choices that `fast-glob` makes in pursuit of
835
+ speed mean that its results differ from the results returned by
836
+ Bash and other sh-like shells, which may be surprising.
837
+
838
+ In my testing, `fast-glob` is around 10-20% faster than this
839
+ module when walking over 200k files nested 4 directories
840
+ deep[1](#fn-webscale). However, there are some inconsistencies
841
+ with Bash matching behavior that this module does not suffer
842
+ from:
843
+
844
+ - `**` only matches files, not directories
845
+ - `..` path portions are not handled unless they appear at the
846
+ start of the pattern
847
+ - `./!(<pattern>)` will not match any files that _start_ with
848
+ `<pattern>`, even if they do not match `<pattern>`. For
849
+ example, `!(9).txt` will not match `9999.txt`.
850
+ - Some brace patterns in the middle of a pattern will result in
851
+ failing to find certain matches.
852
+ - Extglob patterns are allowed to contain `/` characters.
853
+
854
+ Globby exhibits all of the same pattern semantics as fast-glob,
855
+ (as it is a wrapper around fast-glob) and is slightly slower than
856
+ node-glob (by about 10-20% in the benchmark test set, or in other
857
+ words, anywhere from 20-50% slower than fast-glob). However, it
858
+ adds some API conveniences that may be worth the costs.
859
+
860
+ - Support for `.gitignore` and other ignore files.
861
+ - Support for negated globs (ie, patterns starting with `!`
862
+ rather than using a separate `ignore` option).
863
+
864
+ The priority of this module is "correctness" in the sense of
865
+ performing a glob pattern expansion as faithfully as possible to
866
+ the behavior of Bash and other sh-like shells, with as much speed
867
+ as possible.
868
+
869
+ > [!NOTE]
870
+ > Prior versions of `node-glob` are _not_ on this list.
871
+ > Former versions of this module are far too slow for any cases
872
+ > where performance matters at all, and were designed with APIs
873
+ > that are extremely dated by current JavaScript standards.
874
+
875
+ ---
876
+
877
+ <small id="fn-webscale">[1]: In the cases where this module
878
+ returns results and `fast-glob` doesn't, it's even faster, of
879
+ course.</small>
880
+
881
+ ![lumpy space princess saying 'oh my GLOB'](https://github.com/isaacs/node-glob/raw/main/oh-my-glob.gif)
882
+
883
+ ### Benchmark Results
884
+
885
+ The first number is time, smaller is better.
886
+
887
+ The second number is the count of results returned.
888
+
889
+ ```
890
+ --- pattern: '**' ---
891
+ ~~ sync ~~
892
+ node fast-glob sync 0m0.598s 200364
893
+ node globby sync 0m0.765s 200364
894
+ node current globSync mjs 0m0.683s 222656
895
+ node current glob syncStream 0m0.649s 222656
896
+ ~~ async ~~
897
+ node fast-glob async 0m0.350s 200364
898
+ node globby async 0m0.509s 200364
899
+ node current glob async mjs 0m0.463s 222656
900
+ node current glob stream 0m0.411s 222656
901
+
902
+ --- pattern: '**/..' ---
903
+ ~~ sync ~~
904
+ node fast-glob sync 0m0.486s 0
905
+ node globby sync 0m0.769s 200364
906
+ node current globSync mjs 0m0.564s 2242
907
+ node current glob syncStream 0m0.583s 2242
908
+ ~~ async ~~
909
+ node fast-glob async 0m0.283s 0
910
+ node globby async 0m0.512s 200364
911
+ node current glob async mjs 0m0.299s 2242
912
+ node current glob stream 0m0.312s 2242
913
+
914
+ --- pattern: './**/0/**/0/**/0/**/0/**/*.txt' ---
915
+ ~~ sync ~~
916
+ node fast-glob sync 0m0.490s 10
917
+ node globby sync 0m0.517s 10
918
+ node current globSync mjs 0m0.540s 10
919
+ node current glob syncStream 0m0.550s 10
920
+ ~~ async ~~
921
+ node fast-glob async 0m0.290s 10
922
+ node globby async 0m0.296s 10
923
+ node current glob async mjs 0m0.278s 10
924
+ node current glob stream 0m0.302s 10
925
+
926
+ --- pattern: './**/[01]/**/[12]/**/[23]/**/[45]/**/*.txt' ---
927
+ ~~ sync ~~
928
+ node fast-glob sync 0m0.500s 160
929
+ node globby sync 0m0.528s 160
930
+ node current globSync mjs 0m0.556s 160
931
+ node current glob syncStream 0m0.573s 160
932
+ ~~ async ~~
933
+ node fast-glob async 0m0.283s 160
934
+ node globby async 0m0.301s 160
935
+ node current glob async mjs 0m0.306s 160
936
+ node current glob stream 0m0.322s 160
937
+
938
+ --- pattern: './**/0/**/0/**/*.txt' ---
939
+ ~~ sync ~~
940
+ node fast-glob sync 0m0.502s 5230
941
+ node globby sync 0m0.527s 5230
942
+ node current globSync mjs 0m0.544s 5230
943
+ node current glob syncStream 0m0.557s 5230
944
+ ~~ async ~~
945
+ node fast-glob async 0m0.285s 5230
946
+ node globby async 0m0.305s 5230
947
+ node current glob async mjs 0m0.304s 5230
948
+ node current glob stream 0m0.310s 5230
949
+
950
+ --- pattern: '**/*.txt' ---
951
+ ~~ sync ~~
952
+ node fast-glob sync 0m0.580s 200023
953
+ node globby sync 0m0.771s 200023
954
+ node current globSync mjs 0m0.685s 200023
955
+ node current glob syncStream 0m0.649s 200023
956
+ ~~ async ~~
957
+ node fast-glob async 0m0.349s 200023
958
+ node globby async 0m0.509s 200023
959
+ node current glob async mjs 0m0.427s 200023
960
+ node current glob stream 0m0.388s 200023
961
+
962
+ --- pattern: '{**/*.txt,**/?/**/*.txt,**/?/**/?/**/*.txt,**/?/**/?/**/?/**/*.txt,**/?/**/?/**/?/**/?/**/*.txt}' ---
963
+ ~~ sync ~~
964
+ node fast-glob sync 0m0.589s 200023
965
+ node globby sync 0m0.771s 200023
966
+ node current globSync mjs 0m0.716s 200023
967
+ node current glob syncStream 0m0.684s 200023
968
+ ~~ async ~~
969
+ node fast-glob async 0m0.351s 200023
970
+ node globby async 0m0.518s 200023
971
+ node current glob async mjs 0m0.462s 200023
972
+ node current glob stream 0m0.468s 200023
973
+
974
+ --- pattern: '**/5555/0000/*.txt' ---
975
+ ~~ sync ~~
976
+ node fast-glob sync 0m0.496s 1000
977
+ node globby sync 0m0.519s 1000
978
+ node current globSync mjs 0m0.539s 1000
979
+ node current glob syncStream 0m0.567s 1000
980
+ ~~ async ~~
981
+ node fast-glob async 0m0.285s 1000
982
+ node globby async 0m0.299s 1000
983
+ node current glob async mjs 0m0.305s 1000
984
+ node current glob stream 0m0.301s 1000
985
+
986
+ --- pattern: './**/0/**/../[01]/**/0/../**/0/*.txt' ---
987
+ ~~ sync ~~
988
+ node fast-glob sync 0m0.484s 0
989
+ node globby sync 0m0.507s 0
990
+ node current globSync mjs 0m0.577s 4880
991
+ node current glob syncStream 0m0.586s 4880
992
+ ~~ async ~~
993
+ node fast-glob async 0m0.280s 0
994
+ node globby async 0m0.298s 0
995
+ node current glob async mjs 0m0.327s 4880
996
+ node current glob stream 0m0.324s 4880
997
+
998
+ --- pattern: '**/????/????/????/????/*.txt' ---
999
+ ~~ sync ~~
1000
+ node fast-glob sync 0m0.547s 100000
1001
+ node globby sync 0m0.673s 100000
1002
+ node current globSync mjs 0m0.626s 100000
1003
+ node current glob syncStream 0m0.618s 100000
1004
+ ~~ async ~~
1005
+ node fast-glob async 0m0.315s 100000
1006
+ node globby async 0m0.414s 100000
1007
+ node current glob async mjs 0m0.366s 100000
1008
+ node current glob stream 0m0.345s 100000
1009
+
1010
+ --- pattern: './{**/?{/**/?{/**/?{/**/?,,,,},,,,},,,,},,,}/**/*.txt' ---
1011
+ ~~ sync ~~
1012
+ node fast-glob sync 0m0.588s 100000
1013
+ node globby sync 0m0.670s 100000
1014
+ node current globSync mjs 0m0.717s 200023
1015
+ node current glob syncStream 0m0.687s 200023
1016
+ ~~ async ~~
1017
+ node fast-glob async 0m0.343s 100000
1018
+ node globby async 0m0.418s 100000
1019
+ node current glob async mjs 0m0.519s 200023
1020
+ node current glob stream 0m0.451s 200023
1021
+
1022
+ --- pattern: '**/!(0|9).txt' ---
1023
+ ~~ sync ~~
1024
+ node fast-glob sync 0m0.573s 160023
1025
+ node globby sync 0m0.731s 160023
1026
+ node current globSync mjs 0m0.680s 180023
1027
+ node current glob syncStream 0m0.659s 180023
1028
+ ~~ async ~~
1029
+ node fast-glob async 0m0.345s 160023
1030
+ node globby async 0m0.476s 160023
1031
+ node current glob async mjs 0m0.427s 180023
1032
+ node current glob stream 0m0.388s 180023
1033
+
1034
+ --- pattern: './{*/**/../{*/**/../{*/**/../{*/**/../{*/**,,,,},,,,},,,,},,,,},,,,}/*.txt' ---
1035
+ ~~ sync ~~
1036
+ node fast-glob sync 0m0.483s 0
1037
+ node globby sync 0m0.512s 0
1038
+ node current globSync mjs 0m0.811s 200023
1039
+ node current glob syncStream 0m0.773s 200023
1040
+ ~~ async ~~
1041
+ node fast-glob async 0m0.280s 0
1042
+ node globby async 0m0.299s 0
1043
+ node current glob async mjs 0m0.617s 200023
1044
+ node current glob stream 0m0.568s 200023
1045
+
1046
+ --- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/*.txt' ---
1047
+ ~~ sync ~~
1048
+ node fast-glob sync 0m0.485s 0
1049
+ node globby sync 0m0.507s 0
1050
+ node current globSync mjs 0m0.759s 200023
1051
+ node current glob syncStream 0m0.740s 200023
1052
+ ~~ async ~~
1053
+ node fast-glob async 0m0.281s 0
1054
+ node globby async 0m0.297s 0
1055
+ node current glob async mjs 0m0.544s 200023
1056
+ node current glob stream 0m0.464s 200023
1057
+
1058
+ --- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/*.txt' ---
1059
+ ~~ sync ~~
1060
+ node fast-glob sync 0m0.486s 0
1061
+ node globby sync 0m0.513s 0
1062
+ node current globSync mjs 0m0.734s 200023
1063
+ node current glob syncStream 0m0.696s 200023
1064
+ ~~ async ~~
1065
+ node fast-glob async 0m0.286s 0
1066
+ node globby async 0m0.296s 0
1067
+ node current glob async mjs 0m0.506s 200023
1068
+ node current glob stream 0m0.483s 200023
1069
+
1070
+ --- pattern: './0/**/../1/**/../2/**/../3/**/../4/**/../5/**/../6/**/../7/**/*.txt' ---
1071
+ ~~ sync ~~
1072
+ node fast-glob sync 0m0.060s 0
1073
+ node globby sync 0m0.074s 0
1074
+ node current globSync mjs 0m0.067s 0
1075
+ node current glob syncStream 0m0.066s 0
1076
+ ~~ async ~~
1077
+ node fast-glob async 0m0.060s 0
1078
+ node globby async 0m0.075s 0
1079
+ node current glob async mjs 0m0.066s 0
1080
+ node current glob stream 0m0.067s 0
1081
+
1082
+ --- pattern: './**/?/**/?/**/?/**/?/**/*.txt' ---
1083
+ ~~ sync ~~
1084
+ node fast-glob sync 0m0.568s 100000
1085
+ node globby sync 0m0.651s 100000
1086
+ node current globSync mjs 0m0.619s 100000
1087
+ node current glob syncStream 0m0.617s 100000
1088
+ ~~ async ~~
1089
+ node fast-glob async 0m0.332s 100000
1090
+ node globby async 0m0.409s 100000
1091
+ node current glob async mjs 0m0.372s 100000
1092
+ node current glob stream 0m0.351s 100000
1093
+
1094
+ --- pattern: '**/*/**/*/**/*/**/*/**' ---
1095
+ ~~ sync ~~
1096
+ node fast-glob sync 0m0.603s 200113
1097
+ node globby sync 0m0.798s 200113
1098
+ node current globSync mjs 0m0.730s 222137
1099
+ node current glob syncStream 0m0.693s 222137
1100
+ ~~ async ~~
1101
+ node fast-glob async 0m0.356s 200113
1102
+ node globby async 0m0.525s 200113
1103
+ node current glob async mjs 0m0.508s 222137
1104
+ node current glob stream 0m0.455s 222137
1105
+
1106
+ --- pattern: './**/*/**/*/**/*/**/*/**/*.txt' ---
1107
+ ~~ sync ~~
1108
+ node fast-glob sync 0m0.622s 200000
1109
+ node globby sync 0m0.792s 200000
1110
+ node current globSync mjs 0m0.722s 200000
1111
+ node current glob syncStream 0m0.695s 200000
1112
+ ~~ async ~~
1113
+ node fast-glob async 0m0.369s 200000
1114
+ node globby async 0m0.527s 200000
1115
+ node current glob async mjs 0m0.502s 200000
1116
+ node current glob stream 0m0.481s 200000
1117
+
1118
+ --- pattern: '**/*.txt' ---
1119
+ ~~ sync ~~
1120
+ node fast-glob sync 0m0.588s 200023
1121
+ node globby sync 0m0.771s 200023
1122
+ node current globSync mjs 0m0.684s 200023
1123
+ node current glob syncStream 0m0.658s 200023
1124
+ ~~ async ~~
1125
+ node fast-glob async 0m0.352s 200023
1126
+ node globby async 0m0.516s 200023
1127
+ node current glob async mjs 0m0.432s 200023
1128
+ node current glob stream 0m0.384s 200023
1129
+
1130
+ --- pattern: './**/**/**/**/**/**/**/**/*.txt' ---
1131
+ ~~ sync ~~
1132
+ node fast-glob sync 0m0.589s 200023
1133
+ node globby sync 0m0.766s 200023
1134
+ node current globSync mjs 0m0.682s 200023
1135
+ node current glob syncStream 0m0.652s 200023
1136
+ ~~ async ~~
1137
+ node fast-glob async 0m0.352s 200023
1138
+ node globby async 0m0.523s 200023
1139
+ node current glob async mjs 0m0.436s 200023
1140
+ node current glob stream 0m0.380s 200023
1141
+
1142
+ --- pattern: '**/*/*.txt' ---
1143
+ ~~ sync ~~
1144
+ node fast-glob sync 0m0.592s 200023
1145
+ node globby sync 0m0.776s 200023
1146
+ node current globSync mjs 0m0.691s 200023
1147
+ node current glob syncStream 0m0.659s 200023
1148
+ ~~ async ~~
1149
+ node fast-glob async 0m0.357s 200023
1150
+ node globby async 0m0.513s 200023
1151
+ node current glob async mjs 0m0.471s 200023
1152
+ node current glob stream 0m0.424s 200023
1153
+
1154
+ --- pattern: '**/*/**/*.txt' ---
1155
+ ~~ sync ~~
1156
+ node fast-glob sync 0m0.585s 200023
1157
+ node globby sync 0m0.766s 200023
1158
+ node current globSync mjs 0m0.694s 200023
1159
+ node current glob syncStream 0m0.664s 200023
1160
+ ~~ async ~~
1161
+ node fast-glob async 0m0.350s 200023
1162
+ node globby async 0m0.514s 200023
1163
+ node current glob async mjs 0m0.472s 200023
1164
+ node current glob stream 0m0.424s 200023
1165
+
1166
+ --- pattern: '**/[0-9]/**/*.txt' ---
1167
+ ~~ sync ~~
1168
+ node fast-glob sync 0m0.544s 100000
1169
+ node globby sync 0m0.636s 100000
1170
+ node current globSync mjs 0m0.626s 100000
1171
+ node current glob syncStream 0m0.621s 100000
1172
+ ~~ async ~~
1173
+ node fast-glob async 0m0.322s 100000
1174
+ node globby async 0m0.404s 100000
1175
+ node current glob async mjs 0m0.360s 100000
1176
+ node current glob stream 0m0.352s 100000
1177
+ ```