@jerryan/just-bash 3.6.0 → 3.7.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 (243) hide show
  1. package/CHANGELOG.md +349 -316
  2. package/LICENSE +201 -201
  3. package/README.md +827 -827
  4. package/dist/agent-sandbox.d.ts +5 -0
  5. package/dist/bin/chunks/chmod-G2BCCQGF.js +3 -0
  6. package/dist/bin/chunks/{chunk-B2GCIQI2.js → chunk-2UKTHDUM.js} +1 -1
  7. package/dist/bin/{shell/chunks/chunk-7WBCA2BB.js → chunks/chunk-3DWQCLNP.js} +1 -1
  8. package/dist/bin/chunks/chunk-66UHJFN6.js +11 -0
  9. package/dist/bin/{shell/chunks/chunk-67XYNGRV.js → chunks/chunk-6O4Z6BQT.js} +1 -1
  10. package/dist/bin/chunks/{chunk-QFTZKD5O.js → chunk-6TUILMPB.js} +1 -1
  11. package/dist/bin/chunks/{chunk-M7SIPZZZ.js → chunk-7KMOGI3N.js} +1 -1
  12. package/dist/bin/{shell/chunks/chunk-6ESRNSO7.js → chunks/chunk-ADI36B7X.js} +1 -1
  13. package/dist/bin/chunks/chunk-CN4JKMTR.js +8 -0
  14. package/dist/bin/{shell/chunks/chunk-DZAFUADN.js → chunks/chunk-E26NQEH2.js} +1 -1
  15. package/dist/bin/chunks/chunk-E54Z6VIE.js +12 -0
  16. package/dist/bin/chunks/chunk-F2PYTUMR.js +9 -0
  17. package/dist/bin/chunks/chunk-FO7XJH3J.js +13 -0
  18. package/dist/bin/chunks/chunk-HWK7KFGB.js +3 -0
  19. package/dist/bin/{shell/chunks/chunk-LE2XKKGQ.js → chunks/chunk-HYLF56CC.js} +1 -1
  20. package/dist/bin/chunks/chunk-KNTDFP7X.js +12 -0
  21. package/dist/bin/{shell/chunks/chunk-MF3GVFLC.js → chunks/chunk-L345YZ6R.js} +1 -1
  22. package/dist/bin/chunks/chunk-NBTZL3VS.js +3 -0
  23. package/dist/bin/chunks/chunk-OHFB3M3X.js +3 -0
  24. package/dist/bin/{shell/chunks/chunk-HQ63MFHG.js → chunks/chunk-PEUGMGJJ.js} +1 -1
  25. package/dist/bin/chunks/chunk-QKJAAJ7J.js +3 -0
  26. package/dist/bin/{shell/chunks/chunk-JELR4642.js → chunks/chunk-R76AK3KD.js} +12 -12
  27. package/dist/bin/chunks/{chunk-NLU5LALY.js → chunk-RRECHBUS.js} +1 -1
  28. package/dist/bin/chunks/{chunk-ZMGLTHSU.js → chunk-THFQI5LV.js} +1 -1
  29. package/dist/bin/chunks/{chunk-CL7IYCGG.js → chunk-U7YR5CDD.js} +1 -1
  30. package/dist/bin/chunks/cp-TMDR6USI.js +3 -0
  31. package/dist/bin/chunks/du-UKFUX7KM.js +3 -0
  32. package/dist/bin/chunks/find-W2RZWTOF.js +3 -0
  33. package/dist/bin/chunks/{flag-coverage-C7PB2MO7.js → flag-coverage-QJ5ZQKCF.js} +1 -1
  34. package/dist/bin/{shell/chunks/grep-CVU5V66H.js → chunks/grep-IHDO3L72.js} +1 -1
  35. package/dist/bin/chunks/gzip-WUK63QLL.js +3 -0
  36. package/dist/bin/{shell/chunks/js-exec-DJQLXWCS.js → chunks/js-exec-BE37X4L2.js} +7 -7
  37. package/dist/bin/chunks/js-exec-worker.js +296 -116
  38. package/dist/bin/chunks/ln-XVC53673.js +3 -0
  39. package/dist/bin/chunks/ls-EROTXGTC.js +3 -0
  40. package/dist/bin/chunks/mkdir-YJ3SOVRP.js +3 -0
  41. package/dist/bin/chunks/mv-HDNKXPO6.js +3 -0
  42. package/dist/bin/{shell/chunks/python3-JCJHSX4Z.js → chunks/python3-TJ6DCPIA.js} +1 -1
  43. package/dist/bin/chunks/readlink-ZUIECKQC.js +3 -0
  44. package/dist/bin/chunks/rg-ODJAYIKX.js +3 -0
  45. package/dist/bin/chunks/rm-B4LVIG7A.js +3 -0
  46. package/dist/bin/chunks/rmdir-W5NBOJ7E.js +3 -0
  47. package/dist/bin/{shell/chunks/sleep-DVFE2GSF.js → chunks/sleep-MOJQBZMY.js} +1 -1
  48. package/dist/bin/chunks/split-TVJYLTIJ.js +3 -0
  49. package/dist/bin/chunks/sqlite3-5BGAK7VX.js +3 -0
  50. package/dist/bin/chunks/{timeout-YGFHQJKX.js → timeout-RQOWSWYG.js} +1 -1
  51. package/dist/bin/chunks/worker.js +233 -108
  52. package/dist/bin/just-bash.js +381 -376
  53. package/dist/bin/shell/chunks/chmod-G2BCCQGF.js +3 -0
  54. package/dist/bin/shell/chunks/{chunk-B2GCIQI2.js → chunk-2UKTHDUM.js} +1 -1
  55. package/dist/bin/{chunks/chunk-7WBCA2BB.js → shell/chunks/chunk-3DWQCLNP.js} +1 -1
  56. package/dist/bin/shell/chunks/chunk-66UHJFN6.js +11 -0
  57. package/dist/bin/{chunks/chunk-67XYNGRV.js → shell/chunks/chunk-6O4Z6BQT.js} +1 -1
  58. package/dist/bin/shell/chunks/{chunk-QFTZKD5O.js → chunk-6TUILMPB.js} +1 -1
  59. package/dist/bin/shell/chunks/{chunk-M7SIPZZZ.js → chunk-7KMOGI3N.js} +1 -1
  60. package/dist/bin/{chunks/chunk-6ESRNSO7.js → shell/chunks/chunk-ADI36B7X.js} +1 -1
  61. package/dist/bin/shell/chunks/chunk-CN4JKMTR.js +8 -0
  62. package/dist/bin/{chunks/chunk-DZAFUADN.js → shell/chunks/chunk-E26NQEH2.js} +1 -1
  63. package/dist/bin/shell/chunks/chunk-E54Z6VIE.js +12 -0
  64. package/dist/bin/shell/chunks/chunk-F2PYTUMR.js +9 -0
  65. package/dist/bin/shell/chunks/chunk-FO7XJH3J.js +13 -0
  66. package/dist/bin/shell/chunks/chunk-HWK7KFGB.js +3 -0
  67. package/dist/bin/{chunks/chunk-LE2XKKGQ.js → shell/chunks/chunk-HYLF56CC.js} +1 -1
  68. package/dist/bin/shell/chunks/chunk-KNTDFP7X.js +12 -0
  69. package/dist/bin/{chunks/chunk-MF3GVFLC.js → shell/chunks/chunk-L345YZ6R.js} +1 -1
  70. package/dist/bin/shell/chunks/chunk-NBTZL3VS.js +3 -0
  71. package/dist/bin/shell/chunks/chunk-OHFB3M3X.js +3 -0
  72. package/dist/bin/{chunks/chunk-HQ63MFHG.js → shell/chunks/chunk-PEUGMGJJ.js} +1 -1
  73. package/dist/bin/shell/chunks/chunk-QKJAAJ7J.js +3 -0
  74. package/dist/bin/{chunks/chunk-JELR4642.js → shell/chunks/chunk-R76AK3KD.js} +12 -12
  75. package/dist/bin/shell/chunks/{chunk-NLU5LALY.js → chunk-RRECHBUS.js} +1 -1
  76. package/dist/bin/shell/chunks/{chunk-ZMGLTHSU.js → chunk-THFQI5LV.js} +1 -1
  77. package/dist/bin/shell/chunks/{chunk-CL7IYCGG.js → chunk-U7YR5CDD.js} +1 -1
  78. package/dist/bin/shell/chunks/cp-TMDR6USI.js +3 -0
  79. package/dist/bin/shell/chunks/du-UKFUX7KM.js +3 -0
  80. package/dist/bin/shell/chunks/find-W2RZWTOF.js +3 -0
  81. package/dist/bin/shell/chunks/{flag-coverage-C7PB2MO7.js → flag-coverage-QJ5ZQKCF.js} +1 -1
  82. package/dist/bin/{chunks/grep-CVU5V66H.js → shell/chunks/grep-IHDO3L72.js} +1 -1
  83. package/dist/bin/shell/chunks/gzip-WUK63QLL.js +3 -0
  84. package/dist/bin/{chunks/js-exec-DJQLXWCS.js → shell/chunks/js-exec-BE37X4L2.js} +7 -7
  85. package/dist/bin/shell/chunks/ln-XVC53673.js +3 -0
  86. package/dist/bin/shell/chunks/ls-EROTXGTC.js +3 -0
  87. package/dist/bin/shell/chunks/mkdir-YJ3SOVRP.js +3 -0
  88. package/dist/bin/shell/chunks/mv-HDNKXPO6.js +3 -0
  89. package/dist/bin/{chunks/python3-JCJHSX4Z.js → shell/chunks/python3-TJ6DCPIA.js} +1 -1
  90. package/dist/bin/shell/chunks/readlink-ZUIECKQC.js +3 -0
  91. package/dist/bin/shell/chunks/rg-ODJAYIKX.js +3 -0
  92. package/dist/bin/shell/chunks/rm-B4LVIG7A.js +3 -0
  93. package/dist/bin/shell/chunks/rmdir-W5NBOJ7E.js +3 -0
  94. package/dist/bin/{chunks/sleep-DVFE2GSF.js → shell/chunks/sleep-MOJQBZMY.js} +1 -1
  95. package/dist/bin/shell/chunks/split-TVJYLTIJ.js +3 -0
  96. package/dist/bin/shell/chunks/sqlite3-5BGAK7VX.js +3 -0
  97. package/dist/bin/shell/chunks/{timeout-YGFHQJKX.js → timeout-RQOWSWYG.js} +1 -1
  98. package/dist/bin/shell/shell.js +385 -380
  99. package/dist/bundle/browser.js +643 -638
  100. package/dist/bundle/chunks/chmod-XZNKTJHL.js +2 -0
  101. package/dist/bundle/chunks/{chunk-XVSR5HHH.js → chunk-2T7PBFL4.js} +1 -1
  102. package/dist/bundle/chunks/chunk-3BMWRGU2.js +10 -0
  103. package/dist/bundle/chunks/chunk-3CIDHL5V.js +11 -0
  104. package/dist/bundle/chunks/chunk-4CC3OZPU.js +2 -0
  105. package/dist/bundle/chunks/{chunk-FIMF2TLE.js → chunk-5DMO6LFU.js} +12 -12
  106. package/dist/bundle/chunks/{chunk-N3A4JVFJ.js → chunk-6IA4DXG2.js} +1 -1
  107. package/dist/bundle/chunks/chunk-A257L6QO.js +7 -0
  108. package/dist/bundle/chunks/{chunk-6DDRR56B.js → chunk-ACVD6PQF.js} +1 -1
  109. package/dist/bundle/chunks/chunk-BS6EJR2R.js +11 -0
  110. package/dist/bundle/chunks/chunk-D5FHVW27.js +2 -0
  111. package/dist/bundle/chunks/{chunk-24NLAR7R.js → chunk-E3ABCXE4.js} +1 -1
  112. package/dist/bundle/chunks/{chunk-FSJ6TTCC.js → chunk-HMM3NGUJ.js} +1 -1
  113. package/dist/bundle/chunks/chunk-IYJLVOVE.js +12 -0
  114. package/dist/bundle/chunks/chunk-LRFR25IP.js +8 -0
  115. package/dist/bundle/chunks/{chunk-NBNI7G66.js → chunk-OPYVVD5P.js} +1 -1
  116. package/dist/bundle/chunks/{chunk-F6XU52K3.js → chunk-OR544SGH.js} +1 -1
  117. package/dist/bundle/chunks/{chunk-RPKJJFGZ.js → chunk-PMBXJ3OQ.js} +1 -1
  118. package/dist/bundle/chunks/chunk-PS2RJNZZ.js +2 -0
  119. package/dist/bundle/chunks/{chunk-UC76ZOWM.js → chunk-SBOTR4JQ.js} +1 -1
  120. package/dist/bundle/chunks/chunk-T5ZEIOJ3.js +2 -0
  121. package/dist/bundle/chunks/{chunk-DMWNBCXJ.js → chunk-TLPMB3FO.js} +1 -1
  122. package/dist/bundle/chunks/{chunk-XV2V56NQ.js → chunk-YFFU74KY.js} +1 -1
  123. package/dist/bundle/chunks/{chunk-DAKEIWT3.js → chunk-YNYC232D.js} +1 -1
  124. package/dist/bundle/chunks/{chunk-ZXFELXJH.js → chunk-YUOBBH7P.js} +1 -1
  125. package/dist/bundle/chunks/cp-NWITRTH3.js +2 -0
  126. package/dist/bundle/chunks/du-IFLWEM6M.js +2 -0
  127. package/dist/bundle/chunks/find-EW6OHRPJ.js +2 -0
  128. package/dist/bundle/chunks/{flag-coverage-XTIQGK65.js → flag-coverage-PIF5QRO7.js} +1 -1
  129. package/dist/bundle/chunks/{grep-4AYF3A5J.js → grep-QDFNKAUW.js} +1 -1
  130. package/dist/bundle/chunks/gzip-HBDKZBIP.js +2 -0
  131. package/dist/bundle/chunks/{js-exec-XKF2B7C3.js → js-exec-IREGAOMH.js} +7 -7
  132. package/dist/bundle/chunks/js-exec-worker.js +296 -116
  133. package/dist/bundle/chunks/ln-CEM7GDB5.js +2 -0
  134. package/dist/bundle/chunks/ls-WJ7EIFVM.js +2 -0
  135. package/dist/bundle/chunks/mkdir-Z6MMWH3D.js +2 -0
  136. package/dist/bundle/chunks/mv-E2NFLGRQ.js +2 -0
  137. package/dist/bundle/chunks/{python3-F5S5TYGS.js → python3-W4UMQJAQ.js} +1 -1
  138. package/dist/bundle/chunks/readlink-XCFO7YD2.js +2 -0
  139. package/dist/bundle/chunks/rg-J7XDRV3B.js +2 -0
  140. package/dist/bundle/chunks/rm-IGPLE632.js +2 -0
  141. package/dist/bundle/chunks/rmdir-UMUDM2L2.js +2 -0
  142. package/dist/bundle/chunks/{sleep-PPRBTSVR.js → sleep-25QUPVDK.js} +1 -1
  143. package/dist/bundle/chunks/split-D4HPO4G5.js +2 -0
  144. package/dist/bundle/chunks/sqlite3-3HL2ECCQ.js +2 -0
  145. package/dist/bundle/chunks/{timeout-C6WDYPLV.js → timeout-37GM7IIL.js} +1 -1
  146. package/dist/bundle/chunks/worker.js +233 -108
  147. package/dist/bundle/index.cjs +975 -970
  148. package/dist/bundle/index.js +357 -352
  149. package/dist/commands/js-exec/js-exec.d.ts +4 -0
  150. package/dist/commands/worker-bridge/bridge-handler.d.ts +9 -3
  151. package/dist/commands/worker-bridge/protocol.d.ts +72 -21
  152. package/dist/commands/worker-bridge/sync-backend.d.ts +3 -0
  153. package/dist/fs/fs-error.d.ts +43 -0
  154. package/dist/fs/interface.d.ts +13 -0
  155. package/dist/fs/mountable-fs/mountable-fs.d.ts +20 -0
  156. package/dist/fs/overlay-fs/apply.d.ts +15 -1
  157. package/dist/fs/overlay-fs/index.d.ts +1 -0
  158. package/dist/fs/overlay-fs/overlay-fs.d.ts +31 -0
  159. package/dist/fs/overlay-fs/overlay-tree.d.ts +39 -0
  160. package/dist/fs/path-utils.d.ts +5 -0
  161. package/dist/fs/vfs-template.d.ts +74 -0
  162. package/dist/index.d.cts +3 -1
  163. package/dist/index.d.ts +3 -1
  164. package/dist/interpreter/builtin-dispatch.d.ts +10 -0
  165. package/dist/interpreter/builtin-manifest.d.ts +273 -0
  166. package/dist/interpreter/builtins/help.d.ts +6 -0
  167. package/dist/interpreter/builtins/shopt.d.ts +3 -0
  168. package/dist/interpreter/helpers/shell-constants.d.ts +0 -20
  169. package/dist/timers.d.ts +9 -0
  170. package/package.json +135 -136
  171. package/vendor/cpython-emscripten/python.cjs +2 -2
  172. package/dist/bin/chunks/chmod-WYYTXGVB.js +0 -3
  173. package/dist/bin/chunks/chunk-43E7AR6A.js +0 -3
  174. package/dist/bin/chunks/chunk-6LDOIBU7.js +0 -9
  175. package/dist/bin/chunks/chunk-AI7JUA46.js +0 -13
  176. package/dist/bin/chunks/chunk-GQKQEK5N.js +0 -11
  177. package/dist/bin/chunks/chunk-JQM3DKCH.js +0 -12
  178. package/dist/bin/chunks/chunk-OLEQNRKX.js +0 -8
  179. package/dist/bin/chunks/chunk-PPVF2N6C.js +0 -3
  180. package/dist/bin/chunks/chunk-WEHA3JFD.js +0 -3
  181. package/dist/bin/chunks/chunk-YQEKKZTU.js +0 -12
  182. package/dist/bin/chunks/cp-OMVKM35F.js +0 -3
  183. package/dist/bin/chunks/du-LUFPVLNW.js +0 -3
  184. package/dist/bin/chunks/find-AWH2KOY7.js +0 -3
  185. package/dist/bin/chunks/gzip-FDPA6EKG.js +0 -3
  186. package/dist/bin/chunks/ln-B35EKC2Q.js +0 -3
  187. package/dist/bin/chunks/ls-Q6ZZ6SQ2.js +0 -3
  188. package/dist/bin/chunks/mkdir-74BP5NTG.js +0 -3
  189. package/dist/bin/chunks/mv-76LAHXFR.js +0 -3
  190. package/dist/bin/chunks/readlink-EHXJNW62.js +0 -3
  191. package/dist/bin/chunks/rg-PXNKNIMY.js +0 -3
  192. package/dist/bin/chunks/rm-TF2NJQIA.js +0 -3
  193. package/dist/bin/chunks/rmdir-7ZIVFZJX.js +0 -3
  194. package/dist/bin/chunks/split-ZNNNHKSP.js +0 -3
  195. package/dist/bin/chunks/sqlite3-KP42NNIY.js +0 -3
  196. package/dist/bin/shell/chunks/chmod-WYYTXGVB.js +0 -3
  197. package/dist/bin/shell/chunks/chunk-43E7AR6A.js +0 -3
  198. package/dist/bin/shell/chunks/chunk-6LDOIBU7.js +0 -9
  199. package/dist/bin/shell/chunks/chunk-AI7JUA46.js +0 -13
  200. package/dist/bin/shell/chunks/chunk-GQKQEK5N.js +0 -11
  201. package/dist/bin/shell/chunks/chunk-JQM3DKCH.js +0 -12
  202. package/dist/bin/shell/chunks/chunk-OLEQNRKX.js +0 -8
  203. package/dist/bin/shell/chunks/chunk-PPVF2N6C.js +0 -3
  204. package/dist/bin/shell/chunks/chunk-WEHA3JFD.js +0 -3
  205. package/dist/bin/shell/chunks/chunk-YQEKKZTU.js +0 -12
  206. package/dist/bin/shell/chunks/cp-OMVKM35F.js +0 -3
  207. package/dist/bin/shell/chunks/du-LUFPVLNW.js +0 -3
  208. package/dist/bin/shell/chunks/find-AWH2KOY7.js +0 -3
  209. package/dist/bin/shell/chunks/gzip-FDPA6EKG.js +0 -3
  210. package/dist/bin/shell/chunks/ln-B35EKC2Q.js +0 -3
  211. package/dist/bin/shell/chunks/ls-Q6ZZ6SQ2.js +0 -3
  212. package/dist/bin/shell/chunks/mkdir-74BP5NTG.js +0 -3
  213. package/dist/bin/shell/chunks/mv-76LAHXFR.js +0 -3
  214. package/dist/bin/shell/chunks/readlink-EHXJNW62.js +0 -3
  215. package/dist/bin/shell/chunks/rg-PXNKNIMY.js +0 -3
  216. package/dist/bin/shell/chunks/rm-TF2NJQIA.js +0 -3
  217. package/dist/bin/shell/chunks/rmdir-7ZIVFZJX.js +0 -3
  218. package/dist/bin/shell/chunks/split-ZNNNHKSP.js +0 -3
  219. package/dist/bin/shell/chunks/sqlite3-KP42NNIY.js +0 -3
  220. package/dist/bundle/chunks/chmod-WM2JFFQC.js +0 -2
  221. package/dist/bundle/chunks/chunk-7IJWBG4I.js +0 -2
  222. package/dist/bundle/chunks/chunk-MLIO3BK2.js +0 -7
  223. package/dist/bundle/chunks/chunk-PIRTX3D3.js +0 -8
  224. package/dist/bundle/chunks/chunk-TBVD66LC.js +0 -10
  225. package/dist/bundle/chunks/chunk-W2Z6LYL6.js +0 -11
  226. package/dist/bundle/chunks/chunk-WN54B5NQ.js +0 -12
  227. package/dist/bundle/chunks/chunk-WXPNKIIH.js +0 -2
  228. package/dist/bundle/chunks/chunk-YJKHREBZ.js +0 -11
  229. package/dist/bundle/chunks/chunk-YUSFCOM7.js +0 -2
  230. package/dist/bundle/chunks/cp-2KZIPZJS.js +0 -2
  231. package/dist/bundle/chunks/du-7AZCLKR6.js +0 -2
  232. package/dist/bundle/chunks/find-END3EAHV.js +0 -2
  233. package/dist/bundle/chunks/gzip-RQOBR22H.js +0 -2
  234. package/dist/bundle/chunks/ln-OPY2ZVGQ.js +0 -2
  235. package/dist/bundle/chunks/ls-ZPXGZX63.js +0 -2
  236. package/dist/bundle/chunks/mkdir-WDDKK2P3.js +0 -2
  237. package/dist/bundle/chunks/mv-ZF6UBVRB.js +0 -2
  238. package/dist/bundle/chunks/readlink-U5OM5A3M.js +0 -2
  239. package/dist/bundle/chunks/rg-NAMXBYKS.js +0 -2
  240. package/dist/bundle/chunks/rm-OAZOF7XI.js +0 -2
  241. package/dist/bundle/chunks/rmdir-YJKPQVCK.js +0 -2
  242. package/dist/bundle/chunks/split-JICLAMP6.js +0 -2
  243. package/dist/bundle/chunks/sqlite3-4EZ4GXVD.js +0 -2
