@jerryan/just-bash 3.9.0 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/README.md +2 -2
  3. package/dist/AGENTS.md +2 -2
  4. package/dist/abort-signals.d.ts +10 -0
  5. package/dist/bin/chunks/awk2-LCV2AUIX.js +3 -0
  6. package/dist/bin/{shell/chunks/base64-TQ5KOCNW.js → chunks/base64-OLYCF2PC.js} +1 -1
  7. package/dist/bin/chunks/builtin-manifest-ORBIZM7I.js +3 -0
  8. package/dist/bin/chunks/{cat-BQ7FQTN5.js → cat-UJLF2DU2.js} +1 -1
  9. package/dist/bin/{shell/chunks/chmod-GX5SYTRL.js → chunks/chmod-V5F4BXZ2.js} +1 -1
  10. package/dist/bin/{shell/chunks/chunk-V4S4A7M6.js → chunks/chunk-2TEF4USR.js} +1 -1
  11. package/dist/bin/{shell/chunks/chunk-GBKR5KTT.js → chunks/chunk-3ASHUC7C.js} +13 -13
  12. package/dist/bin/chunks/{chunk-N26Y42L6.js → chunk-3M5OMKFS.js} +1 -1
  13. package/dist/bin/chunks/chunk-4NYJ4ZTO.js +17 -0
  14. package/dist/bin/chunks/{chunk-M3Z5NZXT.js → chunk-572NXISH.js} +1 -1
  15. package/dist/bin/chunks/chunk-5NWK7A4R.js +13 -0
  16. package/dist/bin/{shell/chunks/chunk-YXPSX3SI.js → chunks/chunk-623Q77WZ.js} +1 -1
  17. package/dist/bin/chunks/chunk-6NG4ULJM.js +7 -0
  18. package/dist/bin/{shell/chunks/chunk-QFOXSCOD.js → chunks/chunk-726WDFMQ.js} +1 -1
  19. package/dist/bin/chunks/{chunk-DRPHNXG7.js → chunk-7LGT4LHQ.js} +1 -1
  20. package/dist/bin/chunks/{chunk-MBREBDZQ.js → chunk-AIWBN36Z.js} +1 -1
  21. package/dist/bin/chunks/{chunk-3ROYEBJI.js → chunk-AJ3CSZ34.js} +1 -1
  22. package/dist/bin/{shell/chunks/chunk-VTAMGD42.js → chunks/chunk-APEQNYAO.js} +1 -1
  23. package/dist/bin/chunks/chunk-AQKIHX3Q.js +3 -0
  24. package/dist/bin/chunks/chunk-BFLKIASG.js +7 -0
  25. package/dist/bin/chunks/{chunk-IOKQFPM6.js → chunk-BRB5PJ3E.js} +1 -1
  26. package/dist/bin/chunks/{chunk-ZVG47PYA.js → chunk-BVBYPYA5.js} +1 -1
  27. package/dist/bin/chunks/{chunk-T6OIISUC.js → chunk-BZJ77YQD.js} +1 -1
  28. package/dist/bin/{shell/chunks/chunk-GR4ZHKXI.js → chunks/chunk-C2BLJ3AE.js} +1 -1
  29. package/dist/bin/{shell/chunks/chunk-KMYJMEON.js → chunks/chunk-C45GTJTD.js} +1 -1
  30. package/dist/bin/chunks/{chunk-GOWX7VPU.js → chunk-CTS7QXCJ.js} +1 -1
  31. package/dist/bin/chunks/{chunk-42AMF6EE.js → chunk-DTNGYQCJ.js} +1 -1
  32. package/dist/bin/chunks/{chunk-TW2IJRUF.js → chunk-ENEHPI32.js} +1 -1
  33. package/dist/bin/{shell/chunks/chunk-E54Z6VIE.js → chunks/chunk-ERYPQAZE.js} +5 -5
  34. package/dist/bin/chunks/{chunk-PQ2INDRF.js → chunk-GB3KUAFV.js} +1 -1
  35. package/dist/bin/chunks/chunk-HFVQCXYX.js +10 -0
  36. package/dist/bin/chunks/chunk-HSWCKN2X.js +14 -0
  37. package/dist/bin/chunks/{chunk-B6WWC6K3.js → chunk-I6MS5ZWE.js} +1 -1
  38. package/dist/bin/chunks/{chunk-V4U26ZWL.js → chunk-IOFXLMNJ.js} +1 -1
  39. package/dist/bin/chunks/chunk-IX6QY5JW.js +5 -0
  40. package/dist/bin/chunks/{chunk-QKJAAJ7J.js → chunk-IXTPVJ6W.js} +1 -1
  41. package/dist/bin/chunks/{chunk-OUQKFRVR.js → chunk-JBYLHCKP.js} +1 -1
  42. package/dist/bin/chunks/{chunk-NXUXZWS5.js → chunk-JLRB7DV3.js} +1 -1
  43. package/dist/bin/chunks/{chunk-6JEDM6CZ.js → chunk-KH6YLKPE.js} +1 -1
  44. package/dist/bin/chunks/chunk-KXSDVBJA.js +12 -0
  45. package/dist/bin/chunks/{chunk-DYIBFLS3.js → chunk-LOU52GPJ.js} +2 -2
  46. package/dist/bin/chunks/{chunk-L345YZ6R.js → chunk-LVT5R45K.js} +1 -1
  47. package/dist/bin/chunks/{chunk-PTUQEN6I.js → chunk-M345X45Z.js} +7 -7
  48. package/dist/bin/chunks/{chunk-6FGMEZZP.js → chunk-NDS7PYKD.js} +1 -1
  49. package/dist/bin/chunks/chunk-O3PNT72D.js +3 -0
  50. package/dist/bin/chunks/chunk-OGOISDGZ.js +3 -0
  51. package/dist/bin/chunks/chunk-OSW4MDDH.js +21 -0
  52. package/dist/bin/{shell/chunks/chunk-ABP4OLJV.js → chunks/chunk-OXEDIWNZ.js} +1 -1
  53. package/dist/bin/chunks/{chunk-FPWHWWXO.js → chunk-OXV2B2YS.js} +1 -1
  54. package/dist/bin/chunks/{chunk-QMPZXXEK.js → chunk-OY25E3ZN.js} +1 -1
  55. package/dist/bin/chunks/{chunk-O2BCKSMK.js → chunk-PEJXCXSY.js} +1 -1
  56. package/dist/bin/{shell/chunks/chunk-6KHZX4HU.js → chunks/chunk-PLLMJHMV.js} +1 -1
  57. package/dist/bin/{shell/chunks/chunk-6TUILMPB.js → chunks/chunk-QELDDRV5.js} +1 -1
  58. package/dist/bin/chunks/{chunk-3FQBUEB6.js → chunk-RC4UXNHA.js} +1 -1
  59. package/dist/bin/{shell/chunks/chunk-H7PD6FLC.js → chunks/chunk-RE7Z53A3.js} +1 -1
  60. package/dist/bin/chunks/chunk-SCQRBEQW.js +275 -0
  61. package/dist/bin/chunks/{chunk-3DWQCLNP.js → chunk-SS2OPV62.js} +1 -1
  62. package/dist/bin/{shell/chunks/chunk-CC2AQ6B7.js → chunks/chunk-U6JTVQU6.js} +1 -1
  63. package/dist/bin/chunks/chunk-UBA7DOWE.js +3 -0
  64. package/dist/bin/chunks/{chunk-VPSBWWXM.js → chunk-UFAYH3WW.js} +7 -6
  65. package/dist/bin/chunks/chunk-UPUFWGHR.js +3 -0
  66. package/dist/bin/{shell/chunks/chunk-QJWFCA7P.js → chunks/chunk-UU42WPB7.js} +1 -1
  67. package/dist/bin/chunks/{chunk-CNVNOT67.js → chunk-UW4E5XU5.js} +1 -1
  68. package/dist/bin/chunks/chunk-VMVXACZ5.js +6 -0
  69. package/dist/bin/chunks/chunk-WLQ2KWS3.js +10 -0
  70. package/dist/bin/chunks/{chunk-MVBK66TR.js → chunk-WPJ5CECR.js} +1 -1
  71. package/dist/bin/chunks/{chunk-ANX7U57Q.js → chunk-XBOBVLRL.js} +2 -2
  72. package/dist/bin/chunks/{chunk-HZGHQZSY.js → chunk-Z3MXFCN7.js} +1 -1
  73. package/dist/bin/chunks/{column-AJFK3TWF.js → column-AL4LR5PO.js} +1 -1
  74. package/dist/bin/chunks/{cp-YLP7ULVT.js → cp-XJWV46T5.js} +1 -1
  75. package/dist/bin/{shell/chunks/curl-NHNZ46BU.js → chunks/curl-HZ5SBTVY.js} +11 -11
  76. package/dist/bin/chunks/{cut-42X6363P.js → cut-LNJEMWBJ.js} +1 -1
  77. package/dist/bin/{shell/chunks/diff-DM47S5PT.js → chunks/diff-YLVT27CZ.js} +1 -1
  78. package/dist/bin/chunks/dist-4NZ74CRE.js +141 -0
  79. package/dist/bin/chunks/{du-DH76GZJ3.js → du-YNAJTGCR.js} +1 -1
  80. package/dist/bin/chunks/{expr-PQEPO5TE.js → expr-GLGO2VEZ.js} +1 -1
  81. package/dist/bin/chunks/{file-JA7QI2YT.js → file-7M5LLZJY.js} +1 -1
  82. package/dist/bin/chunks/find-3QDGII35.js +3 -0
  83. package/dist/bin/chunks/flag-coverage-AGEO3F6X.js +3 -0
  84. package/dist/bin/chunks/{grep-VXWNMIDD.js → grep-AZJ2CMYE.js} +1 -1
  85. package/dist/bin/chunks/{gzip-UQZL4R74.js → gzip-W5CL2E2W.js} +1 -1
  86. package/dist/bin/{shell/chunks/head-QKVY3SIO.js → chunks/head-ABLEKDMV.js} +1 -1
  87. package/dist/bin/{shell/chunks/help-HVIDHJ6M.js → chunks/help-EXVKU23F.js} +1 -1
  88. package/dist/bin/chunks/{html-to-markdown-XUMA42ZC.js → html-to-markdown-FDNPIEKZ.js} +1 -1
  89. package/dist/bin/{shell/chunks/jq-YS4PR46D.js → chunks/jq-5SOTL7D7.js} +1 -1
  90. package/dist/bin/chunks/{js-exec-ZAAIZQWI.js → js-exec-LISDW7YC.js} +2 -2
  91. package/dist/bin/chunks/js-exec-worker.js +1 -0
  92. package/dist/bin/chunks/{ls-5Z45FV4U.js → ls-EEX3YIOF.js} +1 -1
  93. package/dist/bin/chunks/mkdir-KDEZTR53.js +3 -0
  94. package/dist/bin/chunks/mktemp-OYQYUB5H.js +3 -0
  95. package/dist/bin/{shell/chunks/mv-EOOP2TO3.js → chunks/mv-35V6IA5V.js} +1 -1
  96. package/dist/bin/{shell/chunks/od-2GXD4D5K.js → chunks/od-TD5LZDUM.js} +1 -1
  97. package/dist/bin/{shell/chunks/paste-DWWA3JTW.js → chunks/paste-QJG6BYAP.js} +1 -1
  98. package/dist/bin/chunks/{python3-TJ6DCPIA.js → python3-P6MZ44HK.js} +5 -5
  99. package/dist/bin/{shell/chunks/readlink-EJ3IKLWW.js → chunks/readlink-BF435HNQ.js} +1 -1
  100. package/dist/bin/chunks/rg-B2DVJQVY.js +3 -0
  101. package/dist/bin/chunks/rm-HCMKNRM2.js +3 -0
  102. package/dist/bin/{shell/chunks/rmdir-PRNISPBA.js → chunks/rmdir-WGVUYGPF.js} +1 -1
  103. package/dist/bin/{shell/chunks/sed-SY63U2YX.js → chunks/sed-66XZQ75T.js} +1 -1
  104. package/dist/bin/chunks/{seq-X2EAOGV5.js → seq-KBVCQ4WT.js} +1 -1
  105. package/dist/bin/chunks/{sleep-MOJQBZMY.js → sleep-4O22Z4DI.js} +1 -1
  106. package/dist/bin/{shell/chunks/split-HIFKSV2A.js → chunks/split-OK6JHDWZ.js} +1 -1
  107. package/dist/bin/chunks/sqlite3-57ACN7ES.js +3 -0
  108. package/dist/bin/chunks/{stat-LROLDXHH.js → stat-VNNI7JDZ.js} +1 -1
  109. package/dist/bin/chunks/{tail-UOTUV25D.js → tail-PAHZX3MA.js} +1 -1
  110. package/dist/bin/chunks/{tar-7XOP7VOX.js → tar-RPVTXGFJ.js} +1 -1
  111. package/dist/bin/chunks/{time-LF7BTSK5.js → time-J2DAZUIN.js} +1 -1
  112. package/dist/bin/chunks/timeout-XMTXHNFF.js +3 -0
  113. package/dist/bin/{shell/chunks/tr-PVFO6FRY.js → chunks/tr-ETPC3LHV.js} +1 -1
  114. package/dist/bin/chunks/{which-4TPGVSBZ.js → which-G7X54RZL.js} +1 -1
  115. package/dist/bin/chunks/worker.js +5 -0
  116. package/dist/bin/chunks/{xan-RMH6JEXM.js → xan-XZHKEPJ4.js} +1 -1
  117. package/dist/bin/chunks/{xan-view-PD26QEFN.js → xan-view-CNGKCABE.js} +1 -1
  118. package/dist/bin/chunks/yes-2EQTNSIB.js +3 -0
  119. package/dist/bin/chunks/yq-T6S3IDKY.js +3 -0
  120. package/dist/bin/just-bash.js +299 -293
  121. package/dist/bin/shell/chunks/awk2-LCV2AUIX.js +3 -0
  122. package/dist/bin/{chunks/base64-TQ5KOCNW.js → shell/chunks/base64-OLYCF2PC.js} +1 -1
  123. package/dist/bin/shell/chunks/builtin-manifest-ORBIZM7I.js +3 -0
  124. package/dist/bin/shell/chunks/{cat-BQ7FQTN5.js → cat-UJLF2DU2.js} +1 -1
  125. package/dist/bin/{chunks/chmod-GX5SYTRL.js → shell/chunks/chmod-V5F4BXZ2.js} +1 -1
  126. package/dist/bin/{chunks/chunk-V4S4A7M6.js → shell/chunks/chunk-2TEF4USR.js} +1 -1
  127. package/dist/bin/{chunks/chunk-GBKR5KTT.js → shell/chunks/chunk-3ASHUC7C.js} +13 -13
  128. package/dist/bin/shell/chunks/{chunk-N26Y42L6.js → chunk-3M5OMKFS.js} +1 -1
  129. package/dist/bin/shell/chunks/chunk-4NYJ4ZTO.js +17 -0
  130. package/dist/bin/shell/chunks/{chunk-M3Z5NZXT.js → chunk-572NXISH.js} +1 -1
  131. package/dist/bin/shell/chunks/chunk-5NWK7A4R.js +13 -0
  132. package/dist/bin/{chunks/chunk-YXPSX3SI.js → shell/chunks/chunk-623Q77WZ.js} +1 -1
  133. package/dist/bin/shell/chunks/chunk-6NG4ULJM.js +7 -0
  134. package/dist/bin/{chunks/chunk-QFOXSCOD.js → shell/chunks/chunk-726WDFMQ.js} +1 -1
  135. package/dist/bin/shell/chunks/{chunk-DRPHNXG7.js → chunk-7LGT4LHQ.js} +1 -1
  136. package/dist/bin/shell/chunks/{chunk-MBREBDZQ.js → chunk-AIWBN36Z.js} +1 -1
  137. package/dist/bin/shell/chunks/{chunk-3ROYEBJI.js → chunk-AJ3CSZ34.js} +1 -1
  138. package/dist/bin/{chunks/chunk-VTAMGD42.js → shell/chunks/chunk-APEQNYAO.js} +1 -1
  139. package/dist/bin/shell/chunks/chunk-AQKIHX3Q.js +3 -0
  140. package/dist/bin/shell/chunks/chunk-BFLKIASG.js +7 -0
  141. package/dist/bin/shell/chunks/{chunk-IOKQFPM6.js → chunk-BRB5PJ3E.js} +1 -1
  142. package/dist/bin/shell/chunks/{chunk-ZVG47PYA.js → chunk-BVBYPYA5.js} +1 -1
  143. package/dist/bin/shell/chunks/{chunk-T6OIISUC.js → chunk-BZJ77YQD.js} +1 -1
  144. package/dist/bin/{chunks/chunk-GR4ZHKXI.js → shell/chunks/chunk-C2BLJ3AE.js} +1 -1
  145. package/dist/bin/{chunks/chunk-KMYJMEON.js → shell/chunks/chunk-C45GTJTD.js} +1 -1
  146. package/dist/bin/shell/chunks/{chunk-GOWX7VPU.js → chunk-CTS7QXCJ.js} +1 -1
  147. package/dist/bin/shell/chunks/{chunk-42AMF6EE.js → chunk-DTNGYQCJ.js} +1 -1
  148. package/dist/bin/shell/chunks/{chunk-TW2IJRUF.js → chunk-ENEHPI32.js} +1 -1
  149. package/dist/bin/{chunks/chunk-E54Z6VIE.js → shell/chunks/chunk-ERYPQAZE.js} +5 -5
  150. package/dist/bin/shell/chunks/{chunk-PQ2INDRF.js → chunk-GB3KUAFV.js} +1 -1
  151. package/dist/bin/shell/chunks/chunk-HFVQCXYX.js +10 -0
  152. package/dist/bin/shell/chunks/chunk-HSWCKN2X.js +14 -0
  153. package/dist/bin/shell/chunks/{chunk-B6WWC6K3.js → chunk-I6MS5ZWE.js} +1 -1
  154. package/dist/bin/shell/chunks/{chunk-V4U26ZWL.js → chunk-IOFXLMNJ.js} +1 -1
  155. package/dist/bin/shell/chunks/chunk-IX6QY5JW.js +5 -0
  156. package/dist/bin/shell/chunks/{chunk-QKJAAJ7J.js → chunk-IXTPVJ6W.js} +1 -1
  157. package/dist/bin/shell/chunks/{chunk-OUQKFRVR.js → chunk-JBYLHCKP.js} +1 -1
  158. package/dist/bin/shell/chunks/{chunk-NXUXZWS5.js → chunk-JLRB7DV3.js} +1 -1
  159. package/dist/bin/shell/chunks/{chunk-6JEDM6CZ.js → chunk-KH6YLKPE.js} +1 -1
  160. package/dist/bin/shell/chunks/chunk-KXSDVBJA.js +12 -0
  161. package/dist/bin/shell/chunks/{chunk-DYIBFLS3.js → chunk-LOU52GPJ.js} +2 -2
  162. package/dist/bin/shell/chunks/{chunk-L345YZ6R.js → chunk-LVT5R45K.js} +1 -1
  163. package/dist/bin/shell/chunks/{chunk-PTUQEN6I.js → chunk-M345X45Z.js} +7 -7
  164. package/dist/bin/shell/chunks/{chunk-6FGMEZZP.js → chunk-NDS7PYKD.js} +1 -1
  165. package/dist/bin/shell/chunks/chunk-O3PNT72D.js +3 -0
  166. package/dist/bin/shell/chunks/chunk-OGOISDGZ.js +3 -0
  167. package/dist/bin/shell/chunks/chunk-OSW4MDDH.js +21 -0
  168. package/dist/bin/{chunks/chunk-ABP4OLJV.js → shell/chunks/chunk-OXEDIWNZ.js} +1 -1
  169. package/dist/bin/shell/chunks/{chunk-FPWHWWXO.js → chunk-OXV2B2YS.js} +1 -1
  170. package/dist/bin/shell/chunks/{chunk-QMPZXXEK.js → chunk-OY25E3ZN.js} +1 -1
  171. package/dist/bin/shell/chunks/{chunk-O2BCKSMK.js → chunk-PEJXCXSY.js} +1 -1
  172. package/dist/bin/{chunks/chunk-6KHZX4HU.js → shell/chunks/chunk-PLLMJHMV.js} +1 -1
  173. package/dist/bin/{chunks/chunk-6TUILMPB.js → shell/chunks/chunk-QELDDRV5.js} +1 -1
  174. package/dist/bin/shell/chunks/{chunk-3FQBUEB6.js → chunk-RC4UXNHA.js} +1 -1
  175. package/dist/bin/{chunks/chunk-H7PD6FLC.js → shell/chunks/chunk-RE7Z53A3.js} +1 -1
  176. package/dist/bin/shell/chunks/chunk-SCQRBEQW.js +275 -0
  177. package/dist/bin/shell/chunks/{chunk-3DWQCLNP.js → chunk-SS2OPV62.js} +1 -1
  178. package/dist/bin/{chunks/chunk-CC2AQ6B7.js → shell/chunks/chunk-U6JTVQU6.js} +1 -1
  179. package/dist/bin/shell/chunks/chunk-UBA7DOWE.js +3 -0
  180. package/dist/bin/shell/chunks/{chunk-VPSBWWXM.js → chunk-UFAYH3WW.js} +7 -6
  181. package/dist/bin/shell/chunks/chunk-UPUFWGHR.js +3 -0
  182. package/dist/bin/{chunks/chunk-QJWFCA7P.js → shell/chunks/chunk-UU42WPB7.js} +1 -1
  183. package/dist/bin/shell/chunks/{chunk-CNVNOT67.js → chunk-UW4E5XU5.js} +1 -1
  184. package/dist/bin/shell/chunks/chunk-VMVXACZ5.js +6 -0
  185. package/dist/bin/shell/chunks/chunk-WLQ2KWS3.js +10 -0
  186. package/dist/bin/shell/chunks/{chunk-MVBK66TR.js → chunk-WPJ5CECR.js} +1 -1
  187. package/dist/bin/shell/chunks/{chunk-ANX7U57Q.js → chunk-XBOBVLRL.js} +2 -2
  188. package/dist/bin/shell/chunks/{chunk-HZGHQZSY.js → chunk-Z3MXFCN7.js} +1 -1
  189. package/dist/bin/shell/chunks/{column-AJFK3TWF.js → column-AL4LR5PO.js} +1 -1
  190. package/dist/bin/shell/chunks/{cp-YLP7ULVT.js → cp-XJWV46T5.js} +1 -1
  191. package/dist/bin/{chunks/curl-NHNZ46BU.js → shell/chunks/curl-HZ5SBTVY.js} +11 -11
  192. package/dist/bin/shell/chunks/{cut-42X6363P.js → cut-LNJEMWBJ.js} +1 -1
  193. package/dist/bin/{chunks/diff-DM47S5PT.js → shell/chunks/diff-YLVT27CZ.js} +1 -1
  194. package/dist/bin/shell/chunks/dist-4NZ74CRE.js +141 -0
  195. package/dist/bin/shell/chunks/{du-DH76GZJ3.js → du-YNAJTGCR.js} +1 -1
  196. package/dist/bin/shell/chunks/{expr-PQEPO5TE.js → expr-GLGO2VEZ.js} +1 -1
  197. package/dist/bin/shell/chunks/{file-JA7QI2YT.js → file-7M5LLZJY.js} +1 -1
  198. package/dist/bin/shell/chunks/find-3QDGII35.js +3 -0
  199. package/dist/bin/shell/chunks/flag-coverage-AGEO3F6X.js +3 -0
  200. package/dist/bin/shell/chunks/{grep-VXWNMIDD.js → grep-AZJ2CMYE.js} +1 -1
  201. package/dist/bin/shell/chunks/{gzip-UQZL4R74.js → gzip-W5CL2E2W.js} +1 -1
  202. package/dist/bin/{chunks/head-QKVY3SIO.js → shell/chunks/head-ABLEKDMV.js} +1 -1
  203. package/dist/bin/{chunks/help-HVIDHJ6M.js → shell/chunks/help-EXVKU23F.js} +1 -1
  204. package/dist/bin/shell/chunks/{html-to-markdown-XUMA42ZC.js → html-to-markdown-FDNPIEKZ.js} +1 -1
  205. package/dist/bin/{chunks/jq-YS4PR46D.js → shell/chunks/jq-5SOTL7D7.js} +1 -1
  206. package/dist/bin/shell/chunks/{js-exec-ZAAIZQWI.js → js-exec-LISDW7YC.js} +2 -2
  207. package/dist/bin/shell/chunks/{ls-5Z45FV4U.js → ls-EEX3YIOF.js} +1 -1
  208. package/dist/bin/shell/chunks/mkdir-KDEZTR53.js +3 -0
  209. package/dist/bin/shell/chunks/mktemp-OYQYUB5H.js +3 -0
  210. package/dist/bin/{chunks/mv-EOOP2TO3.js → shell/chunks/mv-35V6IA5V.js} +1 -1
  211. package/dist/bin/{chunks/od-2GXD4D5K.js → shell/chunks/od-TD5LZDUM.js} +1 -1
  212. package/dist/bin/{chunks/paste-DWWA3JTW.js → shell/chunks/paste-QJG6BYAP.js} +1 -1
  213. package/dist/bin/shell/chunks/{python3-TJ6DCPIA.js → python3-P6MZ44HK.js} +5 -5
  214. package/dist/bin/{chunks/readlink-EJ3IKLWW.js → shell/chunks/readlink-BF435HNQ.js} +1 -1
  215. package/dist/bin/shell/chunks/rg-B2DVJQVY.js +3 -0
  216. package/dist/bin/shell/chunks/rm-HCMKNRM2.js +3 -0
  217. package/dist/bin/{chunks/rmdir-PRNISPBA.js → shell/chunks/rmdir-WGVUYGPF.js} +1 -1
  218. package/dist/bin/{chunks/sed-SY63U2YX.js → shell/chunks/sed-66XZQ75T.js} +1 -1
  219. package/dist/bin/shell/chunks/{seq-X2EAOGV5.js → seq-KBVCQ4WT.js} +1 -1
  220. package/dist/bin/shell/chunks/{sleep-MOJQBZMY.js → sleep-4O22Z4DI.js} +1 -1
  221. package/dist/bin/{chunks/split-HIFKSV2A.js → shell/chunks/split-OK6JHDWZ.js} +1 -1
  222. package/dist/bin/shell/chunks/sqlite3-57ACN7ES.js +3 -0
  223. package/dist/bin/shell/chunks/{stat-LROLDXHH.js → stat-VNNI7JDZ.js} +1 -1
  224. package/dist/bin/shell/chunks/{tail-UOTUV25D.js → tail-PAHZX3MA.js} +1 -1
  225. package/dist/bin/shell/chunks/{tar-7XOP7VOX.js → tar-RPVTXGFJ.js} +1 -1
  226. package/dist/bin/shell/chunks/{time-LF7BTSK5.js → time-J2DAZUIN.js} +1 -1
  227. package/dist/bin/shell/chunks/timeout-XMTXHNFF.js +3 -0
  228. package/dist/bin/{chunks/tr-PVFO6FRY.js → shell/chunks/tr-ETPC3LHV.js} +1 -1
  229. package/dist/bin/shell/chunks/{which-4TPGVSBZ.js → which-G7X54RZL.js} +1 -1
  230. package/dist/bin/shell/chunks/{xan-RMH6JEXM.js → xan-XZHKEPJ4.js} +1 -1
  231. package/dist/bin/shell/chunks/{xan-view-PD26QEFN.js → xan-view-CNGKCABE.js} +1 -1
  232. package/dist/bin/shell/chunks/yes-2EQTNSIB.js +3 -0
  233. package/dist/bin/shell/chunks/yq-T6S3IDKY.js +3 -0
  234. package/dist/bin/shell/shell.js +369 -363
  235. package/dist/browser.d.ts +1 -1
  236. package/dist/bundle/browser.js +746 -726
  237. package/dist/bundle/chunks/awk2-TLK6FCHV.js +2 -0
  238. package/dist/bundle/chunks/{base64-MHVQ5XHI.js → base64-GUZMZ645.js} +1 -1
  239. package/dist/bundle/chunks/builtin-manifest-7MJJDZ2T.js +2 -0
  240. package/dist/bundle/chunks/{cat-VZBWBIJB.js → cat-LG4YGKUE.js} +1 -1
  241. package/dist/bundle/chunks/{chmod-TEY5MD2W.js → chmod-XUKPG2M4.js} +1 -1
  242. package/dist/bundle/chunks/{chunk-E2F4A3CM.js → chunk-2A4OZBCS.js} +5 -5
  243. package/dist/bundle/chunks/{chunk-WNH3HOQA.js → chunk-353VO5TF.js} +1 -1
  244. package/dist/bundle/chunks/chunk-37UJACD6.js +9 -0
  245. package/dist/bundle/chunks/{chunk-H3A45X3W.js → chunk-3LGQ6XEC.js} +1 -1
  246. package/dist/bundle/chunks/{chunk-P57S6Z6R.js → chunk-3ZY5QX3G.js} +1 -1
  247. package/dist/bundle/chunks/{chunk-45QZRGYF.js → chunk-4VU4IF3W.js} +7 -6
  248. package/dist/bundle/chunks/{chunk-SIOONII3.js → chunk-52W2IWA7.js} +1 -1
  249. package/dist/bundle/chunks/chunk-5IB57TIJ.js +274 -0
  250. package/dist/bundle/chunks/chunk-5J4S2LP5.js +2 -0
  251. package/dist/bundle/chunks/{chunk-PCPW54JH.js → chunk-5LDRJ22P.js} +1 -1
  252. package/dist/bundle/chunks/{chunk-BKUWXPEM.js → chunk-654CJKE3.js} +1 -1
  253. package/dist/bundle/chunks/{chunk-EZNS4GF7.js → chunk-67ODVGSB.js} +1 -1
  254. package/dist/bundle/chunks/{chunk-6QF3PCMO.js → chunk-6HQQON3N.js} +1 -1
  255. package/dist/bundle/chunks/chunk-6L6OYVLY.js +2 -0
  256. package/dist/bundle/chunks/{chunk-U57DSHID.js → chunk-6P2DITXT.js} +1 -1
  257. package/dist/bundle/chunks/chunk-74IR77AZ.js +11 -0
  258. package/dist/bundle/chunks/{chunk-S3ENGQML.js → chunk-7DVD6YCI.js} +1 -1
  259. package/dist/bundle/chunks/{chunk-HXWB4Z5X.js → chunk-7II7XIVI.js} +1 -1
  260. package/dist/bundle/chunks/{chunk-AYSZ5MAE.js → chunk-A3C4Z3Q3.js} +1 -1
  261. package/dist/bundle/chunks/chunk-A6SU3BZX.js +6 -0
  262. package/dist/bundle/chunks/{chunk-6HO6HX7V.js → chunk-AMXNXHXK.js} +1 -1
  263. package/dist/bundle/chunks/{chunk-QJ7OXJAZ.js → chunk-BLG7RWH4.js} +1 -1
  264. package/dist/bundle/chunks/chunk-BMBITA6Y.js +2 -0
  265. package/dist/bundle/chunks/{chunk-XQ2ZZFO6.js → chunk-BQTWRHZR.js} +2 -2
  266. package/dist/bundle/chunks/{chunk-WE7BJ7YU.js → chunk-BZ2OMW2T.js} +1 -1
  267. package/dist/bundle/chunks/{chunk-S6DNKKUL.js → chunk-CM4T4GB4.js} +1 -1
  268. package/dist/bundle/chunks/{chunk-CH7SUFFO.js → chunk-CORCIYJD.js} +1 -1
  269. package/dist/bundle/chunks/{chunk-LGIJSCWH.js → chunk-EQDVNHQS.js} +1 -1
  270. package/dist/bundle/chunks/{chunk-U4K5ZDWK.js → chunk-EZEO6MFE.js} +1 -1
  271. package/dist/bundle/chunks/{chunk-SE23TEGG.js → chunk-EZT6M2HG.js} +1 -1
  272. package/dist/bundle/chunks/{chunk-4MJ7VJG4.js → chunk-H7UVJSZR.js} +1 -1
  273. package/dist/bundle/chunks/{chunk-5EI7WSRV.js → chunk-HYQGYXGZ.js} +1 -1
  274. package/dist/bundle/chunks/{chunk-6IA4DXG2.js → chunk-IPKSYZ3R.js} +1 -1
  275. package/dist/bundle/chunks/{chunk-TLPMB3FO.js → chunk-KJBPGFZD.js} +1 -1
  276. package/dist/bundle/chunks/chunk-L7NEGEOJ.js +16 -0
  277. package/dist/bundle/chunks/{chunk-YFFU74KY.js → chunk-MJEJ7QEY.js} +1 -1
  278. package/dist/bundle/chunks/{chunk-QJFYYEFV.js → chunk-N36I27VM.js} +1 -1
  279. package/dist/bundle/chunks/chunk-N5L7E4EL.js +6 -0
  280. package/dist/bundle/chunks/{chunk-6QAM55HM.js → chunk-NFODJFHN.js} +1 -1
  281. package/dist/bundle/chunks/{chunk-IXFQXNL4.js → chunk-NFW4YKDO.js} +1 -1
  282. package/dist/bundle/chunks/{chunk-HCKTU6IR.js → chunk-NOX3PCUH.js} +1 -1
  283. package/dist/bundle/chunks/{chunk-MQKGGNPS.js → chunk-NXBUT5V2.js} +2 -2
  284. package/dist/bundle/chunks/{chunk-4KZT23KR.js → chunk-O5BHWBYH.js} +1 -1
  285. package/dist/bundle/chunks/{chunk-DVSA72LH.js → chunk-QTL2XC4B.js} +1 -1
  286. package/dist/bundle/chunks/chunk-RK2WBVP4.js +2 -0
  287. package/dist/bundle/chunks/{chunk-BLPYR4TN.js → chunk-RVBBGZ22.js} +1 -1
  288. package/dist/bundle/chunks/{chunk-PS2RJNZZ.js → chunk-SXQJYLP7.js} +1 -1
  289. package/dist/bundle/chunks/{chunk-MWL2I5BV.js → chunk-T7OAZEXT.js} +1 -1
  290. package/dist/bundle/chunks/{chunk-O452S4KX.js → chunk-URIKBXSE.js} +1 -1
  291. package/dist/bundle/chunks/{chunk-6BSOPPZH.js → chunk-UVQC75LS.js} +7 -7
  292. package/dist/bundle/chunks/chunk-VCREDMWH.js +4 -0
  293. package/dist/bundle/chunks/{chunk-DDPD7SIB.js → chunk-VQ6EUBJ3.js} +1 -1
  294. package/dist/bundle/chunks/chunk-VQEB6E2M.js +13 -0
  295. package/dist/bundle/chunks/{chunk-R2FBRMDU.js → chunk-VWUMR4IC.js} +1 -1
  296. package/dist/bundle/chunks/{chunk-XXBIOG4R.js → chunk-WDY2TNMK.js} +1 -1
  297. package/dist/bundle/chunks/chunk-XT7EK6BR.js +9 -0
  298. package/dist/bundle/chunks/{chunk-BS6EJR2R.js → chunk-XUTEQMTL.js} +5 -5
  299. package/dist/bundle/chunks/{chunk-KIGPB52X.js → chunk-XZ34OGNM.js} +1 -1
  300. package/dist/bundle/chunks/{chunk-FSKXIFYT.js → chunk-Y6UHNLT5.js} +1 -1
  301. package/dist/bundle/chunks/chunk-YUITEK6N.js +12 -0
  302. package/dist/bundle/chunks/chunk-YZCPEJRE.js +20 -0
  303. package/dist/bundle/chunks/chunk-ZIQS5QAW.js +5 -0
  304. package/dist/bundle/chunks/chunk-ZUEPJPYA.js +2 -0
  305. package/dist/bundle/chunks/{column-QJI65SH2.js → column-T4LGMRJG.js} +1 -1
  306. package/dist/bundle/chunks/{cp-UR762VVT.js → cp-ZDDVNITX.js} +1 -1
  307. package/dist/bundle/chunks/{curl-K4WT7UPN.js → curl-RCRD36LD.js} +11 -11
  308. package/dist/bundle/chunks/{cut-FMDNVWQN.js → cut-35WER2E2.js} +1 -1
  309. package/dist/bundle/chunks/{diff-R7TXVVLN.js → diff-Z3XOLW44.js} +1 -1
  310. package/dist/bundle/chunks/{du-EQKH3UNA.js → du-YBSJVBXP.js} +1 -1
  311. package/dist/bundle/chunks/{expr-A5XITHQD.js → expr-KSNRNE7V.js} +1 -1
  312. package/dist/bundle/chunks/{file-6AYYTULJ.js → file-XH37HMGV.js} +1 -1
  313. package/dist/bundle/chunks/find-3AONTPPM.js +2 -0
  314. package/dist/bundle/chunks/flag-coverage-6YGO7STE.js +2 -0
  315. package/dist/bundle/chunks/{grep-Q2O5EIXQ.js → grep-WW5KJPUG.js} +1 -1
  316. package/dist/bundle/chunks/{gzip-KC5ENBD2.js → gzip-ISZXQNJJ.js} +1 -1
  317. package/dist/bundle/chunks/{head-6UIPFWVJ.js → head-VYXZQLPZ.js} +1 -1
  318. package/dist/bundle/chunks/{help-QDDMBDU7.js → help-62M75TSG.js} +1 -1
  319. package/dist/bundle/chunks/{html-to-markdown-PE6BPRPA.js → html-to-markdown-4LXS3A44.js} +1 -1
  320. package/dist/bundle/chunks/{jq-UKAA3QWU.js → jq-3IVOWP3G.js} +1 -1
  321. package/dist/bundle/chunks/{js-exec-MUZRDUJ3.js → js-exec-T2WEE4KG.js} +2 -2
  322. package/dist/bundle/chunks/js-exec-worker.js +1 -0
  323. package/dist/bundle/chunks/{ls-WH5S4PPL.js → ls-FC3CSHKE.js} +1 -1
  324. package/dist/bundle/chunks/mkdir-DPFWDY25.js +2 -0
  325. package/dist/bundle/chunks/mktemp-SW2AHXZW.js +2 -0
  326. package/dist/bundle/chunks/{mv-WE7DBLEK.js → mv-PWCFXEF2.js} +1 -1
  327. package/dist/bundle/chunks/{od-Z4AIL3P4.js → od-VJ6PBBEI.js} +1 -1
  328. package/dist/bundle/chunks/{paste-ZNHNSRBW.js → paste-TIQETHSO.js} +1 -1
  329. package/dist/bundle/chunks/{python3-W4UMQJAQ.js → python3-6JEP7ZZK.js} +5 -5
  330. package/dist/bundle/chunks/{readlink-JSRKXLLQ.js → readlink-7XGQ3PL7.js} +1 -1
  331. package/dist/bundle/chunks/rg-2OPJ5V3D.js +2 -0
  332. package/dist/bundle/chunks/rm-AZZM5DCE.js +2 -0
  333. package/dist/bundle/chunks/{rmdir-3WTXMVKI.js → rmdir-YXYSZD4X.js} +1 -1
  334. package/dist/bundle/chunks/{sed-6G32B25J.js → sed-HYSBLGO5.js} +1 -1
  335. package/dist/bundle/chunks/{seq-B6KDLMYQ.js → seq-M2S4FRN4.js} +1 -1
  336. package/dist/bundle/chunks/{sleep-25QUPVDK.js → sleep-YC4HFEGC.js} +1 -1
  337. package/dist/bundle/chunks/{split-HUKVGJTW.js → split-UOPIWKKE.js} +1 -1
  338. package/dist/bundle/chunks/sqlite3-XCROTL6G.js +2 -0
  339. package/dist/bundle/chunks/{stat-LXFZND2P.js → stat-I3FPUTR7.js} +1 -1
  340. package/dist/bundle/chunks/{tail-UBGSN4JF.js → tail-WK3WACZK.js} +1 -1
  341. package/dist/bundle/chunks/{tar-LE7LAAIX.js → tar-VZYMNZV2.js} +1 -1
  342. package/dist/bundle/chunks/{time-NERE2JJ2.js → time-N6J6DC6C.js} +1 -1
  343. package/dist/bundle/chunks/timeout-UDR5J2MP.js +2 -0
  344. package/dist/bundle/chunks/{tr-UI2LA3GA.js → tr-VI5PIA4A.js} +1 -1
  345. package/dist/bundle/chunks/{which-UWVKETYW.js → which-BP5YY5BR.js} +1 -1
  346. package/dist/bundle/chunks/worker.js +5 -0
  347. package/dist/bundle/chunks/{xan-UIL24CGT.js → xan-DL576EIT.js} +1 -1
  348. package/dist/bundle/chunks/xan-view-GJVN6IHX.js +2 -0
  349. package/dist/bundle/chunks/yes-OVJMX6NM.js +2 -0
  350. package/dist/bundle/chunks/yq-KYPU4LQP.js +2 -0
  351. package/dist/bundle/index.cjs +1079 -1059
  352. package/dist/bundle/index.js +345 -339
  353. package/dist/commands/mktemp/mktemp.d.ts +4 -0
  354. package/dist/commands/registry.d.ts +1 -1
  355. package/dist/commands/which/which.d.ts +10 -0
  356. package/dist/commands/yes/yes.d.ts +4 -0
  357. package/dist/custom-commands.d.ts +12 -0
  358. package/dist/fs/create-exclusive.d.ts +30 -0
  359. package/dist/fs/in-memory-fs/in-memory-fs.d.ts +8 -1
  360. package/dist/fs/interface.d.ts +37 -0
  361. package/dist/fs/mountable-fs/mountable-fs.d.ts +18 -1
  362. package/dist/fs/overlay-fs/overlay-fs.d.ts +19 -1
  363. package/dist/fs/path-utils.d.ts +0 -4
  364. package/dist/fs/read-write-fs/read-write-fs.d.ts +22 -1
  365. package/dist/index.d.cts +1 -1
  366. package/dist/index.d.ts +1 -1
  367. package/dist/interpreter/expansion/array-prefix-suffix.d.ts +2 -1
  368. package/dist/interpreter/expansion/parameter-ops.d.ts +1 -0
  369. package/dist/interpreter/expansion/pattern-removal.d.ts +3 -0
  370. package/dist/interpreter/expansion/variable.d.ts +1 -1
  371. package/dist/interpreter/helpers/loop.d.ts +32 -0
  372. package/dist/limits.d.ts +0 -3
  373. package/dist/network/dns-pin.d.ts +1 -32
  374. package/dist/network/fetch.d.ts +1 -1
  375. package/dist/security/trusted-globals.d.ts +8 -0
  376. package/dist/types.d.ts +6 -0
  377. package/package.json +3 -4
  378. package/dist/bin/chunks/awk2-NTRVFXRA.js +0 -3
  379. package/dist/bin/chunks/chunk-3PCPQIUD.js +0 -3
  380. package/dist/bin/chunks/chunk-6JUPBMCR.js +0 -13
  381. package/dist/bin/chunks/chunk-BB5VTPMQ.js +0 -16
  382. package/dist/bin/chunks/chunk-CN4JKMTR.js +0 -8
  383. package/dist/bin/chunks/chunk-F2PYTUMR.js +0 -9
  384. package/dist/bin/chunks/chunk-HWI42GQO.js +0 -7
  385. package/dist/bin/chunks/chunk-HWK7KFGB.js +0 -3
  386. package/dist/bin/chunks/chunk-I57EACSL.js +0 -3
  387. package/dist/bin/chunks/chunk-ONF4KUYV.js +0 -13
  388. package/dist/bin/chunks/chunk-PRVPFKTC.js +0 -276
  389. package/dist/bin/chunks/chunk-RTN6X652.js +0 -11
  390. package/dist/bin/chunks/chunk-RVPTAYDS.js +0 -4
  391. package/dist/bin/chunks/chunk-U5JLGI56.js +0 -21
  392. package/dist/bin/chunks/dist-5MWO25Y4.js +0 -141
  393. package/dist/bin/chunks/find-MHC4QV6H.js +0 -3
  394. package/dist/bin/chunks/flag-coverage-LLAQBVIG.js +0 -3
  395. package/dist/bin/chunks/mkdir-YJ3SOVRP.js +0 -3
  396. package/dist/bin/chunks/rg-WHVR3YDT.js +0 -3
  397. package/dist/bin/chunks/rm-B4LVIG7A.js +0 -3
  398. package/dist/bin/chunks/sqlite3-CXQTZRPZ.js +0 -3
  399. package/dist/bin/chunks/timeout-RQOWSWYG.js +0 -3
  400. package/dist/bin/chunks/yq-CWBZMGUV.js +0 -3
  401. package/dist/bin/shell/chunks/awk2-NTRVFXRA.js +0 -3
  402. package/dist/bin/shell/chunks/chunk-3PCPQIUD.js +0 -3
  403. package/dist/bin/shell/chunks/chunk-6JUPBMCR.js +0 -13
  404. package/dist/bin/shell/chunks/chunk-BB5VTPMQ.js +0 -16
  405. package/dist/bin/shell/chunks/chunk-CN4JKMTR.js +0 -8
  406. package/dist/bin/shell/chunks/chunk-F2PYTUMR.js +0 -9
  407. package/dist/bin/shell/chunks/chunk-HWI42GQO.js +0 -7
  408. package/dist/bin/shell/chunks/chunk-HWK7KFGB.js +0 -3
  409. package/dist/bin/shell/chunks/chunk-I57EACSL.js +0 -3
  410. package/dist/bin/shell/chunks/chunk-ONF4KUYV.js +0 -13
  411. package/dist/bin/shell/chunks/chunk-PRVPFKTC.js +0 -276
  412. package/dist/bin/shell/chunks/chunk-RTN6X652.js +0 -11
  413. package/dist/bin/shell/chunks/chunk-RVPTAYDS.js +0 -4
  414. package/dist/bin/shell/chunks/chunk-U5JLGI56.js +0 -21
  415. package/dist/bin/shell/chunks/dist-5MWO25Y4.js +0 -141
  416. package/dist/bin/shell/chunks/find-MHC4QV6H.js +0 -3
  417. package/dist/bin/shell/chunks/flag-coverage-LLAQBVIG.js +0 -3
  418. package/dist/bin/shell/chunks/mkdir-YJ3SOVRP.js +0 -3
  419. package/dist/bin/shell/chunks/rg-WHVR3YDT.js +0 -3
  420. package/dist/bin/shell/chunks/rm-B4LVIG7A.js +0 -3
  421. package/dist/bin/shell/chunks/sqlite3-CXQTZRPZ.js +0 -3
  422. package/dist/bin/shell/chunks/timeout-RQOWSWYG.js +0 -3
  423. package/dist/bin/shell/chunks/yq-CWBZMGUV.js +0 -3
  424. package/dist/bundle/chunks/awk2-VS5QVYHU.js +0 -2
  425. package/dist/bundle/chunks/chunk-2SMD2AUA.js +0 -3
  426. package/dist/bundle/chunks/chunk-35MBA3VY.js +0 -12
  427. package/dist/bundle/chunks/chunk-3OBCZP7T.js +0 -12
  428. package/dist/bundle/chunks/chunk-4CC3OZPU.js +0 -2
  429. package/dist/bundle/chunks/chunk-A257L6QO.js +0 -7
  430. package/dist/bundle/chunks/chunk-ATGOUOX2.js +0 -15
  431. package/dist/bundle/chunks/chunk-BRJERIF4.js +0 -2
  432. package/dist/bundle/chunks/chunk-FTET43KM.js +0 -2
  433. package/dist/bundle/chunks/chunk-GRUZ4SBY.js +0 -275
  434. package/dist/bundle/chunks/chunk-LRFR25IP.js +0 -8
  435. package/dist/bundle/chunks/chunk-RWQWFXMH.js +0 -10
  436. package/dist/bundle/chunks/chunk-Y6JBSHCM.js +0 -20
  437. package/dist/bundle/chunks/chunk-ZBUZKIPX.js +0 -6
  438. package/dist/bundle/chunks/find-RLKBCGJR.js +0 -2
  439. package/dist/bundle/chunks/flag-coverage-YQGACUSN.js +0 -2
  440. package/dist/bundle/chunks/mkdir-Z6MMWH3D.js +0 -2
  441. package/dist/bundle/chunks/rg-JKB7DR66.js +0 -2
  442. package/dist/bundle/chunks/rm-IGPLE632.js +0 -2
  443. package/dist/bundle/chunks/sqlite3-DQNCWDG5.js +0 -2
  444. package/dist/bundle/chunks/timeout-37GM7IIL.js +0 -2
  445. package/dist/bundle/chunks/xan-view-FOCYCKZQ.js +0 -2
  446. package/dist/bundle/chunks/yq-ZRNZKDLE.js +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,109 @@
