just-bash 1.2.5 → 1.3.1

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 (331) hide show
  1. package/README.md +1 -1
  2. package/dist/ai/index.d.ts +5 -0
  3. package/dist/ast/types.d.ts +2 -0
  4. package/dist/bin/chunks/{alias-74DFXE2E.js → alias-ZAQAKC5X.js} +1 -1
  5. package/dist/bin/chunks/{awk2-4DKPX43H.js → awk2-A73ZNFXJ.js} +1 -1
  6. package/dist/bin/chunks/base64-JPITV4MD.js +6 -0
  7. package/dist/bin/chunks/{basename-Y7JDBYHN.js → basename-IYEP3AMY.js} +1 -1
  8. package/dist/bin/{shell/chunks/bash-5IWSVGHN.js → chunks/bash-WZYHIZP6.js} +1 -1
  9. package/dist/bin/{shell/chunks/cat-YZXBF5YF.js → chunks/cat-XILYL7NW.js} +1 -1
  10. package/dist/bin/chunks/{chmod-3G4LK462.js → chmod-EXWX4N7Y.js} +1 -1
  11. package/dist/bin/chunks/chunk-GX4MPCG6.js +9 -0
  12. package/dist/bin/chunks/chunk-SJXDWN5X.js +2 -0
  13. package/dist/bin/{shell/chunks/clear-GTCFHSB2.js → chunks/clear-2APRIRCF.js} +1 -1
  14. package/dist/bin/chunks/comm-KY3COLF5.js +13 -0
  15. package/dist/bin/{shell/chunks/cp-77UY7PGN.js → chunks/cp-HES4UN7K.js} +1 -1
  16. package/dist/bin/chunks/{curl-NE7XEWMN.js → curl-BN5M3BUX.js} +1 -1
  17. package/dist/bin/chunks/{cut-UYV3FM7R.js → cut-JSIPAKOX.js} +1 -1
  18. package/dist/bin/chunks/{date-7NBRXV2Z.js → date-CU4J7GHI.js} +1 -1
  19. package/dist/bin/chunks/{diff-TG2NXCX2.js → diff-W4JRNHXW.js} +1 -1
  20. package/dist/bin/chunks/{dirname-VLHP44TU.js → dirname-UTCUUILN.js} +1 -1
  21. package/dist/bin/chunks/{du-4FZ7WF2P.js → du-2JU3PUTM.js} +1 -1
  22. package/dist/bin/chunks/{echo-DEUIS5JO.js → echo-HKLPYMNC.js} +1 -1
  23. package/dist/bin/chunks/{env-AKGX6HSG.js → env-2SBJNP7X.js} +1 -1
  24. package/dist/bin/chunks/{expr-HA2ZNL6S.js → expr-M74QZQ6C.js} +1 -1
  25. package/dist/bin/chunks/file-QPD3U2H7.js +23 -0
  26. package/dist/bin/{shell/chunks/find-JADNFF7V.js → chunks/find-D3ZC5DXH.js} +1 -1
  27. package/dist/bin/chunks/grep-BEZRXAWL.js +15 -0
  28. package/dist/bin/{shell/chunks/head-VGXR3WWL.js → chunks/head-YGMY3DHE.js} +1 -1
  29. package/dist/bin/chunks/{help-YQGNAT2T.js → help-UEF7LW7F.js} +1 -1
  30. package/dist/bin/{shell/chunks/history-PRQ4B6N2.js → chunks/history-OGBCIAR5.js} +1 -1
  31. package/dist/bin/chunks/{html-to-markdown-L4UWMK4S.js → html-to-markdown-HTGML4TH.js} +1 -1
  32. package/dist/bin/chunks/jq-ME57VHK6.js +14 -0
  33. package/dist/bin/chunks/{ln-DB7J2W5X.js → ln-RUR4ALOJ.js} +1 -1
  34. package/dist/bin/{shell/chunks/ls-C4MPAF3H.js → chunks/ls-GU5227KE.js} +1 -1
  35. package/dist/bin/chunks/md5sum-C7WDEYN5.js +2 -0
  36. package/dist/bin/chunks/{mkdir-LWULWDHP.js → mkdir-4OYU22AA.js} +1 -1
  37. package/dist/bin/chunks/{mv-TDYCNSIQ.js → mv-H3S4FEWR.js} +1 -1
  38. package/dist/bin/chunks/{paste-R36J3G4K.js → paste-HHCFASL4.js} +1 -1
  39. package/dist/bin/chunks/{printf-WM4X6IZ6.js → printf-2JFCUFOA.js} +1 -1
  40. package/dist/bin/chunks/{pwd-X4MWD4JP.js → pwd-T5Q3JEBO.js} +1 -1
  41. package/dist/bin/chunks/{readlink-DPNOQY67.js → readlink-M44TLMFS.js} +1 -1
  42. package/dist/bin/chunks/{rm-W6CCBEMG.js → rm-R4M647EC.js} +1 -1
  43. package/dist/bin/chunks/{sed-LTCVBSRV.js → sed-QLLAZYHH.js} +1 -1
  44. package/dist/bin/chunks/{seq-DGJILX2Q.js → seq-GJMQM7SP.js} +1 -1
  45. package/dist/bin/chunks/sha1sum-WKCGV66X.js +2 -0
  46. package/dist/bin/chunks/sha256sum-3ZDGP5WC.js +2 -0
  47. package/dist/bin/chunks/{sleep-E4DIYGTT.js → sleep-OJPODQGM.js} +1 -1
  48. package/dist/bin/chunks/sort-JL33INQB.js +16 -0
  49. package/dist/bin/{shell/chunks/stat-3PHITCPO.js → chunks/stat-CR2INBC2.js} +1 -1
  50. package/dist/bin/chunks/{tail-YSVKBQ77.js → tail-BYPLMYMZ.js} +1 -1
  51. package/dist/bin/chunks/{tee-UU2VS3OM.js → tee-HOMRRC3X.js} +1 -1
  52. package/dist/bin/chunks/{timeout-RP2AJGMV.js → timeout-MYKG34DQ.js} +1 -1
  53. package/dist/bin/{shell/chunks/touch-XCIAYF5I.js → chunks/touch-3ZANYAXI.js} +1 -1
  54. package/dist/bin/chunks/{tr-2EEKHHO6.js → tr-E66N7IS2.js} +1 -1
  55. package/dist/bin/chunks/{tree-4247W67O.js → tree-EE2PYIMV.js} +1 -1
  56. package/dist/bin/chunks/{true-JCX733LK.js → true-OWPVS7U4.js} +1 -1
  57. package/dist/bin/chunks/{uniq-W4HF6YSB.js → uniq-F5NP3LLU.js} +1 -1
  58. package/dist/bin/chunks/{wc-CNJ3QDRA.js → wc-NBMNJDZL.js} +1 -1
  59. package/dist/bin/chunks/{which-HX2NMOP3.js → which-6MRG2UCF.js} +1 -1
  60. package/dist/bin/chunks/xargs-EMY5BOJ2.js +4 -0
  61. package/dist/bin/just-bash.js +124 -116
  62. package/dist/bin/shell/chunks/{alias-74DFXE2E.js → alias-ZAQAKC5X.js} +1 -1
  63. package/dist/bin/shell/chunks/{awk2-4DKPX43H.js → awk2-A73ZNFXJ.js} +1 -1
  64. package/dist/bin/shell/chunks/base64-JPITV4MD.js +6 -0
  65. package/dist/bin/shell/chunks/{basename-Y7JDBYHN.js → basename-IYEP3AMY.js} +1 -1
  66. package/dist/bin/{chunks/bash-5IWSVGHN.js → shell/chunks/bash-WZYHIZP6.js} +1 -1
  67. package/dist/bin/{chunks/cat-YZXBF5YF.js → shell/chunks/cat-XILYL7NW.js} +1 -1
  68. package/dist/bin/shell/chunks/{chmod-3G4LK462.js → chmod-EXWX4N7Y.js} +1 -1
  69. package/dist/bin/shell/chunks/chunk-GX4MPCG6.js +9 -0
  70. package/dist/bin/shell/chunks/chunk-SJXDWN5X.js +2 -0
  71. package/dist/bin/{chunks/clear-GTCFHSB2.js → shell/chunks/clear-2APRIRCF.js} +1 -1
  72. package/dist/bin/shell/chunks/comm-KY3COLF5.js +13 -0
  73. package/dist/bin/{chunks/cp-77UY7PGN.js → shell/chunks/cp-HES4UN7K.js} +1 -1
  74. package/dist/bin/shell/chunks/{curl-NE7XEWMN.js → curl-BN5M3BUX.js} +1 -1
  75. package/dist/bin/shell/chunks/{cut-UYV3FM7R.js → cut-JSIPAKOX.js} +1 -1
  76. package/dist/bin/shell/chunks/{date-7NBRXV2Z.js → date-CU4J7GHI.js} +1 -1
  77. package/dist/bin/shell/chunks/{diff-TG2NXCX2.js → diff-W4JRNHXW.js} +1 -1
  78. package/dist/bin/shell/chunks/{dirname-VLHP44TU.js → dirname-UTCUUILN.js} +1 -1
  79. package/dist/bin/shell/chunks/{du-4FZ7WF2P.js → du-2JU3PUTM.js} +1 -1
  80. package/dist/bin/shell/chunks/{echo-DEUIS5JO.js → echo-HKLPYMNC.js} +1 -1
  81. package/dist/bin/shell/chunks/{env-AKGX6HSG.js → env-2SBJNP7X.js} +1 -1
  82. package/dist/bin/shell/chunks/{expr-HA2ZNL6S.js → expr-M74QZQ6C.js} +1 -1
  83. package/dist/bin/shell/chunks/file-QPD3U2H7.js +23 -0
  84. package/dist/bin/{chunks/find-JADNFF7V.js → shell/chunks/find-D3ZC5DXH.js} +1 -1
  85. package/dist/bin/shell/chunks/grep-BEZRXAWL.js +15 -0
  86. package/dist/bin/{chunks/head-VGXR3WWL.js → shell/chunks/head-YGMY3DHE.js} +1 -1
  87. package/dist/bin/shell/chunks/{help-YQGNAT2T.js → help-UEF7LW7F.js} +1 -1
  88. package/dist/bin/{chunks/history-PRQ4B6N2.js → shell/chunks/history-OGBCIAR5.js} +1 -1
  89. package/dist/bin/shell/chunks/{html-to-markdown-L4UWMK4S.js → html-to-markdown-HTGML4TH.js} +1 -1
  90. package/dist/bin/shell/chunks/jq-ME57VHK6.js +14 -0
  91. package/dist/bin/shell/chunks/{ln-DB7J2W5X.js → ln-RUR4ALOJ.js} +1 -1
  92. package/dist/bin/{chunks/ls-C4MPAF3H.js → shell/chunks/ls-GU5227KE.js} +1 -1
  93. package/dist/bin/shell/chunks/md5sum-C7WDEYN5.js +2 -0
  94. package/dist/bin/shell/chunks/{mkdir-LWULWDHP.js → mkdir-4OYU22AA.js} +1 -1
  95. package/dist/bin/shell/chunks/{mv-TDYCNSIQ.js → mv-H3S4FEWR.js} +1 -1
  96. package/dist/bin/shell/chunks/{paste-R36J3G4K.js → paste-HHCFASL4.js} +1 -1
  97. package/dist/bin/shell/chunks/{printf-WM4X6IZ6.js → printf-2JFCUFOA.js} +1 -1
  98. package/dist/bin/shell/chunks/{pwd-X4MWD4JP.js → pwd-T5Q3JEBO.js} +1 -1
  99. package/dist/bin/shell/chunks/{readlink-DPNOQY67.js → readlink-M44TLMFS.js} +1 -1
  100. package/dist/bin/shell/chunks/{rm-W6CCBEMG.js → rm-R4M647EC.js} +1 -1
  101. package/dist/bin/shell/chunks/{sed-LTCVBSRV.js → sed-QLLAZYHH.js} +1 -1
  102. package/dist/bin/shell/chunks/{seq-DGJILX2Q.js → seq-GJMQM7SP.js} +1 -1
  103. package/dist/bin/shell/chunks/sha1sum-WKCGV66X.js +2 -0
  104. package/dist/bin/shell/chunks/sha256sum-3ZDGP5WC.js +2 -0
  105. package/dist/bin/shell/chunks/{sleep-E4DIYGTT.js → sleep-OJPODQGM.js} +1 -1
  106. package/dist/bin/shell/chunks/sort-JL33INQB.js +16 -0
  107. package/dist/bin/{chunks/stat-3PHITCPO.js → shell/chunks/stat-CR2INBC2.js} +1 -1
  108. package/dist/bin/shell/chunks/{tail-YSVKBQ77.js → tail-BYPLMYMZ.js} +1 -1
  109. package/dist/bin/shell/chunks/{tee-UU2VS3OM.js → tee-HOMRRC3X.js} +1 -1
  110. package/dist/bin/shell/chunks/{timeout-RP2AJGMV.js → timeout-MYKG34DQ.js} +1 -1
  111. package/dist/bin/{chunks/touch-XCIAYF5I.js → shell/chunks/touch-3ZANYAXI.js} +1 -1
  112. package/dist/bin/shell/chunks/{tr-2EEKHHO6.js → tr-E66N7IS2.js} +1 -1
  113. package/dist/bin/shell/chunks/{tree-4247W67O.js → tree-EE2PYIMV.js} +1 -1
  114. package/dist/bin/shell/chunks/{true-JCX733LK.js → true-OWPVS7U4.js} +1 -1
  115. package/dist/bin/shell/chunks/{uniq-W4HF6YSB.js → uniq-F5NP3LLU.js} +1 -1
  116. package/dist/bin/shell/chunks/{wc-CNJ3QDRA.js → wc-NBMNJDZL.js} +1 -1
  117. package/dist/bin/shell/chunks/{which-HX2NMOP3.js → which-6MRG2UCF.js} +1 -1
  118. package/dist/bin/shell/chunks/xargs-EMY5BOJ2.js +4 -0
  119. package/dist/bin/shell/shell.js +107 -99
  120. package/dist/bundle/ai/index.js +442 -393
  121. package/dist/bundle/chunks/{alias-7ZSTROM7.js → alias-JFIUWFGE.js} +1 -1
  122. package/dist/{bin/chunks/awk2-UYU2UYZ2.js → bundle/chunks/awk2-QWBT4IFJ.js} +1 -2
  123. package/dist/bundle/chunks/base64-TUA2XORD.js +5 -0
  124. package/dist/bundle/chunks/{basename-SB5JXIY3.js → basename-5UVU5RXR.js} +1 -1
  125. package/dist/bundle/chunks/{bash-5WG5RD6L.js → bash-BASUPKHJ.js} +1 -1
  126. package/dist/bundle/chunks/cat-47EP4IAV.js +5 -0
  127. package/dist/bundle/chunks/{chmod-VLKWIL3N.js → chmod-XJXFAD4M.js} +1 -1
  128. package/dist/bundle/chunks/chunk-2RUN43TJ.js +1 -0
  129. package/dist/bundle/chunks/chunk-46TSKXFW.js +8 -0
  130. package/dist/bundle/chunks/clear-XD3TJRVQ.js +1 -0
  131. package/dist/bundle/chunks/comm-KSJ4BBRQ.js +12 -0
  132. package/dist/bundle/chunks/cp-37OVLNLD.js +7 -0
  133. package/dist/bundle/chunks/{curl-PA2MWGKN.js → curl-C43O5WQS.js} +1 -1
  134. package/dist/bundle/chunks/cut-FIZRELKC.js +5 -0
  135. package/dist/bundle/chunks/{date-YOOSNZVA.js → date-NN5C354M.js} +1 -1
  136. package/dist/bundle/chunks/diff-GLRVCAKJ.js +6 -0
  137. package/dist/bundle/chunks/dirname-U2KVUSQY.js +4 -0
  138. package/dist/bundle/chunks/du-KRAFOIQK.js +7 -0
  139. package/dist/bundle/chunks/{echo-W2TA2N7Y.js → echo-WUKBESC7.js} +1 -1
  140. package/dist/bundle/chunks/env-MSPSPGCD.js +8 -0
  141. package/dist/bundle/chunks/{expr-A4LJAGVP.js → expr-HYOCSWK6.js} +1 -1
  142. package/dist/bundle/chunks/file-LQXX6P4Y.js +22 -0
  143. package/dist/{bin/shell/chunks/find-NCI6KGUI.js → bundle/chunks/find-R6LJIRBI.js} +1 -2
  144. package/dist/bundle/chunks/grep-ZJVDG3FA.js +14 -0
  145. package/dist/bundle/chunks/head-6PAUYCDP.js +1 -0
  146. package/dist/{bin/shell/chunks/help-5V3MPCYQ.js → bundle/chunks/help-5E6PYJWQ.js} +3 -4
  147. package/dist/bundle/chunks/history-SG6VRATI.js +2 -0
  148. package/dist/bundle/chunks/html-to-markdown-ZSZ34PAN.js +4 -0
  149. package/dist/bundle/chunks/jq-ABWUP4LV.js +13 -0
  150. package/dist/bundle/chunks/ln-XFYHBIFL.js +9 -0
  151. package/dist/bundle/chunks/{ls-B7C35UDO.js → ls-JGYJQA2Y.js} +1 -1
  152. package/dist/bundle/chunks/md5sum-PIH6F3O3.js +1 -0
  153. package/dist/bundle/chunks/{mkdir-WYI2LJ6H.js → mkdir-HA2FJX4O.js} +1 -1
  154. package/dist/bundle/chunks/mv-7I62SB3I.js +6 -0
  155. package/dist/bundle/chunks/paste-QBGVCQFT.js +7 -0
  156. package/dist/bundle/chunks/{printf-O2UW73XK.js → printf-HBP44PXI.js} +1 -1
  157. package/dist/bundle/chunks/pwd-CEF235GL.js +2 -0
  158. package/dist/bundle/chunks/readlink-MQIMKDSA.js +6 -0
  159. package/dist/bundle/chunks/{rm-5X2XSQQ6.js → rm-NF3FNLAY.js} +1 -1
  160. package/dist/{bin/shell/chunks/sed-B6FXUN7R.js → bundle/chunks/sed-H2RWPMTM.js} +1 -2
  161. package/dist/bundle/chunks/{seq-TFPZQZPJ.js → seq-VKYIUOPJ.js} +1 -1
  162. package/dist/bundle/chunks/sha1sum-HVHNZSEC.js +1 -0
  163. package/dist/bundle/chunks/sha256sum-REOOJORK.js +1 -0
  164. package/dist/bundle/chunks/{sleep-QJBQD6VS.js → sleep-AFN3PHJW.js} +1 -1
  165. package/dist/bundle/chunks/sort-XODGFZC4.js +15 -0
  166. package/dist/bundle/chunks/{stat-TM5F5YO4.js → stat-FVFLDQGP.js} +1 -1
  167. package/dist/bundle/chunks/tail-QXKYHAML.js +1 -0
  168. package/dist/bundle/chunks/tee-W5HCCBPO.js +2 -0
  169. package/dist/bundle/chunks/{timeout-VG2N46UR.js → timeout-XAA3N7CF.js} +1 -1
  170. package/dist/bundle/chunks/{touch-Z5XRYFYY.js → touch-FOE745V2.js} +1 -1
  171. package/dist/bundle/chunks/{tr-UV4V27RJ.js → tr-LMLGE4IE.js} +1 -1
  172. package/dist/bundle/chunks/{tree-75UXQ4XJ.js → tree-WBUGLVP5.js} +1 -1
  173. package/dist/bundle/chunks/true-6LGCG4EY.js +1 -0
  174. package/dist/bundle/chunks/uniq-7PFWPNWK.js +4 -0
  175. package/dist/bundle/chunks/wc-GV5WUREX.js +5 -0
  176. package/dist/bundle/chunks/which-KHFYPBWW.js +2 -0
  177. package/dist/bundle/chunks/xargs-NQBNFMCT.js +3 -0
  178. package/dist/bundle/index.js +120 -112
  179. package/dist/commands/comm/comm.d.ts +10 -0
  180. package/dist/commands/file/file.d.ts +7 -0
  181. package/dist/commands/md5sum/checksum.d.ts +7 -0
  182. package/dist/commands/{awk/awk.d.ts → md5sum/md5sum.d.ts} +1 -1
  183. package/dist/commands/md5sum/sha1sum.d.ts +2 -0
  184. package/dist/commands/md5sum/sha256sum.d.ts +2 -0
  185. package/dist/commands/registry.d.ts +1 -1
  186. package/dist/commands/sort/types.d.ts +12 -0
  187. package/dist/interpreter/types.d.ts +6 -0
  188. package/dist/shell-metadata.d.ts +28 -0
  189. package/package.json +2 -1
  190. package/dist/bin/chunks/awk-S63F6IYK.js +0 -15
  191. package/dist/bin/chunks/awk2-6XCE67AX.js +0 -20
  192. package/dist/bin/chunks/awk2-DKAZ7LPG.js +0 -20
  193. package/dist/bin/chunks/awk2-GAJ72X3Z.js +0 -20
  194. package/dist/bin/chunks/awk2-HJAPWU2N.js +0 -18
  195. package/dist/bin/chunks/awk2-LVXC5OAC.js +0 -20
  196. package/dist/bin/chunks/awk2-T6HR4EYO.js +0 -20
  197. package/dist/bin/chunks/awk2-W64AZN7P.js +0 -20
  198. package/dist/bin/chunks/base64-NC7HTKLZ.js +0 -5
  199. package/dist/bin/chunks/bash-TQGTNXAE.js +0 -7
  200. package/dist/bin/chunks/chunk-5KNEBKYN.js +0 -2
  201. package/dist/bin/chunks/chunk-6QUZ7QML.js +0 -3
  202. package/dist/bin/chunks/chunk-LV662IGP.js +0 -6
  203. package/dist/bin/chunks/env-FVITWNHG.js +0 -9
  204. package/dist/bin/chunks/find-4B67H4RP.js +0 -11
  205. package/dist/bin/chunks/find-7BUNQZX4.js +0 -11
  206. package/dist/bin/chunks/find-AMA6ABN5.js +0 -11
  207. package/dist/bin/chunks/find-HW2TUO6B.js +0 -11
  208. package/dist/bin/chunks/find-NCI6KGUI.js +0 -11
  209. package/dist/bin/chunks/find-QEYP42JQ.js +0 -11
  210. package/dist/bin/chunks/find-WJV3FM6L.js +0 -11
  211. package/dist/bin/chunks/find-YATLECXJ.js +0 -11
  212. package/dist/bin/chunks/grep-OVWU4WCZ.js +0 -15
  213. package/dist/bin/chunks/grep-PHBFGJCV.js +0 -15
  214. package/dist/bin/chunks/help-5V3MPCYQ.js +0 -16
  215. package/dist/bin/chunks/jq-EYSXBSCP.js +0 -14
  216. package/dist/bin/chunks/printf-ASOYDPIK.js +0 -14
  217. package/dist/bin/chunks/printf-BOFQVMMK.js +0 -15
  218. package/dist/bin/chunks/sed-7IS44XON.js +0 -48
  219. package/dist/bin/chunks/sed-B6FXUN7R.js +0 -80
  220. package/dist/bin/chunks/sed-RHLDIXPL.js +0 -76
  221. package/dist/bin/chunks/sed-SYSATJXR.js +0 -75
  222. package/dist/bin/chunks/sort-UJP353TM.js +0 -15
  223. package/dist/bin/chunks/timeout-OZVAGW2H.js +0 -12
  224. package/dist/bin/chunks/xargs-DKUAYNEK.js +0 -4
  225. package/dist/bin/chunks/xargs-YNLVLPOF.js +0 -4
  226. package/dist/bin/shell/chunks/awk-S63F6IYK.js +0 -15
  227. package/dist/bin/shell/chunks/awk2-6XCE67AX.js +0 -20
  228. package/dist/bin/shell/chunks/awk2-DKAZ7LPG.js +0 -20
  229. package/dist/bin/shell/chunks/awk2-GAJ72X3Z.js +0 -20
  230. package/dist/bin/shell/chunks/awk2-HJAPWU2N.js +0 -18
  231. package/dist/bin/shell/chunks/awk2-LVXC5OAC.js +0 -20
  232. package/dist/bin/shell/chunks/awk2-T6HR4EYO.js +0 -20
  233. package/dist/bin/shell/chunks/awk2-UYU2UYZ2.js +0 -20
  234. package/dist/bin/shell/chunks/awk2-W64AZN7P.js +0 -20
  235. package/dist/bin/shell/chunks/base64-NC7HTKLZ.js +0 -5
  236. package/dist/bin/shell/chunks/bash-TQGTNXAE.js +0 -7
  237. package/dist/bin/shell/chunks/chunk-5KNEBKYN.js +0 -2
  238. package/dist/bin/shell/chunks/chunk-6QUZ7QML.js +0 -3
  239. package/dist/bin/shell/chunks/chunk-LV662IGP.js +0 -6
  240. package/dist/bin/shell/chunks/env-FVITWNHG.js +0 -9
  241. package/dist/bin/shell/chunks/find-4B67H4RP.js +0 -11
  242. package/dist/bin/shell/chunks/find-7BUNQZX4.js +0 -11
  243. package/dist/bin/shell/chunks/find-AMA6ABN5.js +0 -11
  244. package/dist/bin/shell/chunks/find-HW2TUO6B.js +0 -11
  245. package/dist/bin/shell/chunks/find-QEYP42JQ.js +0 -11
  246. package/dist/bin/shell/chunks/find-WJV3FM6L.js +0 -11
  247. package/dist/bin/shell/chunks/find-YATLECXJ.js +0 -11
  248. package/dist/bin/shell/chunks/grep-OVWU4WCZ.js +0 -15
  249. package/dist/bin/shell/chunks/grep-PHBFGJCV.js +0 -15
  250. package/dist/bin/shell/chunks/jq-EYSXBSCP.js +0 -14
  251. package/dist/bin/shell/chunks/printf-ASOYDPIK.js +0 -14
  252. package/dist/bin/shell/chunks/printf-BOFQVMMK.js +0 -15
  253. package/dist/bin/shell/chunks/sed-7IS44XON.js +0 -48
  254. package/dist/bin/shell/chunks/sed-RHLDIXPL.js +0 -76
  255. package/dist/bin/shell/chunks/sed-SYSATJXR.js +0 -75
  256. package/dist/bin/shell/chunks/sort-UJP353TM.js +0 -15
  257. package/dist/bin/shell/chunks/timeout-OZVAGW2H.js +0 -12
  258. package/dist/bin/shell/chunks/xargs-DKUAYNEK.js +0 -4
  259. package/dist/bin/shell/chunks/xargs-YNLVLPOF.js +0 -4
  260. package/dist/bundle/chunks/awk-V4C3GTJI.js +0 -14
  261. package/dist/bundle/chunks/awk2-365HINHI.js +0 -19
  262. package/dist/bundle/chunks/awk2-4YCQ6UCB.js +0 -19
  263. package/dist/bundle/chunks/awk2-7YCFY7D2.js +0 -19
  264. package/dist/bundle/chunks/awk2-7YL3P4KU.js +0 -19
  265. package/dist/bundle/chunks/awk2-ETXZHQQ4.js +0 -19
  266. package/dist/bundle/chunks/awk2-FMEL7ESV.js +0 -19
  267. package/dist/bundle/chunks/awk2-LE4QUFGK.js +0 -19
  268. package/dist/bundle/chunks/awk2-MGHA6JPJ.js +0 -17
  269. package/dist/bundle/chunks/awk2-XEAK5PBN.js +0 -19
  270. package/dist/bundle/chunks/base64-WATI5PWI.js +0 -4
  271. package/dist/bundle/chunks/bash-T4PXVRYX.js +0 -6
  272. package/dist/bundle/chunks/cat-5KESXK2M.js +0 -5
  273. package/dist/bundle/chunks/chunk-JYYFSUWP.js +0 -5
  274. package/dist/bundle/chunks/chunk-TDJNT32M.js +0 -2
  275. package/dist/bundle/chunks/clear-ZBD2DMXN.js +0 -1
  276. package/dist/bundle/chunks/cp-BLHAPLQZ.js +0 -7
  277. package/dist/bundle/chunks/cut-7RHEYJ7Y.js +0 -5
  278. package/dist/bundle/chunks/diff-IVJFQANX.js +0 -6
  279. package/dist/bundle/chunks/dirname-Q5HDZLH2.js +0 -4
  280. package/dist/bundle/chunks/du-I5HYAKTQ.js +0 -7
  281. package/dist/bundle/chunks/env-2F2VHNYS.js +0 -8
  282. package/dist/bundle/chunks/env-OORA5GFS.js +0 -8
  283. package/dist/bundle/chunks/find-3O5V74IR.js +0 -10
  284. package/dist/bundle/chunks/find-4QUN2ATO.js +0 -10
  285. package/dist/bundle/chunks/find-522XP4ZY.js +0 -10
  286. package/dist/bundle/chunks/find-5UN24ZV7.js +0 -10
  287. package/dist/bundle/chunks/find-JXG2HF6L.js +0 -10
  288. package/dist/bundle/chunks/find-K3NO35MZ.js +0 -10
  289. package/dist/bundle/chunks/find-K7D4PKHS.js +0 -10
  290. package/dist/bundle/chunks/find-KP4M5DWC.js +0 -10
  291. package/dist/bundle/chunks/find-WM6ZETA7.js +0 -10
  292. package/dist/bundle/chunks/grep-3D2INI4S.js +0 -14
  293. package/dist/bundle/chunks/grep-CZTYKNEE.js +0 -14
  294. package/dist/bundle/chunks/head-7H5R4WKO.js +0 -1
  295. package/dist/bundle/chunks/help-SDCRRU2F.js +0 -15
  296. package/dist/bundle/chunks/help-XHGUXTV3.js +0 -15
  297. package/dist/bundle/chunks/history-7Z2STZ6Y.js +0 -2
  298. package/dist/bundle/chunks/html-to-markdown-XMBYO6FD.js +0 -4
  299. package/dist/bundle/chunks/jq-7R2XGLLH.js +0 -13
  300. package/dist/bundle/chunks/ln-UTUVIAFP.js +0 -9
  301. package/dist/bundle/chunks/mv-GN23UIZU.js +0 -6
  302. package/dist/bundle/chunks/paste-L4TYPVSP.js +0 -7
  303. package/dist/bundle/chunks/printf-3ZT5XOIZ.js +0 -14
  304. package/dist/bundle/chunks/printf-G2SBUNW3.js +0 -13
  305. package/dist/bundle/chunks/pwd-ZVX5RTL4.js +0 -2
  306. package/dist/bundle/chunks/readlink-HHC33N5C.js +0 -6
  307. package/dist/bundle/chunks/sed-2WWCANZT.js +0 -79
  308. package/dist/bundle/chunks/sed-5LZHAGFR.js +0 -74
  309. package/dist/bundle/chunks/sed-IGVS3UIY.js +0 -79
  310. package/dist/bundle/chunks/sed-UZJSXYQZ.js +0 -47
  311. package/dist/bundle/chunks/sed-V7XSBPTD.js +0 -75
  312. package/dist/bundle/chunks/sort-LHMQWYH2.js +0 -14
  313. package/dist/bundle/chunks/tail-BLGGG2VX.js +0 -1
  314. package/dist/bundle/chunks/tee-VCNOG5VI.js +0 -2
  315. package/dist/bundle/chunks/timeout-THAT7IOO.js +0 -11
  316. package/dist/bundle/chunks/true-OD7ZXH3O.js +0 -1
  317. package/dist/bundle/chunks/uniq-IIOQKNTS.js +0 -4
  318. package/dist/bundle/chunks/wc-OXLYBRUE.js +0 -5
  319. package/dist/bundle/chunks/which-ONWH3TNF.js +0 -2
  320. package/dist/bundle/chunks/xargs-752VENJT.js +0 -3
  321. package/dist/bundle/chunks/xargs-E5JPQL24.js +0 -3
  322. package/dist/commands/awk/executor.d.ts +0 -3
  323. package/dist/commands/awk/expressions.d.ts +0 -3
  324. package/dist/commands/awk/functions.d.ts +0 -12
  325. package/dist/commands/awk/interpreter2.d.ts +0 -90
  326. package/dist/commands/awk/parser.d.ts +0 -3
  327. package/dist/commands/awk/types.d.ts +0 -44
  328. package/dist/fs-interface.d.ts +0 -186
  329. package/dist/fs.d.ts +0 -39
  330. package/dist/overlay-fs/OverlayFs.d.ts +0 -87
  331. package/dist/overlay-fs/index.d.ts +0 -1
