@eidos.space/just-bash 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/bin/chunks/{awk2-RLMNTGI7.js → awk2-M5P56WFW.js} +1 -1
- package/dist/bin/{shell/chunks/base64-RZRLGMB3.js → chunks/base64-3BBQMQBD.js} +1 -1
- package/dist/bin/{shell/chunks/bash-CLP24TE2.js → chunks/bash-JOHLB5EM.js} +1 -1
- package/dist/bin/{shell/chunks/cat-LQH5FSAR.js → chunks/cat-QS3FUD2R.js} +1 -1
- package/dist/bin/chunks/{chunk-L24QXM5S.js → chunk-2AUW2OVD.js} +1 -1
- package/dist/bin/chunks/{chunk-EDTBGO7F.js → chunk-3ERCSYXB.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-X4MX6EHF.js → chunks/chunk-46EFQINR.js} +1 -1
- package/dist/bin/chunks/{chunk-7NC4CPHS.js → chunk-4HZ2J7WU.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-UO5LOD7U.js → chunks/chunk-4J4HK3AP.js} +1 -1
- package/dist/bin/chunks/{chunk-PAYQNSZN.js → chunk-4TKEQ5JF.js} +1 -1
- package/dist/bin/chunks/{chunk-V2RP73X4.js → chunk-4TZMT56V.js} +1 -1
- package/dist/bin/chunks/{chunk-F3GKANW3.js → chunk-5MAZXOIE.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-6FSBHK6H.js → chunks/chunk-6CMV7VZ7.js} +1 -1
- package/dist/bin/chunks/{chunk-FVRXEJYQ.js → chunk-7X6QFILN.js} +2 -2
- package/dist/bin/{shell/chunks/chunk-2SVX7I5P.js → chunks/chunk-A66SLDOH.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-Q4UMTSRO.js → chunks/chunk-AIE46WV2.js} +1 -1
- package/dist/bin/chunks/{chunk-VBDLSL7Y.js → chunk-CVDY2PJ2.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-H7JTIXAO.js → chunks/chunk-DSS5HVJD.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-M65CQLJE.js → chunks/chunk-E2TTMLYF.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-HN2DCT7T.js → chunks/chunk-E35XCU6G.js} +1 -1
- package/dist/bin/chunks/{chunk-JZW7NFK2.js → chunk-EVVJUFZE.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-C7ISPH7Y.js → chunks/chunk-FKCULB5D.js} +1 -1
- package/dist/bin/chunks/{chunk-YY5PJR7O.js → chunk-G5P37XAS.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-CAZ75E7E.js → chunks/chunk-IAGQA4VJ.js} +1 -1
- package/dist/bin/chunks/{chunk-22HCD466.js → chunk-JARRTDRA.js} +1 -1
- package/dist/bin/chunks/{chunk-JNUX75OX.js → chunk-JW42N6DP.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-7UU7KPEM.js → chunks/chunk-LLC5H7UY.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-NXVG64T3.js → chunks/chunk-MMSWVFQQ.js} +1 -1
- package/dist/bin/chunks/{chunk-2NRAWO6E.js → chunk-MQIPLKAA.js} +1 -1
- package/dist/bin/chunks/{chunk-YOKQNNQO.js → chunk-NK4UMOPJ.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-OPMLWMNH.js → chunks/chunk-OUWMQLWU.js} +1 -1
- package/dist/bin/chunks/{chunk-KFMPGSUT.js → chunk-PEI4ZGEQ.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-7AYT3UKI.js → chunks/chunk-PNPB62GH.js} +1 -1
- package/dist/bin/chunks/chunk-PUSAQWLR.js +3 -0
- package/dist/bin/chunks/{chunk-LAHBP3FW.js → chunk-QMRTESE5.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-IZGLHVBB.js → chunks/chunk-RGDGVTPT.js} +1 -1
- package/dist/bin/chunks/{chunk-FKVQZWJQ.js → chunk-TO6JCMLQ.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-F3WNDKOC.js → chunks/chunk-TVCXF3IW.js} +1 -1
- package/dist/bin/chunks/{chunk-J7TUF2VI.js → chunk-V2CUST2J.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-XJ37N3S5.js → chunks/chunk-VZTJXRFX.js} +1 -1
- package/dist/bin/chunks/{column-AQB3A3PJ.js → column-W6LUR2XZ.js} +1 -1
- package/dist/bin/{shell/chunks/comm-Q4VDF6ZO.js → chunks/comm-YSS52S62.js} +1 -1
- package/dist/bin/chunks/{curl-PLHETP4J.js → curl-DCSPNPEW.js} +1 -1
- package/dist/bin/chunks/{cut-ZI2HIAW7.js → cut-VWMTH3YP.js} +1 -1
- package/dist/bin/{shell/chunks/diff-YDJ42RKS.js → chunks/diff-E5JNYAA2.js} +1 -1
- package/dist/bin/chunks/{env-NY32PQJM.js → env-S6XWV5SK.js} +1 -1
- package/dist/bin/chunks/{expand-YYSO35NS.js → expand-AIAYIGRW.js} +1 -1
- package/dist/bin/chunks/{flag-coverage-RFKIBJ6L.js → flag-coverage-AIBITXZA.js} +1 -1
- package/dist/bin/{shell/chunks/fold-5MF7QZWQ.js → chunks/fold-4X7TIQ32.js} +1 -1
- package/dist/bin/chunks/{grep-VAYCFO4O.js → grep-7KM7ZRPL.js} +1 -1
- package/dist/bin/chunks/{gzip-UGBQQKIH.js → gzip-UUURHQYK.js} +1 -1
- package/dist/bin/chunks/{head-QNC2ZYDO.js → head-2NYUMA2U.js} +1 -1
- package/dist/bin/{shell/chunks/html-to-markdown-QEFY7XQR.js → chunks/html-to-markdown-TOIJDAT5.js} +1 -1
- package/dist/bin/{shell/chunks/join-EJ73DYTK.js → chunks/join-W23T6UW4.js} +1 -1
- package/dist/bin/chunks/{jq-GGTKKMEN.js → jq-PG5TWARX.js} +1 -1
- package/dist/bin/chunks/{js-exec-BC6NI55L.js → js-exec-YLOWUQR4.js} +1 -1
- package/dist/bin/chunks/{md5sum-MCVDIB35.js → md5sum-XTC5HSJD.js} +1 -1
- package/dist/bin/chunks/{nl-KUPLVCTS.js → nl-7NAYBH24.js} +1 -1
- package/dist/bin/chunks/{od-YQ5ZUI2H.js → od-BGNLMPXW.js} +1 -1
- package/dist/bin/{shell/chunks/paste-A5KKPWXX.js → chunks/paste-KM6YEJO3.js} +1 -1
- package/dist/bin/chunks/{python3-BQWDPUBM.js → python3-ABK6N2Y5.js} +1 -1
- package/dist/bin/chunks/{rev-PYHOZ4D4.js → rev-YHIGUK3P.js} +1 -1
- package/dist/bin/chunks/{rg-BGFMSIVK.js → rg-6FON3TGH.js} +1 -1
- package/dist/bin/chunks/{sed-FWA634SN.js → sed-LHKUKSBN.js} +1 -1
- package/dist/bin/chunks/{sha1sum-4KF52U3Y.js → sha1sum-VW2AMMXS.js} +1 -1
- package/dist/bin/chunks/{sha256sum-6YEPULPX.js → sha256sum-7O5NHH7H.js} +1 -1
- package/dist/bin/chunks/{sort-4C6WOKNK.js → sort-3BIIXAER.js} +1 -1
- package/dist/bin/chunks/{split-TV7NL7LA.js → split-3DTOTWCO.js} +1 -1
- package/dist/bin/chunks/{sqlite3-W777NCI4.js → sqlite3-AUZE77IO.js} +1 -1
- package/dist/bin/chunks/{strings-MDD72LR6.js → strings-LQXARN54.js} +1 -1
- package/dist/bin/{shell/chunks/tac-C2N4NQ6S.js → chunks/tac-24IIWF3C.js} +1 -1
- package/dist/bin/chunks/{tail-BCB5W6JC.js → tail-5BYXLCVJ.js} +1 -1
- package/dist/bin/chunks/{tar-DOO744MK.js → tar-PEHGL2NT.js} +1 -1
- package/dist/bin/chunks/{tee-UQHPO4OW.js → tee-CPC2RSEW.js} +1 -1
- package/dist/bin/chunks/{time-ZPY52VT2.js → time-7GPZMM6F.js} +1 -1
- package/dist/bin/chunks/{timeout-5AX3ZS3X.js → timeout-B2L3MWOL.js} +1 -1
- package/dist/bin/chunks/{tr-G7K6M6HP.js → tr-SGANQH42.js} +1 -1
- package/dist/bin/chunks/{unexpand-QIR4EDPG.js → unexpand-7TJPGTBZ.js} +1 -1
- package/dist/bin/chunks/{uniq-I7PVFJR4.js → uniq-VH2XX4GT.js} +1 -1
- package/dist/bin/{shell/chunks/wc-6NGWULAP.js → chunks/wc-LGTZO4AP.js} +1 -1
- package/dist/bin/chunks/{xan-KX4VPXUN.js → xan-I5ZN33WB.js} +1 -1
- package/dist/bin/chunks/{xan-view-JXOZLJ7S.js → xan-view-UGYNQULV.js} +1 -1
- package/dist/bin/chunks/{xargs-UWHPYLY7.js → xargs-2NR5N6L3.js} +1 -1
- package/dist/bin/chunks/{yq-GCDCJBKB.js → yq-3EZZPCM2.js} +1 -1
- package/dist/bin/just-bash.js +72 -72
- package/dist/bin/shell/chunks/{awk2-RLMNTGI7.js → awk2-M5P56WFW.js} +1 -1
- package/dist/bin/{chunks/base64-RZRLGMB3.js → shell/chunks/base64-3BBQMQBD.js} +1 -1
- package/dist/bin/{chunks/bash-CLP24TE2.js → shell/chunks/bash-JOHLB5EM.js} +1 -1
- package/dist/bin/{chunks/cat-LQH5FSAR.js → shell/chunks/cat-QS3FUD2R.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-L24QXM5S.js → chunk-2AUW2OVD.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-EDTBGO7F.js → chunk-3ERCSYXB.js} +1 -1
- package/dist/bin/{chunks/chunk-X4MX6EHF.js → shell/chunks/chunk-46EFQINR.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-7NC4CPHS.js → chunk-4HZ2J7WU.js} +1 -1
- package/dist/bin/{chunks/chunk-UO5LOD7U.js → shell/chunks/chunk-4J4HK3AP.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-PAYQNSZN.js → chunk-4TKEQ5JF.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-V2RP73X4.js → chunk-4TZMT56V.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-F3GKANW3.js → chunk-5MAZXOIE.js} +1 -1
- package/dist/bin/{chunks/chunk-6FSBHK6H.js → shell/chunks/chunk-6CMV7VZ7.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-FVRXEJYQ.js → chunk-7X6QFILN.js} +2 -2
- package/dist/bin/{chunks/chunk-2SVX7I5P.js → shell/chunks/chunk-A66SLDOH.js} +1 -1
- package/dist/bin/{chunks/chunk-Q4UMTSRO.js → shell/chunks/chunk-AIE46WV2.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-VBDLSL7Y.js → chunk-CVDY2PJ2.js} +1 -1
- package/dist/bin/{chunks/chunk-H7JTIXAO.js → shell/chunks/chunk-DSS5HVJD.js} +1 -1
- package/dist/bin/{chunks/chunk-M65CQLJE.js → shell/chunks/chunk-E2TTMLYF.js} +1 -1
- package/dist/bin/{chunks/chunk-HN2DCT7T.js → shell/chunks/chunk-E35XCU6G.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-JZW7NFK2.js → chunk-EVVJUFZE.js} +1 -1
- package/dist/bin/{chunks/chunk-C7ISPH7Y.js → shell/chunks/chunk-FKCULB5D.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-YY5PJR7O.js → chunk-G5P37XAS.js} +1 -1
- package/dist/bin/{chunks/chunk-CAZ75E7E.js → shell/chunks/chunk-IAGQA4VJ.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-22HCD466.js → chunk-JARRTDRA.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-JNUX75OX.js → chunk-JW42N6DP.js} +1 -1
- package/dist/bin/{chunks/chunk-7UU7KPEM.js → shell/chunks/chunk-LLC5H7UY.js} +1 -1
- package/dist/bin/{chunks/chunk-NXVG64T3.js → shell/chunks/chunk-MMSWVFQQ.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-2NRAWO6E.js → chunk-MQIPLKAA.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-YOKQNNQO.js → chunk-NK4UMOPJ.js} +1 -1
- package/dist/bin/{chunks/chunk-OPMLWMNH.js → shell/chunks/chunk-OUWMQLWU.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-KFMPGSUT.js → chunk-PEI4ZGEQ.js} +1 -1
- package/dist/bin/{chunks/chunk-7AYT3UKI.js → shell/chunks/chunk-PNPB62GH.js} +1 -1
- package/dist/bin/shell/chunks/chunk-PUSAQWLR.js +3 -0
- package/dist/bin/shell/chunks/{chunk-LAHBP3FW.js → chunk-QMRTESE5.js} +1 -1
- package/dist/bin/{chunks/chunk-IZGLHVBB.js → shell/chunks/chunk-RGDGVTPT.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-FKVQZWJQ.js → chunk-TO6JCMLQ.js} +1 -1
- package/dist/bin/{chunks/chunk-F3WNDKOC.js → shell/chunks/chunk-TVCXF3IW.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-J7TUF2VI.js → chunk-V2CUST2J.js} +1 -1
- package/dist/bin/{chunks/chunk-XJ37N3S5.js → shell/chunks/chunk-VZTJXRFX.js} +1 -1
- package/dist/bin/shell/chunks/{column-AQB3A3PJ.js → column-W6LUR2XZ.js} +1 -1
- package/dist/bin/{chunks/comm-Q4VDF6ZO.js → shell/chunks/comm-YSS52S62.js} +1 -1
- package/dist/bin/shell/chunks/{curl-PLHETP4J.js → curl-DCSPNPEW.js} +1 -1
- package/dist/bin/shell/chunks/{cut-ZI2HIAW7.js → cut-VWMTH3YP.js} +1 -1
- package/dist/bin/{chunks/diff-YDJ42RKS.js → shell/chunks/diff-E5JNYAA2.js} +1 -1
- package/dist/bin/shell/chunks/{env-NY32PQJM.js → env-S6XWV5SK.js} +1 -1
- package/dist/bin/shell/chunks/{expand-YYSO35NS.js → expand-AIAYIGRW.js} +1 -1
- package/dist/bin/shell/chunks/{flag-coverage-RFKIBJ6L.js → flag-coverage-AIBITXZA.js} +1 -1
- package/dist/bin/{chunks/fold-5MF7QZWQ.js → shell/chunks/fold-4X7TIQ32.js} +1 -1
- package/dist/bin/shell/chunks/{grep-VAYCFO4O.js → grep-7KM7ZRPL.js} +1 -1
- package/dist/bin/shell/chunks/{gzip-UGBQQKIH.js → gzip-UUURHQYK.js} +1 -1
- package/dist/bin/shell/chunks/{head-QNC2ZYDO.js → head-2NYUMA2U.js} +1 -1
- package/dist/bin/{chunks/html-to-markdown-QEFY7XQR.js → shell/chunks/html-to-markdown-TOIJDAT5.js} +1 -1
- package/dist/bin/{chunks/join-EJ73DYTK.js → shell/chunks/join-W23T6UW4.js} +1 -1
- package/dist/bin/shell/chunks/{jq-GGTKKMEN.js → jq-PG5TWARX.js} +1 -1
- package/dist/bin/shell/chunks/{js-exec-BC6NI55L.js → js-exec-YLOWUQR4.js} +1 -1
- package/dist/bin/shell/chunks/{md5sum-MCVDIB35.js → md5sum-XTC5HSJD.js} +1 -1
- package/dist/bin/shell/chunks/{nl-KUPLVCTS.js → nl-7NAYBH24.js} +1 -1
- package/dist/bin/shell/chunks/{od-YQ5ZUI2H.js → od-BGNLMPXW.js} +1 -1
- package/dist/bin/{chunks/paste-A5KKPWXX.js → shell/chunks/paste-KM6YEJO3.js} +1 -1
- package/dist/bin/shell/chunks/{python3-BQWDPUBM.js → python3-ABK6N2Y5.js} +1 -1
- package/dist/bin/shell/chunks/{rev-PYHOZ4D4.js → rev-YHIGUK3P.js} +1 -1
- package/dist/bin/shell/chunks/{rg-BGFMSIVK.js → rg-6FON3TGH.js} +1 -1
- package/dist/bin/shell/chunks/{sed-FWA634SN.js → sed-LHKUKSBN.js} +1 -1
- package/dist/bin/shell/chunks/{sha1sum-4KF52U3Y.js → sha1sum-VW2AMMXS.js} +1 -1
- package/dist/bin/shell/chunks/{sha256sum-6YEPULPX.js → sha256sum-7O5NHH7H.js} +1 -1
- package/dist/bin/shell/chunks/{sort-4C6WOKNK.js → sort-3BIIXAER.js} +1 -1
- package/dist/bin/shell/chunks/{split-TV7NL7LA.js → split-3DTOTWCO.js} +1 -1
- package/dist/bin/shell/chunks/{sqlite3-W777NCI4.js → sqlite3-AUZE77IO.js} +1 -1
- package/dist/bin/shell/chunks/{strings-MDD72LR6.js → strings-LQXARN54.js} +1 -1
- package/dist/bin/{chunks/tac-C2N4NQ6S.js → shell/chunks/tac-24IIWF3C.js} +1 -1
- package/dist/bin/shell/chunks/{tail-BCB5W6JC.js → tail-5BYXLCVJ.js} +1 -1
- package/dist/bin/shell/chunks/{tar-DOO744MK.js → tar-PEHGL2NT.js} +1 -1
- package/dist/bin/shell/chunks/{tee-UQHPO4OW.js → tee-CPC2RSEW.js} +1 -1
- package/dist/bin/shell/chunks/{time-ZPY52VT2.js → time-7GPZMM6F.js} +1 -1
- package/dist/bin/shell/chunks/{timeout-5AX3ZS3X.js → timeout-B2L3MWOL.js} +1 -1
- package/dist/bin/shell/chunks/{tr-G7K6M6HP.js → tr-SGANQH42.js} +1 -1
- package/dist/bin/shell/chunks/{unexpand-QIR4EDPG.js → unexpand-7TJPGTBZ.js} +1 -1
- package/dist/bin/shell/chunks/{uniq-I7PVFJR4.js → uniq-VH2XX4GT.js} +1 -1
- package/dist/bin/{chunks/wc-6NGWULAP.js → shell/chunks/wc-LGTZO4AP.js} +1 -1
- package/dist/bin/shell/chunks/{xan-KX4VPXUN.js → xan-I5ZN33WB.js} +1 -1
- package/dist/bin/shell/chunks/{xan-view-JXOZLJ7S.js → xan-view-UGYNQULV.js} +1 -1
- package/dist/bin/shell/chunks/{xargs-UWHPYLY7.js → xargs-2NR5N6L3.js} +1 -1
- package/dist/bin/shell/chunks/{yq-GCDCJBKB.js → yq-3EZZPCM2.js} +1 -1
- package/dist/bin/shell/shell.js +73 -73
- package/dist/bundle/browser.js +655 -583
- package/dist/bundle/chunks/{awk2-LA3USKJP.js → awk2-2OROQ6TB.js} +1 -1
- package/dist/bundle/chunks/{base64-C2AIWVNC.js → base64-6IJBGYEA.js} +1 -1
- package/dist/bundle/chunks/{bash-YZ33HQZQ.js → bash-AT4DFUJM.js} +1 -1
- package/dist/bundle/chunks/{cat-TSFMZVYS.js → cat-Z4ATD4R2.js} +1 -1
- package/dist/bundle/chunks/{chunk-YCLFEX4T.js → chunk-4HV7HIHS.js} +1 -1
- package/dist/bundle/chunks/{chunk-S443BAN4.js → chunk-6HPVYB3B.js} +1 -1
- package/dist/bundle/chunks/chunk-6JHJPYPW.js +2 -0
- package/dist/bundle/chunks/{chunk-GJC3WVOW.js → chunk-7QLDUSO4.js} +1 -1
- package/dist/bundle/chunks/chunk-AAH22H6T.js +19 -0
- package/dist/bundle/chunks/{chunk-OVGANXCG.js → chunk-AEU2AH3H.js} +1 -1
- package/dist/bundle/chunks/{chunk-XCQWV4AU.js → chunk-AK7Q2PNY.js} +1 -1
- package/dist/bundle/chunks/{chunk-S3LEJEPP.js → chunk-EO3OLY7H.js} +1 -1
- package/dist/bundle/chunks/{chunk-XDGLKIHR.js → chunk-G372PPPL.js} +1 -1
- package/dist/bundle/chunks/{chunk-U73A73IE.js → chunk-HGXBBQKY.js} +1 -1
- package/dist/bundle/chunks/{chunk-46RN27KI.js → chunk-IJZY7GO5.js} +1 -1
- package/dist/bundle/chunks/{chunk-VLCHOJWK.js → chunk-K57W527P.js} +1 -1
- package/dist/bundle/chunks/{chunk-GSPYNYZA.js → chunk-K5VKTLDB.js} +1 -1
- package/dist/bundle/chunks/{chunk-VPADYNBD.js → chunk-KHCKEMD6.js} +1 -1
- package/dist/bundle/chunks/{chunk-ICIEVHY5.js → chunk-KTWS34JV.js} +1 -1
- package/dist/bundle/chunks/{chunk-Q7H5W7YE.js → chunk-KUSBC35O.js} +2 -2
- package/dist/bundle/chunks/chunk-LJ64BU4T.js +84 -0
- package/dist/bundle/chunks/chunk-LXDNRKHV.js +28 -0
- package/dist/bundle/chunks/{chunk-4N6J7B5P.js → chunk-MHOVZCXO.js} +1 -1
- package/dist/bundle/chunks/{chunk-UP6MSJGD.js → chunk-MLX6LCEH.js} +1 -1
- package/dist/bundle/chunks/{chunk-2JIPICV3.js → chunk-MSHY3ROY.js} +1 -1
- package/dist/bundle/chunks/chunk-MUGJLS3O.js +15 -0
- package/dist/bundle/chunks/{chunk-6VAT5Z2D.js → chunk-NHIFOLSI.js} +1 -1
- package/dist/bundle/chunks/{chunk-T4TFLF3R.js → chunk-O66VCFMW.js} +1 -1
- package/dist/bundle/chunks/{chunk-7JHM3L42.js → chunk-PAZDJXQ2.js} +1 -1
- package/dist/bundle/chunks/{chunk-FW54FHZR.js → chunk-PVSBJ7RN.js} +1 -1
- package/dist/bundle/chunks/{chunk-XYXUMFSU.js → chunk-PXGSAN5M.js} +1 -1
- package/dist/bundle/chunks/{chunk-FJK43EBQ.js → chunk-RCQPTKLM.js} +1 -1
- package/dist/bundle/chunks/{chunk-6LASZU3O.js → chunk-RLPRNBSA.js} +1 -1
- package/dist/bundle/chunks/{chunk-GGC5NEPZ.js → chunk-WLZQ2YQT.js} +1 -1
- package/dist/bundle/chunks/{chunk-FX7KQCEA.js → chunk-WQQIVUNI.js} +1 -1
- package/dist/bundle/chunks/{chunk-EBAPSGAO.js → chunk-WWZU6WGV.js} +1 -1
- package/dist/bundle/chunks/{chunk-LNBPBRV4.js → chunk-XY467F65.js} +1 -1
- package/dist/bundle/chunks/{chunk-KD3KENL6.js → chunk-YAIN5HNN.js} +1 -1
- package/dist/bundle/chunks/{chunk-HJBTD7PY.js → chunk-YOVBUIVE.js} +1 -1
- package/dist/bundle/chunks/{chunk-XHLMAZX2.js → chunk-ZALQAZQS.js} +1 -1
- package/dist/bundle/chunks/{chunk-N6DXJ2JN.js → chunk-ZSV2XR53.js} +1 -1
- package/dist/bundle/chunks/{chunk-ACSZB4FE.js → chunk-ZUKEFBW2.js} +1 -1
- package/dist/bundle/chunks/{column-XT6UFXNQ.js → column-WWAENDUI.js} +1 -1
- package/dist/bundle/chunks/{comm-VV2LDX2J.js → comm-RQ5XNTJM.js} +1 -1
- package/dist/bundle/chunks/{curl-GRYA74XW.js → curl-PAWGO3EH.js} +1 -1
- package/dist/bundle/chunks/{cut-OKARJCCV.js → cut-QWB7NUKQ.js} +1 -1
- package/dist/bundle/chunks/{diff-MWJFIG7X.js → diff-X5UWGQ3A.js} +1 -1
- package/dist/bundle/chunks/{env-36M5BO7M.js → env-ZRQ43ZZD.js} +1 -1
- package/dist/bundle/chunks/{expand-JSPG6VOP.js → expand-EAKN4OXQ.js} +1 -1
- package/dist/bundle/chunks/{flag-coverage-XWSYNE72.js → flag-coverage-G33S37PG.js} +1 -1
- package/dist/bundle/chunks/{fold-4TQNYMSW.js → fold-D373LLSA.js} +1 -1
- package/dist/bundle/chunks/{grep-V3LQVMRQ.js → grep-SFR3IZ6K.js} +1 -1
- package/dist/bundle/chunks/{gzip-O5ASJAFY.js → gzip-CVIVKFF2.js} +1 -1
- package/dist/bundle/chunks/{head-442HYESI.js → head-FXWZSGHI.js} +1 -1
- package/dist/bundle/chunks/{html-to-markdown-JW4MSQZO.js → html-to-markdown-2JNCRZB7.js} +1 -1
- package/dist/bundle/chunks/{join-TBRGI3LQ.js → join-CTDW75RI.js} +1 -1
- package/dist/bundle/chunks/{jq-4XLYLOS5.js → jq-67Y32ADP.js} +1 -1
- package/dist/bundle/chunks/{js-exec-N5KEZBH7.js → js-exec-2N7YE6ER.js} +1 -1
- package/dist/bundle/chunks/{ls-ZJGQER7M.js → ls-GFWJAGZ5.js} +1 -1
- package/dist/bundle/chunks/{md5sum-SPU24VSG.js → md5sum-P4DXUWPM.js} +1 -1
- package/dist/bundle/chunks/{nl-WSDW7I4O.js → nl-SLUVZ3TI.js} +1 -1
- package/dist/bundle/chunks/{od-WOKFDJTP.js → od-LKZJLHVE.js} +1 -1
- package/dist/bundle/chunks/{paste-7JC6S4DX.js → paste-LIMPDS6X.js} +1 -1
- package/dist/bundle/chunks/{printf-TWGXF445.js → printf-H2KM2USM.js} +1 -1
- package/dist/bundle/chunks/{python3-POMOR4OA.js → python3-2AQWCGWL.js} +1 -1
- package/dist/bundle/chunks/{rev-5EHFX4EJ.js → rev-W4N6QLP5.js} +1 -1
- package/dist/bundle/chunks/{rg-S4FXYXWB.js → rg-QVQNBE57.js} +1 -1
- package/dist/bundle/chunks/{sed-S5UIK574.js → sed-6Q2OKXY5.js} +1 -1
- package/dist/bundle/chunks/{sha1sum-2PTOAFR6.js → sha1sum-UMR2BPZO.js} +1 -1
- package/dist/bundle/chunks/{sha256sum-NS7D3IXX.js → sha256sum-RPSA24NY.js} +1 -1
- package/dist/bundle/chunks/{sort-SW2YEO5B.js → sort-JRCEWR75.js} +1 -1
- package/dist/bundle/chunks/{split-4KKZZXXE.js → split-KAF43FGD.js} +1 -1
- package/dist/bundle/chunks/{sqlite3-CGOEFJAO.js → sqlite3-QVOVCFW4.js} +1 -1
- package/dist/bundle/chunks/{strings-6WDHLGMX.js → strings-5J5KERRU.js} +1 -1
- package/dist/bundle/chunks/{tac-2STMMJYW.js → tac-VQW3WZHD.js} +1 -1
- package/dist/bundle/chunks/{tail-R4PCA2C4.js → tail-CDOI2GPL.js} +1 -1
- package/dist/bundle/chunks/{tar-STHHZTZ6.js → tar-AIQ24PFK.js} +1 -1
- package/dist/bundle/chunks/{tee-YUZ2FKCJ.js → tee-SYEPHRRB.js} +1 -1
- package/dist/bundle/chunks/{time-D4LNBSWX.js → time-DAPKFIOQ.js} +1 -1
- package/dist/bundle/chunks/{timeout-YDCRSLPQ.js → timeout-4OGTKQLR.js} +1 -1
- package/dist/bundle/chunks/{tr-36LHWFRQ.js → tr-P4RRZUZU.js} +1 -1
- package/dist/bundle/chunks/{unexpand-CADSA4VO.js → unexpand-V5HMWT4F.js} +1 -1
- package/dist/bundle/chunks/{uniq-XSIZR6PB.js → uniq-ON4F3TGM.js} +1 -1
- package/dist/bundle/chunks/{wc-LF7NU4LA.js → wc-ASC6XKZW.js} +1 -1
- package/dist/bundle/chunks/{xan-Y6WF3IRG.js → xan-UGHT4U42.js} +1 -1
- package/dist/bundle/chunks/xan-view-HLIT2HYA.js +2 -0
- package/dist/bundle/chunks/{xargs-MGZPH7AX.js → xargs-7BH6BYXE.js} +1 -1
- package/dist/bundle/chunks/{yq-4QJW3EQG.js → yq-5UQZWCTQ.js} +1 -1
- package/dist/bundle/index.cjs +1287 -1198
- package/dist/bundle/index.js +52 -52
- package/package.json +4 -4
- package/dist/bin/chunks/chunk-VZK4FHWJ.js +0 -3
- package/dist/bin/shell/chunks/chunk-VZK4FHWJ.js +0 -3
- package/dist/bundle/chunks/chunk-CBJVD2XA.js +0 -7
- package/dist/bundle/chunks/chunk-GIUR5SNU.js +0 -15
- package/dist/bundle/chunks/chunk-NRSASXYY.js +0 -2
- package/dist/bundle/chunks/chunk-R4IFXNY5.js +0 -28
- package/dist/bundle/chunks/chunk-R74UQCKX.js +0 -5
- package/dist/bundle/chunks/xan-view-HDVKHFC2.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-XY467F65.js";import"./chunk-DLL7UR66.js";import"./chunk-L64BMZUV.js";import"./chunk-TN7HHBQW.js";import"./chunk-4RUAZWKT.js";import"./chunk-6JHJPYPW.js";import"./chunk-SAI2SPQQ.js";import"./chunk-QAYAQNCG.js";import"./chunk-BZUGFHVS.js";export{a as awkCommand2,b as flagsForFuzzing};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-CN5XGDNN.js";import"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-CN5XGDNN.js";import"./chunk-6JHJPYPW.js";import"./chunk-QIQMJJZ4.js";import"./chunk-QAYAQNCG.js";import"./chunk-BZUGFHVS.js";export{a as base64Command,b as flagsForFuzzing};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-
|
|
2
|
+
import{a,b,c,d}from"./chunk-K5VKTLDB.js";import"./chunk-DLL7UR66.js";import"./chunk-6JHJPYPW.js";import"./chunk-QAYAQNCG.js";import"./chunk-BZUGFHVS.js";export{a as bashCommand,c as flagsForFuzzing,b as shCommand,d as shFlagsForFuzzing};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-MHOVZCXO.js";import"./chunk-4HV7HIHS.js";import"./chunk-6JHJPYPW.js";import"./chunk-STHBFACM.js";import"./chunk-QIQMJJZ4.js";import"./chunk-QAYAQNCG.js";import"./chunk-BZUGFHVS.js";export{a as catCommand,b as flagsForFuzzing};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{e as u,f as m}from"./chunk-
|
|
2
|
+
import{e as u,f as m}from"./chunk-6JHJPYPW.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
|
|
3
3
|
`}}}));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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{c as f}from"./chunk-
|
|
2
|
+
import{c as f}from"./chunk-6JHJPYPW.js";import{a,b as c,c as d}from"./chunk-QAYAQNCG.js";var u={name:"rev",summary:"reverse lines characterwise",usage:"rev [file ...]",description:"Copies the specified files to standard output, reversing the order of characters in every line. If no files are specified, standard input is read.",examples:["echo 'hello' | rev # Output: olleh","rev file.txt # Reverse each line in file"]};function p(r){return Array.from(r).reverse().join("")}var g={name:"rev",execute:async(r,s)=>{if(c(r))return a(u);let o=[];for(let e of r)if(e==="--"){let t=r.indexOf(e);o.push(...r.slice(t+1));break}else{if(e.startsWith("-")&&e!=="-")return d("rev",e);o.push(e)}let n="",l=e=>{let t=e.split(`
|
|
3
3
|
`),i=e.endsWith(`
|
|
4
4
|
`)&&t[t.length-1]==="";return i&&t.pop(),t.map(p).join(`
|
|
5
5
|
`)+(i?`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
var a=new TextDecoder("utf-8",{fatal:!0}),y=new TextEncoder;function h(t){return t}function B(t){return t}function g(t){let e=t;if(!e)return e;let n=!1,r=!1;for(let o=0;o<e.length;o++){let u=e.charCodeAt(o);u>255?r=!0:u>127&&(n=!0)}if(!n)return e;let i=[],s=new TextEncoder;for(let o=0;o<e.length;o++){let u=e.charCodeAt(o);if(u>255){let d=s.encode(e[o]);for(let c=0;c<d.length;c++)i.push(d[c])}else i.push(u)}let f=new Uint8Array(i);try{return a.decode(f)}catch{return e}}function x(t){if(!t)return t;let e=y.encode(t),n="";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return n}var b="";function l(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}async function E(t,e){return typeof t.readFileBytes=="function"?t.readFileBytes(e):l(await t.readFileBuffer(e))}function p(t){return t.stdoutKind?t.stdoutKind:t.stdoutEncoding==="binary"?"bytes":"text"}function F(t){return p(t)==="bytes"?t.stdout:x(t.stdout)}function T(t){return{stdout:t,stdoutKind:"text"}}function m(t){return{stdout:t,stdoutKind:"bytes",stdoutEncoding:"binary"}}export{h as a,B as b,g as c,x as d,b as e,E as f,p as g,F as h,T as i,m as j};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-
|
|
2
|
+
import{a as m}from"./chunk-WWZU6WGV.js";var s=m("md5sum","md5","compute MD5 message digest"),o={name:"md5sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0};export{s as a,o as b};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{c as D}from"./chunk-6JHJPYPW.js";import{a as N}from"./chunk-QIQMJJZ4.js";import{a as H,b as A}from"./chunk-QAYAQNCG.js";var b=class{diff(e,n,t={}){let i;typeof t=="function"?(i=t,t={}):"callback"in t&&(i=t.callback);let d=this.castInput(e,t),o=this.castInput(n,t),s=this.removeEmpty(this.tokenize(d,t)),a=this.removeEmpty(this.tokenize(o,t));return this.diffWithOptionsObj(s,a,t,i)}diffWithOptionsObj(e,n,t,i){var d;let o=l=>{if(l=this.postProcess(l,t),i){setTimeout(function(){i(l)},0);return}else return l},s=n.length,a=e.length,u=1,r=s+a;t.maxEditLength!=null&&(r=Math.min(r,t.maxEditLength));let g=(d=t.timeout)!==null&&d!==void 0?d:1/0,w=Date.now()+g,m=[{oldPos:-1,lastComponent:void 0}],C=this.extractCommon(m[0],n,e,0,t);if(m[0].oldPos+1>=a&&C+1>=s)return o(this.buildValues(m[0].lastComponent,n,e));let P=-1/0,x=1/0,L=()=>{for(let l=Math.max(P,-u);l<=Math.min(x,u);l+=2){let c,h=m[l-1],p=m[l+1];h&&(m[l-1]=void 0);let y=!1;if(p){let S=p.oldPos-l;y=p&&0<=S&&S<s}let v=h&&h.oldPos+1<a;if(!y&&!v){m[l]=void 0;continue}if(!v||y&&h.oldPos<p.oldPos?c=this.addToPath(p,!0,!1,0,t):c=this.addToPath(h,!1,!0,1,t),C=this.extractCommon(c,n,e,l,t),c.oldPos+1>=a&&C+1>=s)return o(this.buildValues(c.lastComponent,n,e))||!0;m[l]=c,c.oldPos+1>=a&&(x=Math.min(x,l-1)),C+1>=s&&(P=Math.max(P,l+1))}u++};if(i)(function l(){setTimeout(function(){if(u>r||Date.now()>w)return i(void 0);L()||l()},0)})();else for(;u<=r&&Date.now()<=w;){let l=L();if(l)return l}}addToPath(e,n,t,i,d){let o=e.lastComponent;return o&&!d.oneChangePerToken&&o.added===n&&o.removed===t?{oldPos:e.oldPos+i,lastComponent:{count:o.count+1,added:n,removed:t,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:n,removed:t,previousComponent:o}}}extractCommon(e,n,t,i,d){let o=n.length,s=t.length,a=e.oldPos,u=a-i,r=0;for(;u+1<o&&a+1<s&&this.equals(t[a+1],n[u+1],d);)u++,a++,r++,d.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return r&&!d.oneChangePerToken&&(e.lastComponent={count:r,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=a,u}equals(e,n,t){return t.comparator?t.comparator(e,n):e===n||!!t.ignoreCase&&e.toLowerCase()===n.toLowerCase()}removeEmpty(e){let n=[];for(let t=0;t<e.length;t++)e[t]&&n.push(e[t]);return n}castInput(e,n){return e}tokenize(e,n){return Array.from(e)}join(e){return e.join("")}postProcess(e,n){return e}get useLongestToken(){return!1}buildValues(e,n,t){let i=[],d;for(;e;)i.push(e),d=e.previousComponent,delete e.previousComponent,e=d;i.reverse();let o=i.length,s=0,a=0,u=0;for(;s<o;s++){let r=i[s];if(r.removed)r.value=this.join(t.slice(u,u+r.count)),u+=r.count;else{if(!r.added&&this.useLongestToken){let g=n.slice(a,a+r.count);g=g.map(function(w,m){let C=t[u+m];return C.length>w.length?C:w}),r.value=this.join(g)}else r.value=this.join(n.slice(a,a+r.count));a+=r.count,r.added||(u+=r.count)}}return i}};var I=class extends b{constructor(){super(...arguments),this.tokenize=W}equals(e,n,t){return t.ignoreWhitespace?((!t.newlineIsToken||!e.includes(`
|
|
3
|
+
`))&&(e=e.trim()),(!t.newlineIsToken||!n.includes(`
|
|
4
|
+
`))&&(n=n.trim())):t.ignoreNewlineAtEof&&!t.newlineIsToken&&(e.endsWith(`
|
|
5
|
+
`)&&(e=e.slice(0,-1)),n.endsWith(`
|
|
6
|
+
`)&&(n=n.slice(0,-1))),super.equals(e,n,t)}},O=new I;function T(f,e,n){return O.diff(f,e,n)}function W(f,e){e.stripTrailingCr&&(f=f.replace(/\r\n/g,`
|
|
7
|
+
`));let n=[],t=f.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(let i=0;i<t.length;i++){let d=t[i];i%2&&!e.newlineIsToken?n[n.length-1]+=d:n.push(d)}return n}var j={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function F(f,e,n,t,i,d,o){let s;o?typeof o=="function"?s={callback:o}:s=o:s={},typeof s.context>"u"&&(s.context=4);let a=s.context;if(s.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(s.callback){let{callback:r}=s;T(n,t,Object.assign(Object.assign({},s),{callback:g=>{let w=u(g);r(w)}}))}else return u(T(n,t,s));function u(r){if(!r)return;r.push({value:"",lines:[]});function g(l){return l.map(function(c){return" "+c})}let w=[],m=0,C=0,P=[],x=1,L=1;for(let l=0;l<r.length;l++){let c=r[l],h=c.lines||R(c.value);if(c.lines=h,c.added||c.removed){if(!m){let p=r[l-1];m=x,C=L,p&&(P=a>0?g(p.lines.slice(-a)):[],m-=P.length,C-=P.length)}for(let p of h)P.push((c.added?"+":"-")+p);c.added?L+=h.length:x+=h.length}else{if(m)if(h.length<=a*2&&l<r.length-2)for(let p of g(h))P.push(p);else{let p=Math.min(h.length,a);for(let v of g(h.slice(0,p)))P.push(v);let y={oldStart:m,oldLines:x-m+p,newStart:C,newLines:L-C+p,lines:P};w.push(y),m=0,C=0,P=[]}x+=h.length,L+=h.length}}for(let l of w)for(let c=0;c<l.lines.length;c++)l.lines[c].endsWith(`
|
|
8
|
+
`)?l.lines[c]=l.lines[c].slice(0,-1):(l.lines.splice(c+1,0,"\"),c++);return{oldFileName:f,newFileName:e,oldHeader:i,newHeader:d,hunks:w}}}function E(f,e){if(e||(e=j),Array.isArray(f)){if(f.length>1&&!e.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return f.map(t=>E(t,e)).join(`
|
|
9
|
+
`)}let n=[];e.includeIndex&&f.oldFileName==f.newFileName&&n.push("Index: "+f.oldFileName),e.includeUnderline&&n.push("==================================================================="),e.includeFileHeaders&&(n.push("--- "+f.oldFileName+(typeof f.oldHeader>"u"?"":" "+f.oldHeader)),n.push("+++ "+f.newFileName+(typeof f.newHeader>"u"?"":" "+f.newHeader)));for(let t=0;t<f.hunks.length;t++){let i=f.hunks[t];i.oldLines===0&&(i.oldStart-=1),i.newLines===0&&(i.newStart-=1),n.push("@@ -"+i.oldStart+","+i.oldLines+" +"+i.newStart+","+i.newLines+" @@");for(let d of i.lines)n.push(d)}return n.join(`
|
|
10
|
+
`)+`
|
|
11
|
+
`}function k(f,e,n,t,i,d,o){if(typeof o=="function"&&(o={callback:o}),o?.callback){let{callback:s}=o;F(f,e,n,t,i,d,Object.assign(Object.assign({},o),{callback:a=>{s(a?E(a,o.headerOptions):void 0)}}))}else{let s=F(f,e,n,t,i,d,o);return s?E(s,o?.headerOptions):void 0}}function R(f){let e=f.endsWith(`
|
|
12
|
+
`),n=f.split(`
|
|
13
|
+
`).map(t=>t+`
|
|
14
|
+
`);return e?n.pop():n.push(n.pop().slice(0,-1)),n}var z={name:"diff",summary:"compare files line by line",usage:"diff [OPTION]... FILE1 FILE2",options:["-u, --unified output unified diff format (default)","-q, --brief report only whether files differ","-s, --report-identical-files report when files are the same","-i, --ignore-case ignore case differences"," --help display this help and exit"]},_={unified:{short:"u",long:"unified",type:"boolean"},brief:{short:"q",long:"brief",type:"boolean"},reportSame:{short:"s",long:"report-identical-files",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},ee={name:"diff",async execute(f,e){if(A(f))return H(z);let n=N("diff",f,_);if(!n.ok)return n.error;let t=n.result.flags.brief,i=n.result.flags.reportSame,d=n.result.flags.ignoreCase,o=n.result.positional;if(n.result.flags.unified,o.length<2)return{stdout:"",stderr:`diff: missing operand
|
|
15
|
+
`,exitCode:2};let s,a,[u,r]=o;try{s=u==="-"?D(e.stdin):await e.fs.readFile(e.fs.resolvePath(e.cwd,u))}catch{return{stdout:"",stderr:`diff: ${u}: No such file or directory
|
|
16
|
+
`,exitCode:2}}try{a=r==="-"?D(e.stdin):await e.fs.readFile(e.fs.resolvePath(e.cwd,r))}catch{return{stdout:"",stderr:`diff: ${r}: No such file or directory
|
|
17
|
+
`,exitCode:2}}let g=s,w=a;return d&&(g=g.toLowerCase(),w=w.toLowerCase()),g===w?i?{stdout:`Files ${u} and ${r} are identical
|
|
18
|
+
`,stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0}:t?{stdout:`Files ${u} and ${r} differ
|
|
19
|
+
`,stderr:"",exitCode:1}:{stdout:k(u,r,s,a,"","",{context:3}),stderr:"",exitCode:1}}},ne={name:"diff",flags:[{flag:"-u",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-i",type:"boolean"}],needsArgs:!0,minArgs:2};export{ee as a,ne as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{c as y}from"./chunk-
|
|
2
|
+
import{c as y}from"./chunk-6JHJPYPW.js";import{a as C}from"./chunk-QIQMJJZ4.js";import{a as F,b as x}from"./chunk-QAYAQNCG.js";var H={name:"column",summary:"columnate lists",usage:"column [OPTION]... [FILE]...",description:"Format input into multiple columns. By default, fills rows first. Use -t to create a table based on whitespace-delimited input.",options:["-t Create a table (determine columns from input)","-s SEP Input field delimiter (default: whitespace)","-o SEP Output field delimiter (default: two spaces)","-c WIDTH Output width for fill mode (default: 80)","-n Don't merge multiple adjacent delimiters"],examples:["ls | column # Fill columns with ls output","cat data | column -t # Format as table","column -t -s ',' file # Format CSV as table","column -c 40 file # Fill 40-char wide columns"]},I={table:{short:"t",long:"table",type:"boolean"},separator:{short:"s",type:"string"},outputSep:{short:"o",type:"string"},width:{short:"c",type:"number",default:80},noMerge:{short:"n",type:"boolean"}};function v(t,e,o){return e?o?t.split(e):t.split(e).filter(n=>n.length>0):o?t.split(/[ \t]/):t.split(/[ \t]+/).filter(n=>n.length>0)}function T(t){let e=[];for(let o of t)for(let n=0;n<o.length;n++){let l=o[n].length;(e[n]===void 0||l>e[n])&&(e[n]=l)}return e}function W(t,e){if(t.length===0)return"";let o=T(t),n=[];for(let l of t){let c=[];for(let s=0;s<l.length;s++)s===l.length-1?c.push(l[s]):c.push(l[s].padEnd(o[s]));n.push(c.join(e))}return n.join(`
|
|
3
3
|
`)}function j(t,e,o){if(t.length===0)return"";let n=Math.max(...t.map(a=>a.length)),l=o.length,c=n+l,s=Math.max(1,Math.floor((e+l)/c)),p=Math.ceil(t.length/s),d=[];for(let a=0;a<p;a++){let i=[];for(let r=0;r<s;r++){let m=r*p+a;m<t.length&&(r===s-1||(r+1)*p+a>=t.length?i.push(t[m]):i.push(t[m].padEnd(n)))}d.push(i.join(o))}return d.join(`
|
|
4
4
|
`)}var S={name:"column",execute:async(t,e)=>{if(x(t))return F(H);let o=C("column",t,I);if(!o.ok)return o.error;let{table:n,separator:l,outputSep:c,width:s,noMerge:p}=o.result.flags,d=o.result.positional,a=c??" ",i;if(d.length===0)i=y(e.stdin)??"";else{let u=[];for(let f of d)if(f==="-")u.push(y(e.stdin)??"");else{let w=e.fs.resolvePath(e.cwd,f),b=await e.fs.readFile(w);if(b===null)return{exitCode:1,stdout:"",stderr:`column: ${f}: No such file or directory
|
|
5
5
|
`};u.push(b)}i=u.join("")}if(i===""||i.trim()==="")return{exitCode:0,stdout:"",stderr:""};let r=i.split(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{c as p}from"./chunk-
|
|
2
|
+
import{c as p}from"./chunk-6JHJPYPW.js";import{a as h,b as w,c as b}from"./chunk-QAYAQNCG.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(`
|
|
3
3
|
`)}function m(s,r){if(s==="")return"";let n=s.split(`
|
|
4
4
|
`),u=s.endsWith(`
|
|
5
5
|
`)&&n[n.length-1]==="";return u&&n.pop(),n.map(l=>N(l,r)).join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as s}from"./chunk-
|
|
2
|
+
import{a as s}from"./chunk-WWZU6WGV.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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as x}from"./chunk-AQ6FYS2X.js";import{a as z,b as J}from"./chunk-CHFEPBH4.js";import{c as X}from"./chunk-
|
|
2
|
+
import{a as x}from"./chunk-AQ6FYS2X.js";import{a as z,b as J}from"./chunk-CHFEPBH4.js";import{c as X}from"./chunk-6JHJPYPW.js";import{a as Z,b as j,c as q}from"./chunk-QAYAQNCG.js";var ie={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",options:["-E, --extended-regexp PATTERN is an extended regular expression","-P, --perl-regexp PATTERN is a Perl regular expression","-F, --fixed-strings PATTERN is a set of newline-separated strings","-i, --ignore-case ignore case distinctions","-v, --invert-match select non-matching lines","-w, --word-regexp match only whole words","-x, --line-regexp match only whole lines","-c, --count print only a count of matching lines","-l, --files-with-matches print only names of files with matches","-L, --files-without-match print names of files with no matches","-m NUM, --max-count=NUM stop after NUM matches","-n, --line-number print line number with output lines","-h, --no-filename suppress the file name prefix on output","-o, --only-matching show only nonempty parts of lines that match","-q, --quiet, --silent suppress all normal output","-r, -R, --recursive search directories recursively","-A NUM print NUM lines of trailing context","-B NUM print NUM lines of leading context","-C NUM print NUM lines of context","-e PATTERN use PATTERN for matching"," --include=GLOB search only files matching GLOB"," --exclude=GLOB skip files matching GLOB"," --exclude-dir=DIR skip directories matching DIR"," --help display this help and exit"]},K={name:"grep",async execute(t,s){if(j(t))return Z(ie);let l=!1,f=!1,c=!1,p=!1,m=!1,a=!1,n=!1,u=!1,y=!1,w=!1,h=!1,d=!1,F=!1,P=!1,B=!1,$=0,T=0,C=0,W=[],A=[],U=[],R=null,I=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.startsWith("-")&&i!=="-"){if(i==="-e"&&r+1<t.length){R=t[++r];continue}if(i.startsWith("--include=")){W.push(i.slice(10));continue}if(i.startsWith("--exclude=")){A.push(i.slice(10));continue}if(i.startsWith("--exclude-dir=")){U.push(i.slice(14));continue}if(i.startsWith("--max-count=")){$=parseInt(i.slice(12),10);continue}let b=i.match(/^-m(\d+)$/);if(b){$=parseInt(b[1],10);continue}if(i==="-m"&&r+1<t.length){$=parseInt(t[++r],10);continue}let o=i.match(/^-([ABC])(\d+)$/);if(o){let e=parseInt(o[2],10);o[1]==="A"?C=e:o[1]==="B"?T=e:o[1]==="C"&&(T=e,C=e);continue}if((i==="-A"||i==="-B"||i==="-C")&&r+1<t.length){let e=parseInt(t[++r],10);i==="-A"?C=e:i==="-B"?T=e:(T=e,C=e);continue}let g=i.startsWith("--")?[i]:i.slice(1).split("");for(let e of g)if(e==="i"||e==="--ignore-case")l=!0;else if(e==="n"||e==="--line-number")f=!0;else if(e==="v"||e==="--invert-match")c=!0;else if(e==="c"||e==="--count")p=!0;else if(e==="l"||e==="--files-with-matches")m=!0;else if(e==="L"||e==="--files-without-match")a=!0;else if(e==="r"||e==="R"||e==="--recursive")n=!0;else if(e==="w"||e==="--word-regexp")u=!0;else if(e==="x"||e==="--line-regexp")y=!0;else if(e==="E"||e==="--extended-regexp")w=!0;else if(e==="P"||e==="--perl-regexp")h=!0;else if(e==="F"||e==="--fixed-strings")d=!0;else if(e==="o"||e==="--only-matching")F=!0;else if(e==="h"||e==="--no-filename")P=!0;else if(e==="q"||e==="--quiet"||e==="--silent")B=!0;else{if(e.startsWith("--"))return q("grep",e);if(e.length===1)return q("grep",`-${e}`)}}else R===null?R=i:I.push(i)}if(R===null)return{stdout:"",stderr:`grep: missing pattern
|
|
3
3
|
`,exitCode:2};let ee=d?"fixed":w?"extended":h?"perl":"basic",L,O,Q;try{let r=J(R,{mode:ee,ignoreCase:l,wholeWord:u,lineRegexp:y});L=r.regex,O=r.kResetGroup,Q=r.preFilter}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${R}
|
|
4
4
|
`,exitCode:2}}if(I.length===0&&s.stdin!==void 0){let r=z(X(s.stdin),L,{invertMatch:c,showLineNumbers:f,countOnly:p,filename:"",onlyMatching:F,beforeContext:T,afterContext:C,maxCount:$,kResetGroup:O,preFilter:Q});return B?{stdout:"",stderr:"",exitCode:r.matched?0:1}:{stdout:r.output,stderr:"",exitCode:r.matched?0:1}}if(I.length===0)return{stdout:"",stderr:`grep: no input files
|
|
5
5
|
`,exitCode:2};let M="",S="",D=!1,k=!1,v=[];for(let r of I)if(r.includes("*")||r.includes("?")||r.includes("[")){let i=await re(r,s);if(n)for(let b of i){let o=await H(b.path,s,W,A,U,b.isFile);v.push(...o)}else v.push(...i)}else if(n){let i=await H(r,s,W,A,U);v.push(...i)}else v.push({path:r});let te=(v.length>1||n)&&!P,_=50;for(let r=0;r<v.length;r+=_){let i=v.slice(r,r+_),b=await Promise.all(i.map(async o=>{let g=o.path,e=g.split("/").pop()||g;if(A.length>0&&!n&&A.some(N=>x(e,N,{stripQuotes:!0}))||W.length>0&&!n&&!W.some(N=>x(e,N,{stripQuotes:!0})))return null;try{let N=s.fs.resolvePath(s.cwd,g),G=!1;if(o.isFile===void 0?G=(await s.fs.stat(N)).isDirectory:G=!o.isFile,G)return n?null:{error:`grep: ${g}: Is a directory
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{c as f}from"./chunk-
|
|
2
|
+
import{c as f}from"./chunk-6JHJPYPW.js";import{a as m,b as c,c as b}from"./chunk-QAYAQNCG.js";var p={name:"nl",summary:"number lines of files",usage:"nl [OPTION]... [FILE]...",description:"Write each FILE to standard output, with line numbers added. If no FILE is specified, standard input is read.",options:["-b STYLE Body numbering style: a (all), t (non-empty), n (none)","-n FORMAT Number format: ln (left), rn (right), rz (right zeros)","-w WIDTH Number width (default: 6)","-s SEP Separator after number (default: TAB)","-v START Starting line number (default: 1)","-i INCR Line number increment (default: 1)"],examples:["nl file.txt # Number non-empty lines","nl -ba file.txt # Number all lines","nl -n rz -w 3 file.txt # Right-justified with zeros","nl -s ': ' file.txt # Use ': ' as separator"]};function N(r,s,i){let l=String(r);switch(s){case"ln":return l.padEnd(i);case"rn":return l.padStart(i);case"rz":return l.padStart(i,"0");default:return s}}function v(r,s){switch(s){case"a":return!0;case"t":return r.trim().length>0;case"n":return!1;default:return s}}function h(r,s,i){if(r==="")return{output:"",nextNumber:i};let l=r.split(`
|
|
3
3
|
`),t=[],u=i,a=r.endsWith(`
|
|
4
4
|
`)&&l[l.length-1]==="";a&&l.pop();for(let n of l)if(v(n,s.bodyStyle)){let e=N(u,s.numberFormat,s.width);t.push(`${e}${s.separator}${n}`),u+=s.increment}else{let e=" ".repeat(s.width);t.push(`${e}${s.separator}${n}`)}return{output:t.join(`
|
|
5
5
|
`)+(a?`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as U,b as z}from"./chunk-L64BMZUV.js";import{a as I}from"./chunk-TN7HHBQW.js";import{a as A}from"./chunk-4RUAZWKT.js";import{c as P}from"./chunk-
|
|
2
|
+
import{a as U,b as z}from"./chunk-L64BMZUV.js";import{a as I}from"./chunk-TN7HHBQW.js";import{a as A}from"./chunk-4RUAZWKT.js";import{c as P}from"./chunk-6JHJPYPW.js";import{k}from"./chunk-SAI2SPQQ.js";import{a as L}from"./chunk-FOCWZZDE.js";import{a as te,b as ne,c as W}from"./chunk-QAYAQNCG.js";var H=new Map([["alnum","a-zA-Z0-9"],["alpha","a-zA-Z"],["ascii","\\x00-\\x7F"],["blank"," \\t"],["cntrl","\\x00-\\x1F\\x7F"],["digit","0-9"],["graph","!-~"],["lower","a-z"],["print"," -~"],["punct","!-/:-@\\[-`{-~"],["space"," \\t\\n\\r\\f\\v"],["upper","A-Z"],["word","a-zA-Z0-9_"],["xdigit","0-9A-Fa-f"]]);function V(i){let e="",t=0,n=!1;for(;t<i.length;){if(i[t]==="["&&!n){if(i[t+1]==="["&&i[t+2]===":"){let s=i.indexOf(":]]",t+3);if(s!==-1){let a=i.slice(t+3,s),r=H.get(a);if(r){e+=`[${r}]`,t=s+3;continue}}}if(i[t+1]==="^"&&i[t+2]==="["&&i[t+3]===":"){let s=i.indexOf(":]]",t+4);if(s!==-1){let a=i.slice(t+4,s),r=H.get(a);if(r){e+=`[^${r}]`,t=s+3;continue}}}e+="[",t++,n=!0,t<i.length&&i[t]==="^"&&(e+="^",t++),t<i.length&&i[t]==="]"&&(e+="\\]",t++);continue}if(n){if(i[t]==="]"){e+="]",t++,n=!1;continue}if(i[t]==="["&&i[t+1]===":"){let s=i.indexOf(":]",t+2);if(s!==-1){let a=i.slice(t+2,s),r=H.get(a);if(r){e+=r,t=s+2;continue}}}if(i[t]==="\\"&&t+1<i.length){e+=i[t]+i[t+1],t+=2;continue}e+=i[t],t++;continue}if(i[t]==="\\"&&t+1<i.length){let s=i[t+1];if(s==="+"||s==="?"||s==="|"){e+=s,t+=2;continue}if(s==="("||s===")"){e+=s,t+=2;continue}if(s==="{"||s==="}"){e+=s,t+=2;continue}if(s==="t"){e+=" ",t+=2;continue}if(s==="n"){e+=`
|
|
3
3
|
`,t+=2;continue}if(s==="r"){e+="\r",t+=2;continue}e+=i[t]+s,t+=2;continue}if(i[t]==="+"||i[t]==="?"||i[t]==="|"||i[t]==="("||i[t]===")"){e+=`\\${i[t]}`,t++;continue}if(i[t]==="^"&&!(e===""||e.endsWith("("))){e+="\\^",t++;continue}if(i[t]==="$"){let s=t===i.length-1,a=t+2<i.length&&i[t+1]==="\\"&&i[t+2]===")";if(!s&&!a){e+="\\$",t++;continue}}e+=i[t],t++}return e}function X(i){let e="",t=!1;for(let n=0;n<i.length;n++)i[n]==="["&&!t?(t=!0,e+="[",n++,n<i.length&&i[n]==="^"&&(e+="^",n++),n<i.length&&i[n]==="]"&&(e+="]",n++),n--):i[n]==="]"&&t?(t=!1,e+="]"):!t&&i[n]==="{"&&i[n+1]===","?(e+="{0,",n++):e+=i[n];return e}function ie(i){let e="";for(let t=0;t<i.length;t++){let n=i[t],s=n.charCodeAt(0);n==="\\"?e+="\\\\":n===" "?e+="\\t":n===`
|
|
4
4
|
`?e+=`$
|
|
5
5
|
`:n==="\r"?e+="\\r":n==="\x07"?e+="\\a":n==="\b"?e+="\\b":n==="\f"?e+="\\f":n==="\v"?e+="\\v":s<32||s>=127?e+=`\\${s.toString(8).padStart(3,"0")}`:e+=n}return`${e}$`}var pe=1e4;function re(i,e,t){return{patternSpace:"",holdSpace:"",lineNumber:0,totalLines:i,deleted:!1,printed:!1,quit:!1,quitSilent:!1,exitCode:void 0,errorMessage:void 0,appendBuffer:[],substitutionMade:!1,lineNumberOutput:[],nCommandOutput:[],restartCycle:!1,inDRestartedCycle:!1,currentFilename:e,pendingFileReads:[],pendingFileWrites:[],rangeStates:t||new Map,linesConsumedInCycle:0}}function me(i){return typeof i=="object"&&"first"in i&&"step"in i}function ge(i){return typeof i=="object"&&"offset"in i}function N(i,e,t,n,s){if(i==="$")return e===t;if(typeof i=="number")return e===i;if(me(i)){let{first:a,step:r}=i;return r===0?e===a:(e-a)%r===0&&e>=a}if(typeof i=="object"&&"pattern"in i)try{let a=i.pattern;a===""&&s?.lastPattern?a=s.lastPattern:a!==""&&s&&(s.lastPattern=a);let r=X(V(a));return A(r).test(n)}catch{return!1}return!1}function G(i){let e=t=>t===void 0?"undefined":t==="$"?"$":typeof t=="number"?String(t):"pattern"in t?`/${t.pattern}/`:"first"in t?`${t.first}~${t.step}`:"unknown";return`${e(i.start)},${e(i.end)}`}function be(i,e,t,n,s,a){if(!i||!i.start&&!i.end)return!0;let r=i.start,l=i.end;if(r!==void 0&&l===void 0)return N(r,e,t,n,a);if(r!==void 0&&l!==void 0){let c=typeof r=="object"&&"pattern"in r,f=typeof l=="object"&&"pattern"in l,p=ge(l);if(p&&s){let g=G(i),d=s.get(g);if(d||(d={active:!1},s.set(g,d)),d.active){let E=d.startLine||e;return e>=E+l.offset&&(d.active=!1,s.set(g,d)),!0}else return N(r,e,t,n,a)?(d.active=!0,d.startLine=e,s.set(g,d),l.offset===0&&(d.active=!1,s.set(g,d)),!0):!1}if(!c&&!f&&!p){let g=typeof r=="number"?r:r==="$"?t:1,d=typeof l=="number"?l:t;if(g<=d)return e>=g&&e<=d;if(s){let E=G(i),u=s.get(E);return u||(u={active:!1},s.set(E,u)),!u.completed&&e>=g?(u.completed=!0,s.set(E,u),!0):!1}return!1}if(s){let g=G(i),d=s.get(g);if(d||(d={active:!1},s.set(g,d)),d.active)return N(l,e,t,n,a)&&(d.active=!1,typeof r=="number"&&(d.completed=!0),s.set(g,d)),!0;{if(d.completed)return!1;let E=!1;return typeof r=="number"?E=e>=r:E=N(r,e,t,n,a),E?(d.active=!0,d.startLine=e,s.set(g,d),N(l,e,t,n,a)&&(d.active=!1,typeof r=="number"&&(d.completed=!0),s.set(g,d)),!0):!1}}return N(r,e,t,n,a)}return!0}function w(i,e,t,n,s,a){let r=be(i,e,t,n,s,a);return i?.negated?!r:r}function Ee(i,e,t,n){let s="",a=0,r=!1;for(;a<=i.length;){e.lastIndex=a;let l=e.exec(i);if(!l){s+=i.slice(a);break}if(l.index!==a){s+=i.slice(a,l.index),a=l.index,r=!1;continue}let c=l[0],f=l.slice(1);if(r&&c.length===0){if(a<i.length)s+=i[a],a++;else break;r=!1;continue}if(s+=n(c,f),r=!1,c.length===0)if(a<i.length)s+=i[a],a++;else break;else a+=c.length,r=!0}return s}function j(i,e,t){let n="",s=0;for(;s<i.length;){if(i[s]==="\\"&&s+1<i.length){let a=i[s+1];if(a==="&"){n+="&",s+=2;continue}if(a==="n"){n+=`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as T}from"./chunk-
|
|
2
|
+
import{a as T}from"./chunk-4HV7HIHS.js";import{c as b}from"./chunk-6JHJPYPW.js";import{a as M}from"./chunk-QIQMJJZ4.js";import{a as S,b as F}from"./chunk-QAYAQNCG.js";var H={name:"wc",summary:"print newline, word, and byte counts for each file",usage:"wc [OPTION]... [FILE]...",options:["-c, --bytes print the byte counts","-m, --chars print the character counts","-l, --lines print the newline counts","-w, --words print the word counts"," --help display this help and exit"]},O={lines:{short:"l",long:"lines",type:"boolean"},words:{short:"w",long:"words",type:"boolean"},bytes:{short:"c",long:"bytes",type:"boolean"},chars:{short:"m",long:"chars",type:"boolean"}},N={name:"wc",async execute(a,f){if(F(a))return S(H);let s=M("wc",a,O);if(!s.ok)return s.error;let{lines:o,words:n}=s.result.flags,l=s.result.flags.bytes,e=s.result.flags.chars,t=s.result.positional;!o&&!n&&!l&&!e&&(o=n=l=!0);let c=l||e,i=await T(f,t,{cmdName:"wc",stopOnError:!1});if(t.length===0){let r=C(i.files[0].content,e);return{stdout:`${x(r,o,n,c,"",0)}
|
|
3
3
|
`,stderr:"",exitCode:0}}let d=[],m=0,g=0,u=0;for(let{filename:r,content:y}of i.files){let p=C(y,e);m+=p.lines,g+=p.words,u+=p.third,d.push({filename:r,stats:p})}let L=t.length>1?m:Math.max(...d.map(r=>r.stats.lines)),$=t.length>1?g:Math.max(...d.map(r=>r.stats.words)),B=t.length>1?u:Math.max(...d.map(r=>r.stats.third)),h=t.length>1?3:0;o&&(h=Math.max(h,String(L).length)),n&&(h=Math.max(h,String($).length)),c&&(h=Math.max(h,String(B).length));let w="";for(let{filename:r,stats:y}of d)w+=`${x(y,o,n,c,r,h)}
|
|
4
4
|
`;return t.length>1&&(w+=`${x({lines:m,words:g,third:u},o,n,c,"total",h)}
|
|
5
5
|
`),{stdout:w,stderr:i.stderr,exitCode:i.exitCode}}};function C(a,f){let s=a,o=s.length,n=f?Array.from(b(a)).length:o,l=0,e=0,t=!1;for(let c=0;c<o;c++){let i=s[c];i===`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{c as u}from"./chunk-DLL7UR66.js";import{c as l}from"./chunk-
|
|
2
|
+
import{c as u}from"./chunk-DLL7UR66.js";import{c as l}from"./chunk-6JHJPYPW.js";import{a as d,b as h}from"./chunk-QAYAQNCG.js";var m={name:"bash",summary:"execute shell commands or scripts",usage:"bash [OPTIONS] [SCRIPT_FILE] [ARGUMENTS...]",options:["-c COMMAND execute COMMAND string"," --help display this help and exit"],notes:["Without -c, reads and executes commands from SCRIPT_FILE.","Arguments are passed as $1, $2, etc. to the script.",'$0 is set to the script name (or "bash" with -c).']},F={name:"bash",async execute(t,e){if(h(t))return d(m);if(t[0]==="-c"&&t.length>=2){let s=t[1],n=t[2]||"bash",c=t.slice(3);return r(s,n,c,e)}if(t.length===0){let s=l(e.stdin);return s.trim()?r(s,"bash",[],e):{stdout:"",stderr:"",exitCode:0}}let o=t[0],i=t.slice(1);try{let s=e.fs.resolvePath(e.cwd,o),n=await e.fs.readFile(s);return r(n,o,i,e)}catch{return{stdout:"",stderr:`bash: ${o}: No such file or directory
|
|
3
3
|
`,exitCode:127}}}},P={name:"sh",async execute(t,e){if(h(t))return d({...m,name:"sh",summary:"execute shell commands or scripts (POSIX shell)"});if(t[0]==="-c"&&t.length>=2){let s=t[1],n=t[2]||"sh",c=t.slice(3);return r(s,n,c,e)}if(t.length===0){let s=l(e.stdin);return s.trim()?r(s,"sh",[],e):{stdout:"",stderr:"",exitCode:0}}let o=t[0],i=t.slice(1);try{let s=e.fs.resolvePath(e.cwd,o),n=await e.fs.readFile(s);return r(n,o,i,e)}catch{return{stdout:"",stderr:`sh: ${o}: No such file or directory
|
|
4
4
|
`,exitCode:127}}}};async function r(t,e,o,i){if(!i.exec)return{stdout:"",stderr:`bash: internal error: exec function not available
|
|
5
5
|
`,exitCode:1};let s=u(i.exportedEnv||{},{0:e,"#":String(o.length),"@":o.join(" "),"*":o.join(" ")});o.forEach((a,p)=>{s[String(p+1)]=a});let n=t;if(n.startsWith("#!")){let a=n.indexOf(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as j}from"./chunk-4I3HOE5Z.js";import{c as y}from"./chunk-
|
|
2
|
+
import{a as j}from"./chunk-4I3HOE5Z.js";import{c as y}from"./chunk-6JHJPYPW.js";import{e as v}from"./chunk-BZUGFHVS.js";var w=v(j(),1);function C(){return Object.create(null)}function E(e,r,o){e[r]=o}function b(e){let r=C();for(let o of Object.keys(e)){let s=e[o];(typeof s=="string"||typeof s=="number"||typeof s=="boolean"||s===null)&&(r[o]=s)}return r}function S(e){let r=w.default.parse(e.trim(),{header:!0,dynamicTyping:!0,skipEmptyLines:!0}),o=r.data.map(s=>b(s));return{headers:r.meta.fields||[],data:o}}function I(e,r){return r.length===0?`${e.join(",")}
|
|
3
3
|
`:`${w.default.unparse(r,{columns:e}).replace(/\r\n/g,`
|
|
4
4
|
`)}
|
|
5
5
|
`}async function g(e,r){let o=e.find(p=>!p.startsWith("-")),s;if(!o||o==="-")s=y(r.stdin);else try{let p=r.fs.resolvePath(r.cwd,o);s=await r.fs.readFile(p)}catch{return{headers:[],data:[],error:{stdout:"",stderr:`xan: ${o}: No such file or directory
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as q,b as w}from"./chunk-XRFHFXFP.js";import{c as b}from"./chunk-L64BMZUV.js";import{b as E}from"./chunk-TN7HHBQW.js";import{c as x}from"./chunk-
|
|
2
|
+
import{a as q,b as w}from"./chunk-XRFHFXFP.js";import{c as b}from"./chunk-L64BMZUV.js";import{b as E}from"./chunk-TN7HHBQW.js";import{c as x}from"./chunk-6JHJPYPW.js";import{a as T,b as g}from"./chunk-FOCWZZDE.js";import{a as C,b as M}from"./chunk-QAYAQNCG.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(`
|
|
3
3
|
`)}
|
|
4
4
|
`:""}function L(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
|
|
5
5
|
`)?`"${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(`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
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-
|
|
2
|
+
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-KHCKEMD6.js";import{a as st}from"./chunk-4I3HOE5Z.js";import{a as $}from"./chunk-LEKBROJD.js";import{f as qe,g as X}from"./chunk-4WKZNNJK.js";import{a as J}from"./chunk-4RUAZWKT.js";import{a as _e}from"./chunk-4HV7HIHS.js";import{c as _}from"./chunk-6JHJPYPW.js";import{a as D,b as G}from"./chunk-QAYAQNCG.js";import{b as We,d as et,e as tt,f as nt}from"./chunk-BZUGFHVS.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===`
|
|
3
3
|
`||n==="\r")this.pos++;else if(n==="#")for(;this.pos<this.input.length&&this.input[this.pos]!==`
|
|
4
4
|
`;)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+=`
|
|
5
5
|
`;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
|
|
@@ -59,7 +59,7 @@ 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-VPADYNBD
|
|
|
59
59
|
`,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
|
|
60
60
|
`,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}'
|
|
61
61
|
`,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
|
|
62
|
-
`,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-
|
|
62
|
+
`,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-HLIT2HYA.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.
|
|
63
63
|
It provides a simple, ergonomic interface for common data operations.
|
|
64
64
|
|
|
65
65
|
COMMANDS:
|