1
1
  # just-bash
2
2
 
3
+ ## 3.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`5f0d4f6`](https://github.com/JerryAZR/just-bash/commit/5f0d4f6b7a2aaa41d8e44efc541958a31e648778) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Add the `mktemp` command. It creates a unique temporary file (mode 0600) or directory (`-d`, mode 0700) and prints its path, supporting `-p`/`--tmpdir[=DIR]`, `-t`, `-u`/`--dry-run`, `-q`/`--quiet`, `--suffix=SUFF`, GNU-style `TEMPLATE` expansion, `--help` and `--version`. The default directory is `$TMPDIR` when set and non-empty, otherwise `/tmp`, so sandboxed embedders that point `TMPDIR` at a writable directory get a usable path. Random name characters come from the platform CSPRNG (`crypto.getRandomValues`), and existing paths are never returned.
8
+
9
+ Adds an optional `createExclusive(path, { mode, directory })` method to `IFileSystem`, which creates an entry only if the name is free and applies the mode at creation time rather than via a follow-up `chmod`. All built-in filesystems implement it. The member is optional, so external `IFileSystem` implementations remain source compatible; `mktemp` reports that such a filesystem cannot create atomically rather than substituting a non-atomic sequence. The accompanying `CreateExclusiveOptions` type is exported alongside the existing `MkdirOptions`/`RmOptions`. (Upstream: vercel-labs/just-bash#377)
10
+
11
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`8c18f71`](https://github.com/JerryAZR/just-bash/commit/8c18f71fe869369fce6a2207714df7ef1822fd6d) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Add the `yes` command. `yes [STRING]...` repeats a line built from its operands (`y` when there are none), so `yes | head -3` and `yes | some-prompt` work instead of failing with exit 127. Because pipeline stages here run to completion rather than streaming, the stream is finite: it ends after `executionLimits.maxLoopIterations` lines, or earlier if the repeated line would exceed the output size limit. (Upstream: vercel-labs/just-bash#409)
12
+
13
+ ### Patch Changes
14
+
15
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`f9d4cac`](https://github.com/JerryAZR/just-bash/commit/f9d4cacd34fc58d282a873e520f966f2c9131121) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Assign array-valued parameter defaults correctly. `"${value:=${defaults[@]}}"` now assigns the joined default to `value` (space-joined for `[@]`, IFS-joined for `[*]`) and rejects whole-array targets like `${a[@]:=x}` with `bad array subscript`, matching GNU bash. Also bounds joined array expansions by `maxStringLength` before assigning and preserves non-BMP IFS separators. (Upstream: vercel-labs/just-bash#519)
16
+
17
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`66565ae`](https://github.com/JerryAZR/just-bash/commit/66565aeb07a390d1f5cc9b0318e35a62935905e6) Thanks [@JerryAZR](https://github.com/JerryAZR)! - interpreter: preserve complete associative-array values in `declare -A` compound assignments (upstream vercel-labs/just-bash#445)
18
+
19
+ Quoted values containing whitespace were reconstructed without quoting before the `declare` builtin parsed them, so every value was silently truncated at its first space. Associative-array declarations now retain whitespace and other quoted content.
20
+
21
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`ac61171`](https://github.com/JerryAZR/just-bash/commit/ac61171edafd5e1d95394adc9cae484ea2893a65) Thanks [@JerryAZR](https://github.com/JerryAZR)! - fs: keep the Buffer-less `fromBuffer` fallback under the argument limit (upstream vercel-labs/just-bash#346)
22
+
23
+ Without `Buffer` (for example in a Chrome extension service worker), `fromBuffer` converted `base64`, `binary` and `latin1` content by spreading 64KB chunks into `String.fromCharCode`, which can exceed the engine's argument limit and throw `RangeError: Maximum call stack size exceeded` on a 64KB `cat`. The fallback now converts in 8KB chunks.
24
+
25
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`c02090e`](https://github.com/JerryAZR/just-bash/commit/c02090e3c3ca0361cfe36bcb8a3ae3d7b99566bb) Thanks [@JerryAZR](https://github.com/JerryAZR)! - curl: support request data from stdin via `-d @-` / `--data-binary @-` / `--data-urlencode @-` (upstream vercel-labs/just-bash#411)
26
+
27
+ The exact `-` source consumes command stdin once; later references are empty. Binary stdin request bodies are sent verbatim (invalid UTF-8 preserved) without relying on Node's `Buffer`.
28
+
29
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`7c6f212`](https://github.com/JerryAZR/just-bash/commit/7c6f21284738553233328a611aa30a0cba9e16d6) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Drop the `undici` runtime dependency together with the unused request-owned DNS transport. (Upstream: vercel-labs/just-bash#516)
30
+
31
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`205648d`](https://github.com/JerryAZR/just-bash/commit/205648ddc6ee7e47d62aa1a55501b91bb53222e7) Thanks [@JerryAZR](https://github.com/JerryAZR)! - find: report a directory it cannot read and keep going (upstream vercel-labs/just-bash#414)
32
+
33
+ A `readdir` failure inside the traversal threw out of the whole search, so one unreadable directory ended `find` with no results. GNU find names the directory on stderr, continues with everything else, and exits 1 at the end. It now does the same here. The message is `find: <path>: Permission denied`, with the phrase taken from the errno alone, so nothing from the underlying error's text reaches the output. A failure that is not one of the errnos a directory read can produce (a cancellation, an execution limit, a filesystem policy refusal) still ends the search as before.
34
+
35
+ Messages are emitted in traversal order beside the node's own output, whatever order the parallel batch settled in, and a failed read still counts toward the trace's `readdirCalls` and `readdirTime`.
36
+
37
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`4c78060`](https://github.com/JerryAZR/just-bash/commit/4c78060dda6e48550495428ba76ab0c0e64aed52) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Repeated `grep -e` options overwrote the earlier patterns, so only the last one was used. All `-e` patterns now combine (upstream vercel-labs/just-bash#314).
38
+
39
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`b09632e`](https://github.com/JerryAZR/just-bash/commit/b09632ea49bfb40ab18fd91bfb0f3ce07deeda18) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Match real jq behavior for `to_entries` on arrays (numeric-key entries instead of null) and `tonumber` on empty or whitespace-only strings (error instead of 0) (upstream vercel-labs/just-bash#384).
40
+
41
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`2a8626d`](https://github.com/JerryAZR/just-bash/commit/2a8626dac33823d37218f3dcde2a6ad9a415a63c) Thanks [@JerryAZR](https://github.com/JerryAZR)! - interpreter: give a loop left via `break`/`continue` status 0 instead of the last command's
42
+
43
+ `break` and `continue` are builtins that return 0, and they are the last command a loop body runs. A loop exited through them reported the status of whatever ran _before_ the `break` instead:
44
+
45
+ ```bash
46
+ while :; do false; break; done; echo $? # was 1, bash says 0
47
+ for i in 1; do false; break; done; echo $? # was 1, bash says 0
48
+ for i in 1 2; do false; continue; done; echo $? # was 1, bash says 0
49
+ ```
50
+
51
+ All four loop forms were affected — `for`, C-style `for`, `while`, `until` — as was a `break`/`continue` in a `while` condition and a multi-level `break 2` unwinding through an enclosing loop. Under `set -e` the phantom failing loop ended the script with no output and no diagnostic.
52
+
53
+ `$?` moves with the status, so the next iteration sees it too. `continue` does not pin the status — a later iteration still overwrites it — and a loop that ends normally is unchanged.
54
+
55
+ Ported from upstream vercel-labs/just-bash#417.
56
+
57
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`05f267c`](https://github.com/JerryAZR/just-bash/commit/05f267cc7fc363e8eb0c57cfac3a6e82ef2bffd4) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Give `MountableFs` synchronous `mkdirSync` and `writeFileSync`, routed to the filesystem that owns the path, so `Bash` sets up `/bin`, `/dev`, `/proc`, `/tmp` and the working directory in its base. Paths on a filesystem without synchronous writes throw `ENOSYS` and are left out of the layout. (Upstream: vercel-labs/just-bash#488)
58
+
59
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`03c1bf3`](https://github.com/JerryAZR/just-bash/commit/03c1bf3df3466551404c232c22dd1737afcb788e) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Fix default, assignment, and alternative parameter expansions used as an entire double-quoted word under `set -u`. For example, `echo "${U:-fallback}"` now prints `fallback` when `U` is unset instead of reporting "unbound variable". This also lets scripts safely check optional CI variables such as `GITHUB_STEP_SUMMARY`. (Upstream: vercel-labs/just-bash#416)
60
+
61
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`e92b595`](https://github.com/JerryAZR/just-bash/commit/e92b5955cbfc68955e421809c44e9a94607e0ac2) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Bundle the patched `smol-toml` 1.9.0 and require patched `brace-expansion` and `undici`.
62
+
63
+ The Node bundle inlines `smol-toml`, so a consumer can't pick up its fix through its own lockfile. Only a just-bash release carries it. (Upstream: vercel-labs/just-bash#469, [#509](https://github.com/JerryAZR/just-bash/issues/509))
64
+
65
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`b3824fc`](https://github.com/JerryAZR/just-bash/commit/b3824fc4887fca1f2e83f8def3043f8fcd47cab1) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Reject default assignment to positional and special parameters. `echo "${1:=fallback}"` and `${@:=fallback}` now fail with `bash: $1: cannot assign in this way` instead of silently assigning, matching GNU bash. (Upstream: vercel-labs/just-bash#520)
66
+
67
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`4a3e413`](https://github.com/JerryAZR/just-bash/commit/4a3e413621d38649501d4108a4ba94cad0dc4d5e) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Use a virtual executable name for CPython instead of the host worker path, avoiding script finalization failures under long installation paths without weakening worker protections. (Upstream: vercel-labs/just-bash#444)
68
+
69
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`3931199`](https://github.com/JerryAZR/just-bash/commit/39311993b0d8de7653d6920360254fd4c40e5ba6) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Host operations that settle after a cancelled execution no longer surface as a process-level `unhandledRejection`.
70
+
71
+ Aborting or timing out an execution while the worker bridge was awaiting a host tool (or an `exec`) left that operation to settle after the defense-in-depth box deactivated. The box's `Promise.prototype.then` guard, which blocks sandbox callbacks once their execution ends, then dropped the handlers meant to consume that result: a late rejection crashed processes that treat unhandled rejections as fatal, and a late success never reached the bridge. Host-side settlement now goes through `await`, which bypasses the guarded `then`. (Upstream: vercel-labs/just-bash#503)
72
+
73
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`4a96d1a`](https://github.com/JerryAZR/just-bash/commit/4a96d1a96c1fecdfc83a9e88b0b3657a530d0782) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Let `ReadWriteFs.lstat` and `ReadWriteFs.readlink` accept the sandbox root (upstream vercel-labs/just-bash#454)
74
+
75
+ Both authorized a path by validating the directory above it, which for `/` lies outside the sandbox, so they failed with `EACCES`. Since `find`, `du`, `chmod -R` and `file` run on `lstat`, `find .` and `find /` at the root printed nothing and exited 0, `du` and `chmod -R` reported `cannot access '/'`, and `file /` reported `cannot open`. The root is now validated directly, as `mkdir` and `link` already do.
76
+
77
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`8966372`](https://github.com/JerryAZR/just-bash/commit/896637208911362848bf0e09bd52769ff5252af0) Thanks [@JerryAZR](https://github.com/JerryAZR)! - Keep leading blanks after `a\`, `i\` and `c\` in `sed` text, as GNU does, including blanks escaped with a backslash. The one-line `a text` form now strips every leading blank instead of only the first (upstream vercel-labs/just-bash#487).
78
+
79
+ - [#7](https://github.com/JerryAZR/just-bash/pull/7) [`d13cf6f`](https://github.com/JerryAZR/just-bash/commit/d13cf6f30bebc5705875d2877ea859f7ab9be936) Thanks [@JerryAZR](https://github.com/JerryAZR)! - timeout: a deadline that lands while a command is still loading no longer aborts the rest of the script
80
+
81
+ `timeout` on a cold command — the first use of any lazily loaded command — could return 124 and still kill every statement after it. Cancelled invocations now stop waiting for the load and report cancellation instead. (Upstream: vercel-labs/just-bash#506)
82
+
83
+ ## 3.10.0
84
+
85
+ ### Minor Changes
86
+
87
+ - [`c8b5eb6`](https://github.com/JerryAZR/just-bash/commit/c8b5eb67659a3269e7410353573be829026a8214) Thanks [@JerryAZR](https://github.com/JerryAZR)! - feat: generic --version, EROFS GNU messages, which improvements
88
+
89
+ - All commands respond to `--version` with `<cmd> (just-bash)` via
90
+ dispatch-level interception. Commands that handle their own version
91
+ (python3, js-exec, diff, rg) set `handlesOwnVersion: true`. Custom
92
+ commands that handle `--version` must set `handlesOwnVersion: true`
93
+ to opt out of the generic response.
94
+ - rm/cp/mv/mkdir map EROFS to "Read-only file system" (GNU style).
95
+ Redirect failures use errno descriptions ("Read-only file system",
96
+ "Permission denied", etc.) matching real bash.
97
+ - `which` checks shell builtins when no file found in PATH, and prints
98
+ "which: no X in this sandboxed bash environment" on miss.
99
+ - rg implements `--version`.
100
+
101
+ - [`c8b5eb6`](https://github.com/JerryAZR/just-bash/commit/c8b5eb67659a3269e7410353573be829026a8214) Thanks [@JerryAZR](https://github.com/JerryAZR)! - feat: Windows drive-letter path translation (win32 only)
102
+
103
+ On Windows, `C:\foo\bar` and `C:/foo/bar` are translated to `/c/foo/bar`
104
+ (Git Bash convention) in `resolvePath`. On POSIX, `C:\foo` is a valid
105
+ relative filename and is NOT rewritten.
106
+
3
107
  ## 3.9.0
4
108
 
5
109
  ### Minor Changes
package/README.md CHANGED
@@ -82,7 +82,7 @@ duplicating internal defaults.
82
82
 
83
83
  ### File Operations
84
84
 
85
- `cat`, `cp`, `file`, `ln`, `ls`, `mkdir`, `mv`, `readlink`, `rm`, `rmdir`, `split`, `stat`, `touch`, `tree`
85
+ `cat`, `cp`, `file`, `ln`, `ls`, `mkdir`, `mktemp`, `mv`, `readlink`, `rm`, `rmdir`, `split`, `stat`, `touch`, `tree`
86
86
 
87
87
  ### Text Processing
88
88
 
@@ -106,7 +106,7 @@ duplicating internal defaults.
106
106
 
107
107
  ### Shell Utilities
108
108
 
109
- `alias`, `bash`, `chmod`, `clear`, `date`, `expr`, `false`, `help`, `history`, `seq`, `sh`, `sleep`, `time`, `timeout`, `true`, `unalias`, `which`, `whoami`
109
+ `alias`, `bash`, `chmod`, `clear`, `date`, `expr`, `false`, `help`, `history`, `seq`, `sh`, `sleep`, `time`, `timeout`, `true`, `unalias`, `which`, `whoami`, `yes`
110
110
 
111
111
  ### Network
112
112
 
package/dist/AGENTS.md CHANGED
@@ -72,9 +72,9 @@ const result = await bash.exec("cat input.txt | grep pattern");
72
72
 
73
73
  **Data processing**: `jq` (JSON), `js-exec` (JavaScript/TypeScript via QuickJS), `python3`/`python` (Python via WASM/CPython), `sqlite3` (SQLite), `xan` (CSV), `yq` (YAML/XML/TOML/CSV)
74
74
 
75
- **File operations**: `basename`, `chmod`, `cp`, `dirname`, `du`, `file`, `find`, `ln`, `ls`, `mkdir`, `mv`, `od`, `pwd`, `readlink`, `rm`, `rmdir`, `split`, `stat`, `touch`, `tree`
75
+ **File operations**: `basename`, `chmod`, `cp`, `dirname`, `du`, `file`, `find`, `ln`, `ls`, `mkdir`, `mktemp`, `mv`, `od`, `pwd`, `readlink`, `rm`, `rmdir`, `split`, `stat`, `touch`, `tree`
76
76
 
77
- **Utilities**: `alias`, `base64`, `bash`, `clear`, `curl`, `date`, `diff`, `echo`, `env`, `expr`, `false`, `gzip`, `gunzip`, `help`, `history`, `hostname`, `html-to-markdown`, `md5sum`, `printenv`, `printf`, `seq`, `sh`, `sha1sum`, `sha256sum`, `sleep`, `tar`, `tee`, `time`, `timeout`, `true`, `unalias`, `which`, `whoami`, `zcat`
77
+ **Utilities**: `alias`, `base64`, `bash`, `clear`, `curl`, `date`, `diff`, `echo`, `env`, `expr`, `false`, `gzip`, `gunzip`, `help`, `history`, `hostname`, `html-to-markdown`, `md5sum`, `printenv`, `printf`, `seq`, `sh`, `sha1sum`, `sha256sum`, `sleep`, `tar`, `tee`, `time`, `timeout`, `true`, `unalias`, `which`, `whoami`, `yes`, `zcat`
78
78
 
79
79
  All commands support `--help` for usage details.
80
80
 
@@ -8,3 +8,13 @@ export interface CombinedAbortSignal {
8
8
  * listeners are removable by the caller's finally block.
9
9
  */
10
10
  export declare function combineAbortSignals(...signals: Array<AbortSignal | undefined>): CombinedAbortSignal;
11
+ /**
12
+ * Wait for host work that cannot observe cancellation, giving up when `signal`
13
+ * aborts.
14
+ *
15
+ * A cancelled invocation must not keep waiting for uncancellable host work: its
16
+ * caller bounds how long it waits for a command to unwind, and a command that is
17
+ * still resolving has nothing to unwind. The abandoned work stays observed, and
18
+ * the abort listener is removed on both paths.
19
+ */
20
+ export declare function raceCancellation<T>(work: Promise<T>, signal: AbortSignal | undefined, cancellationMessage: string): Promise<T>;
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a,b}from"./chunk-BVBYPYA5.js";import"./chunk-MROECM42.js";import"./chunk-DTNGYQCJ.js";import"./chunk-623Q77WZ.js";import"./chunk-C2BLJ3AE.js";import"./chunk-BFLKIASG.js";import"./chunk-YERKK5B3.js";import"./chunk-O3PNT72D.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as awkCommand2,b as flagsForFuzzing};
@@ -1,3 +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-FPWHWWXO.js";import"./chunk-2UV6ZFHK.js";import"./chunk-GR4ZHKXI.js";import"./chunk-HWI42GQO.js";import"./chunk-7JZKVC3F.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as base64Command,b as flagsForFuzzing};
3
+ import{a,b}from"./chunk-OXV2B2YS.js";import"./chunk-2UV6ZFHK.js";import"./chunk-C2BLJ3AE.js";import"./chunk-BFLKIASG.js";import"./chunk-7JZKVC3F.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as base64Command,b as flagsForFuzzing};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a,b,c,d,e}from"./chunk-AQKIHX3Q.js";import"./chunk-DN2YCFOR.js";export{a as BUILTIN_MANIFEST,b as SHELL_BUILTINS,c as UNIMPLEMENTED_BUILTIN_NAMES,d as builtinPhase,e as builtinPosixEarly};
@@ -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-NXUXZWS5.js";import"./chunk-2UV6ZFHK.js";import"./chunk-GR4ZHKXI.js";import"./chunk-HWI42GQO.js";import"./chunk-7JZKVC3F.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as catCommand,b as flagsForFuzzing};
3
+ import{a,b}from"./chunk-JLRB7DV3.js";import"./chunk-2UV6ZFHK.js";import"./chunk-C2BLJ3AE.js";import"./chunk-BFLKIASG.js";import"./chunk-7JZKVC3F.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as catCommand,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-T6OIISUC.js";import"./chunk-GR4ZHKXI.js";import"./chunk-HWI42GQO.js";import"./chunk-I57EACSL.js";import"./chunk-MBREBDZQ.js";import"./chunk-HWK7KFGB.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-OHFB3M3X.js";import"./chunk-PBOVSFTJ.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as chmodCommand,b as flagsForFuzzing};
3
+ import{a,b}from"./chunk-BZJ77YQD.js";import"./chunk-C2BLJ3AE.js";import"./chunk-BFLKIASG.js";import"./chunk-O3PNT72D.js";import"./chunk-AIWBN36Z.js";import"./chunk-UBA7DOWE.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-OHFB3M3X.js";import"./chunk-PBOVSFTJ.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as chmodCommand,b as flagsForFuzzing};
@@ -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,b as C,c as Z,d as ee}from"./chunk-ONF4KUYV.js";import{d as M}from"./chunk-47IFMQYS.js";import{a as K,b as X}from"./chunk-42AMF6EE.js";import{b as F}from"./chunk-2UV6ZFHK.js";import{a as H}from"./chunk-HWI42GQO.js";import{l as j}from"./chunk-FUT3X2GJ.js";import{a as P,b as L}from"./chunk-CPKBPQ2C.js";import{a as B}from"./chunk-PBOVSFTJ.js";import{a as W,b as G,c as T}from"./chunk-MUFNRCMY.js";function se(i){switch(i){case"\b":return"\\b";case"\f":return"\\f";case`
3
+ import{a as Y,b as C,c as Z,d as ee}from"./chunk-5NWK7A4R.js";import{d as M}from"./chunk-47IFMQYS.js";import{a as K,b as X}from"./chunk-DTNGYQCJ.js";import{b as F}from"./chunk-2UV6ZFHK.js";import{a as H}from"./chunk-BFLKIASG.js";import{l as j}from"./chunk-FUT3X2GJ.js";import{a as P,b as L}from"./chunk-CPKBPQ2C.js";import{a as B}from"./chunk-PBOVSFTJ.js";import{a as W,b as G,c as T}from"./chunk-MUFNRCMY.js";function se(i){switch(i){case"\b":return"\\b";case"\f":return"\\f";case`
4
4
  `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return`\\u${i.charCodeAt(0).toString(16).padStart(4,"0")}`}}function ne(i){let t="",d=!1,m=!1;for(let s=0;s<i.length;s++){let a=i[s];if(m){t+=a,m=!1;continue}if(a==="\\"){t+=a,m=!0;continue}if(a==='"'){t+=a,d=!d;continue}if(d&&a.charCodeAt(0)<=31){t+=se(a);continue}t+=a}return t}function R(i,t,d){return JSON.parse(ne(i.slice(t,d)))}function J(i,t){let d=[],m=x=>{if(d.length>=t.maxElements)throw new j(`query result element limit exceeded (${t.maxElements})`,"array_elements");d.push(x)},s=0,a=i.length;for(;s<a;){for(;s<a&&/\s/.test(i[s]);)s++;if(s>=a)break;let x=s,p=i[s];if(p==="{"||p==="["){let u=[p==="{"?"}":"]"],h=!1,E=!1;for(s++;s<a&&u.length>0;){let g=i[s];if(E)E=!1;else if(g==="\\")E=!0;else if(g==='"')h=!h;else if(!h){if(g==="{"||g==="["){if(u.push(g==="{"?"}":"]"),u.length>t.maxDepth)throw new j(`query depth limit exceeded (${t.maxDepth})`,"recursion")}else if((g==="}"||g==="]")&&u.pop()!==g)throw new Error(`Mismatched JSON delimiter at position ${s}`)}s++}if(u.length!==0)throw new Error(`Unexpected end of JSON input at position ${s} (unclosed ${p})`);m(M(R(i,x,s),{maxDepth:t.maxDepth,maxElements:t.maxElements}))}else if(p==='"'){let u=!1;for(s++;s<a;){let h=i[s];if(u)u=!1;else if(h==="\\")u=!0;else if(h==='"'){s++;break}s++}m(M(R(i,x,s),t))}else if(p==="-"||p>="0"&&p<="9"){for(;s<a&&/[\d.eE+-]/.test(i[s]);)s++;m(M(R(i,x,s),t))}else if(i.slice(s,s+4)==="true")m(!0),s+=4;else if(i.slice(s,s+5)==="false")m(!1),s+=5;else if(i.slice(s,s+4)==="null")m(null),s+=4;else{let u=i.slice(s,s+10);throw new Error(`Invalid JSON at position ${x}: unexpected '${u.split(/\s/)[0]}'`)}}return d}function S(i){return{stdout:"",stderr:`jq: ${i}
5
5
  `,exitCode:2}}var re={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE...]",options:["-R, --raw-input read each line as string instead of JSON","-r, --raw-output output strings without quotes","-c, --compact-output compact instead of pretty-printed output","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --arg NAME VALUE bind $NAME to the string VALUE"," --argjson NAME JSON bind $NAME to the JSON-decoded value JSON"," --rawfile NAME FILE bind $NAME to the raw contents of FILE"," --slurpfile NAME FILE bind $NAME to the array of JSON values in FILE"," --args remaining arguments are string positional args ($ARGS.positional)"," --jsonargs remaining arguments are JSON positional args ($ARGS.positional)"," --help display this help and exit"]},we={name:"jq",async execute(i,t){K(t.requireDefenseContext,"jq","execution entry");let d=(r,e)=>X(t.requireDefenseContext,"jq",r,e);if(G(i))return W(re);let m=!1,s=!1,a=!1,x=!1,p=!1,u=!1,h=!1,E=!1,g=!1,V=".",_=!1,A="none",N=[],$=new Map,k=[],q=[],v={maxDepth:t.limits.maxQueryDepth,maxElements:t.limits.maxQueryElements};for(let r=0;r<i.length;r++){let e=i[r];if(e==="-R"||e==="--raw-input")s=!0;else if(e==="-r"||e==="--raw-output")m=!0;else if(e==="-c"||e==="--compact-output")a=!0;else if(e==="-e"||e==="--exit-status")x=!0;else if(e==="-s"||e==="--slurp")p=!0;else if(e==="-n"||e==="--null-input")u=!0;else if(e==="-j"||e==="--join-output")h=!0;else if(!(e==="-a"||e==="--ascii")){if(e==="-S"||e==="--sort-keys")E=!0;else if(!(e==="-C"||e==="--color")){if(!(e==="-M"||e==="--monochrome"))if(e==="--tab")g=!0;else if(e==="--arg"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--arg takes two parameters (e.g. --arg varname value)");$.set(n,l),r+=2}else if(e==="--argjson"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--argjson takes two parameters (e.g. --argjson varname text)");let y;try{y=J(l.trim(),v)}catch{return S("invalid JSON text passed to --argjson")}if(y.length!==1)return S("invalid JSON text passed to --argjson");$.set(n,y[0]),r+=2}else if(e==="--rawfile"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--rawfile takes two parameters (e.g. --rawfile varname filename)");q.push({name:n,file:l,mode:"raw"}),r+=2}else if(e==="--slurpfile"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--slurpfile takes two parameters (e.g. --slurpfile varname filename)");q.push({name:n,file:l,mode:"slurp"}),r+=2}else if(e==="--args")A="args";else if(e==="--jsonargs")A="jsonargs";else if(e==="-")N.push("-");else{if(e.startsWith("--"))return T("jq",e);if(e.startsWith("-")){for(let n of e.slice(1))if(n==="R")s=!0;else if(n==="r")m=!0;else if(n==="c")a=!0;else if(n==="e")x=!0;else if(n==="s")p=!0;else if(n==="n")u=!0;else if(n==="j")h=!0;else if(n!=="a"){if(n==="S")E=!0;else if(n!=="C"){if(n!=="M")return T("jq",`-${n}`)}}}else if(!_)V=e,_=!0;else if(A==="args")k.push(e);else if(A==="jsonargs"){let n;try{n=J(e.trim(),v)}catch{return S("invalid JSON text passed to --jsonargs")}if(n.length!==1)return S("invalid JSON text passed to --jsonargs");k.push(n[0])}else N.push(e)}}}}if(q.length>0){let r=await d("arg file read",()=>F(t,q.map(e=>e.file),{cmdName:"jq",stopOnError:!0}));if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:2};for(let e=0;e<q.length;e++){let{name:n,mode:l}=q[e],y=L(r.files[e].content);if(l==="raw")$.set(n,y);else{let b=y.trim();try{$.set(n,b?J(b,v):[])}catch{return S("invalid JSON text passed to --slurpfile")}}}}let D=[];if(!u)if(N.length===0||N.length===1&&N[0]==="-")D.push({source:"stdin",content:L(t.stdin)});else{let r=await d("file read",()=>F(t,N,{cmdName:"jq",stopOnError:!0}));if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:2};D=r.files.map(e=>({source:e.filename||"stdin",content:L(e.content)}))}try{let r=Z(V,{maxDepth:t.limits.maxQueryDepth,maxTokens:t.limits.maxQueryTokens,maxSourceLength:t.limits.maxStringLength}),e=[],n={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength,maxOutputSize:t.limits.maxOutputSize,maxArrayElements:t.limits.maxQueryElements,maxDepth:t.limits.maxQueryDepth}:void 0,env:t.env,namedArgs:$,positionalArgs:k,coverage:t.coverage,requireDefenseContext:t.requireDefenseContext,budget:{operations:0,callDepth:0}},l=(o,f)=>{if(f.length>t.limits.maxQueryElements-o.length)throw new j(`query result element limit exceeded (${t.limits.maxQueryElements})`,"array_elements");for(let c of f)o.push(c)};if(u)e=C(null,r,n);else if(s&&p){let o=D.map(({content:f})=>f).join("");e=C(o,r,n)}else if(s){let o="";for(let{content:f}of D){let c=o+f,w=0,O=c.indexOf(`
6
6
  `,w);for(;O!==-1;)l(e,C(c.slice(w,O),r,n)),w=O+1,O=c.indexOf(`
@@ -1,36 +1,36 @@
1
1
  #!/usr/bin/env node
2
2
  import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
3
  import{b as T}from"./chunk-CPKBPQ2C.js";import{a as R}from"./chunk-NE4R2FVV.js";import{a as _,b as k}from"./chunk-MUFNRCMY.js";var L=class{diff(t,o,e={}){let i;typeof e=="function"?(i=e,e={}):"callback"in e&&(i=e.callback);let s=this.castInput(t,e),f=this.castInput(o,e),l=this.removeEmpty(this.tokenize(s,e)),r=this.removeEmpty(this.tokenize(f,e));return this.diffWithOptionsObj(l,r,e,i)}diffWithOptionsObj(t,o,e,i){var s;let f=c=>{if(c=this.postProcess(c,e),i){setTimeout(function(){i(c)},0);return}else return c},l=o.length,r=t.length,a=1,u=l+r;e.maxEditLength!=null&&(u=Math.min(u,e.maxEditLength));let h=(s=e.timeout)!==null&&s!==void 0?s:1/0,w=Date.now()+h,C=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(C[0],o,t,0,e);if(C[0].oldPos+1>=r&&m+1>=l)return f(this.buildValues(C[0].lastComponent,o,t));let d=-1/0,p=1/0,g=()=>{for(let c=Math.max(d,-a);c<=Math.min(p,a);c+=2){let $,P=C[c-1],y=C[c+1];P&&(C[c-1]=void 0);let v=!1;if(y){let W=y.oldPos-c;v=y&&0<=W&&W<l}let F=P&&P.oldPos+1<r;if(!v&&!F){C[c]=void 0;continue}if(!F||v&&P.oldPos<y.oldPos?$=this.addToPath(y,!0,!1,0,e):$=this.addToPath(P,!1,!0,1,e),m=this.extractCommon($,o,t,c,e),$.oldPos+1>=r&&m+1>=l)return f(this.buildValues($.lastComponent,o,t))||!0;C[c]=$,$.oldPos+1>=r&&(p=Math.min(p,c-1)),m+1>=l&&(d=Math.max(d,c+1))}a++};if(i)(function c(){setTimeout(function(){if(a>u||Date.now()>w)return i(void 0);g()||c()},0)})();else for(;a<=u&&Date.now()<=w;){let c=g();if(c)return c}}addToPath(t,o,e,i,s){let f=t.lastComponent;return f&&!s.oneChangePerToken&&f.added===o&&f.removed===e?{oldPos:t.oldPos+i,lastComponent:{count:f.count+1,added:o,removed:e,previousComponent:f.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:o,removed:e,previousComponent:f}}}extractCommon(t,o,e,i,s){let f=o.length,l=e.length,r=t.oldPos,a=r-i,u=0;for(;a+1<f&&r+1<l&&this.equals(e[r+1],o[a+1],s);)a++,r++,u++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return u&&!s.oneChangePerToken&&(t.lastComponent={count:u,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=r,a}equals(t,o,e){return e.comparator?e.comparator(t,o):t===o||!!e.ignoreCase&&t.toLowerCase()===o.toLowerCase()}removeEmpty(t){let o=[];for(let e=0;e<t.length;e++)t[e]&&o.push(t[e]);return o}castInput(t,o){return t}tokenize(t,o){return Array.from(t)}join(t){return t.join("")}postProcess(t,o){return t}get useLongestToken(){return!1}buildValues(t,o,e){let i=[],s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();let f=i.length,l=0,r=0,a=0;for(;l<f;l++){let u=i[l];if(u.removed)u.value=this.join(e.slice(a,a+u.count)),a+=u.count;else{if(!u.added&&this.useLongestToken){let h=o.slice(r,r+u.count);h=h.map(function(w,C){let m=e[a+C];return m.length>w.length?m:w}),u.value=this.join(h)}else u.value=this.join(o.slice(r,r+u.count));r+=u.count,u.added||(a+=u.count)}}return i}};var N=class extends L{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}},z=new N;function M(n,t,o){return z.diff(n,t,o)}var ne=`\
4
- `,A=3;function j(n){if(n==="")return{lines:[],noEol:!1};let t=!n.endsWith(`
4
+ `,A=3;function O(n){if(n==="")return{lines:[],noEol:!1};let t=!n.endsWith(`
5
5
  `),o=n.split(`
6
6
  `);return t||o.pop(),{lines:o,noEol:t}}function H(n,t){let o=n.lines.length-1;return n.lines.map((e,i)=>{let s=i===o&&n.noEol?e:`${e}
7
7
  `;return t?s.toLowerCase():s})}function B(n,t,o){let e=M(H(n,o),H(t,o)),i=[],s=0,f=0,l=0;for(;l<e.length;){let r=e[l];if(!r.added&&!r.removed){s+=r.count??r.value.length,f+=r.count??r.value.length,l++;continue}let a={oldStart:s,oldCount:0,newStart:f,newCount:0};for(;l<e.length&&(e[l].added||e[l].removed);){let u=e[l].count??e[l].value.length;e[l].removed?(a.oldCount+=u,s+=u):(a.newCount+=u,f+=u),l++}i.push(a)}return i}function x(n){if(!/[\s"\u0000-\u001f\u007f]/.test(n))return n;let t='"';for(let o of n)o==='"'||o==="\\"?t+=`\\${o}`:o===" "?t+="\\t":o===`
8
8
  `?t+="\\n":o==="\r"?t+="\\r":o<" "||o==="\x7F"?t+=`\\${o.charCodeAt(0).toString(8).padStart(3,"0")}`:t+=o;return`${t}"`}function D(n,t,o,e){n.push(`${e}${t.lines[o]}
9
9
  `),t.noEol&&o===t.lines.length-1&&n.push(ne)}function q(n,t){return t===0?String(n):t===1?String(n+1):`${n+1},${n+t}`}function J(n,t,o){let e=[];for(let i of o){let s=i.oldCount===0?"a":i.newCount===0?"d":"c";e.push(`${q(i.oldStart,i.oldCount)}${s}${q(i.newStart,i.newCount)}
10
10
  `);for(let f=0;f<i.oldCount;f++)D(e,n,i.oldStart+f,"< ");s==="c"&&e.push(`---
11
- `);for(let f=0;f<i.newCount;f++)D(e,t,i.newStart+f,"> ")}return e.join("")}function Y(n,t){let o=[],e=[];for(let i of n){let s=e[e.length-1];s&&i.oldStart-(s.oldStart+s.oldCount)>2*t&&(o.push(e),e=[]),e.push(i)}return e.length>0&&o.push(e),o}function G(n,t,o,e){let i=n[0],s=n[n.length-1];return{oldFrom:Math.max(0,i.oldStart-e),oldTo:Math.min(t.lines.length,s.oldStart+s.oldCount+e),newFrom:Math.max(0,i.newStart-e),newTo:Math.min(o.lines.length,s.newStart+s.newCount+e)}}function U(n,t){let o=t-n;return o===0?`${n},0`:o===1?String(n+1):`${n+1},${o}`}function K(n,t,o,e,i,s){let f=[`--- ${x(n)}
11
+ `);for(let f=0;f<i.newCount;f++)D(e,t,i.newStart+f,"> ")}return e.join("")}function Y(n,t){let o=[],e=[];for(let i of n){let s=e[e.length-1];s&&i.oldStart-(s.oldStart+s.oldCount)>2*t&&(o.push(e),e=[]),e.push(i)}return e.length>0&&o.push(e),o}function G(n,t,o,e){let i=n[0],s=n[n.length-1];return{oldFrom:Math.max(0,i.oldStart-e),oldTo:Math.min(t.lines.length,s.oldStart+s.oldCount+e),newFrom:Math.max(0,i.newStart-e),newTo:Math.min(o.lines.length,s.newStart+s.newCount+e)}}function V(n,t){let o=t-n;return o===0?`${n},0`:o===1?String(n+1):`${n+1},${o}`}function K(n,t,o,e,i,s){let f=[`--- ${x(n)}
12
12
  `,`+++ ${x(t)}
13
- `];for(let l of Y(i,s)){let r=G(l,o,e,s);f.push(`@@ -${U(r.oldFrom,r.oldTo)} +${U(r.newFrom,r.newTo)} @@
14
- `);let a=r.oldFrom;for(let u of l){for(;a<u.oldStart;a++)D(f,o,a," ");for(let h=0;h<u.oldCount;h++)D(f,o,u.oldStart+h,"-");for(let h=0;h<u.newCount;h++)D(f,e,u.newStart+h,"+");a=u.oldStart+u.oldCount}for(;a<r.oldTo;a++)D(f,o,a," ")}return f.join("")}function V(n,t){let o=t-n;return o===0?String(n):o===1?String(n+1):`${n+1},${t}`}function X(n,t,o,e,i,s){if(!o.some(r=>(s?r.oldCount:r.newCount)>0))return;let l=e;for(let r of o){let a=s?r.oldStart:r.newStart,u=s?r.oldCount:r.newCount;for(;l<a;l++)D(n,t,l," ");let h=r.oldCount>0&&r.newCount>0?"! ":s?"- ":"+ ";for(let w=0;w<u;w++)D(n,t,a+w,h);l=a+u}for(;l<i;l++)D(n,t,l," ")}function Q(n,t,o,e,i,s){let f=[`*** ${x(n)}
13
+ `];for(let l of Y(i,s)){let r=G(l,o,e,s);f.push(`@@ -${V(r.oldFrom,r.oldTo)} +${V(r.newFrom,r.newTo)} @@
14
+ `);let a=r.oldFrom;for(let u of l){for(;a<u.oldStart;a++)D(f,o,a," ");for(let h=0;h<u.oldCount;h++)D(f,o,u.oldStart+h,"-");for(let h=0;h<u.newCount;h++)D(f,e,u.newStart+h,"+");a=u.oldStart+u.oldCount}for(;a<r.oldTo;a++)D(f,o,a," ")}return f.join("")}function U(n,t){let o=t-n;return o===0?String(n):o===1?String(n+1):`${n+1},${t}`}function X(n,t,o,e,i,s){if(!o.some(r=>(s?r.oldCount:r.newCount)>0))return;let l=e;for(let r of o){let a=s?r.oldStart:r.newStart,u=s?r.oldCount:r.newCount;for(;l<a;l++)D(n,t,l," ");let h=r.oldCount>0&&r.newCount>0?"! ":s?"- ":"+ ";for(let w=0;w<u;w++)D(n,t,a+w,h);l=a+u}for(;l<i;l++)D(n,t,l," ")}function Q(n,t,o,e,i,s){let f=[`*** ${x(n)}
15
15
  `,`--- ${x(t)}
16
16
  `];for(let l of Y(i,s)){let r=G(l,o,e,s);f.push(`***************
17
- `),f.push(`*** ${V(r.oldFrom,r.oldTo)} ****
18
- `),X(f,o,l,r.oldFrom,r.oldTo,!0),f.push(`--- ${V(r.newFrom,r.newTo)} ----
17
+ `),f.push(`*** ${U(r.oldFrom,r.oldTo)} ****
18
+ `),X(f,o,l,r.oldFrom,r.oldTo,!0),f.push(`--- ${U(r.newFrom,r.newTo)} ----
19
19
  `),X(f,e,l,r.newFrom,r.newTo,!1)}return f.join("")}var re={name:"diff",summary:"compare files line by line",usage:"diff [OPTION]... FILE1 FILE2",options:[" --normal output a normal diff (default)","-u, --unified output a unified diff","-c, --context output a context diff","-q, --brief report only whether files differ","-s, --report-identical-files report when files are the same","-i, --ignore-case ignore case differences","-r, --recursive recursively compare directories","-N, --new-file treat absent files as empty"," --version output version information and exit"," --help display this help and exit"]},ie={normal:{long:"normal",type:"boolean"},unified:{short:"u",long:"unified",type:"boolean"},context:{short:"c",long:"context",type:"boolean"},brief:{short:"q",long:"brief",type:"boolean"},reportSame:{short:"s",long:"report-identical-files",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"},recursive:{short:"r",long:"recursive",type:"boolean"},newFile:{short:"N",long:"new-file",type:"boolean"},version:{long:"version",type:"boolean"}},E=100;function S(n,t,o,e,i){let s=o,f=e;if(i.ignoreCase&&(s=s.toLowerCase(),f=f.toLowerCase()),s===f)return i.reportSame?{output:`Files ${n} and ${t} are identical
20
20
  `,differs:!1}:{output:"",differs:!1};if(i.brief)return{output:`Files ${n} and ${t} differ
21
- `,differs:!0};let l=j(o),r=j(e),a=B(l,r,i.ignoreCase),u;return i.unified?u=K(n,t,l,r,a,A):i.context?u=Q(n,t,l,r,a,A):u=J(l,r,a),{output:u,differs:!0}}async function b(n,t){return n.fs.readFile(n.fs.resolvePath(n.cwd,t))}async function Z(n,t){try{let o=n.fs.resolvePath(n.cwd,t),e=await n.fs.stat(o);return{isFile:e.isFile,isDirectory:e.isDirectory}}catch{return null}}async function I(n,t){if(n.fs.readdirWithFileTypes)return n.fs.readdirWithFileTypes(t);let o=await n.fs.readdir(t),e=[];for(let i of o)try{let s=await n.fs.stat(`${t}/${i}`);e.push({name:i,isFile:s.isFile,isDirectory:s.isDirectory,isSymbolicLink:s.isSymbolicLink??!1})}catch{}return e}function ee(n){return n.isDirectory?"directory":n.isSymbolicLink?"symbolic link":"regular file"}async function te(n,t,o,e,i=0){if(i>E)return{output:`diff: maximum recursion depth exceeded (${E})
22
- `,differs:!0};let s=o.fs.resolvePath(o.cwd,n),f=o.fs.resolvePath(o.cwd,t),l=await I(o,s),r=await I(o,f),a=new Set(l.map(p=>p.name)),u=new Set(r.map(p=>p.name)),h=[...new Set([...a,...u])].sort(),w=new Map(l.map(p=>[p.name,p])),C=new Map(r.map(p=>[p.name,p])),m="",d=!1;for(let p of h){let g=`${n}/${p}`,c=`${t}/${p}`,$=w.get(p),P=C.get(p);if($&&P)if($.isDirectory&&P.isDirectory){let y=await te(g,c,o,e,i+1);m+=y.output,d=d||y.differs}else if($.isFile&&P.isFile)try{let y=await b(o,g),v=await b(o,c),F=S(g,c,y,v,e);F.differs&&!e.brief&&F.output&&(m+=`${e.headerPrefix} ${g} ${c}
21
+ `,differs:!0};let l=O(o),r=O(e),a=B(l,r,i.ignoreCase),u;return i.unified?u=K(n,t,l,r,a,A):i.context?u=Q(n,t,l,r,a,A):u=J(l,r,a),{output:u,differs:!0}}async function b(n,t){return n.fs.readFile(n.fs.resolvePath(n.cwd,t))}async function Z(n,t){try{let o=n.fs.resolvePath(n.cwd,t),e=await n.fs.stat(o);return{isFile:e.isFile,isDirectory:e.isDirectory}}catch{return null}}async function j(n,t){if(n.fs.readdirWithFileTypes)return n.fs.readdirWithFileTypes(t);let o=await n.fs.readdir(t),e=[];for(let i of o)try{let s=await n.fs.stat(`${t}/${i}`);e.push({name:i,isFile:s.isFile,isDirectory:s.isDirectory,isSymbolicLink:s.isSymbolicLink??!1})}catch{}return e}function ee(n){return n.isDirectory?"directory":n.isSymbolicLink?"symbolic link":"regular file"}async function te(n,t,o,e,i=0){if(i>E)return{output:`diff: maximum recursion depth exceeded (${E})
22
+ `,differs:!0};let s=o.fs.resolvePath(o.cwd,n),f=o.fs.resolvePath(o.cwd,t),l=await j(o,s),r=await j(o,f),a=new Set(l.map(p=>p.name)),u=new Set(r.map(p=>p.name)),h=[...new Set([...a,...u])].sort(),w=new Map(l.map(p=>[p.name,p])),C=new Map(r.map(p=>[p.name,p])),m="",d=!1;for(let p of h){let g=`${n}/${p}`,c=`${t}/${p}`,$=w.get(p),P=C.get(p);if($&&P)if($.isDirectory&&P.isDirectory){let y=await te(g,c,o,e,i+1);m+=y.output,d=d||y.differs}else if($.isFile&&P.isFile)try{let y=await b(o,g),v=await b(o,c),F=S(g,c,y,v,e);F.differs&&!e.brief&&F.output&&(m+=`${e.headerPrefix} ${g} ${c}
23
23
  `),m+=F.output,d=d||F.differs}catch{m+=`diff: ${g}: No such file or directory
24
24
  `,d=!0}else m+=`File ${g} is a ${ee($)} while file ${c} is a ${ee(P)}
25
- `,d=!0;else if($)if(e.newFile)if($.isDirectory){let y=await O(g,c,o,e,!0,i+1);m+=y.output,d=d||y.differs}else if($.isFile){let y=await b(o,g),v=S(g,c,y,"",e);v.differs&&!e.brief&&v.output&&(m+=`${e.headerPrefix} ${g} ${c}
25
+ `,d=!0;else if($)if(e.newFile)if($.isDirectory){let y=await I(g,c,o,e,!0,i+1);m+=y.output,d=d||y.differs}else if($.isFile){let y=await b(o,g),v=S(g,c,y,"",e);v.differs&&!e.brief&&v.output&&(m+=`${e.headerPrefix} ${g} ${c}
26
26
  `),m+=v.output,d=d||v.differs}else m+=`Only in ${n}: ${p}
27
27
  `,d=!0;else m+=`Only in ${n}: ${p}
28
- `,d=!0;else if(P)if(e.newFile)if(P.isDirectory){let y=await O(c,g,o,e,!1,i+1);m+=y.output,d=d||y.differs}else if(P.isFile){let y=await b(o,c),v=S(g,c,"",y,e);v.differs&&!e.brief&&v.output&&(m+=`${e.headerPrefix} ${g} ${c}
28
+ `,d=!0;else if(P)if(e.newFile)if(P.isDirectory){let y=await I(c,g,o,e,!1,i+1);m+=y.output,d=d||y.differs}else if(P.isFile){let y=await b(o,c),v=S(g,c,"",y,e);v.differs&&!e.brief&&v.output&&(m+=`${e.headerPrefix} ${g} ${c}
29
29
  `),m+=v.output,d=d||v.differs}else m+=`Only in ${t}: ${p}
30
30
  `,d=!0;else m+=`Only in ${t}: ${p}
31
- `,d=!0}return{output:m,differs:d}}async function O(n,t,o,e,i,s=0){if(s>E)return{output:`diff: maximum recursion depth exceeded (${E})
32
- `,differs:!0};let f=o.fs.resolvePath(o.cwd,n),r=[...await I(o,f)].sort((h,w)=>h.name<w.name?-1:h.name>w.name?1:0),a="",u=!1;for(let h of r){let w=`${n}/${h.name}`,C=`${t}/${h.name}`;if(h.isDirectory){let m=await O(w,C,o,e,i,s+1);a+=m.output,u=u||m.differs}else if(h.isFile){let m=await b(o,w),d=i?m:"",p=i?"":m,g=i?w:C,c=i?C:w,$=S(g,c,d,p,e);$.differs&&!e.brief&&$.output&&(a+=`${e.headerPrefix} ${g} ${c}
33
- `),a+=$.output,u=u||$.differs}}return{output:a,differs:u}}var he={name:"diff",async execute(n,t){if(k(n))return _(re);let o=R("diff",n,ie);if(!o.ok)return o.error;let e=o.result.flags;if(e.version)return{stdout:`diff (just-bash)
31
+ `,d=!0}return{output:m,differs:d}}async function I(n,t,o,e,i,s=0){if(s>E)return{output:`diff: maximum recursion depth exceeded (${E})
32
+ `,differs:!0};let f=o.fs.resolvePath(o.cwd,n),r=[...await j(o,f)].sort((h,w)=>h.name<w.name?-1:h.name>w.name?1:0),a="",u=!1;for(let h of r){let w=`${n}/${h.name}`,C=`${t}/${h.name}`;if(h.isDirectory){let m=await I(w,C,o,e,i,s+1);a+=m.output,u=u||m.differs}else if(h.isFile){let m=await b(o,w),d=i?m:"",p=i?"":m,g=i?w:C,c=i?C:w,$=S(g,c,d,p,e);$.differs&&!e.brief&&$.output&&(a+=`${e.headerPrefix} ${g} ${c}
33
+ `),a+=$.output,u=u||$.differs}}return{output:a,differs:u}}var he={handlesOwnVersion:!0,name:"diff",async execute(n,t){if(k(n))return _(re);let o=R("diff",n,ie);if(!o.ok)return o.error;let e=o.result.flags;if(e.version)return{stdout:`diff (just-bash)
34
34
  `,stderr:"",exitCode:0};if(Number(e.normal)+Number(e.unified)+Number(e.context)>1)return{stdout:"",stderr:`diff: conflicting output style options
35
35
  diff: Try 'diff --help' for more information.
36
36
  `,exitCode:2};let s="diff -r";e.unified&&(s+="u"),e.context&&(s+="c"),e.newFile&&(s+="N"),e.ignoreCase&&(s+="i"),e.brief&&(s+="q");let f={unified:e.unified,context:e.context,brief:e.brief,reportSame:e.reportSame,ignoreCase:e.ignoreCase,newFile:e.newFile,headerPrefix:s},l=o.result.positional;if(l.length<2)return{stdout:"",stderr:`diff: missing operand
@@ -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-I57EACSL.js";import{l as y}from"./chunk-FUT3X2GJ.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-O3PNT72D.js";import{l as y}from"./chunk-FUT3X2GJ.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
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as be}from"./chunk-BIJXTWZ4.js";import{a as Z}from"./chunk-BRB5PJ3E.js";import{a as oe}from"./chunk-3MRB66F4.js";import{a as Te}from"./chunk-K27FY3ES.js";import{a as le}from"./chunk-623Q77WZ.js";import{b as de,c as he,d as me}from"./chunk-YERKK5B3.js";import{d as we}from"./chunk-AIWBN36Z.js";import{l as ae}from"./chunk-FUT3X2GJ.js";import{a as ie}from"./chunk-CPKBPQ2C.js";import{a as ye,b as ge}from"./chunk-MUFNRCMY.js";function R(e,t){switch(e.type){case"name":{let n=e.pattern,s=n.match(/^\*(\.[a-zA-Z0-9]+)$/);if(s){let a=s[1],l=t.name;if(e.ignoreCase){if(!l.toLowerCase().endsWith(a.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!l.endsWith(a))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:Z(t.name,n,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let n=e.pattern,s=t.relativePath,a=n.split("/");for(let d=0;d<a.length-1;d++){let r=a[d];if(r&&r!=="."&&r!==".."&&!r.includes("*")&&!r.includes("?")&&!r.includes("[")){let i=`/${r}/`;if(e.ignoreCase){if(!s.toLowerCase().includes(i.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!s.includes(i))return{matches:!1,pruned:!1,printed:!1}}}let l=n.match(/\*(\.[a-zA-Z0-9]+)$/);if(l){let d=l[1];if(e.ignoreCase){if(!s.toLowerCase().endsWith(d.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!s.endsWith(d))return{matches:!1,pruned:!1,printed:!1}}return{matches:Z(s,n,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let n=e.ignoreCase?"i":"";return{matches:le(e.pattern,n).test(t.relativePath),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:t.isFile,pruned:!1,printed:!1}:e.fileType==="d"?{matches:t.isDirectory,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"empty":return{matches:t.isEmpty,pruned:!1,printed:!1};case"mtime":{let s=(Date.now()-t.mtime)/(1e3*60*60*24),a;return e.comparison==="more"?a=s>e.days:e.comparison==="less"?a=s<e.days:a=Math.floor(s)===e.days,{matches:a,pruned:!1,printed:!1}}case"newer":{let n=t.newerRefTimes.get(e.refPath);return n===void 0?{matches:!1,pruned:!1,printed:!1}:{matches:t.mtime>n,pruned:!1,printed:!1}}case"size":{let n=e.value;switch(e.unit){case"c":n=e.value;break;case"k":n=e.value*1024;break;case"M":n=e.value*1024*1024;break;case"G":n=e.value*1024*1024*1024;break;case"b":n=e.value*512;break}let s;return e.comparison==="more"?s=t.size>n:e.comparison==="less"?s=t.size<n:e.unit==="b"?s=Math.ceil(t.size/512)===e.value:s=t.size===n,{matches:s,pruned:!1,printed:!1}}case"perm":{let n=t.mode&511,s=e.mode&511,a;return e.matchType==="exact"?a=n===s:e.matchType==="all"?a=(n&s)===s:a=(n&s)!==0,{matches:a,pruned:!1,printed:!1}}case"prune":return{matches:!0,pruned:!0,printed:!1};case"action":return{matches:!0,pruned:!1,printed:!1,actions:[e.action]};case"not":{let n=R(e.expr,t);return{matches:!n.matches,pruned:n.pruned,printed:!1,actions:n.actions}}case"and":{let n=R(e.left,t);if(!n.matches)return{matches:!1,pruned:n.pruned,printed:!1,actions:n.actions};let s=R(e.right,t);return{matches:s.matches,pruned:n.pruned||s.pruned,printed:n.printed||s.printed,actions:[...n.actions??[],...s.actions??[]]}}case"or":{let n=R(e.left,t);if(n.matches)return n;let s=R(e.right,t);return{matches:s.matches,pruned:n.pruned||s.pruned,printed:s.printed,actions:[...n.actions??[],...s.actions??[]]}}}}function _(e){if(!e)return!1;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":return!1;case"action":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!0;case"not":return _(e.expr);case"and":case"or":return _(e.left)||_(e.right)}}function j(e){if(!e)return!1;switch(e.type){case"empty":return!0;case"not":return j(e.expr);case"and":case"or":return j(e.left)||j(e.right);default:return!1}}function Se(e){let t=[],n=s=>{s&&(s.type==="newer"?t.push(s.refPath):s.type==="not"?n(s.expr):(s.type==="and"||s.type==="or")&&(n(s.left),n(s.right)))};return n(e),t}function J(e){if(!e)return!0;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":return!0;case"action":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return J(e.expr);case"and":case"or":return J(e.left)&&J(e.right)}}function B(e,t,n,s,a){switch(e.type){case"name":{let l=e.pattern,d=l.match(/^\*(\.[a-zA-Z0-9]+)$/);if(d){let r=d[1];if(e.ignoreCase){if(!t.toLowerCase().endsWith(r.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!t.endsWith(r))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:Z(t,l,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let l=e.pattern,d=l.split("/");for(let i=0;i<d.length-1;i++){let o=d[i];if(o&&o!=="."&&o!==".."&&!o.includes("*")&&!o.includes("?")&&!o.includes("[")){let u=`/${o}/`;if(e.ignoreCase){if(!n.toLowerCase().includes(u.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.includes(u))return{matches:!1,pruned:!1,printed:!1}}}let r=l.match(/\*(\.[a-zA-Z0-9]+)$/);if(r){let i=r[1];if(e.ignoreCase){if(!n.toLowerCase().endsWith(i.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.endsWith(i))return{matches:!1,pruned:!1,printed:!1}}return{matches:Z(n,l,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let l=e.ignoreCase?"i":"";return{matches:le(e.pattern,l).test(n),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:s,pruned:!1,printed:!1}:e.fileType==="d"?{matches:a,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"prune":return{matches:!0,pruned:!0,printed:!1};case"action":return{matches:!0,pruned:!1,printed:!1,actions:[e.action]};case"not":{let l=B(e.expr,t,n,s,a);return{matches:!l.matches,pruned:l.pruned,printed:!1,actions:l.actions}}case"and":{let l=B(e.left,t,n,s,a);if(!l.matches)return{matches:!1,pruned:l.pruned,printed:!1,actions:l.actions};let d=B(e.right,t,n,s,a);return{matches:d.matches,pruned:l.pruned||d.pruned,printed:l.printed||d.printed,actions:[...l.actions??[],...d.actions??[]]}}case"or":{let l=B(e.left,t,n,s,a);if(l.matches)return l;let d=B(e.right,t,n,s,a);return{matches:d.matches,pruned:l.pruned||d.pruned,printed:d.printed,actions:[...l.actions??[],...d.actions??[]]}}default:return{matches:!1,pruned:!1,printed:!1}}}function U(e){if(!e)return!1;switch(e.type){case"prune":return!0;case"not":return U(e.expr);case"and":case"or":return U(e.left)||U(e.right);default:return!1}}function L(e){switch(e.type){case"name":case"path":case"regex":case"type":case"prune":return!0;case"action":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return L(e.expr);case"and":case"or":return L(e.left)&&L(e.right)}}function Ce(e,t){if(!e||!t.isDirectory)return{shouldPrune:!1};if(!L(e))return ce(e,t);let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:R(e,n).pruned}}function ce(e,t){switch(e.type){case"or":{if(L(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};if(R(e.left,n).pruned)return{shouldPrune:!0}}return ce(e.right,t)}case"and":{if(L(e.left)&&L(e.right)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:R(e,n).pruned}}if(L(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return R(e.left,n).matches?ce(e.right,t):{shouldPrune:!1}}return{shouldPrune:!1}}case"not":return{shouldPrune:!1};default:return{shouldPrune:!1}}}function Ee(e,t){let n=[],s=t,a=r=>({expr:null,pathIndex:s,error:`find: missing argument to \`${r}'
4
+ `}),l=(r,i)=>({expr:null,pathIndex:s,error:`find: invalid argument \`${i}' to \`${r}'
5
+ `});for(;s<e.length;){let r=e[s];if(r==="("||r==="\\("){n.push({type:"lparen"}),s++;continue}if(r===")"||r==="\\)"){n.push({type:"rparen"}),s++;continue}if(r==="-name"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"name",pattern:e[++s]}})}else if(r==="-iname"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"name",pattern:e[++s],ignoreCase:!0}})}else if(r==="-path"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"path",pattern:e[++s]}})}else if(r==="-ipath"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"path",pattern:e[++s],ignoreCase:!0}})}else if(r==="-regex"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"regex",pattern:e[++s]}})}else if(r==="-iregex"){if(s+1>=e.length)return a(r);n.push({type:"expr",expr:{type:"regex",pattern:e[++s],ignoreCase:!0}})}else if(r==="-type"){if(s+1>=e.length)return a(r);let i=e[++s];if(i==="f"||i==="d")n.push({type:"expr",expr:{type:"type",fileType:i}});else return{expr:null,pathIndex:s,error:`find: Unknown argument to -type: ${i}
6
+ `}}else if(r==="-empty")n.push({type:"expr",expr:{type:"empty"}});else if(r==="-mtime"){if(s+1>=e.length)return a(r);let i=e[++s],o="exact",u=i;if(i.startsWith("+")?(o="more",u=i.slice(1)):i.startsWith("-")&&(o="less",u=i.slice(1)),!/^\d+$/.test(u))return l(r,i);let N=Number(u);if(!Number.isSafeInteger(N))return l(r,i);n.push({type:"expr",expr:{type:"mtime",days:N,comparison:o}})}else if(r==="-newer"){if(s+1>=e.length)return a(r);let i=e[++s];n.push({type:"expr",expr:{type:"newer",refPath:i}})}else if(r==="-size"){if(s+1>=e.length)return a(r);let i=e[++s],o="exact",u=i;i.startsWith("+")?(o="more",u=i.slice(1)):i.startsWith("-")&&(o="less",u=i.slice(1));let N=u.match(/^(\d+)([ckMGb])?$/);if(!N)return l(r,i);let F=Number(N[1]);if(!Number.isSafeInteger(F))return l(r,i);let M=N[2]||"b",V=M==="G"?1024**3:M==="M"?1024**2:M==="k"?1024:M==="b"?512:1;if(!Number.isSafeInteger(F*V))return l(r,i);n.push({type:"expr",expr:{type:"size",value:F,unit:M,comparison:o}})}else if(r==="-perm"){if(s+1>=e.length)return a(r);let i=e[++s],o="exact",u=i;if(i.startsWith("-")?(o="all",u=i.slice(1)):i.startsWith("/")&&(o="any",u=i.slice(1)),!/^[0-7]{1,4}$/.test(u))return l(r,i);let N=Number.parseInt(u,8);n.push({type:"expr",expr:{type:"perm",mode:N,matchType:o}})}else if(r==="-prune")n.push({type:"expr",expr:{type:"prune"}});else if(r==="-not"||r==="!")n.push({type:"not"});else if(r==="-o"||r==="-or")n.push({type:"op",op:"or"});else if(r==="-a"||r==="-and")n.push({type:"op",op:"and"});else if(r==="-maxdepth"||r==="-mindepth"){if(s+1>=e.length)return a(r);s++}else if(r!=="-depth")if(r==="-exec"){let i=[];for(s++;s<e.length&&e[s]!==";"&&e[s]!=="+";)i.push(e[s]),s++;if(s>=e.length)return{expr:null,pathIndex:s,error:"find: missing argument to `-exec'\n"};if(i.length===0)return a("-exec");let o=e[s]==="+";if(o&&(i.at(-1)!=="{}"||i.filter(u=>u==="{}").length!==1))return l("-exec","+");n.push({type:"expr",expr:{type:"action",action:{type:"exec",command:i,batchMode:o}}})}else if(r==="-print")n.push({type:"expr",expr:{type:"action",action:{type:"print"}}});else if(r==="-print0")n.push({type:"expr",expr:{type:"action",action:{type:"print0"}}});else if(r==="-printf"){if(s+1>=e.length)return a(r);let i=e[++s];n.push({type:"expr",expr:{type:"action",action:{type:"printf",format:i}}})}else if(r==="-delete")n.push({type:"expr",expr:{type:"action",action:{type:"delete"}}});else return r.startsWith("-")?{expr:null,pathIndex:s,error:`find: unknown predicate '${r}'
7
+ `}:{expr:null,pathIndex:s,error:`find: paths must precede expression: \`${r}'
8
+ `};s++}if(n.length===0)return{expr:null,pathIndex:s};let d=Ne(n);return d.error?{expr:null,pathIndex:s,error:d.error}:{expr:d.expr,pathIndex:s}}function Ne(e){let t=0,n;function s(){let i=a();if(!i)return null;for(;t<e.length;){let o=e[t];if(o.type==="op"&&o.op==="or"){t++;let u=a();if(!u)return n="find: expected an expression after `-o'\n",null;i={type:"or",left:i,right:u}}else break}return i}function a(){let i=l();if(!i)return null;for(;t<e.length;){let o=e[t];if(o.type==="op"&&o.op==="and"){t++;let u=l();if(!u)return n="find: expected an expression after `-a'\n",null;i={type:"and",left:i,right:u}}else if(o.type==="expr"||o.type==="not"||o.type==="lparen"){let u=l();if(!u)return i;i={type:"and",left:i,right:u}}else break}return i}function l(){if(t<e.length&&e[t].type==="not"){t++;let i=l();return i?{type:"not",expr:i}:(n="find: expected an expression after `!'\n",null)}return d()}function d(){if(t>=e.length)return null;let i=e[t];if(i.type==="lparen"){t++;let o=s();return!o||t>=e.length||e[t].type!=="rparen"?(n="find: missing closing `)'\n",null):(t++,o)}return i.type==="expr"?(t++,i.expr):(i.type==="rparen",null)}let r=s();return!n&&t<e.length&&(n=e[t].type==="rparen"?"find: unexpected `)'\n":`find: invalid expression
9
+ `),!n&&r&&ee(r)&&(n="find: refusing to evaluate `-delete' under negation\n"),{expr:n?null:r,error:n}}function ee(e,t=!1){return e.type==="action"?t&&e.action.type==="delete":e.type==="not"?ee(e.expr,!t):e.type==="and"||e.type==="or"?ee(e.left,t)||ee(e.right,t):!1}var ve=500;function Re(){return{readdirCalls:0,readdirTime:0,statCalls:0,statTime:0,evalCalls:0,evalTime:0,nodeCount:0,batchCount:0,batchTime:0,earlyPrunes:0}}function Fe(e,t,n){e({category:"find",name:"summary",durationMs:n,details:{readdirCalls:t.readdirCalls,readdirTimeMs:t.readdirTime,statCalls:t.statCalls,statTimeMs:t.statTime,evalCalls:t.evalCalls,evalTimeMs:t.evalTime,nodeCount:t.nodeCount,batchCount:t.batchCount,batchTimeMs:t.batchTime,earlyPrunes:t.earlyPrunes,otherTimeMs:n-t.readdirTime-t.statTime-t.evalTime-t.batchTime}})}var ze={name:"find",summary:"search for files in a directory hierarchy",usage:"find [path...] [expression]",options:["-name PATTERN file name matches shell pattern PATTERN","-iname PATTERN like -name but case insensitive","-path PATTERN file path matches shell pattern PATTERN","-ipath PATTERN like -path but case insensitive","-regex PATTERN file path matches regular expression PATTERN","-iregex PATTERN like -regex but case insensitive","-type TYPE file is of type: f (regular file), d (directory)","-empty file is empty or directory is empty","-mtime N file's data was modified N*24 hours ago","-newer FILE file was modified more recently than FILE","-size N[ckMGb] file uses N units of space (c=bytes, k=KB, M=MB, G=GB, b=512B blocks)","-perm MODE file's permission bits are exactly MODE (octal)","-perm -MODE all permission bits MODE are set","-perm /MODE any permission bits MODE are set","-maxdepth LEVELS descend at most LEVELS directories","-mindepth LEVELS do not apply tests at levels less than LEVELS","-depth process directory contents before directory itself","-prune do not descend into this directory","-not, ! negate the following expression","-a, -and logical AND (default)","-o, -or logical OR","-exec CMD {} ; execute CMD on each file ({} is replaced by filename)","-exec CMD {} + execute CMD with multiple files at once","-print print the full file name (default action)","-print0 print the full file name followed by a null character","-printf FORMAT print FORMAT with directives: %f %h %p %P %s %d %m %M %t","-delete delete found files/directories"," --help display this help and exit"]},nt={name:"find",async execute(e,t){if(ge(e))return ye(ze);let n=[],s=null,a=null,l=!1,d=e.length;for(let c=0;c<e.length;c++){let f=e[c];if(f.startsWith("-")||f==="("||f==="\\("||f===")"||f==="\\)"||f==="!"){d=c;break}n.push(f)}n.length===0&&n.push(".");for(let c=d;c<e.length;c++){let f=e[c];if(f==="-exec")for(c++;c<e.length&&e[c]!==";"&&e[c]!=="+";)c++;else if(f==="-maxdepth"||f==="-mindepth"){let p=e[c+1];if(p===void 0||!/^\d+$/.test(p))return{stdout:"",stderr:p===void 0?`find: missing argument to \`${f}'
10
+ `:`find: invalid argument \`${p}' to \`${f}'
11
+ `,exitCode:1};let v=Number(p);if(!Number.isSafeInteger(v))return{stdout:"",stderr:`find: invalid argument \`${p}' to \`${f}'
12
+ `,exitCode:1};f==="-maxdepth"?s=v:a=v,c++}else f==="-depth"&&(l=!0)}let{expr:r,error:i}=Ee(e,d);if(i)return{stdout:"",stderr:i,exitCode:1};let o=te(r),u=o.length>0;o.some(c=>c.type==="delete")&&(l=!0);let N=[],F=0,M=t.executionScope?new Te(t.executionScope,"find"):void 0,V=[],fe=[],Q=0,O=new we({limits:t.limits,signal:t.signal,executionScope:t.executionScope,site:"find"}),G=c=>{if(M)M.append("stdout",c);else{let f=ie(c);if(f>t.limits.maxOutputSize-Q)throw new ae(`find: output size limit exceeded (${t.limits.maxOutputSize} bytes)`,"output_size");c&&V.push(c),Q+=f}},q=c=>{if(M)M.append("stderr",c);else{let f=ie(c);if(f>t.limits.maxOutputSize-Q)throw new ae(`find: output size limit exceeded (${t.limits.maxOutputSize} bytes)`,"output_size");c&&fe.push(c),Q+=f}},De=Se(r),ne=new Map;for(let c of De){let f=t.fs.resolvePath(t.cwd,c);try{let p=await t.fs.stat(f);ne.set(c,p.mtime?.getTime()??Date.now())}catch{}}let Me=o.some(c=>{if(c.type!=="printf")return!1;let f=c.format.replace(/%%/g,"");return/%[-+]?[0-9]*\.?[0-9]*(s|m|M|t|T)/.test(f)}),Pe=_(r)||Me,xe=j(r),ue=U(r),$e=J(r),Ie=typeof t.fs.readdirWithFileTypes=="function";for(let c of n){let z=function(h){let y={path:h.relativePath,name:h.name,size:h.stat?.size??0,mtime:h.stat?.mtime?.getTime()??Date.now(),mode:h.stat?.mode??420,isDirectory:h.isDirectory,depth:h.depth,startingPoint:c},C=h.unreadable===void 0?[]:[{action:{type:"diagnostic",message:`find: ${h.relativePath}: ${h.unreadable}
13
+ `},path:h.relativePath,printfData:y}],I=w=>l?[...C,...w]:[...w,...C];if(!(a===null||h.depth>=a))return C;let g=!0,m=[];if(r!==null){let w=Date.now(),T;if($e)T=B(r,h.name,h.relativePath,h.isFile,h.isDirectory);else{let S={name:h.name,relativePath:h.relativePath,isFile:h.isFile,isDirectory:h.isDirectory,isEmpty:h.isEmpty,mtime:h.stat?.mtime?.getTime()??Date.now(),size:h.stat?.size??0,mode:h.stat?.mode??420,newerRefTimes:ne};T=R(r,S)}g=T.matches,m=T.actions??[],p.evalCalls++,p.evalTime+=Date.now()-w}if(!u&&g&&(m=[{type:"print"}]),m.length===0)return C;O.checkpoint(m.length);let b=[];for(let w of m)b.push({action:w,path:h.relativePath,printfData:y});return I(b)};var He=z;c.length>1&&c.endsWith("/")&&(c=c.slice(0,-1));let f=t.fs.resolvePath(t.cwd,c);try{await t.fs.stat(f)}catch{q(`find: ${c}: No such file or directory
14
+ `),F=1;continue}let p=Re(),v=Date.now();async function P(h){let{path:y,depth:C,typeInfo:I}=h;if(O.visit(C),p.nodeCount++,C>(s??t.limits.maxTraversalDepth))return null;let x,g,m;if(I&&!Pe)x=I.isFile,g=I.isDirectory;else{try{let W=Date.now();m=await t.fs.lstat(y),p.statCalls++,p.statTime+=Date.now()-W}catch{return null}if(!m)return null;x=m.isFile,g=m.isDirectory}let b;y===f?b=c.split("/").pop()||c:b=y.split("/").pop()||"";let w=y===f?c:c==="."?`./${y.slice(f==="/"?f.length:f.length+1)}`:c+y.slice(f.length),T=[],S=null,E=null,$=!1;g&&ue&&!l&&($=Ce(r,{name:b,relativePath:w,isFile:x,isDirectory:g}).shouldPrune,$&&p.earlyPrunes++);let H=!(C>=(s??t.limits.maxTraversalDepth))&&!$,K=(H||xe)&&!$,X;if(g&&K){let W=Date.now();try{Ie&&t.fs.readdirWithFileTypes?S=await t.fs.readdirWithFileTypes(y):E=await t.fs.readdir(y)}catch(D){let A=Le(D);if(A===null)throw D;X=A,p.readdirCalls++,p.readdirTime+=Date.now()-W}if(S!==null){O.checkpoint(),O.discover(S.length),E=[];for(let D of S)E.push(D.name);if(p.readdirCalls++,p.readdirTime+=Date.now()-W,H)for(let D=0;D<S.length;D++){let A=S[D];T.push({path:y==="/"?`/${A.name}`:`${y}/${A.name}`,depth:C+1,typeInfo:{isFile:A.isFile,isDirectory:A.isDirectory},resultIndex:D})}}else if(E!==null&&(O.checkpoint(),O.discover(E.length),p.readdirCalls++,p.readdirTime+=Date.now()-W,H))for(let D=0;D<E.length;D++){let A=E[D];T.push({path:y==="/"?`/${A}`:`${y}/${A}`,depth:C+1,resultIndex:D})}}let Y=x?(m?.size??0)===0:E!==null&&E.length===0,re=$;if(!l&&r!==null&&!$&&ue){let W=Date.now(),D={name:b,relativePath:w,isFile:x,isDirectory:g,isEmpty:Y,mtime:m?.mtime?.getTime()??Date.now(),size:m?.size??0,mode:m?.mode??420,newerRefTimes:ne};re=R(r,D).pruned,p.evalCalls++,p.evalTime+=Date.now()-W}return{relativePath:w,name:b,isFile:x,isDirectory:g,isEmpty:Y,stat:m,depth:C,children:re?[]:T,pruned:re,unreadable:X}}async function ke(){let h={effects:[]};if(l){let y=[],C=[{item:{path:f,depth:0,resultIndex:0},parentIndex:-1,childOrderInParent:0}],I=new Map,x=0;for(;x<C.length;){let g=Date.now(),m=Math.min(C.length,x+ve),b=C.slice(x,m);x=m;let w=await Promise.all(b.map(T=>P(T.item)));p.batchCount++,p.batchTime+=Date.now()-g;for(let T=0;T<b.length;T++){let S=w[T],E=b[T];if(!S)continue;let $=y.length;if(E.parentIndex>=0){let k=I.get(E.parentIndex)||[];k.push($),I.set(E.parentIndex,k)}y.push({node:S,parentIndex:E.parentIndex,childIndices:[]});for(let k=0;k<S.children.length;k++)C.push({item:S.children[k],parentIndex:$,childOrderInParent:k})}}for(let[g,m]of I)g>=0&&g<y.length&&(y[g].childIndices=m);if(y.length>0){let g=[{index:0,visited:!1}];for(;g.length>0;){O.checkpoint();let m=g.pop();if(!m)break;let b=y[m.index];if(b){if(m.visited){for(let w of z(b.node))h.effects.push(w);continue}g.push({index:m.index,visited:!0});for(let w=b.childIndices.length-1;w>=0;w--)g.push({index:b.childIndices[w],visited:!1})}}}}else{let y=new Map,C=0,I=[{item:{path:f,depth:0,resultIndex:0},orderIndex:C++}],x=new Map,g=0;for(;g<I.length;){let b=Date.now(),w=Math.min(I.length,g+ve),T=I.slice(g,w);g=w;let S=await Promise.all(T.map(async({item:E,orderIndex:$})=>{let k=await P(E);return k?{node:k,orderIndex:$}:null}));p.batchCount++,p.batchTime+=Date.now()-b;for(let E of S){if(!E)continue;let{node:$,orderIndex:k}=E,H=z($);if(H.length>0&&y.set(k,H),$.children.length>0){let K=[];for(let X of $.children){let Y=C++;K.push(Y),I.push({item:X,orderIndex:Y})}x.set(k,K)}}}let m=[0];for(;m.length>0;){O.checkpoint();let b=m.pop();if(b===void 0)break;let w=y.get(b);if(w)for(let S of w)h.effects.push(S);let T=x.get(b);if(T)for(let S=T.length-1;S>=0;S--)m.push(T[S])}}return h}let pe=await ke();for(let h of pe.effects)N.push(h);if(t.trace){let h=Date.now()-v;Fe(t.trace,p,h),t.trace({category:"find",name:"searchPath",durationMs:h,details:{path:c,resultsFound:pe.effects.filter(y=>y.action.type!=="diagnostic").length}})}}let se=new Map;for(let c of N){let{action:f,path:p}=c;switch(f.type){case"diagnostic":q(f.message),F=1;break;case"print":G(`${p}
15
+ `);break;case"print0":G(`${p}\0`);break;case"printf":G(Ae(f.format,c.printfData));break;case"delete":{let v=t.fs.resolvePath(t.cwd,p);try{await t.fs.rm(v,{recursive:!1})}catch(P){let z=P instanceof Error?P.message:String(P);q(`find: cannot delete '${p}': ${z}
16
+ `),F=1}break}case"exec":{if(!t.exec)return{stdout:"",stderr:`find: -exec not supported in this context
17
+ `,exitCode:1};if(f.batchMode){let z=se.get(f)??[];z.push(p),se.set(f,z);break}let v=f.command.map(z=>z==="{}"?p:z),P=await t.exec(oe([v[0]]),{cwd:t.cwd,signal:t.signal,args:v.slice(1)});M?M.appendResult(P):(G(P.stdout),q(P.stderr)),P.exitCode!==0&&(F=P.exitCode);break}}}for(let[c,f]of se){if(c.type!=="exec"||!t.exec||f.length===0)continue;let p=[];for(let P of c.command)P==="{}"?p.push(...f):p.push(P);let v=await t.exec(oe([p[0]]),{cwd:t.cwd,signal:t.signal,args:p.slice(1)});M?M.appendResult(v):(G(v.stdout),q(v.stderr)),v.exitCode!==0&&(F=v.exitCode)}return M?.build(F)??{stdout:V.join(""),stderr:fe.join(""),exitCode:F}}};function te(e){return e?e.type==="action"?[e.action]:e.type==="not"?te(e.expr):e.type==="and"||e.type==="or"?[...te(e.left),...te(e.right)]:[]:[]}function Ae(e,t){let n=me(e),s="",a=0;for(;a<n.length;)if(n[a]==="%"&&a+1<n.length){if(a++,n[a]==="%"){s+="%",a++;continue}let[l,d,r]=he(n,a);if(a+=r,a>=n.length){s+="%";break}let i=n[a],o;switch(i){case"f":o=t.name,a++;break;case"h":{let u=t.path.lastIndexOf("/");o=u>0?t.path.slice(0,u):".",a++;break}case"p":o=t.path,a++;break;case"P":{let u=t.startingPoint;t.path===u?o="":t.path.startsWith(`${u}/`)?o=t.path.slice(u.length+1):u==="."&&t.path.startsWith("./")?o=t.path.slice(2):o=t.path,a++;break}case"s":o=String(t.size),a++;break;case"d":o=String(t.depth),a++;break;case"m":o=(t.mode&511).toString(8),a++;break;case"M":o=be(t.mode,t.isDirectory),a++;break;case"t":{let u=new Date(t.mtime);o=Oe(u),a++;break}case"T":{if(a+1<n.length){let u=n[a+1],N=new Date(t.mtime);o=Be(N,u),a+=2}else o="%T",a++;break}default:s+=`%${l!==0||d!==-1?`${l}.${d}`:""}${i}`,a++;continue}s+=de(o,l,d)}else s+=n[a],a++;return s}function Oe(e){let t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],s=t[e.getDay()],a=n[e.getMonth()],l=String(e.getDate()).padStart(2," "),d=String(e.getHours()).padStart(2,"0"),r=String(e.getMinutes()).padStart(2,"0"),i=String(e.getSeconds()).padStart(2,"0"),o=e.getFullYear();return`${s} ${a} ${l} ${d}:${r}:${i} ${o}`}var We=new Map([["EACCES","Permission denied"],["EIO","Input/output error"],["ELOOP","Too many levels of symbolic links"],["ENAMETOOLONG","File name too long"],["ENOENT","No such file or directory"],["ENOTDIR","Not a directory"],["EPERM","Permission denied"]]);function Le(e){let t=typeof e=="object"&&e!==null&&"code"in e&&typeof e.code=="string"?e.code:e instanceof Error?/^(E[A-Z]+)\b/.exec(e.message)?.[1]:void 0;return t===void 0?null:We.get(t)??null}function Be(e,t){switch(t){case"@":return String(e.getTime()/1e3);case"Y":return String(e.getFullYear());case"m":return String(e.getMonth()+1).padStart(2,"0");case"d":return String(e.getDate()).padStart(2,"0");case"H":return String(e.getHours()).padStart(2,"0");case"M":return String(e.getMinutes()).padStart(2,"0");case"S":return String(e.getSeconds()).padStart(2,"0");case"T":return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`;case"F":return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;default:return`%T${t}`}}var st={name:"find",flags:[{flag:"-name",type:"value",valueHint:"pattern"},{flag:"-iname",type:"value",valueHint:"pattern"},{flag:"-type",type:"value",valueHint:"string"},{flag:"-maxdepth",type:"value",valueHint:"number"},{flag:"-mindepth",type:"value",valueHint:"number"},{flag:"-empty",type:"boolean"},{flag:"-print",type:"boolean"},{flag:"-print0",type:"boolean"}],needsFiles:!0};export{nt as a,st 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 _}from"./chunk-QES5OSUC.js";import{a as $e}from"./chunk-BIJXTWZ4.js";import{a as D}from"./chunk-YXPSX3SI.js";import{b as le}from"./chunk-HWI42GQO.js";import{a as q}from"./chunk-CPKBPQ2C.js";import{a as Se,b as Be,c as fe}from"./chunk-MUFNRCMY.js";var nt="file",it="link",st="symlink",Le="directory",at={file:"0",link:"1",symlink:"2","character-device":"3","block-device":"4",directory:"5",fifo:"6","pax-header":"x","pax-global-header":"g","gnu-long-name":"L","gnu-long-link-name":"K"},ot={0:nt,1:it,2:st,3:"character-device",4:"block-device",5:Le,6:"fifo",x:"pax-header",g:"pax-global-header",L:"gnu-long-name",K:"gnu-long-link-name"},ct=new Uint8Array(512),V=new Uint8Array(0),I=new TextEncoder,Q=new TextDecoder;function P(e,t,r,n){n&&I.encodeInto(n,e.subarray(t,t+r))}function j(e,t,r,n){if(n===void 0)return;let i=n.toString(8).padStart(r-1,"0");I.encodeInto(i,e.subarray(t,t+r-1))}function F(e,t,r){let n=e.indexOf(0,t),i=n===-1||n>t+r?t+r:n;return Q.decode(e.subarray(t,i))}function me(e,t,r){let n=0,i=t+r;for(let s=t;s<i;s++){let a=e[s];if(a===0)break;a!==32&&(n=n*8+(a-48))}return n}function Y(e,t,r){if(e[t]&128){let n=0;n=e[t]&127;for(let i=1;i<r;i++)n=n*256+e[t+i];if(!Number.isSafeInteger(n))throw new Error("TAR number too large");return n}return me(e,t,r)}var M=e=>e.type==="directory"||e.type==="symlink"||e.type==="link"||e.type==="character-device"||e.type==="block-device"||e.type==="fifo";async function Ne(e){if(e==null)return V;if(e instanceof Uint8Array)return e;if(typeof e=="string")return I.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw new TypeError("Unsupported content type for entry body.")}var Te=(e,t)=>{let r=e.split("/").filter(Boolean);return t>=r.length?"":r.slice(t).join("/")};function he(e,t){let{strip:r,filter:n,map:i}=t;if(!r&&!n&&!i)return e;let s={...e};if(r&&r>0){let o=Te(s.name,r);if(!o)return null;if(s.name=s.type==="directory"&&!o.endsWith("/")?`${o}/`:o,s.linkname){let c=s.linkname.startsWith("/");if(c||s.type==="link"){let l=Te(s.linkname,r);s.linkname=c?`/${l}`||"/":l}}}if(n?.(s)===!1)return null;let a=i?i(s):s;return a&&(!a.name||!a.name.trim()||a.name==="."||a.name==="/")?null:a}var K=256;function lt(){let e=new Array(K),t=e.length-1,r=0,n=0,i=0,s=o=>{let c=e[r];o===c.length?(e[r]=V,r=r+1&t):e[r]=c.subarray(o),i-=o,i===0&&e.length>K&&(e=new Array(K),t=K-1,r=0,n=0)};function a(o,c){if(c){let y=0,d=Math.min(o,i);for(;d>0;){let m=e[r],p=Math.min(d,m.length),b=p===m.length?m:m.subarray(0,p);if(s(p),d-=p,y+=p,!c(b))break}return y}if(i<o)return null;if(o===0)return V;let l=e[r];if(l.length>=o){let y=l.length===o?l:l.subarray(0,o);return s(o),y}let f=new Uint8Array(o),u=0,h=o;for(;h>0;){let y=e[r],d=Math.min(h,y.length);f.set(d===y.length?y:y.subarray(0,d),u),u+=d,h-=d,s(d)}return f}return{push:o=>{if(o.length===0)return;let c=n+1&t;if(c===r){let l=e.length,f=l*2,u=new Array(f),h=n-r+l&l-1;if(r<n)for(let y=0;y<h;y++)u[y]=e[r+y];else if(h>0){let y=l-r;for(let d=0;d<y;d++)u[d]=e[r+d];for(let d=0;d<n;d++)u[y+d]=e[d]}e=u,t=f-1,r=0,n=h,c=n+1&t}e[n]=o,n=c,i+=o.length},available:()=>i,peek:o=>{if(i<o)return null;if(o===0)return V;let c=e[r];if(c.length>=o)return c.length===o?c:c.subarray(0,o);let l=new Uint8Array(o),f=0,u=r;for(;f<o;){let h=e[u],y=Math.min(o-f,h.length);y===h.length?l.set(h,f):l.set(h.subarray(0,y),f),f+=y,u=u+1&t}return l},discard:o=>{if(o>i)throw new Error("Too many bytes consumed");if(o===0)return;let c=o;for(;c>0;){let l=e[r],f=Math.min(c,l.length);s(f),c-=f}},pull:a}}var de=32,ft=48;function ut(e){let t=me(e,148,8),r=0;for(let n=0;n<e.length;n++)n>=148&&n<156?r+=de:r+=e[n];return t===r}function dt(e){e.fill(de,148,156);let t=0;for(let r of e)t+=r;for(let r=153;r>=148;r--)e[r]=(t&7)+ft,t>>=3;e[154]=0,e[155]=de}var mt=256;function ht(e){let t={};I.encode(e.name).length>100&&Ue(e.name)===null&&(t.path=e.name),e.linkname&&I.encode(e.linkname).length>100&&(t.linkpath=e.linkname),e.uname&&I.encode(e.uname).length>32&&(t.uname=e.uname),e.gname&&I.encode(e.gname).length>32&&(t.gname=e.gname),e.uid!=null&&e.uid>2097151&&(t.uid=String(e.uid)),e.gid!=null&&e.gid>2097151&&(t.gid=String(e.gid)),e.size!=null&&e.size>8589934591&&(t.size=String(e.size)),e.pax&&Object.assign(t,e.pax);let r=Object.entries(t);if(r.length===0)return null;let n=I.encode(r.map(([i,s])=>{let a=`${i}=${s}
3
+ import{a as _}from"./chunk-QES5OSUC.js";import{a as $e}from"./chunk-BIJXTWZ4.js";import{a as D}from"./chunk-623Q77WZ.js";import{b as le}from"./chunk-BFLKIASG.js";import{a as q}from"./chunk-CPKBPQ2C.js";import{a as Se,b as Be,c as fe}from"./chunk-MUFNRCMY.js";var nt="file",it="link",st="symlink",Le="directory",at={file:"0",link:"1",symlink:"2","character-device":"3","block-device":"4",directory:"5",fifo:"6","pax-header":"x","pax-global-header":"g","gnu-long-name":"L","gnu-long-link-name":"K"},ot={0:nt,1:it,2:st,3:"character-device",4:"block-device",5:Le,6:"fifo",x:"pax-header",g:"pax-global-header",L:"gnu-long-name",K:"gnu-long-link-name"},ct=new Uint8Array(512),V=new Uint8Array(0),I=new TextEncoder,Q=new TextDecoder;function P(e,t,r,n){n&&I.encodeInto(n,e.subarray(t,t+r))}function j(e,t,r,n){if(n===void 0)return;let i=n.toString(8).padStart(r-1,"0");I.encodeInto(i,e.subarray(t,t+r-1))}function F(e,t,r){let n=e.indexOf(0,t),i=n===-1||n>t+r?t+r:n;return Q.decode(e.subarray(t,i))}function me(e,t,r){let n=0,i=t+r;for(let s=t;s<i;s++){let a=e[s];if(a===0)break;a!==32&&(n=n*8+(a-48))}return n}function Y(e,t,r){if(e[t]&128){let n=0;n=e[t]&127;for(let i=1;i<r;i++)n=n*256+e[t+i];if(!Number.isSafeInteger(n))throw new Error("TAR number too large");return n}return me(e,t,r)}var M=e=>e.type==="directory"||e.type==="symlink"||e.type==="link"||e.type==="character-device"||e.type==="block-device"||e.type==="fifo";async function Ne(e){if(e==null)return V;if(e instanceof Uint8Array)return e;if(typeof e=="string")return I.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw new TypeError("Unsupported content type for entry body.")}var Te=(e,t)=>{let r=e.split("/").filter(Boolean);return t>=r.length?"":r.slice(t).join("/")};function he(e,t){let{strip:r,filter:n,map:i}=t;if(!r&&!n&&!i)return e;let s={...e};if(r&&r>0){let o=Te(s.name,r);if(!o)return null;if(s.name=s.type==="directory"&&!o.endsWith("/")?`${o}/`:o,s.linkname){let c=s.linkname.startsWith("/");if(c||s.type==="link"){let l=Te(s.linkname,r);s.linkname=c?`/${l}`||"/":l}}}if(n?.(s)===!1)return null;let a=i?i(s):s;return a&&(!a.name||!a.name.trim()||a.name==="."||a.name==="/")?null:a}var K=256;function lt(){let e=new Array(K),t=e.length-1,r=0,n=0,i=0,s=o=>{let c=e[r];o===c.length?(e[r]=V,r=r+1&t):e[r]=c.subarray(o),i-=o,i===0&&e.length>K&&(e=new Array(K),t=K-1,r=0,n=0)};function a(o,c){if(c){let y=0,d=Math.min(o,i);for(;d>0;){let m=e[r],p=Math.min(d,m.length),b=p===m.length?m:m.subarray(0,p);if(s(p),d-=p,y+=p,!c(b))break}return y}if(i<o)return null;if(o===0)return V;let l=e[r];if(l.length>=o){let y=l.length===o?l:l.subarray(0,o);return s(o),y}let f=new Uint8Array(o),u=0,h=o;for(;h>0;){let y=e[r],d=Math.min(h,y.length);f.set(d===y.length?y:y.subarray(0,d),u),u+=d,h-=d,s(d)}return f}return{push:o=>{if(o.length===0)return;let c=n+1&t;if(c===r){let l=e.length,f=l*2,u=new Array(f),h=n-r+l&l-1;if(r<n)for(let y=0;y<h;y++)u[y]=e[r+y];else if(h>0){let y=l-r;for(let d=0;d<y;d++)u[d]=e[r+d];for(let d=0;d<n;d++)u[y+d]=e[d]}e=u,t=f-1,r=0,n=h,c=n+1&t}e[n]=o,n=c,i+=o.length},available:()=>i,peek:o=>{if(i<o)return null;if(o===0)return V;let c=e[r];if(c.length>=o)return c.length===o?c:c.subarray(0,o);let l=new Uint8Array(o),f=0,u=r;for(;f<o;){let h=e[u],y=Math.min(o-f,h.length);y===h.length?l.set(h,f):l.set(h.subarray(0,y),f),f+=y,u=u+1&t}return l},discard:o=>{if(o>i)throw new Error("Too many bytes consumed");if(o===0)return;let c=o;for(;c>0;){let l=e[r],f=Math.min(c,l.length);s(f),c-=f}},pull:a}}var de=32,ft=48;function ut(e){let t=me(e,148,8),r=0;for(let n=0;n<e.length;n++)n>=148&&n<156?r+=de:r+=e[n];return t===r}function dt(e){e.fill(de,148,156);let t=0;for(let r of e)t+=r;for(let r=153;r>=148;r--)e[r]=(t&7)+ft,t>>=3;e[154]=0,e[155]=de}var mt=256;function ht(e){let t={};I.encode(e.name).length>100&&Ue(e.name)===null&&(t.path=e.name),e.linkname&&I.encode(e.linkname).length>100&&(t.linkpath=e.linkname),e.uname&&I.encode(e.uname).length>32&&(t.uname=e.uname),e.gname&&I.encode(e.gname).length>32&&(t.gname=e.gname),e.uid!=null&&e.uid>2097151&&(t.uid=String(e.uid)),e.gid!=null&&e.gid>2097151&&(t.gid=String(e.gid)),e.size!=null&&e.size>8589934591&&(t.size=String(e.size)),e.pax&&Object.assign(t,e.pax);let r=Object.entries(t);if(r.length===0)return null;let n=I.encode(r.map(([i,s])=>{let a=`${i}=${s}
4
4
  `,o=I.encode(a).length+1,c=o+String(o).length;return c=o+String(c).length,`${c} ${a}`}).join(""));return{paxHeader:Pe({name:Q.decode(I.encode(`PaxHeader/${e.name}`).slice(0,100)),size:n.length,type:"pax-header",mode:420,mtime:e.mtime,uname:e.uname,gname:e.gname,uid:e.uid,gid:e.gid}),paxBody:n}}function Ue(e){let t=I.encode(e).length;if(t<=100||t>mt)return null;for(let r=e.length-1;r>0;r--){if(e[r]!=="/")continue;let n=e.slice(0,r),i=e.slice(r+1);if(I.encode(n).length<=155&&I.encode(i).length<=100)return{prefix:n,name:i}}return null}function Pe(e){let t=new Uint8Array(512),r=M(e)?0:e.size??0,n=e.name,i="";if(!e.pax?.path){let s=Ue(n);s&&(n=s.name,i=s.prefix)}return P(t,0,100,n),j(t,100,8,e.mode??(e.type==="directory"?493:420)),j(t,108,8,e.uid??0),j(t,116,8,e.gid??0),j(t,124,12,r),j(t,136,12,Math.floor((e.mtime?.getTime()??Date.now())/1e3)),P(t,156,1,at[e.type??"file"]),P(t,157,100,e.linkname),P(t,257,6,"ustar\0"),P(t,263,2,"00"),P(t,265,32,e.uname),P(t,297,32,e.gname),P(t,345,155,i),dt(t),t}function pt(e,t){if(t&&!ut(e))throw new Error("Invalid tar header checksum.");let r=F(e,156,1),n={name:F(e,0,100),mode:me(e,100,8),uid:Y(e,108,8),gid:Y(e,116,8),size:Y(e,124,12),mtime:new Date(Y(e,136,12)*1e3),type:ot[r]||"file",linkname:F(e,157,100)},i=F(e,257,6);return i.trim()==="ustar"&&(n.uname=F(e,265,32),n.gname=F(e,297,32)),i==="ustar"&&(n.prefix=F(e,345,155)),n}var Ie={path:["name",e=>e],linkpath:["linkname",e=>e],size:["size",e=>/^\d+$/.test(e)&&Number.isSafeInteger(+e)?+e:NaN],mtime:["mtime",parseFloat],uid:["uid",e=>parseInt(e,10)],gid:["gid",e=>parseInt(e,10)],uname:["uname",e=>e],gname:["gname",e=>e]};function gt(e){let t=Object.create(null),r=Object.create(null),n=!1,i=0;for(;i<e.length;){let s=e.indexOf(32,i);if(s===-1)break;let a=parseInt(Q.decode(e.subarray(i,s)),10);if(!(a>0))break;let o=i+a,c=Q.decode(e.subarray(s+1,o-1)),l=c.indexOf("=");if(l>0){let f=c.slice(0,l),u=c.slice(l+1);if(r[f]=u,n=!0,Object.hasOwn(Ie,f)){let[h,y]=Ie[f],d=y(u);(typeof d=="string"||!Number.isNaN(d))&&(t[h]=d)}}i=o}return n&&(t.pax=r),t}function Oe(e,t){t.name!==void 0&&(e.name=t.name),t.linkname!==void 0&&(e.linkname=t.linkname),t.size!==void 0&&(e.size=t.size),t.mtime!==void 0&&(e.mtime=new Date(t.mtime*1e3)),t.uid!==void 0&&(e.uid=t.uid),t.gid!==void 0&&(e.gid=t.gid),t.uname!==void 0&&(e.uname=t.uname),t.gname!==void 0&&(e.gname=t.gname),t.pax&&(e.pax=Object.assign({},e.pax??{},t.pax))}function yt(e){switch(e){case"pax-global-header":case"pax-header":return gt;case"gnu-long-name":return t=>({name:F(t,0,t.length)});case"gnu-long-link-name":return t=>({linkname:F(t,0,t.length)});default:return}}function wt(e){let t=Pe(e),r=ht(e);if(!r)return[t];let n=-r.paxBody.length&511,i=n>0?[ct.subarray(0,n)]:[];return[r.paxHeader,r.paxBody,...i,t]}var ue=0,H=1,xt=8*1024*1024,J=new Error("Tar archive is truncated.");function pe(e={}){let t=e.strict??!1,{available:r,peek:n,push:i,discard:s,pull:a}=lt(),o=ue,c=!1,l=!1,f=!1,u=null,h={},y={},d={isEntryActive:()=>o===H,isBodyComplete:()=>!u||u.remaining===0,canFinish:()=>!u||r()>=u.remaining+u.padding,bodyBytes:()=>u&&u.remaining>0?Math.min(u.remaining,r()):0,write(m){if(c)throw new Error("Archive already ended.");i(m)},end(){c=!0},readHeader(){if(o!==ue)throw new Error("Cannot read header while an entry is active");if(!l)for(;!l;){if(r()<512){if(c){if(r()>0&&t)throw J;l=!0;return}return null}let m=n(512);if(Fe(m)){if(r()<512*2){if(c){if(t)throw J;l=!0;return}return null}if(Fe(n(512*2).subarray(512))){s(512*2),l=!0,f=!0;return}if(t)throw new Error("Invalid tar header.");s(512);continue}let p;try{p=pt(m,t)}catch(z){if(t)throw z;s(512);continue}let b=yt(p.type);if(b){if(p.size>xt)throw new Error("Tar metadata entry exceeds maximum size.");let z=p.size+(-p.size&511);if(r()<512+z){if(c&&t)throw J;return null}s(512);let C=b(a(z).subarray(0,p.size));y.pax&&(y={});let A=p.type==="pax-global-header"?h:y;for(let W in C)A[W]=C[W];continue}s(512);let w=p;p.prefix&&(w.name=`${p.prefix}/${w.name}`),Oe(w,h),Oe(w,y);let S=w.size;return M(w)?(S=0,w.size=0):w.name.endsWith("/")&&w.type==="file"&&(w.type=Le,w.size=0),y={},u={header:w,remaining:S,padding:-S&511},o=H,w}},streamBody(m){if(o!==H||!u||u.remaining===0)return 0;let p=Math.min(u.remaining,r());if(p===0)return 0;let b=a(p,m);return u.remaining-=b,b},skipPadding(){if(o!==H||!u)return!0;if(u.remaining>0)throw new Error("Body not fully consumed");return r()<u.padding?!1:(s(u.padding),u=null,o=ue,!0)},skipEntry(){if(o!==H||!u)return!0;let m=Math.min(u.remaining,r());return m>0&&(s(m),u.remaining-=m),u.remaining>0?!1:d.skipPadding()},validateEOF(){if(t){if(!f)throw J;if(r()>0&&a(r()).some(m=>m!==0))throw new Error("Invalid EOF.")}}};return d}function Fe(e){if(e.byteOffset%8===0){let t=new BigUint64Array(e.buffer,e.byteOffset,e.length/8);for(let r=0;r<t.length;r++)if(t[r]!==0n)return!1;return!0}for(let t=0;t<e.length;t++)if(e[t]!==0)return!1;return!0}var bt=new Uint8Array(512*2);function Re(e,t,r){let n=null,i=0,s=!1,a=o=>{let c=new Error(o);throw t(c),c};return{add(o){s&&a("No new tar entries after finalize."),n!==null&&a("Previous entry must be completed before adding a new one");let c=M(o)?0:o.size;(!Number.isSafeInteger(c)||c<0)&&a("Invalid tar entry size.");try{let l=wt({...o,size:c});for(let f of l)e(f);n={...o,size:c},i=0}catch(l){t(l)}},write(o){n||a("No active tar entry."),s&&a("Cannot write data after finalize.");let c=i+o.length;c>n.size&&a(`"${n.name}" exceeds given size of ${n.size} bytes.`);try{i=c,e(o)}catch(l){t(l)}},endEntry(){n||a("No active entry to end."),s&&a("Cannot end entry after finalize.");try{i!==n.size&&a(`Size mismatch for "${n.name}".`);let o=-n.size&511;o>0&&e(new Uint8Array(o)),n=null,i=0}catch(o){throw t(o),o}},finalize(){s&&a("Archive has already been finalized"),n!==null&&a("Cannot finalize while an entry is still active");try{e(bt),s=!0,r&&r()}catch(o){t(o)}}}}function De(){return new CompressionStream("gzip")}function We(){return new DecompressionStream("gzip")}function zt(){let e,t;return{readable:new ReadableStream({start(r){e=r,t=Re(r.enqueue.bind(r),r.error.bind(r),r.close.bind(r))}}),controller:{add(r){let n=M(r);return t.add(r),n&&t.endEntry(),new WritableStream({write(i){t.write(i)},close(){n||t.endEntry()},abort(i){e.error(i)}})},finalize(){t.finalize()},error(r){e.error(r)}}}}async function _e(e){let t=[],r=e.getReader(),n=0;try{for(;;){let{done:a,value:o}=await r.read();if(a)break;t.push(o),n+=o.length}let i=new Uint8Array(n),s=0;for(let a of t)i.set(a,s),s+=a.length;return i}finally{r.releaseLock()}}var Me=e=>e.pipeTo(new WritableStream);function vt(e={}){let t=pe(e),r=e.strict??!1,n=null,i=null,s=!1,a=!1,o=!1,c=!1,l=()=>{try{i?.close()}catch{}i=null},f=d=>{if(!c){c=!0;try{i?.error(d)}catch{}i=null;try{n.error(d)}catch{}n=null}},u=()=>{if(!c){c=!0,l();try{n.close()}catch{}n=null}},h=()=>{if(r)throw new Error("Tar archive is truncated.");u()},y=()=>{if(!(s||c||!n)){s=!0;try{for(;;){if(a){o&&(t.validateEOF(),u());break}if(t.isEntryActive()){if(o&&!t.canFinish()){h();break}if(i){if((i.desiredSize??1)<=0)break;if(t.streamBody(d=>(i.enqueue(d),(i.desiredSize??1)>0))===0&&!t.isBodyComplete()){o&&h();break}}else if(!t.skipEntry()){o&&h();break}if(t.isBodyComplete()&&(l(),!t.skipPadding())){o&&h();break}}else{if((n.desiredSize??0)<0)break;let d=t.readHeader();if(d===null){o&&u();break}if(d===void 0){if(o){t.validateEOF(),u();break}a=!0;break}n.enqueue({header:d,body:new ReadableStream({start(m){d.size===0?m.close():i=m},pull:y,cancel(){i=null,y()}})})}}}catch(d){throw f(d),d}finally{s=!1}}};return{readable:new ReadableStream({start(d){n=d},pull:y,cancel(d){d!==void 0?f(d):u()}},{highWaterMark:2}),writable:new WritableStream({write(d){try{if(a&&r&&d.some(m=>m!==0))throw new Error("Invalid EOF.");t.write(d),y()}catch(m){throw f(m),m}},close(){try{o=!0,t.end(),y()}catch(d){throw f(d),d}},abort(d){f(d)}})}}async function je(e){let{readable:t,controller:r}=zt();return await(async()=>{for(let n of e){let i=r.add(n.header),s="body"in n?n.body:n.data;if(!s){await i.close();continue}if(s instanceof ReadableStream)await s.pipeTo(i);else if(s instanceof Blob)await s.stream().pipeTo(i);else try{let a=await Ne(s);if(a.length>0){let o=i.getWriter();await o.write(a),await o.close()}else await i.close()}catch{throw new TypeError(`Unsupported content type for entry "${n.header.name}".`)}}})().then(()=>r.finalize()).catch(n=>r.error(n)),_e(t)}async function He(e,t={}){if(!(e instanceof ReadableStream))return kt(e instanceof Uint8Array?e:new Uint8Array(e),t);let r=[],n=e.pipeThrough(vt(t));for await(let i of n){let s;try{s=he(i.header,t)}catch(a){throw await i.body.cancel(),a}if(s===null){await Me(i.body);continue}M(s)?(await Me(i.body),r.push({header:s})):r.push({header:s,data:await _e(i.body)})}return r}function kt(e,t){let r=pe(t),n=t.strict??!1,i=[];for(r.write(e),r.end();;){let s=r.readHeader();if(s===void 0)break;if(s===null){if(n)throw new Error("Tar archive is truncated.");break}let a=he(s,t);if(a===null){let h=r.skipEntry();if(!h&&n)throw new Error("Tar archive is truncated.");if(!h)break;continue}if(M(a)){let h=r.skipEntry();if(!h&&n)throw new Error("Tar archive is truncated.");if(i.push({header:a}),!h)break;continue}let o=s.size;if(o<0||!r.canFinish()){if(n)throw new Error("Tar archive is truncated.");o=r.bodyBytes()}let c=new Uint8Array(o),l=0;r.streamBody(h=>(c.set(h,l),l+=h.length,!0));let f=r.isBodyComplete(),u=!0;if(f&&(u=r.skipPadding(),!u&&n))throw new Error("Tar archive is truncated.");if(i.push({header:a,data:c}),!f||!u)break}return r.validateEOF(),i}import Lt from"seek-bzip";var Ct=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let r=t<<24;for(let n=0;n<8;n++)r=r&2147483648?r<<1^79764919:r<<1;e[t]=r>>>0}return e})();function At(e,t){return(e<<8^Ct[(e>>>24^t)&255])>>>0}var ge=class{maxOutputBytes;buffer=[];current=0;bitCount=0;constructor(t=Number.MAX_SAFE_INTEGER){if(this.maxOutputBytes=t,!Number.isSafeInteger(t)||t<0)throw new Error("Invalid bzip2 output limit")}pushByte(t){if(this.buffer.length>=this.maxOutputBytes)throw new Error(`bzip2 output exceeds limit (${this.maxOutputBytes} bytes)`);this.buffer.push(t)}writeBits(t,r){for(let n=t-1;n>=0;n--)this.current=this.current<<1|r>>>n&1,this.bitCount++,this.bitCount===8&&(this.pushByte(this.current),this.current=0,this.bitCount=0)}writeBit(t){this.current=this.current<<1|t&1,this.bitCount++,this.bitCount===8&&(this.pushByte(this.current),this.current=0,this.bitCount=0)}finish(){return this.bitCount>0&&this.pushByte(this.current<<8-this.bitCount),new Uint8Array(this.buffer)}};function Et(e){let t=[],r=0;for(;r<e.length;){let n=e[r],i=1;for(;r+i<e.length&&e[r+i]===n&&i<255;)i++;i>=4?(t.push(n,n,n,n),t.push(i-4),r+=i):(t.push(n),r++)}return new Uint8Array(t)}function St(e){let t=e.length;if(t===0)return{transformed:new Uint8Array(0),pointer:0};let r=Bt(e),n=new Uint8Array(t),i=0;for(let s=0;s<t;s++)r[s]===0?(i=s,n[s]=e[t-1]):n[s]=e[r[s]-1];return{transformed:n,pointer:i}}function Bt(e){let t=e.length,r=new Int32Array(t),n=new Int32Array(t);for(let i=0;i<t;i++)r[i]=i,n[i]=e[i];for(let i=1;i<t;i*=2){let s=n.slice();r.sort((a,o)=>s[a]!==s[o]?s[a]-s[o]:s[(a+i)%t]-s[(o+i)%t]),n[r[0]]=0;for(let a=1;a<t;a++)s[r[a]]===s[r[a-1]]&&s[(r[a]+i)%t]===s[(r[a-1]+i)%t]?n[r[a]]=n[r[a-1]]:n[r[a]]=n[r[a-1]]+1;if(n[r[t-1]]===t-1)break}return r}function $t(e,t){let r=[];for(let a=0;a<256;a++)t[a]&&r.push(a);let n=new Array(256).fill(-1);for(let a=0;a<r.length;a++)n[r[a]]=a;let i=new Uint16Array(e.length),s=r.slice();for(let a=0;a<e.length;a++){let o=e[a],c=0;for(;s[c]!==o;)c++;if(i[a]=c,c>0){let l=s[c];for(let f=c;f>0;f--)s[f]=s[f-1];s[0]=l}}return{encoded:i,length:e.length}}function Tt(e,t,r){let s=r+1,a=[],o=0;for(;o<t;)if(e[o]===0){let l=0;for(;o<t&&e[o]===0;)l++,o++;let f=l;for(;f>0;)f--,f&1?a.push(1):a.push(0),f>>>=1}else a.push(e[o]+1),o++;a.push(s);let c=new Uint16Array(a.length);for(let l=0;l<a.length;l++)c[l]=a[l];return{symbols:c,length:a.length,eob:s}}function Xe(e,t,r){if(t<=1){let l=new Array(e.length).fill(0);for(let f=0;f<e.length;f++)e[f]>0&&(l[f]=1);return{codeLengths:l,maxLen:1,minLen:1}}let n=[];for(let l=0;l<e.length;l++)e[l]>0&&n.push({freq:e[l],symbol:l,left:null,right:null});if(n.length===0)return{codeLengths:new Array(e.length).fill(0),maxLen:0,minLen:0};if(n.length===1){let l=new Array(e.length).fill(0);return l[n[0].symbol]=1,{codeLengths:l,maxLen:1,minLen:1}}for(;n.length>1;){n.sort((u,h)=>u.freq-h.freq);let l=n.shift(),f=n.shift();n.push({freq:l.freq+f.freq,symbol:-1,left:l,right:f})}let i=new Array(e.length).fill(0);function s(l,f){if(!l.left&&!l.right){i[l.symbol]=f;return}l.left&&s(l.left,f+1),l.right&&s(l.right,f+1)}s(n[0],0);let a=!0;for(;a;){a=!1;for(let l=0;l<i.length;l++)i[l]>r&&(i[l]=r,a=!0);if(a){let l=0;for(let f=0;f<i.length;f++)i[f]>0&&(l+=1/(1<<i[f]));if(l>1)for(let f=1;f<r&&l>1;f++)for(let u=0;u<i.length&&l>1;u++)i[u]===f&&(i[u]++,l-=1/(1<<f)-1/(1<<f+1));a=!1;for(let f=0;f<i.length;f++)if(i[f]>r){a=!0;break}}}let o=r,c=0;for(let l=0;l<i.length;l++)i[l]>0&&(i[l]<o&&(o=i[l]),i[l]>c&&(c=i[l]));return{codeLengths:i,maxLen:c,minLen:o}}function It(e,t){let r=new Array(t).fill(0),n=e.slice(0,t),i=Math.max(...n,0),s=new Array(i+1).fill(0);for(let c=0;c<t;c++)n[c]>0&&s[n[c]]++;let a=new Array(i+1).fill(0),o=0;for(let c=1;c<=i;c++)o=o+s[c-1]<<1,a[c]=o;for(let c=0;c<t;c++)n[c]>0&&(r[c]=a[n[c]]++);return{codes:r,lengths:n}}function Ot(e,t,r){e.writeBits(24,3227993),e.writeBits(24,2511705),e.writeBits(32,r),e.writeBit(0);let n=Et(t),{transformed:i,pointer:s}=St(n);e.writeBits(24,s);let a=new Array(256).fill(!1);for(let g=0;g<i.length;g++)a[i[g]]=!0;let o=new Array(16).fill(!1);for(let g=0;g<16;g++)for(let x=0;x<16;x++)if(a[g*16+x]){o[g]=!0;break}for(let g=0;g<16;g++)e.writeBit(o[g]?1:0);for(let g=0;g<16;g++)if(o[g])for(let x=0;x<16;x++)e.writeBit(a[g*16+x]?1:0);let c=0;for(let g=0;g<256;g++)a[g]&&c++;let{encoded:l,length:f}=$t(i,a),{symbols:u,length:h}=Tt(l,f,c),y=c+2,d=50,m=Math.ceil(h/d),p;h<200?p=2:h<600?p=3:h<1200?p=4:h<2400?p=5:p=6,p>m&&(p=Math.max(2,m));let b=[];for(let g=0;g<p;g++)b.push(new Array(y).fill(0));let w=new Int32Array(m);for(let g=0;g<m;g++)w[g]=g%p;for(let g=0;g<m;g++){let x=g*d,v=Math.min(x+d,h),T=w[g];for(let E=x;E<v;E++)b[T][u[E]]++}function S(g){for(let x=0;x<y;x++)g[x]<1&&(g[x]=1)}let z=[];for(let g=0;g<p;g++)S(b[g]),z.push(Xe(b[g],y,20));for(let g=0;g<4;g++){for(let x=0;x<p;x++)b[x].fill(0);for(let x=0;x<m;x++){let v=x*d,T=Math.min(v+d,h),E=0,Z=1/0;for(let U=0;U<p;U++){let oe=0;for(let ce=v;ce<T;ce++)oe+=z[U].codeLengths[u[ce]]||20;oe<Z&&(Z=oe,E=U)}w[x]=E;for(let U=v;U<T;U++)b[E][u[U]]++}for(let x=0;x<p;x++)S(b[x]),z[x]=Xe(b[x],y,20)}e.writeBits(3,p),e.writeBits(15,m);let C=[],A=[];for(let g=0;g<p;g++)A.push(g);for(let g=0;g<m;g++){let x=w[g],v=0;for(;A[v]!==x;)v++;if(C.push(v),v>0){let T=A[v];for(let E=v;E>0;E--)A[E]=A[E-1];A[0]=T}}for(let g=0;g<m;g++){for(let x=0;x<C[g];x++)e.writeBit(1);e.writeBit(0)}for(let g=0;g<p;g++){let x=z[g].codeLengths,v=x[0];e.writeBits(5,v);for(let T=0;T<y;T++){let E=x[T];for(;v<E;)e.writeBit(1),e.writeBit(0),v++;for(;v>E;)e.writeBit(1),e.writeBit(1),v--;e.writeBit(0)}}for(let g=0;g<p;g++){let{codes:x,lengths:v}=It(z[g].codeLengths,y);z[g]=Object.assign(z[g],{_codes:x,_lengths:v})}let W=0,G=0;for(let g=0;g<h;g++){(G===0||G>=d)&&(g>0&&W++,G=0);let x=w[W],v=z[x],T=u[g],E=v._lengths[T],Z=v._codes[T];E>0&&e.writeBits(E,Z),G++}}var Ft=10*1024*1024;function Ge(e,t=9,r=Ft,n=Number.MAX_SAFE_INTEGER){if(t<1||t>9)throw new Error("Block size level must be 1-9");if(e.length>r)throw new Error(`Input too large for bzip2 compression (${e.length} bytes, max ${r})`);let i=t*1e5,s=new ge(n);s.writeBits(8,66),s.writeBits(8,90),s.writeBits(8,104),s.writeBits(8,48+t);let a=0,o=0;for(;o<e.length;){let c=Math.min(o+i,e.length),l=e.subarray(o,c),f=4294967295;for(let u=0;u<l.length;u++)f=At(f,l[u]);f=~f>>>0,a=(a<<1|a>>>31)>>>0,a=(a^f)>>>0,Ot(s,l,f),o=c}return s.writeBits(24,1536581),s.writeBits(24,3690640),s.writeBits(32,a),s.finish()}var ee=null,te=null;async function Ze(){if(ee)return ee;if(te)throw te;try{return ee=await le.runTrustedAsync(()=>import("node-liblzma")),ee}catch{throw te=new Error("xz compression requires node-liblzma which failed to load. Install liblzma-dev (apt) or xz (brew) and reinstall dependencies."),te}}var re=null,ne=null;async function qe(){if(re)return re;if(ne)throw ne;try{return re=await le.runTrustedAsync(()=>import("@mongodb-js/zstd")),re}catch{throw ne=new Error("zstd compression requires @mongodb-js/zstd which is not installed. Install it with: npm install @mongodb-js/zstd"),ne}}var ye=1024*1024*1024,$=512,Nt=1e6;function X(e,t){let r=e??t;if(!Number.isSafeInteger(r)||r<=0)throw new Error("Archive limits must be positive safe integers");return r}function O(e){return{maxArchiveSize:X(e?.maxArchiveSize,ye),maxEntries:X(e?.maxEntries,Nt),maxEntrySize:X(e?.maxEntrySize,ye),maxCompressedSize:X(e?.maxCompressedSize,e?.maxArchiveSize??ye),maxExpansionRatio:X(e?.maxExpansionRatio,1e4),signal:e?.signal,executionScope:e?.executionScope,allowTrustedWholeBufferCodecs:e?.allowTrustedWholeBufferCodecs??!0}}function Ut(e,t){if(e.length>t.maxEntries)throw new Error(`Too many archive entries (max ${t.maxEntries})`);let r=i=>{if(!Number.isSafeInteger(i)||i<0||i>t.maxArchiveSize-n)throw new Error(`Archive too large (max ${t.maxArchiveSize} bytes)`);n+=i},n=$*2;for(let i of e){t.signal?.throwIfAborted();let s=i.isDirectory||i.isSymlink?0:typeof i.content=="string"?q(i.content):i.content?.length??0;if(s>t.maxEntrySize)throw new Error(`Archive entry too large (max ${t.maxEntrySize} bytes)`);let a=i.isDirectory&&!i.name.endsWith("/")?`${i.name}/`:i.name,o=q(a),c=q(i.linkTarget??"");if(o>t.maxArchiveSize||c>t.maxArchiveSize)throw new Error(`Archive too large (max ${t.maxArchiveSize} bytes)`);let l=0;if(o>100&&(l+=o+64),c>100&&(l+=c+64),!Number.isSafeInteger(l))throw new Error(`Archive too large (max ${t.maxArchiveSize} bytes)`);let f=Math.ceil(s/$)*$;if(r($+f),l>0){let u=Math.ceil(l/$)*$;r($+u)}}return n}function ie(e,t,r){return e.executionScope?.reserveBytes(t,r,`tar: ${t}`)}function Pt(e){let t=e.subarray(124,136);if((t[0]&128)!==0){let i=t[0]&127;for(let s=1;s<t.length;s++)if(i=i*256+t[s],!Number.isSafeInteger(i))return;return i}let r=new TextDecoder("ascii").decode(t).replace(/\0.*$/,"").trim();if(r==="")return 0;if(!/^[0-7]+$/.test(r))return;let n=Number.parseInt(r,8);return Number.isSafeInteger(n)?n:void 0}function Rt(e,t){let r=0,n=0;for(;r+$<=e.length;){t.signal?.throwIfAborted();let i=e.subarray(r,r+$);if(i.every(o=>o===0))return;if(n++,n>t.maxEntries)return`Too many entries (max ${t.maxEntries})`;let s=Pt(i);if(s===void 0)return"Invalid tar archive format";if(s>t.maxEntrySize)return`Archive entry too large (max ${t.maxEntrySize} bytes)`;let a=Math.ceil(s/$)*$;if(!Number.isSafeInteger(a)||(r+=$+a,r>e.length))return"Invalid tar archive format"}return r===e.length?void 0:"Invalid tar archive format"}function Mt(e){let t="file";e.isDirectory?t="directory":e.isSymlink&&(t="symlink");let r=e.name;e.isDirectory&&!r.endsWith("/")&&(r+="/");let n;e.content!==void 0&&(typeof e.content=="string"?n=new TextEncoder().encode(e.content):n=e.content);let i=e.isDirectory||e.isSymlink?0:n?.length??0;return{header:{name:r,mode:e.mode??(e.isDirectory?493:420),uid:e.uid??0,gid:e.gid??0,size:i,mtime:e.mtime??new Date,type:t,linkname:e.linkTarget??"",uname:"user",gname:"user"},body:n}}async function R(e,t){let r=O(t),n=Ut(e,r),i=ie(r,"archive construction",n);try{let s=e.map(Mt),a=await je(s);if(r.signal?.throwIfAborted(),a.length>r.maxArchiveSize)throw new Error(`Archive too large (max ${r.maxArchiveSize} bytes)`);return a}finally{i?.release()}}async function Ye(e,t){let r=O(t),n=await R(e,r),i=ie(r,"gzip input",n.byteLength),s=new _({maxInputBytes:r.maxArchiveSize,maxOutputBytes:r.maxCompressedSize,signal:r.signal,label:"gzip archive"});s.acceptInput(n.length);let c=new ReadableStream({start(h){h.enqueue(n),h.close()}}).pipeThrough(De()).getReader(),l=[],f=[],u=0;try{for(;;){let{done:y,value:d}=await c.read();if(y)break;try{s.acceptOutput(d.length);let m=ie(r,"gzip chunks",d.byteLength);m&&f.push(m)}catch(m){throw await c.cancel(),m}u+=d.length,l.push(d)}let h=ie(r,"gzip result",u);try{let y=new Uint8Array(u),d=0;for(let m of l)y.set(m,d),d+=m.length;return y}finally{h?.release()}}finally{for(let h of f)h.release();i?.release()}}async function L(e,t){let r=O(t);if(e.length>r.maxArchiveSize)return{entries:[],error:`Archive too large (max ${r.maxArchiveSize} bytes)`};if(e.length<$||e.length%$!==0)return{entries:[],error:"Invalid tar archive format"};let n=Rt(e,r);if(n)return{entries:[],error:n};try{let i=await He(e),s=[];for(let a of i){if(r.signal?.throwIfAborted(),s.length>=r.maxEntries)return{entries:[],error:`Too many entries (max ${r.maxEntries})`};let o=a.data??new Uint8Array(0);if(a.header.size>r.maxEntrySize||o.length>r.maxEntrySize)return{entries:[],error:`Archive entry too large (max ${r.maxEntrySize} bytes)`};let c="file";switch(a.header.type){case"directory":c="directory";break;case"symlink":c="symlink";break;case"link":c="hardlink";break;case"file":c="file";break;default:c="other"}s.push({name:a.header.name,mode:a.header.mode??420,uid:a.header.uid??0,gid:a.header.gid??0,size:a.header.size,mtime:a.header.mtime??new Date,type:c,linkTarget:a.header.linkname||void 0,content:o})}return{entries:s}}catch(i){let s=i instanceof Error?i.message:"Unknown error";return{entries:[],error:s}}}async function we(e,t){let r=O(t);if(e.length>r.maxCompressedSize)return{entries:[],error:`Archive too large (max ${r.maxCompressedSize} bytes)`};try{let n=new _({maxInputBytes:r.maxCompressedSize,maxOutputBytes:r.maxArchiveSize,maxExpansionRatio:r.maxExpansionRatio,signal:r.signal,label:"gzip archive"});n.acceptInput(e.length);let a=new ReadableStream({start(u){u.enqueue(e),u.close()}}).pipeThrough(We()).getReader(),o=[],c=0;for(;;){let{done:u,value:h}=await a.read();if(u)break;try{n.acceptOutput(h.length)}catch(y){throw await a.cancel(),y}c+=h.length,o.push(h)}let l=new Uint8Array(c),f=0;for(let u of o)l.set(u,f),f+=u.length;return L(l,r)}catch(n){let i=n instanceof Error?n.message:"Unknown error";return{entries:[],error:`Decompression failed: ${i}`}}}function xe(e){return e.length>=2&&e[0]===31&&e[1]===139}function be(e){return e.length>=3&&e[0]===66&&e[1]===90&&e[2]===104}function ze(e){return e.length>=6&&e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0}async function Dt(e,t){let r=new _({maxInputBytes:t.maxCompressedSize,maxOutputBytes:t.maxArchiveSize,maxExpansionRatio:t.maxExpansionRatio,signal:t.signal,label:"bzip2 archive"});r.acceptInput(e.length);let n=Math.min(64*1024,t.maxArchiveSize),i=[],s=Buffer.allocUnsafe(n),a=0,o=0,c={writeByte(l){r.acceptOutput(1),a===s.length&&(i.push(s),s=Buffer.allocUnsafe(n),a=0),s[a++]=l,o++}};return Lt.decode(Buffer.from(e),c),a>0&&i.push(s.subarray(0,a)),new Uint8Array(Buffer.concat(i,o))}async function Wt(e,t){let r=new _({maxInputBytes:t.maxArchiveSize,maxOutputBytes:t.maxCompressedSize,signal:t.signal,label:"bzip2 archive"});r.acceptInput(e.length);let n=await Ge(e,9,t.maxArchiveSize,t.maxCompressedSize);return r.acceptOutput(n.length),n}async function _t(e){let r=(await Ze()).unxzSync(Buffer.from(e));return new Uint8Array(r)}async function jt(e){let r=(await Ze()).xzSync(Buffer.from(e));return new Uint8Array(r)}async function Ke(e,t){let r=O(t),n=await R(e,r);return Wt(n,r)}async function Je(e,t){let r=O(t);if(t?.allowNativeCodecs===!1||!r.allowTrustedWholeBufferCodecs)throw new Error("xz compression is disabled by configuration. Enable native and trusted whole-buffer codecs to use it.");let n=await R(e,r),i=await jt(n);if(r.signal?.throwIfAborted(),i.length>r.maxCompressedSize)throw new Error(`xz archive: output exceeds limit (${r.maxCompressedSize} bytes)`);return i}async function ve(e,t){let r=O({...t,maxArchiveSize:t?.maxDecompressedSize??t?.maxArchiveSize});if(e.length>r.maxCompressedSize)return{entries:[],error:`Archive too large (max ${r.maxCompressedSize} bytes)`};try{let n=await Dt(e,r);return L(n,r)}catch(n){let i=n instanceof Error?n.message:"Unknown error";return i===`bzip2 archive: output exceeds limit (${r.maxArchiveSize} bytes)`?{entries:[],error:`Decompressed archive too large (max ${r.maxArchiveSize} bytes)`}:{entries:[],error:i}}}async function ke(e,t){let r=O(t);if(t?.allowNativeCodecs===!1||!r.allowTrustedWholeBufferCodecs)return{entries:[],error:"xz decompression is disabled by configuration. Enable native and trusted whole-buffer codecs, or decompress the archive externally before extraction."};if(e.length>r.maxCompressedSize)return{entries:[],error:`Archive too large (max ${r.maxCompressedSize} bytes)`};try{let n=await _t(e);return r.signal?.throwIfAborted(),n.length>r.maxArchiveSize?{entries:[],error:`Trusted xz codec produced data over limit (${r.maxArchiveSize} bytes)`}:L(n,r)}catch(n){let i=n instanceof Error?n.message:"Unknown error";return{entries:[],error:i}}}function Ce(e){return e.length>=4&&e[0]===40&&e[1]===181&&e[2]===47&&e[3]===253}async function Ht(e){let r=await(await qe()).compress(Buffer.from(e),3);return new Uint8Array(r)}async function Xt(e){let r=await(await qe()).decompress(Buffer.from(e));return new Uint8Array(r)}async function Ve(e,t){let r=O(t);if(t?.allowNativeCodecs===!1||!r.allowTrustedWholeBufferCodecs)throw new Error("zstd compression is disabled by configuration. Enable native and trusted whole-buffer codecs to use it.");let n=await R(e,r),i=await Ht(n);if(r.signal?.throwIfAborted(),i.length>r.maxCompressedSize)throw new Error(`zstd archive: output exceeds limit (${r.maxCompressedSize} bytes)`);return i}async function Ae(e,t){let r=O(t);if(t?.allowNativeCodecs===!1||!r.allowTrustedWholeBufferCodecs)return{entries:[],error:"zstd decompression is disabled by configuration. Enable native and trusted whole-buffer codecs, or decompress the archive externally before extraction."};if(e.length>r.maxCompressedSize)return{entries:[],error:`Archive too large (max ${r.maxCompressedSize} bytes)`};try{let n=await Xt(e);return r.signal?.throwIfAborted(),n.length>r.maxArchiveSize?{entries:[],error:`Trusted zstd codec produced data over limit (${r.maxArchiveSize} bytes)`}:L(n,r)}catch(n){let i=n instanceof Error?n.message:"Unknown error";return{entries:[],error:i}}}function Qe(e){let t=e.length>0&&e[0]!==""&&!e[0].startsWith("-")?Gt(e):e,r={create:!1,append:!1,update:!1,extract:!1,list:!1,file:"",autoCompress:!1,gzip:!1,bzip2:!1,xz:!1,zstd:!1,verbose:!1,toStdout:!1,keepOldFiles:!1,touch:!1,directory:"",preserve:!1,absoluteNames:!1,strip:0,exclude:[],filesFrom:"",excludeFrom:"",wildcards:!1},n=[],i=0;for(;i<t.length;){let s=t[i];if(s.startsWith("-")&&!s.startsWith("--")&&s.length>2){if(/^-\d+$/.test(s)){n.push(s),i++;continue}for(let a=1;a<s.length;a++){let o=s[a];switch(o){case"c":r.create=!0;break;case"r":r.append=!0;break;case"u":r.update=!0;break;case"x":r.extract=!0;break;case"t":r.list=!0;break;case"a":r.autoCompress=!0;break;case"z":r.gzip=!0;break;case"j":r.bzip2=!0;break;case"J":r.xz=!0;break;case"v":r.verbose=!0;break;case"O":r.toStdout=!0;break;case"k":r.keepOldFiles=!0;break;case"m":r.touch=!0;break;case"p":r.preserve=!0;break;case"P":r.absoluteNames=!0;break;case"f":if(a<s.length-1)r.file=s.substring(a+1),a=s.length;else{if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'f'
5
5
  `,exitCode:2}};r.file=t[i]}break;case"C":if(a<s.length-1)r.directory=s.substring(a+1),a=s.length;else{if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'C'
6
6
  `,exitCode:2}};r.directory=t[i]}break;case"T":if(a<s.length-1)r.filesFrom=s.substring(a+1),a=s.length;else{if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'T'