just-bash 2.15.0-executor.0 → 3.0.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 (642) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +38 -2
  3. package/dist/Bash.d.ts +23 -82
  4. package/dist/bin/chunks/awk2-CKPJ75GN.js +2 -0
  5. package/dist/bin/chunks/base64-I3CXGD2Q.js +2 -0
  6. package/dist/bin/chunks/bash-UYSJL7VA.js +2 -0
  7. package/dist/bin/chunks/cat-3TMJDECR.js +2 -0
  8. package/dist/bin/chunks/chunk-24DJ4XAS.js +18 -0
  9. package/dist/bin/chunks/{chunk-DOXYBGNA.js → chunk-2ACK45YF.js} +4 -4
  10. package/dist/bin/chunks/chunk-2GZSSMV3.js +14 -0
  11. package/dist/bin/chunks/{chunk-WXMBDX4P.js → chunk-2TMMAY52.js} +7 -7
  12. package/dist/bin/chunks/chunk-575DV2PL.js +9 -0
  13. package/dist/bin/chunks/chunk-5DFR7VRU.js +13 -0
  14. package/dist/bin/chunks/chunk-63XSH3IT.js +2 -0
  15. package/dist/bin/{shell/chunks/chunk-N43DJTSI.js → chunks/chunk-6CW6ATOU.js} +1 -1
  16. package/dist/bin/chunks/chunk-6NYAJMTL.js +14 -0
  17. package/dist/bin/chunks/chunk-6ZKYK7PO.js +63 -0
  18. package/dist/bin/chunks/chunk-7FOU5QKD.js +11 -0
  19. package/dist/bin/chunks/chunk-7RSTZI3G.js +9 -0
  20. package/dist/bin/chunks/{chunk-SGA7Y45Z.js → chunk-A65XLABI.js} +5 -5
  21. package/dist/bin/chunks/{chunk-YLE2OYY6.js → chunk-A6CAHGYF.js} +1 -1
  22. package/dist/bin/{shell/chunks/chunk-XKPFI566.js → chunks/chunk-AM6HJVBI.js} +17 -17
  23. package/dist/bin/chunks/chunk-AQBEVPZP.js +6 -0
  24. package/dist/bin/chunks/chunk-AX3QU3MP.js +6 -0
  25. package/dist/bin/chunks/chunk-B4CUXR3Q.js +33 -0
  26. package/dist/bin/chunks/{chunk-NLBRLRWD.js → chunk-B5DAHNDY.js} +1 -1
  27. package/dist/bin/chunks/chunk-BEWZWAXH.js +8 -0
  28. package/dist/bin/{shell/chunks/chunk-SE4C7FJY.js → chunks/chunk-C6FRS5UB.js} +13 -13
  29. package/dist/bin/chunks/chunk-CUYKY2BK.js +5 -0
  30. package/dist/bin/chunks/chunk-D3JRD3JF.js +36 -0
  31. package/dist/bin/chunks/chunk-D6DORGK7.js +16 -0
  32. package/dist/bin/chunks/{chunk-SXB55JOI.js → chunk-DH7TPGPX.js} +1 -1
  33. package/dist/bin/chunks/chunk-FU7JHPYW.js +9 -0
  34. package/dist/bin/chunks/chunk-G36D7WFF.js +6 -0
  35. package/dist/bin/chunks/chunk-GQQLQPZG.js +7 -0
  36. package/dist/bin/chunks/chunk-HIVPP3AM.js +17 -0
  37. package/dist/bin/{shell/chunks/chunk-NAX7MTAR.js → chunks/chunk-I3X57RP5.js} +6 -6
  38. package/dist/bin/chunks/chunk-IZ3AT2KX.js +19 -0
  39. package/dist/bin/chunks/chunk-KHOBXZFG.js +12 -0
  40. package/dist/bin/chunks/chunk-KMFPV7SR.js +6 -0
  41. package/dist/bin/chunks/chunk-KX2PR2HV.js +16 -0
  42. package/dist/bin/chunks/{chunk-54G6AE72.js → chunk-LCJRVV55.js} +1 -1
  43. package/dist/bin/chunks/chunk-M33SULGQ.js +9 -0
  44. package/dist/bin/chunks/{chunk-3Y32LPNT.js → chunk-M3T6XOXC.js} +1 -1
  45. package/dist/bin/chunks/chunk-MWKPB24E.js +11 -0
  46. package/dist/bin/chunks/chunk-NN2DBOAZ.js +5 -0
  47. package/dist/bin/chunks/{chunk-RMQC3GS7.js → chunk-NOGXKS2G.js} +23 -23
  48. package/dist/bin/chunks/chunk-NTW6IA45.js +2 -0
  49. package/dist/bin/{shell/chunks/chunk-7BORMNPQ.js → chunks/chunk-NWG67HAQ.js} +1 -1
  50. package/dist/bin/chunks/{chunk-A3HQTYHR.js → chunk-P43NQKUN.js} +1 -1
  51. package/dist/bin/chunks/chunk-PHZPFNDZ.js +287 -0
  52. package/dist/bin/chunks/chunk-RX22J4AC.js +14 -0
  53. package/dist/bin/chunks/chunk-S7KZBLGH.js +3 -0
  54. package/dist/bin/{shell/chunks/chunk-ZO5PSLKR.js → chunks/chunk-SDOJRQF5.js} +1 -1
  55. package/dist/bin/chunks/chunk-UFJFAFSS.js +28 -0
  56. package/dist/bin/chunks/chunk-UMYJNWPA.js +140 -0
  57. package/dist/bin/chunks/chunk-UO7ZJYDM.js +11 -0
  58. package/dist/bin/chunks/{chunk-THNL3XFF.js → chunk-VECTAALH.js} +1 -1
  59. package/dist/bin/chunks/chunk-VRU3NTQB.js +3 -0
  60. package/dist/bin/chunks/chunk-WJ3HZK2S.js +5 -0
  61. package/dist/bin/chunks/chunk-WLBA7L7U.js +23 -0
  62. package/dist/bin/{shell/chunks/chunk-SXRVLCZ4.js → chunks/chunk-WRYJHXRE.js} +1 -1
  63. package/dist/bin/chunks/chunk-XZEAAOBW.js +8 -0
  64. package/dist/bin/{shell/chunks/chunk-SDLWFYVT.js → chunks/chunk-YMQY74O7.js} +13 -13
  65. package/dist/bin/chunks/chunk-ZNMFCOTS.js +10 -0
  66. package/dist/bin/chunks/{chunk-GOJZHH3L.js → chunk-ZO3PBKJB.js} +3 -3
  67. package/dist/bin/chunks/column-MTXKQLJH.js +2 -0
  68. package/dist/bin/chunks/comm-YZHVF2XN.js +2 -0
  69. package/dist/bin/chunks/{curl-SRTMGOVV.js → curl-2DCNBIKJ.js} +8 -8
  70. package/dist/bin/chunks/cut-MWPHE25M.js +2 -0
  71. package/dist/bin/chunks/diff-EINZHDTZ.js +2 -0
  72. package/dist/bin/chunks/env-NK55NKL6.js +2 -0
  73. package/dist/bin/chunks/expand-47QQBMM5.js +2 -0
  74. package/dist/bin/{shell/chunks/expansion-2RO5M3QC.js → chunks/expansion-H3VFC532.js} +1 -1
  75. package/dist/bin/chunks/{expr-4CJYC4LY.js → expr-VPJ77DR7.js} +1 -1
  76. package/dist/bin/{shell/chunks/file-D5YKS5NV.js → chunks/file-MMSHRWCJ.js} +1 -1
  77. package/dist/bin/chunks/find-O2KKT6KZ.js +2 -0
  78. package/dist/bin/chunks/flag-coverage-FHFMNAV6.js +2 -0
  79. package/dist/bin/chunks/fold-QC27S46O.js +2 -0
  80. package/dist/bin/chunks/grep-3X5B47DW.js +2 -0
  81. package/dist/bin/chunks/gzip-VYBZGPTA.js +2 -0
  82. package/dist/bin/chunks/head-BM7J6BEI.js +2 -0
  83. package/dist/bin/chunks/html-to-markdown-G2FXKDLR.js +2 -0
  84. package/dist/bin/chunks/join-5J5VA3I7.js +2 -0
  85. package/dist/bin/chunks/jq-HYQ3KMGL.js +2 -0
  86. package/dist/bin/chunks/js-exec-LZPKIZ5V.js +97 -0
  87. package/dist/bin/chunks/js-exec-worker.js +27 -185
  88. package/dist/bin/chunks/{ls-G2PXHSNX.js → ls-WONXDVOX.js} +1 -1
  89. package/dist/bin/chunks/md5sum-GVZ66MRR.js +2 -0
  90. package/dist/bin/chunks/nl-XLPXDHHK.js +2 -0
  91. package/dist/bin/chunks/od-CRBL7ZML.js +2 -0
  92. package/dist/bin/chunks/paste-7MEIW3PG.js +2 -0
  93. package/dist/bin/chunks/{printf-P3QVL4IO.js → printf-NA7DYZBO.js} +1 -1
  94. package/dist/bin/chunks/python3-BBQ4SVHU.js +12 -0
  95. package/dist/bin/chunks/rev-6LTZEDBA.js +2 -0
  96. package/dist/bin/chunks/rg-UPQTBQZR.js +2 -0
  97. package/dist/bin/chunks/sed-OKEUW2KT.js +2 -0
  98. package/dist/bin/chunks/sha1sum-HFI2SRA4.js +2 -0
  99. package/dist/bin/chunks/sha256sum-N44D3OCP.js +2 -0
  100. package/dist/bin/chunks/sort-ES3NRFJA.js +2 -0
  101. package/dist/bin/chunks/split-QFBCCUR5.js +2 -0
  102. package/dist/bin/chunks/sqlite3-V4SEWTIR.js +2 -0
  103. package/dist/bin/chunks/sqlite3-worker.js +1728 -0
  104. package/dist/bin/chunks/strings-YGI6HF5M.js +2 -0
  105. package/dist/bin/chunks/tac-HWXFWOGO.js +2 -0
  106. package/dist/bin/chunks/tail-YX6MELZ5.js +2 -0
  107. package/dist/bin/chunks/tar-UO62YC6N.js +2 -0
  108. package/dist/bin/chunks/tee-XKJM7HV7.js +2 -0
  109. package/dist/bin/chunks/time-RPVNTV72.js +2 -0
  110. package/dist/bin/chunks/timeout-4QMASFQG.js +2 -0
  111. package/dist/bin/chunks/tr-A6IXSBQX.js +2 -0
  112. package/dist/bin/chunks/unexpand-UCJETXUX.js +2 -0
  113. package/dist/bin/chunks/uniq-2KXDTNDX.js +2 -0
  114. package/dist/bin/chunks/wc-KTXPMRYY.js +2 -0
  115. package/dist/bin/chunks/worker.js +28 -9
  116. package/dist/bin/chunks/xan-IHA7IHBM.js +2 -0
  117. package/dist/bin/chunks/xan-view-JFFJAU35.js +2 -0
  118. package/dist/bin/chunks/xargs-EWL5DXR3.js +2 -0
  119. package/dist/bin/chunks/yq-LDGFI4EM.js +2 -0
  120. package/dist/bin/just-bash.js +292 -292
  121. package/dist/bin/shell/chunks/awk2-CKPJ75GN.js +2 -0
  122. package/dist/bin/shell/chunks/base64-I3CXGD2Q.js +2 -0
  123. package/dist/bin/shell/chunks/bash-UYSJL7VA.js +2 -0
  124. package/dist/bin/shell/chunks/cat-3TMJDECR.js +2 -0
  125. package/dist/bin/shell/chunks/chunk-24DJ4XAS.js +18 -0
  126. package/dist/bin/shell/chunks/{chunk-DOXYBGNA.js → chunk-2ACK45YF.js} +4 -4
  127. package/dist/bin/shell/chunks/chunk-2GZSSMV3.js +14 -0
  128. package/dist/bin/shell/chunks/{chunk-WXMBDX4P.js → chunk-2TMMAY52.js} +7 -7
  129. package/dist/bin/shell/chunks/chunk-575DV2PL.js +9 -0
  130. package/dist/bin/shell/chunks/chunk-5DFR7VRU.js +13 -0
  131. package/dist/bin/shell/chunks/chunk-63XSH3IT.js +2 -0
  132. package/dist/bin/{chunks/chunk-N43DJTSI.js → shell/chunks/chunk-6CW6ATOU.js} +1 -1
  133. package/dist/bin/shell/chunks/chunk-6NYAJMTL.js +14 -0
  134. package/dist/bin/shell/chunks/chunk-6ZKYK7PO.js +63 -0
  135. package/dist/bin/shell/chunks/chunk-7FOU5QKD.js +11 -0
  136. package/dist/bin/shell/chunks/chunk-7RSTZI3G.js +9 -0
  137. package/dist/bin/shell/chunks/{chunk-SGA7Y45Z.js → chunk-A65XLABI.js} +5 -5
  138. package/dist/bin/shell/chunks/{chunk-YLE2OYY6.js → chunk-A6CAHGYF.js} +1 -1
  139. package/dist/bin/{chunks/chunk-XKPFI566.js → shell/chunks/chunk-AM6HJVBI.js} +17 -17
  140. package/dist/bin/shell/chunks/chunk-AQBEVPZP.js +6 -0
  141. package/dist/bin/shell/chunks/chunk-AX3QU3MP.js +6 -0
  142. package/dist/bin/shell/chunks/chunk-B4CUXR3Q.js +33 -0
  143. package/dist/bin/shell/chunks/{chunk-NLBRLRWD.js → chunk-B5DAHNDY.js} +1 -1
  144. package/dist/bin/shell/chunks/chunk-BEWZWAXH.js +8 -0
  145. package/dist/bin/{chunks/chunk-SE4C7FJY.js → shell/chunks/chunk-C6FRS5UB.js} +13 -13
  146. package/dist/bin/shell/chunks/chunk-CUYKY2BK.js +5 -0
  147. package/dist/bin/shell/chunks/chunk-D3JRD3JF.js +36 -0
  148. package/dist/bin/shell/chunks/chunk-D6DORGK7.js +16 -0
  149. package/dist/bin/shell/chunks/{chunk-SXB55JOI.js → chunk-DH7TPGPX.js} +1 -1
  150. package/dist/bin/shell/chunks/chunk-FU7JHPYW.js +9 -0
  151. package/dist/bin/shell/chunks/chunk-G36D7WFF.js +6 -0
  152. package/dist/bin/shell/chunks/chunk-GQQLQPZG.js +7 -0
  153. package/dist/bin/shell/chunks/chunk-HIVPP3AM.js +17 -0
  154. package/dist/bin/{chunks/chunk-NAX7MTAR.js → shell/chunks/chunk-I3X57RP5.js} +6 -6
  155. package/dist/bin/shell/chunks/chunk-IZ3AT2KX.js +19 -0
  156. package/dist/bin/shell/chunks/chunk-KHOBXZFG.js +12 -0
  157. package/dist/bin/shell/chunks/chunk-KMFPV7SR.js +6 -0
  158. package/dist/bin/shell/chunks/chunk-KX2PR2HV.js +16 -0
  159. package/dist/bin/shell/chunks/{chunk-54G6AE72.js → chunk-LCJRVV55.js} +1 -1
  160. package/dist/bin/shell/chunks/chunk-M33SULGQ.js +9 -0
  161. package/dist/bin/shell/chunks/{chunk-3Y32LPNT.js → chunk-M3T6XOXC.js} +1 -1
  162. package/dist/bin/shell/chunks/chunk-MWKPB24E.js +11 -0
  163. package/dist/bin/shell/chunks/chunk-NN2DBOAZ.js +5 -0
  164. package/dist/bin/shell/chunks/{chunk-RMQC3GS7.js → chunk-NOGXKS2G.js} +23 -23
  165. package/dist/bin/shell/chunks/chunk-NTW6IA45.js +2 -0
  166. package/dist/bin/{chunks/chunk-7BORMNPQ.js → shell/chunks/chunk-NWG67HAQ.js} +1 -1
  167. package/dist/bin/shell/chunks/{chunk-A3HQTYHR.js → chunk-P43NQKUN.js} +1 -1
  168. package/dist/bin/shell/chunks/chunk-PHZPFNDZ.js +287 -0
  169. package/dist/bin/shell/chunks/chunk-RX22J4AC.js +14 -0
  170. package/dist/bin/shell/chunks/chunk-S7KZBLGH.js +3 -0
  171. package/dist/bin/{chunks/chunk-ZO5PSLKR.js → shell/chunks/chunk-SDOJRQF5.js} +1 -1
  172. package/dist/bin/shell/chunks/chunk-UFJFAFSS.js +28 -0
  173. package/dist/bin/shell/chunks/chunk-UMYJNWPA.js +140 -0
  174. package/dist/bin/shell/chunks/chunk-UO7ZJYDM.js +11 -0
  175. package/dist/bin/shell/chunks/{chunk-THNL3XFF.js → chunk-VECTAALH.js} +1 -1
  176. package/dist/bin/shell/chunks/chunk-VRU3NTQB.js +3 -0
  177. package/dist/bin/shell/chunks/chunk-WJ3HZK2S.js +5 -0
  178. package/dist/bin/shell/chunks/chunk-WLBA7L7U.js +23 -0
  179. package/dist/bin/{chunks/chunk-SXRVLCZ4.js → shell/chunks/chunk-WRYJHXRE.js} +1 -1
  180. package/dist/bin/shell/chunks/chunk-XZEAAOBW.js +8 -0
  181. package/dist/bin/{chunks/chunk-SDLWFYVT.js → shell/chunks/chunk-YMQY74O7.js} +13 -13
  182. package/dist/bin/shell/chunks/chunk-ZNMFCOTS.js +10 -0
  183. package/dist/bin/shell/chunks/{chunk-GOJZHH3L.js → chunk-ZO3PBKJB.js} +3 -3
  184. package/dist/bin/shell/chunks/column-MTXKQLJH.js +2 -0
  185. package/dist/bin/shell/chunks/comm-YZHVF2XN.js +2 -0
  186. package/dist/bin/shell/chunks/{curl-SRTMGOVV.js → curl-2DCNBIKJ.js} +8 -8
  187. package/dist/bin/shell/chunks/cut-MWPHE25M.js +2 -0
  188. package/dist/bin/shell/chunks/diff-EINZHDTZ.js +2 -0
  189. package/dist/bin/shell/chunks/env-NK55NKL6.js +2 -0
  190. package/dist/bin/shell/chunks/expand-47QQBMM5.js +2 -0
  191. package/dist/bin/{chunks/expansion-2RO5M3QC.js → shell/chunks/expansion-H3VFC532.js} +1 -1
  192. package/dist/bin/shell/chunks/{expr-4CJYC4LY.js → expr-VPJ77DR7.js} +1 -1
  193. package/dist/bin/{chunks/file-D5YKS5NV.js → shell/chunks/file-MMSHRWCJ.js} +1 -1
  194. package/dist/bin/shell/chunks/find-O2KKT6KZ.js +2 -0
  195. package/dist/bin/shell/chunks/flag-coverage-FHFMNAV6.js +2 -0
  196. package/dist/bin/shell/chunks/fold-QC27S46O.js +2 -0
  197. package/dist/bin/shell/chunks/grep-3X5B47DW.js +2 -0
  198. package/dist/bin/shell/chunks/gzip-VYBZGPTA.js +2 -0
  199. package/dist/bin/shell/chunks/head-BM7J6BEI.js +2 -0
  200. package/dist/bin/shell/chunks/html-to-markdown-G2FXKDLR.js +2 -0
  201. package/dist/bin/shell/chunks/join-5J5VA3I7.js +2 -0
  202. package/dist/bin/shell/chunks/jq-HYQ3KMGL.js +2 -0
  203. package/dist/bin/shell/chunks/js-exec-LZPKIZ5V.js +97 -0
  204. package/dist/bin/shell/chunks/{ls-G2PXHSNX.js → ls-WONXDVOX.js} +1 -1
  205. package/dist/bin/shell/chunks/md5sum-GVZ66MRR.js +2 -0
  206. package/dist/bin/shell/chunks/nl-XLPXDHHK.js +2 -0
  207. package/dist/bin/shell/chunks/od-CRBL7ZML.js +2 -0
  208. package/dist/bin/shell/chunks/paste-7MEIW3PG.js +2 -0
  209. package/dist/bin/shell/chunks/{printf-P3QVL4IO.js → printf-NA7DYZBO.js} +1 -1
  210. package/dist/bin/shell/chunks/python3-BBQ4SVHU.js +12 -0
  211. package/dist/bin/shell/chunks/rev-6LTZEDBA.js +2 -0
  212. package/dist/bin/shell/chunks/rg-UPQTBQZR.js +2 -0
  213. package/dist/bin/shell/chunks/sed-OKEUW2KT.js +2 -0
  214. package/dist/bin/shell/chunks/sha1sum-HFI2SRA4.js +2 -0
  215. package/dist/bin/shell/chunks/sha256sum-N44D3OCP.js +2 -0
  216. package/dist/bin/shell/chunks/sort-ES3NRFJA.js +2 -0
  217. package/dist/bin/shell/chunks/split-QFBCCUR5.js +2 -0
  218. package/dist/bin/shell/chunks/sqlite3-V4SEWTIR.js +2 -0
  219. package/dist/bin/shell/chunks/strings-YGI6HF5M.js +2 -0
  220. package/dist/bin/shell/chunks/tac-HWXFWOGO.js +2 -0
  221. package/dist/bin/shell/chunks/tail-YX6MELZ5.js +2 -0
  222. package/dist/bin/shell/chunks/tar-UO62YC6N.js +2 -0
  223. package/dist/bin/shell/chunks/tee-XKJM7HV7.js +2 -0
  224. package/dist/bin/shell/chunks/time-RPVNTV72.js +2 -0
  225. package/dist/bin/shell/chunks/timeout-4QMASFQG.js +2 -0
  226. package/dist/bin/shell/chunks/tr-A6IXSBQX.js +2 -0
  227. package/dist/bin/shell/chunks/unexpand-UCJETXUX.js +2 -0
  228. package/dist/bin/shell/chunks/uniq-2KXDTNDX.js +2 -0
  229. package/dist/bin/shell/chunks/wc-KTXPMRYY.js +2 -0
  230. package/dist/bin/shell/chunks/xan-IHA7IHBM.js +2 -0
  231. package/dist/bin/shell/chunks/xan-view-JFFJAU35.js +2 -0
  232. package/dist/bin/shell/chunks/xargs-EWL5DXR3.js +2 -0
  233. package/dist/bin/shell/chunks/yq-LDGFI4EM.js +2 -0
  234. package/dist/bin/shell/shell.js +274 -274
  235. package/dist/browser.d.ts +1 -0
  236. package/dist/bundle/browser.js +676 -674
  237. package/dist/bundle/chunks/awk2-RXRC54TM.js +1 -0
  238. package/dist/bundle/chunks/base64-FJOOBRMC.js +1 -0
  239. package/dist/bundle/chunks/bash-4WLDO24C.js +1 -0
  240. package/dist/bundle/chunks/cat-VQEWZT5O.js +1 -0
  241. package/dist/bundle/chunks/chunk-2TRDZQLB.js +17 -0
  242. package/dist/bundle/chunks/chunk-5DI2YNX7.js +10 -0
  243. package/dist/bundle/chunks/chunk-6N5CMDSQ.js +9 -0
  244. package/dist/bundle/chunks/{chunk-F23WWYKW.js → chunk-7P5JCWX5.js} +5 -5
  245. package/dist/bundle/chunks/chunk-7RIQPKJE.js +2 -0
  246. package/dist/bundle/chunks/{chunk-APT7OOP2.js → chunk-7ZUB672J.js} +1 -1
  247. package/dist/bundle/chunks/chunk-AH77CRWX.js +1 -0
  248. package/dist/bundle/chunks/{chunk-YNYSPYQ5.js → chunk-B74TABJS.js} +13 -13
  249. package/dist/bundle/chunks/{chunk-QJ7O6ZN3.js → chunk-BAXBSHE5.js} +3 -3
  250. package/dist/bundle/chunks/{chunk-FEIOJCZD.js → chunk-BGSUD5R5.js} +1 -1
  251. package/dist/bundle/chunks/chunk-CHRGJY5U.js +10 -0
  252. package/dist/bundle/chunks/chunk-CYJSRRNG.js +4 -0
  253. package/dist/bundle/chunks/chunk-CZYXTGMR.js +139 -0
  254. package/dist/bundle/chunks/{chunk-OL3S66CO.js → chunk-DFS4EHCX.js} +23 -23
  255. package/dist/bundle/chunks/chunk-DIB23V32.js +8 -0
  256. package/dist/bundle/chunks/chunk-DMJSDIQO.js +6 -0
  257. package/dist/bundle/chunks/chunk-DRGAV7ST.js +11 -0
  258. package/dist/bundle/chunks/chunk-DZCB42NK.js +2 -0
  259. package/dist/bundle/chunks/{chunk-DCAAORBQ.js → chunk-EIUAYBIC.js} +1 -1
  260. package/dist/bundle/chunks/chunk-G22IYMH5.js +16 -0
  261. package/dist/bundle/chunks/chunk-GFPLGF6W.js +5 -0
  262. package/dist/bundle/chunks/chunk-HCKS7PTH.js +10 -0
  263. package/dist/bundle/chunks/{chunk-5V6VZH6T.js → chunk-HKY7IG73.js} +1 -1
  264. package/dist/bundle/chunks/chunk-HL6NGDO2.js +22 -0
  265. package/dist/bundle/chunks/chunk-IIJDG7QW.js +13 -0
  266. package/dist/bundle/chunks/{chunk-Z6LRHWXI.js → chunk-JKZMQVSS.js} +7 -7
  267. package/dist/bundle/chunks/chunk-JMNW4NXI.js +8 -0
  268. package/dist/bundle/chunks/{chunk-LPQPILI2.js → chunk-K6LIBGJA.js} +1 -1
  269. package/dist/bundle/chunks/chunk-KBZ5NVXE.js +5 -0
  270. package/dist/bundle/chunks/chunk-KK2SFKTN.js +13 -0
  271. package/dist/bundle/chunks/{chunk-BBXLRYSX.js → chunk-KRBPSX3W.js} +1 -1
  272. package/dist/bundle/chunks/{chunk-LTZRCH7N.js → chunk-LBUR6QMO.js} +1 -1
  273. package/dist/bundle/chunks/chunk-MBDW4C5R.js +8 -0
  274. package/dist/bundle/chunks/chunk-MIV7TH6W.js +32 -0
  275. package/dist/bundle/chunks/chunk-MOLNCDQJ.js +5 -0
  276. package/dist/bundle/chunks/chunk-NUY2ZGZL.js +286 -0
  277. package/dist/bundle/chunks/chunk-OYFKMNOH.js +4 -0
  278. package/dist/bundle/chunks/{chunk-62RKD26F.js → chunk-Q7DN34BC.js} +6 -6
  279. package/dist/bundle/chunks/chunk-R6VWJ2ZL.js +1 -0
  280. package/dist/bundle/chunks/chunk-RGAX6VXO.js +6 -0
  281. package/dist/bundle/chunks/chunk-RHD3NWJY.js +15 -0
  282. package/dist/bundle/chunks/chunk-S7CS4O3M.js +5 -0
  283. package/dist/bundle/chunks/chunk-SFQDTSOG.js +8 -0
  284. package/dist/bundle/chunks/{chunk-J642UCRS.js → chunk-SNN4IESC.js} +1 -1
  285. package/dist/bundle/chunks/{chunk-64BAICW3.js → chunk-T6RP4YO5.js} +1 -1
  286. package/dist/bundle/chunks/chunk-TWHVX65V.js +4 -0
  287. package/dist/bundle/chunks/chunk-U2ATS66X.js +4 -0
  288. package/dist/bundle/chunks/chunk-UGMTY5A7.js +15 -0
  289. package/dist/bundle/chunks/chunk-UKBVVIW7.js +62 -0
  290. package/dist/bundle/chunks/chunk-USP7VSKV.js +12 -0
  291. package/dist/bundle/chunks/{chunk-OARHFVLG.js → chunk-UTKQPLMD.js} +13 -13
  292. package/dist/bundle/chunks/{chunk-YFG2CMIF.js → chunk-V5MWI2OL.js} +1 -1
  293. package/dist/bundle/chunks/{chunk-XKQRETAK.js → chunk-WEZK5ELQ.js} +1 -1
  294. package/dist/bundle/chunks/{chunk-YTNYSM6T.js → chunk-WURK7XMI.js} +4 -4
  295. package/dist/bundle/chunks/chunk-WZG5CB4V.js +7 -0
  296. package/dist/bundle/chunks/chunk-XUZRLD2X.js +35 -0
  297. package/dist/bundle/chunks/chunk-YDILEREV.js +7 -0
  298. package/dist/bundle/chunks/chunk-YXVMSFJA.js +13 -0
  299. package/dist/bundle/chunks/column-DCCLCHUR.js +1 -0
  300. package/dist/bundle/chunks/comm-AXP77KC4.js +1 -0
  301. package/dist/bundle/chunks/{curl-COE4TZE6.js → curl-47BFPSFW.js} +8 -8
  302. package/dist/bundle/chunks/cut-RBX7IXC7.js +1 -0
  303. package/dist/bundle/chunks/diff-AYXX5MI5.js +1 -0
  304. package/dist/bundle/chunks/env-GBSZDQLS.js +1 -0
  305. package/dist/bundle/chunks/expand-UMGRCDTC.js +1 -0
  306. package/dist/bundle/chunks/{expansion-ENLSRCXJ.js → expansion-VBDYWVZR.js} +1 -1
  307. package/dist/bundle/chunks/{expr-5T3UU5KE.js → expr-YYCVMXE3.js} +1 -1
  308. package/dist/bundle/chunks/{file-ZIGAJ4YS.js → file-IGDTDPLG.js} +1 -1
  309. package/dist/bundle/chunks/find-DH2ALKQS.js +1 -0
  310. package/dist/bundle/chunks/flag-coverage-WZWBNOJT.js +1 -0
  311. package/dist/bundle/chunks/fold-V23GDLZD.js +1 -0
  312. package/dist/bundle/chunks/grep-7CE2SS3X.js +1 -0
  313. package/dist/bundle/chunks/gzip-EVI6YRMT.js +1 -0
  314. package/dist/bundle/chunks/head-FG33BE3W.js +1 -0
  315. package/dist/bundle/chunks/html-to-markdown-AQHC3PHD.js +1 -0
  316. package/dist/bundle/chunks/join-TLHD7S7W.js +1 -0
  317. package/dist/bundle/chunks/jq-OKCSVTHN.js +1 -0
  318. package/dist/bundle/chunks/js-exec-2U7NEXAP.js +96 -0
  319. package/dist/bundle/chunks/js-exec-worker.js +27 -185
  320. package/dist/bundle/chunks/md5sum-XMCB7L5Z.js +1 -0
  321. package/dist/bundle/chunks/nl-LBU6FPPF.js +1 -0
  322. package/dist/bundle/chunks/od-O6TPXWVX.js +1 -0
  323. package/dist/bundle/chunks/paste-HIF3YKHC.js +1 -0
  324. package/dist/bundle/chunks/python3-ZR6W2FR3.js +11 -0
  325. package/dist/bundle/chunks/rev-SKETTPXH.js +1 -0
  326. package/dist/bundle/chunks/rg-GMXITNCP.js +1 -0
  327. package/dist/bundle/chunks/sed-YRQXQDMQ.js +1 -0
  328. package/dist/bundle/chunks/sha1sum-ZHNS7PS4.js +1 -0
  329. package/dist/bundle/chunks/sha256sum-YWE2HB65.js +1 -0
  330. package/dist/bundle/chunks/sort-5KALNK6P.js +1 -0
  331. package/dist/bundle/chunks/split-4CXZNBGE.js +1 -0
  332. package/dist/bundle/chunks/sqlite3-FXN2MHWU.js +1 -0
  333. package/dist/bundle/chunks/sqlite3-worker.js +1728 -0
  334. package/dist/bundle/chunks/strings-7VYWRFIZ.js +1 -0
  335. package/dist/bundle/chunks/tac-74F3WHUM.js +1 -0
  336. package/dist/bundle/chunks/tail-EDLAF4WW.js +1 -0
  337. package/dist/bundle/chunks/tar-RKYTUGDT.js +1 -0
  338. package/dist/bundle/chunks/tee-DUMXETDQ.js +1 -0
  339. package/dist/bundle/chunks/time-U22WPHDM.js +1 -0
  340. package/dist/bundle/chunks/timeout-PWE4AOYD.js +1 -0
  341. package/dist/bundle/chunks/tr-2QSZN4JB.js +1 -0
  342. package/dist/bundle/chunks/unexpand-ZTD2RXS2.js +1 -0
  343. package/dist/bundle/chunks/uniq-DCP6SV3B.js +1 -0
  344. package/dist/bundle/chunks/wc-J6YO4AFR.js +1 -0
  345. package/dist/bundle/chunks/worker.js +28 -9
  346. package/dist/bundle/chunks/xan-74G4ZYYZ.js +1 -0
  347. package/dist/bundle/chunks/xan-view-FLG5O7II.js +1 -0
  348. package/dist/bundle/chunks/xargs-LB2QOP6N.js +1 -0
  349. package/dist/bundle/chunks/yq-4NJ2P5VT.js +1 -0
  350. package/dist/bundle/index.cjs +983 -981
  351. package/dist/bundle/index.js +271 -271
  352. package/dist/commands/js-exec/{worker.d.ts → js-exec-worker.d.ts} +4 -10
  353. package/dist/commands/js-exec/js-exec.d.ts +1 -19
  354. package/dist/commands/search-engine/matcher.d.ts +6 -0
  355. package/dist/commands/search-engine/regex.d.ts +13 -0
  356. package/dist/commands/sqlite3/sqlite3.d.ts +1 -0
  357. package/dist/commands/sqlite3/worker.js +1728 -0
  358. package/dist/commands/tar/bzip2-compress.d.ts +17 -0
  359. package/dist/commands/worker-bridge/sync-backend.d.ts +2 -1
  360. package/dist/encoding.d.ts +115 -0
  361. package/dist/fs/in-memory-fs/in-memory-fs.d.ts +2 -0
  362. package/dist/fs/interface.d.ts +23 -1
  363. package/dist/fs/mountable-fs/mountable-fs.d.ts +2 -0
  364. package/dist/fs/overlay-fs/overlay-fs.d.ts +2 -0
  365. package/dist/fs/read-write-fs/read-write-fs.d.ts +2 -0
  366. package/dist/index.d.cts +2 -0
  367. package/dist/index.d.ts +2 -0
  368. package/dist/interpreter/interpreter.d.ts +2 -2
  369. package/dist/interpreter/types.d.ts +3 -3
  370. package/dist/network/dns-pin.d.ts +43 -0
  371. package/dist/network/types.d.ts +2 -1
  372. package/dist/types.d.ts +48 -10
  373. package/dist/utils/file-reader.d.ts +12 -5
  374. package/package.json +36 -40
  375. package/vendor/cpython-emscripten/python.wasm +0 -0
  376. package/dist/bin/chunks/awk2-VTJMI54B.js +0 -2
  377. package/dist/bin/chunks/base64-43M2R3GA.js +0 -2
  378. package/dist/bin/chunks/bash-6ZHZ6BX7.js +0 -2
  379. package/dist/bin/chunks/cat-XZIJZXKP.js +0 -2
  380. package/dist/bin/chunks/chunk-26NO42TF.js +0 -14
  381. package/dist/bin/chunks/chunk-5G2VOPPJ.js +0 -7
  382. package/dist/bin/chunks/chunk-5WFYIUU2.js +0 -3
  383. package/dist/bin/chunks/chunk-AAW7UMPO.js +0 -9
  384. package/dist/bin/chunks/chunk-B3RU2PUI.js +0 -140
  385. package/dist/bin/chunks/chunk-CGE2EHYP.js +0 -5
  386. package/dist/bin/chunks/chunk-CM4532DS.js +0 -36
  387. package/dist/bin/chunks/chunk-CQG2HEAL.js +0 -5
  388. package/dist/bin/chunks/chunk-EUXCM6C4.js +0 -12
  389. package/dist/bin/chunks/chunk-F3LGZXLQ.js +0 -9
  390. package/dist/bin/chunks/chunk-FA2CHD73.js +0 -16
  391. package/dist/bin/chunks/chunk-FLPVVSN5.js +0 -5
  392. package/dist/bin/chunks/chunk-FSZWFMB4.js +0 -16
  393. package/dist/bin/chunks/chunk-G43H2WGH.js +0 -17
  394. package/dist/bin/chunks/chunk-GO6FXSC4.js +0 -6
  395. package/dist/bin/chunks/chunk-GZHFXDDO.js +0 -10
  396. package/dist/bin/chunks/chunk-HJEHIH4P.js +0 -33
  397. package/dist/bin/chunks/chunk-JQBC3FXE.js +0 -8
  398. package/dist/bin/chunks/chunk-L2JBII6Z.js +0 -287
  399. package/dist/bin/chunks/chunk-LGJM5YFT.js +0 -17
  400. package/dist/bin/chunks/chunk-LMK6G2HH.js +0 -8
  401. package/dist/bin/chunks/chunk-MNMRGJJM.js +0 -11
  402. package/dist/bin/chunks/chunk-MRP4ZCD7.js +0 -6
  403. package/dist/bin/chunks/chunk-MXVNCVD6.js +0 -30
  404. package/dist/bin/chunks/chunk-MY5PY2PL.js +0 -2
  405. package/dist/bin/chunks/chunk-N5OTVT4F.js +0 -23
  406. package/dist/bin/chunks/chunk-OBI37ZY4.js +0 -9
  407. package/dist/bin/chunks/chunk-P6GNZPVW.js +0 -19
  408. package/dist/bin/chunks/chunk-RJSAGJQJ.js +0 -11
  409. package/dist/bin/chunks/chunk-ROJPSS6N.js +0 -3
  410. package/dist/bin/chunks/chunk-S7OHMN3F.js +0 -6
  411. package/dist/bin/chunks/chunk-VHUYNUT7.js +0 -13
  412. package/dist/bin/chunks/chunk-WS6P4H4S.js +0 -63
  413. package/dist/bin/chunks/chunk-WWZVR5NN.js +0 -6
  414. package/dist/bin/chunks/chunk-YEKSVVRC.js +0 -11
  415. package/dist/bin/chunks/chunk-YFPDB4PH.js +0 -9
  416. package/dist/bin/chunks/chunk-ZA4HUKJ3.js +0 -13
  417. package/dist/bin/chunks/chunk-ZKC5HQYO.js +0 -14
  418. package/dist/bin/chunks/column-XGV32UPN.js +0 -2
  419. package/dist/bin/chunks/comm-R3F3Z5DX.js +0 -2
  420. package/dist/bin/chunks/cut-5EY2XPXX.js +0 -2
  421. package/dist/bin/chunks/diff-LE7GMFZD.js +0 -2
  422. package/dist/bin/chunks/env-NTPN5QYM.js +0 -2
  423. package/dist/bin/chunks/expand-26XPP5KB.js +0 -2
  424. package/dist/bin/chunks/find-GAYRV4IF.js +0 -2
  425. package/dist/bin/chunks/flag-coverage-LBMWMYOO.js +0 -2
  426. package/dist/bin/chunks/fold-XSVNTAWH.js +0 -2
  427. package/dist/bin/chunks/grep-OZJTRD4D.js +0 -2
  428. package/dist/bin/chunks/gzip-LHOO65AN.js +0 -2
  429. package/dist/bin/chunks/head-YMNRW3F3.js +0 -2
  430. package/dist/bin/chunks/html-to-markdown-WVZA3MCP.js +0 -2
  431. package/dist/bin/chunks/join-Y4Q5WVVE.js +0 -2
  432. package/dist/bin/chunks/jq-FIV5Q5T4.js +0 -2
  433. package/dist/bin/chunks/js-exec-6UJKEL4G.js +0 -97
  434. package/dist/bin/chunks/md5sum-NCLXV2S3.js +0 -2
  435. package/dist/bin/chunks/nl-XH3L75DR.js +0 -2
  436. package/dist/bin/chunks/od-52FBC34W.js +0 -2
  437. package/dist/bin/chunks/paste-3UVLMQ2K.js +0 -2
  438. package/dist/bin/chunks/python3-QOJU2POC.js +0 -12
  439. package/dist/bin/chunks/rev-UHEPS2UL.js +0 -2
  440. package/dist/bin/chunks/rg-C6KMBFNG.js +0 -2
  441. package/dist/bin/chunks/sed-HALRQZKY.js +0 -2
  442. package/dist/bin/chunks/sha1sum-BHNJ5ALF.js +0 -2
  443. package/dist/bin/chunks/sha256sum-HJJ3NJ5L.js +0 -2
  444. package/dist/bin/chunks/sort-7GENYU2I.js +0 -2
  445. package/dist/bin/chunks/split-YWV64TJH.js +0 -2
  446. package/dist/bin/chunks/sqlite3-CVNFMP3Z.js +0 -2
  447. package/dist/bin/chunks/strings-XXKZCWY5.js +0 -2
  448. package/dist/bin/chunks/tac-T42SKDDI.js +0 -2
  449. package/dist/bin/chunks/tail-V537TDFR.js +0 -2
  450. package/dist/bin/chunks/tar-TOWX2TDU.js +0 -2
  451. package/dist/bin/chunks/tee-HK2SYCAR.js +0 -2
  452. package/dist/bin/chunks/time-5R4QWCYF.js +0 -2
  453. package/dist/bin/chunks/timeout-Z24MNWOP.js +0 -2
  454. package/dist/bin/chunks/tr-4FPGAEVB.js +0 -2
  455. package/dist/bin/chunks/unexpand-OYZ7KOYR.js +0 -2
  456. package/dist/bin/chunks/uniq-TMSAIZM3.js +0 -2
  457. package/dist/bin/chunks/wc-ZIV3TFVG.js +0 -2
  458. package/dist/bin/chunks/xan-MOZFJGMY.js +0 -2
  459. package/dist/bin/chunks/xan-view-5SZBYPLG.js +0 -2
  460. package/dist/bin/chunks/xargs-SCYIFXOW.js +0 -2
  461. package/dist/bin/chunks/yq-Q47JUWL6.js +0 -2
  462. package/dist/bin/shell/chunks/awk2-VTJMI54B.js +0 -2
  463. package/dist/bin/shell/chunks/base64-43M2R3GA.js +0 -2
  464. package/dist/bin/shell/chunks/bash-6ZHZ6BX7.js +0 -2
  465. package/dist/bin/shell/chunks/cat-XZIJZXKP.js +0 -2
  466. package/dist/bin/shell/chunks/chunk-26NO42TF.js +0 -14
  467. package/dist/bin/shell/chunks/chunk-5G2VOPPJ.js +0 -7
  468. package/dist/bin/shell/chunks/chunk-5WFYIUU2.js +0 -3
  469. package/dist/bin/shell/chunks/chunk-AAW7UMPO.js +0 -9
  470. package/dist/bin/shell/chunks/chunk-B3RU2PUI.js +0 -140
  471. package/dist/bin/shell/chunks/chunk-CGE2EHYP.js +0 -5
  472. package/dist/bin/shell/chunks/chunk-CM4532DS.js +0 -36
  473. package/dist/bin/shell/chunks/chunk-CQG2HEAL.js +0 -5
  474. package/dist/bin/shell/chunks/chunk-D64U2VGQ.js +0 -2
  475. package/dist/bin/shell/chunks/chunk-EUXCM6C4.js +0 -12
  476. package/dist/bin/shell/chunks/chunk-F3LGZXLQ.js +0 -9
  477. package/dist/bin/shell/chunks/chunk-FA2CHD73.js +0 -16
  478. package/dist/bin/shell/chunks/chunk-FLPVVSN5.js +0 -5
  479. package/dist/bin/shell/chunks/chunk-FSZWFMB4.js +0 -16
  480. package/dist/bin/shell/chunks/chunk-G43H2WGH.js +0 -17
  481. package/dist/bin/shell/chunks/chunk-GO6FXSC4.js +0 -6
  482. package/dist/bin/shell/chunks/chunk-GZHFXDDO.js +0 -10
  483. package/dist/bin/shell/chunks/chunk-HJEHIH4P.js +0 -33
  484. package/dist/bin/shell/chunks/chunk-JQBC3FXE.js +0 -8
  485. package/dist/bin/shell/chunks/chunk-L2JBII6Z.js +0 -287
  486. package/dist/bin/shell/chunks/chunk-LGJM5YFT.js +0 -17
  487. package/dist/bin/shell/chunks/chunk-LMK6G2HH.js +0 -8
  488. package/dist/bin/shell/chunks/chunk-MNMRGJJM.js +0 -11
  489. package/dist/bin/shell/chunks/chunk-MRP4ZCD7.js +0 -6
  490. package/dist/bin/shell/chunks/chunk-MXVNCVD6.js +0 -30
  491. package/dist/bin/shell/chunks/chunk-N5OTVT4F.js +0 -23
  492. package/dist/bin/shell/chunks/chunk-OBI37ZY4.js +0 -9
  493. package/dist/bin/shell/chunks/chunk-P6GNZPVW.js +0 -19
  494. package/dist/bin/shell/chunks/chunk-RJSAGJQJ.js +0 -11
  495. package/dist/bin/shell/chunks/chunk-ROJPSS6N.js +0 -3
  496. package/dist/bin/shell/chunks/chunk-S7OHMN3F.js +0 -6
  497. package/dist/bin/shell/chunks/chunk-VHUYNUT7.js +0 -13
  498. package/dist/bin/shell/chunks/chunk-WS6P4H4S.js +0 -63
  499. package/dist/bin/shell/chunks/chunk-WWZVR5NN.js +0 -6
  500. package/dist/bin/shell/chunks/chunk-YEKSVVRC.js +0 -11
  501. package/dist/bin/shell/chunks/chunk-YFPDB4PH.js +0 -9
  502. package/dist/bin/shell/chunks/chunk-ZA4HUKJ3.js +0 -13
  503. package/dist/bin/shell/chunks/chunk-ZKC5HQYO.js +0 -14
  504. package/dist/bin/shell/chunks/column-XGV32UPN.js +0 -2
  505. package/dist/bin/shell/chunks/comm-R3F3Z5DX.js +0 -2
  506. package/dist/bin/shell/chunks/cut-5EY2XPXX.js +0 -2
  507. package/dist/bin/shell/chunks/diff-LE7GMFZD.js +0 -2
  508. package/dist/bin/shell/chunks/env-NTPN5QYM.js +0 -2
  509. package/dist/bin/shell/chunks/expand-26XPP5KB.js +0 -2
  510. package/dist/bin/shell/chunks/find-GAYRV4IF.js +0 -2
  511. package/dist/bin/shell/chunks/flag-coverage-LBMWMYOO.js +0 -2
  512. package/dist/bin/shell/chunks/fold-XSVNTAWH.js +0 -2
  513. package/dist/bin/shell/chunks/grep-OZJTRD4D.js +0 -2
  514. package/dist/bin/shell/chunks/gzip-LHOO65AN.js +0 -2
  515. package/dist/bin/shell/chunks/head-YMNRW3F3.js +0 -2
  516. package/dist/bin/shell/chunks/html-to-markdown-WVZA3MCP.js +0 -2
  517. package/dist/bin/shell/chunks/join-Y4Q5WVVE.js +0 -2
  518. package/dist/bin/shell/chunks/jq-FIV5Q5T4.js +0 -2
  519. package/dist/bin/shell/chunks/js-exec-H26D5H6V.js +0 -97
  520. package/dist/bin/shell/chunks/md5sum-NCLXV2S3.js +0 -2
  521. package/dist/bin/shell/chunks/nl-XH3L75DR.js +0 -2
  522. package/dist/bin/shell/chunks/od-52FBC34W.js +0 -2
  523. package/dist/bin/shell/chunks/paste-3UVLMQ2K.js +0 -2
  524. package/dist/bin/shell/chunks/python3-O4VTP6TD.js +0 -12
  525. package/dist/bin/shell/chunks/rev-UHEPS2UL.js +0 -2
  526. package/dist/bin/shell/chunks/rg-C6KMBFNG.js +0 -2
  527. package/dist/bin/shell/chunks/sed-HALRQZKY.js +0 -2
  528. package/dist/bin/shell/chunks/sha1sum-BHNJ5ALF.js +0 -2
  529. package/dist/bin/shell/chunks/sha256sum-HJJ3NJ5L.js +0 -2
  530. package/dist/bin/shell/chunks/sort-7GENYU2I.js +0 -2
  531. package/dist/bin/shell/chunks/split-YWV64TJH.js +0 -2
  532. package/dist/bin/shell/chunks/sqlite3-CVNFMP3Z.js +0 -2
  533. package/dist/bin/shell/chunks/strings-XXKZCWY5.js +0 -2
  534. package/dist/bin/shell/chunks/tac-T42SKDDI.js +0 -2
  535. package/dist/bin/shell/chunks/tail-V537TDFR.js +0 -2
  536. package/dist/bin/shell/chunks/tar-TOWX2TDU.js +0 -2
  537. package/dist/bin/shell/chunks/tee-HK2SYCAR.js +0 -2
  538. package/dist/bin/shell/chunks/time-5R4QWCYF.js +0 -2
  539. package/dist/bin/shell/chunks/timeout-Z24MNWOP.js +0 -2
  540. package/dist/bin/shell/chunks/tr-4FPGAEVB.js +0 -2
  541. package/dist/bin/shell/chunks/unexpand-OYZ7KOYR.js +0 -2
  542. package/dist/bin/shell/chunks/uniq-TMSAIZM3.js +0 -2
  543. package/dist/bin/shell/chunks/wc-ZIV3TFVG.js +0 -2
  544. package/dist/bin/shell/chunks/xan-MOZFJGMY.js +0 -2
  545. package/dist/bin/shell/chunks/xan-view-5SZBYPLG.js +0 -2
  546. package/dist/bin/shell/chunks/xargs-SCYIFXOW.js +0 -2
  547. package/dist/bin/shell/chunks/yq-Q47JUWL6.js +0 -2
  548. package/dist/bundle/chunks/awk2-POPGKRAI.js +0 -1
  549. package/dist/bundle/chunks/base64-4YMZCVJ5.js +0 -1
  550. package/dist/bundle/chunks/bash-IJWYRKFO.js +0 -1
  551. package/dist/bundle/chunks/cat-RDUMLXKC.js +0 -1
  552. package/dist/bundle/chunks/chunk-55VFSPNA.js +0 -2
  553. package/dist/bundle/chunks/chunk-7L36YK2X.js +0 -2
  554. package/dist/bundle/chunks/chunk-A7ICOL4V.js +0 -13
  555. package/dist/bundle/chunks/chunk-B6O2PIY4.js +0 -10
  556. package/dist/bundle/chunks/chunk-CR5AFCPT.js +0 -22
  557. package/dist/bundle/chunks/chunk-D4J545R4.js +0 -11
  558. package/dist/bundle/chunks/chunk-D6CWQ5DW.js +0 -5
  559. package/dist/bundle/chunks/chunk-EIZGF4BS.js +0 -8
  560. package/dist/bundle/chunks/chunk-F55TLFGB.js +0 -9
  561. package/dist/bundle/chunks/chunk-GXVXFKBA.js +0 -5
  562. package/dist/bundle/chunks/chunk-HDQ56CKY.js +0 -15
  563. package/dist/bundle/chunks/chunk-HWBSOZZR.js +0 -35
  564. package/dist/bundle/chunks/chunk-JVPRLUMK.js +0 -7
  565. package/dist/bundle/chunks/chunk-KMEYNNUA.js +0 -15
  566. package/dist/bundle/chunks/chunk-LWEGUNWT.js +0 -7
  567. package/dist/bundle/chunks/chunk-MDLLFABN.js +0 -4
  568. package/dist/bundle/chunks/chunk-MHTUABJP.js +0 -8
  569. package/dist/bundle/chunks/chunk-MYE6AGBJ.js +0 -16
  570. package/dist/bundle/chunks/chunk-NAERJDUW.js +0 -8
  571. package/dist/bundle/chunks/chunk-NYQYO467.js +0 -32
  572. package/dist/bundle/chunks/chunk-PP6PSHAB.js +0 -4
  573. package/dist/bundle/chunks/chunk-PYSFUGCK.js +0 -10
  574. package/dist/bundle/chunks/chunk-QCDB2VPH.js +0 -6
  575. package/dist/bundle/chunks/chunk-SDNKECQQ.js +0 -5
  576. package/dist/bundle/chunks/chunk-TLSUDHID.js +0 -6
  577. package/dist/bundle/chunks/chunk-TOMNU26N.js +0 -4
  578. package/dist/bundle/chunks/chunk-TXBZCHCQ.js +0 -5
  579. package/dist/bundle/chunks/chunk-UNYNJIFU.js +0 -139
  580. package/dist/bundle/chunks/chunk-VJFXDYWH.js +0 -10
  581. package/dist/bundle/chunks/chunk-VLGZJRPG.js +0 -16
  582. package/dist/bundle/chunks/chunk-VYOJP4TV.js +0 -13
  583. package/dist/bundle/chunks/chunk-WKFATFPP.js +0 -4
  584. package/dist/bundle/chunks/chunk-XHM67O4N.js +0 -1
  585. package/dist/bundle/chunks/chunk-XORM457F.js +0 -286
  586. package/dist/bundle/chunks/chunk-YCFVLTST.js +0 -12
  587. package/dist/bundle/chunks/chunk-YS3AZT3J.js +0 -8
  588. package/dist/bundle/chunks/chunk-Z7JVV2SM.js +0 -12
  589. package/dist/bundle/chunks/chunk-ZXL7TQLN.js +0 -62
  590. package/dist/bundle/chunks/column-WLPMMSTS.js +0 -1
  591. package/dist/bundle/chunks/comm-5SLSESQG.js +0 -1
  592. package/dist/bundle/chunks/cut-OPC3VAGB.js +0 -1
  593. package/dist/bundle/chunks/diff-HJF2MPDN.js +0 -1
  594. package/dist/bundle/chunks/env-5EPCWSXR.js +0 -1
  595. package/dist/bundle/chunks/expand-DTNXU4LQ.js +0 -1
  596. package/dist/bundle/chunks/find-TPUOAIUQ.js +0 -1
  597. package/dist/bundle/chunks/flag-coverage-LMTH7T5F.js +0 -1
  598. package/dist/bundle/chunks/fold-LDSORVYE.js +0 -1
  599. package/dist/bundle/chunks/grep-3AIAIJVR.js +0 -1
  600. package/dist/bundle/chunks/gzip-AQXSGOVS.js +0 -1
  601. package/dist/bundle/chunks/head-HT2B6D2J.js +0 -1
  602. package/dist/bundle/chunks/html-to-markdown-TFCECAGV.js +0 -1
  603. package/dist/bundle/chunks/join-GG2LDHE5.js +0 -1
  604. package/dist/bundle/chunks/jq-ODXZBPLY.js +0 -1
  605. package/dist/bundle/chunks/js-exec-OOPTBRNB.js +0 -96
  606. package/dist/bundle/chunks/md5sum-INMIK4DX.js +0 -1
  607. package/dist/bundle/chunks/nl-U5YJDM32.js +0 -1
  608. package/dist/bundle/chunks/od-VJEF2UR5.js +0 -1
  609. package/dist/bundle/chunks/paste-7N6AFSDS.js +0 -1
  610. package/dist/bundle/chunks/python3-5F2XPEW4.js +0 -11
  611. package/dist/bundle/chunks/rev-XOSYPP45.js +0 -1
  612. package/dist/bundle/chunks/rg-FOQSCCX3.js +0 -1
  613. package/dist/bundle/chunks/sed-VFTTATXJ.js +0 -1
  614. package/dist/bundle/chunks/sha1sum-VJPNLNU6.js +0 -1
  615. package/dist/bundle/chunks/sha256sum-PI32XWXY.js +0 -1
  616. package/dist/bundle/chunks/sort-DCNRDA7U.js +0 -1
  617. package/dist/bundle/chunks/split-SITCSYCZ.js +0 -1
  618. package/dist/bundle/chunks/sqlite3-56UMWEY3.js +0 -1
  619. package/dist/bundle/chunks/strings-7PLOGTPD.js +0 -1
  620. package/dist/bundle/chunks/tac-SJGXQ4T2.js +0 -1
  621. package/dist/bundle/chunks/tail-S5ULNTJU.js +0 -1
  622. package/dist/bundle/chunks/tar-232RCEFK.js +0 -1
  623. package/dist/bundle/chunks/tee-O7VXZDCO.js +0 -1
  624. package/dist/bundle/chunks/time-DEUO3QV2.js +0 -1
  625. package/dist/bundle/chunks/timeout-VRKMCG72.js +0 -1
  626. package/dist/bundle/chunks/tr-2HXZRDSW.js +0 -1
  627. package/dist/bundle/chunks/unexpand-RGTMIGZM.js +0 -1
  628. package/dist/bundle/chunks/uniq-SUNANL47.js +0 -1
  629. package/dist/bundle/chunks/wc-TQB3VNOX.js +0 -1
  630. package/dist/bundle/chunks/xan-BXDXYEIB.js +0 -1
  631. package/dist/bundle/chunks/xan-view-ECQUO7AJ.js +0 -1
  632. package/dist/bundle/chunks/xargs-I6EZUCYF.js +0 -1
  633. package/dist/bundle/chunks/yq-MJMAR36V.js +0 -1
  634. package/dist/commands/js-exec/executor-adapter.d.ts +0 -66
  635. package/dist/executor-init.d.ts +0 -10
  636. package/vendor/executor/executor-sdk-bundle.d.mts +0 -18
  637. package/vendor/executor/executor-sdk-bundle.mjs +0 -972
  638. /package/dist/bin/chunks/{chunk-QSDVMMYI.js → chunk-4CFAYBLV.js} +0 -0
  639. /package/dist/bin/chunks/{chunk-ND23BJUM.js → chunk-LCDPWJBA.js} +0 -0
  640. /package/dist/bin/shell/chunks/{chunk-QSDVMMYI.js → chunk-4CFAYBLV.js} +0 -0
  641. /package/dist/bin/shell/chunks/{chunk-ND23BJUM.js → chunk-LCDPWJBA.js} +0 -0
  642. /package/dist/bundle/chunks/{chunk-SYMJJMQ4.js → chunk-PXTK5WE2.js} +0 -0
