@eidos.space/just-bash 3.0.3 → 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/{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/{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 +3 -3
- 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-RLAAFSP3.js → chunk-AAH22H6T.js} +1 -1
- 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-UZR7BRBM.js → chunk-LJ64BU4T.js} +1 -1
- 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-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/{cut-OKARJCCV.js → cut-QWB7NUKQ.js} +1 -1
- package/dist/bundle/chunks/{diff-5MIVVRRQ.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-YKB23BRI.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-WGBAMDHY.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/{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/{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 +76 -76
- package/dist/bundle/index.js +52 -52
- package/package.json +1 -1
- package/dist/bin/chunks/chunk-VZK4FHWJ.js +0 -3
- package/dist/bin/shell/chunks/chunk-VZK4FHWJ.js +0 -3
- package/dist/bundle/chunks/chunk-NRSASXYY.js +0 -2
- package/dist/bundle/chunks/xan-view-HDVKHFC2.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-
|
|
3
|
+
import{a,b}from"./chunk-MMSWVFQQ.js";import"./chunk-MROECM42.js";import"./chunk-LNNWMRCB.js";import"./chunk-HL4ZS7TX.js";import"./chunk-IEXQTXU5.js";import"./chunk-PUSAQWLR.js";import"./chunk-47WZ2U6M.js";import"./chunk-MUFNRCMY.js";import"./chunk-LNVSXNT7.js";export{a as awkCommand2,b as flagsForFuzzing};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-6WJQNLR2.js";import"./chunk-
|
|
3
|
+
import{a,b}from"./chunk-6WJQNLR2.js";import"./chunk-PUSAQWLR.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-LNVSXNT7.js";export{a as base64Command,b as flagsForFuzzing};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b,c,d}from"./chunk-
|
|
3
|
+
import{a,b,c,d}from"./chunk-LLC5H7UY.js";import"./chunk-MROECM42.js";import"./chunk-PUSAQWLR.js";import"./chunk-MUFNRCMY.js";import"./chunk-LNVSXNT7.js";export{a as bashCommand,c as flagsForFuzzing,b as shCommand,d as shFlagsForFuzzing};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-
|
|
3
|
+
import{a,b}from"./chunk-VZTJXRFX.js";import"./chunk-DSS5HVJD.js";import"./chunk-PUSAQWLR.js";import"./chunk-7JZKVC3F.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-LNVSXNT7.js";export{a as catCommand,b as flagsForFuzzing};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{f as G}from"./chunk-MLUOPG3W.js";import{a as q}from"./chunk-3MRB66F4.js";import{a as z,b as E,c as U}from"./chunk-ALVEEXFD.js";import{a as $}from"./chunk-IEXQTXU5.js";import{a as L}from"./chunk-
|
|
3
|
+
import{f as G}from"./chunk-MLUOPG3W.js";import{a as q}from"./chunk-3MRB66F4.js";import{a as z,b as E,c as U}from"./chunk-ALVEEXFD.js";import{a as $}from"./chunk-IEXQTXU5.js";import{a as L}from"./chunk-PUSAQWLR.js";import{a as B,b as _,c as D}from"./chunk-MUFNRCMY.js";var H=G({js:{extensions:[".js",".mjs",".cjs",".jsx"],globs:[]},ts:{extensions:[".ts",".tsx",".mts",".cts"],globs:[]},html:{extensions:[".html",".htm",".xhtml"],globs:[]},css:{extensions:[".css",".scss",".sass",".less"],globs:[]},json:{extensions:[".json",".jsonc",".json5"],globs:[]},xml:{extensions:[".xml",".xsl",".xslt"],globs:[]},c:{extensions:[".c",".h"],globs:[]},cpp:{extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx",".h"],globs:[]},rust:{extensions:[".rs"],globs:[]},go:{extensions:[".go"],globs:[]},zig:{extensions:[".zig"],globs:[]},java:{extensions:[".java"],globs:[]},kotlin:{extensions:[".kt",".kts"],globs:[]},scala:{extensions:[".scala",".sc"],globs:[]},clojure:{extensions:[".clj",".cljc",".cljs",".edn"],globs:[]},py:{extensions:[".py",".pyi",".pyw"],globs:[]},rb:{extensions:[".rb",".rake",".gemspec"],globs:["Rakefile","Gemfile"]},php:{extensions:[".php",".phtml",".php3",".php4",".php5"],globs:[]},perl:{extensions:[".pl",".pm",".pod",".t"],globs:[]},lua:{extensions:[".lua"],globs:[]},sh:{extensions:[".sh",".bash",".zsh",".fish"],globs:[".bashrc",".zshrc",".profile"]},bat:{extensions:[".bat",".cmd"],globs:[]},ps:{extensions:[".ps1",".psm1",".psd1"],globs:[]},yaml:{extensions:[".yaml",".yml"],globs:[]},toml:{extensions:[".toml"],globs:["Cargo.toml","pyproject.toml"]},ini:{extensions:[".ini",".cfg",".conf"],globs:[]},csv:{extensions:[".csv",".tsv"],globs:[]},md:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},markdown:{extensions:[".md",".mdx",".markdown",".mdown",".mkd"],globs:[]},rst:{extensions:[".rst"],globs:[]},txt:{extensions:[".txt",".text"],globs:[]},tex:{extensions:[".tex",".ltx",".sty",".cls"],globs:[]},sql:{extensions:[".sql"],globs:[]},graphql:{extensions:[".graphql",".gql"],globs:[]},proto:{extensions:[".proto"],globs:[]},make:{extensions:[".mk",".mak"],globs:["Makefile","GNUmakefile","makefile"]},docker:{extensions:[],globs:["Dockerfile","Dockerfile.*","*.dockerfile"]},tf:{extensions:[".tf",".tfvars"],globs:[]}}),M=class{types;constructor(){this.types=new Map(Object.entries(H).map(([t,n])=>[t,{extensions:[...n.extensions],globs:[...n.globs]}]))}addType(t){let n=t.indexOf(":");if(n===-1)return;let s=t.slice(0,n),r=t.slice(n+1);if(r.startsWith("include:")){let l=r.slice(8),i=this.types.get(l);if(i){let a=this.types.get(s)||{extensions:[],globs:[]};a.extensions.push(...i.extensions),a.globs.push(...i.globs),this.types.set(s,a)}}else{let l=this.types.get(s)||{extensions:[],globs:[]};if(r.startsWith("*.")&&!r.slice(2).includes("*")){let i=r.slice(1);l.extensions.includes(i)||l.extensions.push(i)}else l.globs.includes(r)||l.globs.push(r);this.types.set(s,l)}}clearType(t){let n=this.types.get(t);n&&(n.extensions=[],n.globs=[])}getType(t){return this.types.get(t)}getAllTypes(){return this.types}matchesType(t,n){let s=t.toLowerCase();for(let r of n){if(r==="all"){if(this.matchesAnyType(t))return!0;continue}let l=this.types.get(r);if(l){for(let i of l.extensions)if(s.endsWith(i))return!0;for(let i of l.globs)if(i.includes("*")){let a=i.replace(/\./g,"\\.").replace(/\*/g,".*");if($(`^${a}$`,"i").test(t))return!0}else if(s===i.toLowerCase())return!0}}return!1}matchesAnyType(t){let n=t.toLowerCase();for(let s of this.types.values()){for(let r of s.extensions)if(n.endsWith(r))return!0;for(let r of s.globs)if(r.includes("*")){let l=r.replace(/\./g,"\\.").replace(/\*/g,".*");if($(`^${l}$`,"i").test(t))return!0}else if(n===r.toLowerCase())return!0}return!1}};function V(){let e=[];for(let[t,n]of Object.entries(H).sort()){let s=[];for(let r of n.extensions)s.push(`*${r}`);for(let r of n.globs)s.push(r);e.push(`${t}: ${s.join(", ")}`)}return`${e.join(`
|
|
4
4
|
`)}
|
|
5
5
|
`}function Z(){return{ignoreCase:!1,caseSensitive:!1,smartCase:!0,fixedStrings:!1,wordRegexp:!1,lineRegexp:!1,invertMatch:!1,multiline:!1,multilineDotall:!1,patterns:[],patternFiles:[],count:!1,countMatches:!1,files:!1,filesWithMatches:!1,filesWithoutMatch:!1,stats:!1,onlyMatching:!1,maxCount:0,lineNumber:!0,noFilename:!1,withFilename:!1,nullSeparator:!1,byteOffset:!1,column:!1,vimgrep:!1,replace:null,afterContext:0,beforeContext:0,contextSeparator:"--",quiet:!1,heading:!1,passthru:!1,includeZero:!1,sort:"path",json:!1,globs:[],iglobs:[],globCaseInsensitive:!1,types:[],typesNot:[],typeAdd:[],typeClear:[],hidden:!1,noIgnore:!1,noIgnoreDot:!1,noIgnoreVcs:!1,ignoreFiles:[],maxDepth:256,maxFilesize:0,followSymlinks:!1,searchZip:!1,searchBinary:!1,preprocessor:null,preprocessorGlobs:[]}}function se(e){let t=e.match(/^(\d+)([KMG])?$/i);if(!t)return 0;let n=parseInt(t[1],10);switch((t[2]||"").toUpperCase()){case"K":return n*1024;case"M":return n*1024*1024;case"G":return n*1024*1024*1024;default:return n}}function ne(e){return/^\d+[KMG]?$/i.test(e)?null:{stdout:"",stderr:`rg: invalid --max-filesize value: ${e}
|
|
6
6
|
`,exitCode:1}}function J(e){return null}var Y=[{short:"g",long:"glob",target:"globs",multi:!0},{long:"iglob",target:"iglobs",multi:!0},{short:"t",long:"type",target:"types",multi:!0,validate:J},{short:"T",long:"type-not",target:"typesNot",multi:!0,validate:J},{long:"type-add",target:"typeAdd",multi:!0},{long:"type-clear",target:"typeClear",multi:!0},{short:"m",long:"max-count",target:"maxCount",parse:parseInt},{short:"e",long:"regexp",target:"patterns",multi:!0},{short:"f",long:"file",target:"patternFiles",multi:!0},{short:"r",long:"replace",target:"replace"},{short:"d",long:"max-depth",target:"maxDepth",parse:parseInt},{long:"max-filesize",target:"maxFilesize",parse:se,validate:ne},{long:"context-separator",target:"contextSeparator"},{short:"j",long:"threads",ignored:!0},{long:"ignore-file",target:"ignoreFiles",multi:!0},{long:"pre",target:"preprocessor"},{long:"pre-glob",target:"preprocessorGlobs",multi:!0}],re=new Map([["i",e=>{e.ignoreCase=!0,e.caseSensitive=!1,e.smartCase=!1}],["--ignore-case",e=>{e.ignoreCase=!0,e.caseSensitive=!1,e.smartCase=!1}],["s",e=>{e.caseSensitive=!0,e.ignoreCase=!1,e.smartCase=!1}],["--case-sensitive",e=>{e.caseSensitive=!0,e.ignoreCase=!1,e.smartCase=!1}],["S",e=>{e.smartCase=!0,e.ignoreCase=!1,e.caseSensitive=!1}],["--smart-case",e=>{e.smartCase=!0,e.ignoreCase=!1,e.caseSensitive=!1}],["F",e=>{e.fixedStrings=!0}],["--fixed-strings",e=>{e.fixedStrings=!0}],["w",e=>{e.wordRegexp=!0}],["--word-regexp",e=>{e.wordRegexp=!0}],["x",e=>{e.lineRegexp=!0}],["--line-regexp",e=>{e.lineRegexp=!0}],["v",e=>{e.invertMatch=!0}],["--invert-match",e=>{e.invertMatch=!0}],["U",e=>{e.multiline=!0}],["--multiline",e=>{e.multiline=!0}],["--multiline-dotall",e=>{e.multilineDotall=!0,e.multiline=!0}],["c",e=>{e.count=!0}],["--count",e=>{e.count=!0}],["--count-matches",e=>{e.countMatches=!0}],["l",e=>{e.filesWithMatches=!0}],["--files",e=>{e.files=!0}],["--files-with-matches",e=>{e.filesWithMatches=!0}],["--files-without-match",e=>{e.filesWithoutMatch=!0}],["--stats",e=>{e.stats=!0}],["o",e=>{e.onlyMatching=!0}],["--only-matching",e=>{e.onlyMatching=!0}],["q",e=>{e.quiet=!0}],["--quiet",e=>{e.quiet=!0}],["N",e=>{e.lineNumber=!1}],["--no-line-number",e=>{e.lineNumber=!1}],["H",e=>{e.withFilename=!0}],["--with-filename",e=>{e.withFilename=!0}],["I",e=>{e.noFilename=!0}],["--no-filename",e=>{e.noFilename=!0}],["0",e=>{e.nullSeparator=!0}],["--null",e=>{e.nullSeparator=!0}],["b",e=>{e.byteOffset=!0}],["--byte-offset",e=>{e.byteOffset=!0}],["--column",e=>{e.column=!0,e.lineNumber=!0}],["--no-column",e=>{e.column=!1}],["--vimgrep",e=>{e.vimgrep=!0,e.column=!0,e.lineNumber=!0}],["--json",e=>{e.json=!0}],["--hidden",e=>{e.hidden=!0}],["--no-ignore",e=>{e.noIgnore=!0}],["--no-ignore-dot",e=>{e.noIgnoreDot=!0}],["--no-ignore-vcs",e=>{e.noIgnoreVcs=!0}],["L",e=>{e.followSymlinks=!0}],["--follow",e=>{e.followSymlinks=!0}],["z",e=>{e.searchZip=!0}],["--search-zip",e=>{e.searchZip=!0}],["a",e=>{e.searchBinary=!0}],["--text",e=>{e.searchBinary=!0}],["--heading",e=>{e.heading=!0}],["--passthru",e=>{e.passthru=!0}],["--include-zero",e=>{e.includeZero=!0}],["--glob-case-insensitive",e=>{e.globCaseInsensitive=!0}]]),ie=new Set(["n","--line-number"]);function le(e){e.hidden?e.searchBinary=!0:e.noIgnore?e.hidden=!0:e.noIgnore=!0}function oe(e,t,n){let s=e[t];for(let r of Y){if(s.startsWith(`--${r.long}=`)){let l=s.slice(`--${r.long}=`.length),i=P(n,r,l);return i?{newIndex:t,error:i}:{newIndex:t}}if(r.short&&s.startsWith(`-${r.short}`)&&s.length>2){let l=s.slice(2),i=P(n,r,l);return i?{newIndex:t,error:i}:{newIndex:t}}if(r.short&&s===`-${r.short}`||s===`--${r.long}`){if(t+1>=e.length)return null;let l=e[t+1],i=P(n,r,l);return i?{newIndex:t+1,error:i}:{newIndex:t+1}}}return null}function ae(e){return Y.find(t=>t.short===e)}function P(e,t,n){if(t.validate){let r=t.validate(n);if(r)return r}if(t.ignored||!t.target)return;let s=t.parse?t.parse(n):n;t.multi?e[t.target].push(s):e[t.target]=s}function ce(e,t){let n=e[t];if(n==="--sort"&&t+1<e.length){let s=e[t+1];if(s==="path"||s==="none")return{value:s,newIndex:t+1}}if(n.startsWith("--sort=")){let s=n.slice(7);if(s==="path"||s==="none")return{value:s,newIndex:t}}return null}function fe(e,t){let n=e[t],s=n.match(/^-([ABC])(\d+)$/);return s?{flag:s[1],value:parseInt(s[2],10),newIndex:t}:(n==="-A"||n==="-B"||n==="-C")&&t+1<e.length?{flag:n[1],value:parseInt(e[t+1],10),newIndex:t+1}:null}function ue(e){let t=e.match(/^-m(\d+)$/);return t?parseInt(t[1],10):null}function K(e){let t=Z(),n=null,s=[],r=-1,l=-1,i=-1,a=!1;for(let c=0;c<e.length;c++){let o=e[c];if(o.startsWith("-")&&o!=="-"){let u=fe(e,c);if(u){let{flag:f,value:x,newIndex:b}=u;f==="A"?r=Math.max(r,x):f==="B"?l=Math.max(l,x):i=x,c=b;continue}let d=ue(o);if(d!==null){t.maxCount=d;continue}let p=oe(e,c,t);if(p){if(p.error)return{success:!1,error:p.error};c=p.newIndex;continue}let g=ce(e,c);if(g){t.sort=g.value,c=g.newIndex;continue}let w=o.startsWith("--")?[o]:o.slice(1).split(""),m=!1;for(let f of w){if(ie.has(f)){t.lineNumber=!0,a=!0;continue}if(f==="u"||f==="--unrestricted"){le(t);continue}if(f==="P"||f==="--pcre2")return{success:!1,error:{stdout:"",stderr:`rg: PCRE2 is not supported. Use standard regex syntax instead.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as 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-
|
|
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-PUSAQWLR.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
4
|
`)}
|
|
5
5
|
`:""}function L(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
|
|
6
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(`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{d as m}from"./chunk-
|
|
3
|
+
import{d as m}from"./chunk-PUSAQWLR.js";async function $(o,u){let a="octal",r=[],i=[];for(let t=0;t<o.length;t++){let e=o[t];if(e==="-c")r.push("char");else if(e==="-An"||e==="-A"&&o[t+1]==="n")a="none",e==="-A"&&t++;else if(e==="-t"&&o[t+1]){let n=o[++t];n==="x1"?r.push("hex"):n==="c"?r.push("char"):n.startsWith("o")&&r.push("octal")}else(!e.startsWith("-")||e==="-")&&i.push(e)}r.length===0&&r.push("octal");let p=u.stdin;if(i.length>0&&i[0]!=="-"){let t=i[0].startsWith("/")?i[0]:`${u.cwd}/${i[0]}`;try{p=await m(u.fs,t)}catch{return{stdout:"",stderr:`od: ${i[0]}: No such file or directory
|
|
4
4
|
`,exitCode:1}}}let d=r.includes("char");function y(t){return t===0?" \\0":t===7?" \\a":t===8?" \\b":t===9?" \\t":t===10?" \\n":t===11?" \\v":t===12?" \\f":t===13?" \\r":t>=32&&t<127?` ${String.fromCharCode(t)}`:` ${t.toString(8).padStart(3,"0")}`}function S(t){return d?` ${t.toString(16).padStart(2,"0")}`:` ${t.toString(16).padStart(2,"0")}`}function x(t){return` ${t.toString(8).padStart(3,"0")}`}let s=[];for(let t of p)s.push(t.charCodeAt(0));let c=16,f=[];for(let t=0;t<s.length;t+=c){let e=s.slice(t,t+c);for(let n=0;n<r.length;n++){let g=r[n],l;g==="char"?l=e.map(y):g==="hex"?l=e.map(S):l=e.map(x);let h="";n===0&&a!=="none"?h=`${t.toString(8).padStart(7,"0")} `:(n>0||a==="none")&&(h=a==="none"?"":" "),f.push(h+l.join(""))}}return a!=="none"&&s.length>0&&f.push(s.length.toString(8).padStart(7,"0")),{stdout:f.length>0?`${f.join(`
|
|
5
5
|
`)}
|
|
6
6
|
`:"",stderr:"",exitCode:0}}var F={name:"od",execute:$},A={name:"od",flags:[{flag:"-c",type:"boolean"},{flag:"-A",type:"value",valueHint:"string"},{flag:"-t",type:"value",valueHint:"string"},{flag:"-N",type:"value",valueHint:"number"}],stdinType:"text",needsFiles:!0};export{F as a,A as b};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as D}from"./chunk-
|
|
3
|
+
import{a as D}from"./chunk-PUSAQWLR.js";import{a as N}from"./chunk-NE4R2FVV.js";import{a as H,b as A}from"./chunk-MUFNRCMY.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(`
|
|
4
4
|
`))&&(e=e.trim()),(!t.newlineIsToken||!n.includes(`
|
|
5
5
|
`))&&(n=n.trim())):t.ignoreNewlineAtEof&&!t.newlineIsToken&&(e.endsWith(`
|
|
6
6
|
`)&&(e=e.slice(0,-1)),n.endsWith(`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as d}from"./chunk-
|
|
3
|
+
import{a as d}from"./chunk-PUSAQWLR.js";import{a as f,b as c,c as u}from"./chunk-MUFNRCMY.js";var x={name:"expand",summary:"convert tabs to spaces",usage:"expand [OPTION]... [FILE]...",description:"Convert TABs in each FILE to spaces, 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","-i Only convert leading tabs on each line"],examples:["expand file.txt # Convert all tabs to 8 spaces","expand -t 4 file.txt # Use 4-space tabs","expand -t 4,8,12 file.txt # Custom tab stops"]};function p(n){let i=n.split(",").map(o=>o.trim()),t=[];for(let o of i){let e=parseInt(o,10);if(Number.isNaN(e)||e<1)return null;t.push(e)}for(let o=1;o<t.length;o++)if(t[o]<=t[o-1])return null;return t}function g(n,i){if(i.length===1){let t=i[0];return t-n%t}for(let t of i)if(t>n)return t-n;if(i.length>=2){let t=i[i.length-1]-i[i.length-2],o=i[i.length-1],e=Math.floor((n-o)/t)+1;return o+e*t-n}return 1}function b(n,i){let{tabStops:t,leadingOnly:o}=i,e="",r=0,s=!0;for(let a of n)if(a===" ")if(o&&!s)e+=a,r++;else{let l=g(r,t);e+=" ".repeat(l),r+=l}else a!==" "&&a!==" "&&(s=!1),e+=a,r++;return e}function h(n,i){if(n==="")return"";let t=n.split(`
|
|
4
4
|
`),o=n.endsWith(`
|
|
5
5
|
`)&&t[t.length-1]==="";return o&&t.pop(),t.map(r=>b(r,i)).join(`
|
|
6
6
|
`)+(o?`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{d as a}from"./chunk-
|
|
3
|
+
import{d as a}from"./chunk-PUSAQWLR.js";import{a as d,b as h,c as p}from"./chunk-MUFNRCMY.js";var k={name:"split",summary:"split a file into pieces",usage:"split [OPTION]... [FILE [PREFIX]]",description:"Output pieces of FILE to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is 'x'.",options:["-l N Put N lines per output file","-b SIZE Put SIZE bytes per output file (K, M, G suffixes)","-n CHUNKS Split into CHUNKS equal-sized files","-d Use numeric suffixes (00, 01, ...) instead of alphabetic","-a LENGTH Use suffixes of length LENGTH (default: 2)","--additional-suffix=SUFFIX Append SUFFIX to file names"],examples:["split -l 100 file.txt # Split into 100-line chunks","split -b 1M file.bin # Split into 1MB chunks","split -n 5 file.txt # Split into 5 equal parts","split -d file.txt part_ # part_00, part_01, ...","split -a 3 -d file.txt x # x000, x001, ..."]},m=1e5;function b(s){let l=s.match(/^(\d+)([KMGTPEZY]?)([B]?)$/i);if(!l)return null;let e=Number.parseInt(l[1],10);if(Number.isNaN(e)||e<1)return null;let u=(l[2]||"").toUpperCase(),o=new Map([["",1],["K",1024],["M",1024*1024],["G",1024*1024*1024],["T",1024*1024*1024*1024],["P",1024*1024*1024*1024*1024]]).get(u);return o===void 0?null:e*o}function g(s,l,e){if(l)return s.toString().padStart(e,"0");let u="abcdefghijklmnopqrstuvwxyz",t="",o=s;for(let r=0;r<e;r++)t=u[o%26]+t,o=Math.floor(o/26);return t}function C(s,l){let e=s.split(`
|
|
4
4
|
`),u=s.endsWith(`
|
|
5
5
|
`)&&e[e.length-1]==="";u&&e.pop();let t=[];for(let o=0;o<e.length;o+=l){let r=e.slice(o,o+l),c=o+l>=e.length&&!u?r.join(`
|
|
6
6
|
`):`${r.join(`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as j,b as y}from"./chunk-
|
|
3
|
+
import{a as j,b as y}from"./chunk-PUSAQWLR.js";import{a as g,b as v,c as F}from"./chunk-MUFNRCMY.js";var N={name:"join",summary:"join lines of two files on a common field",usage:"join [OPTION]... FILE1 FILE2",description:"For each pair of input lines with identical join fields, write a line to standard output. The default join field is the first, delimited by blanks.",options:["-1 FIELD Join on this FIELD of file 1 (default: 1)","-2 FIELD Join on this FIELD of file 2 (default: 1)","-t CHAR Use CHAR as input and output field separator","-a FILENUM Also print unpairable lines from file FILENUM (1 or 2)","-v FILENUM Like -a but only output unpairable lines","-e STRING Replace missing fields with STRING","-o FORMAT Output format (comma-separated list of FILENUM.FIELD)","-i Ignore case when comparing fields"],examples:["join file1 file2 # Join on first field","join -1 2 -2 1 file1 file2 # Join file1 col 2 with file2 col 1","join -t ',' file1.csv file2.csv # Join CSV files","join -a 1 file1 file2 # Left outer join"]};function I(i,s){return s?i.split(s):i.split(/[ \t]+/).filter(n=>n.length>0)}function L(i,s,n,f){let e=I(i,s),r=e[n-1]??"";return f&&(r=r.toLowerCase()),{fields:e,joinKey:r,original:i}}function m(i,s,n){let f=n.separator??" ";if(n.outputFormat){let l=[];for(let{file:c,field:p}of n.outputFormat){let a=c===1?i:s;a&&p===0?l.push(a.joinKey):a&&a.fields[p-1]!==void 0?l.push(a.fields[p-1]):l.push(n.emptyString)}return l.join(f)}let e=[],r=i?.joinKey??s?.joinKey??"";if(e.push(r),i)for(let l=0;l<i.fields.length;l++)l!==n.field1-1&&e.push(i.fields[l]);if(s)for(let l=0;l<s.fields.length;l++)l!==n.field2-1&&e.push(s.fields[l]);return e.join(f)}function U(i){let s=i.split(","),n=[];for(let f of s){let e=f.trim().match(/^(\d+)\.(\d+)$/);if(!e)return null;let r=Number.parseInt(e[1],10),l=Number.parseInt(e[2],10);if(r!==1&&r!==2)return null;n.push({file:r,field:l})}return n}var E={name:"join",execute:async(i,s)=>{if(v(i))return g(N);let n={field1:1,field2:1,separator:null,printUnpairable:new Set,onlyUnpairable:new Set,emptyString:"",outputFormat:null,ignoreCase:!1},f=[],e=0;for(;e<i.length;){let t=i[e];if(t==="-1"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:"",stderr:`join: invalid field number: '${i[e+1]}'
|
|
4
4
|
`};n.field1=o,e+=2}else if(t==="-2"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:"",stderr:`join: invalid field number: '${i[e+1]}'
|
|
5
5
|
`};n.field2=o,e+=2}else if((t==="-t"||t==="--field-separator")&&e+1<i.length)n.separator=i[e+1],e+=2;else if(t.startsWith("-t")&&t.length>2)n.separator=t.slice(2),e++;else if(t==="-a"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(o!==1&&o!==2)return{exitCode:1,stdout:"",stderr:`join: invalid file number: '${i[e+1]}'
|
|
6
6
|
`};n.printUnpairable.add(o),e+=2}else if(t.match(/^-a[12]$/))n.printUnpairable.add(Number.parseInt(t[2],10)),e++;else if(t==="-v"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(o!==1&&o!==2)return{exitCode:1,stdout:"",stderr:`join: invalid file number: '${i[e+1]}'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as g}from"./chunk-
|
|
3
|
+
import{a as g}from"./chunk-PUSAQWLR.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
4
|
`),o=s.endsWith(`
|
|
5
5
|
`)&&e[e.length-1]==="";return o&&e.pop(),e.map(a=>N(a,i)).join(`
|
|
6
6
|
`)+(o?`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as u}from"./chunk-
|
|
3
|
+
import{a as u}from"./chunk-PUSAQWLR.js";import{a as S}from"./chunk-PBOVSFTJ.js";import{a as y}from"./chunk-NE4R2FVV.js";import{a as m,b as C}from"./chunk-MUFNRCMY.js";var b={name:"tr",summary:"translate or delete characters",usage:"tr [OPTION]... SET1 [SET2]",options:["-c, -C, --complement use the complement of SET1","-d, --delete delete characters in SET1","-s, --squeeze-repeats squeeze repeated characters"," --help display this help and exit"],description:`SET syntax:
|
|
4
4
|
a-z character range
|
|
5
5
|
[:alnum:] all letters and digits
|
|
6
6
|
[:alpha:] all letters
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as F,b,c as M,d as He,e as w,f as v,g as Y,h as Z}from"./chunk-
|
|
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-QMRTESE5.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-DSS5HVJD.js";import{a as _}from"./chunk-PUSAQWLR.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
4
|
`||n==="\r")this.pos++;else if(n==="#")for(;this.pos<this.input.length&&this.input[this.pos]!==`
|
|
5
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
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
|
|
@@ -60,7 +60,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-LAHBP3FW
|
|
|
60
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
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
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-
|
|
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-UGYNQULV.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
64
|
It provides a simple, ergonomic interface for common data operations.
|
|
65
65
|
|
|
66
66
|
COMMANDS:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as g}from"./chunk-
|
|
3
|
+
import{a as g}from"./chunk-PUSAQWLR.js";import{a as y,b as $,c as F}from"./chunk-MUFNRCMY.js";var b={name:"comm",summary:"compare two sorted files line by line",usage:"comm [OPTION]... FILE1 FILE2",options:["-1 suppress column 1 (lines unique to FILE1)","-2 suppress column 2 (lines unique to FILE2)","-3 suppress column 3 (lines that appear in both files)"," --help display this help and exit"]},E={name:"comm",async execute(m,a){if($(m))return y(b);let r=!1,l=!1,f=!1,i=[];for(let e of m)if(e==="-1")r=!0;else if(e==="-2")l=!0;else if(e==="-3")f=!0;else if(e==="-12"||e==="-21")r=!0,l=!0;else if(e==="-13"||e==="-31")r=!0,f=!0;else if(e==="-23"||e==="-32")l=!0,f=!0;else if(e==="-123"||e==="-132"||e==="-213"||e==="-231"||e==="-312"||e==="-321")r=!0,l=!0,f=!0;else{if(e.startsWith("-")&&e!=="-")return F("comm",e);i.push(e)}if(i.length!==2)return{stdout:"",stderr:`comm: missing operand
|
|
4
4
|
Try 'comm --help' for more information.
|
|
5
5
|
`,exitCode:1};let p=async e=>{if(e==="-")return g(a.stdin);try{let x=a.fs.resolvePath(a.cwd,e);return await a.fs.readFile(x)}catch{return null}},c=await p(i[0]);if(c===null)return{stdout:"",stderr:`comm: ${i[0]}: No such file or directory
|
|
6
6
|
`,exitCode:1};let d=await p(i[1]);if(d===null)return{stdout:"",stderr:`comm: ${i[1]}: No such file or directory
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as q,b as M}from"./chunk-LSQTB2QK.js";import{d as b}from"./chunk-MLUOPG3W.js";import{a as A,b as L}from"./chunk-LNNWMRCB.js";import{a as k}from"./chunk-HL4ZS7TX.js";import{a as F}from"./chunk-
|
|
3
|
+
import{a as q,b as M}from"./chunk-LSQTB2QK.js";import{d as b}from"./chunk-MLUOPG3W.js";import{a as A,b as L}from"./chunk-LNNWMRCB.js";import{a as k}from"./chunk-HL4ZS7TX.js";import{a as F}from"./chunk-DSS5HVJD.js";import{a as E}from"./chunk-PUSAQWLR.js";import{k as $}from"./chunk-47WZ2U6M.js";import{a as J}from"./chunk-PBOVSFTJ.js";import{a as D,b as z,c as O}from"./chunk-MUFNRCMY.js";function U(e){switch(e){case"\b":return"\\b";case"\f":return"\\f";case`
|
|
4
4
|
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`}}function W(e){let r="",t=!1,o=!1;for(let l=0;l<e.length;l++){let n=e[l];if(o){r+=n,o=!1;continue}if(n==="\\"){r+=n,o=!0;continue}if(n==='"'){r+=n,t=!t;continue}if(t&&n.charCodeAt(0)<=31){r+=U(n);continue}r+=n}return r}function I(e,r,t){return JSON.parse(W(e.slice(r,t)))}function T(e){let r=[],t=0,o=e.length;for(;t<o;){for(;t<o&&/\s/.test(e[t]);)t++;if(t>=o)break;let l=t,n=e[t];if(n==="{"||n==="["){let a=n,f=n==="{"?"}":"]",c=1,p=!1,d=!1;for(t++;t<o&&c>0;){let h=e[t];d?d=!1:h==="\\"?d=!0:h==='"'?p=!p:p||(h===a?c++:h===f&&c--),t++}if(c!==0)throw new Error(`Unexpected end of JSON input at position ${t} (unclosed ${a})`);r.push(b(I(e,l,t)))}else if(n==='"'){let a=!1;for(t++;t<o;){let f=e[t];if(a)a=!1;else if(f==="\\")a=!0;else if(f==='"'){t++;break}t++}r.push(b(I(e,l,t)))}else if(n==="-"||n>="0"&&n<="9"){for(;t<o&&/[\d.eE+-]/.test(e[t]);)t++;r.push(b(I(e,l,t)))}else if(e.slice(t,t+4)==="true")r.push(!0),t+=4;else if(e.slice(t,t+5)==="false")r.push(!1),t+=5;else if(e.slice(t,t+4)==="null")r.push(null),t+=4;else{let a=e.slice(t,t+10);throw new Error(`Invalid JSON at position ${l}: unexpected '${a.split(/\s/)[0]}'`)}}return r}var _={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE]",options:["-r, --raw-output output strings without quotes","-c, --compact compact output (no pretty printing)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --help display this help and exit"]};function j(e,r,t,o,l,n=0){if(e===null||e===void 0)return"null";if(typeof e=="boolean")return String(e);if(typeof e=="number")return Number.isFinite(e)?String(e):"null";if(typeof e=="string")return t?e:JSON.stringify(e);let a=l?" ":" ";if(Array.isArray(e))return e.length===0?"[]":r?`[${e.map(c=>j(c,!0,!1,o,l)).join(",")}]`:`[
|
|
5
5
|
${e.map(c=>a.repeat(n+1)+j(c,!1,!1,o,l,n+1)).join(`,
|
|
6
6
|
`)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as x}from"./chunk-UR4CEP4Y.js";import{a as z,b as J}from"./chunk-ALVEEXFD.js";import{a as X}from"./chunk-
|
|
3
|
+
import{a as x}from"./chunk-UR4CEP4Y.js";import{a as z,b as J}from"./chunk-ALVEEXFD.js";import{a as X}from"./chunk-PUSAQWLR.js";import{a as Z,b as j,c as q}from"./chunk-MUFNRCMY.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
|
|
4
4
|
`,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}
|
|
5
5
|
`,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
|
|
6
6
|
`,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,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{c as u,d as m}from"./chunk-
|
|
3
|
+
import{c as u,d as m}from"./chunk-PUSAQWLR.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
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};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as U,b as z}from"./chunk-LNNWMRCB.js";import{a as I}from"./chunk-HL4ZS7TX.js";import{a as A}from"./chunk-IEXQTXU5.js";import{a as P}from"./chunk-
|
|
3
|
+
import{a as U,b as z}from"./chunk-LNNWMRCB.js";import{a as I}from"./chunk-HL4ZS7TX.js";import{a as A}from"./chunk-IEXQTXU5.js";import{a as P}from"./chunk-PUSAQWLR.js";import{k}from"./chunk-47WZ2U6M.js";import{a as L}from"./chunk-PBOVSFTJ.js";import{a as te,b as ne,c as W}from"./chunk-MUFNRCMY.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+=`
|
|
4
4
|
`,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===`
|
|
5
5
|
`?e+=`$
|
|
6
6
|
`: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,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as p}from"./chunk-
|
|
3
|
+
import{a as p}from"./chunk-PUSAQWLR.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
4
|
`)}function m(s,r){if(s==="")return"";let n=s.split(`
|
|
5
5
|
`),u=s.endsWith(`
|
|
6
6
|
`)&&n[n.length-1]==="";return u&&n.pop(),n.map(l=>N(l,r)).join(`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as $l}from"./chunk-MNWK4UIM.js";import{a as Be,b as er}from"./chunk-LSQTB2QK.js";import{d as D}from"./chunk-MLUOPG3W.js";import{a as Qi,b as Zi}from"./chunk-LNNWMRCB.js";import{a as Bs}from"./chunk-HL4ZS7TX.js";import{a as Hi}from"./chunk-
|
|
3
|
+
import{a as $l}from"./chunk-MNWK4UIM.js";import{a as Be,b as er}from"./chunk-LSQTB2QK.js";import{d as D}from"./chunk-MLUOPG3W.js";import{a as Qi,b as Zi}from"./chunk-LNNWMRCB.js";import{a as Bs}from"./chunk-HL4ZS7TX.js";import{a as Hi}from"./chunk-PUSAQWLR.js";import{k as Vs}from"./chunk-47WZ2U6M.js";import{a as js}from"./chunk-PBOVSFTJ.js";import{a as Xi,b as zi,c as he}from"./chunk-MUFNRCMY.js";import{a as Ot,c as w,e as Fs}from"./chunk-LNVSXNT7.js";var xr=w((xm,_r)=>{var{hasOwnProperty:nn}=Object.prototype,rn=(s,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process<"u"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let t=e.platform==="win32"?`\r
|
|
4
4
|
`:`
|
|
5
5
|
`,n=e.whitespace?" = ":"=",i=[],r=e.sort?Object.keys(s).sort():Object.keys(s),o=0;e.align&&(o=z(r.filter(c=>s[c]===null||Array.isArray(s[c])||typeof s[c]!="object").map(c=>Array.isArray(s[c])?`${c}[]`:c).concat([""]).reduce((c,u)=>z(c).length>=z(u).length?c:u)).length);let a="",l=e.bracketedArray?"[]":"";for(let c of r){let u=s[c];if(u&&Array.isArray(u))for(let f of u)a+=z(`${c}${l}`).padEnd(o," ")+n+z(f)+t;else u&&typeof u=="object"?i.push(c):a+=z(c).padEnd(o," ")+n+z(u)+t}e.section&&a.length&&(a="["+z(e.section)+"]"+(e.newline?t+t:t)+a);for(let c of i){let u=qr(c,".").join("\\."),f=(e.section?e.section+".":"")+u,h=rn(s[c],{...e,section:f});a.length&&h.length&&(a+=t),a+=h}return a};function qr(s,e){var t=0,n=0,i=0,r=[];do if(i=s.indexOf(e,t),i!==-1){if(t=i+e.length,i>0&&s[i-1]==="\\")continue;r.push(s.slice(n,i)),n=i+e.length}while(i!==-1);return r.push(s.slice(n)),r}var Lr=(s,e={})=>{e.bracketedArray=e.bracketedArray!==!1;let t=Object.create(null),n=t,i=null,r=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=s.split(/[\r\n]+/g),a={};for(let c of o){if(!c||c.match(/^\s*[;#]/)||c.match(/^\s*$/))continue;let u=c.match(r);if(!u)continue;if(u[1]!==void 0){if(i=Mt(u[1]),i==="__proto__"){n=Object.create(null);continue}n=t[i]=t[i]||Object.create(null);continue}let f=Mt(u[2]),h;e.bracketedArray?h=f.length>2&&f.slice(-2)==="[]":(a[f]=(a?.[f]||0)+1,h=a[f]>1);let p=h&&f.endsWith("[]")?f.slice(0,-2):f;if(p==="__proto__")continue;let g=u[3]?Mt(u[4]):!0,d=g==="true"||g==="false"||g==="null"?JSON.parse(g):g;h&&(nn.call(n,p)?Array.isArray(n[p])||(n[p]=[n[p]]):n[p]=[]),Array.isArray(n[p])?n[p].push(d):n[p]=d}let l=[];for(let c of Object.keys(t)){if(!nn.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let u=qr(c,".");n=t;let f=u.pop(),h=f.replace(/\\\./g,".");for(let p of u)p!=="__proto__"&&((!nn.call(n,p)||typeof n[p]!="object")&&(n[p]=Object.create(null)),n=n[p]);n===t&&h===f||(n[h]=t[c],l.push(c))}for(let c of l)delete t[c];return t},Pr=s=>s.startsWith('"')&&s.endsWith('"')||s.startsWith("'")&&s.endsWith("'"),z=s=>typeof s!="string"||s.match(/[=\r\n]/)||s.match(/^\[/)||s.length>1&&Pr(s)||s!==s.trim()?JSON.stringify(s):s.split(";").join("\\;").split("#").join("\\#"),Mt=s=>{if(s=(s||"").trim(),Pr(s)){s.charAt(0)==="'"&&(s=s.slice(1,-1));try{s=JSON.parse(s)}catch{}}else{let e=!1,t="";for(let n=0,i=s.length;n<i;n++){let r=s.charAt(n);if(e)"\\;#".indexOf(r)!==-1?t+=r:t+="\\"+r,e=!1;else{if(";#".indexOf(r)!==-1)break;r==="\\"?e=!0:t+=r}}return e&&(t+="\\"),t.trim()}return s};_r.exports={parse:Lr,decode:Lr,stringify:rn,encode:rn,safe:z,unsafe:Mt}});var C=w(x=>{"use strict";var un=Symbol.for("yaml.alias"),Ur=Symbol.for("yaml.document"),jt=Symbol.for("yaml.map"),Kr=Symbol.for("yaml.pair"),fn=Symbol.for("yaml.scalar"),Ut=Symbol.for("yaml.seq"),Q=Symbol.for("yaml.node.type"),zc=s=>!!s&&typeof s=="object"&&s[Q]===un,Qc=s=>!!s&&typeof s=="object"&&s[Q]===Ur,Zc=s=>!!s&&typeof s=="object"&&s[Q]===jt,eu=s=>!!s&&typeof s=="object"&&s[Q]===Kr,Yr=s=>!!s&&typeof s=="object"&&s[Q]===fn,tu=s=>!!s&&typeof s=="object"&&s[Q]===Ut;function Dr(s){if(s&&typeof s=="object")switch(s[Q]){case jt:case Ut:return!0}return!1}function su(s){if(s&&typeof s=="object")switch(s[Q]){case un:case jt:case fn:case Ut:return!0}return!1}var nu=s=>(Yr(s)||Dr(s))&&!!s.anchor;x.ALIAS=un;x.DOC=Ur;x.MAP=jt;x.NODE_TYPE=Q;x.PAIR=Kr;x.SCALAR=fn;x.SEQ=Ut;x.hasAnchor=nu;x.isAlias=zc;x.isCollection=Dr;x.isDocument=Qc;x.isMap=Zc;x.isNode=su;x.isPair=eu;x.isScalar=Yr;x.isSeq=tu});var He=w(hn=>{"use strict";var _=C(),V=Symbol("break visit"),Jr=Symbol("skip children"),H=Symbol("remove node");function Kt(s,e){let t=Gr(e);_.isDocument(s)?ke(null,s.contents,t,Object.freeze([s]))===H&&(s.contents=null):ke(null,s,t,Object.freeze([]))}Kt.BREAK=V;Kt.SKIP=Jr;Kt.REMOVE=H;function ke(s,e,t,n){let i=Wr(s,e,t,n);if(_.isNode(i)||_.isPair(i))return Hr(s,n,i),ke(s,i,t,n);if(typeof i!="symbol"){if(_.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=ke(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===V)return V;o===H&&(e.items.splice(r,1),r-=1)}}}else if(_.isPair(e)){n=Object.freeze(n.concat(e));let r=ke("key",e.key,t,n);if(r===V)return V;r===H&&(e.key=null);let o=ke("value",e.value,t,n);if(o===V)return V;o===H&&(e.value=null)}}return i}async function Yt(s,e){let t=Gr(e);_.isDocument(s)?await Ie(null,s.contents,t,Object.freeze([s]))===H&&(s.contents=null):await Ie(null,s,t,Object.freeze([]))}Yt.BREAK=V;Yt.SKIP=Jr;Yt.REMOVE=H;async function Ie(s,e,t,n){let i=await Wr(s,e,t,n);if(_.isNode(i)||_.isPair(i))return Hr(s,n,i),Ie(s,i,t,n);if(typeof i!="symbol"){if(_.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=await Ie(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===V)return V;o===H&&(e.items.splice(r,1),r-=1)}}}else if(_.isPair(e)){n=Object.freeze(n.concat(e));let r=await Ie("key",e.key,t,n);if(r===V)return V;r===H&&(e.key=null);let o=await Ie("value",e.value,t,n);if(o===V)return V;o===H&&(e.value=null)}}return i}function Gr(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function Wr(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(_.isMap(e))return t.Map?.(s,e,n);if(_.isSeq(e))return t.Seq?.(s,e,n);if(_.isPair(e))return t.Pair?.(s,e,n);if(_.isScalar(e))return t.Scalar?.(s,e,n);if(_.isAlias(e))return t.Alias?.(s,e,n)}function Hr(s,e,t){let n=e[e.length-1];if(_.isCollection(n))n.items[s]=t;else if(_.isPair(n))s==="key"?n.key=t:n.value=t;else if(_.isDocument(n))n.contents=t;else{let i=_.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}hn.visit=Kt;hn.visitAsync=Yt});var dn=w(zr=>{"use strict";var Xr=C(),iu=He(),ru={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ou=s=>s.replace(/[!,[\]{}]/g,e=>ru[e]),Xe=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+ou(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&Xr.isNode(e.contents)){let r={};iu.visit(e.contents,(o,a)=>{Xr.isNode(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
|
|
6
6
|
`)}};Xe.defaultYaml={explicit:!1,version:"1.2"};Xe.defaultTags={"!!":"tag:yaml.org,2002:"};zr.Directives=Xe});var Dt=w(ze=>{"use strict";var Qr=C(),au=He();function lu(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function Zr(s){let e=new Set;return au.visit(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function eo(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}function cu(s,e){let t=[],n=new Map,i=null;return{onAnchor:r=>{t.push(r),i??(i=Zr(s));let o=eo(e,i);return i.add(o),o},setAnchors:()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(Qr.isScalar(o.node)||Qr.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:n}}ze.anchorIsValid=lu;ze.anchorNames=Zr;ze.createNodeAnchors=cu;ze.findNewAnchor=eo});var pn=w(to=>{"use strict";function Qe(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],a=Qe(s,n,String(i),o);a===void 0?delete n[i]:a!==o&&(n[i]=a)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=Qe(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=Qe(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let o=Qe(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}to.applyReviver=Qe});var se=w(no=>{"use strict";var uu=C();function so(s,e,t){if(Array.isArray(s))return s.map((n,i)=>so(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!uu.hasAnchor(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}no.toJS=so});var Jt=w(ro=>{"use strict";var fu=pn(),io=C(),hu=se(),mn=class{constructor(e){Object.defineProperty(this,io.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!io.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=hu.toJS(this,"",o);if(typeof i=="function")for(let{count:l,res:c}of o.anchors.values())i(c,l);return typeof r=="function"?fu.applyReviver(r,{"":a},"",a):a}};ro.NodeBase=mn});var Ze=w(oo=>{"use strict";var du=Dt(),pu=He(),Le=C(),mu=Jt(),gu=se(),gn=class extends mu.NodeBase{constructor(e){super(Le.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],pu.visit(e,{Node:(r,o)=>{(Le.isAlias(o)||Le.hasAnchor(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=n.get(o);if(a||(gu.toJS(o,null,t),a=n.get(o)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Gt(i,o,n)),a.count*a.aliasCount>r)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,n){let i=`*${this.source}`;if(e){if(du.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function Gt(s,e,t){if(Le.isAlias(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(Le.isCollection(e)){let n=0;for(let i of e.items){let r=Gt(s,i,t);r>n&&(n=r)}return n}else if(Le.isPair(e)){let n=Gt(s,e.key,t),i=Gt(s,e.value,t);return Math.max(n,i)}return 1}oo.Alias=gn});var L=w(yn=>{"use strict";var yu=C(),bu=Jt(),wu=se(),Su=s=>!s||typeof s!="function"&&typeof s!="object",ne=class extends bu.NodeBase{constructor(e){super(yu.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:wu.toJS(this.value,e,t)}toString(){return String(this.value)}};ne.BLOCK_FOLDED="BLOCK_FOLDED";ne.BLOCK_LITERAL="BLOCK_LITERAL";ne.PLAIN="PLAIN";ne.QUOTE_DOUBLE="QUOTE_DOUBLE";ne.QUOTE_SINGLE="QUOTE_SINGLE";yn.Scalar=ne;yn.isScalarValue=Su});var et=w(lo=>{"use strict";var Nu=Ze(),me=C(),ao=L(),Au="tag:yaml.org,2002:";function Eu(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function vu(s,e,t){if(me.isDocument(s)&&(s=s.contents),me.isNode(s))return s;if(me.isPair(s)){let f=t.schema[me.MAP].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=t,l;if(n&&s&&typeof s=="object"){if(l=a.get(s),l)return l.anchor??(l.anchor=i(s)),new Nu.Alias(l.anchor);l={anchor:null,node:null},a.set(s,l)}e?.startsWith("!!")&&(e=Au+e.slice(2));let c=Eu(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new ao.Scalar(s);return l&&(l.node=f),f}c=s instanceof Map?o[me.MAP]:Symbol.iterator in Object(s)?o[me.SEQ]:o[me.MAP]}r&&(r(c),delete t.onTagObj);let u=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new ao.Scalar(s);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}lo.createNode=vu});var Ht=w(Wt=>{"use strict";var Tu=et(),X=C(),Cu=Jt();function bn(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return Tu.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var co=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,wn=class extends Cu.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>X.isNode(n)||X.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(co(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(X.isCollection(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,bn(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(X.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&X.isScalar(r)?r.value:r:X.isCollection(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!X.isPair(t))return!1;let n=t.value;return n==null||e&&X.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return X.isCollection(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(X.isCollection(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,bn(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};Wt.Collection=wn;Wt.collectionFromPath=bn;Wt.isEmptyPath=co});var tt=w(Xt=>{"use strict";var Ou=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function Sn(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var ku=(s,e,t)=>s.endsWith(`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as f}from"./chunk-
|
|
3
|
+
import{a as f}from"./chunk-PUSAQWLR.js";import{a as m,b as c,c as b}from"./chunk-MUFNRCMY.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(`
|
|
4
4
|
`),t=[],u=i,a=r.endsWith(`
|
|
5
5
|
`)&&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(`
|
|
6
6
|
`)+(a?`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as T}from"./chunk-
|
|
3
|
+
import{a as T}from"./chunk-DSS5HVJD.js";import{a as b}from"./chunk-PUSAQWLR.js";import{a as M}from"./chunk-NE4R2FVV.js";import{a as S,b as F}from"./chunk-MUFNRCMY.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)}
|
|
4
4
|
`,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)}
|
|
5
5
|
`;return t.length>1&&(w+=`${x({lines:m,words:g,third:u},o,n,c,"total",h)}
|
|
6
6
|
`),{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,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as m}from"./chunk-
|
|
3
|
+
import{a as m}from"./chunk-TO6JCMLQ.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};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as s}from"./chunk-
|
|
3
|
+
import{a as s}from"./chunk-TO6JCMLQ.js";var a=s("sha256sum","sha256","compute SHA256 message digest"),m={name:"sha256sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0};export{a,m as b};
|