just-bash 3.4.1 → 3.6.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 (457) hide show
  1. package/CHANGELOG.md +248 -0
  2. package/README.md +22 -9
  3. package/dist/AGENTS.md +58 -2
  4. package/dist/Bash.d.ts +4 -2
  5. package/dist/abort-signals.d.ts +10 -0
  6. package/dist/bin/chunks/awk2-U22OR5B5.js +3 -0
  7. package/dist/bin/{shell/chunks/base64-FLJ4YPHB.js → chunks/base64-2KKH5BCT.js} +1 -1
  8. package/dist/bin/chunks/{cat-2J5MA5PY.js → cat-V45MVNBT.js} +1 -1
  9. package/dist/bin/{shell/chunks/chmod-ZM5WLMZI.js → chunks/chmod-A54R4UUQ.js} +1 -1
  10. package/dist/bin/chunks/chunk-2NJJXU4K.js +27 -0
  11. package/dist/bin/{shell/chunks/chunk-BJRT4VKD.js → chunks/chunk-3LKMI5IX.js} +1 -1
  12. package/dist/bin/{shell/chunks/chunk-4APSDE57.js → chunks/chunk-44SKMHU6.js} +1 -1
  13. package/dist/bin/chunks/{chunk-GRP7L2EL.js → chunk-6DAR25KN.js} +1 -1
  14. package/dist/bin/{shell/chunks/chunk-VGR3NA3H.js → chunks/chunk-723HNGID.js} +1 -1
  15. package/dist/bin/{shell/chunks/chunk-MRPJL3ZK.js → chunks/chunk-7X4QBCFW.js} +1 -1
  16. package/dist/bin/chunks/{chunk-42AMF6EE.js → chunk-ABM5WFEO.js} +1 -1
  17. package/dist/bin/chunks/{chunk-2HFDEZUY.js → chunk-AINNAQBQ.js} +1 -1
  18. package/dist/bin/{shell/chunks/chunk-BPWZ7ADB.js → chunks/chunk-AL7RVSF4.js} +1 -1
  19. package/dist/bin/{shell/chunks/chunk-MHAGHCSO.js → chunks/chunk-ARYCSNJJ.js} +7 -7
  20. package/dist/bin/{shell/chunks/chunk-2INNLNI5.js → chunks/chunk-BJF6B4YW.js} +1 -1
  21. package/dist/bin/{shell/chunks/chunk-BZWGVRFA.js → chunks/chunk-BOXG6XBN.js} +2 -2
  22. package/dist/bin/chunks/chunk-DA3RFNKK.js +17 -0
  23. package/dist/bin/chunks/chunk-DH7M46D3.js +20 -0
  24. package/dist/bin/chunks/{chunk-2ND6MMXN.js → chunk-DTGQQKI2.js} +1 -1
  25. package/dist/bin/chunks/{chunk-YOIFOOGX.js → chunk-ECZAFQ22.js} +1 -1
  26. package/dist/bin/chunks/{chunk-PPVF2N6C.js → chunk-EFS34UUR.js} +1 -1
  27. package/dist/bin/{shell/chunks/chunk-TW2IJRUF.js → chunks/chunk-ENEHPI32.js} +1 -1
  28. package/dist/bin/chunks/chunk-HFW2LXQV.js +13 -0
  29. package/dist/bin/{shell/chunks/chunk-UHNV55NF.js → chunks/chunk-HRKG3ZK2.js} +1 -1
  30. package/dist/bin/chunks/{chunk-74TZ7ZF7.js → chunk-IKUY74NG.js} +1 -1
  31. package/dist/bin/chunks/chunk-ILXMFIYG.js +7 -0
  32. package/dist/bin/chunks/chunk-IMVXTSPG.js +275 -0
  33. package/dist/bin/chunks/chunk-J5L5DJWL.js +3 -0
  34. package/dist/bin/{shell/chunks/chunk-MF3GVFLC.js → chunks/chunk-JKS7WXGR.js} +1 -1
  35. package/dist/bin/{shell/chunks/chunk-XBX7KFWK.js → chunks/chunk-LG6IN6SW.js} +11 -11
  36. package/dist/bin/chunks/chunk-LMFAALLO.js +21 -0
  37. package/dist/bin/{shell/chunks/chunk-DYIBFLS3.js → chunks/chunk-LOU52GPJ.js} +2 -2
  38. package/dist/bin/chunks/{chunk-FB44CW33.js → chunk-M5ZBECGM.js} +1 -1
  39. package/dist/bin/chunks/chunk-MA6BMA4M.js +3 -0
  40. package/dist/bin/chunks/{chunk-Z7QCL4IA.js → chunk-MPQMTLXN.js} +1 -1
  41. package/dist/bin/chunks/{chunk-TIHFGNPS.js → chunk-MUIYG2RB.js} +1 -1
  42. package/dist/bin/chunks/{chunk-PUZGSIMN.js → chunk-NGMFI3RH.js} +1 -1
  43. package/dist/bin/{shell/chunks/chunk-RYQB6GQ7.js → chunks/chunk-NLMTGTSG.js} +1 -1
  44. package/dist/bin/chunks/{chunk-QAYU7HPM.js → chunk-OBVTFHVP.js} +1 -1
  45. package/dist/bin/chunks/{chunk-MNSMZU47.js → chunk-OOKVPG5D.js} +1 -1
  46. package/dist/bin/{shell/chunks/chunk-O2BCKSMK.js → chunks/chunk-PEJXCXSY.js} +1 -1
  47. package/dist/bin/{shell/chunks/chunk-MYEPQX6Y.js → chunks/chunk-PL4EU7Y2.js} +1 -1
  48. package/dist/bin/chunks/{chunk-QFTZKD5O.js → chunk-QCGH2ZOW.js} +1 -1
  49. package/dist/bin/chunks/chunk-QKWMWSV3.js +3 -0
  50. package/dist/bin/{shell/chunks/chunk-ISOWCECJ.js → chunks/chunk-S5Z7DMIE.js} +10 -10
  51. package/dist/bin/{shell/chunks/chunk-OLEQNRKX.js → chunks/chunk-SQ7SZZMW.js} +1 -1
  52. package/dist/bin/{shell/chunks/chunk-44MQ5AXA.js → chunks/chunk-SQUH76NP.js} +1 -1
  53. package/dist/bin/{shell/chunks/chunk-BOYPCOSV.js → chunks/chunk-TGRZ42DS.js} +1 -1
  54. package/dist/bin/chunks/{chunk-LUHU7UUN.js → chunk-THTKNRO6.js} +1 -1
  55. package/dist/bin/chunks/{chunk-VKTV45AP.js → chunk-TQXLQEIT.js} +1 -1
  56. package/dist/bin/{shell/chunks/chunk-2OQ5HPZE.js → chunks/chunk-U6BXPMLD.js} +1 -1
  57. package/dist/bin/chunks/chunk-U6DBRMD5.js +5 -0
  58. package/dist/bin/{shell/chunks/chunk-CC2AQ6B7.js → chunks/chunk-U6JTVQU6.js} +1 -1
  59. package/dist/bin/chunks/chunk-UPUFWGHR.js +3 -0
  60. package/dist/bin/chunks/{chunk-E5VZGTZ6.js → chunk-URRH3GPG.js} +1 -1
  61. package/dist/bin/chunks/{chunk-EXGPMLIE.js → chunk-VBU3UEG5.js} +1 -1
  62. package/dist/bin/chunks/chunk-VGSRQOLD.js +7 -0
  63. package/dist/bin/chunks/{chunk-GTULZ3ZD.js → chunk-WBST7XJW.js} +1 -1
  64. package/dist/bin/chunks/{chunk-ROFYAVPF.js → chunk-WEQ5WM2M.js} +1 -1
  65. package/dist/bin/{shell/chunks/chunk-BCQSUELK.js → chunks/chunk-WZ7MIBLR.js} +1 -1
  66. package/dist/bin/chunks/{chunk-H4BRFPKY.js → chunk-X45GP3AQ.js} +1 -1
  67. package/dist/bin/chunks/chunk-YQEKKZTU.js +12 -0
  68. package/dist/bin/chunks/{chunk-UNKX6YM6.js → chunk-Z3KAV6YJ.js} +1 -1
  69. package/dist/bin/chunks/{chunk-3SCW7PD5.js → chunk-Z5KICK5X.js} +1 -1
  70. package/dist/bin/chunks/{column-7VBJL757.js → column-LHHS4D3K.js} +1 -1
  71. package/dist/bin/{shell/chunks/cp-MF5GADQN.js → chunks/cp-HPLQA35N.js} +1 -1
  72. package/dist/bin/chunks/curl-FIRG3RB6.js +31 -0
  73. package/dist/bin/chunks/{cut-QOTYBJJJ.js → cut-KP3S36XS.js} +1 -1
  74. package/dist/bin/{shell/chunks/diff-YXZZCUSQ.js → chunks/diff-JSJ56EOK.js} +1 -1
  75. package/dist/bin/chunks/dist-4NZ74CRE.js +141 -0
  76. package/dist/bin/chunks/{du-A3UGHIKJ.js → du-WEF5YWQK.js} +1 -1
  77. package/dist/bin/chunks/{expr-TDF3B6QJ.js → expr-FLWT4OCO.js} +1 -1
  78. package/dist/bin/chunks/{file-AJGG7RYT.js → file-JLUCGBCB.js} +1 -1
  79. package/dist/bin/chunks/{find-6DH6TRDN.js → find-XGVQ6N6L.js} +1 -1
  80. package/dist/bin/chunks/flag-coverage-4JYKIAVV.js +3 -0
  81. package/dist/bin/chunks/{grep-WUZMZDGY.js → grep-DCPCPQOS.js} +1 -1
  82. package/dist/bin/chunks/{gzip-JA7JQBUS.js → gzip-6DZIKNBW.js} +1 -1
  83. package/dist/bin/{shell/chunks/head-YGKW3HS4.js → chunks/head-TLFXMM2T.js} +1 -1
  84. package/dist/bin/{shell/chunks/help-HVIDHJ6M.js → chunks/help-EXVKU23F.js} +1 -1
  85. package/dist/bin/chunks/{html-to-markdown-ZWL7LZIP.js → html-to-markdown-E22RLT2U.js} +1 -1
  86. package/dist/bin/chunks/{jq-5MI4V3G5.js → jq-GDM3OBBK.js} +1 -1
  87. package/dist/bin/chunks/js-exec-VU6F6WLS.js +1578 -0
  88. package/dist/bin/chunks/{ln-XSDIE6SU.js → ln-B35EKC2Q.js} +1 -1
  89. package/dist/bin/chunks/{ls-R6DAGGBH.js → ls-67NUUIYT.js} +1 -1
  90. package/dist/bin/chunks/{mkdir-74BP5NTG.js → mkdir-AWDWRBKC.js} +1 -1
  91. package/dist/bin/chunks/mktemp-L6OGMDUO.js +3 -0
  92. package/dist/bin/chunks/{mv-YG75IRRE.js → mv-4BJSOT4Y.js} +1 -1
  93. package/dist/bin/{shell/chunks/od-YCY27MMO.js → chunks/od-SI75GLRE.js} +1 -1
  94. package/dist/bin/chunks/{paste-ACKOG3XS.js → paste-5TSIBDF7.js} +1 -1
  95. package/dist/bin/chunks/python3-GUWCSSDP.js +23 -0
  96. package/dist/bin/{shell/chunks/readlink-HMHVGSAM.js → chunks/readlink-URO5XTBB.js} +1 -1
  97. package/dist/bin/{shell/chunks/rg-A3E7YM2A.js → chunks/rg-RVULUPDH.js} +1 -1
  98. package/dist/bin/{shell/chunks/rm-3PLW4O4B.js → chunks/rm-UCUTHC3I.js} +1 -1
  99. package/dist/bin/chunks/{rmdir-DCJ3XJRR.js → rmdir-J3HM7GGM.js} +1 -1
  100. package/dist/bin/{shell/chunks/sed-KJWKB22J.js → chunks/sed-MCLGHZOI.js} +1 -1
  101. package/dist/bin/chunks/{seq-Q4LZ6EXV.js → seq-I54NZE75.js} +1 -1
  102. package/dist/bin/{shell/chunks/sleep-DVFE2GSF.js → chunks/sleep-CV6B4M6W.js} +1 -1
  103. package/dist/bin/chunks/{split-XMXBXL5Q.js → split-VZO7223N.js} +1 -1
  104. package/dist/bin/chunks/{sqlite3-DNH2VLVN.js → sqlite3-HXVFVP4Z.js} +1 -1
  105. package/dist/bin/chunks/sqlite3-worker.js +75 -11
  106. package/dist/bin/chunks/{stat-5PUSTPTK.js → stat-UJ37RBMM.js} +1 -1
  107. package/dist/bin/chunks/{tail-4MB7HHIZ.js → tail-5TSF5YM4.js} +1 -1
  108. package/dist/bin/{shell/chunks/tar-FRDUJZDN.js → chunks/tar-ZGZZDQXO.js} +1 -1
  109. package/dist/bin/chunks/{time-LF7BTSK5.js → time-J2DAZUIN.js} +1 -1
  110. package/dist/bin/chunks/timeout-ATTDYXLX.js +3 -0
  111. package/dist/bin/chunks/{tr-Z6N34HZM.js → tr-6RPFASYV.js} +1 -1
  112. package/dist/bin/chunks/worker.js +88 -15
  113. package/dist/bin/chunks/{xan-VSF6ZQGZ.js → xan-CCS53B7D.js} +1 -1
  114. package/dist/bin/chunks/{xan-view-UEFBHYVN.js → xan-view-KOXASOEV.js} +1 -1
  115. package/dist/bin/chunks/yes-ELH3XQWY.js +3 -0
  116. package/dist/bin/chunks/yq-GSCDUHGM.js +3 -0
  117. package/dist/bin/just-bash.js +333 -328
  118. package/dist/bin/shell/chunks/awk2-U22OR5B5.js +3 -0
  119. package/dist/bin/{chunks/base64-FLJ4YPHB.js → shell/chunks/base64-2KKH5BCT.js} +1 -1
  120. package/dist/bin/shell/chunks/{cat-2J5MA5PY.js → cat-V45MVNBT.js} +1 -1
  121. package/dist/bin/{chunks/chmod-ZM5WLMZI.js → shell/chunks/chmod-A54R4UUQ.js} +1 -1
  122. package/dist/bin/shell/chunks/chunk-2NJJXU4K.js +27 -0
  123. package/dist/bin/{chunks/chunk-BJRT4VKD.js → shell/chunks/chunk-3LKMI5IX.js} +1 -1
  124. package/dist/bin/{chunks/chunk-4APSDE57.js → shell/chunks/chunk-44SKMHU6.js} +1 -1
  125. package/dist/bin/shell/chunks/{chunk-GRP7L2EL.js → chunk-6DAR25KN.js} +1 -1
  126. package/dist/bin/{chunks/chunk-VGR3NA3H.js → shell/chunks/chunk-723HNGID.js} +1 -1
  127. package/dist/bin/{chunks/chunk-MRPJL3ZK.js → shell/chunks/chunk-7X4QBCFW.js} +1 -1
  128. package/dist/bin/shell/chunks/{chunk-42AMF6EE.js → chunk-ABM5WFEO.js} +1 -1
  129. package/dist/bin/shell/chunks/{chunk-2HFDEZUY.js → chunk-AINNAQBQ.js} +1 -1
  130. package/dist/bin/{chunks/chunk-BPWZ7ADB.js → shell/chunks/chunk-AL7RVSF4.js} +1 -1
  131. package/dist/bin/{chunks/chunk-MHAGHCSO.js → shell/chunks/chunk-ARYCSNJJ.js} +7 -7
  132. package/dist/bin/{chunks/chunk-2INNLNI5.js → shell/chunks/chunk-BJF6B4YW.js} +1 -1
  133. package/dist/bin/{chunks/chunk-BZWGVRFA.js → shell/chunks/chunk-BOXG6XBN.js} +2 -2
  134. package/dist/bin/shell/chunks/chunk-DA3RFNKK.js +17 -0
  135. package/dist/bin/shell/chunks/chunk-DH7M46D3.js +20 -0
  136. package/dist/bin/shell/chunks/{chunk-2ND6MMXN.js → chunk-DTGQQKI2.js} +1 -1
  137. package/dist/bin/shell/chunks/{chunk-YOIFOOGX.js → chunk-ECZAFQ22.js} +1 -1
  138. package/dist/bin/shell/chunks/{chunk-PPVF2N6C.js → chunk-EFS34UUR.js} +1 -1
  139. package/dist/bin/{chunks/chunk-TW2IJRUF.js → shell/chunks/chunk-ENEHPI32.js} +1 -1
  140. package/dist/bin/shell/chunks/chunk-HFW2LXQV.js +13 -0
  141. package/dist/bin/{chunks/chunk-UHNV55NF.js → shell/chunks/chunk-HRKG3ZK2.js} +1 -1
  142. package/dist/bin/shell/chunks/{chunk-74TZ7ZF7.js → chunk-IKUY74NG.js} +1 -1
  143. package/dist/bin/shell/chunks/chunk-ILXMFIYG.js +7 -0
  144. package/dist/bin/shell/chunks/chunk-IMVXTSPG.js +275 -0
  145. package/dist/bin/shell/chunks/chunk-J5L5DJWL.js +3 -0
  146. package/dist/bin/{chunks/chunk-MF3GVFLC.js → shell/chunks/chunk-JKS7WXGR.js} +1 -1
  147. package/dist/bin/{chunks/chunk-XBX7KFWK.js → shell/chunks/chunk-LG6IN6SW.js} +11 -11
  148. package/dist/bin/shell/chunks/chunk-LMFAALLO.js +21 -0
  149. package/dist/bin/{chunks/chunk-DYIBFLS3.js → shell/chunks/chunk-LOU52GPJ.js} +2 -2
  150. package/dist/bin/shell/chunks/{chunk-FB44CW33.js → chunk-M5ZBECGM.js} +1 -1
  151. package/dist/bin/shell/chunks/chunk-MA6BMA4M.js +3 -0
  152. package/dist/bin/shell/chunks/{chunk-Z7QCL4IA.js → chunk-MPQMTLXN.js} +1 -1
  153. package/dist/bin/shell/chunks/{chunk-TIHFGNPS.js → chunk-MUIYG2RB.js} +1 -1
  154. package/dist/bin/shell/chunks/{chunk-PUZGSIMN.js → chunk-NGMFI3RH.js} +1 -1
  155. package/dist/bin/{chunks/chunk-RYQB6GQ7.js → shell/chunks/chunk-NLMTGTSG.js} +1 -1
  156. package/dist/bin/shell/chunks/{chunk-QAYU7HPM.js → chunk-OBVTFHVP.js} +1 -1
  157. package/dist/bin/shell/chunks/{chunk-MNSMZU47.js → chunk-OOKVPG5D.js} +1 -1
  158. package/dist/bin/{chunks/chunk-O2BCKSMK.js → shell/chunks/chunk-PEJXCXSY.js} +1 -1
  159. package/dist/bin/{chunks/chunk-MYEPQX6Y.js → shell/chunks/chunk-PL4EU7Y2.js} +1 -1
  160. package/dist/bin/shell/chunks/{chunk-QFTZKD5O.js → chunk-QCGH2ZOW.js} +1 -1
  161. package/dist/bin/shell/chunks/chunk-QKWMWSV3.js +3 -0
  162. package/dist/bin/{chunks/chunk-ISOWCECJ.js → shell/chunks/chunk-S5Z7DMIE.js} +10 -10
  163. package/dist/bin/{chunks/chunk-OLEQNRKX.js → shell/chunks/chunk-SQ7SZZMW.js} +1 -1
  164. package/dist/bin/{chunks/chunk-44MQ5AXA.js → shell/chunks/chunk-SQUH76NP.js} +1 -1
  165. package/dist/bin/{chunks/chunk-BOYPCOSV.js → shell/chunks/chunk-TGRZ42DS.js} +1 -1
  166. package/dist/bin/shell/chunks/{chunk-LUHU7UUN.js → chunk-THTKNRO6.js} +1 -1
  167. package/dist/bin/shell/chunks/{chunk-VKTV45AP.js → chunk-TQXLQEIT.js} +1 -1
  168. package/dist/bin/{chunks/chunk-2OQ5HPZE.js → shell/chunks/chunk-U6BXPMLD.js} +1 -1
  169. package/dist/bin/shell/chunks/chunk-U6DBRMD5.js +5 -0
  170. package/dist/bin/{chunks/chunk-CC2AQ6B7.js → shell/chunks/chunk-U6JTVQU6.js} +1 -1
  171. package/dist/bin/shell/chunks/chunk-UPUFWGHR.js +3 -0
  172. package/dist/bin/shell/chunks/{chunk-E5VZGTZ6.js → chunk-URRH3GPG.js} +1 -1
  173. package/dist/bin/shell/chunks/{chunk-EXGPMLIE.js → chunk-VBU3UEG5.js} +1 -1
  174. package/dist/bin/shell/chunks/chunk-VGSRQOLD.js +7 -0
  175. package/dist/bin/shell/chunks/{chunk-GTULZ3ZD.js → chunk-WBST7XJW.js} +1 -1
  176. package/dist/bin/shell/chunks/{chunk-ROFYAVPF.js → chunk-WEQ5WM2M.js} +1 -1
  177. package/dist/bin/{chunks/chunk-BCQSUELK.js → shell/chunks/chunk-WZ7MIBLR.js} +1 -1
  178. package/dist/bin/shell/chunks/{chunk-H4BRFPKY.js → chunk-X45GP3AQ.js} +1 -1
  179. package/dist/bin/shell/chunks/chunk-YQEKKZTU.js +12 -0
  180. package/dist/bin/shell/chunks/{chunk-UNKX6YM6.js → chunk-Z3KAV6YJ.js} +1 -1
  181. package/dist/bin/shell/chunks/{chunk-3SCW7PD5.js → chunk-Z5KICK5X.js} +1 -1
  182. package/dist/bin/shell/chunks/{column-7VBJL757.js → column-LHHS4D3K.js} +1 -1
  183. package/dist/bin/{chunks/cp-MF5GADQN.js → shell/chunks/cp-HPLQA35N.js} +1 -1
  184. package/dist/bin/shell/chunks/curl-FIRG3RB6.js +31 -0
  185. package/dist/bin/shell/chunks/{cut-QOTYBJJJ.js → cut-KP3S36XS.js} +1 -1
  186. package/dist/bin/{chunks/diff-YXZZCUSQ.js → shell/chunks/diff-JSJ56EOK.js} +1 -1
  187. package/dist/bin/shell/chunks/dist-4NZ74CRE.js +141 -0
  188. package/dist/bin/shell/chunks/{du-A3UGHIKJ.js → du-WEF5YWQK.js} +1 -1
  189. package/dist/bin/shell/chunks/{expr-TDF3B6QJ.js → expr-FLWT4OCO.js} +1 -1
  190. package/dist/bin/shell/chunks/{file-AJGG7RYT.js → file-JLUCGBCB.js} +1 -1
  191. package/dist/bin/shell/chunks/{find-6DH6TRDN.js → find-XGVQ6N6L.js} +1 -1
  192. package/dist/bin/shell/chunks/flag-coverage-4JYKIAVV.js +3 -0
  193. package/dist/bin/shell/chunks/{grep-WUZMZDGY.js → grep-DCPCPQOS.js} +1 -1
  194. package/dist/bin/shell/chunks/{gzip-JA7JQBUS.js → gzip-6DZIKNBW.js} +1 -1
  195. package/dist/bin/{chunks/head-YGKW3HS4.js → shell/chunks/head-TLFXMM2T.js} +1 -1
  196. package/dist/bin/{chunks/help-HVIDHJ6M.js → shell/chunks/help-EXVKU23F.js} +1 -1
  197. package/dist/bin/shell/chunks/{html-to-markdown-ZWL7LZIP.js → html-to-markdown-E22RLT2U.js} +1 -1
  198. package/dist/bin/shell/chunks/{jq-5MI4V3G5.js → jq-GDM3OBBK.js} +1 -1
  199. package/dist/bin/shell/chunks/js-exec-VU6F6WLS.js +1578 -0
  200. package/dist/bin/shell/chunks/{ln-XSDIE6SU.js → ln-B35EKC2Q.js} +1 -1
  201. package/dist/bin/shell/chunks/{ls-R6DAGGBH.js → ls-67NUUIYT.js} +1 -1
  202. package/dist/bin/shell/chunks/{mkdir-74BP5NTG.js → mkdir-AWDWRBKC.js} +1 -1
  203. package/dist/bin/shell/chunks/mktemp-L6OGMDUO.js +3 -0
  204. package/dist/bin/shell/chunks/{mv-YG75IRRE.js → mv-4BJSOT4Y.js} +1 -1
  205. package/dist/bin/{chunks/od-YCY27MMO.js → shell/chunks/od-SI75GLRE.js} +1 -1
  206. package/dist/bin/shell/chunks/{paste-ACKOG3XS.js → paste-5TSIBDF7.js} +1 -1
  207. package/dist/bin/shell/chunks/python3-GUWCSSDP.js +23 -0
  208. package/dist/bin/{chunks/readlink-HMHVGSAM.js → shell/chunks/readlink-URO5XTBB.js} +1 -1
  209. package/dist/bin/{chunks/rg-A3E7YM2A.js → shell/chunks/rg-RVULUPDH.js} +1 -1
  210. package/dist/bin/{chunks/rm-3PLW4O4B.js → shell/chunks/rm-UCUTHC3I.js} +1 -1
  211. package/dist/bin/shell/chunks/{rmdir-DCJ3XJRR.js → rmdir-J3HM7GGM.js} +1 -1
  212. package/dist/bin/{chunks/sed-KJWKB22J.js → shell/chunks/sed-MCLGHZOI.js} +1 -1
  213. package/dist/bin/shell/chunks/{seq-Q4LZ6EXV.js → seq-I54NZE75.js} +1 -1
  214. package/dist/bin/{chunks/sleep-DVFE2GSF.js → shell/chunks/sleep-CV6B4M6W.js} +1 -1
  215. package/dist/bin/shell/chunks/{split-XMXBXL5Q.js → split-VZO7223N.js} +1 -1
  216. package/dist/bin/shell/chunks/{sqlite3-DNH2VLVN.js → sqlite3-HXVFVP4Z.js} +1 -1
  217. package/dist/bin/shell/chunks/{stat-5PUSTPTK.js → stat-UJ37RBMM.js} +1 -1
  218. package/dist/bin/shell/chunks/{tail-4MB7HHIZ.js → tail-5TSF5YM4.js} +1 -1
  219. package/dist/bin/{chunks/tar-FRDUJZDN.js → shell/chunks/tar-ZGZZDQXO.js} +1 -1
  220. package/dist/bin/shell/chunks/{time-LF7BTSK5.js → time-J2DAZUIN.js} +1 -1
  221. package/dist/bin/shell/chunks/timeout-ATTDYXLX.js +3 -0
  222. package/dist/bin/shell/chunks/{tr-Z6N34HZM.js → tr-6RPFASYV.js} +1 -1
  223. package/dist/bin/shell/chunks/{xan-VSF6ZQGZ.js → xan-CCS53B7D.js} +1 -1
  224. package/dist/bin/shell/chunks/{xan-view-UEFBHYVN.js → xan-view-KOXASOEV.js} +1 -1
  225. package/dist/bin/shell/chunks/yes-ELH3XQWY.js +3 -0
  226. package/dist/bin/shell/chunks/yq-GSCDUHGM.js +3 -0
  227. package/dist/bin/shell/shell.js +334 -329
  228. package/dist/browser.d.ts +1 -1
  229. package/dist/bundle/browser.js +866 -836
  230. package/dist/bundle/chunks/awk2-V7KYQWCD.js +2 -0
  231. package/dist/bundle/chunks/{base64-2BAITDZF.js → base64-QPSYZAAJ.js} +1 -1
  232. package/dist/bundle/chunks/{cat-33KGN4MZ.js → cat-54BXBS6X.js} +1 -1
  233. package/dist/bundle/chunks/{chmod-APOXUPXW.js → chmod-4OPV4QKK.js} +1 -1
  234. package/dist/bundle/chunks/{chunk-IBRT3OJS.js → chunk-2WBUTDF5.js} +1 -1
  235. package/dist/bundle/chunks/{chunk-WNH3HOQA.js → chunk-353VO5TF.js} +1 -1
  236. package/dist/bundle/chunks/chunk-3HDTNUL3.js +6 -0
  237. package/dist/bundle/chunks/{chunk-XV2V56NQ.js → chunk-3KWM4FFA.js} +1 -1
  238. package/dist/bundle/chunks/{chunk-WXPNKIIH.js → chunk-43OP7DFL.js} +1 -1
  239. package/dist/bundle/chunks/{chunk-DMWNBCXJ.js → chunk-4GEHRJMD.js} +1 -1
  240. package/dist/bundle/chunks/{chunk-3CBCABOZ.js → chunk-4IMUNIUJ.js} +1 -1
  241. package/dist/bundle/chunks/chunk-5BMPT6SF.js +19 -0
  242. package/dist/bundle/chunks/{chunk-XPDOK3XY.js → chunk-5QWGR2WA.js} +1 -1
  243. package/dist/bundle/chunks/{chunk-X3TZEFQG.js → chunk-5UTZMNI5.js} +1 -1
  244. package/dist/bundle/chunks/{chunk-QPZVR6ZN.js → chunk-65LVAUWW.js} +1 -1
  245. package/dist/bundle/chunks/{chunk-YDR2IWKO.js → chunk-72JHTO7E.js} +1 -1
  246. package/dist/bundle/chunks/{chunk-KVG5FR5F.js → chunk-7GA3QWJJ.js} +11 -11
  247. package/dist/bundle/chunks/{chunk-ICQYTW7W.js → chunk-7M672HB6.js} +1 -1
  248. package/dist/bundle/chunks/chunk-B6OSJB22.js +26 -0
  249. package/dist/bundle/chunks/{chunk-N3FZSEG7.js → chunk-BM3X75NC.js} +1 -1
  250. package/dist/bundle/chunks/chunk-CBM6J4AL.js +6 -0
  251. package/dist/bundle/chunks/{chunk-FNEG7DFQ.js → chunk-CGI6V2HW.js} +1 -1
  252. package/dist/bundle/chunks/{chunk-BKUWXPEM.js → chunk-CHWP6GRK.js} +1 -1
  253. package/dist/bundle/chunks/{chunk-UL6YJ7FT.js → chunk-D5ZJISRS.js} +1 -1
  254. package/dist/bundle/chunks/{chunk-TUNYNC46.js → chunk-DIRWTBKE.js} +1 -1
  255. package/dist/bundle/chunks/chunk-DIWMSSQY.js +2 -0
  256. package/dist/bundle/chunks/{chunk-273265WK.js → chunk-DPZVOEUP.js} +1 -1
  257. package/dist/bundle/chunks/chunk-EGTVQWAP.js +20 -0
  258. package/dist/bundle/chunks/{chunk-SI5VPVOA.js → chunk-EXXOLIVE.js} +1 -1
  259. package/dist/bundle/chunks/chunk-GLAFXDZC.js +4 -0
  260. package/dist/bundle/chunks/{chunk-PMYUC5JF.js → chunk-H42OAUJL.js} +1 -1
  261. package/dist/bundle/chunks/chunk-H53EPEGD.js +12 -0
  262. package/dist/bundle/chunks/{chunk-QE275OWT.js → chunk-HDOXCDVK.js} +1 -1
  263. package/dist/bundle/chunks/{chunk-USNDURQI.js → chunk-HIQEVPXM.js} +1 -1
  264. package/dist/bundle/chunks/{chunk-G4SEENI7.js → chunk-M4LDT7V7.js} +1 -1
  265. package/dist/bundle/chunks/{chunk-MHY57JTL.js → chunk-MDE25PQK.js} +1 -1
  266. package/dist/bundle/chunks/{chunk-Q6JV5CBB.js → chunk-MHDZERK4.js} +1 -1
  267. package/dist/bundle/chunks/{chunk-5ELNHAAJ.js → chunk-MHZF23KB.js} +1 -1
  268. package/dist/bundle/chunks/{chunk-LPJEKUCB.js → chunk-N6W6FM4N.js} +1 -1
  269. package/dist/bundle/chunks/{chunk-POIWRLUV.js → chunk-NRLE7KYI.js} +1 -1
  270. package/dist/bundle/chunks/{chunk-MQKGGNPS.js → chunk-NXBUT5V2.js} +2 -2
  271. package/dist/bundle/chunks/{chunk-4HMWZAP7.js → chunk-OB46N7Q7.js} +1 -1
  272. package/dist/bundle/chunks/{chunk-ALOFNPKY.js → chunk-PPHGMG47.js} +2 -2
  273. package/dist/bundle/chunks/{chunk-UXHSH7BM.js → chunk-R6ZGLVXI.js} +1 -1
  274. package/dist/bundle/chunks/chunk-RCRHDT54.js +274 -0
  275. package/dist/bundle/chunks/{chunk-N4TGZ6H7.js → chunk-RIIUVFUS.js} +1 -1
  276. package/dist/bundle/chunks/chunk-RK2WBVP4.js +2 -0
  277. package/dist/bundle/chunks/{chunk-MLIO3BK2.js → chunk-SQX6WQXB.js} +1 -1
  278. package/dist/bundle/chunks/chunk-SRB6FXRH.js +2 -0
  279. package/dist/bundle/chunks/{chunk-7IFSXTCJ.js → chunk-T4INBNHX.js} +1 -1
  280. package/dist/bundle/chunks/{chunk-TVJ6JVK4.js → chunk-TUQG2YRH.js} +1 -1
  281. package/dist/bundle/chunks/{chunk-JA6EY7US.js → chunk-U7UNEMLJ.js} +1 -1
  282. package/dist/bundle/chunks/{chunk-GVKYQN5J.js → chunk-UK2K3DHN.js} +1 -1
  283. package/dist/bundle/chunks/{chunk-HW6ZCMM5.js → chunk-VDJ53ESK.js} +1 -1
  284. package/dist/bundle/chunks/{chunk-WHHRIZS3.js → chunk-VGCXKMXN.js} +1 -1
  285. package/dist/bundle/chunks/chunk-VOQZ5TSL.js +2 -0
  286. package/dist/bundle/chunks/{chunk-R2FBRMDU.js → chunk-VWUMR4IC.js} +1 -1
  287. package/dist/bundle/chunks/chunk-W2Z6LYL6.js +11 -0
  288. package/dist/bundle/chunks/{chunk-CFBEDNHJ.js → chunk-W5J5ADJF.js} +7 -7
  289. package/dist/bundle/chunks/{chunk-V2SOLEQN.js → chunk-XHFP44Y4.js} +1 -1
  290. package/dist/bundle/chunks/{chunk-KIGPB52X.js → chunk-XZ34OGNM.js} +1 -1
  291. package/dist/bundle/chunks/{chunk-A3D7NRT6.js → chunk-Y32R7EZP.js} +10 -10
  292. package/dist/bundle/chunks/chunk-YUFU7O6I.js +16 -0
  293. package/dist/bundle/chunks/{chunk-MFGH46GH.js → chunk-YZH7FUSY.js} +1 -1
  294. package/dist/bundle/chunks/{column-LKMDIDCH.js → column-F5JDBRV6.js} +1 -1
  295. package/dist/bundle/chunks/{cp-FKTQRFYJ.js → cp-LTFB4EUA.js} +1 -1
  296. package/dist/bundle/chunks/curl-XCX2ZQEA.js +30 -0
  297. package/dist/bundle/chunks/{cut-RWPUW5FY.js → cut-IRSHL3BB.js} +1 -1
  298. package/dist/bundle/chunks/{diff-CSARC7WF.js → diff-VDB6RXHO.js} +1 -1
  299. package/dist/bundle/chunks/{du-PR3M44X6.js → du-DOWSRLXR.js} +1 -1
  300. package/dist/bundle/chunks/{expr-UMT2OHZ7.js → expr-GZ4DABKB.js} +1 -1
  301. package/dist/bundle/chunks/{file-VEGKTTSF.js → file-UI6QJAAU.js} +1 -1
  302. package/dist/bundle/chunks/{find-PM3TD7V4.js → find-JTXDH3MR.js} +1 -1
  303. package/dist/bundle/chunks/flag-coverage-EDO3VM43.js +2 -0
  304. package/dist/bundle/chunks/{grep-5UPEO42U.js → grep-OZCR76FT.js} +1 -1
  305. package/dist/bundle/chunks/{gzip-ZINVK3M6.js → gzip-GQC6CWVL.js} +1 -1
  306. package/dist/bundle/chunks/{head-CFENJILH.js → head-J6RVJFRS.js} +1 -1
  307. package/dist/bundle/chunks/{help-QDDMBDU7.js → help-62M75TSG.js} +1 -1
  308. package/dist/bundle/chunks/{html-to-markdown-GGVR4YGL.js → html-to-markdown-7OG5VWYG.js} +1 -1
  309. package/dist/bundle/chunks/{jq-X2P7Q64K.js → jq-FCG2IUBK.js} +1 -1
  310. package/dist/bundle/chunks/js-exec-NDLXDUBN.js +1577 -0
  311. package/dist/bundle/chunks/{ln-VYDFOFNO.js → ln-OPY2ZVGQ.js} +1 -1
  312. package/dist/bundle/chunks/{ls-R5CQLZQM.js → ls-MQTYWW4T.js} +1 -1
  313. package/dist/bundle/chunks/{mkdir-WDDKK2P3.js → mkdir-4A5W3RXH.js} +1 -1
  314. package/dist/bundle/chunks/mktemp-XKIE5N3X.js +2 -0
  315. package/dist/bundle/chunks/{mv-XSJA2FNL.js → mv-ZPIATQJL.js} +1 -1
  316. package/dist/bundle/chunks/{od-BI6XJPXY.js → od-LUHOH7CG.js} +1 -1
  317. package/dist/bundle/chunks/{paste-LLZ3ZQR2.js → paste-U57ZU47S.js} +1 -1
  318. package/dist/bundle/chunks/python3-SDFCGIU4.js +22 -0
  319. package/dist/bundle/chunks/{readlink-IY6QKK2P.js → readlink-YNNS6F7K.js} +1 -1
  320. package/dist/bundle/chunks/{rg-UQE6KUBP.js → rg-F4SX2PHI.js} +1 -1
  321. package/dist/bundle/chunks/{rm-JQ4GDKDD.js → rm-3XUUYAXQ.js} +1 -1
  322. package/dist/bundle/chunks/{rmdir-WZKAT6M5.js → rmdir-OGSEXEF4.js} +1 -1
  323. package/dist/bundle/chunks/{sed-JW2JDLSI.js → sed-MBB5SXGD.js} +1 -1
  324. package/dist/bundle/chunks/{seq-5R2GKXC6.js → seq-IN77HD3S.js} +1 -1
  325. package/dist/bundle/chunks/{sleep-PPRBTSVR.js → sleep-3QNP3BGR.js} +1 -1
  326. package/dist/bundle/chunks/{split-2SD6EP72.js → split-6R2TSQY6.js} +1 -1
  327. package/dist/bundle/chunks/{sqlite3-UVVRYDAL.js → sqlite3-7MBPFI6W.js} +1 -1
  328. package/dist/bundle/chunks/sqlite3-worker.js +75 -11
  329. package/dist/bundle/chunks/{stat-6KILP5AL.js → stat-YLVJ4L67.js} +1 -1
  330. package/dist/bundle/chunks/{tail-BDNMS4FR.js → tail-UGFWX3YY.js} +1 -1
  331. package/dist/bundle/chunks/{tar-6365WH6H.js → tar-BNHPWTOY.js} +1 -1
  332. package/dist/bundle/chunks/{time-NERE2JJ2.js → time-N6J6DC6C.js} +1 -1
  333. package/dist/bundle/chunks/timeout-ZHCL5KTP.js +2 -0
  334. package/dist/bundle/chunks/{tr-3I4MDKIF.js → tr-4NGL47UU.js} +1 -1
  335. package/dist/bundle/chunks/worker.js +88 -15
  336. package/dist/bundle/chunks/{xan-HUOXKUQA.js → xan-7R3I2DJO.js} +1 -1
  337. package/dist/bundle/chunks/xan-view-S4ZILLPU.js +2 -0
  338. package/dist/bundle/chunks/yes-I7SAR7XX.js +2 -0
  339. package/dist/bundle/chunks/yq-IOMBQYB2.js +2 -0
  340. package/dist/bundle/index.cjs +2862 -1489
  341. package/dist/bundle/index.js +349 -344
  342. package/dist/commands/curl/response-formatting.d.ts +2 -2
  343. package/dist/commands/curl/types.d.ts +5 -0
  344. package/dist/commands/diff/format.d.ts +46 -0
  345. package/dist/commands/js-exec/js-exec.d.ts +1 -10
  346. package/dist/commands/js-exec/run-runtime.d.ts +10 -0
  347. package/dist/commands/mktemp/mktemp.d.ts +4 -0
  348. package/dist/commands/registry.d.ts +1 -1
  349. package/dist/commands/sqlite3/worker.js +75 -11
  350. package/dist/commands/worker-request-controller.d.ts +3 -23
  351. package/dist/commands/yes/yes.d.ts +4 -0
  352. package/dist/custom-commands.d.ts +7 -0
  353. package/dist/fs/create-exclusive.d.ts +30 -0
  354. package/dist/fs/in-memory-fs/in-memory-fs.d.ts +8 -1
  355. package/dist/fs/interface.d.ts +37 -0
  356. package/dist/fs/mountable-fs/mountable-fs.d.ts +20 -1
  357. package/dist/fs/overlay-fs/overlay-fs.d.ts +9 -1
  358. package/dist/fs/read-write-fs/read-write-fs.d.ts +27 -1
  359. package/dist/fs/traversal.d.ts +9 -0
  360. package/dist/index.d.cts +1 -1
  361. package/dist/index.d.ts +1 -1
  362. package/dist/interpreter/expansion/array-prefix-suffix.d.ts +2 -1
  363. package/dist/interpreter/expansion/parameter-ops.d.ts +1 -0
  364. package/dist/interpreter/expansion/pattern-removal.d.ts +3 -0
  365. package/dist/interpreter/expansion/variable.d.ts +1 -1
  366. package/dist/interpreter/helpers/loop.d.ts +32 -0
  367. package/dist/interpreter/helpers/substitution-status.d.ts +34 -0
  368. package/dist/interpreter/interpreter.d.ts +1 -1
  369. package/dist/interpreter/types.d.ts +8 -1
  370. package/dist/limits.d.ts +2 -0
  371. package/dist/network/allow-list/shared.d.ts +0 -8
  372. package/dist/network/dns-pin.d.ts +1 -35
  373. package/dist/network/fetch.d.ts +4 -6
  374. package/dist/network/types.d.ts +20 -2
  375. package/dist/security/blocked-globals.d.ts +60 -0
  376. package/dist/security/defense-context.d.ts +13 -0
  377. package/dist/security/defense-in-depth-box.d.ts +361 -0
  378. package/dist/security/index.d.ts +33 -0
  379. package/dist/security/safe-timestamp.d.ts +1 -0
  380. package/dist/security/security-violation-logger.d.ts +99 -0
  381. package/dist/security/trusted-globals.d.ts +25 -0
  382. package/dist/security/types.d.ts +151 -0
  383. package/dist/security/violation-error-message.d.ts +3 -0
  384. package/dist/security/wasm-callback.d.ts +6 -0
  385. package/dist/security/worker-defense-in-depth.d.ts +235 -0
  386. package/dist/transform/pipeline.d.ts +8 -0
  387. package/dist/transform/plugins/command-collector.d.ts +15 -0
  388. package/dist/transform/plugins/tee-plugin.d.ts +40 -0
  389. package/dist/transform/serialize.d.ts +4 -0
  390. package/dist/transform/types.d.ts +18 -0
  391. package/dist/types.d.ts +4 -3
  392. package/dist/worker-lifecycle.d.ts +27 -0
  393. package/package.json +15 -14
  394. package/dist/bin/chunks/awk2-C4A37H5N.js +0 -3
  395. package/dist/bin/chunks/chunk-23OI2XDJ.js +0 -20
  396. package/dist/bin/chunks/chunk-2ORJ5HTY.js +0 -276
  397. package/dist/bin/chunks/chunk-3PCPQIUD.js +0 -3
  398. package/dist/bin/chunks/chunk-7WBCA2BB.js +0 -3
  399. package/dist/bin/chunks/chunk-APV27ZZW.js +0 -21
  400. package/dist/bin/chunks/chunk-CPTQXTBJ.js +0 -3
  401. package/dist/bin/chunks/chunk-FE6GSISP.js +0 -22
  402. package/dist/bin/chunks/chunk-HL7NFZVQ.js +0 -13
  403. package/dist/bin/chunks/chunk-HWI42GQO.js +0 -7
  404. package/dist/bin/chunks/chunk-JQM3DKCH.js +0 -12
  405. package/dist/bin/chunks/chunk-TOTKK2XI.js +0 -16
  406. package/dist/bin/chunks/chunk-YTL6DXBO.js +0 -11
  407. package/dist/bin/chunks/curl-FS5LAEYI.js +0 -30
  408. package/dist/bin/chunks/flag-coverage-DOLZIUQ7.js +0 -3
  409. package/dist/bin/chunks/js-exec-DJQLXWCS.js +0 -99
  410. package/dist/bin/chunks/js-exec-worker.js +0 -4809
  411. package/dist/bin/chunks/python3-JCJHSX4Z.js +0 -14
  412. package/dist/bin/chunks/timeout-YGFHQJKX.js +0 -3
  413. package/dist/bin/chunks/undici-CKF2L2IP.js +0 -141
  414. package/dist/bin/chunks/yq-K5N5JD4N.js +0 -3
  415. package/dist/bin/shell/chunks/awk2-C4A37H5N.js +0 -3
  416. package/dist/bin/shell/chunks/chunk-23OI2XDJ.js +0 -20
  417. package/dist/bin/shell/chunks/chunk-2ORJ5HTY.js +0 -276
  418. package/dist/bin/shell/chunks/chunk-3PCPQIUD.js +0 -3
  419. package/dist/bin/shell/chunks/chunk-7WBCA2BB.js +0 -3
  420. package/dist/bin/shell/chunks/chunk-APV27ZZW.js +0 -21
  421. package/dist/bin/shell/chunks/chunk-CPTQXTBJ.js +0 -3
  422. package/dist/bin/shell/chunks/chunk-FE6GSISP.js +0 -22
  423. package/dist/bin/shell/chunks/chunk-HL7NFZVQ.js +0 -13
  424. package/dist/bin/shell/chunks/chunk-HWI42GQO.js +0 -7
  425. package/dist/bin/shell/chunks/chunk-JQM3DKCH.js +0 -12
  426. package/dist/bin/shell/chunks/chunk-TOTKK2XI.js +0 -16
  427. package/dist/bin/shell/chunks/chunk-YTL6DXBO.js +0 -11
  428. package/dist/bin/shell/chunks/curl-FS5LAEYI.js +0 -30
  429. package/dist/bin/shell/chunks/flag-coverage-DOLZIUQ7.js +0 -3
  430. package/dist/bin/shell/chunks/js-exec-DJQLXWCS.js +0 -99
  431. package/dist/bin/shell/chunks/python3-JCJHSX4Z.js +0 -14
  432. package/dist/bin/shell/chunks/timeout-YGFHQJKX.js +0 -3
  433. package/dist/bin/shell/chunks/undici-CKF2L2IP.js +0 -141
  434. package/dist/bin/shell/chunks/yq-K5N5JD4N.js +0 -3
  435. package/dist/bundle/chunks/awk2-NPLZQ3K7.js +0 -2
  436. package/dist/bundle/chunks/chunk-6DTD75TR.js +0 -275
  437. package/dist/bundle/chunks/chunk-6KK46B7Q.js +0 -12
  438. package/dist/bundle/chunks/chunk-AH7VTVWU.js +0 -2
  439. package/dist/bundle/chunks/chunk-BRJERIF4.js +0 -2
  440. package/dist/bundle/chunks/chunk-ELHOZMBD.js +0 -10
  441. package/dist/bundle/chunks/chunk-INDA53JL.js +0 -21
  442. package/dist/bundle/chunks/chunk-KBXRZGTY.js +0 -15
  443. package/dist/bundle/chunks/chunk-N3A4JVFJ.js +0 -2
  444. package/dist/bundle/chunks/chunk-UTKGYVUZ.js +0 -7
  445. package/dist/bundle/chunks/chunk-XMMV24SP.js +0 -20
  446. package/dist/bundle/chunks/chunk-YJKHREBZ.js +0 -11
  447. package/dist/bundle/chunks/chunk-ZBUZKIPX.js +0 -6
  448. package/dist/bundle/chunks/curl-DEHFBW27.js +0 -29
  449. package/dist/bundle/chunks/flag-coverage-I6UJUKQ4.js +0 -2
  450. package/dist/bundle/chunks/js-exec-XKF2B7C3.js +0 -98
  451. package/dist/bundle/chunks/js-exec-worker.js +0 -4809
  452. package/dist/bundle/chunks/python3-F5S5TYGS.js +0 -13
  453. package/dist/bundle/chunks/timeout-C6WDYPLV.js +0 -2
  454. package/dist/bundle/chunks/undici-PSPBDOYF.js +0 -140
  455. package/dist/bundle/chunks/xan-view-RT2WKDOQ.js +0 -2
  456. package/dist/bundle/chunks/yq-MI27NZ2U.js +0 -2
  457. package/dist/commands/js-exec/js-exec-worker.d.ts +0 -33
