@jerryan/just-bash 3.6.1 → 3.8.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 (328) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +15 -5
  3. package/dist/AGENTS.md +2 -2
  4. package/dist/Bash.d.ts +4 -2
  5. package/dist/bin/chunks/{awk2-KO7ZE3P7.js → awk2-NTRVFXRA.js} +1 -1
  6. package/dist/bin/chunks/chmod-GX5SYTRL.js +3 -0
  7. package/dist/bin/chunks/chunk-2NJJXU4K.js +27 -0
  8. package/dist/bin/{shell/chunks/chunk-ZMGLTHSU.js → chunks/chunk-3ROYEBJI.js} +1 -1
  9. package/dist/bin/chunks/chunk-6FGMEZZP.js +20 -0
  10. package/dist/bin/chunks/chunk-6JUPBMCR.js +13 -0
  11. package/dist/bin/{shell/chunks/chunk-3DWQCLNP.js → chunks/chunk-7WBCA2BB.js} +1 -1
  12. package/dist/bin/chunks/{chunk-LE2XKKGQ.js → chunk-ABP4OLJV.js} +1 -1
  13. package/dist/bin/{shell/chunks/chunk-7PUOS2OO.js → chunks/chunk-ANX7U57Q.js} +1 -1
  14. package/dist/bin/chunks/{chunk-B2GCIQI2.js → chunk-BB5VTPMQ.js} +1 -1
  15. package/dist/bin/chunks/chunk-CN4JKMTR.js +8 -0
  16. package/dist/bin/chunks/{chunk-WFHYGSLJ.js → chunk-CNVNOT67.js} +1 -1
  17. package/dist/bin/{shell/chunks/chunk-6ESRNSO7.js → chunks/chunk-DRPHNXG7.js} +1 -1
  18. package/dist/bin/chunks/chunk-F2PYTUMR.js +9 -0
  19. package/dist/bin/{shell/chunks/chunk-OXLC2WWX.js → chunks/chunk-H7PD6FLC.js} +10 -10
  20. package/dist/bin/chunks/chunk-HWK7KFGB.js +3 -0
  21. package/dist/bin/{shell/chunks/chunk-QYZN33JA.js → chunks/chunk-IOKQFPM6.js} +1 -1
  22. package/dist/bin/chunks/{chunk-M7SIPZZZ.js → chunk-KMYJMEON.js} +1 -1
  23. package/dist/bin/chunks/chunk-KNTDFP7X.js +12 -0
  24. package/dist/bin/{shell/chunks/chunk-RPUFEP5O.js → chunks/chunk-M3Z5NZXT.js} +1 -1
  25. package/dist/bin/chunks/chunk-MBREBDZQ.js +3 -0
  26. package/dist/bin/{shell/chunks/chunk-L345YZ6R.js → chunks/chunk-MF3GVFLC.js} +1 -1
  27. package/dist/bin/{shell/chunks/chunk-YCOJCFGU.js → chunks/chunk-MPFNZYEA.js} +1 -1
  28. package/dist/bin/chunks/chunk-OHFB3M3X.js +3 -0
  29. package/dist/bin/{shell/chunks/chunk-F3UDTTI7.js → chunks/chunk-ONF4KUYV.js} +1 -1
  30. package/dist/bin/chunks/chunk-PPVF2N6C.js +3 -0
  31. package/dist/bin/chunks/{chunk-V2XF3TTW.js → chunk-PRVPFKTC.js} +1 -1
  32. package/dist/bin/{shell/chunks/chunk-7VWOECJ3.js → chunks/chunk-PTUQEN6I.js} +1 -1
  33. package/dist/bin/chunks/{chunk-R2J5MJOM.js → chunk-QFOXSCOD.js} +1 -1
  34. package/dist/bin/{shell/chunks/chunk-6TUILMPB.js → chunks/chunk-QFTZKD5O.js} +1 -1
  35. package/dist/bin/chunks/{chunk-HQ63MFHG.js → chunk-QJWFCA7P.js} +1 -1
  36. package/dist/bin/chunks/chunk-RTN6X652.js +11 -0
  37. package/dist/bin/chunks/{chunk-67XYNGRV.js → chunk-T6OIISUC.js} +1 -1
  38. package/dist/bin/{shell/chunks/chunk-JELR4642.js → chunks/chunk-U5JLGI56.js} +13 -13
  39. package/dist/bin/chunks/{chunk-7PPAWLUI.js → chunk-V4S4A7M6.js} +1 -1
  40. package/dist/bin/{shell/chunks/chunk-DZAFUADN.js → chunks/chunk-VPSBWWXM.js} +1 -1
  41. package/dist/bin/chunks/{chunk-GA5TPRMF.js → chunk-YXPSX3SI.js} +11 -11
  42. package/dist/bin/chunks/{chunk-472JZJ2D.js → chunk-ZVG47PYA.js} +1 -1
  43. package/dist/bin/chunks/cp-YLP7ULVT.js +3 -0
  44. package/dist/bin/{shell/chunks/diff-YXZZCUSQ.js → chunks/diff-JSJ56EOK.js} +1 -1
  45. package/dist/bin/chunks/du-DH76GZJ3.js +3 -0
  46. package/dist/bin/chunks/{expr-NNMDHOCN.js → expr-PQEPO5TE.js} +1 -1
  47. package/dist/bin/chunks/{file-4T64QNLS.js → file-JA7QI2YT.js} +1 -1
  48. package/dist/bin/chunks/find-MHC4QV6H.js +3 -0
  49. package/dist/bin/chunks/flag-coverage-2H5CPEM6.js +3 -0
  50. package/dist/bin/chunks/{grep-CVU5V66H.js → grep-VXWNMIDD.js} +1 -1
  51. package/dist/bin/chunks/gzip-UQZL4R74.js +3 -0
  52. package/dist/bin/chunks/{jq-V7OTAVU5.js → jq-YS4PR46D.js} +1 -1
  53. package/dist/bin/chunks/js-exec-T3SAB2B6.js +1651 -0
  54. package/dist/bin/chunks/ln-XVC53673.js +3 -0
  55. package/dist/bin/chunks/ls-5Z45FV4U.js +3 -0
  56. package/dist/bin/chunks/mkdir-YJ3SOVRP.js +3 -0
  57. package/dist/bin/chunks/mv-EOOP2TO3.js +3 -0
  58. package/dist/bin/chunks/python3-3ERN3L6S.js +23 -0
  59. package/dist/bin/chunks/readlink-EJ3IKLWW.js +3 -0
  60. package/dist/bin/chunks/rg-WHVR3YDT.js +3 -0
  61. package/dist/bin/chunks/rm-B4LVIG7A.js +3 -0
  62. package/dist/bin/chunks/rmdir-PRNISPBA.js +3 -0
  63. package/dist/bin/{shell/chunks/sed-4LVDFHIJ.js → chunks/sed-SY63U2YX.js} +1 -1
  64. package/dist/bin/{shell/chunks/sleep-MOJQBZMY.js → chunks/sleep-DVFE2GSF.js} +1 -1
  65. package/dist/bin/chunks/split-HIFKSV2A.js +3 -0
  66. package/dist/bin/chunks/sqlite3-KNN6V2W6.js +3 -0
  67. package/dist/bin/{shell/chunks/tar-7HGZIMZD.js → chunks/tar-7XOP7VOX.js} +1 -1
  68. package/dist/bin/chunks/{timeout-RQOWSWYG.js → timeout-YGFHQJKX.js} +1 -1
  69. package/dist/bin/chunks/worker.js +120 -109
  70. package/dist/bin/chunks/{xan-WW53ETXT.js → xan-RMH6JEXM.js} +1 -1
  71. package/dist/bin/chunks/{yq-MYZOS2WN.js → yq-CWBZMGUV.js} +1 -1
  72. package/dist/bin/just-bash.js +355 -350
  73. package/dist/bin/shell/chunks/{awk2-KO7ZE3P7.js → awk2-NTRVFXRA.js} +1 -1
  74. package/dist/bin/shell/chunks/chmod-GX5SYTRL.js +3 -0
  75. package/dist/bin/shell/chunks/chunk-2NJJXU4K.js +27 -0
  76. package/dist/bin/{chunks/chunk-ZMGLTHSU.js → shell/chunks/chunk-3ROYEBJI.js} +1 -1
  77. package/dist/bin/shell/chunks/chunk-6FGMEZZP.js +20 -0
  78. package/dist/bin/shell/chunks/chunk-6JUPBMCR.js +13 -0
  79. package/dist/bin/{chunks/chunk-3DWQCLNP.js → shell/chunks/chunk-7WBCA2BB.js} +1 -1
  80. package/dist/bin/shell/chunks/{chunk-LE2XKKGQ.js → chunk-ABP4OLJV.js} +1 -1
  81. package/dist/bin/{chunks/chunk-7PUOS2OO.js → shell/chunks/chunk-ANX7U57Q.js} +1 -1
  82. package/dist/bin/shell/chunks/{chunk-B2GCIQI2.js → chunk-BB5VTPMQ.js} +1 -1
  83. package/dist/bin/shell/chunks/chunk-CN4JKMTR.js +8 -0
  84. package/dist/bin/shell/chunks/{chunk-WFHYGSLJ.js → chunk-CNVNOT67.js} +1 -1
  85. package/dist/bin/{chunks/chunk-6ESRNSO7.js → shell/chunks/chunk-DRPHNXG7.js} +1 -1
  86. package/dist/bin/shell/chunks/chunk-F2PYTUMR.js +9 -0
  87. package/dist/bin/{chunks/chunk-OXLC2WWX.js → shell/chunks/chunk-H7PD6FLC.js} +10 -10
  88. package/dist/bin/shell/chunks/chunk-HWK7KFGB.js +3 -0
  89. package/dist/bin/{chunks/chunk-QYZN33JA.js → shell/chunks/chunk-IOKQFPM6.js} +1 -1
  90. package/dist/bin/shell/chunks/{chunk-M7SIPZZZ.js → chunk-KMYJMEON.js} +1 -1
  91. package/dist/bin/shell/chunks/chunk-KNTDFP7X.js +12 -0
  92. package/dist/bin/{chunks/chunk-RPUFEP5O.js → shell/chunks/chunk-M3Z5NZXT.js} +1 -1
  93. package/dist/bin/shell/chunks/chunk-MBREBDZQ.js +3 -0
  94. package/dist/bin/{chunks/chunk-L345YZ6R.js → shell/chunks/chunk-MF3GVFLC.js} +1 -1
  95. package/dist/bin/{chunks/chunk-YCOJCFGU.js → shell/chunks/chunk-MPFNZYEA.js} +1 -1
  96. package/dist/bin/shell/chunks/chunk-OHFB3M3X.js +3 -0
  97. package/dist/bin/{chunks/chunk-F3UDTTI7.js → shell/chunks/chunk-ONF4KUYV.js} +1 -1
  98. package/dist/bin/shell/chunks/chunk-PPVF2N6C.js +3 -0
  99. package/dist/bin/shell/chunks/{chunk-V2XF3TTW.js → chunk-PRVPFKTC.js} +1 -1
  100. package/dist/bin/{chunks/chunk-7VWOECJ3.js → shell/chunks/chunk-PTUQEN6I.js} +1 -1
  101. package/dist/bin/shell/chunks/{chunk-R2J5MJOM.js → chunk-QFOXSCOD.js} +1 -1
  102. package/dist/bin/{chunks/chunk-6TUILMPB.js → shell/chunks/chunk-QFTZKD5O.js} +1 -1
  103. package/dist/bin/shell/chunks/{chunk-HQ63MFHG.js → chunk-QJWFCA7P.js} +1 -1
  104. package/dist/bin/shell/chunks/chunk-RTN6X652.js +11 -0
  105. package/dist/bin/shell/chunks/{chunk-67XYNGRV.js → chunk-T6OIISUC.js} +1 -1
  106. package/dist/bin/{chunks/chunk-JELR4642.js → shell/chunks/chunk-U5JLGI56.js} +13 -13
  107. package/dist/bin/shell/chunks/{chunk-7PPAWLUI.js → chunk-V4S4A7M6.js} +1 -1
  108. package/dist/bin/{chunks/chunk-DZAFUADN.js → shell/chunks/chunk-VPSBWWXM.js} +1 -1
  109. package/dist/bin/shell/chunks/{chunk-GA5TPRMF.js → chunk-YXPSX3SI.js} +11 -11
  110. package/dist/bin/shell/chunks/{chunk-472JZJ2D.js → chunk-ZVG47PYA.js} +1 -1
  111. package/dist/bin/shell/chunks/cp-YLP7ULVT.js +3 -0
  112. package/dist/bin/{chunks/diff-YXZZCUSQ.js → shell/chunks/diff-JSJ56EOK.js} +1 -1
  113. package/dist/bin/shell/chunks/du-DH76GZJ3.js +3 -0
  114. package/dist/bin/shell/chunks/{expr-NNMDHOCN.js → expr-PQEPO5TE.js} +1 -1
  115. package/dist/bin/shell/chunks/{file-4T64QNLS.js → file-JA7QI2YT.js} +1 -1
  116. package/dist/bin/shell/chunks/find-MHC4QV6H.js +3 -0
  117. package/dist/bin/shell/chunks/flag-coverage-2H5CPEM6.js +3 -0
  118. package/dist/bin/shell/chunks/{grep-CVU5V66H.js → grep-VXWNMIDD.js} +1 -1
  119. package/dist/bin/shell/chunks/gzip-UQZL4R74.js +3 -0
  120. package/dist/bin/shell/chunks/{jq-V7OTAVU5.js → jq-YS4PR46D.js} +1 -1
  121. package/dist/bin/shell/chunks/js-exec-T3SAB2B6.js +1651 -0
  122. package/dist/bin/shell/chunks/ln-XVC53673.js +3 -0
  123. package/dist/bin/shell/chunks/ls-5Z45FV4U.js +3 -0
  124. package/dist/bin/shell/chunks/mkdir-YJ3SOVRP.js +3 -0
  125. package/dist/bin/shell/chunks/mv-EOOP2TO3.js +3 -0
  126. package/dist/bin/shell/chunks/python3-3ERN3L6S.js +23 -0
  127. package/dist/bin/shell/chunks/readlink-EJ3IKLWW.js +3 -0
  128. package/dist/bin/shell/chunks/rg-WHVR3YDT.js +3 -0
  129. package/dist/bin/shell/chunks/rm-B4LVIG7A.js +3 -0
  130. package/dist/bin/shell/chunks/rmdir-PRNISPBA.js +3 -0
  131. package/dist/bin/{chunks/sed-4LVDFHIJ.js → shell/chunks/sed-SY63U2YX.js} +1 -1
  132. package/dist/bin/{chunks/sleep-MOJQBZMY.js → shell/chunks/sleep-DVFE2GSF.js} +1 -1
  133. package/dist/bin/shell/chunks/split-HIFKSV2A.js +3 -0
  134. package/dist/bin/shell/chunks/sqlite3-KNN6V2W6.js +3 -0
  135. package/dist/bin/{chunks/tar-7HGZIMZD.js → shell/chunks/tar-7XOP7VOX.js} +1 -1
  136. package/dist/bin/shell/chunks/{timeout-RQOWSWYG.js → timeout-YGFHQJKX.js} +1 -1
  137. package/dist/bin/shell/chunks/{xan-WW53ETXT.js → xan-RMH6JEXM.js} +1 -1
  138. package/dist/bin/shell/chunks/{yq-MYZOS2WN.js → yq-CWBZMGUV.js} +1 -1
  139. package/dist/bin/shell/shell.js +397 -392
  140. package/dist/bundle/browser.js +693 -669
  141. package/dist/bundle/chunks/{awk2-W6BNZEJN.js → awk2-VS5QVYHU.js} +1 -1
  142. package/dist/bundle/chunks/chmod-TEY5MD2W.js +2 -0
  143. package/dist/bundle/chunks/{chunk-26GP3ACY.js → chunk-35MBA3VY.js} +1 -1
  144. package/dist/bundle/chunks/chunk-3CIDHL5V.js +11 -0
  145. package/dist/bundle/chunks/chunk-3OBCZP7T.js +12 -0
  146. package/dist/bundle/chunks/{chunk-F6XU52K3.js → chunk-45QZRGYF.js} +1 -1
  147. package/dist/bundle/chunks/chunk-4CC3OZPU.js +2 -0
  148. package/dist/bundle/chunks/{chunk-73JQKNZT.js → chunk-4KZT23KR.js} +11 -11
  149. package/dist/bundle/chunks/{chunk-PJM5C3HZ.js → chunk-5EI7WSRV.js} +10 -10
  150. package/dist/bundle/chunks/{chunk-T6DNSPYO.js → chunk-6BSOPPZH.js} +1 -1
  151. package/dist/bundle/chunks/{chunk-DAKEIWT3.js → chunk-6HO6HX7V.js} +1 -1
  152. package/dist/bundle/chunks/{chunk-XVSR5HHH.js → chunk-6QAM55HM.js} +1 -1
  153. package/dist/bundle/chunks/chunk-A257L6QO.js +7 -0
  154. package/dist/bundle/chunks/{chunk-UC76ZOWM.js → chunk-ATGOUOX2.js} +1 -1
  155. package/dist/bundle/chunks/chunk-B6OSJB22.js +26 -0
  156. package/dist/bundle/chunks/{chunk-2TSZPVPI.js → chunk-BLPYR4TN.js} +1 -1
  157. package/dist/bundle/chunks/{chunk-VJ6UXG2R.js → chunk-CH7SUFFO.js} +1 -1
  158. package/dist/bundle/chunks/{chunk-FQUVK4Q5.js → chunk-DDPD7SIB.js} +1 -1
  159. package/dist/bundle/chunks/{chunk-TLPMB3FO.js → chunk-DMWNBCXJ.js} +1 -1
  160. package/dist/bundle/chunks/{chunk-ZXFELXJH.js → chunk-FSKXIFYT.js} +1 -1
  161. package/dist/bundle/chunks/{chunk-KEMO3CBM.js → chunk-GNPLDVBD.js} +1 -1
  162. package/dist/bundle/chunks/{chunk-FZZL53S2.js → chunk-GRUZ4SBY.js} +1 -1
  163. package/dist/bundle/chunks/{chunk-RPKJJFGZ.js → chunk-HCKTU6IR.js} +1 -1
  164. package/dist/bundle/chunks/{chunk-4EDQZIAN.js → chunk-LGIJSCWH.js} +1 -1
  165. package/dist/bundle/chunks/chunk-LRFR25IP.js +8 -0
  166. package/dist/bundle/chunks/chunk-MWL2I5BV.js +19 -0
  167. package/dist/bundle/chunks/{chunk-6IA4DXG2.js → chunk-N3A4JVFJ.js} +1 -1
  168. package/dist/bundle/chunks/{chunk-PPEXVPHR.js → chunk-O452S4KX.js} +1 -1
  169. package/dist/bundle/chunks/chunk-RWQWFXMH.js +10 -0
  170. package/dist/bundle/chunks/chunk-S6DNKKUL.js +2 -0
  171. package/dist/bundle/chunks/{chunk-NBNI7G66.js → chunk-SE23TEGG.js} +1 -1
  172. package/dist/bundle/chunks/chunk-T5ZEIOJ3.js +2 -0
  173. package/dist/bundle/chunks/{chunk-ULXTDFQC.js → chunk-U57DSHID.js} +1 -1
  174. package/dist/bundle/chunks/{chunk-6DDRR56B.js → chunk-WE7BJ7YU.js} +1 -1
  175. package/dist/bundle/chunks/chunk-WXPNKIIH.js +2 -0
  176. package/dist/bundle/chunks/{chunk-5I5U6IYI.js → chunk-XQ2ZZFO6.js} +1 -1
  177. package/dist/bundle/chunks/{chunk-YFFU74KY.js → chunk-XV2V56NQ.js} +1 -1
  178. package/dist/bundle/chunks/{chunk-FIMF2TLE.js → chunk-Y6JBSHCM.js} +13 -13
  179. package/dist/bundle/chunks/cp-UR762VVT.js +2 -0
  180. package/dist/bundle/chunks/{diff-CSARC7WF.js → diff-VDB6RXHO.js} +1 -1
  181. package/dist/bundle/chunks/du-EQKH3UNA.js +2 -0
  182. package/dist/bundle/chunks/{expr-XSBELPAC.js → expr-A5XITHQD.js} +1 -1
  183. package/dist/bundle/chunks/{file-URNAD6FQ.js → file-6AYYTULJ.js} +1 -1
  184. package/dist/bundle/chunks/find-RLKBCGJR.js +2 -0
  185. package/dist/bundle/chunks/flag-coverage-UMQ3BWDP.js +2 -0
  186. package/dist/bundle/chunks/{grep-4AYF3A5J.js → grep-Q2O5EIXQ.js} +1 -1
  187. package/dist/bundle/chunks/gzip-KC5ENBD2.js +2 -0
  188. package/dist/bundle/chunks/{jq-NY7PCVMH.js → jq-UKAA3QWU.js} +1 -1
  189. package/dist/bundle/chunks/js-exec-ZQMIYQTH.js +1650 -0
  190. package/dist/bundle/chunks/ln-CEM7GDB5.js +2 -0
  191. package/dist/bundle/chunks/ls-WH5S4PPL.js +2 -0
  192. package/dist/bundle/chunks/mkdir-Z6MMWH3D.js +2 -0
  193. package/dist/bundle/chunks/mv-WE7DBLEK.js +2 -0
  194. package/dist/bundle/chunks/python3-QB7OE256.js +22 -0
  195. package/dist/bundle/chunks/readlink-JSRKXLLQ.js +2 -0
  196. package/dist/bundle/chunks/rg-JKB7DR66.js +2 -0
  197. package/dist/bundle/chunks/rm-IGPLE632.js +2 -0
  198. package/dist/bundle/chunks/rmdir-3WTXMVKI.js +2 -0
  199. package/dist/bundle/chunks/{sed-LIRH26EA.js → sed-6G32B25J.js} +1 -1
  200. package/dist/bundle/chunks/{sleep-25QUPVDK.js → sleep-PPRBTSVR.js} +1 -1
  201. package/dist/bundle/chunks/split-HUKVGJTW.js +2 -0
  202. package/dist/bundle/chunks/sqlite3-KB3MXTTM.js +2 -0
  203. package/dist/bundle/chunks/{tar-B72KU357.js → tar-LE7LAAIX.js} +1 -1
  204. package/dist/bundle/chunks/{timeout-37GM7IIL.js → timeout-C6WDYPLV.js} +1 -1
  205. package/dist/bundle/chunks/worker.js +120 -109
  206. package/dist/bundle/chunks/{xan-UIGVJCMA.js → xan-UIL24CGT.js} +1 -1
  207. package/dist/bundle/chunks/{yq-FGNXZCGX.js → yq-ZRNZKDLE.js} +1 -1
  208. package/dist/bundle/index.cjs +2677 -1101
  209. package/dist/bundle/index.js +346 -341
  210. package/dist/commands/diff/format.d.ts +46 -0
  211. package/dist/commands/js-exec/js-exec.d.ts +1 -14
  212. package/dist/commands/js-exec/run-runtime.d.ts +10 -0
  213. package/dist/commands/worker-bridge/bridge-handler.d.ts +0 -3
  214. package/dist/commands/worker-bridge/protocol.d.ts +57 -23
  215. package/dist/fs/fs-error.d.ts +43 -0
  216. package/dist/fs/interface.d.ts +13 -0
  217. package/dist/fs/mountable-fs/mountable-fs.d.ts +20 -0
  218. package/dist/fs/overlay-fs/apply.d.ts +2 -1
  219. package/dist/fs/overlay-fs/index.d.ts +0 -1
  220. package/dist/fs/overlay-fs/overlay-fs.d.ts +14 -0
  221. package/dist/fs/path-utils.d.ts +5 -0
  222. package/dist/fs/traversal.d.ts +9 -0
  223. package/dist/fs/vfs-template.d.ts +38 -15
  224. package/dist/index.d.cts +2 -1
  225. package/dist/index.d.ts +2 -1
  226. package/dist/interpreter/builtin-dispatch.d.ts +10 -0
  227. package/dist/interpreter/builtin-manifest.d.ts +273 -0
  228. package/dist/interpreter/builtins/help.d.ts +6 -0
  229. package/dist/interpreter/builtins/shopt.d.ts +3 -0
  230. package/dist/interpreter/helpers/shell-constants.d.ts +0 -20
  231. package/dist/interpreter/helpers/substitution-status.d.ts +34 -0
  232. package/dist/interpreter/interpreter.d.ts +1 -1
  233. package/dist/interpreter/types.d.ts +8 -1
  234. package/dist/limits.d.ts +2 -0
  235. package/dist/timers.d.ts +0 -9
  236. package/dist/types.d.ts +4 -3
  237. package/package.json +8 -8
  238. package/dist/bin/chunks/chmod-WYYTXGVB.js +0 -3
  239. package/dist/bin/chunks/chunk-23OI2XDJ.js +0 -20
  240. package/dist/bin/chunks/chunk-43E7AR6A.js +0 -3
  241. package/dist/bin/chunks/chunk-AI7JUA46.js +0 -13
  242. package/dist/bin/chunks/chunk-CL7IYCGG.js +0 -20
  243. package/dist/bin/chunks/chunk-GQKQEK5N.js +0 -11
  244. package/dist/bin/chunks/chunk-JHEAT7AR.js +0 -12
  245. package/dist/bin/chunks/chunk-OLEQNRKX.js +0 -8
  246. package/dist/bin/chunks/chunk-QKJAAJ7J.js +0 -3
  247. package/dist/bin/chunks/chunk-SE7JHGP3.js +0 -9
  248. package/dist/bin/chunks/chunk-WEHA3JFD.js +0 -3
  249. package/dist/bin/chunks/chunk-YQEKKZTU.js +0 -12
  250. package/dist/bin/chunks/cp-OMVKM35F.js +0 -3
  251. package/dist/bin/chunks/du-LUFPVLNW.js +0 -3
  252. package/dist/bin/chunks/find-AWH2KOY7.js +0 -3
  253. package/dist/bin/chunks/flag-coverage-FYJ2V7J4.js +0 -3
  254. package/dist/bin/chunks/gzip-FDPA6EKG.js +0 -3
  255. package/dist/bin/chunks/js-exec-5QZZCOR7.js +0 -99
  256. package/dist/bin/chunks/js-exec-worker.js +0 -4931
  257. package/dist/bin/chunks/ln-B35EKC2Q.js +0 -3
  258. package/dist/bin/chunks/ls-Q6ZZ6SQ2.js +0 -3
  259. package/dist/bin/chunks/mkdir-74BP5NTG.js +0 -3
  260. package/dist/bin/chunks/mv-76LAHXFR.js +0 -3
  261. package/dist/bin/chunks/python3-TMFYDQAP.js +0 -14
  262. package/dist/bin/chunks/readlink-EHXJNW62.js +0 -3
  263. package/dist/bin/chunks/rg-PXNKNIMY.js +0 -3
  264. package/dist/bin/chunks/rm-NLG5344W.js +0 -3
  265. package/dist/bin/chunks/rmdir-7ZIVFZJX.js +0 -3
  266. package/dist/bin/chunks/split-ZNNNHKSP.js +0 -3
  267. package/dist/bin/chunks/sqlite3-3EUPHVEZ.js +0 -3
  268. package/dist/bin/shell/chunks/chmod-WYYTXGVB.js +0 -3
  269. package/dist/bin/shell/chunks/chunk-23OI2XDJ.js +0 -20
  270. package/dist/bin/shell/chunks/chunk-43E7AR6A.js +0 -3
  271. package/dist/bin/shell/chunks/chunk-AI7JUA46.js +0 -13
  272. package/dist/bin/shell/chunks/chunk-CL7IYCGG.js +0 -20
  273. package/dist/bin/shell/chunks/chunk-GQKQEK5N.js +0 -11
  274. package/dist/bin/shell/chunks/chunk-JHEAT7AR.js +0 -12
  275. package/dist/bin/shell/chunks/chunk-OLEQNRKX.js +0 -8
  276. package/dist/bin/shell/chunks/chunk-QKJAAJ7J.js +0 -3
  277. package/dist/bin/shell/chunks/chunk-SE7JHGP3.js +0 -9
  278. package/dist/bin/shell/chunks/chunk-WEHA3JFD.js +0 -3
  279. package/dist/bin/shell/chunks/chunk-YQEKKZTU.js +0 -12
  280. package/dist/bin/shell/chunks/cp-OMVKM35F.js +0 -3
  281. package/dist/bin/shell/chunks/du-LUFPVLNW.js +0 -3
  282. package/dist/bin/shell/chunks/find-AWH2KOY7.js +0 -3
  283. package/dist/bin/shell/chunks/flag-coverage-FYJ2V7J4.js +0 -3
  284. package/dist/bin/shell/chunks/gzip-FDPA6EKG.js +0 -3
  285. package/dist/bin/shell/chunks/js-exec-5QZZCOR7.js +0 -99
  286. package/dist/bin/shell/chunks/ln-B35EKC2Q.js +0 -3
  287. package/dist/bin/shell/chunks/ls-Q6ZZ6SQ2.js +0 -3
  288. package/dist/bin/shell/chunks/mkdir-74BP5NTG.js +0 -3
  289. package/dist/bin/shell/chunks/mv-76LAHXFR.js +0 -3
  290. package/dist/bin/shell/chunks/python3-TMFYDQAP.js +0 -14
  291. package/dist/bin/shell/chunks/readlink-EHXJNW62.js +0 -3
  292. package/dist/bin/shell/chunks/rg-PXNKNIMY.js +0 -3
  293. package/dist/bin/shell/chunks/rm-NLG5344W.js +0 -3
  294. package/dist/bin/shell/chunks/rmdir-7ZIVFZJX.js +0 -3
  295. package/dist/bin/shell/chunks/split-ZNNNHKSP.js +0 -3
  296. package/dist/bin/shell/chunks/sqlite3-3EUPHVEZ.js +0 -3
  297. package/dist/bundle/chunks/chmod-WM2JFFQC.js +0 -2
  298. package/dist/bundle/chunks/chunk-7IJWBG4I.js +0 -2
  299. package/dist/bundle/chunks/chunk-FSJ6TTCC.js +0 -19
  300. package/dist/bundle/chunks/chunk-G3IRZ4FN.js +0 -8
  301. package/dist/bundle/chunks/chunk-MLIO3BK2.js +0 -7
  302. package/dist/bundle/chunks/chunk-PS2RJNZZ.js +0 -2
  303. package/dist/bundle/chunks/chunk-TBVD66LC.js +0 -10
  304. package/dist/bundle/chunks/chunk-ULXGGWAD.js +0 -11
  305. package/dist/bundle/chunks/chunk-UTKGYVUZ.js +0 -7
  306. package/dist/bundle/chunks/chunk-W2Z6LYL6.js +0 -11
  307. package/dist/bundle/chunks/chunk-WN54B5NQ.js +0 -12
  308. package/dist/bundle/chunks/chunk-YUSFCOM7.js +0 -2
  309. package/dist/bundle/chunks/cp-2KZIPZJS.js +0 -2
  310. package/dist/bundle/chunks/du-7AZCLKR6.js +0 -2
  311. package/dist/bundle/chunks/find-END3EAHV.js +0 -2
  312. package/dist/bundle/chunks/flag-coverage-XSPWRCVG.js +0 -2
  313. package/dist/bundle/chunks/gzip-RQOBR22H.js +0 -2
  314. package/dist/bundle/chunks/js-exec-57QMXJG5.js +0 -98
  315. package/dist/bundle/chunks/js-exec-worker.js +0 -4931
  316. package/dist/bundle/chunks/ln-OPY2ZVGQ.js +0 -2
  317. package/dist/bundle/chunks/ls-ZPXGZX63.js +0 -2
  318. package/dist/bundle/chunks/mkdir-WDDKK2P3.js +0 -2
  319. package/dist/bundle/chunks/mv-ZF6UBVRB.js +0 -2
  320. package/dist/bundle/chunks/python3-NNONJINM.js +0 -13
  321. package/dist/bundle/chunks/readlink-U5OM5A3M.js +0 -2
  322. package/dist/bundle/chunks/rg-NAMXBYKS.js +0 -2
  323. package/dist/bundle/chunks/rm-R2ZENNSN.js +0 -2
  324. package/dist/bundle/chunks/rmdir-YJKPQVCK.js +0 -2
  325. package/dist/bundle/chunks/split-JICLAMP6.js +0 -2
  326. package/dist/bundle/chunks/sqlite3-M4UZPXDO.js +0 -2
  327. package/dist/commands/js-exec/js-exec-worker.d.ts +0 -33
  328. package/dist/fs/overlay-fs/merge.d.ts +0 -24
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as C}from"./chunk-QYZN33JA.js";import{a as se,b as re}from"./chunk-R2J5MJOM.js";import{b as O}from"./chunk-GR4ZHKXI.js";import{l as A}from"./chunk-FUT3X2GJ.js";import{b as j}from"./chunk-CPKBPQ2C.js";import{a as me,c as ne}from"./chunk-MUFNRCMY.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
+ import{a as C}from"./chunk-IOKQFPM6.js";import{a as se,b as re}from"./chunk-QFOXSCOD.js";import{b as O}from"./chunk-GR4ZHKXI.js";import{l as A}from"./chunk-FUT3X2GJ.js";import{b as j}from"./chunk-CPKBPQ2C.js";import{a as me,c as ne}from"./chunk-MUFNRCMY.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(`
4
4
  `)}function ve(t){if(t==="")return[];let e=t.split(`
