just-bash 3.4.1 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (457) hide show
  1. package/CHANGELOG.md +248 -0
  2. package/README.md +22 -9
  3. package/dist/AGENTS.md +58 -2
  4. package/dist/Bash.d.ts +4 -2
  5. package/dist/abort-signals.d.ts +10 -0
  6. package/dist/bin/chunks/awk2-U22OR5B5.js +3 -0
  7. package/dist/bin/{shell/chunks/base64-FLJ4YPHB.js → chunks/base64-2KKH5BCT.js} +1 -1
  8. package/dist/bin/chunks/{cat-2J5MA5PY.js → cat-V45MVNBT.js} +1 -1
  9. package/dist/bin/{shell/chunks/chmod-ZM5WLMZI.js → chunks/chmod-A54R4UUQ.js} +1 -1
  10. package/dist/bin/chunks/chunk-2NJJXU4K.js +27 -0
  11. package/dist/bin/{shell/chunks/chunk-BJRT4VKD.js → chunks/chunk-3LKMI5IX.js} +1 -1
  12. package/dist/bin/{shell/chunks/chunk-4APSDE57.js → chunks/chunk-44SKMHU6.js} +1 -1
  13. package/dist/bin/chunks/{chunk-GRP7L2EL.js → chunk-6DAR25KN.js} +1 -1
  14. package/dist/bin/{shell/chunks/chunk-VGR3NA3H.js → chunks/chunk-723HNGID.js} +1 -1
  15. package/dist/bin/{shell/chunks/chunk-MRPJL3ZK.js → chunks/chunk-7X4QBCFW.js} +1 -1
  16. package/dist/bin/chunks/{chunk-42AMF6EE.js → chunk-ABM5WFEO.js} +1 -1
  17. package/dist/bin/chunks/{chunk-2HFDEZUY.js → chunk-AINNAQBQ.js} +1 -1
  18. package/dist/bin/{shell/chunks/chunk-BPWZ7ADB.js → chunks/chunk-AL7RVSF4.js} +1 -1
  19. package/dist/bin/{shell/chunks/chunk-MHAGHCSO.js → chunks/chunk-ARYCSNJJ.js} +7 -7
  20. package/dist/bin/{shell/chunks/chunk-2INNLNI5.js → chunks/chunk-BJF6B4YW.js} +1 -1
  21. package/dist/bin/{shell/chunks/chunk-BZWGVRFA.js → chunks/chunk-BOXG6XBN.js} +2 -2
  22. package/dist/bin/chunks/chunk-DA3RFNKK.js +17 -0
  23. package/dist/bin/chunks/chunk-DH7M46D3.js +20 -0
  24. package/dist/bin/chunks/{chunk-2ND6MMXN.js → chunk-DTGQQKI2.js} +1 -1
  25. package/dist/bin/chunks/{chunk-YOIFOOGX.js → chunk-ECZAFQ22.js} +1 -1
  26. package/dist/bin/chunks/{chunk-PPVF2N6C.js → chunk-EFS34UUR.js} +1 -1
  27. package/dist/bin/{shell/chunks/chunk-TW2IJRUF.js → chunks/chunk-ENEHPI32.js} +1 -1
  28. package/dist/bin/chunks/chunk-HFW2LXQV.js +13 -0
  29. package/dist/bin/{shell/chunks/chunk-UHNV55NF.js → chunks/chunk-HRKG3ZK2.js} +1 -1
  30. package/dist/bin/chunks/{chunk-74TZ7ZF7.js → chunk-IKUY74NG.js} +1 -1
  31. package/dist/bin/chunks/chunk-ILXMFIYG.js +7 -0
  32. package/dist/bin/chunks/chunk-IMVXTSPG.js +275 -0
  33. package/dist/bin/chunks/chunk-J5L5DJWL.js +3 -0
  34. package/dist/bin/{shell/chunks/chunk-MF3GVFLC.js → chunks/chunk-JKS7WXGR.js} +1 -1
  35. package/dist/bin/{shell/chunks/chunk-XBX7KFWK.js → chunks/chunk-LG6IN6SW.js} +11 -11
  36. package/dist/bin/chunks/chunk-LMFAALLO.js +21 -0
  37. package/dist/bin/{shell/chunks/chunk-DYIBFLS3.js → chunks/chunk-LOU52GPJ.js} +2 -2
  38. package/dist/bin/chunks/{chunk-FB44CW33.js → chunk-M5ZBECGM.js} +1 -1
  39. package/dist/bin/chunks/chunk-MA6BMA4M.js +3 -0
  40. package/dist/bin/chunks/{chunk-Z7QCL4IA.js → chunk-MPQMTLXN.js} +1 -1
  41. package/dist/bin/chunks/{chunk-TIHFGNPS.js → chunk-MUIYG2RB.js} +1 -1
  42. package/dist/bin/chunks/{chunk-PUZGSIMN.js → chunk-NGMFI3RH.js} +1 -1
  43. package/dist/bin/{shell/chunks/chunk-RYQB6GQ7.js → chunks/chunk-NLMTGTSG.js} +1 -1
  44. package/dist/bin/chunks/{chunk-QAYU7HPM.js → chunk-OBVTFHVP.js} +1 -1
  45. package/dist/bin/chunks/{chunk-MNSMZU47.js → chunk-OOKVPG5D.js} +1 -1
  46. package/dist/bin/{shell/chunks/chunk-O2BCKSMK.js → chunks/chunk-PEJXCXSY.js} +1 -1
  47. package/dist/bin/{shell/chunks/chunk-MYEPQX6Y.js → chunks/chunk-PL4EU7Y2.js} +1 -1
  48. package/dist/bin/chunks/{chunk-QFTZKD5O.js → chunk-QCGH2ZOW.js} +1 -1
  49. package/dist/bin/chunks/chunk-QKWMWSV3.js +3 -0
  50. package/dist/bin/{shell/chunks/chunk-ISOWCECJ.js → chunks/chunk-S5Z7DMIE.js} +10 -10
  51. package/dist/bin/{shell/chunks/chunk-OLEQNRKX.js → chunks/chunk-SQ7SZZMW.js} +1 -1
  52. package/dist/bin/{shell/chunks/chunk-44MQ5AXA.js → chunks/chunk-SQUH76NP.js} +1 -1
  53. package/dist/bin/{shell/chunks/chunk-BOYPCOSV.js → chunks/chunk-TGRZ42DS.js} +1 -1
  54. package/dist/bin/chunks/{chunk-LUHU7UUN.js → chunk-THTKNRO6.js} +1 -1
  55. package/dist/bin/chunks/{chunk-VKTV45AP.js → chunk-TQXLQEIT.js} +1 -1
  56. package/dist/bin/{shell/chunks/chunk-2OQ5HPZE.js → chunks/chunk-U6BXPMLD.js} +1 -1
  57. package/dist/bin/chunks/chunk-U6DBRMD5.js +5 -0
  58. package/dist/bin/{shell/chunks/chunk-CC2AQ6B7.js → chunks/chunk-U6JTVQU6.js} +1 -1
  59. package/dist/bin/chunks/chunk-UPUFWGHR.js +3 -0
  60. package/dist/bin/chunks/{chunk-E5VZGTZ6.js → chunk-URRH3GPG.js} +1 -1
  61. package/dist/bin/chunks/{chunk-EXGPMLIE.js → chunk-VBU3UEG5.js} +1 -1
  62. package/dist/bin/chunks/chunk-VGSRQOLD.js +7 -0
  63. package/dist/bin/chunks/{chunk-GTULZ3ZD.js → chunk-WBST7XJW.js} +1 -1
  64. package/dist/bin/chunks/{chunk-ROFYAVPF.js → chunk-WEQ5WM2M.js} +1 -1
  65. package/dist/bin/{shell/chunks/chunk-BCQSUELK.js → chunks/chunk-WZ7MIBLR.js} +1 -1
  66. package/dist/bin/chunks/{chunk-H4BRFPKY.js → chunk-X45GP3AQ.js} +1 -1
  67. package/dist/bin/chunks/chunk-YQEKKZTU.js +12 -0
  68. package/dist/bin/chunks/{chunk-UNKX6YM6.js → chunk-Z3KAV6YJ.js} +1 -1
  69. package/dist/bin/chunks/{chunk-3SCW7PD5.js → chunk-Z5KICK5X.js} +1 -1
  70. package/dist/bin/chunks/{column-7VBJL757.js → column-LHHS4D3K.js} +1 -1
  71. package/dist/bin/{shell/chunks/cp-MF5GADQN.js → chunks/cp-HPLQA35N.js} +1 -1
  72. package/dist/bin/chunks/curl-FIRG3RB6.js +31 -0
  73. package/dist/bin/chunks/{cut-QOTYBJJJ.js → cut-KP3S36XS.js} +1 -1
  74. package/dist/bin/{shell/chunks/diff-YXZZCUSQ.js → chunks/diff-JSJ56EOK.js} +1 -1
  75. package/dist/bin/chunks/dist-4NZ74CRE.js +141 -0
  76. package/dist/bin/chunks/{du-A3UGHIKJ.js → du-WEF5YWQK.js} +1 -1
  77. package/dist/bin/chunks/{expr-TDF3B6QJ.js → expr-FLWT4OCO.js} +1 -1
  78. package/dist/bin/chunks/{file-AJGG7RYT.js → file-JLUCGBCB.js} +1 -1
  79. package/dist/bin/chunks/{find-6DH6TRDN.js → find-XGVQ6N6L.js} +1 -1
  80. package/dist/bin/chunks/flag-coverage-4JYKIAVV.js +3 -0
  81. package/dist/bin/chunks/{grep-WUZMZDGY.js → grep-DCPCPQOS.js} +1 -1
  82. package/dist/bin/chunks/{gzip-JA7JQBUS.js → gzip-6DZIKNBW.js} +1 -1
  83. package/dist/bin/{shell/chunks/head-YGKW3HS4.js → chunks/head-TLFXMM2T.js} +1 -1
  84. package/dist/bin/{shell/chunks/help-HVIDHJ6M.js → chunks/help-EXVKU23F.js} +1 -1
  85. package/dist/bin/chunks/{html-to-markdown-ZWL7LZIP.js → html-to-markdown-E22RLT2U.js} +1 -1
  86. package/dist/bin/chunks/{jq-5MI4V3G5.js → jq-GDM3OBBK.js} +1 -1
  87. package/dist/bin/chunks/js-exec-VU6F6WLS.js +1578 -0
  88. package/dist/bin/chunks/{ln-XSDIE6SU.js → ln-B35EKC2Q.js} +1 -1
  89. package/dist/bin/chunks/{ls-R6DAGGBH.js → ls-67NUUIYT.js} +1 -1
  90. package/dist/bin/chunks/{mkdir-74BP5NTG.js → mkdir-AWDWRBKC.js} +1 -1
  91. package/dist/bin/chunks/mktemp-L6OGMDUO.js +3 -0
  92. package/dist/bin/chunks/{mv-YG75IRRE.js → mv-4BJSOT4Y.js} +1 -1
  93. package/dist/bin/{shell/chunks/od-YCY27MMO.js → chunks/od-SI75GLRE.js} +1 -1
  94. package/dist/bin/chunks/{paste-ACKOG3XS.js → paste-5TSIBDF7.js} +1 -1
  95. package/dist/bin/chunks/python3-GUWCSSDP.js +23 -0
  96. package/dist/bin/{shell/chunks/readlink-HMHVGSAM.js → chunks/readlink-URO5XTBB.js} +1 -1
  97. package/dist/bin/{shell/chunks/rg-A3E7YM2A.js → chunks/rg-RVULUPDH.js} +1 -1
  98. package/dist/bin/{shell/chunks/rm-3PLW4O4B.js → chunks/rm-UCUTHC3I.js} +1 -1
  99. package/dist/bin/chunks/{rmdir-DCJ3XJRR.js → rmdir-J3HM7GGM.js} +1 -1
  100. package/dist/bin/{shell/chunks/sed-KJWKB22J.js → chunks/sed-MCLGHZOI.js} +1 -1
  101. package/dist/bin/chunks/{seq-Q4LZ6EXV.js → seq-I54NZE75.js} +1 -1
  102. package/dist/bin/{shell/chunks/sleep-DVFE2GSF.js → chunks/sleep-CV6B4M6W.js} +1 -1
  103. package/dist/bin/chunks/{split-XMXBXL5Q.js → split-VZO7223N.js} +1 -1
  104. package/dist/bin/chunks/{sqlite3-DNH2VLVN.js → sqlite3-HXVFVP4Z.js} +1 -1
  105. package/dist/bin/chunks/sqlite3-worker.js +75 -11
  106. package/dist/bin/chunks/{stat-5PUSTPTK.js → stat-UJ37RBMM.js} +1 -1
  107. package/dist/bin/chunks/{tail-4MB7HHIZ.js → tail-5TSF5YM4.js} +1 -1
  108. package/dist/bin/{shell/chunks/tar-FRDUJZDN.js → chunks/tar-ZGZZDQXO.js} +1 -1
  109. package/dist/bin/chunks/{time-LF7BTSK5.js → time-J2DAZUIN.js} +1 -1
  110. package/dist/bin/chunks/timeout-ATTDYXLX.js +3 -0
  111. package/dist/bin/chunks/{tr-Z6N34HZM.js → tr-6RPFASYV.js} +1 -1
  112. package/dist/bin/chunks/worker.js +88 -15
  113. package/dist/bin/chunks/{xan-VSF6ZQGZ.js → xan-CCS53B7D.js} +1 -1
  114. package/dist/bin/chunks/{xan-view-UEFBHYVN.js → xan-view-KOXASOEV.js} +1 -1
  115. package/dist/bin/chunks/yes-ELH3XQWY.js +3 -0
  116. package/dist/bin/chunks/yq-GSCDUHGM.js +3 -0
  117. package/dist/bin/just-bash.js +333 -328
  118. package/dist/bin/shell/chunks/awk2-U22OR5B5.js +3 -0
  119. package/dist/bin/{chunks/base64-FLJ4YPHB.js → shell/chunks/base64-2KKH5BCT.js} +1 -1
  120. package/dist/bin/shell/chunks/{cat-2J5MA5PY.js → cat-V45MVNBT.js} +1 -1
  121. package/dist/bin/{chunks/chmod-ZM5WLMZI.js → shell/chunks/chmod-A54R4UUQ.js} +1 -1
  122. package/dist/bin/shell/chunks/chunk-2NJJXU4K.js +27 -0
  123. package/dist/bin/{chunks/chunk-BJRT4VKD.js → shell/chunks/chunk-3LKMI5IX.js} +1 -1
  124. package/dist/bin/{chunks/chunk-4APSDE57.js → shell/chunks/chunk-44SKMHU6.js} +1 -1
  125. package/dist/bin/shell/chunks/{chunk-GRP7L2EL.js → chunk-6DAR25KN.js} +1 -1
  126. package/dist/bin/{chunks/chunk-VGR3NA3H.js → shell/chunks/chunk-723HNGID.js} +1 -1
  127. package/dist/bin/{chunks/chunk-MRPJL3ZK.js → shell/chunks/chunk-7X4QBCFW.js} +1 -1
  128. package/dist/bin/shell/chunks/{chunk-42AMF6EE.js → chunk-ABM5WFEO.js} +1 -1
  129. package/dist/bin/shell/chunks/{chunk-2HFDEZUY.js → chunk-AINNAQBQ.js} +1 -1
  130. package/dist/bin/{chunks/chunk-BPWZ7ADB.js → shell/chunks/chunk-AL7RVSF4.js} +1 -1
  131. package/dist/bin/{chunks/chunk-MHAGHCSO.js → shell/chunks/chunk-ARYCSNJJ.js} +7 -7
  132. package/dist/bin/{chunks/chunk-2INNLNI5.js → shell/chunks/chunk-BJF6B4YW.js} +1 -1
  133. package/dist/bin/{chunks/chunk-BZWGVRFA.js → shell/chunks/chunk-BOXG6XBN.js} +2 -2
  134. package/dist/bin/shell/chunks/chunk-DA3RFNKK.js +17 -0
  135. package/dist/bin/shell/chunks/chunk-DH7M46D3.js +20 -0
  136. package/dist/bin/shell/chunks/{chunk-2ND6MMXN.js → chunk-DTGQQKI2.js} +1 -1
  137. package/dist/bin/shell/chunks/{chunk-YOIFOOGX.js → chunk-ECZAFQ22.js} +1 -1
  138. package/dist/bin/shell/chunks/{chunk-PPVF2N6C.js → chunk-EFS34UUR.js} +1 -1
  139. package/dist/bin/{chunks/chunk-TW2IJRUF.js → shell/chunks/chunk-ENEHPI32.js} +1 -1
  140. package/dist/bin/shell/chunks/chunk-HFW2LXQV.js +13 -0
  141. package/dist/bin/{chunks/chunk-UHNV55NF.js → shell/chunks/chunk-HRKG3ZK2.js} +1 -1
  142. package/dist/bin/shell/chunks/{chunk-74TZ7ZF7.js → chunk-IKUY74NG.js} +1 -1
  143. package/dist/bin/shell/chunks/chunk-ILXMFIYG.js +7 -0
  144. package/dist/bin/shell/chunks/chunk-IMVXTSPG.js +275 -0
  145. package/dist/bin/shell/chunks/chunk-J5L5DJWL.js +3 -0
  146. package/dist/bin/{chunks/chunk-MF3GVFLC.js → shell/chunks/chunk-JKS7WXGR.js} +1 -1
  147. package/dist/bin/{chunks/chunk-XBX7KFWK.js → shell/chunks/chunk-LG6IN6SW.js} +11 -11
  148. package/dist/bin/shell/chunks/chunk-LMFAALLO.js +21 -0
  149. package/dist/bin/{chunks/chunk-DYIBFLS3.js → shell/chunks/chunk-LOU52GPJ.js} +2 -2
  150. package/dist/bin/shell/chunks/{chunk-FB44CW33.js → chunk-M5ZBECGM.js} +1 -1
  151. package/dist/bin/shell/chunks/chunk-MA6BMA4M.js +3 -0
  152. package/dist/bin/shell/chunks/{chunk-Z7QCL4IA.js → chunk-MPQMTLXN.js} +1 -1
  153. package/dist/bin/shell/chunks/{chunk-TIHFGNPS.js → chunk-MUIYG2RB.js} +1 -1
  154. package/dist/bin/shell/chunks/{chunk-PUZGSIMN.js → chunk-NGMFI3RH.js} +1 -1
  155. package/dist/bin/{chunks/chunk-RYQB6GQ7.js → shell/chunks/chunk-NLMTGTSG.js} +1 -1
  156. package/dist/bin/shell/chunks/{chunk-QAYU7HPM.js → chunk-OBVTFHVP.js} +1 -1
  157. package/dist/bin/shell/chunks/{chunk-MNSMZU47.js → chunk-OOKVPG5D.js} +1 -1
  158. package/dist/bin/{chunks/chunk-O2BCKSMK.js → shell/chunks/chunk-PEJXCXSY.js} +1 -1
  159. package/dist/bin/{chunks/chunk-MYEPQX6Y.js → shell/chunks/chunk-PL4EU7Y2.js} +1 -1
  160. package/dist/bin/shell/chunks/{chunk-QFTZKD5O.js → chunk-QCGH2ZOW.js} +1 -1
  161. package/dist/bin/shell/chunks/chunk-QKWMWSV3.js +3 -0
  162. package/dist/bin/{chunks/chunk-ISOWCECJ.js → shell/chunks/chunk-S5Z7DMIE.js} +10 -10
  163. package/dist/bin/{chunks/chunk-OLEQNRKX.js → shell/chunks/chunk-SQ7SZZMW.js} +1 -1
  164. package/dist/bin/{chunks/chunk-44MQ5AXA.js → shell/chunks/chunk-SQUH76NP.js} +1 -1
  165. package/dist/bin/{chunks/chunk-BOYPCOSV.js → shell/chunks/chunk-TGRZ42DS.js} +1 -1
  166. package/dist/bin/shell/chunks/{chunk-LUHU7UUN.js → chunk-THTKNRO6.js} +1 -1
  167. package/dist/bin/shell/chunks/{chunk-VKTV45AP.js → chunk-TQXLQEIT.js} +1 -1
  168. package/dist/bin/{chunks/chunk-2OQ5HPZE.js → shell/chunks/chunk-U6BXPMLD.js} +1 -1
  169. package/dist/bin/shell/chunks/chunk-U6DBRMD5.js +5 -0
  170. package/dist/bin/{chunks/chunk-CC2AQ6B7.js → shell/chunks/chunk-U6JTVQU6.js} +1 -1
  171. package/dist/bin/shell/chunks/chunk-UPUFWGHR.js +3 -0
  172. package/dist/bin/shell/chunks/{chunk-E5VZGTZ6.js → chunk-URRH3GPG.js} +1 -1
  173. package/dist/bin/shell/chunks/{chunk-EXGPMLIE.js → chunk-VBU3UEG5.js} +1 -1
  174. package/dist/bin/shell/chunks/chunk-VGSRQOLD.js +7 -0
  175. package/dist/bin/shell/chunks/{chunk-GTULZ3ZD.js → chunk-WBST7XJW.js} +1 -1
  176. package/dist/bin/shell/chunks/{chunk-ROFYAVPF.js → chunk-WEQ5WM2M.js} +1 -1
  177. package/dist/bin/{chunks/chunk-BCQSUELK.js → shell/chunks/chunk-WZ7MIBLR.js} +1 -1
  178. package/dist/bin/shell/chunks/{chunk-H4BRFPKY.js → chunk-X45GP3AQ.js} +1 -1
  179. package/dist/bin/shell/chunks/chunk-YQEKKZTU.js +12 -0
  180. package/dist/bin/shell/chunks/{chunk-UNKX6YM6.js → chunk-Z3KAV6YJ.js} +1 -1
  181. package/dist/bin/shell/chunks/{chunk-3SCW7PD5.js → chunk-Z5KICK5X.js} +1 -1
  182. package/dist/bin/shell/chunks/{column-7VBJL757.js → column-LHHS4D3K.js} +1 -1
  183. package/dist/bin/{chunks/cp-MF5GADQN.js → shell/chunks/cp-HPLQA35N.js} +1 -1
  184. package/dist/bin/shell/chunks/curl-FIRG3RB6.js +31 -0
  185. package/dist/bin/shell/chunks/{cut-QOTYBJJJ.js → cut-KP3S36XS.js} +1 -1
  186. package/dist/bin/{chunks/diff-YXZZCUSQ.js → shell/chunks/diff-JSJ56EOK.js} +1 -1
  187. package/dist/bin/shell/chunks/dist-4NZ74CRE.js +141 -0
  188. package/dist/bin/shell/chunks/{du-A3UGHIKJ.js → du-WEF5YWQK.js} +1 -1
  189. package/dist/bin/shell/chunks/{expr-TDF3B6QJ.js → expr-FLWT4OCO.js} +1 -1
  190. package/dist/bin/shell/chunks/{file-AJGG7RYT.js → file-JLUCGBCB.js} +1 -1
  191. package/dist/bin/shell/chunks/{find-6DH6TRDN.js → find-XGVQ6N6L.js} +1 -1
  192. package/dist/bin/shell/chunks/flag-coverage-4JYKIAVV.js +3 -0
  193. package/dist/bin/shell/chunks/{grep-WUZMZDGY.js → grep-DCPCPQOS.js} +1 -1
  194. package/dist/bin/shell/chunks/{gzip-JA7JQBUS.js → gzip-6DZIKNBW.js} +1 -1
  195. package/dist/bin/{chunks/head-YGKW3HS4.js → shell/chunks/head-TLFXMM2T.js} +1 -1
  196. package/dist/bin/{chunks/help-HVIDHJ6M.js → shell/chunks/help-EXVKU23F.js} +1 -1
  197. package/dist/bin/shell/chunks/{html-to-markdown-ZWL7LZIP.js → html-to-markdown-E22RLT2U.js} +1 -1
  198. package/dist/bin/shell/chunks/{jq-5MI4V3G5.js → jq-GDM3OBBK.js} +1 -1
  199. package/dist/bin/shell/chunks/js-exec-VU6F6WLS.js +1578 -0
  200. package/dist/bin/shell/chunks/{ln-XSDIE6SU.js → ln-B35EKC2Q.js} +1 -1
  201. package/dist/bin/shell/chunks/{ls-R6DAGGBH.js → ls-67NUUIYT.js} +1 -1
  202. package/dist/bin/shell/chunks/{mkdir-74BP5NTG.js → mkdir-AWDWRBKC.js} +1 -1
  203. package/dist/bin/shell/chunks/mktemp-L6OGMDUO.js +3 -0
  204. package/dist/bin/shell/chunks/{mv-YG75IRRE.js → mv-4BJSOT4Y.js} +1 -1
  205. package/dist/bin/{chunks/od-YCY27MMO.js → shell/chunks/od-SI75GLRE.js} +1 -1
  206. package/dist/bin/shell/chunks/{paste-ACKOG3XS.js → paste-5TSIBDF7.js} +1 -1
  207. package/dist/bin/shell/chunks/python3-GUWCSSDP.js +23 -0
  208. package/dist/bin/{chunks/readlink-HMHVGSAM.js → shell/chunks/readlink-URO5XTBB.js} +1 -1
  209. package/dist/bin/{chunks/rg-A3E7YM2A.js → shell/chunks/rg-RVULUPDH.js} +1 -1
  210. package/dist/bin/{chunks/rm-3PLW4O4B.js → shell/chunks/rm-UCUTHC3I.js} +1 -1
  211. package/dist/bin/shell/chunks/{rmdir-DCJ3XJRR.js → rmdir-J3HM7GGM.js} +1 -1
  212. package/dist/bin/{chunks/sed-KJWKB22J.js → shell/chunks/sed-MCLGHZOI.js} +1 -1
  213. package/dist/bin/shell/chunks/{seq-Q4LZ6EXV.js → seq-I54NZE75.js} +1 -1
  214. package/dist/bin/{chunks/sleep-DVFE2GSF.js → shell/chunks/sleep-CV6B4M6W.js} +1 -1
  215. package/dist/bin/shell/chunks/{split-XMXBXL5Q.js → split-VZO7223N.js} +1 -1
  216. package/dist/bin/shell/chunks/{sqlite3-DNH2VLVN.js → sqlite3-HXVFVP4Z.js} +1 -1
  217. package/dist/bin/shell/chunks/{stat-5PUSTPTK.js → stat-UJ37RBMM.js} +1 -1
  218. package/dist/bin/shell/chunks/{tail-4MB7HHIZ.js → tail-5TSF5YM4.js} +1 -1
  219. package/dist/bin/{chunks/tar-FRDUJZDN.js → shell/chunks/tar-ZGZZDQXO.js} +1 -1
  220. package/dist/bin/shell/chunks/{time-LF7BTSK5.js → time-J2DAZUIN.js} +1 -1
  221. package/dist/bin/shell/chunks/timeout-ATTDYXLX.js +3 -0
  222. package/dist/bin/shell/chunks/{tr-Z6N34HZM.js → tr-6RPFASYV.js} +1 -1
  223. package/dist/bin/shell/chunks/{xan-VSF6ZQGZ.js → xan-CCS53B7D.js} +1 -1
  224. package/dist/bin/shell/chunks/{xan-view-UEFBHYVN.js → xan-view-KOXASOEV.js} +1 -1
  225. package/dist/bin/shell/chunks/yes-ELH3XQWY.js +3 -0
  226. package/dist/bin/shell/chunks/yq-GSCDUHGM.js +3 -0
  227. package/dist/bin/shell/shell.js +334 -329
  228. package/dist/browser.d.ts +1 -1
  229. package/dist/bundle/browser.js +866 -836
  230. package/dist/bundle/chunks/awk2-V7KYQWCD.js +2 -0
  231. package/dist/bundle/chunks/{base64-2BAITDZF.js → base64-QPSYZAAJ.js} +1 -1
  232. package/dist/bundle/chunks/{cat-33KGN4MZ.js → cat-54BXBS6X.js} +1 -1
  233. package/dist/bundle/chunks/{chmod-APOXUPXW.js → chmod-4OPV4QKK.js} +1 -1
  234. package/dist/bundle/chunks/{chunk-IBRT3OJS.js → chunk-2WBUTDF5.js} +1 -1
  235. package/dist/bundle/chunks/{chunk-WNH3HOQA.js → chunk-353VO5TF.js} +1 -1
  236. package/dist/bundle/chunks/chunk-3HDTNUL3.js +6 -0
  237. package/dist/bundle/chunks/{chunk-XV2V56NQ.js → chunk-3KWM4FFA.js} +1 -1
  238. package/dist/bundle/chunks/{chunk-WXPNKIIH.js → chunk-43OP7DFL.js} +1 -1
  239. package/dist/bundle/chunks/{chunk-DMWNBCXJ.js → chunk-4GEHRJMD.js} +1 -1
  240. package/dist/bundle/chunks/{chunk-3CBCABOZ.js → chunk-4IMUNIUJ.js} +1 -1
  241. package/dist/bundle/chunks/chunk-5BMPT6SF.js +19 -0
  242. package/dist/bundle/chunks/{chunk-XPDOK3XY.js → chunk-5QWGR2WA.js} +1 -1
  243. package/dist/bundle/chunks/{chunk-X3TZEFQG.js → chunk-5UTZMNI5.js} +1 -1
  244. package/dist/bundle/chunks/{chunk-QPZVR6ZN.js → chunk-65LVAUWW.js} +1 -1
  245. package/dist/bundle/chunks/{chunk-YDR2IWKO.js → chunk-72JHTO7E.js} +1 -1
  246. package/dist/bundle/chunks/{chunk-KVG5FR5F.js → chunk-7GA3QWJJ.js} +11 -11
  247. package/dist/bundle/chunks/{chunk-ICQYTW7W.js → chunk-7M672HB6.js} +1 -1
  248. package/dist/bundle/chunks/chunk-B6OSJB22.js +26 -0
  249. package/dist/bundle/chunks/{chunk-N3FZSEG7.js → chunk-BM3X75NC.js} +1 -1
  250. package/dist/bundle/chunks/chunk-CBM6J4AL.js +6 -0
  251. package/dist/bundle/chunks/{chunk-FNEG7DFQ.js → chunk-CGI6V2HW.js} +1 -1
  252. package/dist/bundle/chunks/{chunk-BKUWXPEM.js → chunk-CHWP6GRK.js} +1 -1
  253. package/dist/bundle/chunks/{chunk-UL6YJ7FT.js → chunk-D5ZJISRS.js} +1 -1
  254. package/dist/bundle/chunks/{chunk-TUNYNC46.js → chunk-DIRWTBKE.js} +1 -1
  255. package/dist/bundle/chunks/chunk-DIWMSSQY.js +2 -0
  256. package/dist/bundle/chunks/{chunk-273265WK.js → chunk-DPZVOEUP.js} +1 -1
  257. package/dist/bundle/chunks/chunk-EGTVQWAP.js +20 -0
  258. package/dist/bundle/chunks/{chunk-SI5VPVOA.js → chunk-EXXOLIVE.js} +1 -1
  259. package/dist/bundle/chunks/chunk-GLAFXDZC.js +4 -0
  260. package/dist/bundle/chunks/{chunk-PMYUC5JF.js → chunk-H42OAUJL.js} +1 -1
  261. package/dist/bundle/chunks/chunk-H53EPEGD.js +12 -0
  262. package/dist/bundle/chunks/{chunk-QE275OWT.js → chunk-HDOXCDVK.js} +1 -1
  263. package/dist/bundle/chunks/{chunk-USNDURQI.js → chunk-HIQEVPXM.js} +1 -1
  264. package/dist/bundle/chunks/{chunk-G4SEENI7.js → chunk-M4LDT7V7.js} +1 -1
  265. package/dist/bundle/chunks/{chunk-MHY57JTL.js → chunk-MDE25PQK.js} +1 -1
  266. package/dist/bundle/chunks/{chunk-Q6JV5CBB.js → chunk-MHDZERK4.js} +1 -1
  267. package/dist/bundle/chunks/{chunk-5ELNHAAJ.js → chunk-MHZF23KB.js} +1 -1
  268. package/dist/bundle/chunks/{chunk-LPJEKUCB.js → chunk-N6W6FM4N.js} +1 -1
  269. package/dist/bundle/chunks/{chunk-POIWRLUV.js → chunk-NRLE7KYI.js} +1 -1
  270. package/dist/bundle/chunks/{chunk-MQKGGNPS.js → chunk-NXBUT5V2.js} +2 -2
  271. package/dist/bundle/chunks/{chunk-4HMWZAP7.js → chunk-OB46N7Q7.js} +1 -1
  272. package/dist/bundle/chunks/{chunk-ALOFNPKY.js → chunk-PPHGMG47.js} +2 -2
  273. package/dist/bundle/chunks/{chunk-UXHSH7BM.js → chunk-R6ZGLVXI.js} +1 -1
  274. package/dist/bundle/chunks/chunk-RCRHDT54.js +274 -0
  275. package/dist/bundle/chunks/{chunk-N4TGZ6H7.js → chunk-RIIUVFUS.js} +1 -1
  276. package/dist/bundle/chunks/chunk-RK2WBVP4.js +2 -0
  277. package/dist/bundle/chunks/{chunk-MLIO3BK2.js → chunk-SQX6WQXB.js} +1 -1
  278. package/dist/bundle/chunks/chunk-SRB6FXRH.js +2 -0
  279. package/dist/bundle/chunks/{chunk-7IFSXTCJ.js → chunk-T4INBNHX.js} +1 -1
  280. package/dist/bundle/chunks/{chunk-TVJ6JVK4.js → chunk-TUQG2YRH.js} +1 -1
  281. package/dist/bundle/chunks/{chunk-JA6EY7US.js → chunk-U7UNEMLJ.js} +1 -1
  282. package/dist/bundle/chunks/{chunk-GVKYQN5J.js → chunk-UK2K3DHN.js} +1 -1
  283. package/dist/bundle/chunks/{chunk-HW6ZCMM5.js → chunk-VDJ53ESK.js} +1 -1
  284. package/dist/bundle/chunks/{chunk-WHHRIZS3.js → chunk-VGCXKMXN.js} +1 -1
  285. package/dist/bundle/chunks/chunk-VOQZ5TSL.js +2 -0
  286. package/dist/bundle/chunks/{chunk-R2FBRMDU.js → chunk-VWUMR4IC.js} +1 -1
  287. package/dist/bundle/chunks/chunk-W2Z6LYL6.js +11 -0
  288. package/dist/bundle/chunks/{chunk-CFBEDNHJ.js → chunk-W5J5ADJF.js} +7 -7
  289. package/dist/bundle/chunks/{chunk-V2SOLEQN.js → chunk-XHFP44Y4.js} +1 -1
  290. package/dist/bundle/chunks/{chunk-KIGPB52X.js → chunk-XZ34OGNM.js} +1 -1
  291. package/dist/bundle/chunks/{chunk-A3D7NRT6.js → chunk-Y32R7EZP.js} +10 -10
  292. package/dist/bundle/chunks/chunk-YUFU7O6I.js +16 -0
  293. package/dist/bundle/chunks/{chunk-MFGH46GH.js → chunk-YZH7FUSY.js} +1 -1
  294. package/dist/bundle/chunks/{column-LKMDIDCH.js → column-F5JDBRV6.js} +1 -1
  295. package/dist/bundle/chunks/{cp-FKTQRFYJ.js → cp-LTFB4EUA.js} +1 -1
  296. package/dist/bundle/chunks/curl-XCX2ZQEA.js +30 -0
  297. package/dist/bundle/chunks/{cut-RWPUW5FY.js → cut-IRSHL3BB.js} +1 -1
  298. package/dist/bundle/chunks/{diff-CSARC7WF.js → diff-VDB6RXHO.js} +1 -1
  299. package/dist/bundle/chunks/{du-PR3M44X6.js → du-DOWSRLXR.js} +1 -1
  300. package/dist/bundle/chunks/{expr-UMT2OHZ7.js → expr-GZ4DABKB.js} +1 -1
  301. package/dist/bundle/chunks/{file-VEGKTTSF.js → file-UI6QJAAU.js} +1 -1
  302. package/dist/bundle/chunks/{find-PM3TD7V4.js → find-JTXDH3MR.js} +1 -1
  303. package/dist/bundle/chunks/flag-coverage-EDO3VM43.js +2 -0
  304. package/dist/bundle/chunks/{grep-5UPEO42U.js → grep-OZCR76FT.js} +1 -1
  305. package/dist/bundle/chunks/{gzip-ZINVK3M6.js → gzip-GQC6CWVL.js} +1 -1
  306. package/dist/bundle/chunks/{head-CFENJILH.js → head-J6RVJFRS.js} +1 -1
  307. package/dist/bundle/chunks/{help-QDDMBDU7.js → help-62M75TSG.js} +1 -1
  308. package/dist/bundle/chunks/{html-to-markdown-GGVR4YGL.js → html-to-markdown-7OG5VWYG.js} +1 -1
  309. package/dist/bundle/chunks/{jq-X2P7Q64K.js → jq-FCG2IUBK.js} +1 -1
  310. package/dist/bundle/chunks/js-exec-NDLXDUBN.js +1577 -0
  311. package/dist/bundle/chunks/{ln-VYDFOFNO.js → ln-OPY2ZVGQ.js} +1 -1
  312. package/dist/bundle/chunks/{ls-R5CQLZQM.js → ls-MQTYWW4T.js} +1 -1
  313. package/dist/bundle/chunks/{mkdir-WDDKK2P3.js → mkdir-4A5W3RXH.js} +1 -1
  314. package/dist/bundle/chunks/mktemp-XKIE5N3X.js +2 -0
  315. package/dist/bundle/chunks/{mv-XSJA2FNL.js → mv-ZPIATQJL.js} +1 -1
  316. package/dist/bundle/chunks/{od-BI6XJPXY.js → od-LUHOH7CG.js} +1 -1
  317. package/dist/bundle/chunks/{paste-LLZ3ZQR2.js → paste-U57ZU47S.js} +1 -1
  318. package/dist/bundle/chunks/python3-SDFCGIU4.js +22 -0
  319. package/dist/bundle/chunks/{readlink-IY6QKK2P.js → readlink-YNNS6F7K.js} +1 -1
  320. package/dist/bundle/chunks/{rg-UQE6KUBP.js → rg-F4SX2PHI.js} +1 -1
  321. package/dist/bundle/chunks/{rm-JQ4GDKDD.js → rm-3XUUYAXQ.js} +1 -1
  322. package/dist/bundle/chunks/{rmdir-WZKAT6M5.js → rmdir-OGSEXEF4.js} +1 -1
  323. package/dist/bundle/chunks/{sed-JW2JDLSI.js → sed-MBB5SXGD.js} +1 -1
  324. package/dist/bundle/chunks/{seq-5R2GKXC6.js → seq-IN77HD3S.js} +1 -1
  325. package/dist/bundle/chunks/{sleep-PPRBTSVR.js → sleep-3QNP3BGR.js} +1 -1
  326. package/dist/bundle/chunks/{split-2SD6EP72.js → split-6R2TSQY6.js} +1 -1
  327. package/dist/bundle/chunks/{sqlite3-UVVRYDAL.js → sqlite3-7MBPFI6W.js} +1 -1
  328. package/dist/bundle/chunks/sqlite3-worker.js +75 -11
  329. package/dist/bundle/chunks/{stat-6KILP5AL.js → stat-YLVJ4L67.js} +1 -1
  330. package/dist/bundle/chunks/{tail-BDNMS4FR.js → tail-UGFWX3YY.js} +1 -1
  331. package/dist/bundle/chunks/{tar-6365WH6H.js → tar-BNHPWTOY.js} +1 -1
  332. package/dist/bundle/chunks/{time-NERE2JJ2.js → time-N6J6DC6C.js} +1 -1
  333. package/dist/bundle/chunks/timeout-ZHCL5KTP.js +2 -0
  334. package/dist/bundle/chunks/{tr-3I4MDKIF.js → tr-4NGL47UU.js} +1 -1
  335. package/dist/bundle/chunks/worker.js +88 -15
  336. package/dist/bundle/chunks/{xan-HUOXKUQA.js → xan-7R3I2DJO.js} +1 -1
  337. package/dist/bundle/chunks/xan-view-S4ZILLPU.js +2 -0
  338. package/dist/bundle/chunks/yes-I7SAR7XX.js +2 -0
  339. package/dist/bundle/chunks/yq-IOMBQYB2.js +2 -0
  340. package/dist/bundle/index.cjs +2862 -1489
  341. package/dist/bundle/index.js +349 -344
  342. package/dist/commands/curl/response-formatting.d.ts +2 -2
  343. package/dist/commands/curl/types.d.ts +5 -0
  344. package/dist/commands/diff/format.d.ts +46 -0
  345. package/dist/commands/js-exec/js-exec.d.ts +1 -10
  346. package/dist/commands/js-exec/run-runtime.d.ts +10 -0
  347. package/dist/commands/mktemp/mktemp.d.ts +4 -0
  348. package/dist/commands/registry.d.ts +1 -1
  349. package/dist/commands/sqlite3/worker.js +75 -11
  350. package/dist/commands/worker-request-controller.d.ts +3 -23
  351. package/dist/commands/yes/yes.d.ts +4 -0
  352. package/dist/custom-commands.d.ts +7 -0
  353. package/dist/fs/create-exclusive.d.ts +30 -0
  354. package/dist/fs/in-memory-fs/in-memory-fs.d.ts +8 -1
  355. package/dist/fs/interface.d.ts +37 -0
  356. package/dist/fs/mountable-fs/mountable-fs.d.ts +20 -1
  357. package/dist/fs/overlay-fs/overlay-fs.d.ts +9 -1
  358. package/dist/fs/read-write-fs/read-write-fs.d.ts +27 -1
  359. package/dist/fs/traversal.d.ts +9 -0
  360. package/dist/index.d.cts +1 -1
  361. package/dist/index.d.ts +1 -1
  362. package/dist/interpreter/expansion/array-prefix-suffix.d.ts +2 -1
  363. package/dist/interpreter/expansion/parameter-ops.d.ts +1 -0
  364. package/dist/interpreter/expansion/pattern-removal.d.ts +3 -0
  365. package/dist/interpreter/expansion/variable.d.ts +1 -1
  366. package/dist/interpreter/helpers/loop.d.ts +32 -0
  367. package/dist/interpreter/helpers/substitution-status.d.ts +34 -0
  368. package/dist/interpreter/interpreter.d.ts +1 -1
  369. package/dist/interpreter/types.d.ts +8 -1
  370. package/dist/limits.d.ts +2 -0
  371. package/dist/network/allow-list/shared.d.ts +0 -8
  372. package/dist/network/dns-pin.d.ts +1 -35
  373. package/dist/network/fetch.d.ts +4 -6
  374. package/dist/network/types.d.ts +20 -2
  375. package/dist/security/blocked-globals.d.ts +60 -0
  376. package/dist/security/defense-context.d.ts +13 -0
  377. package/dist/security/defense-in-depth-box.d.ts +361 -0
  378. package/dist/security/index.d.ts +33 -0
  379. package/dist/security/safe-timestamp.d.ts +1 -0
  380. package/dist/security/security-violation-logger.d.ts +99 -0
  381. package/dist/security/trusted-globals.d.ts +25 -0
  382. package/dist/security/types.d.ts +151 -0
  383. package/dist/security/violation-error-message.d.ts +3 -0
  384. package/dist/security/wasm-callback.d.ts +6 -0
  385. package/dist/security/worker-defense-in-depth.d.ts +235 -0
  386. package/dist/transform/pipeline.d.ts +8 -0
  387. package/dist/transform/plugins/command-collector.d.ts +15 -0
  388. package/dist/transform/plugins/tee-plugin.d.ts +40 -0
  389. package/dist/transform/serialize.d.ts +4 -0
  390. package/dist/transform/types.d.ts +18 -0
  391. package/dist/types.d.ts +4 -3
  392. package/dist/worker-lifecycle.d.ts +27 -0
  393. package/package.json +15 -14
  394. package/dist/bin/chunks/awk2-C4A37H5N.js +0 -3
  395. package/dist/bin/chunks/chunk-23OI2XDJ.js +0 -20
  396. package/dist/bin/chunks/chunk-2ORJ5HTY.js +0 -276
  397. package/dist/bin/chunks/chunk-3PCPQIUD.js +0 -3
  398. package/dist/bin/chunks/chunk-7WBCA2BB.js +0 -3
  399. package/dist/bin/chunks/chunk-APV27ZZW.js +0 -21
  400. package/dist/bin/chunks/chunk-CPTQXTBJ.js +0 -3
  401. package/dist/bin/chunks/chunk-FE6GSISP.js +0 -22
  402. package/dist/bin/chunks/chunk-HL7NFZVQ.js +0 -13
  403. package/dist/bin/chunks/chunk-HWI42GQO.js +0 -7
  404. package/dist/bin/chunks/chunk-JQM3DKCH.js +0 -12
  405. package/dist/bin/chunks/chunk-TOTKK2XI.js +0 -16
  406. package/dist/bin/chunks/chunk-YTL6DXBO.js +0 -11
  407. package/dist/bin/chunks/curl-FS5LAEYI.js +0 -30
  408. package/dist/bin/chunks/flag-coverage-DOLZIUQ7.js +0 -3
  409. package/dist/bin/chunks/js-exec-DJQLXWCS.js +0 -99
  410. package/dist/bin/chunks/js-exec-worker.js +0 -4809
  411. package/dist/bin/chunks/python3-JCJHSX4Z.js +0 -14
  412. package/dist/bin/chunks/timeout-YGFHQJKX.js +0 -3
  413. package/dist/bin/chunks/undici-CKF2L2IP.js +0 -141
  414. package/dist/bin/chunks/yq-K5N5JD4N.js +0 -3
  415. package/dist/bin/shell/chunks/awk2-C4A37H5N.js +0 -3
  416. package/dist/bin/shell/chunks/chunk-23OI2XDJ.js +0 -20
  417. package/dist/bin/shell/chunks/chunk-2ORJ5HTY.js +0 -276
  418. package/dist/bin/shell/chunks/chunk-3PCPQIUD.js +0 -3
  419. package/dist/bin/shell/chunks/chunk-7WBCA2BB.js +0 -3
  420. package/dist/bin/shell/chunks/chunk-APV27ZZW.js +0 -21
  421. package/dist/bin/shell/chunks/chunk-CPTQXTBJ.js +0 -3
  422. package/dist/bin/shell/chunks/chunk-FE6GSISP.js +0 -22
  423. package/dist/bin/shell/chunks/chunk-HL7NFZVQ.js +0 -13
  424. package/dist/bin/shell/chunks/chunk-HWI42GQO.js +0 -7
  425. package/dist/bin/shell/chunks/chunk-JQM3DKCH.js +0 -12
  426. package/dist/bin/shell/chunks/chunk-TOTKK2XI.js +0 -16
  427. package/dist/bin/shell/chunks/chunk-YTL6DXBO.js +0 -11
  428. package/dist/bin/shell/chunks/curl-FS5LAEYI.js +0 -30
  429. package/dist/bin/shell/chunks/flag-coverage-DOLZIUQ7.js +0 -3
  430. package/dist/bin/shell/chunks/js-exec-DJQLXWCS.js +0 -99
  431. package/dist/bin/shell/chunks/python3-JCJHSX4Z.js +0 -14
  432. package/dist/bin/shell/chunks/timeout-YGFHQJKX.js +0 -3
  433. package/dist/bin/shell/chunks/undici-CKF2L2IP.js +0 -141
  434. package/dist/bin/shell/chunks/yq-K5N5JD4N.js +0 -3
  435. package/dist/bundle/chunks/awk2-NPLZQ3K7.js +0 -2
  436. package/dist/bundle/chunks/chunk-6DTD75TR.js +0 -275
  437. package/dist/bundle/chunks/chunk-6KK46B7Q.js +0 -12
  438. package/dist/bundle/chunks/chunk-AH7VTVWU.js +0 -2
  439. package/dist/bundle/chunks/chunk-BRJERIF4.js +0 -2
  440. package/dist/bundle/chunks/chunk-ELHOZMBD.js +0 -10
  441. package/dist/bundle/chunks/chunk-INDA53JL.js +0 -21
  442. package/dist/bundle/chunks/chunk-KBXRZGTY.js +0 -15
  443. package/dist/bundle/chunks/chunk-N3A4JVFJ.js +0 -2
  444. package/dist/bundle/chunks/chunk-UTKGYVUZ.js +0 -7
  445. package/dist/bundle/chunks/chunk-XMMV24SP.js +0 -20
  446. package/dist/bundle/chunks/chunk-YJKHREBZ.js +0 -11
  447. package/dist/bundle/chunks/chunk-ZBUZKIPX.js +0 -6
  448. package/dist/bundle/chunks/curl-DEHFBW27.js +0 -29
  449. package/dist/bundle/chunks/flag-coverage-I6UJUKQ4.js +0 -2
  450. package/dist/bundle/chunks/js-exec-XKF2B7C3.js +0 -98
  451. package/dist/bundle/chunks/js-exec-worker.js +0 -4809
  452. package/dist/bundle/chunks/python3-F5S5TYGS.js +0 -13
  453. package/dist/bundle/chunks/timeout-C6WDYPLV.js +0 -2
  454. package/dist/bundle/chunks/undici-PSPBDOYF.js +0 -140
  455. package/dist/bundle/chunks/xan-view-RT2WKDOQ.js +0 -2
  456. package/dist/bundle/chunks/yq-MI27NZ2U.js +0 -2
  457. package/dist/commands/js-exec/js-exec-worker.d.ts +0 -33
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as g}from"./chunk-3MRB66F4.js";import{c as p}from"./chunk-TW2IJRUF.js";import{a as h}from"./chunk-MROECM42.js";import{a as f}from"./chunk-PBOVSFTJ.js";var T={name:"time",async execute(r,s){let a="%e %M",o=null,u=!1,c=!1,t=0;for(;t<r.length;){let e=r[t];if(e==="-f"||e==="--format"){if(t++,t>=r.length)return{stdout:"",stderr:`time: missing argument to '-f'
3
+ import{a as g}from"./chunk-3MRB66F4.js";import{c as p}from"./chunk-ENEHPI32.js";import{a as h}from"./chunk-MROECM42.js";import{a as f}from"./chunk-PBOVSFTJ.js";var T={name:"time",async execute(r,s){let a="%e %M",o=null,u=!1,c=!1,t=0;for(;t<r.length;){let e=r[t];if(e==="-f"||e==="--format"){if(t++,t>=r.length)return{stdout:"",stderr:`time: missing argument to '-f'
4
4
  `,exitCode:1};a=r[t],t++}else if(e==="-o"||e==="--output"){if(t++,t>=r.length)return{stdout:"",stderr:`time: missing argument to '-o'
5
5
  `,exitCode:1};o=r[t],t++}else if(e==="-a"||e==="--append")u=!0,t++;else if(e==="-v"||e==="--verbose")a=`Command being timed: %C
6
6
  Elapsed (wall clock) time: %e seconds
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ var t=class extends Error{code="ENOSYS";constructor(e,r){super(`ENOSYS: filesystem cannot create entries atomically, ${r} '${e}'`),this.name="ExclusiveCreateUnsupportedError"}};async function a(c,e,r){if(!c.createExclusive)throw new t(e,r.directory?"mkdir":"open");await c.createExclusive(e,r)}export{t as a,a as b};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{d as B}from"./chunk-CPTQXTBJ.js";import{l as y}from"./chunk-LCP3IKI7.js";import{a as C,b as I}from"./chunk-CPKBPQ2C.js";import{a as L}from"./chunk-NE4R2FVV.js";import{a as v,b as E}from"./chunk-MUFNRCMY.js";var H={name:"column",summary:"columnate lists",usage:"column [OPTION]... [FILE]...",description:"Format input into multiple columns. By default, fills rows first. Use -t to create a table based on whitespace-delimited input.",options:["-t Create a table (determine columns from input)","-s SEP Input field delimiter (default: whitespace)","-o SEP Output field delimiter (default: two spaces)","-c WIDTH Output width for fill mode (default: 80)","-n Don't merge multiple adjacent delimiters"],examples:["ls | column # Fill columns with ls output","cat data | column -t # Format as table","column -t -s ',' file # Format CSV as table","column -c 40 file # Fill 40-char wide columns"]},M={table:{short:"t",long:"table",type:"boolean"},separator:{short:"s",type:"string"},outputSep:{short:"o",type:"string"},width:{short:"c",type:"number",default:80},noMerge:{short:"n",type:"boolean"}};function $(t,e,i,l){return e?i?t.split(e,l):t.split(e,l).filter(n=>n.length>0):i?t.split(/[ \t]/,l):t.split(/[ \t]+/,l).filter(n=>n.length>0)}function T(t){let e=[];for(let i of t)for(let l=0;l<i.length;l++){let n=i[l].length;(e[l]===void 0||n>e[l])&&(e[l]=n)}return e}function W(t,e,i){if(t.length===0)return"";let l=T(t),n=new B(i,"column",void 0,1);for(let c=0;c<t.length;c++){let r=t[c];c>0&&n.append(`
3
+ import{e as B}from"./chunk-QKWMWSV3.js";import{l as y}from"./chunk-LCP3IKI7.js";import{a as C,b as I}from"./chunk-CPKBPQ2C.js";import{a as L}from"./chunk-NE4R2FVV.js";import{a as v,b as E}from"./chunk-MUFNRCMY.js";var H={name:"column",summary:"columnate lists",usage:"column [OPTION]... [FILE]...",description:"Format input into multiple columns. By default, fills rows first. Use -t to create a table based on whitespace-delimited input.",options:["-t Create a table (determine columns from input)","-s SEP Input field delimiter (default: whitespace)","-o SEP Output field delimiter (default: two spaces)","-c WIDTH Output width for fill mode (default: 80)","-n Don't merge multiple adjacent delimiters"],examples:["ls | column # Fill columns with ls output","cat data | column -t # Format as table","column -t -s ',' file # Format CSV as table","column -c 40 file # Fill 40-char wide columns"]},M={table:{short:"t",long:"table",type:"boolean"},separator:{short:"s",type:"string"},outputSep:{short:"o",type:"string"},width:{short:"c",type:"number",default:80},noMerge:{short:"n",type:"boolean"}};function $(t,e,i,l){return e?i?t.split(e,l):t.split(e,l).filter(n=>n.length>0):i?t.split(/[ \t]/,l):t.split(/[ \t]+/,l).filter(n=>n.length>0)}function T(t){let e=[];for(let i of t)for(let l=0;l<i.length;l++){let n=i[l].length;(e[l]===void 0||n>e[l])&&(e[l]=n)}return e}function W(t,e,i){if(t.length===0)return"";let l=T(t),n=new B(i,"column",void 0,1);for(let c=0;c<t.length;c++){let r=t[c];c>0&&n.append(`
4
4
  `);for(let o=0;o<r.length;o++)o>0&&n.append(e),n.append(r[o]),o<r.length-1&&n.repeat(" ",l[o]-r[o].length)}return n.build()}function z(t,e,i,l){if(t.length===0)return"";let n=0;for(let s of t)n=Math.max(n,s.length);let c=i.length,r=n+c,o=Math.max(1,Math.floor((e+c)/r)),b=Math.ceil(t.length/o),d=new B(l,"column",void 0,1);for(let s=0;s<b;s++){s>0&&d.append(`
5
5
  `);let u=!1;for(let h=0;h<o;h++){let a=h*b+s;a<t.length&&(h===o-1||(h+1)*b+s>=t.length?(u&&d.append(i),d.append(t[a])):(u&&d.append(i),d.append(t[a]),d.repeat(" ",n-t[a].length)),u=!0)}}return d.build()}var R={name:"column",execute:async(t,e)=>{if(E(t))return v(H);let i=L("column",t,M);if(!i.ok)return i.error;let{table:l,separator:n,outputSep:c,width:r,noMerge:o}=i.result.flags,b=i.result.positional,d=c??" ",s=Math.min(e.limits.maxInputBytes,e.limits.maxStringLength),u=e.limits.maxArrayElements,h=Math.min(e.limits.maxStringLength,e.limits.maxOutputSize);if(!Number.isFinite(r)||!Number.isSafeInteger(r)||r<=0||r>10*1024*1024)return{exitCode:1,stdout:"",stderr:`column: invalid width: ${r}
6
6
  `};let a;if(b.length===0)a=I(e.stdin)??"";else{let f=[],m=0;for(let g of b)if(g==="-"){let p=I(e.stdin)??"";if(m+=C(p),m>s)throw new y(`column: input size limit exceeded (${s} bytes)`,"string_length");f.push(p)}else{let p=e.fs.resolvePath(e.cwd,g),w=await e.fs.readFile(p);if(w===null)return{exitCode:1,stdout:"",stderr:`column: ${g}: No such file or directory
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as L}from"./chunk-O74FSWB4.js";import{a as $}from"./chunk-74TZ7ZF7.js";import{l as p}from"./chunk-LCP3IKI7.js";import{e as k}from"./chunk-CPKBPQ2C.js";import{a as x}from"./chunk-NE4R2FVV.js";import{a as F,b as q}from"./chunk-MUFNRCMY.js";var B={name:"cat",summary:"concatenate files and print on the standard output",usage:"cat [OPTION]... [FILE]...",options:["-A, --show-all equivalent to -vET","-b, --number-nonblank number nonempty output lines, overrides -n","-e equivalent to -vE","-E, --show-ends display $ at end of each line","-n, --number number all output lines","-s, --squeeze-blank suppress repeated empty output lines","-t equivalent to -vT","-T, --show-tabs display TAB characters as ^I","-u (ignored)","-v, --show-nonprinting use ^ and M- notation, except for LFD and TAB"," --help display this help and exit"]},I={number:{short:"n",long:"number",type:"boolean"},numberNonblank:{short:"b",long:"number-nonblank",type:"boolean"},showEnds:{short:"E",long:"show-ends",type:"boolean"},showTabs:{short:"T",long:"show-tabs",type:"boolean"},showNonprinting:{short:"v",long:"show-nonprinting",type:"boolean"},showAll:{short:"A",long:"show-all",type:"boolean"},squeeze:{short:"s",long:"squeeze-blank",type:"boolean"},vE:{short:"e",type:"boolean"},vT:{short:"t",type:"boolean"},ignored:{short:"u",type:"boolean"}},K={name:"cat",async execute(n,t){if(q(n))return F(B);let r=x("cat",n,I);if(!r.ok)return r.error;let e=r.result.flags,a=e.showEnds||e.showAll||e.vE,o=e.showTabs||e.showAll||e.vT,i=e.showNonprinting||e.showAll||e.vE||e.vT,c=e.squeeze,l=e.numberNonblank,f=e.number&&!l,s={numberAll:f,numberNonblank:l,showEnds:a,showTabs:o,showNonprinting:i,squeeze:c},m=r.result.positional,b=t.limits.maxStringLength,u=Math.min(b,t.limits.maxOutputSize),g=m.length===0?["-"]:m,h="",d=0,C=0,E,w=a||o||i||c||f||l,v="";for(let y of g)try{let T=y==="-"?t.stdin:await k(t.fs,t.fs.resolvePath(t.cwd,y)),A=T,z=A.length,N=Math.min(w?b:u,t.limits.maxInputBytes);if(z>N-C)throw new p(`cat: ${w?"input":"output"} size limit exceeded (${N} bytes)`,w?"string_length":"output_size");y!=="-"&&L(t,z,"cat"),C+=z,v+=A}catch(T){$(T),h+=`cat: ${y}: No such file or directory
3
+ import{a as L}from"./chunk-O74FSWB4.js";import{a as $}from"./chunk-IKUY74NG.js";import{l as p}from"./chunk-LCP3IKI7.js";import{e as k}from"./chunk-CPKBPQ2C.js";import{a as x}from"./chunk-NE4R2FVV.js";import{a as F,b as q}from"./chunk-MUFNRCMY.js";var B={name:"cat",summary:"concatenate files and print on the standard output",usage:"cat [OPTION]... [FILE]...",options:["-A, --show-all equivalent to -vET","-b, --number-nonblank number nonempty output lines, overrides -n","-e equivalent to -vE","-E, --show-ends display $ at end of each line","-n, --number number all output lines","-s, --squeeze-blank suppress repeated empty output lines","-t equivalent to -vT","-T, --show-tabs display TAB characters as ^I","-u (ignored)","-v, --show-nonprinting use ^ and M- notation, except for LFD and TAB"," --help display this help and exit"]},I={number:{short:"n",long:"number",type:"boolean"},numberNonblank:{short:"b",long:"number-nonblank",type:"boolean"},showEnds:{short:"E",long:"show-ends",type:"boolean"},showTabs:{short:"T",long:"show-tabs",type:"boolean"},showNonprinting:{short:"v",long:"show-nonprinting",type:"boolean"},showAll:{short:"A",long:"show-all",type:"boolean"},squeeze:{short:"s",long:"squeeze-blank",type:"boolean"},vE:{short:"e",type:"boolean"},vT:{short:"t",type:"boolean"},ignored:{short:"u",type:"boolean"}},K={name:"cat",async execute(n,t){if(q(n))return F(B);let r=x("cat",n,I);if(!r.ok)return r.error;let e=r.result.flags,a=e.showEnds||e.showAll||e.vE,o=e.showTabs||e.showAll||e.vT,i=e.showNonprinting||e.showAll||e.vE||e.vT,c=e.squeeze,l=e.numberNonblank,f=e.number&&!l,s={numberAll:f,numberNonblank:l,showEnds:a,showTabs:o,showNonprinting:i,squeeze:c},m=r.result.positional,b=t.limits.maxStringLength,u=Math.min(b,t.limits.maxOutputSize),g=m.length===0?["-"]:m,h="",d=0,C=0,E,w=a||o||i||c||f||l,v="";for(let y of g)try{let T=y==="-"?t.stdin:await k(t.fs,t.fs.resolvePath(t.cwd,y)),A=T,z=A.length,N=Math.min(w?b:u,t.limits.maxInputBytes);if(z>N-C)throw new p(`cat: ${w?"input":"output"} size limit exceeded (${N} bytes)`,w?"string_length":"output_size");y!=="-"&&L(t,z,"cat"),C+=z,v+=A}catch(T){$(T),h+=`cat: ${y}: No such file or directory
4
4
  `,d=1}return w?E=_(v,s,u,t.limits.maxArrayElements):E=v,{stdout:E,stderr:h,exitCode:d,stdoutEncoding:"binary"}}};function S(n){if(n>=32){if(n<127)return String.fromCharCode(n);if(n===127)return"^?";let t=n-128;return t>=32?t===127?"M-^?":`M-${String.fromCharCode(t)}`:`M-^${String.fromCharCode(t+64)}`}return`^${String.fromCharCode(n+64)}`}function M(n,t,r){if(!t.showNonprinting&&!t.showTabs)return n;let e="",a=o=>{if(o.length>r-e.length)throw new p("cat: output size limit exceeded","output_size");e+=o};for(let o=0;o<n.length;o++){let i=n.charCodeAt(o);i===9?a(t.showTabs?"^I":" "):t.showNonprinting?a(S(i)):a(n[o])}return e}function _(n,t,r,e){let a=1;for(let s=0;s<n.length;s++)if(n.charCodeAt(s)===10&&a++,a>e)throw new p(`cat: array element limit exceeded (${e})`,"array_elements");let o=n.split(`
5
5
  `),i="",c=1,l=!1,f=s=>{if(s.length>r-i.length)throw new p(`cat: output size limit exceeded (${r} bytes)`,"output_size");i+=s};for(let s=0;s<o.length;s++){let m=s===o.length-1,b=!m,u=o[s];if(m&&u==="")break;let g=u==="";if(t.squeeze&&g&&l)continue;l=g;let h="";(t.numberAll||t.numberNonblank&&!g)&&(h=`${String(c).padStart(6," ")} `,c++);let d=r-i.length-h.length;if(d<0)throw new p(`cat: output size limit exceeded (${r} bytes)`,"output_size");f(h+M(u,t,d)),b&&f(t.showEnds?`$
6
6
  `:`
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import*as M from"node:async_hooks";import*as $ from"node:module";var P;function T(){return P||_(),P}function _(){let l=[{prop:"Function",target:globalThis,violationType:"function_constructor",strategy:"throw",reason:"Function constructor allows arbitrary code execution"},{prop:"eval",target:globalThis,violationType:"eval",strategy:"throw",reason:"eval() allows arbitrary code execution"},{prop:"setTimeout",target:globalThis,violationType:"setTimeout",strategy:"throw",reason:"setTimeout with string argument allows code execution"},{prop:"setInterval",target:globalThis,violationType:"setInterval",strategy:"throw",reason:"setInterval with string argument allows code execution"},{prop:"setImmediate",target:globalThis,violationType:"setImmediate",strategy:"throw",reason:"setImmediate could be used to escape sandbox context"},{prop:"env",target:process,violationType:"process_env",strategy:"throw",reason:"process.env could leak sensitive environment variables",allowedKeys:new Set(["NODE_V8_COVERAGE","NODE_DEBUG","NODE_DEBUG_NATIVE","NODE_COMPILE_CACHE","NODE_ENV","WATCH_REPORT_DEPENDENCIES","FORCE_COLOR","DEBUG","UNDICI_NO_FG","JEST_WORKER_ID","__MINIMATCH_TESTING_PLATFORM__","LOG_TOKENS","LOG_STREAM"])},{prop:"binding",target:process,violationType:"process_binding",strategy:"throw",reason:"process.binding provides access to native Node.js modules"},{prop:"_linkedBinding",target:process,violationType:"process_binding",strategy:"throw",reason:"process._linkedBinding provides access to native Node.js modules"},{prop:"dlopen",target:process,violationType:"process_dlopen",strategy:"throw",reason:"process.dlopen allows loading native addons"},{prop:"getBuiltinModule",target:process,violationType:"process_get_builtin_module",strategy:"throw",reason:"process.getBuiltinModule allows loading native Node.js modules (fs, child_process, vm)"},{prop:"exit",target:process,violationType:"process_exit",strategy:"throw",reason:"process.exit could terminate the interpreter"},{prop:"abort",target:process,violationType:"process_exit",strategy:"throw",reason:"process.abort could crash the interpreter"},{prop:"kill",target:process,violationType:"process_kill",strategy:"throw",reason:"process.kill could signal other processes"},{prop:"setuid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setuid could escalate privileges"},{prop:"setgid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setgid could escalate privileges"},{prop:"seteuid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.seteuid could escalate effective user privileges"},{prop:"setegid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setegid could escalate effective group privileges"},{prop:"initgroups",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.initgroups could modify supplementary group IDs"},{prop:"setgroups",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setgroups could modify supplementary group IDs"},{prop:"umask",target:process,violationType:"process_umask",strategy:"throw",reason:"process.umask could modify file creation permissions"},{prop:"argv",target:process,violationType:"process_argv",strategy:"throw",reason:"process.argv may contain secrets in CLI arguments"},{prop:"cwd",target:process,violationType:"process_chdir",strategy:"throw",reason:"process.cwd could disclose real host working directory path"},{prop:"chdir",target:process,violationType:"process_chdir",strategy:"throw",reason:"process.chdir could confuse the interpreter's CWD tracking"},{prop:"report",target:process,violationType:"process_report",strategy:"throw",reason:"process.report could disclose full environment, host paths, and system info"},{prop:"loadEnvFile",target:process,violationType:"process_env",strategy:"throw",reason:"process.loadEnvFile could load env files bypassing env proxy"},{prop:"setUncaughtExceptionCaptureCallback",target:process,violationType:"process_exception_handler",strategy:"throw",reason:"setUncaughtExceptionCaptureCallback could intercept security errors"},...["on","once","addListener","prependListener","prependOnceListener"].map(t=>({prop:t,target:process,violationType:"process_exception_handler",strategy:"throw",reason:"process-global listeners can outlive the sandbox and lose its security context"})),{prop:"send",target:process,violationType:"process_send",strategy:"throw",reason:"process.send could communicate with parent process in IPC contexts"},{prop:"channel",target:process,violationType:"process_channel",strategy:"throw",reason:"process.channel could access IPC channel to parent process"},{prop:"cpuUsage",target:process,violationType:"process_timing",strategy:"throw",reason:"process.cpuUsage could enable timing side-channel attacks"},{prop:"memoryUsage",target:process,violationType:"process_timing",strategy:"throw",reason:"process.memoryUsage could enable timing side-channel attacks"},{prop:"hrtime",target:process,violationType:"process_timing",strategy:"throw",reason:"process.hrtime could enable timing side-channel attacks"},{prop:"WeakRef",target:globalThis,violationType:"weak_ref",strategy:"throw",reason:"WeakRef could be used to leak references outside sandbox"},{prop:"FinalizationRegistry",target:globalThis,violationType:"finalization_registry",strategy:"throw",reason:"FinalizationRegistry could be used to leak references outside sandbox"},{prop:"Reflect",target:globalThis,violationType:"reflect",strategy:"freeze",reason:"Reflect provides introspection capabilities"},{prop:"Proxy",target:globalThis,violationType:"proxy",strategy:"throw",reason:"Proxy allows intercepting and modifying object behavior"},{prop:"WebAssembly",target:globalThis,violationType:"webassembly",strategy:"throw",reason:"WebAssembly allows executing arbitrary compiled code"},{prop:"SharedArrayBuffer",target:globalThis,violationType:"shared_array_buffer",strategy:"throw",reason:"SharedArrayBuffer could enable side-channel communication or timing attacks"},{prop:"Atomics",target:globalThis,violationType:"atomics",strategy:"throw",reason:"Atomics could enable side-channel communication or timing attacks"},{prop:"performance",target:globalThis,violationType:"performance_timing",strategy:"throw",reason:"performance.now() provides sub-millisecond timing for side-channel attacks"},{prop:"stdout",target:process,violationType:"process_stdout",strategy:"throw",reason:"process.stdout could bypass interpreter output to write to host stdout"},{prop:"stderr",target:process,violationType:"process_stderr",strategy:"throw",reason:"process.stderr could bypass interpreter output to write to host stderr"},{prop:"__defineGetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__defineGetter__ allows prototype pollution via getter injection"},{prop:"__defineSetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__defineSetter__ allows prototype pollution via setter injection"},{prop:"__lookupGetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__lookupGetter__ enables introspection for prototype pollution attacks"},{prop:"__lookupSetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__lookupSetter__ enables introspection for prototype pollution attacks"},{prop:"JSON",target:globalThis,violationType:"json_mutation",strategy:"freeze",reason:"Freeze JSON to prevent mutation of parsing/serialization"},{prop:"Math",target:globalThis,violationType:"math_mutation",strategy:"freeze",reason:"Freeze Math to prevent mutation of math utilities"}];try{let t=Object.getPrototypeOf(async()=>{}).constructor;t&&t!==Function&&l.push({prop:"constructor",target:Object.getPrototypeOf(async()=>{}),violationType:"async_function_constructor",strategy:"throw",reason:"AsyncFunction constructor allows arbitrary async code execution"})}catch{}try{let t=Object.getPrototypeOf(function*(){}).constructor;t&&t!==Function&&l.push({prop:"constructor",target:Object.getPrototypeOf(function*(){}),violationType:"generator_function_constructor",strategy:"throw",reason:"GeneratorFunction constructor allows arbitrary generator code execution"})}catch{}try{let t=Object.getPrototypeOf(async function*(){}).constructor;t&&t!==Function&&t!==Object.getPrototypeOf(async()=>{}).constructor&&l.push({prop:"constructor",target:Object.getPrototypeOf(async function*(){}),violationType:"async_generator_function_constructor",strategy:"throw",reason:"AsyncGeneratorFunction constructor allows arbitrary async generator code execution"})}catch{}let e=l.filter(t=>{try{return t.target[t.prop]!==void 0}catch{return!1}});return P??=new Set(e.map(({violationType:t})=>t)),e}var F=performance.timeOrigin,R=performance.now.bind(performance);function E(){return Math.floor(F+R())}var D=new Set(["function_constructor","async_function_constructor","generator_function_constructor","async_generator_function_constructor"]);function O(l){let e=l?.find(t=>D.has(t));if(e)throw new RangeError(`defenseInDepth.excludeViolationTypes cannot disable the non-excludable "${e}" protection`)}var V=`
4
+
5
+ This is a defense-in-depth measure and indicates a bug in just-bash. Please report this at security@vercel.com`;function S(l,e,t){let i=t&&!D.has(e)?`
6
+
7
+ If this access is required by trusted host-runtime code, add "${e}" to defenseInDepth.excludeViolationTypes.`:"";return l+V+i}var b=typeof __BROWSER__<"u"&&__BROWSER__;function I(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,l=>{let e=Math.random()*16|0;return(l==="x"?e:e&3|8).toString(16)})}var k=null,v=null,j=null;if(!b)try{k=M.AsyncLocalStorage,v=$,j=v.Module??v.default??null}catch{}var d=class extends Error{violation;constructor(e,t){super(S(e,t.type,t.type==="error_prepare_stack_trace"||T().has(t.type))),this.violation=t,this.name="SecurityViolationError"}},p=!b&&k?new k:null,G=1e3;function L(l,e,...t){return p.run(l,()=>e(...t))}var N={enabled:!0,auditMode:!1,processLifetimeIntrinsicHardening:!1};function C(){return!b&&typeof v?.registerHooks=="function"}function A(l){let e=typeof l=="boolean"?{enabled:l}:l??{};if(O(e.excludeViolationTypes),e.enabled!==void 0&&e.enabled!==!0&&e.enabled!==!1&&e.enabled!=="auto")throw new RangeError('defenseInDepth.enabled must be true, false, or "auto"');let t={...N,...e},i=t.enabled==="auto"?"auto":t.enabled?"enabled":"disabled",o={...t,enabled:i!=="disabled",requested:i};return o.excludeViolationTypes&&(o.excludeViolationTypes=[...new Set(o.excludeViolationTypes)].sort()),o}function H(l,e){if(l.enabled!==e.enabled||l.auditMode!==e.auditMode||l.processLifetimeIntrinsicHardening!==e.processLifetimeIntrinsicHardening||l.onViolation!==e.onViolation)return!1;let t=l.excludeViolationTypes??[],i=e.excludeViolationTypes??[];return t.length===i.length&&t.every((o,r)=>o===i[r])}var B=class l{static instance=null;static importHooksRegistered=!1;static trustedExecutionDepth=new Map;config;refCount=0;patchFailures=[];activeExecutionIds=new Set;contextCache=new Map;originalDescriptors=[];moduleAccessorResets=[];temporaryIntrinsicDescriptors=[];violations=[];activationTime=0;totalActiveTimeMs=0;constructor(e){this.config=e}static getInstance(e){let t=A(e);if(!l.instance)l.instance=new l(t);else{let i=l.instance.config;if(!H(t,i))throw new Error("DefenseInDepthBox config conflict: all resolved defense options, including exclusions and the violation callback, must match across Bash instances. Call DefenseInDepthBox.resetInstance() between incompatible configurations.")}return l.instance}static resetInstance(){l.instance&&(l.instance.forceDeactivate(),l.instance=null),l.trustedExecutionDepth.clear()}static isInSandboxedContext(){return p?p?.getStore()?.sandboxActive===!0:!1}static getCurrentExecutionId(){if(p)return p?.getStore()?.executionId}static enterTrustedScope(e){let t=l.trustedExecutionDepth.get(e)??0;l.trustedExecutionDepth.set(e,t+1)}static leaveTrustedScope(e){let t=l.trustedExecutionDepth.get(e);if(t){if(t===1){l.trustedExecutionDepth.delete(e);return}l.trustedExecutionDepth.set(e,t-1)}}static isTrustedScopeActive(e){return e?(l.trustedExecutionDepth.get(e)??0)>0:!1}static isTrustedContext(e){return!e||e.forceUntrusted?!1:e.trusted===!0||l.isTrustedScopeActive(e.executionId)}isExecutionIdActive(e){return this.activeExecutionIds.has(e)}getCachedContext(e){let t=this.contextCache.get(e);return t||(t={sandboxActive:!0,executionId:e},this.contextCache.set(e,t)),t}static bindCurrentContext(e){if(!p)return e;let t=p.getStore(),i=t?.sandboxActive===!0?t.executionId:void 0;if(!i)return e;let r=l.instance?.getCachedContext(i)??{sandboxActive:!0,executionId:i},s=t?.forceUntrusted?{...r,forceUntrusted:!0}:r;return((...n)=>{let c=l.instance;if(!(c&&!c.isExecutionIdActive(i)&&(c.recordViolation("bound_callback_after_deactivate","bound callback","Bound callback blocked after originating execution was deactivated"),!c.config.auditMode)))return L(s,e,...n)})}isEnabled(){return this.getStatus().state==="enabled"}getStatus(){let e=C();return this.config.requested==="disabled"?{requested:"disabled",state:"disabled",level:"none",contextualDynamicImportProtection:e,processLifetimeIntrinsicHardening:this.config.processLifetimeIntrinsicHardening===!0,intrinsicProtection:this.config.processLifetimeIntrinsicHardening?"process-lifetime":"scoped-best-effort"}:!p||b?{requested:this.config.requested,state:"unsupported",level:"none",contextualDynamicImportProtection:!1,processLifetimeIntrinsicHardening:this.config.processLifetimeIntrinsicHardening===!0,intrinsicProtection:this.config.processLifetimeIntrinsicHardening?"process-lifetime":"scoped-best-effort",reason:"context-aware ESM loader hooks (node:module.registerHooks) are unavailable"}:{requested:this.config.requested,state:"enabled",level:this.config.auditMode?"none":e?"full":"best-effort",contextualDynamicImportProtection:e,processLifetimeIntrinsicHardening:this.config.processLifetimeIntrinsicHardening===!0,intrinsicProtection:this.config.processLifetimeIntrinsicHardening?"process-lifetime":"scoped-best-effort",reason:this.config.auditMode?"audit mode records violations but does not block them":e?void 0:"best-effort protection; context-aware ESM loader hooks are unavailable"}}updateConfig(e){if(this.refCount>0)throw new Error("DefenseInDepthBox configuration cannot change while protection is active");this.config=A({...this.config,...e})}activate(){if(!b&&this.config.enabled&&!p)throw new Error("DefenseInDepthBox: enabled protection requires node:async_hooks and node:module");if(b||!this.config.enabled){let i=I(),o=!1;return{run:r=>o?Promise.reject(new Error("DefenseInDepthBox handle is deactivated and cannot run new work")):r(),deactivate:()=>{o=!0},executionId:i}}if(this.refCount++,this.refCount===1){try{this.applyPatches()}catch(i){throw this.restorePatches(),this.activeExecutionIds.clear(),this.contextCache.clear(),this.refCount=0,i}this.activationTime=Date.now()}let e=I(),t=!1;return{run:i=>t?Promise.reject(new Error("DefenseInDepthBox handle is deactivated and cannot run new work")):(this.activeExecutionIds.add(e),p.run({sandboxActive:!0,executionId:e},i)),deactivate:()=>{t||(t=!0,this.activeExecutionIds.delete(e),this.contextCache.delete(e),l.trustedExecutionDepth.delete(e),this.refCount--,this.refCount===0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.refCount<0&&(this.refCount=0))},executionId:e}}forceDeactivate(){this.refCount>0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.activeExecutionIds.clear(),this.contextCache.clear(),this.refCount=0}isActive(){return this.refCount>0}getStats(){return{violationsBlocked:this.violations.length,violations:[...this.violations],activeTimeMs:this.totalActiveTimeMs+(this.refCount>0?Date.now()-this.activationTime:0),refCount:this.refCount}}getPatchFailures(){return[...this.patchFailures]}clearViolations(){this.violations=[]}getPathForTarget(e,t){return e===globalThis?`globalThis.${t}`:e===process?`process.${t}`:e===Error?`Error.${t}`:e===Function.prototype?`Function.prototype.${t}`:e===Object.prototype?`Object.prototype.${t}`:`<object>.${t}`}static runTrusted(e){if(!p)return e();let t=p.getStore();if(!t)return e();let{executionId:i}=t;return p.run({...t,trusted:!0,forceUntrusted:!1},()=>{l.enterTrustedScope(i);try{let o=e();return typeof o=="object"&&o!==null&&"finally"in o&&typeof o.finally=="function"?o.finally(()=>{l.leaveTrustedScope(i)}):(l.leaveTrustedScope(i),o)}catch(o){throw l.leaveTrustedScope(i),o}})}static async runTrustedAsync(e){if(!p)return e();let t=p.getStore();if(!t)return e();let{executionId:i}=t;return await p.run({...t,trusted:!0,forceUntrusted:!1},async()=>{l.enterTrustedScope(i);try{return await e()}finally{l.leaveTrustedScope(i)}})}static async runUntrustedAsync(e){if(!p)return e();let t=p.getStore();return t?p.run({...t,trusted:!1,forceUntrusted:!0},e):e()}shouldBlock(){if(b||this.config.auditMode||!p)return!1;let e=p?.getStore();return!(e?.sandboxActive!==!0||l.isTrustedContext(e))}shouldAudit(){if(!this.config.auditMode||!p)return!1;let e=p.getStore();return e?.sandboxActive===!0&&!l.isTrustedContext(e)}recordViolation(e,t,i){let o={timestamp:E(),type:e,message:i,path:t,stack:new Error().stack,executionId:p?.getStore()?.executionId};if(this.violations.length<G&&this.violations.push(o),this.config.onViolation)try{this.config.onViolation(o)}catch(r){console.debug("[DefenseInDepthBox] onViolation callback threw:",r instanceof Error?r.message:r)}return o}createBlockingProxy(e,t,i){let o=this;return new Proxy(e,{apply(r,s,n){if(o.shouldBlock()){let c=`${t} is blocked during script execution`,a=o.recordViolation(i,t,c);throw new d(c,a)}return o.shouldAudit()&&o.recordViolation(i,t,`${t} called (audit mode)`),Reflect.apply(r,s,n)},construct(r,s,n){if(o.shouldBlock()){let c=`${t} constructor is blocked during script execution`,a=o.recordViolation(i,t,c);throw new d(c,a)}return o.shouldAudit()&&o.recordViolation(i,t,`${t} constructor called (audit mode)`),Reflect.construct(r,s,n)}})}createBlockingObjectProxy(e,t,i,o){let r=this;return new Proxy(e,{get(s,n,c){if(r.shouldBlock()){if(o&&typeof n=="string"&&o.has(n))return Reflect.get(s,n,c);let a=`${t}.${String(n)}`,u=`${a} is blocked during script execution`,h=r.recordViolation(i,a,u);throw new d(u,h)}if(r.shouldAudit()){let a=`${t}.${String(n)}`;r.recordViolation(i,a,`${a} accessed (audit mode)`)}return Reflect.get(s,n,c)},set(s,n,c,a){if(r.shouldBlock()){let u=`${t}.${String(n)}`,h=`${u} modification is blocked during script execution`,y=r.recordViolation(i,u,h);throw new d(h,y)}return t==="process.env"&&n==="DEBUG"?Reflect.set(s,n,c):Reflect.set(s,n,c,a)},ownKeys(s){if(r.shouldBlock()){let n=`${t} enumeration is blocked during script execution`,c=r.recordViolation(i,t,n);throw new d(n,c)}return Reflect.ownKeys(s)},getOwnPropertyDescriptor(s,n){if(r.shouldBlock()){let c=`${t}.${String(n)}`,a=`${c} descriptor access is blocked during script execution`,u=r.recordViolation(i,c,a);throw new d(a,u)}return Reflect.getOwnPropertyDescriptor(s,n)},has(s,n){if(r.shouldBlock()){let c=`${t}.${String(n)}`,a=`${c} existence check is blocked during script execution`,u=r.recordViolation(i,c,a);throw new d(a,u)}return Reflect.has(s,n)},deleteProperty(s,n){if(r.shouldBlock()){let c=`${t}.${String(n)}`,a=`${c} deletion is blocked during script execution`,u=r.recordViolation(i,c,a);throw new d(a,u)}return Reflect.deleteProperty(s,n)},setPrototypeOf(s,n){if(r.shouldBlock()){let c=`${t} setPrototypeOf is blocked during script execution`,a=r.recordViolation(i,t,c);throw new d(c,a)}return Reflect.setPrototypeOf(s,n)},defineProperty(s,n,c){if(r.shouldBlock()){let a=`${t}.${String(n)}`,u=`${a} defineProperty is blocked during script execution`,h=r.recordViolation(i,a,u);throw new d(u,h)}return Reflect.defineProperty(s,n,c)}})}createReadonlyObjectProxy(e,t,i){let o=this,r=s=>{let n=`${t} ${s} is blocked during script execution`,c=o.recordViolation(i,t,n);throw new d(n,c)};return new Proxy(e,{set(s,n,c,a){return o.shouldBlock()&&r("modification"),Reflect.set(s,n,c,a)},defineProperty(s,n,c){return o.shouldBlock()&&r("defineProperty"),Reflect.defineProperty(s,n,c)},deleteProperty(s,n){return o.shouldBlock()&&r("deletion"),Reflect.deleteProperty(s,n)},setPrototypeOf(s,n){return o.shouldBlock()&&r("setPrototypeOf"),Reflect.setPrototypeOf(s,n)},preventExtensions(s){return o.shouldBlock()&&r("preventExtensions"),Reflect.preventExtensions(s)}})}applyPatches(){this.patchFailures=[];let e=_(),t=new Set(this.config.excludeViolationTypes??[]),i=new Set(["process_send","process_channel","process_stdout","process_stderr"]),o=[];for(let n of e)if(!t.has(n.violationType)&&!i.has(n.violationType)){if(n.strategy==="freeze"){o.push(n);continue}this.applyPatch(n)}this.protectConstructorChain(),t.has("error_prepare_stack_trace")||this.protectErrorPrepareStackTrace(),this.protectPromiseThen(),C()&&this.protectDynamicImport(),this.protectModuleLoad(),this.protectModuleResolveFilename(),this.protectProcessMainModule(),this.protectProcessExecPath(),this.protectProxyRevocable();let r=["Function.prototype.constructor","Module._load","Module._resolveFilename"],s=this.patchFailures.filter(n=>r.includes(n));if(s.length>0)throw this.restorePatches(),new Error(`DefenseInDepthBox: critical patches failed: ${s.join(", ")}`);this.config.processLifetimeIntrinsicHardening||this.protectReversibleIntrinsics(o);for(let n of o)this.applyPatch(n,this.config.processLifetimeIntrinsicHardening===!0);this.config.processLifetimeIntrinsicHardening&&this.lockWellKnownSymbols()}protectReversibleIntrinsics(e){let t=new Set,i=(s,n)=>{let c=Object.getOwnPropertyDescriptor(s,n);!c||!("value"in c)||c.writable!==!0||c.configurable!==!0||(this.temporaryIntrinsicDescriptors.push({target:s,prop:n,descriptor:c}),Object.defineProperty(s,n,{...c,writable:!1}))};for(let{target:s,prop:n}of e){let c=s[n];if(!(typeof c!="object"||c===null)){t.add(c);for(let a of Reflect.ownKeys(c))i(c,a)}}let o=[];for(let s of[Array,Map,Set,RegExp,Promise])o.push([s,Symbol.species]);for(let s of[Array.prototype,String.prototype,Map.prototype,Set.prototype])o.push([s,Symbol.iterator]);o.push([Symbol.prototype,Symbol.toPrimitive],[Date.prototype,Symbol.toPrimitive],[Function.prototype,Symbol.hasInstance],[Array.prototype,Symbol.unscopables]);for(let s of[Symbol.match,Symbol.matchAll,Symbol.replace,Symbol.search,Symbol.split])o.push([RegExp.prototype,s]);for(let s of[Map.prototype,Set.prototype,Promise.prototype,ArrayBuffer.prototype])o.push([s,Symbol.toStringTag]);for(let[s,n]of o)t.add(s),i(s,n);let r=(s,n,c)=>{let a=Object.getOwnPropertyDescriptor(s,n);if(!a||!("value"in a)||typeof a.value!="function"||a.configurable!==!0)return;let u=a.value,h=this,y=function(...f){let g=f[0];if(h.shouldBlock()&&typeof g=="object"&&g!==null&&t.has(g)){let x=`${c}.${n}`,m=`${x} is blocked for protected intrinsics during script execution`,w=h.recordViolation("prototype_mutation",x,m);throw new d(m,w)}return Reflect.apply(u,this,f)};this.temporaryIntrinsicDescriptors.push({target:s,prop:n,descriptor:a}),Object.defineProperty(s,n,{...a,value:y,writable:!1})};for(let s of["assign","defineProperties","defineProperty","freeze","preventExtensions","seal","setPrototypeOf"])r(Object,s,"Object");for(let s of["defineProperty","deleteProperty","preventExtensions","set","setPrototypeOf"])r(Reflect,s,"Reflect")}protectConstructorChain(){this.patchPrototypeConstructor(Function.prototype,"Function.prototype.constructor","function_constructor");try{let e=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,"AsyncFunction.prototype.constructor","async_function_constructor")}catch(e){this.patchFailures.push("AsyncFunction.prototype.constructor"),console.debug("[DefenseInDepthBox] Could not patch AsyncFunction.prototype.constructor:",e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(function*(){}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,"GeneratorFunction.prototype.constructor","generator_function_constructor")}catch(e){this.patchFailures.push("GeneratorFunction.prototype.constructor"),console.debug("[DefenseInDepthBox] Could not patch GeneratorFunction.prototype.constructor:",e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(async function*(){}).constructor,t=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&e!==t&&this.patchPrototypeConstructor(e.prototype,"AsyncGeneratorFunction.prototype.constructor","async_generator_function_constructor")}catch(e){this.patchFailures.push("AsyncGeneratorFunction.prototype.constructor"),console.debug("[DefenseInDepthBox] Could not patch AsyncGeneratorFunction.prototype.constructor:",e instanceof Error?e.message:e)}}protectErrorPrepareStackTrace(){let e=this;try{let t=Object.getOwnPropertyDescriptor(Error,"prepareStackTrace");this.originalDescriptors.push({target:Error,prop:"prepareStackTrace",descriptor:t});let i=t?.value;Object.defineProperty(Error,"prepareStackTrace",{get(){return i},set(o){if(e.shouldBlock()){let r="Error.prepareStackTrace modification is blocked during script execution",s=e.recordViolation("error_prepare_stack_trace","Error.prepareStackTrace",r);throw new d(r,s)}e.shouldAudit()&&e.recordViolation("error_prepare_stack_trace","Error.prepareStackTrace","Error.prepareStackTrace set (audit mode)"),i=o},configurable:!0})}catch(t){this.patchFailures.push("Error.prepareStackTrace"),console.debug("[DefenseInDepthBox] Could not protect Error.prepareStackTrace:",t instanceof Error?t.message:t)}}protectPromiseThen(){let e=this;try{let r=function(...s){return p.run(this.captured,()=>{if(!this.box.isExecutionIdActive(this.executionId)){if(this.box.recordViolation("promise_then_after_deactivate","Promise.then","Promise.then callback is blocked after defense deactivation"),this.box.config.auditMode)return Reflect.apply(this.cb,void 0,s);if(this.kind==="fulfilled")return s[0];throw s[0]}return Reflect.apply(this.cb,void 0,s)})};var t=r;let i=Object.getOwnPropertyDescriptor(Promise.prototype,"then");this.originalDescriptors.push({target:Promise.prototype,prop:"then",descriptor:i});let o=i?.value;if(typeof o!="function")return;Object.defineProperty(Promise.prototype,"then",{value:function(n,c){if(!p)return Reflect.apply(o,this,[n,c]);let a=p.getStore(),u=a?.sandboxActive===!0&&a.trusted!==!0?a.executionId:void 0;if(!u)return Reflect.apply(o,this,[n,c]);let h=e.getCachedContext(u),y=a?.forceUntrusted?{...h,forceUntrusted:!0}:h,f=(g,x)=>typeof g!="function"?g:r.bind({box:e,executionId:u,captured:y,cb:g,kind:x});return Reflect.apply(o,this,[f(n,"fulfilled"),f(c,"rejected")])},writable:!0,configurable:!0})}catch(i){this.patchFailures.push("Promise.prototype.then"),console.debug("[DefenseInDepthBox] Could not protect Promise.prototype.then:",i instanceof Error?i.message:i)}}patchPrototypeConstructor(e,t,i){let o=this;try{let r=Object.getOwnPropertyDescriptor(e,"constructor");this.originalDescriptors.push({target:e,prop:"constructor",descriptor:r});let s=r?.value;Object.defineProperty(e,"constructor",{get(){if(o.shouldBlock()){let n=`${t} access is blocked during script execution`,c=o.recordViolation(i,t,n);throw new d(n,c)}return o.shouldAudit()&&o.recordViolation(i,t,`${t} accessed (audit mode)`),s},set(n){if(o.shouldBlock()){let c=`${t} modification is blocked during script execution`,a=o.recordViolation(i,t,c);throw new d(c,a)}Object.defineProperty(this,"constructor",{value:n,writable:!0,configurable:!0})},configurable:!0})}catch(r){this.patchFailures.push(t),console.debug(`[DefenseInDepthBox] Could not patch ${t}:`,r instanceof Error?r.message:r)}}protectProcessMainModule(){if(typeof process>"u")return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,"mainModule");this.originalDescriptors.push({target:process,prop:"mainModule",descriptor:t});let i=t?.value;i!==void 0&&Object.defineProperty(process,"mainModule",{get(){if(e.shouldBlock()){let o="process.mainModule access is blocked during script execution",r=e.recordViolation("process_main_module","process.mainModule",o);throw new d(o,r)}return e.shouldAudit()&&e.recordViolation("process_main_module","process.mainModule","process.mainModule accessed (audit mode)"),i},set(o){if(e.shouldBlock()){let r="process.mainModule modification is blocked during script execution",s=e.recordViolation("process_main_module","process.mainModule",r);throw new d(r,s)}Object.defineProperty(process,"mainModule",{value:o,writable:!0,configurable:!0})},configurable:!0})}catch(t){this.patchFailures.push("process.mainModule"),console.debug("[DefenseInDepthBox] Could not protect process.mainModule:",t instanceof Error?t.message:t)}}protectProcessExecPath(){if(typeof process>"u")return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,"execPath");this.originalDescriptors.push({target:process,prop:"execPath",descriptor:t});let i=t?.value??process.execPath;Object.defineProperty(process,"execPath",{get(){if(e.shouldBlock()){let o="process.execPath access is blocked during script execution",r=e.recordViolation("process_exec_path","process.execPath",o);throw new d(o,r)}return e.shouldAudit()&&e.recordViolation("process_exec_path","process.execPath","process.execPath accessed (audit mode)"),i},set(o){if(e.shouldBlock()){let r="process.execPath modification is blocked during script execution",s=e.recordViolation("process_exec_path","process.execPath",r);throw new d(r,s)}Object.defineProperty(process,"execPath",{value:o,writable:!0,configurable:!0})},configurable:!0})}catch(t){this.patchFailures.push("process.execPath"),console.debug("[DefenseInDepthBox] Could not protect process.execPath:",t instanceof Error?t.message:t)}}lockWellKnownSymbols(){let e=(t,i)=>{try{let o=Object.getOwnPropertyDescriptor(t,i);if(o?.configurable){if("value"in o){Object.defineProperty(t,i,{...o,configurable:!1,writable:!1});return}Object.defineProperty(t,i,{...o,configurable:!1})}}catch{}};for(let t of[Array,Map,Set,RegExp,Promise])e(t,Symbol.species);for(let t of[Array.prototype,String.prototype,Map.prototype,Set.prototype])e(t,Symbol.iterator);e(Symbol.prototype,Symbol.toPrimitive),e(Date.prototype,Symbol.toPrimitive);for(let t of[Symbol.match,Symbol.matchAll,Symbol.replace,Symbol.search,Symbol.split])e(RegExp.prototype,t);e(Function.prototype,Symbol.hasInstance),e(Array.prototype,Symbol.unscopables);for(let t of[Map.prototype,Set.prototype,Promise.prototype,ArrayBuffer.prototype])e(t,Symbol.toStringTag)}protectProxyRevocable(){let e=this;try{let t=Proxy.revocable;if(typeof t!="function")return;let i=Object.getOwnPropertyDescriptor(Proxy,"revocable");this.originalDescriptors.push({target:Proxy,prop:"revocable",descriptor:i}),Object.defineProperty(Proxy,"revocable",{value:function(r,s){if(e.shouldBlock()){let n="Proxy.revocable is blocked during script execution",c=e.recordViolation("proxy","Proxy.revocable",n);throw new d(n,c)}return e.shouldAudit()&&e.recordViolation("proxy","Proxy.revocable","Proxy.revocable called (audit mode)"),t(r,s)},writable:!1,configurable:!0})}catch(t){this.patchFailures.push("Proxy.revocable"),console.debug("[DefenseInDepthBox] Could not protect Proxy.revocable:",t instanceof Error?t.message:t)}}protectDynamicImport(){if(!(b||l.importHooksRegistered))try{let e=v;if(!e)throw new Error("node:module is unavailable");let t=new Set;for(let r of e.builtinModules??[]){let s=r.startsWith("node:")?r.slice(5):r;t.add(s);let n=s.indexOf("/");n>0&&t.add(s.slice(0,n))}let i=r=>{if(r.startsWith("./")||r.startsWith("../")||r.startsWith("/")||r.startsWith("file:")||r.startsWith("data:")||r.startsWith("blob:")||r.startsWith("http:")||r.startsWith("https:"))return!1;let s=r.startsWith("node:")?r.slice(5):r;if(!s)return!1;if(typeof e.isBuiltin=="function"&&e.isBuiltin(s)||t.has(s))return!0;let n=s.indexOf("/");return n>0&&t.has(s.slice(0,n))},o=r=>{let s=p?.getStore();return r.config.auditMode===!0&&s?.sandboxActive===!0&&!l.isTrustedContext(s)};if(typeof e.registerHooks=="function"){e.registerHooks({resolve(r,s,n){let c=l.instance;if(!c)return n(r,s);if((r.startsWith("data:")||r.startsWith("blob:"))&&c.shouldBlock()){let a=`import(${r.startsWith("data:")?"data:":"blob:"})`,u=`dynamic import of ${r.startsWith("data:")?"data:":"blob:"} URLs is blocked by defense-in-depth`,h=c.recordViolation("dynamic_import_builtin",a,u);throw new d(u,h)}if(i(r)){let a=`import(${r})`,u=`dynamic import of Node.js builtin '${r}' is blocked during script execution`;if(c.shouldBlock()){let h=c.recordViolation("dynamic_import_builtin",a,u);throw new d(u,h)}o(c)&&c.recordViolation("dynamic_import_builtin",a,`dynamic import of Node.js builtin '${r}' called (audit mode)`)}return n(r,s)}}),l.importHooksRegistered=!0;return}throw new Error("context-aware ESM loader hooks (node:module.registerHooks) are unavailable")}catch(e){throw new Error(`DefenseInDepthBox: could not register dynamic-import hooks: ${e instanceof Error?e.message:String(e)}`,{cause:e})}}protectModuleLoad(){this.protectModuleMethod("_load","module_load")}protectModuleResolveFilename(){this.protectModuleMethod("_resolveFilename","module_resolve_filename")}protectModuleMethod(e,t){if(b)return;let i=`Module.${e}`;try{let o=j,r=o?.[e];if(!o||typeof r!="function")throw new Error("node:module Module class or method is unavailable");let s=Object.getOwnPropertyDescriptor(o,e);if(!s)throw new Error("method has no own property descriptor");if(s.configurable===!1&&s.writable===!1)throw new Error("method is non-configurable and non-writable");let n=a=>this.createBlockingProxy(a,i,t),c=n(r);if(this.originalDescriptors.push({target:o,prop:e,descriptor:s}),"value"in s){Object.defineProperty(o,e,{...s,value:c});let a=Object.getOwnPropertyDescriptor(o,e);if(o[e]!==c||a?.value!==c)throw new Error("installed patch failed verification")}else{let a=s.get,u=s.set;if(typeof u!="function")throw new Error("accessor has no setter to install protection through");this.moduleAccessorResets.push(()=>{u.call(o,r)});let h={configurable:s.configurable,enumerable:s.enumerable,get:a,set:f=>{if(this.shouldBlock()){let m=`${i} modification is blocked during script execution`,w=this.recordViolation(t,i,m);throw new d(m,w)}this.shouldAudit()&&this.recordViolation(t,i,`${i} modified (audit mode)`);let g=typeof f=="function"?n(f):f,x=a?.call(o);try{y(g)}catch(m){throw y(x),m}}},y=f=>{try{u.call(o,f)}finally{Object.defineProperty(o,e,h)}let g=Object.getOwnPropertyDescriptor(o,e);if(g?.get!==h.get||g?.set!==h.set||a?.call(o)!==f||o[e]!==f)throw new Error("installed patch failed accessor verification")};y(c)}}catch{this.patchFailures.push(i)}}applyPatch(e,t=!1){let{target:i,prop:o,violationType:r,strategy:s}=e;try{let n=i[o];if(n===void 0)return;let c=Object.getOwnPropertyDescriptor(i,o);if(this.originalDescriptors.push({target:i,prop:o,descriptor:c}),s==="freeze"){if(typeof n=="object"&&n!==null){t&&Object.freeze(n);let a=this.getPathForTarget(i,o),u=this.createReadonlyObjectProxy(n,a,r);Object.defineProperty(i,o,{...c,value:u})}}else{let a=this.getPathForTarget(i,o),u=typeof n=="function"?this.createBlockingProxy(n,a,r):this.createBlockingObjectProxy(n,a,r,e.allowedKeys);Object.defineProperty(i,o,{value:u,writable:!0,configurable:!0})}}catch(n){let c=this.getPathForTarget(i,o);this.patchFailures.push(c),console.debug(`[DefenseInDepthBox] Could not patch ${c}:`,n instanceof Error?n.message:n)}}restorePatches(){for(let e=this.moduleAccessorResets.length-1;e>=0;e--)try{this.moduleAccessorResets[e]()}catch(t){console.debug("[DefenseInDepthBox] Could not reset module accessor override slot:",t instanceof Error?t.message:t)}this.moduleAccessorResets=[];for(let e=this.temporaryIntrinsicDescriptors.length-1;e>=0;e--){let{target:t,prop:i,descriptor:o}=this.temporaryIntrinsicDescriptors[e];try{Object.defineProperty(t,i,o)}catch(r){console.debug(`[DefenseInDepthBox] Could not restore temporary intrinsic ${String(i)}:`,r instanceof Error?r.message:r)}}this.temporaryIntrinsicDescriptors=[];for(let e=this.originalDescriptors.length-1;e>=0;e--){let{target:t,prop:i,descriptor:o}=this.originalDescriptors[e];try{o?Object.defineProperty(t,i,o):delete t[i]}catch(r){let s=this.getPathForTarget(t,i);console.debug(`[DefenseInDepthBox] Could not restore ${s}:`,r instanceof Error?r.message:r)}}this.originalDescriptors=[]}};export{d as a,B as b};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as E}from"./chunk-74TZ7ZF7.js";import{d as T}from"./chunk-CPTQXTBJ.js";import{l as m}from"./chunk-LCP3IKI7.js";import{a as u,b as I}from"./chunk-CPKBPQ2C.js";import{a as S}from"./chunk-NE4R2FVV.js";import{a as B,b as F}from"./chunk-MUFNRCMY.js";var $={name:"paste",summary:"merge lines of files",usage:"paste [OPTION]... [FILE]...",description:["Write lines consisting of the sequentially corresponding lines from","each FILE, separated by TABs, to standard output.","","With no FILE, or when FILE is -, read standard input."],options:["-d, --delimiters=LIST reuse characters from LIST instead of TABs","-s, --serial paste one file at a time instead of in parallel"," --help display this help and exit"],examples:["paste file1 file2 Merge file1 and file2 side by side","paste -d, file1 file2 Use comma as delimiter","paste -s file1 Paste all lines of file1 on one line","paste - - < file Paste pairs of lines from file"]},C={delimiter:{short:"d",long:"delimiters",type:"string",default:" "},serial:{short:"s",long:"serial",type:"boolean"}},M={name:"paste",async execute(n,e){if(F(n))return B($);let l=S("paste",n,C);if(!l.ok)return l.error;let r=l.result.flags.delimiter,h=l.result.flags.serial,p=l.result.positional;if(p.length>e.limits.maxArrayElements)throw new m(`paste: file operand limit exceeded (${e.limits.maxArrayElements})`,"array_elements");if(u(r)>e.limits.maxStringLength)throw new m(`paste: delimiter size limit exceeded (${e.limits.maxStringLength} bytes)`,"string_length");if(p.length===0)return{stdout:"",stderr:`usage: paste [-s] [-d delimiters] file ...
3
+ import{a as E}from"./chunk-IKUY74NG.js";import{e as T}from"./chunk-QKWMWSV3.js";import{l as m}from"./chunk-LCP3IKI7.js";import{a as u,b as I}from"./chunk-CPKBPQ2C.js";import{a as S}from"./chunk-NE4R2FVV.js";import{a as B,b as F}from"./chunk-MUFNRCMY.js";var $={name:"paste",summary:"merge lines of files",usage:"paste [OPTION]... [FILE]...",description:["Write lines consisting of the sequentially corresponding lines from","each FILE, separated by TABs, to standard output.","","With no FILE, or when FILE is -, read standard input."],options:["-d, --delimiters=LIST reuse characters from LIST instead of TABs","-s, --serial paste one file at a time instead of in parallel"," --help display this help and exit"],examples:["paste file1 file2 Merge file1 and file2 side by side","paste -d, file1 file2 Use comma as delimiter","paste -s file1 Paste all lines of file1 on one line","paste - - < file Paste pairs of lines from file"]},C={delimiter:{short:"d",long:"delimiters",type:"string",default:" "},serial:{short:"s",long:"serial",type:"boolean"}},M={name:"paste",async execute(n,e){if(F(n))return B($);let l=S("paste",n,C);if(!l.ok)return l.error;let r=l.result.flags.delimiter,h=l.result.flags.serial,p=l.result.positional;if(p.length>e.limits.maxArrayElements)throw new m(`paste: file operand limit exceeded (${e.limits.maxArrayElements})`,"array_elements");if(u(r)>e.limits.maxStringLength)throw new m(`paste: delimiter size limit exceeded (${e.limits.maxStringLength} bytes)`,"string_length");if(p.length===0)return{stdout:"",stderr:`usage: paste [-s] [-d delimiters] file ...
4
4
  `,exitCode:1};let g=I(e.stdin),o=g?g.split(`
5
5
  `):[""];o.length>0&&o[o.length-1]===""&&o.pop();let A=p.filter(t=>t==="-").length,f=[],y=0,x=u(g),L=t=>{if(t.length>e.limits.maxArrayElements-y)throw new m(`paste: line limit exceeded (${e.limits.maxArrayElements})`,"array_elements");y+=t.length,e.executionScope?.consumeWork(t.length,"paste lines")},w=0;for(let t of p)if(t==="-"){let i=[];for(let s=w;s<o.length;s+=A)i.push(o[s]);L(i),f.push(i),w++}else{let i=e.fs.resolvePath(e.cwd,t);try{let s=await e.fs.readFile(i),d=u(s);if(d>e.limits.maxInputBytes-x)throw new m(`paste: aggregate input size limit exceeded (${e.limits.maxInputBytes} bytes)`,"string_length");x+=d,e.executionScope?.consumeInput(d,"paste");let a=s.split(`
6
6
  `);a.length>0&&a[a.length-1]===""&&a.pop(),L(a),f.push(a)}catch(s){return E(s),{stdout:"",stderr:`paste: ${t}: No such file or directory
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as Y}from"./chunk-XBX7KFWK.js";import{l as G,m as V}from"./chunk-LCP3IKI7.js";function X(t,n){let e=t.ignoreCase?n.toLowerCase():n,i=t.needles;for(let s=0;s<i.length;s++)if(e.indexOf(i[s])!==-1)return!0;return!1}function ee(t,n){return t.replace(/\$(&|\d+|<([^>]+)>)/g,(e,i,s)=>{if(i==="&")return n[0];if(s!==void 0)return n.groups?.[s]??"";let o=parseInt(i,10);return n[o]??""})}function ne(t,n,e={}){let{invertMatch:i=!1,showLineNumbers:s=!1,countOnly:o=!1,countMatches:c=!1,filename:h="",onlyMatching:L=!1,beforeContext:F=0,afterContext:O=0,maxCount:A=0,contextSeparator:q="--",showColumn:Z=!1,vimgrep:H=!1,showByteOffset:W=!1,replace:E=null,passthru:K=!1,multiline:Q=!1,kResetGroup:S,preFilter:R,maxWork:N,maxMatches:g,signal:U}=e;if(Q)return ie(t,n,{invertMatch:i,showLineNumbers:s,countOnly:o,countMatches:c,filename:h,onlyMatching:L,beforeContext:F,afterContext:O,maxCount:A,contextSeparator:q,showColumn:Z,showByteOffset:W,replace:E,kResetGroup:S,preFilter:R,maxWork:N,maxMatches:g,signal:U});let _=0,C=(l=1)=>{if(U?.aborted)throw new V;if(_+=l,N!==void 0&&_>N)throw new G(`search: matching work limit exceeded (${N})`,"iterations")},b=(l,a)=>{if(g!==void 0&&l.length>=g)throw new G(`search: result limit exceeded (${g})`,"array_elements");l.push(a)},j=1;for(let l=0;l<t.length;l++)if((l&1023)===0&&C(),t.charCodeAt(l)===10&&(j++,g!==void 0&&j>g))throw new G(`search: line limit exceeded (${g})`,"array_elements");let P=t.split(`
3
+ import{a as Y}from"./chunk-LG6IN6SW.js";import{l as G,m as V}from"./chunk-LCP3IKI7.js";function X(t,n){let e=t.ignoreCase?n.toLowerCase():n,i=t.needles;for(let s=0;s<i.length;s++)if(e.indexOf(i[s])!==-1)return!0;return!1}function ee(t,n){return t.replace(/\$(&|\d+|<([^>]+)>)/g,(e,i,s)=>{if(i==="&")return n[0];if(s!==void 0)return n.groups?.[s]??"";let o=parseInt(i,10);return n[o]??""})}function ne(t,n,e={}){let{invertMatch:i=!1,showLineNumbers:s=!1,countOnly:o=!1,countMatches:c=!1,filename:h="",onlyMatching:L=!1,beforeContext:F=0,afterContext:O=0,maxCount:A=0,contextSeparator:q="--",showColumn:Z=!1,vimgrep:H=!1,showByteOffset:W=!1,replace:E=null,passthru:K=!1,multiline:Q=!1,kResetGroup:S,preFilter:R,maxWork:N,maxMatches:g,signal:U}=e;if(Q)return ie(t,n,{invertMatch:i,showLineNumbers:s,countOnly:o,countMatches:c,filename:h,onlyMatching:L,beforeContext:F,afterContext:O,maxCount:A,contextSeparator:q,showColumn:Z,showByteOffset:W,replace:E,kResetGroup:S,preFilter:R,maxWork:N,maxMatches:g,signal:U});let _=0,C=(l=1)=>{if(U?.aborted)throw new V;if(_+=l,N!==void 0&&_>N)throw new G(`search: matching work limit exceeded (${N})`,"iterations")},b=(l,a)=>{if(g!==void 0&&l.length>=g)throw new G(`search: result limit exceeded (${g})`,"array_elements");l.push(a)},j=1;for(let l=0;l<t.length;l++)if((l&1023)===0&&C(),t.charCodeAt(l)===10&&(j++,g!==void 0&&j>g))throw new G(`search: line limit exceeded (${g})`,"array_elements");let P=t.split(`
4
4
  `),y=P.length,k=y>0&&P[y-1]===""?y-1:y;if(o||c){let l=0,a=(c||L)&&!i;for(let r=0;r<k;r++){C();let u=P[r];if(!(R&&!i&&!X(R,u)))if(n.lastIndex=0,a)for(let x=n.exec(u);x!==null;x=n.exec(u))C(),l++,x[0].length===0&&n.lastIndex++;else n.test(u)!==i&&l++}return{output:`${h?`${h}:${l}`:String(l)}
5
5
  `,matched:l>0,matchCount:l}}if(F===0&&O===0&&!K){let l=[],a=!1,d=0,r=0;for(let u=0;u<k&&(C(),!(A>0&&d>=A));u++){let x=P[u],I=null;if(R&&!X(R,x)||(n.lastIndex=0,I=n.exec(x)),I!==null!==i)if(a=!0,d++,L)for(let w=I;w!==null;w=n.exec(x)){C();let z=S!==void 0?w[S]??"":w[0],B=E!==null?ee(E,w):z,p=h?`${h}:`:"";W&&(p+=`${r+w.index}:`),s&&(p+=`${u+1}:`),Z&&(p+=`${w.index+1}:`),b(l,p+B),w[0].length===0&&n.lastIndex++}else if(H)for(let w=I;w!==null;w=n.exec(x)){C();let z=h?`${h}:`:"";W&&(z+=`${r+w.index}:`),s&&(z+=`${u+1}:`),Z&&(z+=`${w.index+1}:`),b(l,z+x),w[0].length===0&&n.lastIndex++}else{let w=I?I.index+1:1,z=x;E!==null&&(n.lastIndex=0,z=n.replace(x,(...p)=>{if(p[0].length===0)return"";let D=p,J=p[p.length-1];return typeof J=="object"&&J!==null?(D.groups=J,D.input=p[p.length-2],D.index=p[p.length-3]):(D.input=p[p.length-1],D.index=p[p.length-2]),ee(E,D)}));let B=h?`${h}:`:"";W&&(B+=`${r+(I?I.index:0)}:`),s&&(B+=`${u+1}:`),Z&&(B+=`${w}:`),b(l,B+z)}r+=x.length+1}return{output:l.length>0?`${l.join(`
6
6
  `)}
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as W}from"./chunk-7WBCA2BB.js";import{c as $}from"./chunk-42AMF6EE.js";import{b as C}from"./chunk-HWI42GQO.js";import{a as V}from"./chunk-H4BRFPKY.js";import{b as I}from"./chunk-CPKBPQ2C.js";import{a as B,b}from"./chunk-PBOVSFTJ.js";import{a as x}from"./chunk-I4IRHQDW.js";import{a as N,b as R}from"./chunk-MUFNRCMY.js";import{existsSync as ce}from"node:fs";import{dirname as de,join as T,sep as Q}from"node:path";import{fileURLToPath as me}from"node:url";import{Worker as he}from"node:worker_threads";import pe from"sql.js";function K(e,t){return e==null?Buffer.byteLength(t,"utf8"):e instanceof Uint8Array||Buffer.isBuffer(e)?e.byteLength:Buffer.byteLength(String(e),"utf8")}function X(e,t,r){let n=r.maxOutputSize??Number.MAX_SAFE_INTEGER,s=Buffer.byteLength(r.separator,"utf8");s+=Buffer.byteLength(r.newline,"utf8");for(let a of e)s+=Buffer.byteLength(a,"utf8");for(let a of t){s+=a.length*16;for(let i of a)s+=K(i,r.nullValue);if(s>n)break}let o=s*8+(t.length+3)*(e.length+3)*16;if(!Number.isSafeInteger(o)||o>n)throw new Error(`formatted output exceeds ${n} byte limit`);return n}function _(e,t,r){let n=X(e,t,r),s;switch(r.mode){case"list":s=Y(e,t,r);break;case"csv":s=Z(e,t,r);break;case"json":s=te(e,t);break;case"line":s=re(e,t,r);break;case"column":s=ne(e,t,r);break;case"table":s=se(e,t,r);break;case"markdown":s=oe(e,t,r);break;case"tabs":s=ie(e,t,r);break;case"box":s=ae(e,t,r);break;case"quote":s=le(e,t,r);break;case"html":s=fe(e,t,r);break;case"ascii":s=ue(e,t,r);break}if(Buffer.byteLength(s,"utf8")>n)throw new Error(`formatted output exceeds ${n} byte limit`);return s}function m(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function Y(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let s of t)n.push(s.map(o=>m(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function Z(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(v).join(","));for(let s of t)n.push(s.map(o=>v(m(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
3
+ import{a as W}from"./chunk-J5L5DJWL.js";import{c as $}from"./chunk-ABM5WFEO.js";import{b as C}from"./chunk-VGSRQOLD.js";import{a as V}from"./chunk-X45GP3AQ.js";import{b as I}from"./chunk-CPKBPQ2C.js";import{a as x}from"./chunk-I4IRHQDW.js";import{a as B,b}from"./chunk-PBOVSFTJ.js";import{a as N,b as R}from"./chunk-MUFNRCMY.js";import{existsSync as ce}from"node:fs";import{dirname as de,join as T,sep as Q}from"node:path";import{fileURLToPath as me}from"node:url";import{Worker as he}from"node:worker_threads";import pe from"sql.js";function K(e,t){return e==null?Buffer.byteLength(t,"utf8"):e instanceof Uint8Array||Buffer.isBuffer(e)?e.byteLength:Buffer.byteLength(String(e),"utf8")}function X(e,t,r){let n=r.maxOutputSize??Number.MAX_SAFE_INTEGER,s=Buffer.byteLength(r.separator,"utf8");s+=Buffer.byteLength(r.newline,"utf8");for(let a of e)s+=Buffer.byteLength(a,"utf8");for(let a of t){s+=a.length*16;for(let i of a)s+=K(i,r.nullValue);if(s>n)break}let o=s*8+(t.length+3)*(e.length+3)*16;if(!Number.isSafeInteger(o)||o>n)throw new Error(`formatted output exceeds ${n} byte limit`);return n}function _(e,t,r){let n=X(e,t,r),s;switch(r.mode){case"list":s=Y(e,t,r);break;case"csv":s=Z(e,t,r);break;case"json":s=te(e,t);break;case"line":s=re(e,t,r);break;case"column":s=ne(e,t,r);break;case"table":s=se(e,t,r);break;case"markdown":s=oe(e,t,r);break;case"tabs":s=ie(e,t,r);break;case"box":s=ae(e,t,r);break;case"quote":s=le(e,t,r);break;case"html":s=fe(e,t,r);break;case"ascii":s=ue(e,t,r);break}if(Buffer.byteLength(s,"utf8")>n)throw new Error(`formatted output exceeds ${n} byte limit`);return s}function m(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function Y(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let s of t)n.push(s.map(o=>m(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function Z(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(v).join(","));for(let s of t)n.push(s.map(o=>v(m(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
4
4
  `)}
5
5
  `:""}function v(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
6
6
  `)?`"${e.replace(/"/g,'""')}"`:e}function F(e){return e.toPrecision(17).replace(/\.?0+$/,"")}function ee(e){return e===null?"null":typeof e=="number"?Number.isInteger(e)?String(e):F(e):JSON.stringify(e)}function te(e,t){return t.length===0?"":`[${t.map(n=>`{${e.map((o,a)=>`${JSON.stringify(o)}:${ee(n[a])}`).join(",")}}`).join(`,
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as l,b as k,d as v,f as m}from"./chunk-43E7AR6A.js";import{l as u,m as y}from"./chunk-LCP3IKI7.js";import{a as g}from"./chunk-PBOVSFTJ.js";var w=class extends Error{operation;virtualPath;name="FileSystemPolicyError";constructor(t,r,n){super(`${t}: ${g(n)}`),this.operation=t,this.virtualPath=r}};function b(e){if(e.identity!==void 0)return`identity:${e.identity}`;if(e.dev!==void 0&&e.ino!==void 0)return`inode:${String(e.dev)}:${String(e.ino)}`}function P(e){let t=e instanceof Error?e.message:String(e);return t.includes("ENOENT")||t.includes("no such file")}async function f(e,t,r){let n=l(t),s;try{s=await e.stat(n)}catch(a){if(!P(a))return{existence:"unknown"}}if(s!==void 0){let a=b(s);try{return{existence:"existing",canonicalPath:l(await e.realpath(n)),stableIdentity:a}}catch{return a===void 0?{existence:"unknown"}:{existence:"existing",stableIdentity:a}}}let i=[],o=n;for(;;){r?.checkpoint();let a=v(o);if(a===o)return{existence:"unknown"};i.unshift(o.slice(a==="/"?1:a.length+1)),o=a;try{let c=l(await e.realpath(o));return{existence:"missing",canonicalPath:i.reduce((h,d)=>m(h,d),c)}}catch(c){if(!P(c))return{existence:"missing"}}}}async function T(e,t,r){let[n,s]=await Promise.all([f(e,t),f(e,r)]);return n.existence==="unknown"||s.existence==="unknown"?"unknown":n.existence==="missing"||s.existence==="missing"?n.existence!==s.existence?"different":n.canonicalPath!==void 0&&n.canonicalPath===s.canonicalPath?"same":"unknown":n.stableIdentity!==void 0&&s.stableIdentity!==void 0?n.stableIdentity===s.stableIdentity?"same":"different":n.canonicalPath!==void 0&&n.canonicalPath===s.canonicalPath?"same":"unknown"}async function z(e,t,r,n){let[s,i]=await Promise.all([f(e,t,n),f(e,r,n)]);return s.existence!=="existing"||s.canonicalPath===void 0||i.existence==="unknown"||i.canonicalPath===void 0?"unknown":k(s.canonicalPath,i.canonicalPath)?"inside":"outside"}var x=class{options;entries=0;discoveredEntries=1;work=0;constructor(t){this.options=t}checkpoint(t=1){if(this.options.signal?.aborted)throw new y;if(this.options.executionScope?.throwIfAborted(this.options.site),!Number.isSafeInteger(t)||t<0||t>this.options.limits.maxTraversalWork-this.work)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal work"} limit exceeded (${this.options.limits.maxTraversalWork})`,"iterations");this.work+=t,this.options.executionScope?.consumeWork(t,`${this.options.site} filesystem traversal`)}visit(t){if(this.checkpoint(),t>this.options.limits.maxTraversalDepth)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} depth limit exceeded (${this.options.limits.maxTraversalDepth})`,"recursion");if(++this.entries>this.options.limits.maxTraversalEntries)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} entry limit exceeded (${this.options.limits.maxTraversalEntries})`,"iterations")}discover(t){if(!Number.isSafeInteger(t)||t<0||t>this.options.limits.maxTraversalEntries-this.discoveredEntries)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} entry limit exceeded (${this.options.limits.maxTraversalEntries})`,"iterations");this.checkpoint(t),this.discoveredEntries+=t}};async function D(e,t){let r=e.budget??new x(e),n=[{kind:"enter",path:l(e.root),depth:0}],s=new Set;for(;n.length>0;){r.checkpoint(0);let i=n.pop();if(!i)break;if(i.kind==="leave"){e.includeLeave&&await t({path:i.path,depth:i.depth,stat:i.stat,isSymlink:i.isSymlink,phase:"leave"}),i.identity&&s.delete(i.identity);continue}r.visit(i.depth);let o=await e.fs.lstat(i.path),a=o.isSymbolicLink,c=a&&e.symlinks==="follow"?await e.fs.stat(i.path):o;if(await t({path:i.path,depth:i.depth,stat:c,isSymlink:a,phase:"enter"}),!c.isDirectory||a&&e.symlinks!=="follow")continue;let h=b(c)??await e.fs.realpath(i.path).then(l).catch(()=>{});if(h!==void 0){if(s.has(h))throw new w(e.site,i.path,"symbolic-link directory cycle detected");s.add(h)}n.push({kind:"leave",path:i.path,depth:i.depth,stat:c,isSymlink:a,identity:h});let d=await e.fs.readdir(i.path);r.checkpoint(),d.sort((p,$)=>p.localeCompare($));for(let p=d.length-1;p>=0;p--)n.push({kind:"enter",path:m(i.path,d[p]),depth:i.depth+1})}}export{f as a,T as b,z as c,x as d,D as e};
3
+ import{a as l,b as k,d as v,f as m}from"./chunk-43E7AR6A.js";import{l as u,m as y}from"./chunk-LCP3IKI7.js";import{a as g}from"./chunk-PBOVSFTJ.js";var w=class extends Error{operation;virtualPath;name="FileSystemPolicyError";constructor(t,r,n){super(`${t}: ${g(n)}`),this.operation=t,this.virtualPath=r}};function b(e){if(e.identity!==void 0)return`identity:${e.identity}`;if(e.dev!==void 0&&e.ino!==void 0)return`inode:${String(e.dev)}:${String(e.ino)}`}function P(e){let t=e instanceof Error?e.message:String(e);return t.includes("ENOENT")||t.includes("no such file")}async function f(e,t,r){let n=l(t),s;try{s=await e.stat(n)}catch(a){if(!P(a))return{existence:"unknown"}}if(s!==void 0){let a=b(s);try{return{existence:"existing",canonicalPath:l(await e.realpath(n)),stableIdentity:a}}catch{return a===void 0?{existence:"unknown"}:{existence:"existing",stableIdentity:a}}}let i=[],o=n;for(;;){r?.checkpoint();let a=v(o);if(a===o)return{existence:"unknown"};i.unshift(o.slice(a==="/"?1:a.length+1)),o=a;try{let c=l(await e.realpath(o));return{existence:"missing",canonicalPath:i.reduce((h,d)=>m(h,d),c)}}catch(c){if(!P(c))return{existence:"missing"}}}}async function T(e,t,r){let[n,s]=await Promise.all([f(e,t),f(e,r)]);return n.existence==="unknown"||s.existence==="unknown"?"unknown":n.existence==="missing"||s.existence==="missing"?n.existence!==s.existence?"different":n.canonicalPath!==void 0&&n.canonicalPath===s.canonicalPath?"same":"unknown":n.stableIdentity!==void 0&&s.stableIdentity!==void 0?n.stableIdentity===s.stableIdentity?"same":"different":n.canonicalPath!==void 0&&n.canonicalPath===s.canonicalPath?"same":"unknown"}async function z(e,t,r,n){let[s,i]=await Promise.all([f(e,t,n),f(e,r,n)]);return s.existence!=="existing"||s.canonicalPath===void 0||i.existence==="unknown"||i.canonicalPath===void 0?"unknown":k(s.canonicalPath,i.canonicalPath)?"inside":"outside"}var x=class{options;entries=0;discoveredEntries=1;work=0;constructor(t){this.options=t}checkpoint(t=1){if(this.options.signal?.aborted)throw new y;if(this.options.executionScope?.throwIfAborted(this.options.site),!Number.isSafeInteger(t)||t<0||t>this.options.limits.maxTraversalWork-this.work)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal work"} limit exceeded (${this.options.limits.maxTraversalWork})`,"iterations");this.work+=t,this.options.executionScope?.consumeWork(t,`${this.options.site} filesystem traversal`)}visit(t){if(this.checkpoint(),t>this.options.limits.maxTraversalDepth)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} depth limit exceeded (${this.options.limits.maxTraversalDepth})`,"recursion");if(++this.entries>this.options.limits.maxTraversalEntries)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} entry limit exceeded (${this.options.limits.maxTraversalEntries})`,"iterations")}reserve(t){if(!Number.isSafeInteger(t)||t<0||t>this.options.limits.maxTraversalEntries-this.discoveredEntries)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} entry limit exceeded (${this.options.limits.maxTraversalEntries})`,"iterations");this.discoveredEntries+=t}discover(t){this.reserve(t),this.checkpoint(t)}};async function D(e,t){let r=e.budget??new x(e),n=[{kind:"enter",path:l(e.root),depth:0}],s=new Set;for(;n.length>0;){r.checkpoint(0);let i=n.pop();if(!i)break;if(i.kind==="leave"){e.includeLeave&&await t({path:i.path,depth:i.depth,stat:i.stat,isSymlink:i.isSymlink,phase:"leave"}),i.identity&&s.delete(i.identity);continue}r.visit(i.depth);let o=await e.fs.lstat(i.path),a=o.isSymbolicLink,c=a&&e.symlinks==="follow"?await e.fs.stat(i.path):o;if(await t({path:i.path,depth:i.depth,stat:c,isSymlink:a,phase:"enter"}),!c.isDirectory||a&&e.symlinks!=="follow")continue;let h=b(c)??await e.fs.realpath(i.path).then(l).catch(()=>{});if(h!==void 0){if(s.has(h))throw new w(e.site,i.path,"symbolic-link directory cycle detected");s.add(h)}n.push({kind:"leave",path:i.path,depth:i.depth,stat:c,isSymlink:a,identity:h});let d=await e.fs.readdir(i.path);r.checkpoint(),d.sort((p,$)=>p.localeCompare($));for(let p=d.length-1;p>=0;p--)n.push({kind:"enter",path:m(i.path,d[p]),depth:i.depth+1})}}export{f as a,T as b,z as c,x as d,D as e};
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as h}from"./chunk-PBOVSFTJ.js";import{a as m,b as g,c as p}from"./chunk-MUFNRCMY.js";var y={name:"ln",summary:"make links between files",usage:"ln [OPTIONS] TARGET LINK_NAME",options:["-s create a symbolic link instead of a hard link","-f remove existing destination files","-n treat LINK_NAME as a normal file if it is a symbolic link to a directory","-v print name of each linked file"," --help display this help and exit"]},v={name:"ln",async execute(n,s){if(g(n))return m(y);let i=!1,f=!1,d=!1,t=0;for(;t<n.length&&n[t].startsWith("-");){let e=n[t];if(e==="-s"||e==="--symbolic")i=!0,t++;else if(e==="-f"||e==="--force")f=!0,t++;else if(e==="-v"||e==="--verbose")d=!0,t++;else if(e==="-n"||e==="--no-dereference")t++;else if(/^-[sfvn]+$/.test(e))e.includes("s")&&(i=!0),e.includes("f")&&(f=!0),e.includes("v")&&(d=!0),t++;else if(e==="--"){t++;break}else return p("ln",e)}let r=n.slice(t);if(r.length<2)return{stdout:"",stderr:`ln: missing file operand
4
+ `,exitCode:1};if(r.length>2)return{stdout:"",stderr:`ln: extra operand '${r[2]}'
5
+ `,exitCode:1};let l=r[0],o=r[1],a=s.fs.resolvePath(s.cwd,o);if(await s.fs.exists(a))if(f)try{await s.fs.rm(a,{force:!0})}catch{return{stdout:"",stderr:`ln: cannot remove '${o}': Permission denied
6
+ `,exitCode:1}}else return{stdout:"",stderr:`ln: failed to create ${i?"symbolic ":""}link '${o}': File exists
7
+ `,exitCode:1};try{if(i)await s.fs.symlink(l,a);else{let e=s.fs.resolvePath(s.cwd,l);if(!await s.fs.exists(e))return{stdout:"",stderr:`ln: failed to access '${l}': No such file or directory
8
+ `,exitCode:1};await s.fs.link(e,a)}}catch(e){let u=e;return u.message.includes("EPERM")?{stdout:"",stderr:i?`ln: failed to create symbolic link '${o}': Operation not permitted
9
+ `:`ln: '${l}': hard link not allowed for directory
10
+ `,exitCode:1}:{stdout:"",stderr:`ln: ${h(u.message)}
11
+ `,exitCode:1}}let c="";return d&&(c=`'${o}' -> '${l}'
12
+ `),{stdout:c,stderr:"",exitCode:0}}},$={name:"ln",flags:[{flag:"-s",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{v as a,$ as b};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as n}from"./chunk-BIJXTWZ4.js";import{a as $}from"./chunk-74TZ7ZF7.js";import{l as F}from"./chunk-LCP3IKI7.js";import{a as S}from"./chunk-CPKBPQ2C.js";import{a as x}from"./chunk-NE4R2FVV.js";import{a as z,b as O}from"./chunk-MUFNRCMY.js";var M={name:"stat",summary:"display file or file system status",usage:"stat [OPTION]... FILE...",options:["-c FORMAT use the specified FORMAT instead of the default"," --help display this help and exit"]},E={format:{short:"c",type:"string"}},I={name:"stat",async execute(l,s){if(O(l))return z(M);let o=x("stat",l,E);if(!o.ok)return o.error;let m=o.result.flags.format??null,u=o.result.positional;if(u.length===0)return{stdout:"",stderr:`stat: missing operand
3
+ import{a as n}from"./chunk-BIJXTWZ4.js";import{a as $}from"./chunk-IKUY74NG.js";import{l as F}from"./chunk-LCP3IKI7.js";import{a as S}from"./chunk-CPKBPQ2C.js";import{a as x}from"./chunk-NE4R2FVV.js";import{a as z,b as O}from"./chunk-MUFNRCMY.js";var M={name:"stat",summary:"display file or file system status",usage:"stat [OPTION]... FILE...",options:["-c FORMAT use the specified FORMAT instead of the default"," --help display this help and exit"]},E={format:{short:"c",type:"string"}},I={name:"stat",async execute(l,s){if(O(l))return z(M);let o=x("stat",l,E);if(!o.ok)return o.error;let m=o.result.flags.format??null,u=o.result.positional;if(u.length===0)return{stdout:"",stderr:`stat: missing operand
4
4
  `,exitCode:1};let c="",f="",p=!1,d=0,g=Math.min(s.limits.maxOutputSize,s.limits.maxStringLength),h=e=>{let r=S(e);if(r>g-d)throw new F(`stat: output size limit exceeded (${g} bytes)`,"output_size");c+=e,d+=r};for(let e of u){let r=s.fs.resolvePath(s.cwd,e);try{let t=await s.fs.stat(r);if(m){let a=t.mode.toString(8),i=n(t.mode,t.isDirectory),w=new Map([["%n",e],["%N",`'${e}'`],["%s",String(t.size)],["%F",t.isDirectory?"directory":"regular file"],["%a",a],["%A",i],["%u","1000"],["%U","user"],["%g","1000"],["%G","group"]]),A=m.replace(/%[nNsFaAuUgG]/g,y=>w.get(y)??y);h(`${A}
5
5
  `)}else{let a=t.mode.toString(8).padStart(4,"0"),i=n(t.mode,t.isDirectory);h(` File: ${e}
6
6
  Size: ${t.size} Blocks: ${Math.ceil(t.size/512)}
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as Ie}from"./chunk-MROECM42.js";import{a as B,b as U}from"./chunk-42AMF6EE.js";import{a as O,b as X}from"./chunk-XBX7KFWK.js";import{a as z}from"./chunk-74TZ7ZF7.js";import{a as $}from"./chunk-HWI42GQO.js";import{d as ve}from"./chunk-CPTQXTBJ.js";import{l as w}from"./chunk-LCP3IKI7.js";import{a as V,b as ee}from"./chunk-CPKBPQ2C.js";import{a as Re,b as Ae,c as pe}from"./chunk-MUFNRCMY.js";var Qe=1e4,Ze=100,Ye=new X(/\s+/);function fe(e={}){let{fieldSep:t=Ye,maxIterations:n=Qe,maxRecursionDepth:r=Ze,maxOutputSize:s=0,maxArrayElements:a=1e5,fs:o,cwd:l,exec:c,coverage:u,requireDefenseContext:f}=e;return{FS:" ",OFS:" ",ORS:`
3
+ import{a as Ie}from"./chunk-MROECM42.js";import{a as B,b as U}from"./chunk-ABM5WFEO.js";import{a as O,b as X}from"./chunk-LG6IN6SW.js";import{a as z}from"./chunk-IKUY74NG.js";import{a as $}from"./chunk-VGSRQOLD.js";import{e as ve}from"./chunk-QKWMWSV3.js";import{l as w}from"./chunk-LCP3IKI7.js";import{a as V,b as ee}from"./chunk-CPKBPQ2C.js";import{a as Re,b as Ae,c as pe}from"./chunk-MUFNRCMY.js";var Qe=1e4,Ze=100,Ye=new X(/\s+/);function fe(e={}){let{fieldSep:t=Ye,maxIterations:n=Qe,maxRecursionDepth:r=Ze,maxOutputSize:s=0,maxArrayElements:a=1e5,fs:o,cwd:l,exec:c,coverage:u,requireDefenseContext:f}=e;return{FS:" ",OFS:" ",ORS:`
4
4
  `,OFMT:"%.6g",NR:0,NF:0,FNR:0,FILENAME:"",RSTART:0,RLENGTH:-1,SUBSEP:"",fields:[],line:"",vars:Object.create(null),arrays:Object.create(null),arrayAliases:new Map,ARGC:0,ARGV:Object.create(null),ENVIRON:Object.create(null),functions:new Map,getlineCommandStreams:new Map,getlineFileStreams:new Map,fieldSep:t,maxIterations:n,maxRecursionDepth:r,maxOutputSize:s,maxArrayElements:a,arrayElementCount:0,recordsProcessed:0,currentRecursionDepth:0,exitCode:0,shouldExit:!1,shouldNext:!1,shouldNextFile:!1,loopBreak:!1,loopContinue:!1,hasReturn:!1,inEndBlock:!1,output:"",openedFiles:new Set,fs:o,cwd:l,exec:c,coverage:u,requireDefenseContext:f}}function ke(e,t,n){switch(n){case"+":return e+t;case"-":return e-t;case"*":return e*t;case"/":return t!==0?e/t:0;case"%":return t!==0?e%t:0;case"^":case"**":return e**t;default:return 0}}function F(e){if(typeof e=="number")return e;let t=parseFloat(e);return Number.isNaN(t)?0:t}function L(e){return typeof e=="string"?e:(Number.isInteger(e),String(e))}var be=10*1024*1024;function Ee(e){return new ve(e,"awk string",()=>new w(`string size limit exceeded (${e} bytes)`,"string_length"))}function _(e){return e.maxOutputSize>0?e.maxOutputSize:be}function te(e,t,n,r,s){let a=Ee(s),o=0,l=0,c=0;for(let u of t.matchAll(e)){let f=u.index??0;l++,a.append(e.slice(o,f)),n(l)?(a.append(r(u)),c++):a.append(u[0]),o=f+u[0].length}return a.append(e.slice(o)),{value:a.build(),replacements:c}}async function ne(e,t){if(e.type==="regex")return e.pattern;let n=L(await t.evalExpr(e));return n.startsWith("/")&&n.endsWith("/")&&(n=n.slice(1,-1)),n}async function Oe(e,t){return e?e.type==="variable"?e.name:e.type==="field"?`$${Math.floor(F(await t.evalExpr(e.index)))}`:"$0":"$0"}function Le(e,t){if(e==="$0")return t.line;if(e.startsWith("$")){let n=parseInt(e.slice(1),10)-1;return t.fields[n]||""}return L(t.vars[e]??"")}function Te(e,t,n){if(e==="$0")n.line=t,n.fields=n.FS===" "?t.trim().split(/\s+/).filter(Boolean):n.fieldSep.split(t),n.NF=n.fields.length;else if(e.startsWith("$")){let r=parseInt(e.slice(1),10)-1;for(;n.fields.length<=r;)n.fields.push("");n.fields[r]=t,n.NF=n.fields.length,n.line=n.fields.join(n.OFS)}else n.vars[e]=t}async function Je(e,t,n){return e.length===0?t.line.length:L(await n.evalExpr(e[0])).length}async function et(e,t,n){if(e.length<2)return"";let r=L(await n.evalExpr(e[0])),s=Math.floor(F(await n.evalExpr(e[1])))-1;if(e.length>=3){let a=Math.floor(F(await n.evalExpr(e[2])));return r.substr(Math.max(0,s),a)}return r.substr(Math.max(0,s))}async function tt(e,t,n){if(e.length<2)return 0;let r=L(await n.evalExpr(e[0])),s=L(await n.evalExpr(e[1])),a=r.indexOf(s);return a===-1?0:a+1}async function nt(e,t,n){if(e.length<2)return 0;let r=L(await n.evalExpr(e[0])),s=e[1];if(s.type!=="variable")return 0;let a=s.name,o=t.FS;if(e.length>=3){let f=e[2];if(f.type==="regex")o=O(f.pattern);else{let k=L(await n.evalExpr(f));o=k===" "?O("\\s+"):k}}else t.FS===" "&&(o=O("\\s+"));let l=Object.keys(t.arrays[a]??{}).length,c=t.maxArrayElements-t.arrayElementCount+l,u=typeof o=="string"?r.split(o,c+1):o.split(r,c+1);if(u.length>c)throw new w(`array element limit exceeded (${t.maxArrayElements})`,"array_elements");t.arrays[a]=Object.create(null);for(let f=0;f<u.length;f++)t.arrays[a][String(f+1)]=u[f];return t.arrayElementCount+=u.length-l,u.length}async function it(e,t,n){if(e.length<2)return 0;let r=await ne(e[0],n),s=L(await n.evalExpr(e[1])),a=await Oe(e[2],n),o=Le(a,t);try{let l=O(r,"g"),c=te(o,l,u=>u===1,u=>Pe(s,u[0],_(t)),_(t));return Te(a,c.value,t),c.replacements}catch(l){return z(l),0}}async function rt(e,t,n){if(e.length<2)return 0;let r=await ne(e[0],n),s=L(await n.evalExpr(e[1])),a=await Oe(e[2],n),o=Le(a,t);try{let l=O(r,"g"),c=te(o,l,()=>!0,u=>Pe(s,u[0],_(t)),_(t));return Te(a,c.value,t),c.replacements}catch(l){return z(l),0}}function Pe(e,t,n){let r=Ee(n),s=0;for(;s<e.length;)if(e[s]==="\\"&&s+1<e.length){let a=e[s+1];a==="&"?(r.append("&"),s+=2):a==="\\"?(r.append("\\"),s+=2):(r.append(e[s+1]),s+=2)}else e[s]==="&"?(r.append(t),s++):(r.append(e[s]),s++);return r.build()}async function st(e,t,n){if(e.length<2)return t.RSTART=0,t.RLENGTH=-1,0;let r=L(await n.evalExpr(e[0])),s=await ne(e[1],n);try{let o=O(s).exec(r);if(o)return t.RSTART=o.index+1,t.RLENGTH=o[0].length,t.RSTART}catch{}return t.RSTART=0,t.RLENGTH=-1,0}async function at(e,t,n){if(e.length<3)return"";let r=await ne(e[0],n),s=L(await n.evalExpr(e[1])),a=L(await n.evalExpr(e[2])),o=e.length>=4?L(await n.evalExpr(e[3])):t.line;try{let l=a.toLowerCase()==="g",c=l?0:parseInt(a,10)||1;if(l){let u=O(r,"g");return te(o,u,()=>!0,f=>Ce(s,f[0],f.slice(1),_(t)),_(t)).value}else{let u=O(r,"g");return te(o,u,f=>f===c,f=>Ce(s,f[0],f.slice(1),_(t)),_(t)).value}}catch(l){return z(l),o}}function Ce(e,t,n,r){let s=Ee(r),a=0;for(;a<e.length;)if(e[a]==="\\"&&a+1<e.length){let o=e[a+1];if(o==="&")s.append("&"),a+=2;else if(o==="0")s.append(t),a+=2;else if(o>="1"&&o<="9"){let l=parseInt(o,10)-1;s.append(n[l]||""),a+=2}else o==="n"?(s.append(`
5
5
  `),a+=2):o==="t"?(s.append(" "),a+=2):(s.append(o),a+=2)}else e[a]==="&"?(s.append(t),a++):(s.append(e[a]),a++);return s.build()}async function ot(e,t,n){return e.length===0?"":L(await n.evalExpr(e[0])).toLowerCase()}async function lt(e,t,n){return e.length===0?"":L(await n.evalExpr(e[0])).toUpperCase()}async function ut(e,t,n){if(e.length===0)return"";let r=L(await n.evalExpr(e[0])),s=[];for(let a=1;a<e.length;a++)s.push(await n.evalExpr(e[a]));return ie(r,s,_(t))}async function ct(e,t,n){return e.length===0?0:Math.floor(F(await n.evalExpr(e[0])))}async function ht(e,t,n){return e.length===0?0:Math.sqrt(F(await n.evalExpr(e[0])))}async function pt(e,t,n){return e.length===0?0:Math.sin(F(await n.evalExpr(e[0])))}async function ft(e,t,n){return e.length===0?0:Math.cos(F(await n.evalExpr(e[0])))}async function dt(e,t,n){let r=e.length>0?F(await n.evalExpr(e[0])):0,s=e.length>1?F(await n.evalExpr(e[1])):0;return Math.atan2(r,s)}async function Et(e,t,n){return e.length===0?0:Math.log(F(await n.evalExpr(e[0])))}async function mt(e,t,n){return e.length===0?1:Math.exp(F(await n.evalExpr(e[0])))}function Nt(e,t,n){return t.random?t.random():Math.random()}async function yt(e,t,n){let r=e.length>0?F(await n.evalExpr(e[0])):Date.now();return t.vars._srand_seed=r,r}function wt(e,t){return()=>{throw new Error(`${e}() is not supported - ${t}`)}}function de(e){return()=>{throw new Error(`function '${e}()' is not implemented`)}}var gt=1e4;function ie(e,t,n=be){let r=0,s="",a=0,o=0,l=Math.min(gt,n),c=u=>{let f=V(u);if(f>n-a)throw new w(`formatted string size limit exceeded (${n} bytes)`,"string_length");s+=u,a+=f};for(;o<e.length;)if(e[o]==="%"&&o+1<e.length){let u=o+1,f="",k="",C="",A,T=u;for(;u<e.length&&/\d/.test(e[u]);)u++;u>T&&e[u]==="$"?(A=parseInt(e.substring(T,u),10)-1,u++):u=T;let he=()=>{if(u<e.length){if(u+1<e.length&&(e[u]==="h"&&e[u+1]==="h"||e[u]==="l"&&e[u+1]==="l")){u+=2;return}/[lzjh]/.test(e[u])&&u++}};for(;u<e.length&&/[-+ #0]/.test(e[u]);)f+=e[u++];if(e[u]==="*"){let p=t[r++],N=p!==void 0?Math.floor(Number(p)):0;if(!Number.isFinite(N)||!Number.isSafeInteger(N))throw new w(`printf width limit exceeded (${l} bytes)`,"string_length");N<0?(f+="-",k=String(-N)):k=String(N),u++}else for(;u<e.length&&/\d/.test(e[u]);)k+=e[u++];if(k&&parseInt(k,10)>l)throw new w(`printf width limit exceeded (${l} bytes)`,"string_length");if(e[u]==="."){if(u++,e[u]==="*"){let p=t[r++],N=p!==void 0?Math.floor(Number(p)):0;if(!Number.isFinite(N)||!Number.isSafeInteger(N))throw new w(`printf precision limit exceeded (${l} bytes)`,"string_length");C=N<0?"":String(N),u++}else for(;u<e.length&&/\d/.test(e[u]);)C+=e[u++];if(C&&parseInt(C,10)>l)throw new w(`printf precision limit exceeded (${l} bytes)`,"string_length")}he();let W=e[u],y=t[A!==void 0?A:r];switch(W){case"s":{let p=y!==void 0?String(y):"";if(C&&(p=p.substring(0,parseInt(C,10))),k){let N=parseInt(k,10);f.includes("-")?p=p.padEnd(N):p=p.padStart(N)}c(p),A===void 0&&r++;break}case"d":case"i":{let p=y!==void 0?Math.floor(Number(y)):0;Number.isNaN(p)&&(p=0);let N=p<0,g=Math.abs(p).toString();if(C){let x=parseInt(C,10);g=g.padStart(x,"0")}let d="";N?d="-":f.includes("+")?d="+":f.includes(" ")&&(d=" ");let I=d+g;if(k){let x=parseInt(k,10);f.includes("-")?I=I.padEnd(x):f.includes("0")&&!C?I=d+g.padStart(x-d.length,"0"):I=I.padStart(x)}c(I),A===void 0&&r++;break}case"f":{let p=y!==void 0?Number(y):0;Number.isNaN(p)&&(p=0);let N=C?parseInt(C,10):6;if(N>100)throw new w("printf floating-point precision limit exceeded (100 digits)","string_length");let g=p.toFixed(N);if(k){let d=parseInt(k,10);f.includes("-")?g=g.padEnd(d):g=g.padStart(d)}c(g),A===void 0&&r++;break}case"e":case"E":{let p=y!==void 0?Number(y):0;Number.isNaN(p)&&(p=0);let N=C?parseInt(C,10):6;if(N>100)throw new w("printf floating-point precision limit exceeded (100 digits)","string_length");let g=p.toExponential(N);if(W==="E"&&(g=g.toUpperCase()),k){let d=parseInt(k,10);f.includes("-")?g=g.padEnd(d):g=g.padStart(d)}c(g),A===void 0&&r++;break}case"g":case"G":{let p=y!==void 0?Number(y):0;Number.isNaN(p)&&(p=0);let N=C?parseInt(C,10):6;if(N>100)throw new w("printf floating-point precision limit exceeded (100 digits)","string_length");let g=p!==0?Math.floor(Math.log10(Math.abs(p))):0,d;if(p===0?d="0":g<-4||g>=N?(d=p.toExponential(N-1),W==="G"&&(d=d.toUpperCase())):d=p.toPrecision(N),d.includes(".")&&(d=d.replace(/\.?0+$/,"").replace(/\.?0+e/,"e")),d.includes("e")&&(d=d.replace(/\.?0+e/,"e")),k){let I=parseInt(k,10);f.includes("-")?d=d.padEnd(I):d=d.padStart(I)}c(d),A===void 0&&r++;break}case"x":case"X":{let p=y!==void 0?Math.floor(Number(y)):0;Number.isNaN(p)&&(p=0);let N=Math.abs(p).toString(16);if(W==="X"&&(N=N.toUpperCase()),C){let I=parseInt(C,10);N=N.padStart(I,"0")}let g=p<0?"-":"",d=g+N;if(k){let I=parseInt(k,10);f.includes("-")?d=d.padEnd(I):f.includes("0")&&!C?d=g+N.padStart(I-g.length,"0"):d=d.padStart(I)}c(d),A===void 0&&r++;break}case"o":{let p=y!==void 0?Math.floor(Number(y)):0;Number.isNaN(p)&&(p=0);let N=Math.abs(p).toString(8);if(C){let I=parseInt(C,10);N=N.padStart(I,"0")}let g=p<0?"-":"",d=g+N;if(k){let I=parseInt(k,10);f.includes("-")?d=d.padEnd(I):f.includes("0")&&!C?d=g+N.padStart(I-g.length,"0"):d=d.padStart(I)}c(d),A===void 0&&r++;break}case"c":{c(typeof y=="number"?String.fromCharCode(y):String(y??"").charAt(0)||""),A===void 0&&r++;break}case"%":c("%");break;default:c(e.substring(o,u+1))}o=u+1}else if(e[o]==="\\"&&o+1<e.length){let u=e[o+1];switch(u){case"n":c(`
6
6
  `);break;case"t":c(" ");break;case"r":c("\r");break;case"\\":c("\\");break;default:c(u)}o+=2}else c(e[o++]);return s}var Me=new Map([["length",Je],["substr",et],["index",tt],["split",nt],["sub",it],["gsub",rt],["match",st],["gensub",at],["tolower",ot],["toupper",lt],["sprintf",ut],["int",ct],["sqrt",ht],["sin",pt],["cos",ft],["atan2",dt],["log",Et],["exp",mt],["rand",Nt],["srand",yt],["system",wt("system","shell execution not allowed in sandboxed environment")],["close",()=>0],["fflush",()=>0],["systime",de("systime")],["mktime",de("mktime")],["strftime",de("strftime")]]);function P(e){return typeof e=="number"?e!==0:!(e===""||e==="0")}function b(e){if(typeof e=="number")return e;let t=parseFloat(e);return Number.isNaN(t)?0:t}function v(e){return typeof e=="string"?e:(Number.isInteger(e),String(e))}function me(e){if(typeof e=="number")return!0;let t=String(e).trim();return t===""?!1:!Number.isNaN(Number(t))}function Z(e,t){try{return O(e).test(t)}catch{return!1}}function Fe(e,t){return t===""?[]:e.FS===" "?t.trim().split(/\s+/).filter(Boolean):e.fieldSep.split(t)}function re(e,t){return t===0?e.line:t<0||t>e.fields.length?"":e.fields[t-1]??""}function Ne(e,t,n){if(t===0)e.line=v(n),e.fields=Fe(e,e.line),e.NF=e.fields.length;else if(t>0){for(;e.fields.length<t;)e.fields.push("");e.fields[t-1]=v(n),e.NF=e.fields.length,e.line=e.fields.join(e.OFS)}}function K(e,t){e.line=t,e.fields=Fe(e,t),e.NF=e.fields.length}function De(e,t){if(e.FS=t,t===" ")e.fieldSep=new X(/\s+/);else try{e.fieldSep=O(t)}catch{e.fieldSep=O(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))}}function se(e,t){switch(t){case"FS":return e.FS;case"OFS":return e.OFS;case"ORS":return e.ORS;case"OFMT":return e.OFMT;case"NR":return e.NR;case"NF":return e.NF;case"FNR":return e.FNR;case"FILENAME":return e.FILENAME;case"RSTART":return e.RSTART;case"RLENGTH":return e.RLENGTH;case"SUBSEP":return e.SUBSEP;case"ARGC":return e.ARGC}return e.vars[t]??""}function j(e,t,n){switch(t){case"FS":De(e,v(n));return;case"OFS":e.OFS=v(n);return;case"ORS":e.ORS=v(n);return;case"OFMT":e.OFMT=v(n);return;case"NR":e.NR=Math.floor(b(n));return;case"NF":{let r=Math.floor(b(n));if(r<e.NF)e.fields=e.fields.slice(0,r),e.line=e.fields.join(e.OFS);else if(r>e.NF){for(;e.fields.length<r;)e.fields.push("");e.line=e.fields.join(e.OFS)}e.NF=r;return}case"FNR":e.FNR=Math.floor(b(n));return;case"FILENAME":e.FILENAME=v(n);return;case"RSTART":e.RSTART=Math.floor(b(n));return;case"RLENGTH":e.RLENGTH=Math.floor(b(n));return;case"SUBSEP":e.SUBSEP=v(n);return}e.vars[t]=n}function Y(e,t){let n=t,r=new Set,s=e.arrayAliases.get(n);for(;s!==void 0&&!r.has(n);)r.add(n),n=s,s=e.arrayAliases.get(n);return n}function ae(e,t,n){if(t==="ARGV")return e.ARGV[n]??"";if(t==="ENVIRON")return e.ENVIRON[n]??"";let r=Y(e,t);return e.arrays[r]?.[n]??""}function ye(e,t,n,r){let s=Y(e,t);if(e.arrays[s]||(e.arrays[s]=Object.create(null)),!(n in e.arrays[s])){if(e.arrayElementCount>=e.maxArrayElements)throw new w(`array element limit exceeded (${e.maxArrayElements})`,"array_elements");e.arrayElementCount++}e.arrays[s][n]=r}function xe(e,t,n){if(t==="ARGV")return e.ARGV[n]!==void 0;if(t==="ENVIRON")return e.ENVIRON[n]!==void 0;let r=Y(e,t);return e.arrays[r]?.[n]!==void 0}function _e(e,t,n){let r=Y(e,t);e.arrays[r]&&(n in e.arrays[r]&&e.arrayElementCount--,delete e.arrays[r][n])}function Ge(e,t){let n=Y(e,t);e.arrayElementCount-=Object.keys(e.arrays[n]??{}).length,delete e.arrays[n]}var Be=null;function Ue(e){Be=e}function M(e,t){B(e.requireDefenseContext,"awk",t)}function R(e,t,n){return U(e.requireDefenseContext,"awk",t,n)}async function E(e,t){switch(M(e,"expression evaluation"),e.coverage?.hit(`awk:expr:${t.type}`),t.type){case"number":return t.value;case"string":return t.value;case"regex":return Z(t.pattern,e.line)?1:0;case"field":return St(e,t);case"variable":return se(e,t.name);case"array_access":return Rt(e,t);case"binary":return At(e,t);case"unary":return kt(e,t);case"ternary":return P(await R(e,"ternary condition evaluation",()=>E(e,t.condition)))?await R(e,"ternary consequent evaluation",()=>E(e,t.consequent)):await R(e,"ternary alternate evaluation",()=>E(e,t.alternate));case"call":return Ct(e,t.name,t.args);case"assignment":return Ot(e,t);case"pre_increment":return Lt(e,t.operand);case"pre_decrement":return Tt(e,t.operand);case"post_increment":return Pt(e,t.operand);case"post_decrement":return Mt(e,t.operand);case"in":return Ft(e,t.key,t.array);case"getline":return Dt(e,t.variable,t.file,t.command);case"tuple":return Gt(e,t.elements);default:return""}}async function St(e,t){M(e,"field reference evaluation");let n=Math.floor(b(await R(e,"field index evaluation",()=>E(e,t.index))));return re(e,n)}async function Rt(e,t){M(e,"array access evaluation");let n=v(await R(e,"array key evaluation",()=>E(e,t.key)));return ae(e,t.array,n)}async function At(e,t){M(e,"binary expression evaluation");let n=t.operator;if(n==="||")return P(await R(e,"logical-or left evaluation",()=>E(e,t.left)))||P(await R(e,"logical-or right evaluation",()=>E(e,t.right)))?1:0;if(n==="&&")return P(await R(e,"logical-and left evaluation",()=>E(e,t.left)))&&P(await R(e,"logical-and right evaluation",()=>E(e,t.right)))?1:0;if(n==="~"){let l=await R(e,"regex left evaluation",()=>E(e,t.left));t.right.type==="regex"&&e.coverage?.hit("awk:expr:regex");let c=t.right.type==="regex"?t.right.pattern:v(await R(e,"regex right evaluation",()=>E(e,t.right)));try{return O(c).test(v(l))?1:0}catch{return 0}}if(n==="!~"){let l=await R(e,"negated-regex left evaluation",()=>E(e,t.left));t.right.type==="regex"&&e.coverage?.hit("awk:expr:regex");let c=t.right.type==="regex"?t.right.pattern:v(await R(e,"negated-regex right evaluation",()=>E(e,t.right)));try{return O(c).test(v(l))?0:1}catch{return 1}}let r=await R(e,"binary left evaluation",()=>E(e,t.left)),s=await R(e,"binary right evaluation",()=>E(e,t.right));if(n===" "){let l=v(r)+v(s);if(e.maxOutputSize>0&&l.length>e.maxOutputSize)throw new w(`awk: string concatenation size limit exceeded (${e.maxOutputSize} bytes)`,"string_length",e.output);return l}if(vt(n))return It(r,s,n);let a=b(r),o=b(s);return ke(a,o,n)}function vt(e){return["<","<=",">",">=","==","!="].includes(e)}function It(e,t,n){let r=me(e),s=me(t);if(r&&s){let l=b(e),c=b(t);switch(n){case"<":return l<c?1:0;case"<=":return l<=c?1:0;case">":return l>c?1:0;case">=":return l>=c?1:0;case"==":return l===c?1:0;case"!=":return l!==c?1:0}}let a=v(e),o=v(t);switch(n){case"<":return a<o?1:0;case"<=":return a<=o?1:0;case">":return a>o?1:0;case">=":return a>=o?1:0;case"==":return a===o?1:0;case"!=":return a!==o?1:0}return 0}async function kt(e,t){M(e,"unary expression evaluation");let n=await R(e,"unary operand evaluation",()=>E(e,t.operand));switch(t.operator){case"!":return P(n)?0:1;case"-":return-b(n);case"+":return+b(n);default:return n}}async function Ct(e,t,n){M(e,"function call evaluation");let r=Me.get(t);if(r)return r(n,e,{evalExpr:a=>E(e,a)});let s=e.functions.get(t);return s?bt(e,s,n):""}async function bt(e,t,n){if(M(e,"user function call"),e.currentRecursionDepth++,e.currentRecursionDepth>e.maxRecursionDepth)throw e.currentRecursionDepth--,new w(`awk: recursion depth exceeded maximum (${e.maxRecursionDepth})`,"recursion",e.output);let r=Object.create(null);for(let l of t.params)r[l]=e.vars[l];let s=[];for(let l=0;l<t.params.length;l++){let c=t.params[l];if(l<n.length){let u=n[l];u.type==="variable"&&(e.arrayAliases.set(c,u.name),s.push(c));let f=await R(e,"user function argument evaluation",()=>E(e,u));e.vars[c]=f}else e.vars[c]=""}e.hasReturn=!1,e.returnValue=void 0;let a=Be;a&&await R(e,"user function body execution",()=>a(e,t.body.statements));let o=e.returnValue??"";for(let l of t.params)r[l]!==void 0?e.vars[l]=r[l]:delete e.vars[l];for(let l of s)e.arrayAliases.delete(l);return e.hasReturn=!1,e.returnValue=void 0,e.currentRecursionDepth--,o}async function Ot(e,t){M(e,"assignment evaluation");let n=await R(e,"assignment value evaluation",()=>E(e,t.value)),r=t.target,s=t.operator,a;if(s==="=")a=n;else{let o;if(r.type==="field"){let u=Math.floor(b(await R(e,"assignment field index",()=>E(e,r.index))));o=re(e,u)}else if(r.type==="variable")o=se(e,r.name);else{let u=v(await R(e,"assignment array key",()=>E(e,r.key)));o=ae(e,r.array,u)}let l=b(o),c=b(n);switch(s){case"+=":a=l+c;break;case"-=":a=l-c;break;case"*=":a=l*c;break;case"/=":a=c!==0?l/c:0;break;case"%=":a=c!==0?l%c:0;break;case"^=":a=l**c;break;default:a=n}}if(r.type==="field"){let o=Math.floor(b(await R(e,"assignment target field index",()=>E(e,r.index))));Ne(e,o,a)}else if(r.type==="variable")j(e,r.name,a);else{let o=v(await R(e,"assignment target array key",()=>E(e,r.key)));ye(e,r.array,o,a)}return a}async function oe(e,t,n,r){M(e,"inc/dec evaluation");let s;if(t.type==="field"){let a=Math.floor(b(await R(e,"inc/dec field index",()=>E(e,t.index))));s=b(re(e,a)),Ne(e,a,s+n)}else if(t.type==="variable")s=b(se(e,t.name)),j(e,t.name,s+n);else{let a=v(await R(e,"inc/dec array key",()=>E(e,t.key)));s=b(ae(e,t.array,a)),ye(e,t.array,a,s+n)}return r?s+n:s}async function Lt(e,t){return oe(e,t,1,!0)}async function Tt(e,t){return oe(e,t,-1,!0)}async function Pt(e,t){return oe(e,t,1,!1)}async function Mt(e,t){return oe(e,t,-1,!1)}async function Ft(e,t,n){M(e,"in-expression evaluation");let r;if(t.type==="tuple"){e.coverage?.hit("awk:expr:tuple");let s=[];for(let a of t.elements)s.push(v(await R(e,"tuple key element evaluation",()=>E(e,a))));r=s.join(e.SUBSEP)}else r=v(await R(e,"in-expression key evaluation",()=>E(e,t)));return xe(e,n,r)?1:0}async function Dt(e,t,n,r){if(M(e,"getline evaluation"),r)return xt(e,t,r);if(n)return _t(e,t,n);if(!e.lines||e.lineIndex===void 0)return-1;let s=e.lineIndex+1;if(s>=e.lines.length)return 0;let a=e.lines[s];return t?j(e,t,a):K(e,a),e.NR++,e.lineIndex=s,1}async function xt(e,t,n){let r=e.exec;if(!r)return-1;M(e,"getline command source");let s=v(await R(e,"getline command expression",()=>E(e,n))),a=e.getlineCommandStreams.get(s);if(!a)try{let c=await R(e,"getline command exec",()=>r(s)),f=ee(c.stdout).split(`
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a,b}from"./chunk-E5VZGTZ6.js";import"./chunk-CPTQXTBJ.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as column,b as flagsForFuzzing};
3
+ import{a,b}from"./chunk-URRH3GPG.js";import"./chunk-QKWMWSV3.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as column,b as flagsForFuzzing};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a,b}from"./chunk-VGR3NA3H.js";import"./chunk-H4BRFPKY.js";import"./chunk-43E7AR6A.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-NE4R2FVV.js";import"./chunk-I4IRHQDW.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as cpCommand,b as flagsForFuzzing};
3
+ import{a,b}from"./chunk-723HNGID.js";import"./chunk-X45GP3AQ.js";import"./chunk-43E7AR6A.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-I4IRHQDW.js";import"./chunk-PBOVSFTJ.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as cpCommand,b as flagsForFuzzing};
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as k,b as E}from"./chunk-PEJXCXSY.js";import{d as w}from"./chunk-ENEHPI32.js";import{a as x,b as W,d as F}from"./chunk-CPKBPQ2C.js";import{a as S}from"./chunk-I4IRHQDW.js";import{a as O,b as $,c as g}from"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";function b(s){return encodeURIComponent(s).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16)}`).replace(/%20/g,"+").replace(/%[0-9A-F]{2}/g,e=>e.toLowerCase())}function C(s){let e=s.indexOf("=");if(e>=0){let i=s.slice(0,e),r=s.slice(e+1),o=b(r);return i?`${i}=${o}`:o}return b(s)}function P(s){let e=s.indexOf("=");if(e<0)return null;let i=s.slice(0,e),r=s.slice(e+1),o,t,a=r.match(/;type=([^;]+)$/);a&&(t=a[1],r=r.slice(0,-a[0].length));let n=r.match(/;filename=([^;]+)/);return n&&(o=n[1],r=r.replace(n[0],"")),(r.startsWith("@")||r.startsWith("<"))&&(o=o??r.slice(1).split("/").pop()),{name:i,value:r,filename:o,contentType:t}}function A(s,e){let i=`----CurlFormBoundary${Date.now().toString(36)}`,r=[];for(let o of s){let t=o.value;if(t.startsWith("@")||t.startsWith("<")){let n=t.slice(1);t=e.get(n)??""}let a=`--${i}\r
4
+ `;o.filename?(a+=`Content-Disposition: form-data; name="${o.name}"; filename="${o.filename}"\r
5
+ `,o.contentType&&(a+=`Content-Type: ${o.contentType}\r
6
+ `)):a+=`Content-Disposition: form-data; name="${o.name}"\r
7
+ `,a+=`\r
8
+ ${t}\r
9
+ `,r.push(a)}return r.push(`--${i}--\r
10
+ `),{body:r.join(""),boundary:i}}var D={name:"curl",summary:"transfer a URL",usage:"curl [OPTIONS] URL",options:["-X, --request METHOD HTTP method (GET, POST, PUT, DELETE, etc.)","-H, --header HEADER Add header (can be used multiple times)","-d, --data DATA HTTP POST data (DATA=@file reads from file, strips newlines)","-G, --get Append data payloads to URL query string"," --data-raw DATA HTTP POST data (no @ interpretation)"," --data-binary DATA HTTP POST binary data (DATA=@file reads file verbatim)"," --data-urlencode DATA URL-encode and POST data (supports @file and name@file)","-F, --form NAME=VALUE Multipart form data","-u, --user USER:PASS HTTP authentication","-A, --user-agent STR Set User-Agent header","-e, --referer URL Set Referer header","-b, --cookie DATA Send cookies (name=value or @file)","-c, --cookie-jar FILE Save cookies to file","-T, --upload-file FILE Upload file (PUT)","-o, --output FILE Write output to file","-O, --remote-name Write to file named from URL","-D, --dump-header FILE Write response headers to FILE (`-` for stdout)","-I, --head Show headers only (HEAD request)","-i, --include Include response headers in output","-s, --silent Silent mode (no progress)","-S, --show-error Show errors even when silent","-f, --fail Fail silently on HTTP errors (no output)","-L, --location Follow redirects (default)"," --max-redirs NUM Maximum redirects (default: 20)","-m, --max-time SECS Maximum time for request"," --connect-timeout SECS Connection timeout","-w, --write-out FMT Output format after completion","-v, --verbose Verbose output"," --help Display this help and exit","","Note: Network access must be configured via BashEnv network option."," curl is not available by default for security reasons."]};function h(s,e,i){i.allowFile&&e.startsWith("@")?s.dataParts.push({file:{path:e.slice(1),mode:i.binary?"binary":"ascii"}}):s.dataParts.push({value:e}),i.binary&&(s.dataBinary=!0)}function R(s,e){if(e.startsWith("@")){s.dataParts.push({file:{path:e.slice(1),mode:"urlencode"}});return}let i=e.indexOf("@"),r=e.indexOf("=");if(i>0&&(r<0||i<r)){s.dataParts.push({file:{path:e.slice(i+1),mode:"urlencode",name:e.slice(0,i)}});return}s.dataParts.push({value:C(e)})}function M(s){let e={method:"GET",headers:new w,dataParts:[],dataBinary:!1,getMode:!1,formFields:[],useRemoteName:!1,headOnly:!1,includeHeaders:!1,silent:!1,showError:!1,failSilently:!1,followRedirects:!0,verbose:!1},i=!1,r=!1;for(let o=0;o<s.length;o++){let t=s[o];if(t==="-X"||t==="--request")e.method=s[++o]??"GET",r=!0;else if(t.startsWith("-X"))e.method=t.slice(2),r=!0;else if(t.startsWith("--request="))e.method=t.slice(10),r=!0;else if(t==="-H"||t==="--header"){let a=s[++o];if(a){let n=a.indexOf(":");if(n>0){let l=a.slice(0,n).trim(),d=a.slice(n+1).trim();e.headers.append(l,d)}}}else if(t.startsWith("--header=")){let a=t.slice(9),n=a.indexOf(":");if(n>0){let l=a.slice(0,n).trim(),d=a.slice(n+1).trim();e.headers.append(l,d)}}else if(t==="-G"||t==="--get")e.getMode=!0,r||(e.method="GET");else if(t==="-d"||t==="--data")h(e,s[++o]??"",{binary:!1,allowFile:!0}),i=!0;else if(t==="--data-raw")h(e,s[++o]??"",{binary:!1,allowFile:!1}),i=!0;else if(t.startsWith("-d"))h(e,t.slice(2),{binary:!1,allowFile:!0}),i=!0;else if(t.startsWith("--data="))h(e,t.slice(7),{binary:!1,allowFile:!0}),i=!0;else if(t.startsWith("--data-raw="))h(e,t.slice(11),{binary:!1,allowFile:!1}),i=!0;else if(t==="--data-binary")h(e,s[++o]??"",{binary:!0,allowFile:!0}),i=!0;else if(t.startsWith("--data-binary="))h(e,t.slice(14),{binary:!0,allowFile:!0}),i=!0;else if(t==="--data-urlencode")R(e,s[++o]??""),i=!0;else if(t.startsWith("--data-urlencode="))R(e,t.slice(17)),i=!0;else if(t==="-F"||t==="--form"){let a=s[++o]??"",n=P(a);n&&e.formFields.push(n),i=!0}else if(t.startsWith("--form=")){let a=t.slice(7),n=P(a);n&&e.formFields.push(n),i=!0}else if(t==="-u"||t==="--user")e.user=s[++o];else if(t.startsWith("-u"))e.user=t.slice(2);else if(t.startsWith("--user="))e.user=t.slice(7);else if(t==="-A"||t==="--user-agent")e.headers.set("User-Agent",s[++o]??"");else if(t.startsWith("-A"))e.headers.set("User-Agent",t.slice(2));else if(t.startsWith("--user-agent="))e.headers.set("User-Agent",t.slice(13));else if(t==="-e"||t==="--referer")e.headers.set("Referer",s[++o]??"");else if(t.startsWith("-e"))e.headers.set("Referer",t.slice(2));else if(t.startsWith("--referer="))e.headers.set("Referer",t.slice(10));else if(t==="-b"||t==="--cookie")e.headers.set("Cookie",s[++o]??"");else if(t.startsWith("-b"))e.headers.set("Cookie",t.slice(2));else if(t.startsWith("--cookie="))e.headers.set("Cookie",t.slice(9));else if(t==="-c"||t==="--cookie-jar")e.cookieJar=s[++o];else if(t.startsWith("--cookie-jar="))e.cookieJar=t.slice(13);else if(t==="-T"||t==="--upload-file")e.uploadFile=s[++o],e.method==="GET"&&(e.method="PUT");else if(t.startsWith("--upload-file="))e.uploadFile=t.slice(14),e.method==="GET"&&(e.method="PUT");else if(t==="-m"||t==="--max-time"){let a=parseFloat(s[++o]??"0");!Number.isNaN(a)&&a>0&&(e.timeoutMs=a*1e3)}else if(t.startsWith("--max-time=")){let a=parseFloat(t.slice(11));!Number.isNaN(a)&&a>0&&(e.timeoutMs=a*1e3)}else if(t==="--connect-timeout"){let a=parseFloat(s[++o]??"0");!Number.isNaN(a)&&a>0&&e.timeoutMs===void 0&&(e.timeoutMs=a*1e3)}else if(t.startsWith("--connect-timeout=")){let a=parseFloat(t.slice(18));!Number.isNaN(a)&&a>0&&e.timeoutMs===void 0&&(e.timeoutMs=a*1e3)}else if(t==="-o"||t==="--output")e.outputFile=s[++o];else if(t.startsWith("--output="))e.outputFile=t.slice(9);else if(t==="-D"||t==="--dump-header"){let a=s[++o];if(a===void 0)return{stdout:"",stderr:`curl: option ${t}: requires parameter
11
+ `,exitCode:1};if(a==="")return{stdout:"",stderr:`curl: option ${t}: blank argument where content is expected
12
+ `,exitCode:1};e.dumpHeader=a}else if(t.startsWith("--dump-header=")){let a=t.slice(14);if(a==="")return{stdout:"",stderr:`curl: option --dump-header: blank argument where content is expected
13
+ `,exitCode:1};e.dumpHeader=a}else if(t.startsWith("-D")&&t.length>2)e.dumpHeader=t.slice(2);else if(t==="-O"||t==="--remote-name")e.useRemoteName=!0;else if(t==="-I"||t==="--head")e.headOnly=!0,e.method="HEAD",r=!0;else if(t==="-i"||t==="--include")e.includeHeaders=!0;else if(t==="-s"||t==="--silent")e.silent=!0;else if(t==="-S"||t==="--show-error")e.showError=!0;else if(t==="-f"||t==="--fail")e.failSilently=!0;else if(t==="-L"||t==="--location")e.followRedirects=!0;else if(t==="--max-redirs"){let a=s[++o];if(a===void 0||!/^\d+$/.test(a))return{stdout:"",stderr:`curl: option --max-redirs: expected a non-negative integer
14
+ `,exitCode:2};let n=Number(a);if(!Number.isSafeInteger(n))return{stdout:"",stderr:`curl: option --max-redirs: value is out of range
15
+ `,exitCode:2};e.maxRedirects=n}else if(t.startsWith("--max-redirs=")){let a=t.slice(13);if(!/^\d+$/.test(a)||!Number.isSafeInteger(Number(a)))return{stdout:"",stderr:`curl: option --max-redirs: expected a non-negative integer
16
+ `,exitCode:2};e.maxRedirects=Number(a)}else if(t==="-w"||t==="--write-out")e.writeOut=s[++o];else if(t.startsWith("--write-out="))e.writeOut=t.slice(12);else if(t==="-v"||t==="--verbose")e.verbose=!0;else{if(t.startsWith("--")&&t!=="--")return g("curl",t);if(t.startsWith("-")&&t!=="-")for(let a of t.slice(1))switch(a){case"s":e.silent=!0;break;case"S":e.showError=!0;break;case"f":e.failSilently=!0;break;case"L":e.followRedirects=!0;break;case"I":e.headOnly=!0,e.method="HEAD",r=!0;break;case"i":e.includeHeaders=!0;break;case"O":e.useRemoteName=!0;break;case"v":e.verbose=!0;break;case"G":e.getMode=!0,r||(e.method="GET");break;default:return g("curl",`-${a}`)}else t.startsWith("-")||(e.url=t)}}return i&&!r&&!e.getMode&&(e.method="POST"),e}function N(s){return Object.entries(s).map(([e,i])=>`${e}: ${i}`).join(`\r
17
+ `)}function m(s,e,i){return`HTTP/1.1 ${s} ${e}\r
18
+ ${N(i)}\r
19
+ \r
20
+ `}function L(s){try{return new URL(s).pathname.split("/").pop()||"index.html"}catch{return"index.html"}}function v(s,e){let i=s;return i=i.replace(/%\{http_code\}/g,String(e.status)),i=i.replace(/%\{content_type\}/g,e.headers["content-type"]||""),i=i.replace(/%\{url_effective\}/g,e.url),i=i.replace(/%\{size_download\}/g,String(e.bodyLength)),i=i.replace(/\\n/g,`
21
+ `),i}var U=new TextEncoder,B=new TextDecoder("utf8",{ignoreBOM:!0});async function I(s,e){if(s.dataParts.length===0)return;let i=[],r=!1,o=!1;for(let l of s.dataParts)if(l.file){if(l.file.mode==="binary"){o=!0,l.file.path==="-"?(i.push(k(r?F:e.stdin,"binary")),r=!0):i.push(await e.fs.readFileBuffer(e.fs.resolvePath(e.cwd,l.file.path)));continue}let d=l.file.path==="-"?W(r?F:e.stdin):await e.fs.readFile(e.fs.resolvePath(e.cwd,l.file.path));if(l.file.path==="-"&&(r=!0),l.file.mode==="ascii")i.push(d.replace(/[\x00\r\n]/g,""));else{let p=b(d);i.push(l.file.name?`${l.file.name}=${p}`:p)}}else i.push(l.value??"");if(!o)return i.join("&");let t=i.length-1;for(let l of i)t+=typeof l=="string"?x(l):l.byteLength;let a=new Uint8Array(t),n=0;for(let l=0;l<i.length;l+=1){l>0&&(a[n]=38,n+=1);let d=i[l];typeof d=="string"?n+=U.encodeInto(d,a.subarray(n)).written:(a.set(d,n),n+=d.byteLength)}return a}async function q(s,e,i){if(s.uploadFile){let r=e.fs.resolvePath(e.cwd,s.uploadFile);return{body:await e.fs.readFile(r)}}if(s.formFields.length>0){let r=new Map;for(let a of s.formFields)if(a.value.startsWith("@")||a.value.startsWith("<")){let n=e.fs.resolvePath(e.cwd,a.value.slice(1));try{let l=await e.fs.readFile(n);r.set(a.value.slice(1),l)}catch{r.set(a.value.slice(1),"")}}let{body:o,boundary:t}=A(s.formFields,r);return{body:o,contentType:`multipart/form-data; boundary=${t}`}}return i!==void 0&&!s.getMode?{body:i,contentType:"application/x-www-form-urlencoded"}:{}}function j(s,e){if(!e)return s;let i=s.indexOf("#"),r=i===-1?s:s.slice(0,i),o=i===-1?"":s.slice(i),t=r.endsWith("?")||r.endsWith("&")?"":r.includes("?")?"&":"?";return`${r}${t}${e}${o}`}function G(s,e){let i=new w(s.headers);if(s.user){let r=Buffer.from(s.user).toString("base64");i.set("Authorization",`Basic ${r}`)}return e&&!i.has("Content-Type")&&i.set("Content-Type",e),i}async function _(s,e,i){if(!s.cookieJar)return;let r=e["set-cookie"];if(!r)return;let o=i.fs.resolvePath(i.cwd,s.cookieJar);await i.fs.writeFile(o,r)}function J(s){return E(s,"binary")}function X(s,e,i){let r="";if(s.verbose){r+=`> ${s.method} ${i}
22
+ `;for(let[o,t]of s.headers)r+=`> ${o}: ${t}
23
+ `;r+=`>
24
+ `,r+=`< HTTP/1.1 ${e.status} ${e.statusText}
25
+ `;for(let[o,t]of Object.entries(e.headers))r+=`< ${o}: ${t}
26
+ `;r+=`<
27
+ `}return s.includeHeaders&&!s.verbose&&(r+=m(e.status,e.statusText,e.headers)),s.headOnly?s.includeHeaders||s.verbose||(r+=m(e.status,e.statusText,e.headers)):r+=J(e.body),s.writeOut&&(r+=v(s.writeOut,{status:e.status,headers:e.headers,url:e.url,bodyLength:e.body.byteLength})),r}var ce={name:"curl",async execute(s,e){if($(s))return O(D);let i=M(s);if("exitCode"in i)return i;let r=i;if(!r.url)return{stdout:"",stderr:`curl: no URL specified
28
+ `,exitCode:2};if(!e.fetch)return{stdout:"",stderr:`curl: internal error: fetch not available
29
+ `,exitCode:1};let o=r.url;o.match(/^https?:\/\//)||(o=`https://${o}`);try{let t=await I(r,e);r.getMode&&(o=j(o,t instanceof Uint8Array?B.decode(t):t));let{body:a,contentType:n}=await q(r,e,t),l=G(r,n);if(r.dumpHeader!==void 0&&r.dumpHeader!=="-"){let u=e.fs.resolvePath(e.cwd,r.dumpHeader);await e.fs.writeFile(u,"")}let d=await e.fetch(o,{method:r.method,headers:l,body:a,followRedirects:r.followRedirects,timeoutMs:r.timeoutMs,maxRedirects:r.maxRedirects,signal:e.signal});await _(r,d.headers,e);let p=m(d.status,d.statusText,d.headers),c="";if(d.redirectChain)for(let u of d.redirectChain)c+=m(u.status,u.statusText,u.headers);if(c+=p,r.dumpHeader!==void 0&&r.dumpHeader!=="-"){let u=e.fs.resolvePath(e.cwd,r.dumpHeader);await e.fs.writeFile(u,c)}if(r.failSilently&&d.status>=400){let u=r.showError||!r.silent?`curl: (22) The requested URL returned error: ${d.status}
30
+ `:"",y=r.dumpHeader==="-"?c:"";return{stdout:y,stderr:u,exitCode:22,stdoutKind:y?"bytes":void 0}}let H=!!(r.outputFile||r.useRemoteName),f=H&&!r.verbose?"":X(r,d,o);if(H){let u=r.outputFile||L(o),y=e.fs.resolvePath(e.cwd,u);if(await e.fs.writeFile(y,r.headOnly?"":d.body),r.verbose?f=(r.dumpHeader==="-"?c:"")+f:r.dumpHeader==="-"?f=c:f="",r.writeOut){let T=v(r.writeOut,{status:d.status,headers:d.headers,url:d.url,bodyLength:d.body.byteLength});r.verbose?f+=T:r.dumpHeader==="-"?f=c+T:f=T}}else r.dumpHeader==="-"&&(f=c+f);return{stdout:f,stderr:"",exitCode:0,stdoutKind:"bytes"}}catch(t){let a=S(t),n=1;return a.includes("Network access denied")?n=7:a.includes("HTTP method")&&a.includes("not allowed")?n=3:a.includes("Redirect target not in allow-list")||a.includes("Too many redirects")?n=47:a.includes("aborted")&&(n=28),{stdout:"",stderr:!r.silent||r.showError?`curl: (${n}) ${a}
31
+ `:"",exitCode:n}}}};export{ce as curlCommand};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a,b}from"./chunk-2OQ5HPZE.js";import"./chunk-O74FSWB4.js";import"./chunk-CPTQXTBJ.js";import"./chunk-7JZKVC3F.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as cutCommand,b as flagsForFuzzing};
3
+ import{a,b}from"./chunk-U6BXPMLD.js";import"./chunk-O74FSWB4.js";import"./chunk-QKWMWSV3.js";import"./chunk-7JZKVC3F.js";import"./chunk-LCP3IKI7.js";import"./chunk-CPKBPQ2C.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as cutCommand,b as flagsForFuzzing};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a,b}from"./chunk-23OI2XDJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as diffCommand,b as flagsForFuzzing};
3
+ import{a,b}from"./chunk-2NJJXU4K.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as diffCommand,b as flagsForFuzzing};