@@ -1,12 +0,0 @@
1
- import{a as C,b as L}from"./chunk-BBXLRYSX.js";import{d as b}from"./chunk-7TSDKFEO.js";import{a as F,b as z}from"./chunk-24IMIIXA.js";import{a as J}from"./chunk-5QMZ5MUS.js";import{a as D}from"./chunk-7L36YK2X.js";import{k as $}from"./chunk-GFQRA5P5.js";import{a as E}from"./chunk-3THT3N7L.js";import{a as I,b as k,c as O}from"./chunk-74CEPOFO.js";function A(s){let r=[],t=0,l=s.length;for(;t<l;){for(;t<l&&/\s/.test(s[t]);)t++;if(t>=l)break;let u=t,n=s[t];if(n==="{"||n==="["){let i=n,a=n==="{"?"}":"]",c=1,p=!1,d=!1;for(t++;t<l&&c>0;){let h=s[t];d?d=!1:h==="\\"?d=!0:h==='"'?p=!p:p||(h===i?c++:h===a&&c--),t++}if(c!==0)throw new Error(`Unexpected end of JSON input at position ${t} (unclosed ${i})`);r.push(b(JSON.parse(s.slice(u,t))))}else if(n==='"'){let i=!1;for(t++;t<l;){let a=s[t];if(i)i=!1;else if(a==="\\")i=!0;else if(a==='"'){t++;break}t++}r.push(b(JSON.parse(s.slice(u,t))))}else if(n==="-"||n>="0"&&n<="9"){for(;t<l&&/[\d.eE+-]/.test(s[t]);)t++;r.push(b(JSON.parse(s.slice(u,t))))}else if(s.slice(t,t+4)==="true")r.push(!0),t+=4;else if(s.slice(t,t+5)==="false")r.push(!1),t+=5;else if(s.slice(t,t+4)==="null")r.push(null),t+=4;else{let i=s.slice(t,t+10);throw new Error(`Invalid JSON at position ${u}: unexpected '${i.split(/\s/)[0]}'`)}}return r}var W={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE]",options:["-r, --raw-output output strings without quotes","-c, --compact compact output (no pretty printing)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --help display this help and exit"]};function j(s,r,t,l,u,n=0){if(s===null||s===void 0)return"null";if(typeof s=="boolean")return String(s);if(typeof s=="number")return Number.isFinite(s)?String(s):"null";if(typeof s=="string")return t?s:JSON.stringify(s);let i=u?" ":" ";if(Array.isArray(s))return s.length===0?"[]":r?`[${s.map(c=>j(c,!0,!1,l,u)).join(",")}]`:`[
2
- ${s.map(c=>i.repeat(n+1)+j(c,!1,!1,l,u,n+1)).join(`,
3
- `)}
4
- ${i.repeat(n)}]`;if(typeof s=="object"){let a=Object.keys(s);return l&&(a=a.sort()),a.length===0?"{}":r?`{${a.map(p=>`${JSON.stringify(p)}:${j(s[p],!0,!1,l,u)}`).join(",")}}`:`{
5
- ${a.map(p=>{let d=j(s[p],!1,!1,l,u,n+1);return`${i.repeat(n+1)}${JSON.stringify(p)}: ${d}`}).join(`,
6
- `)}
7
- ${i.repeat(n)}}`}return String(s)}var Y={name:"jq",async execute(s,r){F(r.requireDefenseContext,"jq","execution entry");let t=(o,e)=>z(r.requireDefenseContext,"jq",o,e);if(k(s))return I(W);let l=!1,u=!1,n=!1,i=!1,a=!1,c=!1,p=!1,d=!1,h=".",N=!1,g=[];for(let o=0;o<s.length;o++){let e=s[o];if(e==="-r"||e==="--raw-output")l=!0;else if(e==="-c"||e==="--compact-output")u=!0;else if(e==="-e"||e==="--exit-status")n=!0;else if(e==="-s"||e==="--slurp")i=!0;else if(e==="-n"||e==="--null-input")a=!0;else if(e==="-j"||e==="--join-output")c=!0;else if(!(e==="-a"||e==="--ascii")){if(e==="-S"||e==="--sort-keys")p=!0;else if(!(e==="-C"||e==="--color")){if(!(e==="-M"||e==="--monochrome"))if(e==="--tab")d=!0;else if(e==="-")g.push("-");else{if(e.startsWith("--"))return O("jq",e);if(e.startsWith("-")){for(let f of e.slice(1))if(f==="r")l=!0;else if(f==="c")u=!0;else if(f==="e")n=!0;else if(f==="s")i=!0;else if(f==="n")a=!0;else if(f==="j")c=!0;else if(f!=="a"){if(f==="S")p=!0;else if(f!=="C"){if(f!=="M")return O("jq",`-${f}`)}}}else N?g.push(e):(h=e,N=!0)}}}}let y=[];if(!a)if(g.length===0||g.length===1&&g[0]==="-")y.push({source:"stdin",content:r.stdin});else{let o=await t("file read",()=>D(r,g,{cmdName:"jq",stopOnError:!0}));if(o.exitCode!==0)return{stdout:"",stderr:o.stderr,exitCode:2};y=o.files.map(e=>({source:e.filename||"stdin",content:e.content}))}try{let o=L(h),e=[],f={limits:r.limits?{maxIterations:r.limits.maxJqIterations}:void 0,env:r.env,coverage:r.coverage,requireDefenseContext:r.requireDefenseContext};if(a)e=C(null,o,f);else if(i){let m=[];for(let{content:x}of y){let q=x.trim();q&&m.push(...A(q))}e=C(m,o,f)}else for(let{content:m}of y){let x=m.trim();if(!x)continue;let q=A(x);for(let P of q)e.push(...C(P,o,f))}let M=e.map(m=>j(m,u,l,p,d)),V=c?"":`
8
- `,S=M.join(V),w=r.limits?.maxStringLength;if(w!==void 0&&w>0&&S.length>w)throw new $(`jq: output size limit exceeded (${w} bytes)`,"string_length");let H=n&&(e.length===0||e.every(m=>m==null||m===!1))?1:0;return{stdout:S?c?S:`${S}
9
- `:"",stderr:"",exitCode:H}}catch(o){if(o instanceof J)throw o;if(o instanceof $)return{stdout:"",stderr:`jq: ${E(o.message)}
10
- `,exitCode:$.EXIT_CODE};let e=E(o.message);return e.includes("Unknown function")?{stdout:"",stderr:`jq: error: ${e}
11
- `,exitCode:3}:{stdout:"",stderr:`jq: parse error: ${e}
12
- `,exitCode:5}}}},Z={name:"jq",flags:[{flag:"-r",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"--tab",type:"boolean"}],stdinType:"json",needsArgs:!0};export{Y as a,Z as b};
@@ -1,8 +0,0 @@
1
- import{a as x}from"./chunk-J642UCRS.js";import{a as q,b as Z}from"./chunk-VLGZJRPG.js";import{a as _,b as X,c as G}from"./chunk-74CEPOFO.js";var se={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",options:["-E, --extended-regexp PATTERN is an extended regular expression","-P, --perl-regexp PATTERN is a Perl regular expression","-F, --fixed-strings PATTERN is a set of newline-separated strings","-i, --ignore-case ignore case distinctions","-v, --invert-match select non-matching lines","-w, --word-regexp match only whole words","-x, --line-regexp match only whole lines","-c, --count print only a count of matching lines","-l, --files-with-matches print only names of files with matches","-L, --files-without-match print names of files with no matches","-m NUM, --max-count=NUM stop after NUM matches","-n, --line-number print line number with output lines","-h, --no-filename suppress the file name prefix on output","-o, --only-matching show only nonempty parts of lines that match","-q, --quiet, --silent suppress all normal output","-r, -R, --recursive search directories recursively","-A NUM print NUM lines of trailing context","-B NUM print NUM lines of leading context","-C NUM print NUM lines of context","-e PATTERN use PATTERN for matching"," --include=GLOB search only files matching GLOB"," --exclude=GLOB skip files matching GLOB"," --exclude-dir=DIR skip directories matching DIR"," --help display this help and exit"]},j={name:"grep",async execute(t,s){if(X(t))return _(se);let l=!1,f=!1,c=!1,p=!1,m=!1,a=!1,n=!1,u=!1,y=!1,w=!1,h=!1,d=!1,v=!1,P=!1,B=!1,$=0,T=0,C=0,W=[],A=[],L=[],R=null,I=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.startsWith("-")&&i!=="-"){if(i==="-e"&&r+1<t.length){R=t[++r];continue}if(i.startsWith("--include=")){W.push(i.slice(10));continue}if(i.startsWith("--exclude=")){A.push(i.slice(10));continue}if(i.startsWith("--exclude-dir=")){L.push(i.slice(14));continue}if(i.startsWith("--max-count=")){$=parseInt(i.slice(12),10);continue}let b=i.match(/^-m(\d+)$/);if(b){$=parseInt(b[1],10);continue}if(i==="-m"&&r+1<t.length){$=parseInt(t[++r],10);continue}let o=i.match(/^-([ABC])(\d+)$/);if(o){let e=parseInt(o[2],10);o[1]==="A"?C=e:o[1]==="B"?T=e:o[1]==="C"&&(T=e,C=e);continue}if((i==="-A"||i==="-B"||i==="-C")&&r+1<t.length){let e=parseInt(t[++r],10);i==="-A"?C=e:i==="-B"?T=e:(T=e,C=e);continue}let g=i.startsWith("--")?[i]:i.slice(1).split("");for(let e of g)if(e==="i"||e==="--ignore-case")l=!0;else if(e==="n"||e==="--line-number")f=!0;else if(e==="v"||e==="--invert-match")c=!0;else if(e==="c"||e==="--count")p=!0;else if(e==="l"||e==="--files-with-matches")m=!0;else if(e==="L"||e==="--files-without-match")a=!0;else if(e==="r"||e==="R"||e==="--recursive")n=!0;else if(e==="w"||e==="--word-regexp")u=!0;else if(e==="x"||e==="--line-regexp")y=!0;else if(e==="E"||e==="--extended-regexp")w=!0;else if(e==="P"||e==="--perl-regexp")h=!0;else if(e==="F"||e==="--fixed-strings")d=!0;else if(e==="o"||e==="--only-matching")v=!0;else if(e==="h"||e==="--no-filename")P=!0;else if(e==="q"||e==="--quiet"||e==="--silent")B=!0;else{if(e.startsWith("--"))return G("grep",e);if(e.length===1)return G("grep",`-${e}`)}}else R===null?R=i:I.push(i)}if(R===null)return{stdout:"",stderr:`grep: missing pattern
2
- `,exitCode:2};let V=d?"fixed":w?"extended":h?"perl":"basic",O,Q;try{let r=Z(R,{mode:V,ignoreCase:l,wholeWord:u,lineRegexp:y});O=r.regex,Q=r.kResetGroup}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${R}
3
- `,exitCode:2}}if(I.length===0&&s.stdin!==void 0){let r=q(s.stdin,O,{invertMatch:c,showLineNumbers:f,countOnly:p,filename:"",onlyMatching:v,beforeContext:T,afterContext:C,maxCount:$,kResetGroup:Q});return B?{stdout:"",stderr:"",exitCode:r.matched?0:1}:{stdout:r.output,stderr:"",exitCode:r.matched?0:1}}if(I.length===0)return{stdout:"",stderr:`grep: no input files
4
- `,exitCode:2};let M="",z="",S=!1,D=!1,F=[];for(let r of I)if(r.includes("*")||r.includes("?")||r.includes("[")){let i=await ne(r,s);if(n)for(let b of i){let o=await H(b.path,s,W,A,L,b.isFile);F.push(...o)}else F.push(...i)}else if(n){let i=await H(r,s,W,A,L);F.push(...i)}else F.push({path:r});let Y=(F.length>1||n)&&!P,k=50;for(let r=0;r<F.length;r+=k){let i=F.slice(r,r+k),b=await Promise.all(i.map(async o=>{let g=o.path,e=g.split("/").pop()||g;if(A.length>0&&!n&&A.some(N=>x(e,N,{stripQuotes:!0}))||W.length>0&&!n&&!W.some(N=>x(e,N,{stripQuotes:!0})))return null;try{let N=s.fs.resolvePath(s.cwd,g),U=!1;if(o.isFile===void 0?U=(await s.fs.stat(N)).isDirectory:U=!o.isFile,U)return n?null:{error:`grep: ${g}: Is a directory
5
- `};let ee=await s.fs.readFile(N),te=q(ee,O,{invertMatch:c,showLineNumbers:f,countOnly:p,filename:Y?g:"",onlyMatching:v,beforeContext:T,afterContext:C,maxCount:$,kResetGroup:Q});return{file:g,result:te}}catch{return{error:`grep: ${g}: No such file or directory
6
- `}}}));for(let o of b){if(o===null)continue;if("error"in o&&o.error){z+=o.error,o.error.includes("Is a directory")||(D=!0);continue}if(!("file"in o)||!o.result)continue;let{file:g,result:e}=o;if(e.matched){if(S=!0,B)return{stdout:"",stderr:"",exitCode:0};m?M+=`${g}
7
- `:a||(M+=e.output)}else a?M+=`${g}
8
- `:p&&!m&&(M+=e.output)}}let E;return D?E=2:a?E=M.length>0?0:1:E=S?0:1,B?{stdout:"",stderr:"",exitCode:E}:{stdout:M,stderr:z,exitCode:E}}},J=256;async function K(t,s,l,f,c=0){if(c>=J)return;let p=l.fs.resolvePath(l.cwd,t);try{if(!(await l.fs.stat(p)).isDirectory){let n=t.split("/").pop()||"";if(s){let u=s.replace(/^\//,"");x(n,u,{stripQuotes:!0})&&f.push(t)}return}let a=await l.fs.readdir(p);for(let n of a){let u=t==="."?n:`${t}/${n}`,y=l.fs.resolvePath(l.cwd,u);if((await l.fs.stat(y)).isDirectory)await K(u,s,l,f,c+1);else if(s){let h=s.replace(/^\//,"");x(n,h,{stripQuotes:!0})&&f.push(u)}}}catch{}}async function ne(t,s){let l=[],f=t.lastIndexOf("/"),c,p;if(f===-1?(c=s.cwd,p=t):(c=t.slice(0,f)||"/",p=t.slice(f+1)),t.includes("**")){let a=[],n=t.split("**"),u=n[0].replace(/\/$/,"")||".",y=n[1]||"";return await K(u,y,s,a),a.map(w=>({path:w}))}let m=s.fs.resolvePath(s.cwd,c);try{if(s.fs.readdirWithFileTypes){let a=await s.fs.readdirWithFileTypes(m);for(let n of a)if(x(n.name,p,{stripQuotes:!0})){let u=f===-1?n.name:`${c}/${n.name}`;l.push({path:u,isFile:n.isFile})}}else{let a=await s.fs.readdir(m);for(let n of a)if(x(n,p,{stripQuotes:!0})){let u=f===-1?n:`${c}/${n}`;l.push({path:u})}}}catch{}return l.sort((a,n)=>a.path.localeCompare(n.path))}async function H(t,s,l=[],f=[],c=[],p,m=0){if(m>=J)return[];let a=s.fs.resolvePath(s.cwd,t),n=[];try{let u,y;if(p!==void 0)u=p,y=!p;else{let h=await s.fs.stat(a);u=h.isFile,y=h.isDirectory}if(u){let h=t.split("/").pop()||t;return f.length>0&&f.some(d=>x(h,d,{stripQuotes:!0}))?[]:l.length>0&&!l.some(d=>x(h,d,{stripQuotes:!0}))?[]:[{path:t,isFile:!0}]}if(!y)return[];let w=t.split("/").pop()||t;if(c.length>0&&c.some(h=>x(w,h,{stripQuotes:!0})))return[];if(s.fs.readdirWithFileTypes){let h=await s.fs.readdirWithFileTypes(a);for(let d of h){if(d.name.startsWith("."))continue;let v=t==="."?d.name:`${t}/${d.name}`,P=await H(v,s,l,f,c,d.isFile,m+1);n.push(...P)}}else{let h=await s.fs.readdir(a);for(let d of h){if(d.startsWith("."))continue;let v=t==="."?d:`${t}/${d}`,P=await H(v,s,l,f,c,void 0,m+1);n.push(...P)}}}catch{}return n}var ae={name:"fgrep",async execute(t,s){return j.execute(["-F",...t],s)}},fe={name:"egrep",async execute(t,s){return j.execute(["-E",...t],s)}},ue={name:"grep",flags:[{flag:"-E",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-P",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-L",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-o",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-m",type:"value",valueHint:"number"},{flag:"-A",type:"value",valueHint:"number"},{flag:"-B",type:"value",valueHint:"number"},{flag:"-C",type:"value",valueHint:"number"},{flag:"-e",type:"value",valueHint:"pattern"}],stdinType:"text",needsArgs:!0},ce={name:"fgrep",flags:[],stdinType:"text",needsArgs:!0},pe={name:"egrep",flags:[],stdinType:"text",needsArgs:!0};export{j as a,ae as b,fe as c,ue as d,ce as e,pe as f};
@@ -1,12 +0,0 @@
1
- import{a as g,b as y,c as $}from"./chunk-74CEPOFO.js";var x={name:"comm",summary:"compare two sorted files line by line",usage:"comm [OPTION]... FILE1 FILE2",options:["-1 suppress column 1 (lines unique to FILE1)","-2 suppress column 2 (lines unique to FILE2)","-3 suppress column 3 (lines that appear in both files)"," --help display this help and exit"]},C={name:"comm",async execute(p,a){if(y(p))return g(x);let r=!1,l=!1,f=!1,i=[];for(let e of p)if(e==="-1")r=!0;else if(e==="-2")l=!0;else if(e==="-3")f=!0;else if(e==="-12"||e==="-21")r=!0,l=!0;else if(e==="-13"||e==="-31")r=!0,f=!0;else if(e==="-23"||e==="-32")l=!0,f=!0;else if(e==="-123"||e==="-132"||e==="-213"||e==="-231"||e==="-312"||e==="-321")r=!0,l=!0,f=!0;else{if(e.startsWith("-")&&e!=="-")return $("comm",e);i.push(e)}if(i.length!==2)return{stdout:"",stderr:`comm: missing operand
2
- Try 'comm --help' for more information.
3
- `,exitCode:1};let c=async e=>{if(e==="-")return a.stdin;try{let w=a.fs.resolvePath(a.cwd,e);return await a.fs.readFile(w)}catch{return null}},m=await c(i[0]);if(m===null)return{stdout:"",stderr:`comm: ${i[0]}: No such file or directory
4
- `,exitCode:1};let h=await c(i[1]);if(h===null)return{stdout:"",stderr:`comm: ${i[1]}: No such file or directory
5
- `,exitCode:1};let t=m.split(`
6
- `),s=h.split(`
7
- `);t.length>0&&t[t.length-1]===""&&t.pop(),s.length>0&&s[s.length-1]===""&&s.pop();let n=0,o=0,u="",d=r?"":" ",F=(r?"":" ")+(l?"":" ");for(;n<t.length||o<s.length;)n>=t.length?(l||(u+=`${d}${s[o]}
8
- `),o++):o>=s.length?(r||(u+=`${t[n]}
9
- `),n++):t[n]<s[o]?(r||(u+=`${t[n]}
10
- `),n++):t[n]>s[o]?(l||(u+=`${d}${s[o]}
11
- `),o++):(f||(u+=`${F}${t[n]}
12
- `),n++,o++);return{stdout:u,stderr:"",exitCode:0}}},I={name:"comm",flags:[{flag:"-1",type:"boolean"},{flag:"-2",type:"boolean"},{flag:"-3",type:"boolean"}],needsArgs:!0,minArgs:2};export{C as a,I as b};
@@ -1,62 +0,0 @@
1
- import{a as oe}from"./chunk-X2AJGDEF.js";import{b as G}from"./chunk-5QMZ5MUS.js";import{a as I}from"./chunk-YNYSPYQ5.js";import{a as se,b as ae,c as H}from"./chunk-74CEPOFO.js";import Ue from"compressjs";var j="file",ue="link",fe="symlink",Z="directory",Be={file:"0",link:"1",symlink:"2","character-device":"3","block-device":"4",directory:"5",fifo:"6","pax-header":"x","pax-global-header":"g","gnu-long-name":"L","gnu-long-link-name":"K"},Ne={0:j,1:ue,2:fe,3:"character-device",4:"block-device",5:Z,6:"fifo",x:"pax-header",g:"pax-global-header",L:"gnu-long-name",K:"gnu-long-link-name"},De=new Uint8Array(512),$=new Uint8Array(0),F=new TextEncoder,de=new TextDecoder;function v(e,t,n,r){r&&F.encodeInto(r,e.subarray(t,t+n))}function z(e,t,n,r){if(r===void 0)return;let i=r.toString(8).padStart(n-1,"0");F.encodeInto(i,e.subarray(t,t+n-1))}function C(e,t,n){let r=e.indexOf(0,t),i=r===-1||r>t+n?t+n:r;return de.decode(e.subarray(t,i))}function q(e,t,n){let r=0,i=t+n;for(let s=t;s<i;s++){let o=e[s];if(o===0)break;o!==32&&(r=r*8+(o-48))}return r}function R(e,t,n){if(e[t]&128){let r=0;r=e[t]&127;for(let i=1;i<n;i++)r=r*256+e[t+i];if(!Number.isSafeInteger(r))throw new Error("TAR number too large");return r}return q(e,t,n)}var b=e=>e.type===Z||e.type===fe||e.type===ue;async function me(e){if(e==null)return $;if(e instanceof Uint8Array)return e;if(typeof e=="string")return F.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw new TypeError("Unsupported content type for entry body.")}function pe(e,t){let{strip:n,filter:r,map:i}=t;if(!n&&!r&&!i)return e;let s={...e};if(n&&n>0){let a=s.name.split("/").filter(Boolean);if(n>=a.length)return null;let c=a.slice(n).join("/");if(s.name=s.type===Z&&!c.endsWith("/")?`${c}/`:c,s.linkname?.startsWith("/")){let l=s.linkname.split("/").filter(Boolean);s.linkname=n>=l.length?"/":`/${l.slice(n).join("/")}`}}if(r?.(s)===!1)return null;let o=i?i(s):s;return o&&(!o.name||!o.name.trim()||o.name==="."||o.name==="/")?null:o}var X=32,Le=48;function Pe(e){let t=q(e,148,8),n=0;for(let r=0;r<e.length;r++)r>=148&&r<156?n+=X:n+=e[r];return t===n}function Ke(e){e.fill(X,148,156);let t=0;for(let n of e)t+=n;for(let n=153;n>=148;n--)e[n]=(t&7)+Le,t>>=3;e[154]=0,e[155]=X}function Ge(e){let t={};e.name.length>100&&he(e.name)===null&&(t.path=e.name),e.linkname&&e.linkname.length>100&&(t.linkpath=e.linkname),e.uname&&e.uname.length>32&&(t.uname=e.uname),e.gname&&e.gname.length>32&&(t.gname=e.gname),e.uid!=null&&e.uid>2097151&&(t.uid=String(e.uid)),e.gid!=null&&e.gid>2097151&&(t.gid=String(e.gid)),e.size!=null&&e.size>8589934591&&(t.size=String(e.size)),e.pax&&Object.assign(t,e.pax);let n=Object.entries(t);if(n.length===0)return null;let r=F.encode(n.map(([i,s])=>{let o=`${i}=${s}
2
- `,a=F.encode(o).length+1,c=a+String(a).length;return c=a+String(c).length,`${c} ${o}`}).join(""));return{paxHeader:ge({name:de.decode(F.encode(`PaxHeader/${e.name}`).slice(0,100)),size:r.length,type:"pax-header",mode:420,mtime:e.mtime,uname:e.uname,gname:e.gname,uid:e.uid,gid:e.gid}),paxBody:r}}function he(e){if(e.length<=100)return null;let t=e.length-100-1,n=e.lastIndexOf("/",155);return n>0&&n>=t?{prefix:e.slice(0,n),name:e.slice(n+1)}:null}function ge(e){let t=new Uint8Array(512),n=b(e)?0:e.size??0,r=e.name,i="";if(!e.pax?.path){let s=he(r);s&&(r=s.name,i=s.prefix)}return v(t,0,100,r),z(t,100,8,e.mode??(e.type===Z?493:420)),z(t,108,8,e.uid??0),z(t,116,8,e.gid??0),z(t,124,12,n),z(t,136,12,Math.floor((e.mtime?.getTime()??Date.now())/1e3)),v(t,156,1,Be[e.type??j]),v(t,157,100,e.linkname),v(t,257,6,"ustar\0"),v(t,263,2,"00"),v(t,265,32,e.uname),v(t,297,32,e.gname),v(t,345,155,i),Ke(t),t}function He(e,t){if(t&&!Pe(e))throw new Error("Invalid tar header checksum.");let n=C(e,156,1),r={name:C(e,0,100),mode:q(e,100,8),uid:R(e,108,8),gid:R(e,116,8),size:R(e,124,12),mtime:new Date(R(e,136,12)*1e3),type:Ne[n]||j,linkname:C(e,157,100)},i=C(e,257,6);return i.trim()==="ustar"&&(r.uname=C(e,265,32),r.gname=C(e,297,32)),i==="ustar"&&(r.prefix=C(e,345,155)),r}var We={path:["name",e=>e],linkpath:["linkname",e=>e],size:["size",e=>parseInt(e,10)],mtime:["mtime",parseFloat],uid:["uid",e=>parseInt(e,10)],gid:["gid",e=>parseInt(e,10)],uname:["uname",e=>e],gname:["gname",e=>e]};function Xe(e){let t=new TextDecoder("utf-8"),n={},r={},i=0;for(;i<e.length;){let s=e.indexOf(32,i);if(s===-1)break;let o=parseInt(t.decode(e.subarray(i,s)),10);if(Number.isNaN(o)||o===0)break;let a=i+o,[c,l]=t.decode(e.subarray(s+1,a-1)).split("=",2);if(c&&l!==void 0){r[c]=l;let f=We[c];if(f){let[u,g]=f,p=g(l);(typeof p=="string"||!Number.isNaN(p))&&(n[u]=p)}}i=a}return Object.keys(r).length>0&&(n.pax=r),n}function ce(e,t){t.name!==void 0&&(e.name=t.name),t.linkname!==void 0&&(e.linkname=t.linkname),t.size!==void 0&&(e.size=t.size),t.mtime!==void 0&&(e.mtime=new Date(t.mtime*1e3)),t.uid!==void 0&&(e.uid=t.uid),t.gid!==void 0&&(e.gid=t.gid),t.uname!==void 0&&(e.uname=t.uname),t.gname!==void 0&&(e.gname=t.gname),t.pax&&(e.pax=Object.assign({},e.pax??{},t.pax))}function je(e){switch(e){case"pax-global-header":case"pax-header":return Xe;case"gnu-long-name":return t=>({name:C(t,0,t.length)});case"gnu-long-link-name":return t=>({linkname:C(t,0,t.length)});default:return}}function qe(e){let t=ge(e),n=Ge(e);if(!n)return[t];let r=-n.paxBody.length&511,i=r>0?[De.subarray(0,r)]:[];return[n.paxHeader,n.paxBody,...i,t]}var Ye=new Uint8Array(512*2);function Se(e,t,n){let r=null,i=0,s=!1;return{add(o){if(s){let a=new Error("No new tar entries after finalize.");throw t(a),a}if(r!==null){let a=new Error("Previous entry must be completed before adding a new one");throw t(a),a}try{let a=b(o)?0:o.size??0,c=qe({...o,size:a});for(let l of c)e(l);r={...o,size:a},i=0}catch(a){t(a)}},write(o){if(!r){let c=new Error("No active tar entry.");throw t(c),c}if(s){let c=new Error("Cannot write data after finalize.");throw t(c),c}let a=i+o.length;if(a>r.size){let c=new Error(`"${r.name}" exceeds given size of ${r.size} bytes.`);throw t(c),c}try{i=a,e(o)}catch(c){t(c)}},endEntry(){if(!r){let o=new Error("No active entry to end.");throw t(o),o}if(s){let o=new Error("Cannot end entry after finalize.");throw t(o),o}try{if(i!==r.size){let a=new Error(`Size mismatch for "${r.name}".`);throw t(a),a}let o=-r.size&511;o>0&&e(new Uint8Array(o)),r=null,i=0}catch(o){throw t(o),o}},finalize(){if(s){let o=new Error("Archive has already been finalized");throw t(o),o}if(r!==null){let o=new Error("Cannot finalize while an entry is still active");throw t(o),o}try{e(Ye),s=!0,n&&n()}catch(o){t(o)}}}}var O=256;function Ve(){let e=new Array(O),t=e.length-1,n=0,r=0,i=0,s=a=>{let c=e[n];a===c.length?(e[n]=$,n=n+1&t):e[n]=c.subarray(a),i-=a,i===0&&e.length>O&&(e=new Array(O),t=O-1,n=0,r=0)};function o(a,c){if(c){let p=0,d=Math.min(a,i);for(;d>0;){let h=e[n],m=Math.min(d,h.length),E=m===h.length?h:h.subarray(0,m);if(s(m),d-=m,p+=m,!c(E))break}return p}if(i<a)return null;if(a===0)return $;let l=e[n];if(l.length>=a){let p=l.length===a?l:l.subarray(0,a);return s(a),p}let f=new Uint8Array(a),u=0,g=a;for(;g>0;){let p=e[n],d=Math.min(g,p.length);f.set(d===p.length?p:p.subarray(0,d),u),u+=d,g-=d,s(d)}return f}return{push:a=>{if(a.length===0)return;let c=r+1&t;if(c===n){let l=e.length,f=l*2,u=new Array(f),g=r-n+l&l-1;if(n<r)for(let p=0;p<g;p++)u[p]=e[n+p];else if(g>0){let p=l-n;for(let d=0;d<p;d++)u[d]=e[n+d];for(let d=0;d<r;d++)u[p+d]=e[d]}e=u,t=f-1,n=0,r=g,c=r+1&t}e[r]=a,r=c,i+=a.length},available:()=>i,peek:a=>{if(i<a)return null;if(a===0)return $;let c=e[n];if(c.length>=a)return c.length===a?c:c.subarray(0,a);let l=new Uint8Array(a),f=0,u=n;for(;f<a;){let g=e[u],p=Math.min(a-f,g.length);p===g.length?l.set(g,f):l.set(g.subarray(0,p),f),f+=p,u=u+1&t}return l},discard:a=>{if(a>i)throw new Error("Too many bytes consumed");if(a===0)return;let c=a;for(;c>0;){let l=e[n],f=Math.min(c,l.length);s(f),c-=f}},pull:o}}var W=0,k=1,M=new Error("Tar archive is truncated.");function Ee(e={}){let t=e.strict??!1,{available:n,peek:r,push:i,discard:s,pull:o}=Ve(),a=W,c=!1,l=!1,f=!1,u=null,g={},p={},d={isEntryActive:()=>a===k,isBodyComplete:()=>!u||u.remaining===0,write(h){if(c)throw new Error("Archive already ended.");i(h)},end(){c=!0},readHeader(){if(a!==W)throw new Error("Cannot read header while an entry is active");if(!l)for(;!l;){if(n()<512){if(c){if(n()>0&&t)throw M;l=!0;return}return null}let h=r(512);if(le(h)){if(n()<512*2){if(c){if(t)throw M;l=!0;return}return null}if(le(r(512*2).subarray(512))){s(512*2),l=!0,f=!0;return}if(t)throw new Error("Invalid tar header.");s(512);continue}let m;try{m=He(h,t)}catch(A){if(t)throw A;s(512);continue}let E=je(m.type);if(E){let A=m.size+511&-512;if(n()<512+A){if(c&&t)throw M;return null}s(512);let w=E(o(A).subarray(0,m.size)),_=m.type==="pax-global-header"?g:p;for(let T in w)_[T]=w[T];continue}s(512);let S=m;return m.prefix&&(S.name=`${m.prefix}/${S.name}`),ce(S,g),ce(S,p),p={},u={header:S,remaining:S.size,padding:-S.size&511},a=k,S}},streamBody(h){if(a!==k||!u||u.remaining===0)return 0;let m=Math.min(u.remaining,n());if(m===0)return 0;let E=o(m,h);return u.remaining-=E,E},skipPadding(){if(a!==k||!u)return!0;if(u.remaining>0)throw new Error("Body not fully consumed");return n()<u.padding?!1:(s(u.padding),u=null,a=W,!0)},skipEntry(){if(a!==k||!u)return!0;let h=Math.min(u.remaining,n());return h>0&&(s(h),u.remaining-=h),u.remaining>0?!1:d.skipPadding()},validateEOF(){if(t){if(!f)throw M;if(n()>0&&o(n()).some(h=>h!==0))throw new Error("Invalid EOF.")}}};return d}function le(e){if(e.byteOffset%8===0){let t=new BigUint64Array(e.buffer,e.byteOffset,e.length/8);for(let n=0;n<t.length;n++)if(t[n]!==0n)return!1;return!0}for(let t=0;t<e.length;t++)if(e[t]!==0)return!1;return!0}function we(){return new CompressionStream("gzip")}function Ae(){return new DecompressionStream("gzip")}function Je(){let e,t;return{readable:new ReadableStream({start(n){e=n,t=Se(n.enqueue.bind(n),n.error.bind(n),n.close.bind(n))}}),controller:{add(n){let r=b(n),i={...n};return r&&(i.size=0),t.add(i),r&&t.endEntry(),new WritableStream({write(s){t.write(s)},close(){r||t.endEntry()},abort(s){e.error(s)}})},finalize(){t.finalize()},error(n){e.error(n)}}}}async function _e(e){let t=[],n=e.getReader(),r=0;try{for(;;){let{done:o,value:a}=await n.read();if(o)break;t.push(a),r+=a.length}let i=new Uint8Array(r),s=0;for(let o of t)i.set(o,s),s+=o.length;return i}finally{n.releaseLock()}}var ye=e=>e.pipeTo(new WritableStream);function Qe(e={}){let t=Ee(e),n=null,r=!1,i=s=>{if(!r){r=!0;try{for(;;)if(t.isEntryActive()){if(n){if(t.streamBody(o=>(n.enqueue(o),!0))===0&&!t.isBodyComplete())break}else if(!t.skipEntry())break;if(t.isBodyComplete()){try{n?.close()}catch{}if(n=null,!t.skipPadding())break}}else{let o=t.readHeader();if(o==null)break;s.enqueue({header:o,body:new ReadableStream({start(a){o.size===0?a.close():n=a},pull:()=>i(s),cancel(){n=null,i(s)}})})}}catch(o){try{n?.error(o)}catch{}throw n=null,o}finally{r=!1}}};return new TransformStream({transform(s,o){try{t.write(s),i(o)}catch(a){try{n?.error(a)}catch{}throw a}},flush(s){try{if(t.end(),i(s),t.validateEOF(),t.isEntryActive()&&!t.isBodyComplete())try{n?.close()}catch{}}catch(o){try{n?.error(o)}catch{}throw o}}},void 0,{highWaterMark:1})}async function Te(e){let{readable:t,controller:n}=Je();return await(async()=>{for(let r of e){let i=n.add(r.header),s="body"in r?r.body:r.data;if(!s){await i.close();continue}if(s instanceof ReadableStream)await s.pipeTo(i);else if(s instanceof Blob)await s.stream().pipeTo(i);else try{let o=await me(s);if(o.length>0){let a=i.getWriter();await a.write(o),await a.close()}else await i.close()}catch{throw new TypeError(`Unsupported content type for entry "${r.header.name}".`)}}})().then(()=>n.finalize()).catch(r=>n.error(r)),new Uint8Array(await _e(t))}async function Ce(e,t={}){let n=e instanceof ReadableStream?e:new ReadableStream({start(s){s.enqueue(e instanceof Uint8Array?e:new Uint8Array(e)),s.close()}}),r=[],i=n.pipeThrough(Qe(t));for await(let s of i){let o;try{o=pe(s.header,t)}catch(a){throw await s.body.cancel(),a}if(o===null){await ye(s.body);continue}b(o)?(await ye(s.body),r.push({header:o})):r.push({header:o,data:await _e(s.body)})}return r}var B=null,N=null;async function Ie(){if(B)return B;if(N)throw N;try{return B=await G.runTrustedAsync(()=>import("node-liblzma")),B}catch{throw N=new Error("xz compression requires node-liblzma which failed to load. Install liblzma-dev (apt) or xz (brew) and reinstall dependencies."),N}}var D=null,L=null;async function Fe(){if(D)return D;if(L)throw L;try{return D=await G.runTrustedAsync(()=>import("@mongodb-js/zstd")),D}catch{throw L=new Error("zstd compression requires @mongodb-js/zstd which is not installed. Install it with: npm install @mongodb-js/zstd"),L}}var y=100*1024*1024,xe=512,ve=1e4;function et(e){let t="file";e.isDirectory?t="directory":e.isSymlink&&(t="symlink");let n=e.name;e.isDirectory&&!n.endsWith("/")&&(n+="/");let r;e.content!==void 0&&(typeof e.content=="string"?r=new TextEncoder().encode(e.content):r=e.content);let i=e.isDirectory||e.isSymlink?0:r?.length??0;return{header:{name:n,mode:e.mode??(e.isDirectory?493:420),uid:e.uid??0,gid:e.gid??0,size:i,mtime:e.mtime??new Date,type:t,linkname:e.linkTarget??"",uname:"user",gname:"user"},body:r}}async function U(e){let t=e.map(et);return Te(t)}async function ze(e){let t=await U(e),i=new ReadableStream({start(l){l.enqueue(t),l.close()}}).pipeThrough(we()).getReader(),s=[];for(;;){let{done:l,value:f}=await i.read();if(l)break;s.push(f)}let o=s.reduce((l,f)=>l+f.length,0),a=new Uint8Array(o),c=0;for(let l of s)a.set(l,c),c+=l.length;return a}async function x(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};if(e.length<xe||e.length%xe!==0)return{entries:[],error:"Invalid tar archive format"};try{let t=await Ce(e),n=[];for(let r of t){if(n.length>=ve)return{entries:n,error:`Too many entries (max ${ve})`};let i="file";switch(r.header.type){case"directory":i="directory";break;case"symlink":i="symlink";break;case"link":i="hardlink";break;case"file":i="file";break;default:i="other"}n.push({name:r.header.name,mode:r.header.mode??420,uid:r.header.uid??0,gid:r.header.gid??0,size:r.header.size,mtime:r.header.mtime??new Date,type:i,linkTarget:r.header.linkname||void 0,content:r.data??new Uint8Array(0)})}return{entries:n}}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:n}}}async function Y(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let r=new ReadableStream({start(c){c.enqueue(e),c.close()}}).pipeThrough(Ae()).getReader(),i=[],s=0;for(;;){let{done:c,value:l}=await r.read();if(c)break;if(s+=l.length,s>y)return await r.cancel(),{entries:[],error:`Decompressed archive too large (max ${y} bytes)`};i.push(l)}let o=new Uint8Array(s),a=0;for(let c of i)o.set(c,a),a+=c.length;return x(o)}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:`Decompression failed: ${n}`}}}function V(e){return e.length>=2&&e[0]===31&&e[1]===139}function J(e){return e.length>=3&&e[0]===66&&e[1]===90&&e[2]===104}function Q(e){return e.length>=6&&e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0}async function tt(e){let n=Ue.Bzip2.decompressFile(Array.from(e));return new Uint8Array(n)}async function rt(e){let t=Ue.Bzip2,n=[];return t.compressFile(Array.from(e),n,9),new Uint8Array(n)}async function nt(e){let n=(await Ie()).unxzSync(Buffer.from(e));return new Uint8Array(n)}async function it(e){let n=(await Ie()).xzSync(Buffer.from(e));return new Uint8Array(n)}async function ke(e){let t=await U(e);return rt(t)}async function be(e,t){if(!t?.allowNativeCodecs)throw new Error("xz compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.");let n=await U(e);return it(n)}async function ee(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let t=await tt(e);return t.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:x(t)}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:n}}}async function te(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:"xz decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction."};if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let n=await nt(e);return n.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:x(n)}catch(n){let r=n instanceof Error?n.message:"Unknown error";return{entries:[],error:r}}}function re(e){return e.length>=4&&e[0]===40&&e[1]===181&&e[2]===47&&e[3]===253}async function st(e){let n=await(await Fe()).compress(Buffer.from(e),3);return new Uint8Array(n)}async function at(e){let n=await(await Fe()).decompress(Buffer.from(e));return new Uint8Array(n)}async function Re(e,t){if(!t?.allowNativeCodecs)throw new Error("zstd compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.");let n=await U(e);return st(n)}async function ne(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:"zstd decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction."};if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let n=await at(e);return n.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:x(n)}catch(n){let r=n instanceof Error?n.message:"Unknown error";return{entries:[],error:r}}}function Oe(e){let t={create:!1,append:!1,update:!1,extract:!1,list:!1,file:"",autoCompress:!1,gzip:!1,bzip2:!1,xz:!1,zstd:!1,verbose:!1,toStdout:!1,keepOldFiles:!1,touch:!1,directory:"",preserve:!1,absoluteNames:!1,strip:0,exclude:[],filesFrom:"",excludeFrom:"",wildcards:!1},n=[],r=0;for(;r<e.length;){let i=e[r];if(i.startsWith("-")&&!i.startsWith("--")&&i.length>2){if(/^-\d+$/.test(i)){n.push(i),r++;continue}for(let s=1;s<i.length;s++){let o=i[s];switch(o){case"c":t.create=!0;break;case"r":t.append=!0;break;case"u":t.update=!0;break;case"x":t.extract=!0;break;case"t":t.list=!0;break;case"a":t.autoCompress=!0;break;case"z":t.gzip=!0;break;case"j":t.bzip2=!0;break;case"J":t.xz=!0;break;case"v":t.verbose=!0;break;case"O":t.toStdout=!0;break;case"k":t.keepOldFiles=!0;break;case"m":t.touch=!0;break;case"p":t.preserve=!0;break;case"P":t.absoluteNames=!0;break;case"f":if(s<i.length-1)t.file=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'f'
3
- `,exitCode:2}};t.file=e[r]}break;case"C":if(s<i.length-1)t.directory=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'C'
4
- `,exitCode:2}};t.directory=e[r]}break;case"T":if(s<i.length-1)t.filesFrom=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'T'
5
- `,exitCode:2}};t.filesFrom=e[r]}break;case"X":if(s<i.length-1)t.excludeFrom=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'X'
6
- `,exitCode:2}};t.excludeFrom=e[r]}break;default:return{ok:!1,error:H("tar",`-${o}`)}}}r++;continue}if(i==="-c"||i==="--create")t.create=!0;else if(i==="-r"||i==="--append")t.append=!0;else if(i==="-u"||i==="--update")t.update=!0;else if(i==="-x"||i==="--extract"||i==="--get")t.extract=!0;else if(i==="-t"||i==="--list")t.list=!0;else if(i==="-a"||i==="--auto-compress")t.autoCompress=!0;else if(i==="-z"||i==="--gzip"||i==="--gunzip")t.gzip=!0;else if(i==="-j"||i==="--bzip2")t.bzip2=!0;else if(i==="-J"||i==="--xz")t.xz=!0;else if(i==="--zstd")t.zstd=!0;else if(i==="-v"||i==="--verbose")t.verbose=!0;else if(i==="-O"||i==="--to-stdout")t.toStdout=!0;else if(i==="-k"||i==="--keep-old-files")t.keepOldFiles=!0;else if(i==="-m"||i==="--touch")t.touch=!0;else if(i==="--wildcards")t.wildcards=!0;else if(i==="-p"||i==="--preserve"||i==="--preserve-permissions")t.preserve=!0;else if(i==="-P"||i==="--absolute-names")t.absoluteNames=!0;else if(i==="-f"||i==="--file"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'f'
7
- `,exitCode:2}};t.file=e[r]}else if(i.startsWith("--file="))t.file=i.substring(7);else if(i==="-C"||i==="--directory"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'C'
8
- `,exitCode:2}};t.directory=e[r]}else if(i.startsWith("--directory="))t.directory=i.substring(12);else if(i.startsWith("--strip-components=")||i.startsWith("--strip=")){let s=i.includes("--strip-components=")?i.substring(19):i.substring(8),o=parseInt(s,10);if(Number.isNaN(o)||o<0)return{ok:!1,error:{stdout:"",stderr:`tar: invalid number for --strip: '${s}'
9
- `,exitCode:2}};t.strip=o}else if(i.startsWith("--exclude="))t.exclude.push(i.substring(10));else if(i==="--exclude"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option '--exclude' requires an argument
10
- `,exitCode:2}};t.exclude.push(e[r])}else if(i==="-T"||i==="--files-from"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'T'
11
- `,exitCode:2}};t.filesFrom=e[r]}else if(i.startsWith("--files-from="))t.filesFrom=i.substring(13);else if(i==="-X"||i==="--exclude-from"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'X'
12
- `,exitCode:2}};t.excludeFrom=e[r]}else if(i.startsWith("--exclude-from="))t.excludeFrom=i.substring(15);else if(i==="--"){n.push(...e.slice(r+1));break}else{if(i.startsWith("-"))return{ok:!1,error:H("tar",i)};n.push(i)}r++}return{ok:!0,options:t,files:n}}var Me=100,ot={name:"tar",summary:"manipulate tape archives",usage:"tar [options] [file...]",description:["Create, extract, or list contents of tar archives.","","One of -c, -r, -u, -x, or -t is required to specify the operation."],options:["-c, --create create a new archive","-r, --append append files to the end of an archive","-u, --update only append files newer than copy in archive","-x, --extract extract files from an archive","-t, --list list contents of an archive","-f, --file=ARCHIVE use archive file ARCHIVE","-a, --auto-compress use archive suffix to determine compression","-z, --gzip filter archive through gzip","-j, --bzip2 filter archive through bzip2","-J, --xz filter archive through xz","--zstd filter archive through zstd","-v, --verbose verbosely list files processed","-O, --to-stdout extract files to standard output","-k, --keep-old-files don't replace existing files when extracting","-m, --touch don't extract file modified time","-C, --directory=DIR change to directory DIR before performing operations","-p, --preserve preserve permissions","-P, --absolute-names do not strip leading '/' or block '..' paths","-T, --files-from=FILE read files to extract/create from FILE","-X, --exclude-from=FILE read exclude patterns from FILE","--strip=N strip N leading path components on extraction","--exclude=PATTERN exclude files matching PATTERN","--wildcards use wildcards for pattern matching"," --help display this help and exit"],examples:["tar -cvf archive.tar file1 file2 Create archive from files","tar -czvf archive.tar.gz dir/ Create gzip-compressed archive","tar -cjvf archive.tar.bz2 dir/ Create bzip2-compressed archive","tar -rf archive.tar newfile.txt Append file to archive","tar -uf archive.tar dir/ Update archive with newer files","tar -xvf archive.tar Extract archive","tar -xvf archive.tar -C /tmp Extract to /tmp","tar -tvf archive.tar List archive contents","tar -xzf archive.tar.gz Extract gzip archive","tar -xf archive.tar file1.txt Extract specific file","tar -xOf archive.tar file.txt Extract file to stdout","tar -xf archive.tar --wildcards '*.txt' Extract matching files"]};function ie(e,t){let n=e.includes("/")?e.substring(e.lastIndexOf("/")+1):e;for(let r of t){let i=r.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"<<<GLOBSTAR>>>").replace(/\*/g,"[^/]*").replace(/<<<GLOBSTAR>>>/g,".*").replace(/\?/g,".");if(I(`^${i}$`).test(e)||I(`^${i}/`).test(e)||!r.includes("/")&&I(`^${i}$`).test(n))return!0}return!1}function P(e,t){let n=t.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"<<<GLOBSTAR>>>").replace(/\*/g,"[^/]*").replace(/<<<GLOBSTAR>>>/g,".*").replace(/\?/g,"."),r=e.includes("/")?e.substring(e.lastIndexOf("/")+1):e;return I(`^${n}$`).test(e)||I(`^${n}$`).test(r)}function $e(e,t){if(t<=0)return e;let n=e.split("/").filter(r=>r!=="");return n.length<=t?"":n.slice(t).join("/")}function Ze(e){return e.split("/").some(t=>t==="..")}function ct(e,t){if(t)return{safePath:e};let n=e.replace(/^\/+/,"");return n.length===0?{safePath:""}:Ze(n)?{error:"Path contains '..'"}:{safePath:n}}function lt(e){let n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()],r=e.getDate().toString().padStart(2," "),i=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0");return`${n} ${r} ${i}:${s}`}async function K(e,t,n,r){let i=[],s=[],o=e.fs.resolvePath(t,n);try{let a=await e.fs.stat(o);if(ie(n,r))return{entries:i,errors:s};if(a.isDirectory){i.push({name:n,isDirectory:!0,mode:a.mode,mtime:a.mtime});let c=await e.fs.readdir(o);for(let l=0;l<c.length;l+=Me){let f=c.slice(l,l+Me),u=await Promise.all(f.map(g=>K(e,t,n?`${n}/${g}`:g,r)));for(let g of u)i.push(...g.entries),s.push(...g.errors)}}else if(a.isFile){let c=await e.fs.readFileBuffer(o);i.push({name:n,content:c,mode:a.mode,mtime:a.mtime})}else if(a.isSymbolicLink){let c=await e.fs.readlink(o);i.push({name:n,isSymlink:!0,linkTarget:c,mode:a.mode,mtime:a.mtime})}}catch(a){let c=a instanceof Error?a.message:"unknown error";s.push(`tar: ${n}: ${c}`)}return{entries:i,errors:s}}async function ut(e,t,n){if(n.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to create an empty archive
13
- `,exitCode:2};let r=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,i=[],s=[],o="";for(let f of n){let{entries:u,errors:g}=await K(e,r,f,t.exclude);if(i.push(...u),s.push(...g),t.verbose)for(let p of u)o+=`${p.name}${p.isDirectory?"/":""}
14
- `}if(i.length===0&&s.length>0)return{stdout:"",stderr:`${s.join(`
15
- `)}
16
- `,exitCode:2};let a;try{t.gzip?a=await ze(i):t.bzip2?a=await ke(i):t.xz?a=await be(i):t.zstd?a=await Re(i):a=await U(i)}catch(f){return{stdout:"",stderr:`tar: error creating archive: ${f instanceof Error?f.message:"unknown error"}
17
- `,exitCode:2}}let c="";if(t.file&&t.file!=="-"){let f=e.fs.resolvePath(e.cwd,t.file);try{await e.fs.writeFile(f,a)}catch(u){let g=u instanceof Error?u.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${g}
18
- `,exitCode:2}}}else c=Buffer.from(a).toString("latin1");let l=o;return s.length>0&&(l+=`${s.join(`
19
- `)}
20
- `),{stdout:c,stderr:l,exitCode:s.length>0?2:0}}async function ft(e,t,n){if(!t.file||t.file==="-")return{stdout:"",stderr:`tar: Cannot append to stdin/stdout
21
- `,exitCode:2};if(n.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to append nothing to archive
22
- `,exitCode:2};let r=e.fs.resolvePath(e.cwd,t.file),i;try{i=await e.fs.readFileBuffer(r)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
23
- `,exitCode:2}}let s=await x(i);if(s.error)return{stdout:"",stderr:`tar: ${s.error}
24
- `,exitCode:2};let o=s.entries.map(d=>({name:d.name,content:d.content,mode:d.mode,mtime:d.mtime,isDirectory:d.type==="directory",isSymlink:d.type==="symlink",linkTarget:d.linkTarget,uid:d.uid,gid:d.gid})),a=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,c=[],l=[],f="";for(let d of n){let{entries:h,errors:m}=await K(e,a,d,t.exclude);if(c.push(...h),l.push(...m),t.verbose)for(let E of h)f+=`${E.name}${E.isDirectory?"/":""}
25
- `}let u=[...o,...c],g;try{g=await U(u)}catch(d){return{stdout:"",stderr:`tar: error creating archive: ${d instanceof Error?d.message:"unknown error"}
26
- `,exitCode:2}}try{await e.fs.writeFile(r,g)}catch(d){let h=d instanceof Error?d.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${h}
27
- `,exitCode:2}}let p=f;return l.length>0&&(p+=`${l.join(`
28
- `)}
29
- `),{stdout:"",stderr:p,exitCode:l.length>0?2:0}}async function dt(e,t,n){if(!t.file||t.file==="-")return{stdout:"",stderr:`tar: Cannot update stdin/stdout
30
- `,exitCode:2};if(n.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to update with nothing
31
- `,exitCode:2};let r=e.fs.resolvePath(e.cwd,t.file),i;try{i=await e.fs.readFileBuffer(r)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
32
- `,exitCode:2}}let s=await x(i);if(s.error)return{stdout:"",stderr:`tar: ${s.error}
33
- `,exitCode:2};let o=new Map;for(let m of s.entries)o.set(m.name,m.mtime);let a=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,c=[],l=[],f="";for(let m of n){let{entries:E,errors:S}=await K(e,a,m,t.exclude);l.push(...S);for(let A of E){let w=o.get(A.name);(!w||A.mtime&&A.mtime.getTime()>w.getTime())&&(c.push(A),t.verbose&&(f+=`${A.name}${A.isDirectory?"/":""}
34
- `))}}if(c.length===0){let m="";return l.length>0&&(m=`${l.join(`
35
- `)}
36
- `),{stdout:"",stderr:m,exitCode:l.length>0?2:0}}let u=new Set(c.map(m=>m.name)),p=[...s.entries.filter(m=>!u.has(m.name)).map(m=>({name:m.name,content:m.content,mode:m.mode,mtime:m.mtime,isDirectory:m.type==="directory",isSymlink:m.type==="symlink",linkTarget:m.linkTarget,uid:m.uid,gid:m.gid})),...c],d;try{d=await U(p)}catch(m){return{stdout:"",stderr:`tar: error creating archive: ${m instanceof Error?m.message:"unknown error"}
37
- `,exitCode:2}}try{await e.fs.writeFile(r,d)}catch(m){let E=m instanceof Error?m.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${E}
38
- `,exitCode:2}}let h=f;return l.length>0&&(h+=`${l.join(`
39
- `)}
40
- `),{stdout:"",stderr:h,exitCode:l.length>0?2:0}}async function mt(e,t,n){let r;if(t.file&&t.file!=="-"){let h=e.fs.resolvePath(e.cwd,t.file);try{r=await e.fs.readFileBuffer(h)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
41
- `,exitCode:2}}}else r=Uint8Array.from(e.stdin,h=>h.charCodeAt(0));let i,s=t.gzip||V(r),o=t.bzip2||J(r),a=t.xz||Q(r),c=t.zstd||re(r);if(s?i=await Y(r):o?i=await ee(r):a?i=await te(r):c?i=await ne(r):i=await x(r),i.error)return{stdout:"",stderr:`tar: ${i.error}
42
- `,exitCode:2};let l=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,f=t.absoluteNames?n:n.map(h=>h.replace(/^\/+/,"")).filter(h=>h.length>0),u="",g="",p=[];if(t.directory&&!t.toStdout)try{await e.fs.mkdir(l,{recursive:!0})}catch{}for(let h of i.entries){let m=$e(h.name,t.strip);if(!m)continue;let E=ct(m,t.absoluteNames);if(E.error){p.push(`tar: ${m}: ${E.error}`);continue}let S=E.safePath??"";if(!S)continue;let A=S.endsWith("/")?S.slice(0,-1):S;if(f.length>0){let _;if(t.wildcards?_=f.some(T=>P(S,T)||P(A,T)||S.startsWith(`${T}/`)):_=f.some(T=>S===T||S.startsWith(`${T}/`)||A===T),!_)continue}if(ie(S,t.exclude))continue;let w=e.fs.resolvePath(l,S);try{if(h.type==="directory"){if(t.toStdout)continue;await e.fs.mkdir(w,{recursive:!0}),t.verbose&&(u+=`${S}
43
- `)}else if(h.type==="file"){if(t.toStdout){g+=new TextDecoder().decode(h.content),t.verbose&&(u+=`${S}
44
- `);continue}if(t.keepOldFiles)try{await e.fs.stat(w),t.verbose&&(u+=`${S}: not overwritten, file exists
45
- `);continue}catch{}let _=w.substring(0,w.lastIndexOf("/"));if(_)try{await e.fs.mkdir(_,{recursive:!0})}catch{}if(await e.fs.writeFile(w,h.content),t.preserve&&h.mode)try{await e.fs.chmod(w,h.mode)}catch{}t.verbose&&(u+=`${S}
46
- `)}else if(h.type==="symlink"&&h.linkTarget){if(t.toStdout)continue;if(!t.absoluteNames&&(h.linkTarget.startsWith("/")||Ze(h.linkTarget))){p.push(`tar: ${S}: unsafe symlink target`);continue}if(t.keepOldFiles)try{await e.fs.stat(w),t.verbose&&(u+=`${S}: not overwritten, file exists
47
- `);continue}catch{}let _=w.substring(0,w.lastIndexOf("/"));if(_)try{await e.fs.mkdir(_,{recursive:!0})}catch{}try{await e.fs.symlink(h.linkTarget,w)}catch{}t.verbose&&(u+=`${S}
48
- `)}}catch(_){let T=_ instanceof Error?_.message:"unknown error";p.push(`tar: ${S}: ${T}`)}}let d=u;return p.length>0&&(d+=`${p.join(`
49
- `)}
50
- `),{stdout:g,stderr:d,exitCode:p.length>0?2:0}}async function pt(e,t,n){let r;if(t.file&&t.file!=="-"){let f=e.fs.resolvePath(e.cwd,t.file);try{r=await e.fs.readFileBuffer(f)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
51
- `,exitCode:2}}}else r=Uint8Array.from(e.stdin,f=>f.charCodeAt(0));let i,s=t.gzip||V(r),o=t.bzip2||J(r),a=t.xz||Q(r),c=t.zstd||re(r);if(s?i=await Y(r):o?i=await ee(r):a?i=await te(r):c?i=await ne(r):i=await x(r),i.error)return{stdout:"",stderr:`tar: ${i.error}
52
- `,exitCode:2};let l="";for(let f of i.entries){let u=$e(f.name,t.strip);if(!u)continue;let g=u.endsWith("/")?u.slice(0,-1):u;if(n.length>0){let p;if(t.wildcards?p=n.some(d=>P(u,d)||P(g,d)||u.startsWith(`${d}/`)):p=n.some(d=>u===d||u.startsWith(`${d}/`)||g===d),!p)continue}if(!ie(u,t.exclude))if(t.verbose){let p=f.type==="directory",d=oe(f.mode,p),h=`${f.uid}/${f.gid}`,m=f.size.toString().padStart(8," "),E=lt(f.mtime),S=`${d} ${h.padEnd(10)} ${m} ${E} ${u}`;f.type==="symlink"&&f.linkTarget&&(S+=` -> ${f.linkTarget}`),l+=`${S}
53
- `}else l+=`${u}
54
- `}return{stdout:l,stderr:"",exitCode:0}}var Ft={name:"tar",async execute(e,t){if(ae(e))return se(ot);let n=Oe(e);if(!n.ok)return n.error;let{options:r,files:i}=n,s=[r.create,r.append,r.update,r.extract,r.list].filter(Boolean).length;if(s===0)return{stdout:"",stderr:`tar: You must specify one of -c, -r, -u, -x, or -t
55
- `,exitCode:2};if(s>1)return{stdout:"",stderr:`tar: You may not specify more than one of -c, -r, -u, -x, or -t
56
- `,exitCode:2};if(r.autoCompress&&r.file&&r.create){let c=r.file.toLowerCase();c.endsWith(".tar.gz")||c.endsWith(".tgz")?r.gzip=!0:c.endsWith(".tar.bz2")||c.endsWith(".tbz2")?r.bzip2=!0:c.endsWith(".tar.xz")||c.endsWith(".txz")?r.xz=!0:(c.endsWith(".tar.zst")||c.endsWith(".tzst"))&&(r.zstd=!0)}let o=[r.gzip,r.bzip2,r.xz,r.zstd].filter(Boolean).length;if(o>1)return{stdout:"",stderr:`tar: You may not specify more than one compression option
57
- `,exitCode:2};if((r.append||r.update)&&o>0)return{stdout:"",stderr:`tar: Cannot append/update compressed archives - decompress first
58
- `,exitCode:2};let a=i;if(r.filesFrom){let c=t.fs.resolvePath(t.cwd,r.filesFrom);try{let f=(await t.fs.readFile(c)).split(`
59
- `).map(u=>u.trim()).filter(u=>u.length>0&&!u.startsWith("#"));a=[...i,...f]}catch{return{stdout:"",stderr:`tar: ${r.filesFrom}: Cannot open: No such file or directory
60
- `,exitCode:2}}}if(r.excludeFrom){let c=t.fs.resolvePath(t.cwd,r.excludeFrom);try{let f=(await t.fs.readFile(c)).split(`
61
- `).map(u=>u.trim()).filter(u=>u.length>0&&!u.startsWith("#"));r.exclude.push(...f)}catch{return{stdout:"",stderr:`tar: ${r.excludeFrom}: Cannot open: No such file or directory
62
- `,exitCode:2}}}return r.create?ut(t,r,a):r.append?ft(t,r,a):r.update?dt(t,r,a):r.extract?mt(t,r,a):pt(t,r,a)}},zt={name:"tar",flags:[{flag:"-c",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-f",type:"value",valueHint:"path"},{flag:"-z",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-C",type:"value",valueHint:"path"},{flag:"--strip-components",type:"value",valueHint:"number"},{flag:"--exclude",type:"value",valueHint:"pattern"}],needsArgs:!0};export{Ft as a,zt as b};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-LWEGUNWT.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as column,b as flagsForFuzzing};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-Z7JVV2SM.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as commCommand,b as flagsForFuzzing};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-SDNKECQQ.js";import"./chunk-7L36YK2X.js";import"./chunk-NUFRM6SI.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as cutCommand,b as flagsForFuzzing};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-TLSUDHID.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as diffCommand,b as flagsForFuzzing};
@@ -1 +0,0 @@
1
- import{a,b,c,d}from"./chunk-NAERJDUW.js";import"./chunk-OJDRYQWQ.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as envCommand,c as flagsForFuzzing,b as printenvCommand,d as printenvFlagsForFuzzing};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-VJFXDYWH.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as expand,b as flagsForFuzzing};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-LPQPILI2.js";import"./chunk-X2AJGDEF.js";import"./chunk-J642UCRS.js";import"./chunk-IPJHKYVM.js";import"./chunk-YNYSPYQ5.js";import"./chunk-EEXR5ZDP.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as findCommand,b as flagsForFuzzing};
@@ -1 +0,0 @@
1
- import{b as yr}from"./chunk-ZXL7TQLN.js";import{b as Ar}from"./chunk-XORM457F.js";import{b as $r}from"./chunk-UNYNJIFU.js";import"./chunk-F55TLFGB.js";import"./chunk-SYMJJMQ4.js";import{c as Sr}from"./chunk-HWBSOZZR.js";import{b as wr}from"./chunk-MDLLFABN.js";import{b as xr}from"./chunk-MLXIYONF.js";import{b as vr}from"./chunk-A65PWWJC.js";import{b as kr}from"./chunk-MHTUABJP.js";import{b as qr}from"./chunk-4HHKTUW3.js";import{b as Cr}from"./chunk-HJQJAYMS.js";import{b as br}from"./chunk-PP6PSHAB.js";import{d as Ir,e as Mr,f as jr}from"./chunk-LTZRCH7N.js";import{b as tr}from"./chunk-YTNYSM6T.js";import{b as lr}from"./chunk-Z6LRHWXI.js";import{b as ur}from"./chunk-A7A2DBEE.js";import{b as pr}from"./chunk-YFG2CMIF.js";import{b as er}from"./chunk-APT7OOP2.js";import{b as dr}from"./chunk-XKQRETAK.js";import{b as cr}from"./chunk-5V6VZH6T.js";import"./chunk-EIZGF4BS.js";import{b as hr}from"./chunk-CR5AFCPT.js";import{c as or,d as ar}from"./chunk-R6QSAL5T.js";import{b as sr}from"./chunk-LL3S3NLB.js";import{c as ir,d as gr}from"./chunk-D6CWQ5DW.js";import{b as mr}from"./chunk-YCFVLTST.js";import"./chunk-BBXLRYSX.js";import{b as Fr}from"./chunk-QJ7O6ZN3.js";import{b as zr}from"./chunk-TLSUDHID.js";import{b as fr}from"./chunk-D7MEQ3VN.js";import{b as nr}from"./chunk-GOV5EKKI.js";import"./chunk-3ZUFRYJ4.js";import{b as R}from"./chunk-ALLTKNUZ.js";import{b as U}from"./chunk-4Q4SM6WR.js";import{b as V}from"./chunk-XVDPCNWR.js";import{b as W}from"./chunk-RPNGRAAP.js";import{c as X,d as Y}from"./chunk-NAERJDUW.js";import{c as Z,d as _}from"./chunk-VOBGTVA6.js";import{b as N}from"./chunk-NCNPKYJZ.js";import{b as rr}from"./chunk-TOMNU26N.js";import{b as G}from"./chunk-VJFXDYWH.js";import{b as H}from"./chunk-PYSFUGCK.js";import{b as J}from"./chunk-VYOJP4TV.js";import{b as K}from"./chunk-MYE6AGBJ.js";import{b as L}from"./chunk-LWEGUNWT.js";import{b as O}from"./chunk-A7ICOL4V.js";import{b as P}from"./chunk-55VFSPNA.js";import{b as Q}from"./chunk-LPQPILI2.js";import{b as y}from"./chunk-WKFATFPP.js";import{b as A}from"./chunk-Z7JVV2SM.js";import{b as $}from"./chunk-SDNKECQQ.js";import{b as S}from"./chunk-JVPRLUMK.js";import{b as T}from"./chunk-62RKD26F.js";import{b as B}from"./chunk-QCDB2VPH.js";import{b as D}from"./chunk-F23WWYKW.js";import{b as E}from"./chunk-D4J545R4.js";import{b as w}from"./chunk-DCAAORBQ.js";import{b as x}from"./chunk-GXVXFKBA.js";import{b as v}from"./chunk-5QVNJEHU.js";import"./chunk-X2AJGDEF.js";import{d as k,e as q,f as C}from"./chunk-YS3AZT3J.js";import"./chunk-J642UCRS.js";import{b}from"./chunk-NYQYO467.js";import"./chunk-7TSDKFEO.js";import"./chunk-VLGZJRPG.js";import{b as I}from"./chunk-OL3S66CO.js";import{b as M}from"./chunk-OARHFVLG.js";import{b as j}from"./chunk-KMEYNNUA.js";import{b as t}from"./chunk-MIZPJHVH.js";import{b as l}from"./chunk-NUYSJFDK.js";import{b as u}from"./chunk-A4JSPFCI.js";import{b as p}from"./chunk-PBXLG62G.js";import{b as e}from"./chunk-4GTNDTRF.js";import{b as d}from"./chunk-A4HU7SVR.js";import{b as c}from"./chunk-HJWBQKYG.js";import{b as h}from"./chunk-64BAICW3.js";import"./chunk-HDQ56CKY.js";import"./chunk-CWQS3NFK.js";import"./chunk-A5O5YHGN.js";import"./chunk-IPJHKYVM.js";import"./chunk-OJDRYQWQ.js";import"./chunk-24IMIIXA.js";import"./chunk-5QMZ5MUS.js";import"./chunk-YNYSPYQ5.js";import{b as i}from"./chunk-GCTKCWKD.js";import{b as g}from"./chunk-TXBZCHCQ.js";import"./chunk-7L36YK2X.js";import{b as m}from"./chunk-T56QNPHK.js";import"./chunk-EEXR5ZDP.js";import"./chunk-GFQRA5P5.js";import{b as F}from"./chunk-V7TAPXDL.js";import"./chunk-NUFRM6SI.js";import{b as z}from"./chunk-MDDMCKUK.js";import"./chunk-3THT3N7L.js";import{b as f}from"./chunk-OCS6LSEM.js";import"./chunk-HWKDQ44K.js";import{b as n}from"./chunk-OCLXQMOG.js";import"./chunk-44UOCSGV.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var Er=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,I,M,j,y,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,ir,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,Ir,Mr,jr,yr,Ar,$r,Sr];function Tr(){return Er}var Br=new Map;for(let r of Tr())Br.set(r.name,new Set(r.flags.map(o=>o.flag)));function Fa(r,o,Dr){let a=Br.get(o);if(!(!a||a.size===0))for(let s of Dr)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{Fa as emitFlagCoverage};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-D4J545R4.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as fold};
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f}from"./chunk-YS3AZT3J.js";import"./chunk-J642UCRS.js";import"./chunk-VLGZJRPG.js";import"./chunk-YNYSPYQ5.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{c as egrepCommand,f as egrepFlagsForFuzzing,b as fgrepCommand,e as fgrepFlagsForFuzzing,d as flagsForFuzzing,a as grepCommand};
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f}from"./chunk-LTZRCH7N.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{d as flagsForFuzzing,b as gunzipCommand,e as gunzipFlagsForFuzzing,a as gzipCommand,c as zcatCommand,f as zcatFlagsForFuzzing};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-64BAICW3.js";import"./chunk-HDQ56CKY.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as headCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-MDLLFABN.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as htmlToMarkdownCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-A7ICOL4V.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as join};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-YCFVLTST.js";import"./chunk-BBXLRYSX.js";import"./chunk-7TSDKFEO.js";import"./chunk-OJDRYQWQ.js";import"./chunk-24IMIIXA.js";import"./chunk-5QMZ5MUS.js";import"./chunk-YNYSPYQ5.js";import"./chunk-7L36YK2X.js";import"./chunk-GFQRA5P5.js";import"./chunk-NUFRM6SI.js";import"./chunk-3THT3N7L.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as jqCommand};
@@ -1,96 +0,0 @@
1
- import{a as F,b as P}from"./chunk-B6O2PIY4.js";import"./chunk-XHM67O4N.js";import"./chunk-CWQS3NFK.js";import{a as v,b as T}from"./chunk-A5O5YHGN.js";import"./chunk-IPJHKYVM.js";import{a as M}from"./chunk-OJDRYQWQ.js";import{b as B}from"./chunk-5QMZ5MUS.js";import{a as O,b as S}from"./chunk-3THT3N7L.js";import{a as E}from"./chunk-44UOCSGV.js";import{b as L}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";import{AsyncLocalStorage as N}from"node:async_hooks";import{randomBytes as q}from"node:crypto";import{fileURLToPath as D}from"node:url";import{Worker as z}from"node:worker_threads";var _=1e4,I=6e4,W=new N,J=`js-exec - Sandboxed JavaScript/TypeScript runtime with Node.js-compatible APIs
2
-
3
- Usage: js-exec [OPTIONS] [-c CODE | FILE] [ARGS...]
4
-
5
- Options:
6
- -c CODE Execute inline code
7
- -m, --module Enable ES module mode (import/export)
8
- --strip-types Strip TypeScript type annotations
9
- --version, -V Show version
10
- --help Show this help
11
-
12
- Examples:
13
- js-exec -c "console.log(1 + 2)"
14
- js-exec script.js
15
- js-exec app.ts
16
- echo 'console.log("hello")' | js-exec
17
-
18
- File Extension Auto-Detection:
19
- .js script mode (module mode if top-level await detected)
20
- .mjs ES module mode
21
- .ts, .mts ES module mode + TypeScript stripping
22
-
23
- Node.js Compatibility:
24
- Code written for Node.js largely works here. Both require and import
25
- are supported, the node: prefix works, and standard globals like process,
26
- console, and fetch are available. All I/O is synchronous.
27
-
28
- Available modules:
29
- fs, path, child_process, process, console,
30
- os, url, assert, util, events, buffer, stream,
31
- string_decoder, querystring
32
-
33
- fs (global, require('fs'), or import from 'node:fs'):
34
- readFileSync, writeFileSync, appendFileSync, copyFileSync, renameSync
35
- readdirSync, mkdirSync, rmSync, unlinkSync, rmdirSync
36
- statSync, lstatSync, existsSync, realpathSync, chmodSync
37
- symlinkSync, readlinkSync, readFileBuffer
38
- fs.promises.readFile, fs.promises.writeFile, fs.promises.access, ...
39
-
40
- path: join, resolve, dirname, basename, extname, normalize,
41
- relative, isAbsolute, parse, format, sep, delimiter
42
-
43
- child_process:
44
- execSync(cmd) throws on non-zero exit, returns stdout
45
- spawnSync(cmd, args) returns { stdout, stderr, status }
46
-
47
- process (also global): argv, cwd(), exit(), env, platform, arch,
48
- version, versions
49
-
50
- os: platform(), arch(), homedir(), tmpdir(), type(), hostname(),
51
- EOL, cpus(), endianness()
52
-
53
- url: URL, URLSearchParams, parse(), format()
54
-
55
- assert: ok(), equal(), strictEqual(), deepEqual(), throws(),
56
- doesNotThrow(), fail()
57
-
58
- util: format(), inspect(), promisify(), types, inherits()
59
-
60
- events: EventEmitter (on, once, emit, off, removeListener, ...)
61
-
62
- buffer: Buffer.from(), Buffer.alloc(), Buffer.concat(),
63
- Buffer.isBuffer(), toString(), slice(), equals()
64
-
65
- stream: Readable, Writable, Duplex, Transform, PassThrough, pipeline
66
-
67
- string_decoder: StringDecoder (write, end)
68
-
69
- querystring: parse(), stringify(), escape(), unescape()
70
-
71
- Other Globals:
72
- console log (stdout), error/warn (stderr)
73
- fetch(url, opts) HTTP; returns Promise<Response> (Web Fetch API)
74
- URL, URLSearchParams, Headers, Request, Response
75
- Buffer Buffer.from(), Buffer.alloc(), etc.
76
-
77
- Not Available:
78
- http, https, net, tls, crypto, zlib, dns, cluster, worker_threads,
79
- vm, v8, readline, and other Node.js built-in modules that require
80
- native bindings. Use fetch() for HTTP requests.
81
-
82
- Limits:
83
- Memory: 64 MB per execution
84
- Timeout: 10 s (60 s with network; configurable via maxJsTimeoutMs)
85
- Engine: QuickJS (compiled to WebAssembly)
86
- `;function $(t){let e={code:null,scriptFile:null,showVersion:!1,scriptArgs:[],isModule:!1,stripTypes:!1};if(t.length===0)return e;for(let r=0;r<t.length;r++){let s=t[r];if(s==="-m"||s==="--module"){e.isModule=!0;continue}if(s==="--strip-types"){e.stripTypes=!0;continue}if(s==="-c")return r+1>=t.length?{stdout:"",stderr:`js-exec: option requires an argument -- 'c'
87
- `,exitCode:2}:(e.code=t[r+1],e.scriptArgs=t.slice(r+2),e);if(s==="--version"||s==="-V")return e.showVersion=!0,e;if(s.startsWith("-")&&s!=="-"&&s!=="--")return{stdout:"",stderr:`js-exec: unrecognized option '${s}'
88
- `,exitCode:2};if(s==="--")return r+1<t.length&&(e.scriptFile=t[r+1],e.scriptArgs=t.slice(r+2)),e;if(!s.startsWith("-"))return e.scriptFile=s,e.scriptArgs=t.slice(r+1),e}return e}var i=null,j=null,l=[],o=null,V=D(new URL("./worker.js",import.meta.url));function h(){for(;l.length>0&&l[0].canceled;)l.shift();if(o||l.length===0)return;let t=l.shift();if(!t)return;o=t,G().postMessage(o.input)}function Q(t,e){if(!t||typeof t!="object")return{success:!1,error:"Malformed worker response"};let r=t;return typeof r.protocolToken!="string"||r.protocolToken!==e?{success:!1,error:"Malformed worker response: invalid protocol token"}:typeof r.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:r.success?{success:!0}:{success:!1,error:typeof r.error=="string"&&r.error.length>0?r.error:"Worker execution failed"}}function G(){if(j&&(T(j),j=null),i)return i;let t=B.runTrusted(()=>new z(V));return i=t,t.on("message",e=>{if(i===t){if(o){let r=Q(e,o.input.protocolToken);o.resolve(r),o=null}l.length>0?h():K()}}),t.on("error",e=>{if(i===t){if(o){let r=S(E(e));o.resolve({success:!1,error:r}),o=null}for(let r of l)r.resolve({success:!1,error:"Worker crashed"});l.length=0,i=null}}),t.on("exit",()=>{i===t&&(i=null,o&&(o.resolve({success:!1,error:"Worker exited unexpectedly"}),o=null),l.length>0&&h())}),t}function K(){j=v(()=>{i&&!o&&l.length===0&&(i.terminate(),i=null)},5e3)}async function X(t,e,r,s=[],n,u,a){return W.getStore()?{stdout:"",stderr:`js-exec: recursive invocation is not supported
89
- `,exitCode:1}:Y(t,e,r,s,n,u,a)}async function Y(t,e,r,s=[],n,u,a){let y=F(),p=e.exec,x=p?(d,R)=>W.run(!0,()=>p(d,R)):void 0,b=new P(y,e.fs,e.cwd,"js-exec",e.fetch,e.limits?.maxOutputSize??0,x,e.executorInvokeTool),m=e.limits?.maxJsTimeoutMs??_,w=e.fetch?Math.max(m,I):m,c={protocolToken:q(16).toString("hex"),sharedBuffer:y,jsCode:t,cwd:e.cwd,env:M(e.env),args:s,scriptPath:r,bootstrapCode:n,isModule:u,stripTypes:a,timeoutMs:w,hasExecutorTools:e.executorInvokeTool!==void 0},A,U=new Promise(d=>{A=d}),g={input:c,resolve:()=>{}},H=v(()=>{if(o===g){let d=i;d&&(i=null,d.terminate()),o=null,h()}else g.canceled=!0,o||h();g.resolve({success:!1,error:`Execution timeout: exceeded ${w}ms limit`})},w);g.resolve=d=>{T(H),A(d)},l.push(g),h();let[k,C]=await Promise.all([b.run(w),U.catch(d=>({success:!1,error:S(E(d))}))]);return!C.success&&C.error?{stdout:k.stdout,stderr:`${k.stderr}js-exec: ${S(C.error)}
90
- `,exitCode:k.exitCode||1}:k}async function de(t,e,r){if(W.getStore())return{result:null,error:"js-exec: recursive invocation is not supported"};let s=F(),n=new P(s,e.fs,e.cwd,"js-exec",e.fetch,e.limits?.maxOutputSize??0,void 0,r),u=e.limits?.maxJsTimeoutMs??_,a=e.fetch?Math.max(u,I):u,p={protocolToken:q(16).toString("hex"),sharedBuffer:s,jsCode:t,cwd:e.cwd,env:M(e.env),args:[],executorMode:!0,timeoutMs:a},x,b=new Promise(c=>{x=c}),m={input:p,resolve:()=>{}},w=v(()=>{if(o===m){let c=i;c&&(i=null,c.terminate()),o=null,h()}else m.canceled=!0,o||h();m.resolve({success:!1,error:`Execution timeout: exceeded ${a}ms limit`})},a);m.resolve=c=>{T(w),x(c)},l.push(m),h();let[,f]=await Promise.all([n.run(a),b.catch(c=>({success:!1,error:S(E(c))}))]);if("executorResult"in f&&f.executorResult!==void 0){let c;try{c=JSON.parse(f.executorResult)}catch{c=f.executorResult}return{result:c,logs:f.executorLogs}}return{result:null,error:f.error||"Unknown execution error",logs:"executorLogs"in f?f.executorLogs:void 0}}var fe={name:"js-exec",async execute(t,e){if(L(t))return{stdout:J,stderr:"",exitCode:0};let r=$(t);if("exitCode"in r)return r;if(r.showVersion)return{stdout:`QuickJS (quickjs-emscripten)
91
- `,stderr:"",exitCode:0};let s,n;if(r.code!==null)s=r.code,n="-c";else if(r.scriptFile!==null){let p=e.fs.resolvePath(e.cwd,r.scriptFile);if(!await e.fs.exists(p))return{stdout:"",stderr:`js-exec: can't open file '${r.scriptFile}': No such file or directory
92
- `,exitCode:2};try{s=await e.fs.readFile(p),n=p}catch(x){return{stdout:"",stderr:`js-exec: can't open file '${r.scriptFile}': ${O(x.message)}
93
- `,exitCode:2}}}else if(e.stdin.trim())s=e.stdin,n="<stdin>";else return{stdout:"",stderr:`js-exec: no input provided (use -c CODE or provide a script file)
94
- `,exitCode:2};let u=r.isModule,a=r.stripTypes;n&&n!=="-c"&&n!=="<stdin>"&&((n.endsWith(".mjs")||n.endsWith(".mts")||n.endsWith(".ts"))&&(u=!0),(n.endsWith(".ts")||n.endsWith(".mts"))&&(a=!0)),!u&&/\bawait\s+[\w([`]/.test(s)&&(u=!0);let y=e.jsBootstrapCode;return X(s,e,n,r.scriptArgs,y,u,a)}},pe={name:"node",async execute(){return{stdout:"",stderr:`node: this sandbox uses js-exec instead of node
95
-
96
- ${J}`,exitCode:1}}};export{de as executeForExecutor,fe as jsExecCommand,pe as nodeStubCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-APT7OOP2.js";import"./chunk-EIZGF4BS.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as md5sumCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-F23WWYKW.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as nl};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-PP6PSHAB.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as od};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-JVPRLUMK.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as pasteCommand};
@@ -1,11 +0,0 @@
1
- import{a as _,b as O}from"./chunk-B6O2PIY4.js";import"./chunk-XHM67O4N.js";import"./chunk-CWQS3NFK.js";import{a as v,b as T}from"./chunk-A5O5YHGN.js";import"./chunk-IPJHKYVM.js";import{a as D}from"./chunk-OJDRYQWQ.js";import{c as y}from"./chunk-24IMIIXA.js";import{b as C}from"./chunk-5QMZ5MUS.js";import{a as M,b as c}from"./chunk-3THT3N7L.js";import{a as E}from"./chunk-44UOCSGV.js";import{a as b,b as P}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";import{randomBytes as $}from"node:crypto";import{fileURLToPath as Q}from"node:url";import{Worker as R}from"node:worker_threads";var U=1e4,H=6e4,I={name:"python3",summary:"Execute Python code via CPython Emscripten",usage:"python3 [OPTIONS] [-c CODE | -m MODULE | FILE] [ARGS...]",description:["Execute Python code using CPython compiled to WebAssembly via Emscripten.","","This command runs Python in an isolated environment with access to","the virtual filesystem. Standard library modules are available."],options:["-c CODE Execute CODE as Python script","-m MODULE Run library module as a script","--version Show Python version","--help Show this help"],examples:['python3 -c "print(1 + 2)"','python3 -c "import sys; print(sys.version)"',"python3 script.py","python3 script.py arg1 arg2",`echo 'print("hello")' | python3`],notes:["CPython runs in WebAssembly, so execution may be slower than native Python.","Standard library modules are available (no pip install).","Maximum execution time is 30 seconds by default."]};function L(r){let e={code:null,module:null,scriptFile:null,showVersion:!1,scriptArgs:[]};if(r.length===0)return e;let t=r.findIndex(o=>!o.startsWith("-")||o==="-"||o==="--");for(let o=0;o<(t===-1?r.length:t);o++){let s=r[o];if(s==="-c")return o+1>=r.length?{stdout:"",stderr:`python3: option requires an argument -- 'c'
2
- `,exitCode:2}:(e.code=r[o+1],e.scriptArgs=r.slice(o+2),e);if(s==="-m")return o+1>=r.length?{stdout:"",stderr:`python3: option requires an argument -- 'm'
3
- `,exitCode:2}:(e.module=r[o+1],e.scriptArgs=r.slice(o+2),e);if(s==="--version"||s==="-V")return e.showVersion=!0,e;if(s.startsWith("-")&&s!=="-")return{stdout:"",stderr:`python3: unrecognized option '${s}'
4
- `,exitCode:2}}if(t!==-1){let o=r[t];o==="--"?t+1<r.length&&(e.scriptFile=r[t+1],e.scriptArgs=r.slice(t+2)):(e.scriptFile=o,e.scriptArgs=r.slice(t+1))}return e}var k=new WeakMap;function z(r){let e=k.get(r);return e||(e={executionQueue:[],isExecuting:!1},k.set(r,e)),e}function ie(){k=new WeakMap}var N=Q(new URL("./worker.js",import.meta.url));function B(){return $(16).toString("hex")}function V(r,e){if(!r||typeof r!="object")return{success:!1,error:"Malformed worker response"};let t=r;return typeof t.protocolToken!="string"||t.protocolToken!==e?{success:!1,error:"Malformed worker response: invalid protocol token"}:t.type==="security-violation"?{success:!1,error:`Security violation: ${typeof t.violation?.type=="string"?t.violation.type:"unknown"}`}:typeof t.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:t.success?{success:!0}:{success:!1,error:typeof t.error=="string"&&t.error.length>0?t.error:"Worker execution failed"}}function a(r){if(r.isExecuting||r.executionQueue.length===0)return;for(;r.executionQueue.length>0&&r.executionQueue[0].canceled;)r.executionQueue.shift();if(r.executionQueue.length===0)return;let e=r.executionQueue.shift();if(!e)return;r.isExecuting=!0;let t;try{t=C.runTrusted(()=>new R(N,{workerData:e.input}))}catch(n){let i=n instanceof Error?n.message:String(n);e.resolve({success:!1,error:c(i)}),r.isExecuting=!1,a(r);return}e.workerRef&&(e.workerRef.current=t);let o=y(e.requireDefenseContext,"python3","worker message callback",n=>{e.resolve(V(n,e.input.protocolToken)),r.isExecuting=!1,t.terminate(),a(r)}),s=y(e.requireDefenseContext,"python3","worker error callback",n=>{let i=c(E(n));e.resolve({success:!1,error:i}),r.isExecuting=!1,a(r)}),p=y(e.requireDefenseContext,"python3","worker exit callback",()=>{r.isExecuting&&(e.resolve({success:!1,error:"Worker exited unexpectedly"}),r.isExecuting=!1,a(r))}),f=n=>{try{o(n)}catch(i){let m=i instanceof Error?i.message:String(i);e.resolve({success:!1,error:c(m)}),r.isExecuting=!1,t.terminate(),a(r)}},l=n=>{try{s(n)}catch(i){let m=i instanceof Error?i.message:String(i);e.resolve({success:!1,error:c(m)}),r.isExecuting=!1,a(r)}},g=()=>{try{p()}catch(n){let i=n instanceof Error?n.message:String(n);e.resolve({success:!1,error:c(i)}),r.isExecuting=!1,a(r)}};t.on("message",f),t.on("error",l),t.on("exit",g)}async function j(r,e,t,o=[]){let s=_(),p=new O(s,e.fs,e.cwd,"python3",e.fetch,e.limits?.maxOutputSize??0),f=e.limits?.maxPythonTimeoutMs??U,l=e.fetch?Math.max(f,H):f,g=z(e.fs),n={protocolToken:B(),sharedBuffer:s,pythonCode:r,cwd:e.cwd,env:D(e.env),args:o,scriptPath:t,timeoutMs:l},i={current:null},m=new Promise(u=>{let d={input:n,resolve:()=>{},workerRef:i,requireDefenseContext:e.requireDefenseContext},A=y(e.requireDefenseContext,"python3","worker timeout callback",()=>{i.current?i.current.terminate():d.canceled=!0,u({success:!1,error:`Execution timeout: exceeded ${l}ms limit`})}),F=v(()=>{try{A()}catch(h){let W=h instanceof Error?h.message:String(h);u({success:!1,error:c(W)})}},l);d.resolve=h=>{T(F),u(h)},g.executionQueue.push(d),a(g)}),[x,w]=await Promise.all([p.run(l).catch(u=>({stdout:"",stderr:`python3: bridge error: ${c(E(u))}
5
- `,exitCode:1})),m.catch(u=>({success:!1,error:c(E(u))}))]);if(!w.success&&w.error){let u=c(w.error);return{stdout:x.stdout,stderr:`${x.stderr}python3: ${u}
6
- `,exitCode:x.exitCode||1}}return x}var Y={name:"python3",async execute(r,e){if(P(r))return b(I);let t=L(r);if("exitCode"in t)return t;if(t.showVersion)return{stdout:`Python 3.13.2 (Emscripten)
7
- `,stderr:"",exitCode:0};let o,s;if(t.code!==null)o=t.code,s="-c";else if(t.module!==null){if(!/^[a-zA-Z_][a-zA-Z0-9_.]*$/.test(t.module))return{stdout:"",stderr:`python3: No module named '${t.module.slice(0,200)}'
8
- `,exitCode:1};o=`import runpy; runpy.run_module('${t.module}', run_name='__main__')`,s=t.module}else if(t.scriptFile!==null){let p=e.fs.resolvePath(e.cwd,t.scriptFile);if(!await e.fs.exists(p))return{stdout:"",stderr:`python3: can't open file '${t.scriptFile}': [Errno 2] No such file or directory
9
- `,exitCode:2};try{o=await e.fs.readFile(p),s=t.scriptFile}catch(f){let l=M(f.message);return{stdout:"",stderr:`python3: can't open file '${t.scriptFile}': ${l}
10
- `,exitCode:2}}}else if(e.stdin.trim())o=e.stdin,s="<stdin>";else return{stdout:"",stderr:`python3: no input provided (use -c CODE, -m MODULE, or provide a script file)
11
- `,exitCode:2};return j(o,e,s,t.scriptArgs)}},ce={name:"python",async execute(r,e){return Y.execute(r,e)}};export{ie as _resetExecutionQueue,Y as python3Command,ce as pythonCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-QCDB2VPH.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as rev};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-NYQYO467.js";import"./chunk-7TSDKFEO.js";import"./chunk-VLGZJRPG.js";import"./chunk-IPJHKYVM.js";import"./chunk-YNYSPYQ5.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as rgCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-OL3S66CO.js";import"./chunk-24IMIIXA.js";import"./chunk-5QMZ5MUS.js";import"./chunk-YNYSPYQ5.js";import"./chunk-GFQRA5P5.js";import"./chunk-3THT3N7L.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as sedCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-XKQRETAK.js";import"./chunk-EIZGF4BS.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as sha1sumCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-5V6VZH6T.js";import"./chunk-EIZGF4BS.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as sha256sumCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-KMEYNNUA.js";import"./chunk-7L36YK2X.js";import"./chunk-NUFRM6SI.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as sortCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-MYE6AGBJ.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as split};
@@ -1 +0,0 @@
1
- import{a,b,c}from"./chunk-HWBSOZZR.js";import"./chunk-A5O5YHGN.js";import"./chunk-24IMIIXA.js";import"./chunk-5QMZ5MUS.js";import"./chunk-3THT3N7L.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as _internals,c as flagsForFuzzing,b as sqlite3Command};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-VYOJP4TV.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as strings};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-MHTUABJP.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as tac};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-DCAAORBQ.js";import"./chunk-HDQ56CKY.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as tailCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-ZXL7TQLN.js";import"./chunk-X2AJGDEF.js";import"./chunk-5QMZ5MUS.js";import"./chunk-YNYSPYQ5.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as tarCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-55VFSPNA.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as teeCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-Z6LRHWXI.js";import"./chunk-CWQS3NFK.js";import"./chunk-IPJHKYVM.js";import"./chunk-OJDRYQWQ.js";import"./chunk-3THT3N7L.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as timeCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-YTNYSM6T.js";import"./chunk-3ZUFRYJ4.js";import"./chunk-A5O5YHGN.js";import"./chunk-IPJHKYVM.js";import"./chunk-5QMZ5MUS.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as timeoutCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-62RKD26F.js";import"./chunk-3THT3N7L.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as trCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-PYSFUGCK.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as unexpand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-WKFATFPP.js";import"./chunk-7L36YK2X.js";import"./chunk-NUFRM6SI.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as uniqCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-GXVXFKBA.js";import"./chunk-7L36YK2X.js";import"./chunk-NUFRM6SI.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as wcCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-UNYNJIFU.js";import"./chunk-F55TLFGB.js";import"./chunk-SYMJJMQ4.js";import"./chunk-BBXLRYSX.js";import"./chunk-7TSDKFEO.js";import"./chunk-OJDRYQWQ.js";import"./chunk-24IMIIXA.js";import"./chunk-5QMZ5MUS.js";import"./chunk-YNYSPYQ5.js";import"./chunk-7L36YK2X.js";import"./chunk-GFQRA5P5.js";import"./chunk-NUFRM6SI.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as xanCommand};
@@ -1 +0,0 @@
1
- import{g as a,h as b}from"./chunk-F55TLFGB.js";import"./chunk-SYMJJMQ4.js";import"./chunk-DXB73IDG.js";export{a as cmdFlatten,b as cmdView};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-TOMNU26N.js";import"./chunk-IPJHKYVM.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as xargsCommand};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-XORM457F.js";import"./chunk-SYMJJMQ4.js";import"./chunk-BBXLRYSX.js";import"./chunk-7TSDKFEO.js";import"./chunk-OJDRYQWQ.js";import"./chunk-24IMIIXA.js";import"./chunk-5QMZ5MUS.js";import"./chunk-YNYSPYQ5.js";import"./chunk-GFQRA5P5.js";import"./chunk-3THT3N7L.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as yqCommand};
@@ -1,66 +0,0 @@
1
- /**
2
- * Adapter for using js-exec as a CodeExecutor runtime for @executor/sdk.
3
- *
4
- * This module exports a Promise-based executor that can be wrapped with
5
- * Effect.tryPromise() to satisfy the CodeExecutor interface.
6
- *
7
- * Usage with @executor/sdk:
8
- *
9
- * ```ts
10
- * import { createJustBashCodeExecutor } from 'just-bash/executor';
11
- * import { createExecutor } from '@executor/sdk';
12
- * import type { CodeExecutor } from '@executor/sdk';
13
- * import * as Effect from 'effect/Effect';
14
- *
15
- * const jb = createJustBashCodeExecutor();
16
- *
17
- * const codeExecutor: CodeExecutor = {
18
- * execute: (code, toolInvoker) =>
19
- * Effect.tryPromise(() =>
20
- * jb.execute(code, (path, args) =>
21
- * Effect.runPromise(toolInvoker.invoke({ path, args }))
22
- * )
23
- * ),
24
- * };
25
- *
26
- * const executor = await createExecutor({
27
- * runtime: codeExecutor,
28
- * tools: { ... },
29
- * });
30
- * ```
31
- */
32
- import type { IFileSystem } from "../../fs/interface.js";
33
- import type { SecureFetch } from "../../network/index.js";
34
- import { type ExecutorResult } from "./js-exec.js";
35
- export interface JustBashExecutorOptions {
36
- /** Virtual filesystem for code to access. Defaults to an empty InMemoryFs. */
37
- fs?: IFileSystem;
38
- /** Working directory inside the sandbox. Defaults to /home/user. */
39
- cwd?: string;
40
- /** Environment variables available to code. Defaults to empty. */
41
- env?: Record<string, string>;
42
- /** Network fetch function. Defaults to undefined (no network). */
43
- fetch?: SecureFetch;
44
- }
45
- export interface JustBashCodeExecutor {
46
- /**
47
- * Execute code with tool invocation support.
48
- *
49
- * @param code - JavaScript code to execute. Can use `await` and `return`.
50
- * Tools are available as `tools.namespace.method(args)`.
51
- * @param invokeTool - Callback to handle tool invocations.
52
- * Receives (path, args) and should return the tool result.
53
- * @returns ExecutorResult with result, error, and captured logs.
54
- */
55
- execute(code: string, invokeTool: (path: string, args: unknown) => Promise<unknown>): Promise<ExecutorResult>;
56
- }
57
- /**
58
- * Create a js-exec based code executor for use with @executor/sdk.
59
- *
60
- * The executor runs JavaScript code in a QuickJS sandbox with:
61
- * - A `tools` proxy for invoking registered tools
62
- * - Console output captured to `logs` array
63
- * - Return value captured in `result`
64
- * - Full Node.js-compatible module system (fs, path, etc.)
65
- */
66
- export declare function createJustBashCodeExecutor(options?: JustBashExecutorOptions): JustBashCodeExecutor;