@jerryan/just-bash 3.9.0 → 3.11.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 (446) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/README.md +2 -2
  3. package/dist/AGENTS.md +2 -2
  4. package/dist/abort-signals.d.ts +10 -0
  5. package/dist/bin/chunks/awk2-LCV2AUIX.js +3 -0
  6. package/dist/bin/{shell/chunks/base64-TQ5KOCNW.js → chunks/base64-OLYCF2PC.js} +1 -1
  7. package/dist/bin/chunks/builtin-manifest-ORBIZM7I.js +3 -0
  8. package/dist/bin/chunks/{cat-BQ7FQTN5.js → cat-UJLF2DU2.js} +1 -1
  9. package/dist/bin/{shell/chunks/chmod-GX5SYTRL.js → chunks/chmod-V5F4BXZ2.js} +1 -1
  10. package/dist/bin/{shell/chunks/chunk-V4S4A7M6.js → chunks/chunk-2TEF4USR.js} +1 -1
  11. package/dist/bin/{shell/chunks/chunk-GBKR5KTT.js → chunks/chunk-3ASHUC7C.js} +13 -13
  12. package/dist/bin/chunks/{chunk-N26Y42L6.js → chunk-3M5OMKFS.js} +1 -1
  13. package/dist/bin/chunks/chunk-4NYJ4ZTO.js +17 -0
  14. package/dist/bin/chunks/{chunk-M3Z5NZXT.js → chunk-572NXISH.js} +1 -1
  15. package/dist/bin/chunks/chunk-5NWK7A4R.js +13 -0
  16. package/dist/bin/{shell/chunks/chunk-YXPSX3SI.js → chunks/chunk-623Q77WZ.js} +1 -1
  17. package/dist/bin/chunks/chunk-6NG4ULJM.js +7 -0
  18. package/dist/bin/{shell/chunks/chunk-QFOXSCOD.js → chunks/chunk-726WDFMQ.js} +1 -1
  19. package/dist/bin/chunks/{chunk-DRPHNXG7.js → chunk-7LGT4LHQ.js} +1 -1
  20. package/dist/bin/chunks/{chunk-MBREBDZQ.js → chunk-AIWBN36Z.js} +1 -1
  21. package/dist/bin/chunks/{chunk-3ROYEBJI.js → chunk-AJ3CSZ34.js} +1 -1
  22. package/dist/bin/{shell/chunks/chunk-VTAMGD42.js → chunks/chunk-APEQNYAO.js} +1 -1
  23. package/dist/bin/chunks/chunk-AQKIHX3Q.js +3 -0
  24. package/dist/bin/chunks/chunk-BFLKIASG.js +7 -0
  25. package/dist/bin/chunks/{chunk-IOKQFPM6.js → chunk-BRB5PJ3E.js} +1 -1
  26. package/dist/bin/chunks/{chunk-ZVG47PYA.js → chunk-BVBYPYA5.js} +1 -1
  27. package/dist/bin/chunks/{chunk-T6OIISUC.js → chunk-BZJ77YQD.js} +1 -1
  28. package/dist/bin/{shell/chunks/chunk-GR4ZHKXI.js → chunks/chunk-C2BLJ3AE.js} +1 -1
  29. package/dist/bin/{shell/chunks/chunk-KMYJMEON.js → chunks/chunk-C45GTJTD.js} +1 -1
  30. package/dist/bin/chunks/{chunk-GOWX7VPU.js → chunk-CTS7QXCJ.js} +1 -1
  31. package/dist/bin/chunks/{chunk-42AMF6EE.js → chunk-DTNGYQCJ.js} +1 -1
  32. package/dist/bin/chunks/{chunk-TW2IJRUF.js → chunk-ENEHPI32.js} +1 -1
  33. package/dist/bin/{shell/chunks/chunk-E54Z6VIE.js → chunks/chunk-ERYPQAZE.js} +5 -5
  34. package/dist/bin/chunks/{chunk-PQ2INDRF.js → chunk-GB3KUAFV.js} +1 -1
  35. package/dist/bin/chunks/chunk-HFVQCXYX.js +10 -0
  36. package/dist/bin/chunks/chunk-HSWCKN2X.js +14 -0
  37. package/dist/bin/chunks/{chunk-B6WWC6K3.js → chunk-I6MS5ZWE.js} +1 -1
  38. package/dist/bin/chunks/{chunk-V4U26ZWL.js → chunk-IOFXLMNJ.js} +1 -1
  39. package/dist/bin/chunks/chunk-IX6QY5JW.js +5 -0
  40. package/dist/bin/chunks/{chunk-QKJAAJ7J.js → chunk-IXTPVJ6W.js} +1 -1
  41. package/dist/bin/chunks/{chunk-OUQKFRVR.js → chunk-JBYLHCKP.js} +1 -1
  42. package/dist/bin/chunks/{chunk-NXUXZWS5.js → chunk-JLRB7DV3.js} +1 -1
  43. package/dist/bin/chunks/{chunk-6JEDM6CZ.js → chunk-KH6YLKPE.js} +1 -1
  44. package/dist/bin/chunks/chunk-KXSDVBJA.js +12 -0
  45. package/dist/bin/chunks/{chunk-DYIBFLS3.js → chunk-LOU52GPJ.js} +2 -2
  46. package/dist/bin/chunks/{chunk-L345YZ6R.js → chunk-LVT5R45K.js} +1 -1
  47. package/dist/bin/chunks/{chunk-PTUQEN6I.js → chunk-M345X45Z.js} +7 -7
  48. package/dist/bin/chunks/{chunk-6FGMEZZP.js → chunk-NDS7PYKD.js} +1 -1
  49. package/dist/bin/chunks/chunk-O3PNT72D.js +3 -0
  50. package/dist/bin/chunks/chunk-OGOISDGZ.js +3 -0
  51. package/dist/bin/chunks/chunk-OSW4MDDH.js +21 -0
  52. package/dist/bin/{shell/chunks/chunk-ABP4OLJV.js → chunks/chunk-OXEDIWNZ.js} +1 -1
  53. package/dist/bin/chunks/{chunk-FPWHWWXO.js → chunk-OXV2B2YS.js} +1 -1
  54. package/dist/bin/chunks/{chunk-QMPZXXEK.js → chunk-OY25E3ZN.js} +1 -1
  55. package/dist/bin/chunks/{chunk-O2BCKSMK.js → chunk-PEJXCXSY.js} +1 -1
  56. package/dist/bin/{shell/chunks/chunk-6KHZX4HU.js → chunks/chunk-PLLMJHMV.js} +1 -1
  57. package/dist/bin/{shell/chunks/chunk-6TUILMPB.js → chunks/chunk-QELDDRV5.js} +1 -1
  58. package/dist/bin/chunks/{chunk-3FQBUEB6.js → chunk-RC4UXNHA.js} +1 -1
  59. package/dist/bin/{shell/chunks/chunk-H7PD6FLC.js → chunks/chunk-RE7Z53A3.js} +1 -1
  60. package/dist/bin/chunks/chunk-SCQRBEQW.js +275 -0
  61. package/dist/bin/chunks/{chunk-3DWQCLNP.js → chunk-SS2OPV62.js} +1 -1
  62. package/dist/bin/{shell/chunks/chunk-CC2AQ6B7.js → chunks/chunk-U6JTVQU6.js} +1 -1
  63. package/dist/bin/chunks/chunk-UBA7DOWE.js +3 -0
  64. package/dist/bin/chunks/{chunk-VPSBWWXM.js → chunk-UFAYH3WW.js} +7 -6
  65. package/dist/bin/chunks/chunk-UPUFWGHR.js +3 -0
  66. package/dist/bin/{shell/chunks/chunk-QJWFCA7P.js → chunks/chunk-UU42WPB7.js} +1 -1
  67. package/dist/bin/chunks/{chunk-CNVNOT67.js → chunk-UW4E5XU5.js} +1 -1
  68. package/dist/bin/chunks/chunk-VMVXACZ5.js +6 -0
  69. package/dist/bin/chunks/chunk-WLQ2KWS3.js +10 -0
  70. package/dist/bin/chunks/{chunk-MVBK66TR.js → chunk-WPJ5CECR.js} +1 -1
  71. package/dist/bin/chunks/{chunk-ANX7U57Q.js → chunk-XBOBVLRL.js} +2 -2
  72. package/dist/bin/chunks/{chunk-HZGHQZSY.js → chunk-Z3MXFCN7.js} +1 -1
  73. package/dist/bin/chunks/{column-AJFK3TWF.js → column-AL4LR5PO.js} +1 -1
  74. package/dist/bin/chunks/{cp-YLP7ULVT.js → cp-XJWV46T5.js} +1 -1
  75. package/dist/bin/{shell/chunks/curl-NHNZ46BU.js → chunks/curl-HZ5SBTVY.js} +11 -11
  76. package/dist/bin/chunks/{cut-42X6363P.js → cut-LNJEMWBJ.js} +1 -1
  77. package/dist/bin/{shell/chunks/diff-DM47S5PT.js → chunks/diff-YLVT27CZ.js} +1 -1
  78. package/dist/bin/chunks/dist-4NZ74CRE.js +141 -0
  79. package/dist/bin/chunks/{du-DH76GZJ3.js → du-YNAJTGCR.js} +1 -1
  80. package/dist/bin/chunks/{expr-PQEPO5TE.js → expr-GLGO2VEZ.js} +1 -1
  81. package/dist/bin/chunks/{file-JA7QI2YT.js → file-7M5LLZJY.js} +1 -1
  82. package/dist/bin/chunks/find-3QDGII35.js +3 -0
  83. package/dist/bin/chunks/flag-coverage-AGEO3F6X.js +3 -0
  84. package/dist/bin/chunks/{grep-VXWNMIDD.js → grep-AZJ2CMYE.js} +1 -1
  85. package/dist/bin/chunks/{gzip-UQZL4R74.js → gzip-W5CL2E2W.js} +1 -1
  86. package/dist/bin/{shell/chunks/head-QKVY3SIO.js → chunks/head-ABLEKDMV.js} +1 -1
  87. package/dist/bin/{shell/chunks/help-HVIDHJ6M.js → chunks/help-EXVKU23F.js} +1 -1
  88. package/dist/bin/chunks/{html-to-markdown-XUMA42ZC.js → html-to-markdown-FDNPIEKZ.js} +1 -1
  89. package/dist/bin/{shell/chunks/jq-YS4PR46D.js → chunks/jq-5SOTL7D7.js} +1 -1
  90. package/dist/bin/chunks/{js-exec-ZAAIZQWI.js → js-exec-LISDW7YC.js} +2 -2
  91. package/dist/bin/chunks/js-exec-worker.js +1 -0
  92. package/dist/bin/chunks/{ls-5Z45FV4U.js → ls-EEX3YIOF.js} +1 -1
  93. package/dist/bin/chunks/mkdir-KDEZTR53.js +3 -0
  94. package/dist/bin/chunks/mktemp-OYQYUB5H.js +3 -0
  95. package/dist/bin/{shell/chunks/mv-EOOP2TO3.js → chunks/mv-35V6IA5V.js} +1 -1
  96. package/dist/bin/{shell/chunks/od-2GXD4D5K.js → chunks/od-TD5LZDUM.js} +1 -1
  97. package/dist/bin/{shell/chunks/paste-DWWA3JTW.js → chunks/paste-QJG6BYAP.js} +1 -1
  98. package/dist/bin/chunks/{python3-TJ6DCPIA.js → python3-P6MZ44HK.js} +5 -5
  99. package/dist/bin/{shell/chunks/readlink-EJ3IKLWW.js → chunks/readlink-BF435HNQ.js} +1 -1
  100. package/dist/bin/chunks/rg-B2DVJQVY.js +3 -0
  101. package/dist/bin/chunks/rm-HCMKNRM2.js +3 -0
  102. package/dist/bin/{shell/chunks/rmdir-PRNISPBA.js → chunks/rmdir-WGVUYGPF.js} +1 -1
  103. package/dist/bin/{shell/chunks/sed-SY63U2YX.js → chunks/sed-66XZQ75T.js} +1 -1
  104. package/dist/bin/chunks/{seq-X2EAOGV5.js → seq-KBVCQ4WT.js} +1 -1
  105. package/dist/bin/chunks/{sleep-MOJQBZMY.js → sleep-4O22Z4DI.js} +1 -1
  106. package/dist/bin/{shell/chunks/split-HIFKSV2A.js → chunks/split-OK6JHDWZ.js} +1 -1
  107. package/dist/bin/chunks/sqlite3-57ACN7ES.js +3 -0
  108. package/dist/bin/chunks/{stat-LROLDXHH.js → stat-VNNI7JDZ.js} +1 -1
  109. package/dist/bin/chunks/{tail-UOTUV25D.js → tail-PAHZX3MA.js} +1 -1
  110. package/dist/bin/chunks/{tar-7XOP7VOX.js → tar-RPVTXGFJ.js} +1 -1
  111. package/dist/bin/chunks/{time-LF7BTSK5.js → time-J2DAZUIN.js} +1 -1
  112. package/dist/bin/chunks/timeout-XMTXHNFF.js +3 -0
  113. package/dist/bin/{shell/chunks/tr-PVFO6FRY.js → chunks/tr-ETPC3LHV.js} +1 -1
  114. package/dist/bin/chunks/{which-4TPGVSBZ.js → which-G7X54RZL.js} +1 -1
  115. package/dist/bin/chunks/worker.js +5 -0
  116. package/dist/bin/chunks/{xan-RMH6JEXM.js → xan-XZHKEPJ4.js} +1 -1
  117. package/dist/bin/chunks/{xan-view-PD26QEFN.js → xan-view-CNGKCABE.js} +1 -1
  118. package/dist/bin/chunks/yes-2EQTNSIB.js +3 -0
  119. package/dist/bin/chunks/yq-T6S3IDKY.js +3 -0
  120. package/dist/bin/just-bash.js +299 -293
  121. package/dist/bin/shell/chunks/awk2-LCV2AUIX.js +3 -0
  122. package/dist/bin/{chunks/base64-TQ5KOCNW.js → shell/chunks/base64-OLYCF2PC.js} +1 -1
  123. package/dist/bin/shell/chunks/builtin-manifest-ORBIZM7I.js +3 -0
  124. package/dist/bin/shell/chunks/{cat-BQ7FQTN5.js → cat-UJLF2DU2.js} +1 -1
  125. package/dist/bin/{chunks/chmod-GX5SYTRL.js → shell/chunks/chmod-V5F4BXZ2.js} +1 -1
  126. package/dist/bin/{chunks/chunk-V4S4A7M6.js → shell/chunks/chunk-2TEF4USR.js} +1 -1
  127. package/dist/bin/{chunks/chunk-GBKR5KTT.js → shell/chunks/chunk-3ASHUC7C.js} +13 -13
  128. package/dist/bin/shell/chunks/{chunk-N26Y42L6.js → chunk-3M5OMKFS.js} +1 -1
  129. package/dist/bin/shell/chunks/chunk-4NYJ4ZTO.js +17 -0
  130. package/dist/bin/shell/chunks/{chunk-M3Z5NZXT.js → chunk-572NXISH.js} +1 -1
  131. package/dist/bin/shell/chunks/chunk-5NWK7A4R.js +13 -0
  132. package/dist/bin/{chunks/chunk-YXPSX3SI.js → shell/chunks/chunk-623Q77WZ.js} +1 -1
  133. package/dist/bin/shell/chunks/chunk-6NG4ULJM.js +7 -0
  134. package/dist/bin/{chunks/chunk-QFOXSCOD.js → shell/chunks/chunk-726WDFMQ.js} +1 -1
  135. package/dist/bin/shell/chunks/{chunk-DRPHNXG7.js → chunk-7LGT4LHQ.js} +1 -1
  136. package/dist/bin/shell/chunks/{chunk-MBREBDZQ.js → chunk-AIWBN36Z.js} +1 -1
  137. package/dist/bin/shell/chunks/{chunk-3ROYEBJI.js → chunk-AJ3CSZ34.js} +1 -1
  138. package/dist/bin/{chunks/chunk-VTAMGD42.js → shell/chunks/chunk-APEQNYAO.js} +1 -1
  139. package/dist/bin/shell/chunks/chunk-AQKIHX3Q.js +3 -0
  140. package/dist/bin/shell/chunks/chunk-BFLKIASG.js +7 -0
  141. package/dist/bin/shell/chunks/{chunk-IOKQFPM6.js → chunk-BRB5PJ3E.js} +1 -1
  142. package/dist/bin/shell/chunks/{chunk-ZVG47PYA.js → chunk-BVBYPYA5.js} +1 -1
  143. package/dist/bin/shell/chunks/{chunk-T6OIISUC.js → chunk-BZJ77YQD.js} +1 -1
  144. package/dist/bin/{chunks/chunk-GR4ZHKXI.js → shell/chunks/chunk-C2BLJ3AE.js} +1 -1
  145. package/dist/bin/{chunks/chunk-KMYJMEON.js → shell/chunks/chunk-C45GTJTD.js} +1 -1
  146. package/dist/bin/shell/chunks/{chunk-GOWX7VPU.js → chunk-CTS7QXCJ.js} +1 -1
  147. package/dist/bin/shell/chunks/{chunk-42AMF6EE.js → chunk-DTNGYQCJ.js} +1 -1
  148. package/dist/bin/shell/chunks/{chunk-TW2IJRUF.js → chunk-ENEHPI32.js} +1 -1
  149. package/dist/bin/{chunks/chunk-E54Z6VIE.js → shell/chunks/chunk-ERYPQAZE.js} +5 -5
  150. package/dist/bin/shell/chunks/{chunk-PQ2INDRF.js → chunk-GB3KUAFV.js} +1 -1
  151. package/dist/bin/shell/chunks/chunk-HFVQCXYX.js +10 -0
  152. package/dist/bin/shell/chunks/chunk-HSWCKN2X.js +14 -0
  153. package/dist/bin/shell/chunks/{chunk-B6WWC6K3.js → chunk-I6MS5ZWE.js} +1 -1
  154. package/dist/bin/shell/chunks/{chunk-V4U26ZWL.js → chunk-IOFXLMNJ.js} +1 -1
  155. package/dist/bin/shell/chunks/chunk-IX6QY5JW.js +5 -0
  156. package/dist/bin/shell/chunks/{chunk-QKJAAJ7J.js → chunk-IXTPVJ6W.js} +1 -1
  157. package/dist/bin/shell/chunks/{chunk-OUQKFRVR.js → chunk-JBYLHCKP.js} +1 -1
  158. package/dist/bin/shell/chunks/{chunk-NXUXZWS5.js → chunk-JLRB7DV3.js} +1 -1
  159. package/dist/bin/shell/chunks/{chunk-6JEDM6CZ.js → chunk-KH6YLKPE.js} +1 -1
  160. package/dist/bin/shell/chunks/chunk-KXSDVBJA.js +12 -0
  161. package/dist/bin/shell/chunks/{chunk-DYIBFLS3.js → chunk-LOU52GPJ.js} +2 -2
  162. package/dist/bin/shell/chunks/{chunk-L345YZ6R.js → chunk-LVT5R45K.js} +1 -1
  163. package/dist/bin/shell/chunks/{chunk-PTUQEN6I.js → chunk-M345X45Z.js} +7 -7
  164. package/dist/bin/shell/chunks/{chunk-6FGMEZZP.js → chunk-NDS7PYKD.js} +1 -1
  165. package/dist/bin/shell/chunks/chunk-O3PNT72D.js +3 -0
  166. package/dist/bin/shell/chunks/chunk-OGOISDGZ.js +3 -0
  167. package/dist/bin/shell/chunks/chunk-OSW4MDDH.js +21 -0
  168. package/dist/bin/{chunks/chunk-ABP4OLJV.js → shell/chunks/chunk-OXEDIWNZ.js} +1 -1
  169. package/dist/bin/shell/chunks/{chunk-FPWHWWXO.js → chunk-OXV2B2YS.js} +1 -1
  170. package/dist/bin/shell/chunks/{chunk-QMPZXXEK.js → chunk-OY25E3ZN.js} +1 -1
  171. package/dist/bin/shell/chunks/{chunk-O2BCKSMK.js → chunk-PEJXCXSY.js} +1 -1
  172. package/dist/bin/{chunks/chunk-6KHZX4HU.js → shell/chunks/chunk-PLLMJHMV.js} +1 -1
  173. package/dist/bin/{chunks/chunk-6TUILMPB.js → shell/chunks/chunk-QELDDRV5.js} +1 -1
  174. package/dist/bin/shell/chunks/{chunk-3FQBUEB6.js → chunk-RC4UXNHA.js} +1 -1
  175. package/dist/bin/{chunks/chunk-H7PD6FLC.js → shell/chunks/chunk-RE7Z53A3.js} +1 -1
  176. package/dist/bin/shell/chunks/chunk-SCQRBEQW.js +275 -0
  177. package/dist/bin/shell/chunks/{chunk-3DWQCLNP.js → chunk-SS2OPV62.js} +1 -1
  178. package/dist/bin/{chunks/chunk-CC2AQ6B7.js → shell/chunks/chunk-U6JTVQU6.js} +1 -1
  179. package/dist/bin/shell/chunks/chunk-UBA7DOWE.js +3 -0
  180. package/dist/bin/shell/chunks/{chunk-VPSBWWXM.js → chunk-UFAYH3WW.js} +7 -6
  181. package/dist/bin/shell/chunks/chunk-UPUFWGHR.js +3 -0
  182. package/dist/bin/{chunks/chunk-QJWFCA7P.js → shell/chunks/chunk-UU42WPB7.js} +1 -1
  183. package/dist/bin/shell/chunks/{chunk-CNVNOT67.js → chunk-UW4E5XU5.js} +1 -1
  184. package/dist/bin/shell/chunks/chunk-VMVXACZ5.js +6 -0
  185. package/dist/bin/shell/chunks/chunk-WLQ2KWS3.js +10 -0
  186. package/dist/bin/shell/chunks/{chunk-MVBK66TR.js → chunk-WPJ5CECR.js} +1 -1
  187. package/dist/bin/shell/chunks/{chunk-ANX7U57Q.js → chunk-XBOBVLRL.js} +2 -2
  188. package/dist/bin/shell/chunks/{chunk-HZGHQZSY.js → chunk-Z3MXFCN7.js} +1 -1
  189. package/dist/bin/shell/chunks/{column-AJFK3TWF.js → column-AL4LR5PO.js} +1 -1
  190. package/dist/bin/shell/chunks/{cp-YLP7ULVT.js → cp-XJWV46T5.js} +1 -1
  191. package/dist/bin/{chunks/curl-NHNZ46BU.js → shell/chunks/curl-HZ5SBTVY.js} +11 -11
  192. package/dist/bin/shell/chunks/{cut-42X6363P.js → cut-LNJEMWBJ.js} +1 -1
  193. package/dist/bin/{chunks/diff-DM47S5PT.js → shell/chunks/diff-YLVT27CZ.js} +1 -1
  194. package/dist/bin/shell/chunks/dist-4NZ74CRE.js +141 -0
  195. package/dist/bin/shell/chunks/{du-DH76GZJ3.js → du-YNAJTGCR.js} +1 -1
  196. package/dist/bin/shell/chunks/{expr-PQEPO5TE.js → expr-GLGO2VEZ.js} +1 -1
  197. package/dist/bin/shell/chunks/{file-JA7QI2YT.js → file-7M5LLZJY.js} +1 -1
  198. package/dist/bin/shell/chunks/find-3QDGII35.js +3 -0
  199. package/dist/bin/shell/chunks/flag-coverage-AGEO3F6X.js +3 -0
  200. package/dist/bin/shell/chunks/{grep-VXWNMIDD.js → grep-AZJ2CMYE.js} +1 -1
  201. package/dist/bin/shell/chunks/{gzip-UQZL4R74.js → gzip-W5CL2E2W.js} +1 -1
  202. package/dist/bin/{chunks/head-QKVY3SIO.js → shell/chunks/head-ABLEKDMV.js} +1 -1
  203. package/dist/bin/{chunks/help-HVIDHJ6M.js → shell/chunks/help-EXVKU23F.js} +1 -1
  204. package/dist/bin/shell/chunks/{html-to-markdown-XUMA42ZC.js → html-to-markdown-FDNPIEKZ.js} +1 -1
  205. package/dist/bin/{chunks/jq-YS4PR46D.js → shell/chunks/jq-5SOTL7D7.js} +1 -1
  206. package/dist/bin/shell/chunks/{js-exec-ZAAIZQWI.js → js-exec-LISDW7YC.js} +2 -2
  207. package/dist/bin/shell/chunks/{ls-5Z45FV4U.js → ls-EEX3YIOF.js} +1 -1
  208. package/dist/bin/shell/chunks/mkdir-KDEZTR53.js +3 -0
  209. package/dist/bin/shell/chunks/mktemp-OYQYUB5H.js +3 -0
  210. package/dist/bin/{chunks/mv-EOOP2TO3.js → shell/chunks/mv-35V6IA5V.js} +1 -1
  211. package/dist/bin/{chunks/od-2GXD4D5K.js → shell/chunks/od-TD5LZDUM.js} +1 -1
  212. package/dist/bin/{chunks/paste-DWWA3JTW.js → shell/chunks/paste-QJG6BYAP.js} +1 -1
  213. package/dist/bin/shell/chunks/{python3-TJ6DCPIA.js → python3-P6MZ44HK.js} +5 -5
  214. package/dist/bin/{chunks/readlink-EJ3IKLWW.js → shell/chunks/readlink-BF435HNQ.js} +1 -1
  215. package/dist/bin/shell/chunks/rg-B2DVJQVY.js +3 -0
  216. package/dist/bin/shell/chunks/rm-HCMKNRM2.js +3 -0
  217. package/dist/bin/{chunks/rmdir-PRNISPBA.js → shell/chunks/rmdir-WGVUYGPF.js} +1 -1
  218. package/dist/bin/{chunks/sed-SY63U2YX.js → shell/chunks/sed-66XZQ75T.js} +1 -1
  219. package/dist/bin/shell/chunks/{seq-X2EAOGV5.js → seq-KBVCQ4WT.js} +1 -1
  220. package/dist/bin/shell/chunks/{sleep-MOJQBZMY.js → sleep-4O22Z4DI.js} +1 -1
  221. package/dist/bin/{chunks/split-HIFKSV2A.js → shell/chunks/split-OK6JHDWZ.js} +1 -1
  222. package/dist/bin/shell/chunks/sqlite3-57ACN7ES.js +3 -0
  223. package/dist/bin/shell/chunks/{stat-LROLDXHH.js → stat-VNNI7JDZ.js} +1 -1
  224. package/dist/bin/shell/chunks/{tail-UOTUV25D.js → tail-PAHZX3MA.js} +1 -1
  225. package/dist/bin/shell/chunks/{tar-7XOP7VOX.js → tar-RPVTXGFJ.js} +1 -1
  226. package/dist/bin/shell/chunks/{time-LF7BTSK5.js → time-J2DAZUIN.js} +1 -1
  227. package/dist/bin/shell/chunks/timeout-XMTXHNFF.js +3 -0
  228. package/dist/bin/{chunks/tr-PVFO6FRY.js → shell/chunks/tr-ETPC3LHV.js} +1 -1
  229. package/dist/bin/shell/chunks/{which-4TPGVSBZ.js → which-G7X54RZL.js} +1 -1
  230. package/dist/bin/shell/chunks/{xan-RMH6JEXM.js → xan-XZHKEPJ4.js} +1 -1
  231. package/dist/bin/shell/chunks/{xan-view-PD26QEFN.js → xan-view-CNGKCABE.js} +1 -1
  232. package/dist/bin/shell/chunks/yes-2EQTNSIB.js +3 -0
  233. package/dist/bin/shell/chunks/yq-T6S3IDKY.js +3 -0
  234. package/dist/bin/shell/shell.js +369 -363
  235. package/dist/browser.d.ts +1 -1
  236. package/dist/bundle/browser.js +746 -726
  237. package/dist/bundle/chunks/awk2-TLK6FCHV.js +2 -0
  238. package/dist/bundle/chunks/{base64-MHVQ5XHI.js → base64-GUZMZ645.js} +1 -1
  239. package/dist/bundle/chunks/builtin-manifest-7MJJDZ2T.js +2 -0
  240. package/dist/bundle/chunks/{cat-VZBWBIJB.js → cat-LG4YGKUE.js} +1 -1
  241. package/dist/bundle/chunks/{chmod-TEY5MD2W.js → chmod-XUKPG2M4.js} +1 -1
  242. package/dist/bundle/chunks/{chunk-E2F4A3CM.js → chunk-2A4OZBCS.js} +5 -5
  243. package/dist/bundle/chunks/{chunk-WNH3HOQA.js → chunk-353VO5TF.js} +1 -1
  244. package/dist/bundle/chunks/chunk-37UJACD6.js +9 -0
  245. package/dist/bundle/chunks/{chunk-H3A45X3W.js → chunk-3LGQ6XEC.js} +1 -1
  246. package/dist/bundle/chunks/{chunk-P57S6Z6R.js → chunk-3ZY5QX3G.js} +1 -1
  247. package/dist/bundle/chunks/{chunk-45QZRGYF.js → chunk-4VU4IF3W.js} +7 -6
  248. package/dist/bundle/chunks/{chunk-SIOONII3.js → chunk-52W2IWA7.js} +1 -1
  249. package/dist/bundle/chunks/chunk-5IB57TIJ.js +274 -0
  250. package/dist/bundle/chunks/chunk-5J4S2LP5.js +2 -0
  251. package/dist/bundle/chunks/{chunk-PCPW54JH.js → chunk-5LDRJ22P.js} +1 -1
  252. package/dist/bundle/chunks/{chunk-BKUWXPEM.js → chunk-654CJKE3.js} +1 -1
  253. package/dist/bundle/chunks/{chunk-EZNS4GF7.js → chunk-67ODVGSB.js} +1 -1
  254. package/dist/bundle/chunks/{chunk-6QF3PCMO.js → chunk-6HQQON3N.js} +1 -1
  255. package/dist/bundle/chunks/chunk-6L6OYVLY.js +2 -0
  256. package/dist/bundle/chunks/{chunk-U57DSHID.js → chunk-6P2DITXT.js} +1 -1
  257. package/dist/bundle/chunks/chunk-74IR77AZ.js +11 -0
  258. package/dist/bundle/chunks/{chunk-S3ENGQML.js → chunk-7DVD6YCI.js} +1 -1
  259. package/dist/bundle/chunks/{chunk-HXWB4Z5X.js → chunk-7II7XIVI.js} +1 -1
  260. package/dist/bundle/chunks/{chunk-AYSZ5MAE.js → chunk-A3C4Z3Q3.js} +1 -1
  261. package/dist/bundle/chunks/chunk-A6SU3BZX.js +6 -0
  262. package/dist/bundle/chunks/{chunk-6HO6HX7V.js → chunk-AMXNXHXK.js} +1 -1
  263. package/dist/bundle/chunks/{chunk-QJ7OXJAZ.js → chunk-BLG7RWH4.js} +1 -1
  264. package/dist/bundle/chunks/chunk-BMBITA6Y.js +2 -0
  265. package/dist/bundle/chunks/{chunk-XQ2ZZFO6.js → chunk-BQTWRHZR.js} +2 -2
  266. package/dist/bundle/chunks/{chunk-WE7BJ7YU.js → chunk-BZ2OMW2T.js} +1 -1
  267. package/dist/bundle/chunks/{chunk-S6DNKKUL.js → chunk-CM4T4GB4.js} +1 -1
  268. package/dist/bundle/chunks/{chunk-CH7SUFFO.js → chunk-CORCIYJD.js} +1 -1
  269. package/dist/bundle/chunks/{chunk-LGIJSCWH.js → chunk-EQDVNHQS.js} +1 -1
  270. package/dist/bundle/chunks/{chunk-U4K5ZDWK.js → chunk-EZEO6MFE.js} +1 -1
  271. package/dist/bundle/chunks/{chunk-SE23TEGG.js → chunk-EZT6M2HG.js} +1 -1
  272. package/dist/bundle/chunks/{chunk-4MJ7VJG4.js → chunk-H7UVJSZR.js} +1 -1
  273. package/dist/bundle/chunks/{chunk-5EI7WSRV.js → chunk-HYQGYXGZ.js} +1 -1
  274. package/dist/bundle/chunks/{chunk-6IA4DXG2.js → chunk-IPKSYZ3R.js} +1 -1
  275. package/dist/bundle/chunks/{chunk-TLPMB3FO.js → chunk-KJBPGFZD.js} +1 -1
  276. package/dist/bundle/chunks/chunk-L7NEGEOJ.js +16 -0
  277. package/dist/bundle/chunks/{chunk-YFFU74KY.js → chunk-MJEJ7QEY.js} +1 -1
  278. package/dist/bundle/chunks/{chunk-QJFYYEFV.js → chunk-N36I27VM.js} +1 -1
  279. package/dist/bundle/chunks/chunk-N5L7E4EL.js +6 -0
  280. package/dist/bundle/chunks/{chunk-6QAM55HM.js → chunk-NFODJFHN.js} +1 -1
  281. package/dist/bundle/chunks/{chunk-IXFQXNL4.js → chunk-NFW4YKDO.js} +1 -1
  282. package/dist/bundle/chunks/{chunk-HCKTU6IR.js → chunk-NOX3PCUH.js} +1 -1
  283. package/dist/bundle/chunks/{chunk-MQKGGNPS.js → chunk-NXBUT5V2.js} +2 -2
  284. package/dist/bundle/chunks/{chunk-4KZT23KR.js → chunk-O5BHWBYH.js} +1 -1
  285. package/dist/bundle/chunks/{chunk-DVSA72LH.js → chunk-QTL2XC4B.js} +1 -1
  286. package/dist/bundle/chunks/chunk-RK2WBVP4.js +2 -0
  287. package/dist/bundle/chunks/{chunk-BLPYR4TN.js → chunk-RVBBGZ22.js} +1 -1
  288. package/dist/bundle/chunks/{chunk-PS2RJNZZ.js → chunk-SXQJYLP7.js} +1 -1
  289. package/dist/bundle/chunks/{chunk-MWL2I5BV.js → chunk-T7OAZEXT.js} +1 -1
  290. package/dist/bundle/chunks/{chunk-O452S4KX.js → chunk-URIKBXSE.js} +1 -1
  291. package/dist/bundle/chunks/{chunk-6BSOPPZH.js → chunk-UVQC75LS.js} +7 -7
  292. package/dist/bundle/chunks/chunk-VCREDMWH.js +4 -0
  293. package/dist/bundle/chunks/{chunk-DDPD7SIB.js → chunk-VQ6EUBJ3.js} +1 -1
  294. package/dist/bundle/chunks/chunk-VQEB6E2M.js +13 -0
  295. package/dist/bundle/chunks/{chunk-R2FBRMDU.js → chunk-VWUMR4IC.js} +1 -1
  296. package/dist/bundle/chunks/{chunk-XXBIOG4R.js → chunk-WDY2TNMK.js} +1 -1
  297. package/dist/bundle/chunks/chunk-XT7EK6BR.js +9 -0
  298. package/dist/bundle/chunks/{chunk-BS6EJR2R.js → chunk-XUTEQMTL.js} +5 -5
  299. package/dist/bundle/chunks/{chunk-KIGPB52X.js → chunk-XZ34OGNM.js} +1 -1
  300. package/dist/bundle/chunks/{chunk-FSKXIFYT.js → chunk-Y6UHNLT5.js} +1 -1
  301. package/dist/bundle/chunks/chunk-YUITEK6N.js +12 -0
  302. package/dist/bundle/chunks/chunk-YZCPEJRE.js +20 -0
  303. package/dist/bundle/chunks/chunk-ZIQS5QAW.js +5 -0
  304. package/dist/bundle/chunks/chunk-ZUEPJPYA.js +2 -0
  305. package/dist/bundle/chunks/{column-QJI65SH2.js → column-T4LGMRJG.js} +1 -1
  306. package/dist/bundle/chunks/{cp-UR762VVT.js → cp-ZDDVNITX.js} +1 -1
  307. package/dist/bundle/chunks/{curl-K4WT7UPN.js → curl-RCRD36LD.js} +11 -11
  308. package/dist/bundle/chunks/{cut-FMDNVWQN.js → cut-35WER2E2.js} +1 -1
  309. package/dist/bundle/chunks/{diff-R7TXVVLN.js → diff-Z3XOLW44.js} +1 -1
  310. package/dist/bundle/chunks/{du-EQKH3UNA.js → du-YBSJVBXP.js} +1 -1
  311. package/dist/bundle/chunks/{expr-A5XITHQD.js → expr-KSNRNE7V.js} +1 -1
  312. package/dist/bundle/chunks/{file-6AYYTULJ.js → file-XH37HMGV.js} +1 -1
  313. package/dist/bundle/chunks/find-3AONTPPM.js +2 -0
  314. package/dist/bundle/chunks/flag-coverage-6YGO7STE.js +2 -0
  315. package/dist/bundle/chunks/{grep-Q2O5EIXQ.js → grep-WW5KJPUG.js} +1 -1
  316. package/dist/bundle/chunks/{gzip-KC5ENBD2.js → gzip-ISZXQNJJ.js} +1 -1
  317. package/dist/bundle/chunks/{head-6UIPFWVJ.js → head-VYXZQLPZ.js} +1 -1
  318. package/dist/bundle/chunks/{help-QDDMBDU7.js → help-62M75TSG.js} +1 -1
  319. package/dist/bundle/chunks/{html-to-markdown-PE6BPRPA.js → html-to-markdown-4LXS3A44.js} +1 -1
  320. package/dist/bundle/chunks/{jq-UKAA3QWU.js → jq-3IVOWP3G.js} +1 -1
  321. package/dist/bundle/chunks/{js-exec-MUZRDUJ3.js → js-exec-T2WEE4KG.js} +2 -2
  322. package/dist/bundle/chunks/js-exec-worker.js +1 -0
  323. package/dist/bundle/chunks/{ls-WH5S4PPL.js → ls-FC3CSHKE.js} +1 -1
  324. package/dist/bundle/chunks/mkdir-DPFWDY25.js +2 -0
  325. package/dist/bundle/chunks/mktemp-SW2AHXZW.js +2 -0
  326. package/dist/bundle/chunks/{mv-WE7DBLEK.js → mv-PWCFXEF2.js} +1 -1
  327. package/dist/bundle/chunks/{od-Z4AIL3P4.js → od-VJ6PBBEI.js} +1 -1
  328. package/dist/bundle/chunks/{paste-ZNHNSRBW.js → paste-TIQETHSO.js} +1 -1
  329. package/dist/bundle/chunks/{python3-W4UMQJAQ.js → python3-6JEP7ZZK.js} +5 -5
  330. package/dist/bundle/chunks/{readlink-JSRKXLLQ.js → readlink-7XGQ3PL7.js} +1 -1
  331. package/dist/bundle/chunks/rg-2OPJ5V3D.js +2 -0
  332. package/dist/bundle/chunks/rm-AZZM5DCE.js +2 -0
  333. package/dist/bundle/chunks/{rmdir-3WTXMVKI.js → rmdir-YXYSZD4X.js} +1 -1
  334. package/dist/bundle/chunks/{sed-6G32B25J.js → sed-HYSBLGO5.js} +1 -1
  335. package/dist/bundle/chunks/{seq-B6KDLMYQ.js → seq-M2S4FRN4.js} +1 -1
  336. package/dist/bundle/chunks/{sleep-25QUPVDK.js → sleep-YC4HFEGC.js} +1 -1
  337. package/dist/bundle/chunks/{split-HUKVGJTW.js → split-UOPIWKKE.js} +1 -1
  338. package/dist/bundle/chunks/sqlite3-XCROTL6G.js +2 -0
  339. package/dist/bundle/chunks/{stat-LXFZND2P.js → stat-I3FPUTR7.js} +1 -1
  340. package/dist/bundle/chunks/{tail-UBGSN4JF.js → tail-WK3WACZK.js} +1 -1
  341. package/dist/bundle/chunks/{tar-LE7LAAIX.js → tar-VZYMNZV2.js} +1 -1
  342. package/dist/bundle/chunks/{time-NERE2JJ2.js → time-N6J6DC6C.js} +1 -1
  343. package/dist/bundle/chunks/timeout-UDR5J2MP.js +2 -0
  344. package/dist/bundle/chunks/{tr-UI2LA3GA.js → tr-VI5PIA4A.js} +1 -1
  345. package/dist/bundle/chunks/{which-UWVKETYW.js → which-BP5YY5BR.js} +1 -1
  346. package/dist/bundle/chunks/worker.js +5 -0
  347. package/dist/bundle/chunks/{xan-UIL24CGT.js → xan-DL576EIT.js} +1 -1
  348. package/dist/bundle/chunks/xan-view-GJVN6IHX.js +2 -0
  349. package/dist/bundle/chunks/yes-OVJMX6NM.js +2 -0
  350. package/dist/bundle/chunks/yq-KYPU4LQP.js +2 -0
  351. package/dist/bundle/index.cjs +1079 -1059
  352. package/dist/bundle/index.js +345 -339
  353. package/dist/commands/mktemp/mktemp.d.ts +4 -0
  354. package/dist/commands/registry.d.ts +1 -1
  355. package/dist/commands/which/which.d.ts +10 -0
  356. package/dist/commands/yes/yes.d.ts +4 -0
  357. package/dist/custom-commands.d.ts +12 -0
  358. package/dist/fs/create-exclusive.d.ts +30 -0
  359. package/dist/fs/in-memory-fs/in-memory-fs.d.ts +8 -1
  360. package/dist/fs/interface.d.ts +37 -0
  361. package/dist/fs/mountable-fs/mountable-fs.d.ts +18 -1
  362. package/dist/fs/overlay-fs/overlay-fs.d.ts +19 -1
  363. package/dist/fs/path-utils.d.ts +0 -4
  364. package/dist/fs/read-write-fs/read-write-fs.d.ts +22 -1
  365. package/dist/index.d.cts +1 -1
  366. package/dist/index.d.ts +1 -1
  367. package/dist/interpreter/expansion/array-prefix-suffix.d.ts +2 -1
  368. package/dist/interpreter/expansion/parameter-ops.d.ts +1 -0
  369. package/dist/interpreter/expansion/pattern-removal.d.ts +3 -0
  370. package/dist/interpreter/expansion/variable.d.ts +1 -1
  371. package/dist/interpreter/helpers/loop.d.ts +32 -0
  372. package/dist/limits.d.ts +0 -3
  373. package/dist/network/dns-pin.d.ts +1 -32
  374. package/dist/network/fetch.d.ts +1 -1
  375. package/dist/security/trusted-globals.d.ts +8 -0
  376. package/dist/types.d.ts +6 -0
  377. package/package.json +3 -4
  378. package/dist/bin/chunks/awk2-NTRVFXRA.js +0 -3
  379. package/dist/bin/chunks/chunk-3PCPQIUD.js +0 -3
  380. package/dist/bin/chunks/chunk-6JUPBMCR.js +0 -13
  381. package/dist/bin/chunks/chunk-BB5VTPMQ.js +0 -16
  382. package/dist/bin/chunks/chunk-CN4JKMTR.js +0 -8
  383. package/dist/bin/chunks/chunk-F2PYTUMR.js +0 -9
  384. package/dist/bin/chunks/chunk-HWI42GQO.js +0 -7
  385. package/dist/bin/chunks/chunk-HWK7KFGB.js +0 -3
  386. package/dist/bin/chunks/chunk-I57EACSL.js +0 -3
  387. package/dist/bin/chunks/chunk-ONF4KUYV.js +0 -13
  388. package/dist/bin/chunks/chunk-PRVPFKTC.js +0 -276
  389. package/dist/bin/chunks/chunk-RTN6X652.js +0 -11
  390. package/dist/bin/chunks/chunk-RVPTAYDS.js +0 -4
  391. package/dist/bin/chunks/chunk-U5JLGI56.js +0 -21
  392. package/dist/bin/chunks/dist-5MWO25Y4.js +0 -141
  393. package/dist/bin/chunks/find-MHC4QV6H.js +0 -3
  394. package/dist/bin/chunks/flag-coverage-LLAQBVIG.js +0 -3
  395. package/dist/bin/chunks/mkdir-YJ3SOVRP.js +0 -3
  396. package/dist/bin/chunks/rg-WHVR3YDT.js +0 -3
  397. package/dist/bin/chunks/rm-B4LVIG7A.js +0 -3
  398. package/dist/bin/chunks/sqlite3-CXQTZRPZ.js +0 -3
  399. package/dist/bin/chunks/timeout-RQOWSWYG.js +0 -3
  400. package/dist/bin/chunks/yq-CWBZMGUV.js +0 -3
  401. package/dist/bin/shell/chunks/awk2-NTRVFXRA.js +0 -3
  402. package/dist/bin/shell/chunks/chunk-3PCPQIUD.js +0 -3
  403. package/dist/bin/shell/chunks/chunk-6JUPBMCR.js +0 -13
  404. package/dist/bin/shell/chunks/chunk-BB5VTPMQ.js +0 -16
  405. package/dist/bin/shell/chunks/chunk-CN4JKMTR.js +0 -8
  406. package/dist/bin/shell/chunks/chunk-F2PYTUMR.js +0 -9
  407. package/dist/bin/shell/chunks/chunk-HWI42GQO.js +0 -7
  408. package/dist/bin/shell/chunks/chunk-HWK7KFGB.js +0 -3
  409. package/dist/bin/shell/chunks/chunk-I57EACSL.js +0 -3
  410. package/dist/bin/shell/chunks/chunk-ONF4KUYV.js +0 -13
  411. package/dist/bin/shell/chunks/chunk-PRVPFKTC.js +0 -276
  412. package/dist/bin/shell/chunks/chunk-RTN6X652.js +0 -11
  413. package/dist/bin/shell/chunks/chunk-RVPTAYDS.js +0 -4
  414. package/dist/bin/shell/chunks/chunk-U5JLGI56.js +0 -21
  415. package/dist/bin/shell/chunks/dist-5MWO25Y4.js +0 -141
  416. package/dist/bin/shell/chunks/find-MHC4QV6H.js +0 -3
  417. package/dist/bin/shell/chunks/flag-coverage-LLAQBVIG.js +0 -3
  418. package/dist/bin/shell/chunks/mkdir-YJ3SOVRP.js +0 -3
  419. package/dist/bin/shell/chunks/rg-WHVR3YDT.js +0 -3
  420. package/dist/bin/shell/chunks/rm-B4LVIG7A.js +0 -3
  421. package/dist/bin/shell/chunks/sqlite3-CXQTZRPZ.js +0 -3
  422. package/dist/bin/shell/chunks/timeout-RQOWSWYG.js +0 -3
  423. package/dist/bin/shell/chunks/yq-CWBZMGUV.js +0 -3
  424. package/dist/bundle/chunks/awk2-VS5QVYHU.js +0 -2
  425. package/dist/bundle/chunks/chunk-2SMD2AUA.js +0 -3
  426. package/dist/bundle/chunks/chunk-35MBA3VY.js +0 -12
  427. package/dist/bundle/chunks/chunk-3OBCZP7T.js +0 -12
  428. package/dist/bundle/chunks/chunk-4CC3OZPU.js +0 -2
  429. package/dist/bundle/chunks/chunk-A257L6QO.js +0 -7
  430. package/dist/bundle/chunks/chunk-ATGOUOX2.js +0 -15
  431. package/dist/bundle/chunks/chunk-BRJERIF4.js +0 -2
  432. package/dist/bundle/chunks/chunk-FTET43KM.js +0 -2
  433. package/dist/bundle/chunks/chunk-GRUZ4SBY.js +0 -275
  434. package/dist/bundle/chunks/chunk-LRFR25IP.js +0 -8
  435. package/dist/bundle/chunks/chunk-RWQWFXMH.js +0 -10
  436. package/dist/bundle/chunks/chunk-Y6JBSHCM.js +0 -20
  437. package/dist/bundle/chunks/chunk-ZBUZKIPX.js +0 -6
  438. package/dist/bundle/chunks/find-RLKBCGJR.js +0 -2
  439. package/dist/bundle/chunks/flag-coverage-YQGACUSN.js +0 -2
  440. package/dist/bundle/chunks/mkdir-Z6MMWH3D.js +0 -2
  441. package/dist/bundle/chunks/rg-JKB7DR66.js +0 -2
  442. package/dist/bundle/chunks/rm-IGPLE632.js +0 -2
  443. package/dist/bundle/chunks/sqlite3-DQNCWDG5.js +0 -2
  444. package/dist/bundle/chunks/timeout-37GM7IIL.js +0 -2
  445. package/dist/bundle/chunks/xan-view-FOCYCKZQ.js +0 -2
  446. package/dist/bundle/chunks/yq-ZRNZKDLE.js +0 -2
