just-bash 2.12.2 → 2.12.4

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 (232) hide show
  1. package/dist/bin/chunks/awk2-RGDNV4HO.js +2 -0
  2. package/dist/bin/chunks/{base64-YXBFJFHG.js → base64-43M2R3GA.js} +1 -1
  3. package/dist/bin/{shell/chunks/cat-3J7U3HHI.js → chunks/cat-XZIJZXKP.js} +1 -1
  4. package/dist/bin/chunks/chunk-4C4F4EKM.js +2 -0
  5. package/dist/bin/{shell/chunks/chunk-MZKPWGID.js → chunks/chunk-54G6AE72.js} +23 -23
  6. package/dist/bin/chunks/chunk-55QIFSKH.js +36 -0
  7. package/dist/bin/chunks/chunk-6MF2IYQX.js +10 -0
  8. package/dist/bin/{shell/chunks/chunk-NEQEZ32M.js → chunks/chunk-CGE2EHYP.js} +3 -3
  9. package/dist/bin/chunks/chunk-DGFDVZ4N.js +21 -0
  10. package/dist/bin/chunks/chunk-EO5AH4U7.js +5 -0
  11. package/dist/bin/chunks/{chunk-2SIXTZCJ.js → chunk-EZS766DD.js} +4 -4
  12. package/dist/bin/{shell/chunks/chunk-THLAHQXV.js → chunks/chunk-FA2CHD73.js} +1 -1
  13. package/dist/bin/chunks/{chunk-BARKRZDC.js → chunk-GOJZHH3L.js} +1 -1
  14. package/dist/bin/chunks/{chunk-435ZOZCY.js → chunk-J4WYAO5Q.js} +1 -1
  15. package/dist/bin/chunks/chunk-LHN3LRVT.js +100 -0
  16. package/dist/bin/chunks/chunk-MRP4ZCD7.js +6 -0
  17. package/dist/bin/chunks/{chunk-JNPUO56K.js → chunk-NDP6L74Z.js} +1 -1
  18. package/dist/bin/chunks/chunk-PWZZGTFL.js +13 -0
  19. package/dist/bin/chunks/{chunk-3NVWSLHI.js → chunk-Q3FNZYGG.js} +99 -99
  20. package/dist/bin/{shell/chunks/chunk-7SWOLTCR.js → chunks/chunk-Q4WHWGOT.js} +1 -1
  21. package/dist/bin/chunks/chunk-SY2WM5RM.js +14 -0
  22. package/dist/bin/chunks/chunk-SYG3IW7P.js +2 -0
  23. package/dist/bin/chunks/chunk-SYL34GE7.js +21 -0
  24. package/dist/bin/chunks/{chunk-DREQRXNN.js → chunk-V5YFCVCZ.js} +1 -1
  25. package/dist/bin/chunks/chunk-V7VIJQD6.js +6 -0
  26. package/dist/bin/chunks/chunk-WMYKQURM.js +2 -0
  27. package/dist/bin/chunks/chunk-WO4B7WUT.js +2 -0
  28. package/dist/bin/{shell/chunks/chunk-5U7Q4GUC.js → chunks/chunk-WWZVR5NN.js} +4 -4
  29. package/dist/bin/chunks/{cut-HDHQDWRG.js → cut-5EY2XPXX.js} +1 -1
  30. package/dist/bin/chunks/expr-VEFRBJT4.js +2 -0
  31. package/dist/bin/chunks/flag-coverage-K6IBGWAC.js +2 -0
  32. package/dist/bin/chunks/{gzip-RQ5RIFJV.js → gzip-LHOO65AN.js} +1 -1
  33. package/dist/bin/chunks/jq-VBB2XIZS.js +2 -0
  34. package/dist/bin/chunks/ln-BEOFQJNP.js +2 -0
  35. package/dist/bin/chunks/python3-JX5PXXTX.js +17 -0
  36. package/dist/bin/chunks/sed-BYFYBR4A.js +2 -0
  37. package/dist/bin/chunks/sleep-E3K6M6BN.js +2 -0
  38. package/dist/bin/chunks/{sort-NZSEYCI6.js → sort-7GENYU2I.js} +1 -1
  39. package/dist/bin/chunks/sqlite3-SJHZFBT2.js +2 -0
  40. package/dist/bin/{shell/chunks/tar-VIYVHMER.js → chunks/tar-W5GBTEDZ.js} +1 -1
  41. package/dist/bin/chunks/time-AWAKKRSE.js +2 -0
  42. package/dist/bin/chunks/timeout-OLS72AZG.js +2 -0
  43. package/dist/bin/chunks/tr-LZF57GYP.js +2 -0
  44. package/dist/bin/chunks/{uniq-FZWFZEN5.js → uniq-TMSAIZM3.js} +1 -1
  45. package/dist/bin/chunks/worker.js +92 -29
  46. package/dist/bin/chunks/xan-BJ66NSYT.js +2 -0
  47. package/dist/bin/chunks/yq-GPYVGU2N.js +2 -0
  48. package/dist/bin/just-bash.js +294 -294
  49. package/dist/bin/shell/chunks/awk2-RGDNV4HO.js +2 -0
  50. package/dist/bin/shell/chunks/{base64-YXBFJFHG.js → base64-43M2R3GA.js} +1 -1
  51. package/dist/bin/{chunks/cat-3J7U3HHI.js → shell/chunks/cat-XZIJZXKP.js} +1 -1
  52. package/dist/bin/shell/chunks/chunk-4C4F4EKM.js +2 -0
  53. package/dist/bin/{chunks/chunk-MZKPWGID.js → shell/chunks/chunk-54G6AE72.js} +23 -23
  54. package/dist/bin/shell/chunks/chunk-55QIFSKH.js +36 -0
  55. package/dist/bin/shell/chunks/chunk-6MF2IYQX.js +10 -0
  56. package/dist/bin/{chunks/chunk-NEQEZ32M.js → shell/chunks/chunk-CGE2EHYP.js} +3 -3
  57. package/dist/bin/shell/chunks/chunk-DGFDVZ4N.js +21 -0
  58. package/dist/bin/shell/chunks/chunk-EO5AH4U7.js +5 -0
  59. package/dist/bin/shell/chunks/{chunk-2SIXTZCJ.js → chunk-EZS766DD.js} +4 -4
  60. package/dist/bin/{chunks/chunk-THLAHQXV.js → shell/chunks/chunk-FA2CHD73.js} +1 -1
  61. package/dist/bin/shell/chunks/{chunk-BARKRZDC.js → chunk-GOJZHH3L.js} +1 -1
  62. package/dist/bin/shell/chunks/{chunk-435ZOZCY.js → chunk-J4WYAO5Q.js} +1 -1
  63. package/dist/bin/shell/chunks/chunk-LHN3LRVT.js +100 -0
  64. package/dist/bin/shell/chunks/chunk-MRP4ZCD7.js +6 -0
  65. package/dist/bin/shell/chunks/{chunk-JNPUO56K.js → chunk-NDP6L74Z.js} +1 -1
  66. package/dist/bin/shell/chunks/chunk-PWZZGTFL.js +13 -0
  67. package/dist/bin/shell/chunks/{chunk-3NVWSLHI.js → chunk-Q3FNZYGG.js} +99 -99
  68. package/dist/bin/{chunks/chunk-7SWOLTCR.js → shell/chunks/chunk-Q4WHWGOT.js} +1 -1
  69. package/dist/bin/shell/chunks/chunk-SY2WM5RM.js +14 -0
  70. package/dist/bin/shell/chunks/chunk-SYG3IW7P.js +2 -0
  71. package/dist/bin/shell/chunks/chunk-SYL34GE7.js +21 -0
  72. package/dist/bin/shell/chunks/{chunk-DREQRXNN.js → chunk-V5YFCVCZ.js} +1 -1
  73. package/dist/bin/shell/chunks/chunk-V7VIJQD6.js +6 -0
  74. package/dist/bin/shell/chunks/chunk-WMYKQURM.js +2 -0
  75. package/dist/bin/shell/chunks/chunk-WO4B7WUT.js +2 -0
  76. package/dist/bin/{chunks/chunk-5U7Q4GUC.js → shell/chunks/chunk-WWZVR5NN.js} +4 -4
  77. package/dist/bin/shell/chunks/{cut-HDHQDWRG.js → cut-5EY2XPXX.js} +1 -1
  78. package/dist/bin/shell/chunks/expr-VEFRBJT4.js +2 -0
  79. package/dist/bin/shell/chunks/flag-coverage-K6IBGWAC.js +2 -0
  80. package/dist/bin/shell/chunks/{gzip-RQ5RIFJV.js → gzip-LHOO65AN.js} +1 -1
  81. package/dist/bin/shell/chunks/jq-VBB2XIZS.js +2 -0
  82. package/dist/bin/shell/chunks/ln-BEOFQJNP.js +2 -0
  83. package/dist/bin/shell/chunks/python3-JX5PXXTX.js +17 -0
  84. package/dist/bin/shell/chunks/sed-BYFYBR4A.js +2 -0
  85. package/dist/bin/shell/chunks/sleep-E3K6M6BN.js +2 -0
  86. package/dist/bin/shell/chunks/{sort-NZSEYCI6.js → sort-7GENYU2I.js} +1 -1
  87. package/dist/bin/shell/chunks/sqlite3-SJHZFBT2.js +2 -0
  88. package/dist/bin/{chunks/tar-VIYVHMER.js → shell/chunks/tar-W5GBTEDZ.js} +1 -1
  89. package/dist/bin/shell/chunks/time-AWAKKRSE.js +2 -0
  90. package/dist/bin/shell/chunks/timeout-OLS72AZG.js +2 -0
  91. package/dist/bin/shell/chunks/tr-LZF57GYP.js +2 -0
  92. package/dist/bin/shell/chunks/{uniq-FZWFZEN5.js → uniq-TMSAIZM3.js} +1 -1
  93. package/dist/bin/shell/chunks/xan-BJ66NSYT.js +2 -0
  94. package/dist/bin/shell/chunks/yq-GPYVGU2N.js +2 -0
  95. package/dist/bin/shell/shell.js +234 -234
  96. package/dist/bundle/browser.js +671 -671
  97. package/dist/bundle/chunks/awk2-XLDR2J4Q.js +1 -0
  98. package/dist/bundle/chunks/{base64-A3SGWC34.js → base64-4YMZCVJ5.js} +1 -1
  99. package/dist/bundle/chunks/{cat-C2OBLGHA.js → cat-RDUMLXKC.js} +1 -1
  100. package/dist/bundle/chunks/chunk-2OHMPZNZ.js +20 -0
  101. package/dist/bundle/chunks/chunk-3RCXHB4E.js +4 -0
  102. package/dist/bundle/chunks/chunk-CCNMISUL.js +1 -0
  103. package/dist/bundle/chunks/chunk-DOTBQEPN.js +5 -0
  104. package/dist/bundle/chunks/chunk-GENDESYN.js +1 -0
  105. package/dist/bundle/chunks/chunk-H4QOE4W3.js +99 -0
  106. package/dist/bundle/chunks/{chunk-C6ZZC5FL.js → chunk-K5BTXJQC.js} +99 -99
  107. package/dist/bundle/chunks/chunk-KAZYKNBG.js +13 -0
  108. package/dist/bundle/chunks/{chunk-KAEMRWOH.js → chunk-KMEYNNUA.js} +1 -1
  109. package/dist/bundle/chunks/{chunk-FO655G4V.js → chunk-LTZRCH7N.js} +23 -23
  110. package/dist/bundle/chunks/{chunk-XULIVM35.js → chunk-N4QLRJ32.js} +1 -1
  111. package/dist/bundle/chunks/{chunk-5CJQNRNJ.js → chunk-NTP6TTH5.js} +1 -1
  112. package/dist/bundle/chunks/{chunk-IBFD7QQD.js → chunk-QJ7O6ZN3.js} +1 -1
  113. package/dist/bundle/chunks/chunk-QUME7R6S.js +9 -0
  114. package/dist/bundle/chunks/{chunk-U7QI5ZS5.js → chunk-RVT3MU3A.js} +4 -4
  115. package/dist/bundle/chunks/{chunk-6NY2AP72.js → chunk-SDNKECQQ.js} +4 -4
  116. package/dist/bundle/chunks/chunk-T2EHE3CV.js +1 -0
  117. package/dist/bundle/chunks/chunk-TBAWQWQB.js +12 -0
  118. package/dist/bundle/chunks/chunk-TXBZCHCQ.js +5 -0
  119. package/dist/bundle/chunks/chunk-VYV3YE2F.js +35 -0
  120. package/dist/bundle/chunks/{chunk-UJIR5V54.js → chunk-W42IGK5R.js} +1 -1
  121. package/dist/bundle/chunks/{chunk-7BQDVPII.js → chunk-WAN3B6E3.js} +1 -1
  122. package/dist/bundle/chunks/{chunk-7C6RBHP3.js → chunk-WKFATFPP.js} +3 -3
  123. package/dist/bundle/chunks/chunk-XXZ46GOX.js +20 -0
  124. package/dist/bundle/chunks/chunk-ZK6J6F7O.js +1 -0
  125. package/dist/bundle/chunks/{cut-LO6YYY5P.js → cut-OPC3VAGB.js} +1 -1
  126. package/dist/bundle/chunks/expr-74QHYJL5.js +1 -0
  127. package/dist/bundle/chunks/flag-coverage-VGF5NAZP.js +1 -0
  128. package/dist/bundle/chunks/{gzip-Y4N2UKE7.js → gzip-AQXSGOVS.js} +1 -1
  129. package/dist/bundle/chunks/jq-JQXAVWNT.js +1 -0
  130. package/dist/bundle/chunks/ln-RI2SJGXU.js +1 -0
  131. package/dist/bundle/chunks/python3-TSPOVUHX.js +16 -0
  132. package/dist/bundle/chunks/sed-CJFW7UYO.js +1 -0
  133. package/dist/bundle/chunks/sleep-TFDNFOXK.js +1 -0
  134. package/dist/bundle/chunks/{sort-T7TNLWXL.js → sort-DCNRDA7U.js} +1 -1
  135. package/dist/bundle/chunks/sqlite3-CTI4ZW7L.js +1 -0
  136. package/dist/bundle/chunks/{tar-E2DVQEWO.js → tar-Y6LP5EBC.js} +1 -1
  137. package/dist/bundle/chunks/time-WBKSMCJ6.js +1 -0
  138. package/dist/bundle/chunks/timeout-O7WSXY5H.js +1 -0
  139. package/dist/bundle/chunks/tr-GVTWMRZB.js +1 -0
  140. package/dist/bundle/chunks/{uniq-ZXE4O5XB.js → uniq-SUNANL47.js} +1 -1
  141. package/dist/bundle/chunks/worker.js +92 -29
  142. package/dist/bundle/chunks/xan-VMLUNIDS.js +1 -0
  143. package/dist/bundle/chunks/yq-QXIYE3MW.js +1 -0
  144. package/dist/bundle/index.cjs +852 -852
  145. package/dist/bundle/index.js +242 -242
  146. package/dist/commands/awk/interpreter/context.d.ts +2 -0
  147. package/dist/commands/awk/interpreter/interpreter.d.ts +2 -0
  148. package/dist/commands/query-engine/evaluator.d.ts +3 -0
  149. package/dist/interpreter/defense-aware-command-context.d.ts +6 -0
  150. package/dist/interpreter/interpreter.d.ts +8 -0
  151. package/dist/interpreter/types.d.ts +5 -0
  152. package/dist/timers.d.ts +2 -11
  153. package/dist/types.d.ts +13 -0
  154. package/package.json +1 -1
  155. package/dist/bin/chunks/awk2-ZE5HJBNV.js +0 -2
  156. package/dist/bin/chunks/chunk-2FFXXW3F.js +0 -14
  157. package/dist/bin/chunks/chunk-4E3LY6YK.js +0 -10
  158. package/dist/bin/chunks/chunk-4FNW6LFM.js +0 -5
  159. package/dist/bin/chunks/chunk-4PZYIYYG.js +0 -36
  160. package/dist/bin/chunks/chunk-6L4K3UGO.js +0 -100
  161. package/dist/bin/chunks/chunk-EPIOK4SY.js +0 -6
  162. package/dist/bin/chunks/chunk-IYZRLSTQ.js +0 -2
  163. package/dist/bin/chunks/chunk-JJHAWOIB.js +0 -2
  164. package/dist/bin/chunks/chunk-K47SEEPI.js +0 -6
  165. package/dist/bin/chunks/chunk-KPWFKFSD.js +0 -21
  166. package/dist/bin/chunks/chunk-RYXW3SZQ.js +0 -13
  167. package/dist/bin/chunks/chunk-VZKEP45B.js +0 -21
  168. package/dist/bin/chunks/expr-MLHUWFYI.js +0 -2
  169. package/dist/bin/chunks/flag-coverage-LQ37DA4R.js +0 -2
  170. package/dist/bin/chunks/jq-CXSPO2J5.js +0 -2
  171. package/dist/bin/chunks/ln-5TCJXDGY.js +0 -2
  172. package/dist/bin/chunks/python3-74B25WCY.js +0 -17
  173. package/dist/bin/chunks/sed-DNLJZZXZ.js +0 -2
  174. package/dist/bin/chunks/sleep-GUJH2AMQ.js +0 -2
  175. package/dist/bin/chunks/sqlite3-57UI7HYL.js +0 -2
  176. package/dist/bin/chunks/time-FAWHHOMA.js +0 -2
  177. package/dist/bin/chunks/timeout-4O4YYRTS.js +0 -2
  178. package/dist/bin/chunks/tr-4V5A3V2C.js +0 -2
  179. package/dist/bin/chunks/xan-7NIVZ3HP.js +0 -2
  180. package/dist/bin/chunks/yq-L5ZSGLLO.js +0 -2
  181. package/dist/bin/shell/chunks/awk2-ZE5HJBNV.js +0 -2
  182. package/dist/bin/shell/chunks/chunk-2FFXXW3F.js +0 -14
  183. package/dist/bin/shell/chunks/chunk-4E3LY6YK.js +0 -10
  184. package/dist/bin/shell/chunks/chunk-4FNW6LFM.js +0 -5
  185. package/dist/bin/shell/chunks/chunk-4PZYIYYG.js +0 -36
  186. package/dist/bin/shell/chunks/chunk-6L4K3UGO.js +0 -100
  187. package/dist/bin/shell/chunks/chunk-EPIOK4SY.js +0 -6
  188. package/dist/bin/shell/chunks/chunk-IYZRLSTQ.js +0 -2
  189. package/dist/bin/shell/chunks/chunk-JJHAWOIB.js +0 -2
  190. package/dist/bin/shell/chunks/chunk-K47SEEPI.js +0 -6
  191. package/dist/bin/shell/chunks/chunk-KPWFKFSD.js +0 -21
  192. package/dist/bin/shell/chunks/chunk-RYXW3SZQ.js +0 -13
  193. package/dist/bin/shell/chunks/chunk-VZKEP45B.js +0 -21
  194. package/dist/bin/shell/chunks/expr-MLHUWFYI.js +0 -2
  195. package/dist/bin/shell/chunks/flag-coverage-LQ37DA4R.js +0 -2
  196. package/dist/bin/shell/chunks/jq-CXSPO2J5.js +0 -2
  197. package/dist/bin/shell/chunks/ln-5TCJXDGY.js +0 -2
  198. package/dist/bin/shell/chunks/python3-74B25WCY.js +0 -17
  199. package/dist/bin/shell/chunks/sed-DNLJZZXZ.js +0 -2
  200. package/dist/bin/shell/chunks/sleep-GUJH2AMQ.js +0 -2
  201. package/dist/bin/shell/chunks/sqlite3-57UI7HYL.js +0 -2
  202. package/dist/bin/shell/chunks/time-FAWHHOMA.js +0 -2
  203. package/dist/bin/shell/chunks/timeout-4O4YYRTS.js +0 -2
  204. package/dist/bin/shell/chunks/tr-4V5A3V2C.js +0 -2
  205. package/dist/bin/shell/chunks/xan-7NIVZ3HP.js +0 -2
  206. package/dist/bin/shell/chunks/yq-L5ZSGLLO.js +0 -2
  207. package/dist/bundle/chunks/awk2-T6LHPVZE.js +0 -1
  208. package/dist/bundle/chunks/chunk-5BFLZVGH.js +0 -20
  209. package/dist/bundle/chunks/chunk-7DBA735O.js +0 -5
  210. package/dist/bundle/chunks/chunk-7KHLIOOW.js +0 -4
  211. package/dist/bundle/chunks/chunk-AOFQVUAD.js +0 -99
  212. package/dist/bundle/chunks/chunk-BAAVD5NO.js +0 -20
  213. package/dist/bundle/chunks/chunk-BEFDX7IY.js +0 -1
  214. package/dist/bundle/chunks/chunk-KPFCTJEX.js +0 -12
  215. package/dist/bundle/chunks/chunk-LN5KAJOV.js +0 -5
  216. package/dist/bundle/chunks/chunk-NBAARP4B.js +0 -1
  217. package/dist/bundle/chunks/chunk-RHOPHAL6.js +0 -35
  218. package/dist/bundle/chunks/chunk-SL4FN3A5.js +0 -9
  219. package/dist/bundle/chunks/chunk-YIY2RKBW.js +0 -13
  220. package/dist/bundle/chunks/expr-3572LAOT.js +0 -1
  221. package/dist/bundle/chunks/flag-coverage-MPLWXQQK.js +0 -1
  222. package/dist/bundle/chunks/jq-MYSLFARY.js +0 -1
  223. package/dist/bundle/chunks/ln-YAIFIHCT.js +0 -1
  224. package/dist/bundle/chunks/python3-6BKA3FYA.js +0 -16
  225. package/dist/bundle/chunks/sed-3ZCNFRHI.js +0 -1
  226. package/dist/bundle/chunks/sleep-LB7FI6AB.js +0 -1
  227. package/dist/bundle/chunks/sqlite3-FVNA4KNF.js +0 -1
  228. package/dist/bundle/chunks/time-AGNW2ZY6.js +0 -1
  229. package/dist/bundle/chunks/timeout-VN35D5O7.js +0 -1
  230. package/dist/bundle/chunks/tr-2N7Q3KKJ.js +0 -1
  231. package/dist/bundle/chunks/xan-VTO4FP3H.js +0 -1
  232. package/dist/bundle/chunks/yq-JRZFRYSK.js +0 -1
