just-bash 2.15.1-executor.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/README.md +38 -2
- package/dist/Bash.d.ts +23 -84
- package/dist/bin/chunks/alias-YRVAW27Y.js +3 -0
- package/dist/bin/chunks/awk2-RLMNTGI7.js +3 -0
- package/dist/bin/chunks/base64-RZRLGMB3.js +3 -0
- package/dist/bin/chunks/basename-F3AQ4KAQ.js +3 -0
- package/dist/bin/chunks/bash-CLP24TE2.js +3 -0
- package/dist/bin/chunks/cat-LQH5FSAR.js +3 -0
- package/dist/bin/chunks/chmod-S564JCJW.js +3 -0
- package/dist/bin/chunks/chunk-22HCD466.js +3 -0
- package/dist/bin/chunks/chunk-2AIXTPH2.js +9 -0
- package/dist/bin/chunks/chunk-2ETT4ELS.js +4 -0
- package/dist/bin/chunks/chunk-2GG3NVC4.js +10 -0
- package/dist/bin/chunks/chunk-2NRAWO6E.js +7 -0
- package/dist/bin/chunks/chunk-2SVX7I5P.js +14 -0
- package/dist/bin/chunks/chunk-3BYTCO2H.js +12 -0
- package/dist/bin/chunks/chunk-3MRB66F4.js +3 -0
- package/dist/bin/chunks/chunk-3UKQXBQ3.js +6 -0
- package/dist/bin/chunks/chunk-3WIMLJM7.js +8 -0
- package/dist/bin/chunks/chunk-47WZ2U6M.js +9 -0
- package/dist/bin/chunks/chunk-4KSZJAQK.js +6 -0
- package/dist/bin/chunks/chunk-5XSZHUEI.js +15 -0
- package/dist/bin/chunks/chunk-6FSBHK6H.js +22 -0
- package/dist/bin/chunks/chunk-6WJQNLR2.js +7 -0
- package/dist/bin/chunks/chunk-77MLOOQS.js +11 -0
- package/dist/bin/chunks/chunk-7AYT3UKI.js +6 -0
- package/dist/bin/chunks/chunk-7JZKVC3F.js +2 -0
- package/dist/bin/chunks/chunk-7NC4CPHS.js +20 -0
- package/dist/bin/chunks/chunk-7UU7KPEM.js +7 -0
- package/dist/bin/chunks/chunk-7VCQWCSH.js +15 -0
- package/dist/bin/chunks/chunk-AGKL4LDL.js +4 -0
- package/dist/bin/chunks/chunk-AJF3OBTR.js +4 -0
- package/dist/bin/chunks/chunk-ALVEEXFD.js +19 -0
- package/dist/bin/chunks/chunk-B2DRBHGQ.js +3 -0
- package/dist/bin/chunks/chunk-BE4PARL3.js +13 -0
- package/dist/bin/chunks/chunk-BGX3RW7H.js +10 -0
- package/dist/bin/chunks/chunk-BIJXTWZ4.js +3 -0
- package/dist/bin/chunks/chunk-BPZJYOUA.js +33 -0
- package/dist/bin/chunks/chunk-BZP56QBM.js +24 -0
- package/dist/bin/chunks/chunk-C7ISPH7Y.js +18 -0
- package/dist/bin/chunks/chunk-CAZ75E7E.js +3 -0
- package/dist/bin/chunks/chunk-D6CPXGKK.js +75 -0
- package/dist/bin/chunks/chunk-DJAX3ZRG.js +8 -0
- package/dist/bin/chunks/chunk-DYIBFLS3.js +17 -0
- package/dist/bin/chunks/chunk-EDTBGO7F.js +37 -0
- package/dist/bin/chunks/chunk-F3GKANW3.js +12 -0
- package/dist/bin/chunks/chunk-F3WNDKOC.js +3 -0
- package/dist/bin/chunks/chunk-FKVQZWJQ.js +10 -0
- package/dist/bin/chunks/chunk-FOUVACI7.js +16 -0
- package/dist/bin/chunks/chunk-FVRXEJYQ.js +141 -0
- package/dist/bin/chunks/chunk-G4AUMZUY.js +4 -0
- package/dist/bin/chunks/chunk-H7JTIXAO.js +4 -0
- package/dist/bin/chunks/chunk-HL4ZS7TX.js +6 -0
- package/dist/bin/chunks/chunk-HN2DCT7T.js +13 -0
- package/dist/bin/chunks/chunk-I4IRHQDW.js +3 -0
- package/dist/bin/chunks/chunk-IEXQTXU5.js +34 -0
- package/dist/bin/chunks/chunk-IZGLHVBB.js +8 -0
- package/dist/bin/chunks/chunk-J7TUF2VI.js +9 -0
- package/dist/bin/chunks/chunk-JNUX75OX.js +85 -0
- package/dist/bin/chunks/chunk-JXLDT4KX.js +4 -0
- package/dist/bin/chunks/chunk-JZW7NFK2.js +288 -0
- package/dist/bin/chunks/chunk-KFMPGSUT.js +9 -0
- package/dist/bin/chunks/chunk-KI54R2QB.js +3 -0
- package/dist/bin/chunks/chunk-KRRM5UCC.js +3 -0
- package/dist/bin/chunks/chunk-KUMHQGUR.js +3 -0
- package/dist/bin/chunks/chunk-L24QXM5S.js +34 -0
- package/dist/bin/chunks/chunk-LAHBP3FW.js +11 -0
- package/dist/bin/chunks/chunk-LC6D27QJ.js +3 -0
- package/dist/bin/chunks/chunk-LNNWMRCB.js +3 -0
- package/dist/bin/chunks/chunk-LNVSXNT7.js +3 -0
- package/dist/bin/chunks/chunk-LSQTB2QK.js +7 -0
- package/dist/bin/chunks/chunk-M65CQLJE.js +101 -0
- package/dist/bin/chunks/chunk-MLUOPG3W.js +3 -0
- package/dist/bin/chunks/chunk-MNWK4UIM.js +22 -0
- package/dist/bin/chunks/chunk-MROECM42.js +3 -0
- package/dist/bin/chunks/chunk-MUFNRCMY.js +24 -0
- package/dist/bin/chunks/chunk-N6YW4W3Z.js +29 -0
- package/dist/bin/chunks/chunk-NE4R2FVV.js +5 -0
- package/dist/bin/chunks/chunk-NXVG64T3.js +22 -0
- package/dist/bin/chunks/chunk-NYIPFY36.js +3 -0
- package/dist/bin/chunks/chunk-O2BCKSMK.js +3 -0
- package/dist/bin/chunks/chunk-OLEQNRKX.js +8 -0
- package/dist/bin/chunks/chunk-OPMLWMNH.js +17 -0
- package/dist/bin/chunks/chunk-PAYQNSZN.js +18 -0
- package/dist/bin/chunks/chunk-PBOVSFTJ.js +3 -0
- package/dist/bin/chunks/chunk-PXP4YYZA.js +13 -0
- package/dist/bin/chunks/chunk-PZQVSQX6.js +4 -0
- package/dist/bin/chunks/chunk-Q2GOPGDA.js +6 -0
- package/dist/bin/chunks/chunk-Q4UMTSRO.js +15 -0
- package/dist/bin/chunks/chunk-QL33F2W6.js +8 -0
- package/dist/bin/chunks/chunk-RVPTAYDS.js +4 -0
- package/dist/bin/chunks/chunk-SMSELHIY.js +12 -0
- package/dist/bin/chunks/chunk-UGJM7CKP.js +17 -0
- package/dist/bin/chunks/chunk-UO5LOD7U.js +12 -0
- package/dist/bin/chunks/chunk-UOMNSQEZ.js +10 -0
- package/dist/bin/chunks/chunk-UR4CEP4Y.js +3 -0
- package/dist/bin/chunks/chunk-V2RP73X4.js +15 -0
- package/dist/bin/chunks/chunk-VBDLSL7Y.js +10 -0
- package/dist/bin/chunks/chunk-VZK4FHWJ.js +3 -0
- package/dist/bin/chunks/chunk-WDWNEHHE.js +9 -0
- package/dist/bin/chunks/chunk-X4MX6EHF.js +6 -0
- package/dist/bin/chunks/chunk-XBB73LFB.js +5 -0
- package/dist/bin/chunks/chunk-XFFUAO3F.js +3 -0
- package/dist/bin/chunks/chunk-XHCCSVP6.js +9 -0
- package/dist/bin/chunks/chunk-XJ37N3S5.js +7 -0
- package/dist/bin/chunks/chunk-XPTYN6UE.js +8 -0
- package/dist/bin/chunks/chunk-XRUDFQG5.js +7 -0
- package/dist/bin/chunks/chunk-Y4FPH5DQ.js +64 -0
- package/dist/bin/chunks/chunk-YJ5OCPSK.js +7 -0
- package/dist/bin/chunks/chunk-YOIFOOGX.js +9 -0
- package/dist/bin/chunks/chunk-YOKQNNQO.js +6 -0
- package/dist/bin/chunks/chunk-YUZRUF5F.js +10 -0
- package/dist/bin/chunks/chunk-YY5PJR7O.js +7 -0
- package/dist/bin/chunks/chunk-ZFUVUYWG.js +15 -0
- package/dist/bin/chunks/clear-FGNEKYDU.js +3 -0
- package/dist/bin/chunks/column-AQB3A3PJ.js +3 -0
- package/dist/bin/chunks/comm-Q4VDF6ZO.js +3 -0
- package/dist/bin/chunks/cp-HYXTMN3D.js +3 -0
- package/dist/bin/chunks/curl-AXXGQRR2.js +27 -0
- package/dist/bin/chunks/cut-ZI2HIAW7.js +3 -0
- package/dist/bin/chunks/date-JEZYSA4F.js +3 -0
- package/dist/bin/chunks/diff-YDJ42RKS.js +3 -0
- package/dist/bin/chunks/dirname-VCINTLPD.js +3 -0
- package/dist/bin/chunks/du-4LRQIGRG.js +3 -0
- package/dist/bin/chunks/echo-KCOHTNDF.js +3 -0
- package/dist/bin/chunks/env-NY32PQJM.js +3 -0
- package/dist/bin/chunks/expand-YYSO35NS.js +3 -0
- package/dist/bin/chunks/expansion-PPP6PD75.js +3 -0
- package/dist/bin/chunks/expr-7PLWSWZI.js +3 -0
- package/dist/bin/chunks/file-GRZLWDVH.js +3 -0
- package/dist/bin/chunks/find-P4DOE7CE.js +3 -0
- package/dist/bin/chunks/flag-coverage-RFKIBJ6L.js +3 -0
- package/dist/bin/chunks/fold-5MF7QZWQ.js +3 -0
- package/dist/bin/chunks/grep-VAYCFO4O.js +3 -0
- package/dist/bin/chunks/gzip-UGBQQKIH.js +3 -0
- package/dist/bin/chunks/head-QNC2ZYDO.js +3 -0
- package/dist/bin/chunks/help-CGUEOGXQ.js +3 -0
- package/dist/bin/chunks/history-AQQWW3QB.js +3 -0
- package/dist/bin/chunks/hostname-USNWOQCK.js +3 -0
- package/dist/bin/chunks/html-to-markdown-QEFY7XQR.js +3 -0
- package/dist/bin/chunks/join-EJ73DYTK.js +3 -0
- package/dist/bin/chunks/jq-GGTKKMEN.js +3 -0
- package/dist/bin/chunks/js-exec-BC6NI55L.js +98 -0
- package/dist/bin/chunks/js-exec-worker.js +27 -185
- package/dist/bin/chunks/ln-LP4HMCSM.js +3 -0
- package/dist/bin/chunks/ls-KBNHNZWQ.js +3 -0
- package/dist/bin/chunks/md5sum-MCVDIB35.js +3 -0
- package/dist/bin/chunks/mkdir-P4DKRCDX.js +3 -0
- package/dist/bin/chunks/mv-QQK4FQX6.js +3 -0
- package/dist/bin/chunks/nl-KUPLVCTS.js +3 -0
- package/dist/bin/chunks/od-YQ5ZUI2H.js +3 -0
- package/dist/bin/chunks/paste-A5KKPWXX.js +3 -0
- package/dist/bin/chunks/printf-Z5C2UOI5.js +3 -0
- package/dist/bin/chunks/pwd-FCNDA467.js +3 -0
- package/dist/bin/chunks/python3-BQWDPUBM.js +13 -0
- package/dist/bin/chunks/readlink-25V57VOL.js +3 -0
- package/dist/bin/chunks/rev-PYHOZ4D4.js +3 -0
- package/dist/bin/chunks/rg-BGFMSIVK.js +3 -0
- package/dist/bin/chunks/rm-ECNUFR66.js +3 -0
- package/dist/bin/chunks/rmdir-DLOHIA7Q.js +3 -0
- package/dist/bin/chunks/sed-FWA634SN.js +3 -0
- package/dist/bin/chunks/seq-UXDJE6FB.js +3 -0
- package/dist/bin/chunks/sha1sum-4KF52U3Y.js +3 -0
- package/dist/bin/chunks/sha256sum-6YEPULPX.js +3 -0
- package/dist/bin/chunks/sleep-QHAPNY3Q.js +3 -0
- package/dist/bin/chunks/sort-4C6WOKNK.js +3 -0
- package/dist/bin/chunks/split-TV7NL7LA.js +3 -0
- package/dist/bin/chunks/sqlite3-W777NCI4.js +3 -0
- package/dist/bin/chunks/sqlite3-worker.js +1728 -0
- package/dist/bin/chunks/stat-BD6KT3BP.js +3 -0
- package/dist/bin/chunks/strings-MDD72LR6.js +3 -0
- package/dist/bin/chunks/tac-C2N4NQ6S.js +3 -0
- package/dist/bin/chunks/tail-BCB5W6JC.js +3 -0
- package/dist/bin/chunks/tar-DOO744MK.js +3 -0
- package/dist/bin/chunks/tee-UQHPO4OW.js +3 -0
- package/dist/bin/chunks/time-ZPY52VT2.js +3 -0
- package/dist/bin/chunks/timeout-5AX3ZS3X.js +3 -0
- package/dist/bin/chunks/touch-DFGSVIX7.js +3 -0
- package/dist/bin/chunks/tr-G7K6M6HP.js +3 -0
- package/dist/bin/chunks/tree-6D7SMPUR.js +3 -0
- package/dist/bin/chunks/true-SKL4L7JP.js +3 -0
- package/dist/bin/chunks/unexpand-QIR4EDPG.js +3 -0
- package/dist/bin/chunks/uniq-I7PVFJR4.js +3 -0
- package/dist/bin/chunks/wc-6NGWULAP.js +3 -0
- package/dist/bin/chunks/which-LCXKCLFC.js +3 -0
- package/dist/bin/chunks/whoami-TZDZDU7T.js +3 -0
- package/dist/bin/chunks/worker.js +28 -9
- package/dist/bin/chunks/xan-KX4VPXUN.js +3 -0
- package/dist/bin/chunks/xan-view-JXOZLJ7S.js +3 -0
- package/dist/bin/chunks/xargs-UWHPYLY7.js +3 -0
- package/dist/bin/chunks/yq-GCDCJBKB.js +3 -0
- package/dist/bin/just-bash.js +293 -292
- package/dist/bin/shell/chunks/alias-YRVAW27Y.js +3 -0
- package/dist/bin/shell/chunks/awk2-RLMNTGI7.js +3 -0
- package/dist/bin/shell/chunks/base64-RZRLGMB3.js +3 -0
- package/dist/bin/shell/chunks/basename-F3AQ4KAQ.js +3 -0
- package/dist/bin/shell/chunks/bash-CLP24TE2.js +3 -0
- package/dist/bin/shell/chunks/cat-LQH5FSAR.js +3 -0
- package/dist/bin/shell/chunks/chmod-S564JCJW.js +3 -0
- package/dist/bin/shell/chunks/chunk-22HCD466.js +3 -0
- package/dist/bin/shell/chunks/chunk-2AIXTPH2.js +9 -0
- package/dist/bin/shell/chunks/chunk-2ETT4ELS.js +4 -0
- package/dist/bin/shell/chunks/chunk-2GG3NVC4.js +10 -0
- package/dist/bin/shell/chunks/chunk-2NRAWO6E.js +7 -0
- package/dist/bin/shell/chunks/chunk-2SVX7I5P.js +14 -0
- package/dist/bin/shell/chunks/chunk-3BYTCO2H.js +12 -0
- package/dist/bin/shell/chunks/chunk-3MRB66F4.js +3 -0
- package/dist/bin/shell/chunks/chunk-3UKQXBQ3.js +6 -0
- package/dist/bin/shell/chunks/chunk-3WIMLJM7.js +8 -0
- package/dist/bin/shell/chunks/chunk-47WZ2U6M.js +9 -0
- package/dist/bin/shell/chunks/chunk-4KSZJAQK.js +6 -0
- package/dist/bin/shell/chunks/chunk-5XSZHUEI.js +15 -0
- package/dist/bin/shell/chunks/chunk-6FSBHK6H.js +22 -0
- package/dist/bin/shell/chunks/chunk-6WJQNLR2.js +7 -0
- package/dist/bin/shell/chunks/chunk-77MLOOQS.js +11 -0
- package/dist/bin/shell/chunks/chunk-7AYT3UKI.js +6 -0
- package/dist/bin/shell/chunks/chunk-7JZKVC3F.js +2 -0
- package/dist/bin/shell/chunks/chunk-7NC4CPHS.js +20 -0
- package/dist/bin/shell/chunks/chunk-7UU7KPEM.js +7 -0
- package/dist/bin/shell/chunks/chunk-7VCQWCSH.js +15 -0
- package/dist/bin/shell/chunks/chunk-AGKL4LDL.js +4 -0
- package/dist/bin/shell/chunks/chunk-AJF3OBTR.js +4 -0
- package/dist/bin/shell/chunks/chunk-ALVEEXFD.js +19 -0
- package/dist/bin/shell/chunks/chunk-B2DRBHGQ.js +3 -0
- package/dist/bin/shell/chunks/chunk-BE4PARL3.js +13 -0
- package/dist/bin/shell/chunks/chunk-BGX3RW7H.js +10 -0
- package/dist/bin/shell/chunks/chunk-BIJXTWZ4.js +3 -0
- package/dist/bin/shell/chunks/chunk-BPZJYOUA.js +33 -0
- package/dist/bin/shell/chunks/chunk-BZP56QBM.js +24 -0
- package/dist/bin/shell/chunks/chunk-C7ISPH7Y.js +18 -0
- package/dist/bin/shell/chunks/chunk-CAZ75E7E.js +3 -0
- package/dist/bin/shell/chunks/chunk-D6CPXGKK.js +75 -0
- package/dist/bin/shell/chunks/chunk-DJAX3ZRG.js +8 -0
- package/dist/bin/shell/chunks/chunk-DYIBFLS3.js +17 -0
- package/dist/bin/shell/chunks/chunk-EDTBGO7F.js +37 -0
- package/dist/bin/shell/chunks/chunk-F3GKANW3.js +12 -0
- package/dist/bin/shell/chunks/chunk-F3WNDKOC.js +3 -0
- package/dist/bin/shell/chunks/chunk-FKVQZWJQ.js +10 -0
- package/dist/bin/shell/chunks/chunk-FOUVACI7.js +16 -0
- package/dist/bin/shell/chunks/chunk-FVRXEJYQ.js +141 -0
- package/dist/bin/shell/chunks/chunk-G4AUMZUY.js +4 -0
- package/dist/bin/shell/chunks/chunk-H7JTIXAO.js +4 -0
- package/dist/bin/shell/chunks/chunk-HL4ZS7TX.js +6 -0
- package/dist/bin/shell/chunks/chunk-HN2DCT7T.js +13 -0
- package/dist/bin/shell/chunks/chunk-I4IRHQDW.js +3 -0
- package/dist/bin/shell/chunks/chunk-IEXQTXU5.js +34 -0
- package/dist/bin/shell/chunks/chunk-IZGLHVBB.js +8 -0
- package/dist/bin/shell/chunks/chunk-J7TUF2VI.js +9 -0
- package/dist/bin/shell/chunks/chunk-JNUX75OX.js +85 -0
- package/dist/bin/shell/chunks/chunk-JXLDT4KX.js +4 -0
- package/dist/bin/shell/chunks/chunk-JZW7NFK2.js +288 -0
- package/dist/bin/shell/chunks/chunk-KFMPGSUT.js +9 -0
- package/dist/bin/shell/chunks/chunk-KI54R2QB.js +3 -0
- package/dist/bin/shell/chunks/chunk-KRRM5UCC.js +3 -0
- package/dist/bin/shell/chunks/chunk-KUMHQGUR.js +3 -0
- package/dist/bin/shell/chunks/chunk-L24QXM5S.js +34 -0
- package/dist/bin/shell/chunks/chunk-LAHBP3FW.js +11 -0
- package/dist/bin/shell/chunks/chunk-LC6D27QJ.js +3 -0
- package/dist/bin/shell/chunks/chunk-LNNWMRCB.js +3 -0
- package/dist/bin/shell/chunks/chunk-LNVSXNT7.js +3 -0
- package/dist/bin/shell/chunks/chunk-LSQTB2QK.js +7 -0
- package/dist/bin/shell/chunks/chunk-M65CQLJE.js +101 -0
- package/dist/bin/shell/chunks/chunk-MLUOPG3W.js +3 -0
- package/dist/bin/shell/chunks/chunk-MNWK4UIM.js +22 -0
- package/dist/bin/shell/chunks/chunk-MROECM42.js +3 -0
- package/dist/bin/shell/chunks/chunk-MUFNRCMY.js +24 -0
- package/dist/bin/shell/chunks/chunk-N6YW4W3Z.js +29 -0
- package/dist/bin/shell/chunks/chunk-NE4R2FVV.js +5 -0
- package/dist/bin/shell/chunks/chunk-NXVG64T3.js +22 -0
- package/dist/bin/shell/chunks/chunk-NYIPFY36.js +3 -0
- package/dist/bin/shell/chunks/chunk-O2BCKSMK.js +3 -0
- package/dist/bin/shell/chunks/chunk-OLEQNRKX.js +8 -0
- package/dist/bin/shell/chunks/chunk-OPMLWMNH.js +17 -0
- package/dist/bin/shell/chunks/chunk-PAYQNSZN.js +18 -0
- package/dist/bin/shell/chunks/chunk-PBOVSFTJ.js +3 -0
- package/dist/bin/shell/chunks/chunk-PXP4YYZA.js +13 -0
- package/dist/bin/shell/chunks/chunk-PZQVSQX6.js +4 -0
- package/dist/bin/shell/chunks/chunk-Q2GOPGDA.js +6 -0
- package/dist/bin/shell/chunks/chunk-Q4UMTSRO.js +15 -0
- package/dist/bin/shell/chunks/chunk-QL33F2W6.js +8 -0
- package/dist/bin/shell/chunks/chunk-RVPTAYDS.js +4 -0
- package/dist/bin/shell/chunks/chunk-SMSELHIY.js +12 -0
- package/dist/bin/shell/chunks/chunk-UGJM7CKP.js +17 -0
- package/dist/bin/shell/chunks/chunk-UO5LOD7U.js +12 -0
- package/dist/bin/shell/chunks/chunk-UOMNSQEZ.js +10 -0
- package/dist/bin/shell/chunks/chunk-UR4CEP4Y.js +3 -0
- package/dist/bin/shell/chunks/chunk-V2RP73X4.js +15 -0
- package/dist/bin/shell/chunks/chunk-VBDLSL7Y.js +10 -0
- package/dist/bin/shell/chunks/chunk-VZK4FHWJ.js +3 -0
- package/dist/bin/shell/chunks/chunk-WDWNEHHE.js +9 -0
- package/dist/bin/shell/chunks/chunk-X4MX6EHF.js +6 -0
- package/dist/bin/shell/chunks/chunk-XBB73LFB.js +5 -0
- package/dist/bin/shell/chunks/chunk-XFFUAO3F.js +3 -0
- package/dist/bin/shell/chunks/chunk-XHCCSVP6.js +9 -0
- package/dist/bin/shell/chunks/chunk-XJ37N3S5.js +7 -0
- package/dist/bin/shell/chunks/chunk-XPTYN6UE.js +8 -0
- package/dist/bin/shell/chunks/chunk-XRUDFQG5.js +7 -0
- package/dist/bin/shell/chunks/chunk-Y4FPH5DQ.js +64 -0
- package/dist/bin/shell/chunks/chunk-YJ5OCPSK.js +7 -0
- package/dist/bin/shell/chunks/chunk-YOIFOOGX.js +9 -0
- package/dist/bin/shell/chunks/chunk-YOKQNNQO.js +6 -0
- package/dist/bin/shell/chunks/chunk-YUZRUF5F.js +10 -0
- package/dist/bin/shell/chunks/chunk-YY5PJR7O.js +7 -0
- package/dist/bin/shell/chunks/chunk-ZFUVUYWG.js +15 -0
- package/dist/bin/shell/chunks/clear-FGNEKYDU.js +3 -0
- package/dist/bin/shell/chunks/column-AQB3A3PJ.js +3 -0
- package/dist/bin/shell/chunks/comm-Q4VDF6ZO.js +3 -0
- package/dist/bin/shell/chunks/cp-HYXTMN3D.js +3 -0
- package/dist/bin/shell/chunks/curl-AXXGQRR2.js +27 -0
- package/dist/bin/shell/chunks/cut-ZI2HIAW7.js +3 -0
- package/dist/bin/shell/chunks/date-JEZYSA4F.js +3 -0
- package/dist/bin/shell/chunks/diff-YDJ42RKS.js +3 -0
- package/dist/bin/shell/chunks/dirname-VCINTLPD.js +3 -0
- package/dist/bin/shell/chunks/du-4LRQIGRG.js +3 -0
- package/dist/bin/shell/chunks/echo-KCOHTNDF.js +3 -0
- package/dist/bin/shell/chunks/env-NY32PQJM.js +3 -0
- package/dist/bin/shell/chunks/expand-YYSO35NS.js +3 -0
- package/dist/bin/shell/chunks/expansion-PPP6PD75.js +3 -0
- package/dist/bin/shell/chunks/expr-7PLWSWZI.js +3 -0
- package/dist/bin/shell/chunks/file-GRZLWDVH.js +3 -0
- package/dist/bin/shell/chunks/find-P4DOE7CE.js +3 -0
- package/dist/bin/shell/chunks/flag-coverage-RFKIBJ6L.js +3 -0
- package/dist/bin/shell/chunks/fold-5MF7QZWQ.js +3 -0
- package/dist/bin/shell/chunks/grep-VAYCFO4O.js +3 -0
- package/dist/bin/shell/chunks/gzip-UGBQQKIH.js +3 -0
- package/dist/bin/shell/chunks/head-QNC2ZYDO.js +3 -0
- package/dist/bin/shell/chunks/help-CGUEOGXQ.js +3 -0
- package/dist/bin/shell/chunks/history-AQQWW3QB.js +3 -0
- package/dist/bin/shell/chunks/hostname-USNWOQCK.js +3 -0
- package/dist/bin/shell/chunks/html-to-markdown-QEFY7XQR.js +3 -0
- package/dist/bin/shell/chunks/join-EJ73DYTK.js +3 -0
- package/dist/bin/shell/chunks/jq-GGTKKMEN.js +3 -0
- package/dist/bin/shell/chunks/js-exec-BC6NI55L.js +98 -0
- package/dist/bin/shell/chunks/ln-LP4HMCSM.js +3 -0
- package/dist/bin/shell/chunks/ls-KBNHNZWQ.js +3 -0
- package/dist/bin/shell/chunks/md5sum-MCVDIB35.js +3 -0
- package/dist/bin/shell/chunks/mkdir-P4DKRCDX.js +3 -0
- package/dist/bin/shell/chunks/mv-QQK4FQX6.js +3 -0
- package/dist/bin/shell/chunks/nl-KUPLVCTS.js +3 -0
- package/dist/bin/shell/chunks/od-YQ5ZUI2H.js +3 -0
- package/dist/bin/shell/chunks/paste-A5KKPWXX.js +3 -0
- package/dist/bin/shell/chunks/printf-Z5C2UOI5.js +3 -0
- package/dist/bin/shell/chunks/pwd-FCNDA467.js +3 -0
- package/dist/bin/shell/chunks/python3-BQWDPUBM.js +13 -0
- package/dist/bin/shell/chunks/readlink-25V57VOL.js +3 -0
- package/dist/bin/shell/chunks/rev-PYHOZ4D4.js +3 -0
- package/dist/bin/shell/chunks/rg-BGFMSIVK.js +3 -0
- package/dist/bin/shell/chunks/rm-ECNUFR66.js +3 -0
- package/dist/bin/shell/chunks/rmdir-DLOHIA7Q.js +3 -0
- package/dist/bin/shell/chunks/sed-FWA634SN.js +3 -0
- package/dist/bin/shell/chunks/seq-UXDJE6FB.js +3 -0
- package/dist/bin/shell/chunks/sha1sum-4KF52U3Y.js +3 -0
- package/dist/bin/shell/chunks/sha256sum-6YEPULPX.js +3 -0
- package/dist/bin/shell/chunks/sleep-QHAPNY3Q.js +3 -0
- package/dist/bin/shell/chunks/sort-4C6WOKNK.js +3 -0
- package/dist/bin/shell/chunks/split-TV7NL7LA.js +3 -0
- package/dist/bin/shell/chunks/sqlite3-W777NCI4.js +3 -0
- package/dist/bin/shell/chunks/stat-BD6KT3BP.js +3 -0
- package/dist/bin/shell/chunks/strings-MDD72LR6.js +3 -0
- package/dist/bin/shell/chunks/tac-C2N4NQ6S.js +3 -0
- package/dist/bin/shell/chunks/tail-BCB5W6JC.js +3 -0
- package/dist/bin/shell/chunks/tar-DOO744MK.js +3 -0
- package/dist/bin/shell/chunks/tee-UQHPO4OW.js +3 -0
- package/dist/bin/shell/chunks/time-ZPY52VT2.js +3 -0
- package/dist/bin/shell/chunks/timeout-5AX3ZS3X.js +3 -0
- package/dist/bin/shell/chunks/touch-DFGSVIX7.js +3 -0
- package/dist/bin/shell/chunks/tr-G7K6M6HP.js +3 -0
- package/dist/bin/shell/chunks/tree-6D7SMPUR.js +3 -0
- package/dist/bin/shell/chunks/true-SKL4L7JP.js +3 -0
- package/dist/bin/shell/chunks/unexpand-QIR4EDPG.js +3 -0
- package/dist/bin/shell/chunks/uniq-I7PVFJR4.js +3 -0
- package/dist/bin/shell/chunks/wc-6NGWULAP.js +3 -0
- package/dist/bin/shell/chunks/which-LCXKCLFC.js +3 -0
- package/dist/bin/shell/chunks/whoami-TZDZDU7T.js +3 -0
- package/dist/bin/shell/chunks/xan-KX4VPXUN.js +3 -0
- package/dist/bin/shell/chunks/xan-view-JXOZLJ7S.js +3 -0
- package/dist/bin/shell/chunks/xargs-UWHPYLY7.js +3 -0
- package/dist/bin/shell/chunks/yq-GCDCJBKB.js +3 -0
- package/dist/bin/shell/shell.js +275 -274
- package/dist/browser.d.ts +1 -0
- package/dist/bundle/browser.js +676 -674
- package/dist/bundle/chunks/alias-RTYYYW3D.js +2 -0
- package/dist/bundle/chunks/awk2-LA3USKJP.js +2 -0
- package/dist/bundle/chunks/base64-C2AIWVNC.js +2 -0
- package/dist/bundle/chunks/basename-UB3CIYNI.js +2 -0
- package/dist/bundle/chunks/bash-YZ33HQZQ.js +2 -0
- package/dist/bundle/chunks/cat-TSFMZVYS.js +2 -0
- package/dist/bundle/chunks/chmod-TFEPA42X.js +2 -0
- package/dist/bundle/chunks/chunk-27JIFWUR.js +3 -0
- package/dist/bundle/chunks/chunk-2JIPICV3.js +13 -0
- package/dist/bundle/chunks/chunk-2SMD2AUA.js +3 -0
- package/dist/bundle/chunks/chunk-2VDTE5BV.js +14 -0
- package/dist/bundle/chunks/chunk-2VJJEDV2.js +8 -0
- package/dist/bundle/chunks/chunk-46RN27KI.js +100 -0
- package/dist/bundle/chunks/chunk-4I3HOE5Z.js +21 -0
- package/dist/bundle/chunks/chunk-4JLVZKHC.js +8 -0
- package/dist/bundle/chunks/chunk-4MZPEZTU.js +3 -0
- package/dist/bundle/chunks/chunk-4N6J7B5P.js +6 -0
- package/dist/bundle/chunks/chunk-4RUAZWKT.js +33 -0
- package/dist/bundle/chunks/chunk-4WKZNNJK.js +2 -0
- package/dist/bundle/chunks/chunk-5H5SCKJM.js +11 -0
- package/dist/bundle/chunks/chunk-6LASZU3O.js +5 -0
- package/dist/bundle/chunks/chunk-6SHYIICL.js +4 -0
- package/dist/bundle/chunks/chunk-6VAT5Z2D.js +5 -0
- package/dist/bundle/chunks/chunk-7AISL3XV.js +12 -0
- package/dist/bundle/chunks/chunk-7EUWTCWK.js +2 -0
- package/dist/bundle/chunks/chunk-7JHM3L42.js +6 -0
- package/dist/bundle/chunks/chunk-A4R2GWRF.js +9 -0
- package/dist/bundle/chunks/chunk-ACSZB4FE.js +11 -0
- package/dist/bundle/chunks/chunk-AQ6FYS2X.js +2 -0
- package/dist/bundle/chunks/chunk-BVKWRAS6.js +12 -0
- package/dist/bundle/chunks/chunk-BZUGFHVS.js +2 -0
- package/dist/bundle/chunks/chunk-CBJVD2XA.js +7 -0
- package/dist/bundle/chunks/chunk-CHFEPBH4.js +18 -0
- package/dist/bundle/chunks/chunk-CN5XGDNN.js +6 -0
- package/dist/bundle/chunks/chunk-DLL7UR66.js +2 -0
- package/dist/bundle/chunks/chunk-EBAPSGAO.js +9 -0
- package/dist/bundle/chunks/chunk-FAXLQUCQ.js +10 -0
- package/dist/bundle/chunks/chunk-FHC24QSK.js +7 -0
- package/dist/bundle/chunks/chunk-FJK43EBQ.js +14 -0
- package/dist/bundle/chunks/chunk-FOCWZZDE.js +2 -0
- package/dist/bundle/chunks/chunk-FW54FHZR.js +2 -0
- package/dist/bundle/chunks/chunk-FX4RBUYU.js +5 -0
- package/dist/bundle/chunks/chunk-FX7KQCEA.js +33 -0
- package/dist/bundle/chunks/chunk-FZRQOL3C.js +7 -0
- package/dist/bundle/chunks/chunk-G5EVRAOO.js +74 -0
- package/dist/bundle/chunks/chunk-GGC5NEPZ.js +8 -0
- package/dist/bundle/chunks/chunk-GIUR5SNU.js +15 -0
- package/dist/bundle/chunks/chunk-GJC3WVOW.js +2 -0
- package/dist/bundle/chunks/chunk-GSPYNYZA.js +6 -0
- package/dist/bundle/chunks/chunk-GTQIUQM6.js +5 -0
- package/dist/bundle/chunks/chunk-HBVMHTO5.js +2 -0
- package/dist/bundle/chunks/chunk-HDRAUQK2.js +2 -0
- package/dist/bundle/chunks/chunk-HJBTD7PY.js +21 -0
- package/dist/bundle/chunks/chunk-ICIEVHY5.js +36 -0
- package/dist/bundle/chunks/chunk-KATRCGLX.js +2 -0
- package/dist/bundle/chunks/chunk-KD3KENL6.js +11 -0
- package/dist/bundle/chunks/chunk-KWGBQNTV.js +32 -0
- package/dist/bundle/chunks/chunk-L2UW7DWF.js +2 -0
- package/dist/bundle/chunks/chunk-L64BMZUV.js +2 -0
- package/dist/bundle/chunks/chunk-LEKBROJD.js +6 -0
- package/dist/bundle/chunks/chunk-LNBPBRV4.js +21 -0
- package/dist/bundle/chunks/chunk-LPJEKUCB.js +8 -0
- package/dist/bundle/chunks/chunk-LSLPJOYM.js +3 -0
- package/dist/bundle/chunks/chunk-MFDPAVC6.js +14 -0
- package/dist/bundle/chunks/chunk-MLIO3BK2.js +7 -0
- package/dist/bundle/chunks/chunk-MQKGGNPS.js +16 -0
- package/dist/bundle/chunks/chunk-MZFCCXPZ.js +63 -0
- package/dist/bundle/chunks/chunk-N6DXJ2JN.js +287 -0
- package/dist/bundle/chunks/chunk-NRSASXYY.js +2 -0
- package/dist/bundle/chunks/chunk-OC35HPHG.js +2 -0
- package/dist/bundle/chunks/chunk-OGJ5CFPR.js +9 -0
- package/dist/bundle/chunks/chunk-OVGANXCG.js +8 -0
- package/dist/bundle/chunks/chunk-Q7H5W7YE.js +140 -0
- package/dist/bundle/chunks/chunk-QAYAQNCG.js +23 -0
- package/dist/bundle/chunks/chunk-QIQMJJZ4.js +4 -0
- package/dist/bundle/chunks/chunk-R4IFXNY5.js +28 -0
- package/dist/bundle/chunks/chunk-R74UQCKX.js +5 -0
- package/dist/bundle/chunks/chunk-S3LEJEPP.js +2 -0
- package/dist/bundle/chunks/chunk-S443BAN4.js +7 -0
- package/dist/bundle/chunks/chunk-SAI2SPQQ.js +8 -0
- package/dist/bundle/chunks/chunk-SBBYKIYU.js +3 -0
- package/dist/bundle/chunks/chunk-SETW5JBN.js +9 -0
- package/dist/bundle/chunks/chunk-SHKOQWO4.js +3 -0
- package/dist/bundle/chunks/chunk-SJYEXC2Z.js +14 -0
- package/dist/bundle/chunks/chunk-SO6R3ZKN.js +16 -0
- package/dist/bundle/chunks/chunk-STHBFACM.js +1 -0
- package/dist/bundle/chunks/chunk-SX2HC7SO.js +2 -0
- package/dist/bundle/chunks/chunk-T4TFLF3R.js +16 -0
- package/dist/bundle/chunks/chunk-TDD4NFYE.js +2 -0
- package/dist/bundle/chunks/chunk-TN7HHBQW.js +5 -0
- package/dist/bundle/chunks/chunk-U73A73IE.js +17 -0
- package/dist/bundle/chunks/chunk-UIJUTQPH.js +3 -0
- package/dist/bundle/chunks/chunk-UP6MSJGD.js +17 -0
- package/dist/bundle/chunks/chunk-VLCHOJWK.js +6 -0
- package/dist/bundle/chunks/chunk-VPADYNBD.js +10 -0
- package/dist/bundle/chunks/chunk-W5DWRFSU.js +2 -0
- package/dist/bundle/chunks/chunk-WM5IJFMP.js +8 -0
- package/dist/bundle/chunks/chunk-WNH3HOQA.js +2 -0
- package/dist/bundle/chunks/chunk-WPGQVBSY.js +6 -0
- package/dist/bundle/chunks/chunk-WVRWIZF5.js +23 -0
- package/dist/bundle/chunks/chunk-XCQWV4AU.js +12 -0
- package/dist/bundle/chunks/chunk-XDGLKIHR.js +9 -0
- package/dist/bundle/chunks/chunk-XHLMAZX2.js +5 -0
- package/dist/bundle/chunks/chunk-XRFHFXFP.js +2 -0
- package/dist/bundle/chunks/chunk-XUIHBHL5.js +5 -0
- package/dist/bundle/chunks/chunk-XYXUMFSU.js +14 -0
- package/dist/bundle/chunks/chunk-Y4LIDHSD.js +7 -0
- package/dist/bundle/chunks/chunk-YCLFEX4T.js +3 -0
- package/dist/bundle/chunks/chunk-YS4NUBYX.js +9 -0
- package/dist/bundle/chunks/chunk-ZDIT6ST5.js +7 -0
- package/dist/bundle/chunks/chunk-ZDPFA4L3.js +6 -0
- package/dist/bundle/chunks/chunk-ZZKH2ELC.js +11 -0
- package/dist/bundle/chunks/clear-HKGFEOF6.js +2 -0
- package/dist/bundle/chunks/column-XT6UFXNQ.js +2 -0
- package/dist/bundle/chunks/comm-VV2LDX2J.js +2 -0
- package/dist/bundle/chunks/cp-BISAAS7A.js +2 -0
- package/dist/bundle/chunks/curl-LV5Y3AMS.js +26 -0
- package/dist/bundle/chunks/cut-OKARJCCV.js +2 -0
- package/dist/bundle/chunks/date-UUUPW43J.js +2 -0
- package/dist/bundle/chunks/diff-MWJFIG7X.js +2 -0
- package/dist/bundle/chunks/dirname-MPHRFUTI.js +2 -0
- package/dist/bundle/chunks/du-572XNP42.js +2 -0
- package/dist/bundle/chunks/echo-NDWZZHPO.js +2 -0
- package/dist/bundle/chunks/env-36M5BO7M.js +2 -0
- package/dist/bundle/chunks/expand-JSPG6VOP.js +2 -0
- package/dist/bundle/chunks/expansion-R25BK4W3.js +2 -0
- package/dist/bundle/chunks/expr-5JAACS4X.js +2 -0
- package/dist/bundle/chunks/file-IPZJC3FQ.js +2 -0
- package/dist/bundle/chunks/find-INTH3OLC.js +2 -0
- package/dist/bundle/chunks/flag-coverage-XWSYNE72.js +2 -0
- package/dist/bundle/chunks/fold-4TQNYMSW.js +2 -0
- package/dist/bundle/chunks/grep-V3LQVMRQ.js +2 -0
- package/dist/bundle/chunks/gzip-O5ASJAFY.js +2 -0
- package/dist/bundle/chunks/head-442HYESI.js +2 -0
- package/dist/bundle/chunks/help-HZ6M2CKN.js +2 -0
- package/dist/bundle/chunks/history-WYYKSLSZ.js +2 -0
- package/dist/bundle/chunks/hostname-C4HQXXUP.js +2 -0
- package/dist/bundle/chunks/html-to-markdown-JW4MSQZO.js +2 -0
- package/dist/bundle/chunks/join-TBRGI3LQ.js +2 -0
- package/dist/bundle/chunks/jq-4XLYLOS5.js +2 -0
- package/dist/bundle/chunks/js-exec-N5KEZBH7.js +97 -0
- package/dist/bundle/chunks/js-exec-worker.js +27 -185
- package/dist/bundle/chunks/ln-4LGSXXGD.js +2 -0
- package/dist/bundle/chunks/ls-ZJGQER7M.js +2 -0
- package/dist/bundle/chunks/md5sum-SPU24VSG.js +2 -0
- package/dist/bundle/chunks/mkdir-MEPGZOB6.js +2 -0
- package/dist/bundle/chunks/mv-W5BIQ646.js +2 -0
- package/dist/bundle/chunks/nl-WSDW7I4O.js +2 -0
- package/dist/bundle/chunks/od-WOKFDJTP.js +2 -0
- package/dist/bundle/chunks/paste-7JC6S4DX.js +2 -0
- package/dist/bundle/chunks/printf-TWGXF445.js +2 -0
- package/dist/bundle/chunks/pwd-WE6EN5AV.js +2 -0
- package/dist/bundle/chunks/python3-POMOR4OA.js +12 -0
- package/dist/bundle/chunks/readlink-OPJF4DL5.js +2 -0
- package/dist/bundle/chunks/rev-5EHFX4EJ.js +2 -0
- package/dist/bundle/chunks/rg-S4FXYXWB.js +2 -0
- package/dist/bundle/chunks/rm-SSGETQVQ.js +2 -0
- package/dist/bundle/chunks/rmdir-OC4ZLPYA.js +2 -0
- package/dist/bundle/chunks/sed-S5UIK574.js +2 -0
- package/dist/bundle/chunks/seq-M5EC7Q57.js +2 -0
- package/dist/bundle/chunks/sha1sum-2PTOAFR6.js +2 -0
- package/dist/bundle/chunks/sha256sum-NS7D3IXX.js +2 -0
- package/dist/bundle/chunks/sleep-X22JJINO.js +2 -0
- package/dist/bundle/chunks/sort-SW2YEO5B.js +2 -0
- package/dist/bundle/chunks/split-4KKZZXXE.js +2 -0
- package/dist/bundle/chunks/sqlite3-CGOEFJAO.js +2 -0
- package/dist/bundle/chunks/sqlite3-worker.js +1728 -0
- package/dist/bundle/chunks/stat-CD34IZ4P.js +2 -0
- package/dist/bundle/chunks/strings-6WDHLGMX.js +2 -0
- package/dist/bundle/chunks/tac-2STMMJYW.js +2 -0
- package/dist/bundle/chunks/tail-R4PCA2C4.js +2 -0
- package/dist/bundle/chunks/tar-STHHZTZ6.js +2 -0
- package/dist/bundle/chunks/tee-YUZ2FKCJ.js +2 -0
- package/dist/bundle/chunks/time-D4LNBSWX.js +2 -0
- package/dist/bundle/chunks/timeout-YDCRSLPQ.js +2 -0
- package/dist/bundle/chunks/touch-UA33VN3N.js +2 -0
- package/dist/bundle/chunks/tr-36LHWFRQ.js +2 -0
- package/dist/bundle/chunks/tree-YLD52CNT.js +2 -0
- package/dist/bundle/chunks/true-FHQXJXBE.js +2 -0
- package/dist/bundle/chunks/unexpand-CADSA4VO.js +2 -0
- package/dist/bundle/chunks/uniq-XSIZR6PB.js +2 -0
- package/dist/bundle/chunks/wc-LF7NU4LA.js +2 -0
- package/dist/bundle/chunks/which-XEM24D5D.js +2 -0
- package/dist/bundle/chunks/whoami-XMTX52VE.js +2 -0
- package/dist/bundle/chunks/worker.js +28 -9
- package/dist/bundle/chunks/xan-Y6WF3IRG.js +2 -0
- package/dist/bundle/chunks/xan-view-HDVKHFC2.js +2 -0
- package/dist/bundle/chunks/xargs-MGZPH7AX.js +2 -0
- package/dist/bundle/chunks/yq-4QJW3EQG.js +2 -0
- package/dist/bundle/index.cjs +984 -985
- package/dist/bundle/index.js +272 -271
- package/dist/commands/js-exec/js-exec-worker.d.ts +32 -0
- package/dist/commands/js-exec/js-exec.d.ts +1 -19
- package/dist/commands/search-engine/matcher.d.ts +6 -0
- package/dist/commands/search-engine/regex.d.ts +13 -0
- package/dist/commands/sqlite3/sqlite3.d.ts +1 -0
- package/dist/commands/sqlite3/worker.js +1728 -0
- package/dist/commands/tar/bzip2-compress.d.ts +17 -0
- package/dist/commands/worker-bridge/sync-backend.d.ts +2 -1
- package/dist/encoding.d.ts +115 -0
- package/dist/fs/in-memory-fs/in-memory-fs.d.ts +2 -0
- package/dist/fs/interface.d.ts +23 -1
- package/dist/fs/mountable-fs/mountable-fs.d.ts +2 -0
- package/dist/fs/overlay-fs/overlay-fs.d.ts +2 -0
- package/dist/fs/read-write-fs/read-write-fs.d.ts +2 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/interpreter/interpreter.d.ts +2 -7
- package/dist/interpreter/types.d.ts +3 -8
- package/dist/network/dns-pin.d.ts +43 -0
- package/dist/network/types.d.ts +2 -1
- package/dist/types.d.ts +48 -21
- package/dist/utils/file-reader.d.ts +12 -5
- package/package.json +36 -40
- package/vendor/cpython-emscripten/python.wasm +0 -0
- package/dist/bin/chunks/alias-3GODYSFD.js +0 -2
- package/dist/bin/chunks/awk2-VTJMI54B.js +0 -2
- package/dist/bin/chunks/base64-43M2R3GA.js +0 -2
- package/dist/bin/chunks/basename-KBUKWB2E.js +0 -2
- package/dist/bin/chunks/bash-6ZHZ6BX7.js +0 -2
- package/dist/bin/chunks/cat-XZIJZXKP.js +0 -2
- package/dist/bin/chunks/chmod-N5CQATDW.js +0 -2
- package/dist/bin/chunks/chunk-26NO42TF.js +0 -14
- package/dist/bin/chunks/chunk-3MBAUIBB.js +0 -7
- package/dist/bin/chunks/chunk-3Y32LPNT.js +0 -2
- package/dist/bin/chunks/chunk-4OALHZXB.js +0 -2
- package/dist/bin/chunks/chunk-4PRVMER6.js +0 -2
- package/dist/bin/chunks/chunk-4VDEBYW7.js +0 -2
- package/dist/bin/chunks/chunk-54G6AE72.js +0 -32
- package/dist/bin/chunks/chunk-5G2VOPPJ.js +0 -7
- package/dist/bin/chunks/chunk-5WFYIUU2.js +0 -3
- package/dist/bin/chunks/chunk-6KZRLMG3.js +0 -8
- package/dist/bin/chunks/chunk-7ADG3DNO.js +0 -8
- package/dist/bin/chunks/chunk-7BORMNPQ.js +0 -2
- package/dist/bin/chunks/chunk-7G3MC56B.js +0 -7
- package/dist/bin/chunks/chunk-A3HQTYHR.js +0 -74
- package/dist/bin/chunks/chunk-AAW7UMPO.js +0 -9
- package/dist/bin/chunks/chunk-AXWFPG37.js +0 -10
- package/dist/bin/chunks/chunk-AZ3RUDR2.js +0 -9
- package/dist/bin/chunks/chunk-B3RU2PUI.js +0 -140
- package/dist/bin/chunks/chunk-BYDV4VEF.js +0 -3
- package/dist/bin/chunks/chunk-CGE2EHYP.js +0 -5
- package/dist/bin/chunks/chunk-CM4532DS.js +0 -36
- package/dist/bin/chunks/chunk-CQG2HEAL.js +0 -5
- package/dist/bin/chunks/chunk-D5WP4CKS.js +0 -3
- package/dist/bin/chunks/chunk-DOXYBGNA.js +0 -12
- package/dist/bin/chunks/chunk-EJQKHROT.js +0 -14
- package/dist/bin/chunks/chunk-EPPBDXOG.js +0 -8
- package/dist/bin/chunks/chunk-EUXCM6C4.js +0 -12
- package/dist/bin/chunks/chunk-F3LGZXLQ.js +0 -9
- package/dist/bin/chunks/chunk-FA2CHD73.js +0 -16
- package/dist/bin/chunks/chunk-FLPVVSN5.js +0 -5
- package/dist/bin/chunks/chunk-FSZWFMB4.js +0 -16
- package/dist/bin/chunks/chunk-G43H2WGH.js +0 -17
- package/dist/bin/chunks/chunk-GO6FXSC4.js +0 -6
- package/dist/bin/chunks/chunk-GOJZHH3L.js +0 -6
- package/dist/bin/chunks/chunk-GTNBSMZR.js +0 -23
- package/dist/bin/chunks/chunk-GZHFXDDO.js +0 -10
- package/dist/bin/chunks/chunk-HJEHIH4P.js +0 -33
- package/dist/bin/chunks/chunk-IDGH4PGU.js +0 -3
- package/dist/bin/chunks/chunk-ITA43A73.js +0 -7
- package/dist/bin/chunks/chunk-JBABAK44.js +0 -4
- package/dist/bin/chunks/chunk-JLX6YWGA.js +0 -3
- package/dist/bin/chunks/chunk-JQBC3FXE.js +0 -8
- package/dist/bin/chunks/chunk-JTF74J6E.js +0 -2
- package/dist/bin/chunks/chunk-KGOUQS5A.js +0 -2
- package/dist/bin/chunks/chunk-L2JBII6Z.js +0 -287
- package/dist/bin/chunks/chunk-LGJM5YFT.js +0 -17
- package/dist/bin/chunks/chunk-LIYVQA3X.js +0 -2
- package/dist/bin/chunks/chunk-LJKIWB5F.js +0 -4
- package/dist/bin/chunks/chunk-LMK6G2HH.js +0 -8
- package/dist/bin/chunks/chunk-LOJMXC4F.js +0 -5
- package/dist/bin/chunks/chunk-MAVV76T4.js +0 -2
- package/dist/bin/chunks/chunk-MNMRGJJM.js +0 -11
- package/dist/bin/chunks/chunk-MO4RPBN2.js +0 -2
- package/dist/bin/chunks/chunk-MRP4ZCD7.js +0 -6
- package/dist/bin/chunks/chunk-MXVNCVD6.js +0 -30
- package/dist/bin/chunks/chunk-MY5PY2PL.js +0 -2
- package/dist/bin/chunks/chunk-N43DJTSI.js +0 -2
- package/dist/bin/chunks/chunk-N5OTVT4F.js +0 -23
- package/dist/bin/chunks/chunk-NAX7MTAR.js +0 -21
- package/dist/bin/chunks/chunk-ND23BJUM.js +0 -15
- package/dist/bin/chunks/chunk-NLBRLRWD.js +0 -5
- package/dist/bin/chunks/chunk-NSUMEERA.js +0 -12
- package/dist/bin/chunks/chunk-OBH7XN5N.js +0 -1
- package/dist/bin/chunks/chunk-OBI37ZY4.js +0 -9
- package/dist/bin/chunks/chunk-OOJCYVYF.js +0 -2
- package/dist/bin/chunks/chunk-ORUYSLP4.js +0 -16
- package/dist/bin/chunks/chunk-P6GNZPVW.js +0 -19
- package/dist/bin/chunks/chunk-PPBQJBC2.js +0 -5
- package/dist/bin/chunks/chunk-PQNTKMH3.js +0 -6
- package/dist/bin/chunks/chunk-PS4LOXE5.js +0 -8
- package/dist/bin/chunks/chunk-QSDVMMYI.js +0 -21
- package/dist/bin/chunks/chunk-RJSAGJQJ.js +0 -11
- package/dist/bin/chunks/chunk-RLNOQILG.js +0 -2
- package/dist/bin/chunks/chunk-RMQC3GS7.js +0 -100
- package/dist/bin/chunks/chunk-ROJPSS6N.js +0 -3
- package/dist/bin/chunks/chunk-RT7TRQVZ.js +0 -3
- package/dist/bin/chunks/chunk-S7OHMN3F.js +0 -6
- package/dist/bin/chunks/chunk-SDLWFYVT.js +0 -21
- package/dist/bin/chunks/chunk-SE4C7FJY.js +0 -33
- package/dist/bin/chunks/chunk-SGA7Y45Z.js +0 -17
- package/dist/bin/chunks/chunk-SXB55JOI.js +0 -2
- package/dist/bin/chunks/chunk-SXRVLCZ4.js +0 -2
- package/dist/bin/chunks/chunk-TEFXEYX3.js +0 -3
- package/dist/bin/chunks/chunk-THALLNXT.js +0 -7
- package/dist/bin/chunks/chunk-THNL3XFF.js +0 -11
- package/dist/bin/chunks/chunk-V7ZOPVQS.js +0 -2
- package/dist/bin/chunks/chunk-VHUYNUT7.js +0 -13
- package/dist/bin/chunks/chunk-VNER2XXL.js +0 -7
- package/dist/bin/chunks/chunk-WS6P4H4S.js +0 -63
- package/dist/bin/chunks/chunk-WWZVR5NN.js +0 -6
- package/dist/bin/chunks/chunk-WXMBDX4P.js +0 -14
- package/dist/bin/chunks/chunk-XKPFI566.js +0 -84
- package/dist/bin/chunks/chunk-XY5HGZW5.js +0 -8
- package/dist/bin/chunks/chunk-YEKSVVRC.js +0 -11
- package/dist/bin/chunks/chunk-YFPDB4PH.js +0 -9
- package/dist/bin/chunks/chunk-YLE2OYY6.js +0 -2
- package/dist/bin/chunks/chunk-YMMJLYIX.js +0 -2
- package/dist/bin/chunks/chunk-YTIURC67.js +0 -2
- package/dist/bin/chunks/chunk-YU6OGPZR.js +0 -5
- package/dist/bin/chunks/chunk-YWZOGBFE.js +0 -9
- package/dist/bin/chunks/chunk-ZA4HUKJ3.js +0 -13
- package/dist/bin/chunks/chunk-ZKC5HQYO.js +0 -14
- package/dist/bin/chunks/chunk-ZO5PSLKR.js +0 -6
- package/dist/bin/chunks/chunk-ZSVBYEY4.js +0 -6
- package/dist/bin/chunks/clear-KRGKPFOI.js +0 -2
- package/dist/bin/chunks/column-XGV32UPN.js +0 -2
- package/dist/bin/chunks/comm-R3F3Z5DX.js +0 -2
- package/dist/bin/chunks/cp-XH2ZB7WT.js +0 -2
- package/dist/bin/chunks/curl-SRTMGOVV.js +0 -26
- package/dist/bin/chunks/cut-5EY2XPXX.js +0 -2
- package/dist/bin/chunks/date-WUPBL2TL.js +0 -2
- package/dist/bin/chunks/diff-LE7GMFZD.js +0 -2
- package/dist/bin/chunks/dirname-5FAOMLBL.js +0 -2
- package/dist/bin/chunks/du-LDAPXSGF.js +0 -2
- package/dist/bin/chunks/echo-2MUAOGUE.js +0 -2
- package/dist/bin/chunks/env-NTPN5QYM.js +0 -2
- package/dist/bin/chunks/expand-26XPP5KB.js +0 -2
- package/dist/bin/chunks/expansion-2RO5M3QC.js +0 -2
- package/dist/bin/chunks/expr-4CJYC4LY.js +0 -2
- package/dist/bin/chunks/file-D5YKS5NV.js +0 -2
- package/dist/bin/chunks/find-GAYRV4IF.js +0 -2
- package/dist/bin/chunks/flag-coverage-LBMWMYOO.js +0 -2
- package/dist/bin/chunks/fold-XSVNTAWH.js +0 -2
- package/dist/bin/chunks/grep-OZJTRD4D.js +0 -2
- package/dist/bin/chunks/gzip-LHOO65AN.js +0 -2
- package/dist/bin/chunks/head-YMNRW3F3.js +0 -2
- package/dist/bin/chunks/help-DVG4AAGE.js +0 -2
- package/dist/bin/chunks/history-UUKG55YW.js +0 -2
- package/dist/bin/chunks/hostname-WY6RKE32.js +0 -2
- package/dist/bin/chunks/html-to-markdown-WVZA3MCP.js +0 -2
- package/dist/bin/chunks/join-Y4Q5WVVE.js +0 -2
- package/dist/bin/chunks/jq-FIV5Q5T4.js +0 -2
- package/dist/bin/chunks/js-exec-RGKNWHHL.js +0 -100
- package/dist/bin/chunks/ln-EGC4HRXZ.js +0 -2
- package/dist/bin/chunks/ls-G2PXHSNX.js +0 -2
- package/dist/bin/chunks/md5sum-NCLXV2S3.js +0 -2
- package/dist/bin/chunks/mkdir-Z47OISSR.js +0 -2
- package/dist/bin/chunks/mv-OY7X62QC.js +0 -2
- package/dist/bin/chunks/nl-XH3L75DR.js +0 -2
- package/dist/bin/chunks/od-52FBC34W.js +0 -2
- package/dist/bin/chunks/paste-3UVLMQ2K.js +0 -2
- package/dist/bin/chunks/printf-P3QVL4IO.js +0 -2
- package/dist/bin/chunks/pwd-6VBAPL3Y.js +0 -2
- package/dist/bin/chunks/python3-QOJU2POC.js +0 -12
- package/dist/bin/chunks/readlink-BD5VFOC5.js +0 -2
- package/dist/bin/chunks/rev-UHEPS2UL.js +0 -2
- package/dist/bin/chunks/rg-C6KMBFNG.js +0 -2
- package/dist/bin/chunks/rm-L3NZOLLG.js +0 -2
- package/dist/bin/chunks/rmdir-5KLM4EA6.js +0 -2
- package/dist/bin/chunks/sed-HALRQZKY.js +0 -2
- package/dist/bin/chunks/seq-V7KBLSQ7.js +0 -2
- package/dist/bin/chunks/sha1sum-BHNJ5ALF.js +0 -2
- package/dist/bin/chunks/sha256sum-HJJ3NJ5L.js +0 -2
- package/dist/bin/chunks/sleep-ND6FZRZ4.js +0 -2
- package/dist/bin/chunks/sort-7GENYU2I.js +0 -2
- package/dist/bin/chunks/split-YWV64TJH.js +0 -2
- package/dist/bin/chunks/sqlite3-CVNFMP3Z.js +0 -2
- package/dist/bin/chunks/stat-XS2LXYS2.js +0 -2
- package/dist/bin/chunks/strings-XXKZCWY5.js +0 -2
- package/dist/bin/chunks/tac-T42SKDDI.js +0 -2
- package/dist/bin/chunks/tail-V537TDFR.js +0 -2
- package/dist/bin/chunks/tar-TOWX2TDU.js +0 -2
- package/dist/bin/chunks/tee-HK2SYCAR.js +0 -2
- package/dist/bin/chunks/time-5R4QWCYF.js +0 -2
- package/dist/bin/chunks/timeout-Z24MNWOP.js +0 -2
- package/dist/bin/chunks/touch-DWKSZGOQ.js +0 -2
- package/dist/bin/chunks/tr-4FPGAEVB.js +0 -2
- package/dist/bin/chunks/tree-HEKABARE.js +0 -2
- package/dist/bin/chunks/true-DP5UZP52.js +0 -2
- package/dist/bin/chunks/unexpand-OYZ7KOYR.js +0 -2
- package/dist/bin/chunks/uniq-TMSAIZM3.js +0 -2
- package/dist/bin/chunks/wc-ZIV3TFVG.js +0 -2
- package/dist/bin/chunks/which-5PO4LAOG.js +0 -2
- package/dist/bin/chunks/whoami-E7PN2UWC.js +0 -2
- package/dist/bin/chunks/xan-MOZFJGMY.js +0 -2
- package/dist/bin/chunks/xan-view-5SZBYPLG.js +0 -2
- package/dist/bin/chunks/xargs-SCYIFXOW.js +0 -2
- package/dist/bin/chunks/yq-Q47JUWL6.js +0 -2
- package/dist/bin/shell/chunks/alias-3GODYSFD.js +0 -2
- package/dist/bin/shell/chunks/awk2-VTJMI54B.js +0 -2
- package/dist/bin/shell/chunks/base64-43M2R3GA.js +0 -2
- package/dist/bin/shell/chunks/basename-KBUKWB2E.js +0 -2
- package/dist/bin/shell/chunks/bash-6ZHZ6BX7.js +0 -2
- package/dist/bin/shell/chunks/cat-XZIJZXKP.js +0 -2
- package/dist/bin/shell/chunks/chmod-N5CQATDW.js +0 -2
- package/dist/bin/shell/chunks/chunk-26NO42TF.js +0 -14
- package/dist/bin/shell/chunks/chunk-3MBAUIBB.js +0 -7
- package/dist/bin/shell/chunks/chunk-3Y32LPNT.js +0 -2
- package/dist/bin/shell/chunks/chunk-4OALHZXB.js +0 -2
- package/dist/bin/shell/chunks/chunk-4PRVMER6.js +0 -2
- package/dist/bin/shell/chunks/chunk-4VDEBYW7.js +0 -2
- package/dist/bin/shell/chunks/chunk-54G6AE72.js +0 -32
- package/dist/bin/shell/chunks/chunk-5G2VOPPJ.js +0 -7
- package/dist/bin/shell/chunks/chunk-5WFYIUU2.js +0 -3
- package/dist/bin/shell/chunks/chunk-6KZRLMG3.js +0 -8
- package/dist/bin/shell/chunks/chunk-7ADG3DNO.js +0 -8
- package/dist/bin/shell/chunks/chunk-7BORMNPQ.js +0 -2
- package/dist/bin/shell/chunks/chunk-7G3MC56B.js +0 -7
- package/dist/bin/shell/chunks/chunk-A3HQTYHR.js +0 -74
- package/dist/bin/shell/chunks/chunk-AAW7UMPO.js +0 -9
- package/dist/bin/shell/chunks/chunk-AXWFPG37.js +0 -10
- package/dist/bin/shell/chunks/chunk-AZ3RUDR2.js +0 -9
- package/dist/bin/shell/chunks/chunk-B3RU2PUI.js +0 -140
- package/dist/bin/shell/chunks/chunk-BYDV4VEF.js +0 -3
- package/dist/bin/shell/chunks/chunk-CGE2EHYP.js +0 -5
- package/dist/bin/shell/chunks/chunk-CM4532DS.js +0 -36
- package/dist/bin/shell/chunks/chunk-CQG2HEAL.js +0 -5
- package/dist/bin/shell/chunks/chunk-D5WP4CKS.js +0 -3
- package/dist/bin/shell/chunks/chunk-D64U2VGQ.js +0 -2
- package/dist/bin/shell/chunks/chunk-DOXYBGNA.js +0 -12
- package/dist/bin/shell/chunks/chunk-EJQKHROT.js +0 -14
- package/dist/bin/shell/chunks/chunk-EPPBDXOG.js +0 -8
- package/dist/bin/shell/chunks/chunk-EUXCM6C4.js +0 -12
- package/dist/bin/shell/chunks/chunk-F3LGZXLQ.js +0 -9
- package/dist/bin/shell/chunks/chunk-FA2CHD73.js +0 -16
- package/dist/bin/shell/chunks/chunk-FLPVVSN5.js +0 -5
- package/dist/bin/shell/chunks/chunk-FSZWFMB4.js +0 -16
- package/dist/bin/shell/chunks/chunk-G43H2WGH.js +0 -17
- package/dist/bin/shell/chunks/chunk-GO6FXSC4.js +0 -6
- package/dist/bin/shell/chunks/chunk-GOJZHH3L.js +0 -6
- package/dist/bin/shell/chunks/chunk-GTNBSMZR.js +0 -23
- package/dist/bin/shell/chunks/chunk-GZHFXDDO.js +0 -10
- package/dist/bin/shell/chunks/chunk-HJEHIH4P.js +0 -33
- package/dist/bin/shell/chunks/chunk-IDGH4PGU.js +0 -3
- package/dist/bin/shell/chunks/chunk-ITA43A73.js +0 -7
- package/dist/bin/shell/chunks/chunk-JBABAK44.js +0 -4
- package/dist/bin/shell/chunks/chunk-JLX6YWGA.js +0 -3
- package/dist/bin/shell/chunks/chunk-JQBC3FXE.js +0 -8
- package/dist/bin/shell/chunks/chunk-JTF74J6E.js +0 -2
- package/dist/bin/shell/chunks/chunk-KGOUQS5A.js +0 -2
- package/dist/bin/shell/chunks/chunk-L2JBII6Z.js +0 -287
- package/dist/bin/shell/chunks/chunk-LGJM5YFT.js +0 -17
- package/dist/bin/shell/chunks/chunk-LIYVQA3X.js +0 -2
- package/dist/bin/shell/chunks/chunk-LJKIWB5F.js +0 -4
- package/dist/bin/shell/chunks/chunk-LMK6G2HH.js +0 -8
- package/dist/bin/shell/chunks/chunk-LOJMXC4F.js +0 -5
- package/dist/bin/shell/chunks/chunk-MAVV76T4.js +0 -2
- package/dist/bin/shell/chunks/chunk-MNMRGJJM.js +0 -11
- package/dist/bin/shell/chunks/chunk-MO4RPBN2.js +0 -2
- package/dist/bin/shell/chunks/chunk-MRP4ZCD7.js +0 -6
- package/dist/bin/shell/chunks/chunk-MXVNCVD6.js +0 -30
- package/dist/bin/shell/chunks/chunk-N43DJTSI.js +0 -2
- package/dist/bin/shell/chunks/chunk-N5OTVT4F.js +0 -23
- package/dist/bin/shell/chunks/chunk-NAX7MTAR.js +0 -21
- package/dist/bin/shell/chunks/chunk-ND23BJUM.js +0 -15
- package/dist/bin/shell/chunks/chunk-NLBRLRWD.js +0 -5
- package/dist/bin/shell/chunks/chunk-NSUMEERA.js +0 -12
- package/dist/bin/shell/chunks/chunk-OBH7XN5N.js +0 -1
- package/dist/bin/shell/chunks/chunk-OBI37ZY4.js +0 -9
- package/dist/bin/shell/chunks/chunk-OOJCYVYF.js +0 -2
- package/dist/bin/shell/chunks/chunk-ORUYSLP4.js +0 -16
- package/dist/bin/shell/chunks/chunk-P6GNZPVW.js +0 -19
- package/dist/bin/shell/chunks/chunk-PPBQJBC2.js +0 -5
- package/dist/bin/shell/chunks/chunk-PQNTKMH3.js +0 -6
- package/dist/bin/shell/chunks/chunk-PS4LOXE5.js +0 -8
- package/dist/bin/shell/chunks/chunk-QSDVMMYI.js +0 -21
- package/dist/bin/shell/chunks/chunk-RJSAGJQJ.js +0 -11
- package/dist/bin/shell/chunks/chunk-RLNOQILG.js +0 -2
- package/dist/bin/shell/chunks/chunk-RMQC3GS7.js +0 -100
- package/dist/bin/shell/chunks/chunk-ROJPSS6N.js +0 -3
- package/dist/bin/shell/chunks/chunk-RT7TRQVZ.js +0 -3
- package/dist/bin/shell/chunks/chunk-S7OHMN3F.js +0 -6
- package/dist/bin/shell/chunks/chunk-SDLWFYVT.js +0 -21
- package/dist/bin/shell/chunks/chunk-SE4C7FJY.js +0 -33
- package/dist/bin/shell/chunks/chunk-SGA7Y45Z.js +0 -17
- package/dist/bin/shell/chunks/chunk-SXB55JOI.js +0 -2
- package/dist/bin/shell/chunks/chunk-SXRVLCZ4.js +0 -2
- package/dist/bin/shell/chunks/chunk-TEFXEYX3.js +0 -3
- package/dist/bin/shell/chunks/chunk-THALLNXT.js +0 -7
- package/dist/bin/shell/chunks/chunk-THNL3XFF.js +0 -11
- package/dist/bin/shell/chunks/chunk-V7ZOPVQS.js +0 -2
- package/dist/bin/shell/chunks/chunk-VHUYNUT7.js +0 -13
- package/dist/bin/shell/chunks/chunk-VNER2XXL.js +0 -7
- package/dist/bin/shell/chunks/chunk-WS6P4H4S.js +0 -63
- package/dist/bin/shell/chunks/chunk-WWZVR5NN.js +0 -6
- package/dist/bin/shell/chunks/chunk-WXMBDX4P.js +0 -14
- package/dist/bin/shell/chunks/chunk-XKPFI566.js +0 -84
- package/dist/bin/shell/chunks/chunk-XY5HGZW5.js +0 -8
- package/dist/bin/shell/chunks/chunk-YEKSVVRC.js +0 -11
- package/dist/bin/shell/chunks/chunk-YFPDB4PH.js +0 -9
- package/dist/bin/shell/chunks/chunk-YLE2OYY6.js +0 -2
- package/dist/bin/shell/chunks/chunk-YMMJLYIX.js +0 -2
- package/dist/bin/shell/chunks/chunk-YTIURC67.js +0 -2
- package/dist/bin/shell/chunks/chunk-YU6OGPZR.js +0 -5
- package/dist/bin/shell/chunks/chunk-YWZOGBFE.js +0 -9
- package/dist/bin/shell/chunks/chunk-ZA4HUKJ3.js +0 -13
- package/dist/bin/shell/chunks/chunk-ZKC5HQYO.js +0 -14
- package/dist/bin/shell/chunks/chunk-ZO5PSLKR.js +0 -6
- package/dist/bin/shell/chunks/chunk-ZSVBYEY4.js +0 -6
- package/dist/bin/shell/chunks/clear-KRGKPFOI.js +0 -2
- package/dist/bin/shell/chunks/column-XGV32UPN.js +0 -2
- package/dist/bin/shell/chunks/comm-R3F3Z5DX.js +0 -2
- package/dist/bin/shell/chunks/cp-XH2ZB7WT.js +0 -2
- package/dist/bin/shell/chunks/curl-SRTMGOVV.js +0 -26
- package/dist/bin/shell/chunks/cut-5EY2XPXX.js +0 -2
- package/dist/bin/shell/chunks/date-WUPBL2TL.js +0 -2
- package/dist/bin/shell/chunks/diff-LE7GMFZD.js +0 -2
- package/dist/bin/shell/chunks/dirname-5FAOMLBL.js +0 -2
- package/dist/bin/shell/chunks/du-LDAPXSGF.js +0 -2
- package/dist/bin/shell/chunks/echo-2MUAOGUE.js +0 -2
- package/dist/bin/shell/chunks/env-NTPN5QYM.js +0 -2
- package/dist/bin/shell/chunks/expand-26XPP5KB.js +0 -2
- package/dist/bin/shell/chunks/expansion-2RO5M3QC.js +0 -2
- package/dist/bin/shell/chunks/expr-4CJYC4LY.js +0 -2
- package/dist/bin/shell/chunks/file-D5YKS5NV.js +0 -2
- package/dist/bin/shell/chunks/find-GAYRV4IF.js +0 -2
- package/dist/bin/shell/chunks/flag-coverage-LBMWMYOO.js +0 -2
- package/dist/bin/shell/chunks/fold-XSVNTAWH.js +0 -2
- package/dist/bin/shell/chunks/grep-OZJTRD4D.js +0 -2
- package/dist/bin/shell/chunks/gzip-LHOO65AN.js +0 -2
- package/dist/bin/shell/chunks/head-YMNRW3F3.js +0 -2
- package/dist/bin/shell/chunks/help-DVG4AAGE.js +0 -2
- package/dist/bin/shell/chunks/history-UUKG55YW.js +0 -2
- package/dist/bin/shell/chunks/hostname-WY6RKE32.js +0 -2
- package/dist/bin/shell/chunks/html-to-markdown-WVZA3MCP.js +0 -2
- package/dist/bin/shell/chunks/join-Y4Q5WVVE.js +0 -2
- package/dist/bin/shell/chunks/jq-FIV5Q5T4.js +0 -2
- package/dist/bin/shell/chunks/js-exec-DUGJM6RL.js +0 -100
- package/dist/bin/shell/chunks/ln-EGC4HRXZ.js +0 -2
- package/dist/bin/shell/chunks/ls-G2PXHSNX.js +0 -2
- package/dist/bin/shell/chunks/md5sum-NCLXV2S3.js +0 -2
- package/dist/bin/shell/chunks/mkdir-Z47OISSR.js +0 -2
- package/dist/bin/shell/chunks/mv-OY7X62QC.js +0 -2
- package/dist/bin/shell/chunks/nl-XH3L75DR.js +0 -2
- package/dist/bin/shell/chunks/od-52FBC34W.js +0 -2
- package/dist/bin/shell/chunks/paste-3UVLMQ2K.js +0 -2
- package/dist/bin/shell/chunks/printf-P3QVL4IO.js +0 -2
- package/dist/bin/shell/chunks/pwd-6VBAPL3Y.js +0 -2
- package/dist/bin/shell/chunks/python3-O4VTP6TD.js +0 -12
- package/dist/bin/shell/chunks/readlink-BD5VFOC5.js +0 -2
- package/dist/bin/shell/chunks/rev-UHEPS2UL.js +0 -2
- package/dist/bin/shell/chunks/rg-C6KMBFNG.js +0 -2
- package/dist/bin/shell/chunks/rm-L3NZOLLG.js +0 -2
- package/dist/bin/shell/chunks/rmdir-5KLM4EA6.js +0 -2
- package/dist/bin/shell/chunks/sed-HALRQZKY.js +0 -2
- package/dist/bin/shell/chunks/seq-V7KBLSQ7.js +0 -2
- package/dist/bin/shell/chunks/sha1sum-BHNJ5ALF.js +0 -2
- package/dist/bin/shell/chunks/sha256sum-HJJ3NJ5L.js +0 -2
- package/dist/bin/shell/chunks/sleep-ND6FZRZ4.js +0 -2
- package/dist/bin/shell/chunks/sort-7GENYU2I.js +0 -2
- package/dist/bin/shell/chunks/split-YWV64TJH.js +0 -2
- package/dist/bin/shell/chunks/sqlite3-CVNFMP3Z.js +0 -2
- package/dist/bin/shell/chunks/stat-XS2LXYS2.js +0 -2
- package/dist/bin/shell/chunks/strings-XXKZCWY5.js +0 -2
- package/dist/bin/shell/chunks/tac-T42SKDDI.js +0 -2
- package/dist/bin/shell/chunks/tail-V537TDFR.js +0 -2
- package/dist/bin/shell/chunks/tar-TOWX2TDU.js +0 -2
- package/dist/bin/shell/chunks/tee-HK2SYCAR.js +0 -2
- package/dist/bin/shell/chunks/time-5R4QWCYF.js +0 -2
- package/dist/bin/shell/chunks/timeout-Z24MNWOP.js +0 -2
- package/dist/bin/shell/chunks/touch-DWKSZGOQ.js +0 -2
- package/dist/bin/shell/chunks/tr-4FPGAEVB.js +0 -2
- package/dist/bin/shell/chunks/tree-HEKABARE.js +0 -2
- package/dist/bin/shell/chunks/true-DP5UZP52.js +0 -2
- package/dist/bin/shell/chunks/unexpand-OYZ7KOYR.js +0 -2
- package/dist/bin/shell/chunks/uniq-TMSAIZM3.js +0 -2
- package/dist/bin/shell/chunks/wc-ZIV3TFVG.js +0 -2
- package/dist/bin/shell/chunks/which-5PO4LAOG.js +0 -2
- package/dist/bin/shell/chunks/whoami-E7PN2UWC.js +0 -2
- package/dist/bin/shell/chunks/xan-MOZFJGMY.js +0 -2
- package/dist/bin/shell/chunks/xan-view-5SZBYPLG.js +0 -2
- package/dist/bin/shell/chunks/xargs-SCYIFXOW.js +0 -2
- package/dist/bin/shell/chunks/yq-Q47JUWL6.js +0 -2
- package/dist/bundle/chunks/alias-JE7RI5QX.js +0 -1
- package/dist/bundle/chunks/awk2-POPGKRAI.js +0 -1
- package/dist/bundle/chunks/base64-4YMZCVJ5.js +0 -1
- package/dist/bundle/chunks/basename-AA2KJYZQ.js +0 -1
- package/dist/bundle/chunks/bash-IJWYRKFO.js +0 -1
- package/dist/bundle/chunks/cat-RDUMLXKC.js +0 -1
- package/dist/bundle/chunks/chmod-SYMGL4JA.js +0 -1
- package/dist/bundle/chunks/chunk-24IMIIXA.js +0 -1
- package/dist/bundle/chunks/chunk-3THT3N7L.js +0 -1
- package/dist/bundle/chunks/chunk-3ZUFRYJ4.js +0 -1
- package/dist/bundle/chunks/chunk-44UOCSGV.js +0 -1
- package/dist/bundle/chunks/chunk-4GTNDTRF.js +0 -7
- package/dist/bundle/chunks/chunk-4HHKTUW3.js +0 -2
- package/dist/bundle/chunks/chunk-4Q4SM6WR.js +0 -4
- package/dist/bundle/chunks/chunk-55VFSPNA.js +0 -2
- package/dist/bundle/chunks/chunk-5QMZ5MUS.js +0 -4
- package/dist/bundle/chunks/chunk-5QVNJEHU.js +0 -8
- package/dist/bundle/chunks/chunk-5V6VZH6T.js +0 -1
- package/dist/bundle/chunks/chunk-62RKD26F.js +0 -20
- package/dist/bundle/chunks/chunk-64BAICW3.js +0 -1
- package/dist/bundle/chunks/chunk-74CEPOFO.js +0 -22
- package/dist/bundle/chunks/chunk-7L36YK2X.js +0 -2
- package/dist/bundle/chunks/chunk-7TSDKFEO.js +0 -1
- package/dist/bundle/chunks/chunk-A4HU7SVR.js +0 -2
- package/dist/bundle/chunks/chunk-A4JSPFCI.js +0 -6
- package/dist/bundle/chunks/chunk-A5O5YHGN.js +0 -1
- package/dist/bundle/chunks/chunk-A65PWWJC.js +0 -2
- package/dist/bundle/chunks/chunk-A7A2DBEE.js +0 -6
- package/dist/bundle/chunks/chunk-A7ICOL4V.js +0 -13
- package/dist/bundle/chunks/chunk-ALLTKNUZ.js +0 -5
- package/dist/bundle/chunks/chunk-APT7OOP2.js +0 -1
- package/dist/bundle/chunks/chunk-B6O2PIY4.js +0 -10
- package/dist/bundle/chunks/chunk-BBXLRYSX.js +0 -5
- package/dist/bundle/chunks/chunk-CR5AFCPT.js +0 -22
- package/dist/bundle/chunks/chunk-CWQS3NFK.js +0 -1
- package/dist/bundle/chunks/chunk-D4J545R4.js +0 -11
- package/dist/bundle/chunks/chunk-D6CWQ5DW.js +0 -5
- package/dist/bundle/chunks/chunk-D7MEQ3VN.js +0 -4
- package/dist/bundle/chunks/chunk-DCAAORBQ.js +0 -1
- package/dist/bundle/chunks/chunk-DXB73IDG.js +0 -1
- package/dist/bundle/chunks/chunk-EEXR5ZDP.js +0 -2
- package/dist/bundle/chunks/chunk-EIZGF4BS.js +0 -8
- package/dist/bundle/chunks/chunk-F23WWYKW.js +0 -16
- package/dist/bundle/chunks/chunk-F55TLFGB.js +0 -9
- package/dist/bundle/chunks/chunk-FEIOJCZD.js +0 -73
- package/dist/bundle/chunks/chunk-GCTKCWKD.js +0 -3
- package/dist/bundle/chunks/chunk-GFQRA5P5.js +0 -7
- package/dist/bundle/chunks/chunk-GOV5EKKI.js +0 -9
- package/dist/bundle/chunks/chunk-GXVXFKBA.js +0 -5
- package/dist/bundle/chunks/chunk-HDQ56CKY.js +0 -15
- package/dist/bundle/chunks/chunk-HJQJAYMS.js +0 -2
- package/dist/bundle/chunks/chunk-HJWBQKYG.js +0 -5
- package/dist/bundle/chunks/chunk-HWBSOZZR.js +0 -35
- package/dist/bundle/chunks/chunk-HWKDQ44K.js +0 -3
- package/dist/bundle/chunks/chunk-IPJHKYVM.js +0 -1
- package/dist/bundle/chunks/chunk-J642UCRS.js +0 -1
- package/dist/bundle/chunks/chunk-JVPRLUMK.js +0 -7
- package/dist/bundle/chunks/chunk-KMEYNNUA.js +0 -15
- package/dist/bundle/chunks/chunk-LL3S3NLB.js +0 -1
- package/dist/bundle/chunks/chunk-LPQPILI2.js +0 -10
- package/dist/bundle/chunks/chunk-LTZRCH7N.js +0 -31
- package/dist/bundle/chunks/chunk-LWEGUNWT.js +0 -7
- package/dist/bundle/chunks/chunk-MDDMCKUK.js +0 -6
- package/dist/bundle/chunks/chunk-MDLLFABN.js +0 -4
- package/dist/bundle/chunks/chunk-MHTUABJP.js +0 -8
- package/dist/bundle/chunks/chunk-MIZPJHVH.js +0 -7
- package/dist/bundle/chunks/chunk-MLXIYONF.js +0 -15
- package/dist/bundle/chunks/chunk-MYE6AGBJ.js +0 -16
- package/dist/bundle/chunks/chunk-NAERJDUW.js +0 -8
- package/dist/bundle/chunks/chunk-NCNPKYJZ.js +0 -2
- package/dist/bundle/chunks/chunk-NUFRM6SI.js +0 -0
- package/dist/bundle/chunks/chunk-NUYSJFDK.js +0 -7
- package/dist/bundle/chunks/chunk-NYQYO467.js +0 -32
- package/dist/bundle/chunks/chunk-OARHFVLG.js +0 -20
- package/dist/bundle/chunks/chunk-OCLXQMOG.js +0 -6
- package/dist/bundle/chunks/chunk-OCS6LSEM.js +0 -13
- package/dist/bundle/chunks/chunk-OJDRYQWQ.js +0 -1
- package/dist/bundle/chunks/chunk-OL3S66CO.js +0 -99
- package/dist/bundle/chunks/chunk-PBXLG62G.js +0 -8
- package/dist/bundle/chunks/chunk-PP6PSHAB.js +0 -4
- package/dist/bundle/chunks/chunk-PYSFUGCK.js +0 -10
- package/dist/bundle/chunks/chunk-QCDB2VPH.js +0 -6
- package/dist/bundle/chunks/chunk-QJ7O6ZN3.js +0 -5
- package/dist/bundle/chunks/chunk-R6QSAL5T.js +0 -1
- package/dist/bundle/chunks/chunk-RPNGRAAP.js +0 -7
- package/dist/bundle/chunks/chunk-SDNKECQQ.js +0 -5
- package/dist/bundle/chunks/chunk-SYMJJMQ4.js +0 -20
- package/dist/bundle/chunks/chunk-T56QNPHK.js +0 -14
- package/dist/bundle/chunks/chunk-TLSUDHID.js +0 -6
- package/dist/bundle/chunks/chunk-TOMNU26N.js +0 -4
- package/dist/bundle/chunks/chunk-TXBZCHCQ.js +0 -5
- package/dist/bundle/chunks/chunk-UNYNJIFU.js +0 -139
- package/dist/bundle/chunks/chunk-V7TAPXDL.js +0 -27
- package/dist/bundle/chunks/chunk-VJFXDYWH.js +0 -10
- package/dist/bundle/chunks/chunk-VLGZJRPG.js +0 -16
- package/dist/bundle/chunks/chunk-VOBGTVA6.js +0 -6
- package/dist/bundle/chunks/chunk-VYOJP4TV.js +0 -13
- package/dist/bundle/chunks/chunk-WKFATFPP.js +0 -4
- package/dist/bundle/chunks/chunk-X2AJGDEF.js +0 -1
- package/dist/bundle/chunks/chunk-XHM67O4N.js +0 -1
- package/dist/bundle/chunks/chunk-XKQRETAK.js +0 -1
- package/dist/bundle/chunks/chunk-XORM457F.js +0 -286
- package/dist/bundle/chunks/chunk-XVDPCNWR.js +0 -11
- package/dist/bundle/chunks/chunk-YCFVLTST.js +0 -12
- package/dist/bundle/chunks/chunk-YFG2CMIF.js +0 -4
- package/dist/bundle/chunks/chunk-YNYSPYQ5.js +0 -32
- package/dist/bundle/chunks/chunk-YS3AZT3J.js +0 -8
- package/dist/bundle/chunks/chunk-YTNYSM6T.js +0 -11
- package/dist/bundle/chunks/chunk-Z6LRHWXI.js +0 -13
- package/dist/bundle/chunks/chunk-Z7JVV2SM.js +0 -12
- package/dist/bundle/chunks/chunk-ZXL7TQLN.js +0 -62
- package/dist/bundle/chunks/clear-5CZ5X4YR.js +0 -1
- package/dist/bundle/chunks/column-WLPMMSTS.js +0 -1
- package/dist/bundle/chunks/comm-5SLSESQG.js +0 -1
- package/dist/bundle/chunks/cp-XOYR4ABJ.js +0 -1
- package/dist/bundle/chunks/curl-COE4TZE6.js +0 -25
- package/dist/bundle/chunks/cut-OPC3VAGB.js +0 -1
- package/dist/bundle/chunks/date-DD7FVA2V.js +0 -1
- package/dist/bundle/chunks/diff-HJF2MPDN.js +0 -1
- package/dist/bundle/chunks/dirname-LEMTZZFS.js +0 -1
- package/dist/bundle/chunks/du-WO2ENHXQ.js +0 -1
- package/dist/bundle/chunks/echo-O45JWWI2.js +0 -1
- package/dist/bundle/chunks/env-5EPCWSXR.js +0 -1
- package/dist/bundle/chunks/expand-DTNXU4LQ.js +0 -1
- package/dist/bundle/chunks/expansion-ENLSRCXJ.js +0 -1
- package/dist/bundle/chunks/expr-5T3UU5KE.js +0 -1
- package/dist/bundle/chunks/file-ZIGAJ4YS.js +0 -1
- package/dist/bundle/chunks/find-TPUOAIUQ.js +0 -1
- package/dist/bundle/chunks/flag-coverage-LMTH7T5F.js +0 -1
- package/dist/bundle/chunks/fold-LDSORVYE.js +0 -1
- package/dist/bundle/chunks/grep-3AIAIJVR.js +0 -1
- package/dist/bundle/chunks/gzip-AQXSGOVS.js +0 -1
- package/dist/bundle/chunks/head-HT2B6D2J.js +0 -1
- package/dist/bundle/chunks/help-VVWX7SA5.js +0 -1
- package/dist/bundle/chunks/history-J4QRNGRO.js +0 -1
- package/dist/bundle/chunks/hostname-BK6HG2DE.js +0 -1
- package/dist/bundle/chunks/html-to-markdown-TFCECAGV.js +0 -1
- package/dist/bundle/chunks/join-GG2LDHE5.js +0 -1
- package/dist/bundle/chunks/jq-ODXZBPLY.js +0 -1
- package/dist/bundle/chunks/js-exec-LSIPMWTQ.js +0 -99
- package/dist/bundle/chunks/ln-4TRFBYAT.js +0 -1
- package/dist/bundle/chunks/ls-KSXFZCWH.js +0 -1
- package/dist/bundle/chunks/md5sum-INMIK4DX.js +0 -1
- package/dist/bundle/chunks/mkdir-TDEMSB6C.js +0 -1
- package/dist/bundle/chunks/mv-Z6MORUFL.js +0 -1
- package/dist/bundle/chunks/nl-U5YJDM32.js +0 -1
- package/dist/bundle/chunks/od-VJEF2UR5.js +0 -1
- package/dist/bundle/chunks/paste-7N6AFSDS.js +0 -1
- package/dist/bundle/chunks/printf-CX64KX2P.js +0 -1
- package/dist/bundle/chunks/pwd-D4OZ7N27.js +0 -1
- package/dist/bundle/chunks/python3-5F2XPEW4.js +0 -11
- package/dist/bundle/chunks/readlink-MI4GCHJF.js +0 -1
- package/dist/bundle/chunks/rev-XOSYPP45.js +0 -1
- package/dist/bundle/chunks/rg-FOQSCCX3.js +0 -1
- package/dist/bundle/chunks/rm-RTZG23RL.js +0 -1
- package/dist/bundle/chunks/rmdir-XTQXT7RK.js +0 -1
- package/dist/bundle/chunks/sed-VFTTATXJ.js +0 -1
- package/dist/bundle/chunks/seq-RN5ZUASB.js +0 -1
- package/dist/bundle/chunks/sha1sum-VJPNLNU6.js +0 -1
- package/dist/bundle/chunks/sha256sum-PI32XWXY.js +0 -1
- package/dist/bundle/chunks/sleep-VZFPZFWA.js +0 -1
- package/dist/bundle/chunks/sort-DCNRDA7U.js +0 -1
- package/dist/bundle/chunks/split-SITCSYCZ.js +0 -1
- package/dist/bundle/chunks/sqlite3-56UMWEY3.js +0 -1
- package/dist/bundle/chunks/stat-BT5A227F.js +0 -1
- package/dist/bundle/chunks/strings-7PLOGTPD.js +0 -1
- package/dist/bundle/chunks/tac-SJGXQ4T2.js +0 -1
- package/dist/bundle/chunks/tail-S5ULNTJU.js +0 -1
- package/dist/bundle/chunks/tar-232RCEFK.js +0 -1
- package/dist/bundle/chunks/tee-O7VXZDCO.js +0 -1
- package/dist/bundle/chunks/time-DEUO3QV2.js +0 -1
- package/dist/bundle/chunks/timeout-VRKMCG72.js +0 -1
- package/dist/bundle/chunks/touch-DX2IJOQ4.js +0 -1
- package/dist/bundle/chunks/tr-2HXZRDSW.js +0 -1
- package/dist/bundle/chunks/tree-LYXBS7DC.js +0 -1
- package/dist/bundle/chunks/true-WHJNXCHG.js +0 -1
- package/dist/bundle/chunks/unexpand-RGTMIGZM.js +0 -1
- package/dist/bundle/chunks/uniq-SUNANL47.js +0 -1
- package/dist/bundle/chunks/wc-TQB3VNOX.js +0 -1
- package/dist/bundle/chunks/which-XZHEH76L.js +0 -1
- package/dist/bundle/chunks/whoami-DGKU3D2X.js +0 -1
- package/dist/bundle/chunks/xan-BXDXYEIB.js +0 -1
- package/dist/bundle/chunks/xan-view-ECQUO7AJ.js +0 -1
- package/dist/bundle/chunks/xargs-I6EZUCYF.js +0 -1
- package/dist/bundle/chunks/yq-MJMAR36V.js +0 -1
- package/dist/commands/js-exec/executor-adapter.d.ts +0 -66
- package/dist/commands/js-exec/worker.d.ts +0 -38
- package/dist/executor-init.d.ts +0 -19
- package/vendor/executor/executor-sdk-bundle.d.mts +0 -18
- package/vendor/executor/executor-sdk-bundle.mjs +0 -512
- package/vendor/executor/openapi-extractor-wasm/openapi_extractor_bg.wasm +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
+
import{a as r}from"./chunk-3MRB66F4.js";var c=new Map([["File operations",["ls","cat","head","tail","wc","touch","mkdir","rm","cp","mv","ln","chmod","stat","readlink"]],["Text processing",["grep","sed","awk","sort","uniq","cut","tr","tee","diff"]],["Search",["find"]],["Navigation & paths",["pwd","basename","dirname","tree","du"]],["Environment & shell",["echo","printf","env","printenv","export","alias","unalias","history","clear","true","false","bash","sh"]],["Data processing",["xargs","jq","base64","date"]],["Network",["curl","html-to-markdown"]]]);function d(n){let e=[],s=new Set(n);e.push(`Available commands:
|
|
4
|
+
`);let t=[];for(let[a,l]of c){let o=l.filter(i=>s.has(i));if(o.length>0){e.push(` ${a}:`),e.push(` ${o.join(", ")}
|
|
5
|
+
`);for(let i of o)s.delete(i)}}for(let a of s)t.push(a);return t.length>0&&(e.push(" Other:"),e.push(` ${t.sort().join(", ")}
|
|
6
|
+
`)),e.push("Use '<command> --help' for details on a specific command."),`${e.join(`
|
|
7
|
+
`)}
|
|
8
|
+
`}var h={name:"help",async execute(n,e){if(n.includes("--help")||n.includes("-h"))return{stdout:`help - display available commands
|
|
9
|
+
|
|
10
|
+
Usage: help [command]
|
|
11
|
+
|
|
12
|
+
Options:
|
|
13
|
+
-h, --help Show this help message
|
|
14
|
+
|
|
15
|
+
If a command name is provided, shows help for that command.
|
|
16
|
+
Otherwise, lists all available commands.
|
|
17
|
+
`,stderr:"",exitCode:0};if(n.length>0&&e.exec){let t=n[0];return e.exec(r([t]),{cwd:e.cwd,signal:e.signal,args:["--help"]})}let s=e.getRegisteredCommands?.()??[];return{stdout:d(s),stderr:"",exitCode:0}}},p={name:"help",flags:[]};export{h as a,p as b};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
+
import{a as q,b as w}from"./chunk-KRRM5UCC.js";import{c as b}from"./chunk-LNNWMRCB.js";import{b as E}from"./chunk-HL4ZS7TX.js";import{a as x}from"./chunk-VZK4FHWJ.js";import{a as T,b as g}from"./chunk-PBOVSFTJ.js";import{a as C,b as M}from"./chunk-MUFNRCMY.js";import{randomBytes as Y}from"node:crypto";import{existsSync as G}from"node:fs";import{dirname as K,join as $,sep as O}from"node:path";import{fileURLToPath as Z}from"node:url";import{Worker as v}from"node:worker_threads";import ee from"sql.js";function B(e,t,r){switch(r.mode){case"list":return N(e,t,r);case"csv":return R(e,t,r);case"json":return W(e,t);case"line":return F(e,t,r);case"column":return Q(e,t,r);case"table":return U(e,t,r);case"markdown":return H(e,t,r);case"tabs":return J(e,t,r);case"box":return _(e,t,r);case"quote":return z(e,t,r);case"html":return D(e,t,r);case"ascii":return X(e,t,r)}}function f(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function N(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let a of t)n.push(a.map(o=>f(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function R(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(L).join(","));for(let a of t)n.push(a.map(o=>L(f(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
|
|
4
|
+
`)}
|
|
5
|
+
`:""}function L(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
|
|
6
|
+
`)?`"${e.replace(/"/g,'""')}"`:e}function A(e){return e.toPrecision(17).replace(/\.?0+$/,"")}function P(e){return e===null?"null":typeof e=="number"?Number.isInteger(e)?String(e):A(e):JSON.stringify(e)}function W(e,t){return t.length===0?"":`[${t.map(n=>`{${e.map((o,i)=>`${JSON.stringify(o)}:${P(n[i])}`).join(",")}}`).join(`,
|
|
7
|
+
`)}]
|
|
8
|
+
`}function F(e,t,r){if(e.length===0||t.length===0)return"";let n=Math.max(5,...e.map(o=>o.length)),a=[];for(let o of t)for(let i=0;i<e.length;i++){let s=e[i].padStart(n);a.push(`${s} = ${f(o[i],r.nullValue)}`)}return`${a.join(`
|
|
9
|
+
`)}
|
|
10
|
+
`}function Q(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let i=0;i<o.length;i++){let s=f(o[i],r.nullValue).length;s>n[i]&&(n[i]=s)}let a=[];r.header&&(a.push(e.map((o,i)=>o.padEnd(n[i])).join(" ")),a.push(n.map(o=>"-".repeat(o)).join(" ")));for(let o of t)a.push(o.map((i,s)=>f(i,r.nullValue).padEnd(n[s])).join(" "));return a.length>0?`${a.join(`
|
|
11
|
+
`)}
|
|
12
|
+
`:""}function U(e,t,r){if(e.length===0)return"";let n=e.map(i=>i.length);for(let i of t)for(let s=0;s<i.length;s++){let m=f(i[s],r.nullValue).length;m>n[s]&&(n[s]=m)}let a=[],o=`+${n.map(i=>"-".repeat(i+2)).join("+")}+`;a.push(o),r.header&&(a.push(`| ${e.map((i,s)=>i.padEnd(n[s])).join(" | ")} |`),a.push(o));for(let i of t)a.push(`| ${i.map((s,m)=>f(s,r.nullValue).padEnd(n[m])).join(" | ")} |`);return a.push(o),`${a.join(`
|
|
13
|
+
`)}
|
|
14
|
+
`}function H(e,t,r){if(e.length===0)return"";let n=[];r.header&&(n.push(`| ${e.join(" | ")} |`),n.push(`|${e.map(()=>"---").join("|")}|`));for(let a of t)n.push(`| ${a.map(o=>f(o,r.nullValue)).join(" | ")} |`);return n.length>0?`${n.join(`
|
|
15
|
+
`)}
|
|
16
|
+
`:""}function J(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(" "));for(let a of t)n.push(a.map(o=>f(o,r.nullValue)).join(" "));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function _(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let i=0;i<o.length;i++){let s=f(o[i],r.nullValue).length;s>n[i]&&(n[i]=s)}let a=[];a.push(`\u250C${n.map(o=>"\u2500".repeat(o+2)).join("\u252C")}\u2510`),a.push(`\u2502 ${e.map((o,i)=>o.padEnd(n[i])).join(" \u2502 ")} \u2502`),a.push(`\u251C${n.map(o=>"\u2500".repeat(o+2)).join("\u253C")}\u2524`);for(let o of t)a.push(`\u2502 ${o.map((i,s)=>f(i,r.nullValue).padEnd(n[s])).join(" \u2502 ")} \u2502`);return a.push(`\u2514${n.map(o=>"\u2500".repeat(o+2)).join("\u2534")}\u2518`),`${a.join(`
|
|
17
|
+
`)}
|
|
18
|
+
`}function z(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(a=>`'${a}'`).join(","));for(let a of t)n.push(a.map(o=>o==null?"NULL":typeof o=="number"?Number.isInteger(o)?String(o):A(o):`'${String(o)}'`).join(","));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function D(e,t,r){let n=[];r.header&&e.length>0&&(n.push(`<TR>${e.map(a=>`<TH>${V(a)}</TH>`).join("")}`),n.push("</TR>"));for(let a of t)n.push(`<TR>${a.map(o=>`<TD>${V(f(o,r.nullValue))}</TD>`).join("")}`),n.push("</TR>");return n.length>0?`${n.join(`
|
|
19
|
+
`)}
|
|
20
|
+
`:""}function V(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function X(e,t,r){let o=[];r.header&&e.length>0&&o.push(e.join(""));for(let i of t)o.push(i.map(s=>f(s,r.nullValue)).join(""));return o.length>0?o.join("")+"":""}var re=5e3,te={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 ne(e){let t={mode:"list",header:!1,separator:"|",newline:`
|
|
21
|
+
`,nullValue:"",readonly:!1,bail:!1,echo:!1,cmd:null},r=null,n=null,a=!1,o=!1;for(let i=0;i<e.length;i++){let s=e[i];if(o){r===null?r=s:n===null&&(n=s);continue}if(s==="--")o=!0;else if(s==="-version")a=!0;else if(s==="-list")t.mode="list";else if(s==="-csv")t.mode="csv";else if(s==="-json")t.mode="json";else if(s==="-line")t.mode="line";else if(s==="-column")t.mode="column";else if(s==="-table")t.mode="table";else if(s==="-markdown")t.mode="markdown";else if(s==="-tabs")t.mode="tabs";else if(s==="-box")t.mode="box";else if(s==="-quote")t.mode="quote";else if(s==="-html")t.mode="html";else if(s==="-ascii")t.mode="ascii";else if(s==="-header")t.header=!0;else if(s==="-noheader")t.header=!1;else if(s==="-readonly")t.readonly=!0;else if(s==="-bail")t.bail=!0;else if(s==="-echo")t.echo=!0;else if(s==="-separator"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -separator
|
|
22
|
+
`,exitCode:1};t.separator=e[++i]}else if(s==="-newline"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -newline
|
|
23
|
+
`,exitCode:1};t.newline=e[++i]}else if(s==="-nullvalue"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -nullvalue
|
|
24
|
+
`,exitCode:1};t.nullValue=e[++i]}else if(s==="-cmd"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -cmd
|
|
25
|
+
`,exitCode:1};t.cmd=e[++i]}else{if(s.startsWith("-"))return{stdout:"",stderr:`sqlite3: Error: unknown option: ${s.startsWith("--")?s.slice(1):s}
|
|
26
|
+
Use -help for a list of options.
|
|
27
|
+
`,exitCode:1};r===null?r=s:n===null&&(n=s)}}return{options:t,database:r,sql:n,showVersion:a}}async function oe(){let e=await E.runTrustedAsync(()=>ee()),t=new e.Database;try{let r=t.exec("SELECT sqlite_version()");return r.length>0&&r[0].values.length>0?String(r[0].values[0][0]):"unknown"}finally{t.close()}}function I(e=K(Z(import.meta.url))){let t=[$(e,"sqlite3-worker.js"),$(e,"../../commands/sqlite3/worker.js")];(e.endsWith(`${O}commands${O}sqlite3`)||e.endsWith("/commands/sqlite3"))&&t.push($(e,"worker.js")),t.push($(e,"../../../dist/commands/sqlite3/worker.js"));for(let r of t)if(G(r))return r;throw new Error("sqlite3 worker not found. Run 'pnpm build' to compile the worker.")}var se={createWorker(e,t){return new v(e,{workerData:t})},findWorkerPath:I};function ie(){return Y(16).toString("hex")}function ae(e,t){if(!e||typeof e!="object")return{success:!1,error:"Malformed worker response"};let r=e;return typeof r.protocolToken!="string"||r.protocolToken!==t?{success:!1,error:"Malformed worker response: invalid protocol token"}: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 le(e,t,r){try{let n=I();return await new Promise((a,o)=>{let i=E.runTrusted(()=>se.createWorker(n,e)),s=b(r,"sqlite3","worker timeout callback",()=>{i.terminate(),a({success:!1,error:`Query timeout: execution exceeded ${t}ms limit`})}),c=q(()=>{try{s()}catch(u){let l=u instanceof Error?u.message:String(u);a({success:!1,error:g(l)})}},t),S=b(r,"sqlite3","worker message callback",u=>{w(c),a(ae(u,e.protocolToken))}),y=b(r,"sqlite3","worker error callback",u=>{w(c),o(u)}),k=b(r,"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:g(d)})}},j=u=>{try{y(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);o(new Error(g(d)))}},h=u=>{try{k(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);a({success:!1,error:g(d)})}};i.on("message",p),i.on("error",j),i.on("exit",h)})}catch(n){let a=g(n.message);throw new Error(`sqlite3 worker failed to load: ${a}`)}}var je={name:"sqlite3",async execute(e,t){if(M(e)||e.includes("-help"))return C(te);let r=ne(e);if("exitCode"in r)return r;let{options:n,database:a,sql:o,showVersion:i}=r;if(i)return{stdout:`${await oe()}
|
|
28
|
+
`,stderr:"",exitCode:0};if(!a)return{stdout:"",stderr:`sqlite3: missing database argument
|
|
29
|
+
`,exitCode:1};let s=o||x(t.stdin).trim();if(n.cmd&&(s=n.cmd+(s?`; ${s}`:"")),!s)return{stdout:"",stderr:`sqlite3: no SQL provided
|
|
30
|
+
`,exitCode:1};let m=a===":memory:",c="",S=null;try{m||(c=t.fs.resolvePath(t.cwd,a),await t.fs.exists(c)&&(S=await t.fs.readFileBuffer(c)))}catch(l){let d=T(l.message);return{stdout:"",stderr:`sqlite3: unable to open database "${a}": ${d}
|
|
31
|
+
`,exitCode:1}}let y=t.limits?.maxSqliteTimeoutMs??re,k={protocolToken:ie(),dbBuffer:S,sql:s,options:{bail:n.bail,echo:n.echo}},p;try{p=await le(k,y,t.requireDefenseContext)}catch(l){return{stdout:"",stderr:`sqlite3: worker error: ${g(l.message)}
|
|
32
|
+
`,exitCode:1}}if(!p.success)return{stdout:"",stderr:`sqlite3: ${g(p.error)}
|
|
33
|
+
`,exitCode:1};let j={mode:n.mode,header:n.header,separator:n.separator,newline:n.newline,nullValue:n.nullValue},h="";n.echo&&(h+=`${s}
|
|
34
|
+
`);let u=!1;for(let l of p.results)if(l.type==="error"){if(n.bail)return{stdout:h,stderr:`Error: ${l.error}
|
|
35
|
+
`,exitCode:1};h+=`Error: ${l.error}
|
|
36
|
+
`,u=!0}else l.columns&&l.rows&&(l.rows.length>0||n.header)&&(h+=B(l.columns,l.rows,j));if(p.hasModifications&&!n.readonly&&!m&&c&&p.dbBuffer)try{await t.fs.writeFile(c,p.dbBuffer)}catch(l){let d=T(l.message);return{stdout:h,stderr:`sqlite3: failed to write database: ${d}
|
|
37
|
+
`,exitCode:1}}return{stdout:h,stderr:"",exitCode:u&&n.bail?1:0}}},Ee={name:"sqlite3",flags:[],needsArgs:!0};export{se as a,je as b,Ee as c};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
+
import{a as g}from"./chunk-VZK4FHWJ.js";import{a as b,b as m,c as v}from"./chunk-MUFNRCMY.js";var L={name:"unexpand",summary:"convert spaces to tabs",usage:"unexpand [OPTION]... [FILE]...",description:"Convert blanks in each FILE to TABs, writing to standard output. If no FILE is specified, standard input is read.",options:["-t N Use N spaces per tab (default: 8)","-t LIST Use comma-separated list of tab stops","-a Convert all sequences of blanks (not just leading)"],examples:["unexpand file.txt # Convert leading spaces to tabs","unexpand -a file.txt # Convert all space sequences","unexpand -t 4 file.txt # Use 4-space tabs"]};function f(s){let i=s.split(",").map(o=>o.trim()),e=[];for(let o of i){let n=parseInt(o,10);if(Number.isNaN(n)||n<1)return null;e.push(n)}for(let o=1;o<e.length;o++)if(e[o]<=e[o-1])return null;return e}function C(s,i){if(i.length===1){let e=i[0];return s+(e-s%e)}for(let e of i)if(e>s)return e;if(i.length>=2){let e=i[i.length-1]-i[i.length-2],o=i[i.length-1],n=Math.floor((s-o)/e)+1;return o+n*e}return-1}function N(s,i){let{tabStops:e,allBlanks:o}=i,n="",a=0,t="",l=0,u=!0,d=()=>{if(t.length===0)return;let r=l+t.length;if(!o&&!u){n+=t,t="";return}let p=l,c="";for(;p<r;){let h=C(p,e);if(h<=r&&h>p)c+=" ",p=h;else break}let x=r-p;x>0&&(c+=" ".repeat(x)),n+=c,t=""};for(let r of s)r===" "?(t.length===0&&(l=a),t+=r,a++):r===" "?(d(),n+=r,a=C(a,e)):(d(),n+=r,a++,u=!1);return d(),n}function k(s,i){if(s==="")return"";let e=s.split(`
|
|
4
|
+
`),o=s.endsWith(`
|
|
5
|
+
`)&&e[e.length-1]==="";return o&&e.pop(),e.map(a=>N(a,i)).join(`
|
|
6
|
+
`)+(o?`
|
|
7
|
+
`:"")}var I={name:"unexpand",execute:async(s,i)=>{if(m(s))return b(L);let e={tabStops:[8],allBlanks:!1},o=[],n=0;for(;n<s.length;){let t=s[n];if(t==="-t"&&n+1<s.length){let l=f(s[n+1]);if(!l)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${s[n+1]}'
|
|
8
|
+
`};e.tabStops=l,n+=2}else if(t.startsWith("-t")&&t.length>2){let l=f(t.slice(2));if(!l)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${t.slice(2)}'
|
|
9
|
+
`};e.tabStops=l,n++}else if(t==="--tabs"&&n+1<s.length){let l=f(s[n+1]);if(!l)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${s[n+1]}'
|
|
10
|
+
`};e.tabStops=l,n+=2}else if(t.startsWith("--tabs=")){let l=f(t.slice(7));if(!l)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${t.slice(7)}'
|
|
11
|
+
`};e.tabStops=l,n++}else if(t==="-a"||t==="--all")e.allBlanks=!0,n++;else if(t==="--"){o.push(...s.slice(n+1));break}else{if(t.startsWith("-")&&t!=="-")return v("unexpand",t);o.push(t),n++}}let a="";if(o.length===0){let t=g(i.stdin)??"";a=k(t,e)}else for(let t of o){let l=i.fs.resolvePath(i.cwd,t),u=await i.fs.readFile(l);if(u===null)return{exitCode:1,stdout:a,stderr:`unexpand: ${t}: No such file or directory
|
|
12
|
+
`};a+=k(u,e)}return{exitCode:0,stdout:a,stderr:""}}},T={name:"unexpand",flags:[{flag:"-t",type:"value",valueHint:"number"},{flag:"-a",type:"boolean"}],stdinType:"text",needsFiles:!0};export{I as a,T as b};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
+
import{a as s}from"./chunk-FKVQZWJQ.js";var a=s("sha1sum","sha1","compute SHA1 message digest"),m={name:"sha1sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0};export{a,m as b};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
+
import{a as U}from"./chunk-VZK4FHWJ.js";import{a as $,b as F,c as k}from"./chunk-MUFNRCMY.js";var L=new Map([["sha1","SHA-1"],["sha256","SHA-256"]]);function D(n){function h(r,u){return r<<u|r>>>32-u}let g=new Uint32Array([3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955,4249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,1272893353,4139469664,3200236656,681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690,4293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745]),A=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],b=n.length*8,c=(n.length%64<56?56:120)-n.length%64,s=new Uint8Array(n.length+c+8);s.set(n),s[n.length]=128;let d=new DataView(s.buffer);d.setUint32(s.length-8,b>>>0,!0),d.setUint32(s.length-4,Math.floor(b/4294967296),!0);let w=1732584193,l=4023233417,p=2562383102,e=271733878;for(let r=0;r<s.length;r+=64){let u=new Uint32Array(16);for(let t=0;t<16;t++)u[t]=d.getUint32(r+t*4,!0);let m=w,a=l,x=p,o=e;for(let t=0;t<64;t++){let i,y;t<16?(i=a&x|~a&o,y=t):t<32?(i=o&a|~o&x,y=(5*t+1)%16):t<48?(i=a^x^o,y=(3*t+5)%16):(i=x^(a|~o),y=7*t%16),i=i+m+g[t]+u[y]>>>0,m=o,o=x,x=a,a=a+h(i,A[t])>>>0}w=w+m>>>0,l=l+a>>>0,p=p+x>>>0,e=e+o>>>0}let f=new Uint8Array(16);return new DataView(f.buffer).setUint32(0,w,!0),new DataView(f.buffer).setUint32(4,l,!0),new DataView(f.buffer).setUint32(8,p,!0),new DataView(f.buffer).setUint32(12,e,!0),Array.from(f).map(r=>r.toString(16).padStart(2,"0")).join("")}async function C(n,h){if(n==="md5")return D(h);let g=L.get(n);if(!g)throw new Error(`Unknown algorithm: ${n}`);let A=await globalThis.crypto.subtle.digest(g,new Uint8Array(h).buffer);return Array.from(new Uint8Array(A)).map(b=>b.toString(16).padStart(2,"0")).join("")}function I(n,h,g){let A={name:n,summary:g,usage:`${n} [OPTION]... [FILE]...`,options:["-c, --check read checksums from FILEs and check them"," --help display this help and exit"]};return{name:n,async execute(b,c){if(F(b))return $(A);let s=!1,d=[];for(let e of b)if(e==="-c"||e==="--check")s=!0;else if(!(e==="-b"||e==="-t"||e==="--binary"||e==="--text")){if(e.startsWith("-")&&e!=="-")return k(n,e);d.push(e)}d.length===0&&d.push("-");let w=async e=>{if(e==="-")return Uint8Array.from(c.stdin,f=>f.charCodeAt(0));try{return await c.fs.readFileBuffer(c.fs.resolvePath(c.cwd,e))}catch{return null}};if(s){let e=0,f="";for(let r of d){let u=r==="-"?U(c.stdin):await c.fs.readFile(c.fs.resolvePath(c.cwd,r)).catch(()=>null);if(u===null)return{stdout:"",stderr:`${n}: ${r}: No such file or directory
|
|
4
|
+
`,exitCode:1};for(let m of u.split(`
|
|
5
|
+
`)){let a=m.match(/^([a-fA-F0-9]+)\s+[* ]?(.+)$/);if(!a)continue;let[,x,o]=a,t=await w(o);if(t===null){f+=`${o}: FAILED open or read
|
|
6
|
+
`,e++;continue}let i=await C(h,t)===x.toLowerCase();f+=`${o}: ${i?"OK":"FAILED"}
|
|
7
|
+
`,i||e++}}return e>0&&(f+=`${n}: WARNING: ${e} computed checksum${e>1?"s":""} did NOT match
|
|
8
|
+
`),{stdout:f,stderr:"",exitCode:e>0?1:0}}let l="",p=0;for(let e of d){let f=await w(e);if(f===null){l+=`${n}: ${e}: No such file or directory
|
|
9
|
+
`,p=1;continue}l+=`${await C(h,f)} ${e}
|
|
10
|
+
`}return{stdout:l,stderr:"",exitCode:p}}}}export{I as a};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
+
import{a as _,c as W}from"./chunk-JXLDT4KX.js";import{k as T}from"./chunk-47WZ2U6M.js";import{a as D}from"./chunk-I4IRHQDW.js";import{a as N,b as A}from"./chunk-MUFNRCMY.js";import{c as H,e as L}from"./chunk-LNVSXNT7.js";var z=H(C=>{(function(){"use strict";var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(c){return e(n(c),arguments)}function r(c,i){return a.apply(null,[c].concat(i||[]))}function e(c,i){var u=1,l=c.length,o,m="",p,d,f,h,y,S,k,x;for(p=0;p<l;p++)if(typeof c[p]=="string")m+=c[p];else if(typeof c[p]=="object"){if(f=c[p],f.keys)for(o=i[u],d=0;d<f.keys.length;d++){if(o==null)throw new Error(a('[sprintf] Cannot access property "%s" of undefined value "%s"',f.keys[d],f.keys[d-1]));o=o[f.keys[d]]}else f.param_no?o=i[f.param_no]:o=i[u++];if(t.not_type.test(f.type)&&t.not_primitive.test(f.type)&&o instanceof Function&&(o=o()),t.numeric_arg.test(f.type)&&typeof o!="number"&&isNaN(o))throw new TypeError(a("[sprintf] expecting number but found %T",o));switch(t.number.test(f.type)&&(k=o>=0),f.type){case"b":o=parseInt(o,10).toString(2);break;case"c":o=String.fromCharCode(parseInt(o,10));break;case"d":case"i":o=parseInt(o,10);break;case"j":o=JSON.stringify(o,null,f.width?parseInt(f.width):0);break;case"e":o=f.precision?parseFloat(o).toExponential(f.precision):parseFloat(o).toExponential();break;case"f":o=f.precision?parseFloat(o).toFixed(f.precision):parseFloat(o);break;case"g":o=f.precision?String(Number(o.toPrecision(f.precision))):parseFloat(o);break;case"o":o=(parseInt(o,10)>>>0).toString(8);break;case"s":o=String(o),o=f.precision?o.substring(0,f.precision):o;break;case"t":o=String(!!o),o=f.precision?o.substring(0,f.precision):o;break;case"T":o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=f.precision?o.substring(0,f.precision):o;break;case"u":o=parseInt(o,10)>>>0;break;case"v":o=o.valueOf(),o=f.precision?o.substring(0,f.precision):o;break;case"x":o=(parseInt(o,10)>>>0).toString(16);break;case"X":o=(parseInt(o,10)>>>0).toString(16).toUpperCase();break}t.json.test(f.type)?m+=o:(t.number.test(f.type)&&(!k||f.sign)?(x=k?"+":"-",o=o.toString().replace(t.sign,"")):x="",y=f.pad_char?f.pad_char==="0"?"0":f.pad_char.charAt(1):" ",S=f.width-(x+o).length,h=f.width&&S>0?y.repeat(S):"",m+=f.align?x+o+h:y==="0"?x+h+o:h+x+o)}return m}var s=Object.create(null);function n(c){if(s[c])return s[c];for(var i=c,u,l=[],o=0;i;){if((u=t.text.exec(i))!==null)l.push(u[0]);else if((u=t.modulo.exec(i))!==null)l.push("%");else if((u=t.placeholder.exec(i))!==null){if(u[2]){o|=1;var m=[],p=u[2],d=[];if((d=t.key.exec(p))!==null)for(m.push(d[1]);(p=p.substring(d[0].length))!=="";)if((d=t.key_access.exec(p))!==null)m.push(d[1]);else if((d=t.index_access.exec(p))!==null)m.push(d[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=m}else o|=2;if(o===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");l.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");i=i.substring(u[0].length)}return s[c]=l}typeof C<"u"&&(C.sprintf=a,C.vsprintf=r),typeof window<"u"&&(window.sprintf=a,window.vsprintf=r,typeof define=="function"&&define.amd&&define(function(){return{sprintf:a,vsprintf:r}}))})()});var $=L(z(),1);function P(t,a,r){let e=new Date(a*1e3),s="",n=0;for(;n<t.length;)if(t[n]==="%"&&n+1<t.length){let c=t[n+1],i=R(e,c,r);i!==null?(s+=i,n+=2):(s+=t[n],n++)}else s+=t[n],n++;return s}function G(t,a){let r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",hour12:!1,timeZone:a};try{let s=new Intl.DateTimeFormat("en-US",r).formatToParts(t),n=u=>s.find(l=>l.type===u)?.value??"",c=new Map([["Sun",0],["Mon",1],["Tue",2],["Wed",3],["Thu",4],["Fri",5],["Sat",6]]),i=n("weekday");return{year:Number.parseInt(n("year"),10)||t.getFullYear(),month:Number.parseInt(n("month"),10)||t.getMonth()+1,day:Number.parseInt(n("day"),10)||t.getDate(),hour:Number.parseInt(n("hour"),10)||t.getHours(),minute:Number.parseInt(n("minute"),10)||t.getMinutes(),second:Number.parseInt(n("second"),10)||t.getSeconds(),weekday:c.get(i)??t.getDay()}}catch{return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),weekday:t.getDay()}}}function R(t,a,r){let e=G(t,r),s=(u,l=2)=>String(u).padStart(l,"0"),n=Z(e.year,e.month,e.day),c=j(e.year,e.month,e.day,e.weekday,0),i=j(e.year,e.month,e.day,e.weekday,1);switch(a){case"a":return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][e.weekday];case"A":return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.weekday];case"b":case"h":return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.month-1];case"B":return["January","February","March","April","May","June","July","August","September","October","November","December"][e.month-1];case"c":return`${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][e.weekday]} ${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.month-1]} ${String(e.day).padStart(2," ")} ${s(e.hour)}:${s(e.minute)}:${s(e.second)} ${e.year}`;case"C":return s(Math.floor(e.year/100));case"d":return s(e.day);case"D":return`${s(e.month)}/${s(e.day)}/${s(e.year%100)}`;case"e":return String(e.day).padStart(2," ");case"F":return`${e.year}-${s(e.month)}-${s(e.day)}`;case"g":return s(O(e.year,e.month,e.day)%100);case"G":return String(O(e.year,e.month,e.day));case"H":return s(e.hour);case"I":return s(e.hour%12||12);case"j":return String(n).padStart(3,"0");case"k":return String(e.hour).padStart(2," ");case"l":return String(e.hour%12||12).padStart(2," ");case"m":return s(e.month);case"M":return s(e.minute);case"n":return`
|
|
4
|
+
`;case"N":return"000000000";case"p":return e.hour<12?"AM":"PM";case"P":return e.hour<12?"am":"pm";case"r":return`${s(e.hour%12||12)}:${s(e.minute)}:${s(e.second)} ${e.hour<12?"AM":"PM"}`;case"R":return`${s(e.hour)}:${s(e.minute)}`;case"s":return String(Math.floor(t.getTime()/1e3));case"S":return s(e.second);case"t":return" ";case"T":return`${s(e.hour)}:${s(e.minute)}:${s(e.second)}`;case"u":return String(e.weekday===0?7:e.weekday);case"U":return s(c);case"V":return s(Q(e.year,e.month,e.day));case"w":return String(e.weekday);case"W":return s(i);case"x":return`${s(e.month)}/${s(e.day)}/${s(e.year%100)}`;case"X":return`${s(e.hour)}:${s(e.minute)}:${s(e.second)}`;case"y":return s(e.year%100);case"Y":return String(e.year);case"z":return V(t,r);case"Z":return q(t,r);case"%":return"%";default:return null}}function V(t,a){if(!a){let c=-t.getTimezoneOffset(),i=c>=0?"+":"-",u=Math.floor(Math.abs(c)/60),l=Math.abs(c)%60;return`${i}${String(u).padStart(2,"0")}${String(l).padStart(2,"0")}`}try{let u=new Intl.DateTimeFormat("en-US",{timeZone:a,timeZoneName:"longOffset"}).formatToParts(t).find(l=>l.type==="timeZoneName");if(u){let l=u.value.match(/GMT([+-])(\d{2}):(\d{2})/);if(l)return`${l[1]}${l[2]}${l[3]}`;if(u.value==="GMT"||u.value==="UTC")return"+0000"}}catch{}let r=-t.getTimezoneOffset(),e=r>=0?"+":"-",s=Math.floor(Math.abs(r)/60),n=Math.abs(r)%60;return`${e}${String(s).padStart(2,"0")}${String(n).padStart(2,"0")}`}function q(t,a){try{return new Intl.DateTimeFormat("en-US",{timeZone:a,timeZoneName:"short"}).formatToParts(t).find(n=>n.type==="timeZoneName")?.value??"UTC"}catch{return"UTC"}}function Z(t,a,r){let e=[31,28,31,30,31,30,31,31,30,31,30,31];(t%4===0&&t%100!==0||t%400===0)&&(e[1]=29);let n=r;for(let c=0;c<a-1;c++)n+=e[c];return n}function j(t,a,r,e,s){let n=Z(t,a,r),u=(new Date(t,0,1).getDay()-s+7)%7,l=(e-s+7)%7,o=n-1+u;return Math.floor((o-l+7)/7)}function Q(t,a,r){let e=new Date(t,a-1,r,12,0,0);e.setDate(e.getDate()+3-(e.getDay()+6)%7);let s=new Date(e.getFullYear(),0,4);s.setDate(s.getDate()+3-(s.getDay()+6)%7);let n=e.getTime()-s.getTime();return 1+Math.round(n/(10080*60*1e3))}function O(t,a,r){let e=new Date(t,a-1,r,12,0,0);return e.setDate(e.getDate()+3-(e.getDay()+6)%7),e.getFullYear()}function B(t){let a="",r=0;for(;r<t.length;){let e=t[r];if(e<128){a+=String.fromCharCode(e),r++;continue}if((e&224)===192){if(r+1<t.length&&(t[r+1]&192)===128&&e>=194){let s=(e&31)<<6|t[r+1]&63;a+=String.fromCharCode(s),r+=2;continue}a+=String.fromCharCode(e),r++;continue}if((e&240)===224){if(r+2<t.length&&(t[r+1]&192)===128&&(t[r+2]&192)===128){if(e===224&&t[r+1]<160){a+=String.fromCharCode(e),r++;continue}let s=(e&15)<<12|(t[r+1]&63)<<6|t[r+2]&63;if(s>=55296&&s<=57343){a+=String.fromCharCode(e),r++;continue}a+=String.fromCharCode(s),r+=3;continue}a+=String.fromCharCode(e),r++;continue}if((e&248)===240&&e<=244){if(r+3<t.length&&(t[r+1]&192)===128&&(t[r+2]&192)===128&&(t[r+3]&192)===128){if(e===240&&t[r+1]<144){a+=String.fromCharCode(e),r++;continue}let s=(e&7)<<18|(t[r+1]&63)<<12|(t[r+2]&63)<<6|t[r+3]&63;if(s>1114111){a+=String.fromCharCode(e),r++;continue}a+=String.fromCodePoint(s),r+=4;continue}a+=String.fromCharCode(e),r++;continue}a+=String.fromCharCode(e),r++}return a}var K={name:"printf",summary:"format and print data",usage:"printf [-v var] FORMAT [ARGUMENT...]",options:[" -v var assign the output to shell variable VAR rather than display it"," --help display this help and exit"],notes:["FORMAT controls the output like in C printf.","Escape sequences: \\n (newline), \\t (tab), \\\\ (backslash)","Format specifiers: %s (string), %d (integer), %f (float), %x (hex), %o (octal), %% (literal %)","Width and precision: %10s (width 10), %.2f (2 decimal places), %010d (zero-padded)","Flags: %- (left-justify), %+ (show sign), %0 (zero-pad)"]},ge={name:"printf",async execute(t,a){if(A(t))return N(K);if(t.length===0)return{stdout:"",stderr:`printf: usage: printf format [arguments]
|
|
5
|
+
`,exitCode:2};let r=null,e=0;for(;e<t.length;){let c=t[e];if(c==="--"){e++;break}if(c==="-v"){if(e+1>=t.length)return{stdout:"",stderr:`printf: -v: option requires an argument
|
|
6
|
+
`,exitCode:1};if(r=t[e+1],!/^[a-zA-Z_][a-zA-Z0-9_]*(\[[a-zA-Z0-9_@*"'$]+\])?$/.test(r))return{stdout:"",stderr:`printf: \`${r}': not a valid identifier
|
|
7
|
+
`,exitCode:2};e+=2}else{if(c.startsWith("-")&&c!=="-")break;break}}if(e>=t.length)return{stdout:"",stderr:`printf: usage: printf format [arguments]
|
|
8
|
+
`,exitCode:1};let s=t[e],n=t.slice(e+1);try{let c=W(s),i="",u=0,l=!1,o="",m=a.env.get("TZ"),p=a.limits?.maxStringLength;do{let{result:d,argsConsumed:f,error:h,errMsg:y,stopped:S}=ee(c,n,u,m);if(i+=d,p!==void 0&&p>0&&i.length>p)throw new T(`printf: output size limit exceeded (${p} bytes)`,"string_length");if(u+=f,h&&(l=!0,y&&(o=y)),S)break}while(u<n.length&&u>0);if(u===0&&n.length>0,r){let d=r.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(['"]?)(.+?)\2\]$/);if(d){let f=d[1],h=d[3];h=h.replace(/\$([a-zA-Z_][a-zA-Z0-9_]*)/g,(y,S)=>a.env.get(S)??""),a.env.set(`${f}_${h}`,i)}else a.env.set(r,i);return{stdout:"",stderr:o,exitCode:l?1:0}}return{stdout:i,stderr:o,exitCode:l?1:0}}catch(c){if(c instanceof T)throw c;return{stdout:"",stderr:`printf: ${D(c)}
|
|
9
|
+
`,exitCode:1}}}};function ee(t,a,r,e){let s="",n=0,c=0,i=!1,u="";for(;n<t.length;)if(t[n]==="%"&&n+1<t.length){let l=n;if(n++,t[n]==="%"){s+="%",n++;continue}let o=t.slice(l).match(/^%(-?\d*)(?:\.(\d+))?\(([^)]*)\)T/);if(o){let b=o[1]?parseInt(o[1],10):0,I=o[2]?parseInt(o[2],10):-1,Y=o[3],X=o[0],v=a[r+c]||"";c++;let M;v===""||v==="-1"||v==="-2"?M=Math.floor(Date.now()/1e3):M=parseInt(v,10)||0;let w=P(Y,M,e);if(I>=0&&w.length>I&&(w=w.slice(0,I)),b!==0){let F=Math.abs(b);w.length<F&&(b<0?w=w.padEnd(F," "):w=w.padStart(F," "))}s+=w,n=l+X.length;continue}for(;n<t.length&&"+-0 #'".includes(t[n]);)n++;let m=!1;if(t[n]==="*")m=!0,n++;else for(;n<t.length&&/\d/.test(t[n]);)n++;let p=!1;if(t[n]===".")if(n++,t[n]==="*")p=!0,n++;else for(;n<t.length&&/\d/.test(t[n]);)n++;n<t.length&&"hlL".includes(t[n])&&n++;let d=t[n]||"";n++;let h=t.slice(l,n);if(m){let b=parseInt(a[r+c]||"0",10);c++,h=h.replace("*",String(b))}if(p){let b=parseInt(a[r+c]||"0",10);c++,h=h.replace(".*",`.${b}`)}let y=a[r+c]||"";c++;let{value:S,parseError:k,parseErrMsg:x,stopped:J}=te(h,d,y);if(s+=S,k&&(i=!0,x&&(u=x)),J)return{result:s,argsConsumed:c,error:i,errMsg:u,stopped:!0}}else s+=t[n],n++;return{result:s,argsConsumed:c,error:i,errMsg:u,stopped:!1}}function te(t,a,r){let e=!1,s="";switch(a){case"d":case"i":{let n=E(r);return e=g,e&&(s=`printf: ${r}: invalid number
|
|
10
|
+
`),{value:U(t,n),parseError:e,parseErrMsg:s}}case"o":{let n=E(r);return e=g,e&&(s=`printf: ${r}: invalid number
|
|
11
|
+
`),{value:re(t,n),parseError:e,parseErrMsg:s}}case"u":{let n=E(r);e=g,e&&(s=`printf: ${r}: invalid number
|
|
12
|
+
`);let c=n<0?n>>>0:n;return{value:U(t.replace("u","d"),c),parseError:e,parseErrMsg:s}}case"x":case"X":{let n=E(r);return e=g,e&&(s=`printf: ${r}: invalid number
|
|
13
|
+
`),{value:ne(t,n),parseError:e,parseErrMsg:s}}case"e":case"E":case"f":case"F":case"g":case"G":{let n=parseFloat(r)||0;return{value:oe(t,a,n),parseError:!1,parseErrMsg:""}}case"c":{if(r==="")return{value:"",parseError:!1,parseErrMsg:""};let i=new TextEncoder().encode(r)[0];return{value:String.fromCharCode(i),parseError:!1,parseErrMsg:""}}case"s":return{value:ae(t,r),parseError:!1,parseErrMsg:""};case"q":return{value:ie(t,r),parseError:!1,parseErrMsg:""};case"b":{let n=ce(r);return{value:n.value,parseError:!1,parseErrMsg:"",stopped:n.stopped}}default:try{return{value:(0,$.sprintf)(t,r),parseError:!1,parseErrMsg:""}}catch{return{value:"",parseError:!0,parseErrMsg:`printf: [sprintf] unexpected placeholder
|
|
14
|
+
`}}}}var g=!1;function E(t){g=!1;let a=t.trimStart(),r=a!==a.trimEnd();if(t=a.trimEnd(),t.startsWith("'")&&t.length>=2||t.startsWith('"')&&t.length>=2)return t.charCodeAt(1);if(t.startsWith("\\'")&&t.length>=3||t.startsWith('\\"')&&t.length>=3)return t.charCodeAt(2);if(t.startsWith("+")&&(t=t.slice(1)),t.startsWith("0x")||t.startsWith("0X")){let e=parseInt(t,16);return Number.isNaN(e)?(g=!0,0):(r&&(g=!0),e)}if(t.startsWith("0")&&t.length>1&&/^-?0[0-7]+$/.test(t))return r&&(g=!0),parseInt(t,8)||0;if(/^\d+#/.test(t)){g=!0;let e=t.match(/^(\d+)#/);return e?parseInt(e[1],10):0}if(t!==""&&!/^-?\d+$/.test(t)){g=!0;let e=parseInt(t,10);return Number.isNaN(e)?0:e}return r&&(g=!0),parseInt(t,10)||0}function U(t,a){let r=t.match(/^%([- +#0']*)(\d*)(\.(\d*))?[diu]$/);if(!r)return(0,$.sprintf)(t.replace(/\.\d*/,""),a);let e=r[1]||"",s=r[2]?parseInt(r[2],10):0,n=r[3]!==void 0?r[4]?parseInt(r[4],10):0:-1,c=a<0,i=Math.abs(a),u=String(i);n>=0&&(u=u.padStart(n,"0"));let l="";c?l="-":e.includes("+")?l="+":e.includes(" ")&&(l=" ");let o=l+u;return s>o.length&&(e.includes("-")?o=o.padEnd(s," "):e.includes("0")&&n<0?o=l+u.padStart(s-l.length,"0"):o=o.padStart(s," ")),o}function re(t,a){let r=t.match(/^%([- +#0']*)(\d*)(\.(\d*))?o$/);if(!r)return(0,$.sprintf)(t,a);let e=r[1]||"",s=r[2]?parseInt(r[2],10):0,n=r[3]!==void 0?r[4]?parseInt(r[4],10):0:-1,c=Math.abs(a).toString(8);n>=0&&(c=c.padStart(n,"0")),e.includes("#")&&!c.startsWith("0")&&(c=`0${c}`);let i=c;return s>i.length&&(e.includes("-")?i=i.padEnd(s," "):e.includes("0")&&n<0?i=i.padStart(s,"0"):i=i.padStart(s," ")),i}function ne(t,a){let r=t.includes("X"),e=t.match(/^%([- +#0']*)(\d*)(\.(\d*))?[xX]$/);if(!e)return(0,$.sprintf)(t,a);let s=e[1]||"",n=e[2]?parseInt(e[2],10):0,c=e[3]!==void 0?e[4]?parseInt(e[4],10):0:-1,i=Math.abs(a).toString(16);r&&(i=i.toUpperCase()),c>=0&&(i=i.padStart(c,"0"));let u="";s.includes("#")&&a!==0&&(u=r?"0X":"0x");let l=u+i;return n>l.length&&(s.includes("-")?l=l.padEnd(n," "):s.includes("0")&&c<0?l=u+i.padStart(n-u.length,"0"):l=l.padStart(n," ")),l}function se(t){if(t==="")return"''";if(/^[a-zA-Z0-9_./-]+$/.test(t))return t;if(/[\x00-\x1f\x7f-\xff]/.test(t)){let e="$'";for(let s of t){let n=s.charCodeAt(0);s==="'"?e+="\\'":s==="\\"?e+="\\\\":s===`
|
|
15
|
+
`?e+="\\n":s===" "?e+="\\t":s==="\r"?e+="\\r":s==="\x07"?e+="\\a":s==="\b"?e+="\\b":s==="\f"?e+="\\f":s==="\v"?e+="\\v":s==="\x1B"?e+="\\E":n<32||n>=127&&n<=255?e+=`\\${n.toString(8).padStart(3,"0")}`:s==='"'?e+='\\"':e+=s}return e+="'",e}let r="";for(let e of t)" |&;<>()$`\\\"'*?[#~=%!{}".includes(e)?r+=`\\${e}`:r+=e;return r}function ae(t,a){let r=t.match(/^%(-?)(\d*)(\.(\d*))?s$/);if(!r)return(0,$.sprintf)(t.replace(/0+(?=\d)/,""),a);let e=r[1]==="-",s=r[2]?parseInt(r[2],10):0,n=r[3]!==void 0?r[4]?parseInt(r[4],10):0:-1,c=e?-s:s;return _(a,c,n)}function ie(t,a){let r=se(a),e=t.match(/^%(-?)(\d*)q$/);if(!e)return r;let s=e[1]==="-",n=e[2]?parseInt(e[2],10):0,c=r;return n>c.length&&(s?c=c.padEnd(n," "):c=c.padStart(n," ")),c}function oe(t,a,r){let e=t.match(/^%([- +#0']*)(\d*)(\.(\d*))?[eEfFgG]$/);if(!e)return(0,$.sprintf)(t,r);let s=e[1]||"",n=e[2]?parseInt(e[2],10):0,c=e[3]!==void 0?e[4]?parseInt(e[4],10):0:6,i,u=a.toLowerCase();if(u==="e"?(i=r.toExponential(c),i=i.replace(/e([+-])(\d)$/,"e$10$2"),a==="E"&&(i=i.toUpperCase())):u==="f"?(i=r.toFixed(c),s.includes("#")&&c===0&&!i.includes(".")&&(i+=".")):u==="g"?(i=r.toPrecision(c||1),s.includes("#")||(i=i.replace(/\.?0+$/,""),i=i.replace(/\.?0+e/,"e")),i=i.replace(/e([+-])(\d)$/,"e$10$2"),a==="G"&&(i=i.toUpperCase())):i=r.toString(),r>=0&&(s.includes("+")?i=`+${i}`:s.includes(" ")&&(i=` ${i}`)),n>i.length)if(s.includes("-"))i=i.padEnd(n," ");else if(s.includes("0")){let l=i.match(/^[+ -]/)?.[0]||"",o=l?i.slice(1):i;i=l+o.padStart(n-l.length,"0")}else i=i.padStart(n," ");return i}function ce(t){let a="",r=0;for(;r<t.length;)if(t[r]==="\\"&&r+1<t.length)switch(t[r+1]){case"n":a+=`
|
|
16
|
+
`,r+=2;break;case"t":a+=" ",r+=2;break;case"r":a+="\r",r+=2;break;case"\\":a+="\\",r+=2;break;case"a":a+="\x07",r+=2;break;case"b":a+="\b",r+=2;break;case"f":a+="\f",r+=2;break;case"v":a+="\v",r+=2;break;case"c":return{value:a,stopped:!0};case"x":{let s=[],n=r;for(;n+1<t.length&&t[n]==="\\"&&t[n+1]==="x";){let c="",i=n+2;for(;i<t.length&&i<n+4&&/[0-9a-fA-F]/.test(t[i]);)c+=t[i],i++;if(c)s.push(parseInt(c,16)),n=i;else break}s.length>0?(a+=B(s),r=n):(a+="\\x",r+=2);break}case"u":{let s="",n=r+2;for(;n<t.length&&n<r+6&&/[0-9a-fA-F]/.test(t[n]);)s+=t[n],n++;s?(a+=String.fromCodePoint(parseInt(s,16)),r=n):(a+="\\u",r+=2);break}case"0":{let s="",n=r+2;for(;n<t.length&&n<r+5&&/[0-7]/.test(t[n]);)s+=t[n],n++;s?a+=String.fromCharCode(parseInt(s,8)):a+="\0",r=n;break}case"1":case"2":case"3":case"4":case"5":case"6":case"7":{let s="",n=r+1;for(;n<t.length&&n<r+4&&/[0-7]/.test(t[n]);)s+=t[n],n++;a+=String.fromCharCode(parseInt(s,8)),r=n;break}default:a+=t[r],r++}else a+=t[r],r++;return{value:a,stopped:!1}}var ye={name:"printf",flags:[{flag:"-v",type:"value",valueHint:"string"}],stdinType:"none",needsArgs:!0};export{ge as a,ye as b};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
+
import{a as F,b,c as M,d as He,e as w,f as v,g as Y,h as Z}from"./chunk-LAHBP3FW.js";import{a as st}from"./chunk-MNWK4UIM.js";import{a as $}from"./chunk-LSQTB2QK.js";import{f as qe,g as X}from"./chunk-MLUOPG3W.js";import{a as J}from"./chunk-IEXQTXU5.js";import{a as _e}from"./chunk-H7JTIXAO.js";import{a as _}from"./chunk-VZK4FHWJ.js";import{a as D,b as G}from"./chunk-MUFNRCMY.js";import{b as We,d as et,e as tt,f as nt}from"./chunk-LNVSXNT7.js";var q,Je=We(()=>{"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===`
|
|
4
|
+
`||n==="\r")this.pos++;else if(n==="#")for(;this.pos<this.input.length&&this.input[this.pos]!==`
|
|
5
|
+
`;)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+=`
|
|
6
|
+
`;break;case"r":s+="\r";break;case"t":s+=" ";break;case"\\":s+="\\";break;case'"':s+='"';break;case"'":s+="'";break;case"`":s+="`";break;case"0":s+="\0";break;default:s+=o}this.pos++}}else s+=r,this.pos++}throw new Error(`Unterminated string starting at position ${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(/\?$/,""),a=r.get(o);return a!==void 0&&!t?{type:a,value:o,pos:n}:{type:"ident",value:s,pos:n}}}});var ze={};et(ze,{parseMoonblade:()=>H,parseNamedExpressions:()=>U});function U(e){let n=[],s=new q(e).tokenize(),r=0,o=()=>s[r]||{type:"eof",value:"",pos:0},a=()=>s[r++];for(;o().type!=="eof";){if(o().type===","&&n.length>0){a();continue}let d=[],u=0,p=r;for(;o().type!=="eof";){let i=o();if((i.type===","||i.type==="as")&&u===0)break;(i.type==="("||i.type==="["||i.type==="{")&&u++,(i.type===")"||i.type==="]"||i.type==="}")&&u--,d.push(a())}d.push({type:"eof",value:"",pos:0});let h=new z(d).parse(),l;if(o().type==="as")if(a(),o().type==="("){a();let i=[];for(;o().type!==")"&&o().type!=="eof";)(o().type==="ident"||o().type==="string")&&(i.push(o().value),a()),o().type===","&&a();o().type===")"&&a(),l=i}else if(o().type==="ident"||o().type==="string")l=o().value,a();else throw new Error(`Expected name after 'as', got ${o().type}`);else l=e.slice(s[p].pos,s[r-1]?.pos||e.length).trim(),h.type==="identifier"&&(l=h.name);n.push({expr:h,name:l})}return n}function H(e){let t=new q(e).tokenize();return new z(t).parse()}var R,z,V=We(()=>{"use strict";Je();R={PIPE:1,OR:2,AND:3,EQUALITY:4,COMPARISON:5,ADDITIVE:6,MULTIPLICATIVE:7,POWER:8,UNARY:9,POSTFIX:10},z=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=this.pos;if(this.peek().type===")"){if(this.advance(),this.peek().type==="=>"){this.advance();let r=this.parseExpr(0);return{type:"lambda",params:[],body:r}}throw new Error("Empty parentheses not allowed")}if(this.peek().type==="ident"){let r=[this.peek().value];this.advance();let o=!0;for(;this.peek().type===",";)if(this.advance(),this.peek().type==="ident")r.push(this.peek().value),this.advance();else{o=!1;break}if(o&&this.peek().type===")"&&this.peekAt(1).type==="=>"){this.advance(),this.advance();let a=this.parseExpr(0);return this.bindLambdaArgs({type:"lambda",params:r,body:a},r)}this.pos=t}let s=this.parseExpr(0);return this.expect(")"),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,a=this.pos+1;a<this.tokens.length&&this.tokens[a].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 a=this.parseExpr(t+(this.isRightAssoc(s.type)?0:1));return{type:"func",name:o,args:[{expr:n},{expr:a}]}}if(s.type==="|"){this.advance();let a=this.parseExpr(t);return this.handlePipe(n,a)}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}}peekAt(n){return this.tokens[this.pos+n]||{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()}}});V();function E(e,n){return n.length===0?I(e,[]):n.length===1?{type:"Pipe",left:n[0],right:I(e,[])}:{type:"Pipe",left:n[0],right:I(e,n.slice(1))}}var K={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=>I("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?I("ltrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:I("ltrimstr",[{type:"Literal",value:" "}])},rtrim:e=>e.length===0?I("rtrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:I("rtrimstr",[{type:"Literal",value:" "}])},split:e=>E("split",e),join:e=>e.length===1?I("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=>I("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=>I("select",e),empty:()=>I("empty",[]),count:()=>I("length",[]),sum:e=>e.length===0?I("add",[]):{type:"Pipe",left:{type:"Array",elements:e[0]},right:I("add",[])},mean:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:S("/",I("add",[]),I("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:S("/",I("add",[]),I("length",[]))},avg:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:S("/",I("add",[]),I("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:S("/",I("add",[]),I("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?I("tonumber",[]):I("tonumber",e),tostring:e=>e.length===0?I("tostring",[]):I("tostring",e),if:e=>Ke(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 Ke(s,n,t.length===1?t[0]:K.coalesce(t))},index:()=>({type:"Field",name:"_row_index"}),now:()=>I("now",[]),fmt:e=>I("tostring",e),format:e=>I("tostring",e)};Object.setPrototypeOf(K,null);function S(e,n,t){return{type:"BinaryOp",op:e,left:n,right:t}}function I(e,n){return{type:"Call",name:e,args:n}}var rt="then";function Ke(e,n,t){let s=qe({type:"Cond",cond:e,elifs:[],else:t||{type:"Literal",value:null}});return s[rt]=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(K,e.name)?K[e.name]:void 0;return typeof s=="function"?s(t):I(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 ee(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,a=t;for(;t<e.length&&o>0;)e[t]==="("?o++:e[t]===")"&&o--,o>0&&t++;let d=e.slice(a,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=d?`${r}(${d})`:`${r}()`),n.push({func:r,expr:d,alias:u})}return n}function Be(e){return/^\w+$/.test(e)}function Q(e,n,t){let s=O(H(n)),r=$(e,s,t);return r.length>0?r[0]:null}function te(e,n,t={}){let{func:s,expr:r}=n;if(s==="count"&&!r)return e.length;let o;switch(Be(r)?o=e.map(a=>a[r]).filter(a=>a!=null):o=e.map(a=>Q(a,r,t)).filter(a=>a!=null),s){case"count":return Be(r)?o.length:o.filter(a=>!!a).length;case"sum":return o.map(d=>typeof d=="number"?d:Number.parseFloat(String(d))).reduce((d,u)=>d+u,0);case"mean":case"avg":{let a=o.map(d=>typeof d=="number"?d:Number.parseFloat(String(d)));return a.length>0?a.reduce((d,u)=>d+u,0)/a.length:0}case"min":{let a=o.map(d=>typeof d=="number"?d:Number.parseFloat(String(d)));return a.length>0?Math.min(...a):null}case"max":{let a=o.map(d=>typeof d=="number"?d:Number.parseFloat(String(d)));return a.length>0?Math.max(...a):null}case"first":return o.length>0?o[0]:null;case"last":return o.length>0?o[o.length-1]:null;case"median":{let a=o.map(u=>typeof u=="number"?u:Number.parseFloat(String(u))).filter(u=>!Number.isNaN(u)).sort((u,p)=>u-p);if(a.length===0)return null;let d=Math.floor(a.length/2);return a.length%2===0?(a[d-1]+a[d])/2:a[d]}case"mode":{let a=new Map;for(let p of o){let c=String(p);a.set(c,(a.get(c)||0)+1)}let d=0,u=null;for(let[p,c]of a)c>d&&(d=c,u=p);return u}case"cardinality":return new Set(o.map(d=>String(d))).size;case"values":return o.map(a=>String(a)).join("|");case"distinct_values":return[...new Set(o.map(d=>String(d)))].sort().join("|");case"all":{if(e.length===0)return!0;for(let a of e)if(!Q(a,r,t))return!1;return!0}case"any":{for(let a of e)if(Q(a,r,t))return!0;return!1}default:return null}}function Ge(e,n,t={}){let s=F();for(let r of n)b(s,r.alias,te(e,r,t));return s}async function ne(e,n){let t="",s=[];for(let c of e)c.startsWith("-")||(t?s.push(c):t=c);if(!t)return{stdout:"",stderr:`xan agg: no aggregation expression
|
|
7
|
+
`,exitCode:1};let{data:r,error:o}=await v(s,n);if(o)return o;let a={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},d=ee(t),u=d.map(c=>c.alias),p=Ge(r,d,a);return{stdout:w(u,[p]),stderr:"",exitCode:0}}async function se(e,n){let t="",s="",r=[];for(let f=0;f<e.length;f++){let m=e[f];m==="--sorted"||m.startsWith("-")||(t?s?r.push(m):s=m:t=m)}if(!t||!s)return{stdout:"",stderr:`xan groupby: usage: xan groupby COLS EXPR [FILE]
|
|
8
|
+
`,exitCode:1};let{data:o,error:a}=await v(r,n);if(a)return a;let d={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},u=t.split(","),p=ee(s),c=[],h=new Map;for(let f of o){let m=u.map(g=>String(f[g])).join("\0");h.has(m)||(h.set(m,[]),c.push(m)),h.get(m)?.push(f)}let l=[...u,...p.map(f=>f.alias)],i=[];for(let f of c){let m=h.get(f);if(!m)continue;let g=F();for(let y of u)b(g,y,m[0][y]);for(let y of p)b(g,y.alias,te(m,y,d));i.push(g)}return{stdout:w(l,i),stderr:"",exitCode:0}}async function re(e,n){let t=[],s="",r=10,o=!1,a=[];for(let i=0;i<e.length;i++){let f=e[i];(f==="-s"||f==="--select")&&i+1<e.length?t=e[++i].split(","):(f==="-g"||f==="--groupby")&&i+1<e.length?s=e[++i]:(f==="-l"||f==="--limit")&&i+1<e.length?r=Number.parseInt(e[++i],10):f==="--no-extra"?o=!0:f==="-A"||f==="--all"?r=0:f.startsWith("-")||a.push(f)}let{headers:d,data:u,error:p}=await v(a,n);if(p)return p;let c=t.length>0?t:d.filter(i=>i!==s);s&&t.length===0&&(c=d.filter(i=>i!==s));let h=[],l=s?["field",s,"value","count"]:["field","value","count"];if(s){let i=new Map;for(let f of u){let m=String(f[s]??"");i.has(m)||i.set(m,[]),i.get(m)?.push(f)}for(let f of c)for(let[m,g]of i){let y=new Map;for(let k of g){let N=k[f],C=N===""||N===null||N===void 0?"":String(N);y.set(C,(y.get(C)||0)+1)}let x=[...y.entries()].sort((k,N)=>N[1]!==k[1]?N[1]-k[1]:k[0].localeCompare(N[0]));o&&(x=x.filter(([k])=>k!=="")),r>0&&(x=x.slice(0,r));for(let[k,N]of x)h.push({field:f,[s]:m,value:k===""?"<empty>":k,count:N})}}else for(let i of c){let f=new Map;for(let g of u){let y=g[i],x=y===""||y===null||y===void 0?"":String(y);f.set(x,(f.get(x)||0)+1)}let m=[...f.entries()].sort((g,y)=>y[1]!==g[1]?y[1]-g[1]:g[0].localeCompare(y[0]));o&&(m=m.filter(([g])=>g!=="")),r>0&&(m=m.slice(0,r));for(let[g,y]of m)h.push({field:i,value:g===""?"<empty>":g,count:y})}return{stdout:w(l,h),stderr:"",exitCode:0}}async function oe(e,n){let t=[],s=[];for(let c=0;c<e.length;c++){let h=e[c];h==="-s"&&c+1<e.length?t=e[++c].split(","):h.startsWith("-")||s.push(h)}let{headers:r,data:o,error:a}=await v(s,n);if(a)return a;let d=t.length>0?t:r,u=["field","type","count","min","max","mean"],p=[];for(let c of d){let h=o.map(f=>f[c]).filter(f=>f!=null),l=h.map(f=>typeof f=="number"?f:Number.parseFloat(String(f))).filter(f=>!Number.isNaN(f)),i=l.length===h.length&&l.length>0;p.push({field:c,type:i?"Number":"String",count:h.length,min:i?Math.min(...l):"",max:i?Math.max(...l):"",mean:i?Math.round(l.reduce((f,m)=>f+m,0)/l.length*1e10)/1e10:""})}return{stdout:w(u,p),stderr:"",exitCode:0}}V();function Xe(e){let n=H(e);return O(n)}function ot(e){let t=e.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return J(`^${t}$`)}function B(e,n){let t=[],s=new Set;for(let r of e.split(",")){let o=r.trim();if(o.startsWith("!")){let p=o.slice(1),c=B(p,n);for(let h of c)s.add(h);continue}if(o==="*"){for(let p of n)t.includes(p)||t.push(p);continue}if(o.includes("*")){let p=ot(o);for(let c of n)p.test(c)&&!t.includes(c)&&t.push(c);continue}let a=o.match(/^([^:]*):([^:]*)$/);if(a&&(a[1]||a[2])){let p=a[1],c=a[2],h=p?n.indexOf(p):0,l=c?n.indexOf(c):n.length-1;if(h!==-1&&l!==-1){let i=h<=l?1:-1;for(let f=h;i>0?f<=l:f>=l;f+=i)t.includes(n[f])||t.push(n[f])}continue}let d=o.match(/^(\d+)-(\d+)$/);if(d){let p=Number.parseInt(d[1],10),c=Number.parseInt(d[2],10);for(let h=p;h<=c&&h<n.length;h++)t.push(n[h]);continue}let u=Number.parseInt(o,10);if(!Number.isNaN(u)&&u>=0&&u<n.length){t.push(n[u]);continue}n.includes(o)&&t.push(o)}return s.size>0?t.filter(r=>!s.has(r)):t}async function ie(e,n){let t="",s=[];for(let p of e)p.startsWith("-")||(t?s.push(p):t=p);if(!t)return{stdout:"",stderr:`xan select: no columns specified
|
|
9
|
+
`,exitCode:1};let{headers:r,data:o,error:a}=await v(s,n);if(a)return a;let d=B(t,r),u=o.map(p=>{let c=F();for(let h of d)b(c,h,p[h]);return c});return{stdout:w(d,u),stderr:"",exitCode:0}}async function ae(e,n){let t="",s=[];for(let c of e)c.startsWith("-")||(t?s.push(c):t=c);if(!t)return{stdout:"",stderr:`xan drop: no columns specified
|
|
10
|
+
`,exitCode:1};let{headers:r,data:o,error:a}=await v(s,n);if(a)return a;let d=new Set(B(t,r)),u=r.filter(c=>!d.has(c)),p=o.map(c=>{let h=F();for(let l of u)b(h,l,c[l]);return h});return{stdout:w(u,p),stderr:"",exitCode:0}}async function le(e,n){let t="",s="",r=[];for(let c=0;c<e.length;c++){let h=e[c];h==="-s"&&c+1<e.length?s=e[++c]:h.startsWith("-")||(t?r.push(h):t=h)}if(!t)return{stdout:"",stderr:`xan rename: no new name(s) specified
|
|
11
|
+
`,exitCode:1};let{headers:o,data:a,error:d}=await v(r,n);if(d)return d;let u;if(s){let c=s.split(","),h=t.split(","),l=new Map;for(let i=0;i<c.length&&i<h.length;i++)l.set(c[i],h[i]);u=o.map(i=>l.get(i)||i)}else{let c=t.split(",");u=o.map((h,l)=>l<c.length?c[l]:h)}let p=a.map(c=>{let h=F();for(let l=0;l<o.length;l++)b(h,u[l],c[o[l]]);return h});return{stdout:w(u,p),stderr:"",exitCode:0}}async function ue(e,n){let t="index",s=[];for(let p=0;p<e.length;p++)e[p]==="-c"&&p+1<e.length?t=e[++p]:s.push(e[p]);let{headers:r,data:o,error:a}=await v(s,n);if(a)return a;let d=[t,...r],u=o.map((p,c)=>{let h=F();b(h,t,c);for(let l of r)b(h,l,p[l]);return h});return{stdout:w(d,u),stderr:"",exitCode:0}}async function ce(e,n){let t=e.includes("-j")||e.includes("--just-names"),{headers:s,error:r}=await v(e.filter(a=>a!=="-j"&&a!=="--just-names"),n);return r||{stdout:t?`${s.map(a=>a).join(`
|
|
12
|
+
`)}
|
|
13
|
+
`:`${s.map((a,d)=>`${d} ${a}`).join(`
|
|
14
|
+
`)}
|
|
15
|
+
`,stderr:"",exitCode:0}}async function pe(e,n){let{data:t,error:s}=await v(e,n);return s||{stdout:`${t.length}
|
|
16
|
+
`,stderr:"",exitCode:0}}async function fe(e,n){let t=10,s=[];for(let u=0;u<e.length;u++)(e[u]==="-l"||e[u]==="-n")&&u+1<e.length?t=Number.parseInt(e[++u],10):s.push(e[u]);let{headers:r,data:o,error:a}=await v(s,n);if(a)return a;let d=o.slice(0,t);return{stdout:w(r,d),stderr:"",exitCode:0}}async function de(e,n){let t=10,s=[];for(let u=0;u<e.length;u++)(e[u]==="-l"||e[u]==="-n")&&u+1<e.length?t=Number.parseInt(e[++u],10):s.push(e[u]);let{headers:r,data:o,error:a}=await v(s,n);if(a)return a;let d=o.slice(-t);return{stdout:w(r,d),stderr:"",exitCode:0}}async function he(e,n){let t,s,r,o=[];for(let l=0;l<e.length;l++){let i=e[l];(i==="-s"||i==="--start")&&l+1<e.length?t=Number.parseInt(e[++l],10):(i==="-e"||i==="--end")&&l+1<e.length?s=Number.parseInt(e[++l],10):(i==="-l"||i==="--len")&&l+1<e.length?r=Number.parseInt(e[++l],10):i.startsWith("-")||o.push(i)}let{headers:a,data:d,error:u}=await v(o,n);if(u)return u;let p=t??0,c;r!==void 0?c=p+r:s!==void 0?c=s:c=d.length;let h=d.slice(p,c);return{stdout:w(a,h),stderr:"",exitCode:0}}async function me(e,n){let{headers:t,data:s,error:r}=await v(e,n);if(r)return r;let o=[...s].reverse();return{stdout:w(t,o),stderr:"",exitCode:0}}var ge=tt(st(),1);async function ye(e,n){let t=e.filter(p=>!p.startsWith("-")),{headers:s,data:r,error:o}=await v(t,n);if(o)return o;if(r.length===0){let p=["column"],c=s.map(h=>({column:h}));return{stdout:w(p,c),stderr:"",exitCode:0}}let a=s[0],d=[a,...r.map((p,c)=>String(p[a]??`row_${c}`))],u=[];for(let p=1;p<s.length;p++){let c=s[p],h=F();b(h,a,c);for(let l=0;l<r.length;l++)b(h,d[l+1],r[l][c]);u.push(h)}return{stdout:w(d,u),stderr:"",exitCode:0}}async function xe(e,n){let t=null,s=[];for(let c=0;c<e.length;c++){let h=e[c];h==="--seed"&&c+1<e.length?t=Number.parseInt(e[++c],10):h.startsWith("-")||s.push(h)}let{headers:r,data:o,error:a}=await v(s,n);if(a)return a;let d=t!==null?t:Date.now(),u=()=>(d=d*1103515245+12345&2147483647,d/2147483647),p=[...o];for(let c=p.length-1;c>0;c--){let h=Math.floor(u()*(c+1));[p[c],p[h]]=[p[h],p[c]]}return{stdout:w(r,p),stderr:"",exitCode:0}}async function we(e,n){let t=null,s="",r=[];for(let i=0;i<e.length;i++){let f=e[i];(f==="-l"||f==="--length")&&i+1<e.length?t=Number.parseInt(e[++i],10):(f==="-d"||f==="--default")&&i+1<e.length?s=e[++i]:f.startsWith("-")||r.push(f)}let o=r[0],a;if(!o||o==="-")a=_(n.stdin);else try{let i=n.fs.resolvePath(n.cwd,o);a=await n.fs.readFile(i)}catch{return{stdout:"",stderr:`xan fixlengths: ${o}: No such file or directory
|
|
17
|
+
`,exitCode:1}}let u=ge.default.parse(a.trim(),{header:!1,skipEmptyLines:!0}).data;if(u.length===0)return{stdout:"",stderr:"",exitCode:0};let p=Math.max(...u.map(i=>i.length)),c=t??p,h=u.map(i=>i.length===c?i:i.length<c?[...i,...Array(c-i.length).fill(s)]:i.slice(0,c));return{stdout:`${ge.default.unparse(h).replace(/\r\n/g,`
|
|
18
|
+
`)}
|
|
19
|
+
`,stderr:"",exitCode:0}}async function ve(e,n){let t=null,s=null,r=".",o=[];for(let l=0;l<e.length;l++){let i=e[l];(i==="-c"||i==="--chunks")&&l+1<e.length?t=Number.parseInt(e[++l],10):(i==="-S"||i==="--size")&&l+1<e.length?s=Number.parseInt(e[++l],10):(i==="-o"||i==="--output")&&l+1<e.length?r=e[++l]:i.startsWith("-")||o.push(i)}if(!t&&!s)return{stdout:"",stderr:`xan split: must specify -c or -S
|
|
20
|
+
`,exitCode:1};let{headers:a,data:d,error:u}=await v(o,n);if(u)return u;let p=[];if(t){let l=Math.ceil(d.length/t);for(let i=0;i<t;i++)p.push(d.slice(i*l,(i+1)*l))}else if(s)for(let l=0;l<d.length;l+=s)p.push(d.slice(l,l+s));let c=p.filter(l=>l.length>0),h=o[0]?.replace(/\.csv$/,"")||"part";try{let l=n.fs.resolvePath(n.cwd,r);for(let i=0;i<c.length;i++){let f=`${h}_${String(i+1).padStart(3,"0")}.csv`,m=n.fs.resolvePath(l,f);await n.fs.writeFile(m,w(a,c[i]))}return{stdout:`Split into ${c.length} parts
|
|
21
|
+
`,stderr:"",exitCode:0}}catch{return{stdout:`${c.map((i,f)=>`Part ${f+1}: ${i.length} rows`).join(`
|
|
22
|
+
`)}
|
|
23
|
+
`,stderr:"",exitCode:0}}}function Ye(e){return e.replace(/[^a-zA-Z0-9_-]/g,"_")||"empty"}function it(e){let n=2166136261;for(let t=0;t<e.length;t++)n=(n^e.charCodeAt(t))*16777619>>>0;return n.toString(36).padStart(6,"0").slice(0,6)}async function Ce(e,n){let t="",s=".",r=[];for(let l=0;l<e.length;l++){let i=e[l];(i==="-o"||i==="--output")&&l+1<e.length?s=e[++l]:i.startsWith("-")||(t?r.push(i):t=i)}if(!t)return{stdout:"",stderr:`xan partition: usage: xan partition COLUMN [FILE]
|
|
24
|
+
`,exitCode:1};let{headers:o,data:a,error:d}=await v(r,n);if(d)return d;if(!o.includes(t))return{stdout:"",stderr:`xan partition: column '${t}' not found
|
|
25
|
+
`,exitCode:1};let u=new Map;for(let l of a){let i=String(l[t]??"");u.has(i)||u.set(i,[]),u.get(i)?.push(l)}let p=new Map;for(let l of u.keys()){let i=Ye(l);p.set(i,(p.get(i)??0)+1)}let c=new Set,h=new Map;for(let l of u.keys()){let i=Ye(l),m=(p.get(i)??0)>1?`${i}_${it(l)}`:i,g=`${m}.csv`,y=1;for(;c.has(g);)g=`${m}_${y}.csv`,y++;c.add(g),h.set(l,g)}try{let l=n.fs.resolvePath(n.cwd,s);for(let[i,f]of u){let m=h.get(i);if(!m)continue;let g=n.fs.resolvePath(l,m);await n.fs.writeFile(g,w(o,f))}return{stdout:`Partitioned into ${u.size} files by '${t}'
|
|
26
|
+
`,stderr:"",exitCode:0}}catch{return{stdout:`${Array.from(u.entries()).map(([i,f])=>`${i}: ${f.length} rows`).join(`
|
|
27
|
+
`)}
|
|
28
|
+
`,stderr:"",exitCode:0}}}async function be(e,n){if(e.length===0)return{stdout:"",stderr:`xan to: usage: xan to <format> [FILE]
|
|
29
|
+
`,exitCode:1};let t=e[0],s=e.slice(1);return t==="json"?at(s,n):{stdout:"",stderr:`xan to: unsupported format '${t}'
|
|
30
|
+
`,exitCode:1}}async function at(e,n){let t=e.filter(a=>!a.startsWith("-")),{data:s,error:r}=await v(t,n);return r||{stdout:`${JSON.stringify(s,null,2)}
|
|
31
|
+
`,stderr:"",exitCode:0}}async function Se(e,n){let t="",s=[];for(let r=0;r<e.length;r++){let o=e[r];(o==="-f"||o==="--format")&&r+1<e.length?t=e[++r]:o.startsWith("-")||s.push(o)}return t?t==="json"?lt(s,n):{stdout:"",stderr:`xan from: unsupported format '${t}'
|
|
32
|
+
`,exitCode:1}:{stdout:"",stderr:`xan from: usage: xan from -f <format> [FILE]
|
|
33
|
+
`,exitCode:1}}async function lt(e,n){let t=e[0],s;if(!t||t==="-")s=_(n.stdin);else try{let r=n.fs.resolvePath(n.cwd,t);s=await n.fs.readFile(r)}catch{return{stdout:"",stderr:`xan from: ${t}: No such file or directory
|
|
34
|
+
`,exitCode:1}}try{let r=JSON.parse(s.trim());if(!Array.isArray(r))return{stdout:"",stderr:`xan from: JSON input must be an array
|
|
35
|
+
`,exitCode:1};if(r.length===0)return{stdout:`
|
|
36
|
+
`,stderr:"",exitCode:0};if(Array.isArray(r[0])){let[a,...d]=r,u=d.map(p=>{let c=F();for(let h=0;h<a.length;h++)b(c,a[h],p[h]);return c});return{stdout:w(a,u),stderr:"",exitCode:0}}let o=Object.keys(r[0]).sort();return{stdout:w(o,r),stderr:"",exitCode:0}}catch{return{stdout:"",stderr:`xan from: invalid JSON input
|
|
37
|
+
`,exitCode:1}}}async function ke(e,n){let t=!1,s=0,r="",o=[];for(let l=0;l<e.length;l++){let i=e[l];if(i==="-v"||i==="--invert")t=!0;else if((i==="-l"||i==="--limit")&&l+1<e.length)s=Number.parseInt(e[++l],10);else{if(i==="--help")return D({name:"xan filter",summary:"Filter rows by expression",usage:"xan filter [OPTIONS] EXPR [FILE]",description:"Filter CSV rows using moonblade expressions.",options:["-v, --invert invert match","-l, --limit N limit output to N rows"," --help display help"]});i.startsWith("-")||(r?o.push(i):r=i)}}if(!r)return{stdout:"",stderr:`xan filter: no expression specified
|
|
38
|
+
`,exitCode:1};let{headers:a,data:d,error:u}=await v(o,n);if(u)return u;let p={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},c=Xe(r),h=[];for(let l of d){if(s>0&&h.length>=s)break;let i=$(l,c,p),f=i.length>0&&i.some(m=>!!m);(t?!f:f)&&h.push(l)}return{stdout:w(a,h),stderr:"",exitCode:0}}async function Ie(e,n){let t="",s=!1,r=!1,o=[];for(let c=0;c<e.length;c++){let h=e[c];h==="-N"||h==="--numeric"?s=!0:h==="-R"||h==="-r"||h==="--reverse"?r=!0:h==="-s"&&c+1<e.length?t=e[++c]:h.startsWith("-")||o.push(h)}let{headers:a,data:d,error:u}=await v(o,n);if(u)return u;!t&&a.length>0&&(t=a[0]);let p=[...d].sort((c,h)=>{let l=c[t],i=h[t],f;if(s){let m=typeof l=="number"?l:Number.parseFloat(String(l)),g=typeof i=="number"?i:Number.parseFloat(String(i));f=m-g}else f=String(l).localeCompare(String(i));return r?-f:f});return{stdout:w(a,p),stderr:"",exitCode:0}}async function Ne(e,n){let t="",s=[];for(let p=0;p<e.length;p++){let c=e[p];c==="-s"&&p+1<e.length?t=e[++p]:c.startsWith("-")||s.push(c)}let{headers:r,data:o,error:a}=await v(s,n);if(a)return a;let d=new Set,u=o.filter(p=>{let c=t?String(p[t]):JSON.stringify(p);return d.has(c)?!1:(d.add(c),!0)});return{stdout:w(r,u),stderr:"",exitCode:0}}async function Ee(e,n){let t=10,s="",r=!1,o=[];for(let h=0;h<e.length;h++){let l=e[h];(l==="-l"||l==="-n")&&h+1<e.length?t=Number.parseInt(e[++h],10):l==="-R"||l==="-r"||l==="--reverse"?r=!0:l.startsWith("-")||(s?o.push(l):s=l)}let{headers:a,data:d,error:u}=await v(o,n);if(u)return u;!s&&a.length>0&&(s=a[0]);let c=[...d].sort((h,l)=>{let i=h[s],f=l[s],m=typeof i=="number"?i:Number.parseFloat(String(i)),g=typeof f=="number"?f:Number.parseFloat(String(f));return r?m-g:g-m}).slice(0,t);return{stdout:w(a,c),stderr:"",exitCode:0}}V();async function Ae(e,n){let t="",s=!1,r=!1,o=[];for(let f=0;f<e.length;f++){let m=e[f];m==="-O"||m==="--overwrite"?s=!0:m==="--filter"?r=!0:m.startsWith("-")||(t?o.push(m):t=m)}if(!t)return{stdout:"",stderr:`xan map: no expression specified
|
|
39
|
+
`,exitCode:1};let{headers:a,data:d,error:u}=await v(o,n);if(u)return u;let c=U(t).map(({expr:f,name:m})=>({alias:typeof m=="string"?m:m[0],ast:O(f)})),h={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},l;if(s){l=[...a];for(let f of c)a.includes(f.alias)||l.push(f.alias)}else l=[...a,...c.map(f=>f.alias)];let i=[];for(let f=0;f<d.length;f++){let m=d[f],g=M(m),y=!1,x=Object.assign(X(m),{_row_index:f});for(let k of c){let N=$(x,k.ast,h),C=N.length>0?N[0]:null;if(r&&C==null){y=!0;break}b(g,k.alias,C)}y||i.push(g)}return{stdout:w(l,i),stderr:"",exitCode:0}}async function Fe(e,n){let t="",s="",r="",o=[];for(let m=0;m<e.length;m++){let g=e[m];(g==="-r"||g==="--rename")&&m+1<e.length?r=e[++m]:g.startsWith("-")||(t?s?o.push(g):s=g:t=g)}if(!t||!s)return{stdout:"",stderr:`xan transform: usage: xan transform COLUMN EXPR [FILE]
|
|
40
|
+
`,exitCode:1};let{headers:a,data:d,error:u}=await v(o,n);if(u)return u;let p=t.split(",").map(m=>m.trim()),c=r?r.split(",").map(m=>m.trim()):[];for(let m of p)if(!a.includes(m))return{stdout:"",stderr:`xan transform: column '${m}' not found
|
|
41
|
+
`,exitCode:1};let h=O(U(s)[0]?.expr||(V(),nt(ze)).parseMoonblade(s)),l={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},i=a.map(m=>{let g=p.indexOf(m);return g!==-1&&c[g]?c[g]:m}),f=[];for(let m of d){let g=M(m);for(let y=0;y<p.length;y++){let x=p[y],k=Object.assign(X(m),{_:m[x]}),N=$(k,h,l),C=N.length>0?N[0]:null,A=c[y]||x;A!==x&&delete g[x],b(g,A,C)}f.push(g)}return{stdout:w(i,f),stderr:"",exitCode:0}}async function Oe(e,n){let t="",s="|",r=!1,o="",a=[];for(let i=0;i<e.length;i++){let f=e[i];(f==="-s"||f==="--separator")&&i+1<e.length?s=e[++i]:f==="--drop-empty"?r=!0:(f==="-r"||f==="--rename")&&i+1<e.length?o=e[++i]:f.startsWith("-")||(t?a.push(f):t=f)}if(!t)return{stdout:"",stderr:`xan explode: usage: xan explode COLUMN [FILE]
|
|
42
|
+
`,exitCode:1};let{headers:d,data:u,error:p}=await v(a,n);if(p)return p;if(!d.includes(t))return{stdout:"",stderr:`xan explode: column '${t}' not found
|
|
43
|
+
`,exitCode:1};let c=o?d.map(i=>i===t?o:i):d,h=o||t,l=[];for(let i of u){let f=i[t],m=f==null?"":String(f);if(m===""){if(!r){let g=M(i);o&&(delete g[t],b(g,h,"")),l.push(g)}}else{let g=m.split(s);for(let y of g){let x=M(i);o&&delete x[t],b(x,h,y),l.push(x)}}}return{stdout:w(c,l),stderr:"",exitCode:0}}async function Le(e,n){let t="",s="|",r="",o=[];for(let g=0;g<e.length;g++){let y=e[g];(y==="-s"||y==="--sep")&&g+1<e.length?s=e[++g]:(y==="-r"||y==="--rename")&&g+1<e.length?r=e[++g]:y.startsWith("-")||(t?o.push(y):t=y)}if(!t)return{stdout:"",stderr:`xan implode: usage: xan implode COLUMN [FILE]
|
|
44
|
+
`,exitCode:1};let{headers:a,data:d,error:u}=await v(o,n);if(u)return u;if(!a.includes(t))return{stdout:"",stderr:`xan implode: column '${t}' not found
|
|
45
|
+
`,exitCode:1};let p=a.filter(g=>g!==t),c=r?a.map(g=>g===t?r:g):a,h=r||t,l=[],i=null,f=[],m=null;for(let g of d){let y=p.map(N=>String(g[N]??"")).join("\0"),x=g[t],k=x==null?"":String(x);if(y!==i){if(m!==null){let N=M(m);r&&delete N[t],b(N,h,f.join(s)),l.push(N)}i=y,f=[k],m=g}else f.push(k)}if(m!==null){let g=M(m);r&&delete g[t],b(g,h,f.join(s)),l.push(g)}return{stdout:w(c,l),stderr:"",exitCode:0}}async function Pe(e,n){let t="",s="",r="",o="",a="inner",d="",u=0;for(let C=0;C<e.length;C++){let A=e[C];A==="--left"?a="left":A==="--right"?a="right":A==="--full"?a="full":(A==="-D"||A==="--default")&&C+1<e.length?d=e[++C]:A.startsWith("-")||(u++,u===1?t=A:u===2?s=A:u===3?r=A:u===4&&(o=A))}if(!t||!s||!r||!o)return{stdout:"",stderr:`xan join: usage: xan join KEY1 FILE1 KEY2 FILE2 [OPTIONS]
|
|
46
|
+
`,exitCode:1};let p=await v([s],n);if(p.error)return p.error;let c=await v([o],n);if(c.error)return c.error;let{headers:h,data:l}=p,{headers:i,data:f}=c;if(!h.includes(t))return{stdout:"",stderr:`xan join: column '${t}' not found in first file
|
|
47
|
+
`,exitCode:1};if(!i.includes(r))return{stdout:"",stderr:`xan join: column '${r}' not found in second file
|
|
48
|
+
`,exitCode:1};let m=new Map;for(let C of f){let A=String(C[r]??"");m.has(A)||m.set(A,[]),m.get(A)?.push(C)}let g=new Set(h),y=i.filter(C=>!g.has(C)),x=[...h,...y],k=[],N=new Set;for(let C of l){let A=String(C[t]??""),j=m.get(A);if(j&&j.length>0){N.add(A);for(let L of j){let T=F();for(let W of h)b(T,W,C[W]);for(let W of y)b(T,W,L[W]);k.push(T)}}else if(a==="left"||a==="full"){let L=F();for(let T of h)b(L,T,C[T]);for(let T of y)b(L,T,d);k.push(L)}}if(a==="right"||a==="full")for(let C of f){let A=String(C[r]??"");if(!N.has(A)){let j=F();for(let L of h)b(j,L,i.includes(L)?C[L]:d);for(let L of y)b(j,L,C[L]);k.push(j)}}return{stdout:w(x,k),stderr:"",exitCode:0}}async function Re(e,n){let t="",s="",r=[],o=[];for(let y=0;y<e.length;y++){let x=e[y];(x==="-g"||x==="--groupby")&&y+1<e.length?r=e[++y].split(",").map(k=>k.trim()):x.startsWith("-")||(t?s?o.push(x):s=x:t=x)}if(!t||!s)return{stdout:"",stderr:`xan pivot: usage: xan pivot COLUMN AGG_EXPR [OPTIONS] [FILE]
|
|
49
|
+
`,exitCode:1};let{headers:a,data:d,error:u}=await v(o,n);if(u)return u;if(!a.includes(t))return{stdout:"",stderr:`xan pivot: column '${t}' not found
|
|
50
|
+
`,exitCode:1};let p=s.match(/^(\w+)\((\w+)\)$/);if(!p)return{stdout:"",stderr:`xan pivot: invalid aggregation expression '${s}'
|
|
51
|
+
`,exitCode:1};let[,c,h]=p;r.length===0&&(r=a.filter(y=>y!==t&&y!==h));let l=[];for(let y of d){let x=String(y[t]??"");l.includes(x)||l.push(x)}let i=new Map,f=[];for(let y of d){let x=r.map(A=>String(y[A]??"")).join("\0"),k=String(y[t]??""),N=y[h];i.has(x)||(i.set(x,new Map),f.push(x));let C=i.get(x);C&&(C.has(k)||C.set(k,[]),C.get(k)?.push(N))}let m=[...r,...l],g=[];for(let y of f){let x=y.split("\0"),k=i.get(y);if(!k)continue;let N=F();for(let C=0;C<r.length;C++)b(N,r[C],x[C]);for(let C of l){let A=k.get(C)||[];b(N,C,ut(c,A))}g.push(N)}return{stdout:w(m,g),stderr:"",exitCode:0}}function ut(e,n){let t=n.filter(s=>s!=null).map(s=>typeof s=="number"?s:Number.parseFloat(String(s))).filter(s=>!Number.isNaN(s));switch(e){case"count":return n.length;case"sum":return t.reduce((s,r)=>s+r,0);case"mean":case"avg":return t.length>0?t.reduce((s,r)=>s+r,0)/t.length:null;case"min":return t.length>0?Math.min(...t):null;case"max":return t.length>0?Math.max(...t):null;case"first":return n.length>0?String(n[0]??""):null;case"last":return n.length>0?String(n[n.length-1]??""):null;default:return null}}async function Me(e,n){let t="",s=[];for(let d=0;d<e.length;d++){let u=e[d];(u==="-s"||u==="--sort")&&d+1<e.length?t=e[++d]:u.startsWith("-")||s.push(u)}if(s.length<2)return{stdout:"",stderr:`xan merge: usage: xan merge [OPTIONS] FILE1 FILE2 ...
|
|
52
|
+
`,exitCode:1};let r=[],o=null;for(let d of s){let u=await v([d],n);if(u.error)return u.error;if(o===null)o=u.headers;else if(JSON.stringify(o)!==JSON.stringify(u.headers))return{stdout:"",stderr:`xan merge: all files must have the same headers
|
|
53
|
+
`,exitCode:1};r.push({headers:u.headers,data:u.data})}if(!o)return{stdout:"",stderr:"",exitCode:0};let a=[];for(let{data:d}of r)a=a.concat(d);if(t){if(!o.includes(t))return{stdout:"",stderr:`xan merge: column '${t}' not found
|
|
54
|
+
`,exitCode:1};a.sort((d,u)=>{let p=d[t],c=u[t],h=typeof p=="number"?p:Number.parseFloat(String(p)),l=typeof c=="number"?c:Number.parseFloat(String(c));return!Number.isNaN(h)&&!Number.isNaN(l)?h-l:String(p??"").localeCompare(String(c??""))})}return{stdout:w(o,a),stderr:"",exitCode:0}}V();async function $e(e,n){let t=e.filter(u=>!u.startsWith("-")),{headers:s,data:r,error:o}=await v(t,n);return o||(r.length===0?{stdout:"",stderr:"",exitCode:0}:{stdout:r.map(u=>s.map(p=>u[p])).map(u=>u.map(p=>ct(p)).join(",")).join(`
|
|
55
|
+
`)+`
|
|
56
|
+
`,stderr:"",exitCode:0})}function ct(e){if(e==null)return"";let n=String(e);return n.includes(",")||n.includes('"')||n.includes(`
|
|
57
|
+
`)?`"${n.replace(/"/g,'""')}"`:n}async function Te(e,n){let t=null,s=null,r=[];for(let l=0;l<e.length;l++){let i=e[l];if(i==="--seed"&&l+1<e.length)s=Number.parseInt(e[++l],10);else if(!i.startsWith("-")){let f=Number.parseInt(i,10);t===null&&!Number.isNaN(f)&&f>0?t=f:r.push(i)}}if(t===null)return{stdout:"",stderr:`xan sample: usage: xan sample <sample-size> [FILE]
|
|
58
|
+
`,exitCode:1};let{headers:o,data:a,error:d}=await v(r,n);if(d)return d;if(a.length<=t)return{stdout:w(o,a),stderr:"",exitCode:0};let u=s!==null?s:Date.now(),p=()=>(u=u*1103515245+12345&2147483647,u/2147483647),c=a.map((l,i)=>i);for(let l=c.length-1;l>0;l--){let i=Math.floor(p()*(l+1));[c[l],c[i]]=[c[i],c[l]]}let h=c.slice(0,t).sort((l,i)=>l-i).map(l=>a[l]);return{stdout:w(o,h),stderr:"",exitCode:0}}async function je(e,n){let t=!1,s=[];for(let u=0;u<e.length;u++){let p=e[u];p==="-p"||p==="--pad"?t=!0:p.startsWith("-")||s.push(p)}if(s.length===0)return{stdout:"",stderr:`xan cat: no files specified
|
|
59
|
+
`,exitCode:1};let r=await _e(n,s,{cmdName:"xan cat",stopOnError:!0});if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:r.exitCode};let o=[],a=[];for(let{content:u}of r.files){let{headers:p,data:c}=He(_(u));o.push({headers:p,data:c});for(let h of p)a.includes(h)||a.push(h)}if(!t){let u=JSON.stringify(o[0].headers);for(let p=1;p<o.length;p++)if(JSON.stringify(o[p].headers)!==u)return{stdout:"",stderr:`xan cat: headers do not match (use -p to pad)
|
|
60
|
+
`,exitCode:1};a=o[0].headers}let d=[];for(let{headers:u,data:p}of o)for(let c of p){let h=F();for(let l of a)b(h,l,u.includes(l)?c[l]:"");d.push(h)}return{stdout:w(a,d),stderr:"",exitCode:0}}async function De(e,n){let t="",s=[],r=!1,o=!1,a=[];for(let i=0;i<e.length;i++){let f=e[i];(f==="-s"||f==="--select")&&i+1<e.length?s=e[++i].split(","):f==="-v"||f==="--invert"?r=!0:f==="-i"||f==="--ignore-case"?o=!0:f==="-r"||f==="--regex"||f.startsWith("-")||(t?a.push(f):t=f)}if(!t)return{stdout:"",stderr:`xan search: no pattern specified
|
|
61
|
+
`,exitCode:1};let{headers:d,data:u,error:p}=await v(a,n);if(p)return p;let c=s.length>0?s:d,h;try{h=J(t,o?"i":"")}catch{return{stdout:"",stderr:`xan search: invalid regex pattern '${t}'
|
|
62
|
+
`,exitCode:1}}let l=u.filter(i=>{let f=c.some(m=>{let g=i[m];return g!=null&&h.test(String(g))});return r?!f:f});return{stdout:w(d,l),stderr:"",exitCode:0}}async function Ue(e,n){let t="",s=[];for(let l of e)l.startsWith("-")||(t?s.push(l):t=l);if(!t)return{stdout:"",stderr:`xan flatmap: no expression specified
|
|
63
|
+
`,exitCode:1};let{headers:r,data:o,error:a}=await v(s,n);if(a)return a;let u=U(t).map(({expr:l,name:i})=>({alias:typeof i=="string"?i:i[0],ast:O(l)})),p={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},c=[...r,...u.map(l=>l.alias)],h=[];for(let l of o){let i=[],f=1;for(let m of u){let g=$(l,m.ast,p),y=g.length>0&&Array.isArray(g[0])?g[0]:g;i.push(y),f=Math.max(f,y.length)}for(let m=0;m<f;m++){let g=M(l);for(let y=0;y<u.length;y++){let x=i[y][m]??null;b(g,u[y].alias,x)}h.push(g)}}return{stdout:w(c,h),stderr:"",exitCode:0}}async function Ve(e,n){let{cmdView:t}=await import("./xan-view-JXOZLJ7S.js");return t(e,n)}var Qe=new Set(["fuzzy-join","glob","hist","input","parallel","plot","progress","range","scrape","tokenize","union-find"]),pt=new Set(["agg","behead","cat","count","dedup","drop","enum","explode","f","filter","fixlengths","flatmap","flatten","fmt","frequency","freq","from","groupby","head","headers","implode","join","map","merge","partition","pivot","rename","reverse","sample","search","select","shuffle","slice","sort","split","stats","tail","to","top","transform","transpose","view",...Qe]),Ze={name:"xan",summary:"CSV toolkit for data manipulation",usage:"xan <COMMAND> [OPTIONS] [FILE]",description:`xan is a collection of commands for working with CSV data.
|
|
64
|
+
It provides a simple, ergonomic interface for common data operations.
|
|
65
|
+
|
|
66
|
+
COMMANDS:
|
|
67
|
+
Core:
|
|
68
|
+
headers Show column names
|
|
69
|
+
count Count rows
|
|
70
|
+
head Show first N rows
|
|
71
|
+
tail Show last N rows
|
|
72
|
+
slice Extract row range
|
|
73
|
+
reverse Reverse row order
|
|
74
|
+
behead Remove header row
|
|
75
|
+
sample Random sample of rows
|
|
76
|
+
|
|
77
|
+
Column operations:
|
|
78
|
+
select Select columns (supports glob, ranges, negation)
|
|
79
|
+
drop Drop columns
|
|
80
|
+
rename Rename columns
|
|
81
|
+
enum Add row index column
|
|
82
|
+
|
|
83
|
+
Row operations:
|
|
84
|
+
filter Filter rows by expression
|
|
85
|
+
search Filter rows by regex match
|
|
86
|
+
sort Sort rows
|
|
87
|
+
dedup Remove duplicates
|
|
88
|
+
top Get top N by column
|
|
89
|
+
|
|
90
|
+
Transformations:
|
|
91
|
+
map Add computed columns
|
|
92
|
+
transform Modify existing columns
|
|
93
|
+
explode Split column into multiple rows
|
|
94
|
+
implode Combine rows, join column values
|
|
95
|
+
flatmap Map returning multiple rows
|
|
96
|
+
pivot Reshape rows into columns
|
|
97
|
+
transpose Swap rows and columns
|
|
98
|
+
|
|
99
|
+
Aggregation:
|
|
100
|
+
agg Aggregate values
|
|
101
|
+
groupby Group and aggregate
|
|
102
|
+
frequency Count value occurrences
|
|
103
|
+
stats Show column statistics
|
|
104
|
+
|
|
105
|
+
Multi-file:
|
|
106
|
+
cat Concatenate CSV files
|
|
107
|
+
join Join two CSV files on key
|
|
108
|
+
merge Merge sorted CSV files
|
|
109
|
+
split Split into multiple files
|
|
110
|
+
partition Split by column value
|
|
111
|
+
|
|
112
|
+
Data conversion:
|
|
113
|
+
to Convert CSV to other formats (json)
|
|
114
|
+
from Convert other formats to CSV (json)
|
|
115
|
+
shuffle Randomly reorder rows
|
|
116
|
+
fixlengths Fix ragged CSV files
|
|
117
|
+
|
|
118
|
+
Output:
|
|
119
|
+
view Pretty print as table
|
|
120
|
+
flatten Display records vertically (alias: f)
|
|
121
|
+
fmt Format output
|
|
122
|
+
|
|
123
|
+
EXAMPLES:
|
|
124
|
+
xan headers data.csv
|
|
125
|
+
xan count data.csv
|
|
126
|
+
xan head -n 5 data.csv
|
|
127
|
+
xan select name,email data.csv
|
|
128
|
+
xan select 'vec_*' data.csv # glob pattern
|
|
129
|
+
xan select 'a:c' data.csv # column range
|
|
130
|
+
xan filter 'age > 30' data.csv
|
|
131
|
+
xan search -r '^foo' data.csv
|
|
132
|
+
xan sort -N price data.csv
|
|
133
|
+
xan agg 'sum(amount) as total' data.csv
|
|
134
|
+
xan groupby region 'count() as n' data.csv
|
|
135
|
+
xan explode tags data.csv
|
|
136
|
+
xan join id file1.csv id file2.csv
|
|
137
|
+
xan pivot year 'sum(sales)' data.csv`,options:[" --help display this help and exit"]},ft={headers:{name:"xan headers",summary:"Show column names",usage:"xan headers [OPTIONS] [FILE]",description:"Display column names from a CSV file.",options:["-j, --just-names show names only (no index)"]},count:{name:"xan count",summary:"Count rows",usage:"xan count [FILE]",description:"Count the number of data rows (excluding header).",options:[]},filter:{name:"xan filter",summary:"Filter rows by expression",usage:"xan filter [OPTIONS] EXPR [FILE]",description:"Filter CSV rows using moonblade expressions.",options:["-v, --invert invert match","-l, --limit N limit output rows"]},search:{name:"xan search",summary:"Filter rows by regex",usage:"xan search [OPTIONS] PATTERN [FILE]",description:"Filter CSV rows by regex match on columns.",options:["-s, --select COLS search only these columns","-v, --invert invert match","-i, --ignore-case case insensitive"]},select:{name:"xan select",summary:"Select columns",usage:"xan select COLS [FILE]",description:"Select columns by name, index, glob, or range.",options:["Supports: col names, indices (0,1), ranges (a:c), globs (vec_*), negation (!col)"]},explode:{name:"xan explode",summary:"Split column into rows",usage:"xan explode COLUMN [OPTIONS] [FILE]",description:"Split delimited column values into multiple rows.",options:["-s, --separator SEP separator (default: |)","--drop-empty drop empty values","-r, --rename NAME rename column"]},implode:{name:"xan implode",summary:"Combine rows",usage:"xan implode COLUMN [OPTIONS] [FILE]",description:"Combine consecutive rows, joining column values.",options:["-s, --sep SEP separator (default: |)","-r, --rename NAME rename column"]},join:{name:"xan join",summary:"Join CSV files",usage:"xan join KEY1 FILE1 KEY2 FILE2 [OPTIONS]",description:"Join two CSV files on key columns.",options:["--left left outer join","--right right outer join","--full full outer join","-D, --default VAL default for missing"]},pivot:{name:"xan pivot",summary:"Reshape to columns",usage:"xan pivot COLUMN AGG_EXPR [OPTIONS] [FILE]",description:"Turn row values into columns.",options:["-g, --groupby COLS group by columns"]}},yn={name:"xan",async execute(e,n){if(e.length===0||G(e))return D(Ze);let t=e[0],s=e.slice(1);if(G(s)){let r=ft[t];return r?D(r):D(Ze)}if(Qe.has(t))return{stdout:"",stderr:`xan ${t}: not yet implemented
|
|
138
|
+
`,exitCode:1};switch(t){case"headers":return ce(s,n);case"count":return pe(s,n);case"head":return fe(s,n);case"tail":return de(s,n);case"slice":return he(s,n);case"reverse":return me(s,n);case"behead":return $e(s,n);case"sample":return Te(s,n);case"select":return ie(s,n);case"drop":return ae(s,n);case"rename":return le(s,n);case"enum":return ue(s,n);case"filter":return ke(s,n);case"search":return De(s,n);case"sort":return Ie(s,n);case"dedup":return Ne(s,n);case"top":return Ee(s,n);case"map":return Ae(s,n);case"transform":return Fe(s,n);case"explode":return Oe(s,n);case"implode":return Le(s,n);case"flatmap":return Ue(s,n);case"pivot":return Re(s,n);case"agg":return ne(s,n);case"groupby":return se(s,n);case"frequency":case"freq":return re(s,n);case"stats":return oe(s,n);case"cat":return je(s,n);case"join":return Pe(s,n);case"merge":return Me(s,n);case"split":return ve(s,n);case"partition":return Ce(s,n);case"to":return be(s,n);case"from":return Se(s,n);case"transpose":return ye(s,n);case"shuffle":return xe(s,n);case"fixlengths":return we(s,n);case"view":return Z(s,n);case"flatten":case"f":return Y(s,n);case"fmt":return Ve(s,n);default:return pt.has(t)?{stdout:"",stderr:`xan ${t}: not yet implemented
|
|
139
|
+
`,exitCode:1}:{stdout:"",stderr:`xan: unknown command '${t}'
|
|
140
|
+
Run 'xan --help' for usage.
|
|
141
|
+
`,exitCode:1}}}},xn={name:"xan",flags:[],stdinType:"text",needsArgs:!0};export{yn as a,xn as b};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
+
var o={name:"pwd",async execute(l,a){let t=!1;for(let e of l)if(e==="-P")t=!0;else if(e==="-L")t=!1;else{if(e==="--")break;e.startsWith("-")}let s=a.cwd;if(t)try{s=await a.fs.realpath(a.cwd)}catch{}return{stdout:`${s}
|
|
4
|
+
`,stderr:"",exitCode:0}}},f={name:"pwd",flags:[{flag:"-P",type:"boolean"},{flag:"-L",type:"boolean"}]};export{o as a,f as b};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
+
import{c as u,d as m}from"./chunk-VZK4FHWJ.js";async function w(t,n,s){let{cmdName:r,allowStdinMarker:d=!0,stopOnError:i=!1,batchSize:f=100}=s;if(n.length===0)return{files:[{filename:"",content:t.stdin}],stderr:"",exitCode:0};let a=[],c="",l=0;for(let o=0;o<n.length;o+=f){let h=n.slice(o,o+f),p=await Promise.all(h.map(async e=>{if(d&&e==="-")return{filename:"-",content:t.stdin,error:null};try{let C=t.fs.resolvePath(t.cwd,e),y=await m(t.fs,C);return{filename:e,content:y,error:null}}catch{return{filename:e,content:u,error:`${r}: ${e}: No such file or directory
|
|
4
|
+
`}}}));for(let e of p)if(e.error){if(c+=e.error,l=1,i)return{files:a,stderr:c,exitCode:l}}else a.push({filename:e.filename,content:e.content})}return{files:a,stderr:c,exitCode:l}}async function T(t,n,s){let r=await w(t,n,{...s,stopOnError:!0});return r.exitCode!==0?{ok:!1,error:{stdout:"",stderr:r.stderr,exitCode:r.exitCode}}:{ok:!0,content:r.files.map(i=>i.content).join("")}}export{w as a,T as b};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
+
import{a as g}from"./chunk-LNVSXNT7.js";function v(){let a=[{prop:"Function",target:globalThis,violationType:"function_constructor",strategy:"throw",reason:"Function constructor allows arbitrary code execution"},{prop:"eval",target:globalThis,violationType:"eval",strategy:"throw",reason:"eval() allows arbitrary code execution"},{prop:"setTimeout",target:globalThis,violationType:"setTimeout",strategy:"throw",reason:"setTimeout with string argument allows code execution"},{prop:"setInterval",target:globalThis,violationType:"setInterval",strategy:"throw",reason:"setInterval with string argument allows code execution"},{prop:"setImmediate",target:globalThis,violationType:"setImmediate",strategy:"throw",reason:"setImmediate could be used to escape sandbox context"},{prop:"env",target:process,violationType:"process_env",strategy:"throw",reason:"process.env could leak sensitive environment variables",allowedKeys:new Set(["NODE_V8_COVERAGE","NODE_DEBUG","NODE_DEBUG_NATIVE","NODE_COMPILE_CACHE","WATCH_REPORT_DEPENDENCIES","FORCE_COLOR","DEBUG","UNDICI_NO_FG","JEST_WORKER_ID","__MINIMATCH_TESTING_PLATFORM__","LOG_TOKENS","LOG_STREAM"])},{prop:"binding",target:process,violationType:"process_binding",strategy:"throw",reason:"process.binding provides access to native Node.js modules"},{prop:"_linkedBinding",target:process,violationType:"process_binding",strategy:"throw",reason:"process._linkedBinding provides access to native Node.js modules"},{prop:"dlopen",target:process,violationType:"process_dlopen",strategy:"throw",reason:"process.dlopen allows loading native addons"},{prop:"getBuiltinModule",target:process,violationType:"process_get_builtin_module",strategy:"throw",reason:"process.getBuiltinModule allows loading native Node.js modules (fs, child_process, vm)"},{prop:"exit",target:process,violationType:"process_exit",strategy:"throw",reason:"process.exit could terminate the interpreter"},{prop:"abort",target:process,violationType:"process_exit",strategy:"throw",reason:"process.abort could crash the interpreter"},{prop:"kill",target:process,violationType:"process_kill",strategy:"throw",reason:"process.kill could signal other processes"},{prop:"setuid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setuid could escalate privileges"},{prop:"setgid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setgid could escalate privileges"},{prop:"seteuid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.seteuid could escalate effective user privileges"},{prop:"setegid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setegid could escalate effective group privileges"},{prop:"initgroups",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.initgroups could modify supplementary group IDs"},{prop:"setgroups",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setgroups could modify supplementary group IDs"},{prop:"umask",target:process,violationType:"process_umask",strategy:"throw",reason:"process.umask could modify file creation permissions"},{prop:"argv",target:process,violationType:"process_argv",strategy:"throw",reason:"process.argv may contain secrets in CLI arguments"},{prop:"cwd",target:process,violationType:"process_chdir",strategy:"throw",reason:"process.cwd could disclose real host working directory path"},{prop:"chdir",target:process,violationType:"process_chdir",strategy:"throw",reason:"process.chdir could confuse the interpreter's CWD tracking"},{prop:"report",target:process,violationType:"process_report",strategy:"throw",reason:"process.report could disclose full environment, host paths, and system info"},{prop:"loadEnvFile",target:process,violationType:"process_env",strategy:"throw",reason:"process.loadEnvFile could load env files bypassing env proxy"},{prop:"setUncaughtExceptionCaptureCallback",target:process,violationType:"process_exception_handler",strategy:"throw",reason:"setUncaughtExceptionCaptureCallback could intercept security errors"},{prop:"send",target:process,violationType:"process_send",strategy:"throw",reason:"process.send could communicate with parent process in IPC contexts"},{prop:"channel",target:process,violationType:"process_channel",strategy:"throw",reason:"process.channel could access IPC channel to parent process"},{prop:"cpuUsage",target:process,violationType:"process_timing",strategy:"throw",reason:"process.cpuUsage could enable timing side-channel attacks"},{prop:"memoryUsage",target:process,violationType:"process_timing",strategy:"throw",reason:"process.memoryUsage could enable timing side-channel attacks"},{prop:"hrtime",target:process,violationType:"process_timing",strategy:"throw",reason:"process.hrtime could enable timing side-channel attacks"},{prop:"WeakRef",target:globalThis,violationType:"weak_ref",strategy:"throw",reason:"WeakRef could be used to leak references outside sandbox"},{prop:"FinalizationRegistry",target:globalThis,violationType:"finalization_registry",strategy:"throw",reason:"FinalizationRegistry could be used to leak references outside sandbox"},{prop:"Reflect",target:globalThis,violationType:"reflect",strategy:"freeze",reason:"Reflect provides introspection capabilities"},{prop:"Proxy",target:globalThis,violationType:"proxy",strategy:"throw",reason:"Proxy allows intercepting and modifying object behavior"},{prop:"WebAssembly",target:globalThis,violationType:"webassembly",strategy:"throw",reason:"WebAssembly allows executing arbitrary compiled code"},{prop:"SharedArrayBuffer",target:globalThis,violationType:"shared_array_buffer",strategy:"throw",reason:"SharedArrayBuffer could enable side-channel communication or timing attacks"},{prop:"Atomics",target:globalThis,violationType:"atomics",strategy:"throw",reason:"Atomics could enable side-channel communication or timing attacks"},{prop:"performance",target:globalThis,violationType:"performance_timing",strategy:"throw",reason:"performance.now() provides sub-millisecond timing for side-channel attacks"},{prop:"stdout",target:process,violationType:"process_stdout",strategy:"throw",reason:"process.stdout could bypass interpreter output to write to host stdout"},{prop:"stderr",target:process,violationType:"process_stderr",strategy:"throw",reason:"process.stderr could bypass interpreter output to write to host stderr"},{prop:"__defineGetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__defineGetter__ allows prototype pollution via getter injection"},{prop:"__defineSetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__defineSetter__ allows prototype pollution via setter injection"},{prop:"__lookupGetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__lookupGetter__ enables introspection for prototype pollution attacks"},{prop:"__lookupSetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__lookupSetter__ enables introspection for prototype pollution attacks"},{prop:"JSON",target:globalThis,violationType:"json_mutation",strategy:"freeze",reason:"Freeze JSON to prevent mutation of parsing/serialization"},{prop:"Math",target:globalThis,violationType:"math_mutation",strategy:"freeze",reason:"Freeze Math to prevent mutation of math utilities"}];try{let e=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&a.push({prop:"constructor",target:Object.getPrototypeOf(async()=>{}),violationType:"async_function_constructor",strategy:"throw",reason:"AsyncFunction constructor allows arbitrary async code execution"})}catch{}try{let e=Object.getPrototypeOf(function*(){}).constructor;e&&e!==Function&&a.push({prop:"constructor",target:Object.getPrototypeOf(function*(){}),violationType:"generator_function_constructor",strategy:"throw",reason:"GeneratorFunction constructor allows arbitrary generator code execution"})}catch{}try{let e=Object.getPrototypeOf(async function*(){}).constructor;e&&e!==Function&&e!==Object.getPrototypeOf(async()=>{}).constructor&&a.push({prop:"constructor",target:Object.getPrototypeOf(async function*(){}),violationType:"async_generator_function_constructor",strategy:"throw",reason:"AsyncGeneratorFunction constructor allows arbitrary async generator code execution"})}catch{}return a.filter(e=>{try{return e.target[e.prop]!==void 0}catch{return!1}})}var f=typeof __BROWSER__<"u"&&__BROWSER__;function w(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let e=Math.random()*16|0;return(a==="x"?e:e&3|8).toString(16)})}var x=null;if(!f)try{let{AsyncLocalStorage:a}=g("node:async_hooks");x=a}catch{}var k=`
|
|
4
|
+
|
|
5
|
+
This is a defense-in-depth measure and indicates a bug in just-bash. Please report this at security@vercel.com`,d=class extends Error{violation;constructor(e,t){super(e+k),this.violation=t,this.name="SecurityViolationError"}},u=!f&&x?new x:null,T=1e3;function D(a,e,...t){return u.run(a,()=>e(...t))}var m={enabled:!0,auditMode:!1};function E(a){return a===void 0?{...m,enabled:!1}:typeof a=="boolean"?{...m,enabled:a}:{...m,...a}}var _=class a{static instance=null;static importHooksRegistered=!1;static trustedExecutionDepth=new Map;config;refCount=0;patchFailures=[];activeExecutionIds=new Set;contextCache=new Map;originalDescriptors=[];violations=[];activationTime=0;totalActiveTimeMs=0;constructor(e){this.config=e}static getInstance(e){let t=E(e);if(!a.instance)a.instance=new a(t);else{let r=a.instance.config;if(t.enabled!==r.enabled||t.auditMode!==r.auditMode)throw new Error(`DefenseInDepthBox config conflict: requested {enabled: ${t.enabled}, auditMode: ${t.auditMode}} but singleton already has {enabled: ${r.enabled}, auditMode: ${r.auditMode}}. All Bash instances must use the same defense-in-depth security settings, or call DefenseInDepthBox.resetInstance() between incompatible configurations.`)}return a.instance}static resetInstance(){a.instance&&(a.instance.forceDeactivate(),a.instance=null),a.trustedExecutionDepth.clear()}static isInSandboxedContext(){return u?u?.getStore()?.sandboxActive===!0:!1}static getCurrentExecutionId(){if(u)return u?.getStore()?.executionId}static enterTrustedScope(e){let t=a.trustedExecutionDepth.get(e)??0;a.trustedExecutionDepth.set(e,t+1)}static leaveTrustedScope(e){let t=a.trustedExecutionDepth.get(e);if(t){if(t===1){a.trustedExecutionDepth.delete(e);return}a.trustedExecutionDepth.set(e,t-1)}}static isTrustedScopeActive(e){return e?(a.trustedExecutionDepth.get(e)??0)>0:!1}isExecutionIdActive(e){return this.activeExecutionIds.has(e)}getCachedContext(e){let t=this.contextCache.get(e);return t||(t={sandboxActive:!0,executionId:e},this.contextCache.set(e,t)),t}getPreferredActiveExecutionId(){if(this.activeExecutionIds.size!==0)for(let e of this.activeExecutionIds)return e}static bindCurrentContext(e){if(!u)return e;let t=a.instance,r=u.getStore(),s=r?.sandboxActive===!0?r.executionId:t?.getPreferredActiveExecutionId();if(!s)return e;let n=t?.getCachedContext(s)??{sandboxActive:!0,executionId:s};return((...o)=>{let i=a.instance;if(!(i&&!i.isExecutionIdActive(s)&&(i.recordViolation("bound_callback_after_deactivate","bound callback","Bound callback blocked after originating execution was deactivated"),!i.config.auditMode)))return D(n,e,...o)})}isEnabled(){return this.config.enabled===!0&&u!==null&&!f}updateConfig(e){this.config={...this.config,...e}}activate(){if(f||!this.config.enabled||!u){let r=w(),s=!1;return{run:n=>s?Promise.reject(new Error("DefenseInDepthBox handle is deactivated and cannot run new work")):n(),deactivate:()=>{s=!0},executionId:r}}this.refCount++,this.refCount===1&&(this.applyPatches(),this.activationTime=Date.now());let e=w(),t=!1;return{run:r=>t?Promise.reject(new Error("DefenseInDepthBox handle is deactivated and cannot run new work")):(this.activeExecutionIds.add(e),u.run({sandboxActive:!0,executionId:e},r)),deactivate:()=>{t||(t=!0,this.activeExecutionIds.delete(e),this.contextCache.delete(e),this.refCount--,this.refCount===0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.refCount<0&&(this.refCount=0))},executionId:e}}forceDeactivate(){this.refCount>0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.activeExecutionIds.clear(),this.contextCache.clear(),this.refCount=0}isActive(){return this.refCount>0}getStats(){return{violationsBlocked:this.violations.length,violations:[...this.violations],activeTimeMs:this.totalActiveTimeMs+(this.refCount>0?Date.now()-this.activationTime:0),refCount:this.refCount}}getPatchFailures(){return[...this.patchFailures]}clearViolations(){this.violations=[]}getPathForTarget(e,t){return e===globalThis?`globalThis.${t}`:e===process?`process.${t}`:e===Error?`Error.${t}`:e===Function.prototype?`Function.prototype.${t}`:e===Object.prototype?`Object.prototype.${t}`:`<object>.${t}`}static runTrusted(e){if(!u)return e();let t=u.getStore();if(!t)return e();let{executionId:r}=t;return u.run({...t,trusted:!0},()=>{a.enterTrustedScope(r);try{let s=e();return typeof s=="object"&&s!==null&&"finally"in s&&typeof s.finally=="function"?s.finally(()=>{a.leaveTrustedScope(r)}):(a.leaveTrustedScope(r),s)}catch(s){throw a.leaveTrustedScope(r),s}})}static async runTrustedAsync(e){if(!u)return e();let t=u.getStore();if(!t)return e();let{executionId:r}=t;return u.run({...t,trusted:!0},async()=>{a.enterTrustedScope(r);try{return await e()}finally{a.leaveTrustedScope(r)}})}shouldBlock(){if(f||this.config.auditMode||!u)return!1;let e=u?.getStore();return!(e?.sandboxActive!==!0||e.trusted||a.isTrustedScopeActive(e.executionId))}recordViolation(e,t,r){let s={timestamp:Date.now(),type:e,message:r,path:t,stack:new Error().stack,executionId:u?.getStore()?.executionId};if(this.violations.length<T&&this.violations.push(s),this.config.onViolation)try{this.config.onViolation(s)}catch(n){console.debug("[DefenseInDepthBox] onViolation callback threw:",n instanceof Error?n.message:n)}return s}createBlockingProxy(e,t,r){let s=this;return new Proxy(e,{apply(n,o,i){if(s.shouldBlock()){let c=`${t} is blocked during script execution`,l=s.recordViolation(r,t,c);throw new d(c,l)}return s.config.auditMode&&u?.getStore()?.sandboxActive===!0&&s.recordViolation(r,t,`${t} called (audit mode)`),Reflect.apply(n,o,i)},construct(n,o,i){if(s.shouldBlock()){let c=`${t} constructor is blocked during script execution`,l=s.recordViolation(r,t,c);throw new d(c,l)}return s.config.auditMode&&u?.getStore()?.sandboxActive===!0&&s.recordViolation(r,t,`${t} constructor called (audit mode)`),Reflect.construct(n,o,i)}})}createBlockingObjectProxy(e,t,r,s){let n=this;return new Proxy(e,{get(o,i,c){if(n.shouldBlock()){if(s&&typeof i=="string"&&s.has(i))return Reflect.get(o,i,c);let l=`${t}.${String(i)}`,p=`${l} is blocked during script execution`,h=n.recordViolation(r,l,p);throw new d(p,h)}if(n.config.auditMode&&u?.getStore()?.sandboxActive===!0){let l=`${t}.${String(i)}`;n.recordViolation(r,l,`${l} accessed (audit mode)`)}return Reflect.get(o,i,c)},set(o,i,c,l){if(n.shouldBlock()){let p=`${t}.${String(i)}`,h=`${p} modification is blocked during script execution`,y=n.recordViolation(r,p,h);throw new d(h,y)}return Reflect.set(o,i,c,l)},ownKeys(o){if(n.shouldBlock()){let i=`${t} enumeration is blocked during script execution`,c=n.recordViolation(r,t,i);throw new d(i,c)}return Reflect.ownKeys(o)},getOwnPropertyDescriptor(o,i){if(n.shouldBlock()){let c=`${t}.${String(i)}`,l=`${c} descriptor access is blocked during script execution`,p=n.recordViolation(r,c,l);throw new d(l,p)}return Reflect.getOwnPropertyDescriptor(o,i)},has(o,i){if(n.shouldBlock()){let c=`${t}.${String(i)}`,l=`${c} existence check is blocked during script execution`,p=n.recordViolation(r,c,l);throw new d(l,p)}return Reflect.has(o,i)},deleteProperty(o,i){if(n.shouldBlock()){let c=`${t}.${String(i)}`,l=`${c} deletion is blocked during script execution`,p=n.recordViolation(r,c,l);throw new d(l,p)}return Reflect.deleteProperty(o,i)},setPrototypeOf(o,i){if(n.shouldBlock()){let c=`${t} setPrototypeOf is blocked during script execution`,l=n.recordViolation(r,t,c);throw new d(c,l)}return Reflect.setPrototypeOf(o,i)},defineProperty(o,i,c){if(n.shouldBlock()){let l=`${t}.${String(i)}`,p=`${l} defineProperty is blocked during script execution`,h=n.recordViolation(r,l,p);throw new d(p,h)}return Reflect.defineProperty(o,i,c)}})}applyPatches(){this.patchFailures=[];let e=v(),t=new Set(["process_send","process_channel","process_stdout","process_stderr"]);for(let n of e)t.has(n.violationType)||this.applyPatch(n);this.protectConstructorChain(),this.protectErrorPrepareStackTrace(),this.protectPromiseThen(),this.protectDynamicImport(),this.protectModuleLoad(),this.protectModuleResolveFilename(),this.protectProcessMainModule(),this.protectProcessExecPath(),this.lockWellKnownSymbols(),this.protectProxyRevocable();let r=["Function.prototype.constructor","Module._load"],s=this.patchFailures.filter(n=>r.includes(n));if(s.length>0)throw this.restorePatches(),new Error(`DefenseInDepthBox: critical patches failed: ${s.join(", ")}`)}protectConstructorChain(){this.patchPrototypeConstructor(Function.prototype,"Function.prototype.constructor","function_constructor");try{let e=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,"AsyncFunction.prototype.constructor","async_function_constructor")}catch(e){this.patchFailures.push("AsyncFunction.prototype.constructor"),console.debug("[DefenseInDepthBox] Could not patch AsyncFunction.prototype.constructor:",e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(function*(){}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,"GeneratorFunction.prototype.constructor","generator_function_constructor")}catch(e){this.patchFailures.push("GeneratorFunction.prototype.constructor"),console.debug("[DefenseInDepthBox] Could not patch GeneratorFunction.prototype.constructor:",e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(async function*(){}).constructor,t=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&e!==t&&this.patchPrototypeConstructor(e.prototype,"AsyncGeneratorFunction.prototype.constructor","async_generator_function_constructor")}catch(e){this.patchFailures.push("AsyncGeneratorFunction.prototype.constructor"),console.debug("[DefenseInDepthBox] Could not patch AsyncGeneratorFunction.prototype.constructor:",e instanceof Error?e.message:e)}}protectErrorPrepareStackTrace(){let e=this;try{let t=Object.getOwnPropertyDescriptor(Error,"prepareStackTrace");this.originalDescriptors.push({target:Error,prop:"prepareStackTrace",descriptor:t});let r=t?.value;Object.defineProperty(Error,"prepareStackTrace",{get(){return r},set(s){if(e.shouldBlock()){let n="Error.prepareStackTrace modification is blocked during script execution",o=e.recordViolation("error_prepare_stack_trace","Error.prepareStackTrace",n);throw new d(n,o)}e.config.auditMode&&u?.getStore()?.sandboxActive===!0&&e.recordViolation("error_prepare_stack_trace","Error.prepareStackTrace","Error.prepareStackTrace set (audit mode)"),r=s},configurable:!0})}catch(t){this.patchFailures.push("Error.prepareStackTrace"),console.debug("[DefenseInDepthBox] Could not protect Error.prepareStackTrace:",t instanceof Error?t.message:t)}}protectPromiseThen(){let e=this;try{let n=function(...o){return u.run(this.captured,()=>{if(!this.box.isExecutionIdActive(this.executionId)){if(this.box.recordViolation("promise_then_after_deactivate","Promise.then","Promise.then callback is blocked after defense deactivation"),this.box.config.auditMode)return Reflect.apply(this.cb,void 0,o);if(this.kind==="fulfilled")return o[0];throw o[0]}return Reflect.apply(this.cb,void 0,o)})};var t=n;let r=Object.getOwnPropertyDescriptor(Promise.prototype,"then");this.originalDescriptors.push({target:Promise.prototype,prop:"then",descriptor:r});let s=r?.value;if(typeof s!="function")return;Object.defineProperty(Promise.prototype,"then",{value:function(i,c){if(!u)return Reflect.apply(s,this,[i,c]);let l=u.getStore(),p=l?.sandboxActive===!0&&l.trusted!==!0?l.executionId:void 0;if(!p)return Reflect.apply(s,this,[i,c]);let h=e.getCachedContext(p),y=(b,P)=>typeof b!="function"?b:n.bind({box:e,executionId:p,captured:h,cb:b,kind:P});return Reflect.apply(s,this,[y(i,"fulfilled"),y(c,"rejected")])},writable:!0,configurable:!0})}catch(r){this.patchFailures.push("Promise.prototype.then"),console.debug("[DefenseInDepthBox] Could not protect Promise.prototype.then:",r instanceof Error?r.message:r)}}patchPrototypeConstructor(e,t,r){let s=this;try{let n=Object.getOwnPropertyDescriptor(e,"constructor");this.originalDescriptors.push({target:e,prop:"constructor",descriptor:n});let o=n?.value;Object.defineProperty(e,"constructor",{get(){if(s.shouldBlock()){let i=`${t} access is blocked during script execution`,c=s.recordViolation(r,t,i);throw new d(i,c)}return s.config.auditMode&&u?.getStore()?.sandboxActive===!0&&s.recordViolation(r,t,`${t} accessed (audit mode)`),o},set(i){if(s.shouldBlock()){let c=`${t} modification is blocked during script execution`,l=s.recordViolation(r,t,c);throw new d(c,l)}Object.defineProperty(this,"constructor",{value:i,writable:!0,configurable:!0})},configurable:!0})}catch(n){this.patchFailures.push(t),console.debug(`[DefenseInDepthBox] Could not patch ${t}:`,n instanceof Error?n.message:n)}}protectProcessMainModule(){if(typeof process>"u")return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,"mainModule");this.originalDescriptors.push({target:process,prop:"mainModule",descriptor:t});let r=t?.value;r!==void 0&&Object.defineProperty(process,"mainModule",{get(){if(e.shouldBlock()){let s="process.mainModule access is blocked during script execution",n=e.recordViolation("process_main_module","process.mainModule",s);throw new d(s,n)}return e.config.auditMode&&u?.getStore()?.sandboxActive===!0&&e.recordViolation("process_main_module","process.mainModule","process.mainModule accessed (audit mode)"),r},set(s){if(e.shouldBlock()){let n="process.mainModule modification is blocked during script execution",o=e.recordViolation("process_main_module","process.mainModule",n);throw new d(n,o)}Object.defineProperty(process,"mainModule",{value:s,writable:!0,configurable:!0})},configurable:!0})}catch(t){this.patchFailures.push("process.mainModule"),console.debug("[DefenseInDepthBox] Could not protect process.mainModule:",t instanceof Error?t.message:t)}}protectProcessExecPath(){if(typeof process>"u")return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,"execPath");this.originalDescriptors.push({target:process,prop:"execPath",descriptor:t});let r=t?.value??process.execPath;Object.defineProperty(process,"execPath",{get(){if(e.shouldBlock()){let s="process.execPath access is blocked during script execution",n=e.recordViolation("process_exec_path","process.execPath",s);throw new d(s,n)}return e.config.auditMode&&u?.getStore()?.sandboxActive===!0&&e.recordViolation("process_exec_path","process.execPath","process.execPath accessed (audit mode)"),r},set(s){if(e.shouldBlock()){let n="process.execPath modification is blocked during script execution",o=e.recordViolation("process_exec_path","process.execPath",n);throw new d(n,o)}Object.defineProperty(process,"execPath",{value:s,writable:!0,configurable:!0})},configurable:!0})}catch(t){this.patchFailures.push("process.execPath"),console.debug("[DefenseInDepthBox] Could not protect process.execPath:",t instanceof Error?t.message:t)}}lockWellKnownSymbols(){let e=(t,r)=>{try{let s=Object.getOwnPropertyDescriptor(t,r);if(s?.configurable){if("value"in s){Object.defineProperty(t,r,{...s,configurable:!1,writable:!1});return}Object.defineProperty(t,r,{...s,configurable:!1})}}catch{}};for(let t of[Array,Map,Set,RegExp,Promise])e(t,Symbol.species);for(let t of[Array.prototype,String.prototype,Map.prototype,Set.prototype])e(t,Symbol.iterator);e(Symbol.prototype,Symbol.toPrimitive),e(Date.prototype,Symbol.toPrimitive);for(let t of[Symbol.match,Symbol.matchAll,Symbol.replace,Symbol.search,Symbol.split])e(RegExp.prototype,t);e(Function.prototype,Symbol.hasInstance),e(Array.prototype,Symbol.unscopables);for(let t of[Map.prototype,Set.prototype,Promise.prototype,ArrayBuffer.prototype])e(t,Symbol.toStringTag);try{let t=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");this.originalDescriptors.push({target:Error,prop:"stackTraceLimit",descriptor:t}),Object.defineProperty(Error,"stackTraceLimit",{value:Error.stackTraceLimit,writable:!1,configurable:!0})}catch{}}protectProxyRevocable(){let e=this;try{let t=Proxy.revocable;if(typeof t!="function")return;let r=Object.getOwnPropertyDescriptor(Proxy,"revocable");this.originalDescriptors.push({target:Proxy,prop:"revocable",descriptor:r}),Object.defineProperty(Proxy,"revocable",{value:function(n,o){if(e.shouldBlock()){let i="Proxy.revocable is blocked during script execution",c=e.recordViolation("proxy","Proxy.revocable",i);throw new d(i,c)}return e.config.auditMode&&u?.getStore()?.sandboxActive===!0&&e.recordViolation("proxy","Proxy.revocable","Proxy.revocable called (audit mode)"),t(n,o)},writable:!1,configurable:!0})}catch(t){this.patchFailures.push("Proxy.revocable"),console.debug("[DefenseInDepthBox] Could not protect Proxy.revocable:",t instanceof Error?t.message:t)}}protectDynamicImport(){if(!(f||a.importHooksRegistered))try{let e=this,t=g("node:module"),r=new Set;for(let o of t.builtinModules??[]){let i=o.startsWith("node:")?o.slice(5):o;r.add(i);let c=i.indexOf("/");c>0&&r.add(i.slice(0,c))}let s=o=>{if(o.startsWith("./")||o.startsWith("../")||o.startsWith("/")||o.startsWith("file:")||o.startsWith("data:")||o.startsWith("blob:")||o.startsWith("http:")||o.startsWith("https:"))return!1;let i=o.startsWith("node:")?o.slice(5):o;if(!i)return!1;if(typeof t.isBuiltin=="function"&&t.isBuiltin(i)||r.has(i))return!0;let c=i.indexOf("/");return c>0&&r.has(i.slice(0,c))},n=()=>{let o=u?.getStore();return e.config.auditMode===!0&&o?.sandboxActive===!0&&o.trusted!==!0&&!a.isTrustedScopeActive(o.executionId)};if(typeof t.registerHooks=="function"){t.registerHooks({resolve(o,i,c){if(o.startsWith("data:")||o.startsWith("blob:"))throw new Error(`dynamic import of ${o.startsWith("data:")?"data:":"blob:"} URLs is blocked by defense-in-depth`);if(s(o)){let l=`import(${o})`,p=`dynamic import of Node.js builtin '${o}' is blocked during script execution`;if(e.shouldBlock()){let h=e.recordViolation("dynamic_import_builtin",l,p);throw new d(p,h)}n()&&e.recordViolation("dynamic_import_builtin",l,`dynamic import of Node.js builtin '${o}' called (audit mode)`)}return c(o,i)}}),a.importHooksRegistered=!0;return}if(typeof t.register=="function"){let o=["export async function resolve(specifier, context, nextResolve) {",' if (specifier.startsWith("data:") || specifier.startsWith("blob:")) {',' throw new Error("dynamic import of " + (specifier.startsWith("data:") ? "data:" : "blob:") + " URLs is blocked by defense-in-depth");'," }"," return nextResolve(specifier, context);","}"].join(`
|
|
6
|
+
`);t.register(`data:text/javascript,${encodeURIComponent(o)}`),a.importHooksRegistered=!0}}catch(e){console.debug("[DefenseInDepthBox] Could not register import() hooks:",e instanceof Error?e.message:e)}}protectModuleLoad(){if(!f)try{let e=null;if(typeof process<"u"){let o=process.mainModule;o&&typeof o=="object"&&(e=o.constructor)}if(!e&&typeof g<"u"&&typeof g.main<"u"&&(e=g.main.constructor),!e||typeof e._load!="function")return;let t=e._load,r=Object.getOwnPropertyDescriptor(e,"_load");this.originalDescriptors.push({target:e,prop:"_load",descriptor:r});let n=this.createBlockingProxy(t,"Module._load","module_load");Object.defineProperty(e,"_load",{value:n,writable:!0,configurable:!0})}catch(e){this.patchFailures.push("Module._load"),console.debug("[DefenseInDepthBox] Could not protect Module._load:",e instanceof Error?e.message:e)}}protectModuleResolveFilename(){if(!f)try{let e=null;if(typeof process<"u"){let o=process.mainModule;o&&typeof o=="object"&&(e=o.constructor)}if(!e&&typeof g<"u"&&typeof g.main<"u"&&(e=g.main.constructor),!e||typeof e._resolveFilename!="function")return;let t=e._resolveFilename,r=Object.getOwnPropertyDescriptor(e,"_resolveFilename");this.originalDescriptors.push({target:e,prop:"_resolveFilename",descriptor:r});let n=this.createBlockingProxy(t,"Module._resolveFilename","module_resolve_filename");Object.defineProperty(e,"_resolveFilename",{value:n,writable:!0,configurable:!0})}catch(e){this.patchFailures.push("Module._resolveFilename"),console.debug("[DefenseInDepthBox] Could not protect Module._resolveFilename:",e instanceof Error?e.message:e)}}applyPatch(e){let{target:t,prop:r,violationType:s,strategy:n}=e;try{let o=t[r];if(o===void 0)return;let i=Object.getOwnPropertyDescriptor(t,r);if(this.originalDescriptors.push({target:t,prop:r,descriptor:i}),n==="freeze")typeof o=="object"&&o!==null&&Object.freeze(o);else{let c=this.getPathForTarget(t,r),l=typeof o=="function"?this.createBlockingProxy(o,c,s):this.createBlockingObjectProxy(o,c,s,e.allowedKeys);Object.defineProperty(t,r,{value:l,writable:!0,configurable:!0})}}catch(o){let i=this.getPathForTarget(t,r);this.patchFailures.push(i),console.debug(`[DefenseInDepthBox] Could not patch ${i}:`,o instanceof Error?o.message:o)}}restorePatches(){for(let e=this.originalDescriptors.length-1;e>=0;e--){let{target:t,prop:r,descriptor:s}=this.originalDescriptors[e];try{s?Object.defineProperty(t,r,s):delete t[r]}catch(n){let o=this.getPathForTarget(t,r);console.debug(`[DefenseInDepthBox] Could not restore ${o}:`,n instanceof Error?n.message:n)}}this.originalDescriptors=[]}};export{d as a,_ as b};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
+
import{a as p}from"./chunk-VZK4FHWJ.js";import{a as h,b as w,c as b}from"./chunk-MUFNRCMY.js";var g={name:"fold",summary:"wrap each input line to fit in specified width",usage:"fold [OPTION]... [FILE]...",description:"Wrap input lines in each FILE, writing to standard output. If no FILE is specified, standard input is read.",options:["-w WIDTH Use WIDTH columns instead of 80","-s Break at spaces","-b Count bytes rather than columns"],examples:["fold -w 40 file.txt # Wrap at 40 columns","fold -sw 40 file.txt # Word wrap at 40 columns","echo 'long line' | fold -w 5 # Force wrap at 5"]};function y(s,r,n){return n?new TextEncoder().encode(s).length:s===" "?8-r%8:s==="\b"?-1:1}function N(s,r){if(s.length===0)return s;let{width:n,breakAtSpaces:u,countBytes:i}=r,l=[],e="",t=0,o=-1,f=0;for(let c=0;c<s.length;c++){let a=s[c],d=y(a,t,i);t+d>n&&e.length>0?u&&o>=0?(l.push(e.slice(0,o+1)),e=e.slice(o+1)+a,t=t-f-1+d,o=-1,f=0):(l.push(e),e=a,t=d,o=-1,f=0):(e+=a,t+=d,(a===" "||a===" ")&&(o=e.length-1,f=t-d))}return e.length>0&&l.push(e),l.join(`
|
|
4
|
+
`)}function m(s,r){if(s==="")return"";let n=s.split(`
|
|
5
|
+
`),u=s.endsWith(`
|
|
6
|
+
`)&&n[n.length-1]==="";return u&&n.pop(),n.map(l=>N(l,r)).join(`
|
|
7
|
+
`)+(u?`
|
|
8
|
+
`:"")}var I={name:"fold",execute:async(s,r)=>{if(w(s))return h(g);let n={width:80,breakAtSpaces:!1,countBytes:!1},u=[],i=0;for(;i<s.length;){let e=s[i];if(e==="-w"&&i+1<s.length){let t=parseInt(s[i+1],10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${s[i+1]}'
|
|
9
|
+
`};n.width=t,i+=2}else if(e.startsWith("-w")&&e.length>2){let t=parseInt(e.slice(2),10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${e.slice(2)}'
|
|
10
|
+
`};n.width=t,i++}else if(e==="-s")n.breakAtSpaces=!0,i++;else if(e==="-b")n.countBytes=!0,i++;else if(e==="-bs"||e==="-sb")n.breakAtSpaces=!0,n.countBytes=!0,i++;else if(e.match(/^-[sb]+w\d+$/)){e.includes("s")&&(n.breakAtSpaces=!0),e.includes("b")&&(n.countBytes=!0);let t=e.replace(/^-[sb]+w/,""),o=parseInt(t,10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${t}'
|
|
11
|
+
`};n.width=o,i++}else if(e.match(/^-[sb]+w$/)&&i+1<s.length){e.includes("s")&&(n.breakAtSpaces=!0),e.includes("b")&&(n.countBytes=!0);let t=parseInt(s[i+1],10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${s[i+1]}'
|
|
12
|
+
`};n.width=t,i+=2}else if(e==="--"){u.push(...s.slice(i+1));break}else if(e.startsWith("-")&&e!=="-"){let t=e.slice(1),o=!1;for(let f of t)if(f==="s")n.breakAtSpaces=!0;else if(f==="b")n.countBytes=!0;else{o=!0;break}if(o)return b("fold",e);i++}else u.push(e),i++}let l="";if(u.length===0){let e=p(r.stdin)??"";l=m(e,n)}else for(let e of u){let t=r.fs.resolvePath(r.cwd,e),o=await r.fs.readFile(t);if(o===null)return{exitCode:1,stdout:l,stderr:`fold: ${e}: No such file or directory
|
|
13
|
+
`};l+=m(o,n)}return{exitCode:0,stdout:l,stderr:""}}},C={name:"fold",flags:[{flag:"-w",type:"value",valueHint:"number"},{flag:"-s",type:"boolean"},{flag:"-b",type:"boolean"}],stdinType:"text",needsFiles:!0};export{I as a,C as b};
|