@@ -0,0 +1,4 @@
1
+ import type { RuntimeCommand } from "../../types.js";
2
+ export declare const mktempCommand: RuntimeCommand;
3
+ import type { CommandFuzzInfo } from "../fuzz-flags-types.js";
4
+ export declare const flagsForFuzzing: CommandFuzzInfo;
@@ -1,6 +1,6 @@
1
1
  import type { RuntimeCommand } from "../types.js";
2
2
  /** All available built-in command names (excludes network commands) */
3
- export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "rmdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "rg" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "rev" | "nl" | "fold" | "expand" | "unexpand" | "strings" | "split" | "column" | "join" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "md5sum" | "sha1sum" | "sha256sum" | "file" | "html-to-markdown" | "help" | "which" | "tac" | "hostname" | "od" | "gzip" | "gunzip" | "zcat" | "tar" | "yq" | "xan" | "sqlite3" | "time" | "whoami";
3
+ export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "mktemp" | "rmdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "rg" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "rev" | "nl" | "fold" | "expand" | "unexpand" | "strings" | "split" | "column" | "join" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "yes" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "md5sum" | "sha1sum" | "sha256sum" | "file" | "html-to-markdown" | "help" | "which" | "tac" | "hostname" | "od" | "gzip" | "gunzip" | "zcat" | "tar" | "yq" | "xan" | "sqlite3" | "time" | "whoami";
4
4
  /** Network command names (only available when network is configured) */