5
- `);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'
5
+ `);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'
6
6
  `:`grep: option '--file' requires an argument
7
- `,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
7
+ `,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
8
8
  `,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
9
9
  `,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
10
10
  `,exitCode:2};r=await e.fs.readFile(o)}catch(o){return O(o),{stdout:"",stderr:`grep: ${s}: No such file or directory
11
- `,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
12
- `,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}
13
- `,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(`
11
+ `,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
12
+ `,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}
13
+ `,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(`
14
14
  `)}
15
- `,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
16
- `,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
17
- `};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}
18
- `,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
19
- `}}}));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}
20
- `:u||(U+=p.output)}else u?U+=`${d}
21
- `: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};
15
+ `,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
16
+ `,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
17
+ `,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}
18
+ `,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
19
+ `,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}
20
+ `:u||(U+=c.output)}else u?U+=`${d}
21
+ `: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,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as Y,b as C,c as Z,d as ee}from"./chunk-F3UDTTI7.js";import{d as M}from"./chunk-47IFMQYS.js";import{a as K,b as X}from"./chunk-42AMF6EE.js";import{b as F}from"./chunk-2UV6ZFHK.js";import{a as H}from"./chunk-HWI42GQO.js";import{l as j}from"./chunk-FUT3X2GJ.js";import{a as P,b as L}from"./chunk-CPKBPQ2C.js";import{a as B}from"./chunk-PBOVSFTJ.js";import{a as W,b as G,c as T}from"./chunk-MUFNRCMY.js";function se(i){switch(i){case"\b":return"\\b";case"\f":return"\\f";case`
3
+ import{a as Y,b as C,c as Z,d as ee}from"./chunk-ONF4KUYV.js";import{d as M}from"./chunk-47IFMQYS.js";import{a as K,b as X}from"./chunk-42AMF6EE.js";import{b as F}from"./chunk-2UV6ZFHK.js";import{a as H}from"./chunk-HWI42GQO.js";import{l as j}from"./chunk-FUT3X2GJ.js";import{a as P,b as L}from"./chunk-CPKBPQ2C.js";import{a as B}from"./chunk-PBOVSFTJ.js";import{a as W,b as G,c as T}from"./chunk-MUFNRCMY.js";function se(i){switch(i){case"\b":return"\\b";case"\f":return"\\f";case`
4
4
  `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return`\\u${i.charCodeAt(0).toString(16).padStart(4,"0")}`}}function ne(i){let t="",d=!1,m=!1;for(let s=0;s<i.length;s++){let a=i[s];if(m){t+=a,m=!1;continue}if(a==="\\"){t+=a,m=!0;continue}if(a==='"'){t+=a,d=!d;continue}if(d&&a.charCodeAt(0)<=31){t+=se(a);continue}t+=a}return t}function R(i,t,d){return JSON.parse(ne(i.slice(t,d)))}function J(i,t){let d=[],m=x=>{if(d.length>=t.maxElements)throw new j(`query result element limit exceeded (${t.maxElements})`,"array_elements");d.push(x)},s=0,a=i.length;for(;s<a;){for(;s<a&&/\s/.test(i[s]);)s++;if(s>=a)break;let x=s,p=i[s];if(p==="{"||p==="["){let u=[p==="{"?"}":"]"],h=!1,E=!1;for(s++;s<a&&u.length>0;){let g=i[s];if(E)E=!1;else if(g==="\\")E=!0;else if(g==='"')h=!h;else if(!h){if(g==="{"||g==="["){if(u.push(g==="{"?"}":"]"),u.length>t.maxDepth)throw new j(`query depth limit exceeded (${t.maxDepth})`,"recursion")}else if((g==="}"||g==="]")&&u.pop()!==g)throw new Error(`Mismatched JSON delimiter at position ${s}`)}s++}if(u.length!==0)throw new Error(`Unexpected end of JSON input at position ${s} (unclosed ${p})`);m(M(R(i,x,s),{maxDepth:t.maxDepth,maxElements:t.maxElements}))}else if(p==='"'){let u=!1;for(s++;s<a;){let h=i[s];if(u)u=!1;else if(h==="\\")u=!0;else if(h==='"'){s++;break}s++}m(M(R(i,x,s),t))}else if(p==="-"||p>="0"&&p<="9"){for(;s<a&&/[\d.eE+-]/.test(i[s]);)s++;m(M(R(i,x,s),t))}else if(i.slice(s,s+4)==="true")m(!0),s+=4;else if(i.slice(s,s+5)==="false")m(!1),s+=5;else if(i.slice(s,s+4)==="null")m(null),s+=4;else{let u=i.slice(s,s+10);throw new Error(`Invalid JSON at position ${x}: unexpected '${u.split(/\s/)[0]}'`)}}return d}function S(i){return{stdout:"",stderr:`jq: ${i}
5
5
  `,exitCode:2}}var re={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE...]",options:["-R, --raw-input read each line as string instead of JSON","-r, --raw-output output strings without quotes","-c, --compact-output compact instead of pretty-printed output","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --arg NAME VALUE bind $NAME to the string VALUE"," --argjson NAME JSON bind $NAME to the JSON-decoded value JSON"," --rawfile NAME FILE bind $NAME to the raw contents of FILE"," --slurpfile NAME FILE bind $NAME to the array of JSON values in FILE"," --args remaining arguments are string positional args ($ARGS.positional)"," --jsonargs remaining arguments are JSON positional args ($ARGS.positional)"," --help display this help and exit"]},we={name:"jq",async execute(i,t){K(t.requireDefenseContext,"jq","execution entry");let d=(r,e)=>X(t.requireDefenseContext,"jq",r,e);if(G(i))return W(re);let m=!1,s=!1,a=!1,x=!1,p=!1,u=!1,h=!1,E=!1,g=!1,V=".",_=!1,A="none",N=[],$=new Map,k=[],q=[],v={maxDepth:t.limits.maxQueryDepth,maxElements:t.limits.maxQueryElements};for(let r=0;r<i.length;r++){let e=i[r];if(e==="-R"||e==="--raw-input")s=!0;else if(e==="-r"||e==="--raw-output")m=!0;else if(e==="-c"||e==="--compact-output")a=!0;else if(e==="-e"||e==="--exit-status")x=!0;else if(e==="-s"||e==="--slurp")p=!0;else if(e==="-n"||e==="--null-input")u=!0;else if(e==="-j"||e==="--join-output")h=!0;else if(!(e==="-a"||e==="--ascii")){if(e==="-S"||e==="--sort-keys")E=!0;else if(!(e==="-C"||e==="--color")){if(!(e==="-M"||e==="--monochrome"))if(e==="--tab")g=!0;else if(e==="--arg"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--arg takes two parameters (e.g. --arg varname value)");$.set(n,l),r+=2}else if(e==="--argjson"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--argjson takes two parameters (e.g. --argjson varname text)");let y;try{y=J(l.trim(),v)}catch{return S("invalid JSON text passed to --argjson")}if(y.length!==1)return S("invalid JSON text passed to --argjson");$.set(n,y[0]),r+=2}else if(e==="--rawfile"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--rawfile takes two parameters (e.g. --rawfile varname filename)");q.push({name:n,file:l,mode:"raw"}),r+=2}else if(e==="--slurpfile"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--slurpfile takes two parameters (e.g. --slurpfile varname filename)");q.push({name:n,file:l,mode:"slurp"}),r+=2}else if(e==="--args")A="args";else if(e==="--jsonargs")A="jsonargs";else if(e==="-")N.push("-");else{if(e.startsWith("--"))return T("jq",e);if(e.startsWith("-")){for(let n of e.slice(1))if(n==="R")s=!0;else if(n==="r")m=!0;else if(n==="c")a=!0;else if(n==="e")x=!0;else if(n==="s")p=!0;else if(n==="n")u=!0;else if(n==="j")h=!0;else if(n!=="a"){if(n==="S")E=!0;else if(n!=="C"){if(n!=="M")return T("jq",`-${n}`)}}}else if(!_)V=e,_=!0;else if(A==="args")k.push(e);else if(A==="jsonargs"){let n;try{n=J(e.trim(),v)}catch{return S("invalid JSON text passed to --jsonargs")}if(n.length!==1)return S("invalid JSON text passed to --jsonargs");k.push(n[0])}else N.push(e)}}}}if(q.length>0){let r=await d("arg file read",()=>F(t,q.map(e=>e.file),{cmdName:"jq",stopOnError:!0}));if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:2};for(let e=0;e<q.length;e++){let{name:n,mode:l}=q[e],y=L(r.files[e].content);if(l==="raw")$.set(n,y);else{let b=y.trim();try{$.set(n,b?J(b,v):[])}catch{return S("invalid JSON text passed to --slurpfile")}}}}let D=[];if(!u)if(N.length===0||N.length===1&&N[0]==="-")D.push({source:"stdin",content:L(t.stdin)});else{let r=await d("file read",()=>F(t,N,{cmdName:"jq",stopOnError:!0}));if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:2};D=r.files.map(e=>({source:e.filename||"stdin",content:L(e.content)}))}try{let r=Z(V,{maxDepth:t.limits.maxQueryDepth,maxTokens:t.limits.maxQueryTokens,maxSourceLength:t.limits.maxStringLength}),e=[],n={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength,maxOutputSize:t.limits.maxOutputSize,maxArrayElements:t.limits.maxQueryElements,maxDepth:t.limits.maxQueryDepth}:void 0,env:t.env,namedArgs:$,positionalArgs:k,coverage:t.coverage,requireDefenseContext:t.requireDefenseContext,budget:{operations:0,callDepth:0}},l=(o,f)=>{if(f.length>t.limits.maxQueryElements-o.length)throw new j(`query result element limit exceeded (${t.limits.maxQueryElements})`,"array_elements");for(let c of f)o.push(c)};if(u)e=C(null,r,n);else if(s&&p){let o=D.map(({content:f})=>f).join("");e=C(o,r,n)}else if(s){let o="";for(let{content:f}of D){let c=o+f,w=0,O=c.indexOf(`
6
6
  `,w);for(;O!==-1;)l(e,C(c.slice(w,O),r,n)),w=O+1,O=c.indexOf(`
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{f as Y}from"./chunk-47IFMQYS.js";import{a as K}from"./chunk-3MRB66F4.js";import{a as P,b as J,c as D}from"./chunk-R2J5MJOM.js";import{a as W}from"./chunk-GA5TPRMF.js";import{b as N}from"./chunk-GR4ZHKXI.js";import{d as V}from"./chunk-I57EACSL.js";import{d as Z}from"./chunk-WEHA3JFD.js";import{l as M}from"./chunk-FUT3X2GJ.js";import{a as G,b as T,e as _}from"./chunk-CPKBPQ2C.js";import{a as q,b as H,c as O}from"./chunk-MUFNRCMY.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
+ import{f as Y}from"./chunk-47IFMQYS.js";import{a as K}from"./chunk-3MRB66F4.js";import{a as P,b as J,c as D}from"./chunk-QFOXSCOD.js";import{a as W}from"./chunk-YXPSX3SI.js";import{b as N}from"./chunk-GR4ZHKXI.js";import{d as V}from"./chunk-I57EACSL.js";import{d as Z}from"./chunk-MBREBDZQ.js";import{l as M}from"./chunk-FUT3X2GJ.js";import{a as G,b as T,e as _}from"./chunk-CPKBPQ2C.js";import{a as q,b as H,c as O}from"./chunk-MUFNRCMY.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(`
4
4
  `)}
5
5
  `}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}
6
6
  `,exitCode:1}}function he(e,t){return!/^\d+$/.test(t)||!Number.isSafeInteger(Number(t))?{stdout:"",stderr:`rg: invalid --${e} value: ${t}