@@ -1,14 +0,0 @@
1
- import{b as F}from"./chunk-3YNHMZ5M.js";import{a as v,b as y,c as C}from"./chunk-74CEPOFO.js";function k(u,t,r){let f=r!==null?r:/\s+/,a=u.split(f),s=t.startField-1;if(s>=a.length)return"";if(t.endField===void 0){let i=a[s]||"";return t.startChar!==void 0&&(i=i.slice(t.startChar-1)),t.ignoreLeading&&(i=i.trimStart()),i}let l=Math.min(t.endField-1,a.length-1),c="";for(let i=s;i<=l&&i<a.length;i++){let o=a[i]||"";if(i===s&&t.startChar!==void 0&&(o=o.slice(t.startChar-1)),i===l&&t.endChar!==void 0){let e=i===s&&t.startChar!==void 0?t.endChar-t.startChar+1:t.endChar;o=o.slice(0,e)}i>s&&(c+=r||" "),c+=o}return t.ignoreLeading&&(c=c.trimStart()),c}function S(u,t,r,f){if(r){let l=parseFloat(u)||0,c=parseFloat(t)||0;return l-c}let a=u,s=t;return f&&(a=a.toLowerCase(),s=s.toLowerCase()),a.localeCompare(s)}function b(u){let{keys:t,fieldDelimiter:r,numeric:f,ignoreCase:a,reverse:s}=u;return(l,c)=>{if(t.length===0){let o=l,e=c;a&&(o=o.toLowerCase(),e=e.toLowerCase());let n;if(f){let d=parseFloat(o)||0,h=parseFloat(e)||0;if(n=d-h,n===0){let p=o.localeCompare(e);return s?-p:p}}else n=o.localeCompare(e);return s?-n:n}for(let o of t){let e=k(l,o,r),n=k(c,o,r),d=o.numeric??f,h=o.ignoreCase??a,p=o.reverse??s,g=S(e,n,d,h);if(g!==0)return p?-g:g}let i=l.localeCompare(c);return s?-i:i}}function w(u,t){if(t.keys.length===0){if(t.ignoreCase){let a=new Set;return u.filter(s=>{let l=s.toLowerCase();return a.has(l)?!1:(a.add(l),!0)})}return[...new Set(u)]}let r=t.keys[0],f=new Set;return u.filter(a=>{let s=k(a,r,t.fieldDelimiter);return(r.ignoreCase??t.ignoreCase)&&(s=s.toLowerCase()),f.has(s)?!1:(f.add(s),!0)})}function m(u){let t={startField:1},r="",f=u,a=f.match(/([nrfb]+)$/i);a&&(r=a[1].toLowerCase(),f=f.slice(0,-r.length)),r.includes("n")&&(t.numeric=!0),r.includes("r")&&(t.reverse=!0),r.includes("f")&&(t.ignoreCase=!0),r.includes("b")&&(t.ignoreLeading=!0);let s=f.split(",");if(s.length===0||s[0]==="")return null;let l=s[0].split("."),c=parseInt(l[0],10);if(Number.isNaN(c)||c<1)return null;if(t.startField=c,l.length>1&&l[1]){let i=parseInt(l[1],10);!Number.isNaN(i)&&i>=1&&(t.startChar=i)}if(s.length>1&&s[1]){let i=s[1],o=i.match(/([nrfb]+)$/i);if(o){let n=o[1].toLowerCase();n.includes("n")&&(t.numeric=!0),n.includes("r")&&(t.reverse=!0),n.includes("f")&&(t.ignoreCase=!0),n.includes("b")&&(t.ignoreLeading=!0),i=i.slice(0,-n.length)}let e=i.split(".");if(e[0]){let n=parseInt(e[0],10);if(!Number.isNaN(n)&&n>=1&&(t.endField=n),e.length>1&&e[1]){let d=parseInt(e[1],10);!Number.isNaN(d)&&d>=1&&(t.endChar=d)}}}return t}var N={name:"sort",summary:"sort lines of text files",usage:"sort [OPTION]... [FILE]...",options:["-f, --ignore-case fold lower case to upper case characters","-n, --numeric-sort compare according to string numerical value","-r, --reverse reverse the result of comparisons","-u, --unique output only unique lines","-k, --key=KEYDEF sort via a key; KEYDEF gives location and type","-t, --field-separator=SEP use SEP as field separator"," --help display this help and exit"],description:`KEYDEF is F[.C][OPTS][,F[.C][OPTS]]
2
- F is a field number (1-indexed)
3
- C is a character position within the field (1-indexed)
4
- OPTS can be: n (numeric), r (reverse), f (fold case), b (ignore blanks)
5
-
6
- Examples:
7
- -k1 sort by first field
8
- -k2,2 sort by second field only
9
- -k1.3 sort by first field starting at 3rd character
10
- -k1,2n sort by fields 1-2 numerically
11
- -k2 -k1 sort by field 2, then by field 1`},D={name:"sort",async execute(u,t){if(y(u))return v(N);let r={reverse:!1,numeric:!1,unique:!1,ignoreCase:!1,keys:[],fieldDelimiter:null},f=[];for(let o=0;o<u.length;o++){let e=u[o];if(e==="-r"||e==="--reverse")r.reverse=!0;else if(e==="-n"||e==="--numeric-sort")r.numeric=!0;else if(e==="-u"||e==="--unique")r.unique=!0;else if(e==="-f"||e==="--ignore-case")r.ignoreCase=!0;else if(e==="-t"||e==="--field-separator")r.fieldDelimiter=u[++o]||null;else if(e.startsWith("-t"))r.fieldDelimiter=e.slice(2)||null;else if(e.startsWith("--field-separator="))r.fieldDelimiter=e.slice(18)||null;else if(e==="-k"||e==="--key"){let n=u[++o];if(n){let d=m(n);d&&r.keys.push(d)}}else if(e.startsWith("-k")){let n=m(e.slice(2));n&&r.keys.push(n)}else if(e.startsWith("--key=")){let n=m(e.slice(6));n&&r.keys.push(n)}else{if(e.startsWith("--"))return C("sort",e);if(e.startsWith("-")&&!e.startsWith("--")){let n=!1;for(let d of e.slice(1))if(d==="r")r.reverse=!0;else if(d==="n")r.numeric=!0;else if(d==="u")r.unique=!0;else if(d==="f")r.ignoreCase=!0;else{n=!0;break}if(n)return C("sort",e)}else f.push(e)}}let a=await F(t,f,{cmdName:"sort"});if(!a.ok)return a.error;let l=a.content.split(`
12
- `);l.length>0&&l[l.length-1]===""&&l.pop();let c=b(r);return l.sort(c),r.unique&&(l=w(l,r)),{stdout:l.length>0?`${l.join(`
13
- `)}
14
- `:"",stderr:"",exitCode:0}}};export{D as sortCommand};
@@ -1 +0,0 @@
1
- import{a,b as n,d as l}from"./chunk-W2EKKAIL.js";import{a as i,b as s}from"./chunk-74CEPOFO.js";var h={name:"tail",summary:"output the last part of files",usage:"tail [OPTION]... [FILE]...",options:["-c, --bytes=NUM print the last NUM bytes","-n, --lines=NUM print the last NUM lines (default 10)","-n +NUM print starting from line NUM","-q, --quiet never print headers giving file names","-v, --verbose always print headers giving file names"," --help display this help and exit"]},c={name:"tail",async execute(t,r){if(s(t))return i(h);let e=a(t,"tail");if(!e.ok)return e.error;let{lines:o,bytes:p,fromLine:m}=e.options;return n(r,e.options,"tail",f=>l(f,o,p,m??!1))}};export{c as tailCommand};
@@ -1,2 +0,0 @@
1
- import{a as d}from"./chunk-ZVV5VXYZ.js";import{a as p,b as l}from"./chunk-74CEPOFO.js";var h={name:"tee",summary:"read from stdin and write to stdout and files",usage:"tee [OPTION]... [FILE]...",options:["-a, --append append to the given FILEs, do not overwrite"," --help display this help and exit"]},m={append:{short:"a",long:"append",type:"boolean"}},g={name:"tee",async execute(r,e){if(l(r))return p(h);let t=d("tee",r,m);if(!t.ok)return t.error;let{append:f}=t.result.flags,c=t.result.positional,o=e.stdin,n="",a=0;for(let i of c)try{let s=e.fs.resolvePath(e.cwd,i);f?await e.fs.appendFile(s,o):await e.fs.writeFile(s,o)}catch{n+=`tee: ${i}: No such file or directory
2
- `,a=1}return{stdout:o,stderr:n,exitCode:a}}};export{g as teeCommand};
@@ -1,11 +0,0 @@
1
- import{a as f,b as c,c as u}from"./chunk-74CEPOFO.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
-
3
- DURATION is a number with optional suffix:
4
- s - seconds (default)
5
- m - minutes
6
- h - hours
7
- d - days`,options:["-k, --kill-after=DURATION send KILL signal after DURATION if still running","-s, --signal=SIGNAL specify signal to send (default: TERM)"," --preserve-status exit with same status as COMMAND, even on timeout"," --foreground run command in foreground"," --help display this help and exit"]};function O(n){let r=n.match(/^(\d+\.?\d*)(s|m|h|d)?$/);if(!r)return null;let i=parseFloat(r[1]);switch(r[2]||"s"){case"s":return i*1e3;case"m":return i*60*1e3;case"h":return i*60*60*1e3;case"d":return i*24*60*60*1e3;default:return null}}var N={name:"timeout",async execute(n,r){if(c(n))return f(x);let i=!1,s=0;for(let t=0;t<n.length;t++){let e=n[t];if(e==="--preserve-status")i=!0,s=t+1;else if(e==="--foreground")s=t+1;else if(e==="-k"||e==="--kill-after")t++,s=t+1;else if(e.startsWith("--kill-after="))s=t+1;else if(e==="-s"||e==="--signal")t++,s=t+1;else if(e.startsWith("--signal="))s=t+1;else{if(e.startsWith("--")&&e!=="--")return u("timeout",e);if(e.startsWith("-")&&e.length>1&&e!=="--")if(e.startsWith("-k"))s=t+1;else if(e.startsWith("-s"))s=t+1;else return u("timeout",e);else{s=t;break}}}let o=n.slice(s);if(o.length===0)return{stdout:"",stderr:`timeout: missing operand
8
- `,exitCode:1};let a=o[0],l=O(a);if(l===null)return{stdout:"",stderr:`timeout: invalid time interval '${a}'
9
- `,exitCode:1};let m=o.slice(1);if(m.length===0)return{stdout:"",stderr:`timeout: missing operand
10
- `,exitCode:1};if(!r.exec)return{stdout:"",stderr:`timeout: exec not available
11
- `,exitCode:1};let h=m.map(t=>t.includes(" ")||t.includes(" ")?`'${t.replace(/'/g,"'\\''")}'`:t).join(" "),p=new Promise(t=>{setTimeout(()=>t({timedOut:!0}),l)}),g=r.exec(h).then(t=>({timedOut:!1,result:t})),d=await Promise.race([p,g]);return d.timedOut?{stdout:"",stderr:"",exitCode:124}:d.result}};export{N as timeoutCommand};
@@ -1 +0,0 @@
1
- var e={name:"true",async execute(){return{stdout:"",stderr:"",exitCode:0}}},t={name:"false",async execute(){return{stdout:"",stderr:"",exitCode:1}}};export{t as falseCommand,e as trueCommand};
@@ -1,4 +0,0 @@
1
- import{b as g}from"./chunk-3YNHMZ5M.js";import{a as f}from"./chunk-ZVV5VXYZ.js";import{a as p,b as d}from"./chunk-74CEPOFO.js";var b={name:"uniq",summary:"report or omit repeated lines",usage:"uniq [OPTION]... [INPUT [OUTPUT]]",options:["-c, --count prefix lines by the number of occurrences","-d, --repeated only print duplicate lines","-i, --ignore-case ignore case when comparing","-u, --unique only print unique lines"," --help display this help and exit"]},w={count:{short:"c",long:"count",type:"boolean"},duplicatesOnly:{short:"d",long:"repeated",type:"boolean"},uniqueOnly:{short:"u",long:"unique",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},P={name:"uniq",async execute(a,m){if(d(a))return p(b);let o=f("uniq",a,w);if(!o.ok)return o.error;let{count:h,duplicatesOnly:y,uniqueOnly:q,ignoreCase:C}=o.result.flags,O=o.result.positional,u=await g(m,O,{cmdName:"uniq"});if(!u.ok)return u.error;let n=u.content.split(`
2
- `);if(n.length>0&&n[n.length-1]===""&&n.pop(),n.length===0)return{stdout:"",stderr:"",exitCode:0};let t=[],r=n[0],i=1,x=(e,s)=>C?e.toLowerCase()===s.toLowerCase():e===s;for(let e=1;e<n.length;e++)x(n[e],r)?i++:(t.push({line:r,count:i}),r=n[e],i=1);t.push({line:r,count:i});let l=t;y?l=t.filter(e=>e.count>1):q&&(l=t.filter(e=>e.count===1));let c="";for(let{line:e,count:s}of l)h?c+=`${String(s).padStart(4)} ${e}
3
- `:c+=`${e}
4
- `;return{stdout:c,stderr:"",exitCode:0}}};export{P as uniqCommand};
@@ -1,5 +0,0 @@
1
- import{a as y}from"./chunk-3YNHMZ5M.js";import{a as g}from"./chunk-ZVV5VXYZ.js";import{a as w,b as m}from"./chunk-74CEPOFO.js";var C={name:"wc",summary:"print newline, word, and byte counts for each file",usage:"wc [OPTION]... [FILE]...",options:["-c, --bytes print the byte counts","-m, --chars print the character counts","-l, --lines print the newline counts","-w, --words print the word counts"," --help display this help and exit"]},S={lines:{short:"l",long:"lines",type:"boolean"},words:{short:"w",long:"words",type:"boolean"},bytes:{short:"c",long:"bytes",type:"boolean"},chars:{short:"m",long:"chars",type:"boolean"}},L={name:"wc",async execute(n,l){if(m(n))return w(C);let r=g("wc",n,S);if(!r.ok)return r.error;let{lines:s,words:t}=r.result.flags,e=r.result.flags.bytes||r.result.flags.chars,o=r.result.positional;!s&&!t&&!e&&(s=t=e=!0);let i=await y(l,o,{cmdName:"wc",stopOnError:!1});if(o.length===0){let f=b(i.files[0].content);return{stdout:`${h(f,s,t,e,"")}
2
- `,stderr:"",exitCode:0}}let c="",u=0,d=0,p=0;for(let{filename:f,content:x}of i.files){let a=b(x);u+=a.lines,d+=a.words,p+=a.chars,c+=`${h(a,s,t,e,f)}
3
- `}return o.length>1&&(c+=`${h({lines:u,words:d,chars:p},s,t,e,"total")}
4
- `),{stdout:c,stderr:i.stderr,exitCode:i.exitCode}}};function b(n){let l=n.length,r=0,s=0,t=!1;for(let e=0;e<l;e++){let o=n[e];o===`
5
- `?(r++,t&&(s++,t=!1)):o===" "||o===" "||o==="\r"?t&&(s++,t=!1):t=!0}return t&&s++,{lines:r,words:s,chars:l}}function h(n,l,r,s,t){let e=[];l&&e.push(String(n.lines)),r&&e.push(String(n.words)),s&&e.push(String(n.chars));let o=e.join(" ");return t&&(o+=` ${t}`),o}export{L as wcCommand};
@@ -1,2 +0,0 @@
1
- import{a as u}from"./chunk-ZVV5VXYZ.js";import{a as f,b as h}from"./chunk-74CEPOFO.js";var w={name:"which",summary:"locate a command",usage:"which [-as] program ...",options:["-a List all instances of executables found","-s No output, just return 0 if found, 1 if not","--help display this help and exit"]},g={showAll:{short:"a",type:"boolean"},silent:{short:"s",type:"boolean"}},A={name:"which",async execute(s,e){if(h(s))return f(w);let t=u("which",s,g);if(!t.ok)return t.error;let c=t.result.flags.showAll,p=t.result.flags.silent,o=t.result.positional;if(o.length===0)return{stdout:"",stderr:"",exitCode:1};let d=(e.env.PATH||"/bin:/usr/bin").split(":"),n="",r=!0;for(let m of o){let a=!1;for(let i of d){if(!i)continue;let l=`${i}/${m}`;if(await e.fs.exists(l)&&(a=!0,p||(n+=`${l}
2
- `),!c))break}a||(r=!1)}return{stdout:n,stderr:"",exitCode:r?0:1}}};export{A as whichCommand};
@@ -1,3 +0,0 @@
1
- import{a as b,b as A,c as y}from"./chunk-74CEPOFO.js";var N={name:"xargs",summary:"build and execute command lines from standard input",usage:"xargs [OPTION]... [COMMAND [INITIAL-ARGS]]",options:["-I REPLACE replace occurrences of REPLACE with input","-n NUM use at most NUM arguments per command line","-P NUM run at most NUM processes at a time","-0, --null items are separated by null, not whitespace","-t, --verbose print commands before executing","-r, --no-run-if-empty do not run command if input is empty"," --help display this help and exit"]},E={name:"xargs",async execute(n,u){if(A(n))return b(N);let h=null,c=null,l=null,x=!1,g=!1,C=!1,r=0;for(let t=0;t<n.length;t++){let e=n[t];if(e==="-I"&&t+1<n.length)h=n[++t],r=t+1;else if(e==="-n"&&t+1<n.length)c=parseInt(n[++t],10),r=t+1;else if(e==="-P"&&t+1<n.length)l=parseInt(n[++t],10),r=t+1;else if(e==="-0"||e==="--null")x=!0,r=t+1;else if(e==="-t"||e==="--verbose")g=!0,r=t+1;else if(e==="-r"||e==="--no-run-if-empty")C=!0,r=t+1;else{if(e.startsWith("--"))return y("xargs",e);if(e.startsWith("-")&&e.length>1){for(let f of e.slice(1))if(!"0trnIP".includes(f))return y("xargs",`-${f}`);e.includes("0")&&(x=!0),e.includes("t")&&(g=!0),e.includes("r")&&(C=!0),r=t+1}else if(!e.startsWith("-")){r=t;break}}}let o=n.slice(r);o.length===0&&o.push("echo");let P=x?"\0":/\s+/,i=u.stdin.split(P).map(t=>t.trim()).filter(t=>t.length>0);if(i.length===0)return C?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0};let d="",a="",m=0,w=async t=>{let e=t.join(" ");return g&&(a+=`${e}
2
- `),u.exec?u.exec(e,{cwd:u.cwd}):{stdout:`${e}
3
- `,stderr:"",exitCode:0}},I=async t=>{if(l!==null&&l>1)for(let e=0;e<t.length;e+=l){let s=t.slice(e,e+l),f=await Promise.all(s.map(w));for(let p of f)d+=p.stdout,a+=p.stderr,p.exitCode!==0&&(m=p.exitCode)}else for(let e of t){let s=await w(e);d+=s.stdout,a+=s.stderr,s.exitCode!==0&&(m=s.exitCode)}};if(h!==null){let t=i.map(e=>o.map(s=>s.replaceAll(h,e)));await I(t)}else if(c!==null){let t=[];for(let e=0;e<i.length;e+=c){let s=i.slice(e,e+c);t.push([...o,...s])}await I(t)}else{let t=[...o,...i],e=await w(t);d+=e.stdout,a+=e.stderr,m=e.exitCode}return{stdout:d,stderr:a,exitCode:m}}};export{E as xargsCommand};
@@ -1,3 +0,0 @@
1
- import{a as w,b as A,c as I}from"./chunk-74CEPOFO.js";var N={name:"xargs",summary:"build and execute command lines from standard input",usage:"xargs [OPTION]... [COMMAND [INITIAL-ARGS]]",options:["-I REPLACE replace occurrences of REPLACE with input","-n NUM use at most NUM arguments per command line","-P NUM run at most NUM processes at a time","-0, --null items are separated by null, not whitespace","-t, --verbose print commands before executing","-r, --no-run-if-empty do not run command if input is empty"," --help display this help and exit"]},E={name:"xargs",async execute(n,p){if(A(n))return w(N);let h=null,u=null,l=null,x=!1,g=!1,C=!1,r=0;for(let t=0;t<n.length;t++){let e=n[t];if(e==="-I"&&t+1<n.length)h=n[++t],r=t+1;else if(e==="-n"&&t+1<n.length)u=parseInt(n[++t],10),r=t+1;else if(e==="-P"&&t+1<n.length)l=parseInt(n[++t],10),r=t+1;else if(e==="-0"||e==="--null")x=!0,r=t+1;else if(e==="-t"||e==="--verbose")g=!0,r=t+1;else if(e==="-r"||e==="--no-run-if-empty")C=!0,r=t+1;else{if(e.startsWith("--"))return I("xargs",e);if(e.startsWith("-")&&e.length>1){for(let m of e.slice(1))if(!"0trnIP".includes(m))return I("xargs",`-${m}`);e.includes("0")&&(x=!0),e.includes("t")&&(g=!0),e.includes("r")&&(C=!0),r=t+1}else if(!e.startsWith("-")){r=t;break}}}let o=n.slice(r);o.length===0&&o.push("echo");let P=x?"\0":/\s+/,i=p.stdin.split(P).map(t=>t.trim()).filter(t=>t.length>0);if(i.length===0)return C?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0};let c="",a="",d=0,y=async t=>{let e=t.join(" ");return g&&(a+=`${e}
2
- `),p.exec?p.exec(e):{stdout:`${e}
3
- `,stderr:"",exitCode:0}},b=async t=>{if(l!==null&&l>1)for(let e=0;e<t.length;e+=l){let s=t.slice(e,e+l),m=await Promise.all(s.map(y));for(let f of m)c+=f.stdout,a+=f.stderr,f.exitCode!==0&&(d=f.exitCode)}else for(let e of t){let s=await y(e);c+=s.stdout,a+=s.stderr,s.exitCode!==0&&(d=s.exitCode)}};if(h!==null){let t=i.map(e=>o.map(s=>s.replaceAll(h,e)));await b(t)}else if(u!==null){let t=[];for(let e=0;e<i.length;e+=u){let s=i.slice(e,e+u);t.push([...o,...s])}await b(t)}else{let t=[...o,...i],e=await y(t);c+=e.stdout,a+=e.stderr,d=e.exitCode}return{stdout:c,stderr:a,exitCode:d}}};export{E as xargsCommand};
@@ -1,3 +0,0 @@
1
- import type { AwkContext } from "./types.js";
2
- export declare function executeAwkAction(action: string, ctx: AwkContext): string;
3
- export declare function matchesPattern(pattern: string | null, ctx: AwkContext): boolean;
@@ -1,3 +0,0 @@
1
- import type { AwkContext } from "./types.js";
2
- export declare function evaluateExpression(expr: string, ctx: AwkContext): string | number;
3
- export declare function evaluateCondition(condition: string, ctx: AwkContext): boolean;
@@ -1,12 +0,0 @@
1
- import type { AwkContext } from "./types.js";
2
- export declare function awkMatch(args: string[], ctx: AwkContext, evaluateExpr: (expr: string, ctx: AwkContext) => string | number): number;
3
- export declare function awkGensub(args: string[], ctx: AwkContext, evaluateExpr: (expr: string, ctx: AwkContext) => string | number): string;
4
- export declare function awkLength(args: string[], ctx: AwkContext, evaluateExpr: (expr: string, ctx: AwkContext) => string | number): number;
5
- export declare function awkSubstr(args: string[], ctx: AwkContext, evaluateExpr: (expr: string, ctx: AwkContext) => string | number): string;
6
- export declare function awkIndex(args: string[], ctx: AwkContext, evaluateExpr: (expr: string, ctx: AwkContext) => string | number): number;
7
- export declare function awkSplit(args: string[], ctx: AwkContext, evaluateExpr: (expr: string, ctx: AwkContext) => string | number): number;
8
- export declare function awkSub(args: string[], ctx: AwkContext, evaluateExpr: (expr: string, ctx: AwkContext) => string | number): number;
9
- export declare function awkGsub(args: string[], ctx: AwkContext, evaluateExpr: (expr: string, ctx: AwkContext) => string | number): number;
10
- export declare function awkTolower(args: string[], ctx: AwkContext, evaluateExpr: (expr: string, ctx: AwkContext) => string | number): string;
11
- export declare function awkToupper(args: string[], ctx: AwkContext, evaluateExpr: (expr: string, ctx: AwkContext) => string | number): string;
12
- export declare function awkSprintf(args: string[], ctx: AwkContext, evaluateExpr: (expr: string, ctx: AwkContext) => string | number): string;
@@ -1,90 +0,0 @@
1
- /**
2
- * AWK Interpreter
3
- *
4
- * Tree-walking interpreter that executes an AWK AST.
5
- */
6
- import type { AwkExpr, AwkFunctionDef, AwkProgram } from "./ast.js";
7
- export type AwkValue = string | number;
8
- export interface AwkRuntimeContext {
9
- FS: string;
10
- OFS: string;
11
- ORS: string;
12
- NR: number;
13
- NF: number;
14
- FNR: number;
15
- FILENAME: string;
16
- RSTART: number;
17
- RLENGTH: number;
18
- SUBSEP: string;
19
- fields: string[];
20
- line: string;
21
- vars: Record<string, AwkValue>;
22
- arrays: Record<string, Record<string, AwkValue>>;
23
- functions: Map<string, AwkFunctionDef>;
24
- lines?: string[];
25
- lineIndex?: number;
26
- fieldSep: RegExp;
27
- maxIterations: number;
28
- maxRecursionDepth: number;
29
- currentRecursionDepth: number;
30
- exitCode: number;
31
- shouldExit: boolean;
32
- shouldNext: boolean;
33
- loopBreak: boolean;
34
- loopContinue: boolean;
35
- returnValue?: AwkValue;
36
- hasReturn: boolean;
37
- output: string;
38
- random?: () => number;
39
- }
40
- export declare function createRuntimeContext(fieldSep?: RegExp, maxIterations?: number): AwkRuntimeContext;
41
- export declare class AwkInterpreter {
42
- private ctx;
43
- private program;
44
- private rangeStates;
45
- constructor(ctx: AwkRuntimeContext);
46
- execute(program: AwkProgram): string;
47
- executeBegin(): void;
48
- executeLine(line: string): void;
49
- executeEnd(): void;
50
- getOutput(): string;
51
- getExitCode(): number;
52
- private splitFields;
53
- private matchesRule;
54
- private matchPattern;
55
- private matchRegex;
56
- private executeBlock;
57
- private executeStmt;
58
- private executePrint;
59
- private executePrintf;
60
- private executeIf;
61
- private executeWhile;
62
- private executeDoWhile;
63
- private executeFor;
64
- private executeForIn;
65
- private executeDelete;
66
- evalExpr(expr: AwkExpr): AwkValue;
67
- private getField;
68
- private setField;
69
- private getVariable;
70
- private setVariable;
71
- private getArrayElement;
72
- private setArrayElement;
73
- private evalBinaryOp;
74
- private isComparisonOp;
75
- private evalComparison;
76
- private looksLikeNumber;
77
- private evalUnaryOp;
78
- private evalFunctionCall;
79
- private callUserFunction;
80
- private evalAssignment;
81
- private evalPreIncrement;
82
- private evalPreDecrement;
83
- private evalPostIncrement;
84
- private evalPostDecrement;
85
- private evalInExpr;
86
- private evalGetline;
87
- isTruthy(val: AwkValue): boolean;
88
- toNumber(val: AwkValue): number;
89
- toString(val: AwkValue): string;
90
- }
@@ -1,3 +0,0 @@
1
- import type { ParsedProgram } from "./types.js";
2
- export declare function parseAwkProgram(program: string): ParsedProgram;
3
- export declare function findMatchingBrace(str: string, start: number): number;
@@ -1,44 +0,0 @@
1
- export interface AwkContext {
2
- FS: string;
3
- OFS: string;
4
- NR: number;
5
- NF: number;
6
- FNR: number;
7
- FILENAME: string;
8
- RSTART: number;
9
- RLENGTH: number;
10
- fields: string[];
11
- line: string;
12
- vars: Record<string, string | number>;
13
- arrays: Record<string, Record<string, string | number>>;
14
- functions: Record<string, AwkFunction>;
15
- random?: () => number;
16
- lines?: string[];
17
- lineIndex?: number;
18
- fieldSep?: RegExp;
19
- maxIterations?: number;
20
- exitCode?: number;
21
- shouldExit?: boolean;
22
- shouldNext?: boolean;
23
- loopBreak?: boolean;
24
- loopContinue?: boolean;
25
- }
26
- export interface AwkFunction {
27
- params: string[];
28
- body: string;
29
- }
30
- export interface PatternRange {
31
- start: string;
32
- end: string;
33
- }
34
- export interface AwkRule {
35
- pattern: string | null;
36
- range?: PatternRange;
37
- action: string;
38
- }
39
- export interface ParsedProgram {
40
- begin: string | null;
41
- main: AwkRule[];
42
- end: string | null;
43
- functions: Record<string, AwkFunction>;
44
- }
@@ -1,186 +0,0 @@
1
- /**
2
- * Supported buffer encodings
3
- */
4
- export type BufferEncoding = "utf8" | "utf-8" | "ascii" | "binary" | "base64" | "hex" | "latin1";
5
- /**
6
- * File content can be string or Buffer
7
- */
8
- export type FileContent = string | Uint8Array;
9
- /**
10
- * Options for reading files
11
- */
12
- export interface ReadFileOptions {
13
- encoding?: BufferEncoding | null;
14
- }
15
- /**
16
- * Options for writing files
17
- */
18
- export interface WriteFileOptions {
19
- encoding?: BufferEncoding;
20
- }
21
- /**
22
- * File system entry types
23
- */
24
- export interface FileEntry {
25
- type: "file";
26
- content: string | Uint8Array;
27
- mode: number;
28
- mtime: Date;
29
- }
30
- export interface DirectoryEntry {
31
- type: "directory";
32
- mode: number;
33
- mtime: Date;
34
- }
35
- export interface SymlinkEntry {
36
- type: "symlink";
37
- target: string;
38
- mode: number;
39
- mtime: Date;
40
- }
41
- export type FsEntry = FileEntry | DirectoryEntry | SymlinkEntry;
42
- /**
43
- * Stat result from the filesystem
44
- */
45
- export interface FsStat {
46
- isFile: boolean;
47
- isDirectory: boolean;
48
- isSymbolicLink: boolean;
49
- mode: number;
50
- size: number;
51
- mtime: Date;
52
- }
53
- /**
54
- * Options for mkdir operation
55
- */
56
- export interface MkdirOptions {
57
- recursive?: boolean;
58
- }
59
- /**
60
- * Options for rm operation
61
- */
62
- export interface RmOptions {
63
- recursive?: boolean;
64
- force?: boolean;
65
- }
66
- /**
67
- * Options for cp operation
68
- */
69
- export interface CpOptions {
70
- recursive?: boolean;
71
- }
72
- /**
73
- * Abstract filesystem interface that can be implemented by different backends.
74
- * This allows BashEnv to work with:
75
- * - VirtualFs (in-memory, default)
76
- * - Real filesystem (via node:fs)
77
- * - Custom implementations (e.g., remote storage, browser IndexedDB)
78
- */
79
- export interface IFileSystem {
80
- /**
81
- * Read the contents of a file as a string (default: utf8)
82
- * @throws Error if file doesn't exist or is a directory
83
- */
84
- readFile(path: string, options?: ReadFileOptions | BufferEncoding): Promise<string>;
85
- /**
86
- * Read the contents of a file as a Uint8Array (binary)
87
- * @throws Error if file doesn't exist or is a directory
88
- */
89
- readFileBuffer(path: string): Promise<Uint8Array>;
90
- /**
91
- * Write content to a file, creating it if it doesn't exist
92
- */
93
- writeFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
94
- /**
95
- * Append content to a file, creating it if it doesn't exist
96
- */
97
- appendFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
98
- /**
99
- * Check if a path exists
100
- */
101
- exists(path: string): Promise<boolean>;
102
- /**
103
- * Get file/directory information
104
- * @throws Error if path doesn't exist
105
- */
106
- stat(path: string): Promise<FsStat>;
107
- /**
108
- * Create a directory
109
- * @throws Error if parent doesn't exist (unless recursive) or path exists
110
- */
111
- mkdir(path: string, options?: MkdirOptions): Promise<void>;
112
- /**
113
- * Read directory contents
114
- * @returns Array of entry names (not full paths)
115
- * @throws Error if path doesn't exist or is not a directory
116
- */
117
- readdir(path: string): Promise<string[]>;
118
- /**
119
- * Remove a file or directory
120
- * @throws Error if path doesn't exist (unless force) or directory not empty (unless recursive)
121
- */
122
- rm(path: string, options?: RmOptions): Promise<void>;
123
- /**
124
- * Copy a file or directory
125
- * @throws Error if source doesn't exist or trying to copy directory without recursive
126
- */
127
- cp(src: string, dest: string, options?: CpOptions): Promise<void>;
128
- /**
129
- * Move/rename a file or directory
130
- */
131
- mv(src: string, dest: string): Promise<void>;
132
- /**
133
- * Resolve a relative path against a base path
134
- */
135
- resolvePath(base: string, path: string): string;
136
- /**
137
- * Get all paths in the filesystem (useful for glob matching)
138
- * Optional - implementations may return empty array if not supported
139
- */
140
- getAllPaths(): string[];
141
- /**
142
- * Change file/directory permissions
143
- * @throws Error if path doesn't exist
144
- */
145
- chmod(path: string, mode: number): Promise<void>;
146
- /**
147
- * Create a symbolic link
148
- * @param target - The path the symlink should point to
149
- * @param linkPath - The path where the symlink will be created
150
- * @throws Error if linkPath already exists
151
- */
152
- symlink(target: string, linkPath: string): Promise<void>;
153
- /**
154
- * Create a hard link
155
- * @param existingPath - The existing file to link to
156
- * @param newPath - The path where the new link will be created
157
- * @throws Error if existingPath doesn't exist or newPath already exists
158
- */
159
- link(existingPath: string, newPath: string): Promise<void>;
160
- /**
161
- * Read the target of a symbolic link
162
- * @throws Error if path doesn't exist or is not a symlink
163
- */
164
- readlink(path: string): Promise<string>;
165
- /**
166
- * Get file/directory information without following symlinks
167
- * @throws Error if path doesn't exist
168
- */
169
- lstat(path: string): Promise<FsStat>;
170
- }
171
- /**
172
- * Extended file initialization options with optional metadata
173
- */
174
- export interface FileInit {
175
- content: FileContent;
176
- mode?: number;
177
- mtime?: Date;
178
- }
179
- /**
180
- * Initial files can be simple content or extended options with metadata
181
- */
182
- export type InitialFiles = Record<string, FileContent | FileInit>;
183
- /**
184
- * Factory function type for creating filesystem instances
185
- */
186
- export type FileSystemFactory = (initialFiles?: InitialFiles) => IFileSystem;
package/dist/fs.d.ts DELETED
@@ -1,39 +0,0 @@
1
- import type { BufferEncoding, CpOptions, DirectoryEntry, FileContent, FileEntry, FsEntry, FsStat, IFileSystem, InitialFiles, MkdirOptions, ReadFileOptions, RmOptions, SymlinkEntry, WriteFileOptions } from "./fs-interface.js";
2
- export type { BufferEncoding, FileContent, FileEntry, DirectoryEntry, SymlinkEntry, FsEntry, FsStat, IFileSystem, ReadFileOptions, WriteFileOptions, };
3
- export interface FsData {
4
- [path: string]: FsEntry;
5
- }
6
- export declare class VirtualFs implements IFileSystem {
7
- private data;
8
- constructor(initialFiles?: InitialFiles);
9
- private normalizePath;
10
- private dirname;
11
- private ensureParentDirs;
12
- writeFileSync(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding, metadata?: {
13
- mode?: number;
14
- mtime?: Date;
15
- }): void;
16
- readFile(path: string, options?: ReadFileOptions | BufferEncoding): Promise<string>;
17
- readFileBuffer(path: string): Promise<Uint8Array>;
18
- writeFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
19
- appendFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
20
- exists(path: string): Promise<boolean>;
21
- stat(path: string): Promise<FsStat>;
22
- lstat(path: string): Promise<FsStat>;
23
- private resolveSymlink;
24
- mkdir(path: string, options?: MkdirOptions): Promise<void>;
25
- /**
26
- * Synchronous version of mkdir
27
- */
28
- mkdirSync(path: string, options?: MkdirOptions): void;
29
- readdir(path: string): Promise<string[]>;
30
- rm(path: string, options?: RmOptions): Promise<void>;
31
- cp(src: string, dest: string, options?: CpOptions): Promise<void>;
32
- mv(src: string, dest: string): Promise<void>;
33
- getAllPaths(): string[];
34
- resolvePath(base: string, path: string): string;
35
- chmod(path: string, mode: number): Promise<void>;
36
- symlink(target: string, linkPath: string): Promise<void>;
37
- link(existingPath: string, newPath: string): Promise<void>;
38
- readlink(path: string): Promise<string>;
39
- }
@@ -1,87 +0,0 @@
1
- /**
2
- * OverlayFs - Copy-on-write filesystem backed by a real directory
3
- *
4
- * Reads come from the real filesystem, writes go to an in-memory layer.
5
- * Changes don't persist to disk and can't escape the root directory.
6
- */
7
- import type { BufferEncoding, CpOptions, FsStat, IFileSystem, MkdirOptions, ReadFileOptions, RmOptions, WriteFileOptions } from "../fs-interface.js";
8
- type FileContent = string | Uint8Array;
9
- export interface OverlayFsOptions {
10
- /**
11
- * The root directory on the real filesystem.
12
- * All paths are relative to this root and cannot escape it.
13
- */
14
- root: string;
15
- /**
16
- * The virtual mount point where the root directory appears.
17
- * Defaults to "/home/user/project".
18
- */
19
- mountPoint?: string;
20
- /**
21
- * If true, all write operations will throw an error.
22
- * Useful for truly read-only access to the filesystem.
23
- * Defaults to false.
24
- */
25
- readOnly?: boolean;
26
- }
27
- export declare class OverlayFs implements IFileSystem {
28
- private readonly root;
29
- private readonly mountPoint;
30
- private readonly readOnly;
31
- private readonly memory;
32
- private readonly deleted;
33
- constructor(options: OverlayFsOptions);
34
- /**
35
- * Throws an error if the filesystem is in read-only mode.
36
- */
37
- private assertWritable;
38
- /**
39
- * Create directory entries for the mount point path
40
- */
41
- private createMountPointDirs;
42
- /**
43
- * Get the mount point for this overlay
44
- */
45
- getMountPoint(): string;
46
- /**
47
- * Normalize a virtual path (resolve . and .., ensure starts with /)
48
- */
49
- private normalizePath;
50
- /**
51
- * Check if a normalized virtual path is under the mount point.
52
- * Returns the relative path within the mount point, or null if not under it.
53
- */
54
- private getRelativeToMount;
55
- /**
56
- * Convert a virtual path to a real filesystem path.
57
- * Returns null if the path is not under the mount point or would escape the root.
58
- */
59
- private toRealPath;
60
- private dirname;
61
- private ensureParentDirs;
62
- /**
63
- * Check if a path exists in the overlay (memory + real fs - deleted)
64
- */
65
- private existsInOverlay;
66
- readFile(path: string, options?: ReadFileOptions | BufferEncoding): Promise<string>;
67
- readFileBuffer(path: string, seen?: Set<string>): Promise<Uint8Array>;
68
- writeFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
69
- appendFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
70
- exists(path: string): Promise<boolean>;
71
- stat(path: string, seen?: Set<string>): Promise<FsStat>;
72
- lstat(path: string): Promise<FsStat>;
73
- private resolveSymlink;
74
- mkdir(path: string, options?: MkdirOptions): Promise<void>;
75
- readdir(path: string): Promise<string[]>;
76
- rm(path: string, options?: RmOptions): Promise<void>;
77
- cp(src: string, dest: string, options?: CpOptions): Promise<void>;
78
- mv(src: string, dest: string): Promise<void>;
79
- resolvePath(base: string, path: string): string;
80
- getAllPaths(): string[];
81
- private scanRealFs;
82
- chmod(path: string, mode: number): Promise<void>;
83
- symlink(target: string, linkPath: string): Promise<void>;
84
- link(existingPath: string, newPath: string): Promise<void>;
85
- readlink(path: string): Promise<string>;
86
- }
87
- export {};
@@ -1 +0,0 @@
1
- export { OverlayFs, type OverlayFsOptions } from "./OverlayFs.js";