just-bash 3.6.0 → 3.6.1

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 (887) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +6 -0
  3. package/dist/bin/chunks/awk2-EPZ2CEQT.js +3 -0
  4. package/dist/bin/chunks/base64-D7ZXJQN6.js +3 -0
  5. package/dist/bin/chunks/bash-4Q4RMIZL.js +3 -0
  6. package/dist/bin/chunks/cat-AST5Y57Y.js +3 -0
  7. package/dist/bin/chunks/chmod-BFP7P5CD.js +3 -0
  8. package/dist/bin/chunks/chunk-26O2G5LX.js +34 -0
  9. package/dist/bin/chunks/chunk-2RDKEB6Z.js +15 -0
  10. package/dist/bin/chunks/chunk-35U2THFB.js +3 -0
  11. package/dist/bin/chunks/chunk-3F7UWBEM.js +17 -0
  12. package/dist/bin/chunks/chunk-3WLAERUX.js +3 -0
  13. package/dist/bin/chunks/chunk-3WZIZUMC.js +8 -0
  14. package/dist/bin/chunks/chunk-4ARWO6Y3.js +4 -0
  15. package/dist/bin/chunks/chunk-4HVMRZ5N.js +8 -0
  16. package/dist/bin/chunks/chunk-5AS7PRVN.js +34 -0
  17. package/dist/bin/chunks/chunk-5GYAEVIB.js +10 -0
  18. package/dist/bin/chunks/chunk-5IPYW47P.js +27 -0
  19. package/dist/bin/chunks/chunk-5ZTIV6TI.js +20 -0
  20. package/dist/bin/chunks/chunk-6C2YS7G6.js +14 -0
  21. package/dist/bin/chunks/chunk-74MYVPDY.js +3 -0
  22. package/dist/bin/chunks/chunk-74UP5NWP.js +3 -0
  23. package/dist/bin/chunks/chunk-7DPD5PK3.js +3 -0
  24. package/dist/bin/chunks/chunk-7LJGZPVP.js +18 -0
  25. package/dist/bin/chunks/chunk-7NEXHFSS.js +3 -0
  26. package/dist/bin/chunks/chunk-7XFMCB5C.js +21 -0
  27. package/dist/bin/chunks/chunk-A53Y4KDG.js +7 -0
  28. package/dist/bin/chunks/chunk-AALAYQ6J.js +17 -0
  29. package/dist/bin/chunks/chunk-AM4WIHAG.js +10 -0
  30. package/dist/bin/chunks/chunk-BC5OXEFJ.js +3 -0
  31. package/dist/bin/chunks/chunk-C5ABXV4P.js +15 -0
  32. package/dist/bin/chunks/chunk-CT6P7ILU.js +3 -0
  33. package/dist/bin/chunks/chunk-CYHG3NVG.js +9 -0
  34. package/dist/bin/chunks/chunk-D7PDAJWE.js +7 -0
  35. package/dist/bin/chunks/chunk-DB3G3UVZ.js +5 -0
  36. package/dist/bin/chunks/chunk-EIUU35ZP.js +37 -0
  37. package/dist/bin/chunks/chunk-EMHJNKV5.js +20 -0
  38. package/dist/bin/chunks/chunk-EPWMLTS6.js +9 -0
  39. package/dist/bin/chunks/chunk-F4QFFLWZ.js +8 -0
  40. package/dist/bin/chunks/chunk-F5R5O2Y6.js +9 -0
  41. package/dist/bin/chunks/chunk-FBEYY2HM.js +13 -0
  42. package/dist/bin/chunks/chunk-FIJBWMXU.js +12 -0
  43. package/dist/bin/chunks/chunk-FMVH4N2P.js +5 -0
  44. package/dist/bin/chunks/chunk-G6W2HMNY.js +7 -0
  45. package/dist/bin/chunks/chunk-GFI5BHZX.js +3 -0
  46. package/dist/bin/chunks/chunk-GJAVHEWO.js +143 -0
  47. package/dist/bin/chunks/chunk-GUVSOVQU.js +8 -0
  48. package/dist/bin/chunks/chunk-H22PAKR6.js +3 -0
  49. package/dist/bin/chunks/chunk-HXOJHK2Z.js +8 -0
  50. package/dist/bin/chunks/chunk-IAAYIH44.js +3 -0
  51. package/dist/bin/chunks/chunk-J7W2CRXT.js +7 -0
  52. package/dist/bin/chunks/chunk-JNWWOKCN.js +6 -0
  53. package/dist/bin/chunks/chunk-JQLGE4OW.js +22 -0
  54. package/dist/bin/chunks/chunk-K3U4M4MF.js +7 -0
  55. package/dist/bin/chunks/chunk-KRXYOWIP.js +12 -0
  56. package/dist/bin/chunks/chunk-L4L2QFS4.js +10 -0
  57. package/dist/bin/chunks/chunk-LU6ZEQNN.js +13 -0
  58. package/dist/bin/chunks/chunk-MLMKRR7L.js +12 -0
  59. package/dist/bin/chunks/chunk-MVN5WALS.js +7 -0
  60. package/dist/bin/chunks/chunk-MYOGTYIH.js +22 -0
  61. package/dist/bin/chunks/chunk-NF5LHCVV.js +275 -0
  62. package/dist/bin/chunks/chunk-OUGDZVL6.js +10 -0
  63. package/dist/bin/chunks/chunk-QCNQD6ME.js +11 -0
  64. package/dist/bin/chunks/chunk-QIDBJNMB.js +3 -0
  65. package/dist/bin/chunks/chunk-QKTQYL37.js +9 -0
  66. package/dist/bin/chunks/chunk-R6CMNMNX.js +22 -0
  67. package/dist/bin/chunks/chunk-RCP3WQND.js +7 -0
  68. package/dist/bin/chunks/chunk-RJG4JS32.js +6 -0
  69. package/dist/bin/chunks/chunk-SIMSIBUA.js +13 -0
  70. package/dist/bin/chunks/chunk-TNB7M24H.js +87 -0
  71. package/dist/bin/chunks/chunk-TU6P6AC2.js +4 -0
  72. package/dist/bin/chunks/chunk-TX4WSLXK.js +101 -0
  73. package/dist/bin/chunks/chunk-U4UY6P77.js +3 -0
  74. package/dist/bin/chunks/chunk-U5BNATW4.js +3 -0
  75. package/dist/bin/chunks/chunk-U7VJCJQR.js +16 -0
  76. package/dist/bin/chunks/chunk-VJE2PQW6.js +15 -0
  77. package/dist/bin/chunks/chunk-W4ENG3BR.js +44 -0
  78. package/dist/bin/chunks/chunk-XUFO4QPW.js +65 -0
  79. package/dist/bin/chunks/chunk-XVKL2UZA.js +4 -0
  80. package/dist/bin/chunks/chunk-YCUNLSHF.js +12 -0
  81. package/dist/bin/chunks/chunk-YDH7Q5WV.js +6 -0
  82. package/dist/bin/chunks/chunk-YDWLU56G.js +26 -0
  83. package/dist/bin/chunks/chunk-YILPYZYP.js +16 -0
  84. package/dist/bin/chunks/chunk-YZQ4SVJV.js +13 -0
  85. package/dist/bin/chunks/chunk-ZKLKNN6B.js +3 -0
  86. package/dist/bin/chunks/column-EGAQ7QMC.js +3 -0
  87. package/dist/bin/chunks/comm-JEJ6GWEA.js +3 -0
  88. package/dist/bin/chunks/cp-7AH7TSQ6.js +3 -0
  89. package/dist/bin/chunks/curl-7FCZQCFU.js +31 -0
  90. package/dist/bin/chunks/cut-OVTLUT2B.js +3 -0
  91. package/dist/bin/chunks/date-MKP5YWWY.js +3 -0
  92. package/dist/bin/chunks/diff-R6QTSWD2.js +3 -0
  93. package/dist/bin/chunks/du-M2PB5NUH.js +3 -0
  94. package/dist/bin/chunks/env-EUSAZGWO.js +3 -0
  95. package/dist/bin/chunks/expand-B4CPOZN5.js +3 -0
  96. package/dist/bin/chunks/expr-AQBMSEFL.js +3 -0
  97. package/dist/bin/chunks/file-22CVQBNS.js +3 -0
  98. package/dist/bin/chunks/find-QYLHUYOP.js +3 -0
  99. package/dist/bin/chunks/flag-coverage-CTPK5ZWJ.js +3 -0
  100. package/dist/bin/chunks/fold-E6A5I4DW.js +3 -0
  101. package/dist/bin/chunks/grep-HI55D7F7.js +3 -0
  102. package/dist/bin/chunks/gzip-2GJMVXCF.js +3 -0
  103. package/dist/bin/chunks/head-ZQIB2GSI.js +3 -0
  104. package/dist/bin/chunks/html-to-markdown-7ZNLM4SQ.js +3 -0
  105. package/dist/bin/chunks/join-KCYMLQ3V.js +3 -0
  106. package/dist/bin/chunks/jq-KNI4FJIL.js +3 -0
  107. package/dist/bin/chunks/js-exec-OWDAX677.js +1617 -0
  108. package/dist/bin/chunks/ls-QCAGDEDW.js +3 -0
  109. package/dist/bin/chunks/md5sum-OPJ77ZY7.js +3 -0
  110. package/dist/bin/chunks/mkdir-3XFSFVPC.js +3 -0
  111. package/dist/bin/chunks/mktemp-5FA55IJS.js +3 -0
  112. package/dist/bin/chunks/mv-UASF6NAX.js +3 -0
  113. package/dist/bin/chunks/nl-HUDE6DQC.js +3 -0
  114. package/dist/bin/chunks/od-CECQKF5P.js +3 -0
  115. package/dist/bin/chunks/paste-SH5RZ4ZO.js +3 -0
  116. package/dist/bin/chunks/printf-PQKUEWX5.js +3 -0
  117. package/dist/bin/chunks/python3-UE36ZXQT.js +23 -0
  118. package/dist/bin/chunks/readlink-4Z75K3AI.js +3 -0
  119. package/dist/bin/chunks/rev-6SA3VC3J.js +3 -0
  120. package/dist/bin/chunks/rg-ULWB5MQG.js +3 -0
  121. package/dist/bin/chunks/rm-NPIAQT6U.js +3 -0
  122. package/dist/bin/chunks/rmdir-57J3AGQU.js +3 -0
  123. package/dist/bin/chunks/sed-XV7BZPKI.js +3 -0
  124. package/dist/bin/chunks/seq-ZVBT2JEI.js +3 -0
  125. package/dist/bin/chunks/sha1sum-JGOB5K4J.js +3 -0
  126. package/dist/bin/chunks/sha256sum-S5DS6Q6N.js +3 -0
  127. package/dist/bin/chunks/sort-UOMFLGRW.js +3 -0
  128. package/dist/bin/chunks/split-IBL3NIVH.js +3 -0
  129. package/dist/bin/chunks/sqlite3-YIM3BYLS.js +3 -0
  130. package/dist/bin/chunks/stat-RKSIL4YV.js +3 -0
  131. package/dist/bin/chunks/strings-AL7T5GDQ.js +3 -0
  132. package/dist/bin/chunks/tac-36B6LBNS.js +3 -0
  133. package/dist/bin/chunks/tail-G4PLDIOK.js +3 -0
  134. package/dist/bin/chunks/tar-YG6SY2RU.js +3 -0
  135. package/dist/bin/chunks/tee-NP4ULCWD.js +3 -0
  136. package/dist/bin/chunks/time-ZMFJL7MD.js +3 -0
  137. package/dist/bin/chunks/timeout-EJIGKZUX.js +3 -0
  138. package/dist/bin/chunks/touch-YE5LMLLE.js +3 -0
  139. package/dist/bin/chunks/tr-7KFUMSUF.js +3 -0
  140. package/dist/bin/chunks/unexpand-67EBVEPB.js +3 -0
  141. package/dist/bin/chunks/uniq-SZDRNEYK.js +3 -0
  142. package/dist/bin/chunks/wc-VLOME6PL.js +3 -0
  143. package/dist/bin/chunks/xan-FVGJAHFV.js +3 -0
  144. package/dist/bin/chunks/xan-view-LYATQWQB.js +3 -0
  145. package/dist/bin/chunks/xargs-CLQL2WFV.js +3 -0
  146. package/dist/bin/chunks/yes-OOBLAITP.js +3 -0
  147. package/dist/bin/chunks/yq-YQ4YFM26.js +3 -0
  148. package/dist/bin/just-bash.js +347 -345
  149. package/dist/bin/shell/chunks/awk2-EPZ2CEQT.js +3 -0
  150. package/dist/bin/shell/chunks/base64-D7ZXJQN6.js +3 -0
  151. package/dist/bin/shell/chunks/bash-4Q4RMIZL.js +3 -0
  152. package/dist/bin/shell/chunks/cat-AST5Y57Y.js +3 -0
  153. package/dist/bin/shell/chunks/chmod-BFP7P5CD.js +3 -0
  154. package/dist/bin/shell/chunks/chunk-26O2G5LX.js +34 -0
  155. package/dist/bin/shell/chunks/chunk-2RDKEB6Z.js +15 -0
  156. package/dist/bin/shell/chunks/chunk-35U2THFB.js +3 -0
  157. package/dist/bin/shell/chunks/chunk-3F7UWBEM.js +17 -0
  158. package/dist/bin/shell/chunks/chunk-3WLAERUX.js +3 -0
  159. package/dist/bin/shell/chunks/chunk-3WZIZUMC.js +8 -0
  160. package/dist/bin/shell/chunks/chunk-4ARWO6Y3.js +4 -0
  161. package/dist/bin/shell/chunks/chunk-4HVMRZ5N.js +8 -0
  162. package/dist/bin/shell/chunks/chunk-5AS7PRVN.js +34 -0
  163. package/dist/bin/shell/chunks/chunk-5GYAEVIB.js +10 -0
  164. package/dist/bin/shell/chunks/chunk-5IPYW47P.js +27 -0
  165. package/dist/bin/shell/chunks/chunk-5ZTIV6TI.js +20 -0
  166. package/dist/bin/shell/chunks/chunk-6C2YS7G6.js +14 -0
  167. package/dist/bin/shell/chunks/chunk-74MYVPDY.js +3 -0
  168. package/dist/bin/shell/chunks/chunk-74UP5NWP.js +3 -0
  169. package/dist/bin/shell/chunks/chunk-7DPD5PK3.js +3 -0
  170. package/dist/bin/shell/chunks/chunk-7LJGZPVP.js +18 -0
  171. package/dist/bin/shell/chunks/chunk-7NEXHFSS.js +3 -0
  172. package/dist/bin/shell/chunks/chunk-7XFMCB5C.js +21 -0
  173. package/dist/bin/shell/chunks/chunk-A53Y4KDG.js +7 -0
  174. package/dist/bin/shell/chunks/chunk-AALAYQ6J.js +17 -0
  175. package/dist/bin/shell/chunks/chunk-AM4WIHAG.js +10 -0
  176. package/dist/bin/shell/chunks/chunk-BC5OXEFJ.js +3 -0
  177. package/dist/bin/shell/chunks/chunk-C5ABXV4P.js +15 -0
  178. package/dist/bin/shell/chunks/chunk-CT6P7ILU.js +3 -0
  179. package/dist/bin/shell/chunks/chunk-CYHG3NVG.js +9 -0
  180. package/dist/bin/shell/chunks/chunk-D7PDAJWE.js +7 -0
  181. package/dist/bin/shell/chunks/chunk-DB3G3UVZ.js +5 -0
  182. package/dist/bin/shell/chunks/chunk-EIUU35ZP.js +37 -0
  183. package/dist/bin/shell/chunks/chunk-EMHJNKV5.js +20 -0
  184. package/dist/bin/shell/chunks/chunk-EPWMLTS6.js +9 -0
  185. package/dist/bin/shell/chunks/chunk-F4QFFLWZ.js +8 -0
  186. package/dist/bin/shell/chunks/chunk-F5R5O2Y6.js +9 -0
  187. package/dist/bin/shell/chunks/chunk-FBEYY2HM.js +13 -0
  188. package/dist/bin/shell/chunks/chunk-FIJBWMXU.js +12 -0
  189. package/dist/bin/shell/chunks/chunk-FMVH4N2P.js +5 -0
  190. package/dist/bin/shell/chunks/chunk-G6W2HMNY.js +7 -0
  191. package/dist/bin/shell/chunks/chunk-GFI5BHZX.js +3 -0
  192. package/dist/bin/shell/chunks/chunk-GJAVHEWO.js +143 -0
  193. package/dist/bin/shell/chunks/chunk-GUVSOVQU.js +8 -0
  194. package/dist/bin/shell/chunks/chunk-H22PAKR6.js +3 -0
  195. package/dist/bin/shell/chunks/chunk-HXOJHK2Z.js +8 -0
  196. package/dist/bin/shell/chunks/chunk-IAAYIH44.js +3 -0
  197. package/dist/bin/shell/chunks/chunk-J7W2CRXT.js +7 -0
  198. package/dist/bin/shell/chunks/chunk-JNWWOKCN.js +6 -0
  199. package/dist/bin/shell/chunks/chunk-JQLGE4OW.js +22 -0
  200. package/dist/bin/shell/chunks/chunk-K3U4M4MF.js +7 -0
  201. package/dist/bin/shell/chunks/chunk-KRXYOWIP.js +12 -0
  202. package/dist/bin/shell/chunks/chunk-L4L2QFS4.js +10 -0
  203. package/dist/bin/shell/chunks/chunk-LU6ZEQNN.js +13 -0
  204. package/dist/bin/shell/chunks/chunk-MLMKRR7L.js +12 -0
  205. package/dist/bin/shell/chunks/chunk-MVN5WALS.js +7 -0
  206. package/dist/bin/shell/chunks/chunk-MYOGTYIH.js +22 -0
  207. package/dist/bin/shell/chunks/chunk-NF5LHCVV.js +275 -0
  208. package/dist/bin/shell/chunks/chunk-OUGDZVL6.js +10 -0
  209. package/dist/bin/shell/chunks/chunk-QCNQD6ME.js +11 -0
  210. package/dist/bin/shell/chunks/chunk-QIDBJNMB.js +3 -0
  211. package/dist/bin/shell/chunks/chunk-QKTQYL37.js +9 -0
  212. package/dist/bin/shell/chunks/chunk-R6CMNMNX.js +22 -0
  213. package/dist/bin/shell/chunks/chunk-RCP3WQND.js +7 -0
  214. package/dist/bin/shell/chunks/chunk-RJG4JS32.js +6 -0
  215. package/dist/bin/shell/chunks/chunk-SIMSIBUA.js +13 -0
  216. package/dist/bin/shell/chunks/chunk-TNB7M24H.js +87 -0
  217. package/dist/bin/shell/chunks/chunk-TU6P6AC2.js +4 -0
  218. package/dist/bin/shell/chunks/chunk-TX4WSLXK.js +101 -0
  219. package/dist/bin/shell/chunks/chunk-U4UY6P77.js +3 -0
  220. package/dist/bin/shell/chunks/chunk-U5BNATW4.js +3 -0
  221. package/dist/bin/shell/chunks/chunk-U7VJCJQR.js +16 -0
  222. package/dist/bin/shell/chunks/chunk-VJE2PQW6.js +15 -0
  223. package/dist/bin/shell/chunks/chunk-W4ENG3BR.js +44 -0
  224. package/dist/bin/shell/chunks/chunk-XUFO4QPW.js +65 -0
  225. package/dist/bin/shell/chunks/chunk-XVKL2UZA.js +4 -0
  226. package/dist/bin/shell/chunks/chunk-YCUNLSHF.js +12 -0
  227. package/dist/bin/shell/chunks/chunk-YDH7Q5WV.js +6 -0
  228. package/dist/bin/shell/chunks/chunk-YDWLU56G.js +26 -0
  229. package/dist/bin/shell/chunks/chunk-YILPYZYP.js +16 -0
  230. package/dist/bin/shell/chunks/chunk-YZQ4SVJV.js +13 -0
  231. package/dist/bin/shell/chunks/chunk-ZKLKNN6B.js +3 -0
  232. package/dist/bin/shell/chunks/column-EGAQ7QMC.js +3 -0
  233. package/dist/bin/shell/chunks/comm-JEJ6GWEA.js +3 -0
  234. package/dist/bin/shell/chunks/cp-7AH7TSQ6.js +3 -0
  235. package/dist/bin/shell/chunks/curl-7FCZQCFU.js +31 -0
  236. package/dist/bin/shell/chunks/cut-OVTLUT2B.js +3 -0
  237. package/dist/bin/shell/chunks/date-MKP5YWWY.js +3 -0
  238. package/dist/bin/shell/chunks/diff-R6QTSWD2.js +3 -0
  239. package/dist/bin/shell/chunks/du-M2PB5NUH.js +3 -0
  240. package/dist/bin/shell/chunks/env-EUSAZGWO.js +3 -0
  241. package/dist/bin/shell/chunks/expand-B4CPOZN5.js +3 -0
  242. package/dist/bin/shell/chunks/expr-AQBMSEFL.js +3 -0
  243. package/dist/bin/shell/chunks/file-22CVQBNS.js +3 -0
  244. package/dist/bin/shell/chunks/find-QYLHUYOP.js +3 -0
  245. package/dist/bin/shell/chunks/flag-coverage-CTPK5ZWJ.js +3 -0
  246. package/dist/bin/shell/chunks/fold-E6A5I4DW.js +3 -0
  247. package/dist/bin/shell/chunks/grep-HI55D7F7.js +3 -0
  248. package/dist/bin/shell/chunks/gzip-2GJMVXCF.js +3 -0
  249. package/dist/bin/shell/chunks/head-ZQIB2GSI.js +3 -0
  250. package/dist/bin/shell/chunks/html-to-markdown-7ZNLM4SQ.js +3 -0
  251. package/dist/bin/shell/chunks/join-KCYMLQ3V.js +3 -0
  252. package/dist/bin/shell/chunks/jq-KNI4FJIL.js +3 -0
  253. package/dist/bin/shell/chunks/js-exec-OWDAX677.js +1617 -0
  254. package/dist/bin/shell/chunks/ls-QCAGDEDW.js +3 -0
  255. package/dist/bin/shell/chunks/md5sum-OPJ77ZY7.js +3 -0
  256. package/dist/bin/shell/chunks/mkdir-3XFSFVPC.js +3 -0
  257. package/dist/bin/shell/chunks/mktemp-5FA55IJS.js +3 -0
  258. package/dist/bin/shell/chunks/mv-UASF6NAX.js +3 -0
  259. package/dist/bin/shell/chunks/nl-HUDE6DQC.js +3 -0
  260. package/dist/bin/shell/chunks/od-CECQKF5P.js +3 -0
  261. package/dist/bin/shell/chunks/paste-SH5RZ4ZO.js +3 -0
  262. package/dist/bin/shell/chunks/printf-PQKUEWX5.js +3 -0
  263. package/dist/bin/shell/chunks/python3-UE36ZXQT.js +23 -0
  264. package/dist/bin/shell/chunks/readlink-4Z75K3AI.js +3 -0
  265. package/dist/bin/shell/chunks/rev-6SA3VC3J.js +3 -0
  266. package/dist/bin/shell/chunks/rg-ULWB5MQG.js +3 -0
  267. package/dist/bin/shell/chunks/rm-NPIAQT6U.js +3 -0
  268. package/dist/bin/shell/chunks/rmdir-57J3AGQU.js +3 -0
  269. package/dist/bin/shell/chunks/sed-XV7BZPKI.js +3 -0
  270. package/dist/bin/shell/chunks/seq-ZVBT2JEI.js +3 -0
  271. package/dist/bin/shell/chunks/sha1sum-JGOB5K4J.js +3 -0
  272. package/dist/bin/shell/chunks/sha256sum-S5DS6Q6N.js +3 -0
  273. package/dist/bin/shell/chunks/sort-UOMFLGRW.js +3 -0
  274. package/dist/bin/shell/chunks/split-IBL3NIVH.js +3 -0
  275. package/dist/bin/shell/chunks/sqlite3-YIM3BYLS.js +3 -0
  276. package/dist/bin/shell/chunks/stat-RKSIL4YV.js +3 -0
  277. package/dist/bin/shell/chunks/strings-AL7T5GDQ.js +3 -0
  278. package/dist/bin/shell/chunks/tac-36B6LBNS.js +3 -0
  279. package/dist/bin/shell/chunks/tail-G4PLDIOK.js +3 -0
  280. package/dist/bin/shell/chunks/tar-YG6SY2RU.js +3 -0
  281. package/dist/bin/shell/chunks/tee-NP4ULCWD.js +3 -0
  282. package/dist/bin/shell/chunks/time-ZMFJL7MD.js +3 -0
  283. package/dist/bin/shell/chunks/timeout-EJIGKZUX.js +3 -0
  284. package/dist/bin/shell/chunks/touch-YE5LMLLE.js +3 -0
  285. package/dist/bin/shell/chunks/tr-7KFUMSUF.js +3 -0
  286. package/dist/bin/shell/chunks/unexpand-67EBVEPB.js +3 -0
  287. package/dist/bin/shell/chunks/uniq-SZDRNEYK.js +3 -0
  288. package/dist/bin/shell/chunks/wc-VLOME6PL.js +3 -0
  289. package/dist/bin/shell/chunks/xan-FVGJAHFV.js +3 -0
  290. package/dist/bin/shell/chunks/xan-view-LYATQWQB.js +3 -0
  291. package/dist/bin/shell/chunks/xargs-CLQL2WFV.js +3 -0
  292. package/dist/bin/shell/chunks/yes-OOBLAITP.js +3 -0
  293. package/dist/bin/shell/chunks/yq-YQ4YFM26.js +3 -0
  294. package/dist/bin/shell/shell.js +385 -383
  295. package/dist/bundle/browser.js +873 -863
  296. package/dist/bundle/chunks/awk2-LEEKKBPN.js +2 -0
  297. package/dist/bundle/chunks/base64-GBEVK7UP.js +2 -0
  298. package/dist/bundle/chunks/bash-QTX2IUM4.js +2 -0
  299. package/dist/bundle/chunks/cat-UBR2ABBH.js +2 -0
  300. package/dist/bundle/chunks/chmod-5VBARXGU.js +2 -0
  301. package/dist/bundle/chunks/chunk-2LOOLBWC.js +33 -0
  302. package/dist/bundle/chunks/chunk-34XJ6PLO.js +20 -0
  303. package/dist/bundle/chunks/chunk-3DUKINTI.js +7 -0
  304. package/dist/bundle/chunks/chunk-3VXY25LY.js +2 -0
  305. package/dist/bundle/chunks/chunk-5G2D2EZB.js +7 -0
  306. package/dist/bundle/chunks/chunk-5Q4R6KJE.js +4 -0
  307. package/dist/bundle/chunks/chunk-5ZVTEBKG.js +7 -0
  308. package/dist/bundle/chunks/chunk-77XFWF43.js +13 -0
  309. package/dist/bundle/chunks/chunk-B2EYYRZX.js +9 -0
  310. package/dist/bundle/chunks/chunk-BC3VKZCL.js +10 -0
  311. package/dist/bundle/chunks/chunk-BEIP3OYT.js +6 -0
  312. package/dist/bundle/chunks/chunk-BLTFJFWH.js +2 -0
  313. package/dist/bundle/chunks/chunk-C2GCPQ2D.js +15 -0
  314. package/dist/bundle/chunks/chunk-CGCA7SGA.js +25 -0
  315. package/dist/bundle/chunks/chunk-CIY4XCGA.js +2 -0
  316. package/dist/bundle/chunks/chunk-CXBOPNEG.js +11 -0
  317. package/dist/bundle/chunks/chunk-CYJQAYUX.js +142 -0
  318. package/dist/bundle/chunks/chunk-D55UUXDJ.js +100 -0
  319. package/dist/bundle/chunks/chunk-EOMWWW4L.js +33 -0
  320. package/dist/bundle/chunks/chunk-ER6ZGLPS.js +26 -0
  321. package/dist/bundle/chunks/chunk-EZHC6HLV.js +3 -0
  322. package/dist/bundle/chunks/chunk-FBRDM6EM.js +12 -0
  323. package/dist/bundle/chunks/chunk-FDAXSABU.js +11 -0
  324. package/dist/bundle/chunks/chunk-FEKEA5Y2.js +2 -0
  325. package/dist/bundle/chunks/chunk-GEANXVKK.js +15 -0
  326. package/dist/bundle/chunks/chunk-GIQ3LRFL.js +21 -0
  327. package/dist/bundle/chunks/chunk-HBIJBKHP.js +14 -0
  328. package/dist/bundle/chunks/chunk-IDYF47VD.js +11 -0
  329. package/dist/bundle/chunks/chunk-IH6MZAKK.js +6 -0
  330. package/dist/bundle/chunks/chunk-IIWAWB3H.js +274 -0
  331. package/dist/bundle/chunks/chunk-IQGNPH54.js +8 -0
  332. package/dist/bundle/chunks/chunk-IVYY6YFV.js +7 -0
  333. package/dist/bundle/chunks/chunk-IXOG2DXK.js +14 -0
  334. package/dist/bundle/chunks/chunk-J6QAN4PZ.js +6 -0
  335. package/dist/bundle/chunks/chunk-JMGGZYF2.js +2 -0
  336. package/dist/bundle/chunks/chunk-JU5GJH4X.js +9 -0
  337. package/dist/bundle/chunks/chunk-JWGTQTBU.js +16 -0
  338. package/dist/bundle/chunks/chunk-KQSMX4HM.js +11 -0
  339. package/dist/bundle/chunks/chunk-KZMK2KYL.js +43 -0
  340. package/dist/bundle/chunks/chunk-L4MC7WH4.js +14 -0
  341. package/dist/bundle/chunks/chunk-L5AKA7GO.js +5 -0
  342. package/dist/bundle/chunks/chunk-LBKOJW6K.js +2 -0
  343. package/dist/bundle/chunks/chunk-LNJ6EIKX.js +2 -0
  344. package/dist/bundle/chunks/chunk-LQXMSLW5.js +16 -0
  345. package/dist/bundle/chunks/chunk-MOOFDAFS.js +7 -0
  346. package/dist/bundle/chunks/chunk-N3VQQRLQ.js +8 -0
  347. package/dist/bundle/chunks/chunk-NJUHQKMR.js +3 -0
  348. package/dist/bundle/chunks/chunk-NOZTFL4F.js +12 -0
  349. package/dist/bundle/chunks/chunk-OEZKBUXP.js +8 -0
  350. package/dist/bundle/chunks/chunk-OZMQI3HV.js +17 -0
  351. package/dist/bundle/chunks/chunk-POI4XBDP.js +6 -0
  352. package/dist/bundle/chunks/chunk-PV2DCWLJ.js +6 -0
  353. package/dist/bundle/chunks/chunk-Q6ZH76O4.js +2 -0
  354. package/dist/bundle/chunks/chunk-QECDICRF.js +9 -0
  355. package/dist/bundle/chunks/chunk-QJTRVYQA.js +5 -0
  356. package/dist/bundle/chunks/chunk-QZPG6UCH.js +9 -0
  357. package/dist/bundle/chunks/chunk-R23EAHN5.js +2 -0
  358. package/dist/bundle/chunks/chunk-R3HY2GCO.js +3 -0
  359. package/dist/bundle/chunks/chunk-RQTEROQ5.js +6 -0
  360. package/dist/bundle/chunks/chunk-SAE7VUIM.js +21 -0
  361. package/dist/bundle/chunks/chunk-SBG7KYI4.js +12 -0
  362. package/dist/bundle/chunks/chunk-SRNYBHIU.js +21 -0
  363. package/dist/bundle/chunks/chunk-T7CFNHX6.js +2 -0
  364. package/dist/bundle/chunks/chunk-U3UTFNHI.js +2 -0
  365. package/dist/bundle/chunks/chunk-UQZ5HJXB.js +64 -0
  366. package/dist/bundle/chunks/chunk-US6XQQ6W.js +19 -0
  367. package/dist/bundle/chunks/chunk-UZ4TKNEJ.js +2 -0
  368. package/dist/bundle/chunks/chunk-VW6FDS6X.js +2 -0
  369. package/dist/bundle/chunks/chunk-W4A6TADR.js +36 -0
  370. package/dist/bundle/chunks/chunk-WAL3MOLR.js +6 -0
  371. package/dist/bundle/chunks/chunk-WFEUQRHM.js +2 -0
  372. package/dist/bundle/chunks/chunk-WNAEYQTE.js +8 -0
  373. package/dist/bundle/chunks/chunk-WOSSFIAE.js +12 -0
  374. package/dist/bundle/chunks/chunk-WTG3OCY4.js +5 -0
  375. package/dist/bundle/chunks/chunk-XIEMQVCO.js +19 -0
  376. package/dist/bundle/chunks/chunk-YFGP6M45.js +7 -0
  377. package/dist/bundle/chunks/chunk-ZARLSKBF.js +2 -0
  378. package/dist/bundle/chunks/chunk-ZVANIJV2.js +4 -0
  379. package/dist/bundle/chunks/column-46NX3HG3.js +2 -0
  380. package/dist/bundle/chunks/comm-QHEYSM4I.js +2 -0
  381. package/dist/bundle/chunks/cp-AQ4Y4WVV.js +2 -0
  382. package/dist/bundle/chunks/curl-LMCQFYWH.js +30 -0
  383. package/dist/bundle/chunks/cut-A6NXJGOH.js +2 -0
  384. package/dist/bundle/chunks/date-YMEJ62OQ.js +2 -0
  385. package/dist/bundle/chunks/diff-SECJC7CN.js +2 -0
  386. package/dist/bundle/chunks/du-JOLY42MC.js +2 -0
  387. package/dist/bundle/chunks/env-MI6QVNMM.js +2 -0
  388. package/dist/bundle/chunks/expand-YVEZTU7W.js +2 -0
  389. package/dist/bundle/chunks/expr-U7WETT5R.js +2 -0
  390. package/dist/bundle/chunks/file-6QDI3H7G.js +2 -0
  391. package/dist/bundle/chunks/find-UYQIFSZI.js +2 -0
  392. package/dist/bundle/chunks/flag-coverage-5YCE6ILG.js +2 -0
  393. package/dist/bundle/chunks/fold-A24KLKHY.js +2 -0
  394. package/dist/bundle/chunks/grep-ZELVZ7JB.js +2 -0
  395. package/dist/bundle/chunks/gzip-3IFADYVU.js +2 -0
  396. package/dist/bundle/chunks/head-5YWCKNNQ.js +2 -0
  397. package/dist/bundle/chunks/html-to-markdown-EOWI2I5J.js +2 -0
  398. package/dist/bundle/chunks/join-MSZXRLNV.js +2 -0
  399. package/dist/bundle/chunks/jq-MKA6BDYV.js +2 -0
  400. package/dist/bundle/chunks/js-exec-CNDWLKWB.js +1616 -0
  401. package/dist/bundle/chunks/ls-WMN4WCCI.js +2 -0
  402. package/dist/bundle/chunks/md5sum-OCX4NZ2Q.js +2 -0
  403. package/dist/bundle/chunks/mkdir-YJMG55FX.js +2 -0
  404. package/dist/bundle/chunks/mktemp-RA55VAN3.js +2 -0
  405. package/dist/bundle/chunks/mv-NTJL2AHI.js +2 -0
  406. package/dist/bundle/chunks/nl-Z5DVHZ3S.js +2 -0
  407. package/dist/bundle/chunks/od-TRWBMEIO.js +2 -0
  408. package/dist/bundle/chunks/paste-VPYCLIL6.js +2 -0
  409. package/dist/bundle/chunks/printf-BNADL4RX.js +2 -0
  410. package/dist/bundle/chunks/python3-TIKLWPZJ.js +22 -0
  411. package/dist/bundle/chunks/readlink-HGACDFRD.js +2 -0
  412. package/dist/bundle/chunks/rev-W57N4M5B.js +2 -0
  413. package/dist/bundle/chunks/rg-IN3KT335.js +2 -0
  414. package/dist/bundle/chunks/rm-CDVWO5CO.js +2 -0
  415. package/dist/bundle/chunks/rmdir-HI3UE4KQ.js +2 -0
  416. package/dist/bundle/chunks/sed-MXZDFQ7I.js +2 -0
  417. package/dist/bundle/chunks/seq-E3UP3G65.js +2 -0
  418. package/dist/bundle/chunks/sha1sum-QUWYL7G6.js +2 -0
  419. package/dist/bundle/chunks/sha256sum-FGHIABMA.js +2 -0
  420. package/dist/bundle/chunks/sort-ATCMEITA.js +2 -0
  421. package/dist/bundle/chunks/split-YZFCWIZI.js +2 -0
  422. package/dist/bundle/chunks/sqlite3-JL36RFBZ.js +2 -0
  423. package/dist/bundle/chunks/stat-APUQD6WQ.js +2 -0
  424. package/dist/bundle/chunks/strings-WA2ZGNUN.js +2 -0
  425. package/dist/bundle/chunks/tac-OCV6R4TG.js +2 -0
  426. package/dist/bundle/chunks/tail-IBKQAMFW.js +2 -0
  427. package/dist/bundle/chunks/tar-WJV4DGKA.js +2 -0
  428. package/dist/bundle/chunks/tee-VOXQ2UGV.js +2 -0
  429. package/dist/bundle/chunks/time-GOHAC6VO.js +2 -0
  430. package/dist/bundle/chunks/timeout-FVGYB3MD.js +2 -0
  431. package/dist/bundle/chunks/touch-57OKADDG.js +2 -0
  432. package/dist/bundle/chunks/tr-M4D6SICQ.js +2 -0
  433. package/dist/bundle/chunks/unexpand-SYZZ5ZBE.js +2 -0
  434. package/dist/bundle/chunks/uniq-TUUUYPVF.js +2 -0
  435. package/dist/bundle/chunks/wc-HQPGW3KR.js +2 -0
  436. package/dist/bundle/chunks/xan-CZJZCC57.js +2 -0
  437. package/dist/bundle/chunks/xan-view-HETEUD3G.js +2 -0
  438. package/dist/bundle/chunks/xargs-WFPZZ3FK.js +2 -0
  439. package/dist/bundle/chunks/yes-ACSNSE7T.js +2 -0
  440. package/dist/bundle/chunks/yq-XDJLIJPZ.js +2 -0
  441. package/dist/bundle/index.cjs +1042 -993
  442. package/dist/bundle/index.js +345 -343
  443. package/dist/commands/awk/interpreter/fields.d.ts +16 -0
  444. package/dist/commands/js-exec/module-shims.d.ts +1 -1
  445. package/dist/commands/rg/rg-options.d.ts +2 -0
  446. package/dist/commands/search-engine/matcher.d.ts +2 -0
  447. package/dist/interpreter/builtin-dispatch.d.ts +9 -3
  448. package/dist/interpreter/fd-table.d.ts +4 -1
  449. package/dist/interpreter/helpers/errors.d.ts +5 -0
  450. package/dist/interpreter/pipeline-execution.d.ts +1 -1
  451. package/dist/interpreter/redirections.d.ts +25 -10
  452. package/dist/interpreter/types.d.ts +2 -0
  453. package/dist/types.d.ts +15 -0
  454. package/dist/utils/string-builder.d.ts +9 -0
  455. package/package.json +1 -1
  456. package/dist/bin/chunks/awk2-U22OR5B5.js +0 -3
  457. package/dist/bin/chunks/base64-2KKH5BCT.js +0 -3
  458. package/dist/bin/chunks/bash-CFCBBWVH.js +0 -3
  459. package/dist/bin/chunks/cat-V45MVNBT.js +0 -3
  460. package/dist/bin/chunks/chmod-A54R4UUQ.js +0 -3
  461. package/dist/bin/chunks/chunk-2NJJXU4K.js +0 -27
  462. package/dist/bin/chunks/chunk-2YLY6FJA.js +0 -10
  463. package/dist/bin/chunks/chunk-3LKMI5IX.js +0 -34
  464. package/dist/bin/chunks/chunk-3VSWQCPN.js +0 -18
  465. package/dist/bin/chunks/chunk-44SKMHU6.js +0 -16
  466. package/dist/bin/chunks/chunk-5SKEZPTU.js +0 -12
  467. package/dist/bin/chunks/chunk-5SR55TXB.js +0 -16
  468. package/dist/bin/chunks/chunk-6D75E4LV.js +0 -3
  469. package/dist/bin/chunks/chunk-6DAR25KN.js +0 -12
  470. package/dist/bin/chunks/chunk-6SAZRW7E.js +0 -15
  471. package/dist/bin/chunks/chunk-723HNGID.js +0 -13
  472. package/dist/bin/chunks/chunk-7FGDUBSN.js +0 -14
  473. package/dist/bin/chunks/chunk-7X4QBCFW.js +0 -36
  474. package/dist/bin/chunks/chunk-AINNAQBQ.js +0 -6
  475. package/dist/bin/chunks/chunk-AL7RVSF4.js +0 -8
  476. package/dist/bin/chunks/chunk-ARYCSNJJ.js +0 -101
  477. package/dist/bin/chunks/chunk-BCJ42NCM.js +0 -15
  478. package/dist/bin/chunks/chunk-BJF6B4YW.js +0 -22
  479. package/dist/bin/chunks/chunk-BOXG6XBN.js +0 -143
  480. package/dist/bin/chunks/chunk-CPKBPQ2C.js +0 -3
  481. package/dist/bin/chunks/chunk-DA3RFNKK.js +0 -17
  482. package/dist/bin/chunks/chunk-DH7M46D3.js +0 -20
  483. package/dist/bin/chunks/chunk-DTGQQKI2.js +0 -87
  484. package/dist/bin/chunks/chunk-ECZAFQ22.js +0 -9
  485. package/dist/bin/chunks/chunk-ETWDDV6I.js +0 -10
  486. package/dist/bin/chunks/chunk-HFW2LXQV.js +0 -13
  487. package/dist/bin/chunks/chunk-HRKG3ZK2.js +0 -8
  488. package/dist/bin/chunks/chunk-I4IRHQDW.js +0 -3
  489. package/dist/bin/chunks/chunk-IKUY74NG.js +0 -3
  490. package/dist/bin/chunks/chunk-ILXMFIYG.js +0 -7
  491. package/dist/bin/chunks/chunk-IMVXTSPG.js +0 -275
  492. package/dist/bin/chunks/chunk-ISW2U76N.js +0 -17
  493. package/dist/bin/chunks/chunk-K5KT6DMM.js +0 -4
  494. package/dist/bin/chunks/chunk-KG2KXL4Y.js +0 -3
  495. package/dist/bin/chunks/chunk-LCP3IKI7.js +0 -9
  496. package/dist/bin/chunks/chunk-LG6IN6SW.js +0 -34
  497. package/dist/bin/chunks/chunk-LMFAALLO.js +0 -21
  498. package/dist/bin/chunks/chunk-LXFMIXGA.js +0 -3
  499. package/dist/bin/chunks/chunk-M5ZBECGM.js +0 -22
  500. package/dist/bin/chunks/chunk-MA6BMA4M.js +0 -3
  501. package/dist/bin/chunks/chunk-MPQMTLXN.js +0 -3
  502. package/dist/bin/chunks/chunk-MUIYG2RB.js +0 -65
  503. package/dist/bin/chunks/chunk-MYTNZ7MA.js +0 -7
  504. package/dist/bin/chunks/chunk-NGMFI3RH.js +0 -15
  505. package/dist/bin/chunks/chunk-NLMTGTSG.js +0 -11
  506. package/dist/bin/chunks/chunk-O74FSWB4.js +0 -4
  507. package/dist/bin/chunks/chunk-OBVTFHVP.js +0 -7
  508. package/dist/bin/chunks/chunk-OOKVPG5D.js +0 -6
  509. package/dist/bin/chunks/chunk-PL4EU7Y2.js +0 -3
  510. package/dist/bin/chunks/chunk-Q3LE3Y66.js +0 -13
  511. package/dist/bin/chunks/chunk-QCGH2ZOW.js +0 -13
  512. package/dist/bin/chunks/chunk-QKWMWSV3.js +0 -3
  513. package/dist/bin/chunks/chunk-QL33F2W6.js +0 -8
  514. package/dist/bin/chunks/chunk-S5Z7DMIE.js +0 -26
  515. package/dist/bin/chunks/chunk-SQ7SZZMW.js +0 -8
  516. package/dist/bin/chunks/chunk-SQUH76NP.js +0 -3
  517. package/dist/bin/chunks/chunk-TGRZ42DS.js +0 -12
  518. package/dist/bin/chunks/chunk-THTKNRO6.js +0 -7
  519. package/dist/bin/chunks/chunk-TQXLQEIT.js +0 -9
  520. package/dist/bin/chunks/chunk-TZ3S7MY6.js +0 -12
  521. package/dist/bin/chunks/chunk-U6BXPMLD.js +0 -7
  522. package/dist/bin/chunks/chunk-U6DBRMD5.js +0 -5
  523. package/dist/bin/chunks/chunk-URRH3GPG.js +0 -10
  524. package/dist/bin/chunks/chunk-VBU3UEG5.js +0 -7
  525. package/dist/bin/chunks/chunk-VLWZ6L7C.js +0 -4
  526. package/dist/bin/chunks/chunk-VTHA5UK5.js +0 -7
  527. package/dist/bin/chunks/chunk-WBST7XJW.js +0 -9
  528. package/dist/bin/chunks/chunk-WDV2ECOC.js +0 -3
  529. package/dist/bin/chunks/chunk-WEQ5WM2M.js +0 -20
  530. package/dist/bin/chunks/chunk-WFVCEB5T.js +0 -3
  531. package/dist/bin/chunks/chunk-WZ7MIBLR.js +0 -37
  532. package/dist/bin/chunks/chunk-X45GP3AQ.js +0 -3
  533. package/dist/bin/chunks/chunk-XEQ7KSRM.js +0 -5
  534. package/dist/bin/chunks/chunk-YIANER7Y.js +0 -8
  535. package/dist/bin/chunks/chunk-YYZSYLJO.js +0 -6
  536. package/dist/bin/chunks/chunk-Z3KAV6YJ.js +0 -10
  537. package/dist/bin/chunks/chunk-Z5KICK5X.js +0 -22
  538. package/dist/bin/chunks/column-LHHS4D3K.js +0 -3
  539. package/dist/bin/chunks/comm-URDMZCXL.js +0 -3
  540. package/dist/bin/chunks/cp-HPLQA35N.js +0 -3
  541. package/dist/bin/chunks/curl-FIRG3RB6.js +0 -31
  542. package/dist/bin/chunks/cut-KP3S36XS.js +0 -3
  543. package/dist/bin/chunks/date-FJUBX7TJ.js +0 -3
  544. package/dist/bin/chunks/diff-JSJ56EOK.js +0 -3
  545. package/dist/bin/chunks/du-WEF5YWQK.js +0 -3
  546. package/dist/bin/chunks/env-2TSVF4W7.js +0 -3
  547. package/dist/bin/chunks/expand-P6SNTBGZ.js +0 -3
  548. package/dist/bin/chunks/expr-FLWT4OCO.js +0 -3
  549. package/dist/bin/chunks/file-JLUCGBCB.js +0 -3
  550. package/dist/bin/chunks/find-XGVQ6N6L.js +0 -3
  551. package/dist/bin/chunks/flag-coverage-4JYKIAVV.js +0 -3
  552. package/dist/bin/chunks/fold-YEY7X54W.js +0 -3
  553. package/dist/bin/chunks/grep-DCPCPQOS.js +0 -3
  554. package/dist/bin/chunks/gzip-6DZIKNBW.js +0 -3
  555. package/dist/bin/chunks/head-TLFXMM2T.js +0 -3
  556. package/dist/bin/chunks/html-to-markdown-E22RLT2U.js +0 -3
  557. package/dist/bin/chunks/join-UQKXU2QP.js +0 -3
  558. package/dist/bin/chunks/jq-GDM3OBBK.js +0 -3
  559. package/dist/bin/chunks/js-exec-VU6F6WLS.js +0 -1578
  560. package/dist/bin/chunks/ls-67NUUIYT.js +0 -3
  561. package/dist/bin/chunks/md5sum-Z6KAYGDK.js +0 -3
  562. package/dist/bin/chunks/mkdir-AWDWRBKC.js +0 -3
  563. package/dist/bin/chunks/mktemp-L6OGMDUO.js +0 -3
  564. package/dist/bin/chunks/mv-4BJSOT4Y.js +0 -3
  565. package/dist/bin/chunks/nl-XHWFVVKH.js +0 -3
  566. package/dist/bin/chunks/od-SI75GLRE.js +0 -3
  567. package/dist/bin/chunks/paste-5TSIBDF7.js +0 -3
  568. package/dist/bin/chunks/printf-CNXNRQ3I.js +0 -3
  569. package/dist/bin/chunks/python3-GUWCSSDP.js +0 -23
  570. package/dist/bin/chunks/readlink-URO5XTBB.js +0 -3
  571. package/dist/bin/chunks/rev-CZTQCNOZ.js +0 -3
  572. package/dist/bin/chunks/rg-RVULUPDH.js +0 -3
  573. package/dist/bin/chunks/rm-UCUTHC3I.js +0 -3
  574. package/dist/bin/chunks/rmdir-J3HM7GGM.js +0 -3
  575. package/dist/bin/chunks/sed-MCLGHZOI.js +0 -3
  576. package/dist/bin/chunks/seq-I54NZE75.js +0 -3
  577. package/dist/bin/chunks/sha1sum-CATBXX76.js +0 -3
  578. package/dist/bin/chunks/sha256sum-YGSNBVY3.js +0 -3
  579. package/dist/bin/chunks/sort-M3DO25D5.js +0 -3
  580. package/dist/bin/chunks/split-VZO7223N.js +0 -3
  581. package/dist/bin/chunks/sqlite3-HXVFVP4Z.js +0 -3
  582. package/dist/bin/chunks/stat-UJ37RBMM.js +0 -3
  583. package/dist/bin/chunks/strings-J2X2Z6N2.js +0 -3
  584. package/dist/bin/chunks/tac-DG4BMYM5.js +0 -3
  585. package/dist/bin/chunks/tail-5TSF5YM4.js +0 -3
  586. package/dist/bin/chunks/tar-ZGZZDQXO.js +0 -3
  587. package/dist/bin/chunks/tee-L4HKV5PD.js +0 -3
  588. package/dist/bin/chunks/time-J2DAZUIN.js +0 -3
  589. package/dist/bin/chunks/timeout-ATTDYXLX.js +0 -3
  590. package/dist/bin/chunks/touch-TVQAUQOG.js +0 -3
  591. package/dist/bin/chunks/tr-6RPFASYV.js +0 -3
  592. package/dist/bin/chunks/unexpand-JPOQORZF.js +0 -3
  593. package/dist/bin/chunks/uniq-K5VRDP4Q.js +0 -3
  594. package/dist/bin/chunks/wc-VSQBRD6B.js +0 -3
  595. package/dist/bin/chunks/xan-CCS53B7D.js +0 -3
  596. package/dist/bin/chunks/xan-view-KOXASOEV.js +0 -3
  597. package/dist/bin/chunks/xargs-HMISWW4I.js +0 -3
  598. package/dist/bin/chunks/yes-ELH3XQWY.js +0 -3
  599. package/dist/bin/chunks/yq-GSCDUHGM.js +0 -3
  600. package/dist/bin/shell/chunks/awk2-U22OR5B5.js +0 -3
  601. package/dist/bin/shell/chunks/base64-2KKH5BCT.js +0 -3
  602. package/dist/bin/shell/chunks/bash-CFCBBWVH.js +0 -3
  603. package/dist/bin/shell/chunks/cat-V45MVNBT.js +0 -3
  604. package/dist/bin/shell/chunks/chmod-A54R4UUQ.js +0 -3
  605. package/dist/bin/shell/chunks/chunk-2NJJXU4K.js +0 -27
  606. package/dist/bin/shell/chunks/chunk-2YLY6FJA.js +0 -10
  607. package/dist/bin/shell/chunks/chunk-3LKMI5IX.js +0 -34
  608. package/dist/bin/shell/chunks/chunk-3VSWQCPN.js +0 -18
  609. package/dist/bin/shell/chunks/chunk-44SKMHU6.js +0 -16
  610. package/dist/bin/shell/chunks/chunk-5SKEZPTU.js +0 -12
  611. package/dist/bin/shell/chunks/chunk-5SR55TXB.js +0 -16
  612. package/dist/bin/shell/chunks/chunk-6D75E4LV.js +0 -3
  613. package/dist/bin/shell/chunks/chunk-6DAR25KN.js +0 -12
  614. package/dist/bin/shell/chunks/chunk-6SAZRW7E.js +0 -15
  615. package/dist/bin/shell/chunks/chunk-723HNGID.js +0 -13
  616. package/dist/bin/shell/chunks/chunk-7FGDUBSN.js +0 -14
  617. package/dist/bin/shell/chunks/chunk-7X4QBCFW.js +0 -36
  618. package/dist/bin/shell/chunks/chunk-AINNAQBQ.js +0 -6
  619. package/dist/bin/shell/chunks/chunk-AL7RVSF4.js +0 -8
  620. package/dist/bin/shell/chunks/chunk-ARYCSNJJ.js +0 -101
  621. package/dist/bin/shell/chunks/chunk-BCJ42NCM.js +0 -15
  622. package/dist/bin/shell/chunks/chunk-BJF6B4YW.js +0 -22
  623. package/dist/bin/shell/chunks/chunk-BOXG6XBN.js +0 -143
  624. package/dist/bin/shell/chunks/chunk-CPKBPQ2C.js +0 -3
  625. package/dist/bin/shell/chunks/chunk-DA3RFNKK.js +0 -17
  626. package/dist/bin/shell/chunks/chunk-DH7M46D3.js +0 -20
  627. package/dist/bin/shell/chunks/chunk-DTGQQKI2.js +0 -87
  628. package/dist/bin/shell/chunks/chunk-ECZAFQ22.js +0 -9
  629. package/dist/bin/shell/chunks/chunk-ETWDDV6I.js +0 -10
  630. package/dist/bin/shell/chunks/chunk-HFW2LXQV.js +0 -13
  631. package/dist/bin/shell/chunks/chunk-HRKG3ZK2.js +0 -8
  632. package/dist/bin/shell/chunks/chunk-I4IRHQDW.js +0 -3
  633. package/dist/bin/shell/chunks/chunk-IKUY74NG.js +0 -3
  634. package/dist/bin/shell/chunks/chunk-ILXMFIYG.js +0 -7
  635. package/dist/bin/shell/chunks/chunk-IMVXTSPG.js +0 -275
  636. package/dist/bin/shell/chunks/chunk-ISW2U76N.js +0 -17
  637. package/dist/bin/shell/chunks/chunk-K5KT6DMM.js +0 -4
  638. package/dist/bin/shell/chunks/chunk-KG2KXL4Y.js +0 -3
  639. package/dist/bin/shell/chunks/chunk-LCP3IKI7.js +0 -9
  640. package/dist/bin/shell/chunks/chunk-LG6IN6SW.js +0 -34
  641. package/dist/bin/shell/chunks/chunk-LMFAALLO.js +0 -21
  642. package/dist/bin/shell/chunks/chunk-LXFMIXGA.js +0 -3
  643. package/dist/bin/shell/chunks/chunk-M5ZBECGM.js +0 -22
  644. package/dist/bin/shell/chunks/chunk-MA6BMA4M.js +0 -3
  645. package/dist/bin/shell/chunks/chunk-MPQMTLXN.js +0 -3
  646. package/dist/bin/shell/chunks/chunk-MUIYG2RB.js +0 -65
  647. package/dist/bin/shell/chunks/chunk-MYTNZ7MA.js +0 -7
  648. package/dist/bin/shell/chunks/chunk-NGMFI3RH.js +0 -15
  649. package/dist/bin/shell/chunks/chunk-NLMTGTSG.js +0 -11
  650. package/dist/bin/shell/chunks/chunk-O74FSWB4.js +0 -4
  651. package/dist/bin/shell/chunks/chunk-OBVTFHVP.js +0 -7
  652. package/dist/bin/shell/chunks/chunk-OOKVPG5D.js +0 -6
  653. package/dist/bin/shell/chunks/chunk-PL4EU7Y2.js +0 -3
  654. package/dist/bin/shell/chunks/chunk-Q3LE3Y66.js +0 -13
  655. package/dist/bin/shell/chunks/chunk-QCGH2ZOW.js +0 -13
  656. package/dist/bin/shell/chunks/chunk-QKWMWSV3.js +0 -3
  657. package/dist/bin/shell/chunks/chunk-QL33F2W6.js +0 -8
  658. package/dist/bin/shell/chunks/chunk-S5Z7DMIE.js +0 -26
  659. package/dist/bin/shell/chunks/chunk-SQ7SZZMW.js +0 -8
  660. package/dist/bin/shell/chunks/chunk-SQUH76NP.js +0 -3
  661. package/dist/bin/shell/chunks/chunk-TGRZ42DS.js +0 -12
  662. package/dist/bin/shell/chunks/chunk-THTKNRO6.js +0 -7
  663. package/dist/bin/shell/chunks/chunk-TQXLQEIT.js +0 -9
  664. package/dist/bin/shell/chunks/chunk-TZ3S7MY6.js +0 -12
  665. package/dist/bin/shell/chunks/chunk-U6BXPMLD.js +0 -7
  666. package/dist/bin/shell/chunks/chunk-U6DBRMD5.js +0 -5
  667. package/dist/bin/shell/chunks/chunk-URRH3GPG.js +0 -10
  668. package/dist/bin/shell/chunks/chunk-VBU3UEG5.js +0 -7
  669. package/dist/bin/shell/chunks/chunk-VLWZ6L7C.js +0 -4
  670. package/dist/bin/shell/chunks/chunk-VTHA5UK5.js +0 -7
  671. package/dist/bin/shell/chunks/chunk-WBST7XJW.js +0 -9
  672. package/dist/bin/shell/chunks/chunk-WDV2ECOC.js +0 -3
  673. package/dist/bin/shell/chunks/chunk-WEQ5WM2M.js +0 -20
  674. package/dist/bin/shell/chunks/chunk-WFVCEB5T.js +0 -3
  675. package/dist/bin/shell/chunks/chunk-WZ7MIBLR.js +0 -37
  676. package/dist/bin/shell/chunks/chunk-X45GP3AQ.js +0 -3
  677. package/dist/bin/shell/chunks/chunk-XEQ7KSRM.js +0 -5
  678. package/dist/bin/shell/chunks/chunk-YIANER7Y.js +0 -8
  679. package/dist/bin/shell/chunks/chunk-YYZSYLJO.js +0 -6
  680. package/dist/bin/shell/chunks/chunk-Z3KAV6YJ.js +0 -10
  681. package/dist/bin/shell/chunks/chunk-Z5KICK5X.js +0 -22
  682. package/dist/bin/shell/chunks/column-LHHS4D3K.js +0 -3
  683. package/dist/bin/shell/chunks/comm-URDMZCXL.js +0 -3
  684. package/dist/bin/shell/chunks/cp-HPLQA35N.js +0 -3
  685. package/dist/bin/shell/chunks/curl-FIRG3RB6.js +0 -31
  686. package/dist/bin/shell/chunks/cut-KP3S36XS.js +0 -3
  687. package/dist/bin/shell/chunks/date-FJUBX7TJ.js +0 -3
  688. package/dist/bin/shell/chunks/diff-JSJ56EOK.js +0 -3
  689. package/dist/bin/shell/chunks/du-WEF5YWQK.js +0 -3
  690. package/dist/bin/shell/chunks/env-2TSVF4W7.js +0 -3
  691. package/dist/bin/shell/chunks/expand-P6SNTBGZ.js +0 -3
  692. package/dist/bin/shell/chunks/expr-FLWT4OCO.js +0 -3
  693. package/dist/bin/shell/chunks/file-JLUCGBCB.js +0 -3
  694. package/dist/bin/shell/chunks/find-XGVQ6N6L.js +0 -3
  695. package/dist/bin/shell/chunks/flag-coverage-4JYKIAVV.js +0 -3
  696. package/dist/bin/shell/chunks/fold-YEY7X54W.js +0 -3
  697. package/dist/bin/shell/chunks/grep-DCPCPQOS.js +0 -3
  698. package/dist/bin/shell/chunks/gzip-6DZIKNBW.js +0 -3
  699. package/dist/bin/shell/chunks/head-TLFXMM2T.js +0 -3
  700. package/dist/bin/shell/chunks/html-to-markdown-E22RLT2U.js +0 -3
  701. package/dist/bin/shell/chunks/join-UQKXU2QP.js +0 -3
  702. package/dist/bin/shell/chunks/jq-GDM3OBBK.js +0 -3
  703. package/dist/bin/shell/chunks/js-exec-VU6F6WLS.js +0 -1578
  704. package/dist/bin/shell/chunks/ls-67NUUIYT.js +0 -3
  705. package/dist/bin/shell/chunks/md5sum-Z6KAYGDK.js +0 -3
  706. package/dist/bin/shell/chunks/mkdir-AWDWRBKC.js +0 -3
  707. package/dist/bin/shell/chunks/mktemp-L6OGMDUO.js +0 -3
  708. package/dist/bin/shell/chunks/mv-4BJSOT4Y.js +0 -3
  709. package/dist/bin/shell/chunks/nl-XHWFVVKH.js +0 -3
  710. package/dist/bin/shell/chunks/od-SI75GLRE.js +0 -3
  711. package/dist/bin/shell/chunks/paste-5TSIBDF7.js +0 -3
  712. package/dist/bin/shell/chunks/printf-CNXNRQ3I.js +0 -3
  713. package/dist/bin/shell/chunks/python3-GUWCSSDP.js +0 -23
  714. package/dist/bin/shell/chunks/readlink-URO5XTBB.js +0 -3
  715. package/dist/bin/shell/chunks/rev-CZTQCNOZ.js +0 -3
  716. package/dist/bin/shell/chunks/rg-RVULUPDH.js +0 -3
  717. package/dist/bin/shell/chunks/rm-UCUTHC3I.js +0 -3
  718. package/dist/bin/shell/chunks/rmdir-J3HM7GGM.js +0 -3
  719. package/dist/bin/shell/chunks/sed-MCLGHZOI.js +0 -3
  720. package/dist/bin/shell/chunks/seq-I54NZE75.js +0 -3
  721. package/dist/bin/shell/chunks/sha1sum-CATBXX76.js +0 -3
  722. package/dist/bin/shell/chunks/sha256sum-YGSNBVY3.js +0 -3
  723. package/dist/bin/shell/chunks/sort-M3DO25D5.js +0 -3
  724. package/dist/bin/shell/chunks/split-VZO7223N.js +0 -3
  725. package/dist/bin/shell/chunks/sqlite3-HXVFVP4Z.js +0 -3
  726. package/dist/bin/shell/chunks/stat-UJ37RBMM.js +0 -3
  727. package/dist/bin/shell/chunks/strings-J2X2Z6N2.js +0 -3
  728. package/dist/bin/shell/chunks/tac-DG4BMYM5.js +0 -3
  729. package/dist/bin/shell/chunks/tail-5TSF5YM4.js +0 -3
  730. package/dist/bin/shell/chunks/tar-ZGZZDQXO.js +0 -3
  731. package/dist/bin/shell/chunks/tee-L4HKV5PD.js +0 -3
  732. package/dist/bin/shell/chunks/time-J2DAZUIN.js +0 -3
  733. package/dist/bin/shell/chunks/timeout-ATTDYXLX.js +0 -3
  734. package/dist/bin/shell/chunks/touch-TVQAUQOG.js +0 -3
  735. package/dist/bin/shell/chunks/tr-6RPFASYV.js +0 -3
  736. package/dist/bin/shell/chunks/unexpand-JPOQORZF.js +0 -3
  737. package/dist/bin/shell/chunks/uniq-K5VRDP4Q.js +0 -3
  738. package/dist/bin/shell/chunks/wc-VSQBRD6B.js +0 -3
  739. package/dist/bin/shell/chunks/xan-CCS53B7D.js +0 -3
  740. package/dist/bin/shell/chunks/xan-view-KOXASOEV.js +0 -3
  741. package/dist/bin/shell/chunks/xargs-HMISWW4I.js +0 -3
  742. package/dist/bin/shell/chunks/yes-ELH3XQWY.js +0 -3
  743. package/dist/bin/shell/chunks/yq-GSCDUHGM.js +0 -3
  744. package/dist/bundle/chunks/awk2-V7KYQWCD.js +0 -2
  745. package/dist/bundle/chunks/base64-QPSYZAAJ.js +0 -2
  746. package/dist/bundle/chunks/bash-HIEWVHJ2.js +0 -2
  747. package/dist/bundle/chunks/cat-54BXBS6X.js +0 -2
  748. package/dist/bundle/chunks/chmod-4OPV4QKK.js +0 -2
  749. package/dist/bundle/chunks/chunk-2KNTH3KH.js +0 -9
  750. package/dist/bundle/chunks/chunk-2VWG4LDT.js +0 -11
  751. package/dist/bundle/chunks/chunk-2WBUTDF5.js +0 -2
  752. package/dist/bundle/chunks/chunk-3HDTNUL3.js +0 -6
  753. package/dist/bundle/chunks/chunk-3KWM4FFA.js +0 -12
  754. package/dist/bundle/chunks/chunk-4AKAIZPW.js +0 -15
  755. package/dist/bundle/chunks/chunk-4IMUNIUJ.js +0 -21
  756. package/dist/bundle/chunks/chunk-5ATEFZLC.js +0 -4
  757. package/dist/bundle/chunks/chunk-5BMPT6SF.js +0 -19
  758. package/dist/bundle/chunks/chunk-5QWGR2WA.js +0 -21
  759. package/dist/bundle/chunks/chunk-5UTZMNI5.js +0 -64
  760. package/dist/bundle/chunks/chunk-5VCAQBXL.js +0 -17
  761. package/dist/bundle/chunks/chunk-65LVAUWW.js +0 -7
  762. package/dist/bundle/chunks/chunk-6D3WD6YU.js +0 -3
  763. package/dist/bundle/chunks/chunk-6R4OQQWP.js +0 -16
  764. package/dist/bundle/chunks/chunk-6WGIZV3E.js +0 -13
  765. package/dist/bundle/chunks/chunk-72JHTO7E.js +0 -2
  766. package/dist/bundle/chunks/chunk-7GA3QWJJ.js +0 -33
  767. package/dist/bundle/chunks/chunk-7M672HB6.js +0 -21
  768. package/dist/bundle/chunks/chunk-AFFAMSJT.js +0 -14
  769. package/dist/bundle/chunks/chunk-ANCQ4SCV.js +0 -2
  770. package/dist/bundle/chunks/chunk-B3NGH6KE.js +0 -5
  771. package/dist/bundle/chunks/chunk-B5Z5HTFY.js +0 -14
  772. package/dist/bundle/chunks/chunk-B6OSJB22.js +0 -26
  773. package/dist/bundle/chunks/chunk-BM3X75NC.js +0 -36
  774. package/dist/bundle/chunks/chunk-CGI6V2HW.js +0 -11
  775. package/dist/bundle/chunks/chunk-CHHWTPDH.js +0 -3
  776. package/dist/bundle/chunks/chunk-D5ZJISRS.js +0 -11
  777. package/dist/bundle/chunks/chunk-DIRWTBKE.js +0 -19
  778. package/dist/bundle/chunks/chunk-DIWMSSQY.js +0 -2
  779. package/dist/bundle/chunks/chunk-DPZVOEUP.js +0 -6
  780. package/dist/bundle/chunks/chunk-EFORKKSH.js +0 -8
  781. package/dist/bundle/chunks/chunk-EGTVQWAP.js +0 -20
  782. package/dist/bundle/chunks/chunk-EJFBIRMD.js +0 -6
  783. package/dist/bundle/chunks/chunk-EQQGPAXI.js +0 -9
  784. package/dist/bundle/chunks/chunk-EXXOLIVE.js +0 -35
  785. package/dist/bundle/chunks/chunk-FIMO5HLX.js +0 -2
  786. package/dist/bundle/chunks/chunk-FT6ODGOU.js +0 -2
  787. package/dist/bundle/chunks/chunk-FZRQOL3C.js +0 -7
  788. package/dist/bundle/chunks/chunk-GLAFXDZC.js +0 -4
  789. package/dist/bundle/chunks/chunk-GN6CQ3J4.js +0 -2
  790. package/dist/bundle/chunks/chunk-H42OAUJL.js +0 -12
  791. package/dist/bundle/chunks/chunk-H53EPEGD.js +0 -12
  792. package/dist/bundle/chunks/chunk-HDOXCDVK.js +0 -7
  793. package/dist/bundle/chunks/chunk-HIQEVPXM.js +0 -2
  794. package/dist/bundle/chunks/chunk-J2OBOJ64.js +0 -2
  795. package/dist/bundle/chunks/chunk-LVDUF74R.js +0 -7
  796. package/dist/bundle/chunks/chunk-M4LDT7V7.js +0 -6
  797. package/dist/bundle/chunks/chunk-MDE25PQK.js +0 -15
  798. package/dist/bundle/chunks/chunk-MHDZERK4.js +0 -6
  799. package/dist/bundle/chunks/chunk-MHZF23KB.js +0 -33
  800. package/dist/bundle/chunks/chunk-N6W6FM4N.js +0 -8
  801. package/dist/bundle/chunks/chunk-NRLE7KYI.js +0 -6
  802. package/dist/bundle/chunks/chunk-OB46N7Q7.js +0 -2
  803. package/dist/bundle/chunks/chunk-OQ7C4FYO.js +0 -2
  804. package/dist/bundle/chunks/chunk-P5BOIHWV.js +0 -6
  805. package/dist/bundle/chunks/chunk-PPDMRIJ7.js +0 -11
  806. package/dist/bundle/chunks/chunk-PPHGMG47.js +0 -142
  807. package/dist/bundle/chunks/chunk-R6ZGLVXI.js +0 -9
  808. package/dist/bundle/chunks/chunk-RCRHDT54.js +0 -274
  809. package/dist/bundle/chunks/chunk-RIIUVFUS.js +0 -7
  810. package/dist/bundle/chunks/chunk-SQX6WQXB.js +0 -7
  811. package/dist/bundle/chunks/chunk-SRB6FXRH.js +0 -2
  812. package/dist/bundle/chunks/chunk-T4INBNHX.js +0 -8
  813. package/dist/bundle/chunks/chunk-TUQG2YRH.js +0 -5
  814. package/dist/bundle/chunks/chunk-U7UNEMLJ.js +0 -2
  815. package/dist/bundle/chunks/chunk-UHHCL65P.js +0 -3
  816. package/dist/bundle/chunks/chunk-UK2K3DHN.js +0 -8
  817. package/dist/bundle/chunks/chunk-VDJ53ESK.js +0 -9
  818. package/dist/bundle/chunks/chunk-VGCXKMXN.js +0 -10
  819. package/dist/bundle/chunks/chunk-W5DWRFSU.js +0 -2
  820. package/dist/bundle/chunks/chunk-W5J5ADJF.js +0 -100
  821. package/dist/bundle/chunks/chunk-XHFP44Y4.js +0 -5
  822. package/dist/bundle/chunks/chunk-Y32R7EZP.js +0 -25
  823. package/dist/bundle/chunks/chunk-Y62SXZKJ.js +0 -12
  824. package/dist/bundle/chunks/chunk-YUFU7O6I.js +0 -16
  825. package/dist/bundle/chunks/chunk-YZH7FUSY.js +0 -14
  826. package/dist/bundle/chunks/column-F5JDBRV6.js +0 -2
  827. package/dist/bundle/chunks/comm-DTWKU2MC.js +0 -2
  828. package/dist/bundle/chunks/cp-LTFB4EUA.js +0 -2
  829. package/dist/bundle/chunks/curl-XCX2ZQEA.js +0 -30
  830. package/dist/bundle/chunks/cut-IRSHL3BB.js +0 -2
  831. package/dist/bundle/chunks/date-FN2DXAEE.js +0 -2
  832. package/dist/bundle/chunks/diff-VDB6RXHO.js +0 -2
  833. package/dist/bundle/chunks/du-DOWSRLXR.js +0 -2
  834. package/dist/bundle/chunks/env-VUUMB47B.js +0 -2
  835. package/dist/bundle/chunks/expand-2BPPGGSM.js +0 -2
  836. package/dist/bundle/chunks/expr-GZ4DABKB.js +0 -2
  837. package/dist/bundle/chunks/file-UI6QJAAU.js +0 -2
  838. package/dist/bundle/chunks/find-JTXDH3MR.js +0 -2
  839. package/dist/bundle/chunks/flag-coverage-EDO3VM43.js +0 -2
  840. package/dist/bundle/chunks/fold-QJBPHRFJ.js +0 -2
  841. package/dist/bundle/chunks/grep-OZCR76FT.js +0 -2
  842. package/dist/bundle/chunks/gzip-GQC6CWVL.js +0 -2
  843. package/dist/bundle/chunks/head-J6RVJFRS.js +0 -2
  844. package/dist/bundle/chunks/html-to-markdown-7OG5VWYG.js +0 -2
  845. package/dist/bundle/chunks/join-KQ4Z5OD4.js +0 -2
  846. package/dist/bundle/chunks/jq-FCG2IUBK.js +0 -2
  847. package/dist/bundle/chunks/js-exec-NDLXDUBN.js +0 -1577
  848. package/dist/bundle/chunks/ls-MQTYWW4T.js +0 -2
  849. package/dist/bundle/chunks/md5sum-JEDX55KS.js +0 -2
  850. package/dist/bundle/chunks/mkdir-4A5W3RXH.js +0 -2
  851. package/dist/bundle/chunks/mktemp-XKIE5N3X.js +0 -2
  852. package/dist/bundle/chunks/mv-ZPIATQJL.js +0 -2
  853. package/dist/bundle/chunks/nl-RFXH2GNX.js +0 -2
  854. package/dist/bundle/chunks/od-LUHOH7CG.js +0 -2
  855. package/dist/bundle/chunks/paste-U57ZU47S.js +0 -2
  856. package/dist/bundle/chunks/printf-V42QCPHL.js +0 -2
  857. package/dist/bundle/chunks/python3-SDFCGIU4.js +0 -22
  858. package/dist/bundle/chunks/readlink-YNNS6F7K.js +0 -2
  859. package/dist/bundle/chunks/rev-EPOS3MFH.js +0 -2
  860. package/dist/bundle/chunks/rg-F4SX2PHI.js +0 -2
  861. package/dist/bundle/chunks/rm-3XUUYAXQ.js +0 -2
  862. package/dist/bundle/chunks/rmdir-OGSEXEF4.js +0 -2
  863. package/dist/bundle/chunks/sed-MBB5SXGD.js +0 -2
  864. package/dist/bundle/chunks/seq-IN77HD3S.js +0 -2
  865. package/dist/bundle/chunks/sha1sum-BLPZJ6MP.js +0 -2
  866. package/dist/bundle/chunks/sha256sum-VJZ4PHQ4.js +0 -2
  867. package/dist/bundle/chunks/sort-PV2NEQHF.js +0 -2
  868. package/dist/bundle/chunks/split-6R2TSQY6.js +0 -2
  869. package/dist/bundle/chunks/sqlite3-7MBPFI6W.js +0 -2
  870. package/dist/bundle/chunks/stat-YLVJ4L67.js +0 -2
  871. package/dist/bundle/chunks/strings-WTD7Q2EF.js +0 -2
  872. package/dist/bundle/chunks/tac-YXC4HBTR.js +0 -2
  873. package/dist/bundle/chunks/tail-UGFWX3YY.js +0 -2
  874. package/dist/bundle/chunks/tar-BNHPWTOY.js +0 -2
  875. package/dist/bundle/chunks/tee-OOWSWHRQ.js +0 -2
  876. package/dist/bundle/chunks/time-N6J6DC6C.js +0 -2
  877. package/dist/bundle/chunks/timeout-ZHCL5KTP.js +0 -2
  878. package/dist/bundle/chunks/touch-W4DF6Z4T.js +0 -2
  879. package/dist/bundle/chunks/tr-4NGL47UU.js +0 -2
  880. package/dist/bundle/chunks/unexpand-YD5BWFH4.js +0 -2
  881. package/dist/bundle/chunks/uniq-OVOW532K.js +0 -2
  882. package/dist/bundle/chunks/wc-RUR7HE5O.js +0 -2
  883. package/dist/bundle/chunks/xan-7R3I2DJO.js +0 -2
  884. package/dist/bundle/chunks/xan-view-S4ZILLPU.js +0 -2
  885. package/dist/bundle/chunks/xargs-L7TJHOJT.js +0 -2
  886. package/dist/bundle/chunks/yes-I7SAR7XX.js +0 -2
  887. package/dist/bundle/chunks/yq-IOMBQYB2.js +0 -2