@@ -0,0 +1,13 @@
1
+ import{e as f}from"./chunk-ZK6J6F7O.js";import{a as g}from"./chunk-IPJHKYVM.js";import{a as h}from"./chunk-OJDRYQWQ.js";import{a as u}from"./chunk-CCNMISUL.js";var v={name:"time",async execute(r,s){let a="%e %M",o=null,c=!1,p=!1,t=0;for(;t<r.length;){let e=r[t];if(e==="-f"||e==="--format"){if(t++,t>=r.length)return{stdout:"",stderr:`time: missing argument to '-f'
2
+ `,exitCode:1};a=r[t],t++}else if(e==="-o"||e==="--output"){if(t++,t>=r.length)return{stdout:"",stderr:`time: missing argument to '-o'
3
+ `,exitCode:1};o=r[t],t++}else if(e==="-a"||e==="--append")c=!0,t++;else if(e==="-v"||e==="--verbose")a=`Command being timed: %C
4
+ Elapsed (wall clock) time: %e seconds
5
+ Maximum resident set size (kbytes): %M`,t++;else if(e==="-p"||e==="--portability")p=!0,t++;else if(e==="--"){t++;break}else if(e.startsWith("-"))t++;else break}let d=r.slice(t);if(d.length===0)return{stdout:"",stderr:"",exitCode:0};let w=f(),C=g(d),F=d.join(" "),i;try{if(!s.exec)return{stdout:"",stderr:`time: exec not available
6
+ `,exitCode:1};i=await s.exec(C,{env:h(s.env),cwd:s.cwd,stdin:s.stdin,signal:s.signal})}catch(e){i={stdout:"",stderr:`time: ${u(e.message)}
7
+ `,exitCode:127}}let m=(f()-w)/1e3,n;if(p?n=`real ${m.toFixed(2)}
8
+ user 0.00
9
+ sys 0.00
10
+ `:(n=a.replace(/%e/g,m.toFixed(2)).replace(/%E/g,x(m)).replace(/%M/g,"0").replace(/%S/g,"0.00").replace(/%U/g,"0.00").replace(/%P/g,"0%").replace(/%C/g,F),n.endsWith(`
11
+ `)||(n+=`
12
+ `)),o)try{let e=s.fs.resolvePath(s.cwd,o);if(c&&await s.fs.exists(e)){let l=await s.fs.readFile(e);await s.fs.writeFile(e,l+n)}else await s.fs.writeFile(e,n)}catch(e){let l=u(e.message);return{stdout:i.stdout,stderr:i.stderr+`time: cannot write to '${o}': ${l}
13
+ `,exitCode:i.exitCode}}else i={...i,stderr:i.stderr+n};return i}};function x(r){let s=Math.floor(r/3600),a=Math.floor(r%3600/60),o=r%60;return s>0?`${s}:${a.toString().padStart(2,"0")}:${o.toFixed(2).padStart(5,"0")}`:`${a}:${o.toFixed(2).padStart(5,"0")}`}var T={name:"time",flags:[{flag:"-p",type:"boolean"}],needsArgs:!0};export{v as a,T as b};
@@ -12,4 +12,4 @@ Examples:
12
12
  `);n.length>0&&n[n.length-1]===""&&n.pop();let d=I(e);if(e.checkOnly){let c=l.length>0?l[0]:"-";for(let t=1;t<n.length;t++)if(d(n[t-1],n[t])>0)return{stdout:"",stderr:`sort: ${c}:${t+1}: disorder: ${n[t]}
13
13
  `,exitCode:1};return{stdout:"",stderr:"",exitCode:0}}n.sort(d),e.unique&&(n=E(n,e));let o=n.length>0?`${n.join(`
14
14
  `)}