5
5
  export type NetworkCommandName = "curl";
6
6
  /** Python command names (only available when python is explicitly enabled) */
@@ -1,3 +1,13 @@
1
+ /**
2
+ * which - Locate a command
3
+ *
4
+ * Resolution order:
5
+ * 1. VFS PATH search (sandboxed filesystem)
6
+ * 2. Shell builtins (echo, cd, etc.) — only when no file found
7
+ *
8
+ * On miss, prints a helpful message to stderr explaining that the
9
+ * command is not available in this sandboxed bash environment.
10
+ */
1
11
  import type { RuntimeCommand } from "../../types.js";
2
12
  export declare const whichCommand: RuntimeCommand;
3
13
  import type { CommandFuzzInfo } from "../fuzz-flags-types.js";
@@ -0,0 +1,4 @@
1
+ import type { RuntimeCommand } from "../../types.js";
2
+ export declare const yesCommand: RuntimeCommand;
3
+ import type { CommandFuzzInfo } from "../fuzz-flags-types.js";
4
+ export declare const flagsForFuzzing: CommandFuzzInfo;
@@ -21,6 +21,11 @@ export interface LazyCommand {
21
21
  * trusted by default for compatibility with existing host integrations.
22
22
  */
23
23
  trusted?: boolean;
24
+ /**
25
+ * Set to true when the command handles --version itself. When unset,
26
+ * the dispatch intercepts --version and returns "<cmd> (just-bash)".
27
+ */
28
+ handlesOwnVersion?: boolean;
24
29
  load: () => Promise<Command>;
25
30
  }