@@ -1,143 +0,0 @@
1
- #!/usr/bin/env node
2
- import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{a as $,b as F,c as b,d as j,e as Ze,f as et,g as C,h as tt,i as nt,j as k,k as ie,l as ae}from"./chunk-44SKMHU6.js";import{b as V,d as Qe}from"./chunk-HFW2LXQV.js";import{d as Ge,f as Xe,g as oe}from"./chunk-WDV2ECOC.js";import{a as Z}from"./chunk-LG6IN6SW.js";import{b as Ye}from"./chunk-O74FSWB4.js";import{a as q}from"./chunk-IKUY74NG.js";import{a as W,d as se,e as re}from"./chunk-QKWMWSV3.js";import{l as E}from"./chunk-LCP3IKI7.js";import{a as K,b as Y}from"./chunk-CPKBPQ2C.js";import{a as J,b as ne}from"./chunk-MUFNRCMY.js";var G=class{input;pos=0;tokens=[];maxSourceLength;maxTokens;constructor(t,n={}){this.input=t,this.maxSourceLength=n.maxSourceLength??1024*1024,this.maxTokens=n.maxTokens??1e5}tokenize(){if(this.input.length>this.maxSourceLength)throw new E(`xan: expression length limit exceeded (${this.maxSourceLength})`,"string_length");for(;this.pos<this.input.length&&(this.skipWhitespace(),!(this.pos>=this.input.length));){let t=this.nextToken();t&&(this.assertTokenCapacity(),this.tokens.push(t))}return this.assertTokenCapacity(),this.tokens.push({type:"eof",value:"",pos:this.pos}),this.tokens}assertTokenCapacity(){if(this.tokens.length>=this.maxTokens)throw new E(`xan: expression token limit exceeded (${this.maxTokens})`,"array_elements")}skipWhitespace(){for(;this.pos<this.input.length;){let t=this.input[this.pos];if(t===" "||t===" "||t===`
4
- `||t==="\r")this.pos++;else if(t==="#")for(;this.pos<this.input.length&&this.input[this.pos]!==`
5
- `;)this.pos++;else break}}nextToken(){let t=this.pos,n=this.input[this.pos];if(n>="0"&&n<="9")return this.readNumber();if(n==='"'||n==="'"||n==="`")return this.readString(n);if(n==="b"&&this.pos+1<this.input.length){let o=this.input[this.pos+1];if(o==='"'||o==="'"||o==="`")return this.pos++,this.readString(o)}if(n==="/"){let o=this.tokens[this.tokens.length-1];return o&&(o.type==="int"||o.type==="float"||o.type==="string"||o.type==="ident"||o.type===")"||o.type==="]")?this.input[this.pos+1]==="/"?(this.pos+=2,{type:"//",value:"//",pos:t}):(this.pos++,{type:"/",value:"/",pos:t}):this.readRegex()}if(this.match("not in"))return{type:"not in",value:"not in",pos:t};if(this.match("=>"))return{type:"=>",value:"=>",pos:t};if(this.match("**"))return{type:"**",value:"**",pos:t};if(this.match("++"))return{type:"++",value:"++",pos:t};if(this.match("//"))return{type:"//",value:"//",pos:t};if(this.match("=="))return{type:"==",value:"==",pos:t};if(this.match("!="))return{type:"!=",value:"!=",pos:t};if(this.match("<="))return{type:"<=",value:"<=",pos:t};if(this.match(">="))return{type:">=",value:">=",pos:t};if(this.match("&&"))return{type:"&&",value:"&&",pos:t};if(this.match("||"))return{type:"||",value:"||",pos:t};let r=new Map([["(","("],[")",")"],["[","["],["]","]"],["{","{"],["}","}"],[",",","],[":",":"],[";",";"],["+","+"],["-","-"],["*","*"],["%","%"],["<","<"],[">",">"],["!","!"],[".","."],["|","|"],["=","="]]).get(n);if(r!==void 0)return this.pos++,{type:r,value:n,pos:t};if(this.isIdentStart(n))return this.readIdentifier();throw new Error(`Unexpected character '${n}' at position ${this.pos}`)}match(t){if(this.input.slice(this.pos,this.pos+t.length)===t){if(/^[a-zA-Z]/.test(t)){let n=this.input[this.pos+t.length];if(n&&this.isIdentChar(n))return!1}return this.pos+=t.length,!0}return!1}isIdentStart(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="_"}isIdentChar(t){return this.isIdentStart(t)||t>="0"&&t<="9"}readNumber(){let t=this.pos,n=!1,s=!1;for(;this.pos<this.input.length;){let o=this.input[this.pos];if(o>="0"&&o<="9")this.pos++;else if(o==="_")this.pos++;else if(o==="."&&!n&&!s)n=!0,this.pos++;else if((o==="e"||o==="E")&&!s)s=!0,n=!0,this.pos++,this.pos<this.input.length&&(this.input[this.pos]==="+"||this.input[this.pos]==="-")&&this.pos++;else break}let r=this.input.slice(t,this.pos).replace(/_/g,"");return{type:n?"float":"int",value:r,pos:t}}readString(t){let n=this.pos;this.pos++;let s="";for(;this.pos<this.input.length;){let r=this.input[this.pos];if(r===t)return this.pos++,{type:"string",value:s,pos:n};if(r==="\\"){if(this.pos++,this.pos<this.input.length){let o=this.input[this.pos];switch(o){case"n":s+=`
6
- `;break;case"r":s+="\r";break;case"t":s+=" ";break;case"\\":s+="\\";break;case'"':s+='"';break;case"'":s+="'";break;case"`":s+="`";break;case"0":s+="\0";break;default:s+=o}this.pos++}}else s+=r,this.pos++}throw new Error(`Unterminated string starting at position ${n}`)}readRegex(){let t=this.pos;this.pos++;let n="",s="";for(;this.pos<this.input.length;){let r=this.input[this.pos];if(r==="/"){for(this.pos++;this.pos<this.input.length&&this.input[this.pos]==="i";)s+=this.input[this.pos],this.pos++;return{type:"regex",value:n+(s?`/${s}`:""),pos:t}}r==="\\"?(n+=r,this.pos++,this.pos<this.input.length&&(n+=this.input[this.pos],this.pos++)):(n+=r,this.pos++)}throw new Error(`Unterminated regex starting at position ${t}`)}readIdentifier(){let t=this.pos;for(;this.pos<this.input.length&&this.isIdentChar(this.input[this.pos]);)this.pos++;let n=!1;this.pos<this.input.length&&this.input[this.pos]==="?"&&(n=!0,this.pos++);let s=this.input.slice(t,n?this.pos-1:this.pos);n&&(s+="?");let r=new Map([["true","true"],["false","false"],["null","null"],["and","and"],["or","or"],["eq","eq"],["ne","ne"],["lt","lt"],["le","le"],["gt","gt"],["ge","ge"],["in","in"],["as","as"],["_","_"]]),o=s.replace(/\?$/,""),i=r.get(o);return i!==void 0&&!n?{type:i,value:o,pos:t}:{type:"ident",value:s,pos:t}}};function z(e){return{maxSourceLength:e.limits.maxStringLength,maxTokens:e.limits.maxQueryTokens,maxAstNodes:e.limits.maxQueryElements,maxOperations:e.limits.maxJqIterations,maxDepth:e.limits.maxQueryDepth}}var D={PIPE:1,OR:2,AND:3,EQUALITY:4,COMPARISON:5,ADDITIVE:6,MULTIPLICATIVE:7,POWER:8,UNARY:9,POSTFIX:10},ee=class{pos=0;tokens;depth=0;operations=0;astNodes=0;limits;constructor(t,n={}){this.tokens=t,this.limits={maxSourceLength:n.maxSourceLength??1024*1024,maxTokens:n.maxTokens??1e5,maxDepth:n.maxDepth??100,maxOperations:n.maxOperations??1e5,maxAstNodes:n.maxAstNodes??1e5};let s=0;for(let r of t)this.useOperation(),r.type==="("||r.type==="["||r.type==="{"?(s++,s>this.limits.maxDepth&&this.throwDepthLimit()):(r.type===")"||r.type==="]"||r.type==="}")&&(s=Math.max(0,s-1))}parse(){let t=this.parseExpr(0);if(this.peek().type!=="eof")throw new Error(`Unexpected token: ${this.peek().value}`);return t}parseExpr(t){return this.withDepth(()=>this.parseExprInner(t))}parseExprInner(t){let n=this.parsePrefix();for(;;){let s=this.peek(),r=this.getInfixPrec(s.type);if(r<t)break;n=this.parseInfix(n,r)}return n}useOperation(t=1){if(t>this.limits.maxOperations-this.operations)throw new E(`xan: expression parser operation limit exceeded (${this.limits.maxOperations})`,"iterations");this.operations+=t}withDepth(t){this.depth>=this.limits.maxDepth&&this.throwDepthLimit(),this.depth++;try{return t()}finally{this.depth--}}throwDepthLimit(){throw new E(`xan: expression parser depth limit exceeded (${this.limits.maxDepth})`,"recursion")}addAstNode(){if(this.astNodes>=this.limits.maxAstNodes)throw new E(`xan: expression AST node limit exceeded (${this.limits.maxAstNodes})`,"array_elements");this.astNodes++}parsePrefix(){let t=this.peek();switch(t.type){case"int":return this.advance(),{type:"int",value:Number.parseInt(t.value,10)};case"float":return this.advance(),{type:"float",value:Number.parseFloat(t.value)};case"string":return this.advance(),{type:"string",value:t.value};case"regex":{this.advance();let n=t.value.split("/"),s=n.length>1?n[n.length-1]:"";return{type:"regex",pattern:n.slice(0,-1).join("/")||t.value,caseInsensitive:s.includes("i")}}case"true":return this.advance(),{type:"bool",value:!0};case"false":return this.advance(),{type:"bool",value:!1};case"null":return this.advance(),{type:"null"};case"_":return this.advance(),{type:"underscore"};case"ident":{let n=t.value,s=n.endsWith("?"),r=s?n.slice(0,-1):n;if(this.advance(),this.peek().type==="(")return this.parseFunctionCall(r);if(this.peek().type==="=>"){this.advance();let o=this.parseExpr(0);return this.bindLambdaArgs({type:"lambda",params:[r],body:o},[r])}return{type:"identifier",name:r,unsure:s}}case"(":{this.advance();let n=this.pos;if(this.peek().type===")"){if(this.advance(),this.peek().type==="=>"){this.advance();let r=this.parseExpr(0);return{type:"lambda",params:[],body:r}}throw new Error("Empty parentheses not allowed")}if(this.peek().type==="ident"){let r=[this.peek().value];this.advance();let o=!0;for(;this.peek().type===",";)if(this.advance(),this.peek().type==="ident")r.push(this.peek().value),this.advance();else{o=!1;break}if(o&&this.peek().type===")"&&this.peekAt(1).type==="=>"){this.advance(),this.advance();let i=this.parseExpr(0);return this.bindLambdaArgs({type:"lambda",params:r,body:i},r)}this.pos=n}let s=this.parseExpr(0);return this.expect(")"),s}case"[":return this.parseList();case"{":return this.parseMap();case"-":{this.advance();let n=this.parseExpr(D.UNARY);return n.type==="int"?{type:"int",value:-n.value}:n.type==="float"?{type:"float",value:-n.value}:{type:"func",name:"neg",args:[{expr:n}]}}case"!":return this.advance(),{type:"func",name:"not",args:[{expr:this.parseExpr(D.UNARY)}]};default:throw new Error(`Unexpected token: ${t.type} (${t.value})`)}}parseFunctionCall(t){this.expect("(");let n=[];if(this.peek().type!==")")do{n.length>0&&this.peek().type===","&&this.advance();let s;if(this.peek().type==="ident"){let o=this.peek().value,i=this.pos+1;i<this.tokens.length&&this.tokens[i].type==="="&&(s=o,this.advance(),this.advance())}let r=this.parseExpr(0);n.push({name:s,expr:r})}while(this.peek().type===",");return this.expect(")"),{type:"func",name:t.toLowerCase(),args:n}}parseList(){this.expect("[");let t=[];if(this.peek().type!=="]")do t.length>0&&this.peek().type===","&&this.advance(),t.push(this.parseExpr(0));while(this.peek().type===",");return this.expect("]"),{type:"list",elements:t}}parseMap(){this.expect("{");let t=[];if(this.peek().type!=="}")do{t.length>0&&this.peek().type===","&&this.advance();let n;if(this.peek().type==="ident")n=this.peek().value,this.advance();else if(this.peek().type==="string")n=this.peek().value,this.advance();else throw new Error(`Expected map key, got ${this.peek().type}`);this.expect(":");let s=this.parseExpr(0);t.push({key:n,value:s})}while(this.peek().type===",");return this.expect("}"),{type:"map",entries:t}}parseInfix(t,n){let s=this.peek(),o=new Map([["+","add"],["-","sub"],["*","mul"],["/","div"],["//","idiv"],["%","mod"],["**","pow"],["++","concat"],["==","=="],["!=","!="],["<","<"],["<=","<="],[">",">"],[">=",">="],["eq","eq"],["ne","ne"],["lt","lt"],["le","le"],["gt","gt"],["ge","ge"],["&&","and"],["and","and"],["||","or"],["or","or"]]).get(s.type);if(o!==void 0){this.advance();let i=this.parseExpr(n+(this.isRightAssoc(s.type)?0:1));return{type:"func",name:o,args:[{expr:t},{expr:i}]}}if(s.type==="|"){this.advance();let i=this.parseExpr(n);return this.handlePipe(t,i)}if(s.type===".")return this.advance(),this.handleDot(t);if(s.type==="[")return this.advance(),this.handleIndexing(t);if(s.type==="in")return this.advance(),{type:"func",name:"contains",args:[{expr:this.parseExpr(n+1)},{expr:t}]};if(s.type==="not in")return this.advance(),{type:"func",name:"not",args:[{expr:{type:"func",name:"contains",args:[{expr:this.parseExpr(n+1)},{expr:t}]}}]};throw new Error(`Unexpected infix token: ${s.type}`)}handlePipe(t,n){if(n.type==="identifier")return{type:"func",name:n.name,args:[{expr:t}]};if(n.type==="func"){let s=this.countUnderscores(n);return s===0?n:s===1?this.fillUnderscore(n,t):{type:"pipeline",exprs:[t,n]}}return this.countUnderscores(n)===1?this.fillUnderscore(n,t):n}handleDot(t){let n=this.peek();if(n.type==="ident"){let s=n.value;if(this.advance(),this.peek().type==="("){let r=this.parseFunctionCall(s);return r.type==="func"&&r.args.unshift({expr:t}),r}return{type:"func",name:"get",args:[{expr:t},{expr:{type:"string",value:s}}]}}if(n.type==="int"){let s=Number.parseInt(n.value,10);return this.advance(),{type:"func",name:"get",args:[{expr:t},{expr:{type:"int",value:s}}]}}if(n.type==="string"){let s=n.value;return this.advance(),{type:"func",name:"get",args:[{expr:t},{expr:{type:"string",value:s}}]}}throw new Error(`Expected identifier, number, or string after dot, got ${n.type}`)}handleIndexing(t){if(this.peek().type===":"){if(this.advance(),this.peek().type==="]")return this.advance(),{type:"func",name:"slice",args:[{expr:t}]};let s=this.parseExpr(0);return this.expect("]"),{type:"func",name:"slice",args:[{expr:t},{expr:{type:"int",value:0}},{expr:s}]}}let n=this.parseExpr(0);if(this.peek().type===":"){if(this.advance(),this.peek().type==="]")return this.advance(),{type:"func",name:"slice",args:[{expr:t},{expr:n}]};let s=this.parseExpr(0);return this.expect("]"),{type:"func",name:"slice",args:[{expr:t},{expr:n},{expr:s}]}}return this.expect("]"),{type:"func",name:"get",args:[{expr:t},{expr:n}]}}countUnderscores(t){let n=[t],s=0;for(;n.length>0;){this.useOperation();let r=n.pop();if(!r)break;if(r.type==="underscore")s++;else if(r.type==="func")for(let o of r.args)n.push(o.expr);else if(r.type==="list")n.push(...r.elements);else if(r.type==="map")for(let o of r.entries)n.push(o.value);if(n.length>this.limits.maxAstNodes)throw new E(`xan: expression AST node limit exceeded (${this.limits.maxAstNodes})`,"array_elements")}return s}fillUnderscore(t,n){return this.withDepth(()=>this.fillUnderscoreInner(t,n))}fillUnderscoreInner(t,n){return this.useOperation(),t.type==="underscore"?n:t.type==="func"?{...t,args:t.args.map(s=>({...s,expr:this.fillUnderscore(s.expr,n)}))}:t.type==="list"?{...t,elements:t.elements.map(s=>this.fillUnderscore(s,n))}:t.type==="map"?{...t,entries:t.entries.map(s=>({...s,value:this.fillUnderscore(s.value,n)}))}:t}bindLambdaArgs(t,n){return{...t,body:this.bindLambdaArgsInExpr(t.body,n)}}bindLambdaArgsInExpr(t,n){return this.withDepth(()=>this.bindLambdaArgsInExprInner(t,n))}bindLambdaArgsInExprInner(t,n){return this.useOperation(),t.type==="identifier"&&n.includes(t.name)?{type:"lambdaBinding",name:t.name}:t.type==="func"?{...t,args:t.args.map(s=>({...s,expr:this.bindLambdaArgsInExpr(s.expr,n)}))}:t.type==="list"?{...t,elements:t.elements.map(s=>this.bindLambdaArgsInExpr(s,n))}:t.type==="map"?{...t,entries:t.entries.map(s=>({...s,value:this.bindLambdaArgsInExpr(s.value,n)}))}:t}getInfixPrec(t){switch(t){case"|":return D.PIPE;case"||":case"or":return D.OR;case"&&":case"and":return D.AND;case"==":case"!=":case"eq":case"ne":return D.EQUALITY;case"<":case"<=":case">":case">=":case"lt":case"le":case"gt":case"ge":case"in":case"not in":return D.COMPARISON;case"+":case"-":case"++":return D.ADDITIVE;case"*":case"/":case"//":case"%":return D.MULTIPLICATIVE;case"**":return D.POWER;case".":case"[":return D.POSTFIX;default:return-1}}isRightAssoc(t){return t==="**"}peek(){return this.tokens[this.pos]||{type:"eof",value:"",pos:0}}peekAt(t){return this.tokens[this.pos+t]||{type:"eof",value:"",pos:0}}advance(){return this.useOperation(),this.addAstNode(),this.tokens[this.pos++]}expect(t){let n=this.peek();if(n.type!==t)throw new Error(`Expected ${t}, got ${n.type}`);return this.advance()}};function X(e,t={}){let n=[],r=new G(e,{maxSourceLength:t.maxSourceLength,maxTokens:t.maxTokens}).tokenize(),o=0,i=()=>r[o]||{type:"eof",value:"",pos:0},p=()=>r[o++];for(;i().type!=="eof";){if(i().type===","&&n.length>0){p();continue}let h=[],m=0,c=o;for(;i().type!=="eof";){let l=i();if((l.type===","||l.type==="as")&&m===0)break;(l.type==="("||l.type==="["||l.type==="{")&&m++,(l.type===")"||l.type==="]"||l.type==="}")&&m--,h.push(p())}h.push({type:"eof",value:"",pos:0});let d=new ee(h,t).parse(),u;if(i().type==="as")if(p(),i().type==="("){p();let l=[];for(;i().type!==")"&&i().type!=="eof";)if((i().type==="ident"||i().type==="string")&&(l.push(i().value),p()),i().type===",")p();else if(i().type!==")"&&i().type!=="eof")throw new Error(`Expected tuple alias, got ${i().type}`);if(i().type!==")")throw new Error("Expected ')' after tuple alias");p(),u=l}else if(i().type==="ident"||i().type==="string")u=i().value,p();else throw new Error(`Expected name after 'as', got ${i().type}`);else u=e.slice(r[c].pos,r[o-1]?.pos||e.length).trim(),d.type==="identifier"&&(u=d.name);n.push({expr:d,name:u})}return n}function B(e,t={}){let s=new G(e,{maxSourceLength:t.maxSourceLength,maxTokens:t.maxTokens}).tokenize();return new ee(s,t).parse()}function R(e,t){return t.length===0?O(e,[]):t.length===1?{type:"Pipe",left:t[0],right:O(e,[])}:{type:"Pipe",left:t[0],right:O(e,t.slice(1))}}var le={add:e=>L("+",e[0],e[1]),sub:e=>L("-",e[0],e[1]),mul:e=>L("*",e[0],e[1]),div:e=>L("/",e[0],e[1]),mod:e=>L("%",e[0],e[1]),idiv:e=>O("floor",[L("/",e[0],e[1])]),pow:e=>R("pow",e),neg:e=>({type:"UnaryOp",op:"-",operand:e[0]}),"==":e=>L("==",e[0],e[1]),"!=":e=>L("!=",e[0],e[1]),"<":e=>L("<",e[0],e[1]),"<=":e=>L("<=",e[0],e[1]),">":e=>L(">",e[0],e[1]),">=":e=>L(">=",e[0],e[1]),eq:e=>L("==",M(e[0]),M(e[1])),ne:e=>L("!=",M(e[0]),M(e[1])),lt:e=>L("<",M(e[0]),M(e[1])),le:e=>L("<=",M(e[0]),M(e[1])),gt:e=>L(">",M(e[0]),M(e[1])),ge:e=>L(">=",M(e[0]),M(e[1])),and:e=>L("and",e[0],e[1]),or:e=>L("or",e[0],e[1]),not:e=>({type:"UnaryOp",op:"not",operand:e[0]}),len:e=>R("length",e),length:e=>R("length",e),upper:e=>R("ascii_upcase",e),lower:e=>R("ascii_downcase",e),trim:e=>R("trim",e),ltrim:e=>e.length===0?O("ltrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:O("ltrimstr",[{type:"Literal",value:" "}])},rtrim:e=>e.length===0?O("rtrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:O("rtrimstr",[{type:"Literal",value:" "}])},split:e=>R("split",e),join:e=>e.length===1?O("join",[{type:"Literal",value:""}]):R("join",e),concat:e=>L("+",e[0],e[1]),startswith:e=>R("startswith",e),endswith:e=>R("endswith",e),contains:e=>R("contains",e),replace:e=>R("gsub",e),substr:e=>e.length===2?{type:"Slice",base:e[0],start:e[1]}:{type:"Slice",base:e[0],start:e[1],end:L("+",e[1],e[2])},abs:e=>R("fabs",e),floor:e=>R("floor",e),ceil:e=>R("ceil",e),round:e=>R("round",e),sqrt:e=>R("sqrt",e),log:e=>R("log",e),log10:e=>R("log10",e),log2:e=>R("log2",e),exp:e=>R("exp",e),sin:e=>R("sin",e),cos:e=>R("cos",e),tan:e=>R("tan",e),asin:e=>R("asin",e),acos:e=>R("acos",e),atan:e=>R("atan",e),min:e=>R("min",e),max:e=>R("max",e),first:e=>e.length===0?{type:"Index",index:{type:"Literal",value:0}}:{type:"Index",index:{type:"Literal",value:0},base:e[0]},last:e=>e.length===0?{type:"Index",index:{type:"Literal",value:-1}}:{type:"Index",index:{type:"Literal",value:-1},base:e[0]},get:e=>e.length===1?{type:"Index",index:e[0]}:{type:"Index",index:e[1],base:e[0]},slice:e=>e.length===1?{type:"Slice",base:e[0]}:e.length===2?{type:"Slice",base:e[0],start:e[1]}:{type:"Slice",base:e[0],start:e[1],end:e[2]},keys:"keys",values:"values",entries:e=>O("to_entries",e),from_entries:"from_entries",reverse:"reverse",sort:"sort",sort_by:"sort_by",group_by:"group_by",unique:"unique",unique_by:"unique_by",flatten:"flatten",map:e=>({type:"Pipe",left:e[0],right:{type:"Array",elements:e[1]}}),select:e=>O("select",e),empty:()=>O("empty",[]),count:()=>O("length",[]),sum:e=>e.length===0?O("add",[]):{type:"Pipe",left:{type:"Array",elements:e[0]},right:O("add",[])},mean:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:L("/",O("add",[]),O("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:L("/",O("add",[]),O("length",[]))},avg:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:L("/",O("add",[]),O("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:L("/",O("add",[]),O("length",[]))},type:"type",isnull:e=>e.length===0?L("==",{type:"Identity"},{type:"Literal",value:null}):L("==",e[0],{type:"Literal",value:null}),isempty:e=>e.length===0?L("==",{type:"Identity"},{type:"Literal",value:""}):L("==",e[0],{type:"Literal",value:""}),tonumber:e=>e.length===0?O("tonumber",[]):O("tonumber",e),tostring:e=>e.length===0?O("tostring",[]):O("tostring",e),if:e=>st(e[0],e[1],e[2]),coalesce:e=>{if(e.length===0)return{type:"Literal",value:null};if(e.length===1)return e[0];let t=e[e.length-1];for(let n=e.length-2;n>=0;n--){let s=e[n],r=L("and",L("!=",s,{type:"Literal",value:null}),L("!=",s,{type:"Literal",value:""}));t=st(r,s,t)}return t},index:()=>({type:"Field",name:"_row_index"}),now:()=>O("now",[]),fmt:e=>O("tostring",e),format:e=>O("tostring",e)};Object.setPrototypeOf(le,null);function L(e,t,n){return{type:"BinaryOp",op:e,left:t,right:n}}function O(e,t){return{type:"Call",name:e,args:t}}var mt="then";function st(e,t,n){let s=Xe({type:"Cond",cond:e,elifs:[],else:n||{type:"Literal",value:null}});return s[mt]=t,s}function M(e){return{type:"Pipe",left:e,right:{type:"Call",name:"tostring",args:[]}}}function U(e,t=!0,n={}){let s={nodes:0,operations:0,maxNodes:n.maxAstNodes??1e5,maxOperations:n.maxOperations??1e5,maxDepth:n.maxDepth??100};return rt(e,t,s,0)}function rt(e,t,n,s){if(s>=n.maxDepth)throw new E(`xan: expression conversion depth limit exceeded (${n.maxDepth})`,"recursion");if(++n.nodes>n.maxNodes)throw new E(`xan: expression conversion AST limit exceeded (${n.maxNodes})`,"array_elements");if(++n.operations>n.maxOperations)throw new E(`xan: expression conversion operation limit exceeded (${n.maxOperations})`,"iterations");let r=o=>rt(o,t,n,s+1);switch(e.type){case"int":case"float":return{type:"Literal",value:e.value};case"string":return{type:"Literal",value:e.value};case"bool":return{type:"Literal",value:e.value};case"null":return{type:"Literal",value:null};case"underscore":return{type:"Index",base:{type:"Identity"},index:{type:"Literal",value:"_"}};case"identifier":return t?{type:"Field",name:e.name}:{type:"VarRef",name:e.name};case"lambdaBinding":return{type:"VarRef",name:e.name};case"func":{if(e.args.length>n.maxNodes-n.nodes)throw new E(`xan: expression conversion AST limit exceeded (${n.maxNodes})`,"array_elements");let o=e.args.map(p=>r(p.expr));if(e.name==="coalesce"){let p=Math.max(0,o.length-1)*7;if(p>n.maxNodes-n.nodes)throw new E(`xan: expression conversion AST limit exceeded (${n.maxNodes})`,"array_elements");if(n.nodes+=p,n.operations+=o.length,n.operations>n.maxOperations)throw new E(`xan: expression conversion operation limit exceeded (${n.maxOperations})`,"iterations")}let i=Object.hasOwn(le,e.name)?le[e.name]:void 0;return typeof i=="function"?i(o):O(typeof i=="string"?i:e.name,o)}case"list":return e.elements.length===0?{type:"Array"}:{type:"Array",elements:e.elements.reduce((o,i,p)=>{let h=r(i);return p===0?h:{type:"Comma",left:o,right:h}},null)};case"map":return{type:"Object",entries:e.entries.map(o=>({key:o.key,value:r(o.value)}))};case"regex":return{type:"Literal",value:e.pattern};case"slice":return{type:"Slice",start:e.start?r(e.start):void 0,end:e.end?r(e.end):void 0};case"lambda":return r(e.body);case"pipeline":return{type:"Identity"};default:throw new Error(`Unknown moonblade expression type: ${e.type}`)}}function Q(e){return e<2?0:Math.ceil(e*Math.log2(e))}function ue(e,t={}){let n=t.maxArrayElements??1e5,s=t.maxStringLength??10*1024*1024,r=t.maxIterations??1e5,o=t.maxDepth??100;if(K(e)>s)throw new E(`xan: aggregation expression length limit exceeded (${s} bytes)`,"string_length");let i=[],p=0,h=0,m=()=>{if(t.consumeWork?.(),++h>r)throw new E(`xan: aggregation parser operation limit exceeded (${r})`,"iterations")};for(;p<e.length;){for(m();p<e.length&&(e[p]===" "||e[p]===",");)p++;if(p>=e.length)break;let c=p;for(;p<e.length&&/\w/.test(e[p]);)p++;let a=e.slice(c,p);for(;p<e.length&&e[p]===" ";)p++;if(e[p]!=="(")break;p++;let d=1,u=p;for(;p<e.length&&d>0;){if(m(),e[p]==="("?d++:e[p]===")"&&d--,d>o)throw new E(`xan: aggregation parser depth limit exceeded (${o})`,"recursion");d>0&&p++}let l=e.slice(u,p).trim();for(p++;p<e.length&&e[p]===" ";)p++;let f="";if(e.slice(p,p+3).toLowerCase()==="as "){for(p+=3;p<e.length&&e[p]===" ";)p++;let x=p;for(;p<e.length&&/\w/.test(e[p]);)p++;f=e.slice(x,p)}if(f||(f=l?`${a}(${l})`:`${a}()`),i.length>=n)throw new E(`xan: aggregation specification limit exceeded (${n})`,"array_elements");i.push({func:a,expr:l,alias:f})}return i}function ft(e){return/^\w+$/.test(e)}function ht(e,t,n){let s=V(e,t,n);return s.length>0?s[0]:null}function ce(e,t,n={},s={}){let{func:r,expr:o}=t,i=s.maxArrayElements??1e5,p=s.maxStringLength??10*1024*1024,h=s.maxIterations??1e5,m={maxSourceLength:p,maxTokens:i,maxAstNodes:i,maxOperations:h,maxDepth:s.maxDepth??100};if(e.length>i)throw new E(`xan: aggregation input limit exceeded (${i})`,"array_elements");if(r==="count"&&!o)return e.length;let c=ft(o),a=c?null:U(B(o,m),!0,m),d;if(c)d=f=>f[o];else{if(a===null)throw new Error("xan: missing compiled aggregation expression");d=f=>ht(f,a,n)}if(r==="all"||r==="any"){let f=0;for(let x of e){if(s.consumeWork?.(),++f>h)throw new E(`xan: aggregation iteration limit exceeded (${h})`,"iterations");let g=!!d(x);if(r==="all"&&!g)return!1;if(r==="any"&&g)return!0}return r==="all"}let u=[],l=0;for(let f of e){if(s.consumeWork?.(),++l>h)throw new E(`xan: aggregation iteration limit exceeded (${h})`,"iterations");let x=d(f);if(x!=null){if(u.length>=i)throw new E(`xan: aggregation value limit exceeded (${i})`,"array_elements");u.push(x)}}switch(r){case"count":{if(c)return u.length;let f=0;for(let x of u)s.consumeWork?.(),x&&f++;return f}case"sum":{let f=0;for(let x of u)s.consumeWork?.(),f+=typeof x=="number"?x:Number.parseFloat(String(x));return f}case"mean":case"avg":{let f=0;for(let x of u)s.consumeWork?.(),f+=typeof x=="number"?x:Number.parseFloat(String(x));return u.length>0?f/u.length:0}case"min":{let f=null;for(let x of u){s.consumeWork?.();let g=typeof x=="number"?x:Number.parseFloat(String(x));f=f===null?g:Math.min(f,g)}return f}case"max":{let f=null;for(let x of u){s.consumeWork?.();let g=typeof x=="number"?x:Number.parseFloat(String(x));f=f===null?g:Math.max(f,g)}return f}case"first":return u.length>0?u[0]:null;case"last":return u.length>0?u[u.length-1]:null;case"median":{let f=[];for(let g of u){s.consumeWork?.();let y=typeof g=="number"?g:Number.parseFloat(String(g));Number.isNaN(y)||f.push(y)}if(s.consumeWork?.(Q(f.length)),f.sort((g,y)=>g-y),f.length===0)return null;let x=Math.floor(f.length/2);return f.length%2===0?(f[x-1]+f[x])/2:f[x]}case"mode":{let f=new Map;for(let y of u){s.consumeWork?.();let w=String(y);f.set(w,(f.get(w)||0)+1)}let x=0,g=null;for(let[y,w]of f)s.consumeWork?.(),w>x&&(x=w,g=y);return g}case"cardinality":{let f=new Set;for(let x of u)s.consumeWork?.(),f.add(String(x));return f.size}case"values":return ot(u,!1,p,s);case"distinct_values":return ot(u,!0,p,s);default:return null}}function it(e,t,n={},s={}){let r=F();for(let o of t)b(r,o.alias,ce(e,o,n,s));return r}function ot(e,t,n,s){let r=[],o=t?new Set:null,i=0;for(let p of e){s.consumeWork?.();let h=String(p);if(o?.has(h))continue;o?.add(h);let m=K(h)+(r.length>0?1:0);if(m>n-i)throw new E(`xan: aggregation string limit exceeded (${n} bytes)`,"string_length");r.push(h),i+=m}return t&&(s.consumeWork?.(Q(r.length)),r.sort()),r.join("|")}function lt(e,t){return{maxArrayElements:e.limits.maxArrayElements,maxStringLength:e.limits.maxStringLength,maxIterations:e.limits.maxJqIterations,maxDepth:e.limits.maxQueryDepth,consumeWork:(n=1)=>t.consumeWork(n)}}function at(e,t,n){let s=e.size-(t&&e.has("")?1:0);return n>0?Math.min(s,n):s}async function pe(e,t){let n="",s=[];for(let d of e)d.startsWith("-")||(n?s.push(d):n=d);if(!n)return{stdout:"",stderr:`xan agg: no aggregation expression
7
- `,exitCode:1};let{data:r,error:o}=await k(s,t);if(o)return o;let i={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0},p=new $(t,"xan agg"),h=lt(t,p),m=ue(n,h),c=m.map(d=>d.alias);p.addRow(c.length);let a=it(r,m,i,h);return{stdout:C(c,[a],t),stderr:"",exitCode:0}}async function de(e,t){let n="",s="",r=[];for(let x=0;x<e.length;x++){let g=e[x];g==="--sorted"||g.startsWith("-")||(n?s?r.push(g):s=g:n=g)}if(!n||!s)return{stdout:"",stderr:`xan groupby: usage: xan groupby COLS EXPR [FILE]
8
- `,exitCode:1};let{data:o,error:i}=await k(r,t);if(i)return i;let p={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0},h=n.split(","),m=new $(t,"xan groupby"),c=lt(t,m),a=ue(s,c),d=[...h,...a.map(x=>x.alias)],u=[],l=new Map;for(let x of o){m.consumeWork(h.length+1);let g=JSON.stringify(h.map(y=>String(x[y])));l.has(g)||(m.addRow(d.length),l.set(g,[]),u.push(g)),l.get(g)?.push(x)}let f=[];for(let x of u){let g=l.get(x);if(!g)continue;let y=F();for(let w of h)b(y,w,g[0][w]);for(let w of a)b(y,w.alias,ce(g,w,p,c));f.push(y)}return{stdout:C(d,f,t),stderr:"",exitCode:0}}async function me(e,t){let n=[],s="",r=10,o=!1,i=[];for(let l=0;l<e.length;l++){let f=e[l];(f==="-s"||f==="--select")&&l+1<e.length?n=e[++l].split(","):(f==="-g"||f==="--groupby")&&l+1<e.length?s=e[++l]:(f==="-l"||f==="--limit")&&l+1<e.length?r=Number.parseInt(e[++l],10):f==="--no-extra"?o=!0:f==="-A"||f==="--all"?r=0:f.startsWith("-")||i.push(f)}let{headers:p,data:h,error:m}=await k(i,t);if(m)return m;if(!Number.isSafeInteger(r)||r<0)return{stdout:"",stderr:`xan frequency: limit must be a non-negative safe integer
9
- `,exitCode:1};let c=new $(t,"xan frequency"),a=n.length>0?n:p.filter(l=>l!==s);s&&n.length===0&&(a=p.filter(l=>l!==s));let d=[],u=s?["field",s,"value","count"]:["field","value","count"];if(s){let l=new Map;for(let f of h){c.consumeWork();let x=String(f[s]??"");l.has(x)||l.set(x,[]),l.get(x)?.push(f)}for(let f of a)for(let[x,g]of l){let y=new Map;for(let v of g){c.consumeWork();let I=v[f],S=I===""||I===null||I===void 0?"":String(I);y.set(S,(y.get(S)||0)+1)}c.addRows(at(y,o,r),u.length),c.consumeWork(Q(y.size));let w=[...y.entries()].sort((v,I)=>I[1]!==v[1]?I[1]-v[1]:v[0].localeCompare(I[0])),A=0;for(let[v,I]of w){if(o&&v==="")continue;if(r>0&&A>=r)break;let S=F();b(S,"field",f),b(S,s,x),b(S,"value",v===""?"<empty>":v),b(S,"count",I),d.push(S),A++}}}else for(let l of a){let f=new Map;for(let y of h){c.consumeWork();let w=y[l],A=w===""||w===null||w===void 0?"":String(w);f.set(A,(f.get(A)||0)+1)}c.addRows(at(f,o,r),u.length),c.consumeWork(Q(f.size));let x=[...f.entries()].sort((y,w)=>w[1]!==y[1]?w[1]-y[1]:y[0].localeCompare(w[0])),g=0;for(let[y,w]of x){if(o&&y==="")continue;if(r>0&&g>=r)break;let A=F();b(A,"field",l),b(A,"value",y===""?"<empty>":y),b(A,"count",w),d.push(A),g++}}return{stdout:C(u,d,t),stderr:"",exitCode:0}}async function fe(e,t){let n=[],s=[];for(let a=0;a<e.length;a++){let d=e[a];d==="-s"&&a+1<e.length?n=e[++a].split(","):d.startsWith("-")||s.push(d)}let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=n.length>0?n:r,h=["field","type","count","min","max","mean"];new $(t,"xan stats").addRows(p.length,h.length);let c=[];for(let a of p){let d=0,u=0,l=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,x=0;for(let w of o){t.executionScope?.consumeWork(1,"xan stats rows");let A=w[a];if(A==null)continue;d++;let v=typeof A=="number"?A:Number.parseFloat(String(A));Number.isNaN(v)||(u++,l=Math.min(l,v),f=Math.max(f,v),x+=v)}let g=u===d&&u>0,y=F();b(y,"field",a),b(y,"type",g?"Number":"String"),b(y,"count",d),b(y,"min",g?l:""),b(y,"max",g?f:""),b(y,"mean",g?Math.round(x/u*1e10)/1e10:""),c.push(y)}return{stdout:C(h,c,t),stderr:"",exitCode:0}}function ut(e,t={}){let n=B(e,t);return U(n,!0,t)}function gt(e){let n=e.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return Z(`^${n}$`)}function te(e,t){let n=[],s=new Set;for(let r of e.split(",")){let o=r.trim();if(o.startsWith("!")){let m=o.slice(1),c=te(m,t);for(let a of c)s.add(a);continue}if(o==="*"){for(let m of t)n.includes(m)||n.push(m);continue}if(o.includes("*")){let m=gt(o);for(let c of t)m.test(c)&&!n.includes(c)&&n.push(c);continue}let i=o.match(/^([^:]*):([^:]*)$/);if(i&&(i[1]||i[2])){let m=i[1],c=i[2],a=m?t.indexOf(m):0,d=c?t.indexOf(c):t.length-1;if(a!==-1&&d!==-1){let u=a<=d?1:-1;for(let l=a;u>0?l<=d:l>=d;l+=u)n.includes(t[l])||n.push(t[l])}continue}let p=o.match(/^(\d+)-(\d+)$/);if(p){let m=Number.parseInt(p[1],10),c=Number.parseInt(p[2],10);for(let a=m;a<=c&&a<t.length;a++)n.push(t[a]);continue}let h=Number.parseInt(o,10);if(!Number.isNaN(h)&&h>=0&&h<t.length){n.push(t[h]);continue}t.includes(o)&&n.push(o)}return s.size>0?n.filter(r=>!s.has(r)):n}async function he(e,t){let n="",s=[];for(let m of e)m.startsWith("-")||(n?s.push(m):n=m);if(!n)return{stdout:"",stderr:`xan select: no columns specified
10
- `,exitCode:1};let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=te(n,r),h=o.map(m=>{let c=F();for(let a of p)b(c,a,m[a]);return c});return{stdout:C(p,h,t),stderr:"",exitCode:0}}async function ge(e,t){let n="",s=[];for(let c of e)c.startsWith("-")||(n?s.push(c):n=c);if(!n)return{stdout:"",stderr:`xan drop: no columns specified
11
- `,exitCode:1};let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=new Set(te(n,r)),h=r.filter(c=>!p.has(c)),m=o.map(c=>{let a=F();for(let d of h)b(a,d,c[d]);return a});return{stdout:C(h,m,t),stderr:"",exitCode:0}}async function xe(e,t){let n="",s="",r=[];for(let c=0;c<e.length;c++){let a=e[c];a==="-s"&&c+1<e.length?s=e[++c]:a.startsWith("-")||(n?r.push(a):n=a)}if(!n)return{stdout:"",stderr:`xan rename: no new name(s) specified
12
- `,exitCode:1};let{headers:o,data:i,error:p}=await k(r,t);if(p)return p;let h;if(s){let c=s.split(","),a=n.split(","),d=new Map;for(let u=0;u<c.length&&u<a.length;u++)d.set(c[u],a[u]);h=o.map(u=>d.get(u)||u)}else{let c=n.split(",");h=o.map((a,d)=>d<c.length?c[d]:a)}let m=i.map(c=>{let a=F();for(let d=0;d<o.length;d++)b(a,h[d],c[o[d]]);return a});return{stdout:C(h,m,t),stderr:"",exitCode:0}}async function ye(e,t){let n="index",s=[];for(let m=0;m<e.length;m++)e[m]==="-c"&&m+1<e.length?n=e[++m]:s.push(e[m]);let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=[n,...r],h=o.map((m,c)=>{let a=F();b(a,n,c);for(let d of r)b(a,d,m[d]);return a});return{stdout:C(p,h,t),stderr:"",exitCode:0}}async function we(e,t){let n=e.includes("-j")||e.includes("--just-names"),{headers:s,error:r}=await k(e.filter(i=>i!=="-j"&&i!=="--just-names"),t);return r||{stdout:n?`${s.map(i=>i).join(`
13
- `)}
14
- `:`${s.map((i,p)=>`${p} ${i}`).join(`
15
- `)}
16
- `,stderr:"",exitCode:0}}async function ve(e,t){let{data:n,error:s}=await k(e,t);return s||{stdout:`${n.length}
17
- `,stderr:"",exitCode:0}}async function Se(e,t){let n=10,s=[];for(let h=0;h<e.length;h++)(e[h]==="-l"||e[h]==="-n")&&h+1<e.length?n=Number.parseInt(e[++h],10):s.push(e[h]);let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=o.slice(0,n);return{stdout:C(r,p,t),stderr:"",exitCode:0}}async function be(e,t){let n=10,s=[];for(let h=0;h<e.length;h++)(e[h]==="-l"||e[h]==="-n")&&h+1<e.length?n=Number.parseInt(e[++h],10):s.push(e[h]);let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=o.slice(-n);return{stdout:C(r,p,t),stderr:"",exitCode:0}}async function Ce(e,t){let n,s,r,o=[];for(let d=0;d<e.length;d++){let u=e[d];(u==="-s"||u==="--start")&&d+1<e.length?n=Number.parseInt(e[++d],10):(u==="-e"||u==="--end")&&d+1<e.length?s=Number.parseInt(e[++d],10):(u==="-l"||u==="--len")&&d+1<e.length?r=Number.parseInt(e[++d],10):u.startsWith("-")||o.push(u)}let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;let m=n??0,c;r!==void 0?c=m+r:s!==void 0?c=s:c=p.length;let a=p.slice(m,c);return{stdout:C(i,a,t),stderr:"",exitCode:0}}async function ke(e,t){let{headers:n,data:s,error:r}=await k(e,t);if(r)return r;let o=[...s].reverse();return{stdout:C(n,o,t),stderr:"",exitCode:0}}async function Ee(e,t){let n=e.filter(m=>!m.startsWith("-")),{headers:s,data:r,error:o}=await k(n,t);if(o)return o;if(r.length===0){let m=["column"],c=s.map(a=>({column:a}));return{stdout:C(m,c,t),stderr:"",exitCode:0}}let i=s[0],p=[i,...r.map((m,c)=>String(m[i]??`row_${c}`))];if(new Set(p).size!==p.length)return{stdout:"",stderr:`xan transpose: duplicate output headers
18
- `,exitCode:1};let h=[];for(let m=1;m<s.length;m++){let c=s[m],a=F();b(a,i,c);for(let d=0;d<r.length;d++)b(a,p[d+1],r[d][c]);h.push(a)}return{stdout:C(p,h,t),stderr:"",exitCode:0}}async function Ie(e,t){let n=null,s=[];for(let c=0;c<e.length;c++){let a=e[c];a==="--seed"&&c+1<e.length?n=Number.parseInt(e[++c],10):a.startsWith("-")||s.push(a)}let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=n!==null?n:Date.now(),h=()=>(p=p*1103515245+12345&2147483647,p/2147483647),m=[...o];for(let c=m.length-1;c>0;c--){let a=Math.floor(h()*(c+1));[m[c],m[a]]=[m[a],m[c]]}return{stdout:C(r,m,t),stderr:"",exitCode:0}}async function Ne(e,t){let n=null,s="",r=[];for(let a=0;a<e.length;a++){let d=e[a];if((d==="-l"||d==="--length")&&a+1<e.length){let u=e[++a];if(!/^[1-9]\d*$/.test(u))return{stdout:"",stderr:`xan fixlengths: length must be a positive safe integer
19
- `,exitCode:1};if(n=Number(u),!Number.isSafeInteger(n)||n>t.limits.maxArrayElements)throw new E(`xan fixlengths: column limit exceeded (${t.limits.maxArrayElements})`,"array_elements")}else(d==="-d"||d==="--default")&&a+1<e.length?s=e[++a]:d.startsWith("-")||r.push(d)}let o=r[0],i;if(!o||o==="-")i=Y(t.stdin);else try{let a=t.fs.resolvePath(t.cwd,o);i=await t.fs.readFile(a)}catch(a){return q(a),{stdout:"",stderr:`xan fixlengths: ${o}: No such file or directory
20
- `,exitCode:1}}let p=et(i,{maxStringLength:Math.min(t.limits.maxInputBytes,t.limits.maxStringLength),maxArrayElements:t.limits.maxArrayElements,maxRows:t.limits.maxCsvRows,maxCells:t.limits.maxCsvCells});if(p.length===0)return{stdout:"",stderr:"",exitCode:0};let h=0;for(let a of p)h=Math.max(h,a.length);let m=n??h;new $(t,"xan fixlengths").addRows(p.length,m);for(let a of p)for(a.length>m&&(a.length=m);a.length<m;)a.push(s);return{stdout:nt(p,t),stderr:"",exitCode:0}}async function Ae(e,t){let n=null,s=null,r=".",o=[],i=u=>{if(!/^[1-9]\d*$/.test(u))return null;let l=Number(u);return Number.isSafeInteger(l)?l:null};for(let u=0;u<e.length;u++){let l=e[u];if((l==="-c"||l==="--chunks")&&u+1<e.length){if(n=i(e[++u]),n===null)return{stdout:"",stderr:`xan split: chunk count must be a positive safe integer
21
- `,exitCode:1}}else if((l==="-S"||l==="--size")&&u+1<e.length){if(s=i(e[++u]),s===null)return{stdout:"",stderr:`xan split: chunk size must be a positive safe integer
22
- `,exitCode:1}}else(l==="-o"||l==="--output")&&u+1<e.length?r=e[++u]:l.startsWith("-")||o.push(l)}if(!n&&!s)return{stdout:"",stderr:`xan split: must specify -c or -S
23
- `,exitCode:1};let{headers:p,data:h,error:m}=await k(o,t);if(m)return m;let c=n?Math.ceil(h.length/n):s,a=c===0?0:Math.ceil(h.length/c);if(a>t.limits.maxArrayElements)throw new E(`xan split: output part limit exceeded (${t.limits.maxArrayElements})`,"array_elements");let d=o[0]?.replace(/\.csv$/,"")||"part";try{let u=t.fs.resolvePath(t.cwd,r);for(let l=0;l<a;l++){let f=l*c,x=Math.min(f+c,h.length);t.executionScope?.consumeWork(x-f,"xan split rows");let g=`${d}_${String(l+1).padStart(3,"0")}.csv`,y=t.fs.resolvePath(u,g);await t.fs.writeFile(y,C(p,h.slice(f,x),t))}return{stdout:`Split into ${a} parts
24
- `,stderr:"",exitCode:0}}catch(u){q(u);let l=new re(t.limits.maxOutputSize,"xan split");for(let f=0;f<a;f++){let x=f*c,g=Math.min(x+c,h.length);l.append(`Part ${f+1}: ${g-x} rows
25
- `)}return{stdout:l.build(),stderr:"",exitCode:0}}}function ct(e){return e.replace(/[^a-zA-Z0-9_-]/g,"_")||"empty"}function xt(e){let t=2166136261;for(let n=0;n<e.length;n++)t=(t^e.charCodeAt(n))*16777619>>>0;return t.toString(36).padStart(6,"0").slice(0,6)}async function Le(e,t){let n="",s=".",r=[];for(let u=0;u<e.length;u++){let l=e[u];(l==="-o"||l==="--output")&&u+1<e.length?s=e[++u]:l.startsWith("-")||(n?r.push(l):n=l)}if(!n)return{stdout:"",stderr:`xan partition: usage: xan partition COLUMN [FILE]
26
- `,exitCode:1};let{headers:o,data:i,error:p}=await k(r,t);if(p)return p;if(!o.includes(n))return{stdout:"",stderr:`xan partition: column '${n}' not found
27
- `,exitCode:1};let h=new Map,m=new $(t,"xan partition");for(let u of i){m.addRow(o.length);let l=String(u[n]??"");h.has(l)||h.set(l,[]),h.get(l)?.push(u)}let c=new Map;for(let u of h.keys()){let l=ct(u);c.set(l,(c.get(l)??0)+1)}let a=new Set,d=new Map;for(let u of h.keys()){let l=ct(u),x=(c.get(l)??0)>1?`${l}_${xt(u)}`:l,g=`${x}.csv`,y=1;for(;a.has(g);)g=`${x}_${y}.csv`,y++;a.add(g),d.set(u,g)}try{let u=t.fs.resolvePath(t.cwd,s);for(let[l,f]of h){let x=d.get(l);if(!x)continue;let g=t.fs.resolvePath(u,x);await t.fs.writeFile(g,C(o,f,t))}return{stdout:`Partitioned into ${h.size} files by '${n}'
28
- `,stderr:"",exitCode:0}}catch(u){q(u);let l=new re(t.limits.maxOutputSize,"xan partition");for(let[f,x]of h)l.append(`${f}: ${x.length} rows
29
- `);return{stdout:l.build(),stderr:"",exitCode:0}}}async function Oe(e,t){if(e.length===0)return{stdout:"",stderr:`xan to: usage: xan to <format> [FILE]
30
- `,exitCode:1};let n=e[0],s=e.slice(1);return n==="json"?yt(s,t):{stdout:"",stderr:`xan to: unsupported format '${n}'
31
- `,exitCode:1}}async function yt(e,t){let n=e.filter(h=>!h.startsWith("-")),{data:s,error:r}=await k(n,t);if(r)return r;if(new $(t,"xan to json").addRows(s.length,s.length>0?Object.keys(s[0]).length:0),t.limits.maxOutputSize<1)throw new E("xan to json: output size limit exceeded (0 bytes)","output_size");let i=t.limits.maxOutputSize-1;return{stdout:`${Qe(s,i)}
32
- `,stderr:"",exitCode:0}}async function Re(e,t){let n="",s=[];for(let r=0;r<e.length;r++){let o=e[r];(o==="-f"||o==="--format")&&r+1<e.length?n=e[++r]:o.startsWith("-")||s.push(o)}return n?n==="json"?wt(s,t):{stdout:"",stderr:`xan from: unsupported format '${n}'
33
- `,exitCode:1}:{stdout:"",stderr:`xan from: usage: xan from -f <format> [FILE]
34
- `,exitCode:1}}async function wt(e,t){let n=e[0],s;if(!n||n==="-")s=Y(t.stdin);else try{let r=t.fs.resolvePath(t.cwd,n);s=await t.fs.readFile(r)}catch(r){return q(r),{stdout:"",stderr:`xan from: ${n}: No such file or directory
35
- `,exitCode:1}}try{let r=Math.min(t.limits.maxInputBytes,t.limits.maxStringLength);if(K(s)>r)throw new E(`xan from: input size limit exceeded (${r} bytes)`,"string_length");let o=Ge(JSON.parse(s.trim()),{maxDepth:t.limits.maxQueryDepth,maxElements:t.limits.maxQueryElements});if(!Array.isArray(o))return{stdout:"",stderr:`xan from: JSON input must be an array
36
- `,exitCode:1};if(o.length===0)return{stdout:`
37
- `,stderr:"",exitCode:0};if(Array.isArray(o[0])){let m=o,c=m[0];if(c.length>t.limits.maxArrayElements)throw new E(`xan from: column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");let a=c.map(String);new $(t,"xan from json").addRows(m.length-1,a.length);let u=[];for(let l=1;l<m.length;l++){let f=m[l];if(!Array.isArray(f))return{stdout:"",stderr:`xan from: JSON rows must all have the same shape
38
- `,exitCode:1};let x=F();for(let g=0;g<a.length;g++)b(x,a[g],f[g]);u.push(x)}return{stdout:C(a,u,t),stderr:"",exitCode:0}}let i=o[0];if(!i||typeof i!="object"||Array.isArray(i))return{stdout:"",stderr:`xan from: JSON rows must be arrays or objects
39
- `,exitCode:1};let p=Object.keys(i).sort();new $(t,"xan from json").addRows(o.length,p.length);for(let m of o)if(!m||typeof m!="object"||Array.isArray(m))return{stdout:"",stderr:`xan from: JSON rows must all have the same shape
40
- `,exitCode:1};return{stdout:C(p,o,t),stderr:"",exitCode:0}}catch(r){return q(r),{stdout:"",stderr:`xan from: invalid JSON input
41
- `,exitCode:1}}}async function $e(e,t){let n=!1,s=0,r="",o=[];for(let d=0;d<e.length;d++){let u=e[d];if(u==="-v"||u==="--invert")n=!0;else if((u==="-l"||u==="--limit")&&d+1<e.length)s=Number.parseInt(e[++d],10);else{if(u==="--help")return J({name:"xan filter",summary:"Filter rows by expression",usage:"xan filter [OPTIONS] EXPR [FILE]",description:"Filter CSV rows using moonblade expressions.",options:["-v, --invert invert match","-l, --limit N limit output to N rows"," --help display help"]});u.startsWith("-")||(r?o.push(u):r=u)}}if(!r)return{stdout:"",stderr:`xan filter: no expression specified
42
- `,exitCode:1};let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;let m={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0},c=ut(r,z(t)),a=[];for(let d of p){if(s>0&&a.length>=s)break;let u=V(d,c,m),l=u.length>0&&u.some(f=>!!f);(n?!l:l)&&a.push(d)}return{stdout:C(i,a,t),stderr:"",exitCode:0}}async function Fe(e,t){let n="",s=!1,r=!1,o=[];for(let c=0;c<e.length;c++){let a=e[c];a==="-N"||a==="--numeric"?s=!0:a==="-R"||a==="-r"||a==="--reverse"?r=!0:a==="-s"&&c+1<e.length?n=e[++c]:a.startsWith("-")||o.push(a)}let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;!n&&i.length>0&&(n=i[0]);let m=[...p].sort((c,a)=>{let d=c[n],u=a[n],l;if(s){let f=typeof d=="number"?d:Number.parseFloat(String(d)),x=typeof u=="number"?u:Number.parseFloat(String(u));l=f-x}else l=String(d).localeCompare(String(u));return r?-l:l});return{stdout:C(i,m,t),stderr:"",exitCode:0}}async function Te(e,t){let n="",s=[];for(let m=0;m<e.length;m++){let c=e[m];c==="-s"&&m+1<e.length?n=e[++m]:c.startsWith("-")||s.push(c)}let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=new Set,h=o.filter(m=>{let c=n?String(m[n]):JSON.stringify(m);return p.has(c)?!1:(p.add(c),!0)});return{stdout:C(r,h,t),stderr:"",exitCode:0}}async function Me(e,t){let n=10,s="",r=!1,o=[];for(let a=0;a<e.length;a++){let d=e[a];(d==="-l"||d==="-n")&&a+1<e.length?n=Number.parseInt(e[++a],10):d==="-R"||d==="-r"||d==="--reverse"?r=!0:d.startsWith("-")||(s?o.push(d):s=d)}let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;!s&&i.length>0&&(s=i[0]);let c=[...p].sort((a,d)=>{let u=a[s],l=d[s],f=typeof u=="number"?u:Number.parseFloat(String(u)),x=typeof l=="number"?l:Number.parseFloat(String(l));return r?f-x:x-f}).slice(0,n);return{stdout:C(i,c,t),stderr:"",exitCode:0}}async function Pe(e,t){let n="",s=!1,r=!1,o=[];for(let x=0;x<e.length;x++){let g=e[x];g==="-O"||g==="--overwrite"?s=!0:g==="--filter"?r=!0:g.startsWith("-")||(n?o.push(g):n=g)}if(!n)return{stdout:"",stderr:`xan map: no expression specified
43
- `,exitCode:1};let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;let m=z(t),a=X(n,m).map(({expr:x,name:g})=>({alias:typeof g=="string"?g:g[0],ast:U(x,!0,m)})),d={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0},u;if(s){u=[...i];for(let x of a)if(!i.includes(x.alias)){if(u.length>=t.limits.maxArrayElements)throw new E(`xan map: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");u.push(x.alias)}}else{if(W(i.length,a.length,"xan map")>t.limits.maxArrayElements)throw new E(`xan map: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");u=[...i,...a.map(x=>x.alias)]}let l=[],f=new $(t,"xan map");r||f.addRows(p.length,u.length);for(let x=0;x<p.length;x++){let g=p[x],y=j(g),w=!1,A=Object.assign(oe(g),{_row_index:x});for(let v of a){f.consumeWork();let I=V(A,v.ast,d),S=I.length>0?I[0]:null;if(r&&S==null){w=!0;break}b(y,v.alias,S)}w||(r&&f.addRow(u.length),l.push(y))}return{stdout:C(u,l,t),stderr:"",exitCode:0}}async function De(e,t){let n="",s="",r="",o=[];for(let g=0;g<e.length;g++){let y=e[g];(y==="-r"||y==="--rename")&&g+1<e.length?r=e[++g]:y.startsWith("-")||(n?s?o.push(y):s=y:n=y)}if(!n||!s)return{stdout:"",stderr:`xan transform: usage: xan transform COLUMN EXPR [FILE]
44
- `,exitCode:1};let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;let m=n.split(",").map(g=>g.trim()),c=r?r.split(",").map(g=>g.trim()):[];for(let g of m)if(!i.includes(g))return{stdout:"",stderr:`xan transform: column '${g}' not found
45
- `,exitCode:1};let a=z(t),d=U(X(s,a)[0]?.expr||B(s,a),!0,a),u={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0},l=i.map(g=>{let y=m.indexOf(g);return y!==-1&&c[y]?c[y]:g}),f=[],x=new $(t,"xan transform");x.addRows(p.length,l.length);for(let g of p){let y=j(g);for(let w=0;w<m.length;w++){x.consumeWork();let A=m[w],v=Object.assign(oe(g),{_:g[A]}),I=V(v,d,u),S=I.length>0?I[0]:null,N=c[w]||A;N!==A&&delete y[A],b(y,N,S)}f.push(y)}return{stdout:C(l,f,t),stderr:"",exitCode:0}}async function _e(e,t){let n="",s="|",r=!1,o="",i=[];for(let l=0;l<e.length;l++){let f=e[l];(f==="-s"||f==="--separator")&&l+1<e.length?s=e[++l]:f==="--drop-empty"?r=!0:(f==="-r"||f==="--rename")&&l+1<e.length?o=e[++l]:f.startsWith("-")||(n?i.push(f):n=f)}if(!n)return{stdout:"",stderr:`xan explode: usage: xan explode COLUMN [FILE]
46
- `,exitCode:1};let{headers:p,data:h,error:m}=await k(i,t);if(m)return m;if(!p.includes(n))return{stdout:"",stderr:`xan explode: column '${n}' not found
47
- `,exitCode:1};let c=o?p.map(l=>l===n?o:l):p,a=o||n,d=[],u=new $(t,"xan explode");for(let l of h){let f=l[n],x=f==null?"":String(f);if(x===""){if(!r){u.addRow(c.length);let g=j(l);o&&(delete g[n],b(g,a,"")),d.push(g)}}else{let g=0;for(;g<=x.length;){u.addRow(c.length);let y=s===""?g+1:x.indexOf(s,g),w=y===-1?x.length:y,A=x.slice(g,w),v=j(l);if(o&&delete v[n],b(v,a,A),d.push(v),y===-1||s===""&&g>=x.length-1)break;g=s===""?y:y+s.length}}}return{stdout:C(c,d,t),stderr:"",exitCode:0}}async function We(e,t){let n="",s="|",r="",o=[];for(let g=0;g<e.length;g++){let y=e[g];(y==="-s"||y==="--sep")&&g+1<e.length?s=e[++g]:(y==="-r"||y==="--rename")&&g+1<e.length?r=e[++g]:y.startsWith("-")||(n?o.push(y):n=y)}if(!n)return{stdout:"",stderr:`xan implode: usage: xan implode COLUMN [FILE]
48
- `,exitCode:1};let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;if(!i.includes(n))return{stdout:"",stderr:`xan implode: column '${n}' not found
49
- `,exitCode:1};let m=i.filter(g=>g!==n),c=r?i.map(g=>g===n?r:g):i,a=r||n,d=[],u=new $(t,"xan implode"),l=null,f=[],x=null;for(let g of p){u.consumeWork();let y=JSON.stringify(m.map(v=>String(g[v]??""))),w=g[n],A=w==null?"":String(w);if(y!==l){if(x!==null){let v=j(x);r&&delete v[n],b(v,a,se(f,s,Math.min(t.limits.maxStringLength,t.limits.maxOutputSize),"xan implode")),u.addRow(c.length),d.push(v)}l=y,f=[A],x=g}else f.push(A)}if(x!==null){let g=j(x);r&&delete g[n],b(g,a,se(f,s,Math.min(t.limits.maxStringLength,t.limits.maxOutputSize),"xan implode")),u.addRow(c.length),d.push(g)}return{stdout:C(c,d,t),stderr:"",exitCode:0}}async function je(e,t){let n="",s="",r="",o="",i="inner",p="",h=0;for(let S=0;S<e.length;S++){let N=e[S];N==="--left"?i="left":N==="--right"?i="right":N==="--full"?i="full":(N==="-D"||N==="--default")&&S+1<e.length?p=e[++S]:N.startsWith("-")||(h++,h===1?n=N:h===2?s=N:h===3?r=N:h===4&&(o=N))}if(!n||!s||!r||!o)return{stdout:"",stderr:`xan join: usage: xan join KEY1 FILE1 KEY2 FILE2 [OPTIONS]
50
- `,exitCode:1};let m=await k([s],t);if(m.error)return m.error;let c=await k([o],t);if(c.error)return c.error;let{headers:a,data:d}=m,{headers:u,data:l}=c;if(!a.includes(n))return{stdout:"",stderr:`xan join: column '${n}' not found in first file
51
- `,exitCode:1};if(!u.includes(r))return{stdout:"",stderr:`xan join: column '${r}' not found in second file
52
- `,exitCode:1};let f=new Map;for(let S of l){t.executionScope?.consumeWork(1,"xan join index");let N=String(S[r]??"");f.has(N)||f.set(N,[]),f.get(N)?.push(S)}let x=new Set(a),g=u.filter(S=>!x.has(S));if(W(a.length,g.length,"xan join")>t.limits.maxArrayElements)throw new E(`xan join: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");let y=[...a,...g],w=[],A=new $(t,"xan join"),v=new Set,I=0;for(let S of d){t.executionScope?.consumeWork(1,"xan join cardinality");let N=f.get(String(S[n]??""));I=W(I,N?.length??(i==="left"||i==="full"?1:0),"xan join")}if(i==="right"||i==="full"){let S=new Set;for(let N of d)t.executionScope?.throwIfAborted("xan join cardinality"),S.add(String(N[n]??""));for(let N of l)t.executionScope?.throwIfAborted("xan join cardinality"),S.has(String(N[r]??""))||(I=W(I,1,"xan join"))}A.addRows(I,y.length);for(let S of d){t.executionScope?.throwIfAborted("xan join output");let N=String(S[n]??""),P=f.get(N);if(P&&P.length>0){v.add(N);for(let T of P){let _=F();for(let H of a)b(_,H,S[H]);for(let H of g)b(_,H,T[H]);w.push(_)}}else if(i==="left"||i==="full"){let T=F();for(let _ of a)b(T,_,S[_]);for(let _ of g)b(T,_,p);w.push(T)}}if(i==="right"||i==="full")for(let S of l){t.executionScope?.throwIfAborted("xan join output");let N=String(S[r]??"");if(!v.has(N)){let P=F();for(let T of a)b(P,T,u.includes(T)?S[T]:p);for(let T of g)b(P,T,S[T]);w.push(P)}}return{stdout:C(y,w,t),stderr:"",exitCode:0}}async function Ve(e,t){let n="",s="",r=[],o=[];for(let v=0;v<e.length;v++){let I=e[v];(I==="-g"||I==="--groupby")&&v+1<e.length?r=e[++v].split(",").map(S=>S.trim()):I.startsWith("-")||(n?s?o.push(I):s=I:n=I)}if(!n||!s)return{stdout:"",stderr:`xan pivot: usage: xan pivot COLUMN AGG_EXPR [OPTIONS] [FILE]
53
- `,exitCode:1};let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;if(!i.includes(n))return{stdout:"",stderr:`xan pivot: column '${n}' not found
54
- `,exitCode:1};let m=s.match(/^(\w+)\((\w+)\)$/);if(!m)return{stdout:"",stderr:`xan pivot: invalid aggregation expression '${s}'
55
- `,exitCode:1};let[,c,a]=m;r.length===0&&(r=i.filter(v=>v!==n&&v!==a));let d=[],u=new Set;for(let v of p){t.executionScope?.consumeWork(1,"xan pivot values");let I=String(v[n]??"");if(!u.has(I)){if(d.length>=t.limits.maxArrayElements)throw new E(`xan pivot: pivot value limit exceeded (${t.limits.maxArrayElements})`,"array_elements");u.add(I),d.push(I)}}let l=new Map,f=[];for(let v of p){t.executionScope?.consumeWork(1,"xan pivot groups");let I=r.map(_=>String(v[_]??"")),S=JSON.stringify(I),N=String(v[n]??""),P=v[a];l.has(S)||(l.set(S,{keyParts:I,pivots:new Map}),f.push(S));let T=l.get(S);T&&(T.pivots.has(N)||T.pivots.set(N,[]),T.pivots.get(N)?.push(P))}let x=d.find(v=>r.includes(v));if(x!==void 0)return{stdout:"",stderr:`xan pivot: duplicate output header '${x}'
56
- `,exitCode:1};let g=W(r.length,d.length,"xan pivot");if(g>t.limits.maxArrayElements)throw new E(`xan pivot: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");new $(t,"xan pivot").addRows(f.length,g);let w=[...r,...d],A=[];for(let v of f){t.executionScope?.throwIfAborted("xan pivot output");let I=l.get(v);if(!I)continue;let S=F();for(let N=0;N<r.length;N++)b(S,r[N],I.keyParts[N]);for(let N of d){let P=I.pivots.get(N)||[];b(S,N,vt(c,P))}A.push(S)}return{stdout:C(w,A,t),stderr:"",exitCode:0}}function vt(e,t){let n=0,s=0,r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(let i of t){if(i==null)continue;let p=typeof i=="number"?i:Number.parseFloat(String(i));Number.isNaN(p)||(n++,s+=p,r=Math.min(r,p),o=Math.max(o,p))}switch(e){case"count":return t.length;case"sum":return s;case"mean":case"avg":return n>0?s/n:null;case"min":return n>0?r:null;case"max":return n>0?o:null;case"first":return t.length>0?String(t[0]??""):null;case"last":return t.length>0?String(t[t.length-1]??""):null;default:return null}}async function Ue(e,t){let n="",s=[];for(let m=0;m<e.length;m++){let c=e[m];(c==="-s"||c==="--sort")&&m+1<e.length?n=e[++m]:c.startsWith("-")||s.push(c)}if(s.length<2)return{stdout:"",stderr:`xan merge: usage: xan merge [OPTIONS] FILE1 FILE2 ...
57
- `,exitCode:1};let r=[],o=null;for(let m of s){let c=await k([m],t);if(c.error)return c.error;if(o===null)o=c.headers;else if(JSON.stringify(o)!==JSON.stringify(c.headers))return{stdout:"",stderr:`xan merge: all files must have the same headers
58
- `,exitCode:1};r.push({headers:c.headers,data:c.data})}if(!o)return{stdout:"",stderr:"",exitCode:0};let i=[],p=new $(t,"xan merge"),h=r.reduce((m,c)=>W(m,c.data.length,"xan merge"),0);p.addRows(h,o.length);for(let{data:m}of r)for(let c of m)t.executionScope?.throwIfAborted("xan merge output"),i.push(c);if(n){if(!o.includes(n))return{stdout:"",stderr:`xan merge: column '${n}' not found
59
- `,exitCode:1};i.sort((m,c)=>{let a=m[n],d=c[n],u=typeof a=="number"?a:Number.parseFloat(String(a)),l=typeof d=="number"?d:Number.parseFloat(String(d));return!Number.isNaN(u)&&!Number.isNaN(l)?u-l:String(a??"").localeCompare(String(d??""))})}return{stdout:C(o,i,t),stderr:"",exitCode:0}}async function ze(e,t){let n=e.filter(p=>!p.startsWith("-")),{headers:s,data:r,error:o}=await k(n,t);return o||(r.length===0?{stdout:"",stderr:"",exitCode:0}:(new $(t,"xan behead").addRows(r.length,s.length),{stdout:tt(s,r,t),stderr:"",exitCode:0}))}async function qe(e,t){let n=null,s=null,r=[];for(let d=0;d<e.length;d++){let u=e[d];if(u==="--seed"&&d+1<e.length)s=Number.parseInt(e[++d],10);else if(!u.startsWith("-")){let l=Number.parseInt(u,10);n===null&&!Number.isNaN(l)&&l>0?n=l:r.push(u)}}if(n===null)return{stdout:"",stderr:`xan sample: usage: xan sample <sample-size> [FILE]
60
- `,exitCode:1};let{headers:o,data:i,error:p}=await k(r,t);if(p)return p;if(i.length<=n)return{stdout:C(o,i,t),stderr:"",exitCode:0};let h=s!==null?s:Date.now(),m=()=>(h=h*1103515245+12345&2147483647,h/2147483647),c=i.map((d,u)=>u);for(let d=c.length-1;d>0;d--){let u=Math.floor(m()*(d+1));[c[d],c[u]]=[c[u],c[d]]}let a=c.slice(0,n).sort((d,u)=>d-u).map(d=>i[d]);return{stdout:C(o,a,t),stderr:"",exitCode:0}}async function Je(e,t){let n=!1,s=[];for(let c=0;c<e.length;c++){let a=e[c];a==="-p"||a==="--pad"?n=!0:a.startsWith("-")||s.push(a)}if(s.length===0)return{stdout:"",stderr:`xan cat: no files specified
61
- `,exitCode:1};let r=await Ye(t,s,{cmdName:"xan cat",stopOnError:!0});if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:r.exitCode};let o=[],i=[],p=new $(t,"xan cat"),h=new Set;for(let{content:c}of r.files){let{headers:a,data:d}=Ze(Y(c),{maxStringLength:Math.min(t.limits.maxInputBytes,t.limits.maxStringLength),maxArrayElements:t.limits.maxArrayElements,maxRows:t.limits.maxCsvRows,maxCells:t.limits.maxCsvCells});p.addRows(d.length,a.length),o.push({headers:a,data:d});for(let u of a)if(!h.has(u)){if(h.add(u),h.size>t.limits.maxArrayElements)throw new E(`xan cat: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");i.push(u)}}if(!n){let c=JSON.stringify(o[0].headers);for(let a=1;a<o.length;a++)if(JSON.stringify(o[a].headers)!==c)return{stdout:"",stderr:`xan cat: headers do not match (use -p to pad)
62
- `,exitCode:1};i=o[0].headers}let m=[];for(let{headers:c,data:a}of o)for(let d of a){let u=F();for(let l of i)b(u,l,c.includes(l)?d[l]:"");m.push(u)}return{stdout:C(i,m,t),stderr:"",exitCode:0}}async function Be(e,t){let n="",s=[],r=!1,o=!1,i=[];for(let u=0;u<e.length;u++){let l=e[u];(l==="-s"||l==="--select")&&u+1<e.length?s=e[++u].split(","):l==="-v"||l==="--invert"?r=!0:l==="-i"||l==="--ignore-case"?o=!0:l==="-r"||l==="--regex"||l.startsWith("-")||(n?i.push(l):n=l)}if(!n)return{stdout:"",stderr:`xan search: no pattern specified
63
- `,exitCode:1};let{headers:p,data:h,error:m}=await k(i,t);if(m)return m;let c=s.length>0?s:p,a;try{a=Z(n,o?"i":"")}catch{return{stdout:"",stderr:`xan search: invalid regex pattern '${n}'
64
- `,exitCode:1}}let d=h.filter(u=>{let l=c.some(f=>{let x=u[f];return x!=null&&a.test(String(x))});return r?!l:l});return{stdout:C(p,d,t),stderr:"",exitCode:0}}async function He(e,t){let n="",s=[];for(let l of e)l.startsWith("-")||(n?s.push(l):n=l);if(!n)return{stdout:"",stderr:`xan flatmap: no expression specified
65
- `,exitCode:1};let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=z(t),m=X(n,p).map(({expr:l,name:f})=>({alias:typeof f=="string"?f:f[0],ast:U(l,!0,p)})),c={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0};if(W(r.length,m.length,"xan flatmap")>t.limits.maxArrayElements)throw new E(`xan flatmap: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");let a=[...r,...m.map(l=>l.alias)],d=[],u=new $(t,"xan flatmap");for(let l of o){let f=[],x=1;for(let g of m){u.consumeWork();let y=V(l,g.ast,c),w=y.length>0&&Array.isArray(y[0])?y[0]:y;if(w.length>t.limits.maxArrayElements)throw new E(`xan flatmap: expression result limit exceeded (${t.limits.maxArrayElements})`,"array_elements");f.push(w),x=Math.max(x,w.length)}for(let g=0;g<x;g++){u.addRow(a.length);let y=j(l);for(let w=0;w<m.length;w++){let A=f[w][g]??null;b(y,m[w].alias,A)}d.push(y)}}return{stdout:C(a,d,t),stderr:"",exitCode:0}}async function Ke(e,t){let{cmdView:n}=await import("./xan-view-KOXASOEV.js");return n(e,t)}var dt=new Set(["fuzzy-join","glob","hist","input","parallel","plot","progress","range","scrape","tokenize","union-find"]),St=new Set(["agg","behead","cat","count","dedup","drop","enum","explode","f","filter","fixlengths","flatmap","flatten","fmt","frequency","freq","from","groupby","head","headers","implode","join","map","merge","partition","pivot","rename","reverse","sample","search","select","shuffle","slice","sort","split","stats","tail","to","top","transform","transpose","view",...dt]),pt={name:"xan",summary:"CSV toolkit for data manipulation",usage:"xan <COMMAND> [OPTIONS] [FILE]",description:`xan is a collection of commands for working with CSV data.
66
- It provides a simple, ergonomic interface for common data operations.
67
-
68
- COMMANDS:
69
- Core:
70
- headers Show column names
71
- count Count rows
72
- head Show first N rows
73
- tail Show last N rows
74
- slice Extract row range
75
- reverse Reverse row order
76
- behead Remove header row
77
- sample Random sample of rows
78
-
79
- Column operations:
80
- select Select columns (supports glob, ranges, negation)
81
- drop Drop columns
82
- rename Rename columns
83
- enum Add row index column
84
-
85
- Row operations:
86
- filter Filter rows by expression
87
- search Filter rows by regex match
88
- sort Sort rows
89
- dedup Remove duplicates
90
- top Get top N by column
91
-
92
- Transformations:
93
- map Add computed columns
94
- transform Modify existing columns
95
- explode Split column into multiple rows
96
- implode Combine rows, join column values
97
- flatmap Map returning multiple rows
98
- pivot Reshape rows into columns
99
- transpose Swap rows and columns
100
-
101
- Aggregation:
102
- agg Aggregate values
103
- groupby Group and aggregate
104
- frequency Count value occurrences
105
- stats Show column statistics
106
-
107
- Multi-file:
108
- cat Concatenate CSV files
109
- join Join two CSV files on key
110
- merge Merge sorted CSV files
111
- split Split into multiple files
112
- partition Split by column value
113
-
114
- Data conversion:
115
- to Convert CSV to other formats (json)
116
- from Convert other formats to CSV (json)
117
- shuffle Randomly reorder rows
118
- fixlengths Fix ragged CSV files
119
-
120
- Output:
121
- view Pretty print as table
122
- flatten Display records vertically (alias: f)
123
- fmt Format output
124
-
125
- EXAMPLES:
126
- xan headers data.csv
127
- xan count data.csv
128
- xan head -n 5 data.csv
129
- xan select name,email data.csv
130
- xan select 'vec_*' data.csv # glob pattern
131
- xan select 'a:c' data.csv # column range
132
- xan filter 'age > 30' data.csv
133
- xan search -r '^foo' data.csv
134
- xan sort -N price data.csv
135
- xan agg 'sum(amount) as total' data.csv
136
- xan groupby region 'count() as n' data.csv
137
- xan explode tags data.csv
138
- xan join id file1.csv id file2.csv
139
- xan pivot year 'sum(sales)' data.csv`,options:[" --help display this help and exit"]},bt={headers:{name:"xan headers",summary:"Show column names",usage:"xan headers [OPTIONS] [FILE]",description:"Display column names from a CSV file.",options:["-j, --just-names show names only (no index)"]},count:{name:"xan count",summary:"Count rows",usage:"xan count [FILE]",description:"Count the number of data rows (excluding header).",options:[]},filter:{name:"xan filter",summary:"Filter rows by expression",usage:"xan filter [OPTIONS] EXPR [FILE]",description:"Filter CSV rows using moonblade expressions.",options:["-v, --invert invert match","-l, --limit N limit output rows"]},search:{name:"xan search",summary:"Filter rows by regex",usage:"xan search [OPTIONS] PATTERN [FILE]",description:"Filter CSV rows by regex match on columns.",options:["-s, --select COLS search only these columns","-v, --invert invert match","-i, --ignore-case case insensitive"]},select:{name:"xan select",summary:"Select columns",usage:"xan select COLS [FILE]",description:"Select columns by name, index, glob, or range.",options:["Supports: col names, indices (0,1), ranges (a:c), globs (vec_*), negation (!col)"]},explode:{name:"xan explode",summary:"Split column into rows",usage:"xan explode COLUMN [OPTIONS] [FILE]",description:"Split delimited column values into multiple rows.",options:["-s, --separator SEP separator (default: |)","--drop-empty drop empty values","-r, --rename NAME rename column"]},implode:{name:"xan implode",summary:"Combine rows",usage:"xan implode COLUMN [OPTIONS] [FILE]",description:"Combine consecutive rows, joining column values.",options:["-s, --sep SEP separator (default: |)","-r, --rename NAME rename column"]},join:{name:"xan join",summary:"Join CSV files",usage:"xan join KEY1 FILE1 KEY2 FILE2 [OPTIONS]",description:"Join two CSV files on key columns.",options:["--left left outer join","--right right outer join","--full full outer join","-D, --default VAL default for missing"]},pivot:{name:"xan pivot",summary:"Reshape to columns",usage:"xan pivot COLUMN AGG_EXPR [OPTIONS] [FILE]",description:"Turn row values into columns.",options:["-g, --groupby COLS group by columns"]}},Jn={name:"xan",async execute(e,t){if(e.length===0||ne(e))return J(pt);let n=e[0],s=e.slice(1);if(ne(s)){let r=bt[n];return r?J(r):J(pt)}if(dt.has(n))return{stdout:"",stderr:`xan ${n}: not yet implemented
140
- `,exitCode:1};switch(n){case"headers":return we(s,t);case"count":return ve(s,t);case"head":return Se(s,t);case"tail":return be(s,t);case"slice":return Ce(s,t);case"reverse":return ke(s,t);case"behead":return ze(s,t);case"sample":return qe(s,t);case"select":return he(s,t);case"drop":return ge(s,t);case"rename":return xe(s,t);case"enum":return ye(s,t);case"filter":return $e(s,t);case"search":return Be(s,t);case"sort":return Fe(s,t);case"dedup":return Te(s,t);case"top":return Me(s,t);case"map":return Pe(s,t);case"transform":return De(s,t);case"explode":return _e(s,t);case"implode":return We(s,t);case"flatmap":return He(s,t);case"pivot":return Ve(s,t);case"agg":return pe(s,t);case"groupby":return de(s,t);case"frequency":case"freq":return me(s,t);case"stats":return fe(s,t);case"cat":return Je(s,t);case"join":return je(s,t);case"merge":return Ue(s,t);case"split":return Ae(s,t);case"partition":return Le(s,t);case"to":return Oe(s,t);case"from":return Re(s,t);case"transpose":return Ee(s,t);case"shuffle":return Ie(s,t);case"fixlengths":return Ne(s,t);case"view":return ae(s,t);case"flatten":case"f":return ie(s,t);case"fmt":return Ke(s,t);default:return St.has(n)?{stdout:"",stderr:`xan ${n}: not yet implemented
141
- `,exitCode:1}:{stdout:"",stderr:`xan: unknown command '${n}'
142
- Run 'xan --help' for usage.
143
- `,exitCode:1}}}},Bn={name:"xan",flags:[],stdinType:"text",needsArgs:!0};export{Jn as a,Bn as b};
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- var u=new TextDecoder("utf-8",{fatal:!0}),y=new TextEncoder,d=512*1024*1024;function f(t,n,e){if(!Number.isSafeInteger(t)||t<0||!Number.isSafeInteger(n)||n<0||t>n)throw new RangeError(`${e}: byte conversion limit exceeded (${n} bytes)`)}function x(t){let n=0;for(let e=0;e<t.length;e++){let o=t.charCodeAt(e);if(o<=127)n++;else if(o<=2047)n+=2;else if(o>=55296&&o<=56319&&e+1<t.length){let r=t.charCodeAt(e+1);r>=56320&&r<=57343?(n+=4,e++):n+=3}else n+=3}return n}function a(t,n=d){let e=t;if(!e)return e;f(e.length,n,"UTF-8 decode");let o=!1;for(let i=0;i<e.length;i++){let c=e.charCodeAt(i);if(c>255)return e;c>127&&(o=!0)}if(!o)return e;let r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);try{return u.decode(r)}catch{return e}}function l(t,n=d){if(!t)return t;f(x(t),n,"UTF-8 encode");let e=y.encode(t),o="";for(let r=0;r<e.length;r++)o+=String.fromCharCode(e[r]);return o}var h="";function g(t,n=d){f(t.byteLength,n,"byte-string conversion");let e="";for(let o=0;o<t.length;o++)e+=String.fromCharCode(t[o]);return e}async function p(t,n){return typeof t.readFileBytes=="function"?t.readFileBytes(n):g(await t.readFileBuffer(n))}function s(t){return t.stdoutKind?t.stdoutKind:t.stdoutEncoding==="binary"?"bytes":"text"}function b(t){return s(t)==="bytes"?t.stdout:l(t.stdout)}function B(t){return s(t)==="bytes"?a(t.stdout):t.stdout}export{x as a,a as b,l as c,h as d,p as e,b as f,B as g};
@@ -1,17 +0,0 @@
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-MPQMTLXN.js";import{a as oe}from"./chunk-3MRB66F4.js";import{a as Te}from"./chunk-6D75E4LV.js";import{a as le}from"./chunk-LG6IN6SW.js";import{b as de,c as he,d as me}from"./chunk-VLWZ6L7C.js";import{d as we}from"./chunk-X45GP3AQ.js";import{l as ae}from"./chunk-LCP3IKI7.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,20 +0,0 @@
1
- #!/usr/bin/env node
2
- import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
- import{e as X}from"./chunk-QKWMWSV3.js";import{d as I}from"./chunk-X45GP3AQ.js";import{l as W,m as Z}from"./chunk-LCP3IKI7.js";import{a as G}from"./chunk-CPKBPQ2C.js";import{a as V}from"./chunk-NE4R2FVV.js";import{a as q,b as Q}from"./chunk-MUFNRCMY.js";function h(s,t,e){if(G(e)>s.limits.maxOutputSize-G(t))throw new W(`ls: output size limit exceeded (${s.limits.maxOutputSize} bytes)`,"output_size");return t+e}function tt(s,t){if(t>s.limits.maxArrayElements)throw new W(`ls: array element limit exceeded (${s.limits.maxArrayElements})`,"array_elements")}function ot(s,t,e){tt(s,e),t.reserve(e)}function x(s,t){let e=new X(s.limits.maxOutputSize,"ls");for(let l=0;l<t.length;l++)l>0&&e.append(`
4
- `),e.append(t[l]);return t.length>0&&e.append(`
5
- `),e.build()}function j(s){if(s<1024)return String(s);if(s<1024*1024){let e=s/1024;return e<10?`${e.toFixed(1)}K`:`${Math.round(e)}K`}if(s<1024*1024*1024){let e=s/1048576;return e<10?`${e.toFixed(1)}M`:`${Math.round(e)}M`}let t=s/(1024*1024*1024);return t<10?`${t.toFixed(1)}G`:`${Math.round(t)}G`}function B(s){let e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][s.getMonth()],l=String(s.getDate()).padStart(2," "),m=new Date,g=new Date(m.getTime()-4320*60*60*1e3);if(s>g){let D=String(s.getHours()).padStart(2,"0"),u=String(s.getMinutes()).padStart(2,"0");return`${e} ${l} ${D}:${u}`}let b=s.getFullYear();return`${e} ${l} ${b}`}function H(s){return s.isDirectory?"/":s.isSymbolicLink?"@":(s.mode&73)!==0?"*":""}var it={name:"ls",summary:"list directory contents",usage:"ls [OPTION]... [FILE]...",options:["-a, --all do not ignore entries starting with .","-A, --almost-all do not list . and ..","-d, --directory list directories themselves, not their contents","-F, --classify append indicator (one of */=>@) to entries","-h, --human-readable with -l, print sizes like 1K 234M 2G etc.","-l use a long listing format","-r, --reverse reverse order while sorting","-R, --recursive list subdirectories recursively","-S sort by file size, largest first","-t sort by time, newest first","-1 list one file per line"," --help display this help and exit"]},at={showAll:{short:"a",long:"all",type:"boolean"},showAlmostAll:{short:"A",long:"almost-all",type:"boolean"},longFormat:{short:"l",type:"boolean"},humanReadable:{short:"h",long:"human-readable",type:"boolean"},recursive:{short:"R",long:"recursive",type:"boolean"},reverse:{short:"r",long:"reverse",type:"boolean"},sortBySize:{short:"S",type:"boolean"},classifyFiles:{short:"F",long:"classify",type:"boolean"},directoryOnly:{short:"d",long:"directory",type:"boolean"},sortByTime:{short:"t",type:"boolean"},onePerLine:{short:"1",type:"boolean"}},gt={name:"ls",async execute(s,t){if(Q(s))return q(it);let e=V("ls",s,at);if(!e.ok)return e.error;let l=e.result.flags.showAll,m=e.result.flags.showAlmostAll,g=e.result.flags.longFormat,b=e.result.flags.humanReadable,D=e.result.flags.recursive,u=e.result.flags.reverse,w=e.result.flags.classifyFiles,P=e.result.flags.directoryOnly,R=lt(s,e.result.flags.sortBySize,e.result.flags.sortByTime);e.result.flags.onePerLine;let z=e.result.positional;z.length===0&&z.push(".");let $="",E="",C=0,O=new I({limits:t.limits,signal:t.signal,executionScope:t.executionScope,site:"ls"});if(P){for(let n of await K(z,t,R,u,O)){O.visit(0);let i=t.fs.resolvePath(t.cwd,n);try{let v=await t.fs.stat(i);if(g){let L=v.isDirectory?"drwxr-xr-x":"-rw-r--r--",c=w?H(await t.fs.lstat(i)):"",S=v.size??0,y=b?j(S).padStart(5):String(S).padStart(5),f=v.mtime??new Date(0),o=B(f);$=h(t,$,`${L} 1 user user ${y} ${o} ${n}${c}
6
- `)}else{let L=w?H(await t.fs.lstat(i)):"";$=h(t,$,`${n}${L}
7
- `)}}catch{E=h(t,E,`ls: cannot access '${n}': No such file or directory
8
- `),C=2}}return{stdout:$,stderr:E,exitCode:C}}let d=[],p=[];for(let n of z){O.visit(0);try{(await t.fs.stat(t.fs.resolvePath(t.cwd,n))).isDirectory?(p.length>0&&O.reserve(1),p.push(n)):d.push(n)}catch{E=h(t,E,`ls: ${n}: No such file or directory
9
- `),C=2}}let k=async(n,i)=>{let v=await et(n,t,l,m,g,D,i,u,b,R,w,!1,O,0,new Set,!0);$=h(t,$,v.stdout),E=h(t,E,v.stderr),v.exitCode!==0&&(C=v.exitCode)};for(let n of await K(d,t,R,u,O))await k(n,!1);let N=z.length>1;for(let n of await K(p,t,R,u,O))$&&($=h(t,$,`
10
- `)),await k(n,N);return{stdout:$,stderr:E,exitCode:C}}};function lt(s,t,e){if(!t&&!e)return"name";if(t!==e)return t?"size":"time";let l="name";for(let m of s){if(m==="--")break;if(!(!m.startsWith("-")||m.startsWith("--")))for(let g of m.slice(1))g==="S"?l="size":g==="t"&&(l="time")}return l}async function K(s,t,e,l,m){return await U(s,g=>t.fs.resolvePath(t.cwd,g),t,e,l,m)}async function U(s,t,e,l,m,g){let b=[...s];if(l==="name")b.sort();else{g?.checkpoint(b.length);let D=new Map;for(let u of b)try{let w=await e.fs.lstat(t(u));D.set(u,l==="size"?w.size??0:(w.mtime??new Date(0)).getTime())}catch{D.set(u,0)}b.sort((u,w)=>{let P=(D.get(w)??0)-(D.get(u)??0);return P!==0?P:u<w?-1:u>w?1:0})}return m&&b.reverse(),b}async function et(s,t,e,l,m,g,b,D=!1,u=!1,w="name",P=!1,R=!1,z=new I({limits:t.limits,signal:t.signal,executionScope:t.executionScope,site:"ls"}),$=0,E=new Set,C=!1){let O=e||l,d=t.fs.resolvePath(t.cwd,s);try{C||z.visit($);let p=await t.fs.stat(d);if(!p.isDirectory){let c=P?H(await t.fs.lstat(d)):"";if(m){let S=p.size??0,y=u?j(S).padStart(5):String(S).padStart(5),f=p.mtime??new Date(0),o=B(f);return{stdout:`-rw-r--r-- 1 user user ${y} ${o} ${s}${c}
11
- `,stderr:"",exitCode:0}}return{stdout:`${s}${c}
12
- `,stderr:"",exitCode:0}}let k=p.identity??(p.dev!==void 0&&p.ino!==void 0?`${String(p.dev)}:${String(p.ino)}`:await t.fs.realpath(d).catch(()=>{}));if(k!==void 0&&E.has(k))return{stdout:"",stderr:`ls: ${s}: symbolic link cycle detected
13
- `,exitCode:2};let N=new Set(E);k!==void 0&&N.add(k);let n=await t.fs.readdir(d);z.checkpoint(),ot(t,z,n.length+(e?2:0)),O||(n=n.filter(c=>!c.startsWith("."))),n=await U(n,c=>d==="/"?`/${c}`:`${d}/${c}`,t,w,!1,z),e&&(n=[".","..",...n]),D&&n.reverse();let i="",v="",L=0;if((g||b)&&(i=h(t,i,`${s}:
14
- `)),m){i=h(t,i,`total ${n.length}
15
- `);let c=n.filter(o=>o==="."||o===".."),S=n.filter(o=>o!=="."&&o!=="..");for(let o of c)i=h(t,i,`drwxr-xr-x 1 user user 0 Jan 1 00:00 ${o}
16
- `);let y=[];for(let o=0;o<S.length;o+=100){let F=S.slice(o,o+100),r=await Promise.all(F.map(async a=>{let M=d==="/"?`/${a}`:`${d}/${a}`;try{let A=await t.fs.stat(M),J=A.isDirectory?"drwxr-xr-x":"-rw-r--r--",_=P?H(await t.fs.lstat(M)):"",Y=A.size??0,st=u?j(Y).padStart(5):String(Y).padStart(5),rt=A.mtime??new Date(0),nt=B(rt);return{name:a,line:`${J} 1 user user ${st} ${nt} ${a}${_}
17
- `}}catch{return{name:a,line:`-rw-r--r-- 1 user user 0 Jan 1 00:00 ${a}
18
- `}}}));y.push(...r)}let f=new Map(S.map((o,F)=>[o,F]));y.sort((o,F)=>(f.get(o.name)??0)-(f.get(F.name)??0));for(let{line:o}of y)i=h(t,i,o)}else if(P){let c=[],S=n.filter(f=>f!=="."&&f!==".."),y=n.filter(f=>f==="."||f==="..");for(let f of y)c.push(`${f}/`);for(let f=0;f<S.length;f+=100){let o=S.slice(f,f+100),F=await Promise.all(o.map(async r=>{let a=d==="/"?`/${r}`:`${d}/${r}`;try{let M=await t.fs.lstat(a);return`${r}${H(M)}`}catch{return r}}));c.push(...F)}i=h(t,i,x(t,c))}else i=h(t,i,x(t,n));if(g){let c=n.filter(r=>r!=="."&&r!==".."),S=new Set(c),y=[];if(t.fs.readdirWithFileTypes){let r=await t.fs.readdirWithFileTypes(d);z.checkpoint(),tt(t,r.length),y=r.filter(a=>a.isDirectory&&S.has(a.name)).map(a=>({name:a.name,isDirectory:!0}))}else for(let r=0;r<c.length;r+=100){let a=c.slice(r,r+100),M=await Promise.all(a.map(async A=>{let J=d==="/"?`/${A}`:`${d}/${A}`;try{let _=await t.fs.stat(J);return{name:A,isDirectory:_.isDirectory}}catch{return{name:A,isDirectory:!1}}}));y.push(...M.filter(A=>A.isDirectory))}let f=await U(y.map(r=>r.name),r=>d==="/"?`/${r}`:`${d}/${r}`,t,w,D,z),o=new Map(f.map((r,a)=>[r,a]));y.sort((r,a)=>(o.get(r.name)??0)-(o.get(a.name)??0));let F=[];for(let r of y){let a=s==="."?`./${r.name}`:`${s}/${r.name}`,M=await et(a,t,e,l,m,g,!1,D,u,w,P,!0,z,$+1,N);F.push({name:r.name,result:M})}F.sort((r,a)=>(o.get(r.name)??0)-(o.get(a.name)??0));for(let{result:r}of F)i=h(t,i,`
19
- `),i=h(t,i,r.stdout),v=h(t,v,r.stderr),r.exitCode!==0&&(L=r.exitCode)}return{stdout:i,stderr:v,exitCode:L}}catch(p){if(p instanceof W||p instanceof Z)throw p;return{stdout:"",stderr:`ls: ${s}: No such file or directory
20
- `,exitCode:2}}}var yt={name:"ls",flags:[{flag:"-a",type:"boolean"},{flag:"-A",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-1",type:"boolean"}],needsFiles:!0};export{gt as a,yt as b};