15
- `:"";if(e.outputFile){let c=r.fs.resolvePath(r.cwd,e.outputFile);return await r.fs.writeFile(c,o),{stdout:"",stderr:"",exitCode:0}}return{stdout:o,stderr:"",exitCode:0}}},U={name:"sort",flags:[{flag:"-r",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-u",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-V",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-M",type:"boolean"},{flag:"-b",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-k",type:"value",valueHint:"string"},{flag:"-t",type:"value",valueHint:"delimiter"},{flag:"-o",type:"value",valueHint:"path"}],stdinType:"text",needsFiles:!0};export{j as a,U as b};
15
+ `:"";if(e.outputFile){let c=r.fs.resolvePath(r.cwd,e.outputFile);return await r.fs.writeFile(c,o,"binary"),{stdout:"",stderr:"",exitCode:0}}return{stdout:o,stderr:"",exitCode:0,stdoutEncoding:"binary"}}},U={name:"sort",flags:[{flag:"-r",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-u",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-V",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-M",type:"boolean"},{flag:"-b",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-k",type:"value",valueHint:"string"},{flag:"-t",type:"value",valueHint:"delimiter"},{flag:"-o",type:"value",valueHint:"path"}],stdinType:"text",needsFiles:!0};export{j as a,U as b};
@@ -6,26 +6,26 @@ With -d, decompress instead.`,options:["-c, --stdout write to standard outp
6
6
 
7
7
  When no FILE is given, or when FILE is -, read from standard input.`,options:["-c, --stdout write to standard output, keep original files","-f, --force force overwrite of output file","-k, --keep keep (don't delete) input files","-l, --list list compressed file contents","-n, --no-name do not restore the original name and timestamp","-N, --name restore the original file name and timestamp","-q, --quiet suppress all warnings","-r, --recursive operate recursively on directories","-S, --suffix=SUF use suffix SUF on compressed files (default: .gz)","-t, --test test compressed file integrity","-v, --verbose verbose mode"," --help display this help and exit"]},D={name:"zcat",summary:"decompress files to stdout",usage:"zcat [OPTION]... [FILE]...",description:`Decompress FILEs to standard output.
8
8
 
9
- When no FILE is given, or when FILE is -, read from standard input.`,options:["-f, --force force; read compressed data even from a terminal","-l, --list list compressed file contents","-q, --quiet suppress all warnings","-S, --suffix=SUF use suffix SUF on compressed files (default: .gz)","-t, --test test compressed file integrity","-v, --verbose verbose mode"," --help display this help and exit"]},T={stdout:{short:"c",long:"stdout",type:"boolean"},toStdout:{long:"to-stdout",type:"boolean"},decompress:{short:"d",long:"decompress",type:"boolean"},uncompress:{long:"uncompress",type:"boolean"},force:{short:"f",long:"force",type:"boolean"},keep:{short:"k",long:"keep",type:"boolean"},list:{short:"l",long:"list",type:"boolean"},noName:{short:"n",long:"no-name",type:"boolean"},name:{short:"N",long:"name",type:"boolean"},quiet:{short:"q",long:"quiet",type:"boolean"},recursive:{short:"r",long:"recursive",type:"boolean"},suffix:{short:"S",long:"suffix",type:"string",default:".gz"},test:{short:"t",long:"test",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"},fast:{short:"1",long:"fast",type:"boolean"},level2:{short:"2",type:"boolean"},level3:{short:"3",type:"boolean"},level4:{short:"4",type:"boolean"},level5:{short:"5",type:"boolean"},level6:{short:"6",type:"boolean"},level7:{short:"7",type:"boolean"},level8:{short:"8",type:"boolean"},best:{short:"9",long:"best",type:"boolean"}};function E(e){return e.best?x.Z_BEST_COMPRESSION:e.level8?8:e.level7?7:e.level6?6:e.level5?5:e.level4?4:e.level3?3:e.level2?2:e.fast?x.Z_BEST_SPEED:x.Z_DEFAULT_COMPRESSION}function k(e){if(e.length<10)return{originalName:null,mtime:null,headerSize:0};if(e[0]!==31||e[1]!==139)return{originalName:null,mtime:null,headerSize:0};let t=e[3],o=e[4]|e[5]<<8|e[6]<<16|e[7]<<24,r=10;if(t&4){if(r+2>e.length)return{originalName:null,mtime:null,headerSize:0};let n=e[r]|e[r+1]<<8;r+=2+n}let s=null;if(t&8){let n=r;for(;r<e.length&&e[r]!==0;)r++;r<e.length&&(s=new TextDecoder().decode(e.slice(n,r)),r++)}if(t&16){for(;r<e.length&&e[r]!==0;)r++;r++}return t&2&&(r+=2),{originalName:s,mtime:o>0?new Date(o*1e3):null,headerSize:r}}function q(e){if(e.length<4)return 0;let t=e.length;return e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24}function b(e){return e.length>=2&&e[0]===31&&e[1]===139}function m(e){return Buffer.from(e).toString("latin1")}function I(e){return e.limits?.maxOutputSize??0}function v(e,t){if(t>0){if(q(e)>t)throw new Error(`decompressed data exceeds limit (${t} bytes)`);return F(e,{maxOutputLength:t})}return F(e)}async function L(e,t,o,r,s,n){let d=o.suffix,f,p,a,c=I(e);if(t==="-"||t==="")if(a=Uint8Array.from(e.stdin,i=>i.charCodeAt(0)),s){if(!b(a))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: stdin: not in gzip format
10
- `,exitCode:1};try{let i=v(a,c);return{stdout:m(i),stderr:"",exitCode:0}}catch(i){let l=i instanceof Error?i.message:"unknown error";return{stdout:"",stderr:`${r}: stdin: ${l}
11
- `,exitCode:1}}}else{let i=E(o),l=S(a,{level:i});return{stdout:m(l),stderr:"",exitCode:0}}f=e.fs.resolvePath(e.cwd,t);try{if((await e.fs.stat(f)).isDirectory)return o.recursive?await P(e,f,o,r,s,n):o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: is a directory -- ignored
12
- `,exitCode:1}}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
13
- `,exitCode:1}}try{a=await e.fs.readFileBuffer(f)}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
14
- `,exitCode:1}}if(s){if(!t.endsWith(d))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: unknown suffix -- ignored
15
- `,exitCode:1};if(!b(a))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: not in gzip format
16
- `,exitCode:1};let i;try{i=v(a,c)}catch(l){let u=l instanceof Error?l.message:"unknown error";return{stdout:"",stderr:`${r}: ${t}: ${u}
17
- `,exitCode:1}}if(n)return{stdout:m(i),stderr:"",exitCode:0};if(o.name){let l=k(a);l.originalName?p=e.fs.resolvePath(e.cwd,l.originalName):p=f.slice(0,-d.length)}else p=f.slice(0,-d.length);if(!o.force)try{return await e.fs.stat(p),{stdout:"",stderr:`${r}: ${p} already exists; not overwritten
18
- `,exitCode:1}}catch{}if(await e.fs.writeFile(p,i),!o.keep&&!n&&await e.fs.rm(f),o.verbose){let l=a.length>0?((1-a.length/i.length)*100).toFixed(1):"0.0";return{stdout:"",stderr:`${t}: ${l}% -- replaced with ${p.split("/").pop()}
19
- `,exitCode:0}}return{stdout:"",stderr:"",exitCode:0}}else{if(t.endsWith(d))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t} already has ${d} suffix -- unchanged
20
- `,exitCode:1};let i=E(o),l;try{l=S(a,{level:i})}catch(u){let g=u instanceof Error?u.message:"unknown error";return{stdout:"",stderr:`${r}: ${t}: ${g}
21
- `,exitCode:1}}if(n)return{stdout:m(l),stderr:"",exitCode:0};if(p=f+d,!o.force)try{return await e.fs.stat(p),{stdout:"",stderr:`${r}: ${p} already exists; not overwritten
22
- `,exitCode:1}}catch{}if(await e.fs.writeFile(p,l),!o.keep&&!n&&await e.fs.rm(f),o.verbose){let u=a.length>0?((1-l.length/a.length)*100).toFixed(1):"0.0";return{stdout:"",stderr:`${t}: ${u}% -- replaced with ${p.split("/").pop()}
23
- `,exitCode:0}}return{stdout:"",stderr:"",exitCode:0}}}async function P(e,t,o,r,s,n){let d=await e.fs.readdir(t),f="",p="",a=0;for(let c of d){let i=e.fs.resolvePath(t,c),l=await e.fs.stat(i);if(l.isDirectory){let u=await P(e,i,o,r,s,n);f+=u.stdout,p+=u.stderr,u.exitCode!==0&&(a=u.exitCode)}else if(l.isFile){let u=o.suffix;if(s&&!c.endsWith(u)||!s&&c.endsWith(u))continue;let g=i.startsWith(`${e.cwd}/`)?i.slice(e.cwd.length+1):i,y=await L(e,g,o,r,s,n);f+=y.stdout,p+=y.stderr,y.exitCode!==0&&(a=y.exitCode)}}return{stdout:f,stderr:p,exitCode:a}}async function W(e,t,o,r){let s;if(t==="-"||t==="")s=Uint8Array.from(e.stdin,i=>i.charCodeAt(0));else{let i=e.fs.resolvePath(e.cwd,t);try{s=await e.fs.readFileBuffer(i)}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
24
- `,exitCode:1}}}if(!b(s))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: not in gzip format
25
- `,exitCode:1};let n=s.length,d=q(s),f=d>0?((1-n/d)*100).toFixed(1):"0.0",a=k(s).originalName||(t==="-"?"":t.replace(/\.gz$/,""));return{stdout:`${n.toString().padStart(10)} ${d.toString().padStart(10)} ${f.padStart(5)}% ${a}
26
- `,stderr:"",exitCode:0}}async function A(e,t,o,r){let s;if(t==="-"||t==="")s=Uint8Array.from(e.stdin,n=>n.charCodeAt(0));else{let n=e.fs.resolvePath(e.cwd,t);try{s=await e.fs.readFileBuffer(n)}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
27
- `,exitCode:1}}}if(!b(s))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: not in gzip format
28
- `,exitCode:1};try{return v(s,I(e)),o.verbose?{stdout:"",stderr:`${t}: OK
29
- `,exitCode:0}:{stdout:"",stderr:"",exitCode:0}}catch(n){let d=n instanceof Error?n.message:"invalid";return{stdout:"",stderr:`${r}: ${t}: ${d}
30
- `,exitCode:1}}}async function C(e,t,o){let r=o==="zcat"?D:o==="gunzip"?U:O;if(w(e))return z(r);let s=$(o,e,T);if(!s.ok)return s.error.stderr.includes("unrecognized option"),s.error;let n=s.result.flags,d=s.result.positional,f=o==="gunzip"||o==="zcat"||n.decompress||n.uncompress,p=o==="zcat"||n.stdout||n.toStdout;if(n.list){d.length===0&&(d=["-"]);let l=` compressed uncompressed ratio uncompressed_name
31
- `,u="",g=0;for(let y of d){let h=await W(t,y,n,o);l+=h.stdout,u+=h.stderr,h.exitCode!==0&&(g=h.exitCode)}return{stdout:l,stderr:u,exitCode:g}}if(n.test){d.length===0&&(d=["-"]);let l="",u="",g=0;for(let y of d){let h=await A(t,y,n,o);l+=h.stdout,u+=h.stderr,h.exitCode!==0&&(g=h.exitCode)}return{stdout:l,stderr:u,exitCode:g}}d.length===0&&(d=["-"]);let a="",c="",i=0;for(let l of d){let u=await L(t,l,n,o,f,p);a+=u.stdout,c+=u.stderr,u.exitCode!==0&&(i=u.exitCode)}return{stdout:a,stderr:c,exitCode:i}}var G={name:"gzip",async execute(e,t){return C(e,t,"gzip")}},M={name:"gunzip",async execute(e,t){return C(e,t,"gunzip")}},Z={name:"zcat",async execute(e,t){return C(e,t,"zcat")}},R={name:"gzip",flags:[{flag:"-c",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-k",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-1",type:"boolean"},{flag:"-9",type:"boolean"}],stdinType:"binary",needsFiles:!0},K={name:"gunzip",flags:[{flag:"-c",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-k",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-v",type:"boolean"}],stdinType:"binary",needsFiles:!0},j={name:"zcat",flags:[{flag:"-f",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-v",type:"boolean"}],stdinType:"binary",needsFiles:!0};export{G as a,M as b,Z as c,R as d,K as e,j as f};
9
+ When no FILE is given, or when FILE is -, read from standard input.`,options:["-f, --force force; read compressed data even from a terminal","-l, --list list compressed file contents","-q, --quiet suppress all warnings","-S, --suffix=SUF use suffix SUF on compressed files (default: .gz)","-t, --test test compressed file integrity","-v, --verbose verbose mode"," --help display this help and exit"]},T={stdout:{short:"c",long:"stdout",type:"boolean"},toStdout:{long:"to-stdout",type:"boolean"},decompress:{short:"d",long:"decompress",type:"boolean"},uncompress:{long:"uncompress",type:"boolean"},force:{short:"f",long:"force",type:"boolean"},keep:{short:"k",long:"keep",type:"boolean"},list:{short:"l",long:"list",type:"boolean"},noName:{short:"n",long:"no-name",type:"boolean"},name:{short:"N",long:"name",type:"boolean"},quiet:{short:"q",long:"quiet",type:"boolean"},recursive:{short:"r",long:"recursive",type:"boolean"},suffix:{short:"S",long:"suffix",type:"string",default:".gz"},test:{short:"t",long:"test",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"},fast:{short:"1",long:"fast",type:"boolean"},level2:{short:"2",type:"boolean"},level3:{short:"3",type:"boolean"},level4:{short:"4",type:"boolean"},level5:{short:"5",type:"boolean"},level6:{short:"6",type:"boolean"},level7:{short:"7",type:"boolean"},level8:{short:"8",type:"boolean"},best:{short:"9",long:"best",type:"boolean"}};function E(e){return e.best?x.Z_BEST_COMPRESSION:e.level8?8:e.level7?7:e.level6?6:e.level5?5:e.level4?4:e.level3?3:e.level2?2:e.fast?x.Z_BEST_SPEED:x.Z_DEFAULT_COMPRESSION}function k(e){if(e.length<10)return{originalName:null,mtime:null,headerSize:0};if(e[0]!==31||e[1]!==139)return{originalName:null,mtime:null,headerSize:0};let t=e[3],r=e[4]|e[5]<<8|e[6]<<16|e[7]<<24,o=10;if(t&4){if(o+2>e.length)return{originalName:null,mtime:null,headerSize:0};let n=e[o]|e[o+1]<<8;o+=2+n}let s=null;if(t&8){let n=o;for(;o<e.length&&e[o]!==0;)o++;o<e.length&&(s=new TextDecoder().decode(e.slice(n,o)),o++)}if(t&16){for(;o<e.length&&e[o]!==0;)o++;o++}return t&2&&(o+=2),{originalName:s,mtime:r>0?new Date(r*1e3):null,headerSize:o}}function q(e){if(e.length<4)return 0;let t=e.length;return e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24}function b(e){return e.length>=2&&e[0]===31&&e[1]===139}function m(e){return Buffer.from(e).toString("latin1")}function I(e){return e.limits?.maxOutputSize??0}function v(e,t){if(t>0){if(q(e)>t)throw new Error(`decompressed data exceeds limit (${t} bytes)`);return F(e,{maxOutputLength:t})}return F(e)}async function L(e,t,r,o,s,n){let a=r.suffix,f,p,d,c=I(e);if(t==="-"||t==="")if(d=Uint8Array.from(e.stdin,i=>i.charCodeAt(0)),s){if(!b(d))return r.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${o}: stdin: not in gzip format
10
+ `,exitCode:1};try{let i=v(d,c);return{stdout:m(i),stderr:"",exitCode:0}}catch(i){let l=i instanceof Error?i.message:"unknown error";return{stdout:"",stderr:`${o}: stdin: ${l}
11
+ `,exitCode:1}}}else{let i=E(r),l=S(d,{level:i});return{stdout:m(l),stderr:"",exitCode:0}}f=e.fs.resolvePath(e.cwd,t);try{if((await e.fs.stat(f)).isDirectory)return r.recursive?await P(e,f,r,o,s,n):r.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${o}: ${t}: is a directory -- ignored
12
+ `,exitCode:1}}catch{return{stdout:"",stderr:`${o}: ${t}: No such file or directory
13
+ `,exitCode:1}}try{d=await e.fs.readFileBuffer(f)}catch{return{stdout:"",stderr:`${o}: ${t}: No such file or directory
14
+ `,exitCode:1}}if(s){if(!t.endsWith(a))return r.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${o}: ${t}: unknown suffix -- ignored
15
+ `,exitCode:1};if(!b(d))return r.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${o}: ${t}: not in gzip format
16
+ `,exitCode:1};let i;try{i=v(d,c)}catch(l){let u=l instanceof Error?l.message:"unknown error";return{stdout:"",stderr:`${o}: ${t}: ${u}
17
+ `,exitCode:1}}if(n)return{stdout:m(i),stderr:"",exitCode:0};if(r.name){let l=k(d);l.originalName?p=e.fs.resolvePath(e.cwd,l.originalName):p=f.slice(0,-a.length)}else p=f.slice(0,-a.length);if(!r.force)try{return await e.fs.stat(p),{stdout:"",stderr:`${o}: ${p} already exists; not overwritten
18
+ `,exitCode:1}}catch{}if(await e.fs.writeFile(p,i),!r.keep&&!n&&await e.fs.rm(f),r.verbose){let l=d.length>0?((1-d.length/i.length)*100).toFixed(1):"0.0";return{stdout:"",stderr:`${t}: ${l}% -- replaced with ${p.split("/").pop()}
19
+ `,exitCode:0}}return{stdout:"",stderr:"",exitCode:0}}else{if(t.endsWith(a))return r.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${o}: ${t} already has ${a} suffix -- unchanged
20
+ `,exitCode:1};let i=E(r),l;try{l=S(d,{level:i})}catch(u){let g=u instanceof Error?u.message:"unknown error";return{stdout:"",stderr:`${o}: ${t}: ${g}
21
+ `,exitCode:1}}if(n)return{stdout:m(l),stderr:"",exitCode:0};if(p=f+a,!r.force)try{return await e.fs.stat(p),{stdout:"",stderr:`${o}: ${p} already exists; not overwritten
22
+ `,exitCode:1}}catch{}if(await e.fs.writeFile(p,l),!r.keep&&!n&&await e.fs.rm(f),r.verbose){let u=d.length>0?((1-l.length/d.length)*100).toFixed(1):"0.0";return{stdout:"",stderr:`${t}: ${u}% -- replaced with ${p.split("/").pop()}
23
+ `,exitCode:0}}return{stdout:"",stderr:"",exitCode:0}}}async function P(e,t,r,o,s,n){let a=await e.fs.readdir(t),f="",p="",d=0;for(let c of a){let i=e.fs.resolvePath(t,c),l=await e.fs.stat(i);if(l.isDirectory){let u=await P(e,i,r,o,s,n);f+=u.stdout,p+=u.stderr,u.exitCode!==0&&(d=u.exitCode)}else if(l.isFile){let u=r.suffix;if(s&&!c.endsWith(u)||!s&&c.endsWith(u))continue;let g=i.startsWith(`${e.cwd}/`)?i.slice(e.cwd.length+1):i,y=await L(e,g,r,o,s,n);f+=y.stdout,p+=y.stderr,y.exitCode!==0&&(d=y.exitCode)}}return{stdout:f,stderr:p,exitCode:d}}async function W(e,t,r,o){let s;if(t==="-"||t==="")s=Uint8Array.from(e.stdin,i=>i.charCodeAt(0));else{let i=e.fs.resolvePath(e.cwd,t);try{s=await e.fs.readFileBuffer(i)}catch{return{stdout:"",stderr:`${o}: ${t}: No such file or directory
24
+ `,exitCode:1}}}if(!b(s))return r.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${o}: ${t}: not in gzip format
25
+ `,exitCode:1};let n=s.length,a=q(s),f=a>0?((1-n/a)*100).toFixed(1):"0.0",d=k(s).originalName||(t==="-"?"":t.replace(/\.gz$/,""));return{stdout:`${n.toString().padStart(10)} ${a.toString().padStart(10)} ${f.padStart(5)}% ${d}
26
+ `,stderr:"",exitCode:0}}async function A(e,t,r,o){let s;if(t==="-"||t==="")s=Uint8Array.from(e.stdin,n=>n.charCodeAt(0));else{let n=e.fs.resolvePath(e.cwd,t);try{s=await e.fs.readFileBuffer(n)}catch{return{stdout:"",stderr:`${o}: ${t}: No such file or directory
27
+ `,exitCode:1}}}if(!b(s))return r.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${o}: ${t}: not in gzip format
28
+ `,exitCode:1};try{return v(s,I(e)),r.verbose?{stdout:"",stderr:`${t}: OK
29
+ `,exitCode:0}:{stdout:"",stderr:"",exitCode:0}}catch(n){let a=n instanceof Error?n.message:"invalid";return{stdout:"",stderr:`${o}: ${t}: ${a}
30
+ `,exitCode:1}}}async function C(e,t,r){let o=r==="zcat"?D:r==="gunzip"?U:O;if(w(e))return z(o);let s=$(r,e,T);if(!s.ok)return s.error.stderr.includes("unrecognized option"),s.error;let n=s.result.flags,a=s.result.positional,f=r==="gunzip"||r==="zcat"||n.decompress||n.uncompress,p=r==="zcat"||n.stdout||n.toStdout;if(n.list){a.length===0&&(a=["-"]);let l=` compressed uncompressed ratio uncompressed_name
31
+ `,u="",g=0;for(let y of a){let h=await W(t,y,n,r);l+=h.stdout,u+=h.stderr,h.exitCode!==0&&(g=h.exitCode)}return{stdout:l,stderr:u,exitCode:g}}if(n.test){a.length===0&&(a=["-"]);let l="",u="",g=0;for(let y of a){let h=await A(t,y,n,r);l+=h.stdout,u+=h.stderr,h.exitCode!==0&&(g=h.exitCode)}return{stdout:l,stderr:u,exitCode:g}}a.length===0&&(a=["-"]);let d="",c="",i=0;for(let l of a){let u=await L(t,l,n,r,f,p);d+=u.stdout,c+=u.stderr,u.exitCode!==0&&(i=u.exitCode)}return{stdout:d,stderr:c,exitCode:i}}var G={name:"gzip",async execute(e,t){return{...await C(e,t,"gzip"),stdoutEncoding:"binary"}}},M={name:"gunzip",async execute(e,t){return{...await C(e,t,"gunzip"),stdoutEncoding:"binary"}}},Z={name:"zcat",async execute(e,t){return{...await C(e,t,"zcat"),stdoutEncoding:"binary"}}},R={name:"gzip",flags:[{flag:"-c",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-k",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-1",type:"boolean"},{flag:"-9",type:"boolean"}],stdinType:"binary",needsFiles:!0},K={name:"gunzip",flags:[{flag:"-c",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-k",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-v",type:"boolean"}],stdinType:"binary",needsFiles:!0},j={name:"zcat",flags:[{flag:"-f",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-v",type:"boolean"}],stdinType:"binary",needsFiles:!0};export{G as a,M as b,Z as c,R as d,K as e,j as f};
@@ -1,4 +1,4 @@
1
- import{a as F,b,c as M,d as qe,e as w,f as v,g as X,h as Y}from"./chunk-F55TLFGB.js";import{a as et}from"./chunk-SYMJJMQ4.js";import{a as $}from"./chunk-LN5KAJOV.js";import{d as G}from"./chunk-7MKBHGLS.js";import{a as H}from"./chunk-YNYSPYQ5.js";import{a as We}from"./chunk-7L36YK2X.js";import{a as D,b as K}from"./chunk-74CEPOFO.js";import{b as Ue,d as Be,e as Ze,f as Qe}from"./chunk-DXB73IDG.js";var q,_e=Ue(()=>{"use strict";q=class{input;pos=0;tokens=[];constructor(n){this.input=n}tokenize(){for(;this.pos<this.input.length&&(this.skipWhitespace(),!(this.pos>=this.input.length));){let n=this.nextToken();n&&this.tokens.push(n)}return this.tokens.push({type:"eof",value:"",pos:this.pos}),this.tokens}skipWhitespace(){for(;this.pos<this.input.length;){let n=this.input[this.pos];if(n===" "||n===" "||n===`
1
+ import{a as F,b,c as M,d as qe,e as w,f as v,g as X,h as Y}from"./chunk-F55TLFGB.js";import{a as et}from"./chunk-SYMJJMQ4.js";import{a as $}from"./chunk-DOTBQEPN.js";import{d as G}from"./chunk-7MKBHGLS.js";import{a as H}from"./chunk-YNYSPYQ5.js";import{a as We}from"./chunk-7L36YK2X.js";import{a as D,b as K}from"./chunk-74CEPOFO.js";import{b as Ue,d as Be,e as Ze,f as Qe}from"./chunk-DXB73IDG.js";var q,_e=Ue(()=>{"use strict";q=class{input;pos=0;tokens=[];constructor(n){this.input=n}tokenize(){for(;this.pos<this.input.length&&(this.skipWhitespace(),!(this.pos>=this.input.length));){let n=this.nextToken();n&&this.tokens.push(n)}return this.tokens.push({type:"eof",value:"",pos:this.pos}),this.tokens}skipWhitespace(){for(;this.pos<this.input.length;){let n=this.input[this.pos];if(n===" "||n===" "||n===`
2
2
  `||n==="\r")this.pos++;else if(n==="#")for(;this.pos<this.input.length&&this.input[this.pos]!==`
3
3
  `;)this.pos++;else break}}nextToken(){let n=this.pos,t=this.input[this.pos];if(t>="0"&&t<="9")return this.readNumber();if(t==='"'||t==="'"||t==="`")return this.readString(t);if(t==="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(t==="/"){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:n}):(this.pos++,{type:"/",value:"/",pos:n}):this.readRegex()}if(this.match("not in"))return{type:"not in",value:"not in",pos:n};if(this.match("=>"))return{type:"=>",value:"=>",pos:n};if(this.match("**"))return{type:"**",value:"**",pos:n};if(this.match("++"))return{type:"++",value:"++",pos:n};if(this.match("//"))return{type:"//",value:"//",pos:n};if(this.match("=="))return{type:"==",value:"==",pos:n};if(this.match("!="))return{type:"!=",value:"!=",pos:n};if(this.match("<="))return{type:"<=",value:"<=",pos:n};if(this.match(">="))return{type:">=",value:">=",pos:n};if(this.match("&&"))return{type:"&&",value:"&&",pos:n};if(this.match("||"))return{type:"||",value:"||",pos:n};let r=new Map([["(","("],[")",")"],["[","["],["]","]"],["{","{"],["}","}"],[",",","],[":",":"],[";",";"],["+","+"],["-","-"],["*","*"],["%","%"],["<","<"],[">",">"],["!","!"],[".","."],["|","|"],["=","="]]).get(t);if(r!==void 0)return this.pos++,{type:r,value:t,pos:n};if(this.isIdentStart(t))return this.readIdentifier();throw new Error(`Unexpected character '${t}' at position ${this.pos}`)}match(n){if(this.input.slice(this.pos,this.pos+n.length)===n){if(/^[a-zA-Z]/.test(n)){let t=this.input[this.pos+n.length];if(t&&this.isIdentChar(t))return!1}return this.pos+=n.length,!0}return!1}isIdentStart(n){return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="_"}isIdentChar(n){return this.isIdentStart(n)||n>="0"&&n<="9"}readNumber(){let n=this.pos,t=!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==="."&&!t&&!s)t=!0,this.pos++;else if((o==="e"||o==="E")&&!s)s=!0,t=!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(n,this.pos).replace(/_/g,"");return{type:t?"float":"int",value:r,pos:n}}readString(n){let t=this.pos;this.pos++;let s="";for(;this.pos<this.input.length;){let r=this.input[this.pos];if(r===n)return this.pos++,{type:"string",value:s,pos:t};if(r==="\\"){if(this.pos++,this.pos<this.input.length){let o=this.input[this.pos];switch(o){case"n":s+=`
4
4
  `;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 ${t}`)}readRegex(){let n=this.pos;this.pos++;let t="",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:t+(s?`/${s}`:""),pos:n}}r==="\\"?(t+=r,this.pos++,this.pos<this.input.length&&(t+=this.input[this.pos],this.pos++)):(t+=r,this.pos++)}throw new Error(`Unterminated regex starting at position ${n}`)}readIdentifier(){let n=this.pos;for(;this.pos<this.input.length&&this.isIdentChar(this.input[this.pos]);)this.pos++;let t=!1;this.pos<this.input.length&&this.input[this.pos]==="?"&&(t=!0,this.pos++);let s=this.input.slice(n,t?this.pos-1:this.pos);t&&(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&&!t?{type:i,value:o,pos:n}:{type:"ident",value:s,pos:n}}}});var He={};Be(He,{parseMoonblade:()=>_,parseNamedExpressions:()=>V});function V(e){let n=[],s=new q(e).tokenize(),r=0,o=()=>s[r]||{type:"eof",value:"",pos:0},i=()=>s[r++];for(;o().type!=="eof";){if(o().type===","&&n.length>0){i();continue}let h=[],u=0,p=r;for(;o().type!=="eof";){let a=o();if((a.type===","||a.type==="as")&&u===0)break;(a.type==="("||a.type==="["||a.type==="{")&&u++,(a.type===")"||a.type==="]"||a.type==="}")&&u--,h.push(i())}h.push({type:"eof",value:"",pos:0});let f=new J(h).parse(),c;if(o().type==="as")if(i(),o().type==="("){i();let a=[];for(;o().type!==")"&&o().type!=="eof";)(o().type==="ident"||o().type==="string")&&(a.push(o().value),i()),o().type===","&&i();o().type===")"&&i(),c=a}else if(o().type==="ident"||o().type==="string")c=o().value,i();else throw new Error(`Expected name after 'as', got ${o().type}`);else c=e.slice(s[p].pos,s[r-1]?.pos||e.length).trim(),f.type==="identifier"&&(c=f.name);n.push({expr:f,name:c})}return n}function _(e){let t=new q(e).tokenize();return new J(t).parse()}var R,J,U=Ue(()=>{"use strict";_e();R={PIPE:1,OR:2,AND:3,EQUALITY:4,COMPARISON:5,ADDITIVE:6,MULTIPLICATIVE:7,POWER:8,UNARY:9,POSTFIX:10},J=class{pos=0;tokens;constructor(n){this.tokens=n}parse(){let n=this.parseExpr(0);if(this.peek().type!=="eof")throw new Error(`Unexpected token: ${this.peek().value}`);return n}parseExpr(n){let t=this.parsePrefix();for(;;){let s=this.peek(),r=this.getInfixPrec(s.type);if(r<n)break;t=this.parseInfix(t,r)}return t}parsePrefix(){let n=this.peek();switch(n.type){case"int":return this.advance(),{type:"int",value:Number.parseInt(n.value,10)};case"float":return this.advance(),{type:"float",value:Number.parseFloat(n.value)};case"string":return this.advance(),{type:"string",value:n.value};case"regex":{this.advance();let t=n.value.split("/"),s=t.length>1?t[t.length-1]:"";return{type:"regex",pattern:t.slice(0,-1).join("/")||n.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 t=n.value,s=t.endsWith("?"),r=s?t.slice(0,-1):t;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 t=[];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;if(this.advance(),this.peek().type===","||this.peek().type===")"){for(t.push(r);this.peek().type===","&&(this.advance(),this.peek().type==="ident");)t.push(this.peek().value),this.advance();if(this.peek().type===")"&&(this.advance(),this.peek().type==="=>")){this.advance();let o=this.parseExpr(0);return this.bindLambdaArgs({type:"lambda",params:t,body:o},t)}this.pos-=t.length*2,t.length>1&&(this.pos=this.pos)}this.pos--}let s=this.parseExpr(0);return this.expect(")"),this.peek().type,s}case"[":return this.parseList();case"{":return this.parseMap();case"-":{this.advance();let t=this.parseExpr(R.UNARY);return t.type==="int"?{type:"int",value:-t.value}:t.type==="float"?{type:"float",value:-t.value}:{type:"func",name:"neg",args:[{expr:t}]}}case"!":return this.advance(),{type:"func",name:"not",args:[{expr:this.parseExpr(R.UNARY)}]};default:throw new Error(`Unexpected token: ${n.type} (${n.value})`)}}parseFunctionCall(n){this.expect("(");let t=[];if(this.peek().type!==")")do{t.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);t.push({name:s,expr:r})}while(this.peek().type===",");return this.expect(")"),{type:"func",name:n.toLowerCase(),args:t}}parseList(){this.expect("[");let n=[];if(this.peek().type!=="]")do n.length>0&&this.peek().type===","&&this.advance(),n.push(this.parseExpr(0));while(this.peek().type===",");return this.expect("]"),{type:"list",elements:n}}parseMap(){this.expect("{");let n=[];if(this.peek().type!=="}")do{n.length>0&&this.peek().type===","&&this.advance();let t;if(this.peek().type==="ident")t=this.peek().value,this.advance();else if(this.peek().type==="string")t=this.peek().value,this.advance();else throw new Error(`Expected map key, got ${this.peek().type}`);this.expect(":");let s=this.parseExpr(0);n.push({key:t,value:s})}while(this.peek().type===",");return this.expect("}"),{type:"map",entries:n}}parseInfix(n,t){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(t+(this.isRightAssoc(s.type)?0:1));return{type:"func",name:o,args:[{expr:n},{expr:i}]}}if(s.type==="|"){this.advance();let i=this.parseExpr(t);return this.handlePipe(n,i)}if(s.type===".")return this.advance(),this.handleDot(n);if(s.type==="[")return this.advance(),this.handleIndexing(n);if(s.type==="in")return this.advance(),{type:"func",name:"contains",args:[{expr:this.parseExpr(t+1)},{expr:n}]};if(s.type==="not in")return this.advance(),{type:"func",name:"not",args:[{expr:{type:"func",name:"contains",args:[{expr:this.parseExpr(t+1)},{expr:n}]}}]};throw new Error(`Unexpected infix token: ${s.type}`)}handlePipe(n,t){if(t.type==="identifier")return{type:"func",name:t.name,args:[{expr:n}]};if(t.type==="func"){let s=this.countUnderscores(t);return s===0?t:s===1?this.fillUnderscore(t,n):{type:"pipeline",exprs:[n,t]}}return this.countUnderscores(t)===1?this.fillUnderscore(t,n):t}handleDot(n){let t=this.peek();if(t.type==="ident"){let s=t.value;if(this.advance(),this.peek().type==="("){let r=this.parseFunctionCall(s);return r.type==="func"&&r.args.unshift({expr:n}),r}return{type:"func",name:"get",args:[{expr:n},{expr:{type:"string",value:s}}]}}if(t.type==="int"){let s=Number.parseInt(t.value,10);return this.advance(),{type:"func",name:"get",args:[{expr:n},{expr:{type:"int",value:s}}]}}if(t.type==="string"){let s=t.value;return this.advance(),{type:"func",name:"get",args:[{expr:n},{expr:{type:"string",value:s}}]}}throw new Error(`Expected identifier, number, or string after dot, got ${t.type}`)}handleIndexing(n){if(this.peek().type===":"){if(this.advance(),this.peek().type==="]")return this.advance(),{type:"func",name:"slice",args:[{expr:n}]};let s=this.parseExpr(0);return this.expect("]"),{type:"func",name:"slice",args:[{expr:n},{expr:{type:"int",value:0}},{expr:s}]}}let t=this.parseExpr(0);if(this.peek().type===":"){if(this.advance(),this.peek().type==="]")return this.advance(),{type:"func",name:"slice",args:[{expr:n},{expr:t}]};let s=this.parseExpr(0);return this.expect("]"),{type:"func",name:"slice",args:[{expr:n},{expr:t},{expr:s}]}}return this.expect("]"),{type:"func",name:"get",args:[{expr:n},{expr:t}]}}countUnderscores(n){return n.type==="underscore"?1:n.type==="func"?n.args.reduce((t,s)=>t+this.countUnderscores(s.expr),0):n.type==="list"?n.elements.reduce((t,s)=>t+this.countUnderscores(s),0):n.type==="map"?n.entries.reduce((t,s)=>t+this.countUnderscores(s.value),0):0}fillUnderscore(n,t){return n.type==="underscore"?t:n.type==="func"?{...n,args:n.args.map(s=>({...s,expr:this.fillUnderscore(s.expr,t)}))}:n.type==="list"?{...n,elements:n.elements.map(s=>this.fillUnderscore(s,t))}:n.type==="map"?{...n,entries:n.entries.map(s=>({...s,value:this.fillUnderscore(s.value,t)}))}:n}bindLambdaArgs(n,t){return{...n,body:this.bindLambdaArgsInExpr(n.body,t)}}bindLambdaArgsInExpr(n,t){return n.type==="identifier"&&t.includes(n.name)?{type:"lambdaBinding",name:n.name}:n.type==="func"?{...n,args:n.args.map(s=>({...s,expr:this.bindLambdaArgsInExpr(s.expr,t)}))}:n.type==="list"?{...n,elements:n.elements.map(s=>this.bindLambdaArgsInExpr(s,t))}:n.type==="map"?{...n,entries:n.entries.map(s=>({...s,value:this.bindLambdaArgsInExpr(s.value,t)}))}:n}getInfixPrec(n){switch(n){case"|":return R.PIPE;case"||":case"or":return R.OR;case"&&":case"and":return R.AND;case"==":case"!=":case"eq":case"ne":return R.EQUALITY;case"<":case"<=":case">":case">=":case"lt":case"le":case"gt":case"ge":case"in":case"not in":return R.COMPARISON;case"+":case"-":case"++":return R.ADDITIVE;case"*":case"/":case"//":case"%":return R.MULTIPLICATIVE;case"**":return R.POWER;case".":case"[":return R.POSTFIX;default:return-1}}isRightAssoc(n){return n==="**"}peek(){return this.tokens[this.pos]||{type:"eof",value:"",pos:0}}advance(){return this.tokens[this.pos++]}expect(n){let t=this.peek();if(t.type!==n)throw new Error(`Expected ${n}, got ${t.type}`);return this.advance()}}});U();function E(e,n){return n.length===0?k(e,[]):n.length===1?{type:"Pipe",left:n[0],right:k(e,[])}:{type:"Pipe",left:n[0],right:k(e,n.slice(1))}}var B={add:e=>S("+",e[0],e[1]),sub:e=>S("-",e[0],e[1]),mul:e=>S("*",e[0],e[1]),div:e=>S("/",e[0],e[1]),mod:e=>S("%",e[0],e[1]),idiv:e=>k("floor",[S("/",e[0],e[1])]),pow:e=>E("pow",e),neg:e=>({type:"UnaryOp",op:"-",operand:e[0]}),"==":e=>S("==",e[0],e[1]),"!=":e=>S("!=",e[0],e[1]),"<":e=>S("<",e[0],e[1]),"<=":e=>S("<=",e[0],e[1]),">":e=>S(">",e[0],e[1]),">=":e=>S(">=",e[0],e[1]),eq:e=>S("==",P(e[0]),P(e[1])),ne:e=>S("!=",P(e[0]),P(e[1])),lt:e=>S("<",P(e[0]),P(e[1])),le:e=>S("<=",P(e[0]),P(e[1])),gt:e=>S(">",P(e[0]),P(e[1])),ge:e=>S(">=",P(e[0]),P(e[1])),and:e=>S("and",e[0],e[1]),or:e=>S("or",e[0],e[1]),not:e=>({type:"UnaryOp",op:"not",operand:e[0]}),len:e=>E("length",e),length:e=>E("length",e),upper:e=>E("ascii_upcase",e),lower:e=>E("ascii_downcase",e),trim:e=>E("trim",e),ltrim:e=>e.length===0?k("ltrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:k("ltrimstr",[{type:"Literal",value:" "}])},rtrim:e=>e.length===0?k("rtrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:k("rtrimstr",[{type:"Literal",value:" "}])},split:e=>E("split",e),join:e=>e.length===1?k("join",[{type:"Literal",value:""}]):E("join",e),concat:e=>S("+",e[0],e[1]),startswith:e=>E("startswith",e),endswith:e=>E("endswith",e),contains:e=>E("contains",e),replace:e=>E("gsub",e),substr:e=>e.length===2?{type:"Slice",base:e[0],start:e[1]}:{type:"Slice",base:e[0],start:e[1],end:S("+",e[1],e[2])},abs:e=>E("fabs",e),floor:e=>E("floor",e),ceil:e=>E("ceil",e),round:e=>E("round",e),sqrt:e=>E("sqrt",e),log:e=>E("log",e),log10:e=>E("log10",e),log2:e=>E("log2",e),exp:e=>E("exp",e),sin:e=>E("sin",e),cos:e=>E("cos",e),tan:e=>E("tan",e),asin:e=>E("asin",e),acos:e=>E("acos",e),atan:e=>E("atan",e),min:e=>E("min",e),max:e=>E("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=>k("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=>k("select",e),empty:()=>k("empty",[]),count:()=>k("length",[]),sum:e=>e.length===0?k("add",[]):{type:"Pipe",left:{type:"Array",elements:e[0]},right:k("add",[])},mean:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:S("/",k("add",[]),k("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:S("/",k("add",[]),k("length",[]))},avg:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:S("/",k("add",[]),k("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:S("/",k("add",[]),k("length",[]))},type:"type",isnull:e=>e.length===0?S("==",{type:"Identity"},{type:"Literal",value:null}):S("==",e[0],{type:"Literal",value:null}),isempty:e=>e.length===0?S("==",{type:"Identity"},{type:"Literal",value:""}):S("==",e[0],{type:"Literal",value:""}),tonumber:e=>e.length===0?k("tonumber",[]):k("tonumber",e),tostring:e=>e.length===0?k("tostring",[]):k("tostring",e),if:e=>Je(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[n,...t]=e,s=S("and",S("!=",n,{type:"Literal",value:null}),S("!=",n,{type:"Literal",value:""}));return Je(s,n,t.length===1?t[0]:B.coalesce(t))},index:()=>({type:"Field",name:"_row_index"}),now:()=>k("now",[]),fmt:e=>k("tostring",e),format:e=>k("tostring",e)};function S(e,n,t){return{type:"BinaryOp",op:e,left:n,right:t}}function k(e,n){return{type:"Call",name:e,args:n}}var tt="then";function Je(e,n,t){let s={type:"Cond",cond:e,elifs:[],else:t||{type:"Literal",value:null}};return s[tt]=n,s}function P(e){return{type:"Pipe",left:e,right:{type:"Call",name:"tostring",args:[]}}}function O(e,n=!0){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 n?{type:"Field",name:e.name}:{type:"VarRef",name:e.name};case"lambdaBinding":return{type:"VarRef",name:e.name};case"func":{let t=e.args.map(r=>O(r.expr,n)),s=Object.hasOwn(B,e.name)?B[e.name]:void 0;return typeof s=="function"?s(t):k(typeof s=="string"?s:e.name,t)}case"list":return e.elements.length===0?{type:"Array"}:{type:"Array",elements:e.elements.reduce((t,s,r)=>{let o=O(s,n);return r===0?o:{type:"Comma",left:t,right:o}},null)};case"map":return{type:"Object",entries:e.entries.map(t=>({key:t.key,value:O(t.value,n)}))};case"regex":return{type:"Literal",value:e.pattern};case"slice":return{type:"Slice",start:e.start?O(e.start,n):void 0,end:e.end?O(e.end,n):void 0};case"lambda":return O(e.body,n);case"pipeline":return{type:"Identity"};default:throw new Error(`Unknown moonblade expression type: ${e.type}`)}}function Q(e){let n=[],t=0;for(;t<e.length;){for(;t<e.length&&(e[t]===" "||e[t]===",");)t++;if(t>=e.length)break;let s=t;for(;t<e.length&&/\w/.test(e[t]);)t++;let r=e.slice(s,t);for(;t<e.length&&e[t]===" ";)t++;if(e[t]!=="(")break;t++;let o=1,i=t;for(;t<e.length&&o>0;)e[t]==="("?o++:e[t]===")"&&o--,o>0&&t++;let h=e.slice(i,t).trim();for(t++;t<e.length&&e[t]===" ";)t++;let u="";if(e.slice(t,t+3).toLowerCase()==="as "){for(t+=3;t<e.length&&e[t]===" ";)t++;let p=t;for(;t<e.length&&/\w/.test(e[t]);)t++;u=e.slice(p,t)}u||(u=h?`${r}(${h})`:`${r}()`),n.push({func:r,expr:h,alias:u})}return n}function ze(e){return/^\w+$/.test(e)}function Z(e,n,t){let s=O(_(n)),r=$(e,s,t);return r.length>0?r[0]:null}function ee(e,n,t={}){let{func:s,expr:r}=n;if(s==="count"&&!r)return e.length;let o;switch(ze(r)?o=e.map(i=>i[r]).filter(i=>i!=null):o=e.map(i=>Z(i,r,t)).filter(i=>i!=null),s){case"count":return ze(r)?o.length:o.filter(i=>!!i).length;case"sum":return o.map(h=>typeof h=="number"?h:Number.parseFloat(String(h))).reduce((h,u)=>h+u,0);case"mean":case"avg":{let i=o.map(h=>typeof h=="number"?h:Number.parseFloat(String(h)));return i.length>0?i.reduce((h,u)=>h+u,0)/i.length:0}case"min":{let i=o.map(h=>typeof h=="number"?h:Number.parseFloat(String(h)));return i.length>0?Math.min(...i):null}case"max":{let i=o.map(h=>typeof h=="number"?h:Number.parseFloat(String(h)));return i.length>0?Math.max(...i):null}case"first":return o.length>0?o[0]:null;case"last":return o.length>0?o[o.length-1]:null;case"median":{let i=o.map(u=>typeof u=="number"?u:Number.parseFloat(String(u))).filter(u=>!Number.isNaN(u)).sort((u,p)=>u-p);if(i.length===0)return null;let h=Math.floor(i.length/2);return i.length%2===0?(i[h-1]+i[h])/2:i[h]}case"mode":{let i=new Map;for(let p of o){let l=String(p);i.set(l,(i.get(l)||0)+1)}let h=0,u=null;for(let[p,l]of i)l>h&&(h=l,u=p);return u}case"cardinality":return new Set(o.map(h=>String(h))).size;case"values":return o.map(i=>String(i)).join("|");case"distinct_values":return[...new Set(o.map(h=>String(h)))].sort().join("|");case"all":{if(e.length===0)return!0;for(let i of e)if(!Z(i,r,t))return!1;return!0}case"any":{for(let i of e)if(Z(i,r,t))return!0;return!1}default:return null}}function Ke(e,n,t={}){let s=F();for(let r of n)b(s,r.alias,ee(e,r,t));return s}async function te(e,n){let t="",s=[];for(let l of e)l.startsWith("-")||(t?s.push(l):t=l);if(!t)return{stdout:"",stderr:`xan agg: no aggregation expression
@@ -1,4 +1,4 @@
1
- import{b as G}from"./chunk-7KHLIOOW.js";import{a as I}from"./chunk-YNYSPYQ5.js";import{a as se,b as ae,c as H}from"./chunk-74CEPOFO.js";import ve from"compressjs";var j="file",le="link",ue="symlink",Z="directory",Ze={file:"0",link:"1",symlink:"2","character-device":"3","block-device":"4",directory:"5",fifo:"6","pax-header":"x","pax-global-header":"g","gnu-long-name":"L","gnu-long-link-name":"K"},Be={0:j,1:le,2:ue,3:"character-device",4:"block-device",5:Z,6:"fifo",x:"pax-header",g:"pax-global-header",L:"gnu-long-name",K:"gnu-long-link-name"},Ne=new Uint8Array(512),$=new Uint8Array(0),F=new TextEncoder,fe=new TextDecoder;function v(e,t,n,r){r&&F.encodeInto(r,e.subarray(t,t+n))}function z(e,t,n,r){if(r===void 0)return;let i=r.toString(8).padStart(n-1,"0");F.encodeInto(i,e.subarray(t,t+n-1))}function x(e,t,n){let r=e.indexOf(0,t),i=r===-1||r>t+n?t+n:r;return fe.decode(e.subarray(t,i))}function q(e,t,n){let r=0,i=t+n;for(let s=t;s<i;s++){let o=e[s];if(o===0)break;o!==32&&(r=r*8+(o-48))}return r}function b(e,t,n){if(e[t]&128){let r=0;r=e[t]&127;for(let i=1;i<n;i++)r=r*256+e[t+i];if(!Number.isSafeInteger(r))throw new Error("TAR number too large");return r}return q(e,t,n)}var R=e=>e.type===Z||e.type===ue||e.type===le;async function de(e){if(e==null)return $;if(e instanceof Uint8Array)return e;if(typeof e=="string")return F.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw new TypeError("Unsupported content type for entry body.")}function me(e,t){let{strip:n,filter:r,map:i}=t;if(!n&&!r&&!i)return e;let s={...e};if(n&&n>0){let a=s.name.split("/").filter(Boolean);if(n>=a.length)return null;let c=a.slice(n).join("/");if(s.name=s.type===Z&&!c.endsWith("/")?`${c}/`:c,s.linkname?.startsWith("/")){let l=s.linkname.split("/").filter(Boolean);s.linkname=n>=l.length?"/":`/${l.slice(n).join("/")}`}}if(r?.(s)===!1)return null;let o=i?i(s):s;return o&&(!o.name||!o.name.trim()||o.name==="."||o.name==="/")?null:o}var X=32,De=48;function Le(e){let t=q(e,148,8),n=0;for(let r=0;r<e.length;r++)r>=148&&r<156?n+=X:n+=e[r];return t===n}function Pe(e){e.fill(X,148,156);let t=0;for(let n of e)t+=n;for(let n=153;n>=148;n--)e[n]=(t&7)+De,t>>=3;e[154]=0,e[155]=X}function Ke(e){let t={};e.name.length>100&&pe(e.name)===null&&(t.path=e.name),e.linkname&&e.linkname.length>100&&(t.linkpath=e.linkname),e.uname&&e.uname.length>32&&(t.uname=e.uname),e.gname&&e.gname.length>32&&(t.gname=e.gname),e.uid!=null&&e.uid>2097151&&(t.uid=String(e.uid)),e.gid!=null&&e.gid>2097151&&(t.gid=String(e.gid)),e.size!=null&&e.size>8589934591&&(t.size=String(e.size)),e.pax&&Object.assign(t,e.pax);let n=Object.entries(t);if(n.length===0)return null;let r=F.encode(n.map(([i,s])=>{let o=`${i}=${s}
1
+ import{b as G}from"./chunk-3RCXHB4E.js";import{a as I}from"./chunk-YNYSPYQ5.js";import{a as se,b as ae,c as H}from"./chunk-74CEPOFO.js";import ve from"compressjs";var j="file",le="link",ue="symlink",Z="directory",Ze={file:"0",link:"1",symlink:"2","character-device":"3","block-device":"4",directory:"5",fifo:"6","pax-header":"x","pax-global-header":"g","gnu-long-name":"L","gnu-long-link-name":"K"},Be={0:j,1:le,2:ue,3:"character-device",4:"block-device",5:Z,6:"fifo",x:"pax-header",g:"pax-global-header",L:"gnu-long-name",K:"gnu-long-link-name"},Ne=new Uint8Array(512),$=new Uint8Array(0),F=new TextEncoder,fe=new TextDecoder;function v(e,t,n,r){r&&F.encodeInto(r,e.subarray(t,t+n))}function z(e,t,n,r){if(r===void 0)return;let i=r.toString(8).padStart(n-1,"0");F.encodeInto(i,e.subarray(t,t+n-1))}function x(e,t,n){let r=e.indexOf(0,t),i=r===-1||r>t+n?t+n:r;return fe.decode(e.subarray(t,i))}function q(e,t,n){let r=0,i=t+n;for(let s=t;s<i;s++){let o=e[s];if(o===0)break;o!==32&&(r=r*8+(o-48))}return r}function b(e,t,n){if(e[t]&128){let r=0;r=e[t]&127;for(let i=1;i<n;i++)r=r*256+e[t+i];if(!Number.isSafeInteger(r))throw new Error("TAR number too large");return r}return q(e,t,n)}var R=e=>e.type===Z||e.type===ue||e.type===le;async function de(e){if(e==null)return $;if(e instanceof Uint8Array)return e;if(typeof e=="string")return F.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw new TypeError("Unsupported content type for entry body.")}function me(e,t){let{strip:n,filter:r,map:i}=t;if(!n&&!r&&!i)return e;let s={...e};if(n&&n>0){let a=s.name.split("/").filter(Boolean);if(n>=a.length)return null;let c=a.slice(n).join("/");if(s.name=s.type===Z&&!c.endsWith("/")?`${c}/`:c,s.linkname?.startsWith("/")){let l=s.linkname.split("/").filter(Boolean);s.linkname=n>=l.length?"/":`/${l.slice(n).join("/")}`}}if(r?.(s)===!1)return null;let o=i?i(s):s;return o&&(!o.name||!o.name.trim()||o.name==="."||o.name==="/")?null:o}var X=32,De=48;function Le(e){let t=q(e,148,8),n=0;for(let r=0;r<e.length;r++)r>=148&&r<156?n+=X:n+=e[r];return t===n}function Pe(e){e.fill(X,148,156);let t=0;for(let n of e)t+=n;for(let n=153;n>=148;n--)e[n]=(t&7)+De,t>>=3;e[154]=0,e[155]=X}function Ke(e){let t={};e.name.length>100&&pe(e.name)===null&&(t.path=e.name),e.linkname&&e.linkname.length>100&&(t.linkpath=e.linkname),e.uname&&e.uname.length>32&&(t.uname=e.uname),e.gname&&e.gname.length>32&&(t.gname=e.gname),e.uid!=null&&e.uid>2097151&&(t.uid=String(e.uid)),e.gid!=null&&e.gid>2097151&&(t.gid=String(e.gid)),e.size!=null&&e.size>8589934591&&(t.size=String(e.size)),e.pax&&Object.assign(t,e.pax);let n=Object.entries(t);if(n.length===0)return null;let r=F.encode(n.map(([i,s])=>{let o=`${i}=${s}
2
2
  `,a=F.encode(o).length+1,c=a+String(a).length;return c=a+String(c).length,`${c} ${o}`}).join(""));return{paxHeader:he({name:fe.decode(F.encode(`PaxHeader/${e.name}`).slice(0,100)),size:r.length,type:"pax-header",mode:420,mtime:e.mtime,uname:e.uname,gname:e.gname,uid:e.uid,gid:e.gid}),paxBody:r}}function pe(e){if(e.length<=100)return null;let t=e.length-100-1,n=e.lastIndexOf("/",155);return n>0&&n>=t?{prefix:e.slice(0,n),name:e.slice(n+1)}:null}function he(e){let t=new Uint8Array(512),n=R(e)?0:e.size??0,r=e.name,i="";if(!e.pax?.path){let s=pe(r);s&&(r=s.name,i=s.prefix)}return v(t,0,100,r),z(t,100,8,e.mode??(e.type===Z?493:420)),z(t,108,8,e.uid??0),z(t,116,8,e.gid??0),z(t,124,12,n),z(t,136,12,Math.floor((e.mtime?.getTime()??Date.now())/1e3)),v(t,156,1,Ze[e.type??j]),v(t,157,100,e.linkname),v(t,257,6,"ustar\0"),v(t,263,2,"00"),v(t,265,32,e.uname),v(t,297,32,e.gname),v(t,345,155,i),Pe(t),t}function Ge(e,t){if(t&&!Le(e))throw new Error("Invalid tar header checksum.");let n=x(e,156,1),r={name:x(e,0,100),mode:q(e,100,8),uid:b(e,108,8),gid:b(e,116,8),size:b(e,124,12),mtime:new Date(b(e,136,12)*1e3),type:Be[n]||j,linkname:x(e,157,100)},i=x(e,257,6);return i.trim()==="ustar"&&(r.uname=x(e,265,32),r.gname=x(e,297,32)),i==="ustar"&&(r.prefix=x(e,345,155)),r}var He={path:["name",e=>e],linkpath:["linkname",e=>e],size:["size",e=>parseInt(e,10)],mtime:["mtime",parseFloat],uid:["uid",e=>parseInt(e,10)],gid:["gid",e=>parseInt(e,10)],uname:["uname",e=>e],gname:["gname",e=>e]};function We(e){let t=new TextDecoder("utf-8"),n={},r={},i=0;for(;i<e.length;){let s=e.indexOf(32,i);if(s===-1)break;let o=parseInt(t.decode(e.subarray(i,s)),10);if(Number.isNaN(o)||o===0)break;let a=i+o,[c,l]=t.decode(e.subarray(s+1,a-1)).split("=",2);if(c&&l!==void 0){r[c]=l;let f=He[c];if(f){let[u,g]=f,p=g(l);(typeof p=="string"||!Number.isNaN(p))&&(n[u]=p)}}i=a}return Object.keys(r).length>0&&(n.pax=r),n}function oe(e,t){t.name!==void 0&&(e.name=t.name),t.linkname!==void 0&&(e.linkname=t.linkname),t.size!==void 0&&(e.size=t.size),t.mtime!==void 0&&(e.mtime=new Date(t.mtime*1e3)),t.uid!==void 0&&(e.uid=t.uid),t.gid!==void 0&&(e.gid=t.gid),t.uname!==void 0&&(e.uname=t.uname),t.gname!==void 0&&(e.gname=t.gname),t.pax&&(e.pax=Object.assign({},e.pax??{},t.pax))}function Xe(e){switch(e){case"pax-global-header":case"pax-header":return We;case"gnu-long-name":return t=>({name:x(t,0,t.length)});case"gnu-long-link-name":return t=>({linkname:x(t,0,t.length)});default:return}}function je(e){let t=he(e),n=Ke(e);if(!n)return[t];let r=-n.paxBody.length&511,i=r>0?[Ne.subarray(0,r)]:[];return[n.paxHeader,n.paxBody,...i,t]}var qe=new Uint8Array(512*2);function ge(e,t,n){let r=null,i=0,s=!1;return{add(o){if(s){let a=new Error("No new tar entries after finalize.");throw t(a),a}if(r!==null){let a=new Error("Previous entry must be completed before adding a new one");throw t(a),a}try{let a=R(o)?0:o.size??0,c=je({...o,size:a});for(let l of c)e(l);r={...o,size:a},i=0}catch(a){t(a)}},write(o){if(!r){let c=new Error("No active tar entry.");throw t(c),c}if(s){let c=new Error("Cannot write data after finalize.");throw t(c),c}let a=i+o.length;if(a>r.size){let c=new Error(`"${r.name}" exceeds given size of ${r.size} bytes.`);throw t(c),c}try{i=a,e(o)}catch(c){t(c)}},endEntry(){if(!r){let o=new Error("No active entry to end.");throw t(o),o}if(s){let o=new Error("Cannot end entry after finalize.");throw t(o),o}try{if(i!==r.size){let a=new Error(`Size mismatch for "${r.name}".`);throw t(a),a}let o=-r.size&511;o>0&&e(new Uint8Array(o)),r=null,i=0}catch(o){throw t(o),o}},finalize(){if(s){let o=new Error("Archive has already been finalized");throw t(o),o}if(r!==null){let o=new Error("Cannot finalize while an entry is still active");throw t(o),o}try{e(qe),s=!0,n&&n()}catch(o){t(o)}}}}var O=256;function Ye(){let e=new Array(O),t=e.length-1,n=0,r=0,i=0,s=a=>{let c=e[n];a===c.length?(e[n]=$,n=n+1&t):e[n]=c.subarray(a),i-=a,i===0&&e.length>O&&(e=new Array(O),t=O-1,n=0,r=0)};function o(a,c){if(c){let p=0,d=Math.min(a,i);for(;d>0;){let h=e[n],m=Math.min(d,h.length),E=m===h.length?h:h.subarray(0,m);if(s(m),d-=m,p+=m,!c(E))break}return p}if(i<a)return null;if(a===0)return $;let l=e[n];if(l.length>=a){let p=l.length===a?l:l.subarray(0,a);return s(a),p}let f=new Uint8Array(a),u=0,g=a;for(;g>0;){let p=e[n],d=Math.min(g,p.length);f.set(d===p.length?p:p.subarray(0,d),u),u+=d,g-=d,s(d)}return f}return{push:a=>{if(a.length===0)return;let c=r+1&t;if(c===n){let l=e.length,f=l*2,u=new Array(f),g=r-n+l&l-1;if(n<r)for(let p=0;p<g;p++)u[p]=e[n+p];else if(g>0){let p=l-n;for(let d=0;d<p;d++)u[d]=e[n+d];for(let d=0;d<r;d++)u[p+d]=e[d]}e=u,t=f-1,n=0,r=g,c=r+1&t}e[r]=a,r=c,i+=a.length},available:()=>i,peek:a=>{if(i<a)return null;if(a===0)return $;let c=e[n];if(c.length>=a)return c.length===a?c:c.subarray(0,a);let l=new Uint8Array(a),f=0,u=n;for(;f<a;){let g=e[u],p=Math.min(a-f,g.length);p===g.length?l.set(g,f):l.set(g.subarray(0,p),f),f+=p,u=u+1&t}return l},discard:a=>{if(a>i)throw new Error("Too many bytes consumed");if(a===0)return;let c=a;for(;c>0;){let l=e[n],f=Math.min(c,l.length);s(f),c-=f}},pull:o}}var W=0,k=1,M=new Error("Tar archive is truncated.");function Se(e={}){let t=e.strict??!1,{available:n,peek:r,push:i,discard:s,pull:o}=Ye(),a=W,c=!1,l=!1,f=!1,u=null,g={},p={},d={isEntryActive:()=>a===k,isBodyComplete:()=>!u||u.remaining===0,write(h){if(c)throw new Error("Archive already ended.");i(h)},end(){c=!0},readHeader(){if(a!==W)throw new Error("Cannot read header while an entry is active");if(!l)for(;!l;){if(n()<512){if(c){if(n()>0&&t)throw M;l=!0;return}return null}let h=r(512);if(ce(h)){if(n()<512*2){if(c){if(t)throw M;l=!0;return}return null}if(ce(r(512*2).subarray(512))){s(512*2),l=!0,f=!0;return}if(t)throw new Error("Invalid tar header.");s(512);continue}let m;try{m=Ge(h,t)}catch(A){if(t)throw A;s(512);continue}let E=Xe(m.type);if(E){let A=m.size+511&-512;if(n()<512+A){if(c&&t)throw M;return null}s(512);let w=E(o(A).subarray(0,m.size)),_=m.type==="pax-global-header"?g:p;for(let T in w)_[T]=w[T];continue}s(512);let S=m;return m.prefix&&(S.name=`${m.prefix}/${S.name}`),oe(S,g),oe(S,p),p={},u={header:S,remaining:S.size,padding:-S.size&511},a=k,S}},streamBody(h){if(a!==k||!u||u.remaining===0)return 0;let m=Math.min(u.remaining,n());if(m===0)return 0;let E=o(m,h);return u.remaining-=E,E},skipPadding(){if(a!==k||!u)return!0;if(u.remaining>0)throw new Error("Body not fully consumed");return n()<u.padding?!1:(s(u.padding),u=null,a=W,!0)},skipEntry(){if(a!==k||!u)return!0;let h=Math.min(u.remaining,n());return h>0&&(s(h),u.remaining-=h),u.remaining>0?!1:d.skipPadding()},validateEOF(){if(t){if(!f)throw M;if(n()>0&&o(n()).some(h=>h!==0))throw new Error("Invalid EOF.")}}};return d}function ce(e){if(e.byteOffset%8===0){let t=new BigUint64Array(e.buffer,e.byteOffset,e.length/8);for(let n=0;n<t.length;n++)if(t[n]!==0n)return!1;return!0}for(let t=0;t<e.length;t++)if(e[t]!==0)return!1;return!0}function ye(){return new CompressionStream("gzip")}function we(){return new DecompressionStream("gzip")}function Ve(){let e,t;return{readable:new ReadableStream({start(n){e=n,t=ge(n.enqueue.bind(n),n.error.bind(n),n.close.bind(n))}}),controller:{add(n){let r=R(n),i={...n};return r&&(i.size=0),t.add(i),r&&t.endEntry(),new WritableStream({write(s){t.write(s)},close(){r||t.endEntry()},abort(s){e.error(s)}})},finalize(){t.finalize()},error(n){e.error(n)}}}}async function Ae(e){let t=[],n=e.getReader(),r=0;try{for(;;){let{done:o,value:a}=await n.read();if(o)break;t.push(a),r+=a.length}let i=new Uint8Array(r),s=0;for(let o of t)i.set(o,s),s+=o.length;return i}finally{n.releaseLock()}}var Ee=e=>e.pipeTo(new WritableStream);function Je(e={}){let t=Se(e),n=null,r=!1,i=s=>{if(!r){r=!0;try{for(;;)if(t.isEntryActive()){if(n){if(t.streamBody(o=>(n.enqueue(o),!0))===0&&!t.isBodyComplete())break}else if(!t.skipEntry())break;if(t.isBodyComplete()){try{n?.close()}catch{}if(n=null,!t.skipPadding())break}}else{let o=t.readHeader();if(o==null)break;s.enqueue({header:o,body:new ReadableStream({start(a){o.size===0?a.close():n=a},pull:()=>i(s),cancel(){n=null,i(s)}})})}}catch(o){try{n?.error(o)}catch{}throw n=null,o}finally{r=!1}}};return new TransformStream({transform(s,o){try{t.write(s),i(o)}catch(a){try{n?.error(a)}catch{}throw a}},flush(s){try{if(t.end(),i(s),t.validateEOF(),t.isEntryActive()&&!t.isBodyComplete())try{n?.close()}catch{}}catch(o){try{n?.error(o)}catch{}throw o}}},void 0,{highWaterMark:1})}async function _e(e){let{readable:t,controller:n}=Ve();return await(async()=>{for(let r of e){let i=n.add(r.header),s="body"in r?r.body:r.data;if(!s){await i.close();continue}if(s instanceof ReadableStream)await s.pipeTo(i);else if(s instanceof Blob)await s.stream().pipeTo(i);else try{let o=await de(s);if(o.length>0){let a=i.getWriter();await a.write(o),await a.close()}else await i.close()}catch{throw new TypeError(`Unsupported content type for entry "${r.header.name}".`)}}})().then(()=>n.finalize()).catch(r=>n.error(r)),new Uint8Array(await Ae(t))}async function Te(e,t={}){let n=e instanceof ReadableStream?e:new ReadableStream({start(s){s.enqueue(e instanceof Uint8Array?e:new Uint8Array(e)),s.close()}}),r=[],i=n.pipeThrough(Je(t));for await(let s of i){let o;try{o=me(s.header,t)}catch(a){throw await s.body.cancel(),a}if(o===null){await Ee(s.body);continue}R(o)?(await Ee(s.body),r.push({header:o})):r.push({header:o,data:await Ae(s.body)})}return r}var B=null,N=null;async function Ue(){if(B)return B;if(N)throw N;try{return B=await G.runTrustedAsync(()=>import("node-liblzma")),B}catch{throw N=new Error("xz compression requires node-liblzma which failed to load. Install liblzma-dev (apt) or xz (brew) and reinstall dependencies."),N}}var D=null,L=null;async function Ie(){if(D)return D;if(L)throw L;try{return D=await G.runTrustedAsync(()=>import("@mongodb-js/zstd")),D}catch{throw L=new Error("zstd compression requires @mongodb-js/zstd which is not installed. Install it with: npm install @mongodb-js/zstd"),L}}var y=100*1024*1024,xe=512,Ce=1e4;function Qe(e){let t="file";e.isDirectory?t="directory":e.isSymlink&&(t="symlink");let n=e.name;e.isDirectory&&!n.endsWith("/")&&(n+="/");let r;e.content!==void 0&&(typeof e.content=="string"?r=new TextEncoder().encode(e.content):r=e.content);let i=e.isDirectory||e.isSymlink?0:r?.length??0;return{header:{name:n,mode:e.mode??(e.isDirectory?493:420),uid:e.uid??0,gid:e.gid??0,size:i,mtime:e.mtime??new Date,type:t,linkname:e.linkTarget??"",uname:"user",gname:"user"},body:r}}async function U(e){let t=e.map(Qe);return _e(t)}async function Fe(e){let t=await U(e),i=new ReadableStream({start(l){l.enqueue(t),l.close()}}).pipeThrough(ye()).getReader(),s=[];for(;;){let{done:l,value:f}=await i.read();if(l)break;s.push(f)}let o=s.reduce((l,f)=>l+f.length,0),a=new Uint8Array(o),c=0;for(let l of s)a.set(l,c),c+=l.length;return a}async function C(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};if(e.length<xe||e.length%xe!==0)return{entries:[],error:"Invalid tar archive format"};try{let t=await Te(e),n=[];for(let r of t){if(n.length>=Ce)return{entries:n,error:`Too many entries (max ${Ce})`};let i="file";switch(r.header.type){case"directory":i="directory";break;case"symlink":i="symlink";break;case"link":i="hardlink";break;case"file":i="file";break;default:i="other"}n.push({name:r.header.name,mode:r.header.mode??420,uid:r.header.uid??0,gid:r.header.gid??0,size:r.header.size,mtime:r.header.mtime??new Date,type:i,linkTarget:r.header.linkname||void 0,content:r.data??new Uint8Array(0)})}return{entries:n}}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:n}}}async function Y(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let r=new ReadableStream({start(c){c.enqueue(e),c.close()}}).pipeThrough(we()).getReader(),i=[],s=0;for(;;){let{done:c,value:l}=await r.read();if(c)break;if(s+=l.length,s>y)return await r.cancel(),{entries:[],error:`Decompressed archive too large (max ${y} bytes)`};i.push(l)}let o=new Uint8Array(s),a=0;for(let c of i)o.set(c,a),a+=c.length;return C(o)}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:`Decompression failed: ${n}`}}}function V(e){return e.length>=2&&e[0]===31&&e[1]===139}function J(e){return e.length>=3&&e[0]===66&&e[1]===90&&e[2]===104}function Q(e){return e.length>=6&&e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0}async function et(e){let n=ve.Bzip2.decompressFile(Array.from(e));return new Uint8Array(n)}async function tt(e){let t=ve.Bzip2,n=[];return t.compressFile(Array.from(e),n,9),new Uint8Array(n)}async function rt(e){let n=(await Ue()).unxzSync(Buffer.from(e));return new Uint8Array(n)}async function nt(e){let n=(await Ue()).xzSync(Buffer.from(e));return new Uint8Array(n)}async function ze(e){let t=await U(e);return tt(t)}async function ke(e){let t=await U(e);return nt(t)}async function ee(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let t=await et(e);return t.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:C(t)}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:n}}}async function te(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:"xz decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction."};if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let n=await rt(e);return n.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:C(n)}catch(n){let r=n instanceof Error?n.message:"Unknown error";return{entries:[],error:r}}}function re(e){return e.length>=4&&e[0]===40&&e[1]===181&&e[2]===47&&e[3]===253}async function it(e){let n=await(await Ie()).compress(Buffer.from(e),3);return new Uint8Array(n)}async function st(e){let n=await(await Ie()).decompress(Buffer.from(e));return new Uint8Array(n)}async function Re(e){let t=await U(e);return it(t)}async function ne(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:"zstd decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction."};if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let n=await st(e);return n.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:C(n)}catch(n){let r=n instanceof Error?n.message:"Unknown error";return{entries:[],error:r}}}function be(e){let t={create:!1,append:!1,update:!1,extract:!1,list:!1,file:"",autoCompress:!1,gzip:!1,bzip2:!1,xz:!1,zstd:!1,verbose:!1,toStdout:!1,keepOldFiles:!1,touch:!1,directory:"",preserve:!1,absoluteNames:!1,strip:0,exclude:[],filesFrom:"",excludeFrom:"",wildcards:!1},n=[],r=0;for(;r<e.length;){let i=e[r];if(i.startsWith("-")&&!i.startsWith("--")&&i.length>2){if(/^-\d+$/.test(i)){n.push(i),r++;continue}for(let s=1;s<i.length;s++){let o=i[s];switch(o){case"c":t.create=!0;break;case"r":t.append=!0;break;case"u":t.update=!0;break;case"x":t.extract=!0;break;case"t":t.list=!0;break;case"a":t.autoCompress=!0;break;case"z":t.gzip=!0;break;case"j":t.bzip2=!0;break;case"J":t.xz=!0;break;case"v":t.verbose=!0;break;case"O":t.toStdout=!0;break;case"k":t.keepOldFiles=!0;break;case"m":t.touch=!0;break;case"p":t.preserve=!0;break;case"P":t.absoluteNames=!0;break;case"f":if(s<i.length-1)t.file=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'f'
3
3
  `,exitCode:2}};t.file=e[r]}break;case"C":if(s<i.length-1)t.directory=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'C'
4
4
  `,exitCode:2}};t.directory=e[r]}break;case"T":if(s<i.length-1)t.filesFrom=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'T'
@@ -1,5 +1,5 @@
1
1
  import{a as l}from"./chunk-HWKDQ44K.js";import{a as i,b as c}from"./chunk-74CEPOFO.js";var b={name:"base64",summary:"base64 encode/decode data and print to standard output",usage:"base64 [OPTION]... [FILE]",options:["-d, --decode decode data","-w, --wrap=COLS wrap encoded lines after COLS character (default 76, 0 to disable)"," --help display this help and exit"]},m={decode:{short:"d",long:"decode",type:"boolean"},wrap:{short:"w",long:"wrap",type:"number",default:76}};async function p(r,o,n){if(o.length===0||o.length===1&&o[0]==="-")return{ok:!0,data:Uint8Array.from(r.stdin,e=>e.charCodeAt(0))};let d=[];for(let e of o){if(e==="-"){d.push(Uint8Array.from(r.stdin,t=>t.charCodeAt(0)));continue}try{let t=r.fs.resolvePath(r.cwd,e),s=await r.fs.readFileBuffer(t);d.push(s)}catch{return{ok:!1,error:{stdout:"",stderr:`${n}: ${e}: No such file or directory
2
- `,exitCode:1}}}}let f=d.reduce((e,t)=>e+t.length,0),u=new Uint8Array(f),a=0;for(let e of d)u.set(e,a),a+=e.length;return{ok:!0,data:u}}var A={name:"base64",async execute(r,o){if(c(r))return i(b);let n=l("base64",r,m);if(!n.ok)return n.error;let d=n.result.flags.decode,f=n.result.flags.wrap,u=n.result.positional;try{if(d){let t=await p(o,u,"base64");if(!t.ok)return t.error;if(typeof Buffer<"u"){let g=Buffer.from(t.data).toString("utf8").replace(/\s/g,"");return{stdout:Buffer.from(g,"base64").toString("latin1"),stderr:"",exitCode:0}}let h=String.fromCharCode(...t.data).replace(/\s/g,"");return{stdout:atob(h),stderr:"",exitCode:0}}let a=await p(o,u,"base64");if(!a.ok)return a.error;let e;if(typeof Buffer<"u"?e=Buffer.from(a.data).toString("base64"):e=btoa(String.fromCharCode(...a.data)),f>0){let t=[];for(let s=0;s<e.length;s+=f)t.push(e.slice(s,s+f));e=t.join(`
2
+ `,exitCode:1}}}}let f=d.reduce((e,t)=>e+t.length,0),u=new Uint8Array(f),a=0;for(let e of d)u.set(e,a),a+=e.length;return{ok:!0,data:u}}var A={name:"base64",async execute(r,o){if(c(r))return i(b);let n=l("base64",r,m);if(!n.ok)return n.error;let d=n.result.flags.decode,f=n.result.flags.wrap,u=n.result.positional;try{if(d){let t=await p(o,u,"base64");if(!t.ok)return t.error;if(typeof Buffer<"u"){let g=Buffer.from(t.data).toString("utf8").replace(/\s/g,"");return{stdout:Buffer.from(g,"base64").toString("latin1"),stderr:"",exitCode:0,stdoutEncoding:"binary"}}let h=String.fromCharCode(...t.data).replace(/\s/g,"");return{stdout:atob(h),stderr:"",exitCode:0,stdoutEncoding:"binary"}}let a=await p(o,u,"base64");if(!a.ok)return a.error;let e;if(typeof Buffer<"u"?e=Buffer.from(a.data).toString("base64"):e=btoa(String.fromCharCode(...a.data)),f>0){let t=[];for(let s=0;s<e.length;s+=f)t.push(e.slice(s,s+f));e=t.join(`
3
3
  `)+(e.length>0?`
4
4
  `:"")}return{stdout:e,stderr:"",exitCode:0}}catch{return{stdout:"",stderr:`base64: invalid input
5
5
  `,exitCode:1}}}},F={name:"base64",flags:[{flag:"-d",type:"boolean"},{flag:"-w",type:"value",valueHint:"number"}],stdinType:"text",needsFiles:!0};export{A as a,F as b};
@@ -0,0 +1,9 @@
1
+ import{a as h}from"./chunk-CCNMISUL.js";import{a as m,b as g}from"./chunk-74CEPOFO.js";var p={name:"ln",summary:"make links between files",usage:"ln [OPTIONS] TARGET LINK_NAME",options:["-s create a symbolic link instead of a hard link","-f remove existing destination files","-n treat LINK_NAME as a normal file if it is a symbolic link to a directory","-v print name of each linked file"," --help display this help and exit"]},v={name:"ln",async execute(i,s){if(g(i))return m(p);let r=!1,a=!1,f=!1,t=0;for(;t<i.length&&i[t].startsWith("-");){let e=i[t];if(e==="-s"||e==="--symbolic")r=!0,t++;else if(e==="-f"||e==="--force")a=!0,t++;else if(e==="-v"||e==="--verbose")f=!0,t++;else if(e==="-n"||e==="--no-dereference")t++;else if(/^-[sfvn]+$/.test(e))e.includes("s")&&(r=!0),e.includes("f")&&(a=!0),e.includes("v")&&(f=!0),t++;else if(e==="--"){t++;break}else return{stdout:"",stderr:`ln: invalid option -- '${e.slice(1)}'
2
+ `,exitCode:1}}let d=i.slice(t);if(d.length<2)return{stdout:"",stderr:`ln: missing file operand
3
+ `,exitCode:1};let n=d[0],l=d[1],o=s.fs.resolvePath(s.cwd,l);if(await s.fs.exists(o))if(a)try{await s.fs.rm(o,{force:!0})}catch{return{stdout:"",stderr:`ln: cannot remove '${l}': Permission denied
4
+ `,exitCode:1}}else return{stdout:"",stderr:`ln: failed to create ${r?"symbolic ":""}link '${l}': File exists
5
+ `,exitCode:1};try{if(r)await s.fs.symlink(n,o);else{let e=s.fs.resolvePath(s.cwd,n);if(!await s.fs.exists(e))return{stdout:"",stderr:`ln: failed to access '${n}': No such file or directory
6
+ `,exitCode:1};await s.fs.link(e,o)}}catch(e){let u=e;return u.message.includes("EPERM")?{stdout:"",stderr:`ln: '${n}': hard link not allowed for directory
7
+ `,exitCode:1}:{stdout:"",stderr:`ln: ${h(u.message)}
8
+ `,exitCode:1}}let c="";return f&&(c=`'${l}' -> '${n}'
9
+ `),{stdout:c,stderr:"",exitCode:0}}},w={name:"ln",flags:[{flag:"-s",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{v as a,w as b};
@@ -1,4 +1,4 @@
1
- import{a}from"./chunk-YNYSPYQ5.js";var w={name:"expr",async execute(s,r){if(s.length===0)return{stdout:"",stderr:`expr: missing operand
2
- `,exitCode:2};try{let l=d(s),h=l==="0"||l===""?1:0;return{stdout:`${l}
3
- `,stderr:"",exitCode:h}}catch(l){return{stdout:"",stderr:`expr: ${l.message}
4
- `,exitCode:2}}}};function d(s){if(s.length===1)return s[0];let r=0;function l(){let e=h();for(;r<s.length&&s[r]==="|";){r++;let t=h();if(e!=="0"&&e!=="")return e;e=t}return e}function h(){let e=m();for(;r<s.length&&s[r]==="&";){r++;let t=m();(e==="0"||e===""||t==="0"||t==="")&&(e="0")}return e}function m(){let e=p();for(;r<s.length;){let t=s[r];if(["=","!=","<",">","<=",">="].includes(t)){r++;let o=p(),n=parseInt(e,10),i=parseInt(o,10),f=!Number.isNaN(n)&&!Number.isNaN(i),c;t==="="?c=f?n===i:e===o:t==="!="?c=f?n!==i:e!==o:t==="<"?c=f?n<i:e<o:t===">"?c=f?n>i:e>o:t==="<="?c=f?n<=i:e<=o:c=f?n>=i:e>=o,e=c?"1":"0"}else break}return e}function p(){let e=g();for(;r<s.length;){let t=s[r];if(t==="+"||t==="-"){r++;let o=g(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");e=String(t==="+"?n+i:n-i)}else break}return e}function g(){let e=N();for(;r<s.length;){let t=s[r];if(t==="*"||t==="/"||t==="%"){r++;let o=N(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");if((t==="/"||t==="%")&&i===0)throw new Error("division by zero");t==="*"?e=String(n*i):t==="/"?e=String(Math.trunc(n/i)):e=String(n%i)}else break}return e}function N(){let e=u();for(;r<s.length&&s[r]===":";){r++;let t=u(),n=a(`^${t}`).match(e);n?e=n[1]!==void 0?n[1]:String(n[0].length):e="0"}return e}function u(){if(r>=s.length)throw new Error("syntax error");let e=s[r];if(e==="match"){r++;let t=u(),o=u(),i=a(o).match(t);return i?i[1]!==void 0?i[1]:String(i[0].length):"0"}if(e==="substr"){r++;let t=u(),o=parseInt(u(),10),n=parseInt(u(),10);if(Number.isNaN(o)||Number.isNaN(n))throw new Error("non-integer argument");return t.substring(o-1,o-1+n)}if(e==="index"){r++;let t=u(),o=u();for(let n=0;n<t.length;n++)if(o.includes(t[n]))return String(n+1);return"0"}if(e==="length"){r++;let t=u();return String(t.length)}if(e==="("){r++;let t=l();if(r>=s.length||s[r]!==")")throw new Error("syntax error");return r++,t}return r++,e}return l()}var b={name:"expr",flags:[],needsArgs:!0};export{w as a,b};
1
+ import{a}from"./chunk-YNYSPYQ5.js";import{a as d}from"./chunk-CCNMISUL.js";var S={name:"expr",async execute(s,r){if(s.length===0)return{stdout:"",stderr:`expr: missing operand
2
+ `,exitCode:2};try{let c=x(s),h=c==="0"||c===""?1:0;return{stdout:`${c}
3
+ `,stderr:"",exitCode:h}}catch(c){return{stdout:"",stderr:`expr: ${d(c.message)}
4
+ `,exitCode:2}}}};function x(s){if(s.length===1)return s[0];let r=0;function c(){let e=h();for(;r<s.length&&s[r]==="|";){r++;let t=h();if(e!=="0"&&e!=="")return e;e=t}return e}function h(){let e=m();for(;r<s.length&&s[r]==="&";){r++;let t=m();(e==="0"||e===""||t==="0"||t==="")&&(e="0")}return e}function m(){let e=g();for(;r<s.length;){let t=s[r];if(["=","!=","<",">","<=",">="].includes(t)){r++;let o=g(),n=parseInt(e,10),i=parseInt(o,10),f=!Number.isNaN(n)&&!Number.isNaN(i),l;t==="="?l=f?n===i:e===o:t==="!="?l=f?n!==i:e!==o:t==="<"?l=f?n<i:e<o:t===">"?l=f?n>i:e>o:t==="<="?l=f?n<=i:e<=o:l=f?n>=i:e>=o,e=l?"1":"0"}else break}return e}function g(){let e=p();for(;r<s.length;){let t=s[r];if(t==="+"||t==="-"){r++;let o=p(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");e=String(t==="+"?n+i:n-i)}else break}return e}function p(){let e=N();for(;r<s.length;){let t=s[r];if(t==="*"||t==="/"||t==="%"){r++;let o=N(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");if((t==="/"||t==="%")&&i===0)throw new Error("division by zero");t==="*"?e=String(n*i):t==="/"?e=String(Math.trunc(n/i)):e=String(n%i)}else break}return e}function N(){let e=u();for(;r<s.length&&s[r]===":";){r++;let t=u(),n=a(`^${t}`).match(e);n?e=n[1]!==void 0?n[1]:String(n[0].length):e="0"}return e}function u(){if(r>=s.length)throw new Error("syntax error");let e=s[r];if(e==="match"){r++;let t=u(),o=u(),i=a(o).match(t);return i?i[1]!==void 0?i[1]:String(i[0].length):"0"}if(e==="substr"){r++;let t=u(),o=parseInt(u(),10),n=parseInt(u(),10);if(Number.isNaN(o)||Number.isNaN(n))throw new Error("non-integer argument");return t.substring(o-1,o-1+n)}if(e==="index"){r++;let t=u(),o=u();for(let n=0;n<t.length;n++)if(o.includes(t[n]))return String(n+1);return"0"}if(e==="length"){r++;let t=u();return String(t.length)}if(e==="("){r++;let t=c();if(r>=s.length||s[r]!==")")throw new Error("syntax error");return r++,t}return r++,e}return c()}var E={name:"expr",flags:[],needsArgs:!0};export{S as a,E as b};
@@ -1,5 +1,5 @@
1
- import{b as x}from"./chunk-7L36YK2X.js";import{a as y,b as I,c as m}from"./chunk-74CEPOFO.js";var w={name:"cut",summary:"remove sections from each line of files",usage:"cut [OPTION]... [FILE]...",options:["-c LIST select only these characters","-d DELIM use DELIM instead of TAB for field delimiter","-f LIST select only these fields","-s, --only-delimited do not print lines without delimiters"," --help display this help and exit"]};function F(t){let c=[],l=t.split(",");for(let n of l)if(n.includes("-")){let[s,r]=n.split("-");c.push({start:s?parseInt(s,10):1,end:r?parseInt(r,10):null})}else{let s=parseInt(n,10);c.push({start:s,end:s})}return c}function L(t,c){let l=[];for(let n of c){let s=n.start-1,r=n.end===null?t.length:n.end;for(let o=s;o<r&&o<t.length;o++)o>=0&&!l.includes(t[o])&&l.push(t[o])}return l}var C={name:"cut",async execute(t,c){if(I(t))return y(w);let l=" ",n=null,s=null,r=!1,o=[];for(let i=0;i<t.length;i++){let e=t[i];if(e==="-d")l=t[++i]||" ";else if(e.startsWith("-d"))l=e.slice(2);else if(e==="-f")n=t[++i];else if(e.startsWith("-f"))n=e.slice(2);else if(e==="-c")s=t[++i];else if(e.startsWith("-c"))s=e.slice(2);else if(e==="-s"||e==="--only-delimited")r=!0;else{if(e.startsWith("--"))return m("cut",e);if(e.startsWith("-")){let f=!1;for(let a of e.slice(1))if(a==="s")r=!0;else if(!"dfc".includes(a)){f=!0;break}if(f)return m("cut",e)}else o.push(e)}}if(!n&&!s)return{stdout:"",stderr:`cut: you must specify a list of bytes, characters, or fields
1
+ import{b as x}from"./chunk-7L36YK2X.js";import{a as y,b as I,c as g}from"./chunk-74CEPOFO.js";var w={name:"cut",summary:"remove sections from each line of files",usage:"cut [OPTION]... [FILE]...",options:["-c LIST select only these characters","-d DELIM use DELIM instead of TAB for field delimiter","-f LIST select only these fields","-s, --only-delimited do not print lines without delimiters"," --help display this help and exit"]};function F(t){let c=[],l=t.split(",");for(let n of l)if(n.includes("-")){let[s,r]=n.split("-");c.push({start:s?parseInt(s,10):1,end:r?parseInt(r,10):null})}else{let s=parseInt(n,10);c.push({start:s,end:s})}return c}function L(t,c){let l=[];for(let n of c){let s=n.start-1,r=n.end===null?t.length:n.end;for(let o=s;o<r&&o<t.length;o++)o>=0&&!l.includes(t[o])&&l.push(t[o])}return l}var k={name:"cut",async execute(t,c){if(I(t))return y(w);let l=" ",n=null,s=null,r=!1,o=[];for(let i=0;i<t.length;i++){let e=t[i];if(e==="-d")l=t[++i]||" ";else if(e.startsWith("-d"))l=e.slice(2);else if(e==="-f")n=t[++i];else if(e.startsWith("-f"))n=e.slice(2);else if(e==="-c")s=t[++i];else if(e.startsWith("-c"))s=e.slice(2);else if(e==="-s"||e==="--only-delimited")r=!0;else{if(e.startsWith("--"))return g("cut",e);if(e.startsWith("-")){let a=!1;for(let f of e.slice(1))if(f==="s")r=!0;else if(!"dfc".includes(f)){a=!0;break}if(a)return g("cut",e)}else o.push(e)}}if(!n&&!s)return{stdout:"",stderr:`cut: you must specify a list of bytes, characters, or fields
2
2
  `,exitCode:1};let p=await x(c,o,{cmdName:"cut"});if(!p.ok)return p.error;let u=p.content.split(`
3
- `);u.length>0&&u[u.length-1]===""&&u.pop();let g=F(n||s||"1"),h="";for(let i of u)if(s){let e=i.split(""),f=[];for(let a of g){let v=a.start-1,H=a.end===null?e.length:a.end;for(let d=v;d<H&&d<e.length;d++)d>=0&&f.push(e[d])}h+=`${f.join("")}
4
- `}else{if(r&&!i.includes(l))continue;let e=i.split(l),f=L(e,g);h+=`${f.join(l)}
5
- `}return{stdout:h,stderr:"",exitCode:0}}},S={name:"cut",flags:[{flag:"-d",type:"value",valueHint:"delimiter"},{flag:"-f",type:"value",valueHint:"string"},{flag:"-c",type:"value",valueHint:"string"},{flag:"-s",type:"boolean"}],stdinType:"text",needsFiles:!0};export{C as a,S as b};
3
+ `);u.length>0&&u[u.length-1]===""&&u.pop();let m=F(n||s||"1"),h="";for(let i of u)if(s){let e=i.split(""),a=[];for(let f of m){let v=f.start-1,H=f.end===null?e.length:f.end;for(let d=v;d<H&&d<e.length;d++)d>=0&&a.push(e[d])}h+=`${a.join("")}
4
+ `}else{if(r&&!i.includes(l))continue;let e=i.split(l),a=L(e,m);h+=`${a.join(l)}
5
+ `}return{stdout:h,stderr:"",exitCode:0,stdoutEncoding:"binary"}}},C={name:"cut",flags:[{flag:"-d",type:"value",valueHint:"delimiter"},{flag:"-f",type:"value",valueHint:"string"},{flag:"-c",type:"value",valueHint:"string"},{flag:"-s",type:"boolean"}],stdinType:"text",needsFiles:!0};export{k as a,C as b};
@@ -0,0 +1 @@
1
+ import{a as s,b as i}from"./chunk-3RCXHB4E.js";function a(t,e,n){if(!t||i.isInSandboxedContext())return;let r=`${e} ${n} attempted outside defense context`;throw new s(r,{timestamp:Date.now(),type:"missing_defense_context",message:r,path:"DefenseInDepthBox.context",stack:new Error().stack,executionId:i.getCurrentExecutionId()})}async function x(t,e,n,r){a(t,e,`${n} (pre-await)`);let o=await r();return a(t,e,`${n} (post-await)`),o}function d(t,e,n,r){let o=((...c)=>(a(t,e,n),r(...c)));return t?i.bindCurrentContext(o):o}export{a,x as b,d as c};
@@ -0,0 +1,12 @@
1
+ import{a as b,b as z}from"./chunk-DOTBQEPN.js";import{a as D,b as F}from"./chunk-T2EHE3CV.js";import{a as N}from"./chunk-3RCXHB4E.js";import{a as O}from"./chunk-CCNMISUL.js";import{a as k}from"./chunk-7L36YK2X.js";import{k as $}from"./chunk-GFQRA5P5.js";import{a as J,b as I,c as C}from"./chunk-74CEPOFO.js";function L(s){let r=[],t=0,l=s.length;for(;t<l;){for(;t<l&&/\s/.test(s[t]);)t++;if(t>=l)break;let u=t,n=s[t];if(n==="{"||n==="["){let i=n,a=n==="{"?"}":"]",c=1,p=!1,d=!1;for(t++;t<l&&c>0;){let h=s[t];d?d=!1:h==="\\"?d=!0:h==='"'?p=!p:p||(h===i?c++:h===a&&c--),t++}if(c!==0)throw new Error(`Unexpected end of JSON input at position ${t} (unclosed ${i})`);r.push(JSON.parse(s.slice(u,t)))}else if(n==='"'){let i=!1;for(t++;t<l;){let a=s[t];if(i)i=!1;else if(a==="\\")i=!0;else if(a==='"'){t++;break}t++}r.push(JSON.parse(s.slice(u,t)))}else if(n==="-"||n>="0"&&n<="9"){for(;t<l&&/[\d.eE+-]/.test(s[t]);)t++;r.push(JSON.parse(s.slice(u,t)))}else if(s.slice(t,t+4)==="true")r.push(!0),t+=4;else if(s.slice(t,t+5)==="false")r.push(!1),t+=5;else if(s.slice(t,t+4)==="null")r.push(null),t+=4;else{let i=s.slice(t,t+10);throw new Error(`Invalid JSON at position ${u}: unexpected '${i.split(/\s/)[0]}'`)}}return r}var W={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE]",options:["-r, --raw-output output strings without quotes","-c, --compact compact output (no pretty printing)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --help display this help and exit"]};function j(s,r,t,l,u,n=0){if(s===null||s===void 0)return"null";if(typeof s=="boolean")return String(s);if(typeof s=="number")return Number.isFinite(s)?String(s):"null";if(typeof s=="string")return t?s:JSON.stringify(s);let i=u?" ":" ";if(Array.isArray(s))return s.length===0?"[]":r?`[${s.map(c=>j(c,!0,!1,l,u)).join(",")}]`:`[
2
+ ${s.map(c=>i.repeat(n+1)+j(c,!1,!1,l,u,n+1)).join(`,
3
+ `)}
4
+ ${i.repeat(n)}]`;if(typeof s=="object"){let a=Object.keys(s);return l&&(a=a.sort()),a.length===0?"{}":r?`{${a.map(p=>`${JSON.stringify(p)}:${j(s[p],!0,!1,l,u)}`).join(",")}}`:`{
5
+ ${a.map(p=>{let d=j(s[p],!1,!1,l,u,n+1);return`${i.repeat(n+1)}${JSON.stringify(p)}: ${d}`}).join(`,
6
+ `)}
7
+ ${i.repeat(n)}}`}return String(s)}var G={name:"jq",async execute(s,r){D(r.requireDefenseContext,"jq","execution entry");let t=(o,e)=>F(r.requireDefenseContext,"jq",o,e);if(I(s))return J(W);let l=!1,u=!1,n=!1,i=!1,a=!1,c=!1,p=!1,d=!1,h=".",E=!1,g=[];for(let o=0;o<s.length;o++){let e=s[o];if(e==="-r"||e==="--raw-output")l=!0;else if(e==="-c"||e==="--compact-output")u=!0;else if(e==="-e"||e==="--exit-status")n=!0;else if(e==="-s"||e==="--slurp")i=!0;else if(e==="-n"||e==="--null-input")a=!0;else if(e==="-j"||e==="--join-output")c=!0;else if(!(e==="-a"||e==="--ascii")){if(e==="-S"||e==="--sort-keys")p=!0;else if(!(e==="-C"||e==="--color")){if(!(e==="-M"||e==="--monochrome"))if(e==="--tab")d=!0;else if(e==="-")g.push("-");else{if(e.startsWith("--"))return C("jq",e);if(e.startsWith("-")){for(let f of e.slice(1))if(f==="r")l=!0;else if(f==="c")u=!0;else if(f==="e")n=!0;else if(f==="s")i=!0;else if(f==="n")a=!0;else if(f==="j")c=!0;else if(f!=="a"){if(f==="S")p=!0;else if(f!=="C"){if(f!=="M")return C("jq",`-${f}`)}}}else E?g.push(e):(h=e,E=!0)}}}}let y=[];if(!a)if(g.length===0||g.length===1&&g[0]==="-")y.push({source:"stdin",content:r.stdin});else{let o=await t("file read",()=>k(r,g,{cmdName:"jq",stopOnError:!0}));if(o.exitCode!==0)return{stdout:"",stderr:o.stderr,exitCode:2};y=o.files.map(e=>({source:e.filename||"stdin",content:e.content}))}try{let o=z(h),e=[],f={limits:r.limits?{maxIterations:r.limits.maxJqIterations}:void 0,env:r.env,coverage:r.coverage,requireDefenseContext:r.requireDefenseContext};if(a)e=b(null,o,f);else if(i){let m=[];for(let{content:x}of y){let q=x.trim();q&&m.push(...L(q))}e=b(m,o,f)}else for(let{content:m}of y){let x=m.trim();if(!x)continue;let q=L(x);for(let H of q)e.push(...b(H,o,f))}let A=e.map(m=>j(m,u,l,p,d)),M=c?"":`
8
+ `,S=A.join(M),w=r.limits?.maxStringLength;if(w!==void 0&&w>0&&S.length>w)throw new $(`jq: output size limit exceeded (${w} bytes)`,"string_length");let V=n&&(e.length===0||e.every(m=>m==null||m===!1))?1:0;return{stdout:S?c?S:`${S}
9
+ `:"",stderr:"",exitCode:V}}catch(o){if(o instanceof N)throw o;if(o instanceof $)return{stdout:"",stderr:`jq: ${O(o.message)}
10
+ `,exitCode:$.EXIT_CODE};let e=O(o.message);return e.includes("Unknown function")?{stdout:"",stderr:`jq: error: ${e}
11
+ `,exitCode:3}:{stdout:"",stderr:`jq: parse error: ${e}
12
+ `,exitCode:5}}}},Q={name:"jq",flags:[{flag:"-r",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"--tab",type:"boolean"}],stdinType:"json",needsArgs:!0};export{G as a,Q as b};
@@ -0,0 +1,5 @@
1
+ import{a as f}from"./chunk-7L36YK2X.js";import{a as d}from"./chunk-HWKDQ44K.js";import{a as m,b as p}from"./chunk-74CEPOFO.js";var b={name:"cat",summary:"concatenate files and print on the standard output",usage:"cat [OPTION]... [FILE]...",options:["-n, --number number all output lines"," --help display this help and exit"]},g={number:{short:"n",long:"number",type:"boolean"}},F={name:"cat",async execute(n,s){if(p(n))return m(b);let e=d("cat",n,g);if(!e.ok)return e.error;let r=e.result.flags.number,t=e.result.positional,a=await f(s,t,{cmdName:"cat",allowStdinMarker:!0,stopOnError:!1}),o="",l=1;for(let{content:i}of a.files)if(r){let c=y(i,l);o+=c.content,l=c.nextLineNumber}else o+=i;let u=t.length>0&&t.some(i=>i!=="-");return{stdout:o,stderr:a.stderr,exitCode:a.exitCode,...u?{stdoutEncoding:"binary"}:{}}}};function y(n,s){let e=n.split(`
2
+ `),r=n.endsWith(`
3
+ `),t=r?e.slice(0,-1):e;return{content:t.map((o,l)=>`${String(s+l).padStart(6," ")} ${o}`).join(`
4
+ `)+(r?`
5
+ `:""),nextLineNumber:s+t.length}}var w={name:"cat",flags:[{flag:"-n",type:"boolean"},{flag:"-A",type:"boolean"},{flag:"-b",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-t",type:"boolean"}],stdinType:"text",needsFiles:!0};export{F as a,w as b};
@@ -0,0 +1,35 @@
1
+ import{a as x,b as w}from"./chunk-ZK6J6F7O.js";import{c as b}from"./chunk-T2EHE3CV.js";import{b as E}from"./chunk-3RCXHB4E.js";import{a as m}from"./chunk-CCNMISUL.js";import{a as T,b as C}from"./chunk-74CEPOFO.js";import{existsSync as k}from"node:fs";import{dirname as _,join as q}from"node:path";import{fileURLToPath as z}from"node:url";import{Worker as X}from"node:worker_threads";import Y from"sql.js";function V(e,r,n){switch(n.mode){case"list":return B(e,r,n);case"csv":return O(e,r,n);case"json":return N(e,r);case"line":return P(e,r,n);case"column":return R(e,r,n);case"table":return F(e,r,n);case"markdown":return Q(e,r,n);case"tabs":return U(e,r,n);case"box":return D(e,r,n);case"quote":return W(e,r,n);case"html":return H(e,r,n);case"ascii":return J(e,r,n)}}function f(e,r){return e==null?r:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function B(e,r,n){let t=[];n.header&&e.length>0&&t.push(e.join(n.separator));for(let a of r)t.push(a.map(o=>f(o,n.nullValue)).join(n.separator));return t.length>0?`${t.join(n.newline)}${n.newline}`:""}function O(e,r,n){let t=[];n.header&&e.length>0&&t.push(e.map(L).join(","));for(let a of r)t.push(a.map(o=>L(f(o,n.nullValue))).join(","));return t.length>0?`${t.join(`
2
+ `)}
3
+ `:""}function L(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
4
+ `)?`"${e.replace(/"/g,'""')}"`:e}function A(e){return e.toPrecision(17).replace(/\.?0+$/,"")}function I(e){return e===null?"null":typeof e=="number"?Number.isInteger(e)?String(e):A(e):JSON.stringify(e)}function N(e,r){return r.length===0?"":`[${r.map(t=>`{${e.map((o,i)=>`${JSON.stringify(o)}:${I(t[i])}`).join(",")}}`).join(`,
5
+ `)}]
6
+ `}function P(e,r,n){if(e.length===0||r.length===0)return"";let t=Math.max(5,...e.map(o=>o.length)),a=[];for(let o of r)for(let i=0;i<e.length;i++){let s=e[i].padStart(t);a.push(`${s} = ${f(o[i],n.nullValue)}`)}return`${a.join(`
7
+ `)}
8
+ `}function R(e,r,n){if(e.length===0)return"";let t=e.map(o=>o.length);for(let o of r)for(let i=0;i<o.length;i++){let s=f(o[i],n.nullValue).length;s>t[i]&&(t[i]=s)}let a=[];n.header&&(a.push(e.map((o,i)=>o.padEnd(t[i])).join(" ")),a.push(t.map(o=>"-".repeat(o)).join(" ")));for(let o of r)a.push(o.map((i,s)=>f(i,n.nullValue).padEnd(t[s])).join(" "));return a.length>0?`${a.join(`
9
+ `)}
10
+ `:""}function F(e,r,n){if(e.length===0)return"";let t=e.map(i=>i.length);for(let i of r)for(let s=0;s<i.length;s++){let h=f(i[s],n.nullValue).length;h>t[s]&&(t[s]=h)}let a=[],o=`+${t.map(i=>"-".repeat(i+2)).join("+")}+`;a.push(o),n.header&&(a.push(`| ${e.map((i,s)=>i.padEnd(t[s])).join(" | ")} |`),a.push(o));for(let i of r)a.push(`| ${i.map((s,h)=>f(s,n.nullValue).padEnd(t[h])).join(" | ")} |`);return a.push(o),`${a.join(`
11
+ `)}
12
+ `}function Q(e,r,n){if(e.length===0)return"";let t=[];n.header&&(t.push(`| ${e.join(" | ")} |`),t.push(`|${e.map(()=>"---").join("|")}|`));for(let a of r)t.push(`| ${a.map(o=>f(o,n.nullValue)).join(" | ")} |`);return t.length>0?`${t.join(`
13
+ `)}
14
+ `:""}function U(e,r,n){let t=[];n.header&&e.length>0&&t.push(e.join(" "));for(let a of r)t.push(a.map(o=>f(o,n.nullValue)).join(" "));return t.length>0?`${t.join(n.newline)}${n.newline}`:""}function D(e,r,n){if(e.length===0)return"";let t=e.map(o=>o.length);for(let o of r)for(let i=0;i<o.length;i++){let s=f(o[i],n.nullValue).length;s>t[i]&&(t[i]=s)}let a=[];a.push(`\u250C${t.map(o=>"\u2500".repeat(o+2)).join("\u252C")}\u2510`),a.push(`\u2502 ${e.map((o,i)=>o.padEnd(t[i])).join(" \u2502 ")} \u2502`),a.push(`\u251C${t.map(o=>"\u2500".repeat(o+2)).join("\u253C")}\u2524`);for(let o of r)a.push(`\u2502 ${o.map((i,s)=>f(i,n.nullValue).padEnd(t[s])).join(" \u2502 ")} \u2502`);return a.push(`\u2514${t.map(o=>"\u2500".repeat(o+2)).join("\u2534")}\u2518`),`${a.join(`
15
+ `)}
16
+ `}function W(e,r,n){let t=[];n.header&&e.length>0&&t.push(e.map(a=>`'${a}'`).join(","));for(let a of r)t.push(a.map(o=>o==null?"NULL":typeof o=="number"?Number.isInteger(o)?String(o):A(o):`'${String(o)}'`).join(","));return t.length>0?`${t.join(n.newline)}${n.newline}`:""}function H(e,r,n){let t=[];n.header&&e.length>0&&(t.push(`<TR>${e.map(a=>`<TH>${M(a)}</TH>`).join("")}`),t.push("</TR>"));for(let a of r)t.push(`<TR>${a.map(o=>`<TD>${M(f(o,n.nullValue))}</TD>`).join("")}`),t.push("</TR>");return t.length>0?`${t.join(`
17
+ `)}
18
+ `:""}function M(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function J(e,r,n){let o=[];n.header&&e.length>0&&o.push(e.join(""));for(let i of r)o.push(i.map(s=>f(s,n.nullValue)).join(""));return o.length>0?o.join("")+"":""}var G=5e3,K={name:"sqlite3",summary:"SQLite database CLI",usage:"sqlite3 [OPTIONS] DATABASE [SQL]",options:["-list output in list mode (default)","-csv output in CSV mode","-json output in JSON mode","-line output in line mode","-column output in column mode","-table output as ASCII table","-markdown output as markdown table","-tabs output in tab-separated mode","-box output in Unicode box mode","-quote output in SQL quote mode","-html output as HTML table","-ascii output in ASCII mode (control chars)","-header show column headers","-noheader hide column headers","-separator SEP field separator for list mode (default: |)","-newline SEP row separator (default: \\n)","-nullvalue TEXT text for NULL values (default: empty)","-readonly open database read-only (no writeback)","-bail stop on first error","-echo print SQL before execution","-cmd COMMAND run SQL command before main SQL","-version show SQLite version","-- end of options","--help show this help"],examples:['sqlite3 :memory: "CREATE TABLE t(x); INSERT INTO t VALUES(1); SELECT * FROM t"','sqlite3 -json data.db "SELECT * FROM users"','sqlite3 -csv -header data.db "SELECT id, name FROM products"','sqlite3 -box data.db "SELECT * FROM users"']};function Z(e){let r={mode:"list",header:!1,separator:"|",newline:`
19
+ `,nullValue:"",readonly:!1,bail:!1,echo:!1,cmd:null},n=null,t=null,a=!1,o=!1;for(let i=0;i<e.length;i++){let s=e[i];if(o){n===null?n=s:t===null&&(t=s);continue}if(s==="--")o=!0;else if(s==="-version")a=!0;else if(s==="-list")r.mode="list";else if(s==="-csv")r.mode="csv";else if(s==="-json")r.mode="json";else if(s==="-line")r.mode="line";else if(s==="-column")r.mode="column";else if(s==="-table")r.mode="table";else if(s==="-markdown")r.mode="markdown";else if(s==="-tabs")r.mode="tabs";else if(s==="-box")r.mode="box";else if(s==="-quote")r.mode="quote";else if(s==="-html")r.mode="html";else if(s==="-ascii")r.mode="ascii";else if(s==="-header")r.header=!0;else if(s==="-noheader")r.header=!1;else if(s==="-readonly")r.readonly=!0;else if(s==="-bail")r.bail=!0;else if(s==="-echo")r.echo=!0;else if(s==="-separator"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -separator
20
+ `,exitCode:1};r.separator=e[++i]}else if(s==="-newline"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -newline
21
+ `,exitCode:1};r.newline=e[++i]}else if(s==="-nullvalue"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -nullvalue
22
+ `,exitCode:1};r.nullValue=e[++i]}else if(s==="-cmd"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -cmd
23
+ `,exitCode:1};r.cmd=e[++i]}else{if(s.startsWith("-"))return{stdout:"",stderr:`sqlite3: Error: unknown option: ${s.startsWith("--")?s.slice(1):s}
24
+ Use -help for a list of options.
25
+ `,exitCode:1};n===null?n=s:t===null&&(t=s)}}return{options:r,database:n,sql:t,showVersion:a}}async function v(){let e=await E.runTrustedAsync(()=>Y()),r=new e.Database;try{let n=r.exec("SELECT sqlite_version()");return n.length>0&&n[0].values.length>0?String(n[0].values[0][0]):"unknown"}finally{r.close()}}function ee(){let e=_(z(import.meta.url)),r=q(e,"../../commands/sqlite3/worker.js");if(k(r))return r;let n=q(e,"worker.js");if(k(n))return n;let t=q(e,"../../../dist/commands/sqlite3/worker.js");if(k(t))return t;throw new Error("sqlite3 worker not found. Run 'pnpm build' to compile the worker.")}var re={createWorker(e,r){return new X(e,{workerData:r})}};function te(e){if(!e||typeof e!="object")return{success:!1,error:"Malformed worker response"};let r=e;return r.type==="security-violation"?{success:!1,error:`Security violation: ${typeof r.violation?.type=="string"?r.violation.type:"unknown"}`}:typeof r.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:r.success?Array.isArray(r.results)?typeof r.hasModifications!="boolean"?{success:!1,error:"Malformed worker response: missing hasModifications flag"}:r.dbBuffer!==null&&r.dbBuffer!==void 0&&!(r.dbBuffer instanceof Uint8Array)?{success:!1,error:"Malformed worker response: invalid dbBuffer"}:{success:!0,results:r.results,hasModifications:r.hasModifications,dbBuffer:r.dbBuffer===void 0?null:r.dbBuffer,defenseStats:r.defenseStats}:{success:!1,error:"Malformed worker response: missing results array"}:{success:!1,error:typeof r.error=="string"&&r.error.length>0?r.error:"Worker execution failed"}}async function ne(e,r,n){try{let t=ee();return await new Promise((a,o)=>{let i=E.runTrusted(()=>re.createWorker(t,e)),s=b(n,"sqlite3","worker timeout callback",()=>{i.terminate(),a({success:!1,error:`Query timeout: execution exceeded ${r}ms limit`})}),c=x(()=>{try{s()}catch(u){let l=u instanceof Error?u.message:String(u);a({success:!1,error:m(l)})}},r),S=b(n,"sqlite3","worker message callback",u=>{w(c),a(te(u))}),$=b(n,"sqlite3","worker error callback",u=>{w(c),o(u)}),j=b(n,"sqlite3","worker exit callback",u=>{w(c),u!==0&&a({success:!1,error:`Worker exited with code ${u}`})}),p=u=>{try{S(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);a({success:!1,error:m(d)})}},y=u=>{try{$(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);o(new Error(m(d)))}},g=u=>{try{j(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);a({success:!1,error:m(d)})}};i.on("message",p),i.on("error",y),i.on("exit",g)})}catch(t){let a=m(t.message);throw new Error(`sqlite3 worker failed to load: ${a}`)}}var ge={name:"sqlite3",async execute(e,r){if(C(e)||e.includes("-help"))return T(K);let n=Z(e);if("exitCode"in n)return n;let{options:t,database:a,sql:o,showVersion:i}=n;if(i)return{stdout:`${await v()}
26
+ `,stderr:"",exitCode:0};if(!a)return{stdout:"",stderr:`sqlite3: missing database argument
27
+ `,exitCode:1};let s=o||r.stdin.trim();if(t.cmd&&(s=t.cmd+(s?`; ${s}`:"")),!s)return{stdout:"",stderr:`sqlite3: no SQL provided
28
+ `,exitCode:1};let h=a===":memory:",c="",S=null;try{h||(c=r.fs.resolvePath(r.cwd,a),await r.fs.exists(c)&&(S=await r.fs.readFileBuffer(c)))}catch(l){let d=m(l.message);return{stdout:"",stderr:`sqlite3: unable to open database "${a}": ${d}
29
+ `,exitCode:1}}let $=r.limits?.maxSqliteTimeoutMs??G,j={dbBuffer:S,sql:s,options:{bail:t.bail,echo:t.echo}},p;try{p=await ne(j,$,r.requireDefenseContext)}catch(l){return{stdout:"",stderr:`sqlite3: worker error: ${m(l.message)}
30
+ `,exitCode:1}}if(!p.success)return{stdout:"",stderr:`sqlite3: ${m(p.error)}
31
+ `,exitCode:1};let y={mode:t.mode,header:t.header,separator:t.separator,newline:t.newline,nullValue:t.nullValue},g="";t.echo&&(g+=`${s}
32
+ `);let u=!1;for(let l of p.results)if(l.type==="error"){if(t.bail)return{stdout:g,stderr:`Error: ${l.error}
33
+ `,exitCode:1};g+=`Error: ${l.error}
34
+ `,u=!0}else l.columns&&l.rows&&(l.rows.length>0||t.header)&&(g+=V(l.columns,l.rows,y));if(p.hasModifications&&!t.readonly&&!h&&c&&p.dbBuffer)try{await r.fs.writeFile(c,p.dbBuffer)}catch(l){let d=m(l.message);return{stdout:g,stderr:`sqlite3: failed to write database: ${d}
35
+ `,exitCode:1}}return{stdout:g,stderr:"",exitCode:u&&t.bail?1:0}}},we={name:"sqlite3",flags:[],needsArgs:!0};export{re as a,ge as b,we as c};
@@ -1,4 +1,4 @@
1
- import{a as c}from"./chunk-NBAARP4B.js";import{a as h}from"./chunk-IPJHKYVM.js";import{a as g,b as p,c as a}from"./chunk-74CEPOFO.js";var v={name:"timeout",summary:"run a command with a time limit",usage:"timeout [OPTION] DURATION COMMAND [ARG]...",description:`Start COMMAND, and kill it if still running after DURATION.
1
+ import{a as c}from"./chunk-ZK6J6F7O.js";import{a as h}from"./chunk-IPJHKYVM.js";import{a as g,b as p,c as a}from"./chunk-74CEPOFO.js";var v={name:"timeout",summary:"run a command with a time limit",usage:"timeout [OPTION] DURATION COMMAND [ARG]...",description:`Start COMMAND, and kill it if still running after DURATION.
2
2
 
3
3
  DURATION is a number with optional suffix:
4
4
  s - seconds (default)
@@ -1,4 +1,4 @@
1
- import{a,b as o}from"./chunk-NBAARP4B.js";import{a as i,b as l}from"./chunk-74CEPOFO.js";var d={name:"sleep",summary:"delay for a specified amount of time",usage:"sleep NUMBER[SUFFIX]",description:`Pause for NUMBER seconds. SUFFIX may be:
1
+ import{a,b as o}from"./chunk-ZK6J6F7O.js";import{a as i,b as l}from"./chunk-74CEPOFO.js";var d={name:"sleep",summary:"delay for a specified amount of time",usage:"sleep NUMBER[SUFFIX]",description:`Pause for NUMBER seconds. SUFFIX may be:
2
2
  s - seconds (default)
3
3
  m - minutes
4
4
  h - hours
@@ -1,4 +1,4 @@
1
- import{b as g}from"./chunk-7L36YK2X.js";import{a as d}from"./chunk-HWKDQ44K.js";import{a as p,b as f}from"./chunk-74CEPOFO.js";var O={name:"uniq",summary:"report or omit repeated lines",usage:"uniq [OPTION]... [INPUT [OUTPUT]]",options:["-c, --count prefix lines by the number of occurrences","-d, --repeated only print duplicate lines","-i, --ignore-case ignore case when comparing","-u, --unique only print unique lines"," --help display this help and exit"]},w={count:{short:"c",long:"count",type:"boolean"},duplicatesOnly:{short:"d",long:"repeated",type:"boolean"},uniqueOnly:{short:"u",long:"unique",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},N={name:"uniq",async execute(c,m){if(f(c))return p(O);let o=d("uniq",c,w);if(!o.ok)return o.error;let{count:y,duplicatesOnly:h,uniqueOnly:q,ignoreCase:b}=o.result.flags,C=o.result.positional,s=await g(m,C,{cmdName:"uniq"});if(!s.ok)return s.error;let n=s.content.split(`
2
- `);if(n.length>0&&n[n.length-1]===""&&n.pop(),n.length===0)return{stdout:"",stderr:"",exitCode:0};let t=[],r=n[0],i=1,x=(e,l)=>b?e.toLowerCase()===l.toLowerCase():e===l;for(let e=1;e<n.length;e++)x(n[e],r)?i++:(t.push({line:r,count:i}),r=n[e],i=1);t.push({line:r,count:i});let u=t;h?u=t.filter(e=>e.count>1):q&&(u=t.filter(e=>e.count===1));let a="";for(let{line:e,count:l}of u)y?a+=`${String(l).padStart(4)} ${e}
1
+ import{b as g}from"./chunk-7L36YK2X.js";import{a as d}from"./chunk-HWKDQ44K.js";import{a as p,b as f}from"./chunk-74CEPOFO.js";var O={name:"uniq",summary:"report or omit repeated lines",usage:"uniq [OPTION]... [INPUT [OUTPUT]]",options:["-c, --count prefix lines by the number of occurrences","-d, --repeated only print duplicate lines","-i, --ignore-case ignore case when comparing","-u, --unique only print unique lines"," --help display this help and exit"]},w={count:{short:"c",long:"count",type:"boolean"},duplicatesOnly:{short:"d",long:"repeated",type:"boolean"},uniqueOnly:{short:"u",long:"unique",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},N={name:"uniq",async execute(c,y){if(f(c))return p(O);let o=d("uniq",c,w);if(!o.ok)return o.error;let{count:m,duplicatesOnly:h,uniqueOnly:q,ignoreCase:b}=o.result.flags,C=o.result.positional,l=await g(y,C,{cmdName:"uniq"});if(!l.ok)return l.error;let n=l.content.split(`
2
+ `);if(n.length>0&&n[n.length-1]===""&&n.pop(),n.length===0)return{stdout:"",stderr:"",exitCode:0};let t=[],r=n[0],i=1,x=(e,s)=>b?e.toLowerCase()===s.toLowerCase():e===s;for(let e=1;e<n.length;e++)x(n[e],r)?i++:(t.push({line:r,count:i}),r=n[e],i=1);t.push({line:r,count:i});let u=t;h?u=t.filter(e=>e.count>1):q&&(u=t.filter(e=>e.count===1));let a="";for(let{line:e,count:s}of u)m?a+=`${String(s).padStart(4)} ${e}
3
3
  `:a+=`${e}
4
- `;return{stdout:a,stderr:"",exitCode:0}}},P={name:"uniq",flags:[{flag:"-c",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-u",type:"boolean"},{flag:"-i",type:"boolean"}],stdinType:"text",needsFiles:!0};export{N as a,P as b};
4
+ `;return{stdout:a,stderr:"",exitCode:0,stdoutEncoding:"binary"}}},P={name:"uniq",flags:[{flag:"-c",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-u",type:"boolean"},{flag:"-i",type:"boolean"}],stdinType:"text",needsFiles:!0};export{N as a,P as b};
@@ -0,0 +1,20 @@
1
+ import{a as y}from"./chunk-CCNMISUL.js";import{a as C}from"./chunk-HWKDQ44K.js";import{a as u,b as m}from"./chunk-74CEPOFO.js";var x={name:"tr",summary:"translate or delete characters",usage:"tr [OPTION]... SET1 [SET2]",options:["-c, -C, --complement use the complement of SET1","-d, --delete delete characters in SET1","-s, --squeeze-repeats squeeze repeated characters"," --help display this help and exit"],description:`SET syntax:
2
+ a-z character range
3
+ [:alnum:] all letters and digits
4
+ [:alpha:] all letters
5
+ [:digit:] all digits
6
+ [:lower:] all lowercase letters
7
+ [:upper:] all uppercase letters
8
+ [:space:] all whitespace
9
+ [:blank:] horizontal whitespace
10
+ [:punct:] all punctuation
11
+ [:print:] all printable characters
12
+ [:graph:] all printable characters except space
13
+ [:cntrl:] all control characters
14
+ [:xdigit:] all hexadecimal digits
15
+ \\n, \\t, \\r escape sequences`},b=new Map([["[:alnum:]","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"],["[:alpha:]","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"],["[:blank:]"," "],["[:cntrl:]",Array.from({length:32},(r,o)=>String.fromCharCode(o)).join("").concat("\x7F")],["[:digit:]","0123456789"],["[:graph:]",Array.from({length:94},(r,o)=>String.fromCharCode(33+o)).join("")],["[:lower:]","abcdefghijklmnopqrstuvwxyz"],["[:print:]",Array.from({length:95},(r,o)=>String.fromCharCode(32+o)).join("")],["[:punct:]","!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"],["[:space:]",`
16
+ \r\f\v`],["[:upper:]","ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["[:xdigit:]","0123456789ABCDEFabcdef"]]);function S(r){let o="",e=0;for(;e<r.length;){if(r[e]==="["&&r[e+1]===":"){let a=!1;for(let[c,l]of b)if(r.slice(e).startsWith(c)){o+=l,e+=c.length,a=!0;break}if(a)continue}if(r[e]==="\\"&&e+1<r.length){let a=r[e+1];a==="n"?o+=`
17
+ `:a==="t"?o+=" ":a==="r"?o+="\r":o+=a,e+=2;continue}if(e+2<r.length&&r[e+1]==="-"){let a=r.charCodeAt(e),c=r.charCodeAt(e+2);if(c-a>65536)throw new Error(`tr: character range too large: '${r[e]}-${r[e+2]}'`);for(let l=a;l<=c;l++)o+=String.fromCharCode(l);e+=3;continue}o+=r[e],e++}return o}var w={complement:{short:"c",long:"complement",type:"boolean"},complementUpper:{short:"C",type:"boolean"},delete:{short:"d",long:"delete",type:"boolean"},squeeze:{short:"s",long:"squeeze-repeats",type:"boolean"}},q={name:"tr",async execute(r,o){if(m(r))return u(x);let e=C("tr",r,w);if(!e.ok)return e.error;let a=e.result.flags.complement||e.result.flags.complementUpper,c=e.result.flags.delete,l=e.result.flags.squeeze,p=e.result.positional;if(p.length<1)return{stdout:"",stderr:`tr: missing operand
18
+ `,exitCode:1};if(!c&&!l&&p.length<2)return{stdout:"",stderr:`tr: missing operand after SET1
19
+ `,exitCode:1};let d,s;try{d=S(p[0]),s=p.length>1?S(p[1]):""}catch(n){return{stdout:"",stderr:`${y(n.message)}
20
+ `,exitCode:1}}let g=o.stdin,h=n=>{let t=d.includes(n);return a?!t:t},i="";if(c)for(let n of g)h(n)||(i+=n);else if(l&&p.length===1){let n="";for(let t of g)h(t)&&t===n||(i+=t,n=t)}else{if(a){let n=s.length>0?s[s.length-1]:"";for(let t of g)d.includes(t)?i+=t:i+=n}else{let n=new Map;for(let t=0;t<d.length;t++){let f=t<s.length?s[t]:s[s.length-1];n.set(d[t],f)}for(let t of g)i+=n.get(t)??t}if(l){let n="",t="";for(let f of i)s.includes(f)&&f===t||(n+=f,t=f);i=n}}return{stdout:i,stderr:"",exitCode:0}}},T={name:"tr",flags:[{flag:"-c",type:"boolean"},{flag:"-C",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-s",type:"boolean"}],stdinType:"text",needsArgs:!0};export{q as a,T as b};
@@ -0,0 +1 @@
1
+ import{b as t}from"./chunk-3RCXHB4E.js";var n=globalThis.setTimeout.bind(globalThis),i=globalThis.clearTimeout.bind(globalThis),s=globalThis.setInterval.bind(globalThis),c=globalThis.clearInterval.bind(globalThis);function a(e){return typeof e!="function"?e:t.bindCurrentContext(e)}var T=((e,o,...r)=>n(a(e),o,...r)),b=i;var u=globalThis.SharedArrayBuffer,m=globalThis.Atomics,f=performance.now.bind(performance);export{T as a,b,u as c,m as d,f as e};
@@ -1 +1 @@
1
- import{a,b}from"./chunk-6NY2AP72.js";import"./chunk-7L36YK2X.js";import"./chunk-NUFRM6SI.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as cutCommand,b as flagsForFuzzing};
1
+ import{a,b}from"./chunk-SDNKECQQ.js";import"./chunk-7L36YK2X.js";import"./chunk-NUFRM6SI.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as cutCommand,b as flagsForFuzzing};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-RVT3MU3A.js";import"./chunk-YNYSPYQ5.js";import"./chunk-CCNMISUL.js";import"./chunk-DXB73IDG.js";export{a as exprCommand,b as flagsForFuzzing};
@@ -0,0 +1 @@
1
+ import{b as yr}from"./chunk-NTP6TTH5.js";import{b as Ar}from"./chunk-K5BTXJQC.js";import{b as $r}from"./chunk-N4QLRJ32.js";import"./chunk-F55TLFGB.js";import"./chunk-SYMJJMQ4.js";import{c as Sr}from"./chunk-VYV3YE2F.js";import{b as wr}from"./chunk-MDLLFABN.js";import{b as xr}from"./chunk-2GOYXRRP.js";import{b as vr}from"./chunk-A65PWWJC.js";import{b as kr}from"./chunk-MHTUABJP.js";import{b as qr}from"./chunk-4HHKTUW3.js";import{b as Cr}from"./chunk-HJQJAYMS.js";import{b as br}from"./chunk-PP6PSHAB.js";import{d as Ir,e as Mr,f as jr}from"./chunk-LTZRCH7N.js";import{b as tr}from"./chunk-W42IGK5R.js";import{b as lr}from"./chunk-KAZYKNBG.js";import{b as ur}from"./chunk-A7A2DBEE.js";import{b as pr}from"./chunk-RVT3MU3A.js";import{b as er}from"./chunk-APT7OOP2.js";import{b as dr}from"./chunk-XKQRETAK.js";import{b as cr}from"./chunk-5V6VZH6T.js";import"./chunk-EIZGF4BS.js";import{b as hr}from"./chunk-CR5AFCPT.js";import{c as or,d as ar}from"./chunk-R6QSAL5T.js";import{b as sr}from"./chunk-LL3S3NLB.js";import{c as ir,d as gr}from"./chunk-D6CWQ5DW.js";import{b as mr}from"./chunk-TBAWQWQB.js";import"./chunk-DOTBQEPN.js";import"./chunk-7MKBHGLS.js";import{b as Fr}from"./chunk-QJ7O6ZN3.js";import{b as zr}from"./chunk-TLSUDHID.js";import{b as fr}from"./chunk-D7MEQ3VN.js";import{b as nr}from"./chunk-WAN3B6E3.js";import{b as R}from"./chunk-ALLTKNUZ.js";import{b as U}from"./chunk-4Q4SM6WR.js";import{b as V}from"./chunk-XVDPCNWR.js";import{b as W}from"./chunk-RPNGRAAP.js";import{c as X,d as Y}from"./chunk-3RA5L262.js";import{c as Z,d as _}from"./chunk-VOBGTVA6.js";import{b as N}from"./chunk-NCNPKYJZ.js";import{b as rr}from"./chunk-ZSJYNBAF.js";import{b as G}from"./chunk-VJFXDYWH.js";import{b as H}from"./chunk-PYSFUGCK.js";import{b as J}from"./chunk-VYOJP4TV.js";import{b as K}from"./chunk-MYE6AGBJ.js";import{b as L}from"./chunk-LWEGUNWT.js";import{b as O}from"./chunk-A7ICOL4V.js";import{b as P}from"./chunk-55VFSPNA.js";import{b as Q}from"./chunk-YCABLDKV.js";import{b as y}from"./chunk-WKFATFPP.js";import{b as A}from"./chunk-Z7JVV2SM.js";import{b as $}from"./chunk-SDNKECQQ.js";import{b as S}from"./chunk-JVPRLUMK.js";import{b as T}from"./chunk-XXZ46GOX.js";import{b as B}from"./chunk-QCDB2VPH.js";import{b as D}from"./chunk-F23WWYKW.js";import{b as E}from"./chunk-D4J545R4.js";import{b as w}from"./chunk-DCAAORBQ.js";import{b as x}from"./chunk-GXVXFKBA.js";import{b as v}from"./chunk-OFJTSXN6.js";import{d as k,e as q,f as C}from"./chunk-CYTBPLPE.js";import"./chunk-IJXFPKNC.js";import{b}from"./chunk-OKEHYWBE.js";import"./chunk-VLGZJRPG.js";import{b as I}from"./chunk-H4QOE4W3.js";import{b as M}from"./chunk-2OHMPZNZ.js";import{b as j}from"./chunk-KMEYNNUA.js";import{b as t}from"./chunk-27LMNKBP.js";import{b as l}from"./chunk-NUYSJFDK.js";import{b as u}from"./chunk-A4JSPFCI.js";import{b as p}from"./chunk-QUME7R6S.js";import{b as e}from"./chunk-GZ2N3SXD.js";import{b as d}from"./chunk-A4HU7SVR.js";import{b as c}from"./chunk-IKZ5LEGB.js";import{b as h}from"./chunk-64BAICW3.js";import"./chunk-HDQ56CKY.js";import"./chunk-ZK6J6F7O.js";import"./chunk-IPJHKYVM.js";import"./chunk-OJDRYQWQ.js";import"./chunk-T2EHE3CV.js";import"./chunk-3RCXHB4E.js";import"./chunk-YNYSPYQ5.js";import"./chunk-CCNMISUL.js";import{b as i}from"./chunk-GCTKCWKD.js";import{b as g}from"./chunk-TXBZCHCQ.js";import"./chunk-7L36YK2X.js";import{b as m}from"./chunk-T56QNPHK.js";import"./chunk-EEXR5ZDP.js";import"./chunk-GFQRA5P5.js";import{b as F}from"./chunk-V7TAPXDL.js";import"./chunk-NUFRM6SI.js";import{b as z}from"./chunk-XZ3MZS57.js";import{b as f}from"./chunk-OCS6LSEM.js";import"./chunk-HWKDQ44K.js";import{b as n}from"./chunk-OCLXQMOG.js";import"./chunk-44UOCSGV.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var Er=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,I,M,j,y,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,ir,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,Ir,Mr,jr,yr,Ar,$r,Sr];function Tr(){return Er}var Br=new Map;for(let r of Tr())Br.set(r.name,new Set(r.flags.map(o=>o.flag)));function Fa(r,o,Dr){let a=Br.get(o);if(!(!a||a.size===0))for(let s of Dr)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{Fa as emitFlagCoverage};
@@ -1 +1 @@
1
- import{a,b,c,d,e,f}from"./chunk-FO655G4V.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{d as flagsForFuzzing,b as gunzipCommand,e as gunzipFlagsForFuzzing,a as gzipCommand,c as zcatCommand,f as zcatFlagsForFuzzing};
1
+ import{a,b,c,d,e,f}from"./chunk-LTZRCH7N.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{d as flagsForFuzzing,b as gunzipCommand,e as gunzipFlagsForFuzzing,a as gzipCommand,c as zcatCommand,f as zcatFlagsForFuzzing};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-TBAWQWQB.js";import"./chunk-DOTBQEPN.js";import"./chunk-7MKBHGLS.js";import"./chunk-OJDRYQWQ.js";import"./chunk-T2EHE3CV.js";import"./chunk-3RCXHB4E.js";import"./chunk-YNYSPYQ5.js";import"./chunk-CCNMISUL.js";import"./chunk-7L36YK2X.js";import"./chunk-GFQRA5P5.js";import"./chunk-NUFRM6SI.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as jqCommand};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-QUME7R6S.js";import"./chunk-CCNMISUL.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as lnCommand};