@@ -0,0 +1,2 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-OPYVVD5P.js";import"./chunk-AYSZ5MAE.js";import"./chunk-ZBUZKIPX.js";import"./chunk-FTET43KM.js";import"./chunk-D5FHVW27.js";import"./chunk-4CC3OZPU.js";import"./chunk-TVCZIH6M.js";import"./chunk-GN6CQ3J4.js";import"./chunk-T5ZEIOJ3.js";import"./chunk-FOCWZZDE.js";import"./chunk-QAYAQNCG.js";import"./chunk-NCUTH6QL.js";export{a as chmodCommand,b as flagsForFuzzing};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{d as k}from"./chunk-7IJWBG4I.js";import{l as u,m}from"./chunk-TVCZIH6M.js";import{a as h,b as p,c as g}from"./chunk-QAYAQNCG.js";var w={name:"readlink",summary:"print resolved symbolic links or canonical file names",usage:"readlink [OPTIONS] FILE...",options:["-f canonicalize by following every symlink in every component of the given name recursively"," --help display this help and exit"]},x={name:"readlink",async execute(r,n){if(p(r))return h(w);let l=!1,t=0;for(;t<r.length&&r[t].startsWith("-");){let i=r[t];if(i==="-f"||i==="--canonicalize")l=!0,t++;else if(i==="--"){t++;break}else return g("readlink",i)}let c=r.slice(t);if(c.length===0)return{stdout:"",stderr:`readlink: missing operand
2
+ import{d as k}from"./chunk-D5FHVW27.js";import{l as u,m}from"./chunk-TVCZIH6M.js";import{a as h,b as p,c as g}from"./chunk-QAYAQNCG.js";var w={name:"readlink",summary:"print resolved symbolic links or canonical file names",usage:"readlink [OPTIONS] FILE...",options:["-f canonicalize by following every symlink in every component of the given name recursively"," --help display this help and exit"]},x={name:"readlink",async execute(r,n){if(p(r))return h(w);let l=!1,t=0;for(;t<r.length&&r[t].startsWith("-");){let i=r[t];if(i==="-f"||i==="--canonicalize")l=!0,t++;else if(i==="--"){t++;break}else return g("readlink",i)}let c=r.slice(t);if(c.length===0)return{stdout:"",stderr:`readlink: missing operand
3
3
  `,exitCode:1};let a="",d=!1,y=new k({limits:n.limits,signal:n.signal,executionScope:n.executionScope,site:"readlink",label:"symlink traversal"});for(let i of c){let s=n.fs.resolvePath(n.cwd,i);try{if(l){let e=s,o=new Set;for(;y.visit(o.size),!o.has(e);){o.add(e);try{let f=await n.fs.readlink(e);if(f.startsWith("/"))e=f;else{let b=e.substring(0,e.lastIndexOf("/"))||"/";e=n.fs.resolvePath(b,f)}}catch{break}}a+=`${e}
4
4
  `}else{let e=await n.fs.readlink(s);a+=`${e}
5
5
  `}}catch(e){if(e instanceof u||e instanceof m)throw e;l?a+=`${s}
@@ -0,0 +1,10 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{b as N,c as O,d as T,e as k}from"./chunk-D5FHVW27.js";import{f as P}from"./chunk-4CC3OZPU.js";import{l as w,m as $}from"./chunk-TVCZIH6M.js";import{c as F}from"./chunk-T5ZEIOJ3.js";import{a as S}from"./chunk-QIQMJJZ4.js";import{a as D}from"./chunk-W5DWRFSU.js";import{a as C,b as E}from"./chunk-QAYAQNCG.js";var H={name:"mv",summary:"move (rename) files",usage:"mv [OPTION]... SOURCE... DEST",options:["-f, --force do not prompt before overwriting","-n, --no-clobber do not overwrite an existing file","-v, --verbose explain what is being done"," --help display this help and exit"]},I={force:{short:"f",long:"force",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},j={name:"mv",async execute(d,e){if(E(d))return C(H);let r=S("mv",d,I);if(!r.ok)return r.error;let v=r.result.flags.force,g=r.result.flags.noClobber,A=r.result.flags.verbose,p=r.result.positional;if(g&&(v=!1),p.length<2)return{stdout:"",stderr:`mv: missing destination file operand
3
+ `,exitCode:1};let l=p.pop()??"",u=p,f=e.fs.resolvePath(e.cwd,l),h="",i="",a=0,b=new T({limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"mv"}),m=!1;try{m=(await e.fs.stat(f)).isDirectory}catch{}if(u.length>1&&!m)return{stdout:"",stderr:`mv: target '${l}' is not a directory
4
+ `,exitCode:1};for(let t of u)try{let o=e.fs.resolvePath(e.cwd,t),c=await e.fs.stat(o),n=f;if(m){let s=t.split("/").pop()||t;n=f==="/"?`/${s}`:`${f}/${s}`}if(c.isDirectory){let s=await O(e.fs,o,n,b);if(P(o,n)||s==="inside"){i+=`mv: cannot move '${t}' into itself, '${n}'
5
+ `,a=1;continue}if(s==="unknown"){i+=`mv: cannot safely determine whether '${n}' is inside '${t}'
6
+ `,a=1;continue}}if(g)try{await e.fs.stat(n);continue}catch{}let y=await N(e.fs,o,n);if(y==="same")continue;if(y==="unknown"){i+=`mv: cannot safely determine whether '${t}' and '${n}' are the same file
7
+ `,a=1;continue}if(c.isDirectory&&await k({fs:e.fs,root:o,limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"mv",symlinks:"never",budget:b},()=>{}),await e.fs.mv(o,n),A){let s=m?`${l}/${t.split("/").pop()||t}`:l;h+=`renamed '${t}' -> '${s}'
8
+ `}}catch(o){if(o instanceof w||o instanceof $)throw o;let c=D(o);F(o,"ENOENT")?i+=`mv: cannot stat '${t}': No such file or directory
9
+ `:i+=`mv: cannot move '${t}': ${c}
10
+ `,a=1}return{stdout:h,stderr:i,exitCode:a}}},G={name:"mv",flags:[{flag:"-f",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{j as a,G as b};
@@ -0,0 +1,11 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a as p,c as h}from"./chunk-T5ZEIOJ3.js";import{a as y}from"./chunk-FOCWZZDE.js";import{a as m,b as u,c as g}from"./chunk-QAYAQNCG.js";var b={name:"ln",summary:"make links between files",usage:"ln [OPTIONS] TARGET LINK_NAME",options:["-s create a symbolic link instead of a hard link","-f remove existing destination files","-n treat LINK_NAME as a normal file if it is a symbolic link to a directory","-v print name of each linked file"," --help display this help and exit"]},$={name:"ln",async execute(n,s){if(u(n))return m(b);let r=!1,f=!1,d=!1,t=0;for(;t<n.length&&n[t].startsWith("-");){let e=n[t];if(e==="-s"||e==="--symbolic")r=!0,t++;else if(e==="-f"||e==="--force")f=!0,t++;else if(e==="-v"||e==="--verbose")d=!0,t++;else if(e==="-n"||e==="--no-dereference")t++;else if(/^-[sfvn]+$/.test(e))e.includes("s")&&(r=!0),e.includes("f")&&(f=!0),e.includes("v")&&(d=!0),t++;else if(e==="--"){t++;break}else return g("ln",e)}let i=n.slice(t);if(i.length<2)return{stdout:"",stderr:`ln: missing file operand
3
+ `,exitCode:1};if(i.length>2)return{stdout:"",stderr:`ln: extra operand '${i[2]}'
4
+ `,exitCode:1};let o=i[0],l=i[1],a=s.fs.resolvePath(s.cwd,l);if(await s.fs.exists(a))if(f)try{await s.fs.rm(a,{force:!0})}catch{return{stdout:"",stderr:`ln: cannot remove '${l}': Permission denied
5
+ `,exitCode:1}}else return{stdout:"",stderr:`ln: failed to create ${r?"symbolic ":""}link '${l}': File exists
6
+ `,exitCode:1};try{if(r)await s.fs.symlink(o,a);else{let e=s.fs.resolvePath(s.cwd,o);if(!await s.fs.exists(e))return{stdout:"",stderr:`ln: failed to access '${o}': No such file or directory
7
+ `,exitCode:1};await s.fs.link(e,a)}}catch(e){return h(e,"EPERM")?{stdout:"",stderr:r?`ln: failed to create symbolic link '${l}': Operation not permitted
8
+ `:`ln: '${o}': hard link not allowed for directory
9
+ `,exitCode:1}:{stdout:"",stderr:`ln: ${y(e instanceof p?e.bareMessage:e instanceof Error?e.message:String(e))}
10
+ `,exitCode:1}}let c="";return d&&(c=`'${l}' -> '${o}'
11
+ `),{stdout:c,stderr:"",exitCode:0}}},C={name:"ln",flags:[{flag:"-s",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{$ as a,C as b};
@@ -0,0 +1,2 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a as s}from"./chunk-T5ZEIOJ3.js";var a=40,f=493,d=420,x=511;function o(n){if(!n||n==="/")return"/";let t=n.endsWith("/")&&n!=="/"?n.slice(0,-1):n;t.startsWith("/")||(t=`/${t}`);let r=t.split("/").filter(i=>i&&i!=="."),e=[];for(let i of r)i===".."?e.pop():e.push(i);return`/${e.join("/")}`||"/"}function m(n,t){let r=o(n),e=o(t);return e===r||r==="/"||e.startsWith(`${r}/`)}function $(n,t){if(n.includes("\0"))throw new s("ENOENT",`path contains null byte, ${t} '${n}'`)}function c(n){let t=o(n);if(t==="/")return"/";let r=t.lastIndexOf("/");return r===0?"/":t.slice(0,r)}function p(n,t){if(t.startsWith("/"))return o(t);let r=n==="/"?`/${t}`:`${n}/${t}`;return o(r)}function E(n){return n.replace(/\\/g,"/")}function l(n,t){return n==="/"?`/${t}`:`${n}/${t}`}function D(n,t){if(t.startsWith("/"))return o(t);let r=c(n);return o(l(r,t))}export{a,f as b,d as c,x as d,o as e,m as f,$ as g,c as h,p as i,E as j,l as k,D as l};
@@ -1,20 +1,20 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
2
  import{a as C}from"./chunk-ULXTDFQC.js";import{a as se,b as re}from"./chunk-PPEXVPHR.js";import{b as O}from"./chunk-AYSZ5MAE.js";import{l as A}from"./chunk-TVCZIH6M.js";import{d as j}from"./chunk-GN6CQ3J4.js";import{a as me,c as ne}from"./chunk-QAYAQNCG.js";var xe="(standard input)";function he(t){let e=t.limits.maxLoopIterations,i=t.limits.maxArrayElements;return Math.max(e,Math.min(i,e*10))}function w(t){if(++t.operations>t.maxOperations)throw new A(`grep: glob operation limit exceeded (${t.maxOperations})`,"glob_operations")}function _(t){if(t.results>=t.maxResults)throw new A(`grep: array element limit exceeded (${t.maxResults})`,"array_elements");t.results++}var we="[^\\s\\S]";function Fe(t){return t.split(`
3
3
  `)}function ve(t){if(t==="")return[];let e=t.split(`
4
- `);return e[e.length-1]===""&&e.pop(),e}function Ce(t,e){return t.length===1?{pattern:t[0],mode:e}:e==="fixed"?{pattern:t.map(i=>`(?:${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`).join("|"),mode:"extended"}:e==="basic"?{pattern:t.join("\\|"),mode:e}:{pattern:t.map(i=>`(?:${i})`).join("|"),mode:e}}var Ee={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",description:["Search for PATTERN in each FILE.","With no FILE, or when FILE is -, read standard input."],options:["-E, --extended-regexp PATTERN is an extended regular expression","-P, --perl-regexp PATTERN is a Perl regular expression","-F, --fixed-strings PATTERN is a set of newline-separated strings","-i, --ignore-case ignore case distinctions","-v, --invert-match select non-matching lines","-w, --word-regexp match only whole words","-x, --line-regexp match only whole lines","-c, --count print only a count of matching lines","-l, --files-with-matches print only names of files with matches","-L, --files-without-match print names of files with no matches","-m NUM, --max-count=NUM stop after NUM matches","-n, --line-number print line number with output lines","-h, --no-filename suppress the file name prefix on output","-o, --only-matching show only nonempty parts of lines that match","-q, --quiet, --silent suppress all normal output","-r, -R, --recursive search directories recursively","-A NUM print NUM lines of trailing context","-B NUM print NUM lines of leading context","-C NUM print NUM lines of context","-e PATTERN use PATTERN for matching","-f FILE, --file=FILE obtain patterns from FILE, one per line"," --include=GLOB search only files matching GLOB"," --exclude=GLOB skip files matching GLOB"," --exclude-dir=DIR skip directories matching DIR"," --help display this help and exit"]},de={name:"grep",async execute(t,e){let i=!1,g=!1,f=!1,h=!1,c=!1,u=!1,a=!1,l=!1,m=!1,F=!1,$=!1,y=!1,x=!1,M=!1,G=!1,S=0,N=0,W=0,B=[],b=[],X=[],L=null,H=[],Z=[],Q=!0;for(let s=0;s<t.length;s++){let r=t[s];if(Q&&r==="--"){Q=!1;continue}if(Q&&r==="--help")return me(Ee);if(Q&&r.startsWith("-")&&r!=="-"){if(r==="-e"&&s+1<t.length){L=t[++s];continue}if(r.startsWith("--file=")){H.push(r.slice(7));continue}if(r.startsWith("--include=")){B.push(r.slice(10));continue}if(r.startsWith("--exclude=")){b.push(r.slice(10));continue}if(r.startsWith("--exclude-dir=")){X.push(r.slice(14));continue}if(r.startsWith("--max-count=")){S=parseInt(r.slice(12),10);continue}let v=r.match(/^-m(\d+)$/);if(v){S=parseInt(v[1],10);continue}if(r==="-m"&&s+1<t.length){S=parseInt(t[++s],10);continue}let o=r.match(/^-([ABC])(\d+)$/);if(o){let p=parseInt(o[2],10);o[1]==="A"?W=p:o[1]==="B"?N=p:o[1]==="C"&&(N=p,W=p);continue}if((r==="-A"||r==="-B"||r==="-C")&&s+1<t.length){let p=parseInt(t[++s],10);r==="-A"?W=p:r==="-B"?N=p:(N=p,W=p);continue}let d=r.startsWith("--")?[r]:r.slice(1).split("");for(let p=0;p<d.length;p++){let n=d[p];if(n==="f"||n==="--file"){let z=n==="f"?d.slice(p+1).join(""):"";if(z.length>0)H.push(z);else if(s+1<t.length)H.push(t[++s]);else return{stdout:"",stderr:n==="f"?`grep: option requires an argument -- 'f'
4
+ `);return e[e.length-1]===""&&e.pop(),e}function Ce(t,e){return t.length===1?{pattern:t[0],mode:e}:e==="fixed"?{pattern:t.map(i=>`(?:${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`).join("|"),mode:"extended"}:e==="basic"?{pattern:t.join("\\|"),mode:e}:{pattern:t.map(i=>`(?:${i})`).join("|"),mode:e}}var Ee={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",description:["Search for PATTERN in each FILE.","With no FILE, or when FILE is -, read standard input."],options:["-E, --extended-regexp PATTERN is an extended regular expression","-P, --perl-regexp PATTERN is a Perl regular expression","-F, --fixed-strings PATTERN is a set of newline-separated strings","-i, --ignore-case ignore case distinctions","-v, --invert-match select non-matching lines","-w, --word-regexp match only whole words","-x, --line-regexp match only whole lines","-c, --count print only a count of matching lines","-l, --files-with-matches print only names of files with matches","-L, --files-without-match print names of files with no matches","-m NUM, --max-count=NUM stop after NUM matches","-n, --line-number print line number with output lines","-h, --no-filename suppress the file name prefix on output","-o, --only-matching show only nonempty parts of lines that match","-q, --quiet, --silent suppress all normal output","-r, -R, --recursive search directories recursively","-A NUM print NUM lines of trailing context","-B NUM print NUM lines of leading context","-C NUM print NUM lines of context","-e PATTERN use PATTERN for matching","-f FILE, --file=FILE obtain patterns from FILE, one per line"," --include=GLOB search only files matching GLOB"," --exclude=GLOB skip files matching GLOB"," --exclude-dir=DIR skip directories matching DIR"," --help display this help and exit"]},de={name:"grep",async execute(t,e){let i=!1,g=!1,f=!1,h=!1,p=!1,u=!1,a=!1,l=!1,m=!1,F=!1,$=!1,y=!1,x=!1,M=!1,D=!1,S=0,N=0,W=0,B=[],b=[],X=[],L=null,H=[],Z=[],G=!0;for(let s=0;s<t.length;s++){let r=t[s];if(G&&r==="--"){G=!1;continue}if(G&&r==="--help")return me(Ee);if(G&&r.startsWith("-")&&r!=="-"){if(r==="-e"&&s+1<t.length){L=t[++s];continue}if(r.startsWith("--file=")){H.push(r.slice(7));continue}if(r.startsWith("--include=")){B.push(r.slice(10));continue}if(r.startsWith("--exclude=")){b.push(r.slice(10));continue}if(r.startsWith("--exclude-dir=")){X.push(r.slice(14));continue}if(r.startsWith("--max-count=")){S=parseInt(r.slice(12),10);continue}let v=r.match(/^-m(\d+)$/);if(v){S=parseInt(v[1],10);continue}if(r==="-m"&&s+1<t.length){S=parseInt(t[++s],10);continue}let o=r.match(/^-([ABC])(\d+)$/);if(o){let c=parseInt(o[2],10);o[1]==="A"?W=c:o[1]==="B"?N=c:o[1]==="C"&&(N=c,W=c);continue}if((r==="-A"||r==="-B"||r==="-C")&&s+1<t.length){let c=parseInt(t[++s],10);r==="-A"?W=c:r==="-B"?N=c:(N=c,W=c);continue}let d=r.startsWith("--")?[r]:r.slice(1).split("");for(let c=0;c<d.length;c++){let n=d[c];if(n==="f"||n==="--file"){let q=n==="f"?d.slice(c+1).join(""):"";if(q.length>0)H.push(q);else if(s+1<t.length)H.push(t[++s]);else return{stdout:"",stderr:n==="f"?`grep: option requires an argument -- 'f'
5
5
  `:`grep: option '--file' requires an argument
6
- `,exitCode:2};break}if(n==="i"||n==="--ignore-case")i=!0;else if(n==="n"||n==="--line-number")g=!0;else if(n==="v"||n==="--invert-match")f=!0;else if(n==="c"||n==="--count")h=!0;else if(n==="l"||n==="--files-with-matches")c=!0;else if(n==="L"||n==="--files-without-match")u=!0;else if(n==="r"||n==="R"||n==="--recursive")a=!0;else if(n==="w"||n==="--word-regexp")l=!0;else if(n==="x"||n==="--line-regexp")m=!0;else if(n==="E"||n==="--extended-regexp")F=!0;else if(n==="P"||n==="--perl-regexp")$=!0;else if(n==="F"||n==="--fixed-strings")y=!0;else if(n==="o"||n==="--only-matching")x=!0;else if(n==="h"||n==="--no-filename")M=!0;else if(n==="q"||n==="--quiet"||n==="--silent")G=!0;else{if(n.startsWith("--"))return ne("grep",n);if(n.length===1)return ne("grep",`-${n}`)}}}else Z.push(r)}if(L===null&&H.length===0&&(L=Z.shift()??null,L===null))return{stdout:"",stderr:`grep: missing pattern
6
+ `,exitCode:2};break}if(n==="i"||n==="--ignore-case")i=!0;else if(n==="n"||n==="--line-number")g=!0;else if(n==="v"||n==="--invert-match")f=!0;else if(n==="c"||n==="--count")h=!0;else if(n==="l"||n==="--files-with-matches")p=!0;else if(n==="L"||n==="--files-without-match")u=!0;else if(n==="r"||n==="R"||n==="--recursive")a=!0;else if(n==="w"||n==="--word-regexp")l=!0;else if(n==="x"||n==="--line-regexp")m=!0;else if(n==="E"||n==="--extended-regexp")F=!0;else if(n==="P"||n==="--perl-regexp")$=!0;else if(n==="F"||n==="--fixed-strings")y=!0;else if(n==="o"||n==="--only-matching")x=!0;else if(n==="h"||n==="--no-filename")M=!0;else if(n==="q"||n==="--quiet"||n==="--silent")D=!0;else{if(n.startsWith("--"))return ne("grep",n);if(n.length===1)return ne("grep",`-${n}`)}}}else Z.push(r)}if(L===null&&H.length===0&&(L=Z.shift()??null,L===null))return{stdout:"",stderr:`grep: missing pattern
7
7
  `,exitCode:2};let J=Z,E=L===null?[]:Fe(L),K=!1;for(let s of H){let r;if(s==="")return{stdout:"",stderr:`grep: : No such file or directory
8
8
  `,exitCode:2};if(s==="-")r=K?"":j(e.stdin),K=!0;else try{let o=e.fs.resolvePath(e.cwd,s);if((await e.fs.stat(o)).isDirectory)return{stdout:"",stderr:`grep: ${s}: Is a directory
9
9
  `,exitCode:2};r=await e.fs.readFile(o)}catch(o){return O(o),{stdout:"",stderr:`grep: ${s}: No such file or directory
10
- `,exitCode:2}}let v=ve(r);if(E.length+v.length>e.limits.maxArrayElements)throw new A(`grep: array element limit exceeded (${e.limits.maxArrayElements})`,"array_elements");E.push(...v)}if(E.length===0&&!f&&!u)return{stdout:"",stderr:"",exitCode:1};let k=y?"fixed":F?"extended":$?"perl":"basic";if(k==="perl"&&new Set(E).size>1)return{stdout:"",stderr:`grep: the -P option only supports a single pattern
11
- `,exitCode:2};if(E.length>1&&k!=="fixed")for(let s of E)try{re(s,{mode:k})}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${s}
12
- `,exitCode:2}}let ie=E.length===0?{pattern:we,mode:"extended"}:Ce(E,k),Y,ee,I;try{let s=re(ie.pattern,{mode:ie.mode,ignoreCase:i,wholeWord:l,lineRegexp:m});Y=s.regex,ee=s.kResetGroup,I=s.preFilter}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${E.join(`
10
+ `,exitCode:2}}let v=ve(r);if(E.length+v.length>e.limits.maxArrayElements)throw new A(`grep: array element limit exceeded (${e.limits.maxArrayElements})`,"array_elements");E.push(...v)}if(E.length===0&&!f&&!u)return{stdout:"",stderr:"",exitCode:1};let Q=y?"fixed":F?"extended":$?"perl":"basic";if(Q==="perl"&&new Set(E).size>1)return{stdout:"",stderr:`grep: the -P option only supports a single pattern
11
+ `,exitCode:2};if(E.length>1&&Q!=="fixed")for(let s of E)try{re(s,{mode:Q})}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${s}
12
+ `,exitCode:2}}let ie=E.length===0?{pattern:we,mode:"extended"}:Ce(E,Q),Y,ee,I;try{let s=re(ie.pattern,{mode:ie.mode,ignoreCase:i,wholeWord:l,lineRegexp:m});Y=s.regex,ee=s.kResetGroup,I=s.preFilter}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${E.join(`
13
13
  `)}
14
- `,exitCode:2}}if(J.length===0&&e.stdin!==void 0){let s=K?"":j(e.stdin),r=se(s,Y,{invertMatch:f,showLineNumbers:g,countOnly:h,filename:"",onlyMatching:x,beforeContext:N,afterContext:W,maxCount:S,kResetGroup:ee,preFilter:I,maxWork:he(e),maxMatches:e.limits.maxArrayElements,signal:e.signal});return G?{stdout:"",stderr:"",exitCode:r.matched?0:1}:{stdout:r.output,stderr:"",exitCode:r.matched?0:1}}if(J.length===0)return{stdout:"",stderr:`grep: no input files
15
- `,exitCode:2};let U="",oe="",le=!1,ae=!1,P=[],R={operations:0,results:0,maxOperations:e.limits.maxGlobOperations,maxResults:e.limits.maxArrayElements},te=s=>{if(s.length>R.maxResults-P.length)throw new A(`grep: array element limit exceeded (${R.maxResults})`,"array_elements");P.push(...s)},fe=!1,ue=!1;for(let s of J){if(s==="-"){if(P.length>=R.maxResults)throw new A(`grep: array element limit exceeded (${R.maxResults})`,"array_elements");P.push({path:xe,isFile:!0,isStdin:!0,stdinAtEof:fe}),fe=!0;continue}if(ue=!0,s.includes("*")||s.includes("?")||s.includes("[")){let r=await Pe(s,e,R);if(a)for(let v of r){let o=await V(v.path,e,B,b,X,v.isFile,R);te(o)}else te(r)}else if(a){let r=await V(s,e,B,b,X,void 0,R);te(r)}else{if(P.length>=R.maxResults)throw new A(`grep: array element limit exceeded (${R.maxResults})`,"array_elements");P.push({path:s})}}let pe=(P.length>1||a&&ue)&&!M,ce=50;for(let s=0;s<P.length;s+=ce){let r=P.slice(s,s+ce),v=await Promise.all(r.map(async o=>{let d=o.path,p=d.split("/").pop()||d;if(b.length>0&&!a&&!o.isStdin&&b.some(n=>C(p,n,{stripQuotes:!0}))||B.length>0&&!a&&!o.isStdin&&!B.some(n=>C(p,n,{stripQuotes:!0})))return null;try{let n;if(o.isStdin)n=o.stdinAtEof||e.stdin===void 0?"":j(e.stdin);else{let D=e.fs.resolvePath(e.cwd,d),T=!1;if(o.isFile===void 0?T=(await e.fs.stat(D)).isDirectory:T=!o.isFile,T)return a?null:{error:`grep: ${d}: Is a directory
16
- `};n=await e.fs.readFile(D)}if(I&&!f){let D=I.ignoreCase?n.toLowerCase():n;if(!I.needles.some(T=>D.includes(T))){if(h){let T=pe?`${d}:0`:"0";return{file:d,result:{output:`${T}
17
- `,matched:!1,matchCount:0}}}return{file:d,result:{output:"",matched:!1,matchCount:0}}}}let z=se(n,Y,{invertMatch:f,showLineNumbers:g,countOnly:h,filename:pe?d:"",onlyMatching:x,beforeContext:N,afterContext:W,maxCount:S,kResetGroup:ee,preFilter:I,maxWork:he(e),maxMatches:e.limits.maxArrayElements,signal:e.signal});return{file:d,result:z}}catch(n){return O(n),{error:`grep: ${d}: No such file or directory
18
- `}}}));for(let o of v){if(o===null)continue;if("error"in o&&o.error){oe+=o.error,o.error.includes("Is a directory")||(ae=!0);continue}if(!("file"in o)||!o.result)continue;let{file:d,result:p}=o;if(p.matched){if(le=!0,G)return{stdout:"",stderr:"",exitCode:0};c?U+=`${d}
19
- `:u||(U+=p.output)}else u?U+=`${d}
20
- `:h&&!c&&(U+=p.output)}}let q;return ae?q=2:q=le?0:1,G?{stdout:"",stderr:"",exitCode:q}:{stdout:U,stderr:oe,exitCode:q}}},ge=256;async function ye(t,e,i,g,f,h=0){if(h>=ge)return;let c=i.fs.resolvePath(i.cwd,t);try{if(w(f),!(await i.fs.stat(c)).isDirectory){let l=t.split("/").pop()||"";if(e){let m=e.replace(/^\//,"");C(l,m,{stripQuotes:!0})&&(_(f),g.push(t))}return}w(f);let a=await i.fs.readdir(c);for(let l of a){let m=t==="."?l:`${t}/${l}`,F=i.fs.resolvePath(i.cwd,m);if(w(f),(await i.fs.stat(F)).isDirectory)await ye(m,e,i,g,f,h+1);else if(e){let y=e.replace(/^\//,"");C(l,y,{stripQuotes:!0})&&(_(f),g.push(m))}}}catch(u){O(u)}}async function Pe(t,e,i){let g=[],f=t.lastIndexOf("/"),h,c;if(f===-1?(h=e.cwd,c=t):(h=t.slice(0,f)||"/",c=t.slice(f+1)),t.includes("**")){let a=[],l=t.split("**"),m=l[0].replace(/\/$/,"")||".",F=l[1]||"";return await ye(m,F,e,a,i),a.map($=>({path:$}))}let u=e.fs.resolvePath(e.cwd,h);try{if(e.fs.readdirWithFileTypes){w(i);let a=await e.fs.readdirWithFileTypes(u);for(let l of a)if(w(i),C(l.name,c,{stripQuotes:!0})){let m=f===-1?l.name:`${h}/${l.name}`;_(i),g.push({path:m,isFile:l.isFile})}}else{w(i);let a=await e.fs.readdir(u);for(let l of a)if(w(i),C(l,c,{stripQuotes:!0})){let m=f===-1?l:`${h}/${l}`;_(i),g.push({path:m})}}}catch(a){O(a)}return g.sort((a,l)=>a.path.localeCompare(l.path))}async function V(t,e,i=[],g=[],f=[],h,c={operations:0,results:0,maxOperations:e.limits.maxGlobOperations,maxResults:e.limits.maxArrayElements},u=[],a=0){if(a>=ge)return u;let l=e.fs.resolvePath(e.cwd,t);try{let m,F;if(h!==void 0)m=h,F=!h;else{w(c);let y=await e.fs.stat(l);m=y.isFile,F=y.isDirectory}if(m){let y=t.split("/").pop()||t;return g.length>0&&g.some(x=>C(y,x,{stripQuotes:!0}))||i.length>0&&!i.some(x=>C(y,x,{stripQuotes:!0}))||(_(c),u.push({path:t,isFile:!0})),u}if(!F)return u;let $=t.split("/").pop()||t;if(f.length>0&&f.some(y=>C($,y,{stripQuotes:!0})))return u;if(e.fs.readdirWithFileTypes){w(c);let y=await e.fs.readdirWithFileTypes(l);for(let x of y){if(w(c),x.name.startsWith("."))continue;let M=t==="."?x.name:`${t}/${x.name}`;await V(M,e,i,g,f,x.isFile,c,u,a+1)}}else{w(c);let y=await e.fs.readdir(l);for(let x of y){if(w(c),x.startsWith("."))continue;let M=t==="."?x:`${t}/${x}`;await V(M,e,i,g,f,void 0,c,u,a+1)}}}catch(m){O(m)}return u}var Le={name:"fgrep",async execute(t,e){return de.execute(["-F",...t],e)}},Ie={name:"egrep",async execute(t,e){return de.execute(["-E",...t],e)}},Oe={name:"grep",flags:[{flag:"-E",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-P",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-L",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-o",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-m",type:"value",valueHint:"number"},{flag:"-A",type:"value",valueHint:"number"},{flag:"-B",type:"value",valueHint:"number"},{flag:"-C",type:"value",valueHint:"number"},{flag:"-e",type:"value",valueHint:"pattern"},{flag:"-f",type:"value",valueHint:"path"}],stdinType:"text",needsArgs:!0},Se={name:"fgrep",flags:[],stdinType:"text",needsArgs:!0},Be={name:"egrep",flags:[],stdinType:"text",needsArgs:!0};export{de as a,Le as b,Ie as c,Oe as d,Se as e,Be as f};
14
+ `,exitCode:2}}if(J.length===0&&e.stdin!==void 0){let s=K?"":j(e.stdin),r=se(s,Y,{invertMatch:f,showLineNumbers:g,countOnly:h,filename:"",onlyMatching:x,beforeContext:N,afterContext:W,maxCount:S,kResetGroup:ee,preFilter:I,maxWork:he(e),maxMatches:e.limits.maxArrayElements,signal:e.signal});return D?{stdout:"",stderr:"",exitCode:r.matched?0:1}:{stdout:r.output,stderr:"",exitCode:r.matched?0:1}}if(J.length===0)return{stdout:"",stderr:`grep: no input files
15
+ `,exitCode:2};let U="",oe="",le=!1,ae=!1,P=[],R={operations:0,results:0,maxOperations:e.limits.maxGlobOperations,maxResults:e.limits.maxArrayElements},te=s=>{if(s.length>R.maxResults-P.length)throw new A(`grep: array element limit exceeded (${R.maxResults})`,"array_elements");P.push(...s)},fe=!1,ue=!1;for(let s of J){if(s==="-"){if(P.length>=R.maxResults)throw new A(`grep: array element limit exceeded (${R.maxResults})`,"array_elements");P.push({path:xe,isFile:!0,isStdin:!0,stdinAtEof:fe}),fe=!0;continue}if(ue=!0,s.includes("*")||s.includes("?")||s.includes("[")){let r=await Pe(s,e,R);if(a)for(let v of r){let o=await V(v.path,e,B,b,X,v.isFile,R);te(o)}else te(r)}else if(a){let r=await V(s,e,B,b,X,void 0,R);te(r)}else{if(P.length>=R.maxResults)throw new A(`grep: array element limit exceeded (${R.maxResults})`,"array_elements");P.push({path:s})}}let ce=(P.length>1||a&&ue)&&!M,pe=50;for(let s=0;s<P.length;s+=pe){let r=P.slice(s,s+pe),v=await Promise.all(r.map(async o=>{let d=o.path,c=d.split("/").pop()||d;if(b.length>0&&!a&&!o.isStdin&&b.some(n=>C(c,n,{stripQuotes:!0}))||B.length>0&&!a&&!o.isStdin&&!B.some(n=>C(c,n,{stripQuotes:!0})))return null;try{let n;if(o.isStdin)n=o.stdinAtEof||e.stdin===void 0?"":j(e.stdin);else{let z=e.fs.resolvePath(e.cwd,d),T=!1;if(o.isFile===void 0?T=(await e.fs.stat(z)).isDirectory:T=!o.isFile,T)return a?null:{error:`grep: ${d}: Is a directory
16
+ `,isDirectory:!0};n=await e.fs.readFile(z)}if(I&&!f){let z=I.ignoreCase?n.toLowerCase():n;if(!I.needles.some(T=>z.includes(T))){if(h){let T=ce?`${d}:0`:"0";return{file:d,result:{output:`${T}
17
+ `,matched:!1,matchCount:0}}}return{file:d,result:{output:"",matched:!1,matchCount:0}}}}let q=se(n,Y,{invertMatch:f,showLineNumbers:g,countOnly:h,filename:ce?d:"",onlyMatching:x,beforeContext:N,afterContext:W,maxCount:S,kResetGroup:ee,preFilter:I,maxWork:he(e),maxMatches:e.limits.maxArrayElements,signal:e.signal});return{file:d,result:q}}catch(n){return O(n),{error:`grep: ${d}: No such file or directory
18
+ `,isDirectory:!1}}}));for(let o of v){if(o===null)continue;if("error"in o&&o.error){oe+=o.error,o.isDirectory||(ae=!0);continue}if(!("file"in o)||!o.result)continue;let{file:d,result:c}=o;if(c.matched){if(le=!0,D)return{stdout:"",stderr:"",exitCode:0};p?U+=`${d}
19
+ `:u||(U+=c.output)}else u?U+=`${d}
20
+ `:h&&!p&&(U+=c.output)}}let k;return ae?k=2:k=le?0:1,D?{stdout:"",stderr:"",exitCode:k}:{stdout:U,stderr:oe,exitCode:k}}},ge=256;async function ye(t,e,i,g,f,h=0){if(h>=ge)return;let p=i.fs.resolvePath(i.cwd,t);try{if(w(f),!(await i.fs.stat(p)).isDirectory){let l=t.split("/").pop()||"";if(e){let m=e.replace(/^\//,"");C(l,m,{stripQuotes:!0})&&(_(f),g.push(t))}return}w(f);let a=await i.fs.readdir(p);for(let l of a){let m=t==="."?l:`${t}/${l}`,F=i.fs.resolvePath(i.cwd,m);if(w(f),(await i.fs.stat(F)).isDirectory)await ye(m,e,i,g,f,h+1);else if(e){let y=e.replace(/^\//,"");C(l,y,{stripQuotes:!0})&&(_(f),g.push(m))}}}catch(u){O(u)}}async function Pe(t,e,i){let g=[],f=t.lastIndexOf("/"),h,p;if(f===-1?(h=e.cwd,p=t):(h=t.slice(0,f)||"/",p=t.slice(f+1)),t.includes("**")){let a=[],l=t.split("**"),m=l[0].replace(/\/$/,"")||".",F=l[1]||"";return await ye(m,F,e,a,i),a.map($=>({path:$}))}let u=e.fs.resolvePath(e.cwd,h);try{if(e.fs.readdirWithFileTypes){w(i);let a=await e.fs.readdirWithFileTypes(u);for(let l of a)if(w(i),C(l.name,p,{stripQuotes:!0})){let m=f===-1?l.name:`${h}/${l.name}`;_(i),g.push({path:m,isFile:l.isFile})}}else{w(i);let a=await e.fs.readdir(u);for(let l of a)if(w(i),C(l,p,{stripQuotes:!0})){let m=f===-1?l:`${h}/${l}`;_(i),g.push({path:m})}}}catch(a){O(a)}return g.sort((a,l)=>a.path.localeCompare(l.path))}async function V(t,e,i=[],g=[],f=[],h,p={operations:0,results:0,maxOperations:e.limits.maxGlobOperations,maxResults:e.limits.maxArrayElements},u=[],a=0){if(a>=ge)return u;let l=e.fs.resolvePath(e.cwd,t);try{let m,F;if(h!==void 0)m=h,F=!h;else{w(p);let y=await e.fs.stat(l);m=y.isFile,F=y.isDirectory}if(m){let y=t.split("/").pop()||t;return g.length>0&&g.some(x=>C(y,x,{stripQuotes:!0}))||i.length>0&&!i.some(x=>C(y,x,{stripQuotes:!0}))||(_(p),u.push({path:t,isFile:!0})),u}if(!F)return u;let $=t.split("/").pop()||t;if(f.length>0&&f.some(y=>C($,y,{stripQuotes:!0})))return u;if(e.fs.readdirWithFileTypes){w(p);let y=await e.fs.readdirWithFileTypes(l);for(let x of y){if(w(p),x.name.startsWith("."))continue;let M=t==="."?x.name:`${t}/${x.name}`;await V(M,e,i,g,f,x.isFile,p,u,a+1)}}else{w(p);let y=await e.fs.readdir(l);for(let x of y){if(w(p),x.startsWith("."))continue;let M=t==="."?x:`${t}/${x}`;await V(M,e,i,g,f,void 0,p,u,a+1)}}}catch(m){O(m)}return u}var Le={name:"fgrep",async execute(t,e){return de.execute(["-F",...t],e)}},Ie={name:"egrep",async execute(t,e){return de.execute(["-E",...t],e)}},Oe={name:"grep",flags:[{flag:"-E",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-P",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-L",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-o",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-m",type:"value",valueHint:"number"},{flag:"-A",type:"value",valueHint:"number"},{flag:"-B",type:"value",valueHint:"number"},{flag:"-C",type:"value",valueHint:"number"},{flag:"-e",type:"value",valueHint:"pattern"},{flag:"-f",type:"value",valueHint:"path"}],stdinType:"text",needsArgs:!0},Se={name:"fgrep",flags:[],stdinType:"text",needsArgs:!0},Be={name:"egrep",flags:[],stdinType:"text",needsArgs:!0};export{de as a,Le as b,Ie as c,Oe as d,Se as e,Be as f};
@@ -1,2 +1,2 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{c as l,d as u}from"./chunk-WXPNKIIH.js";import{randomBytes as h}from"node:crypto";var d=class{options;protocolToken=h(16).toString("hex");deadline;cleanups=[];cancelHandler;canceledReason;closed=!1;constructor(t){this.options=t,this.deadline=Date.now()+t.timeoutMs}arm(t){if(this.cancelHandler)throw new Error("worker request is already armed");this.cancelHandler=t;let a=this.options.signal;if(a){let i=()=>this.cancel("abort");a.addEventListener("abort",i,{once:!0}),this.cleanups.push(()=>a.removeEventListener("abort",i)),a.aborted&&this.cancel("abort")}if(!this.canceledReason){let i=l(()=>this.cancel("timeout"),Math.max(0,this.options.timeoutMs));i!==void 0&&this.cleanups.push(()=>u(i))}}get isCanceled(){return this.canceledReason!==void 0}remainingTimeMs(){return Math.max(0,this.deadline-Date.now())}timeoutMessage(t="Execution"){return`${t} timeout: exceeded ${this.options.timeoutMs}ms limit`}abortMessage(){return"Execution aborted"}assertMessageSize(t,a){if(f(t,this.options.maxMessageBytes)>this.options.maxMessageBytes)throw new Error(`${this.options.commandName}: worker ${a} exceeds ${this.options.maxMessageBytes} byte limit`)}async terminate(t){if(!t)return!0;try{return await t.terminate(),!0}catch{return!1}}close(){if(!this.closed){this.closed=!0;for(let t=this.cleanups.length-1;t>=0;t--)this.cleanups[t]();this.cleanups.length=0,this.cancelHandler=void 0}}cancel(t){this.closed||this.canceledReason||(this.canceledReason=t,this.cancelHandler?.(t))}};function f(o,t){let a=function*(n){for(let e in n)Object.hasOwn(n,e)&&(yield[e,n[e]])},i=[{kind:"value",value:o}],c=new WeakSet,s=0;for(;i.length>0&&s<=t;){let n=i.pop();if(!n)break;if(n.kind==="array"){n.index<n.value.length&&(i.push({...n,index:n.index+1}),i.push({kind:"value",value:n.value[n.index]}));continue}if(n.kind==="object"){let r=n.iterator.next();r.done||(s+=8+Buffer.byteLength(r.value[0],"utf8"),i.push(n),i.push({kind:"value",value:r.value[1]}));continue}let e=n.value;if(e==null)s+=4;else if(typeof e=="string")s+=Buffer.byteLength(e,"utf8");else if(typeof e=="number"||typeof e=="bigint")s+=8;else if(typeof e=="boolean")s+=1;else if(typeof e=="object"){if(c.has(e))continue;if(c.add(e),ArrayBuffer.isView(e))s+=e.byteLength;else if(e instanceof ArrayBuffer||e instanceof SharedArrayBuffer)s+=e.byteLength;else if(Array.isArray(e)){if(e.length>Math.floor((t-s)/8))return t+1;s+=e.length*8,i.push({kind:"array",value:e,index:0})}else i.push({kind:"object",iterator:a(e)})}}return s}export{d as a};
2
+ import{d as l,e as u}from"./chunk-PS2RJNZZ.js";import{randomBytes as h}from"node:crypto";var d=class{options;protocolToken=h(16).toString("hex");deadline;cleanups=[];cancelHandler;canceledReason;closed=!1;constructor(t){this.options=t,this.deadline=Date.now()+t.timeoutMs}arm(t){if(this.cancelHandler)throw new Error("worker request is already armed");this.cancelHandler=t;let a=this.options.signal;if(a){let i=()=>this.cancel("abort");a.addEventListener("abort",i,{once:!0}),this.cleanups.push(()=>a.removeEventListener("abort",i)),a.aborted&&this.cancel("abort")}if(!this.canceledReason){let i=l(()=>this.cancel("timeout"),Math.max(0,this.options.timeoutMs));i!==void 0&&this.cleanups.push(()=>u(i))}}get isCanceled(){return this.canceledReason!==void 0}remainingTimeMs(){return Math.max(0,this.deadline-Date.now())}timeoutMessage(t="Execution"){return`${t} timeout: exceeded ${this.options.timeoutMs}ms limit`}abortMessage(){return"Execution aborted"}assertMessageSize(t,a){if(f(t,this.options.maxMessageBytes)>this.options.maxMessageBytes)throw new Error(`${this.options.commandName}: worker ${a} exceeds ${this.options.maxMessageBytes} byte limit`)}async terminate(t){if(!t)return!0;try{return await t.terminate(),!0}catch{return!1}}close(){if(!this.closed){this.closed=!0;for(let t=this.cleanups.length-1;t>=0;t--)this.cleanups[t]();this.cleanups.length=0,this.cancelHandler=void 0}}cancel(t){this.closed||this.canceledReason||(this.canceledReason=t,this.cancelHandler?.(t))}};function f(o,t){let a=function*(n){for(let e in n)Object.hasOwn(n,e)&&(yield[e,n[e]])},i=[{kind:"value",value:o}],c=new WeakSet,s=0;for(;i.length>0&&s<=t;){let n=i.pop();if(!n)break;if(n.kind==="array"){n.index<n.value.length&&(i.push({...n,index:n.index+1}),i.push({kind:"value",value:n.value[n.index]}));continue}if(n.kind==="object"){let r=n.iterator.next();r.done||(s+=8+Buffer.byteLength(r.value[0],"utf8"),i.push(n),i.push({kind:"value",value:r.value[1]}));continue}let e=n.value;if(e==null)s+=4;else if(typeof e=="string")s+=Buffer.byteLength(e,"utf8");else if(typeof e=="number"||typeof e=="bigint")s+=8;else if(typeof e=="boolean")s+=1;else if(typeof e=="object"){if(c.has(e))continue;if(c.add(e),ArrayBuffer.isView(e))s+=e.byteLength;else if(e instanceof ArrayBuffer||e instanceof SharedArrayBuffer)s+=e.byteLength;else if(Array.isArray(e)){if(e.length>Math.floor((t-s)/8))return t+1;s+=e.length*8,i.push({kind:"array",value:e,index:0})}else i.push({kind:"object",iterator:a(e)})}}return s}export{d as a};
@@ -0,0 +1,7 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{c as i}from"./chunk-T5ZEIOJ3.js";import{a as m}from"./chunk-FOCWZZDE.js";import{a as c}from"./chunk-QIQMJJZ4.js";import{a as l}from"./chunk-W5DWRFSU.js";var k={recursive:{short:"p",long:"parents",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},h={name:"mkdir",async execute(f,s){let r=c("mkdir",f,k);if(!r.ok)return r.error;let g=r.result.flags.recursive,p=r.result.flags.verbose,n=r.result.positional;if(n.length===0)return{stdout:"",stderr:`mkdir: missing operand
3
+ `,exitCode:1};let a="",t="",d=0;for(let e of n)try{let o=s.fs.resolvePath(s.cwd,e);await s.fs.mkdir(o,{recursive:g}),p&&(a+=`mkdir: created directory '${e}'
4
+ `)}catch(o){let u=l(o);i(o,"ENOENT")?t+=`mkdir: cannot create directory '${e}': No such file or directory
5
+ `:i(o,"EEXIST")?t+=`mkdir: cannot create directory '${e}': File exists
6
+ `:t+=`mkdir: cannot create directory '${e}': ${m(u)}
7
+ `,d=1}return{stdout:a,stderr:t,exitCode:d}}},$={name:"mkdir",flags:[{flag:"-p",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0};export{h as a,$ as b};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a as w}from"./chunk-WZQNMEQW.js";import{b as m}from"./chunk-AYSZ5MAE.js";import{d as v}from"./chunk-FTET43KM.js";import{e as B}from"./chunk-7IJWBG4I.js";import{l as z}from"./chunk-TVCZIH6M.js";import{a as L}from"./chunk-QIQMJJZ4.js";import{a as F,b as E}from"./chunk-QAYAQNCG.js";import{constants as C,gunzipSync as _,gzipSync as A}from"node:zlib";var D={name:"gzip",summary:"compress or expand files",usage:"gzip [OPTION]... [FILE]...",description:`Compress FILEs (by default, in-place).
2
+ import{a as w}from"./chunk-WZQNMEQW.js";import{b as m}from"./chunk-AYSZ5MAE.js";import{d as v}from"./chunk-FTET43KM.js";import{e as B}from"./chunk-D5FHVW27.js";import{l as z}from"./chunk-TVCZIH6M.js";import{a as L}from"./chunk-QIQMJJZ4.js";import{a as F,b as E}from"./chunk-QAYAQNCG.js";import{constants as C,gunzipSync as _,gzipSync as A}from"node:zlib";var D={name:"gzip",summary:"compress or expand files",usage:"gzip [OPTION]... [FILE]...",description:`Compress FILEs (by default, in-place).
3
3
 
4
4
  When no FILE is given, or when FILE is -, read from standard input.
5
5
 
@@ -0,0 +1,11 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{b as L}from"./chunk-WNH3HOQA.js";import{a as I,b as l}from"./chunk-KIGPB52X.js";import{d as A,e as m}from"./chunk-PS2RJNZZ.js";import{a as C}from"./chunk-L2UW7DWF.js";import{b as w}from"./chunk-ZBUZKIPX.js";import{a as _,b as f}from"./chunk-T5ZEIOJ3.js";import{a as F,b as D}from"./chunk-FOCWZZDE.js";var h={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,RENAME:14,COPY_FILE:15,WRITE_FILE_RANGE:17,READ_RESULT_RANGE:18,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300,INVOKE_TOOL:400},S={IDLE:0,REQUEST:1,CANCELLED:2},r={NONE:0,SUCCESS:1,ERROR:2},a={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10,NOT_EMPTY:11,LOOP:12,FILE_TOO_LARGE:13,NO_SPACE:14,BUSY:15,READ_ONLY:16,CROSS_DEVICE:17},O=Object.assign(Object.create(null),{ENOENT:a.NOT_FOUND,EISDIR:a.IS_DIRECTORY,ENOTDIR:a.NOT_DIRECTORY,ENOTEMPTY:a.NOT_EMPTY,EEXIST:a.EXISTS,EPERM:a.PERMISSION_DENIED,EACCES:a.PERMISSION_DENIED,EINVAL:a.INVALID_PATH,ELOOP:a.LOOP,EFBIG:a.FILE_TOO_LARGE,ENOSPC:a.NO_SPACE,EBUSY:a.BUSY,EROFS:a.READ_ONLY,EXDEV:a.CROSS_DEVICE}),P=Object.create(null);for(let[d,t]of Object.entries(O))P[t]=d;var o={OP_CODE:0,REQUEST:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,RESULT_STATE:32,PATH_BUFFER:36,DATA_BUFFER:4132},R={PATH_BUFFER:4096,DATA_BUFFER:8388608,TOTAL:8392740},g={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},u={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function M(){return new I(R.TOTAL)}var T=class{int32View;uint8View;dataView;constructor(t){this.int32View=new Int32Array(t),this.uint8View=new Uint8Array(t),this.dataView=new DataView(t)}getOpCode(){return l.load(this.int32View,o.OP_CODE/4)}setOpCode(t){l.store(this.int32View,o.OP_CODE/4,t)}getRequest(){return l.load(this.int32View,o.REQUEST/4)}setRequest(t){l.store(this.int32View,o.REQUEST/4,t)}getResultState(){return l.load(this.int32View,o.RESULT_STATE/4)}setResultState(t){l.store(this.int32View,o.RESULT_STATE/4,t)}getPathLength(){return l.load(this.int32View,o.PATH_LENGTH/4)}setPathLength(t){l.store(this.int32View,o.PATH_LENGTH/4,t)}getDataLength(){return l.load(this.int32View,o.DATA_LENGTH/4)}setDataLength(t){l.store(this.int32View,o.DATA_LENGTH/4,t)}getResultLength(){return l.load(this.int32View,o.RESULT_LENGTH/4)}setResultLength(t){l.store(this.int32View,o.RESULT_LENGTH/4,t)}getErrorCode(){return l.load(this.int32View,o.ERROR_CODE/4)}setErrorCode(t){l.store(this.int32View,o.ERROR_CODE/4,t)}getFlags(){return l.load(this.int32View,o.FLAGS/4)}setFlags(t){l.store(this.int32View,o.FLAGS/4,t)}getMode(){return l.load(this.int32View,o.MODE/4)}setMode(t){l.store(this.int32View,o.MODE/4,t)}getPath(){let t=this.getPathLength(),e=this.uint8View.slice(o.PATH_BUFFER,o.PATH_BUFFER+t);return new TextDecoder().decode(e)}setPath(t){let e=new TextEncoder().encode(t);if(e.length>R.PATH_BUFFER)throw new Error(`Path too long: ${e.length} > ${R.PATH_BUFFER}`);this.uint8View.set(e,o.PATH_BUFFER),this.setPathLength(e.length)}getData(){let t=this.getDataLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setData(t){if(t.length>R.DATA_BUFFER)throw new Error(`Data too large: ${t.length} > ${R.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setDataLength(t.length)}getDataAsString(){let t=this.getData();return new TextDecoder().decode(t)}setDataFromString(t){let e=new TextEncoder().encode(t);this.setData(e)}getResult(){let t=this.getResultLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setResult(t){if(t.length>R.DATA_BUFFER)throw new Error(`Result too large: ${t.length} > ${R.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setResultLength(t.length)}setResultPrefix(t){if(t.length>2147483647)throw new Error(`Result too large: ${t.length} exceeds int32`);let e=Math.min(t.length,R.DATA_BUFFER);this.uint8View.set(t.subarray(0,e),o.DATA_BUFFER),this.setResultLength(t.length)}getResultAsString(){let t=this.getResult();return new TextDecoder().decode(t)}setResultFromString(t){let e=new TextEncoder().encode(t);this.setResult(e)}encodeStat(t){this.uint8View[o.DATA_BUFFER+u.IS_FILE]=t.isFile?1:0,this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]=t.isDirectory?1:0,this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]=t.isSymbolicLink?1:0,this.dataView.setInt32(o.DATA_BUFFER+u.MODE,t.mode,!0);let e=Math.min(t.size,Number.MAX_SAFE_INTEGER);this.dataView.setFloat64(o.DATA_BUFFER+u.SIZE,e,!0),this.dataView.setFloat64(o.DATA_BUFFER+u.MTIME,t.mtime.getTime(),!0),this.setResultLength(u.TOTAL)}decodeStat(){return{isFile:this.uint8View[o.DATA_BUFFER+u.IS_FILE]===1,isDirectory:this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]===1,mode:this.dataView.getInt32(o.DATA_BUFFER+u.MODE,!0),size:this.dataView.getFloat64(o.DATA_BUFFER+u.SIZE,!0),mtime:new Date(this.dataView.getFloat64(o.DATA_BUFFER+u.MTIME,!0))}}async waitUntilReady(t){let e=Date.now();for(;;){let s=this.getRequest();if(s===S.REQUEST)return!0;if(s!==S.IDLE)return!1;let i=Date.now()-e;if(i>=t)return!1;let n=t-i,c=l.waitAsync(this.int32View,o.REQUEST/4,S.IDLE,n);if(c.async&&await c.value==="timed-out")return!1}}waitForResult(t){return l.wait(this.int32View,o.RESULT_STATE/4,r.NONE,t)}notifyRequest(){return l.notify(this.int32View,o.REQUEST/4)}notifyResult(){return l.notify(this.int32View,o.RESULT_STATE/4)}reset(){this.setOpCode(h.NOOP),this.setRequest(S.IDLE),this.setResultState(r.NONE),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(a.NONE),this.setFlags(g.NONE),this.setMode(0)}};function U(d){return d!==void 0&&Object.hasOwn(O,d)?O[d]:a.IO_ERROR}var N=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;invokeTool;protocol;running=!1;output={stdout:"",stderr:"",exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;lastResult=null;constructor(t,e,s,i,n=void 0,c=0,E=void 0,p=void 0){this.fs=e,this.cwd=s,this.commandName=i,this.secureFetch=n,this.maxOutputSize=c,this.exec=E,this.invokeTool=p,this.protocol=new T(t)}remainingMs(){return Math.max(0,this.timeoutMs-(Date.now()-this.startTime))}raceDeadline(t){let e=this.remainingMs();if(e<=0)return this.running=!1,this.output.exitCode=124,this.output.stderr+=`
3
+ ${this.commandName}: execution timeout exceeded
4
+ `,Promise.reject(new Error("Operation timed out"));let s=t();return e===Number.POSITIVE_INFINITY?s:new Promise((i,n)=>{let c=A(()=>{this.running=!1,this.output.exitCode=124,this.output.stderr+=`
5
+ ${this.commandName}: execution timeout exceeded
6
+ `,n(new Error("Operation timed out"))},e);s.then(E=>{m(c),i(E)},E=>{m(c),n(E)})})}async run(t){for(this.running=!0,this.startTime=Date.now(),this.timeoutMs=t;this.running;){if(Date.now()-this.startTime>=t){this.output.stderr+=`
7
+ ${this.commandName}: execution timeout exceeded
8
+ `,this.output.exitCode=124;break}let s=this.remainingMs();if(!await this.protocol.waitUntilReady(s)){if(!this.running)break;this.output.stderr+=`
9
+ ${this.commandName}: execution timeout exceeded
10
+ `,this.output.exitCode=124;break}if(!this.running)break;this.protocol.setRequest(S.IDLE);let n=this.protocol.getOpCode();await this.handleOperation(n),this.protocol.notifyResult()}return this.output}stop(){this.running=!1,this.lastResult=null,this.protocol.setRequest(S.CANCELLED),this.protocol.notifyRequest()}async handleOperation(t){try{switch(t){case h.READ_FILE:await this.handleReadFile();break;case h.WRITE_FILE:await this.handleWriteFile();break;case h.STAT:await this.handleStat();break;case h.LSTAT:await this.handleLstat();break;case h.READDIR:await this.handleReaddir();break;case h.MKDIR:await this.handleMkdir();break;case h.READ_RESULT_RANGE:this.handleReadResultRange();break;case h.WRITE_FILE_RANGE:await this.handleWriteFileRange();break;case h.RM:await this.handleRm();break;case h.EXISTS:await this.handleExists();break;case h.APPEND_FILE:await this.handleAppendFile();break;case h.SYMLINK:await this.handleSymlink();break;case h.READLINK:await this.handleReadlink();break;case h.CHMOD:await this.handleChmod();break;case h.REALPATH:await this.handleRealpath();break;case h.RENAME:await this.handleRename();break;case h.COPY_FILE:await this.handleCopyFile();break;case h.WRITE_STDOUT:this.handleWriteStdout();break;case h.WRITE_STDERR:this.handleWriteStderr();break;case h.EXIT:this.handleExit();break;case h.HTTP_REQUEST:await this.handleHttpRequest();break;case h.EXEC_COMMAND:await this.handleExecCommand();break;case h.INVOKE_TOOL:await this.handleInvokeTool();break;default:this.protocol.setErrorCode(a.IO_ERROR),this.protocol.setResultState(r.ERROR)}}catch(e){this.setErrorFromException(e)}}publishResult(t){let e=typeof t=="string"?new TextEncoder().encode(t):t;this.lastResult=e,this.protocol.setResultPrefix(e),this.protocol.setResultState(r.SUCCESS)}handleReadResultRange(){let t=this.protocol.getFlags(),e=this.protocol.getMode(),s=this.lastResult;if(!s||t>=s.length){this.protocol.setErrorCode(a.IO_ERROR),this.protocol.setResultFromString(`No retained result for range read (offset=${t}, length=${e}, retained=${s?.length??"none"})`),this.protocol.setResultState(r.ERROR);return}this.protocol.setResult(s.subarray(t,t+e)),this.protocol.setResultState(r.SUCCESS)}resolvePath(t){return this.fs.resolvePath(this.cwd,t)}async handleReadFile(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readFileBuffer(t);this.publishResult(e)}catch(e){this.setErrorFromException(e)}}async handleWriteFileRange(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getFlags(),s=this.protocol.getData();try{if(e===0)await this.fs.writeFile(t,s);else{let i=await this.fs.stat(t);if(i.size!==e)throw new _("EIO",`non-sequential range write to '${t}': offset ${e} != size ${i.size}`);await this.fs.appendFile(t,s)}this.protocol.setResultState(r.SUCCESS)}catch(i){this.setErrorFromException(i)}}async handleWriteFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getData();try{await this.fs.writeFile(t,e),this.protocol.setResultState(r.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleStat(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.stat(t);this.protocol.encodeStat(e),this.protocol.setResultState(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleLstat(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.lstat(t);this.protocol.encodeStat(e),this.protocol.setResultState(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleReaddir(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readdir(t);this.publishResult(JSON.stringify(e))}catch(e){this.setErrorFromException(e)}}async handleMkdir(){let t=this.resolvePath(this.protocol.getPath()),s=(this.protocol.getFlags()&g.MKDIR_RECURSIVE)!==0;try{await this.fs.mkdir(t,{recursive:s}),this.protocol.setResultState(r.SUCCESS)}catch(i){this.setErrorFromException(i)}}async handleRm(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getFlags(),s=(e&g.RECURSIVE)!==0,i=(e&g.FORCE)!==0;try{await this.fs.rm(t,{recursive:s,force:i}),this.protocol.setResultState(r.SUCCESS)}catch(n){this.setErrorFromException(n)}}async handleExists(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.exists(t);this.protocol.setResult(new Uint8Array([e?1:0])),this.protocol.setResultState(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleAppendFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getData();try{await this.fs.appendFile(t,e),this.protocol.setResultState(r.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleSymlink(){let t=this.protocol.getPath(),e=this.protocol.getDataAsString(),s=this.resolvePath(t);try{await this.fs.symlink(e,s),this.protocol.setResultState(r.SUCCESS)}catch(i){this.setErrorFromException(i)}}async handleReadlink(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readlink(t);this.protocol.setResultFromString(e),this.protocol.setResultState(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleChmod(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getMode();try{await this.fs.chmod(t,e),this.protocol.setResultState(r.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleRealpath(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.realpath(t);this.protocol.setResultFromString(e),this.protocol.setResultState(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleRename(){let t=this.resolvePath(this.protocol.getPath()),e=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.mv(t,e),this.protocol.setResultState(r.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleCopyFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.cp(t,e),this.protocol.setResultState(r.SUCCESS)}catch(s){this.setErrorFromException(s)}}handleWriteStdout(){let t=this.protocol.getDataAsString();if(!this.tryAppendOutput("stdout",t)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(a.IO_ERROR),this.protocol.setResultFromString("Output size limit exceeded"),this.protocol.setResultState(r.ERROR);return}this.protocol.setResultState(r.SUCCESS)}handleWriteStderr(){let t=this.protocol.getDataAsString();if(!this.tryAppendOutput("stderr",t)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(a.IO_ERROR),this.protocol.setResultFromString("Output size limit exceeded"),this.protocol.setResultState(r.ERROR);return}this.protocol.setResultState(r.SUCCESS)}handleExit(){let t=this.protocol.getFlags();this.outputLimitExceeded?this.output.exitCode===0&&(this.output.exitCode=1):this.output.exitCode=t,this.protocol.setResultState(r.SUCCESS),this.running=!1}tryAppendOutput(t,e){return this.outputLimitExceeded?!1:this.maxOutputSize<=0?(t==="stdout"?this.output.stdout+=e:this.output.stderr+=e,!0):this.output.stdout.length+this.output.stderr.length+e.length>this.maxOutputSize?!1:(t==="stdout"?this.output.stdout+=e:this.output.stderr+=e,!0)}appendOutputLimitError(){if(this.maxOutputSize<=0)return;let t=`${this.commandName}: total output size exceeded (>${this.maxOutputSize} bytes), increase executionLimits.maxOutputSize
11
+ `,e=t.length>this.maxOutputSize?t.slice(0,this.maxOutputSize):t;if(this.output.stderr.includes("total output size exceeded"))return;let i=this.output.stdout.length+this.output.stderr.length+e.length-this.maxOutputSize;if(i>0)if(this.output.stdout.length>=i)this.output.stdout=this.output.stdout.slice(0,this.output.stdout.length-i);else{let n=i-this.output.stdout.length;this.output.stdout="",n>=this.output.stderr.length?this.output.stderr="":this.output.stderr=this.output.stderr.slice(0,this.output.stderr.length-n)}this.output.stderr+=e}async handleHttpRequest(){let t=this.secureFetch;if(!t){this.protocol.setErrorCode(a.NETWORK_NOT_CONFIGURED),this.protocol.setResultFromString("Network access not configured. Enable network in Bash options."),this.protocol.setResultState(r.ERROR);return}let e=this.protocol.getPath(),s=this.protocol.getDataAsString();try{let i=s?JSON.parse(s):{},n=this.remainingMs(),c=await this.raceDeadline(()=>t(e,{method:i.method,headers:i.headers,body:i.body,timeoutMs:n})),E=JSON.stringify({status:c.status,statusText:c.statusText,headers:c.headers,bodyBase64:L(c.body,"base64"),url:c.url});this.publishResult(E)}catch(i){let n=F(i instanceof Error?i.message:String(i));this.protocol.setErrorCode(a.NETWORK_ERROR),this.protocol.setResultFromString(n),this.protocol.setResultState(r.ERROR)}}async handleExecCommand(){let t=this.exec;if(!t){this.protocol.setErrorCode(a.IO_ERROR),this.protocol.setResultFromString("Command execution not available in this context."),this.protocol.setResultState(r.ERROR);return}let e=this.protocol.getPath(),s=this.protocol.getDataAsString(),i=new AbortController;try{let n={cwd:this.cwd,signal:i.signal};if(s){let p=JSON.parse(s);p.stdin&&(n.stdin=p.stdin),p.args&&Array.isArray(p.args)&&(n.args=p.args.map(x=>String(x)),e=C([e]))}let c=await this.raceDeadline(()=>t(e,n)),E=JSON.stringify({stdout:c.stdout,stderr:c.stderr,exitCode:c.exitCode});this.publishResult(E)}catch(n){i.abort();let c=n instanceof Error?n.message:String(n);this.protocol.setErrorCode(a.IO_ERROR),this.protocol.setResultFromString(c),this.protocol.setResultState(r.ERROR)}}async handleInvokeTool(){let t=this.invokeTool;if(!t){this.protocol.setErrorCode(a.IO_ERROR),this.protocol.setResultFromString("Tool invocation not available in this context."),this.protocol.setResultState(r.ERROR);return}let e=this.protocol.getPath(),s=this.protocol.getDataAsString();try{let i=await this.raceDeadline(()=>w.runTrustedAsync(()=>t(e,s)));this.publishResult(i)}catch(i){let n=D(i instanceof Error?i.message:String(i));this.protocol.setErrorCode(a.IO_ERROR),this.protocol.setResultFromString(n),this.protocol.setResultState(r.ERROR)}}setErrorFromException(t){let e=t instanceof Error?t.message:String(t),s=F(e);this.protocol.setErrorCode(U(f(t))),this.protocol.setResultFromString(s),this.protocol.setResultState(r.ERROR)}};export{M as a,N as b};
@@ -0,0 +1,2 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{e as l,f as v,h as P,k as f}from"./chunk-4CC3OZPU.js";import{l as u,m as y}from"./chunk-TVCZIH6M.js";import{c as k}from"./chunk-T5ZEIOJ3.js";import{a as g}from"./chunk-FOCWZZDE.js";var w=class extends Error{operation;virtualPath;name="FileSystemPolicyError";constructor(t,r,n){super(`${t}: ${g(n)}`),this.operation=t,this.virtualPath=r}};function $(e){if(e.identity!==void 0)return`identity:${e.identity}`;if(e.dev!==void 0&&e.ino!==void 0)return`inode:${String(e.dev)}:${String(e.ino)}`}function b(e){return k(e,"ENOENT")}async function m(e,t,r){let n=l(t),s;try{s=await e.stat(n)}catch(a){if(!b(a))return{existence:"unknown"}}if(s!==void 0){let a=$(s);try{return{existence:"existing",canonicalPath:l(await e.realpath(n)),stableIdentity:a}}catch{return a===void 0?{existence:"unknown"}:{existence:"existing",stableIdentity:a}}}let i=[],o=n;for(;;){r?.checkpoint();let a=P(o);if(a===o)return{existence:"unknown"};i.unshift(o.slice(a==="/"?1:a.length+1)),o=a;try{let c=l(await e.realpath(o));return{existence:"missing",canonicalPath:i.reduce((h,d)=>f(h,d),c)}}catch(c){if(!b(c))return{existence:"missing"}}}}async function C(e,t,r){let[n,s]=await Promise.all([m(e,t),m(e,r)]);return n.existence==="unknown"||s.existence==="unknown"?"unknown":n.existence==="missing"||s.existence==="missing"?n.existence!==s.existence?"different":n.canonicalPath!==void 0&&n.canonicalPath===s.canonicalPath?"same":"unknown":n.stableIdentity!==void 0&&s.stableIdentity!==void 0?n.stableIdentity===s.stableIdentity?"same":"different":n.canonicalPath!==void 0&&n.canonicalPath===s.canonicalPath?"same":"unknown"}async function D(e,t,r,n){let[s,i]=await Promise.all([m(e,t,n),m(e,r,n)]);return s.existence!=="existing"||s.canonicalPath===void 0||i.existence==="unknown"||i.canonicalPath===void 0?"unknown":v(s.canonicalPath,i.canonicalPath)?"inside":"outside"}var x=class{options;entries=0;discoveredEntries=1;work=0;constructor(t){this.options=t}checkpoint(t=1){if(this.options.signal?.aborted)throw new y;if(this.options.executionScope?.throwIfAborted(this.options.site),!Number.isSafeInteger(t)||t<0||t>this.options.limits.maxTraversalWork-this.work)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal work"} limit exceeded (${this.options.limits.maxTraversalWork})`,"iterations");this.work+=t,this.options.executionScope?.consumeWork(t,`${this.options.site} filesystem traversal`)}visit(t){if(this.checkpoint(),t>this.options.limits.maxTraversalDepth)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} depth limit exceeded (${this.options.limits.maxTraversalDepth})`,"recursion");if(++this.entries>this.options.limits.maxTraversalEntries)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} entry limit exceeded (${this.options.limits.maxTraversalEntries})`,"iterations")}discover(t){if(!Number.isSafeInteger(t)||t<0||t>this.options.limits.maxTraversalEntries-this.discoveredEntries)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} entry limit exceeded (${this.options.limits.maxTraversalEntries})`,"iterations");this.checkpoint(t),this.discoveredEntries+=t}};async function N(e,t){let r=e.budget??new x(e),n=[{kind:"enter",path:l(e.root),depth:0}],s=new Set;for(;n.length>0;){r.checkpoint(0);let i=n.pop();if(!i)break;if(i.kind==="leave"){e.includeLeave&&await t({path:i.path,depth:i.depth,stat:i.stat,isSymlink:i.isSymlink,phase:"leave"}),i.identity&&s.delete(i.identity);continue}r.visit(i.depth);let o=await e.fs.lstat(i.path),a=o.isSymbolicLink,c=a&&e.symlinks==="follow"?await e.fs.stat(i.path):o;if(await t({path:i.path,depth:i.depth,stat:c,isSymlink:a,phase:"enter"}),!c.isDirectory||a&&e.symlinks!=="follow")continue;let h=$(c)??await e.fs.realpath(i.path).then(l).catch(()=>{});if(h!==void 0){if(s.has(h))throw new w(e.site,i.path,"symbolic-link directory cycle detected");s.add(h)}n.push({kind:"leave",path:i.path,depth:i.depth,stat:c,isSymlink:a,identity:h});let d=await e.fs.readdir(i.path);r.checkpoint(),d.sort((p,E)=>p.localeCompare(E));for(let p=d.length-1;p>=0;p--)n.push({kind:"enter",path:f(i.path,d[p]),depth:i.depth+1})}}export{m as a,C as b,D as c,x as d,N as e};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a as W}from"./chunk-N3A4JVFJ.js";import{c as $}from"./chunk-BKUWXPEM.js";import{b as C}from"./chunk-ZBUZKIPX.js";import{a as V}from"./chunk-7IJWBG4I.js";import{d as I}from"./chunk-GN6CQ3J4.js";import{a as B,b}from"./chunk-FOCWZZDE.js";import{a as x}from"./chunk-W5DWRFSU.js";import{a as N,b as R}from"./chunk-QAYAQNCG.js";import{existsSync as ce}from"node:fs";import{dirname as de,join as T,sep as Q}from"node:path";import{fileURLToPath as me}from"node:url";import{Worker as he}from"node:worker_threads";import pe from"sql.js";function K(e,t){return e==null?Buffer.byteLength(t,"utf8"):e instanceof Uint8Array||Buffer.isBuffer(e)?e.byteLength:Buffer.byteLength(String(e),"utf8")}function X(e,t,r){let n=r.maxOutputSize??Number.MAX_SAFE_INTEGER,s=Buffer.byteLength(r.separator,"utf8");s+=Buffer.byteLength(r.newline,"utf8");for(let a of e)s+=Buffer.byteLength(a,"utf8");for(let a of t){s+=a.length*16;for(let i of a)s+=K(i,r.nullValue);if(s>n)break}let o=s*8+(t.length+3)*(e.length+3)*16;if(!Number.isSafeInteger(o)||o>n)throw new Error(`formatted output exceeds ${n} byte limit`);return n}function _(e,t,r){let n=X(e,t,r),s;switch(r.mode){case"list":s=Y(e,t,r);break;case"csv":s=Z(e,t,r);break;case"json":s=te(e,t);break;case"line":s=re(e,t,r);break;case"column":s=ne(e,t,r);break;case"table":s=se(e,t,r);break;case"markdown":s=oe(e,t,r);break;case"tabs":s=ie(e,t,r);break;case"box":s=ae(e,t,r);break;case"quote":s=le(e,t,r);break;case"html":s=fe(e,t,r);break;case"ascii":s=ue(e,t,r);break}if(Buffer.byteLength(s,"utf8")>n)throw new Error(`formatted output exceeds ${n} byte limit`);return s}function m(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function Y(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let s of t)n.push(s.map(o=>m(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function Z(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(v).join(","));for(let s of t)n.push(s.map(o=>v(m(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
2
+ import{a as W}from"./chunk-6IA4DXG2.js";import{c as $}from"./chunk-BKUWXPEM.js";import{b as C}from"./chunk-ZBUZKIPX.js";import{a as V}from"./chunk-D5FHVW27.js";import{d as I}from"./chunk-GN6CQ3J4.js";import{a as B,b}from"./chunk-FOCWZZDE.js";import{a as x}from"./chunk-W5DWRFSU.js";import{a as N,b as R}from"./chunk-QAYAQNCG.js";import{existsSync as ce}from"node:fs";import{dirname as de,join as T,sep as Q}from"node:path";import{fileURLToPath as me}from"node:url";import{Worker as he}from"node:worker_threads";import pe from"sql.js";function K(e,t){return e==null?Buffer.byteLength(t,"utf8"):e instanceof Uint8Array||Buffer.isBuffer(e)?e.byteLength:Buffer.byteLength(String(e),"utf8")}function X(e,t,r){let n=r.maxOutputSize??Number.MAX_SAFE_INTEGER,s=Buffer.byteLength(r.separator,"utf8");s+=Buffer.byteLength(r.newline,"utf8");for(let a of e)s+=Buffer.byteLength(a,"utf8");for(let a of t){s+=a.length*16;for(let i of a)s+=K(i,r.nullValue);if(s>n)break}let o=s*8+(t.length+3)*(e.length+3)*16;if(!Number.isSafeInteger(o)||o>n)throw new Error(`formatted output exceeds ${n} byte limit`);return n}function _(e,t,r){let n=X(e,t,r),s;switch(r.mode){case"list":s=Y(e,t,r);break;case"csv":s=Z(e,t,r);break;case"json":s=te(e,t);break;case"line":s=re(e,t,r);break;case"column":s=ne(e,t,r);break;case"table":s=se(e,t,r);break;case"markdown":s=oe(e,t,r);break;case"tabs":s=ie(e,t,r);break;case"box":s=ae(e,t,r);break;case"quote":s=le(e,t,r);break;case"html":s=fe(e,t,r);break;case"ascii":s=ue(e,t,r);break}if(Buffer.byteLength(s,"utf8")>n)throw new Error(`formatted output exceeds ${n} byte limit`);return s}function m(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function Y(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let s of t)n.push(s.map(o=>m(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function Z(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(v).join(","));for(let s of t)n.push(s.map(o=>v(m(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
3
3
  `)}
4
4
  `:""}function v(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
5
5
  `)?`"${e.replace(/"/g,'""')}"`:e}function F(e){return e.toPrecision(17).replace(/\.?0+$/,"")}function ee(e){return e===null?"null":typeof e=="number"?Number.isInteger(e)?String(e):F(e):JSON.stringify(e)}function te(e,t){return t.length===0?"":`[${t.map(n=>`{${e.map((o,a)=>`${JSON.stringify(o)}:${ee(n[a])}`).join(",")}}`).join(`,
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{d as V}from"./chunk-FTET43KM.js";import{d as B}from"./chunk-7IJWBG4I.js";import{l as _,m as Y}from"./chunk-TVCZIH6M.js";import{a as J}from"./chunk-GN6CQ3J4.js";import{a as Q}from"./chunk-QIQMJJZ4.js";import{a as Z,b as q}from"./chunk-QAYAQNCG.js";function h(s,t,e){if(J(e)>s.limits.maxOutputSize-J(t))throw new _(`ls: output size limit exceeded (${s.limits.maxOutputSize} bytes)`,"output_size");return t+e}function X(s,t){let e=new V(s.limits.maxOutputSize,"ls");for(let l=0;l<t.length;l++)l>0&&e.append(`
2
+ import{d as V}from"./chunk-FTET43KM.js";import{d as B}from"./chunk-D5FHVW27.js";import{l as _,m as Y}from"./chunk-TVCZIH6M.js";import{a as J}from"./chunk-GN6CQ3J4.js";import{a as Q}from"./chunk-QIQMJJZ4.js";import{a as Z,b as q}from"./chunk-QAYAQNCG.js";function h(s,t,e){if(J(e)>s.limits.maxOutputSize-J(t))throw new _(`ls: output size limit exceeded (${s.limits.maxOutputSize} bytes)`,"output_size");return t+e}function X(s,t){let e=new V(s.limits.maxOutputSize,"ls");for(let l=0;l<t.length;l++)l>0&&e.append(`
3
3
  `),e.append(t[l]);return t.length>0&&e.append(`
4
4
  `),e.build()}function I(s){if(s<1024)return String(s);if(s<1024*1024){let e=s/1024;return e<10?`${e.toFixed(1)}K`:`${Math.round(e)}K`}if(s<1024*1024*1024){let e=s/1048576;return e<10?`${e.toFixed(1)}M`:`${Math.round(e)}M`}let t=s/(1024*1024*1024);return t<10?`${t.toFixed(1)}G`:`${Math.round(t)}G`}function K(s){let e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][s.getMonth()],l=String(s.getDate()).padStart(2," "),p=new Date,g=new Date(p.getTime()-4320*60*60*1e3);if(s>g){let z=String(s.getHours()).padStart(2,"0"),d=String(s.getMinutes()).padStart(2,"0");return`${e} ${l} ${z}:${d}`}let b=s.getFullYear();return`${e} ${l} ${b}`}function W(s){return s.isDirectory?"/":s.isSymbolicLink?"@":(s.mode&73)!==0?"*":""}var nt={name:"ls",summary:"list directory contents",usage:"ls [OPTION]... [FILE]...",options:["-a, --all do not ignore entries starting with .","-A, --almost-all do not list . and ..","-d, --directory list directories themselves, not their contents","-F, --classify append indicator (one of */=>@) to entries","-h, --human-readable with -l, print sizes like 1K 234M 2G etc.","-l use a long listing format","-r, --reverse reverse order while sorting","-R, --recursive list subdirectories recursively","-S sort by file size, largest first","-t sort by time, newest first","-1 list one file per line"," --help display this help and exit"]},ot={showAll:{short:"a",long:"all",type:"boolean"},showAlmostAll:{short:"A",long:"almost-all",type:"boolean"},longFormat:{short:"l",type:"boolean"},humanReadable:{short:"h",long:"human-readable",type:"boolean"},recursive:{short:"R",long:"recursive",type:"boolean"},reverse:{short:"r",long:"reverse",type:"boolean"},sortBySize:{short:"S",type:"boolean"},classifyFiles:{short:"F",long:"classify",type:"boolean"},directoryOnly:{short:"d",long:"directory",type:"boolean"},sortByTime:{short:"t",type:"boolean"},onePerLine:{short:"1",type:"boolean"}},pt={name:"ls",async execute(s,t){if(q(s))return Z(nt);let e=Q("ls",s,ot);if(!e.ok)return e.error;let l=e.result.flags.showAll,p=e.result.flags.showAlmostAll,g=e.result.flags.longFormat,b=e.result.flags.humanReadable,z=e.result.flags.recursive,d=e.result.flags.reverse,$=e.result.flags.classifyFiles,O=e.result.flags.directoryOnly,R=it(s,e.result.flags.sortBySize,e.result.flags.sortByTime);e.result.flags.onePerLine;let F=e.result.positional;F.length===0&&F.push(".");let S="",P="",C=0,M=new B({limits:t.limits,signal:t.signal,executionScope:t.executionScope,site:"ls"});if(O){for(let n of await G(F,t,R,d,M)){M.visit(0);let i=t.fs.resolvePath(t.cwd,n);try{let D=await t.fs.stat(i);if(g){let L=D.isDirectory?"drwxr-xr-x":"-rw-r--r--",c=$?W(await t.fs.lstat(i)):"",u=D.size??0,A=b?I(u).padStart(5):String(u).padStart(5),a=D.mtime??new Date(0),o=K(a);S=h(t,S,`${L} 1 user user ${A} ${o} ${n}${c}
5
5
  `)}else{let L=$?W(await t.fs.lstat(i)):"";S=h(t,S,`${n}${L}
@@ -0,0 +1,12 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{b as P,c as O,d as T,e as k}from"./chunk-D5FHVW27.js";import{f as F}from"./chunk-4CC3OZPU.js";import{l as v,m as w}from"./chunk-TVCZIH6M.js";import{c as S}from"./chunk-T5ZEIOJ3.js";import{a as E}from"./chunk-QIQMJJZ4.js";import{a as D}from"./chunk-W5DWRFSU.js";import{a as $,b as C}from"./chunk-QAYAQNCG.js";var H={name:"cp",summary:"copy files and directories",usage:"cp [OPTION]... SOURCE... DEST",options:["-r, -R, --recursive copy directories recursively","-n, --no-clobber do not overwrite an existing file","-p, --preserve preserve file attributes","-v, --verbose explain what is being done"," --help display this help and exit"]},I={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},preserve:{short:"p",long:"preserve",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},q={name:"cp",async execute(u,e){if(C(u))return $(H);let s=E("cp",u,I);if(!s.ok)return s.error;let d=s.result.flags.recursive||s.result.flags.recursiveUpper,A=s.result.flags.noClobber,N=s.result.flags.preserve,R=s.result.flags.verbose,p=s.result.positional;if(p.length<2)return{stdout:"",stderr:`cp: missing destination file operand
3
+ `,exitCode:1};let m=p.pop()??"",g=p,l=e.fs.resolvePath(e.cwd,m),y="",n="",i=0,h=new T({limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"cp"}),f=!1;try{f=(await e.fs.stat(l)).isDirectory}catch{}if(g.length>1&&!f)return{stdout:"",stderr:`cp: target '${m}' is not a directory
4
+ `,exitCode:1};for(let t of g)try{let o=e.fs.resolvePath(e.cwd,t),a=await e.fs.stat(o),r=l;if(f){let c=t.split("/").pop()||t;r=l==="/"?`/${c}`:`${l}/${c}`}if(a.isDirectory&&!d){n+=`cp: -r not specified; omitting directory '${t}'
5
+ `,i=1;continue}if(a.isDirectory){let c=await O(e.fs,o,r,h);if(F(o,r)||c==="inside"){n+=`cp: cannot copy '${t}' into itself, '${r}'
6
+ `,i=1;continue}if(c==="unknown"){n+=`cp: cannot safely determine whether '${r}' is inside '${t}'
7
+ `,i=1;continue}}if(A)try{await e.fs.stat(r);continue}catch{}let b=await P(e.fs,o,r);if(b==="same"){n+=`cp: '${t}' and '${r}' are the same file
8
+ `,i=1;continue}if(b==="unknown"){n+=`cp: cannot safely determine whether '${t}' and '${r}' are the same file
9
+ `,i=1;continue}a.isDirectory&&await k({fs:e.fs,root:o,limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"cp",symlinks:"never",budget:h},()=>{}),await e.fs.cp(o,r,{recursive:d}),R&&(y+=`'${t}' -> '${r}'
10
+ `)}catch(o){if(o instanceof v||o instanceof w)throw o;let a=D(o);S(o,"ENOENT")?n+=`cp: cannot stat '${t}': No such file or directory
11
+ `:n+=`cp: cannot copy '${t}': ${a}
12
+ `,i=1}return{stdout:y,stderr:n,exitCode:i}}},J={name:"cp",flags:[{flag:"-r",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-p",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{q as a,J as b};
@@ -0,0 +1,8 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{c as i}from"./chunk-T5ZEIOJ3.js";import{a as d}from"./chunk-FOCWZZDE.js";import{a as u}from"./chunk-QIQMJJZ4.js";import{a as g}from"./chunk-W5DWRFSU.js";var b={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},force:{short:"f",long:"force",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},C={name:"rm",async execute(v,s){let e=u("rm",v,b);if(!e.ok)return e.error;let l=e.result.flags.recursive||e.result.flags.recursiveUpper,n=e.result.flags.force,y=e.result.flags.verbose,c=e.result.positional;if(c.length===0)return n?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:`rm: missing operand
3
+ `,exitCode:1};let f="",t="",a=0;for(let r of c)try{let o=s.fs.resolvePath(s.cwd,r);if((await s.fs.stat(o)).isDirectory&&!l){t+=`rm: cannot remove '${r}': Is a directory
4
+ `,a=1;continue}await s.fs.rm(o,{recursive:l,force:n}),y&&(f+=`removed '${r}'
5
+ `)}catch(o){let m=g(o),p=i(o,"ENOENT");if(n&&p)continue;p?t+=`rm: cannot remove '${r}': No such file or directory
6
+ `:i(o,"ENOTEMPTY")?t+=`rm: cannot remove '${r}': Directory not empty
7
+ `:t+=`rm: cannot remove '${r}': ${d(m)}
8
+ `,a=1}return{stdout:f,stderr:t,exitCode:a}}},w={name:"rm",flags:[{flag:"-r",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0};export{C as a,w as b};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{b as w}from"./chunk-AYSZ5MAE.js";import{d as b}from"./chunk-FTET43KM.js";import{d as S,e as F}from"./chunk-7IJWBG4I.js";import{a as v,b as $,c as y}from"./chunk-QAYAQNCG.js";var E={name:"chmod",summary:"change file mode bits",usage:"chmod [OPTIONS] MODE FILE...",options:["-R change files recursively","-v output a diagnostic for every file processed"," --help display this help and exit"]},O={name:"chmod",async execute(e,a){if($(e))return v(E);if(e.length<2)return{stdout:"",stderr:`chmod: missing operand
2
+ import{b as w}from"./chunk-AYSZ5MAE.js";import{d as b}from"./chunk-FTET43KM.js";import{d as S,e as F}from"./chunk-D5FHVW27.js";import{a as v,b as $,c as y}from"./chunk-QAYAQNCG.js";var E={name:"chmod",summary:"change file mode bits",usage:"chmod [OPTIONS] MODE FILE...",options:["-R change files recursively","-v output a diagnostic for every file processed"," --help display this help and exit"]},O={name:"chmod",async execute(e,a){if($(e))return v(E);if(e.length<2)return{stdout:"",stderr:`chmod: missing operand
3
3
  `,exitCode:1};let i=!1,f=!1,n=0;for(;n<e.length&&e[n].startsWith("-");){let t=e[n];if(t==="-R"||t==="--recursive")i=!0,n++;else if(t==="-v"||t==="--verbose")f=!0,n++;else if(t==="--"){n++;break}else{if(/^[+-]?[rwxugo]+/.test(t)||/^\d+$/.test(t))break;if(/^-[Rv]+$/.test(t)){t.includes("R")&&(i=!0),t.includes("v")&&(f=!0),n++;continue}return y("chmod",t)}}if(e.length-n<2)return{stdout:"",stderr:`chmod: missing operand
4
4
  `,exitCode:1};let r=e[n],d=e.slice(n+1),o=/^[0-7]+$/.test(r),s;if(o)s=parseInt(r,8);else try{p(r,420)}catch{return{stdout:"",stderr:`chmod: invalid mode: '${r}'
5
5
  `,exitCode:1}}let u=new b(Math.min(a.limits.maxOutputSize,a.limits.maxStringLength),"chmod"),l="",c=!1;for(let t of d){let m=a.fs.resolvePath(a.cwd,t);try{let h;if(o&&s!==void 0)h=s;else{let g=await a.fs.stat(m);h=p(r,g.mode)}await a.fs.chmod(m,h),f&&u.append(`mode of '${t}' changed to ${h.toString(8).padStart(4,"0")}
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{f as Y}from"./chunk-UUIYAOD4.js";import{a as P,b as J,c as D}from"./chunk-PPEXVPHR.js";import{a as K}from"./chunk-L2UW7DWF.js";import{a as W}from"./chunk-73JQKNZT.js";import{b as N}from"./chunk-AYSZ5MAE.js";import{d as V}from"./chunk-FTET43KM.js";import{d as Z}from"./chunk-7IJWBG4I.js";import{l as M}from"./chunk-TVCZIH6M.js";import{a as G,d as T,g as _}from"./chunk-GN6CQ3J4.js";import{a as q,b as H,c as O}from"./chunk-QAYAQNCG.js";var X=Y({js:{extensions:[".js",".mjs",".cjs",".jsx"],globs:[]},ts:{extensions:[".ts",".tsx",".mts",".cts"],globs:[]},html:{extensions:[".html",".htm",".xhtml"],globs:[]},css:{extensions:[".css",".scss",".sass",".less"],globs:[]},json:{extensions:[".json",".jsonc",".json5"],globs:[]},xml:{extensions:[".xml",".xsl",".xslt"],globs:[]},c:{extensions:[".c",".h"],globs:[]},cpp:{extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx",".h"],globs:[]},rust:{extensions:[".rs"],globs:[]},go:{extensions:[".go"],globs:[]},zig:{extensions:[".zig"],globs:[]},java:{extensions:[".java"],globs:[]},kotlin:{extensions:[".kt",".kts"],globs:[]},scala:{extensions:[".scala",".sc"],globs:[]},clojure:{extensions:[".clj",".cljc",".cljs",".edn"],globs:[]},py:{extensions:[".py",".pyi",".pyw"],globs:[]},rb:{extensions:[".rb",".rake",".gemspec"],globs:["Rakefile","Gemfile"]},php:{extensions:[".php",".phtml",".php3",".php4",".php5"],globs:[]},perl:{extensions:[".pl",".pm",".pod",".t"],globs:[]},lua:{extensions:[".lua"],globs:[]},sh:{extensions:[".sh",".bash",".zsh",".fish"],globs:[".bashrc",".zshrc",".profile"]},bat:{extensions:[".bat",".cmd"],globs:[]},ps:{extensions:[".ps1",".psm1",".psd1"],globs:[]},yaml:{extensions:[".yaml",".yml"],globs:[]},toml:{extensions:[".toml"],globs:["Cargo.toml","pyproject.toml"]},ini:{extensions:[".ini",".cfg",".conf"],globs:[]},csv:{extensions:[".csv",".tsv"],globs:[]},md:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},markdown:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},rst:{extensions:[".rst"],globs:[]},txt:{extensions:[".txt",".text"],globs:[]},tex:{extensions:[".tex",".ltx",".sty",".cls"],globs:[]},sql:{extensions:[".sql"],globs:[]},graphql:{extensions:[".graphql",".gql"],globs:[]},proto:{extensions:[".proto"],globs:[]},make:{extensions:[".mk",".mak"],globs:["Makefile","GNUmakefile","makefile"]},docker:{extensions:[],globs:["Dockerfile","Dockerfile.*","*.dockerfile"]},tf:{extensions:[".tf",".tfvars"],globs:[]}}),A=class{types;constructor(){this.types=new Map(Object.entries(X).map(([t,s])=>[t,{extensions:[...s.extensions],globs:[...s.globs]}]))}addType(t){let s=t.indexOf(":");if(s===-1)return;let n=t.slice(0,s),r=t.slice(s+1);if(r.startsWith("include:")){let i=r.slice(8),l=this.types.get(i);if(l){let o=this.types.get(n)||{extensions:[],globs:[]};o.extensions.push(...l.extensions),o.globs.push(...l.globs),this.types.set(n,o)}}else{let i=this.types.get(n)||{extensions:[],globs:[]};if(r.startsWith("*.")&&!r.slice(2).includes("*")){let l=r.slice(1);i.extensions.includes(l)||i.extensions.push(l)}else i.globs.includes(r)||i.globs.push(r);this.types.set(n,i)}}clearType(t){let s=this.types.get(t);s&&(s.extensions=[],s.globs=[])}getType(t){return this.types.get(t)}getAllTypes(){return this.types}matchesType(t,s){let n=t.toLowerCase();for(let r of s){if(r==="all"){if(this.matchesAnyType(t))return!0;continue}let i=this.types.get(r);if(i){for(let l of i.extensions)if(n.endsWith(l))return!0;for(let l of i.globs)if(l.includes("*")){let o=l.replace(/\./g,"\\.").replace(/\*/g,".*");if(W(`^${o}$`,"i").test(t))return!0}else if(n===l.toLowerCase())return!0}}return!1}matchesAnyType(t){let s=t.toLowerCase();for(let n of this.types.values()){for(let r of n.extensions)if(s.endsWith(r))return!0;for(let r of n.globs)if(r.includes("*")){let i=r.replace(/\./g,"\\.").replace(/\*/g,".*");if(W(`^${i}$`,"i").test(t))return!0}else if(s===r.toLowerCase())return!0}return!1}};function Q(){let e=[];for(let[t,s]of Object.entries(X).sort()){let n=[];for(let r of s.extensions)n.push(`*${r}`);for(let r of s.globs)n.push(r);e.push(`${t}: ${n.join(", ")}`)}return`${e.join(`
2
+ import{f as Y}from"./chunk-UUIYAOD4.js";import{a as P,b as J,c as D}from"./chunk-PPEXVPHR.js";import{a as K}from"./chunk-L2UW7DWF.js";import{a as W}from"./chunk-73JQKNZT.js";import{b as N}from"./chunk-AYSZ5MAE.js";import{d as V}from"./chunk-FTET43KM.js";import{d as Z}from"./chunk-D5FHVW27.js";import{l as M}from"./chunk-TVCZIH6M.js";import{a as G,d as T,g as _}from"./chunk-GN6CQ3J4.js";import{a as q,b as H,c as O}from"./chunk-QAYAQNCG.js";var X=Y({js:{extensions:[".js",".mjs",".cjs",".jsx"],globs:[]},ts:{extensions:[".ts",".tsx",".mts",".cts"],globs:[]},html:{extensions:[".html",".htm",".xhtml"],globs:[]},css:{extensions:[".css",".scss",".sass",".less"],globs:[]},json:{extensions:[".json",".jsonc",".json5"],globs:[]},xml:{extensions:[".xml",".xsl",".xslt"],globs:[]},c:{extensions:[".c",".h"],globs:[]},cpp:{extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx",".h"],globs:[]},rust:{extensions:[".rs"],globs:[]},go:{extensions:[".go"],globs:[]},zig:{extensions:[".zig"],globs:[]},java:{extensions:[".java"],globs:[]},kotlin:{extensions:[".kt",".kts"],globs:[]},scala:{extensions:[".scala",".sc"],globs:[]},clojure:{extensions:[".clj",".cljc",".cljs",".edn"],globs:[]},py:{extensions:[".py",".pyi",".pyw"],globs:[]},rb:{extensions:[".rb",".rake",".gemspec"],globs:["Rakefile","Gemfile"]},php:{extensions:[".php",".phtml",".php3",".php4",".php5"],globs:[]},perl:{extensions:[".pl",".pm",".pod",".t"],globs:[]},lua:{extensions:[".lua"],globs:[]},sh:{extensions:[".sh",".bash",".zsh",".fish"],globs:[".bashrc",".zshrc",".profile"]},bat:{extensions:[".bat",".cmd"],globs:[]},ps:{extensions:[".ps1",".psm1",".psd1"],globs:[]},yaml:{extensions:[".yaml",".yml"],globs:[]},toml:{extensions:[".toml"],globs:["Cargo.toml","pyproject.toml"]},ini:{extensions:[".ini",".cfg",".conf"],globs:[]},csv:{extensions:[".csv",".tsv"],globs:[]},md:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},markdown:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},rst:{extensions:[".rst"],globs:[]},txt:{extensions:[".txt",".text"],globs:[]},tex:{extensions:[".tex",".ltx",".sty",".cls"],globs:[]},sql:{extensions:[".sql"],globs:[]},graphql:{extensions:[".graphql",".gql"],globs:[]},proto:{extensions:[".proto"],globs:[]},make:{extensions:[".mk",".mak"],globs:["Makefile","GNUmakefile","makefile"]},docker:{extensions:[],globs:["Dockerfile","Dockerfile.*","*.dockerfile"]},tf:{extensions:[".tf",".tfvars"],globs:[]}}),A=class{types;constructor(){this.types=new Map(Object.entries(X).map(([t,s])=>[t,{extensions:[...s.extensions],globs:[...s.globs]}]))}addType(t){let s=t.indexOf(":");if(s===-1)return;let n=t.slice(0,s),r=t.slice(s+1);if(r.startsWith("include:")){let i=r.slice(8),l=this.types.get(i);if(l){let o=this.types.get(n)||{extensions:[],globs:[]};o.extensions.push(...l.extensions),o.globs.push(...l.globs),this.types.set(n,o)}}else{let i=this.types.get(n)||{extensions:[],globs:[]};if(r.startsWith("*.")&&!r.slice(2).includes("*")){let l=r.slice(1);i.extensions.includes(l)||i.extensions.push(l)}else i.globs.includes(r)||i.globs.push(r);this.types.set(n,i)}}clearType(t){let s=this.types.get(t);s&&(s.extensions=[],s.globs=[])}getType(t){return this.types.get(t)}getAllTypes(){return this.types}matchesType(t,s){let n=t.toLowerCase();for(let r of s){if(r==="all"){if(this.matchesAnyType(t))return!0;continue}let i=this.types.get(r);if(i){for(let l of i.extensions)if(n.endsWith(l))return!0;for(let l of i.globs)if(l.includes("*")){let o=l.replace(/\./g,"\\.").replace(/\*/g,".*");if(W(`^${o}$`,"i").test(t))return!0}else if(n===l.toLowerCase())return!0}}return!1}matchesAnyType(t){let s=t.toLowerCase();for(let n of this.types.values()){for(let r of n.extensions)if(s.endsWith(r))return!0;for(let r of n.globs)if(r.includes("*")){let i=r.replace(/\./g,"\\.").replace(/\*/g,".*");if(W(`^${i}$`,"i").test(t))return!0}else if(s===r.toLowerCase())return!0}return!1}};function Q(){let e=[];for(let[t,s]of Object.entries(X).sort()){let n=[];for(let r of s.extensions)n.push(`*${r}`);for(let r of s.globs)n.push(r);e.push(`${t}: ${n.join(", ")}`)}return`${e.join(`
3
3
  `)}
4
4
  `}function ee(){return{ignoreCase:!1,caseSensitive:!1,smartCase:!0,fixedStrings:!1,wordRegexp:!1,lineRegexp:!1,invertMatch:!1,multiline:!1,multilineDotall:!1,patterns:[],patternFiles:[],count:!1,countMatches:!1,files:!1,filesWithMatches:!1,filesWithoutMatch:!1,stats:!1,onlyMatching:!1,maxCount:0,lineNumber:!0,noFilename:!1,withFilename:!1,nullSeparator:!1,byteOffset:!1,column:!1,vimgrep:!1,replace:null,afterContext:0,beforeContext:0,contextSeparator:"--",quiet:!1,heading:!1,passthru:!1,includeZero:!1,sort:"path",json:!1,globs:[],iglobs:[],globCaseInsensitive:!1,types:[],typesNot:[],typeAdd:[],typeClear:[],hidden:!1,noIgnore:!1,noIgnoreDot:!1,noIgnoreVcs:!1,ignoreFiles:[],maxDepth:256,maxFilesize:512*1024*1024,followSymlinks:!1,searchZip:!1,searchBinary:!1,preprocessor:null,preprocessorGlobs:[]}}function ue(e){let t=e.match(/^(\d+)([KMG])?$/i);if(!t)return 0;let s=parseInt(t[1],10);switch((t[2]||"").toUpperCase()){case"K":return s*1024;case"M":return s*1024*1024;case"G":return s*1024*1024*1024;default:return s}}function fe(e){return/^\d+[KMG]?$/i.test(e)?null:{stdout:"",stderr:`rg: invalid --max-filesize value: ${e}
5
5
  `,exitCode:1}}function he(e,t){return!/^\d+$/.test(t)||!Number.isSafeInteger(Number(t))?{stdout:"",stderr:`rg: invalid --${e} value: ${t}
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{d as C}from"./chunk-7IJWBG4I.js";import{a as g}from"./chunk-QIQMJJZ4.js";import{a as v}from"./chunk-W5DWRFSU.js";var y=`Usage: rmdir [-pv] DIRECTORY...
2
+ import{d as C}from"./chunk-D5FHVW27.js";import{a as g}from"./chunk-QIQMJJZ4.js";import{a as v}from"./chunk-W5DWRFSU.js";var y=`Usage: rmdir [-pv] DIRECTORY...
3
3
  Remove empty directories.
4
4
 
5
5
  Options:
@@ -0,0 +1,2 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{b as a}from"./chunk-ZBUZKIPX.js";var r=globalThis.setTimeout.bind(globalThis),l=globalThis.clearTimeout.bind(globalThis),T=globalThis.setInterval.bind(globalThis),f=globalThis.clearInterval.bind(globalThis);function u(e){return typeof e!="function"?e:a.bindCurrentContext(e)}var b=((e,n,...i)=>r(u(e),n,...i)),d=l,I=((e,n,...i)=>r(e,n,...i)),c=2147483647;function _(e,n){if(n===Number.POSITIVE_INFINITY)return;let i=u(e),t={cleared:!1,remainingMs:Math.max(0,n),timer:void 0},o=()=>{if(t.cleared)return;let s=Math.min(t.remainingMs,c);t.timer=r(()=>{t.cleared||(t.remainingMs-=s,t.remainingMs>0?o():i())},s)};return o(),t}function g(e){e&&(e.cleared=!0,e.timer!==void 0&&l(e.timer))}export{b as a,d as b,I as c,_ as d,g as e};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a as we}from"./chunk-TDD4NFYE.js";import{a as Y}from"./chunk-ULXTDFQC.js";import{a as be}from"./chunk-SGX4WOAM.js";import{a as le}from"./chunk-L2UW7DWF.js";import{a as ae}from"./chunk-73JQKNZT.js";import{b as ue,c as de,d as he}from"./chunk-57LGFT4S.js";import{d as ge}from"./chunk-7IJWBG4I.js";import{l as ie}from"./chunk-TVCZIH6M.js";import{a as re}from"./chunk-GN6CQ3J4.js";import{a as me,b as ye}from"./chunk-QAYAQNCG.js";function z(e,t){switch(e.type){case"name":{let n=e.pattern,s=n.match(/^\*(\.[a-zA-Z0-9]+)$/);if(s){let a=s[1],o=t.name;if(e.ignoreCase){if(!o.toLowerCase().endsWith(a.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!o.endsWith(a))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:Y(t.name,n,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let n=e.pattern,s=t.relativePath,a=n.split("/");for(let u=0;u<a.length-1;u++){let r=a[u];if(r&&r!=="."&&r!==".."&&!r.includes("*")&&!r.includes("?")&&!r.includes("[")){let i=`/${r}/`;if(e.ignoreCase){if(!s.toLowerCase().includes(i.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!s.includes(i))return{matches:!1,pruned:!1,printed:!1}}}let o=n.match(/\*(\.[a-zA-Z0-9]+)$/);if(o){let u=o[1];if(e.ignoreCase){if(!s.toLowerCase().endsWith(u.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!s.endsWith(u))return{matches:!1,pruned:!1,printed:!1}}return{matches:Y(s,n,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let n=e.ignoreCase?"i":"";return{matches:ae(e.pattern,n).test(t.relativePath),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:t.isFile,pruned:!1,printed:!1}:e.fileType==="d"?{matches:t.isDirectory,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"empty":return{matches:t.isEmpty,pruned:!1,printed:!1};case"mtime":{let s=(Date.now()-t.mtime)/(1e3*60*60*24),a;return e.comparison==="more"?a=s>e.days:e.comparison==="less"?a=s<e.days:a=Math.floor(s)===e.days,{matches:a,pruned:!1,printed:!1}}case"newer":{let n=t.newerRefTimes.get(e.refPath);return n===void 0?{matches:!1,pruned:!1,printed:!1}:{matches:t.mtime>n,pruned:!1,printed:!1}}case"size":{let n=e.value;switch(e.unit){case"c":n=e.value;break;case"k":n=e.value*1024;break;case"M":n=e.value*1024*1024;break;case"G":n=e.value*1024*1024*1024;break;case"b":n=e.value*512;break}let s;return e.comparison==="more"?s=t.size>n:e.comparison==="less"?s=t.size<n:e.unit==="b"?s=Math.ceil(t.size/512)===e.value:s=t.size===n,{matches:s,pruned:!1,printed:!1}}case"perm":{let n=t.mode&511,s=e.mode&511,a;return e.matchType==="exact"?a=n===s:e.matchType==="all"?a=(n&s)===s:a=(n&s)!==0,{matches:a,pruned:!1,printed:!1}}case"prune":return{matches:!0,pruned:!0,printed:!1};case"action":return{matches:!0,pruned:!1,printed:!1,actions:[e.action]};case"not":{let n=z(e.expr,t);return{matches:!n.matches,pruned:n.pruned,printed:!1,actions:n.actions}}case"and":{let n=z(e.left,t);if(!n.matches)return{matches:!1,pruned:n.pruned,printed:!1,actions:n.actions};let s=z(e.right,t);return{matches:s.matches,pruned:n.pruned||s.pruned,printed:n.printed||s.printed,actions:[...n.actions??[],...s.actions??[]]}}case"or":{let n=z(e.left,t);if(n.matches)return n;let s=z(e.right,t);return{matches:s.matches,pruned:n.pruned||s.pruned,printed:s.printed,actions:[...n.actions??[],...s.actions??[]]}}}}function Z(e){if(!e)return!1;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":return!1;case"action":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!0;case"not":return Z(e.expr);case"and":case"or":return Z(e.left)||Z(e.right)}}function J(e){if(!e)return!1;switch(e.type){case"empty":return!0;case"not":return J(e.expr);case"and":case"or":return J(e.left)||J(e.right);default:return!1}}function Se(e){let t=[],n=s=>{s&&(s.type==="newer"?t.push(s.refPath):s.type==="not"?n(s.expr):(s.type==="and"||s.type==="or")&&(n(s.left),n(s.right)))};return n(e),t}function V(e){if(!e)return!0;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":return!0;case"action":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return V(e.expr);case"and":case"or":return V(e.left)&&V(e.right)}}function B(e,t,n,s,a){switch(e.type){case"name":{let o=e.pattern,u=o.match(/^\*(\.[a-zA-Z0-9]+)$/);if(u){let r=u[1];if(e.ignoreCase){if(!t.toLowerCase().endsWith(r.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!t.endsWith(r))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:Y(t,o,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let o=e.pattern,u=o.split("/");for(let i=0;i<u.length-1;i++){let l=u[i];if(l&&l!=="."&&l!==".."&&!l.includes("*")&&!l.includes("?")&&!l.includes("[")){let p=`/${l}/`;if(e.ignoreCase){if(!n.toLowerCase().includes(p.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.includes(p))return{matches:!1,pruned:!1,printed:!1}}}let r=o.match(/\*(\.[a-zA-Z0-9]+)$/);if(r){let i=r[1];if(e.ignoreCase){if(!n.toLowerCase().endsWith(i.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.endsWith(i))return{matches:!1,pruned:!1,printed:!1}}return{matches:Y(n,o,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let o=e.ignoreCase?"i":"";return{matches:ae(e.pattern,o).test(n),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:s,pruned:!1,printed:!1}:e.fileType==="d"?{matches:a,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"prune":return{matches:!0,pruned:!0,printed:!1};case"action":return{matches:!0,pruned:!1,printed:!1,actions:[e.action]};case"not":{let o=B(e.expr,t,n,s,a);return{matches:!o.matches,pruned:o.pruned,printed:!1,actions:o.actions}}case"and":{let o=B(e.left,t,n,s,a);if(!o.matches)return{matches:!1,pruned:o.pruned,printed:!1,actions:o.actions};let u=B(e.right,t,n,s,a);return{matches:u.matches,pruned:o.pruned||u.pruned,printed:o.printed||u.printed,actions:[...o.actions??[],...u.actions??[]]}}case"or":{let o=B(e.left,t,n,s,a);if(o.matches)return o;let u=B(e.right,t,n,s,a);return{matches:u.matches,pruned:o.pruned||u.pruned,printed:u.printed,actions:[...o.actions??[],...u.actions??[]]}}default:return{matches:!1,pruned:!1,printed:!1}}}function _(e){if(!e)return!1;switch(e.type){case"prune":return!0;case"not":return _(e.expr);case"and":case"or":return _(e.left)||_(e.right);default:return!1}}function L(e){switch(e.type){case"name":case"path":case"regex":case"type":case"prune":return!0;case"action":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return L(e.expr);case"and":case"or":return L(e.left)&&L(e.right)}}function Te(e,t){if(!e||!t.isDirectory)return{shouldPrune:!1};if(!L(e))return oe(e,t);let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:z(e,n).pruned}}function oe(e,t){switch(e.type){case"or":{if(L(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};if(z(e.left,n).pruned)return{shouldPrune:!0}}return oe(e.right,t)}case"and":{if(L(e.left)&&L(e.right)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:z(e,n).pruned}}if(L(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return z(e.left,n).matches?oe(e.right,t):{shouldPrune:!1}}return{shouldPrune:!1}}case"not":return{shouldPrune:!1};default:return{shouldPrune:!1}}}function Ce(e,t){let n=[],s=t,a=r=>({expr:null,pathIndex:s,error:`find: missing argument to \`${r}'
2
+ import{a as we}from"./chunk-TDD4NFYE.js";import{a as Y}from"./chunk-ULXTDFQC.js";import{a as be}from"./chunk-SGX4WOAM.js";import{a as le}from"./chunk-L2UW7DWF.js";import{a as ae}from"./chunk-73JQKNZT.js";import{b as ue,c as de,d as he}from"./chunk-57LGFT4S.js";import{d as ge}from"./chunk-D5FHVW27.js";import{l as ie}from"./chunk-TVCZIH6M.js";import{a as re}from"./chunk-GN6CQ3J4.js";import{a as me,b as ye}from"./chunk-QAYAQNCG.js";function z(e,t){switch(e.type){case"name":{let n=e.pattern,s=n.match(/^\*(\.[a-zA-Z0-9]+)$/);if(s){let a=s[1],o=t.name;if(e.ignoreCase){if(!o.toLowerCase().endsWith(a.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!o.endsWith(a))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:Y(t.name,n,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let n=e.pattern,s=t.relativePath,a=n.split("/");for(let u=0;u<a.length-1;u++){let r=a[u];if(r&&r!=="."&&r!==".."&&!r.includes("*")&&!r.includes("?")&&!r.includes("[")){let i=`/${r}/`;if(e.ignoreCase){if(!s.toLowerCase().includes(i.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!s.includes(i))return{matches:!1,pruned:!1,printed:!1}}}let o=n.match(/\*(\.[a-zA-Z0-9]+)$/);if(o){let u=o[1];if(e.ignoreCase){if(!s.toLowerCase().endsWith(u.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!s.endsWith(u))return{matches:!1,pruned:!1,printed:!1}}return{matches:Y(s,n,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let n=e.ignoreCase?"i":"";return{matches:ae(e.pattern,n).test(t.relativePath),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:t.isFile,pruned:!1,printed:!1}:e.fileType==="d"?{matches:t.isDirectory,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"empty":return{matches:t.isEmpty,pruned:!1,printed:!1};case"mtime":{let s=(Date.now()-t.mtime)/(1e3*60*60*24),a;return e.comparison==="more"?a=s>e.days:e.comparison==="less"?a=s<e.days:a=Math.floor(s)===e.days,{matches:a,pruned:!1,printed:!1}}case"newer":{let n=t.newerRefTimes.get(e.refPath);return n===void 0?{matches:!1,pruned:!1,printed:!1}:{matches:t.mtime>n,pruned:!1,printed:!1}}case"size":{let n=e.value;switch(e.unit){case"c":n=e.value;break;case"k":n=e.value*1024;break;case"M":n=e.value*1024*1024;break;case"G":n=e.value*1024*1024*1024;break;case"b":n=e.value*512;break}let s;return e.comparison==="more"?s=t.size>n:e.comparison==="less"?s=t.size<n:e.unit==="b"?s=Math.ceil(t.size/512)===e.value:s=t.size===n,{matches:s,pruned:!1,printed:!1}}case"perm":{let n=t.mode&511,s=e.mode&511,a;return e.matchType==="exact"?a=n===s:e.matchType==="all"?a=(n&s)===s:a=(n&s)!==0,{matches:a,pruned:!1,printed:!1}}case"prune":return{matches:!0,pruned:!0,printed:!1};case"action":return{matches:!0,pruned:!1,printed:!1,actions:[e.action]};case"not":{let n=z(e.expr,t);return{matches:!n.matches,pruned:n.pruned,printed:!1,actions:n.actions}}case"and":{let n=z(e.left,t);if(!n.matches)return{matches:!1,pruned:n.pruned,printed:!1,actions:n.actions};let s=z(e.right,t);return{matches:s.matches,pruned:n.pruned||s.pruned,printed:n.printed||s.printed,actions:[...n.actions??[],...s.actions??[]]}}case"or":{let n=z(e.left,t);if(n.matches)return n;let s=z(e.right,t);return{matches:s.matches,pruned:n.pruned||s.pruned,printed:s.printed,actions:[...n.actions??[],...s.actions??[]]}}}}function Z(e){if(!e)return!1;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":return!1;case"action":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!0;case"not":return Z(e.expr);case"and":case"or":return Z(e.left)||Z(e.right)}}function J(e){if(!e)return!1;switch(e.type){case"empty":return!0;case"not":return J(e.expr);case"and":case"or":return J(e.left)||J(e.right);default:return!1}}function Se(e){let t=[],n=s=>{s&&(s.type==="newer"?t.push(s.refPath):s.type==="not"?n(s.expr):(s.type==="and"||s.type==="or")&&(n(s.left),n(s.right)))};return n(e),t}function V(e){if(!e)return!0;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":return!0;case"action":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return V(e.expr);case"and":case"or":return V(e.left)&&V(e.right)}}function B(e,t,n,s,a){switch(e.type){case"name":{let o=e.pattern,u=o.match(/^\*(\.[a-zA-Z0-9]+)$/);if(u){let r=u[1];if(e.ignoreCase){if(!t.toLowerCase().endsWith(r.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!t.endsWith(r))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:Y(t,o,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let o=e.pattern,u=o.split("/");for(let i=0;i<u.length-1;i++){let l=u[i];if(l&&l!=="."&&l!==".."&&!l.includes("*")&&!l.includes("?")&&!l.includes("[")){let p=`/${l}/`;if(e.ignoreCase){if(!n.toLowerCase().includes(p.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.includes(p))return{matches:!1,pruned:!1,printed:!1}}}let r=o.match(/\*(\.[a-zA-Z0-9]+)$/);if(r){let i=r[1];if(e.ignoreCase){if(!n.toLowerCase().endsWith(i.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.endsWith(i))return{matches:!1,pruned:!1,printed:!1}}return{matches:Y(n,o,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let o=e.ignoreCase?"i":"";return{matches:ae(e.pattern,o).test(n),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:s,pruned:!1,printed:!1}:e.fileType==="d"?{matches:a,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"prune":return{matches:!0,pruned:!0,printed:!1};case"action":return{matches:!0,pruned:!1,printed:!1,actions:[e.action]};case"not":{let o=B(e.expr,t,n,s,a);return{matches:!o.matches,pruned:o.pruned,printed:!1,actions:o.actions}}case"and":{let o=B(e.left,t,n,s,a);if(!o.matches)return{matches:!1,pruned:o.pruned,printed:!1,actions:o.actions};let u=B(e.right,t,n,s,a);return{matches:u.matches,pruned:o.pruned||u.pruned,printed:o.printed||u.printed,actions:[...o.actions??[],...u.actions??[]]}}case"or":{let o=B(e.left,t,n,s,a);if(o.matches)return o;let u=B(e.right,t,n,s,a);return{matches:u.matches,pruned:o.pruned||u.pruned,printed:u.printed,actions:[...o.actions??[],...u.actions??[]]}}default:return{matches:!1,pruned:!1,printed:!1}}}function _(e){if(!e)return!1;switch(e.type){case"prune":return!0;case"not":return _(e.expr);case"and":case"or":return _(e.left)||_(e.right);default:return!1}}function L(e){switch(e.type){case"name":case"path":case"regex":case"type":case"prune":return!0;case"action":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return L(e.expr);case"and":case"or":return L(e.left)&&L(e.right)}}function Te(e,t){if(!e||!t.isDirectory)return{shouldPrune:!1};if(!L(e))return oe(e,t);let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:z(e,n).pruned}}function oe(e,t){switch(e.type){case"or":{if(L(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};if(z(e.left,n).pruned)return{shouldPrune:!0}}return oe(e.right,t)}case"and":{if(L(e.left)&&L(e.right)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:z(e,n).pruned}}if(L(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return z(e.left,n).matches?oe(e.right,t):{shouldPrune:!1}}return{shouldPrune:!1}}case"not":return{shouldPrune:!1};default:return{shouldPrune:!1}}}function Ce(e,t){let n=[],s=t,a=r=>({expr:null,pathIndex:s,error:`find: missing argument to \`${r}'
3
3
  `}),o=(r,i)=>({expr:null,pathIndex:s,error:`find: invalid argument \`${i}' to \`${r}'
4
4
  `});for(;s<e.length;){let r=e[s];if(r==="("||r==="\\("){n.push({type:"lparen"}),s++;continue}if(r===")"||r==="\\)"){n.push({type:"rparen"}),s++;continue}if(r==="-name"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"name",pattern:e[++s]}})}else if(r==="-iname"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"name",pattern:e[++s],ignoreCase:!0}})}else if(r==="-path"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"path",pattern:e[++s]}})}else if(r==="-ipath"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"path",pattern:e[++s],ignoreCase:!0}})}else if(r==="-regex"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"regex",pattern:e[++s]}})}else if(r==="-iregex"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"regex",pattern:e[++s],ignoreCase:!0}})}else if(r==="-type"){if(s+1>=e.length)return a(r);let i=e[++s];if(i==="f"||i==="d")n.push({type:"expr",expr:{type:"type",fileType:i}});else return{expr:null,pathIndex:s,error:`find: Unknown argument to -type: ${i}
5
5
  `}}else if(r==="-empty")n.push({type:"expr",expr:{type:"empty"}});else if(r==="-mtime"){if(s+1>=e.length)return a(r);let i=e[++s],l="exact",p=i;if(i.startsWith("+")?(l="more",p=i.slice(1)):i.startsWith("-")&&(l="less",p=i.slice(1)),!/^\d+$/.test(p))return o(r,i);let I=Number(p);if(!Number.isSafeInteger(I))return o(r,i);n.push({type:"expr",expr:{type:"mtime",days:I,comparison:l}})}else if(r==="-newer"){if(s+1>=e.length)return a(r);let i=e[++s];n.push({type:"expr",expr:{type:"newer",refPath:i}})}else if(r==="-size"){if(s+1>=e.length)return a(r);let i=e[++s],l="exact",p=i;i.startsWith("+")?(l="more",p=i.slice(1)):i.startsWith("-")&&(l="less",p=i.slice(1));let I=p.match(/^(\d+)([ckMGb])?$/);if(!I)return o(r,i);let N=Number(I[1]);if(!Number.isSafeInteger(N))return o(r,i);let P=I[2]||"b",j=P==="G"?1024**3:P==="M"?1024**2:P==="k"?1024:P==="b"?512:1;if(!Number.isSafeInteger(N*j))return o(r,i);n.push({type:"expr",expr:{type:"size",value:N,unit:P,comparison:l}})}else if(r==="-perm"){if(s+1>=e.length)return a(r);let i=e[++s],l="exact",p=i;if(i.startsWith("-")?(l="all",p=i.slice(1)):i.startsWith("/")&&(l="any",p=i.slice(1)),!/^[0-7]{1,4}$/.test(p))return o(r,i);let I=Number.parseInt(p,8);n.push({type:"expr",expr:{type:"perm",mode:I,matchType:l}})}else if(r==="-prune")n.push({type:"expr",expr:{type:"prune"}});else if(r==="-not"||r==="!")n.push({type:"not"});else if(r==="-o"||r==="-or")n.push({type:"op",op:"or"});else if(r==="-a"||r==="-and")n.push({type:"op",op:"and"});else if(r==="-maxdepth"||r==="-mindepth"){if(s+1>=e.length)return a(r);s++}else if(r!=="-depth")if(r==="-exec"){let i=[];for(s++;s<e.length&&e[s]!==";"&&e[s]!=="+";)i.push(e[s]),s++;if(s>=e.length)return{expr:null,pathIndex:s,error:"find: missing argument to `-exec'\n"};if(i.length===0)return a("-exec");let l=e[s]==="+";if(l&&(i.at(-1)!=="{}"||i.filter(p=>p==="{}").length!==1))return o("-exec","+");n.push({type:"expr",expr:{type:"action",action:{type:"exec",command:i,batchMode:l}}})}else if(r==="-print")n.push({type:"expr",expr:{type:"action",action:{type:"print"}}});else if(r==="-print0")n.push({type:"expr",expr:{type:"action",action:{type:"print0"}}});else if(r==="-printf"){if(s+1>=e.length)return a(r);let i=e[++s];n.push({type:"expr",expr:{type:"action",action:{type:"printf",format:i}}})}else if(r==="-delete")n.push({type:"expr",expr:{type:"action",action:{type:"delete"}}});else return r.startsWith("-")?{expr:null,pathIndex:s,error:`find: unknown predicate '${r}'
@@ -0,0 +1,2 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ var e=class extends Error{code;bareMessage;constructor(t,r){if(t.length===0)throw new Error("FsError: code must be a non-empty errno name");super(r.startsWith(`${t}:`)?r:`${t}: ${r}`),this.code=t,this.bareMessage=r.startsWith(`${t}:`)?r.slice(t.length+(r[t.length+1]===" "?2:1)):r}};function s(n){if(typeof n=="object"&&n!==null&&"code"in n){let t=n.code;if(typeof t=="string"&&t.length>0)return t}}function c(n,t){return s(n)===t}function u(n,t="EIO"){let r=s(n),o=n instanceof Error?n.message:String(n??"unknown error");if(r!==void 0){let i=`${r}: `;return new e(r,o.startsWith(i)?o.slice(i.length):o)}return new e(t,o)}export{e as a,s as b,c,u as d};
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a as p}from"./chunk-SX2HC7SO.js";import{a as n,b as l}from"./chunk-WXPNKIIH.js";import{a as m,b as d}from"./chunk-QAYAQNCG.js";var f={name:"sleep",summary:"delay for a specified amount of time",usage:"sleep NUMBER[SUFFIX]",description:`Pause for NUMBER seconds. SUFFIX may be:
2
+ import{a as p}from"./chunk-SX2HC7SO.js";import{a as n,b as l}from"./chunk-PS2RJNZZ.js";import{a as m,b as d}from"./chunk-QAYAQNCG.js";var f={name:"sleep",summary:"delay for a specified amount of time",usage:"sleep NUMBER[SUFFIX]",description:`Pause for NUMBER seconds. SUFFIX may be:
3
3
  s - seconds (default)
4
4
  m - minutes
5
5
  h - hours
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a as w}from"./chunk-SX2HC7SO.js";import{a as b}from"./chunk-BRJERIF4.js";import{a as h,b as A}from"./chunk-WXPNKIIH.js";import{a as y}from"./chunk-L2UW7DWF.js";import{a as v,b as O,c as d}from"./chunk-QAYAQNCG.js";var x={name:"timeout",summary:"run a command with a time limit",usage:"timeout [OPTION] DURATION COMMAND [ARG]...",description:`Start COMMAND, and kill it if still running after DURATION.
2
+ import{a as w}from"./chunk-SX2HC7SO.js";import{a as b}from"./chunk-BRJERIF4.js";import{a as h,b as A}from"./chunk-PS2RJNZZ.js";import{a as y}from"./chunk-L2UW7DWF.js";import{a as v,b as O,c as d}from"./chunk-QAYAQNCG.js";var x={name:"timeout",summary:"run a command with a time limit",usage:"timeout [OPTION] DURATION COMMAND [ARG]...",description:`Start COMMAND, and kill it if still running after DURATION.
3
3
 
4
4
  DURATION is a number with optional suffix:
5
5
  s - seconds (default)
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{b as E}from"./chunk-AYSZ5MAE.js";import{a as h}from"./chunk-7IJWBG4I.js";import{l as $}from"./chunk-TVCZIH6M.js";import{a as k}from"./chunk-GN6CQ3J4.js";import{a as C,b as L,c as F}from"./chunk-QAYAQNCG.js";var A={name:"split",summary:"split a file into pieces",usage:"split [OPTION]... [FILE [PREFIX]]",description:"Output pieces of FILE to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is 'x'.",options:["-l N Put N lines per output file","-b SIZE Put SIZE bytes per output file (K, M, G suffixes)","-n CHUNKS Split into CHUNKS equal-sized files","-d Use numeric suffixes (00, 01, ...) instead of alphabetic","-a LENGTH Use suffixes of length LENGTH (default: 2)","--additional-suffix=SUFFIX Append SUFFIX to file names"],examples:["split -l 100 file.txt # Split into 100-line chunks","split -b 1M file.bin # Split into 1MB chunks","split -n 5 file.txt # Split into 5 equal parts","split -d file.txt part_ # part_00, part_01, ...","split -a 3 -d file.txt x # x000, x001, ..."]},S=1e5,_=0;function U(e){return Uint8Array.from(e,t=>t.charCodeAt(0))}function N(e){let t=e.match(/^(\d+)([KMGTPEZY]?)([B]?)$/i);if(!t)return null;let i=Number(t[1]);if(!Number.isSafeInteger(i)||i<1)return null;let u=(t[2]||"").toUpperCase(),a=new Map([["",1],["K",1024],["M",1024*1024],["G",1024*1024*1024],["T",1024*1024*1024*1024],["P",1024*1024*1024*1024*1024]]).get(u);return a===void 0||i>Math.floor(Number.MAX_SAFE_INTEGER/a)?null:i*a}function x(e){if(!/^[0-9]+$/.test(e))return null;let t=Number(e);return Number.isSafeInteger(t)&&t>=1?t:null}function H(e,t,i){if(t)return e.toString().padStart(i,"0");let u="abcdefghijklmnopqrstuvwxyz",n=new Array(i),a=e;for(let o=i-1;o>=0;o--)n[o]=u[a%26],a=Math.floor(a/26);return n.join("")}function B(e,t){let i=[],u=0,n=0;for(let a=0;a<e.length;a++)e[a]===10&&(n++,n===t&&(i.push(e.subarray(u,a+1)),u=a+1,n=0));return u<e.length&&i.push(e.subarray(u)),i}function T(e,t){let i=[];for(let u=0;u<e.length;u+=t)i.push(e.subarray(u,u+t));return i}function X(e,t){let i=[],u=Math.ceil(e.length/t);for(let n=0;n<t;n++){let a=n*u,o=Math.min(a+u,e.length);a<o&&i.push(e.subarray(a,o))}return i}function z(e,t){let i=e?10**t:26**t;return Number.isSafeInteger(i)?i:Number.MAX_SAFE_INTEGER}function G(e){if(e.existence!=="unknown")return e.existence==="existing"?e.stableIdentity:e.canonicalPath===void 0?void 0:`missing:${e.canonicalPath}`}function I(e,t){return e.existence!==t.existence||e.existence==="unknown"||t.existence==="unknown"?!1:e.existence==="missing"&&t.existence==="missing"?e.canonicalPath===t.canonicalPath:e.existence==="existing"&&t.existence==="existing"?e.stableIdentity!==void 0&&e.stableIdentity===t.stableIdentity:!1}async function M(e,t,i){let u=t.lastIndexOf("/"),n=u<=0?"/":t.slice(0,u),a=t.slice(u+1);for(let o=0;o<100;o++){let d=_++,c=e.fs.resolvePath(n,`.${a}.just-bash-split-${i}-${d}`),p=await h(e.fs,c);if(p.existence==="missing")return c;if(p.existence==="unknown")break}throw new Error("unable to allocate transaction path")}var Z={name:"split",execute:async(e,t)=>{if(L(e))return C(A);let i={mode:"lines",lines:1e3,bytes:0,chunks:0,useNumericSuffix:!1,suffixLength:2,additionalSuffix:""},u=[],n=0;for(;n<e.length;){let s=e[n];if(s==="-l"&&n+1<e.length){let l=x(e[n+1]);if(l===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of lines: '${e[n+1]}'
2
+ import{b as E}from"./chunk-AYSZ5MAE.js";import{a as h}from"./chunk-D5FHVW27.js";import{l as $}from"./chunk-TVCZIH6M.js";import{a as k}from"./chunk-GN6CQ3J4.js";import{a as C,b as L,c as F}from"./chunk-QAYAQNCG.js";var A={name:"split",summary:"split a file into pieces",usage:"split [OPTION]... [FILE [PREFIX]]",description:"Output pieces of FILE to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is 'x'.",options:["-l N Put N lines per output file","-b SIZE Put SIZE bytes per output file (K, M, G suffixes)","-n CHUNKS Split into CHUNKS equal-sized files","-d Use numeric suffixes (00, 01, ...) instead of alphabetic","-a LENGTH Use suffixes of length LENGTH (default: 2)","--additional-suffix=SUFFIX Append SUFFIX to file names"],examples:["split -l 100 file.txt # Split into 100-line chunks","split -b 1M file.bin # Split into 1MB chunks","split -n 5 file.txt # Split into 5 equal parts","split -d file.txt part_ # part_00, part_01, ...","split -a 3 -d file.txt x # x000, x001, ..."]},S=1e5,_=0;function U(e){return Uint8Array.from(e,t=>t.charCodeAt(0))}function N(e){let t=e.match(/^(\d+)([KMGTPEZY]?)([B]?)$/i);if(!t)return null;let i=Number(t[1]);if(!Number.isSafeInteger(i)||i<1)return null;let u=(t[2]||"").toUpperCase(),a=new Map([["",1],["K",1024],["M",1024*1024],["G",1024*1024*1024],["T",1024*1024*1024*1024],["P",1024*1024*1024*1024*1024]]).get(u);return a===void 0||i>Math.floor(Number.MAX_SAFE_INTEGER/a)?null:i*a}function x(e){if(!/^[0-9]+$/.test(e))return null;let t=Number(e);return Number.isSafeInteger(t)&&t>=1?t:null}function H(e,t,i){if(t)return e.toString().padStart(i,"0");let u="abcdefghijklmnopqrstuvwxyz",n=new Array(i),a=e;for(let o=i-1;o>=0;o--)n[o]=u[a%26],a=Math.floor(a/26);return n.join("")}function B(e,t){let i=[],u=0,n=0;for(let a=0;a<e.length;a++)e[a]===10&&(n++,n===t&&(i.push(e.subarray(u,a+1)),u=a+1,n=0));return u<e.length&&i.push(e.subarray(u)),i}function T(e,t){let i=[];for(let u=0;u<e.length;u+=t)i.push(e.subarray(u,u+t));return i}function X(e,t){let i=[],u=Math.ceil(e.length/t);for(let n=0;n<t;n++){let a=n*u,o=Math.min(a+u,e.length);a<o&&i.push(e.subarray(a,o))}return i}function z(e,t){let i=e?10**t:26**t;return Number.isSafeInteger(i)?i:Number.MAX_SAFE_INTEGER}function G(e){if(e.existence!=="unknown")return e.existence==="existing"?e.stableIdentity:e.canonicalPath===void 0?void 0:`missing:${e.canonicalPath}`}function I(e,t){return e.existence!==t.existence||e.existence==="unknown"||t.existence==="unknown"?!1:e.existence==="missing"&&t.existence==="missing"?e.canonicalPath===t.canonicalPath:e.existence==="existing"&&t.existence==="existing"?e.stableIdentity!==void 0&&e.stableIdentity===t.stableIdentity:!1}async function M(e,t,i){let u=t.lastIndexOf("/"),n=u<=0?"/":t.slice(0,u),a=t.slice(u+1);for(let o=0;o<100;o++){let d=_++,c=e.fs.resolvePath(n,`.${a}.just-bash-split-${i}-${d}`),p=await h(e.fs,c);if(p.existence==="missing")return c;if(p.existence==="unknown")break}throw new Error("unable to allocate transaction path")}var Z={name:"split",execute:async(e,t)=>{if(L(e))return C(A);let i={mode:"lines",lines:1e3,bytes:0,chunks:0,useNumericSuffix:!1,suffixLength:2,additionalSuffix:""},u=[],n=0;for(;n<e.length;){let s=e[n];if(s==="-l"&&n+1<e.length){let l=x(e[n+1]);if(l===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of lines: '${e[n+1]}'
3
3
  `};i.mode="lines",i.lines=l,n+=2}else if(s.match(/^-l\d+$/)){let l=x(s.slice(2));if(l===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of lines: '${s.slice(2)}'
4
4
  `};i.mode="lines",i.lines=l,n++}else if(s==="-b"&&n+1<e.length){let l=N(e[n+1]);if(l===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of bytes: '${e[n+1]}'
5
5
  `};i.mode="bytes",i.bytes=l,n+=2}else if(s.match(/^-b.+$/)){let l=N(s.slice(2));if(l===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of bytes: '${s.slice(2)}'
@@ -1,5 +1,5 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{e as F}from"./chunk-7IJWBG4I.js";import{l as d,m as h}from"./chunk-TVCZIH6M.js";import{a as x}from"./chunk-QIQMJJZ4.js";import{a as g,b as z}from"./chunk-QAYAQNCG.js";var $={name:"du",summary:"estimate file space usage",usage:"du [OPTION]... [FILE]...",options:["-a write counts for all files, not just directories","-h print sizes in human readable format","-s display only a total for each argument","-c produce a grand total","--max-depth=N print total for directory only if N or fewer levels deep"," --help display this help and exit"]},b={allFiles:{short:"a",type:"boolean"},humanReadable:{short:"h",type:"boolean"},summarize:{short:"s",type:"boolean"},grandTotal:{short:"c",type:"boolean"},maxDepth:{long:"max-depth",type:"number"}},R={name:"du",async execute(t,s){if(z(t))return g($);let a=x("du",t,b);if(!a.ok)return a.error;let l={allFiles:a.result.flags.allFiles,humanReadable:a.result.flags.humanReadable,summarize:a.result.flags.summarize,grandTotal:a.result.flags.grandTotal,maxDepth:a.result.flags.maxDepth??null},i=a.result.positional;i.length===0&&i.push(".");let n="",o="",e=0;for(let u of i){let f=s.fs.resolvePath(s.cwd,u);try{await s.fs.stat(f);let r=await w(s,f,u,l,0);n+=r.output,e+=r.totalSize,o+=r.stderr}catch(r){if(r instanceof d||r instanceof h)throw r;o+=`du: cannot access '${u}': No such file or directory
2
+ import{e as F}from"./chunk-D5FHVW27.js";import{l as d,m as h}from"./chunk-TVCZIH6M.js";import{a as x}from"./chunk-QIQMJJZ4.js";import{a as g,b as z}from"./chunk-QAYAQNCG.js";var $={name:"du",summary:"estimate file space usage",usage:"du [OPTION]... [FILE]...",options:["-a write counts for all files, not just directories","-h print sizes in human readable format","-s display only a total for each argument","-c produce a grand total","--max-depth=N print total for directory only if N or fewer levels deep"," --help display this help and exit"]},b={allFiles:{short:"a",type:"boolean"},humanReadable:{short:"h",type:"boolean"},summarize:{short:"s",type:"boolean"},grandTotal:{short:"c",type:"boolean"},maxDepth:{long:"max-depth",type:"number"}},R={name:"du",async execute(t,s){if(z(t))return g($);let a=x("du",t,b);if(!a.ok)return a.error;let l={allFiles:a.result.flags.allFiles,humanReadable:a.result.flags.humanReadable,summarize:a.result.flags.summarize,grandTotal:a.result.flags.grandTotal,maxDepth:a.result.flags.maxDepth??null},i=a.result.positional;i.length===0&&i.push(".");let n="",o="",e=0;for(let u of i){let f=s.fs.resolvePath(s.cwd,u);try{await s.fs.stat(f);let r=await w(s,f,u,l,0);n+=r.output,e+=r.totalSize,o+=r.stderr}catch(r){if(r instanceof d||r instanceof h)throw r;o+=`du: cannot access '${u}': No such file or directory
3
3
  `}}return l.grandTotal&&i.length>0&&(n+=`${p(e,l.humanReadable)} total
4
4
  `),{stdout:n,stderr:o,exitCode:o?1:0}}};async function w(t,s,a,l,i){let n={output:"",totalSize:0,stderr:""},o=new Map;return await F({fs:t.fs,root:s,limits:t.limits,signal:t.signal,executionScope:t.executionScope,site:"du",symlinks:"never",includeLeave:!0},e=>{let u=e.path.slice(s.length).replace(/^\//,""),f=u?a==="."?u:`${a}/${u}`:a,r=e.path==="/"?"/":e.path.slice(0,e.path.lastIndexOf("/"))||"/";if(e.phase==="enter"){if(e.stat.isDirectory){o.set(e.path,0);return}o.set(r,(o.get(r)??0)+e.stat.size),(l.allFiles||e.depth===i)&&!l.summarize&&(n.output+=`${p(e.stat.size,l.humanReadable)} ${f}
5
5
  `),e.depth===i&&(n.totalSize=e.stat.size);return}let m=o.get(e.path)??0;e.depth>i?o.set(r,(o.get(r)??0)+m):n.totalSize=m;let c=e.depth-i;(l.summarize&&c===0||!l.summarize&&(l.maxDepth===null||c<=l.maxDepth))&&(n.output+=`${p(m,l.humanReadable)} ${f}
@@ -0,0 +1,2 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-IYJLVOVE.js";import"./chunk-D5FHVW27.js";import"./chunk-4CC3OZPU.js";import"./chunk-TVCZIH6M.js";import"./chunk-GN6CQ3J4.js";import"./chunk-T5ZEIOJ3.js";import"./chunk-FOCWZZDE.js";import"./chunk-QIQMJJZ4.js";import"./chunk-W5DWRFSU.js";import"./chunk-QAYAQNCG.js";import"./chunk-NCUTH6QL.js";export{a as cpCommand,b as flagsForFuzzing};
@@ -0,0 +1,2 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-YUOBBH7P.js";import"./chunk-D5FHVW27.js";import"./chunk-4CC3OZPU.js";import"./chunk-TVCZIH6M.js";import"./chunk-GN6CQ3J4.js";import"./chunk-T5ZEIOJ3.js";import"./chunk-FOCWZZDE.js";import"./chunk-QIQMJJZ4.js";import"./chunk-QAYAQNCG.js";import"./chunk-NCUTH6QL.js";export{a as duCommand,b as flagsForFuzzing};
@@ -0,0 +1,2 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-SBOTR4JQ.js";import"./chunk-TDD4NFYE.js";import"./chunk-ULXTDFQC.js";import"./chunk-SGX4WOAM.js";import"./chunk-L2UW7DWF.js";import"./chunk-73JQKNZT.js";import"./chunk-57LGFT4S.js";import"./chunk-FTET43KM.js";import"./chunk-D5FHVW27.js";import"./chunk-4CC3OZPU.js";import"./chunk-TVCZIH6M.js";import"./chunk-GN6CQ3J4.js";import"./chunk-T5ZEIOJ3.js";import"./chunk-FOCWZZDE.js";import"./chunk-QAYAQNCG.js";import"./chunk-NCUTH6QL.js";export{a as findCommand,b as flagsForFuzzing};
@@ -1,2 +1,2 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{b as yr}from"./chunk-VJ6UXG2R.js";import{b as Ar}from"./chunk-FZZL53S2.js";import{b as $r}from"./chunk-5I5U6IYI.js";import"./chunk-S3ENGQML.js";import"./chunk-6RK4AAB7.js";import{c as Sr}from"./chunk-24NLAR7R.js";import"./chunk-N3A4JVFJ.js";import{b as wr}from"./chunk-IXFQXNL4.js";import{b as xr}from"./chunk-MQKGGNPS.js";import{b as vr}from"./chunk-2SMD2AUA.js";import{b as kr}from"./chunk-LI6PTSPD.js";import{b as qr}from"./chunk-SBBYKIYU.js";import{b as Cr}from"./chunk-4MZPEZTU.js";import{b as br}from"./chunk-XXBIOG4R.js";import{d as Ir,e as Mr,f as jr}from"./chunk-6DDRR56B.js";import"./chunk-WZQNMEQW.js";import{b as tr}from"./chunk-XV2V56NQ.js";import{b as lr}from"./chunk-R2FBRMDU.js";import{b as ur}from"./chunk-HXWB4Z5X.js";import{b as pr}from"./chunk-4EDQZIAN.js";import{b as er}from"./chunk-ANCQ4SCV.js";import{b as dr}from"./chunk-FT6ODGOU.js";import{b as cr}from"./chunk-OQ7C4FYO.js";import"./chunk-2KNTH3KH.js";import{b as hr}from"./chunk-PJM5C3HZ.js";import{c as or,d as ar}from"./chunk-HDRAUQK2.js";import{b as sr}from"./chunk-7EUWTCWK.js";import{c as ir,d as gr}from"./chunk-EJFBIRMD.js";import{b as mr}from"./chunk-FQUVK4Q5.js";import"./chunk-26GP3ACY.js";import{b as Fr}from"./chunk-PCPW54JH.js";import{b as zr}from"./chunk-UTKGYVUZ.js";import{b as fr}from"./chunk-Q4JSJ3KQ.js";import{b as nr}from"./chunk-DMWNBCXJ.js";import"./chunk-SX2HC7SO.js";import{b as R}from"./chunk-ZDPFA4L3.js";import{b as U}from"./chunk-FX4RBUYU.js";import{b as V}from"./chunk-7AISL3XV.js";import{b as W}from"./chunk-ZXFELXJH.js";import{c as X,d as Y}from"./chunk-A4R2GWRF.js";import{c as Z,d as _}from"./chunk-FHC24QSK.js";import{b as N}from"./chunk-UIJUTQPH.js";import{b as rr}from"./chunk-QHDBQA5N.js";import{b as G}from"./chunk-3WASQYTF.js";import{b as H}from"./chunk-2VWG4LDT.js";import{b as J}from"./chunk-7O2RDO2R.js";import{b as K}from"./chunk-DAKEIWT3.js";import{b as L}from"./chunk-EZNS4GF7.js";import{b as O}from"./chunk-HRIJVWZS.js";import{b as P}from"./chunk-LSLPJOYM.js";import{b as Q}from"./chunk-UC76ZOWM.js";import{b as y}from"./chunk-ROAWFE6V.js";import{b as A}from"./chunk-6WGIZV3E.js";import{b as $}from"./chunk-QJ7OXJAZ.js";import{b as S}from"./chunk-6QF3PCMO.js";import{b as T}from"./chunk-4MJ7VJG4.js";import{b as B}from"./chunk-LVDUF74R.js";import{b as D}from"./chunk-ASE6AYV3.js";import{b as E}from"./chunk-Y62SXZKJ.js";import{b as w}from"./chunk-DVSA72LH.js";import{b as x}from"./chunk-44YCJWNC.js";import{b as v}from"./chunk-U4K5ZDWK.js";import"./chunk-TDD4NFYE.js";import{d as k,e as q,f as C}from"./chunk-FIMF2TLE.js";import"./chunk-ULXTDFQC.js";import{b}from"./chunk-F6XU52K3.js";import"./chunk-UUIYAOD4.js";import"./chunk-PPEXVPHR.js";import{b as I}from"./chunk-T6DNSPYO.js";import{b as M}from"./chunk-2TSZPVPI.js";import{b as j}from"./chunk-ZT3WF5R7.js";import{b as t}from"./chunk-PIRTX3D3.js";import{b as l}from"./chunk-WN54B5NQ.js";import{b as u}from"./chunk-TBVD66LC.js";import{b as p}from"./chunk-W2Z6LYL6.js";import{b as e}from"./chunk-NBNI7G66.js";import{b as d}from"./chunk-SHKOQWO4.js";import{b as c}from"./chunk-XVSR5HHH.js";import{b as h}from"./chunk-SIOONII3.js";import"./chunk-QJFYYEFV.js";import"./chunk-BRJERIF4.js";import"./chunk-KIGPB52X.js";import"./chunk-WXPNKIIH.js";import"./chunk-SGX4WOAM.js";import"./chunk-L2UW7DWF.js";import"./chunk-DLL7UR66.js";import"./chunk-BKUWXPEM.js";import"./chunk-73JQKNZT.js";import{b as i}from"./chunk-AGH5UJJI.js";import{b as g}from"./chunk-P57S6Z6R.js";import"./chunk-YEYSCLSJ.js";import"./chunk-AYSZ5MAE.js";import"./chunk-ZBUZKIPX.js";import{b as m}from"./chunk-HP7HWZ2S.js";import"./chunk-ICLA3MUR.js";import"./chunk-57LGFT4S.js";import{b as F}from"./chunk-FSJ6TTCC.js";import"./chunk-FTET43KM.js";import"./chunk-STHBFACM.js";import{b as z}from"./chunk-MLIO3BK2.js";import{b as f}from"./chunk-RPKJJFGZ.js";import"./chunk-7IJWBG4I.js";import"./chunk-YUSFCOM7.js";import"./chunk-TVCZIH6M.js";import"./chunk-GN6CQ3J4.js";import"./chunk-FOCWZZDE.js";import"./chunk-QIQMJJZ4.js";import{b as n}from"./chunk-FZRQOL3C.js";import"./chunk-W5DWRFSU.js";import"./chunk-QAYAQNCG.js";import"./chunk-NCUTH6QL.js";var Er=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,I,M,j,y,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,ir,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,Ir,Mr,jr,yr,Ar,$r,Sr];function Tr(){return Er}var Br=new Map;for(let r of Tr())Br.set(r.name,new Set(r.flags.map(o=>o.flag)));function Fa(r,o,Dr){let a=Br.get(o);if(!(!a||a.size===0))for(let s of Dr)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{Fa as emitFlagCoverage};
2
+ import{b as yr}from"./chunk-VJ6UXG2R.js";import{b as Ar}from"./chunk-FZZL53S2.js";import{b as $r}from"./chunk-5I5U6IYI.js";import"./chunk-S3ENGQML.js";import"./chunk-6RK4AAB7.js";import{c as Sr}from"./chunk-E3ABCXE4.js";import"./chunk-6IA4DXG2.js";import{b as wr}from"./chunk-IXFQXNL4.js";import{b as xr}from"./chunk-MQKGGNPS.js";import{b as vr}from"./chunk-2SMD2AUA.js";import{b as kr}from"./chunk-LI6PTSPD.js";import{b as qr}from"./chunk-SBBYKIYU.js";import{b as Cr}from"./chunk-4MZPEZTU.js";import{b as br}from"./chunk-XXBIOG4R.js";import{d as Ir,e as Mr,f as jr}from"./chunk-ACVD6PQF.js";import"./chunk-WZQNMEQW.js";import{b as tr}from"./chunk-YFFU74KY.js";import{b as lr}from"./chunk-R2FBRMDU.js";import{b as ur}from"./chunk-HXWB4Z5X.js";import{b as pr}from"./chunk-4EDQZIAN.js";import{b as er}from"./chunk-ANCQ4SCV.js";import{b as dr}from"./chunk-FT6ODGOU.js";import{b as cr}from"./chunk-OQ7C4FYO.js";import"./chunk-2KNTH3KH.js";import{b as hr}from"./chunk-PJM5C3HZ.js";import{c as or,d as ar}from"./chunk-HDRAUQK2.js";import{b as sr}from"./chunk-7EUWTCWK.js";import{c as ir,d as gr}from"./chunk-EJFBIRMD.js";import{b as mr}from"./chunk-FQUVK4Q5.js";import"./chunk-26GP3ACY.js";import{b as Fr}from"./chunk-PCPW54JH.js";import{b as zr}from"./chunk-UTKGYVUZ.js";import{b as fr}from"./chunk-Q4JSJ3KQ.js";import{b as nr}from"./chunk-TLPMB3FO.js";import"./chunk-SX2HC7SO.js";import{b as R}from"./chunk-ZDPFA4L3.js";import{b as U}from"./chunk-FX4RBUYU.js";import{b as V}from"./chunk-7AISL3XV.js";import{b as W}from"./chunk-YUOBBH7P.js";import{c as X,d as Y}from"./chunk-A4R2GWRF.js";import{c as Z,d as _}from"./chunk-FHC24QSK.js";import{b as N}from"./chunk-UIJUTQPH.js";import{b as rr}from"./chunk-QHDBQA5N.js";import{b as G}from"./chunk-3WASQYTF.js";import{b as H}from"./chunk-2VWG4LDT.js";import{b as J}from"./chunk-7O2RDO2R.js";import{b as K}from"./chunk-YNYC232D.js";import{b as L}from"./chunk-EZNS4GF7.js";import{b as O}from"./chunk-HRIJVWZS.js";import{b as P}from"./chunk-LSLPJOYM.js";import{b as Q}from"./chunk-SBOTR4JQ.js";import{b as y}from"./chunk-ROAWFE6V.js";import{b as A}from"./chunk-6WGIZV3E.js";import{b as $}from"./chunk-QJ7OXJAZ.js";import{b as S}from"./chunk-6QF3PCMO.js";import{b as T}from"./chunk-4MJ7VJG4.js";import{b as B}from"./chunk-LVDUF74R.js";import{b as D}from"./chunk-ASE6AYV3.js";import{b as E}from"./chunk-Y62SXZKJ.js";import{b as w}from"./chunk-DVSA72LH.js";import{b as x}from"./chunk-44YCJWNC.js";import{b as v}from"./chunk-U4K5ZDWK.js";import"./chunk-TDD4NFYE.js";import{d as k,e as q,f as C}from"./chunk-5DMO6LFU.js";import"./chunk-ULXTDFQC.js";import{b}from"./chunk-OR544SGH.js";import"./chunk-UUIYAOD4.js";import"./chunk-PPEXVPHR.js";import{b as I}from"./chunk-T6DNSPYO.js";import{b as M}from"./chunk-2TSZPVPI.js";import{b as j}from"./chunk-ZT3WF5R7.js";import{b as t}from"./chunk-LRFR25IP.js";import{b as l}from"./chunk-IYJLVOVE.js";import{b as u}from"./chunk-3BMWRGU2.js";import{b as p}from"./chunk-3CIDHL5V.js";import{b as e}from"./chunk-OPYVVD5P.js";import{b as d}from"./chunk-SHKOQWO4.js";import{b as c}from"./chunk-2T7PBFL4.js";import{b as h}from"./chunk-SIOONII3.js";import"./chunk-QJFYYEFV.js";import"./chunk-BRJERIF4.js";import"./chunk-KIGPB52X.js";import"./chunk-PS2RJNZZ.js";import"./chunk-SGX4WOAM.js";import"./chunk-L2UW7DWF.js";import"./chunk-DLL7UR66.js";import"./chunk-BKUWXPEM.js";import"./chunk-73JQKNZT.js";import{b as i}from"./chunk-AGH5UJJI.js";import{b as g}from"./chunk-P57S6Z6R.js";import"./chunk-YEYSCLSJ.js";import"./chunk-AYSZ5MAE.js";import"./chunk-ZBUZKIPX.js";import{b as m}from"./chunk-HP7HWZ2S.js";import"./chunk-ICLA3MUR.js";import"./chunk-57LGFT4S.js";import{b as F}from"./chunk-HMM3NGUJ.js";import"./chunk-FTET43KM.js";import"./chunk-STHBFACM.js";import{b as z}from"./chunk-A257L6QO.js";import{b as f}from"./chunk-PMBXJ3OQ.js";import"./chunk-D5FHVW27.js";import"./chunk-4CC3OZPU.js";import"./chunk-TVCZIH6M.js";import"./chunk-GN6CQ3J4.js";import"./chunk-T5ZEIOJ3.js";import"./chunk-FOCWZZDE.js";import"./chunk-QIQMJJZ4.js";import{b as n}from"./chunk-FZRQOL3C.js";import"./chunk-W5DWRFSU.js";import"./chunk-QAYAQNCG.js";import"./chunk-NCUTH6QL.js";var Er=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,I,M,j,y,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,ir,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,Ir,Mr,jr,yr,Ar,$r,Sr];function Tr(){return Er}var Br=new Map;for(let r of Tr())Br.set(r.name,new Set(r.flags.map(o=>o.flag)));function Fa(r,o,Dr){let a=Br.get(o);if(!(!a||a.size===0))for(let s of Dr)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{Fa as emitFlagCoverage};
@@ -1,2 +1,2 @@
1
1
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
- import{a,b,c,d,e,f}from"./chunk-FIMF2TLE.js";import"./chunk-ULXTDFQC.js";import"./chunk-PPEXVPHR.js";import"./chunk-73JQKNZT.js";import"./chunk-AYSZ5MAE.js";import"./chunk-ZBUZKIPX.js";import"./chunk-FTET43KM.js";import"./chunk-TVCZIH6M.js";import"./chunk-GN6CQ3J4.js";import"./chunk-QAYAQNCG.js";import"./chunk-NCUTH6QL.js";export{c as egrepCommand,f as egrepFlagsForFuzzing,b as fgrepCommand,e as fgrepFlagsForFuzzing,d as flagsForFuzzing,a as grepCommand};
2
+ import{a,b,c,d,e,f}from"./chunk-5DMO6LFU.js";import"./chunk-ULXTDFQC.js";import"./chunk-PPEXVPHR.js";import"./chunk-73JQKNZT.js";import"./chunk-AYSZ5MAE.js";import"./chunk-ZBUZKIPX.js";import"./chunk-FTET43KM.js";import"./chunk-TVCZIH6M.js";import"./chunk-GN6CQ3J4.js";import"./chunk-QAYAQNCG.js";import"./chunk-NCUTH6QL.js";export{c as egrepCommand,f as egrepFlagsForFuzzing,b as fgrepCommand,e as fgrepFlagsForFuzzing,d as flagsForFuzzing,a as grepCommand};