package/CHANGELOG.md CHANGED
@@ -1,5 +1,253 @@
1
1
  # just-bash
2
2
 
3
+ ## 3.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#377](https://github.com/vercel-labs/just-bash/pull/377) [`cc35fab`](https://github.com/vercel-labs/just-bash/commit/cc35fab4ffdd7498dd45ab6d2247a95b5db551ee) Thanks [@trieloff](https://github.com/trieloff)! - Add the `mktemp` command. It creates a unique temporary file (mode 0600) or directory (`-d`, mode 0700) and prints its path, supporting `-p`/`--tmpdir[=DIR]`, `-t`, `-u`/`--dry-run`, `-q`/`--quiet`, `--suffix=SUFF`, GNU-style `TEMPLATE` expansion, `--help` and `--version`. The default directory is `$TMPDIR` when set and non-empty, otherwise `/tmp`, so sandboxed embedders that point `TMPDIR` at a writable directory get a usable path. Random name characters come from the platform CSPRNG (`crypto.getRandomValues`), and existing paths are never returned.
8
+
9
+ Adds an optional `createExclusive(path, { mode, directory })` method to `IFileSystem`, which creates an entry only if the name is free and applies the mode at creation time rather than via a follow-up `chmod`. All built-in filesystems implement it. The member is optional, so external `IFileSystem` implementations remain source compatible; `mktemp` reports that such a filesystem cannot create atomically rather than substituting a non-atomic sequence. The accompanying `CreateExclusiveOptions` type is exported alongside the existing `MkdirOptions`/`RmOptions`.
10
+
11
+ - [#409](https://github.com/vercel-labs/just-bash/pull/409) [`5d19cc3`](https://github.com/vercel-labs/just-bash/commit/5d19cc373e691f389a2e5c1ba24766b14fb08bad) Thanks [@trieloff](https://github.com/trieloff)! - Add the `yes` command. `yes [STRING]...` repeats a line built from its operands (`y` when there are none), so `yes | head -3` and `yes | some-prompt` work instead of failing with exit 127. Because pipeline stages here run to completion rather than streaming, the stream is finite: it ends after `executionLimits.maxLoopIterations` lines, or earlier if the repeated line would exceed the output size limit.
12
+
13
+ ### Patch Changes
14
+
15
+ - [#445](https://github.com/vercel-labs/just-bash/pull/445) [`7313062`](https://github.com/vercel-labs/just-bash/commit/7313062a04dc9c04a7a7c4bc2f1e2f2b8d9097f0) Thanks [@trieloff](https://github.com/trieloff)! - interpreter: preserve complete associative-array values in `declare -A` compound assignments
16
+
17
+ Quoted values containing whitespace were reconstructed without quoting before the `declare` builtin parsed them, so every value was silently truncated at its first space. Associative-array declarations now retain whitespace and other quoted content.
18
+
19
+ - [#346](https://github.com/vercel-labs/just-bash/pull/346) [`52a5617`](https://github.com/vercel-labs/just-bash/commit/52a5617043074e1e62e2158f211c61a4e901431c) Thanks [@iroiro147](https://github.com/iroiro147)! - fs: keep the Buffer-less `fromBuffer` fallback under the argument limit
20
+
21
+ Without `Buffer` (for example in a Chrome extension service worker), `fromBuffer` converted `base64`, `binary` and `latin1` content by spreading 64KB chunks into `String.fromCharCode`, which can exceed the engine's argument limit and throw `RangeError: Maximum call stack size exceeded` on a 64KB `cat`. The fallback now converts in 8KB chunks.
22
+
23
+ - [#443](https://github.com/vercel-labs/just-bash/pull/443) [`a36c324`](https://github.com/vercel-labs/just-bash/commit/a36c3248d001e227378879c94a31b9fb54e6bd11) Thanks [@RyanGarber](https://github.com/RyanGarber)! - Handle accessor descriptors when installing module defense-in-depth proxies on Bun, preserving blocking behavior and original descriptors on teardown.
24
+
25
+ - [#414](https://github.com/vercel-labs/just-bash/pull/414) [`31ac823`](https://github.com/vercel-labs/just-bash/commit/31ac823989ae8decc1bc534eee5caaede6d5fef3) Thanks [@mutewinter](https://github.com/mutewinter)! - find: report a directory it cannot read and keep going
26
+
27
+ A `readdir` failure inside the traversal threw out of the whole search, so one unreadable directory ended `find` with no results: exit 1 and `find: EACCES: permission denied, scandir '<path>'` on its own, and exit 0 with nothing at all once piped through `head` with stderr silenced. Every macOS home directory holds such a directory (`.Trash`, several under `Library`), so a recursive `find` over a mounted home directory never returned anything.
28
+
29
+ GNU find names the directory on stderr, continues with everything else, and exits 1 at the end. It now does the same here. The message is `find: <path>: Permission denied`, with the phrase taken from the errno alone, so nothing from the underlying error's text reaches the output. A failure that is not one of the errnos a directory read can produce (a cancellation, an execution limit, a filesystem policy refusal) still ends the search as before.
30
+
31
+ Messages are emitted in traversal order beside the node's own output, whatever order the parallel batch settled in, and a failed read still counts toward the trace's `readdirCalls` and `readdirTime`.
32
+
33
+ - [#384](https://github.com/vercel-labs/just-bash/pull/384) [`e0cca16`](https://github.com/vercel-labs/just-bash/commit/e0cca16192e8ab62754b4272b7338467cc05ea92) Thanks [@taoche](https://github.com/taoche)! - Match real jq behavior for `to_entries` on arrays (numeric-key entries instead of null) and `tonumber` on empty or whitespace-only strings (error instead of 0).
34
+
35
+ - [#417](https://github.com/vercel-labs/just-bash/pull/417) [`017a911`](https://github.com/vercel-labs/just-bash/commit/017a911d3b687d44bb0e2de707b78f02ec825569) Thanks [@trieloff](https://github.com/trieloff)! - interpreter: give a loop left via `break`/`continue` status 0 instead of the last command's
36
+
37
+ `break` and `continue` are builtins that return 0, and they are the last command a loop body runs. A loop exited through them reported the status of whatever ran _before_ the `break` instead:
38
+
39
+ ```bash
40
+ while :; do false; break; done; echo $? # was 1, bash says 0
41
+ for i in 1; do false; break; done; echo $? # was 1, bash says 0
42
+ for i in 1 2; do false; continue; done; echo $? # was 1, bash says 0
43
+ ```
44
+
45
+ All four loop forms were affected — `for`, C-style `for`, `while`, `until` — as was a `break`/`continue` in a `while` condition and a multi-level `break 2` unwinding through an enclosing loop.
46
+
47
+ The stale status is invisible until something reads `$?`, and under `set -e` the phantom failing loop ends the script with no output and no diagnostic:
48
+
49
+ ```bash
50
+ set -euo pipefail
51
+ while :; do
52
+ [ 5 -eq 0 ] && break # correctly exempt from errexit as the left operand of &&
53
+ break
54
+ done
55
+ echo ok # never ran
56
+ ```
57
+
58
+ `$?` moves with the status, so the next iteration sees it too — a `for` loop runs nothing between the `continue` and the next iteration's first command, and would otherwise still expose the failure there:
59
+
60
+ ```bash
61
+ for i in 1 2; do echo "$i:$?"; false; continue; done # was 1:0 2:1, bash says 1:0 2:0
62
+ ```
63
+
64
+ `continue` sets the status at the point it runs but does not pin it: a later iteration still overwrites it, so `for i in 1 2; do if [ $i = 1 ]; then true; continue; fi; false; done` is still 1. A loop that ends normally is unchanged and reports its last command, and `return` from a function still reports the last command rather than 0.
65
+
66
+ Reported downstream as ai-ecoverse/slicc#2978.
67
+
68
+ - [#488](https://github.com/vercel-labs/just-bash/pull/488) [`c21d678`](https://github.com/vercel-labs/just-bash/commit/c21d678ea07350bf8d535d352922f71303f4ca06) Thanks [@FredAmartey](https://github.com/FredAmartey)! - Give `MountableFs` synchronous `mkdirSync` and `writeFileSync`, routed to the filesystem that owns the path, so `Bash` sets up `/bin`, `/dev`, `/proc`, `/tmp` and the working directory in its base. Paths on a filesystem without synchronous writes throw `ENOSYS` and are left out of the layout.
69
+
70
+ - [#416](https://github.com/vercel-labs/just-bash/pull/416) [`4af0dc0`](https://github.com/vercel-labs/just-bash/commit/4af0dc0ff06b2985f19f692067af115b4ab4669d) Thanks [@trieloff](https://github.com/trieloff)! - Fix default, assignment, and alternative parameter expansions used as an entire double-quoted word under `set -u`. For example, `echo "${U:-fallback}"` now prints `fallback` when `U` is unset instead of reporting "unbound variable". This also lets scripts safely check optional CI variables such as `GITHUB_STEP_SUMMARY`.
71
+
72
+ - [#509](https://github.com/vercel-labs/just-bash/pull/509) [`632090a`](https://github.com/vercel-labs/just-bash/commit/632090a60b710608e2180638a757172dc0316b2c) Thanks [@janneh](https://github.com/janneh)! - Bundle the patched `smol-toml` 1.9.0.
73
+
74
+ The Node bundle inlines `smol-toml`, so a consumer can't pick up its fix through its own lockfile. Only a just-bash release carries it.
75
+
76
+ - [#444](https://github.com/vercel-labs/just-bash/pull/444) [`128feaa`](https://github.com/vercel-labs/just-bash/commit/128feaae87b438d7484d55bd22abbd4d106a4aa0) Thanks [@RyanGarber](https://github.com/RyanGarber)! - Use a virtual executable name for CPython instead of the host worker path, avoiding script finalization failures under long installation paths without weakening worker protections.
77
+
78
+ - [#314](https://github.com/vercel-labs/just-bash/pull/314) [`90df057`](https://github.com/vercel-labs/just-bash/commit/90df0572d3a60a459ec1bd0d13035a17c53ca63f) Thanks [@tylergibbs1](https://github.com/tylergibbs1)! - Repeated `grep -e` options overwrote the earlier patterns, so only the last one was used. All `-e` patterns now combine.
79
+
80
+ - [#503](https://github.com/vercel-labs/just-bash/pull/503) [`130da94`](https://github.com/vercel-labs/just-bash/commit/130da942f0ebd948bd957c1208ec8908503281b7) Thanks [@asafyish](https://github.com/asafyish)! - Host operations that settle after a cancelled execution no longer surface as a process-level `unhandledRejection`.
81
+
82
+ Aborting or timing out an execution while the worker bridge was awaiting a host tool (or an `exec`) left that operation to settle after the defense-in-depth box deactivated. The box's `Promise.prototype.then` guard, which blocks sandbox callbacks once their execution ends, then dropped the handlers meant to consume that result: a late rejection crashed processes that treat unhandled rejections as fatal, and a late success never reached the bridge. Host-side settlement now goes through `await`, which bypasses the guarded `then`.
83
+
84
+ - [#487](https://github.com/vercel-labs/just-bash/pull/487) [`0353b22`](https://github.com/vercel-labs/just-bash/commit/0353b22ca56ae88f06a5c4e9c784ca9b075051b2) Thanks [@FredAmartey](https://github.com/FredAmartey)! - Keep leading blanks after `a\`, `i\` and `c\` in `sed` text, as GNU does, including blanks escaped with a backslash. The one-line `a text` form now strips every leading blank instead of only the first.
85
+
86
+ - [#513](https://github.com/vercel-labs/just-bash/pull/513) [`ef8c75d`](https://github.com/vercel-labs/just-bash/commit/ef8c75deaeb74fc314767512d1550bcc84407d4e) Thanks [@jamalkamaladdin](https://github.com/jamalkamaladdin)! - Fix intermittent `python3` failures with `OSError: [Errno 29] I/O error` on a busy host. A wakeup left over from the previous bridge call could end the wait for the next call before the main thread answered it. The worker now keeps waiting until the call is answered, within the same operation timeout.
87
+
88
+ - [#506](https://github.com/vercel-labs/just-bash/pull/506) [`4ee035b`](https://github.com/vercel-labs/just-bash/commit/4ee035b6770bb0d6fd7998f22ea6651544433cf9) Thanks [@privatenumber](https://github.com/privatenumber)! - timeout: a deadline that lands while a command is still loading no longer aborts the rest of the script
89
+
90
+ `timeout` on a cold command — the first use of any lazily loaded command — could return 124 and still kill every statement after it. Cancelled invocations now stop waiting for the load and report cancellation instead.
91
+
92
+ ## 3.5.0
93
+
94
+ ### Minor Changes
95
+
96
+ - [#413](https://github.com/vercel-labs/just-bash/pull/413) [`2d9d41f`](https://github.com/vercel-labs/just-bash/commit/2d9d41fd90ad024cf54a7bc0caa345af7966c410) Thanks [@trieloff](https://github.com/trieloff)! - `diff` now defaults to POSIX normal format (`2c2` / `<` / `---` / `>`) instead of unified, matching GNU diffutils and POSIX. **This changes the default output and will break anything parsing the previous unified-by-default output** — pass `-u` to keep unified.
97
+
98
+ Previously `-u` was parsed and discarded, `createTwoFilesPatch` was the only output path, and every invocation was prefixed with jsdiff's 67-character `===...===` banner, which is not valid output in any GNU format. Normal format was unreachable by any flag, so `diff a b | grep '^<'` — the canonical "lines only in A" idiom — silently matched nothing and exited cleanly on files that differ.
99
+
100
+ - `-u` / `--unified` now selects unified format, and `--normal` selects the default explicitly.
101
+ - New `-c` / `--context` for context format (`*** ` / `--- ` / `***************` / `! `).
102
+ - New `--version`.
103
+ - The `===` banner is gone from every format. The `-u` / `-c` file headers carry no timestamp, so output is reproducible; GNU puts each file's mtime there.
104
+ - Filenames in `-u` / `-c` headers are quoted and escaped as GNU does, so a filename containing a newline can no longer forge header or `@@` lines in the emitted patch.
105
+ - Two output styles at once (for example `diff -u -c`) is now an error, as in GNU: `diff: conflicting output style options`, exit 2.
106
+ - `` is reported in all three formats.
107
+
108
+ `-q`, `-s`, `-i`, `-` for stdin, and the exit codes are unchanged.
109
+
110
+ Hunk selection is unchanged: where several equally minimal edit scripts exist, just-bash may group ambiguous changes differently than GNU. The output is always a correct, equally minimal patch, but the `NcN` line numbers can differ on such inputs.
111
+
112
+ - [#380](https://github.com/vercel-labs/just-bash/pull/380) [`63cd013`](https://github.com/vercel-labs/just-bash/commit/63cd01319691db61d4f239335c58940257c1f864) Thanks [@caleb-vercel](https://github.com/caleb-vercel)! - Replace bespoke `secureFetch` with `guarded-fetch` 0.1.3 for the SSRF/DNS-rebinding/transport layer
113
+
114
+ `src/network/fetch.ts` becomes an adapter over
115
+ [`guarded-fetch`](https://www.npmjs.com/package/guarded-fetch) (0.1.3, Vercel,
116
+ Apache-2.0, undici-backed). The public `createSecureFetch` / `SecureFetch` /
117
+ `SecureFetchOptions` / `FetchResult` contract is unchanged, so Bash, curl, and
118
+ worker-bridge callers need no changes.
119
+
120
+ **Delegated**: SSRF/private-IP blocking, DNS-rebinding protection (connect-time
121
+ IP pinning), protocol allow-listing, URL validation.
122
+
123
+ **Retained**: path-prefix allow-list (guarded-fetch is hostname-only), firewall
124
+ header transforms, response-size limits, `FetchResult` translation, and error
125
+ mapping back to just-bash's domain errors.
126
+
127
+ **Redirects** are still driven here so firewall headers and path policy are
128
+ re-applied per hop. Method rewriting follows the fetch standard (301/302 rewrite
129
+ POST only, 303 rewrites all but GET/HEAD, 307/308 preserve both), the rewritten
130
+ method is re-checked against `allowedMethods`, and user credentials are dropped
131
+ on cross-origin hops.
132
+
133
+ **Transport**: with `denyPrivateRanges` on, requests use guarded-fetch's own
134
+ undici `fetch` — a host-wrapped `globalThis.fetch` (framework fetch cache, APM
135
+ agent, request mocking) can rebuild the init and drop the non-standard
136
+ `dispatcher`, silently reopening the rebinding window. With it off, no pinning
137
+ is promised and the ambient `fetch` is used.
138
+
139
+ **Browser**: no guarded transport exists (undici is Node-only), so the ambient
140
+ `fetch` path is kept and `denyPrivateRanges` fails closed with "DNS pinning
141
+ unavailable for private IP enforcement", matching the old
142
+ `DnsPinningUnavailableError`. The bundle contains no import of `guarded-fetch`.
143
+
144
+ **Not delegated**: header sanitization (`sanitizeHeaders: false`) — just-bash's
145
+ firewall headers are its own layer, and the sandbox may set Cookie/Host via
146
+ curl; and guarded-fetch's own redirect following, for the reason above.
147
+
148
+ ## Breaking-ish notes
149
+
150
+ - Node engine floor `>=20.18.1` → `>=20.19` (guarded-fetch's).
151
+ - `guarded-fetch` is externalized in the `build:lib`, `build:lib:cjs`, and
152
+ `build:browser` bundles. Consumers who re-bundle just-bash must mark it
153
+ external; `AGENTS.npm.md` now documents all six such packages.
154
+ - `NetworkConfig._dnsResolve` and `._createConnectionOwner` (both `@internal`)
155
+ can no longer be honored and now **throw**, rather than being accepted while a
156
+ weaker policy runs. `._fetch` replaces them for tests.
157
+ - Header keys arrive lowercased (undici `Headers`); a few assertions updated.
158
+ - A redirect hop blocked on its own address reports `RedirectNotAllowedError`
159
+ (curl 47) as before, and a resolution failure keeps its own message.
160
+
161
+ ## Tests
162
+
163
+ `dns-guarded-path.test.ts` covers the enforcing path by mocking
164
+ `node:dns/promises` (guarded-fetch is inlined in the vitest configs so the mock
165
+ reaches it): resolve-then-reject-private, fail-closed on resolution failure and
166
+ empty answers, allow-listed hosts still resolved (the regression guard for
167
+ `skipSsrfCheckForAllowedHosts`), per-hop re-resolution, and no resolution at all
168
+ when enforcement is off. `browser-build.test.ts` bundles the module the way
169
+ `build:browser` does and asserts no `guarded-fetch` import, no unhandled
170
+ rejection on import, ambient-`fetch` requests, and fail-closed enforcement.
171
+
172
+ ### Patch Changes
173
+
174
+ - [#400](https://github.com/vercel-labs/just-bash/pull/400) [`f559fc1`](https://github.com/vercel-labs/just-bash/commit/f559fc1baadc6626fb88cb0446ac7740babb0d59) Thanks [@trieloff](https://github.com/trieloff)! - interpreter: give a bare assignment exit status 0 instead of the previous command's
175
+
176
+ A command with no command word — `x=1`, `arr=(a b)`, `> file`, a `$empty` that expands to nothing — reported whatever `$?` already held rather than success. Bash gives such a command status 0 unless a command substitution ran while expanding it.
177
+
178
+ The leak is invisible until something reads `$?`, and an `else` branch is where it bites: the branch runs with `$?` set to 1 by the condition that just failed, so an `else` branch ending in an assignment made the whole `if` report failure. Under `set -e` that ended the script with no output and no diagnostic:
179
+
180
+ ```bash
181
+ set -e
182
+ if false; then :; else x=1; fi
183
+ echo done # never ran
184
+ ```
185
+
186
+ A command substitution still sets the status where bash says it does. It counts from an assigned value or a redirection word, assignments expanded first and the last substitution winning: `x=$(exit 7)` is 7, `> /dev/null$(exit 5)` is 5, and `x=$(exit 7) > /dev/null$(exit 5)` is 5. A redirection onto fd 0 discards it and reports 0, matching bash 5.x, which forks a child to perform such a command's redirections. Process substitution never contributes, and neither does a command substitution in `PS4` under `set -x`.
187
+
188
+ - [#389](https://github.com/vercel-labs/just-bash/pull/389) [`de3c2f3`](https://github.com/vercel-labs/just-bash/commit/de3c2f368ee1c11bab4d7250aaf43306e052a008) Thanks [@trieloff](https://github.com/trieloff)! - Implement `curl -D` / `--dump-header` (file, `-`, `--dump-header=`, redirect hops, `-f` dumps). `curl -I` header blocks now end with a blank line (`\r\n\r\n`), matching real curl.
189
+
190
+ - [#378](https://github.com/vercel-labs/just-bash/pull/378) [`a2a5843`](https://github.com/vercel-labs/just-bash/commit/a2a5843e4b3526148c7bab04dcd7be8e859e713a) Thanks [@trieloff](https://github.com/trieloff)! - curl: don't build the stdout string when the body is written to a file
191
+
192
+ `curl -o FILE URL` (and `-O`) stringified the entire response body for stdout
193
+ and then immediately discarded it, holding a full UTF-16 copy of the payload in
194
+ memory alongside the bytes being written. Large downloads could exhaust memory
195
+ (a browser-hosted embedder OOM'd its renderer on a 250 MB download). The stdout
196
+ string is now skipped entirely on that path; `-v`, `--write-out`, `-I/--head`
197
+ and all other behaviour are unchanged.
198
+
199
+ - [#365](https://github.com/vercel-labs/just-bash/pull/365) [`bbf3881`](https://github.com/vercel-labs/just-bash/commit/bbf38812f621081f9c3203b7f887d1e5cb12dcaa) Thanks [@mutewinter](https://github.com/mutewinter)! - Report gzip files from their header instead of inflating them. `file` no longer enters `file-type`'s nested gzip probe, which decompressed up to 16 MB of input to look for an inner tar and leaked an `AbortError` unhandled rejection after the command had already returned. Gzipped tar archives now read as `gzip compressed data` rather than `gzip archive data`, matching `file`.
200
+
201
+ - [#397](https://github.com/vercel-labs/just-bash/pull/397) [`062ce00`](https://github.com/vercel-labs/just-bash/commit/062ce005c0a7676163852fb6f0c8590cbdaa1d45) Thanks [@taoche](https://github.com/taoche)! - Run lazy file providers in the defense-in-depth trusted scope during materialization. Host-supplied providers doing real async I/O (`setTimeout`, `fetch`, `process.env`) previously tripped the blocked-globals traps when a script first read the file mid-exec, surfacing as a `SecurityViolationError` (formerly a silent empty read / ENOENT). Fixes [#253](https://github.com/vercel-labs/just-bash/issues/253).
202
+
203
+ - [#391](https://github.com/vercel-labs/just-bash/pull/391) [`43c37ce`](https://github.com/vercel-labs/just-bash/commit/43c37cea24cea8e2f9ed9eab38906f85836f3502) Thanks [@mutewinter](https://github.com/mutewinter)! - ln: report a refused symlink as a symlink failure, not as a hard link on a directory
204
+
205
+ `ln -s` against a filesystem constructed without symlink support failed with `ln: 'file.txt': hard link not allowed for directory`. Nothing in that sentence is true of the call: `-s` asks for a symbolic link rather than a hard one, and the named operand is the target rather than the directory the message blames.
206
+
207
+ Both link kinds shared one `EPERM` branch, which carried the hard-link wording unconditionally. `link` reports `EPERM` only for a directory, so that wording is right there and is kept. `symlink` reports it when the filesystem allows no symlinks at all, which is a different condition with a different remedy, and it now reads `ln: failed to create symbolic link 'link': Operation not permitted`, matching the shape GNU `ln` uses and the shape this command already uses for `File exists`.
208
+
209
+ - [#363](https://github.com/vercel-labs/just-bash/pull/363) [`4de3cd6`](https://github.com/vercel-labs/just-bash/commit/4de3cd6e167bb54cf239aae92c45ac15cc9e2117) Thanks [@mutewinter](https://github.com/mutewinter)! - Append type indicators in `ls -l` only when `-F` asks for them. Long format previously suffixed every directory with `/` regardless, so a name read out of `ls -l` output carried a trailing slash that is not part of it, and `ls -l` disagreed with `ls` about what the same entry is called.
210
+
211
+ - [#390](https://github.com/vercel-labs/just-bash/pull/390) [`b7f556f`](https://github.com/vercel-labs/just-bash/commit/b7f556fcbedc21ee4e346ad858f29c4d7d35a49e) Thanks [@trieloff](https://github.com/trieloff)! - Bound `ls` directory entry collections before per-entry work. A filesystem backend returning a very large directory could previously drive `ls` into sorting, statting, classifying and formatting every entry before any limit applied, and piping to `head` did not help because pipeline producers are materialized before consumers run. Oversized listings now fail with exit code 126 (`array element limit exceeded` / `filesystem traversal entry limit exceeded`), the recursive descent no longer fans out across sibling directories, and every operand of a multi-directory listing is charged to the same budget.
212
+
213
+ - [#363](https://github.com/vercel-labs/just-bash/pull/363) [`4de3cd6`](https://github.com/vercel-labs/just-bash/commit/4de3cd6e167bb54cf239aae92c45ac15cc9e2117) Thanks [@mutewinter](https://github.com/mutewinter)! - Resolve `ls` operands as literal paths instead of matching them as glob patterns a second time. Pathname expansion is the shell's job, so an operand still holding `*`, `?` or `[` is a real filename; re-matching it made `ls 'report [1].pdf'` report an existing file as missing and stripped the leading directories from names containing `?` or `*`.
214
+
215
+ - [#363](https://github.com/vercel-labs/just-bash/pull/363) [`4de3cd6`](https://github.com/vercel-labs/just-bash/commit/4de3cd6e167bb54cf239aae92c45ac15cc9e2117) Thanks [@mutewinter](https://github.com/mutewinter)! - Group `ls` operands the way GNU and BSD `ls` do. Non-directory operands now print first as a single unseparated block in sort order, then each directory prints under a `name:` label preceded by a blank line. Previously every operand was separated by a blank line, including plain files, so `find … -exec ls -l {} +` and `xargs ls -l` returned a listing with an empty line between each entry.
216
+
217
+ - [#363](https://github.com/vercel-labs/just-bash/pull/363) [`4de3cd6`](https://github.com/vercel-labs/just-bash/commit/4de3cd6e167bb54cf239aae92c45ac15cc9e2117) Thanks [@mutewinter](https://github.com/mutewinter)! - Order `ls -R` sections by the active sort key, so `-t` and `-S` reach the descent rather than only each directory's own listing, and charge the traversal budget while resolving operands rather than only once the walk has started. Each operand costs one entry rather than two, `-d` charges its operands instead of returning before the budget sees them, and the metadata reads `-t` and `-S` need to sort are charged before they run.
218
+
219
+ - [#363](https://github.com/vercel-labs/just-bash/pull/363) [`4de3cd6`](https://github.com/vercel-labs/just-bash/commit/4de3cd6e167bb54cf239aae92c45ac15cc9e2117) Thanks [@mutewinter](https://github.com/mutewinter)! - Implement `ls -t`. The flag was parsed and discarded, so `ls -lt` silently returned the same name-ordered listing as `ls -l` while `--help` documented it as "sort by time, newest first". `-S` and `-t` now follow GNU's precedence, where whichever is written last wins, and both break ties by name so a listing no longer depends on the order the filesystem returned entries in. Sort keys come from `lstat`, so a symlink orders on its own size and mtime rather than its target's.
220
+
221
+ - [#454](https://github.com/vercel-labs/just-bash/pull/454) [`022e260`](https://github.com/vercel-labs/just-bash/commit/022e260ec9bcdadd517704a3b96ffb5d948abd99) Thanks [@FredAmartey](https://github.com/FredAmartey)! - Let `ReadWriteFs.lstat` and `ReadWriteFs.readlink` accept the sandbox root. Both authorized a path by validating the directory above it, which for `/` lies outside the sandbox, so they failed with `EACCES`. Since 3.2.0 moved `find`, `du`, `chmod -R` and `file` onto `lstat`, `find .` and `find /` at the root printed nothing and exited 0. `du` and `chmod -R` reported `cannot access '/'` and `file /` reported `cannot open`. The root is now validated directly, as `mkdir` and `link` already do. Fixes [#402](https://github.com/vercel-labs/just-bash/issues/402).
222
+
223
+ - [#399](https://github.com/vercel-labs/just-bash/pull/399) [`108c5cc`](https://github.com/vercel-labs/just-bash/commit/108c5ccf028e82bdcaabb2a5fd6b2640e56168f5) Thanks [@taoche](https://github.com/taoche)! - regex: cache compiled RE2 patterns across `UserRegex` constructions
224
+
225
+ Every `createUserRegex()` call recompiled its pattern from source
226
+ (`translateRegExp` → parse → simplify → compile). Commands that build a
227
+ `UserRegex` inside a per-row loop therefore recompiled the same pattern once per
228
+ row: jq's `test`/`match`/`capture`/`scan`/`splits`/`sub`/`gsub`, awk's `~`/`!~`
229
+ and `sub`/`gsub`/`match`/`split`, and sed's `s///` (which compiled the same
230
+ pattern twice per line for the `g` and Nth-occurrence paths). Compiling costs
231
+ ~23µs against ~1.5µs to match with an already-compiled pattern, so compilation
232
+ dominated these workloads.
233
+
234
+ Compiled patterns are now memoized in a 256-entry cache keyed on the pattern and
235
+ the RE2 flags, mirroring the existing glob regex cache in `src/utils/glob.ts`.
236
+ Patterns longer than 1024 characters are compiled but not retained, bounding the
237
+ cache's retained pattern source at 256 KiB. Only the compiled pattern is shared — `lastIndex`, the reusable matcher, result
238
+ limits and the abort signal stay per-instance, so matching semantics are
239
+ unchanged. Over 100k rows: jq `test()` 8.96s → 4.26s, awk `~` 4.15s → 2.55s,
240
+ awk `gsub` 7.16s → 6.10s, sed `s///g` 10.46s → 8.29s. Commands that already
241
+ hoisted compilation out of their loop (grep, rg) are unaffected.
242
+
243
+ - [#394](https://github.com/vercel-labs/just-bash/pull/394) [`556a739`](https://github.com/vercel-labs/just-bash/commit/556a7397563f3db5b000329d58bc66fa0074ce77) Thanks [@cramforce](https://github.com/cramforce)! - Replace the custom js-exec QuickJS worker with run, using synchronous host bindings and native module loading while preserving filesystem, tools, process, fetch, output-limit, and cancellation behavior. Keep queue admission inside the JavaScript deadline, restore argv-only `spawnSync` execution, top-level-await module detection, optional tool exposure, and the historical 8 MiB per-call bridge ceiling. Make the aggregate bridge request ceiling configurable, bound filesystem and module reads before allocation, preserve module-loader and bootstrap diagnostics, and enforce source, generated guest configuration, and combined-output byte limits without allowing `process.exit()` to clear limit failures. Preserve binary `Buffer` filesystem writes and the `ArrayBuffer` filesystem contract, project command results before they cross into the guest, gate bootstrap-only host behavior to the bootstrap phase, parse guest stacks with bounded linear work, redact runtime stack paths, and forward cancellation through the companion executor into inline tool contexts and SDK Effect execution.
244
+
245
+ ## 3.4.2
246
+
247
+ ### Patch Changes
248
+
249
+ - [#381](https://github.com/vercel-labs/just-bash/pull/381) [`d40a42d`](https://github.com/vercel-labs/just-bash/commit/d40a42d514b22da4ed023635d747c8b3f029a6c5) Thanks [@cramforce](https://github.com/cramforce)! - Include the security and transform declaration trees referenced by the package entrypoints and worker declarations in published packages.
250
+
3
251
  ## 3.4.1
4
252
 
5
253
  ### Patch Changes
package/README.md CHANGED
@@ -67,6 +67,8 @@ never execute guest-provided JavaScript.
67
67
  Every invocation is bound by `maxExecutionTimeMs`. On cancellation, just-bash
68
68
  revokes the command context immediately; `maxExtensionCleanupTimeMs` only
69
69
  bounds how long it waits for the now-authority-free command promise to settle.
70
+ A command that is still resolving, such as one whose module is loading, is
71
+ never started and reports cancellation immediately instead.
70
72
  A late continuation cannot use `ctx.fs`, `ctx.env`, `ctx.exec`, or other context
71
73
  capabilities. Cleanup work that must run at scope closure can be registered with
72
74
  `ctx.executionScope.registerCleanup()`. A cleanup failure is returned as a
@@ -82,7 +84,7 @@ duplicating internal defaults.
82
84
 
83
85
  ### File Operations
84
86
 
85
- `cat`, `cp`, `file`, `ln`, `ls`, `mkdir`, `mv`, `readlink`, `rm`, `rmdir`, `split`, `stat`, `touch`, `tree`
87
+ `cat`, `cp`, `file`, `ln`, `ls`, `mkdir`, `mktemp`, `mv`, `readlink`, `rm`, `rmdir`, `split`, `stat`, `touch`, `tree`
86
88
 
87
89
  ### Text Processing
88
90
 
@@ -106,7 +108,7 @@ duplicating internal defaults.
106
108
 
107
109
  ### Shell Utilities
108
110
 
109
- `alias`, `bash`, `chmod`, `clear`, `date`, `expr`, `false`, `help`, `history`, `seq`, `sh`, `sleep`, `time`, `timeout`, `true`, `unalias`, `which`, `whoami`
111
+ `alias`, `bash`, `chmod`, `clear`, `date`, `expr`, `false`, `help`, `history`, `seq`, `sh`, `sleep`, `time`, `timeout`, `true`, `unalias`, `which`, `whoami`, `yes`
110
112
 
111
113
  ### Network
112
114
 
@@ -447,7 +449,7 @@ await env.exec('js-exec -c "console.log(API_BASE)"');
447
449
 
448
450
  `fs.readFileSync()` returns a `Buffer` by default (matching Node.js). Pass an encoding like `'utf8'` to get a string.
449
451
 
450
- **Note:** The `js-exec` command only exists when `javascript` is configured. It is not available in browser environments. Execution runs in a QuickJS WASM sandbox with a 64 MB memory limit and configurable timeout (30 seconds in the default `normal` profile and 10 seconds in the opt-in `hardened` profile). Enabling network access does not extend the configured deadline.
452
+ **Note:** The `js-exec` command only exists when `javascript` is configured. It is not available in browser environments. Execution uses the `run` package's QuickJS sandbox with a 64 MB memory limit and configurable timeout (30 seconds in the default `normal` profile and 10 seconds in the opt-in `hardened` profile). Enabling network access does not extend the configured deadline.
451
453
 
452
454
  #### Tool Invocation Hook
453
455
 
@@ -461,9 +463,10 @@ const bash = new Bash({
461
463
  // argsJson: '{"a":1,"b":2}' (or "" for no args)
462
464
  // return: JSON-stringified result, or "" for undefined
463
465
  // throw: propagates as a sandbox exception
464
- invokeTool: async (path, argsJson) => {
466
+ invokeTool: async (path, argsJson, abortSignal) => {
465
467
  const args = argsJson ? JSON.parse(argsJson) : undefined;
466
468
  if (path === "math.add") {
469
+ abortSignal.throwIfAborted();
467
470
  return JSON.stringify({ sum: args.a + args.b });
468
471
  }
469
472
  throw new Error(`Unknown tool: ${path}`);
@@ -474,6 +477,10 @@ const bash = new Bash({
474
477
  await bash.exec(`js-exec -c 'console.log((await tools.math.add({a:3,b:4})).sum)'`);
475
478
  ```
476
479
 
480
+ The `abortSignal` fires when the JavaScript execution is canceled or times
481
+ out. Tool implementations should forward it to network requests and other
482
+ cancelable work so effects do not outlive the sandbox execution.
483
+
477
484
  The hook is generic — wire any tool framework through it (raw maps, MCP,
478
485
  Anthropic tool-use, etc.). For full GraphQL / OpenAPI / MCP discovery via
479
486
  `@executor-js/sdk`, plus auto-generated bash namespace commands, use the
@@ -629,6 +636,7 @@ Options:
629
636
  - `-c <script>` - Execute script from argument
630
637
  - `--root <path>` - Root directory (default: current directory)
631
638
  - `--cwd <path>` - Working directory in sandbox
639
+ - `--allow-write` - Allow write operations (in memory only; read-only by default)
632
640
  - `-e, --errexit` - Exit on first error
633
641
  - `--json` - Output as JSON
634
642
 
@@ -638,10 +646,10 @@ Options:
638
646
  pnpm shell
639
647
  ```
640
648
 
641
- The interactive shell has full internet access by default. Disable with `--no-network`:
649
+ The interactive shell has network access disabled by default. Enable it with `--network`:
642
650
 
643
651
  ```bash
644
- pnpm shell --no-network
652
+ pnpm shell --network
645
653
  ```
646
654
 
647
655
  ## Execution Protection
@@ -670,17 +678,22 @@ const env = new Bash({
670
678
  All resources remain bounded by default in both profiles. Explicit values
671
679
  override the selected profile; non-negative safe integers and the legacy
672
680
  `Infinity` spelling are accepted. Infinite deadlines omit the corresponding
673
- platform timer rather than overflowing it. Invalid values are rejected when
674
- `Bash` is constructed. Error messages identify the resource that was hit.
681
+ platform timer rather than overflowing it; `js-exec` maps an infinite
682
+ JavaScript deadline to `run`'s longest timeout (about 24.9 days). Invalid
683
+ values are rejected when `Bash` is constructed. Error messages identify the
684
+ resource that was hit.
675
685
 
676
686
  ## Security Model
677
687
 
678
- The Node.js package requires Node `>=20.18.1`.
688
+ The Node.js package requires Node `>=20.19`.
679
689
 
680
690
  - The shell only has access to the provided filesystem.
681
691
  - All execution happens without VM isolation. This does introduce additional risk. The code base was designed to be robust against prototype-pollution attacks and other break outs to the host JS engine and filesystem.
682
692
  - There is no network access by default. When enabled, requests are checked against URL prefix allow-lists and HTTP-method allow-lists.
683
693
  - Python and JavaScript execution are off by default as they represent additional security surface.
694
+ - `js-exec` guest code runs inside the `run` package's QuickJS/WASM realm. Its
695
+ primary isolation boundary is QuickJS plus the validated, bounded host
696
+ bridge; guest JavaScript does not execute in the Node worker realm.
684
697
  - Execution is protected against infinite loops and deep recursion with configurable limits.
685
698
  - Host-realm defense-in-depth uses the strongest scoped controls available on
686
699
  each supported Node runtime. Where `node:module.registerHooks()` is present,
package/dist/AGENTS.md CHANGED
@@ -72,9 +72,9 @@ const result = await bash.exec("cat input.txt | grep pattern");
72
72
 
73
73
  **Data processing**: `jq` (JSON), `js-exec` (JavaScript/TypeScript via QuickJS), `python3`/`python` (Python via WASM/CPython), `sqlite3` (SQLite), `xan` (CSV), `yq` (YAML/XML/TOML/CSV)
74
74
 
75
- **File operations**: `basename`, `chmod`, `cp`, `dirname`, `du`, `file`, `find`, `ln`, `ls`, `mkdir`, `mv`, `od`, `pwd`, `readlink`, `rm`, `rmdir`, `split`, `stat`, `touch`, `tree`
75
+ **File operations**: `basename`, `chmod`, `cp`, `dirname`, `du`, `file`, `find`, `ln`, `ls`, `mkdir`, `mktemp`, `mv`, `od`, `pwd`, `readlink`, `rm`, `rmdir`, `split`, `stat`, `touch`, `tree`
76
76
 
77
- **Utilities**: `alias`, `base64`, `bash`, `clear`, `curl`, `date`, `diff`, `echo`, `env`, `expr`, `false`, `gzip`, `gunzip`, `help`, `history`, `hostname`, `html-to-markdown`, `md5sum`, `printenv`, `printf`, `seq`, `sh`, `sha1sum`, `sha256sum`, `sleep`, `tar`, `tee`, `time`, `timeout`, `true`, `unalias`, `which`, `whoami`, `zcat`
77
+ **Utilities**: `alias`, `base64`, `bash`, `clear`, `curl`, `date`, `diff`, `echo`, `env`, `expr`, `false`, `gzip`, `gunzip`, `help`, `history`, `hostname`, `html-to-markdown`, `md5sum`, `printenv`, `printf`, `seq`, `sh`, `sha1sum`, `sha256sum`, `sleep`, `tar`, `tee`, `time`, `timeout`, `true`, `unalias`, `which`, `whoami`, `yes`, `zcat`
78
78
 
79
79
  All commands support `--help` for usage details.
80
80
 
@@ -325,3 +325,59 @@ Key types to explore:
325
325
  - `BashOptions` - Constructor options for `new Bash()`
326
326
  - `ExecResult` - Return type of `bash.exec()`
327
327
  - `InitialFiles` - File specification format
328
+
329
+ ## Bundling just-bash
330
+
331
+ just-bash ships pre-bundled (`dist/bundle/index.js`, `index.cjs`), but a handful
332
+ of dependencies are deliberately left **external** — the bundle imports them by
333
+ name instead of inlining them. Under plain Node this is invisible: they are
334
+ declared dependencies, so the package manager installs them and the imports
335
+ resolve at runtime.
336
+
337
+ It matters when you run just-bash through **another** bundler (Next.js,
338
+ webpack, esbuild, rollup) for a serverless or edge target. That bundler will try
339
+ to inline these, and some of them cannot be inlined. Mark all six as external:
340
+
341
+ | Package | What it is |
342
+ | --- | --- |
343
+ | `@mongodb-js/zstd` | native binding (`optionalDependencies`) |
344
+ | `node-liblzma` | native binding (`optionalDependencies`) |
345
+ | `sql.js` | ships a `.wasm` asset |
346
+ | `run` | embeds the QuickJS WASM runtime |
347
+ | `seek-bzip` | CommonJS-only bzip2 decoder |
348
+ | `guarded-fetch` | imports `node:dns/promises`, `node:net`, `node:dns` |
349
+
350
+ `guarded-fetch` is the one that bites bundlers targeting a non-Node context:
351
+ inlining it pulls in Node builtins, and a bundler whose chunking context has no
352
+ concept of them fails the build (Turbopack reports `the chunking context
353
+ (unknown) does not support external modules (request: node:dns/promises)`).
354
+
355
+ Next.js 15+:
356
+
357
+ ```ts
358
+ // next.config.ts
359
+ const nextConfig = {
360
+ serverExternalPackages: [
361
+ "just-bash",
362
+ "@mongodb-js/zstd",
363
+ "node-liblzma",
364
+ "seek-bzip",
365
+ "sql.js",
366
+ "run",
367
+ "guarded-fetch",
368
+ ],
369
+ };
370
+ ```
371
+
372
+ Older Next.js uses `experimental.serverComponentsExternalPackages`. webpack:
373
+ add them to `externals` (or use `webpack-node-externals`). esbuild/rollup:
374
+ `--external:<name>` / `external: [...]`.
375
+
376
+ **Node version**: just-bash requires Node `>=20.19` (`guarded-fetch`'s floor).
377
+
378
+ **Optional dependencies**: `@mongodb-js/zstd` and `node-liblzma` are declared
379
+ in `optionalDependencies`, so an install that cannot build them still succeeds.
380
+ Only the compression they provide is lost: `tar -J` then exits non-zero with
381
+ `xz compression requires node-liblzma which failed to load`, rather than
382
+ crashing the interpreter. The other four are regular dependencies and are
383
+ required.
package/dist/Bash.d.ts CHANGED
@@ -33,11 +33,13 @@ export interface JavaScriptConfig {
33
33
  /**
34
34
  * Tool invocation hook. When provided, code running in `js-exec` gets a
35
35
  * global `tools` proxy that routes calls through this callback synchronously
36
- * (the worker blocks via `Atomics.wait` while the host resolves the call).
36
+ * while `run` dispatches the host binding.
37
37
  *
38
38
  * - `path`: dot-separated tool path (e.g. `"math.add"`). The proxy builds
39
39
  * it from JS property access — `tools.math.add(...)` becomes `"math.add"`.
40
40
  * - `argsJson`: JSON-stringified args object, or empty string for no args.
41
+ * - `abortSignal`: aborts when js-exec is canceled or times out. Tool
42
+ * implementations should forward it to cancelable work.
41
43
  * - return: JSON-stringified result, or empty string for `undefined`.
42
44
  * - throw: propagates as a catchable exception inside the sandbox.
43
45
  *
@@ -47,7 +49,7 @@ export interface JavaScriptConfig {
47
49
  * `@just-bash/executor` produces a matching `invokeTool` + `commands` pair
48
50
  * from inline tools and/or `@executor-js/sdk` discovery.
49
51
  */
50
- invokeTool?: (path: string, argsJson: string) => Promise<string>;
52
+ invokeTool?: (path: string, argsJson: string, abortSignal: AbortSignal) => Promise<string>;
51
53
  }
52
54
  export interface BashOptions {
53
55
  files?: InitialFiles;
@@ -8,3 +8,13 @@ export interface CombinedAbortSignal {
8
8
  * listeners are removable by the caller's finally block.
9
9
  */
10
10
  export declare function combineAbortSignals(...signals: Array<AbortSignal | undefined>): CombinedAbortSignal;
11
+ /**
12
+ * Wait for host work that cannot observe cancellation, giving up when `signal`
13
+ * aborts.
14
+ *
15
+ * A cancelled invocation must not keep waiting for uncancellable host work: its
16
+ * caller bounds how long it waits for a command to unwind, and a command that is
17
+ * still resolving has nothing to unwind. The abandoned work stays observed, and
18
+ * the abort listener is removed on both paths.
19
+ */
20
+ export declare function raceCancellation<T>(work: Promise<T>, signal: AbortSignal | undefined, cancellationMessage: string): Promise<T>;
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a,b}from"./chunk-Z5KICK5X.js";import"./chunk-MROECM42.js";import"./chunk-ABM5WFEO.js";import"./chunk-LG6IN6SW.js";import"./chunk-IKUY74NG.js";import"./chunk-VGSRQOLD.js";import"./chunk-VLWZ6L7C.js";import"./chunk-QKWMWSV3.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as awkCommand2,b as flagsForFuzzing};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a,b}from"./chunk-UHNV55NF.js";import"./chunk-O74FSWB4.js";import"./chunk-74TZ7ZF7.js";import"./chunk-HWI42GQO.js";import"./chunk-7JZKVC3F.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as base64Command,b as flagsForFuzzing};
3
+ import{a,b}from"./chunk-HRKG3ZK2.js";import"./chunk-O74FSWB4.js";import"./chunk-IKUY74NG.js";import"./chunk-VGSRQOLD.js";import"./chunk-7JZKVC3F.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as base64Command,b as flagsForFuzzing};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a,b}from"./chunk-EXGPMLIE.js";import"./chunk-O74FSWB4.js";import"./chunk-74TZ7ZF7.js";import"./chunk-HWI42GQO.js";import"./chunk-7JZKVC3F.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as catCommand,b as flagsForFuzzing};
3
+ import{a,b}from"./chunk-VBU3UEG5.js";import"./chunk-O74FSWB4.js";import"./chunk-IKUY74NG.js";import"./chunk-VGSRQOLD.js";import"./chunk-7JZKVC3F.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as catCommand,b as flagsForFuzzing};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a,b}from"./chunk-VKTV45AP.js";import"./chunk-74TZ7ZF7.js";import"./chunk-HWI42GQO.js";import"./chunk-CPTQXTBJ.js";import"./chunk-H4BRFPKY.js";import"./chunk-43E7AR6A.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as chmodCommand,b as flagsForFuzzing};
3
+ import{a,b}from"./chunk-TQXLQEIT.js";import"./chunk-IKUY74NG.js";import"./chunk-VGSRQOLD.js";import"./chunk-QKWMWSV3.js";import"./chunk-X45GP3AQ.js";import"./chunk-43E7AR6A.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as chmodCommand,b as flagsForFuzzing};
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{b as E}from"./chunk-CPKBPQ2C.js";import{a as M}from"./chunk-NE4R2FVV.js";import{a as A,b as j}from"./chunk-MUFNRCMY.js";var S=class{diff(t,o,e={}){let i;typeof e=="function"?(i=e,e={}):"callback"in e&&(i=e.callback);let s=this.castInput(t,e),f=this.castInput(o,e),a=this.removeEmpty(this.tokenize(s,e)),n=this.removeEmpty(this.tokenize(f,e));return this.diffWithOptionsObj(a,n,e,i)}diffWithOptionsObj(t,o,e,i){var s;let f=d=>{if(d=this.postProcess(d,e),i){setTimeout(function(){i(d)},0);return}else return d},a=o.length,n=t.length,u=1,l=a+n;e.maxEditLength!=null&&(l=Math.min(l,e.maxEditLength));let c=(s=e.timeout)!==null&&s!==void 0?s:1/0,m=Date.now()+c,h=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(h[0],o,t,0,e);if(h[0].oldPos+1>=n&&p+1>=a)return f(this.buildValues(h[0].lastComponent,o,t));let C=-1/0,w=1/0,P=()=>{for(let d=Math.max(C,-u);d<=Math.min(w,u);d+=2){let x,y=h[d-1],v=h[d+1];y&&(h[d-1]=void 0);let $=!1;if(v){let I=v.oldPos-d;$=v&&0<=I&&I<a}let N=y&&y.oldPos+1<n;if(!$&&!N){h[d]=void 0;continue}if(!N||$&&y.oldPos<v.oldPos?x=this.addToPath(v,!0,!1,0,e):x=this.addToPath(y,!1,!0,1,e),p=this.extractCommon(x,o,t,d,e),x.oldPos+1>=n&&p+1>=a)return f(this.buildValues(x.lastComponent,o,t))||!0;h[d]=x,x.oldPos+1>=n&&(w=Math.min(w,d-1)),p+1>=a&&(C=Math.max(C,d+1))}u++};if(i)(function d(){setTimeout(function(){if(u>l||Date.now()>m)return i(void 0);P()||d()},0)})();else for(;u<=l&&Date.now()<=m;){let d=P();if(d)return d}}addToPath(t,o,e,i,s){let f=t.lastComponent;return f&&!s.oneChangePerToken&&f.added===o&&f.removed===e?{oldPos:t.oldPos+i,lastComponent:{count:f.count+1,added:o,removed:e,previousComponent:f.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:o,removed:e,previousComponent:f}}}extractCommon(t,o,e,i,s){let f=o.length,a=e.length,n=t.oldPos,u=n-i,l=0;for(;u+1<f&&n+1<a&&this.equals(e[n+1],o[u+1],s);)u++,n++,l++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return l&&!s.oneChangePerToken&&(t.lastComponent={count:l,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=n,u}equals(t,o,e){return e.comparator?e.comparator(t,o):t===o||!!e.ignoreCase&&t.toLowerCase()===o.toLowerCase()}removeEmpty(t){let o=[];for(let e=0;e<t.length;e++)t[e]&&o.push(t[e]);return o}castInput(t,o){return t}tokenize(t,o){return Array.from(t)}join(t){return t.join("")}postProcess(t,o){return t}get useLongestToken(){return!1}buildValues(t,o,e){let i=[],s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();let f=i.length,a=0,n=0,u=0;for(;a<f;a++){let l=i[a];if(l.removed)l.value=this.join(e.slice(u,u+l.count)),u+=l.count;else{if(!l.added&&this.useLongestToken){let c=o.slice(n,n+l.count);c=c.map(function(m,h){let p=e[u+h];return p.length>m.length?p:m}),l.value=this.join(c)}else l.value=this.join(o.slice(n,n+l.count));n+=l.count,l.added||(u+=l.count)}}return i}};var b=class extends S{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}},z=new b;function T(r,t,o){return z.diff(r,t,o)}var Y=`\
4
+ `,D=3;function F(r){if(r==="")return{lines:[],noEol:!1};let t=!r.endsWith(`
5
+ `),o=r.split(`
6
+ `);return t||o.pop(),{lines:o,noEol:t}}function O(r,t){let o=r.lines.length-1;return r.lines.map((e,i)=>{let s=i===o&&r.noEol?e:`${e}
7
+ `;return t?s.toLowerCase():s})}function q(r,t,o){let e=T(O(r,o),O(t,o)),i=[],s=0,f=0,a=0;for(;a<e.length;){let n=e[a];if(!n.added&&!n.removed){s+=n.count??n.value.length,f+=n.count??n.value.length,a++;continue}let u={oldStart:s,oldCount:0,newStart:f,newCount:0};for(;a<e.length&&(e[a].added||e[a].removed);){let l=e[a].count??e[a].value.length;e[a].removed?(u.oldCount+=l,s+=l):(u.newCount+=l,f+=l),a++}i.push(u)}return i}function L(r){if(!/[\s"\u0000-\u001f\u007f]/.test(r))return r;let t='"';for(let o of r)o==='"'||o==="\\"?t+=`\\${o}`:o===" "?t+="\\t":o===`
8
+ `?t+="\\n":o==="\r"?t+="\\r":o<" "||o==="\x7F"?t+=`\\${o.charCodeAt(0).toString(8).padStart(3,"0")}`:t+=o;return`${t}"`}function g(r,t,o,e){r.push(`${e}${t.lines[o]}
9
+ `),t.noEol&&o===t.lines.length-1&&r.push(Y)}function W(r,t){return t===0?String(r):t===1?String(r+1):`${r+1},${r+t}`}function U(r,t,o){let e=[];for(let i of o){let s=i.oldCount===0?"a":i.newCount===0?"d":"c";e.push(`${W(i.oldStart,i.oldCount)}${s}${W(i.newStart,i.newCount)}
10
+ `);for(let f=0;f<i.oldCount;f++)g(e,r,i.oldStart+f,"< ");s==="c"&&e.push(`---
11
+ `);for(let f=0;f<i.newCount;f++)g(e,t,i.newStart+f,"> ")}return e.join("")}function k(r,t){let o=[],e=[];for(let i of r){let s=e[e.length-1];s&&i.oldStart-(s.oldStart+s.oldCount)>2*t&&(o.push(e),e=[]),e.push(i)}return e.length>0&&o.push(e),o}function V(r,t,o,e){let i=r[0],s=r[r.length-1];return{oldFrom:Math.max(0,i.oldStart-e),oldTo:Math.min(t.lines.length,s.oldStart+s.oldCount+e),newFrom:Math.max(0,i.newStart-e),newTo:Math.min(o.lines.length,s.newStart+s.newCount+e)}}function _(r,t){let o=t-r;return o===0?`${r},0`:o===1?String(r+1):`${r+1},${o}`}function X(r,t,o,e,i,s){let f=[`--- ${L(r)}
12
+ `,`+++ ${L(t)}
13
+ `];for(let a of k(i,s)){let n=V(a,o,e,s);f.push(`@@ -${_(n.oldFrom,n.oldTo)} +${_(n.newFrom,n.newTo)} @@
14
+ `);let u=n.oldFrom;for(let l of a){for(;u<l.oldStart;u++)g(f,o,u," ");for(let c=0;c<l.oldCount;c++)g(f,o,l.oldStart+c,"-");for(let c=0;c<l.newCount;c++)g(f,e,l.newStart+c,"+");u=l.oldStart+l.oldCount}for(;u<n.oldTo;u++)g(f,o,u," ")}return f.join("")}function H(r,t){let o=t-r;return o===0?String(r):o===1?String(r+1):`${r+1},${t}`}function R(r,t,o,e,i,s){if(!o.some(n=>(s?n.oldCount:n.newCount)>0))return;let a=e;for(let n of o){let u=s?n.oldStart:n.newStart,l=s?n.oldCount:n.newCount;for(;a<u;a++)g(r,t,a," ");let c=n.oldCount>0&&n.newCount>0?"! ":s?"- ":"+ ";for(let m=0;m<l;m++)g(r,t,u+m,c);a=u+l}for(;a<i;a++)g(r,t,a," ")}function B(r,t,o,e,i,s){let f=[`*** ${L(r)}
15
+ `,`--- ${L(t)}
16
+ `];for(let a of k(i,s)){let n=V(a,o,e,s);f.push(`***************
17
+ `),f.push(`*** ${H(n.oldFrom,n.oldTo)} ****
18
+ `),R(f,o,a,n.oldFrom,n.oldTo,!0),f.push(`--- ${H(n.newFrom,n.newTo)} ----
19
+ `),R(f,e,a,n.newFrom,n.newTo,!1)}return f.join("")}var G={name:"diff",summary:"compare files line by line",usage:"diff [OPTION]... FILE1 FILE2",options:[" --normal output a normal diff (default)","-u, --unified output a unified diff","-c, --context output a context diff","-q, --brief report only whether files differ","-s, --report-identical-files report when files are the same","-i, --ignore-case ignore case differences"," --version output version information and exit"," --help display this help and exit"]},K={normal:{long:"normal",type:"boolean"},unified:{short:"u",long:"unified",type:"boolean"},context:{short:"c",long:"context",type:"boolean"},brief:{short:"q",long:"brief",type:"boolean"},reportSame:{short:"s",long:"report-identical-files",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"},version:{long:"version",type:"boolean"}},ft={name:"diff",async execute(r,t){if(j(r))return A(G);let o=M("diff",r,K);if(!o.ok)return o.error;let e=o.result.flags;if(e.version)return{stdout:`diff (just-bash)
20
+ `,stderr:"",exitCode:0};if(Number(e.normal)+Number(e.unified)+Number(e.context)>1)return{stdout:"",stderr:`diff: conflicting output style options
21
+ diff: Try 'diff --help' for more information.
22
+ `,exitCode:2};let s=e.brief,f=e.reportSame,a=e.ignoreCase,n=o.result.positional;if(n.length<2)return{stdout:"",stderr:`diff: missing operand
23
+ `,exitCode:2};let u,l,[c,m]=n;try{u=c==="-"?E(t.stdin):await t.fs.readFile(t.fs.resolvePath(t.cwd,c))}catch{return{stdout:"",stderr:`diff: ${c}: No such file or directory
24
+ `,exitCode:2}}try{l=m==="-"?E(t.stdin):await t.fs.readFile(t.fs.resolvePath(t.cwd,m))}catch{return{stdout:"",stderr:`diff: ${m}: No such file or directory
25
+ `,exitCode:2}}let h=u,p=l;if(a&&(h=h.toLowerCase(),p=p.toLowerCase()),h===p)return f?{stdout:`Files ${c} and ${m} are identical
26
+ `,stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0};if(s)return{stdout:`Files ${c} and ${m} differ
27
+ `,stderr:"",exitCode:1};let C=F(u),w=F(l),P=q(C,w,a),d;return e.unified?d=X(c,m,C,w,P,D):e.context?d=B(c,m,C,w,P,D):d=U(C,w,P),{stdout:d,stderr:"",exitCode:1}}},at={name:"diff",flags:[{flag:"--normal",type:"boolean"},{flag:"-u",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-i",type:"boolean"}],needsArgs:!0,minArgs:2};export{ft as a,at as b};
@@ -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 w}from"./chunk-QES5OSUC.js";import{a as m}from"./chunk-74TZ7ZF7.js";import{d as v}from"./chunk-CPTQXTBJ.js";import{e as B}from"./chunk-H4BRFPKY.js";import{l as z}from"./chunk-LCP3IKI7.js";import{a as L}from"./chunk-NE4R2FVV.js";import{a as F,b as E}from"./chunk-MUFNRCMY.js";import{constants as C,gunzipSync as _,gzipSync as A}from"node:zlib";var D={name:"gzip",summary:"compress or expand files",usage:"gzip [OPTION]... [FILE]...",description:`Compress FILEs (by default, in-place).
3
+ import{a as w}from"./chunk-QES5OSUC.js";import{a as m}from"./chunk-IKUY74NG.js";import{e as v}from"./chunk-QKWMWSV3.js";import{e as B}from"./chunk-X45GP3AQ.js";import{l as z}from"./chunk-LCP3IKI7.js";import{a as L}from"./chunk-NE4R2FVV.js";import{a as F,b as E}from"./chunk-MUFNRCMY.js";import{constants as C,gunzipSync as _,gzipSync as A}from"node:zlib";var D={name:"gzip",summary:"compress or expand files",usage:"gzip [OPTION]... [FILE]...",description:`Compress FILEs (by default, in-place).
4
4
 
5
5
  When no FILE is given, or when FILE is -, read from standard input.
6
6
 
@@ -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 k}from"./chunk-KP2UH5CJ.js";import{a as v}from"./chunk-74TZ7ZF7.js";import{a as y,b,d as S}from"./chunk-CPTQXTBJ.js";import{l as h}from"./chunk-LCP3IKI7.js";import{a as w,b as $}from"./chunk-CPKBPQ2C.js";import{c as L}from"./chunk-DN2YCFOR.js";var g=class extends S{constructor(t){super(t,"xan")}};var C=L(k(),1);var V=class{ctx;site;rows=0;cells=0;constructor(t,i){this.ctx=t,this.site=i}consumeWork(t=1){this.ctx.executionScope?.consumeWork(t,this.site)}addRow(t){this.addRows(1,t)}addRows(t,i){let r=b(t,i,this.site);if(!Number.isSafeInteger(t)||t<0||!Number.isSafeInteger(i)||i<0||i>this.ctx.limits.maxArrayElements||t>Math.min(this.ctx.limits.maxCsvRows,this.ctx.limits.maxArrayElements)-this.rows||r>this.ctx.limits.maxCsvCells-this.cells)throw new h(`${this.site}: derived CSV result limit exceeded`,"array_elements");this.consumeWork(b(t,y(1,i,this.site),this.site)),this.rows+=t,this.cells+=r}};function I(){return Object.create(null)}function j(n,t,i){n[t]=i}function W(n){let t=I();for(let i of Object.keys(n)){let r=n[i];(typeof r=="string"||typeof r=="number"||typeof r=="boolean"||r===null)&&(t[i]=r)}return t}function z(n,t={}){let i=t.maxStringLength??10485760,r=t.maxArrayElements??1e5,a=t.maxRows??r,f=t.maxCells??1e7;if(w(n)>i)throw new h(`xan: CSV input size limit exceeded (${i} bytes)`,"string_length");let d=[],m=n.trim(),o=C.default.parse(m,{preview:1,skipEmptyLines:!0}).data[0]??[];if(o.length>r)throw new h(`xan: CSV column limit exceeded (${r})`,"array_elements");let p=0,s;if(C.default.parse(m,{header:!0,dynamicTyping:!0,skipEmptyLines:!0,step:(e,l)=>{let u=Object.keys(e.data);if(d.length===0&&e.meta.fields){if(e.meta.fields.length>r){s=new h(`xan: CSV column limit exceeded (${r})`,"array_elements"),l.abort();return}o=[...e.meta.fields]}if(d.length>=a||u.length>f-p){s=new h(d.length>=a?`xan: CSV row limit exceeded (${a})`:`xan: CSV cell limit exceeded (${f})`,"array_elements"),l.abort();return}p+=u.length,d.push(W(e.data))}}),s)throw s;return{headers:o,data:d}}function H(n,t={}){let i=t.maxStringLength??10485760,r=t.maxArrayElements??1e5,a=t.maxRows??r,f=t.maxCells??1e7;if(w(n)>i)throw new h(`xan: CSV input size limit exceeded (${i} bytes)`,"string_length");let d=[],m=0,c;if(C.default.parse(n.trim(),{header:!1,dynamicTyping:!1,skipEmptyLines:!0,step:(o,p)=>{let s=o.data;if(d.length>=a||s.length>r||s.length>f-m){c=new h(d.length>=a?`xan: CSV row limit exceeded (${a})`:s.length>r?`xan: CSV column limit exceeded (${r})`:`xan: CSV cell limit exceeded (${f})`,"array_elements"),p.abort();return}m+=s.length,d.push(s)}}),c)throw c;return d}function P(n,t,i){return E(t.length,n.length,(r,a)=>t[r][n[a]],i,n)}function q(n,t,i){return E(t.length,n.length,(r,a)=>t[r][n[a]],i)}function G(n,t,i){return E(n.length,void 0,(r,a)=>n[r][a],t,i,r=>n[r].length)}function E(n,t,i,r,a,f=()=>t??0){let d=r?.limits.maxOutputSize??Number.MAX_SAFE_INTEGER,m=new S(d,"xan CSV output",r?()=>new h(`xan: output size limit exceeded (${d} bytes)`,"output_size"):void 0),c=p=>{let s=p==null?"":String(p),e=0;for(let x=0;x<s.length;x++)s.charCodeAt(x)===34&&e++;let l=e>0||s.includes("\r")||s.includes(`
3
+ import{a as k}from"./chunk-KP2UH5CJ.js";import{a as v}from"./chunk-IKUY74NG.js";import{a as y,b,e as S}from"./chunk-QKWMWSV3.js";import{l as h}from"./chunk-LCP3IKI7.js";import{a as w,b as $}from"./chunk-CPKBPQ2C.js";import{c as L}from"./chunk-DN2YCFOR.js";var g=class extends S{constructor(t){super(t,"xan")}};var C=L(k(),1);var V=class{ctx;site;rows=0;cells=0;constructor(t,i){this.ctx=t,this.site=i}consumeWork(t=1){this.ctx.executionScope?.consumeWork(t,this.site)}addRow(t){this.addRows(1,t)}addRows(t,i){let r=b(t,i,this.site);if(!Number.isSafeInteger(t)||t<0||!Number.isSafeInteger(i)||i<0||i>this.ctx.limits.maxArrayElements||t>Math.min(this.ctx.limits.maxCsvRows,this.ctx.limits.maxArrayElements)-this.rows||r>this.ctx.limits.maxCsvCells-this.cells)throw new h(`${this.site}: derived CSV result limit exceeded`,"array_elements");this.consumeWork(b(t,y(1,i,this.site),this.site)),this.rows+=t,this.cells+=r}};function I(){return Object.create(null)}function j(n,t,i){n[t]=i}function W(n){let t=I();for(let i of Object.keys(n)){let r=n[i];(typeof r=="string"||typeof r=="number"||typeof r=="boolean"||r===null)&&(t[i]=r)}return t}function z(n,t={}){let i=t.maxStringLength??10485760,r=t.maxArrayElements??1e5,a=t.maxRows??r,f=t.maxCells??1e7;if(w(n)>i)throw new h(`xan: CSV input size limit exceeded (${i} bytes)`,"string_length");let d=[],m=n.trim(),o=C.default.parse(m,{preview:1,skipEmptyLines:!0}).data[0]??[];if(o.length>r)throw new h(`xan: CSV column limit exceeded (${r})`,"array_elements");let p=0,s;if(C.default.parse(m,{header:!0,dynamicTyping:!0,skipEmptyLines:!0,step:(e,l)=>{let u=Object.keys(e.data);if(d.length===0&&e.meta.fields){if(e.meta.fields.length>r){s=new h(`xan: CSV column limit exceeded (${r})`,"array_elements"),l.abort();return}o=[...e.meta.fields]}if(d.length>=a||u.length>f-p){s=new h(d.length>=a?`xan: CSV row limit exceeded (${a})`:`xan: CSV cell limit exceeded (${f})`,"array_elements"),l.abort();return}p+=u.length,d.push(W(e.data))}}),s)throw s;return{headers:o,data:d}}function H(n,t={}){let i=t.maxStringLength??10485760,r=t.maxArrayElements??1e5,a=t.maxRows??r,f=t.maxCells??1e7;if(w(n)>i)throw new h(`xan: CSV input size limit exceeded (${i} bytes)`,"string_length");let d=[],m=0,c;if(C.default.parse(n.trim(),{header:!1,dynamicTyping:!1,skipEmptyLines:!0,step:(o,p)=>{let s=o.data;if(d.length>=a||s.length>r||s.length>f-m){c=new h(d.length>=a?`xan: CSV row limit exceeded (${a})`:s.length>r?`xan: CSV column limit exceeded (${r})`:`xan: CSV cell limit exceeded (${f})`,"array_elements"),p.abort();return}m+=s.length,d.push(s)}}),c)throw c;return d}function P(n,t,i){return E(t.length,n.length,(r,a)=>t[r][n[a]],i,n)}function q(n,t,i){return E(t.length,n.length,(r,a)=>t[r][n[a]],i)}function G(n,t,i){return E(n.length,void 0,(r,a)=>n[r][a],t,i,r=>n[r].length)}function E(n,t,i,r,a,f=()=>t??0){let d=r?.limits.maxOutputSize??Number.MAX_SAFE_INTEGER,m=new S(d,"xan CSV output",r?()=>new h(`xan: output size limit exceeded (${d} bytes)`,"output_size"):void 0),c=p=>{let s=p==null?"":String(p),e=0;for(let x=0;x<s.length;x++)s.charCodeAt(x)===34&&e++;let l=e>0||s.includes("\r")||s.includes(`
4
4
  `)||s.includes(",")||s.includes("\uFEFF")||s.startsWith(" ")||s.endsWith(" ");m.reserve(y(w(s),y(e,l?2:0,"xan CSV output"),"xan CSV output"));let u=e>0?s.replace(/"/g,'""'):s;m.append(l?`"${u}"`:u)},o=(p,s)=>{for(let e=0;e<s;e++)e>0&&m.append(","),c(i(p,e));m.append(`
5
5
  `)};if(a){for(let p=0;p<a.length;p++)p>0&&m.append(","),c(a[p]);m.append(`
6
6
  `)}for(let p=0;p<n;p++)r?.executionScope?.throwIfAborted("xan CSV output"),o(p,t??f(p));return m.build()}async function R(n,t){let i=n.find(d=>!d.startsWith("-")),r;if(!i||i==="-")r=$(t.stdin);else try{let d=t.fs.resolvePath(t.cwd,i);r=await t.fs.readFile(d)}catch(d){return v(d),{headers:[],data:[],error:{stdout:"",stderr:`xan: ${i}: No such file or directory