just-bash 2.12.4 → 2.12.6

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 (272) hide show
  1. package/dist/banned-patterns-test.d.ts +0 -7
  2. package/dist/bin/chunks/{awk2-RGDNV4HO.js → awk2-EB5SCHVW.js} +1 -1
  3. package/dist/bin/{shell/chunks/chmod-4O2C4V42.js → chunks/chmod-N5CQATDW.js} +1 -1
  4. package/dist/bin/{shell/chunks/chunk-WO4B7WUT.js → chunks/chunk-5MUD3WB2.js} +1 -1
  5. package/dist/bin/chunks/chunk-7ADG3DNO.js +8 -0
  6. package/dist/bin/{shell/chunks/chunk-Q4WHWGOT.js → chunks/chunk-BBRVF6XE.js} +1 -1
  7. package/dist/bin/chunks/chunk-DHFZMFUW.js +36 -0
  8. package/dist/bin/chunks/{chunk-LHN3LRVT.js → chunk-IRCLOW32.js} +20 -20
  9. package/dist/bin/chunks/chunk-JX6YLHDX.js +2 -0
  10. package/dist/bin/chunks/chunk-MY5PY2PL.js +2 -0
  11. package/dist/bin/chunks/chunk-NTKUVXEL.js +5 -0
  12. package/dist/bin/chunks/{chunk-OKL2SPHK.js → chunk-O5B6WWQQ.js} +39 -39
  13. package/dist/bin/chunks/{chunk-DGFDVZ4N.js → chunk-OLN6BSO3.js} +1 -1
  14. package/dist/bin/chunks/chunk-OQV5J23L.js +7 -0
  15. package/dist/bin/chunks/chunk-PIBXJ3VX.js +13 -0
  16. package/dist/bin/chunks/chunk-PLKGKTIS.js +6 -0
  17. package/dist/bin/{shell/chunks/chunk-J4WYAO5Q.js → chunks/chunk-QTII62YM.js} +13 -13
  18. package/dist/bin/chunks/chunk-QZNF3Y3J.js +2 -0
  19. package/dist/bin/chunks/chunk-R2LDP472.js +8 -0
  20. package/dist/bin/chunks/chunk-ROMKUVHI.js +10 -0
  21. package/dist/bin/chunks/chunk-STOAUD75.js +11 -0
  22. package/dist/bin/chunks/chunk-SXB55JOI.js +2 -0
  23. package/dist/bin/chunks/chunk-VCKKRS7V.js +12 -0
  24. package/dist/bin/chunks/{chunk-SY2WM5RM.js → chunk-VIYJJTN2.js} +5 -5
  25. package/dist/bin/{shell/chunks/chunk-GA6KXSOC.js → chunks/chunk-YFPDB4PH.js} +1 -1
  26. package/dist/bin/chunks/chunk-YMMJLYIX.js +2 -0
  27. package/dist/bin/chunks/chunk-YTIURC67.js +2 -0
  28. package/dist/bin/chunks/chunk-YWZOGBFE.js +9 -0
  29. package/dist/bin/chunks/chunk-YX7OOTPO.js +9 -0
  30. package/dist/bin/chunks/chunk-ZJGIBTWD.js +2 -0
  31. package/dist/bin/chunks/{chunk-Q3FNZYGG.js → chunk-ZNPXCE5B.js} +99 -99
  32. package/dist/bin/chunks/chunk-ZSVBYEY4.js +6 -0
  33. package/dist/bin/chunks/curl-3GMIPMCI.js +26 -0
  34. package/dist/bin/{shell/chunks/expansion-TCB3WZP5.js → chunks/expansion-JBCP2CHQ.js} +1 -1
  35. package/dist/bin/chunks/find-MTLF23HX.js +2 -0
  36. package/dist/bin/chunks/flag-coverage-7GOZYXJT.js +2 -0
  37. package/dist/bin/{shell/chunks/grep-F3GT2VPG.js → chunks/grep-OZJTRD4D.js} +1 -1
  38. package/dist/bin/chunks/jq-P457LMHU.js +2 -0
  39. package/dist/bin/chunks/{ln-BEOFQJNP.js → ln-VAOSD4HK.js} +1 -1
  40. package/dist/bin/chunks/mkdir-CH7JGW4N.js +2 -0
  41. package/dist/bin/chunks/python3-45TMCI4M.js +17 -0
  42. package/dist/bin/chunks/{readlink-YNOUXNUY.js → readlink-BD5VFOC5.js} +1 -1
  43. package/dist/bin/chunks/rm-GWYJO4W7.js +2 -0
  44. package/dist/bin/chunks/sed-UV2LTNVK.js +2 -0
  45. package/dist/bin/chunks/sleep-3WHM7JMW.js +2 -0
  46. package/dist/bin/chunks/{sqlite3-SJHZFBT2.js → sqlite3-B3P3OMPI.js} +1 -1
  47. package/dist/bin/chunks/stat-XS2LXYS2.js +2 -0
  48. package/dist/bin/chunks/tar-SO3XDDIW.js +2 -0
  49. package/dist/bin/chunks/time-GZSHCM77.js +2 -0
  50. package/dist/bin/chunks/timeout-BYB3L2JA.js +2 -0
  51. package/dist/bin/chunks/worker.js +229 -20
  52. package/dist/bin/chunks/xan-FZB7FHX3.js +2 -0
  53. package/dist/bin/chunks/yq-H7D2U3HS.js +2 -0
  54. package/dist/bin/just-bash.js +183 -183
  55. package/dist/bin/shell/chunks/{awk2-RGDNV4HO.js → awk2-EB5SCHVW.js} +1 -1
  56. package/dist/bin/{chunks/chmod-4O2C4V42.js → shell/chunks/chmod-N5CQATDW.js} +1 -1
  57. package/dist/bin/{chunks/chunk-WO4B7WUT.js → shell/chunks/chunk-5MUD3WB2.js} +1 -1
  58. package/dist/bin/shell/chunks/chunk-7ADG3DNO.js +8 -0
  59. package/dist/bin/{chunks/chunk-Q4WHWGOT.js → shell/chunks/chunk-BBRVF6XE.js} +1 -1
  60. package/dist/bin/shell/chunks/chunk-D64U2VGQ.js +2 -0
  61. package/dist/bin/shell/chunks/chunk-DHFZMFUW.js +36 -0
  62. package/dist/bin/shell/chunks/{chunk-LHN3LRVT.js → chunk-IRCLOW32.js} +20 -20
  63. package/dist/bin/shell/chunks/chunk-JX6YLHDX.js +2 -0
  64. package/dist/bin/shell/chunks/chunk-NTKUVXEL.js +5 -0
  65. package/dist/bin/shell/chunks/{chunk-OKL2SPHK.js → chunk-O5B6WWQQ.js} +39 -39
  66. package/dist/bin/shell/chunks/{chunk-DGFDVZ4N.js → chunk-OLN6BSO3.js} +1 -1
  67. package/dist/bin/shell/chunks/chunk-OQV5J23L.js +7 -0
  68. package/dist/bin/shell/chunks/chunk-PIBXJ3VX.js +13 -0
  69. package/dist/bin/shell/chunks/chunk-PLKGKTIS.js +6 -0
  70. package/dist/bin/{chunks/chunk-J4WYAO5Q.js → shell/chunks/chunk-QTII62YM.js} +13 -13
  71. package/dist/bin/shell/chunks/chunk-QZNF3Y3J.js +2 -0
  72. package/dist/bin/shell/chunks/chunk-R2LDP472.js +8 -0
  73. package/dist/bin/shell/chunks/chunk-ROMKUVHI.js +10 -0
  74. package/dist/bin/shell/chunks/chunk-STOAUD75.js +11 -0
  75. package/dist/bin/shell/chunks/chunk-SXB55JOI.js +2 -0
  76. package/dist/bin/shell/chunks/chunk-VCKKRS7V.js +12 -0
  77. package/dist/bin/shell/chunks/{chunk-SY2WM5RM.js → chunk-VIYJJTN2.js} +5 -5
  78. package/dist/bin/{chunks/chunk-GA6KXSOC.js → shell/chunks/chunk-YFPDB4PH.js} +1 -1
  79. package/dist/bin/shell/chunks/chunk-YMMJLYIX.js +2 -0
  80. package/dist/bin/shell/chunks/chunk-YTIURC67.js +2 -0
  81. package/dist/bin/shell/chunks/chunk-YWZOGBFE.js +9 -0
  82. package/dist/bin/shell/chunks/chunk-YX7OOTPO.js +9 -0
  83. package/dist/bin/shell/chunks/chunk-ZJGIBTWD.js +2 -0
  84. package/dist/bin/shell/chunks/{chunk-Q3FNZYGG.js → chunk-ZNPXCE5B.js} +99 -99
  85. package/dist/bin/shell/chunks/chunk-ZSVBYEY4.js +6 -0
  86. package/dist/bin/shell/chunks/curl-3GMIPMCI.js +26 -0
  87. package/dist/bin/{chunks/expansion-TCB3WZP5.js → shell/chunks/expansion-JBCP2CHQ.js} +1 -1
  88. package/dist/bin/shell/chunks/find-MTLF23HX.js +2 -0
  89. package/dist/bin/shell/chunks/flag-coverage-7GOZYXJT.js +2 -0
  90. package/dist/bin/{chunks/grep-F3GT2VPG.js → shell/chunks/grep-OZJTRD4D.js} +1 -1
  91. package/dist/bin/shell/chunks/jq-P457LMHU.js +2 -0
  92. package/dist/bin/shell/chunks/{ln-BEOFQJNP.js → ln-VAOSD4HK.js} +1 -1
  93. package/dist/bin/shell/chunks/mkdir-CH7JGW4N.js +2 -0
  94. package/dist/bin/shell/chunks/python3-IV3DBMHM.js +17 -0
  95. package/dist/bin/shell/chunks/{readlink-YNOUXNUY.js → readlink-BD5VFOC5.js} +1 -1
  96. package/dist/bin/shell/chunks/rm-GWYJO4W7.js +2 -0
  97. package/dist/bin/shell/chunks/sed-UV2LTNVK.js +2 -0
  98. package/dist/bin/shell/chunks/sleep-3WHM7JMW.js +2 -0
  99. package/dist/bin/shell/chunks/{sqlite3-SJHZFBT2.js → sqlite3-B3P3OMPI.js} +1 -1
  100. package/dist/bin/shell/chunks/stat-XS2LXYS2.js +2 -0
  101. package/dist/bin/shell/chunks/tar-SO3XDDIW.js +2 -0
  102. package/dist/bin/shell/chunks/time-GZSHCM77.js +2 -0
  103. package/dist/bin/shell/chunks/timeout-BYB3L2JA.js +2 -0
  104. package/dist/bin/shell/chunks/xan-FZB7FHX3.js +2 -0
  105. package/dist/bin/shell/chunks/yq-H7D2U3HS.js +2 -0
  106. package/dist/bin/shell/shell.js +187 -187
  107. package/dist/bundle/browser.js +632 -635
  108. package/dist/bundle/chunks/{awk2-XLDR2J4Q.js → awk2-VPBKDCSO.js} +1 -1
  109. package/dist/bundle/chunks/{chmod-MIKE3OIT.js → chmod-SYMGL4JA.js} +1 -1
  110. package/dist/bundle/chunks/chunk-3ZUFRYJ4.js +1 -0
  111. package/dist/bundle/chunks/chunk-4GTNDTRF.js +7 -0
  112. package/dist/bundle/chunks/{chunk-N4QLRJ32.js → chunk-4YPFHVJJ.js} +1 -1
  113. package/dist/bundle/chunks/chunk-5QVNJEHU.js +8 -0
  114. package/dist/bundle/chunks/chunk-64CW2LGZ.js +6 -0
  115. package/dist/bundle/chunks/chunk-6HBBXB3L.js +11 -0
  116. package/dist/bundle/chunks/chunk-72EQZSVH.js +4 -0
  117. package/dist/bundle/chunks/chunk-7YDOWJ75.js +1 -0
  118. package/dist/bundle/chunks/chunk-AUD37QB3.js +35 -0
  119. package/dist/bundle/chunks/{chunk-NTP6TTH5.js → chunk-BED5HSP2.js} +13 -13
  120. package/dist/bundle/chunks/{chunk-K5BTXJQC.js → chunk-C7ZTXK5C.js} +99 -99
  121. package/dist/bundle/chunks/chunk-D2FZX7A2.js +10 -0
  122. package/dist/bundle/chunks/chunk-DZZS6SJP.js +1 -0
  123. package/dist/bundle/chunks/{chunk-KAZYKNBG.js → chunk-EX62JIX3.js} +5 -5
  124. package/dist/bundle/chunks/chunk-FGALERPA.js +8 -0
  125. package/dist/bundle/chunks/chunk-HJWBQKYG.js +5 -0
  126. package/dist/bundle/chunks/chunk-IP7G3BNA.js +7 -0
  127. package/dist/bundle/chunks/chunk-J642UCRS.js +1 -0
  128. package/dist/bundle/chunks/chunk-KZ7BI7TV.js +5 -0
  129. package/dist/bundle/chunks/chunk-RH6GWZAJ.js +1 -0
  130. package/dist/bundle/chunks/{chunk-4VCAQZKQ.js → chunk-TRD56HID.js} +39 -39
  131. package/dist/bundle/chunks/chunk-U5FWK6IA.js +12 -0
  132. package/dist/bundle/chunks/{chunk-H4QOE4W3.js → chunk-VBF2GWEM.js} +20 -20
  133. package/dist/bundle/chunks/{chunk-2OHMPZNZ.js → chunk-VSWTMNI3.js} +1 -1
  134. package/dist/bundle/chunks/chunk-X2AJGDEF.js +1 -0
  135. package/dist/bundle/chunks/{chunk-T2EHE3CV.js → chunk-X36DXRVC.js} +1 -1
  136. package/dist/bundle/chunks/chunk-X3CVFNQZ.js +9 -0
  137. package/dist/bundle/chunks/chunk-XHM67O4N.js +1 -0
  138. package/dist/bundle/chunks/{chunk-CYTBPLPE.js → chunk-YS3AZT3J.js} +1 -1
  139. package/dist/bundle/chunks/curl-KM2ZAUR6.js +25 -0
  140. package/dist/bundle/chunks/{expansion-HJ6B4DDG.js → expansion-XG7G47TX.js} +1 -1
  141. package/dist/bundle/chunks/find-DOIVMX6X.js +1 -0
  142. package/dist/bundle/chunks/flag-coverage-NT32EG6Q.js +1 -0
  143. package/dist/bundle/chunks/{grep-LXKUQUAE.js → grep-3AIAIJVR.js} +1 -1
  144. package/dist/bundle/chunks/jq-NLRWI2Q6.js +1 -0
  145. package/dist/bundle/chunks/{ln-RI2SJGXU.js → ln-UJ6YJVBK.js} +1 -1
  146. package/dist/bundle/chunks/mkdir-F6XHPXZC.js +1 -0
  147. package/dist/bundle/chunks/python3-G2ZUJAQL.js +16 -0
  148. package/dist/bundle/chunks/{readlink-IEQO24KU.js → readlink-MI4GCHJF.js} +1 -1
  149. package/dist/bundle/chunks/rm-FYNVTQIU.js +1 -0
  150. package/dist/bundle/chunks/sed-2BILOGNL.js +1 -0
  151. package/dist/bundle/chunks/sleep-IUBP5GMH.js +1 -0
  152. package/dist/bundle/chunks/{sqlite3-CTI4ZW7L.js → sqlite3-VEDNWJL6.js} +1 -1
  153. package/dist/bundle/chunks/stat-BT5A227F.js +1 -0
  154. package/dist/bundle/chunks/tar-LKO7DKAK.js +1 -0
  155. package/dist/bundle/chunks/time-XL42Z4U5.js +1 -0
  156. package/dist/bundle/chunks/timeout-TL4Q5YKZ.js +1 -0
  157. package/dist/bundle/chunks/worker.js +229 -20
  158. package/dist/bundle/chunks/xan-KSDYKKEK.js +1 -0
  159. package/dist/bundle/chunks/yq-HIQ4WMDY.js +1 -0
  160. package/dist/bundle/index.cjs +857 -860
  161. package/dist/bundle/index.js +246 -246
  162. package/dist/commands/duration.d.ts +5 -0
  163. package/dist/commands/format-mode.d.ts +4 -0
  164. package/dist/commands/python3/worker.d.ts +1 -0
  165. package/dist/commands/query-engine/safe-object.d.ts +13 -0
  166. package/dist/commands/sed/types.d.ts +0 -4
  167. package/dist/commands/sqlite3/worker.d.ts +1 -0
  168. package/dist/commands/tar/archive.d.ts +18 -4
  169. package/dist/fs/in-memory-fs/in-memory-fs.d.ts +0 -3
  170. package/dist/fs/mountable-fs/mountable-fs.d.ts +0 -4
  171. package/dist/fs/overlay-fs/overlay-fs.d.ts +6 -7
  172. package/dist/fs/path-utils.d.ts +46 -0
  173. package/dist/fs/read-write-fs/read-write-fs.d.ts +0 -4
  174. package/dist/fs/real-fs-utils.d.ts +17 -11
  175. package/dist/timers.d.ts +0 -3
  176. package/package.json +3 -2
  177. package/dist/bin/chunks/chunk-253LRF5J.js +0 -11
  178. package/dist/bin/chunks/chunk-4C4F4EKM.js +0 -2
  179. package/dist/bin/chunks/chunk-55QIFSKH.js +0 -36
  180. package/dist/bin/chunks/chunk-5VFN7VVJ.js +0 -9
  181. package/dist/bin/chunks/chunk-6MF2IYQX.js +0 -10
  182. package/dist/bin/chunks/chunk-D2GFNFUN.js +0 -7
  183. package/dist/bin/chunks/chunk-EO5AH4U7.js +0 -5
  184. package/dist/bin/chunks/chunk-GIFF636B.js +0 -2
  185. package/dist/bin/chunks/chunk-KWLLB7S3.js +0 -7
  186. package/dist/bin/chunks/chunk-NDP6L74Z.js +0 -10
  187. package/dist/bin/chunks/chunk-PWZZGTFL.js +0 -13
  188. package/dist/bin/chunks/chunk-UYBH3FNE.js +0 -2
  189. package/dist/bin/chunks/chunk-V5YFCVCZ.js +0 -12
  190. package/dist/bin/chunks/chunk-V7VIJQD6.js +0 -6
  191. package/dist/bin/chunks/chunk-WMYKQURM.js +0 -2
  192. package/dist/bin/chunks/chunk-XAL6VWGA.js +0 -9
  193. package/dist/bin/chunks/chunk-YYQ22ZRL.js +0 -8
  194. package/dist/bin/chunks/curl-RWQO3SBN.js +0 -26
  195. package/dist/bin/chunks/find-4YAO7JQS.js +0 -2
  196. package/dist/bin/chunks/flag-coverage-K6IBGWAC.js +0 -2
  197. package/dist/bin/chunks/jq-VBB2XIZS.js +0 -2
  198. package/dist/bin/chunks/mkdir-6OKMS3KO.js +0 -2
  199. package/dist/bin/chunks/python3-JX5PXXTX.js +0 -17
  200. package/dist/bin/chunks/rm-5QIBTLJG.js +0 -2
  201. package/dist/bin/chunks/sed-BYFYBR4A.js +0 -2
  202. package/dist/bin/chunks/sleep-E3K6M6BN.js +0 -2
  203. package/dist/bin/chunks/stat-XH7E4E2C.js +0 -2
  204. package/dist/bin/chunks/tar-W5GBTEDZ.js +0 -2
  205. package/dist/bin/chunks/time-AWAKKRSE.js +0 -2
  206. package/dist/bin/chunks/timeout-OLS72AZG.js +0 -2
  207. package/dist/bin/chunks/xan-BJ66NSYT.js +0 -2
  208. package/dist/bin/chunks/yq-GPYVGU2N.js +0 -2
  209. package/dist/bin/shell/chunks/chunk-253LRF5J.js +0 -11
  210. package/dist/bin/shell/chunks/chunk-4C4F4EKM.js +0 -2
  211. package/dist/bin/shell/chunks/chunk-55QIFSKH.js +0 -36
  212. package/dist/bin/shell/chunks/chunk-5VFN7VVJ.js +0 -9
  213. package/dist/bin/shell/chunks/chunk-6MF2IYQX.js +0 -10
  214. package/dist/bin/shell/chunks/chunk-D2GFNFUN.js +0 -7
  215. package/dist/bin/shell/chunks/chunk-EO5AH4U7.js +0 -5
  216. package/dist/bin/shell/chunks/chunk-GIFF636B.js +0 -2
  217. package/dist/bin/shell/chunks/chunk-KWLLB7S3.js +0 -7
  218. package/dist/bin/shell/chunks/chunk-NDP6L74Z.js +0 -10
  219. package/dist/bin/shell/chunks/chunk-PWZZGTFL.js +0 -13
  220. package/dist/bin/shell/chunks/chunk-UYBH3FNE.js +0 -2
  221. package/dist/bin/shell/chunks/chunk-V5YFCVCZ.js +0 -12
  222. package/dist/bin/shell/chunks/chunk-V7VIJQD6.js +0 -6
  223. package/dist/bin/shell/chunks/chunk-WMYKQURM.js +0 -2
  224. package/dist/bin/shell/chunks/chunk-XAL6VWGA.js +0 -9
  225. package/dist/bin/shell/chunks/chunk-YYQ22ZRL.js +0 -8
  226. package/dist/bin/shell/chunks/curl-RWQO3SBN.js +0 -26
  227. package/dist/bin/shell/chunks/find-4YAO7JQS.js +0 -2
  228. package/dist/bin/shell/chunks/flag-coverage-K6IBGWAC.js +0 -2
  229. package/dist/bin/shell/chunks/jq-VBB2XIZS.js +0 -2
  230. package/dist/bin/shell/chunks/mkdir-6OKMS3KO.js +0 -2
  231. package/dist/bin/shell/chunks/python3-JX5PXXTX.js +0 -17
  232. package/dist/bin/shell/chunks/rm-5QIBTLJG.js +0 -2
  233. package/dist/bin/shell/chunks/sed-BYFYBR4A.js +0 -2
  234. package/dist/bin/shell/chunks/sleep-E3K6M6BN.js +0 -2
  235. package/dist/bin/shell/chunks/stat-XH7E4E2C.js +0 -2
  236. package/dist/bin/shell/chunks/tar-W5GBTEDZ.js +0 -2
  237. package/dist/bin/shell/chunks/time-AWAKKRSE.js +0 -2
  238. package/dist/bin/shell/chunks/timeout-OLS72AZG.js +0 -2
  239. package/dist/bin/shell/chunks/xan-BJ66NSYT.js +0 -2
  240. package/dist/bin/shell/chunks/yq-GPYVGU2N.js +0 -2
  241. package/dist/bundle/chunks/chunk-27LMNKBP.js +0 -7
  242. package/dist/bundle/chunks/chunk-3RCXHB4E.js +0 -4
  243. package/dist/bundle/chunks/chunk-7MKBHGLS.js +0 -1
  244. package/dist/bundle/chunks/chunk-DOTBQEPN.js +0 -5
  245. package/dist/bundle/chunks/chunk-GENDESYN.js +0 -1
  246. package/dist/bundle/chunks/chunk-GZ2N3SXD.js +0 -8
  247. package/dist/bundle/chunks/chunk-IJXFPKNC.js +0 -1
  248. package/dist/bundle/chunks/chunk-IKZ5LEGB.js +0 -6
  249. package/dist/bundle/chunks/chunk-OFJTSXN6.js +0 -8
  250. package/dist/bundle/chunks/chunk-QUME7R6S.js +0 -9
  251. package/dist/bundle/chunks/chunk-TBAWQWQB.js +0 -12
  252. package/dist/bundle/chunks/chunk-VYV3YE2F.js +0 -35
  253. package/dist/bundle/chunks/chunk-W42IGK5R.js +0 -11
  254. package/dist/bundle/chunks/chunk-WAN3B6E3.js +0 -9
  255. package/dist/bundle/chunks/chunk-XZ3MZS57.js +0 -6
  256. package/dist/bundle/chunks/chunk-YCABLDKV.js +0 -10
  257. package/dist/bundle/chunks/chunk-ZK6J6F7O.js +0 -1
  258. package/dist/bundle/chunks/curl-6L7YZUIH.js +0 -25
  259. package/dist/bundle/chunks/find-DQFMWHAC.js +0 -1
  260. package/dist/bundle/chunks/flag-coverage-VGF5NAZP.js +0 -1
  261. package/dist/bundle/chunks/jq-JQXAVWNT.js +0 -1
  262. package/dist/bundle/chunks/mkdir-QWGXDWUS.js +0 -1
  263. package/dist/bundle/chunks/python3-TSPOVUHX.js +0 -16
  264. package/dist/bundle/chunks/rm-KPTLPKPH.js +0 -1
  265. package/dist/bundle/chunks/sed-CJFW7UYO.js +0 -1
  266. package/dist/bundle/chunks/sleep-TFDNFOXK.js +0 -1
  267. package/dist/bundle/chunks/stat-74KBZFAX.js +0 -1
  268. package/dist/bundle/chunks/tar-Y6LP5EBC.js +0 -1
  269. package/dist/bundle/chunks/time-WBKSMCJ6.js +0 -1
  270. package/dist/bundle/chunks/timeout-O7WSXY5H.js +0 -1
  271. package/dist/bundle/chunks/xan-VMLUNIDS.js +0 -1
  272. package/dist/bundle/chunks/yq-QXIYE3MW.js +0 -1
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import{a as h,b as u,c as k}from"./chunk-GTNBSMZR.js";var m={name:"readlink",summary:"print resolved symbolic links or canonical file names",usage:"readlink [OPTIONS] FILE...",options:["-f canonicalize by following every symlink in every component of the given name recursively"," --help display this help and exit"]},y={name:"readlink",async execute(a,l){if(u(a))return h(m);let i=!1,n=0;for(;n<a.length&&a[n].startsWith("-");){let t=a[n];if(t==="-f"||t==="--canonicalize")i=!0,n++;else if(t==="--"){n++;break}else return k("readlink",t)}let f=a.slice(n);if(f.length===0)return{stdout:"",stderr:`readlink: missing operand
3
+ `,exitCode:1};let r="",d=!1;for(let t of f){let s=l.fs.resolvePath(l.cwd,t);try{if(i){let e=s,c=new Set;for(;!c.has(e);){c.add(e);try{let o=await l.fs.readlink(e);if(o.startsWith("/"))e=o;else{let p=e.substring(0,e.lastIndexOf("/"))||"/";e=l.fs.resolvePath(p,o)}}catch{break}}r+=`${e}
4
+ `}else{let e=await l.fs.readlink(s);r+=`${e}
5
+ `}}catch{i?r+=`${s}
6
+ `:d=!0}}return{stdout:r,stderr:"",exitCode:d?1:0}}},w={name:"readlink",flags:[{flag:"-f",type:"boolean"},{flag:"-e",type:"boolean"}],needsArgs:!0};export{y as a,w as b};
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ import{f as w}from"./chunk-ZJGIBTWD.js";import{a as b}from"./chunk-4VDEBYW7.js";import{a as y,b as T,c as d}from"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";function f(s){let t=s.indexOf("=");if(t>=0){let a=s.slice(0,t),r=s.slice(t+1);return a?`${encodeURIComponent(a)}=${encodeURIComponent(r)}`:encodeURIComponent(r)}return encodeURIComponent(s)}function c(s){let t=s.indexOf("=");if(t<0)return null;let a=s.slice(0,t),r=s.slice(t+1),e,i,o=r.match(/;type=([^;]+)$/);o&&(i=o[1],r=r.slice(0,-o[0].length));let n=r.match(/;filename=([^;]+)/);return n&&(e=n[1],r=r.replace(n[0],"")),(r.startsWith("@")||r.startsWith("<"))&&(e=e??r.slice(1).split("/").pop()),{name:a,value:r,filename:e,contentType:i}}function O(s,t){let a=`----CurlFormBoundary${Date.now().toString(36)}`,r=[];for(let e of s){let i=e.value;if(i.startsWith("@")||i.startsWith("<")){let n=i.slice(1);i=t.get(n)??""}let o=`--${a}\r
3
+ `;e.filename?(o+=`Content-Disposition: form-data; name="${e.name}"; filename="${e.filename}"\r
4
+ `,e.contentType&&(o+=`Content-Type: ${e.contentType}\r
5
+ `)):o+=`Content-Disposition: form-data; name="${e.name}"\r
6
+ `,o+=`\r
7
+ ${i}\r
8
+ `,r.push(o)}return r.push(`--${a}--\r
9
+ `),{body:r.join(""),boundary:a}}var v={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-raw DATA HTTP POST data (no @ interpretation)"," --data-binary DATA HTTP POST binary data"," --data-urlencode DATA URL-encode and POST data","-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","-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 F(s){let t={method:"GET",headers:Object.create(null),dataBinary:!1,formFields:[],useRemoteName:!1,headOnly:!1,includeHeaders:!1,silent:!1,showError:!1,failSilently:!1,followRedirects:!0,verbose:!1},a=!1;for(let r=0;r<s.length;r++){let e=s[r];if(e==="-X"||e==="--request")t.method=s[++r]??"GET";else if(e.startsWith("-X"))t.method=e.slice(2);else if(e.startsWith("--request="))t.method=e.slice(10);else if(e==="-H"||e==="--header"){let i=s[++r];if(i){let o=i.indexOf(":");if(o>0){let n=i.slice(0,o).trim(),l=i.slice(o+1).trim();t.headers[n]=l}}}else if(e.startsWith("--header=")){let i=e.slice(9),o=i.indexOf(":");if(o>0){let n=i.slice(0,o).trim(),l=i.slice(o+1).trim();t.headers[n]=l}}else if(e==="-d"||e==="--data"||e==="--data-raw")t.data=s[++r]??"",a=!0;else if(e.startsWith("-d"))t.data=e.slice(2),a=!0;else if(e.startsWith("--data="))t.data=e.slice(7),a=!0;else if(e.startsWith("--data-raw="))t.data=e.slice(11),a=!0;else if(e==="--data-binary")t.data=s[++r]??"",t.dataBinary=!0,a=!0;else if(e.startsWith("--data-binary="))t.data=e.slice(14),t.dataBinary=!0,a=!0;else if(e==="--data-urlencode"){let i=s[++r]??"";t.data=(t.data?`${t.data}&`:"")+f(i),a=!0}else if(e.startsWith("--data-urlencode=")){let i=e.slice(17);t.data=(t.data?`${t.data}&`:"")+f(i),a=!0}else if(e==="-F"||e==="--form"){let i=s[++r]??"",o=c(i);o&&t.formFields.push(o),a=!0}else if(e.startsWith("--form=")){let i=e.slice(7),o=c(i);o&&t.formFields.push(o),a=!0}else if(e==="-u"||e==="--user")t.user=s[++r];else if(e.startsWith("-u"))t.user=e.slice(2);else if(e.startsWith("--user="))t.user=e.slice(7);else if(e==="-A"||e==="--user-agent")t.headers["User-Agent"]=s[++r]??"";else if(e.startsWith("-A"))t.headers["User-Agent"]=e.slice(2);else if(e.startsWith("--user-agent="))t.headers["User-Agent"]=e.slice(13);else if(e==="-e"||e==="--referer")t.headers.Referer=s[++r]??"";else if(e.startsWith("-e"))t.headers.Referer=e.slice(2);else if(e.startsWith("--referer="))t.headers.Referer=e.slice(10);else if(e==="-b"||e==="--cookie")t.headers.Cookie=s[++r]??"";else if(e.startsWith("-b"))t.headers.Cookie=e.slice(2);else if(e.startsWith("--cookie="))t.headers.Cookie=e.slice(9);else if(e==="-c"||e==="--cookie-jar")t.cookieJar=s[++r];else if(e.startsWith("--cookie-jar="))t.cookieJar=e.slice(13);else if(e==="-T"||e==="--upload-file")t.uploadFile=s[++r],t.method==="GET"&&(t.method="PUT");else if(e.startsWith("--upload-file="))t.uploadFile=e.slice(14),t.method==="GET"&&(t.method="PUT");else if(e==="-m"||e==="--max-time"){let i=parseFloat(s[++r]??"0");!Number.isNaN(i)&&i>0&&(t.timeoutMs=i*1e3)}else if(e.startsWith("--max-time=")){let i=parseFloat(e.slice(11));!Number.isNaN(i)&&i>0&&(t.timeoutMs=i*1e3)}else if(e==="--connect-timeout"){let i=parseFloat(s[++r]??"0");!Number.isNaN(i)&&i>0&&t.timeoutMs===void 0&&(t.timeoutMs=i*1e3)}else if(e.startsWith("--connect-timeout=")){let i=parseFloat(e.slice(18));!Number.isNaN(i)&&i>0&&t.timeoutMs===void 0&&(t.timeoutMs=i*1e3)}else if(e==="-o"||e==="--output")t.outputFile=s[++r];else if(e.startsWith("--output="))t.outputFile=e.slice(9);else if(e==="-O"||e==="--remote-name")t.useRemoteName=!0;else if(e==="-I"||e==="--head")t.headOnly=!0,t.method="HEAD";else if(e==="-i"||e==="--include")t.includeHeaders=!0;else if(e==="-s"||e==="--silent")t.silent=!0;else if(e==="-S"||e==="--show-error")t.showError=!0;else if(e==="-f"||e==="--fail")t.failSilently=!0;else if(e==="-L"||e==="--location")t.followRedirects=!0;else if(e==="--max-redirs")r++;else if(!e.startsWith("--max-redirs="))if(e==="-w"||e==="--write-out")t.writeOut=s[++r];else if(e.startsWith("--write-out="))t.writeOut=e.slice(12);else if(e==="-v"||e==="--verbose")t.verbose=!0;else{if(e.startsWith("--")&&e!=="--")return d("curl",e);if(e.startsWith("-")&&e!=="-")for(let i of e.slice(1))switch(i){case"s":t.silent=!0;break;case"S":t.showError=!0;break;case"f":t.failSilently=!0;break;case"L":t.followRedirects=!0;break;case"I":t.headOnly=!0,t.method="HEAD";break;case"i":t.includeHeaders=!0;break;case"O":t.useRemoteName=!0;break;case"v":t.verbose=!0;break;default:return d("curl",`-${i}`)}else e.startsWith("-")||(t.url=e)}}return a&&t.method==="GET"&&(t.method="POST"),t}function m(s){return Object.entries(s).map(([t,a])=>`${t}: ${a}`).join(`\r
10
+ `)}function W(s){try{return new URL(s).pathname.split("/").pop()||"index.html"}catch{return"index.html"}}function h(s,t){let a=s;return a=a.replace(/%\{http_code\}/g,String(t.status)),a=a.replace(/%\{content_type\}/g,t.headers["content-type"]||""),a=a.replace(/%\{url_effective\}/g,t.url),a=a.replace(/%\{size_download\}/g,String(t.bodyLength)),a=a.replace(/\\n/g,`
11
+ `),a}async function P(s,t){if(s.uploadFile){let a=t.fs.resolvePath(t.cwd,s.uploadFile);return{body:await t.fs.readFile(a)}}if(s.formFields.length>0){let a=new Map;for(let i of s.formFields)if(i.value.startsWith("@")||i.value.startsWith("<")){let o=t.fs.resolvePath(t.cwd,i.value.slice(1));try{let n=await t.fs.readFile(o);a.set(i.value.slice(1),n)}catch{a.set(i.value.slice(1),"")}}let{body:r,boundary:e}=O(s.formFields,a);return{body:r,contentType:`multipart/form-data; boundary=${e}`}}return s.data!==void 0?{body:s.data}:{}}function S(s,t){let a=w(s.headers??{});if(s.user){let r=Buffer.from(s.user).toString("base64");a.Authorization=`Basic ${r}`}return t&&!a["Content-Type"]&&(a["Content-Type"]=t),a}async function E(s,t,a){if(!s.cookieJar)return;let r=t["set-cookie"];if(!r)return;let e=a.fs.resolvePath(a.cwd,s.cookieJar);await a.fs.writeFile(e,r)}function k(s,t,a){let r="";if(s.verbose){r+=`> ${s.method} ${a}
12
+ `;for(let[e,i]of Object.entries(s.headers))r+=`> ${e}: ${i}
13
+ `;r+=`>
14
+ `,r+=`< HTTP/1.1 ${t.status} ${t.statusText}
15
+ `;for(let[e,i]of Object.entries(t.headers))r+=`< ${e}: ${i}
16
+ `;r+=`<
17
+ `}return s.includeHeaders&&!s.verbose&&(r+=`HTTP/1.1 ${t.status} ${t.statusText}\r
18
+ `,r+=m(t.headers),r+=`\r
19
+ \r
20
+ `),s.headOnly?s.includeHeaders||s.verbose||(r+=`HTTP/1.1 ${t.status} ${t.statusText}\r
21
+ `,r+=m(t.headers),r+=`\r
22
+ `):r+=t.body,s.writeOut&&(r+=h(s.writeOut,{status:t.status,headers:t.headers,url:t.url,bodyLength:t.body.length})),r}var B={name:"curl",async execute(s,t){if(T(s))return y(v);let a=F(s);if("exitCode"in a)return a;let r=a;if(!r.url)return{stdout:"",stderr:`curl: no URL specified
23
+ `,exitCode:2};if(!t.fetch)return{stdout:"",stderr:`curl: internal error: fetch not available
24
+ `,exitCode:1};let e=r.url;e.match(/^https?:\/\//)||(e=`https://${e}`);try{let{body:i,contentType:o}=await P(r,t),n=S(r,o),l=await t.fetch(e,{method:r.method,headers:Object.keys(n).length>0?n:void 0,body:i,followRedirects:r.followRedirects,timeoutMs:r.timeoutMs});if(await E(r,l.headers,t),r.failSilently&&l.status>=400)return{stdout:"",stderr:r.showError||!r.silent?`curl: (22) The requested URL returned error: ${l.status}
25
+ `:"",exitCode:22};let u=k(r,l,e);if(r.outputFile||r.useRemoteName){let p=r.outputFile||W(e),$=t.fs.resolvePath(t.cwd,p);await t.fs.writeFile($,r.headOnly?"":l.body),r.verbose||(u=""),r.writeOut&&(u=h(r.writeOut,{status:l.status,headers:l.headers,url:l.url,bodyLength:l.body.length}))}return{stdout:u,stderr:"",exitCode:0}}catch(i){let o=b(i),n=1;return o.includes("Network access denied")?n=7:o.includes("HTTP method")&&o.includes("not allowed")?n=3:o.includes("Redirect target not in allow-list")||o.includes("Too many redirects")?n=47:o.includes("aborted")&&(n=28),{stdout:"",stderr:!r.silent||r.showError?`curl: (${n}) ${o}
26
+ `:"",exitCode:n}}}};export{B as curlCommand};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{A as c,B as d,C as e,I as f,J as g,K as h,L as i,M as j,N as k,O as l,y as a,z as b}from"./chunk-OKL2SPHK.js";import"./chunk-SE4C7FJY.js";import"./chunk-6KZRLMG3.js";import"./chunk-OBH7XN5N.js";import"./chunk-KGOUQS5A.js";export{d as escapeGlobChars,e as escapeRegexChars,l as expandRedirectTarget,g as expandWord,i as expandWordForPattern,h as expandWordForRegex,j as expandWordWithGlob,a as getArrayElements,c as getVariable,k as hasQuotedMultiValueAt,b as isArray,f as isWordFullyQuoted};
2
+ import{A as c,B as d,C as e,I as f,J as g,K as h,L as i,M as j,N as k,O as l,y as a,z as b}from"./chunk-O5B6WWQQ.js";import"./chunk-SE4C7FJY.js";import"./chunk-6KZRLMG3.js";import"./chunk-OBH7XN5N.js";import"./chunk-KGOUQS5A.js";export{d as escapeGlobChars,e as escapeRegexChars,l as expandRedirectTarget,g as expandWord,i as expandWordForPattern,h as expandWordForRegex,j as expandWordWithGlob,a as getArrayElements,c as getVariable,k as hasQuotedMultiValueAt,b as isArray,f as isWordFullyQuoted};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-STOAUD75.js";import"./chunk-YMMJLYIX.js";import"./chunk-SXB55JOI.js";import"./chunk-4OALHZXB.js";import"./chunk-SE4C7FJY.js";import"./chunk-D5WP4CKS.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{a as findCommand,b as flagsForFuzzing};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{b as yr}from"./chunk-QTII62YM.js";import{b as Ar}from"./chunk-ZNPXCE5B.js";import{b as $r}from"./chunk-BBRVF6XE.js";import"./chunk-GZHFXDDO.js";import"./chunk-QSDVMMYI.js";import{c as Sr}from"./chunk-DHFZMFUW.js";import{b as wr}from"./chunk-XKPFI566.js";import{b as xr}from"./chunk-2BC3N3L2.js";import{b as vr}from"./chunk-IDGH4PGU.js";import{b as kr}from"./chunk-F3LGZXLQ.js";import{b as qr}from"./chunk-BYDV4VEF.js";import{b as Cr}from"./chunk-JLX6YWGA.js";import{b as br}from"./chunk-FLPVVSN5.js";import{d as Ir,e as Mr,f as jr}from"./chunk-54G6AE72.js";import{b as tr}from"./chunk-VCKKRS7V.js";import{b as lr}from"./chunk-VIYJJTN2.js";import{b as ur}from"./chunk-THALLNXT.js";import{b as pr}from"./chunk-EZS766DD.js";import{b as er}from"./chunk-3Y32LPNT.js";import{b as dr}from"./chunk-7BORMNPQ.js";import{b as cr}from"./chunk-N43DJTSI.js";import"./chunk-OBI37ZY4.js";import{b as hr}from"./chunk-N5OTVT4F.js";import{c as or,d as ar}from"./chunk-MAVV76T4.js";import{b as sr}from"./chunk-JTF74J6E.js";import{c as ir,d as gr}from"./chunk-GO6FXSC4.js";import{b as mr}from"./chunk-PIBXJ3VX.js";import"./chunk-PLKGKTIS.js";import"./chunk-ZJGIBTWD.js";import{b as Fr}from"./chunk-GOJZHH3L.js";import{b as zr}from"./chunk-P6GNZPVW.js";import{b as fr}from"./chunk-LOJMXC4F.js";import{b as nr}from"./chunk-ROMKUVHI.js";import"./chunk-YTIURC67.js";import{b as R}from"./chunk-PQNTKMH3.js";import{b as U}from"./chunk-PPBQJBC2.js";import{b as V}from"./chunk-NSUMEERA.js";import{b as W}from"./chunk-XY5HGZW5.js";import{c as X,d as Y}from"./chunk-N4EU64Y4.js";import{c as Z,d as _}from"./chunk-3MBAUIBB.js";import{b as N}from"./chunk-RT7TRQVZ.js";import{b as rr}from"./chunk-47HZU3SY.js";import{b as G}from"./chunk-RJSAGJQJ.js";import{b as H}from"./chunk-YEKSVVRC.js";import{b as J}from"./chunk-26NO42TF.js";import{b as K}from"./chunk-LGJM5YFT.js";import{b as L}from"./chunk-LMK6G2HH.js";import{b as O}from"./chunk-ZKC5HQYO.js";import{b as P}from"./chunk-ROJPSS6N.js";import{b as Q}from"./chunk-STOAUD75.js";import{b as y}from"./chunk-CGE2EHYP.js";import{b as A}from"./chunk-ZA4HUKJ3.js";import{b as $}from"./chunk-WWZVR5NN.js";import{b as S}from"./chunk-JQBC3FXE.js";import{b as T}from"./chunk-SYL34GE7.js";import{b as B}from"./chunk-5G2VOPPJ.js";import{b as D}from"./chunk-SGA7Y45Z.js";import{b as E}from"./chunk-EUXCM6C4.js";import{b as w}from"./chunk-YLE2OYY6.js";import{b as x}from"./chunk-S7OHMN3F.js";import{b as v}from"./chunk-YWZOGBFE.js";import"./chunk-YMMJLYIX.js";import{d as k,e as q,f as C}from"./chunk-YFPDB4PH.js";import"./chunk-SXB55JOI.js";import{b}from"./chunk-35JD7YEM.js";import"./chunk-4OALHZXB.js";import"./chunk-G43H2WGH.js";import{b as I}from"./chunk-IRCLOW32.js";import{b as M}from"./chunk-OLN6BSO3.js";import{b as j}from"./chunk-FA2CHD73.js";import{b as t}from"./chunk-R2LDP472.js";import{b as l}from"./chunk-PS4LOXE5.js";import{b as u}from"./chunk-VNER2XXL.js";import{b as p}from"./chunk-YX7OOTPO.js";import{b as e}from"./chunk-7ADG3DNO.js";import{b as d}from"./chunk-TEFXEYX3.js";import{b as c}from"./chunk-ZSVBYEY4.js";import{b as h}from"./chunk-SXRVLCZ4.js";import"./chunk-FSZWFMB4.js";import"./chunk-QZNF3Y3J.js";import"./chunk-JX6YLHDX.js";import"./chunk-4PRVMER6.js";import"./chunk-5MUD3WB2.js";import"./chunk-NTKUVXEL.js";import"./chunk-SE4C7FJY.js";import{b as i}from"./chunk-LJKIWB5F.js";import{b as g}from"./chunk-MRP4ZCD7.js";import"./chunk-5WFYIUU2.js";import{b as m}from"./chunk-ND23BJUM.js";import"./chunk-D5WP4CKS.js";import"./chunk-6KZRLMG3.js";import{b as F}from"./chunk-MXVNCVD6.js";import"./chunk-OBH7XN5N.js";import{b as z}from"./chunk-OQV5J23L.js";import"./chunk-SYG3IW7P.js";import{b as f}from"./chunk-EJQKHROT.js";import"./chunk-JBABAK44.js";import{b as n}from"./chunk-ITA43A73.js";import"./chunk-4VDEBYW7.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";var Er=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,I,M,j,y,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,ir,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,Ir,Mr,jr,yr,Ar,$r,Sr];function Tr(){return Er}var Br=new Map;for(let r of Tr())Br.set(r.name,new Set(r.flags.map(o=>o.flag)));function Fa(r,o,Dr){let a=Br.get(o);if(!(!a||a.size===0))for(let s of Dr)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{Fa as emitFlagCoverage};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a,b,c,d,e,f}from"./chunk-GA6KXSOC.js";import"./chunk-GIFF636B.js";import"./chunk-G43H2WGH.js";import"./chunk-SE4C7FJY.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{c as egrepCommand,f as egrepFlagsForFuzzing,b as fgrepCommand,e as fgrepFlagsForFuzzing,d as flagsForFuzzing,a as grepCommand};
2
+ import{a,b,c,d,e,f}from"./chunk-YFPDB4PH.js";import"./chunk-SXB55JOI.js";import"./chunk-G43H2WGH.js";import"./chunk-SE4C7FJY.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{c as egrepCommand,f as egrepFlagsForFuzzing,b as fgrepCommand,e as fgrepFlagsForFuzzing,d as flagsForFuzzing,a as grepCommand};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-PIBXJ3VX.js";import"./chunk-PLKGKTIS.js";import"./chunk-ZJGIBTWD.js";import"./chunk-4PRVMER6.js";import"./chunk-5MUD3WB2.js";import"./chunk-NTKUVXEL.js";import"./chunk-SE4C7FJY.js";import"./chunk-5WFYIUU2.js";import"./chunk-6KZRLMG3.js";import"./chunk-OBH7XN5N.js";import"./chunk-SYG3IW7P.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as jqCommand};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a,b}from"./chunk-6MF2IYQX.js";import"./chunk-SYG3IW7P.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as lnCommand};
2
+ import{a,b}from"./chunk-YX7OOTPO.js";import"./chunk-SYG3IW7P.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as lnCommand};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-OQV5J23L.js";import"./chunk-SYG3IW7P.js";import"./chunk-JBABAK44.js";import"./chunk-4VDEBYW7.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as mkdirCommand};
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ import"./chunk-MY5PY2PL.js";import{a as M,b as c}from"./chunk-QZNF3Y3J.js";import{a as P,b as U}from"./chunk-JX6YLHDX.js";import{a as N}from"./chunk-4PRVMER6.js";import{c as y}from"./chunk-5MUD3WB2.js";import{b as I}from"./chunk-NTKUVXEL.js";import{a as l}from"./chunk-SYG3IW7P.js";import{a as L,b as k}from"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";import{randomBytes as H}from"node:crypto";import{fileURLToPath as W}from"node:url";import{Worker as z}from"node:worker_threads";var u={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200},a={PENDING:0,READY:1,SUCCESS:2,ERROR:3},E={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,TIMEOUT:8,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10},i={OP_CODE:0,STATUS:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,PATH_BUFFER:32,DATA_BUFFER:4128},w={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:1048576,TOTAL:1052704},F={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},p={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function V(){return new M(w.TOTAL)}var A=class{int32View;uint8View;dataView;constructor(t){this.int32View=new Int32Array(t),this.uint8View=new Uint8Array(t),this.dataView=new DataView(t)}getOpCode(){return c.load(this.int32View,i.OP_CODE/4)}setOpCode(t){c.store(this.int32View,i.OP_CODE/4,t)}getStatus(){return c.load(this.int32View,i.STATUS/4)}setStatus(t){c.store(this.int32View,i.STATUS/4,t)}getPathLength(){return c.load(this.int32View,i.PATH_LENGTH/4)}setPathLength(t){c.store(this.int32View,i.PATH_LENGTH/4,t)}getDataLength(){return c.load(this.int32View,i.DATA_LENGTH/4)}setDataLength(t){c.store(this.int32View,i.DATA_LENGTH/4,t)}getResultLength(){return c.load(this.int32View,i.RESULT_LENGTH/4)}setResultLength(t){c.store(this.int32View,i.RESULT_LENGTH/4,t)}getErrorCode(){return c.load(this.int32View,i.ERROR_CODE/4)}setErrorCode(t){c.store(this.int32View,i.ERROR_CODE/4,t)}getFlags(){return c.load(this.int32View,i.FLAGS/4)}setFlags(t){c.store(this.int32View,i.FLAGS/4,t)}getMode(){return c.load(this.int32View,i.MODE/4)}setMode(t){c.store(this.int32View,i.MODE/4,t)}getPath(){let t=this.getPathLength(),e=this.uint8View.slice(i.PATH_BUFFER,i.PATH_BUFFER+t);return new TextDecoder().decode(e)}setPath(t){let e=new TextEncoder().encode(t);if(e.length>w.PATH_BUFFER)throw new Error(`Path too long: ${e.length} > ${w.PATH_BUFFER}`);this.uint8View.set(e,i.PATH_BUFFER),this.setPathLength(e.length)}getData(){let t=this.getDataLength();return this.uint8View.slice(i.DATA_BUFFER,i.DATA_BUFFER+t)}setData(t){if(t.length>w.DATA_BUFFER)throw new Error(`Data too large: ${t.length} > ${w.DATA_BUFFER}`);this.uint8View.set(t,i.DATA_BUFFER),this.setDataLength(t.length)}getDataAsString(){let t=this.getData();return new TextDecoder().decode(t)}setDataFromString(t){let e=new TextEncoder().encode(t);this.setData(e)}getResult(){let t=this.getResultLength();return this.uint8View.slice(i.DATA_BUFFER,i.DATA_BUFFER+t)}setResult(t){if(t.length>w.DATA_BUFFER)throw new Error(`Result too large: ${t.length} > ${w.DATA_BUFFER}`);this.uint8View.set(t,i.DATA_BUFFER),this.setResultLength(t.length)}getResultAsString(){let t=this.getResult();return new TextDecoder().decode(t)}setResultFromString(t){let e=new TextEncoder().encode(t);this.setResult(e)}encodeStat(t){this.uint8View[i.DATA_BUFFER+p.IS_FILE]=t.isFile?1:0,this.uint8View[i.DATA_BUFFER+p.IS_DIRECTORY]=t.isDirectory?1:0,this.uint8View[i.DATA_BUFFER+p.IS_SYMLINK]=t.isSymbolicLink?1:0,this.dataView.setInt32(i.DATA_BUFFER+p.MODE,t.mode,!0);let e=Math.min(t.size,Number.MAX_SAFE_INTEGER);this.dataView.setFloat64(i.DATA_BUFFER+p.SIZE,e,!0),this.dataView.setFloat64(i.DATA_BUFFER+p.MTIME,t.mtime.getTime(),!0),this.setResultLength(p.TOTAL)}decodeStat(){return{isFile:this.uint8View[i.DATA_BUFFER+p.IS_FILE]===1,isDirectory:this.uint8View[i.DATA_BUFFER+p.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[i.DATA_BUFFER+p.IS_SYMLINK]===1,mode:this.dataView.getInt32(i.DATA_BUFFER+p.MODE,!0),size:this.dataView.getFloat64(i.DATA_BUFFER+p.SIZE,!0),mtime:new Date(this.dataView.getFloat64(i.DATA_BUFFER+p.MTIME,!0))}}waitForReady(t){return c.wait(this.int32View,i.STATUS/4,a.PENDING,t)}waitForReadyAsync(t){return c.waitAsync(this.int32View,i.STATUS/4,a.PENDING,t)}async waitUntilReady(t){let e=Date.now();for(;;){let s=this.getStatus();if(s===a.READY)return!0;let r=Date.now()-e;if(r>=t)return!1;let n=t-r,m=c.waitAsync(this.int32View,i.STATUS/4,s,n);if(m.async&&await m.value==="timed-out")return!1}}waitForResult(t){return c.wait(this.int32View,i.STATUS/4,a.READY,t)}notify(){return c.notify(this.int32View,i.STATUS/4)}reset(){this.setOpCode(u.NOOP),this.setStatus(a.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(E.NONE),this.setFlags(F.NONE),this.setMode(0)}};var x=class{fs;cwd;secureFetch;maxOutputSize;protocol;running=!1;output={stdout:"",stderr:"",exitCode:0};outputLimitExceeded=!1;constructor(t,e,s,r=void 0,n=0){this.fs=e,this.cwd=s,this.secureFetch=r,this.maxOutputSize=n,this.protocol=new A(t)}async run(t){this.running=!0;let e=Date.now();for(;this.running;){let s=Date.now()-e;if(s>=t){this.output.stderr+=`
3
+ python3: execution timeout exceeded
4
+ `,this.output.exitCode=124;break}let r=t-s;if(!await this.protocol.waitUntilReady(r)){this.output.stderr+=`
5
+ python3: execution timeout exceeded
6
+ `,this.output.exitCode=124;break}let m=this.protocol.getOpCode();await this.handleOperation(m),this.protocol.notify()}return this.output}stop(){this.running=!1}async handleOperation(t){try{switch(t){case u.READ_FILE:await this.handleReadFile();break;case u.WRITE_FILE:await this.handleWriteFile();break;case u.STAT:await this.handleStat();break;case u.LSTAT:await this.handleLstat();break;case u.READDIR:await this.handleReaddir();break;case u.MKDIR:await this.handleMkdir();break;case u.RM:await this.handleRm();break;case u.EXISTS:await this.handleExists();break;case u.APPEND_FILE:await this.handleAppendFile();break;case u.SYMLINK:await this.handleSymlink();break;case u.READLINK:await this.handleReadlink();break;case u.CHMOD:await this.handleChmod();break;case u.REALPATH:await this.handleRealpath();break;case u.WRITE_STDOUT:this.handleWriteStdout();break;case u.WRITE_STDERR:this.handleWriteStderr();break;case u.EXIT:this.handleExit();break;case u.HTTP_REQUEST:await this.handleHttpRequest();break;default:this.protocol.setErrorCode(E.IO_ERROR),this.protocol.setStatus(a.ERROR)}}catch(e){this.setErrorFromException(e)}}resolvePath(t){return this.fs.resolvePath(this.cwd,t)}async handleReadFile(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readFileBuffer(t);this.protocol.setResult(e),this.protocol.setStatus(a.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleWriteFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getData();try{await this.fs.writeFile(t,e),this.protocol.setStatus(a.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleStat(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.stat(t);this.protocol.encodeStat(e),this.protocol.setStatus(a.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleLstat(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.lstat(t);this.protocol.encodeStat(e),this.protocol.setStatus(a.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleReaddir(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readdir(t);this.protocol.setResultFromString(JSON.stringify(e)),this.protocol.setStatus(a.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleMkdir(){let t=this.resolvePath(this.protocol.getPath()),s=(this.protocol.getFlags()&F.MKDIR_RECURSIVE)!==0;try{await this.fs.mkdir(t,{recursive:s}),this.protocol.setStatus(a.SUCCESS)}catch(r){this.setErrorFromException(r)}}async handleRm(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getFlags(),s=(e&F.RECURSIVE)!==0,r=(e&F.FORCE)!==0;try{await this.fs.rm(t,{recursive:s,force:r}),this.protocol.setStatus(a.SUCCESS)}catch(n){this.setErrorFromException(n)}}async handleExists(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.exists(t);this.protocol.setResult(new Uint8Array([e?1:0])),this.protocol.setStatus(a.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleAppendFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getData();try{await this.fs.appendFile(t,e),this.protocol.setStatus(a.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleSymlink(){let t=this.protocol.getPath(),e=this.protocol.getDataAsString(),s=this.resolvePath(t);try{await this.fs.symlink(e,s),this.protocol.setStatus(a.SUCCESS)}catch(r){this.setErrorFromException(r)}}async handleReadlink(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readlink(t);this.protocol.setResultFromString(e),this.protocol.setStatus(a.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleChmod(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getMode();try{await this.fs.chmod(t,e),this.protocol.setStatus(a.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleRealpath(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.realpath(t);this.protocol.setResultFromString(e),this.protocol.setStatus(a.SUCCESS)}catch(e){this.setErrorFromException(e)}}handleWriteStdout(){let t=this.protocol.getDataAsString();if(!this.tryAppendOutput("stdout",t)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(E.IO_ERROR),this.protocol.setResultFromString("Output size limit exceeded"),this.protocol.setStatus(a.ERROR);return}this.protocol.setStatus(a.SUCCESS)}handleWriteStderr(){let t=this.protocol.getDataAsString();if(!this.tryAppendOutput("stderr",t)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(E.IO_ERROR),this.protocol.setResultFromString("Output size limit exceeded"),this.protocol.setStatus(a.ERROR);return}this.protocol.setStatus(a.SUCCESS)}handleExit(){let t=this.protocol.getFlags();this.outputLimitExceeded?this.output.exitCode===0&&(this.output.exitCode=1):this.output.exitCode=t,this.protocol.setStatus(a.SUCCESS),this.running=!1}tryAppendOutput(t,e){return this.outputLimitExceeded?!1:this.maxOutputSize<=0?(t==="stdout"?this.output.stdout+=e:this.output.stderr+=e,!0):this.output.stdout.length+this.output.stderr.length+e.length>this.maxOutputSize?!1:(t==="stdout"?this.output.stdout+=e:this.output.stderr+=e,!0)}appendOutputLimitError(){if(this.maxOutputSize<=0)return;let t=`python3: total output size exceeded (>${this.maxOutputSize} bytes), increase executionLimits.maxOutputSize
7
+ `,e=t.length>this.maxOutputSize?t.slice(0,this.maxOutputSize):t;if(this.output.stderr.includes("total output size exceeded"))return;let r=this.output.stdout.length+this.output.stderr.length+e.length-this.maxOutputSize;if(r>0)if(this.output.stdout.length>=r)this.output.stdout=this.output.stdout.slice(0,this.output.stdout.length-r);else{let n=r-this.output.stdout.length;this.output.stdout="",n>=this.output.stderr.length?this.output.stderr="":this.output.stderr=this.output.stderr.slice(0,this.output.stderr.length-n)}this.output.stderr+=e}async handleHttpRequest(){if(!this.secureFetch){this.protocol.setErrorCode(E.NETWORK_NOT_CONFIGURED),this.protocol.setResultFromString("Network access not configured. Enable network in Bash options."),this.protocol.setStatus(a.ERROR);return}let t=this.protocol.getPath(),e=this.protocol.getDataAsString();try{let s=e?JSON.parse(e):{},r=await this.secureFetch(t,{method:s.method,headers:s.headers,body:s.body}),n=JSON.stringify({status:r.status,statusText:r.statusText,headers:r.headers,body:r.body,url:r.url});this.protocol.setResultFromString(n),this.protocol.setStatus(a.SUCCESS)}catch(s){let r=l(s instanceof Error?s.message:String(s));this.protocol.setErrorCode(E.NETWORK_ERROR),this.protocol.setResultFromString(r),this.protocol.setStatus(a.ERROR)}}setErrorFromException(t){let e=t instanceof Error?t.message:String(t),s=l(e),r=E.IO_ERROR,n=e.toLowerCase();n.includes("no such file")||n.includes("not found")||n.includes("enoent")?r=E.NOT_FOUND:n.includes("is a directory")||n.includes("eisdir")?r=E.IS_DIRECTORY:n.includes("not a directory")||n.includes("enotdir")?r=E.NOT_DIRECTORY:n.includes("already exists")||n.includes("eexist")?r=E.EXISTS:(n.includes("permission")||n.includes("eperm")||n.includes("eacces"))&&(r=E.PERMISSION_DENIED),this.protocol.setErrorCode(r),this.protocol.setResultFromString(s),this.protocol.setStatus(a.ERROR)}};var G=3e4,$={name:"python3",summary:"Execute Python code via CPython Emscripten",usage:"python3 [OPTIONS] [-c CODE | -m MODULE | FILE] [ARGS...]",description:["Execute Python code using CPython compiled to WebAssembly via Emscripten.","","This command runs Python in an isolated environment with access to","the virtual filesystem. Standard library modules are available."],options:["-c CODE Execute CODE as Python script","-m MODULE Run library module as a script","--version Show Python version","--help Show this help"],examples:['python3 -c "print(1 + 2)"','python3 -c "import sys; print(sys.version)"',"python3 script.py","python3 script.py arg1 arg2",`echo 'print("hello")' | python3`],notes:["CPython runs in WebAssembly, so execution may be slower than native Python.","Standard library modules are available (no pip install).","Maximum execution time is 30 seconds by default."]};function Y(o){let t={code:null,module:null,scriptFile:null,showVersion:!1,scriptArgs:[]};if(o.length===0)return t;let e=o.findIndex(s=>!s.startsWith("-")||s==="-"||s==="--");for(let s=0;s<(e===-1?o.length:e);s++){let r=o[s];if(r==="-c")return s+1>=o.length?{stdout:"",stderr:`python3: option requires an argument -- 'c'
8
+ `,exitCode:2}:(t.code=o[s+1],t.scriptArgs=o.slice(s+2),t);if(r==="-m")return s+1>=o.length?{stdout:"",stderr:`python3: option requires an argument -- 'm'
9
+ `,exitCode:2}:(t.module=o[s+1],t.scriptArgs=o.slice(s+2),t);if(r==="--version"||r==="-V")return t.showVersion=!0,t;if(r.startsWith("-")&&r!=="-")return{stdout:"",stderr:`python3: unrecognized option '${r}'
10
+ `,exitCode:2}}if(e!==-1){let s=o[e];s==="--"?e+1<o.length&&(t.scriptFile=o[e+1],t.scriptArgs=o.slice(e+2)):(t.scriptFile=s,t.scriptArgs=o.slice(e+1))}return t}var _=new WeakMap;function K(o){let t=_.get(o);return t||(t={executionQueue:[],isExecuting:!1},_.set(o,t)),t}function Rt(){_=new WeakMap}var Q=W(new URL("./worker.js",import.meta.url));function X(){return H(16).toString("hex")}function Z(o,t){if(!o||typeof o!="object")return{success:!1,error:"Malformed worker response"};let e=o;return typeof e.protocolToken!="string"||e.protocolToken!==t?{success:!1,error:"Malformed worker response: invalid protocol token"}:e.type==="security-violation"?{success:!1,error:`Security violation: ${typeof e.violation?.type=="string"?e.violation.type:"unknown"}`}:typeof e.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:e.success?{success:!0}:{success:!1,error:typeof e.error=="string"&&e.error.length>0?e.error:"Worker execution failed"}}function f(o){if(o.isExecuting||o.executionQueue.length===0)return;for(;o.executionQueue.length>0&&o.executionQueue[0].canceled;)o.executionQueue.shift();if(o.executionQueue.length===0)return;let t=o.executionQueue.shift();if(!t)return;o.isExecuting=!0;let e;try{e=I.runTrusted(()=>new z(Q,{workerData:t.input}))}catch(h){let d=h instanceof Error?h.message:String(h);t.resolve({success:!1,error:l(d)}),o.isExecuting=!1,f(o);return}t.workerRef&&(t.workerRef.current=e);let s=y(t.requireDefenseContext,"python3","worker message callback",h=>{t.resolve(Z(h,t.input.protocolToken)),o.isExecuting=!1,e.terminate(),f(o)}),r=y(t.requireDefenseContext,"python3","worker error callback",h=>{t.resolve({success:!1,error:l(h.message)}),o.isExecuting=!1,f(o)}),n=y(t.requireDefenseContext,"python3","worker exit callback",()=>{o.isExecuting&&(t.resolve({success:!1,error:"Worker exited unexpectedly"}),o.isExecuting=!1,f(o))}),m=h=>{try{s(h)}catch(d){let g=d instanceof Error?d.message:String(d);t.resolve({success:!1,error:l(g)}),o.isExecuting=!1,e.terminate(),f(o)}},S=h=>{try{r(h)}catch(d){let g=d instanceof Error?d.message:String(d);t.resolve({success:!1,error:l(g)}),o.isExecuting=!1,f(o)}},D=()=>{try{n()}catch(h){let d=h instanceof Error?h.message:String(h);t.resolve({success:!1,error:l(d)}),o.isExecuting=!1,f(o)}};e.on("message",m),e.on("error",S),e.on("exit",D)}async function J(o,t,e,s=[]){let r=V(),n=new x(r,t.fs,t.cwd,t.fetch,t.limits?.maxOutputSize??0),m=t.limits?.maxPythonTimeoutMs??G,S=K(t.fs),D={protocolToken:X(),sharedBuffer:r,pythonCode:o,cwd:t.cwd,env:N(t.env),args:s,scriptPath:e},h={current:null},d=new Promise(R=>{let C={input:D,resolve:()=>{},workerRef:h,requireDefenseContext:t.requireDefenseContext},b=y(t.requireDefenseContext,"python3","worker timeout callback",()=>{h.current?h.current.terminate():C.canceled=!0,R({success:!1,error:`Execution timeout: exceeded ${m}ms limit`})}),v=P(()=>{try{b()}catch(T){let B=T instanceof Error?T.message:String(T);R({success:!1,error:l(B)})}},m);C.resolve=T=>{U(v),R(T)},S.executionQueue.push(C),f(S)}),[g,O]=await Promise.all([n.run(m).catch(R=>({stdout:"",stderr:`python3: bridge error: ${l(R.message)}
11
+ `,exitCode:1})),d.catch(R=>({success:!1,error:l(R.message)}))]);if(!O.success&&O.error){let R=l(O.error);return{stdout:g.stdout,stderr:`${g.stderr}python3: ${R}
12
+ `,exitCode:g.exitCode||1}}return g}var j={name:"python3",async execute(o,t){if(k(o))return L($);let e=Y(o);if("exitCode"in e)return e;if(e.showVersion)return{stdout:`Python 3.13.2 (Emscripten)
13
+ `,stderr:"",exitCode:0};let s,r;if(e.code!==null)s=e.code,r="-c";else if(e.module!==null){if(!/^[a-zA-Z_][a-zA-Z0-9_.]*$/.test(e.module))return{stdout:"",stderr:`python3: No module named '${e.module.slice(0,200)}'
14
+ `,exitCode:1};s=`import runpy; runpy.run_module('${e.module}', run_name='__main__')`,r=e.module}else if(e.scriptFile!==null){let n=t.fs.resolvePath(t.cwd,e.scriptFile);if(!await t.fs.exists(n))return{stdout:"",stderr:`python3: can't open file '${e.scriptFile}': [Errno 2] No such file or directory
15
+ `,exitCode:2};try{s=await t.fs.readFile(n),r=e.scriptFile}catch(m){let S=l(m.message);return{stdout:"",stderr:`python3: can't open file '${e.scriptFile}': ${S}
16
+ `,exitCode:2}}}else if(t.stdin.trim())s=t.stdin,r="<stdin>";else return{stdout:"",stderr:`python3: no input provided (use -c CODE, -m MODULE, or provide a script file)
17
+ `,exitCode:2};return J(s,t,r,e.scriptArgs)}},gt={name:"python",async execute(o,t){return j.execute(o,t)}};export{Rt as _resetExecutionQueue,j as python3Command,gt as pythonCommand};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a,b}from"./chunk-D2GFNFUN.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as readlinkCommand};
2
+ import{a,b}from"./chunk-ZSVBYEY4.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as readlinkCommand};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-R2LDP472.js";import"./chunk-SYG3IW7P.js";import"./chunk-JBABAK44.js";import"./chunk-4VDEBYW7.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as rmCommand};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-IRCLOW32.js";import"./chunk-5MUD3WB2.js";import"./chunk-NTKUVXEL.js";import"./chunk-SE4C7FJY.js";import"./chunk-6KZRLMG3.js";import"./chunk-SYG3IW7P.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as sedCommand};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-ROMKUVHI.js";import"./chunk-YTIURC67.js";import"./chunk-JX6YLHDX.js";import"./chunk-NTKUVXEL.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as sleepCommand};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a,b,c}from"./chunk-55QIFSKH.js";import"./chunk-WMYKQURM.js";import"./chunk-WO4B7WUT.js";import"./chunk-EO5AH4U7.js";import"./chunk-SYG3IW7P.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{a as _internals,c as flagsForFuzzing,b as sqlite3Command};
2
+ import{a,b,c}from"./chunk-DHFZMFUW.js";import"./chunk-JX6YLHDX.js";import"./chunk-5MUD3WB2.js";import"./chunk-NTKUVXEL.js";import"./chunk-SYG3IW7P.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{a as _internals,c as flagsForFuzzing,b as sqlite3Command};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-YWZOGBFE.js";import"./chunk-YMMJLYIX.js";import"./chunk-JBABAK44.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as statCommand};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-QTII62YM.js";import"./chunk-YMMJLYIX.js";import"./chunk-NTKUVXEL.js";import"./chunk-SE4C7FJY.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as tarCommand};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-VIYJJTN2.js";import"./chunk-4OALHZXB.js";import"./chunk-QZNF3Y3J.js";import"./chunk-4PRVMER6.js";import"./chunk-SYG3IW7P.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as timeCommand};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-VCKKRS7V.js";import"./chunk-YTIURC67.js";import"./chunk-4OALHZXB.js";import"./chunk-JX6YLHDX.js";import"./chunk-NTKUVXEL.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as timeoutCommand};
@@ -169,6 +169,34 @@ function getBlockedGlobals() {
169
169
  strategy: "throw",
170
170
  reason: "process.setgid could escalate privileges"
171
171
  },
172
+ {
173
+ prop: "seteuid",
174
+ target: process,
175
+ violationType: "process_setuid",
176
+ strategy: "throw",
177
+ reason: "process.seteuid could escalate effective user privileges"
178
+ },
179
+ {
180
+ prop: "setegid",
181
+ target: process,
182
+ violationType: "process_setuid",
183
+ strategy: "throw",
184
+ reason: "process.setegid could escalate effective group privileges"
185
+ },
186
+ {
187
+ prop: "initgroups",
188
+ target: process,
189
+ violationType: "process_setuid",
190
+ strategy: "throw",
191
+ reason: "process.initgroups could modify supplementary group IDs"
192
+ },
193
+ {
194
+ prop: "setgroups",
195
+ target: process,
196
+ violationType: "process_setuid",
197
+ strategy: "throw",
198
+ reason: "process.setgroups could modify supplementary group IDs"
199
+ },
172
200
  // File permission manipulation
173
201
  {
174
202
  prop: "umask",
@@ -190,7 +218,14 @@ function getBlockedGlobals() {
190
218
  // in defense-in-depth-box.ts and worker-defense-in-depth.ts
191
219
  // Note: process.connected is a boolean primitive, handled specially
192
220
  // in defense-in-depth-box.ts and worker-defense-in-depth.ts
193
- // Working directory manipulation
221
+ // Working directory access/manipulation
222
+ {
223
+ prop: "cwd",
224
+ target: process,
225
+ violationType: "process_chdir",
226
+ strategy: "throw",
227
+ reason: "process.cwd could disclose real host working directory path"
228
+ },
194
229
  {
195
230
  prop: "chdir",
196
231
  target: process,
@@ -198,6 +233,30 @@ function getBlockedGlobals() {
198
233
  strategy: "throw",
199
234
  reason: "process.chdir could confuse the interpreter's CWD tracking"
200
235
  },
236
+ // Diagnostic report (leaks full environment, host paths, system info)
237
+ {
238
+ prop: "report",
239
+ target: process,
240
+ violationType: "process_report",
241
+ strategy: "throw",
242
+ reason: "process.report could disclose full environment, host paths, and system info"
243
+ },
244
+ // Environment file loading (Node 21.7+)
245
+ {
246
+ prop: "loadEnvFile",
247
+ target: process,
248
+ violationType: "process_env",
249
+ strategy: "throw",
250
+ reason: "process.loadEnvFile could load env files bypassing env proxy"
251
+ },
252
+ // Exception handler manipulation
253
+ {
254
+ prop: "setUncaughtExceptionCaptureCallback",
255
+ target: process,
256
+ violationType: "process_exception_handler",
257
+ strategy: "throw",
258
+ reason: "setUncaughtExceptionCaptureCallback could intercept security errors"
259
+ },
201
260
  // IPC communication vectors (may be undefined in non-IPC contexts)
202
261
  {
203
262
  prop: "send",
@@ -254,6 +313,13 @@ function getBlockedGlobals() {
254
313
  reason: "FinalizationRegistry could be used to leak references outside sandbox"
255
314
  },
256
315
  // Introspection/interception vectors (freeze instead of throw)
316
+ // SECURITY RATIONALE: Reflect is frozen (not blocked) because:
317
+ // 1. Defense infrastructure uses Reflect.apply/get/set/construct internally
318
+ // 2. Frozen Reflect cannot be mutated but remains fully functional
319
+ // 3. Reflect.construct(Function, ['code']) IS safe because globalThis.Function
320
+ // is replaced with a blocking proxy — Reflect.construct receives the proxy
321
+ // 4. Security depends on NEVER leaking original Function/eval references.
322
+ // If an unpatched Function ref leaked, Reflect.construct would bypass defense.
257
323
  {
258
324
  prop: "Reflect",
259
325
  target: globalThis,
@@ -710,6 +776,64 @@ var WorkerDefenseInDepth = class {
710
776
  } finally {
711
777
  self.inTrap = false;
712
778
  }
779
+ },
780
+ deleteProperty(target, prop) {
781
+ if (self.inTrap) {
782
+ return Reflect.deleteProperty(target, prop);
783
+ }
784
+ self.inTrap = true;
785
+ try {
786
+ const fullPath = `${path}.${String(prop)}`;
787
+ const message = `${fullPath} deletion is blocked in worker context`;
788
+ const violation = self.recordViolation(
789
+ violationType,
790
+ fullPath,
791
+ message
792
+ );
793
+ if (!auditMode) {
794
+ throw new WorkerSecurityViolationError(message, violation);
795
+ }
796
+ return Reflect.deleteProperty(target, prop);
797
+ } finally {
798
+ self.inTrap = false;
799
+ }
800
+ },
801
+ setPrototypeOf(target, proto) {
802
+ if (self.inTrap) {
803
+ return Reflect.setPrototypeOf(target, proto);
804
+ }
805
+ self.inTrap = true;
806
+ try {
807
+ const message = `${path} setPrototypeOf is blocked in worker context`;
808
+ const violation = self.recordViolation(violationType, path, message);
809
+ if (!auditMode) {
810
+ throw new WorkerSecurityViolationError(message, violation);
811
+ }
812
+ return Reflect.setPrototypeOf(target, proto);
813
+ } finally {
814
+ self.inTrap = false;
815
+ }
816
+ },
817
+ defineProperty(target, prop, descriptor) {
818
+ if (self.inTrap) {
819
+ return Reflect.defineProperty(target, prop, descriptor);
820
+ }
821
+ self.inTrap = true;
822
+ try {
823
+ const fullPath = `${path}.${String(prop)}`;
824
+ const message = `${fullPath} defineProperty is blocked in worker context`;
825
+ const violation = self.recordViolation(
826
+ violationType,
827
+ fullPath,
828
+ message
829
+ );
830
+ if (!auditMode) {
831
+ throw new WorkerSecurityViolationError(message, violation);
832
+ }
833
+ return Reflect.defineProperty(target, prop, descriptor);
834
+ } finally {
835
+ self.inTrap = false;
836
+ }
713
837
  }
714
838
  });
715
839
  }
@@ -746,6 +870,42 @@ var WorkerDefenseInDepth = class {
746
870
  if (!excludeTypes.has("process_connected")) {
747
871
  this.protectProcessConnected();
748
872
  }
873
+ this.lockWellKnownSymbols();
874
+ }
875
+ /**
876
+ * Lock well-known Symbol properties on built-in constructors/prototypes.
877
+ */
878
+ lockWellKnownSymbols() {
879
+ const lock = (obj, sym) => {
880
+ try {
881
+ const desc = Object.getOwnPropertyDescriptor(obj, sym);
882
+ if (desc?.configurable) {
883
+ if ("value" in desc) {
884
+ Object.defineProperty(obj, sym, {
885
+ ...desc,
886
+ configurable: false,
887
+ writable: false
888
+ });
889
+ return;
890
+ }
891
+ Object.defineProperty(obj, sym, { ...desc, configurable: false });
892
+ }
893
+ } catch {
894
+ }
895
+ };
896
+ for (const ctor of [Array, Map, Set, RegExp, Promise]) {
897
+ lock(ctor, Symbol.species);
898
+ }
899
+ for (const proto of [
900
+ Array.prototype,
901
+ String.prototype,
902
+ Map.prototype,
903
+ Set.prototype
904
+ ]) {
905
+ lock(proto, Symbol.iterator);
906
+ }
907
+ lock(Symbol.prototype, Symbol.toPrimitive);
908
+ lock(Date.prototype, Symbol.toPrimitive);
749
909
  }
750
910
  /**
751
911
  * Protect against .constructor.constructor escape vector.
@@ -1282,11 +1442,7 @@ function wrapWasmCallback(component, phase, callback) {
1282
1442
  };
1283
1443
  }
1284
1444
 
1285
- // src/timers.ts
1286
- var nativeSetTimeout = globalThis.setTimeout.bind(globalThis);
1287
- var nativeClearTimeout = globalThis.clearTimeout.bind(globalThis);
1288
- var nativeSetInterval = globalThis.setInterval.bind(globalThis);
1289
- var nativeClearInterval = globalThis.clearInterval.bind(globalThis);
1445
+ // src/security/trusted-globals.ts
1290
1446
  var _SharedArrayBuffer = globalThis.SharedArrayBuffer;
1291
1447
  var _Atomics = globalThis.Atomics;
1292
1448
  var _performanceNow = performance.now.bind(performance);
@@ -1746,6 +1902,26 @@ var SyncFsBackend = class {
1746
1902
  // src/commands/python3/worker.ts
1747
1903
  import { readFileSync } from "node:fs";
1748
1904
  var require2 = createRequire(import.meta.url);
1905
+ var CPYTHON_ENTRY_BASENAME = "/vendor/cpython-emscripten/python.cjs";
1906
+ var CPYTHON_STDLIB_BASENAME = "/vendor/cpython-emscripten/python313.zip";
1907
+ var moduleLoadGuardInstalled = false;
1908
+ function normalizePath(path) {
1909
+ return path.replace(/\\/g, "/");
1910
+ }
1911
+ function isApprovedCpythonEntryPath(path) {
1912
+ return normalizePath(path).endsWith(CPYTHON_ENTRY_BASENAME);
1913
+ }
1914
+ function isApprovedStdlibZipPath(path) {
1915
+ return normalizePath(path).endsWith(CPYTHON_STDLIB_BASENAME);
1916
+ }
1917
+ function assertApprovedPath(path, kind) {
1918
+ const ok = kind === "cpython-entry" ? isApprovedCpythonEntryPath(path) : isApprovedStdlibZipPath(path);
1919
+ if (!ok) {
1920
+ throw new Error(
1921
+ `[Defense-in-depth] rejected ${kind} path outside approved vendor bundle: ${path}`
1922
+ );
1923
+ }
1924
+ }
1749
1925
  try {
1750
1926
  const NodeModule = require2("node:module");
1751
1927
  if (typeof NodeModule._load === "function") {
@@ -1786,18 +1962,22 @@ try {
1786
1962
  }
1787
1963
  return originalLoad.apply(this, [request, ...rest]);
1788
1964
  };
1965
+ moduleLoadGuardInstalled = true;
1789
1966
  }
1790
1967
  } catch {
1791
1968
  }
1792
- var cpythonDir;
1969
+ var cpythonEntryPath;
1793
1970
  try {
1794
- cpythonDir = dirname(
1795
- require2.resolve("../../../vendor/cpython-emscripten/python.cjs")
1971
+ cpythonEntryPath = require2.resolve(
1972
+ "../../../vendor/cpython-emscripten/python.cjs"
1796
1973
  );
1797
1974
  } catch (_e) {
1798
- cpythonDir = dirname(import.meta.url).replace("file://", "") + "/../../../vendor/cpython-emscripten";
1975
+ cpythonEntryPath = dirname(import.meta.url).replace("file://", "") + "/../../../vendor/cpython-emscripten/python.cjs";
1799
1976
  }
1977
+ assertApprovedPath(cpythonEntryPath, "cpython-entry");
1978
+ var cpythonDir = dirname(cpythonEntryPath);
1800
1979
  var stdlibZipPath = `${cpythonDir}/python313.zip`;
1980
+ assertApprovedPath(stdlibZipPath, "cpython-stdlib");
1801
1981
  function createHOSTFS(backend, FS, PATH) {
1802
1982
  const ERRNO_CODES = {
1803
1983
  EPERM: 63,
@@ -2573,9 +2753,22 @@ sys.modules['jb_http'] = jb_http
2573
2753
  `;
2574
2754
  }
2575
2755
  var cachedStdlibZip = new Uint8Array(readFileSync(stdlibZipPath));
2576
- function postWorkerMessage(message) {
2756
+ function wrapWorkerMessage(protocolToken, message) {
2757
+ const wrapped = /* @__PURE__ */ Object.create(null);
2758
+ if (!message || typeof message !== "object") {
2759
+ wrapped.success = false;
2760
+ wrapped.error = "Worker attempted to post non-object message";
2761
+ wrapped.protocolToken = protocolToken;
2762
+ return wrapped;
2763
+ }
2764
+ for (const [key, value] of Object.entries(message))
2765
+ wrapped[key] = value;
2766
+ wrapped.protocolToken = protocolToken;
2767
+ return wrapped;
2768
+ }
2769
+ function postWorkerMessage(protocolToken, message) {
2577
2770
  try {
2578
- parentPort?.postMessage(message);
2771
+ parentPort?.postMessage(wrapWorkerMessage(protocolToken, message));
2579
2772
  } catch (error) {
2580
2773
  console.debug(
2581
2774
  "[python3-worker] failed to post worker message:",
@@ -2584,8 +2777,15 @@ function postWorkerMessage(message) {
2584
2777
  }
2585
2778
  }
2586
2779
  async function runPython(input) {
2780
+ if (!moduleLoadGuardInstalled) {
2781
+ return {
2782
+ success: false,
2783
+ error: "Defense-in-depth module-loader guard failed to initialize; refusing to execute Python worker"
2784
+ };
2785
+ }
2587
2786
  const backend = new SyncFsBackend(input.sharedBuffer);
2588
- const createPythonModule = require2(`${cpythonDir}/python.cjs`);
2787
+ assertApprovedPath(cpythonEntryPath, "cpython-entry");
2788
+ const createPythonModule = require2(cpythonEntryPath);
2589
2789
  let moduleReady = false;
2590
2790
  const pendingStdout = [];
2591
2791
  const pendingStderr = [];
@@ -2643,7 +2843,7 @@ async function runPython(input) {
2643
2843
  error: `Failed to load CPython: ${message}`
2644
2844
  };
2645
2845
  }
2646
- activateDefense();
2846
+ activateDefense(input.protocolToken);
2647
2847
  moduleReady = true;
2648
2848
  for (const text of pendingStdout) backend.writeStdout(text);
2649
2849
  for (const text of pendingStderr) backend.writeStderr(text);
@@ -2707,7 +2907,7 @@ sys.exit(_jb_exit_code)
2707
2907
  }
2708
2908
  }
2709
2909
  var defense = null;
2710
- function activateDefense() {
2910
+ function activateDefense(protocolToken) {
2711
2911
  if (defense) return;
2712
2912
  const _DateNow = Date.now;
2713
2913
  const degraded = { now: () => _DateNow(), timeOrigin: _DateNow() };
@@ -2720,7 +2920,10 @@ function activateDefense() {
2720
2920
  "python3-worker",
2721
2921
  "onViolation",
2722
2922
  (v) => {
2723
- postWorkerMessage({ type: "security-violation", violation: v });
2923
+ postWorkerMessage(protocolToken, {
2924
+ type: "security-violation",
2925
+ violation: v
2926
+ });
2724
2927
  }
2725
2928
  );
2726
2929
  defense = new WorkerDefenseInDepth({
@@ -2737,20 +2940,26 @@ function activateDefense() {
2737
2940
  });
2738
2941
  }
2739
2942
  process.on("uncaughtException", (e) => {
2943
+ if (!activeProtocolToken) {
2944
+ return;
2945
+ }
2740
2946
  const message = sanitizeErrorMessage(e.message);
2741
- postWorkerMessage({
2947
+ postWorkerMessage(activeProtocolToken, {
2742
2948
  success: false,
2743
2949
  error: `Worker uncaught exception: ${message}`
2744
2950
  });
2745
2951
  });
2952
+ var activeProtocolToken = null;
2746
2953
  if (parentPort) {
2747
2954
  if (workerData) {
2748
- runPython(workerData).then((result) => {
2955
+ const input = workerData;
2956
+ activeProtocolToken = input.protocolToken;
2957
+ runPython(input).then((result) => {
2749
2958
  result.defenseStats = defense?.getStats();
2750
- postWorkerMessage(result);
2959
+ postWorkerMessage(input.protocolToken, result);
2751
2960
  }).catch((e) => {
2752
2961
  const message = sanitizeUnknownError(e);
2753
- postWorkerMessage({
2962
+ postWorkerMessage(input.protocolToken, {
2754
2963
  success: false,
2755
2964
  error: message,
2756
2965
  defenseStats: defense?.getStats()
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-BBRVF6XE.js";import"./chunk-GZHFXDDO.js";import"./chunk-QSDVMMYI.js";import"./chunk-PLKGKTIS.js";import"./chunk-ZJGIBTWD.js";import"./chunk-4PRVMER6.js";import"./chunk-5MUD3WB2.js";import"./chunk-NTKUVXEL.js";import"./chunk-SE4C7FJY.js";import"./chunk-5WFYIUU2.js";import"./chunk-6KZRLMG3.js";import"./chunk-OBH7XN5N.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as xanCommand};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-ZNPXCE5B.js";import"./chunk-QSDVMMYI.js";import"./chunk-PLKGKTIS.js";import"./chunk-ZJGIBTWD.js";import"./chunk-4PRVMER6.js";import"./chunk-5MUD3WB2.js";import"./chunk-NTKUVXEL.js";import"./chunk-SE4C7FJY.js";import"./chunk-6KZRLMG3.js";import"./chunk-SYG3IW7P.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as yqCommand};