@eidos.space/just-bash 3.0.2

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 (899) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/LICENSE +201 -0
  3. package/README.md +609 -0
  4. package/dist/AGENTS.md +325 -0
  5. package/dist/Bash.d.ts +257 -0
  6. package/dist/ast/types.d.ts +609 -0
  7. package/dist/banned-patterns-test.d.ts +1 -0
  8. package/dist/bin/chunks/alias-YRVAW27Y.js +3 -0
  9. package/dist/bin/chunks/awk2-RLMNTGI7.js +3 -0
  10. package/dist/bin/chunks/base64-RZRLGMB3.js +3 -0
  11. package/dist/bin/chunks/basename-F3AQ4KAQ.js +3 -0
  12. package/dist/bin/chunks/bash-CLP24TE2.js +3 -0
  13. package/dist/bin/chunks/cat-LQH5FSAR.js +3 -0
  14. package/dist/bin/chunks/chmod-S564JCJW.js +3 -0
  15. package/dist/bin/chunks/chunk-22HCD466.js +3 -0
  16. package/dist/bin/chunks/chunk-2AIXTPH2.js +9 -0
  17. package/dist/bin/chunks/chunk-2ETT4ELS.js +4 -0
  18. package/dist/bin/chunks/chunk-2GG3NVC4.js +10 -0
  19. package/dist/bin/chunks/chunk-2NRAWO6E.js +7 -0
  20. package/dist/bin/chunks/chunk-2SVX7I5P.js +14 -0
  21. package/dist/bin/chunks/chunk-3BYTCO2H.js +12 -0
  22. package/dist/bin/chunks/chunk-3MRB66F4.js +3 -0
  23. package/dist/bin/chunks/chunk-3UKQXBQ3.js +6 -0
  24. package/dist/bin/chunks/chunk-3WIMLJM7.js +8 -0
  25. package/dist/bin/chunks/chunk-47WZ2U6M.js +9 -0
  26. package/dist/bin/chunks/chunk-4KSZJAQK.js +6 -0
  27. package/dist/bin/chunks/chunk-5XSZHUEI.js +15 -0
  28. package/dist/bin/chunks/chunk-6FSBHK6H.js +22 -0
  29. package/dist/bin/chunks/chunk-6WJQNLR2.js +7 -0
  30. package/dist/bin/chunks/chunk-77MLOOQS.js +11 -0
  31. package/dist/bin/chunks/chunk-7AYT3UKI.js +6 -0
  32. package/dist/bin/chunks/chunk-7JZKVC3F.js +2 -0
  33. package/dist/bin/chunks/chunk-7NC4CPHS.js +20 -0
  34. package/dist/bin/chunks/chunk-7UU7KPEM.js +7 -0
  35. package/dist/bin/chunks/chunk-7VCQWCSH.js +15 -0
  36. package/dist/bin/chunks/chunk-AGKL4LDL.js +4 -0
  37. package/dist/bin/chunks/chunk-AJF3OBTR.js +4 -0
  38. package/dist/bin/chunks/chunk-ALVEEXFD.js +19 -0
  39. package/dist/bin/chunks/chunk-B2DRBHGQ.js +3 -0
  40. package/dist/bin/chunks/chunk-BE4PARL3.js +13 -0
  41. package/dist/bin/chunks/chunk-BGX3RW7H.js +10 -0
  42. package/dist/bin/chunks/chunk-BIJXTWZ4.js +3 -0
  43. package/dist/bin/chunks/chunk-BPZJYOUA.js +33 -0
  44. package/dist/bin/chunks/chunk-BZP56QBM.js +24 -0
  45. package/dist/bin/chunks/chunk-C7ISPH7Y.js +18 -0
  46. package/dist/bin/chunks/chunk-CAZ75E7E.js +3 -0
  47. package/dist/bin/chunks/chunk-D6CPXGKK.js +75 -0
  48. package/dist/bin/chunks/chunk-DJAX3ZRG.js +8 -0
  49. package/dist/bin/chunks/chunk-DYIBFLS3.js +17 -0
  50. package/dist/bin/chunks/chunk-EDTBGO7F.js +37 -0
  51. package/dist/bin/chunks/chunk-F3GKANW3.js +12 -0
  52. package/dist/bin/chunks/chunk-F3WNDKOC.js +3 -0
  53. package/dist/bin/chunks/chunk-FKVQZWJQ.js +10 -0
  54. package/dist/bin/chunks/chunk-FOUVACI7.js +16 -0
  55. package/dist/bin/chunks/chunk-FVRXEJYQ.js +141 -0
  56. package/dist/bin/chunks/chunk-G4AUMZUY.js +4 -0
  57. package/dist/bin/chunks/chunk-H7JTIXAO.js +4 -0
  58. package/dist/bin/chunks/chunk-HL4ZS7TX.js +6 -0
  59. package/dist/bin/chunks/chunk-HN2DCT7T.js +13 -0
  60. package/dist/bin/chunks/chunk-I4IRHQDW.js +3 -0
  61. package/dist/bin/chunks/chunk-IEXQTXU5.js +34 -0
  62. package/dist/bin/chunks/chunk-IZGLHVBB.js +8 -0
  63. package/dist/bin/chunks/chunk-J7TUF2VI.js +9 -0
  64. package/dist/bin/chunks/chunk-JNUX75OX.js +85 -0
  65. package/dist/bin/chunks/chunk-JXLDT4KX.js +4 -0
  66. package/dist/bin/chunks/chunk-JZW7NFK2.js +288 -0
  67. package/dist/bin/chunks/chunk-KFMPGSUT.js +9 -0
  68. package/dist/bin/chunks/chunk-KI54R2QB.js +3 -0
  69. package/dist/bin/chunks/chunk-KRRM5UCC.js +3 -0
  70. package/dist/bin/chunks/chunk-KUMHQGUR.js +3 -0
  71. package/dist/bin/chunks/chunk-L24QXM5S.js +34 -0
  72. package/dist/bin/chunks/chunk-LAHBP3FW.js +11 -0
  73. package/dist/bin/chunks/chunk-LC6D27QJ.js +3 -0
  74. package/dist/bin/chunks/chunk-LNNWMRCB.js +3 -0
  75. package/dist/bin/chunks/chunk-LNVSXNT7.js +3 -0
  76. package/dist/bin/chunks/chunk-LSQTB2QK.js +7 -0
  77. package/dist/bin/chunks/chunk-M65CQLJE.js +101 -0
  78. package/dist/bin/chunks/chunk-MLUOPG3W.js +3 -0
  79. package/dist/bin/chunks/chunk-MNWK4UIM.js +22 -0
  80. package/dist/bin/chunks/chunk-MROECM42.js +3 -0
  81. package/dist/bin/chunks/chunk-MUFNRCMY.js +24 -0
  82. package/dist/bin/chunks/chunk-N6YW4W3Z.js +29 -0
  83. package/dist/bin/chunks/chunk-NE4R2FVV.js +5 -0
  84. package/dist/bin/chunks/chunk-NXVG64T3.js +22 -0
  85. package/dist/bin/chunks/chunk-NYIPFY36.js +3 -0
  86. package/dist/bin/chunks/chunk-O2BCKSMK.js +3 -0
  87. package/dist/bin/chunks/chunk-OLEQNRKX.js +8 -0
  88. package/dist/bin/chunks/chunk-OPMLWMNH.js +17 -0
  89. package/dist/bin/chunks/chunk-PAYQNSZN.js +18 -0
  90. package/dist/bin/chunks/chunk-PBOVSFTJ.js +3 -0
  91. package/dist/bin/chunks/chunk-PXP4YYZA.js +13 -0
  92. package/dist/bin/chunks/chunk-PZQVSQX6.js +4 -0
  93. package/dist/bin/chunks/chunk-Q2GOPGDA.js +6 -0
  94. package/dist/bin/chunks/chunk-Q4UMTSRO.js +15 -0
  95. package/dist/bin/chunks/chunk-QL33F2W6.js +8 -0
  96. package/dist/bin/chunks/chunk-RVPTAYDS.js +4 -0
  97. package/dist/bin/chunks/chunk-SMSELHIY.js +12 -0
  98. package/dist/bin/chunks/chunk-UGJM7CKP.js +17 -0
  99. package/dist/bin/chunks/chunk-UO5LOD7U.js +12 -0
  100. package/dist/bin/chunks/chunk-UOMNSQEZ.js +10 -0
  101. package/dist/bin/chunks/chunk-UR4CEP4Y.js +3 -0
  102. package/dist/bin/chunks/chunk-V2RP73X4.js +15 -0
  103. package/dist/bin/chunks/chunk-VBDLSL7Y.js +10 -0
  104. package/dist/bin/chunks/chunk-VZK4FHWJ.js +3 -0
  105. package/dist/bin/chunks/chunk-WDWNEHHE.js +9 -0
  106. package/dist/bin/chunks/chunk-X4MX6EHF.js +6 -0
  107. package/dist/bin/chunks/chunk-XBB73LFB.js +5 -0
  108. package/dist/bin/chunks/chunk-XFFUAO3F.js +3 -0
  109. package/dist/bin/chunks/chunk-XHCCSVP6.js +9 -0
  110. package/dist/bin/chunks/chunk-XJ37N3S5.js +7 -0
  111. package/dist/bin/chunks/chunk-XPTYN6UE.js +8 -0
  112. package/dist/bin/chunks/chunk-XRUDFQG5.js +7 -0
  113. package/dist/bin/chunks/chunk-Y4FPH5DQ.js +64 -0
  114. package/dist/bin/chunks/chunk-YJ5OCPSK.js +7 -0
  115. package/dist/bin/chunks/chunk-YOIFOOGX.js +9 -0
  116. package/dist/bin/chunks/chunk-YOKQNNQO.js +6 -0
  117. package/dist/bin/chunks/chunk-YUZRUF5F.js +10 -0
  118. package/dist/bin/chunks/chunk-YY5PJR7O.js +7 -0
  119. package/dist/bin/chunks/chunk-ZFUVUYWG.js +15 -0
  120. package/dist/bin/chunks/clear-FGNEKYDU.js +3 -0
  121. package/dist/bin/chunks/column-AQB3A3PJ.js +3 -0
  122. package/dist/bin/chunks/comm-Q4VDF6ZO.js +3 -0
  123. package/dist/bin/chunks/cp-HYXTMN3D.js +3 -0
  124. package/dist/bin/chunks/curl-PLHETP4J.js +27 -0
  125. package/dist/bin/chunks/cut-ZI2HIAW7.js +3 -0
  126. package/dist/bin/chunks/date-JEZYSA4F.js +3 -0
  127. package/dist/bin/chunks/diff-YDJ42RKS.js +3 -0
  128. package/dist/bin/chunks/dirname-VCINTLPD.js +3 -0
  129. package/dist/bin/chunks/du-4LRQIGRG.js +3 -0
  130. package/dist/bin/chunks/echo-KCOHTNDF.js +3 -0
  131. package/dist/bin/chunks/env-NY32PQJM.js +3 -0
  132. package/dist/bin/chunks/expand-YYSO35NS.js +3 -0
  133. package/dist/bin/chunks/expansion-PPP6PD75.js +3 -0
  134. package/dist/bin/chunks/expr-7PLWSWZI.js +3 -0
  135. package/dist/bin/chunks/file-GRZLWDVH.js +3 -0
  136. package/dist/bin/chunks/find-P4DOE7CE.js +3 -0
  137. package/dist/bin/chunks/flag-coverage-RFKIBJ6L.js +3 -0
  138. package/dist/bin/chunks/fold-5MF7QZWQ.js +3 -0
  139. package/dist/bin/chunks/grep-VAYCFO4O.js +3 -0
  140. package/dist/bin/chunks/gzip-UGBQQKIH.js +3 -0
  141. package/dist/bin/chunks/head-QNC2ZYDO.js +3 -0
  142. package/dist/bin/chunks/help-CGUEOGXQ.js +3 -0
  143. package/dist/bin/chunks/history-AQQWW3QB.js +3 -0
  144. package/dist/bin/chunks/hostname-USNWOQCK.js +3 -0
  145. package/dist/bin/chunks/html-to-markdown-QEFY7XQR.js +3 -0
  146. package/dist/bin/chunks/join-EJ73DYTK.js +3 -0
  147. package/dist/bin/chunks/jq-GGTKKMEN.js +3 -0
  148. package/dist/bin/chunks/js-exec-BC6NI55L.js +98 -0
  149. package/dist/bin/chunks/js-exec-worker.js +4443 -0
  150. package/dist/bin/chunks/ln-LP4HMCSM.js +3 -0
  151. package/dist/bin/chunks/ls-KBNHNZWQ.js +3 -0
  152. package/dist/bin/chunks/md5sum-MCVDIB35.js +3 -0
  153. package/dist/bin/chunks/mkdir-P4DKRCDX.js +3 -0
  154. package/dist/bin/chunks/mv-QQK4FQX6.js +3 -0
  155. package/dist/bin/chunks/nl-KUPLVCTS.js +3 -0
  156. package/dist/bin/chunks/od-YQ5ZUI2H.js +3 -0
  157. package/dist/bin/chunks/paste-A5KKPWXX.js +3 -0
  158. package/dist/bin/chunks/printf-Z5C2UOI5.js +3 -0
  159. package/dist/bin/chunks/pwd-FCNDA467.js +3 -0
  160. package/dist/bin/chunks/python3-BQWDPUBM.js +13 -0
  161. package/dist/bin/chunks/readlink-25V57VOL.js +3 -0
  162. package/dist/bin/chunks/rev-PYHOZ4D4.js +3 -0
  163. package/dist/bin/chunks/rg-BGFMSIVK.js +3 -0
  164. package/dist/bin/chunks/rm-ECNUFR66.js +3 -0
  165. package/dist/bin/chunks/rmdir-DLOHIA7Q.js +3 -0
  166. package/dist/bin/chunks/sed-FWA634SN.js +3 -0
  167. package/dist/bin/chunks/seq-UXDJE6FB.js +3 -0
  168. package/dist/bin/chunks/sha1sum-4KF52U3Y.js +3 -0
  169. package/dist/bin/chunks/sha256sum-6YEPULPX.js +3 -0
  170. package/dist/bin/chunks/sleep-QHAPNY3Q.js +3 -0
  171. package/dist/bin/chunks/sort-4C6WOKNK.js +3 -0
  172. package/dist/bin/chunks/split-TV7NL7LA.js +3 -0
  173. package/dist/bin/chunks/sqlite3-W777NCI4.js +3 -0
  174. package/dist/bin/chunks/sqlite3-worker.js +1728 -0
  175. package/dist/bin/chunks/stat-BD6KT3BP.js +3 -0
  176. package/dist/bin/chunks/strings-MDD72LR6.js +3 -0
  177. package/dist/bin/chunks/tac-C2N4NQ6S.js +3 -0
  178. package/dist/bin/chunks/tail-BCB5W6JC.js +3 -0
  179. package/dist/bin/chunks/tar-DOO744MK.js +3 -0
  180. package/dist/bin/chunks/tee-UQHPO4OW.js +3 -0
  181. package/dist/bin/chunks/time-ZPY52VT2.js +3 -0
  182. package/dist/bin/chunks/timeout-5AX3ZS3X.js +3 -0
  183. package/dist/bin/chunks/touch-DFGSVIX7.js +3 -0
  184. package/dist/bin/chunks/tr-G7K6M6HP.js +3 -0
  185. package/dist/bin/chunks/tree-6D7SMPUR.js +3 -0
  186. package/dist/bin/chunks/true-SKL4L7JP.js +3 -0
  187. package/dist/bin/chunks/unexpand-QIR4EDPG.js +3 -0
  188. package/dist/bin/chunks/uniq-I7PVFJR4.js +3 -0
  189. package/dist/bin/chunks/wc-6NGWULAP.js +3 -0
  190. package/dist/bin/chunks/which-LCXKCLFC.js +3 -0
  191. package/dist/bin/chunks/whoami-TZDZDU7T.js +3 -0
  192. package/dist/bin/chunks/worker.js +3150 -0
  193. package/dist/bin/chunks/xan-KX4VPXUN.js +3 -0
  194. package/dist/bin/chunks/xan-view-JXOZLJ7S.js +3 -0
  195. package/dist/bin/chunks/xargs-UWHPYLY7.js +3 -0
  196. package/dist/bin/chunks/yq-GCDCJBKB.js +3 -0
  197. package/dist/bin/just-bash.js +755 -0
  198. package/dist/bin/shell/chunks/alias-YRVAW27Y.js +3 -0
  199. package/dist/bin/shell/chunks/awk2-RLMNTGI7.js +3 -0
  200. package/dist/bin/shell/chunks/base64-RZRLGMB3.js +3 -0
  201. package/dist/bin/shell/chunks/basename-F3AQ4KAQ.js +3 -0
  202. package/dist/bin/shell/chunks/bash-CLP24TE2.js +3 -0
  203. package/dist/bin/shell/chunks/cat-LQH5FSAR.js +3 -0
  204. package/dist/bin/shell/chunks/chmod-S564JCJW.js +3 -0
  205. package/dist/bin/shell/chunks/chunk-22HCD466.js +3 -0
  206. package/dist/bin/shell/chunks/chunk-2AIXTPH2.js +9 -0
  207. package/dist/bin/shell/chunks/chunk-2ETT4ELS.js +4 -0
  208. package/dist/bin/shell/chunks/chunk-2GG3NVC4.js +10 -0
  209. package/dist/bin/shell/chunks/chunk-2NRAWO6E.js +7 -0
  210. package/dist/bin/shell/chunks/chunk-2SVX7I5P.js +14 -0
  211. package/dist/bin/shell/chunks/chunk-3BYTCO2H.js +12 -0
  212. package/dist/bin/shell/chunks/chunk-3MRB66F4.js +3 -0
  213. package/dist/bin/shell/chunks/chunk-3UKQXBQ3.js +6 -0
  214. package/dist/bin/shell/chunks/chunk-3WIMLJM7.js +8 -0
  215. package/dist/bin/shell/chunks/chunk-47WZ2U6M.js +9 -0
  216. package/dist/bin/shell/chunks/chunk-4KSZJAQK.js +6 -0
  217. package/dist/bin/shell/chunks/chunk-5XSZHUEI.js +15 -0
  218. package/dist/bin/shell/chunks/chunk-6FSBHK6H.js +22 -0
  219. package/dist/bin/shell/chunks/chunk-6WJQNLR2.js +7 -0
  220. package/dist/bin/shell/chunks/chunk-77MLOOQS.js +11 -0
  221. package/dist/bin/shell/chunks/chunk-7AYT3UKI.js +6 -0
  222. package/dist/bin/shell/chunks/chunk-7JZKVC3F.js +2 -0
  223. package/dist/bin/shell/chunks/chunk-7NC4CPHS.js +20 -0
  224. package/dist/bin/shell/chunks/chunk-7UU7KPEM.js +7 -0
  225. package/dist/bin/shell/chunks/chunk-7VCQWCSH.js +15 -0
  226. package/dist/bin/shell/chunks/chunk-AGKL4LDL.js +4 -0
  227. package/dist/bin/shell/chunks/chunk-AJF3OBTR.js +4 -0
  228. package/dist/bin/shell/chunks/chunk-ALVEEXFD.js +19 -0
  229. package/dist/bin/shell/chunks/chunk-B2DRBHGQ.js +3 -0
  230. package/dist/bin/shell/chunks/chunk-BE4PARL3.js +13 -0
  231. package/dist/bin/shell/chunks/chunk-BGX3RW7H.js +10 -0
  232. package/dist/bin/shell/chunks/chunk-BIJXTWZ4.js +3 -0
  233. package/dist/bin/shell/chunks/chunk-BPZJYOUA.js +33 -0
  234. package/dist/bin/shell/chunks/chunk-BZP56QBM.js +24 -0
  235. package/dist/bin/shell/chunks/chunk-C7ISPH7Y.js +18 -0
  236. package/dist/bin/shell/chunks/chunk-CAZ75E7E.js +3 -0
  237. package/dist/bin/shell/chunks/chunk-D6CPXGKK.js +75 -0
  238. package/dist/bin/shell/chunks/chunk-DJAX3ZRG.js +8 -0
  239. package/dist/bin/shell/chunks/chunk-DYIBFLS3.js +17 -0
  240. package/dist/bin/shell/chunks/chunk-EDTBGO7F.js +37 -0
  241. package/dist/bin/shell/chunks/chunk-F3GKANW3.js +12 -0
  242. package/dist/bin/shell/chunks/chunk-F3WNDKOC.js +3 -0
  243. package/dist/bin/shell/chunks/chunk-FKVQZWJQ.js +10 -0
  244. package/dist/bin/shell/chunks/chunk-FOUVACI7.js +16 -0
  245. package/dist/bin/shell/chunks/chunk-FVRXEJYQ.js +141 -0
  246. package/dist/bin/shell/chunks/chunk-G4AUMZUY.js +4 -0
  247. package/dist/bin/shell/chunks/chunk-H7JTIXAO.js +4 -0
  248. package/dist/bin/shell/chunks/chunk-HL4ZS7TX.js +6 -0
  249. package/dist/bin/shell/chunks/chunk-HN2DCT7T.js +13 -0
  250. package/dist/bin/shell/chunks/chunk-I4IRHQDW.js +3 -0
  251. package/dist/bin/shell/chunks/chunk-IEXQTXU5.js +34 -0
  252. package/dist/bin/shell/chunks/chunk-IZGLHVBB.js +8 -0
  253. package/dist/bin/shell/chunks/chunk-J7TUF2VI.js +9 -0
  254. package/dist/bin/shell/chunks/chunk-JNUX75OX.js +85 -0
  255. package/dist/bin/shell/chunks/chunk-JXLDT4KX.js +4 -0
  256. package/dist/bin/shell/chunks/chunk-JZW7NFK2.js +288 -0
  257. package/dist/bin/shell/chunks/chunk-KFMPGSUT.js +9 -0
  258. package/dist/bin/shell/chunks/chunk-KI54R2QB.js +3 -0
  259. package/dist/bin/shell/chunks/chunk-KRRM5UCC.js +3 -0
  260. package/dist/bin/shell/chunks/chunk-KUMHQGUR.js +3 -0
  261. package/dist/bin/shell/chunks/chunk-L24QXM5S.js +34 -0
  262. package/dist/bin/shell/chunks/chunk-LAHBP3FW.js +11 -0
  263. package/dist/bin/shell/chunks/chunk-LC6D27QJ.js +3 -0
  264. package/dist/bin/shell/chunks/chunk-LNNWMRCB.js +3 -0
  265. package/dist/bin/shell/chunks/chunk-LNVSXNT7.js +3 -0
  266. package/dist/bin/shell/chunks/chunk-LSQTB2QK.js +7 -0
  267. package/dist/bin/shell/chunks/chunk-M65CQLJE.js +101 -0
  268. package/dist/bin/shell/chunks/chunk-MLUOPG3W.js +3 -0
  269. package/dist/bin/shell/chunks/chunk-MNWK4UIM.js +22 -0
  270. package/dist/bin/shell/chunks/chunk-MROECM42.js +3 -0
  271. package/dist/bin/shell/chunks/chunk-MUFNRCMY.js +24 -0
  272. package/dist/bin/shell/chunks/chunk-N6YW4W3Z.js +29 -0
  273. package/dist/bin/shell/chunks/chunk-NE4R2FVV.js +5 -0
  274. package/dist/bin/shell/chunks/chunk-NXVG64T3.js +22 -0
  275. package/dist/bin/shell/chunks/chunk-NYIPFY36.js +3 -0
  276. package/dist/bin/shell/chunks/chunk-O2BCKSMK.js +3 -0
  277. package/dist/bin/shell/chunks/chunk-OLEQNRKX.js +8 -0
  278. package/dist/bin/shell/chunks/chunk-OPMLWMNH.js +17 -0
  279. package/dist/bin/shell/chunks/chunk-PAYQNSZN.js +18 -0
  280. package/dist/bin/shell/chunks/chunk-PBOVSFTJ.js +3 -0
  281. package/dist/bin/shell/chunks/chunk-PXP4YYZA.js +13 -0
  282. package/dist/bin/shell/chunks/chunk-PZQVSQX6.js +4 -0
  283. package/dist/bin/shell/chunks/chunk-Q2GOPGDA.js +6 -0
  284. package/dist/bin/shell/chunks/chunk-Q4UMTSRO.js +15 -0
  285. package/dist/bin/shell/chunks/chunk-QL33F2W6.js +8 -0
  286. package/dist/bin/shell/chunks/chunk-RVPTAYDS.js +4 -0
  287. package/dist/bin/shell/chunks/chunk-SMSELHIY.js +12 -0
  288. package/dist/bin/shell/chunks/chunk-UGJM7CKP.js +17 -0
  289. package/dist/bin/shell/chunks/chunk-UO5LOD7U.js +12 -0
  290. package/dist/bin/shell/chunks/chunk-UOMNSQEZ.js +10 -0
  291. package/dist/bin/shell/chunks/chunk-UR4CEP4Y.js +3 -0
  292. package/dist/bin/shell/chunks/chunk-V2RP73X4.js +15 -0
  293. package/dist/bin/shell/chunks/chunk-VBDLSL7Y.js +10 -0
  294. package/dist/bin/shell/chunks/chunk-VZK4FHWJ.js +3 -0
  295. package/dist/bin/shell/chunks/chunk-WDWNEHHE.js +9 -0
  296. package/dist/bin/shell/chunks/chunk-X4MX6EHF.js +6 -0
  297. package/dist/bin/shell/chunks/chunk-XBB73LFB.js +5 -0
  298. package/dist/bin/shell/chunks/chunk-XFFUAO3F.js +3 -0
  299. package/dist/bin/shell/chunks/chunk-XHCCSVP6.js +9 -0
  300. package/dist/bin/shell/chunks/chunk-XJ37N3S5.js +7 -0
  301. package/dist/bin/shell/chunks/chunk-XPTYN6UE.js +8 -0
  302. package/dist/bin/shell/chunks/chunk-XRUDFQG5.js +7 -0
  303. package/dist/bin/shell/chunks/chunk-Y4FPH5DQ.js +64 -0
  304. package/dist/bin/shell/chunks/chunk-YJ5OCPSK.js +7 -0
  305. package/dist/bin/shell/chunks/chunk-YOIFOOGX.js +9 -0
  306. package/dist/bin/shell/chunks/chunk-YOKQNNQO.js +6 -0
  307. package/dist/bin/shell/chunks/chunk-YUZRUF5F.js +10 -0
  308. package/dist/bin/shell/chunks/chunk-YY5PJR7O.js +7 -0
  309. package/dist/bin/shell/chunks/chunk-ZFUVUYWG.js +15 -0
  310. package/dist/bin/shell/chunks/clear-FGNEKYDU.js +3 -0
  311. package/dist/bin/shell/chunks/column-AQB3A3PJ.js +3 -0
  312. package/dist/bin/shell/chunks/comm-Q4VDF6ZO.js +3 -0
  313. package/dist/bin/shell/chunks/cp-HYXTMN3D.js +3 -0
  314. package/dist/bin/shell/chunks/curl-PLHETP4J.js +27 -0
  315. package/dist/bin/shell/chunks/cut-ZI2HIAW7.js +3 -0
  316. package/dist/bin/shell/chunks/date-JEZYSA4F.js +3 -0
  317. package/dist/bin/shell/chunks/diff-YDJ42RKS.js +3 -0
  318. package/dist/bin/shell/chunks/dirname-VCINTLPD.js +3 -0
  319. package/dist/bin/shell/chunks/du-4LRQIGRG.js +3 -0
  320. package/dist/bin/shell/chunks/echo-KCOHTNDF.js +3 -0
  321. package/dist/bin/shell/chunks/env-NY32PQJM.js +3 -0
  322. package/dist/bin/shell/chunks/expand-YYSO35NS.js +3 -0
  323. package/dist/bin/shell/chunks/expansion-PPP6PD75.js +3 -0
  324. package/dist/bin/shell/chunks/expr-7PLWSWZI.js +3 -0
  325. package/dist/bin/shell/chunks/file-GRZLWDVH.js +3 -0
  326. package/dist/bin/shell/chunks/find-P4DOE7CE.js +3 -0
  327. package/dist/bin/shell/chunks/flag-coverage-RFKIBJ6L.js +3 -0
  328. package/dist/bin/shell/chunks/fold-5MF7QZWQ.js +3 -0
  329. package/dist/bin/shell/chunks/grep-VAYCFO4O.js +3 -0
  330. package/dist/bin/shell/chunks/gzip-UGBQQKIH.js +3 -0
  331. package/dist/bin/shell/chunks/head-QNC2ZYDO.js +3 -0
  332. package/dist/bin/shell/chunks/help-CGUEOGXQ.js +3 -0
  333. package/dist/bin/shell/chunks/history-AQQWW3QB.js +3 -0
  334. package/dist/bin/shell/chunks/hostname-USNWOQCK.js +3 -0
  335. package/dist/bin/shell/chunks/html-to-markdown-QEFY7XQR.js +3 -0
  336. package/dist/bin/shell/chunks/join-EJ73DYTK.js +3 -0
  337. package/dist/bin/shell/chunks/jq-GGTKKMEN.js +3 -0
  338. package/dist/bin/shell/chunks/js-exec-BC6NI55L.js +98 -0
  339. package/dist/bin/shell/chunks/ln-LP4HMCSM.js +3 -0
  340. package/dist/bin/shell/chunks/ls-KBNHNZWQ.js +3 -0
  341. package/dist/bin/shell/chunks/md5sum-MCVDIB35.js +3 -0
  342. package/dist/bin/shell/chunks/mkdir-P4DKRCDX.js +3 -0
  343. package/dist/bin/shell/chunks/mv-QQK4FQX6.js +3 -0
  344. package/dist/bin/shell/chunks/nl-KUPLVCTS.js +3 -0
  345. package/dist/bin/shell/chunks/od-YQ5ZUI2H.js +3 -0
  346. package/dist/bin/shell/chunks/paste-A5KKPWXX.js +3 -0
  347. package/dist/bin/shell/chunks/printf-Z5C2UOI5.js +3 -0
  348. package/dist/bin/shell/chunks/pwd-FCNDA467.js +3 -0
  349. package/dist/bin/shell/chunks/python3-BQWDPUBM.js +13 -0
  350. package/dist/bin/shell/chunks/readlink-25V57VOL.js +3 -0
  351. package/dist/bin/shell/chunks/rev-PYHOZ4D4.js +3 -0
  352. package/dist/bin/shell/chunks/rg-BGFMSIVK.js +3 -0
  353. package/dist/bin/shell/chunks/rm-ECNUFR66.js +3 -0
  354. package/dist/bin/shell/chunks/rmdir-DLOHIA7Q.js +3 -0
  355. package/dist/bin/shell/chunks/sed-FWA634SN.js +3 -0
  356. package/dist/bin/shell/chunks/seq-UXDJE6FB.js +3 -0
  357. package/dist/bin/shell/chunks/sha1sum-4KF52U3Y.js +3 -0
  358. package/dist/bin/shell/chunks/sha256sum-6YEPULPX.js +3 -0
  359. package/dist/bin/shell/chunks/sleep-QHAPNY3Q.js +3 -0
  360. package/dist/bin/shell/chunks/sort-4C6WOKNK.js +3 -0
  361. package/dist/bin/shell/chunks/split-TV7NL7LA.js +3 -0
  362. package/dist/bin/shell/chunks/sqlite3-W777NCI4.js +3 -0
  363. package/dist/bin/shell/chunks/stat-BD6KT3BP.js +3 -0
  364. package/dist/bin/shell/chunks/strings-MDD72LR6.js +3 -0
  365. package/dist/bin/shell/chunks/tac-C2N4NQ6S.js +3 -0
  366. package/dist/bin/shell/chunks/tail-BCB5W6JC.js +3 -0
  367. package/dist/bin/shell/chunks/tar-DOO744MK.js +3 -0
  368. package/dist/bin/shell/chunks/tee-UQHPO4OW.js +3 -0
  369. package/dist/bin/shell/chunks/time-ZPY52VT2.js +3 -0
  370. package/dist/bin/shell/chunks/timeout-5AX3ZS3X.js +3 -0
  371. package/dist/bin/shell/chunks/touch-DFGSVIX7.js +3 -0
  372. package/dist/bin/shell/chunks/tr-G7K6M6HP.js +3 -0
  373. package/dist/bin/shell/chunks/tree-6D7SMPUR.js +3 -0
  374. package/dist/bin/shell/chunks/true-SKL4L7JP.js +3 -0
  375. package/dist/bin/shell/chunks/unexpand-QIR4EDPG.js +3 -0
  376. package/dist/bin/shell/chunks/uniq-I7PVFJR4.js +3 -0
  377. package/dist/bin/shell/chunks/wc-6NGWULAP.js +3 -0
  378. package/dist/bin/shell/chunks/which-LCXKCLFC.js +3 -0
  379. package/dist/bin/shell/chunks/whoami-TZDZDU7T.js +3 -0
  380. package/dist/bin/shell/chunks/xan-KX4VPXUN.js +3 -0
  381. package/dist/bin/shell/chunks/xan-view-JXOZLJ7S.js +3 -0
  382. package/dist/bin/shell/chunks/xargs-UWHPYLY7.js +3 -0
  383. package/dist/bin/shell/chunks/yq-GCDCJBKB.js +3 -0
  384. package/dist/bin/shell/shell.js +734 -0
  385. package/dist/browser.d.ts +23 -0
  386. package/dist/bundle/browser.js +1515 -0
  387. package/dist/bundle/chunks/alias-RTYYYW3D.js +2 -0
  388. package/dist/bundle/chunks/awk2-LA3USKJP.js +2 -0
  389. package/dist/bundle/chunks/base64-C2AIWVNC.js +2 -0
  390. package/dist/bundle/chunks/basename-UB3CIYNI.js +2 -0
  391. package/dist/bundle/chunks/bash-YZ33HQZQ.js +2 -0
  392. package/dist/bundle/chunks/cat-TSFMZVYS.js +2 -0
  393. package/dist/bundle/chunks/chmod-TFEPA42X.js +2 -0
  394. package/dist/bundle/chunks/chunk-27JIFWUR.js +3 -0
  395. package/dist/bundle/chunks/chunk-2JIPICV3.js +13 -0
  396. package/dist/bundle/chunks/chunk-2SMD2AUA.js +3 -0
  397. package/dist/bundle/chunks/chunk-2VDTE5BV.js +14 -0
  398. package/dist/bundle/chunks/chunk-2VJJEDV2.js +8 -0
  399. package/dist/bundle/chunks/chunk-46RN27KI.js +100 -0
  400. package/dist/bundle/chunks/chunk-4I3HOE5Z.js +21 -0
  401. package/dist/bundle/chunks/chunk-4JLVZKHC.js +8 -0
  402. package/dist/bundle/chunks/chunk-4MZPEZTU.js +3 -0
  403. package/dist/bundle/chunks/chunk-4N6J7B5P.js +6 -0
  404. package/dist/bundle/chunks/chunk-4RUAZWKT.js +33 -0
  405. package/dist/bundle/chunks/chunk-4WKZNNJK.js +2 -0
  406. package/dist/bundle/chunks/chunk-5H5SCKJM.js +11 -0
  407. package/dist/bundle/chunks/chunk-6LASZU3O.js +5 -0
  408. package/dist/bundle/chunks/chunk-6SHYIICL.js +4 -0
  409. package/dist/bundle/chunks/chunk-6VAT5Z2D.js +5 -0
  410. package/dist/bundle/chunks/chunk-7AISL3XV.js +12 -0
  411. package/dist/bundle/chunks/chunk-7EUWTCWK.js +2 -0
  412. package/dist/bundle/chunks/chunk-7JHM3L42.js +6 -0
  413. package/dist/bundle/chunks/chunk-A4R2GWRF.js +9 -0
  414. package/dist/bundle/chunks/chunk-ACSZB4FE.js +11 -0
  415. package/dist/bundle/chunks/chunk-AQ6FYS2X.js +2 -0
  416. package/dist/bundle/chunks/chunk-BVKWRAS6.js +12 -0
  417. package/dist/bundle/chunks/chunk-BZUGFHVS.js +2 -0
  418. package/dist/bundle/chunks/chunk-CBJVD2XA.js +7 -0
  419. package/dist/bundle/chunks/chunk-CHFEPBH4.js +18 -0
  420. package/dist/bundle/chunks/chunk-CN5XGDNN.js +6 -0
  421. package/dist/bundle/chunks/chunk-DLL7UR66.js +2 -0
  422. package/dist/bundle/chunks/chunk-EBAPSGAO.js +9 -0
  423. package/dist/bundle/chunks/chunk-FAXLQUCQ.js +10 -0
  424. package/dist/bundle/chunks/chunk-FHC24QSK.js +7 -0
  425. package/dist/bundle/chunks/chunk-FJK43EBQ.js +14 -0
  426. package/dist/bundle/chunks/chunk-FOCWZZDE.js +2 -0
  427. package/dist/bundle/chunks/chunk-FW54FHZR.js +2 -0
  428. package/dist/bundle/chunks/chunk-FX4RBUYU.js +5 -0
  429. package/dist/bundle/chunks/chunk-FX7KQCEA.js +33 -0
  430. package/dist/bundle/chunks/chunk-FZRQOL3C.js +7 -0
  431. package/dist/bundle/chunks/chunk-G5EVRAOO.js +74 -0
  432. package/dist/bundle/chunks/chunk-GGC5NEPZ.js +8 -0
  433. package/dist/bundle/chunks/chunk-GIUR5SNU.js +15 -0
  434. package/dist/bundle/chunks/chunk-GJC3WVOW.js +2 -0
  435. package/dist/bundle/chunks/chunk-GSPYNYZA.js +6 -0
  436. package/dist/bundle/chunks/chunk-GTQIUQM6.js +5 -0
  437. package/dist/bundle/chunks/chunk-HBVMHTO5.js +2 -0
  438. package/dist/bundle/chunks/chunk-HDRAUQK2.js +2 -0
  439. package/dist/bundle/chunks/chunk-HJBTD7PY.js +21 -0
  440. package/dist/bundle/chunks/chunk-ICIEVHY5.js +36 -0
  441. package/dist/bundle/chunks/chunk-KATRCGLX.js +2 -0
  442. package/dist/bundle/chunks/chunk-KD3KENL6.js +11 -0
  443. package/dist/bundle/chunks/chunk-KWGBQNTV.js +32 -0
  444. package/dist/bundle/chunks/chunk-L2UW7DWF.js +2 -0
  445. package/dist/bundle/chunks/chunk-L64BMZUV.js +2 -0
  446. package/dist/bundle/chunks/chunk-LEKBROJD.js +6 -0
  447. package/dist/bundle/chunks/chunk-LNBPBRV4.js +21 -0
  448. package/dist/bundle/chunks/chunk-LPJEKUCB.js +8 -0
  449. package/dist/bundle/chunks/chunk-LSLPJOYM.js +3 -0
  450. package/dist/bundle/chunks/chunk-MFDPAVC6.js +14 -0
  451. package/dist/bundle/chunks/chunk-MLIO3BK2.js +7 -0
  452. package/dist/bundle/chunks/chunk-MQKGGNPS.js +16 -0
  453. package/dist/bundle/chunks/chunk-MZFCCXPZ.js +63 -0
  454. package/dist/bundle/chunks/chunk-N6DXJ2JN.js +287 -0
  455. package/dist/bundle/chunks/chunk-NRSASXYY.js +2 -0
  456. package/dist/bundle/chunks/chunk-OC35HPHG.js +2 -0
  457. package/dist/bundle/chunks/chunk-OGJ5CFPR.js +9 -0
  458. package/dist/bundle/chunks/chunk-OVGANXCG.js +8 -0
  459. package/dist/bundle/chunks/chunk-Q7H5W7YE.js +140 -0
  460. package/dist/bundle/chunks/chunk-QAYAQNCG.js +23 -0
  461. package/dist/bundle/chunks/chunk-QIQMJJZ4.js +4 -0
  462. package/dist/bundle/chunks/chunk-R4IFXNY5.js +28 -0
  463. package/dist/bundle/chunks/chunk-R74UQCKX.js +5 -0
  464. package/dist/bundle/chunks/chunk-S3LEJEPP.js +2 -0
  465. package/dist/bundle/chunks/chunk-S443BAN4.js +7 -0
  466. package/dist/bundle/chunks/chunk-SAI2SPQQ.js +8 -0
  467. package/dist/bundle/chunks/chunk-SBBYKIYU.js +3 -0
  468. package/dist/bundle/chunks/chunk-SETW5JBN.js +9 -0
  469. package/dist/bundle/chunks/chunk-SHKOQWO4.js +3 -0
  470. package/dist/bundle/chunks/chunk-SJYEXC2Z.js +14 -0
  471. package/dist/bundle/chunks/chunk-SO6R3ZKN.js +16 -0
  472. package/dist/bundle/chunks/chunk-STHBFACM.js +1 -0
  473. package/dist/bundle/chunks/chunk-SX2HC7SO.js +2 -0
  474. package/dist/bundle/chunks/chunk-T4TFLF3R.js +16 -0
  475. package/dist/bundle/chunks/chunk-TDD4NFYE.js +2 -0
  476. package/dist/bundle/chunks/chunk-TN7HHBQW.js +5 -0
  477. package/dist/bundle/chunks/chunk-U73A73IE.js +17 -0
  478. package/dist/bundle/chunks/chunk-UIJUTQPH.js +3 -0
  479. package/dist/bundle/chunks/chunk-UP6MSJGD.js +17 -0
  480. package/dist/bundle/chunks/chunk-VLCHOJWK.js +6 -0
  481. package/dist/bundle/chunks/chunk-VPADYNBD.js +10 -0
  482. package/dist/bundle/chunks/chunk-W5DWRFSU.js +2 -0
  483. package/dist/bundle/chunks/chunk-WM5IJFMP.js +8 -0
  484. package/dist/bundle/chunks/chunk-WNH3HOQA.js +2 -0
  485. package/dist/bundle/chunks/chunk-WPGQVBSY.js +6 -0
  486. package/dist/bundle/chunks/chunk-WVRWIZF5.js +23 -0
  487. package/dist/bundle/chunks/chunk-XCQWV4AU.js +12 -0
  488. package/dist/bundle/chunks/chunk-XDGLKIHR.js +9 -0
  489. package/dist/bundle/chunks/chunk-XHLMAZX2.js +5 -0
  490. package/dist/bundle/chunks/chunk-XRFHFXFP.js +2 -0
  491. package/dist/bundle/chunks/chunk-XUIHBHL5.js +5 -0
  492. package/dist/bundle/chunks/chunk-XYXUMFSU.js +14 -0
  493. package/dist/bundle/chunks/chunk-Y4LIDHSD.js +7 -0
  494. package/dist/bundle/chunks/chunk-YCLFEX4T.js +3 -0
  495. package/dist/bundle/chunks/chunk-YS4NUBYX.js +9 -0
  496. package/dist/bundle/chunks/chunk-ZDIT6ST5.js +7 -0
  497. package/dist/bundle/chunks/chunk-ZDPFA4L3.js +6 -0
  498. package/dist/bundle/chunks/chunk-ZZKH2ELC.js +11 -0
  499. package/dist/bundle/chunks/clear-HKGFEOF6.js +2 -0
  500. package/dist/bundle/chunks/column-XT6UFXNQ.js +2 -0
  501. package/dist/bundle/chunks/comm-VV2LDX2J.js +2 -0
  502. package/dist/bundle/chunks/cp-BISAAS7A.js +2 -0
  503. package/dist/bundle/chunks/curl-GRYA74XW.js +26 -0
  504. package/dist/bundle/chunks/cut-OKARJCCV.js +2 -0
  505. package/dist/bundle/chunks/date-UUUPW43J.js +2 -0
  506. package/dist/bundle/chunks/diff-MWJFIG7X.js +2 -0
  507. package/dist/bundle/chunks/dirname-MPHRFUTI.js +2 -0
  508. package/dist/bundle/chunks/du-572XNP42.js +2 -0
  509. package/dist/bundle/chunks/echo-NDWZZHPO.js +2 -0
  510. package/dist/bundle/chunks/env-36M5BO7M.js +2 -0
  511. package/dist/bundle/chunks/expand-JSPG6VOP.js +2 -0
  512. package/dist/bundle/chunks/expansion-R25BK4W3.js +2 -0
  513. package/dist/bundle/chunks/expr-5JAACS4X.js +2 -0
  514. package/dist/bundle/chunks/file-IPZJC3FQ.js +2 -0
  515. package/dist/bundle/chunks/find-INTH3OLC.js +2 -0
  516. package/dist/bundle/chunks/flag-coverage-XWSYNE72.js +2 -0
  517. package/dist/bundle/chunks/fold-4TQNYMSW.js +2 -0
  518. package/dist/bundle/chunks/grep-V3LQVMRQ.js +2 -0
  519. package/dist/bundle/chunks/gzip-O5ASJAFY.js +2 -0
  520. package/dist/bundle/chunks/head-442HYESI.js +2 -0
  521. package/dist/bundle/chunks/help-HZ6M2CKN.js +2 -0
  522. package/dist/bundle/chunks/history-WYYKSLSZ.js +2 -0
  523. package/dist/bundle/chunks/hostname-C4HQXXUP.js +2 -0
  524. package/dist/bundle/chunks/html-to-markdown-JW4MSQZO.js +2 -0
  525. package/dist/bundle/chunks/join-TBRGI3LQ.js +2 -0
  526. package/dist/bundle/chunks/jq-4XLYLOS5.js +2 -0
  527. package/dist/bundle/chunks/js-exec-N5KEZBH7.js +97 -0
  528. package/dist/bundle/chunks/js-exec-worker.js +4443 -0
  529. package/dist/bundle/chunks/ln-4LGSXXGD.js +2 -0
  530. package/dist/bundle/chunks/ls-ZJGQER7M.js +2 -0
  531. package/dist/bundle/chunks/md5sum-SPU24VSG.js +2 -0
  532. package/dist/bundle/chunks/mkdir-MEPGZOB6.js +2 -0
  533. package/dist/bundle/chunks/mv-W5BIQ646.js +2 -0
  534. package/dist/bundle/chunks/nl-WSDW7I4O.js +2 -0
  535. package/dist/bundle/chunks/od-WOKFDJTP.js +2 -0
  536. package/dist/bundle/chunks/paste-7JC6S4DX.js +2 -0
  537. package/dist/bundle/chunks/printf-TWGXF445.js +2 -0
  538. package/dist/bundle/chunks/pwd-WE6EN5AV.js +2 -0
  539. package/dist/bundle/chunks/python3-POMOR4OA.js +12 -0
  540. package/dist/bundle/chunks/readlink-OPJF4DL5.js +2 -0
  541. package/dist/bundle/chunks/rev-5EHFX4EJ.js +2 -0
  542. package/dist/bundle/chunks/rg-S4FXYXWB.js +2 -0
  543. package/dist/bundle/chunks/rm-SSGETQVQ.js +2 -0
  544. package/dist/bundle/chunks/rmdir-OC4ZLPYA.js +2 -0
  545. package/dist/bundle/chunks/sed-S5UIK574.js +2 -0
  546. package/dist/bundle/chunks/seq-M5EC7Q57.js +2 -0
  547. package/dist/bundle/chunks/sha1sum-2PTOAFR6.js +2 -0
  548. package/dist/bundle/chunks/sha256sum-NS7D3IXX.js +2 -0
  549. package/dist/bundle/chunks/sleep-X22JJINO.js +2 -0
  550. package/dist/bundle/chunks/sort-SW2YEO5B.js +2 -0
  551. package/dist/bundle/chunks/split-4KKZZXXE.js +2 -0
  552. package/dist/bundle/chunks/sqlite3-CGOEFJAO.js +2 -0
  553. package/dist/bundle/chunks/sqlite3-worker.js +1728 -0
  554. package/dist/bundle/chunks/stat-CD34IZ4P.js +2 -0
  555. package/dist/bundle/chunks/strings-6WDHLGMX.js +2 -0
  556. package/dist/bundle/chunks/tac-2STMMJYW.js +2 -0
  557. package/dist/bundle/chunks/tail-R4PCA2C4.js +2 -0
  558. package/dist/bundle/chunks/tar-STHHZTZ6.js +2 -0
  559. package/dist/bundle/chunks/tee-YUZ2FKCJ.js +2 -0
  560. package/dist/bundle/chunks/time-D4LNBSWX.js +2 -0
  561. package/dist/bundle/chunks/timeout-YDCRSLPQ.js +2 -0
  562. package/dist/bundle/chunks/touch-UA33VN3N.js +2 -0
  563. package/dist/bundle/chunks/tr-36LHWFRQ.js +2 -0
  564. package/dist/bundle/chunks/tree-YLD52CNT.js +2 -0
  565. package/dist/bundle/chunks/true-FHQXJXBE.js +2 -0
  566. package/dist/bundle/chunks/unexpand-CADSA4VO.js +2 -0
  567. package/dist/bundle/chunks/uniq-XSIZR6PB.js +2 -0
  568. package/dist/bundle/chunks/wc-LF7NU4LA.js +2 -0
  569. package/dist/bundle/chunks/which-XEM24D5D.js +2 -0
  570. package/dist/bundle/chunks/whoami-XMTX52VE.js +2 -0
  571. package/dist/bundle/chunks/worker.js +3150 -0
  572. package/dist/bundle/chunks/xan-Y6WF3IRG.js +2 -0
  573. package/dist/bundle/chunks/xan-view-HDVKHFC2.js +2 -0
  574. package/dist/bundle/chunks/xargs-MGZPH7AX.js +2 -0
  575. package/dist/bundle/chunks/yq-4QJW3EQG.js +2 -0
  576. package/dist/bundle/index.cjs +2178 -0
  577. package/dist/bundle/index.js +710 -0
  578. package/dist/commands/alias/alias.d.ts +6 -0
  579. package/dist/commands/awk/ast.d.ts +202 -0
  580. package/dist/commands/awk/awk2.d.ts +9 -0
  581. package/dist/commands/awk/builtins.d.ts +17 -0
  582. package/dist/commands/awk/interpreter/context.d.ts +75 -0
  583. package/dist/commands/awk/interpreter/expressions.d.ts +17 -0
  584. package/dist/commands/awk/interpreter/fields.d.ts +25 -0
  585. package/dist/commands/awk/interpreter/index.d.ts +8 -0
  586. package/dist/commands/awk/interpreter/interpreter.d.ts +54 -0
  587. package/dist/commands/awk/interpreter/statements.d.ts +11 -0
  588. package/dist/commands/awk/interpreter/type-coercion.d.ts +32 -0
  589. package/dist/commands/awk/interpreter/types.d.ts +13 -0
  590. package/dist/commands/awk/interpreter/variables.d.ts +35 -0
  591. package/dist/commands/awk/lexer.d.ts +100 -0
  592. package/dist/commands/awk/parser2-print.d.ts +35 -0
  593. package/dist/commands/awk/parser2.d.ts +81 -0
  594. package/dist/commands/base64/base64.d.ts +7 -0
  595. package/dist/commands/basename/basename.d.ts +4 -0
  596. package/dist/commands/bash/bash.d.ts +6 -0
  597. package/dist/commands/browser-excluded.d.ts +16 -0
  598. package/dist/commands/cat/cat.d.ts +4 -0
  599. package/dist/commands/chmod/chmod.d.ts +4 -0
  600. package/dist/commands/clear/clear.d.ts +4 -0
  601. package/dist/commands/column/column.d.ts +11 -0
  602. package/dist/commands/comm/comm.d.ts +12 -0
  603. package/dist/commands/cp/cp.d.ts +4 -0
  604. package/dist/commands/curl/curl.d.ts +8 -0
  605. package/dist/commands/curl/form.d.ts +21 -0
  606. package/dist/commands/curl/help.d.ts +9 -0
  607. package/dist/commands/curl/parse.d.ts +9 -0
  608. package/dist/commands/curl/response-formatting.d.ts +20 -0
  609. package/dist/commands/curl/types.d.ts +60 -0
  610. package/dist/commands/cut/cut.d.ts +4 -0
  611. package/dist/commands/date/date.d.ts +7 -0
  612. package/dist/commands/diff/diff.d.ts +7 -0
  613. package/dist/commands/dirname/dirname.d.ts +4 -0
  614. package/dist/commands/du/du.d.ts +4 -0
  615. package/dist/commands/duration.d.ts +5 -0
  616. package/dist/commands/echo/echo.d.ts +4 -0
  617. package/dist/commands/env/env.d.ts +6 -0
  618. package/dist/commands/expand/expand.d.ts +12 -0
  619. package/dist/commands/expand/unexpand.d.ts +12 -0
  620. package/dist/commands/expr/expr.d.ts +9 -0
  621. package/dist/commands/file/file.d.ts +9 -0
  622. package/dist/commands/find/find.d.ts +4 -0
  623. package/dist/commands/find/matcher.d.ts +69 -0
  624. package/dist/commands/find/parser.d.ts +2 -0
  625. package/dist/commands/find/types.d.ts +88 -0
  626. package/dist/commands/flag-coverage.d.ts +2 -0
  627. package/dist/commands/fold/fold.d.ts +12 -0
  628. package/dist/commands/format-mode.d.ts +4 -0
  629. package/dist/commands/fuzz-flags-types.d.ts +17 -0
  630. package/dist/commands/fuzz-flags.d.ts +8 -0
  631. package/dist/commands/grep/grep.d.ts +8 -0
  632. package/dist/commands/gzip/gzip.d.ts +13 -0
  633. package/dist/commands/head/head-tail-shared.d.ts +38 -0
  634. package/dist/commands/head/head.d.ts +4 -0
  635. package/dist/commands/help/help.d.ts +4 -0
  636. package/dist/commands/help.d.ts +16 -0
  637. package/dist/commands/history/history.d.ts +4 -0
  638. package/dist/commands/hostname/hostname.d.ts +11 -0
  639. package/dist/commands/html-to-markdown/html-to-markdown.d.ts +9 -0
  640. package/dist/commands/join/join.d.ts +12 -0
  641. package/dist/commands/jq/jq.d.ts +9 -0
  642. package/dist/commands/js-exec/fetch-polyfill.d.ts +6 -0
  643. package/dist/commands/js-exec/js-exec-worker.d.ts +32 -0
  644. package/dist/commands/js-exec/js-exec.d.ts +11 -0
  645. package/dist/commands/js-exec/module-shims.d.ts +29 -0
  646. package/dist/commands/js-exec/path-polyfill.d.ts +6 -0
  647. package/dist/commands/ln/ln.d.ts +4 -0
  648. package/dist/commands/ls/ls.d.ts +4 -0
  649. package/dist/commands/md5sum/checksum.d.ts +7 -0
  650. package/dist/commands/md5sum/md5sum.d.ts +4 -0
  651. package/dist/commands/md5sum/sha1sum.d.ts +4 -0
  652. package/dist/commands/md5sum/sha256sum.d.ts +4 -0
  653. package/dist/commands/mkdir/mkdir.d.ts +4 -0
  654. package/dist/commands/mv/mv.d.ts +4 -0
  655. package/dist/commands/nl/nl.d.ts +12 -0
  656. package/dist/commands/od/od.d.ts +12 -0
  657. package/dist/commands/paste/paste.d.ts +4 -0
  658. package/dist/commands/printf/escapes.d.ts +25 -0
  659. package/dist/commands/printf/printf.d.ts +4 -0
  660. package/dist/commands/printf/strftime.d.ts +9 -0
  661. package/dist/commands/pwd/pwd.d.ts +4 -0
  662. package/dist/commands/python3/python3.d.ts +16 -0
  663. package/dist/commands/python3/worker.d.ts +28 -0
  664. package/dist/commands/query-engine/builtins/array-builtins.d.ts +20 -0
  665. package/dist/commands/query-engine/builtins/control-builtins.d.ts +18 -0
  666. package/dist/commands/query-engine/builtins/date-builtins.d.ts +15 -0
  667. package/dist/commands/query-engine/builtins/format-builtins.d.ts +11 -0
  668. package/dist/commands/query-engine/builtins/index-builtins.d.ts +16 -0
  669. package/dist/commands/query-engine/builtins/index.d.ts +17 -0
  670. package/dist/commands/query-engine/builtins/math-builtins.d.ts +15 -0
  671. package/dist/commands/query-engine/builtins/navigation-builtins.d.ts +18 -0
  672. package/dist/commands/query-engine/builtins/object-builtins.d.ts +15 -0
  673. package/dist/commands/query-engine/builtins/path-builtins.d.ts +20 -0
  674. package/dist/commands/query-engine/builtins/sql-builtins.d.ts +16 -0
  675. package/dist/commands/query-engine/builtins/string-builtins.d.ts +15 -0
  676. package/dist/commands/query-engine/builtins/type-builtins.d.ts +11 -0
  677. package/dist/commands/query-engine/evaluator.d.ts +40 -0
  678. package/dist/commands/query-engine/index.d.ts +8 -0
  679. package/dist/commands/query-engine/parser-types.d.ts +171 -0
  680. package/dist/commands/query-engine/parser.d.ts +9 -0
  681. package/dist/commands/query-engine/path-operations.d.ts +15 -0
  682. package/dist/commands/query-engine/safe-object.d.ts +83 -0
  683. package/dist/commands/query-engine/value-operations.d.ts +41 -0
  684. package/dist/commands/readlink/readlink.d.ts +4 -0
  685. package/dist/commands/registry.d.ts +56 -0
  686. package/dist/commands/rev/rev.d.ts +13 -0
  687. package/dist/commands/rg/file-types.d.ts +49 -0
  688. package/dist/commands/rg/gitignore.d.ts +98 -0
  689. package/dist/commands/rg/rg-options.d.ts +61 -0
  690. package/dist/commands/rg/rg-parser.d.ts +20 -0
  691. package/dist/commands/rg/rg-search.d.ts +15 -0
  692. package/dist/commands/rg/rg.d.ts +14 -0
  693. package/dist/commands/rm/rm.d.ts +4 -0
  694. package/dist/commands/rmdir/rmdir.d.ts +4 -0
  695. package/dist/commands/search-engine/index.d.ts +10 -0
  696. package/dist/commands/search-engine/matcher.d.ts +66 -0
  697. package/dist/commands/search-engine/regex.d.ts +46 -0
  698. package/dist/commands/sed/executor.d.ts +7 -0
  699. package/dist/commands/sed/lexer.d.ts +86 -0
  700. package/dist/commands/sed/parser.d.ts +18 -0
  701. package/dist/commands/sed/sed-regex.d.ts +23 -0
  702. package/dist/commands/sed/sed.d.ts +4 -0
  703. package/dist/commands/sed/types.d.ts +216 -0
  704. package/dist/commands/seq/seq.d.ts +16 -0
  705. package/dist/commands/sleep/sleep.d.ts +4 -0
  706. package/dist/commands/sort/comparator.d.ts +9 -0
  707. package/dist/commands/sort/parser.d.ts +11 -0
  708. package/dist/commands/sort/sort.d.ts +4 -0
  709. package/dist/commands/sort/types.d.ts +30 -0
  710. package/dist/commands/split/split.d.ts +12 -0
  711. package/dist/commands/sqlite3/formatters.d.ts +15 -0
  712. package/dist/commands/sqlite3/sqlite3.d.ts +23 -0
  713. package/dist/commands/sqlite3/worker.d.ts +45 -0
  714. package/dist/commands/sqlite3/worker.js +1728 -0
  715. package/dist/commands/stat/stat.d.ts +4 -0
  716. package/dist/commands/strings/strings.d.ts +12 -0
  717. package/dist/commands/tac/tac.d.ts +11 -0
  718. package/dist/commands/tail/tail.d.ts +4 -0
  719. package/dist/commands/tar/archive.d.ts +135 -0
  720. package/dist/commands/tar/bzip2-compress.d.ts +17 -0
  721. package/dist/commands/tar/tar-options.d.ts +37 -0
  722. package/dist/commands/tar/tar.d.ts +10 -0
  723. package/dist/commands/tee/tee.d.ts +4 -0
  724. package/dist/commands/time/time.d.ts +27 -0
  725. package/dist/commands/timeout/timeout.d.ts +4 -0
  726. package/dist/commands/touch/touch.d.ts +4 -0
  727. package/dist/commands/tr/tr.d.ts +4 -0
  728. package/dist/commands/tree/tree.d.ts +4 -0
  729. package/dist/commands/true/true.d.ts +6 -0
  730. package/dist/commands/uniq/uniq.d.ts +4 -0
  731. package/dist/commands/wc/wc.d.ts +4 -0
  732. package/dist/commands/which/which.d.ts +4 -0
  733. package/dist/commands/whoami/whoami.d.ts +11 -0
  734. package/dist/commands/worker-bridge/bridge-handler.d.ts +73 -0
  735. package/dist/commands/worker-bridge/protocol.d.ts +141 -0
  736. package/dist/commands/worker-bridge/sync-backend.d.ts +86 -0
  737. package/dist/commands/xan/aggregation.d.ts +20 -0
  738. package/dist/commands/xan/column-selection.d.ts +19 -0
  739. package/dist/commands/xan/csv.d.ts +37 -0
  740. package/dist/commands/xan/moonblade-parser.d.ts +80 -0
  741. package/dist/commands/xan/moonblade-to-jq.d.ts +12 -0
  742. package/dist/commands/xan/moonblade-tokenizer.d.ts +25 -0
  743. package/dist/commands/xan/subcommands.d.ts +15 -0
  744. package/dist/commands/xan/xan-agg.d.ts +8 -0
  745. package/dist/commands/xan/xan-columns.d.ts +8 -0
  746. package/dist/commands/xan/xan-core.d.ts +10 -0
  747. package/dist/commands/xan/xan-data.d.ts +52 -0
  748. package/dist/commands/xan/xan-filter.d.ts +8 -0
  749. package/dist/commands/xan/xan-map.d.ts +11 -0
  750. package/dist/commands/xan/xan-reshape.d.ts +40 -0
  751. package/dist/commands/xan/xan-simple.d.ts +40 -0
  752. package/dist/commands/xan/xan-view.d.ts +12 -0
  753. package/dist/commands/xan/xan.d.ts +10 -0
  754. package/dist/commands/xargs/xargs.d.ts +4 -0
  755. package/dist/commands/yq/formats.d.ts +64 -0
  756. package/dist/commands/yq/yq.d.ts +13 -0
  757. package/dist/custom-commands.d.ts +42 -0
  758. package/dist/encoding.d.ts +115 -0
  759. package/dist/fs/encoding.d.ts +17 -0
  760. package/dist/fs/in-memory-fs/in-memory-fs.d.ts +75 -0
  761. package/dist/fs/in-memory-fs/index.d.ts +1 -0
  762. package/dist/fs/init.d.ts +22 -0
  763. package/dist/fs/interface.d.ts +251 -0
  764. package/dist/fs/mountable-fs/index.d.ts +1 -0
  765. package/dist/fs/mountable-fs/mountable-fs.d.ts +118 -0
  766. package/dist/fs/overlay-fs/index.d.ts +1 -0
  767. package/dist/fs/overlay-fs/overlay-fs.d.ts +165 -0
  768. package/dist/fs/path-utils.d.ts +46 -0
  769. package/dist/fs/read-write-fs/index.d.ts +1 -0
  770. package/dist/fs/read-write-fs/read-write-fs.d.ts +98 -0
  771. package/dist/fs/real-fs-utils.d.ts +90 -0
  772. package/dist/fs/sanitize-error.d.ts +19 -0
  773. package/dist/index.d.cts +29 -0
  774. package/dist/index.d.ts +29 -0
  775. package/dist/interpreter/alias-expansion.d.ts +23 -0
  776. package/dist/interpreter/arithmetic.d.ts +24 -0
  777. package/dist/interpreter/assignment-expansion.d.ts +24 -0
  778. package/dist/interpreter/builtin-dispatch.d.ts +39 -0
  779. package/dist/interpreter/builtins/break.d.ts +6 -0
  780. package/dist/interpreter/builtins/cd.d.ts +6 -0
  781. package/dist/interpreter/builtins/compgen.d.ts +26 -0
  782. package/dist/interpreter/builtins/complete.d.ts +17 -0
  783. package/dist/interpreter/builtins/compopt.d.ts +28 -0
  784. package/dist/interpreter/builtins/continue.d.ts +6 -0
  785. package/dist/interpreter/builtins/declare-array-parsing.d.ts +14 -0
  786. package/dist/interpreter/builtins/declare-print.d.ts +39 -0
  787. package/dist/interpreter/builtins/declare.d.ts +35 -0
  788. package/dist/interpreter/builtins/dirs.d.ts +29 -0
  789. package/dist/interpreter/builtins/eval.d.ts +9 -0
  790. package/dist/interpreter/builtins/exit.d.ts +5 -0
  791. package/dist/interpreter/builtins/export.d.ts +14 -0
  792. package/dist/interpreter/builtins/getopts.d.ts +18 -0
  793. package/dist/interpreter/builtins/hash.d.ts +19 -0
  794. package/dist/interpreter/builtins/help.d.ts +12 -0
  795. package/dist/interpreter/builtins/index.d.ts +45 -0
  796. package/dist/interpreter/builtins/let.d.ts +18 -0
  797. package/dist/interpreter/builtins/local.d.ts +6 -0
  798. package/dist/interpreter/builtins/mapfile.d.ts +17 -0
  799. package/dist/interpreter/builtins/read.d.ts +6 -0
  800. package/dist/interpreter/builtins/return.d.ts +6 -0
  801. package/dist/interpreter/builtins/set.d.ts +9 -0
  802. package/dist/interpreter/builtins/shift.d.ts +15 -0
  803. package/dist/interpreter/builtins/shopt.d.ts +7 -0
  804. package/dist/interpreter/builtins/source.d.ts +6 -0
  805. package/dist/interpreter/builtins/unset.d.ts +16 -0
  806. package/dist/interpreter/builtins/variable-assignment.d.ts +66 -0
  807. package/dist/interpreter/command-resolution.d.ts +43 -0
  808. package/dist/interpreter/conditionals.d.ts +17 -0
  809. package/dist/interpreter/control-flow.d.ts +21 -0
  810. package/dist/interpreter/defense-aware-command-context.d.ts +6 -0
  811. package/dist/interpreter/errors.d.ts +158 -0
  812. package/dist/interpreter/expansion/analysis.d.ts +37 -0
  813. package/dist/interpreter/expansion/arith-text-expansion.d.ts +20 -0
  814. package/dist/interpreter/expansion/array-pattern-ops.d.ts +21 -0
  815. package/dist/interpreter/expansion/array-prefix-suffix.d.ts +46 -0
  816. package/dist/interpreter/expansion/array-slice-transform.d.ts +36 -0
  817. package/dist/interpreter/expansion/array-word-expansion.d.ts +39 -0
  818. package/dist/interpreter/expansion/brace-range.d.ts +20 -0
  819. package/dist/interpreter/expansion/command-substitution.d.ts +23 -0
  820. package/dist/interpreter/expansion/glob-escape.d.ts +32 -0
  821. package/dist/interpreter/expansion/indirect-expansion.d.ts +42 -0
  822. package/dist/interpreter/expansion/parameter-ops.d.ts +113 -0
  823. package/dist/interpreter/expansion/pattern-expansion.d.ts +23 -0
  824. package/dist/interpreter/expansion/pattern-removal.d.ts +18 -0
  825. package/dist/interpreter/expansion/pattern.d.ts +23 -0
  826. package/dist/interpreter/expansion/positional-params.d.ts +59 -0
  827. package/dist/interpreter/expansion/prompt.d.ts +39 -0
  828. package/dist/interpreter/expansion/quoting.d.ts +13 -0
  829. package/dist/interpreter/expansion/tilde.d.ts +12 -0
  830. package/dist/interpreter/expansion/unquoted-expansion.d.ts +76 -0
  831. package/dist/interpreter/expansion/variable-attrs.d.ts +19 -0
  832. package/dist/interpreter/expansion/variable.d.ts +36 -0
  833. package/dist/interpreter/expansion/word-glob-expansion.d.ts +33 -0
  834. package/dist/interpreter/expansion/word-split.d.ts +29 -0
  835. package/dist/interpreter/expansion.d.ts +53 -0
  836. package/dist/interpreter/functions.d.ts +12 -0
  837. package/dist/interpreter/helpers/array.d.ts +43 -0
  838. package/dist/interpreter/helpers/condition.d.ts +22 -0
  839. package/dist/interpreter/helpers/errors.d.ts +8 -0
  840. package/dist/interpreter/helpers/file-tests.d.ts +33 -0
  841. package/dist/interpreter/helpers/ifs.d.ts +104 -0
  842. package/dist/interpreter/helpers/loop.d.ts +24 -0
  843. package/dist/interpreter/helpers/nameref.d.ts +65 -0
  844. package/dist/interpreter/helpers/numeric-compare.d.ts +13 -0
  845. package/dist/interpreter/helpers/quoting.d.ts +24 -0
  846. package/dist/interpreter/helpers/readonly.d.ts +45 -0
  847. package/dist/interpreter/helpers/regex.d.ts +8 -0
  848. package/dist/interpreter/helpers/result.d.ts +60 -0
  849. package/dist/interpreter/helpers/shell-constants.d.ts +25 -0
  850. package/dist/interpreter/helpers/shellopts.d.ts +28 -0
  851. package/dist/interpreter/helpers/statements.d.ts +20 -0
  852. package/dist/interpreter/helpers/string-compare.d.ts +24 -0
  853. package/dist/interpreter/helpers/string-tests.d.ts +13 -0
  854. package/dist/interpreter/helpers/tilde.d.ts +13 -0
  855. package/dist/interpreter/helpers/variable-tests.d.ts +9 -0
  856. package/dist/interpreter/helpers/word-matching.d.ts +26 -0
  857. package/dist/interpreter/helpers/word-parts.d.ts +22 -0
  858. package/dist/interpreter/helpers/xtrace.d.ts +18 -0
  859. package/dist/interpreter/index.d.ts +3 -0
  860. package/dist/interpreter/interpreter.d.ts +79 -0
  861. package/dist/interpreter/pipeline-execution.d.ts +16 -0
  862. package/dist/interpreter/redirections.d.ts +51 -0
  863. package/dist/interpreter/simple-command-assignments.d.ts +29 -0
  864. package/dist/interpreter/subshell-group.d.ts +32 -0
  865. package/dist/interpreter/type-command.d.ts +37 -0
  866. package/dist/interpreter/types.d.ts +349 -0
  867. package/dist/limits.d.ts +52 -0
  868. package/dist/network/allow-list/shared.d.ts +57 -0
  869. package/dist/network/allow-list.d.ts +59 -0
  870. package/dist/network/dns-pin.d.ts +43 -0
  871. package/dist/network/fetch.d.ts +25 -0
  872. package/dist/network/index.d.ts +7 -0
  873. package/dist/network/types.d.ts +155 -0
  874. package/dist/parser/arithmetic-parser.d.ts +23 -0
  875. package/dist/parser/arithmetic-primaries.d.ts +45 -0
  876. package/dist/parser/command-parser.d.ts +10 -0
  877. package/dist/parser/compound-parser.d.ts +28 -0
  878. package/dist/parser/conditional-parser.d.ts +8 -0
  879. package/dist/parser/expansion-parser.d.ts +16 -0
  880. package/dist/parser/lexer.d.ts +197 -0
  881. package/dist/parser/parser-substitution.d.ts +62 -0
  882. package/dist/parser/parser.d.ts +135 -0
  883. package/dist/parser/types.d.ts +25 -0
  884. package/dist/parser/word-parser.d.ts +33 -0
  885. package/dist/sandbox/Command.d.ts +35 -0
  886. package/dist/sandbox/Sandbox.d.ts +90 -0
  887. package/dist/sandbox/index.d.ts +2 -0
  888. package/dist/shell-metadata.d.ts +25 -0
  889. package/dist/timers.d.ts +4 -0
  890. package/dist/types.d.ts +247 -0
  891. package/dist/utils/args.d.ts +55 -0
  892. package/dist/utils/constants.d.ts +15 -0
  893. package/dist/utils/file-reader.d.ts +74 -0
  894. package/dist/utils/glob.d.ts +25 -0
  895. package/dist/vitest-setup.d.ts +1 -0
  896. package/package.json +127 -0
  897. package/vendor/cpython-emscripten/python.cjs +2 -0
  898. package/vendor/cpython-emscripten/python.wasm +0 -0
  899. package/vendor/cpython-emscripten/python313.zip +0 -0