26
31
  /** Inputs for a complete standalone command context, primarily for tests. */
@@ -61,5 +66,12 @@ export declare function defineCommand(name: string, execute: (args: string[], ct
61
66
  /**
62
67
  * Create a lazy-loaded wrapper for a custom command.
63
68
  * The command is only loaded when first executed.
69
+ *
70
+ * The load is shared, and waiters can detach from it. Both properties matter
71
+ * once an invocation can be cancelled: a cancelled waiter must not start a
72
+ * competing load, and it must not stay attached to a load that may never
73
+ * settle. Keeping only the waiter's own promise lets a cancelled waiter be
74
+ * collected instead of being retained by the shared load, so repeated
75
+ * cancellations cannot accumulate.
64
76
  */
65
77
  export declare function createLazyCustomCommand(lazy: LazyCommand): Command;
@@ -0,0 +1,30 @@
1
+ import type { CreateExclusiveOptions, IFileSystem } from "./interface.js";
2
+ /**
3
+ * Thrown when the filesystem cannot create an entry atomically, either
4
+ * because it does not implement `createExclusive` or because a delegating
5
+ * filesystem routes to a backend that does not.
6
+ *
7
+ * This is a type rather than an error message because backend errors embed
8
+ * the caller-supplied path: matching text would let a template containing the
9
+ * literal "ENOSYS" turn a genuine EEXIST into a spurious "unsupported".
10
+ */
11
+ export declare class ExclusiveCreateUnsupportedError extends Error {
12
+ readonly code = "ENOSYS";
13
+ constructor(path: string, syscall: string);
14
+ }
15
+ /**
16
+ * Create a file or directory that must not already exist, with `mode` applied
17
+ * at creation time.
18
+ *
19
+ * There is deliberately no fallback for filesystems lacking
20
+ * `createExclusive`. Exclusivity and privacy cannot be synthesised from
21
+ * separate check, create and chmod calls: between them a concurrent actor can
22
+ * take the name and have its entry truncated, or install a symlink so the
23
+ * write lands on its target, and the entry is briefly readable at the
24
+ * backend's default mode either way. A caller asking for an exclusive private
25
+ * entry that silently received a racy one is worse off than a caller told the
26
+ * filesystem cannot provide it, so this fails loudly instead.
27
+ *
28
+ * @throws ExclusiveCreateUnsupportedError if the filesystem cannot do this
29
+ */
30
+ export declare function createExclusiveOn(fs: Pick<IFileSystem, "createExclusive">, path: string, options: CreateExclusiveOptions): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import { type ByteString } from "../../encoding.js";
2
- import type { BufferEncoding, CpOptions, DirectoryEntry, DirentEntry, FileContent, FileEntry, FsEntry, FsStat, IFileSystem, InitialFiles, LazyFileEntry, MkdirOptions, ReadFileOptions, RmOptions, SymlinkEntry, WriteFileOptions } from "../interface.js";
2
+ import type { BufferEncoding, CpOptions, CreateExclusiveOptions, DirectoryEntry, DirentEntry, FileContent, FileEntry, FsEntry, FsStat, IFileSystem, InitialFiles, LazyFileEntry, MkdirOptions, ReadFileOptions, RmOptions, SymlinkEntry, WriteFileOptions } from "../interface.js";
3
3
  export type { BufferEncoding, FileContent, FileEntry, LazyFileEntry, DirectoryEntry, SymlinkEntry, FsEntry, FsStat, IFileSystem, };
4
4
  export interface FsData {
5
5
  [path: string]: FsEntry;
@@ -68,6 +68,13 @@ export declare class InMemoryFs implements IFileSystem {
68
68
  */
69
69
  private resolvePathWithSymlinks;
70
70
  mkdir(path: string, options?: MkdirOptions): Promise<void>;
71
+ /**
72
+ * Atomically create a private file or directory that must not already
73
+ * exist. Execution is single-threaded, so the existence check and the
74
+ * insert cannot be interleaved; `this.data` is keyed by normalized path, so
75
+ * a symlink occupying the name is seen as a collision rather than followed.
76
+ */
77
+ createExclusive(path: string, options: CreateExclusiveOptions): Promise<void>;
71
78
  /**
72
79
  * Synchronous version of mkdir
73
80
  */
@@ -77,6 +77,20 @@ export interface FsStat {
77
77
  export interface MkdirOptions {
78
78
  recursive?: boolean;
79
79
  }
80
+ /**
81
+ * Options for createExclusive operation
82
+ */
83
+ export interface CreateExclusiveOptions {
84
+ /**
85
+ * Permission bits applied at creation time, e.g. 0o600 for a private file
86
+ * or 0o700 for a private directory. Applied by the creating operation
87
+ * itself so the entry is never briefly visible with the
88
+ * backend's default mode.
89
+ */
90
+ mode: number;
91
+ /** Create a directory instead of an empty regular file. */
92
+ directory?: boolean;
93
+ }
80
94
  /**
81
95
  * Options for rm operation
82
96
  */
@@ -164,6 +178,29 @@ export interface IFileSystem {
164
178
  * @throws Error if parent doesn't exist (unless recursive) or path exists
165
179
  */
166
180
  mkdir(path: string, options?: MkdirOptions): Promise<void>;
181
+ /**
182
+ * Atomically create a file or directory that must not already exist, with
183
+ * `options.mode` applied by the creating operation itself.
184
+ *
185
+ * This is the primitive `mktemp`-style callers need: a plain
186
+ * `exists()`-then-`writeFile()` sequence is a TOCTOU race (a concurrent
187
+ * creator can win between the two calls and have its entry truncated), and
188
+ * a `writeFile()`-then-`chmod()` sequence exposes the entry with the
189
+ * backend's default mode (typically 0644/0755) until the chmod lands.
190
+ *
191
+ * The final path component is never followed: a symlink already occupying
192
+ * the name is a collision, not a target to write through.
193
+ *
194
+ * Optional for backwards compatibility with external `IFileSystem`
195
+ * implementations written before this method existed; all built-in
196
+ * filesystems implement it. Callers should route through
197
+ * `createExclusiveOn`, which reports a filesystem that cannot do this
198
+ * rather than substituting a non-atomic sequence.
199
+ *
200
+ * @throws Error with an `EEXIST` code if the path already exists
201
+ * @throws Error with an `ENOENT` code if the parent does not exist
202
+ */
203
+ createExclusive?(path: string, options: CreateExclusiveOptions): Promise<void>;
167
204
  /**
168
205
  * Read directory contents
169
206
  * @returns Array of entry names (not full paths)
@@ -1,5 +1,5 @@
1
1
  import { type ByteString } from "../../encoding.js";
2
- import type { BufferEncoding, CpOptions, FileContent, FsStat, IFileSystem, MkdirOptions, ReadFileOptions, RmOptions, WriteFileOptions } from "../interface.js";
2
+ import type { BufferEncoding, CpOptions, CreateExclusiveOptions, FileContent, FsStat, IFileSystem, MkdirOptions, ReadFileOptions, RmOptions, WriteFileOptions } from "../interface.js";
3
3
  import type { OverlayDiff } from "../overlay-fs/overlay-fs.js";
4
4
  /**
5
5
  * Configuration for a mount point
@@ -109,6 +109,13 @@ export declare class MountableFs implements IFileSystem {
109
109
  stat(path: string): Promise<FsStat>;
110
110
  lstat(path: string): Promise<FsStat>;
111
111
  mkdir(path: string, options?: MkdirOptions): Promise<void>;
112
+ /**
113
+ * Atomically create a private file or directory that must not already
114
+ * exist, routed to the owning filesystem. A backend without
115
+ * `createExclusive` reports ENOSYS so callers can pick a fallback rather
116
+ * than silently getting non-exclusive creation.
117
+ */
118
+ createExclusive(path: string, options: CreateExclusiveOptions): Promise<void>;
112
119
  readdir(path: string): Promise<string[]>;
113
120
  rm(path: string, options?: RmOptions): Promise<void>;
114
121
  cp(src: string, dest: string, options?: CpOptions): Promise<void>;
@@ -134,5 +141,15 @@ export declare class MountableFs implements IFileSystem {
134
141
  * @param atime - Access time
135
142
  * @param mtime - Modification time
136
143
  */
144
+ /**
145
+ * Synchronous mkdir, routed to the filesystem that owns the path.
146
+ * @throws Error if that filesystem has no synchronous writes
147
+ */
148
+ mkdirSync(path: string, options?: MkdirOptions): void;
149
+ /**
150
+ * Synchronous writeFile, routed to the filesystem that owns the path.
151
+ * @throws Error if that filesystem has no synchronous writes
152
+ */
153
+ writeFileSync(path: string, content: string | Uint8Array): void;
137
154
  utimes(path: string, atime: Date, mtime: Date): Promise<void>;
138
155
  }
@@ -21,7 +21,7 @@
21
21
  */
22
22
  import { type ByteString } from "../../encoding.js";
23
23
  import { type FileContent } from "../encoding.js";
24
- import type { CpOptions, DirentEntry, FsStat, IFileSystem, MkdirOptions, ReadFileOptions, RmOptions, WriteFileOptions } from "../interface.js";
24
+ import type { CpOptions, CreateExclusiveOptions, DirentEntry, FsStat, IFileSystem, MkdirOptions, ReadFileOptions, RmOptions, WriteFileOptions } from "../interface.js";
25
25
  /** Kind of entry recorded in an {@link OverlayWrite}. */
26
26
  export type OverlayNodeType = "file" | "directory" | "symlink";
27
27
  /**
@@ -332,6 +332,24 @@ export declare class OverlayFs implements IFileSystem {
332
332
  */
333
333
  private realTargetToVirtual;
334
334
  mkdir(path: string, options?: MkdirOptions): Promise<void>;
335
+ /**
336
+ * Atomically create a private file or directory that must not already
337
+ * exist. A name is taken when a live entry shadows it in the upper layer
338
+ * or when the lower layer holds it without a covering whiteout; a
339
+ * whiteout means the name is free and is cleared by the create (attach
340
+ * for a file, resurrection via ensureDirs for a directory), so the new
341
+ * entry is visible to stat/exists/readdir.
342
+ *
343
+ * The final component is never followed: an upper symlink at the name is
344
+ * a live entry (EEXIST), and the lower-layer probe uses lstat. Symlinks
345
+ * in the parent ARE resolved, so the entry lands where later lookups —
346
+ * which resolve — will find it.
347
+ *
348
+ * Every await happens before the claim; from the final descend() to the
349
+ * attach() there is no yield, so two interleaved calls cannot both claim
350
+ * the name.
351
+ */
352
+ createExclusive(path: string, options: CreateExclusiveOptions): Promise<void>;
335
353
  /**
336
354
  * Core readdir implementation that returns entries with file types.
337
355
  * Both readdir and readdirWithFileTypes use this shared implementation.
@@ -30,10 +30,6 @@ export declare function validatePath(path: string, operation: string): void;
30
30
  * Get the directory name of a normalized virtual path.
31
31
  */
32
32
  export declare function dirname(path: string): string;
33
- /**
34
- * Resolve a relative path against a base directory.
35
- * If `path` is absolute, it is normalized and returned directly.
36
- */
37
33
  export declare function resolvePath(base: string, path: string): string;
38
34
  /**
39
35
  * Join a parent path with a child name.
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import { type ByteString } from "../../encoding.js";
14
14
  import { type FileContent } from "../encoding.js";
15
- import type { CpOptions, DirentEntry, FsStat, IFileSystem, MkdirOptions, ReadFileOptions, RmOptions, WriteFileOptions } from "../interface.js";
15
+ import type { CpOptions, CreateExclusiveOptions, DirentEntry, FsStat, IFileSystem, MkdirOptions, ReadFileOptions, RmOptions, WriteFileOptions } from "../interface.js";
16
16
  export interface ReadWriteFsOptions {
17
17
  /**
18
18
  * The root directory on the real filesystem.
@@ -65,6 +65,8 @@ export declare class ReadWriteFs implements IFileSystem {
65
65
  * Validate the parent directory of a path (for operations like lstat/readlink
66
66
  * that should not follow the final component's symlink).
67
67
  * Returns the canonical parent joined with the original basename.
68
+ * The root's parent is outside the sandbox and always fails this check,
69
+ * so callers that accept the root validate it with resolveAndValidate().
68
70
  */
69
71
  private validateParent;
70
72
  /**
@@ -95,6 +97,25 @@ export declare class ReadWriteFs implements IFileSystem {
95
97
  stat(path: string): Promise<FsStat>;
96
98
  lstat(path: string): Promise<FsStat>;
97
99
  mkdir(path: string, options?: MkdirOptions): Promise<void>;
100
+ /**
101
+ * Atomically create a private file or directory that must not already
102
+ * exist. `O_CREAT|O_EXCL` (and `mkdir`) are exclusive in the kernel, so a
103
+ * concurrent host process cannot win a race between a check and the create,
104
+ * and the mode is applied by the creating syscall rather than a later
105
+ * chmod — the entry is never on disk with the default 0644/0755. POSIX
106
+ * requires `O_EXCL` to fail on a symlink at the final component, so a
107
+ * pre-planted link is a collision instead of a write-through target.
108
+ */
109
+ createExclusive(path: string, options: CreateExclusiveOptions): Promise<void>;
110
+ private createExclusiveUnlocked;
111
+ /**
112
+ * Verify that an entry just created at `canonical` is still the entry at
113
+ * that pathname. O_EXCL and O_NOFOLLOW bind only the final component, so a
114
+ * concurrent host process swapping an intermediate directory for a symlink
115
+ * could place the entry outside the root; compare device and inode of the
116
+ * created descriptor against a re-validated lstat to detect the swap.
117
+ */
118
+ private assertCreatedInsideRoot;
98
119
  private mkdirUnlocked;
99
120
  readdir(path: string): Promise<string[]>;
100
121
  readdirWithFileTypes(path: string): Promise<DirentEntry[]>;
package/dist/index.d.cts CHANGED
@@ -10,7 +10,7 @@ export type { ByteString, OutputKind } from "./encoding.js";
10
10
  export { bytesOutput, decodeBytesToUtf8, EMPTY_BYTES, encodeUtf8ToBytes, latin1FromBytes, stdoutAsBytes, stdoutKind, textOutput, unsafeBytesFromLatin1, } from "./encoding.js";
11
11
  export { FsError, fsErrorCode, isFsErrorCode, toFsError, } from "./fs/fs-error.js";
12
12
  export { InMemoryFs } from "./fs/in-memory-fs/index.js";
13
- export type { BufferEncoding, CpOptions, DirectoryEntry, FileContent, FileEntry, FileInit, FileSystemFactory, FsEntry, FsStat, InitialFiles, LazyFileEntry, LazyFileProvider, MkdirOptions, RmOptions, SymlinkEntry, } from "./fs/interface.js";
13
+ export type { BufferEncoding, CpOptions, CreateExclusiveOptions, DirectoryEntry, FileContent, FileEntry, FileInit, FileSystemFactory, FsEntry, FsStat, InitialFiles, LazyFileEntry, LazyFileProvider, MkdirOptions, RmOptions, SymlinkEntry, } from "./fs/interface.js";
14
14
  export { MountableFs, type MountableFsOptions, type MountConfig, } from "./fs/mountable-fs/index.js";
15
15
  export { applyDiffToRealFs, type OverlayDiff, OverlayFs, type OverlayFsOptions, type OverlayNodeType, type OverlayWrite, } from "./fs/overlay-fs/index.js";
16
16
  export { ReadWriteFs, type ReadWriteFsOptions, } from "./fs/read-write-fs/index.js";
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export type { ByteString, OutputKind } from "./encoding.js";
10
10
  export { bytesOutput, decodeBytesToUtf8, EMPTY_BYTES, encodeUtf8ToBytes, latin1FromBytes, stdoutAsBytes, stdoutKind, textOutput, unsafeBytesFromLatin1, } from "./encoding.js";
11
11
  export { FsError, fsErrorCode, isFsErrorCode, toFsError, } from "./fs/fs-error.js";
12
12
  export { InMemoryFs } from "./fs/in-memory-fs/index.js";
13
- export type { BufferEncoding, CpOptions, DirectoryEntry, FileContent, FileEntry, FileInit, FileSystemFactory, FsEntry, FsStat, InitialFiles, LazyFileEntry, LazyFileProvider, MkdirOptions, RmOptions, SymlinkEntry, } from "./fs/interface.js";
13
+ export type { BufferEncoding, CpOptions, CreateExclusiveOptions, DirectoryEntry, FileContent, FileEntry, FileInit, FileSystemFactory, FsEntry, FsStat, InitialFiles, LazyFileEntry, LazyFileProvider, MkdirOptions, RmOptions, SymlinkEntry, } from "./fs/interface.js";
14
14
  export { MountableFs, type MountableFsOptions, type MountConfig, } from "./fs/mountable-fs/index.js";
15
15
  export { applyDiffToRealFs, type OverlayDiff, OverlayFs, type OverlayFsOptions, type OverlayNodeType, type OverlayWrite, } from "./fs/overlay-fs/index.js";
16
16
  export { ReadWriteFs, type ReadWriteFsOptions, } from "./fs/read-write-fs/index.js";
@@ -26,8 +26,9 @@ export type ExpandPartFn = (ctx: InterpreterContext, part: WordPart) => Promise<
26
26
  */
27
27
  export type ExpandWordPartsAsyncFn = (ctx: InterpreterContext, parts: WordPart[]) => Promise<string>;
28
28
  /**
29
- * Handle "${arr[@]:-${default[@]}}", "${arr[@]:+${alt[@]}}", and "${arr[@]:=default}"
29
+ * Handle "${arr[@]:-${default[@]}}" and "${arr[@]:+${alt[@]}}".
30
30
  * Also handles "${var:-${default[@]}}" where var is a scalar variable.
31
+ * Assignment defaults preserve existing array elements when no assignment is needed.
31
32
  * When the default value contains an array expansion, each element should become a separate word.
32
33
  */
33
34
  export declare function handleArrayDefaultValue(ctx: InterpreterContext, wordParts: WordPart[]): Promise<ArrayExpansionResult>;
@@ -39,6 +39,7 @@ export declare function handleDefaultValue(ctx: InterpreterContext, operation: {
39
39
  word?: WordNode;
40
40
  checkEmpty?: boolean;
41
41
  }, opCtx: ParameterOpContext, expandWordPartsAsync: ExpandWordPartsAsyncFn): Promise<string>;
42
+ export declare function assertDefaultAssignmentTarget(parameter: string): void;
42
43
  /**
43
44
  * Handle AssignDefault operation: ${param:=word}
44
45
  */
@@ -3,7 +3,10 @@
3
3
  *
4
4
  * Functions for ${var#pattern}, ${var%pattern}, ${!prefix*} etc.
5
5
  */
6
+ import type { WordNode } from "../../ast/types.js";
6
7
  import type { InterpreterContext } from "../types.js";
8
+ import type { ExpandPartFn, ExpandWordPartsAsyncFn } from "./array-word-expansion.js";
9
+ export declare function buildPatternRemovalRegex(ctx: InterpreterContext, pattern: WordNode, greedy: boolean, expandWordPartsAsync: ExpandWordPartsAsyncFn, expandPart: ExpandPartFn): Promise<string>;
7
10
  /**
8
11
  * Apply pattern removal (prefix or suffix strip) to a single value.
9
12
  * Used by both scalar and vectorized array operations.
@@ -26,7 +26,7 @@ export declare function isArray(ctx: InterpreterContext, name: string): boolean;
26
26
  * @param name - The variable name
27
27
  * @param checkNounset - Whether to check for nounset (default true)
28
28
  */
29
- export declare function getVariable(ctx: InterpreterContext, name: string, checkNounset?: boolean, _insideDoubleQuotes?: boolean): Promise<string>;
29
+ export declare function getVariable(ctx: InterpreterContext, name: string, checkNounset?: boolean): Promise<string>;
30
30
  /**
31
31
  * Check if a variable is set (exists in the environment).
32
32
  * Properly handles array subscripts (e.g., arr[0] -> arr_0).
@@ -4,14 +4,46 @@
4
4
  * Consolidates the repeated error handling logic used in all loop constructs
5
5
  * (for, c-style for, while, until).
6
6
  */
7
+ import type { InterpreterContext } from "../types.js";
7
8
  export type LoopAction = "break" | "continue" | "rethrow" | "error";
8
9
  export interface LoopErrorResult {
9
10
  action: LoopAction;
10
11
  stdout: string;
11
12
  stderr: string;
13
+ /**
14
+ * Status the loop should adopt as "last command executed".
15
+ *
16
+ * For "break"/"continue" this is 0: bash's `break` and `continue` are
17
+ * builtins that return 0, and they are the last command the body ran, so
18
+ * the loop must not report the status of whatever failed before them.
19
+ * For "error" it is the failure status.
20
+ */
12
21
  exitCode?: number;
13
22
  error?: unknown;
14
23
  }
24
+ /**
25
+ * Exit status of the `break`/`continue` builtins themselves.
26
+ *
27
+ * A loop left via `break`/`continue` reports this, not the status of the
28
+ * last command that ran before it:
29
+ *
30
+ * while :; do false; break; done; echo $? # 0, not 1
31
+ */
32
+ export declare const BREAK_CONTINUE_STATUS = 0;
33
+ /**
34
+ * Adopt `status` as the loop's "last command executed" and publish it to `$?`.
35
+ *
36
+ * The loop tracks its own exit code for the value it finally returns, but `$?`
37
+ * has to move with it. A `for` loop runs nothing between the `continue` and
38
+ * the next iteration's first command, so leaving `$?` behind lets the failed
39
+ * command before the `continue` show up there:
40
+ *
41
+ * for i in 1 2; do echo "$?"; false; continue; done # 0 0, not 0 1
42
+ *
43
+ * `while`/`until` happen to hide this because their condition runs in between
44
+ * and resets `$?` - they are synchronised here all the same.
45
+ */
46
+ export declare function adoptLoopStatus(ctx: InterpreterContext, status: number): number;
15
47
  /**
16
48
  * Handle errors thrown during loop body execution.
17
49
  *
package/dist/limits.d.ts CHANGED
@@ -107,7 +107,4 @@ export interface ExecutionLimits {
107
107
  export type ExecutionLimitProfile = "normal" | "hardened";
108
108
  /** Liberal default shared by shell and standalone transform entry points. */
109
109
  export declare const DEFAULT_MAX_SOURCE_BYTES: number;
110
- /**
111
- * Resolve execution limits by merging user-provided limits with defaults.
112
- */
113
110
  export declare function resolveLimits(userLimits?: ExecutionLimits, profile?: ExecutionLimitProfile): Required<ExecutionLimits>;
@@ -1,15 +1,4 @@
1
- /**
2
- * Request-owned connection binding for DNS-reviewed HTTP requests.
3
- *
4
- * Each owner has a private Undici Agent whose connector resolves exactly one
5
- * hostname to exactly one preflight-reviewed address. The Agent is never
6
- * shared between requests or redirect hops, so an existing origin pool cannot
7
- * substitute a socket opened under a different DNS decision.
8
- *
9
- * The browser build removes the Node-only `undici` branch and edge runtimes
10
- * that cannot construct this owner fail closed when private-range denial is
11
- * enabled.
12
- */
1
+ /** Types for the deprecated request-owned connection override. */
13
2
  export interface PinnedAddress {
14
3
  hostname: string;
15
4
  address: string;
@@ -20,23 +9,3 @@ export interface PinnedConnectionOwner {
20
9
  close(): Promise<void>;
21
10
  }
22
11
  export type PinnedConnectionOwnerFactory = (pinned: PinnedAddress) => Promise<PinnedConnectionOwner>;
23
- /**
24
- * Both shapes a dynamic `import("undici")` can resolve to.
25
- *
26
- * Node resolves the package and exposes its CommonJS exports as named ones. A
27
- * bundler that inlines the same module into its own graph cannot always do
28
- * that, and hands back a namespace carrying the module under `default` alone.
29
- */
30
- type UndiciNamespace = typeof import("undici") | Pick<typeof import("undici"), "default">;
31
- type UndiciExports = typeof import("undici") | typeof import("undici").default;
32
- /** @internal Pure namespace normalization used by focused interop tests. */
33
- export declare function _undiciExports(namespace: UndiciNamespace): UndiciExports;
34
- type PinnedLookup = import("node:net").LookupFunction;
35
- /** @internal Pure connector lookup used by focused binding tests. */
36
- export declare function _createPinnedLookup(pinned: PinnedAddress): PinnedLookup;
37
- /**
38
- * Create a disposable transport whose pool identity is the reviewed address.
39
- * The returned owner must be closed after the response body is consumed.
40
- */
41
- export declare const createPinnedConnectionOwner: PinnedConnectionOwnerFactory;
42
- export {};
@@ -8,7 +8,7 @@ import { type FetchResult, type NetworkConfig } from "./types.js";
8
8
  export interface SecureFetchOptions {
9
9
  method?: string;
10
10
  headers?: Headers | Record<string, string>;
11
- body?: string;
11
+ body?: string | Uint8Array<ArrayBuffer>;
12
12
  followRedirects?: boolean;
13
13
  /** Override timeout for this request (capped at global timeout) */
14
14
  timeoutMs?: number;
@@ -15,3 +15,11 @@ export declare const _performanceNow: () => number;
15
15
  export declare const _Headers: typeof globalThis.Headers;
16
16
  /** Internal capability revocation; never expose this constructor to commands. */
17
17
  export declare const _Proxy: ProxyConstructor;
18
+ /**
19
+ * Intrinsic promise settlement for infrastructure that must keep observing a
20
+ * promise after the execution that created it has ended. The patched
21
+ * `Promise.prototype.then` blocks registered callbacks once an execution is
22
+ * deactivated, and calling a caller-supplied `then` would run that caller's code
23
+ * with the privileges of whatever registered it.
24
+ */
25
+ export declare const _promiseThen: typeof Promise.prototype.then;
package/dist/types.d.ts CHANGED
@@ -308,6 +308,12 @@ export interface Command {
308
308
  trusted?: boolean;
309
309
  /** @internal Marks host extensions that receive a least-authority budget. */
310
310
  internalIsExtension?: boolean;
311
+ /**
312
+ * Set to true when the command handles --version itself (e.g. python3
313
+ * shows Python's version, not just-bash's). When unset, the dispatch
314
+ * intercepts --version and returns "<cmd> (just-bash)".
315
+ */
316
+ handlesOwnVersion?: boolean;
311
317
  execute(args: string[], ctx: ResolvedCommandContext): Promise<ExecResult>;
312
318
  }
313
319
  export interface RuntimeCommand extends Omit<Command, "execute"> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jerryan/just-bash",
3
- "version": "3.9.0",
3
+ "version": "3.11.0",
4
4
  "description": "A simulated bash environment with virtual filesystem",
5
5
  "repository": {
6
6
  "type": "git",
@@ -91,11 +91,10 @@
91
91
  "quickjs-emscripten": "^0.32.0",
92
92
  "re2js": "^1.3.3",
93
93
  "seek-bzip": "^2.0.0",
94
- "smol-toml": "^1.8.0",
94
+ "smol-toml": "^1.9.0",
95
95
  "sprintf-js": "^1.1.3",
96
96
  "sql.js": "^1.14.1",
97
97
  "turndown": "^7.2.4",
98
- "undici": "^7.29.0",
99
98
  "yaml": "^2.9.0"
100
99
  },
101
100
  "optionalDependencies": {
@@ -108,7 +107,7 @@
108
107
  "build:worker": "esbuild src/commands/python3/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/python3/worker.js --external:../../../vendor/cpython-emscripten/* && cp src/commands/python3/worker.js dist/commands/python3/worker.js && mkdir -p dist/bin/chunks && cp src/commands/python3/worker.js dist/bin/chunks/worker.js && mkdir -p dist/bundle/chunks && cp src/commands/python3/worker.js dist/bundle/chunks/worker.js && esbuild src/commands/js-exec/js-exec-worker.ts --bundle --platform=node --format=esm --outfile=src/commands/js-exec/js-exec-worker.js --external:quickjs-emscripten && cp src/commands/js-exec/js-exec-worker.js dist/commands/js-exec/js-exec-worker.js && cp src/commands/js-exec/js-exec-worker.js dist/bin/chunks/js-exec-worker.js && cp src/commands/js-exec/js-exec-worker.js dist/bundle/chunks/js-exec-worker.js && esbuild src/commands/sqlite3/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/sqlite3/worker.js --external:sql.js && mkdir -p dist/commands/sqlite3 && cp src/commands/sqlite3/worker.js dist/commands/sqlite3/worker.js && cp src/commands/sqlite3/worker.js dist/bin/chunks/sqlite3-worker.js && cp src/commands/sqlite3/worker.js dist/bundle/chunks/sqlite3-worker.js",
109
108
  "build:lib": "esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --banner:js='import{createRequire} from\"node:module\";const require=createRequire(import.meta.url);' --external:diff --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip --external:guarded-fetch",
110
109
  "build:lib:cjs": "esbuild dist/index.js --bundle --platform=node --format=cjs --minify --outfile=dist/bundle/index.cjs --external:diff --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip --external:guarded-fetch",
111
- "build:browser": "esbuild dist/browser.js --bundle --platform=browser --format=esm --minify --outfile=dist/bundle/browser.js --external:diff --external:sprintf-js --external:turndown --external:undici --external:guarded-fetch --external:node:zlib --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip --define:__BROWSER__=true --alias:node:async_hooks=./src/shims/browser-unsupported.js --alias:node:dns=./src/shims/browser-unsupported.js --alias:node:module=./src/shims/browser-unsupported.js",
110
+ "build:browser": "esbuild dist/browser.js --bundle --platform=browser --format=esm --minify --outfile=dist/bundle/browser.js --external:diff --external:sprintf-js --external:turndown --external:guarded-fetch --external:node:zlib --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip --define:__BROWSER__=true --alias:node:async_hooks=./src/shims/browser-unsupported.js --alias:node:dns=./src/shims/browser-unsupported.js --alias:node:module=./src/shims/browser-unsupported.js",
112
111
  "build:cli": "esbuild dist/cli/just-bash.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node\nimport{createRequire} from\"node:module\";const require=createRequire(import.meta.url);' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip",
113
112
  "build:shell": "esbuild dist/cli/shell.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin/shell --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node\nimport{createRequire} from\"node:module\";const require=createRequire(import.meta.url);' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip",
114
113
  "validate": "pnpm lint && pnpm knip && pnpm typecheck && pnpm build && pnpm check:worker-sync && pnpm test:run && pnpm test:wasm && pnpm test:dist",
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a,b}from"./chunk-ZVG47PYA.js";import"./chunk-MROECM42.js";import"./chunk-42AMF6EE.js";import"./chunk-YXPSX3SI.js";import"./chunk-GR4ZHKXI.js";import"./chunk-HWI42GQO.js";import"./chunk-YERKK5B3.js";import"./chunk-I57EACSL.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as awkCommand2,b as flagsForFuzzing};
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- function i(...s){let e=[...new Set(s.filter(n=>n!==void 0))];if(e.length===0)return{signal:void 0,cleanup(){}};if(e.length===1)return{signal:e[0],cleanup(){}};let r=new AbortController,o=[];for(let n of e){if(n.aborted){r.abort(n.reason);break}let t=()=>r.abort(n.reason);n.addEventListener("abort",t,{once:!0}),o.push([n,t])}return{signal:r.signal,cleanup(){for(let[n,t]of o)n.removeEventListener("abort",t)}}}export{i as a};
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env node
2
- import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{b as P,c as O,d as T,e as k}from"./chunk-MBREBDZQ.js";import{f as F}from"./chunk-HWK7KFGB.js";import{l as v,m as w}from"./chunk-FUT3X2GJ.js";import{c as S}from"./chunk-OHFB3M3X.js";import{a as E}from"./chunk-NE4R2FVV.js";import{a as D}from"./chunk-I4IRHQDW.js";import{a as $,b as C}from"./chunk-MUFNRCMY.js";var H={name:"cp",summary:"copy files and directories",usage:"cp [OPTION]... SOURCE... DEST",options:["-r, -R, --recursive copy directories recursively","-n, --no-clobber do not overwrite an existing file","-p, --preserve preserve file attributes","-v, --verbose explain what is being done"," --help display this help and exit"]},I={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},preserve:{short:"p",long:"preserve",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},q={name:"cp",async execute(u,e){if(C(u))return $(H);let s=E("cp",u,I);if(!s.ok)return s.error;let d=s.result.flags.recursive||s.result.flags.recursiveUpper,A=s.result.flags.noClobber,N=s.result.flags.preserve,R=s.result.flags.verbose,p=s.result.positional;if(p.length<2)return{stdout:"",stderr:`cp: missing destination file operand
4
- `,exitCode:1};let m=p.pop()??"",g=p,l=e.fs.resolvePath(e.cwd,m),y="",n="",i=0,h=new T({limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"cp"}),f=!1;try{f=(await e.fs.stat(l)).isDirectory}catch{}if(g.length>1&&!f)return{stdout:"",stderr:`cp: target '${m}' is not a directory
5
- `,exitCode:1};for(let t of g)try{let o=e.fs.resolvePath(e.cwd,t),a=await e.fs.stat(o),r=l;if(f){let c=t.split("/").pop()||t;r=l==="/"?`/${c}`:`${l}/${c}`}if(a.isDirectory&&!d){n+=`cp: -r not specified; omitting directory '${t}'
6
- `,i=1;continue}if(a.isDirectory){let c=await O(e.fs,o,r,h);if(F(o,r)||c==="inside"){n+=`cp: cannot copy '${t}' into itself, '${r}'
7
- `,i=1;continue}if(c==="unknown"){n+=`cp: cannot safely determine whether '${r}' is inside '${t}'
8
- `,i=1;continue}}if(A)try{await e.fs.stat(r);continue}catch{}let b=await P(e.fs,o,r);if(b==="same"){n+=`cp: '${t}' and '${r}' are the same file
9
- `,i=1;continue}if(b==="unknown"){n+=`cp: cannot safely determine whether '${t}' and '${r}' are the same file
10
- `,i=1;continue}a.isDirectory&&await k({fs:e.fs,root:o,limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"cp",symlinks:"never",budget:h},()=>{}),await e.fs.cp(o,r,{recursive:d}),R&&(y+=`'${t}' -> '${r}'
11
- `)}catch(o){if(o instanceof v||o instanceof w)throw o;let a=D(o);S(o,"ENOENT")?n+=`cp: cannot stat '${t}': No such file or directory
12
- `:n+=`cp: cannot copy '${t}': ${a}
13
- `,i=1}return{stdout:y,stderr:n,exitCode:i}}},J={name:"cp",flags:[{flag:"-r",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-p",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{q as a,J as b};