@@ -0,0 +1,98 @@
1
+ /**
2
+ * ReadWriteFs - Direct wrapper around the real filesystem
3
+ *
4
+ * All operations go directly to the underlying Node.js filesystem.
5
+ * Paths are relative to the configured root directory.
6
+ *
7
+ * Security: Symlinks are blocked by default (allowSymlinks: false).
8
+ * All real-FS access goes through resolveAndValidate() / validateParent()
9
+ * gates which detect symlink traversal via path comparison. When symlinks
10
+ * are allowed, targets are validated and transformed to stay within root.
11
+ * New methods must use these gates — never access the real FS directly.
12
+ */
13
+ import { type ByteString } from "../../encoding.js";
14
+ import { type FileContent } from "../encoding.js";
15
+ import type { CpOptions, DirentEntry, FsStat, IFileSystem, MkdirOptions, ReadFileOptions, RmOptions, WriteFileOptions } from "../interface.js";
16
+ export interface ReadWriteFsOptions {
17
+ /**
18
+ * The root directory on the real filesystem.
19
+ * All paths are relative to this root.
20
+ */
21
+ root: string;
22
+ /**
23
+ * Maximum file size in bytes that can be read.
24
+ * Files larger than this will throw an EFBIG error.
25
+ * Defaults to 10MB (10485760).
26
+ */
27
+ maxFileReadSize?: number;
28
+ /**
29
+ * Whether to allow following and creating symlinks.
30
+ * When false (default), any path traversing a symlink is rejected
31
+ * and symlink() throws EPERM.
32
+ */
33
+ allowSymlinks?: boolean;
34
+ }
35
+ export declare class ReadWriteFs implements IFileSystem {
36
+ private readonly root;
37
+ private readonly canonicalRoot;
38
+ private readonly maxFileReadSize;
39
+ private readonly allowSymlinks;
40
+ constructor(options: ReadWriteFsOptions);
41
+ /**
42
+ * Validate that a resolved real path stays within the sandbox root and
43
+ * return the canonical (symlink-resolved) path for use in subsequent I/O.
44
+ * This closes the TOCTOU gap where the original path could be swapped
45
+ * between validation and use.
46
+ * Throws EACCES if the path escapes the root.
47
+ */
48
+ private resolveAndValidate;
49
+ /**
50
+ * Validate the parent directory of a path (for operations like lstat/readlink
51
+ * that should not follow the final component's symlink).
52
+ * Returns the canonical parent joined with the original basename.
53
+ */
54
+ private validateParent;
55
+ /**
56
+ * Convert a virtual path to a real filesystem path.
57
+ */
58
+ private toRealPath;
59
+ readFile(path: string, options?: ReadFileOptions | BufferEncoding): Promise<string>;
60
+ readFileBytes(path: string): Promise<ByteString>;
61
+ readFileBuffer(path: string): Promise<Uint8Array>;
62
+ writeFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
63
+ appendFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
64
+ exists(path: string): Promise<boolean>;
65
+ stat(path: string): Promise<FsStat>;
66
+ lstat(path: string): Promise<FsStat>;
67
+ mkdir(path: string, options?: MkdirOptions): Promise<void>;
68
+ readdir(path: string): Promise<string[]>;
69
+ readdirWithFileTypes(path: string): Promise<DirentEntry[]>;
70
+ rm(path: string, options?: RmOptions): Promise<void>;
71
+ cp(src: string, dest: string, options?: CpOptions): Promise<void>;
72
+ mv(src: string, dest: string): Promise<void>;
73
+ resolvePath(base: string, path: string): string;
74
+ getAllPaths(): string[];
75
+ private sanitizeError;
76
+ /**
77
+ * Recursively scan a directory for symlinks whose targets escape the sandbox.
78
+ * Returns an array of paths (real OS paths) for any escaping symlinks found.
79
+ */
80
+ private findEscapingSymlinks;
81
+ private scanDir;
82
+ chmod(path: string, mode: number): Promise<void>;
83
+ symlink(target: string, linkPath: string): Promise<void>;
84
+ link(existingPath: string, newPath: string): Promise<void>;
85
+ readlink(path: string): Promise<string>;
86
+ /**
87
+ * Resolve all symlinks in a path to get the canonical physical path.
88
+ * This is equivalent to POSIX realpath().
89
+ */
90
+ realpath(path: string): Promise<string>;
91
+ /**
92
+ * Set access and modification times of a file
93
+ * @param path - The file path
94
+ * @param atime - Access time
95
+ * @param mtime - Modification time
96
+ */
97
+ utimes(path: string, atime: Date, mtime: Date): Promise<void>;
98
+ }
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Shared utilities for real-filesystem-backed IFileSystem implementations
3
+ * (OverlayFs and ReadWriteFs).
4
+ *
5
+ * Security-critical path validation logic lives here so both implementations
6
+ * stay consistent.
7
+ *
8
+ * Pure path utilities (normalizePath, validatePath, dirname, resolvePath, etc.)
9
+ * live in path-utils.ts (no node:fs dependency, browser-safe) and are
10
+ * re-exported here for convenience.
11
+ */
12
+ export { normalizePath, validatePath } from "./path-utils.js";
13
+ /**
14
+ * Check whether `resolved` is equal to, or a child of, `canonicalRoot`.
15
+ * Uses a boundary-safe prefix check (appends `/`) so that `/data` does not
16
+ * match `/datastore`.
17
+ */
18
+ export declare function isPathWithinRoot(resolved: string, canonicalRoot: string): boolean;
19
+ /**
20
+ * Validate that a real filesystem path stays within the sandbox root after
21
+ * resolving all OS-level symlinks (including in parent components).
22
+ *
23
+ * Uses `realpathSync`; when the path does not exist (`ENOENT`) it walks up
24
+ * to the nearest existing parent. Returns `false` for any path that escapes
25
+ * the sandbox (fail-closed on unexpected errors).
26
+ */
27
+ export declare function validateRealPath(realPath: string, canonicalRoot: string): boolean;
28
+ /**
29
+ * Resolve a real filesystem path to its canonical form and verify it stays
30
+ * within the sandbox root. Returns the canonical path on success, or `null`
31
+ * if the path escapes the root (fail-closed on unexpected errors).
32
+ *
33
+ * Unlike `validateRealPath` (which returns a boolean), this function returns
34
+ * the canonical path so callers can use it for subsequent I/O, closing the
35
+ * TOCTOU gap where the original (unresolved) path could be swapped between
36
+ * validation and use.
37
+ */
38
+ export declare function resolveCanonicalPath(realPath: string, canonicalRoot: string): string | null;
39
+ /**
40
+ * Resolve a real filesystem path to its canonical form, verify it stays
41
+ * within the sandbox root, AND reject the path if any symlinks were
42
+ * traversed.
43
+ *
44
+ * Detection: compare the relative path from `root` (unresolved) with the
45
+ * relative path from `canonicalRoot` (resolved). A mismatch means a
46
+ * symlink was followed somewhere in the path.
47
+ *
48
+ * This piggybacks on the `realpathSync` call inside `resolveCanonicalPath`
49
+ * — the only extra cost is one string comparison.
50
+ */
51
+ export declare function resolveCanonicalPathNoSymlinks(realPath: string, root: string, canonicalRoot: string): string | null;
52
+ /**
53
+ * Validate that a root directory exists and is actually a directory.
54
+ * Throws with a descriptive message including `fsName` (e.g. "OverlayFs",
55
+ * "ReadWriteFs") on failure. Does NOT include the real root path in the
56
+ * error message to prevent information leakage.
57
+ */
58
+ export declare function validateRootDirectory(root: string, fsName: string): void;
59
+ export { sanitizeErrorMessage } from "./sanitize-error.js";
60
+ /**
61
+ * Sanitize a raw OS symlink target so it does not leak real filesystem paths
62
+ * outside the sandbox.
63
+ *
64
+ * - Relative targets are returned as-is (they don't leak real paths).
65
+ * - Absolute targets that resolve within the canonical root are converted to
66
+ * a path relative to the root (the caller decides how to present it).
67
+ * - Absolute targets outside the root are reduced to `basename` only.
68
+ *
69
+ * Returns `{ withinRoot: true, relativePath }` when the target is inside the
70
+ * sandbox, or `{ withinRoot: false, safeName }` when it is outside.
71
+ */
72
+ export declare function sanitizeSymlinkTarget(rawTarget: string, canonicalRoot: string): {
73
+ withinRoot: true;
74
+ relativePath: string;
75
+ } | {
76
+ withinRoot: false;
77
+ safeName: string;
78
+ };
79
+ /**
80
+ * Sanitize an error thrown during real-FS operations to prevent leaking
81
+ * real OS paths. Node.js ErrnoException objects contain a `.path` property
82
+ * with the real filesystem path — this must never reach the sandbox user.
83
+ *
84
+ * Errors whose `.path` is `undefined` are our own errors (constructed with
85
+ * `new Error(...)`) rather than Node.js ErrnoExceptions. If their message
86
+ * contains one of `passthroughPatterns`, they are rethrown as-is (they
87
+ * already contain safe virtual paths). All other errors are replaced with
88
+ * a generic `"CODE: operation 'virtualPath'"` message.
89
+ */
90
+ export declare function sanitizeFsError(e: unknown, virtualPath: string, operation: string, passthroughPatterns: readonly string[]): never;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Error message sanitization utility.
3
+ *
4
+ * This module has NO Node.js dependencies (no `node:fs`, etc.) so it can
5
+ * safely be imported in browser bundles.
6
+ */
7
+ /**
8
+ * Sanitize an error message to strip common real OS paths and stack traces.
9
+ *
10
+ * Preserves virtual paths that don't match the common host prefixes used by
11
+ * the default runtime.
12
+ */
13
+ export declare function sanitizeErrorMessage(message: string): string;
14
+ /**
15
+ * Aggressive sanitizer for host-originated errors such as worker/bootstrap
16
+ * failures. This also scrubs file:// URLs and additional runtime roots that
17
+ * are common in hosted environments.
18
+ */
19
+ export declare function sanitizeHostErrorMessage(message: string): string;
@@ -0,0 +1,29 @@
1
+ export type { CommandNode, PipelineNode, ScriptNode, SimpleCommandNode, StatementNode, WordNode, } from "./ast/types.js";
2
+ export type { BashLogger, BashOptions, ExecOptions, JavaScriptConfig, } from "./Bash.js";
3
+ export { Bash } from "./Bash.js";
4
+ export type { AllCommandName, CommandName, JavaScriptCommandName, NetworkCommandName, PythonCommandName, } from "./commands/registry.js";
5
+ export { getCommandNames, getJavaScriptCommandNames, getNetworkCommandNames, getPythonCommandNames, } from "./commands/registry.js";
6
+ export type { CustomCommand, LazyCommand } from "./custom-commands.js";
7
+ export { defineCommand } from "./custom-commands.js";
8
+ export type { ByteString, OutputKind } from "./encoding.js";
9
+ export { bytesOutput, decodeBytesToUtf8, EMPTY_BYTES, encodeUtf8ToBytes, latin1FromBytes, stdoutAsBytes, stdoutKind, textOutput, unsafeBytesFromLatin1, } from "./encoding.js";
10
+ export { InMemoryFs } from "./fs/in-memory-fs/index.js";
11
+ export type { BufferEncoding, CpOptions, DirectoryEntry, FileContent, FileEntry, FileInit, FileSystemFactory, FsEntry, FsStat, InitialFiles, LazyFileEntry, LazyFileProvider, MkdirOptions, RmOptions, SymlinkEntry, } from "./fs/interface.js";
12
+ export { MountableFs, type MountableFsOptions, type MountConfig, } from "./fs/mountable-fs/index.js";
13
+ export { OverlayFs, type OverlayFsOptions } from "./fs/overlay-fs/index.js";
14
+ export { ReadWriteFs, type ReadWriteFsOptions, } from "./fs/read-write-fs/index.js";
15
+ export type { AllowedUrl, AllowedUrlEntry, NetworkConfig, RequestTransform, SecureFetch, } from "./network/index.js";
16
+ export { NetworkAccessDeniedError, RedirectNotAllowedError, TooManyRedirectsError, } from "./network/index.js";
17
+ export { parse } from "./parser/parser.js";
18
+ export type { CommandFinished as SandboxCommandFinished, OutputMessage, SandboxOptions, WriteFilesInput, } from "./sandbox/index.js";
19
+ export { Command as SandboxCommand, Sandbox } from "./sandbox/index.js";
20
+ export type { DefenseInDepthConfig, DefenseInDepthHandle, DefenseInDepthStats, SecurityViolation, SecurityViolationType, } from "./security/index.js";
21
+ export { createConsoleViolationCallback, DefenseInDepthBox, SecurityViolationError, SecurityViolationLogger, } from "./security/index.js";
22
+ export { BashTransformPipeline } from "./transform/pipeline.js";
23
+ export type { CommandCollectorMetadata } from "./transform/plugins/command-collector.js";
24
+ export { CommandCollectorPlugin } from "./transform/plugins/command-collector.js";
25
+ export type { TeeFileInfo, TeePluginMetadata, TeePluginOptions, } from "./transform/plugins/tee-plugin.js";
26
+ export { TeePlugin } from "./transform/plugins/tee-plugin.js";
27
+ export { serialize } from "./transform/serialize.js";
28
+ export type { BashTransformResult, TransformContext, TransformPlugin, TransformResult, } from "./transform/types.js";
29
+ export type { BashExecResult, Command, CommandContext, ExecResult, IFileSystem, } from "./types.js";
@@ -0,0 +1,29 @@
1
+ export type { CommandNode, PipelineNode, ScriptNode, SimpleCommandNode, StatementNode, WordNode, } from "./ast/types.js";
2
+ export type { BashLogger, BashOptions, ExecOptions, JavaScriptConfig, } from "./Bash.js";
3
+ export { Bash } from "./Bash.js";
4
+ export type { AllCommandName, CommandName, JavaScriptCommandName, NetworkCommandName, PythonCommandName, } from "./commands/registry.js";
5
+ export { getCommandNames, getJavaScriptCommandNames, getNetworkCommandNames, getPythonCommandNames, } from "./commands/registry.js";
6
+ export type { CustomCommand, LazyCommand } from "./custom-commands.js";
7
+ export { defineCommand } from "./custom-commands.js";
8
+ export type { ByteString, OutputKind } from "./encoding.js";
9
+ export { bytesOutput, decodeBytesToUtf8, EMPTY_BYTES, encodeUtf8ToBytes, latin1FromBytes, stdoutAsBytes, stdoutKind, textOutput, unsafeBytesFromLatin1, } from "./encoding.js";
10
+ export { InMemoryFs } from "./fs/in-memory-fs/index.js";
11
+ export type { BufferEncoding, CpOptions, DirectoryEntry, FileContent, FileEntry, FileInit, FileSystemFactory, FsEntry, FsStat, InitialFiles, LazyFileEntry, LazyFileProvider, MkdirOptions, RmOptions, SymlinkEntry, } from "./fs/interface.js";
12
+ export { MountableFs, type MountableFsOptions, type MountConfig, } from "./fs/mountable-fs/index.js";
13
+ export { OverlayFs, type OverlayFsOptions } from "./fs/overlay-fs/index.js";
14
+ export { ReadWriteFs, type ReadWriteFsOptions, } from "./fs/read-write-fs/index.js";
15
+ export type { AllowedUrl, AllowedUrlEntry, NetworkConfig, RequestTransform, SecureFetch, } from "./network/index.js";
16
+ export { NetworkAccessDeniedError, RedirectNotAllowedError, TooManyRedirectsError, } from "./network/index.js";
17
+ export { parse } from "./parser/parser.js";
18
+ export type { CommandFinished as SandboxCommandFinished, OutputMessage, SandboxOptions, WriteFilesInput, } from "./sandbox/index.js";
19
+ export { Command as SandboxCommand, Sandbox } from "./sandbox/index.js";
20
+ export type { DefenseInDepthConfig, DefenseInDepthHandle, DefenseInDepthStats, SecurityViolation, SecurityViolationType, } from "./security/index.js";
21
+ export { createConsoleViolationCallback, DefenseInDepthBox, SecurityViolationError, SecurityViolationLogger, } from "./security/index.js";
22
+ export { BashTransformPipeline } from "./transform/pipeline.js";
23
+ export type { CommandCollectorMetadata } from "./transform/plugins/command-collector.js";
24
+ export { CommandCollectorPlugin } from "./transform/plugins/command-collector.js";
25
+ export type { TeeFileInfo, TeePluginMetadata, TeePluginOptions, } from "./transform/plugins/tee-plugin.js";
26
+ export { TeePlugin } from "./transform/plugins/tee-plugin.js";
27
+ export { serialize } from "./transform/serialize.js";
28
+ export type { BashTransformResult, TransformContext, TransformPlugin, TransformResult, } from "./transform/types.js";
29
+ export type { BashExecResult, Command, CommandContext, ExecResult, IFileSystem, } from "./types.js";
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Alias Expansion
3
+ *
4
+ * Handles bash alias expansion for SimpleCommandNodes.
5
+ *
6
+ * Alias expansion rules:
7
+ * 1. Only expands if command name is a literal unquoted word
8
+ * 2. Alias value is substituted for the command name
9
+ * 3. If alias value ends with a space, the next word is also checked for alias expansion
10
+ * 4. Recursive expansion is allowed but limited to prevent infinite loops
11
+ */
12
+ import type { SimpleCommandNode } from "../ast/types.js";
13
+ /**
14
+ * Context needed for alias expansion operations
15
+ */
16
+ export interface AliasExpansionContext {
17
+ env: Map<string, string>;
18
+ }
19
+ /**
20
+ * Expand alias in a SimpleCommandNode if applicable.
21
+ * Returns a new node with the alias expanded, or the original node if no expansion.
22
+ */
23
+ export declare function expandAlias(ctx: AliasExpansionContext, node: SimpleCommandNode, aliasExpansionStack: Set<string>): SimpleCommandNode;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Arithmetic Evaluation
3
+ *
4
+ * Evaluates bash arithmetic expressions including:
5
+ * - Basic operators (+, -, *, /, %)
6
+ * - Comparison operators (<, <=, >, >=, ==, !=)
7
+ * - Bitwise operators (&, |, ^, ~, <<, >>)
8
+ * - Logical operators (&&, ||, !)
9
+ * - Assignment operators (=, +=, -=, etc.)
10
+ * - Ternary operator (? :)
11
+ * - Pre/post increment/decrement (++, --)
12
+ * - Nested arithmetic: $((expr))
13
+ * - Command substitution: $(cmd) or `cmd`
14
+ *
15
+ * Known limitations:
16
+ * - Bitwise operations use JavaScript's 32-bit signed integers, not 64-bit.
17
+ * This means values like (1 << 31) will be negative (-2147483648) instead
18
+ * of the bash 64-bit result (2147483648).
19
+ * - Dynamic arithmetic expressions (e.g., ${base}#a where base=16) are not
20
+ * fully supported - variable expansion happens at parse time, not runtime.
21
+ */
22
+ import type { ArithExpr } from "../ast/types.js";
23
+ import type { InterpreterContext } from "./types.js";
24
+ export declare function evaluateArithmetic(ctx: InterpreterContext, expr: ArithExpr, isExpansionContext?: boolean): Promise<number>;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Assignment Expansion Helpers
3
+ *
4
+ * Handles expansion of assignment arguments for local/declare/typeset builtins.
5
+ * - Array assignments: name=(elem1 elem2 ...)
6
+ * - Scalar assignments: name=value, name+=value, name[index]=value
7
+ */
8
+ import type { WordNode } from "../ast/types.js";
9
+ import type { InterpreterContext } from "./types.js";
10
+ /**
11
+ * Check if a Word represents an array assignment (name=(...)) and expand it
12
+ * while preserving quote structure for elements.
13
+ * Returns the expanded string like "name=(elem1 elem2 ...)" or null if not an array assignment.
14
+ */
15
+ export declare function expandLocalArrayAssignment(ctx: InterpreterContext, word: WordNode): Promise<string | null>;
16
+ /**
17
+ * Check if a Word represents a scalar assignment (name=value, name+=value, or name[index]=value)
18
+ * and expand it WITHOUT glob expansion on the value part.
19
+ * Returns the expanded string like "name=expanded_value" or null if not a scalar assignment.
20
+ *
21
+ * This is important for bash compatibility: `local var=$x` where x='a b' should
22
+ * set var to "a b", not try to glob-expand it.
23
+ */
24
+ export declare function expandScalarAssignmentArg(ctx: InterpreterContext, word: WordNode): Promise<string | null>;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Builtin Command Dispatch
3
+ *
4
+ * Handles dispatch of built-in shell commands like export, unset, cd, etc.
5
+ * Separated from interpreter.ts for modularity.
6
+ */
7
+ import type { ExecResult } from "../types.js";
8
+ import type { InterpreterContext } from "./types.js";
9
+ /**
10
+ * Type for the function that runs a command recursively
11
+ */
12
+ export type RunCommandFn = (commandName: string, args: string[], quotedArgs: boolean[], stdin: string, skipFunctions?: boolean, useDefaultPath?: boolean, stdinSourceFd?: number) => Promise<ExecResult>;
13
+ /**
14
+ * Type for the function that builds exported environment
15
+ */
16
+ export type BuildExportedEnvFn = () => Record<string, string>;
17
+ /**
18
+ * Type for the function that executes user scripts
19
+ */
20
+ export type ExecuteUserScriptFn = (scriptPath: string, args: string[], stdin?: string) => Promise<ExecResult>;
21
+ /**
22
+ * Dispatch context containing dependencies needed for builtin dispatch
23
+ */
24
+ export interface BuiltinDispatchContext {
25
+ ctx: InterpreterContext;
26
+ runCommand: RunCommandFn;
27
+ buildExportedEnv: BuildExportedEnvFn;
28
+ executeUserScript: ExecuteUserScriptFn;
29
+ }
30
+ /**
31
+ * Dispatch a command to the appropriate builtin handler or external command.
32
+ * Returns null if the command should be handled by external command resolution.
33
+ */
34
+ export declare function dispatchBuiltin(dispatchCtx: BuiltinDispatchContext, commandName: string, args: string[], _quotedArgs: boolean[], stdin: string, skipFunctions: boolean, _useDefaultPath: boolean, stdinSourceFd: number): Promise<ExecResult | null>;
35
+ /**
36
+ * Handle external command resolution and execution.
37
+ * Called when dispatchBuiltin returns null.
38
+ */
39
+ export declare function executeExternalCommand(dispatchCtx: BuiltinDispatchContext, commandName: string, args: string[], stdin: string, useDefaultPath: boolean): Promise<ExecResult>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * break - Exit from loops builtin
3
+ */
4
+ import type { ExecResult } from "../../types.js";
5
+ import type { InterpreterContext } from "../types.js";
6
+ export declare function handleBreak(ctx: InterpreterContext, args: string[]): ExecResult;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * cd - Change directory builtin
3
+ */
4
+ import type { ExecResult } from "../../types.js";
5
+ import type { InterpreterContext } from "../types.js";
6
+ export declare function handleCd(ctx: InterpreterContext, args: string[]): Promise<ExecResult>;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * compgen - Generate completion matches
3
+ *
4
+ * Usage:
5
+ * compgen -v [prefix] - List variable names (optionally starting with prefix)
6
+ * compgen -A variable [prefix] - Same as -v
7
+ * compgen -A function [prefix] - List function names
8
+ * compgen -e [prefix] - List exported variable names
9
+ * compgen -A builtin [prefix] - List builtin command names
10
+ * compgen -A keyword [prefix] - List shell keywords (alias: -k)
11
+ * compgen -A alias [prefix] - List alias names
12
+ * compgen -A shopt [prefix] - List shopt options
13
+ * compgen -A helptopic [prefix] - List help topics
14
+ * compgen -A directory [prefix] - List directory names
15
+ * compgen -A file [prefix] - List file names
16
+ * compgen -f [prefix] - List file names (alias for -A file)
17
+ * compgen -A user - List user names
18
+ * compgen -A command [prefix] - List commands (builtins, functions, aliases, external)
19
+ * compgen -W wordlist [prefix] - Generate from wordlist
20
+ * compgen -P prefix - Prefix to add to completions
21
+ * compgen -S suffix - Suffix to add to completions
22
+ * compgen -o option - Completion option (plusdirs, dirnames, default, etc.)
23
+ */
24
+ import type { ExecResult } from "../../types.js";
25
+ import type { InterpreterContext } from "../types.js";
26
+ export declare function handleCompgen(ctx: InterpreterContext, args: string[]): Promise<ExecResult>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * complete - Set and display programmable completion specifications
3
+ *
4
+ * Usage:
5
+ * complete - List all completion specs
6
+ * complete -p - Print all completion specs in reusable format
7
+ * complete -p cmd - Print completion spec for specific command
8
+ * complete -W 'word1 word2' cmd - Set word list completion for cmd
9
+ * complete -F func cmd - Set function completion for cmd
10
+ * complete -r cmd - Remove completion spec for cmd
11
+ * complete -r - Remove all completion specs
12
+ * complete -D ... - Set default completion (for commands with no specific spec)
13
+ * complete -o opt cmd - Set completion options (nospace, filenames, default, etc.)
14
+ */
15
+ import type { ExecResult } from "../../types.js";
16
+ import type { InterpreterContext } from "../types.js";
17
+ export declare function handleComplete(ctx: InterpreterContext, args: string[]): ExecResult;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * compopt - Modify completion options
3
+ *
4
+ * Usage:
5
+ * compopt [-o option] [+o option] [name ...]
6
+ * compopt -D [-o option] [+o option]
7
+ * compopt -E [-o option] [+o option]
8
+ *
9
+ * Modifies completion options for the specified commands (names) or the
10
+ * currently executing completion when no names are provided.
11
+ *
12
+ * Options:
13
+ * -o option Enable completion option
14
+ * +o option Disable completion option
15
+ * -D Apply to default completion
16
+ * -E Apply to empty-line completion
17
+ *
18
+ * Valid completion options:
19
+ * bashdefault, default, dirnames, filenames, noquote, nosort, nospace, plusdirs
20
+ *
21
+ * Returns:
22
+ * 0 on success
23
+ * 1 if not in a completion function and no command name is given
24
+ * 2 if an invalid option is specified
25
+ */
26
+ import type { ExecResult } from "../../types.js";
27
+ import type { InterpreterContext } from "../types.js";
28
+ export declare function handleCompopt(ctx: InterpreterContext, args: string[]): ExecResult;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * continue - Skip to next loop iteration builtin
3
+ */
4
+ import type { ExecResult } from "../../types.js";
5
+ import type { InterpreterContext } from "../types.js";
6
+ export declare function handleContinue(ctx: InterpreterContext, args: string[]): ExecResult;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Array Parsing Functions for declare/typeset
3
+ *
4
+ * Handles parsing of array literal syntax for the declare builtin.
5
+ */
6
+ /**
7
+ * Parse array elements from content like "1 2 3" or "'a b' c d"
8
+ */
9
+ export declare function parseArrayElements(content: string): string[];
10
+ /**
11
+ * Parse associative array literal content like "['foo']=bar ['spam']=42"
12
+ * Returns array of [key, value] pairs
13
+ */
14
+ export declare function parseAssocArrayLiteral(content: string): [string, string][];
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Declare Print Mode Functions
3
+ *
4
+ * Handles printing and listing variables for the declare/typeset builtin.
5
+ */
6
+ import type { ExecResult } from "../../types.js";
7
+ import type { InterpreterContext } from "../types.js";
8
+ /**
9
+ * Print specific variables with their declarations.
10
+ * Handles: declare -p varname1 varname2 ...
11
+ */
12
+ export declare function printSpecificVariables(ctx: InterpreterContext, names: string[]): ExecResult;
13
+ export interface PrintAllFilters {
14
+ filterExport: boolean;
15
+ filterReadonly: boolean;
16
+ filterNameref: boolean;
17
+ filterIndexedArray: boolean;
18
+ filterAssocArray: boolean;
19
+ }
20
+ /**
21
+ * Print all variables with their declarations and attributes.
22
+ * Handles: declare -p (with optional filters like -x, -r, -n, -a, -A)
23
+ */
24
+ export declare function printAllVariables(ctx: InterpreterContext, filters: PrintAllFilters): ExecResult;
25
+ /**
26
+ * List all associative arrays.
27
+ * Handles: declare -A (without arguments)
28
+ */
29
+ export declare function listAssociativeArrays(ctx: InterpreterContext): ExecResult;
30
+ /**
31
+ * List all indexed arrays.
32
+ * Handles: declare -a (without arguments)
33
+ */
34
+ export declare function listIndexedArrays(ctx: InterpreterContext): ExecResult;
35
+ /**
36
+ * List all variables without print mode (no attributes shown).
37
+ * Handles: declare (without -p and without arguments)
38
+ */
39
+ export declare function listAllVariables(ctx: InterpreterContext): ExecResult;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * declare/typeset - Declare variables and give them attributes
3
+ *
4
+ * Usage:
5
+ * declare - List all variables
6
+ * declare -p - List all variables (same as no args)
7
+ * declare NAME=value - Declare variable with value
8
+ * declare -a NAME - Declare indexed array
9
+ * declare -A NAME - Declare associative array
10
+ * declare -r NAME - Declare readonly variable
11
+ * declare -x NAME - Export variable
12
+ * declare -g NAME - Declare global variable (inside functions)
13
+ *
14
+ * Also aliased as 'typeset'
15
+ */
16
+ import type { ExecResult } from "../../types.js";
17
+ import type { InterpreterContext } from "../types.js";
18
+ /**
19
+ * Check if a variable has the integer attribute.
20
+ */
21
+ export declare function isInteger(ctx: InterpreterContext, name: string): boolean;
22
+ /**
23
+ * Apply case transformation based on variable attributes.
24
+ * Returns the transformed value.
25
+ */
26
+ export declare function applyCaseTransform(ctx: InterpreterContext, name: string, value: string): string;
27
+ export declare function handleDeclare(ctx: InterpreterContext, args: string[]): Promise<ExecResult>;
28
+ /**
29
+ * readonly - Declare readonly variables
30
+ *
31
+ * Usage:
32
+ * readonly NAME=value - Declare readonly variable
33
+ * readonly NAME - Mark existing variable as readonly
34
+ */
35
+ export declare function handleReadonly(ctx: InterpreterContext, args: string[]): Promise<ExecResult>;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Directory Stack Builtins: pushd, popd, dirs
3
+ *
4
+ * pushd [dir] - Push directory onto stack and cd to it
5
+ * popd - Pop directory from stack and cd to previous
6
+ * dirs [-clpv] - Display directory stack
7
+ */
8
+ import type { ExecResult } from "../../types.js";
9
+ import type { InterpreterContext } from "../types.js";
10
+ /**
11
+ * pushd - Push directory onto stack and cd to it
12
+ *
13
+ * pushd [dir] - Push current dir, cd to dir
14
+ */
15
+ export declare function handlePushd(ctx: InterpreterContext, args: string[]): Promise<ExecResult>;
16
+ /**
17
+ * popd - Pop directory from stack and cd to it
18
+ */
19
+ export declare function handlePopd(ctx: InterpreterContext, args: string[]): ExecResult;
20
+ /**
21
+ * dirs - Display directory stack
22
+ *
23
+ * dirs [-clpv]
24
+ * -c: Clear the stack
25
+ * -l: Long format (no tilde substitution)
26
+ * -p: One entry per line
27
+ * -v: One entry per line with index numbers
28
+ */
29
+ export declare function handleDirs(ctx: InterpreterContext, args: string[]): ExecResult;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * eval - Execute arguments as a shell command
3
+ *
4
+ * Concatenates all arguments and executes them as a shell command
5
+ * in the current environment (variables persist after eval).
6
+ */
7
+ import type { ExecResult } from "../../types.js";
8
+ import type { InterpreterContext } from "../types.js";
9
+ export declare function handleEval(ctx: InterpreterContext, args: string[], stdin?: string): Promise<ExecResult>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * exit - Exit shell builtin
3
+ */
4
+ import type { InterpreterContext } from "../types.js";
5
+ export declare function handleExit(ctx: InterpreterContext, args: string[]): never;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * export - Set environment variables builtin
3
+ *
4
+ * Usage:
5
+ * export - List all exported variables
6
+ * export -p - List all exported variables (same as no args)
7
+ * export NAME=value - Set and export variable
8
+ * export NAME+=value - Append value and export variable
9
+ * export NAME - Export existing variable (or create empty)
10
+ * export -n NAME - Un-export variable (remove from env)
11
+ */
12
+ import type { ExecResult } from "../../types.js";
13
+ import type { InterpreterContext } from "../types.js";
14
+ export declare function handleExport(ctx: InterpreterContext, args: string[]): ExecResult;