just-bash 3.6.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/README.md +6 -0
- package/dist/bin/chunks/awk2-EPZ2CEQT.js +3 -0
- package/dist/bin/chunks/base64-D7ZXJQN6.js +3 -0
- package/dist/bin/chunks/bash-4Q4RMIZL.js +3 -0
- package/dist/bin/chunks/cat-AST5Y57Y.js +3 -0
- package/dist/bin/chunks/chmod-BFP7P5CD.js +3 -0
- package/dist/bin/chunks/chunk-26O2G5LX.js +34 -0
- package/dist/bin/chunks/chunk-2RDKEB6Z.js +15 -0
- package/dist/bin/chunks/chunk-35U2THFB.js +3 -0
- package/dist/bin/chunks/chunk-3F7UWBEM.js +17 -0
- package/dist/bin/chunks/chunk-3WLAERUX.js +3 -0
- package/dist/bin/chunks/chunk-3WZIZUMC.js +8 -0
- package/dist/bin/chunks/chunk-4ARWO6Y3.js +4 -0
- package/dist/bin/chunks/chunk-4HVMRZ5N.js +8 -0
- package/dist/bin/chunks/chunk-5AS7PRVN.js +34 -0
- package/dist/bin/chunks/chunk-5GYAEVIB.js +10 -0
- package/dist/bin/chunks/chunk-5IPYW47P.js +27 -0
- package/dist/bin/chunks/chunk-5ZTIV6TI.js +20 -0
- package/dist/bin/chunks/chunk-6C2YS7G6.js +14 -0
- package/dist/bin/chunks/chunk-74MYVPDY.js +3 -0
- package/dist/bin/chunks/chunk-74UP5NWP.js +3 -0
- package/dist/bin/chunks/chunk-7DPD5PK3.js +3 -0
- package/dist/bin/chunks/chunk-7LJGZPVP.js +18 -0
- package/dist/bin/chunks/chunk-7NEXHFSS.js +3 -0
- package/dist/bin/chunks/chunk-7XFMCB5C.js +21 -0
- package/dist/bin/chunks/chunk-A53Y4KDG.js +7 -0
- package/dist/bin/chunks/chunk-AALAYQ6J.js +17 -0
- package/dist/bin/chunks/chunk-AM4WIHAG.js +10 -0
- package/dist/bin/chunks/chunk-BC5OXEFJ.js +3 -0
- package/dist/bin/chunks/chunk-C5ABXV4P.js +15 -0
- package/dist/bin/chunks/chunk-CT6P7ILU.js +3 -0
- package/dist/bin/chunks/chunk-CYHG3NVG.js +9 -0
- package/dist/bin/chunks/chunk-D7PDAJWE.js +7 -0
- package/dist/bin/chunks/chunk-DB3G3UVZ.js +5 -0
- package/dist/bin/chunks/chunk-EIUU35ZP.js +37 -0
- package/dist/bin/chunks/chunk-EMHJNKV5.js +20 -0
- package/dist/bin/chunks/chunk-EPWMLTS6.js +9 -0
- package/dist/bin/chunks/chunk-F4QFFLWZ.js +8 -0
- package/dist/bin/chunks/chunk-F5R5O2Y6.js +9 -0
- package/dist/bin/chunks/chunk-FBEYY2HM.js +13 -0
- package/dist/bin/chunks/chunk-FIJBWMXU.js +12 -0
- package/dist/bin/chunks/chunk-FMVH4N2P.js +5 -0
- package/dist/bin/chunks/chunk-G6W2HMNY.js +7 -0
- package/dist/bin/chunks/chunk-GFI5BHZX.js +3 -0
- package/dist/bin/chunks/chunk-GJAVHEWO.js +143 -0
- package/dist/bin/chunks/chunk-GUVSOVQU.js +8 -0
- package/dist/bin/chunks/chunk-H22PAKR6.js +3 -0
- package/dist/bin/chunks/chunk-HXOJHK2Z.js +8 -0
- package/dist/bin/chunks/chunk-IAAYIH44.js +3 -0
- package/dist/bin/chunks/chunk-J7W2CRXT.js +7 -0
- package/dist/bin/chunks/chunk-JNWWOKCN.js +6 -0
- package/dist/bin/chunks/chunk-JQLGE4OW.js +22 -0
- package/dist/bin/chunks/chunk-K3U4M4MF.js +7 -0
- package/dist/bin/chunks/chunk-KRXYOWIP.js +12 -0
- package/dist/bin/chunks/chunk-L4L2QFS4.js +10 -0
- package/dist/bin/chunks/chunk-LU6ZEQNN.js +13 -0
- package/dist/bin/chunks/chunk-MLMKRR7L.js +12 -0
- package/dist/bin/chunks/chunk-MVN5WALS.js +7 -0
- package/dist/bin/chunks/chunk-MYOGTYIH.js +22 -0
- package/dist/bin/chunks/chunk-NF5LHCVV.js +275 -0
- package/dist/bin/chunks/chunk-OUGDZVL6.js +10 -0
- package/dist/bin/chunks/chunk-QCNQD6ME.js +11 -0
- package/dist/bin/chunks/chunk-QIDBJNMB.js +3 -0
- package/dist/bin/chunks/chunk-QKTQYL37.js +9 -0
- package/dist/bin/chunks/chunk-R6CMNMNX.js +22 -0
- package/dist/bin/chunks/chunk-RCP3WQND.js +7 -0
- package/dist/bin/chunks/chunk-RJG4JS32.js +6 -0
- package/dist/bin/chunks/chunk-SIMSIBUA.js +13 -0
- package/dist/bin/chunks/chunk-TNB7M24H.js +87 -0
- package/dist/bin/chunks/chunk-TU6P6AC2.js +4 -0
- package/dist/bin/chunks/chunk-TX4WSLXK.js +101 -0
- package/dist/bin/chunks/chunk-U4UY6P77.js +3 -0
- package/dist/bin/chunks/chunk-U5BNATW4.js +3 -0
- package/dist/bin/chunks/chunk-U7VJCJQR.js +16 -0
- package/dist/bin/chunks/chunk-VJE2PQW6.js +15 -0
- package/dist/bin/chunks/chunk-W4ENG3BR.js +44 -0
- package/dist/bin/chunks/chunk-XUFO4QPW.js +65 -0
- package/dist/bin/chunks/chunk-XVKL2UZA.js +4 -0
- package/dist/bin/chunks/chunk-YCUNLSHF.js +12 -0
- package/dist/bin/chunks/chunk-YDH7Q5WV.js +6 -0
- package/dist/bin/chunks/chunk-YDWLU56G.js +26 -0
- package/dist/bin/chunks/chunk-YILPYZYP.js +16 -0
- package/dist/bin/chunks/chunk-YZQ4SVJV.js +13 -0
- package/dist/bin/chunks/chunk-ZKLKNN6B.js +3 -0
- package/dist/bin/chunks/column-EGAQ7QMC.js +3 -0
- package/dist/bin/chunks/comm-JEJ6GWEA.js +3 -0
- package/dist/bin/chunks/cp-7AH7TSQ6.js +3 -0
- package/dist/bin/chunks/curl-7FCZQCFU.js +31 -0
- package/dist/bin/chunks/cut-OVTLUT2B.js +3 -0
- package/dist/bin/chunks/date-MKP5YWWY.js +3 -0
- package/dist/bin/chunks/diff-R6QTSWD2.js +3 -0
- package/dist/bin/chunks/du-M2PB5NUH.js +3 -0
- package/dist/bin/chunks/env-EUSAZGWO.js +3 -0
- package/dist/bin/chunks/expand-B4CPOZN5.js +3 -0
- package/dist/bin/chunks/expr-AQBMSEFL.js +3 -0
- package/dist/bin/chunks/file-22CVQBNS.js +3 -0
- package/dist/bin/chunks/find-QYLHUYOP.js +3 -0
- package/dist/bin/chunks/flag-coverage-CTPK5ZWJ.js +3 -0
- package/dist/bin/chunks/fold-E6A5I4DW.js +3 -0
- package/dist/bin/chunks/grep-HI55D7F7.js +3 -0
- package/dist/bin/chunks/gzip-2GJMVXCF.js +3 -0
- package/dist/bin/chunks/head-ZQIB2GSI.js +3 -0
- package/dist/bin/chunks/html-to-markdown-7ZNLM4SQ.js +3 -0
- package/dist/bin/chunks/join-KCYMLQ3V.js +3 -0
- package/dist/bin/chunks/jq-KNI4FJIL.js +3 -0
- package/dist/bin/chunks/js-exec-OWDAX677.js +1617 -0
- package/dist/bin/chunks/ls-QCAGDEDW.js +3 -0
- package/dist/bin/chunks/md5sum-OPJ77ZY7.js +3 -0
- package/dist/bin/chunks/mkdir-3XFSFVPC.js +3 -0
- package/dist/bin/chunks/mktemp-5FA55IJS.js +3 -0
- package/dist/bin/chunks/mv-UASF6NAX.js +3 -0
- package/dist/bin/chunks/nl-HUDE6DQC.js +3 -0
- package/dist/bin/chunks/od-CECQKF5P.js +3 -0
- package/dist/bin/chunks/paste-SH5RZ4ZO.js +3 -0
- package/dist/bin/chunks/printf-PQKUEWX5.js +3 -0
- package/dist/bin/chunks/python3-UE36ZXQT.js +23 -0
- package/dist/bin/chunks/readlink-4Z75K3AI.js +3 -0
- package/dist/bin/chunks/rev-6SA3VC3J.js +3 -0
- package/dist/bin/chunks/rg-ULWB5MQG.js +3 -0
- package/dist/bin/chunks/rm-NPIAQT6U.js +3 -0
- package/dist/bin/chunks/rmdir-57J3AGQU.js +3 -0
- package/dist/bin/chunks/sed-XV7BZPKI.js +3 -0
- package/dist/bin/chunks/seq-ZVBT2JEI.js +3 -0
- package/dist/bin/chunks/sha1sum-JGOB5K4J.js +3 -0
- package/dist/bin/chunks/sha256sum-S5DS6Q6N.js +3 -0
- package/dist/bin/chunks/sort-UOMFLGRW.js +3 -0
- package/dist/bin/chunks/split-IBL3NIVH.js +3 -0
- package/dist/bin/chunks/sqlite3-YIM3BYLS.js +3 -0
- package/dist/bin/chunks/stat-RKSIL4YV.js +3 -0
- package/dist/bin/chunks/strings-AL7T5GDQ.js +3 -0
- package/dist/bin/chunks/tac-36B6LBNS.js +3 -0
- package/dist/bin/chunks/tail-G4PLDIOK.js +3 -0
- package/dist/bin/chunks/tar-YG6SY2RU.js +3 -0
- package/dist/bin/chunks/tee-NP4ULCWD.js +3 -0
- package/dist/bin/chunks/time-ZMFJL7MD.js +3 -0
- package/dist/bin/chunks/timeout-EJIGKZUX.js +3 -0
- package/dist/bin/chunks/touch-YE5LMLLE.js +3 -0
- package/dist/bin/chunks/tr-7KFUMSUF.js +3 -0
- package/dist/bin/chunks/unexpand-67EBVEPB.js +3 -0
- package/dist/bin/chunks/uniq-SZDRNEYK.js +3 -0
- package/dist/bin/chunks/wc-VLOME6PL.js +3 -0
- package/dist/bin/chunks/xan-FVGJAHFV.js +3 -0
- package/dist/bin/chunks/xan-view-LYATQWQB.js +3 -0
- package/dist/bin/chunks/xargs-CLQL2WFV.js +3 -0
- package/dist/bin/chunks/yes-OOBLAITP.js +3 -0
- package/dist/bin/chunks/yq-YQ4YFM26.js +3 -0
- package/dist/bin/just-bash.js +347 -345
- package/dist/bin/shell/chunks/awk2-EPZ2CEQT.js +3 -0
- package/dist/bin/shell/chunks/base64-D7ZXJQN6.js +3 -0
- package/dist/bin/shell/chunks/bash-4Q4RMIZL.js +3 -0
- package/dist/bin/shell/chunks/cat-AST5Y57Y.js +3 -0
- package/dist/bin/shell/chunks/chmod-BFP7P5CD.js +3 -0
- package/dist/bin/shell/chunks/chunk-26O2G5LX.js +34 -0
- package/dist/bin/shell/chunks/chunk-2RDKEB6Z.js +15 -0
- package/dist/bin/shell/chunks/chunk-35U2THFB.js +3 -0
- package/dist/bin/shell/chunks/chunk-3F7UWBEM.js +17 -0
- package/dist/bin/shell/chunks/chunk-3WLAERUX.js +3 -0
- package/dist/bin/shell/chunks/chunk-3WZIZUMC.js +8 -0
- package/dist/bin/shell/chunks/chunk-4ARWO6Y3.js +4 -0
- package/dist/bin/shell/chunks/chunk-4HVMRZ5N.js +8 -0
- package/dist/bin/shell/chunks/chunk-5AS7PRVN.js +34 -0
- package/dist/bin/shell/chunks/chunk-5GYAEVIB.js +10 -0
- package/dist/bin/shell/chunks/chunk-5IPYW47P.js +27 -0
- package/dist/bin/shell/chunks/chunk-5ZTIV6TI.js +20 -0
- package/dist/bin/shell/chunks/chunk-6C2YS7G6.js +14 -0
- package/dist/bin/shell/chunks/chunk-74MYVPDY.js +3 -0
- package/dist/bin/shell/chunks/chunk-74UP5NWP.js +3 -0
- package/dist/bin/shell/chunks/chunk-7DPD5PK3.js +3 -0
- package/dist/bin/shell/chunks/chunk-7LJGZPVP.js +18 -0
- package/dist/bin/shell/chunks/chunk-7NEXHFSS.js +3 -0
- package/dist/bin/shell/chunks/chunk-7XFMCB5C.js +21 -0
- package/dist/bin/shell/chunks/chunk-A53Y4KDG.js +7 -0
- package/dist/bin/shell/chunks/chunk-AALAYQ6J.js +17 -0
- package/dist/bin/shell/chunks/chunk-AM4WIHAG.js +10 -0
- package/dist/bin/shell/chunks/chunk-BC5OXEFJ.js +3 -0
- package/dist/bin/shell/chunks/chunk-C5ABXV4P.js +15 -0
- package/dist/bin/shell/chunks/chunk-CT6P7ILU.js +3 -0
- package/dist/bin/shell/chunks/chunk-CYHG3NVG.js +9 -0
- package/dist/bin/shell/chunks/chunk-D7PDAJWE.js +7 -0
- package/dist/bin/shell/chunks/chunk-DB3G3UVZ.js +5 -0
- package/dist/bin/shell/chunks/chunk-EIUU35ZP.js +37 -0
- package/dist/bin/shell/chunks/chunk-EMHJNKV5.js +20 -0
- package/dist/bin/shell/chunks/chunk-EPWMLTS6.js +9 -0
- package/dist/bin/shell/chunks/chunk-F4QFFLWZ.js +8 -0
- package/dist/bin/shell/chunks/chunk-F5R5O2Y6.js +9 -0
- package/dist/bin/shell/chunks/chunk-FBEYY2HM.js +13 -0
- package/dist/bin/shell/chunks/chunk-FIJBWMXU.js +12 -0
- package/dist/bin/shell/chunks/chunk-FMVH4N2P.js +5 -0
- package/dist/bin/shell/chunks/chunk-G6W2HMNY.js +7 -0
- package/dist/bin/shell/chunks/chunk-GFI5BHZX.js +3 -0
- package/dist/bin/shell/chunks/chunk-GJAVHEWO.js +143 -0
- package/dist/bin/shell/chunks/chunk-GUVSOVQU.js +8 -0
- package/dist/bin/shell/chunks/chunk-H22PAKR6.js +3 -0
- package/dist/bin/shell/chunks/chunk-HXOJHK2Z.js +8 -0
- package/dist/bin/shell/chunks/chunk-IAAYIH44.js +3 -0
- package/dist/bin/shell/chunks/chunk-J7W2CRXT.js +7 -0
- package/dist/bin/shell/chunks/chunk-JNWWOKCN.js +6 -0
- package/dist/bin/shell/chunks/chunk-JQLGE4OW.js +22 -0
- package/dist/bin/shell/chunks/chunk-K3U4M4MF.js +7 -0
- package/dist/bin/shell/chunks/chunk-KRXYOWIP.js +12 -0
- package/dist/bin/shell/chunks/chunk-L4L2QFS4.js +10 -0
- package/dist/bin/shell/chunks/chunk-LU6ZEQNN.js +13 -0
- package/dist/bin/shell/chunks/chunk-MLMKRR7L.js +12 -0
- package/dist/bin/shell/chunks/chunk-MVN5WALS.js +7 -0
- package/dist/bin/shell/chunks/chunk-MYOGTYIH.js +22 -0
- package/dist/bin/shell/chunks/chunk-NF5LHCVV.js +275 -0
- package/dist/bin/shell/chunks/chunk-OUGDZVL6.js +10 -0
- package/dist/bin/shell/chunks/chunk-QCNQD6ME.js +11 -0
- package/dist/bin/shell/chunks/chunk-QIDBJNMB.js +3 -0
- package/dist/bin/shell/chunks/chunk-QKTQYL37.js +9 -0
- package/dist/bin/shell/chunks/chunk-R6CMNMNX.js +22 -0
- package/dist/bin/shell/chunks/chunk-RCP3WQND.js +7 -0
- package/dist/bin/shell/chunks/chunk-RJG4JS32.js +6 -0
- package/dist/bin/shell/chunks/chunk-SIMSIBUA.js +13 -0
- package/dist/bin/shell/chunks/chunk-TNB7M24H.js +87 -0
- package/dist/bin/shell/chunks/chunk-TU6P6AC2.js +4 -0
- package/dist/bin/shell/chunks/chunk-TX4WSLXK.js +101 -0
- package/dist/bin/shell/chunks/chunk-U4UY6P77.js +3 -0
- package/dist/bin/shell/chunks/chunk-U5BNATW4.js +3 -0
- package/dist/bin/shell/chunks/chunk-U7VJCJQR.js +16 -0
- package/dist/bin/shell/chunks/chunk-VJE2PQW6.js +15 -0
- package/dist/bin/shell/chunks/chunk-W4ENG3BR.js +44 -0
- package/dist/bin/shell/chunks/chunk-XUFO4QPW.js +65 -0
- package/dist/bin/shell/chunks/chunk-XVKL2UZA.js +4 -0
- package/dist/bin/shell/chunks/chunk-YCUNLSHF.js +12 -0
- package/dist/bin/shell/chunks/chunk-YDH7Q5WV.js +6 -0
- package/dist/bin/shell/chunks/chunk-YDWLU56G.js +26 -0
- package/dist/bin/shell/chunks/chunk-YILPYZYP.js +16 -0
- package/dist/bin/shell/chunks/chunk-YZQ4SVJV.js +13 -0
- package/dist/bin/shell/chunks/chunk-ZKLKNN6B.js +3 -0
- package/dist/bin/shell/chunks/column-EGAQ7QMC.js +3 -0
- package/dist/bin/shell/chunks/comm-JEJ6GWEA.js +3 -0
- package/dist/bin/shell/chunks/cp-7AH7TSQ6.js +3 -0
- package/dist/bin/shell/chunks/curl-7FCZQCFU.js +31 -0
- package/dist/bin/shell/chunks/cut-OVTLUT2B.js +3 -0
- package/dist/bin/shell/chunks/date-MKP5YWWY.js +3 -0
- package/dist/bin/shell/chunks/diff-R6QTSWD2.js +3 -0
- package/dist/bin/shell/chunks/du-M2PB5NUH.js +3 -0
- package/dist/bin/shell/chunks/env-EUSAZGWO.js +3 -0
- package/dist/bin/shell/chunks/expand-B4CPOZN5.js +3 -0
- package/dist/bin/shell/chunks/expr-AQBMSEFL.js +3 -0
- package/dist/bin/shell/chunks/file-22CVQBNS.js +3 -0
- package/dist/bin/shell/chunks/find-QYLHUYOP.js +3 -0
- package/dist/bin/shell/chunks/flag-coverage-CTPK5ZWJ.js +3 -0
- package/dist/bin/shell/chunks/fold-E6A5I4DW.js +3 -0
- package/dist/bin/shell/chunks/grep-HI55D7F7.js +3 -0
- package/dist/bin/shell/chunks/gzip-2GJMVXCF.js +3 -0
- package/dist/bin/shell/chunks/head-ZQIB2GSI.js +3 -0
- package/dist/bin/shell/chunks/html-to-markdown-7ZNLM4SQ.js +3 -0
- package/dist/bin/shell/chunks/join-KCYMLQ3V.js +3 -0
- package/dist/bin/shell/chunks/jq-KNI4FJIL.js +3 -0
- package/dist/bin/shell/chunks/js-exec-OWDAX677.js +1617 -0
- package/dist/bin/shell/chunks/ls-QCAGDEDW.js +3 -0
- package/dist/bin/shell/chunks/md5sum-OPJ77ZY7.js +3 -0
- package/dist/bin/shell/chunks/mkdir-3XFSFVPC.js +3 -0
- package/dist/bin/shell/chunks/mktemp-5FA55IJS.js +3 -0
- package/dist/bin/shell/chunks/mv-UASF6NAX.js +3 -0
- package/dist/bin/shell/chunks/nl-HUDE6DQC.js +3 -0
- package/dist/bin/shell/chunks/od-CECQKF5P.js +3 -0
- package/dist/bin/shell/chunks/paste-SH5RZ4ZO.js +3 -0
- package/dist/bin/shell/chunks/printf-PQKUEWX5.js +3 -0
- package/dist/bin/shell/chunks/python3-UE36ZXQT.js +23 -0
- package/dist/bin/shell/chunks/readlink-4Z75K3AI.js +3 -0
- package/dist/bin/shell/chunks/rev-6SA3VC3J.js +3 -0
- package/dist/bin/shell/chunks/rg-ULWB5MQG.js +3 -0
- package/dist/bin/shell/chunks/rm-NPIAQT6U.js +3 -0
- package/dist/bin/shell/chunks/rmdir-57J3AGQU.js +3 -0
- package/dist/bin/shell/chunks/sed-XV7BZPKI.js +3 -0
- package/dist/bin/shell/chunks/seq-ZVBT2JEI.js +3 -0
- package/dist/bin/shell/chunks/sha1sum-JGOB5K4J.js +3 -0
- package/dist/bin/shell/chunks/sha256sum-S5DS6Q6N.js +3 -0
- package/dist/bin/shell/chunks/sort-UOMFLGRW.js +3 -0
- package/dist/bin/shell/chunks/split-IBL3NIVH.js +3 -0
- package/dist/bin/shell/chunks/sqlite3-YIM3BYLS.js +3 -0
- package/dist/bin/shell/chunks/stat-RKSIL4YV.js +3 -0
- package/dist/bin/shell/chunks/strings-AL7T5GDQ.js +3 -0
- package/dist/bin/shell/chunks/tac-36B6LBNS.js +3 -0
- package/dist/bin/shell/chunks/tail-G4PLDIOK.js +3 -0
- package/dist/bin/shell/chunks/tar-YG6SY2RU.js +3 -0
- package/dist/bin/shell/chunks/tee-NP4ULCWD.js +3 -0
- package/dist/bin/shell/chunks/time-ZMFJL7MD.js +3 -0
- package/dist/bin/shell/chunks/timeout-EJIGKZUX.js +3 -0
- package/dist/bin/shell/chunks/touch-YE5LMLLE.js +3 -0
- package/dist/bin/shell/chunks/tr-7KFUMSUF.js +3 -0
- package/dist/bin/shell/chunks/unexpand-67EBVEPB.js +3 -0
- package/dist/bin/shell/chunks/uniq-SZDRNEYK.js +3 -0
- package/dist/bin/shell/chunks/wc-VLOME6PL.js +3 -0
- package/dist/bin/shell/chunks/xan-FVGJAHFV.js +3 -0
- package/dist/bin/shell/chunks/xan-view-LYATQWQB.js +3 -0
- package/dist/bin/shell/chunks/xargs-CLQL2WFV.js +3 -0
- package/dist/bin/shell/chunks/yes-OOBLAITP.js +3 -0
- package/dist/bin/shell/chunks/yq-YQ4YFM26.js +3 -0
- package/dist/bin/shell/shell.js +385 -383
- package/dist/bundle/browser.js +873 -863
- package/dist/bundle/chunks/awk2-LEEKKBPN.js +2 -0
- package/dist/bundle/chunks/base64-GBEVK7UP.js +2 -0
- package/dist/bundle/chunks/bash-QTX2IUM4.js +2 -0
- package/dist/bundle/chunks/cat-UBR2ABBH.js +2 -0
- package/dist/bundle/chunks/chmod-5VBARXGU.js +2 -0
- package/dist/bundle/chunks/chunk-2LOOLBWC.js +33 -0
- package/dist/bundle/chunks/chunk-34XJ6PLO.js +20 -0
- package/dist/bundle/chunks/chunk-3DUKINTI.js +7 -0
- package/dist/bundle/chunks/chunk-3VXY25LY.js +2 -0
- package/dist/bundle/chunks/chunk-5G2D2EZB.js +7 -0
- package/dist/bundle/chunks/chunk-5Q4R6KJE.js +4 -0
- package/dist/bundle/chunks/chunk-5ZVTEBKG.js +7 -0
- package/dist/bundle/chunks/chunk-77XFWF43.js +13 -0
- package/dist/bundle/chunks/chunk-B2EYYRZX.js +9 -0
- package/dist/bundle/chunks/chunk-BC3VKZCL.js +10 -0
- package/dist/bundle/chunks/chunk-BEIP3OYT.js +6 -0
- package/dist/bundle/chunks/chunk-BLTFJFWH.js +2 -0
- package/dist/bundle/chunks/chunk-C2GCPQ2D.js +15 -0
- package/dist/bundle/chunks/chunk-CGCA7SGA.js +25 -0
- package/dist/bundle/chunks/chunk-CIY4XCGA.js +2 -0
- package/dist/bundle/chunks/chunk-CXBOPNEG.js +11 -0
- package/dist/bundle/chunks/chunk-CYJQAYUX.js +142 -0
- package/dist/bundle/chunks/chunk-D55UUXDJ.js +100 -0
- package/dist/bundle/chunks/chunk-EOMWWW4L.js +33 -0
- package/dist/bundle/chunks/chunk-ER6ZGLPS.js +26 -0
- package/dist/bundle/chunks/chunk-EZHC6HLV.js +3 -0
- package/dist/bundle/chunks/chunk-FBRDM6EM.js +12 -0
- package/dist/bundle/chunks/chunk-FDAXSABU.js +11 -0
- package/dist/bundle/chunks/chunk-FEKEA5Y2.js +2 -0
- package/dist/bundle/chunks/chunk-GEANXVKK.js +15 -0
- package/dist/bundle/chunks/chunk-GIQ3LRFL.js +21 -0
- package/dist/bundle/chunks/chunk-HBIJBKHP.js +14 -0
- package/dist/bundle/chunks/chunk-IDYF47VD.js +11 -0
- package/dist/bundle/chunks/chunk-IH6MZAKK.js +6 -0
- package/dist/bundle/chunks/chunk-IIWAWB3H.js +274 -0
- package/dist/bundle/chunks/chunk-IQGNPH54.js +8 -0
- package/dist/bundle/chunks/chunk-IVYY6YFV.js +7 -0
- package/dist/bundle/chunks/chunk-IXOG2DXK.js +14 -0
- package/dist/bundle/chunks/chunk-J6QAN4PZ.js +6 -0
- package/dist/bundle/chunks/chunk-JMGGZYF2.js +2 -0
- package/dist/bundle/chunks/chunk-JU5GJH4X.js +9 -0
- package/dist/bundle/chunks/chunk-JWGTQTBU.js +16 -0
- package/dist/bundle/chunks/chunk-KQSMX4HM.js +11 -0
- package/dist/bundle/chunks/chunk-KZMK2KYL.js +43 -0
- package/dist/bundle/chunks/chunk-L4MC7WH4.js +14 -0
- package/dist/bundle/chunks/chunk-L5AKA7GO.js +5 -0
- package/dist/bundle/chunks/chunk-LBKOJW6K.js +2 -0
- package/dist/bundle/chunks/chunk-LNJ6EIKX.js +2 -0
- package/dist/bundle/chunks/chunk-LQXMSLW5.js +16 -0
- package/dist/bundle/chunks/chunk-MOOFDAFS.js +7 -0
- package/dist/bundle/chunks/chunk-N3VQQRLQ.js +8 -0
- package/dist/bundle/chunks/chunk-NJUHQKMR.js +3 -0
- package/dist/bundle/chunks/chunk-NOZTFL4F.js +12 -0
- package/dist/bundle/chunks/chunk-OEZKBUXP.js +8 -0
- package/dist/bundle/chunks/chunk-OZMQI3HV.js +17 -0
- package/dist/bundle/chunks/chunk-POI4XBDP.js +6 -0
- package/dist/bundle/chunks/chunk-PV2DCWLJ.js +6 -0
- package/dist/bundle/chunks/chunk-Q6ZH76O4.js +2 -0
- package/dist/bundle/chunks/chunk-QECDICRF.js +9 -0
- package/dist/bundle/chunks/chunk-QJTRVYQA.js +5 -0
- package/dist/bundle/chunks/chunk-QZPG6UCH.js +9 -0
- package/dist/bundle/chunks/chunk-R23EAHN5.js +2 -0
- package/dist/bundle/chunks/chunk-R3HY2GCO.js +3 -0
- package/dist/bundle/chunks/chunk-RQTEROQ5.js +6 -0
- package/dist/bundle/chunks/chunk-SAE7VUIM.js +21 -0
- package/dist/bundle/chunks/chunk-SBG7KYI4.js +12 -0
- package/dist/bundle/chunks/chunk-SRNYBHIU.js +21 -0
- package/dist/bundle/chunks/chunk-T7CFNHX6.js +2 -0
- package/dist/bundle/chunks/chunk-U3UTFNHI.js +2 -0
- package/dist/bundle/chunks/chunk-UQZ5HJXB.js +64 -0
- package/dist/bundle/chunks/chunk-US6XQQ6W.js +19 -0
- package/dist/bundle/chunks/chunk-UZ4TKNEJ.js +2 -0
- package/dist/bundle/chunks/chunk-VW6FDS6X.js +2 -0
- package/dist/bundle/chunks/chunk-W4A6TADR.js +36 -0
- package/dist/bundle/chunks/chunk-WAL3MOLR.js +6 -0
- package/dist/bundle/chunks/chunk-WFEUQRHM.js +2 -0
- package/dist/bundle/chunks/chunk-WNAEYQTE.js +8 -0
- package/dist/bundle/chunks/chunk-WOSSFIAE.js +12 -0
- package/dist/bundle/chunks/chunk-WTG3OCY4.js +5 -0
- package/dist/bundle/chunks/chunk-XIEMQVCO.js +19 -0
- package/dist/bundle/chunks/chunk-YFGP6M45.js +7 -0
- package/dist/bundle/chunks/chunk-ZARLSKBF.js +2 -0
- package/dist/bundle/chunks/chunk-ZVANIJV2.js +4 -0
- package/dist/bundle/chunks/column-46NX3HG3.js +2 -0
- package/dist/bundle/chunks/comm-QHEYSM4I.js +2 -0
- package/dist/bundle/chunks/cp-AQ4Y4WVV.js +2 -0
- package/dist/bundle/chunks/curl-LMCQFYWH.js +30 -0
- package/dist/bundle/chunks/cut-A6NXJGOH.js +2 -0
- package/dist/bundle/chunks/date-YMEJ62OQ.js +2 -0
- package/dist/bundle/chunks/diff-SECJC7CN.js +2 -0
- package/dist/bundle/chunks/du-JOLY42MC.js +2 -0
- package/dist/bundle/chunks/env-MI6QVNMM.js +2 -0
- package/dist/bundle/chunks/expand-YVEZTU7W.js +2 -0
- package/dist/bundle/chunks/expr-U7WETT5R.js +2 -0
- package/dist/bundle/chunks/file-6QDI3H7G.js +2 -0
- package/dist/bundle/chunks/find-UYQIFSZI.js +2 -0
- package/dist/bundle/chunks/flag-coverage-5YCE6ILG.js +2 -0
- package/dist/bundle/chunks/fold-A24KLKHY.js +2 -0
- package/dist/bundle/chunks/grep-ZELVZ7JB.js +2 -0
- package/dist/bundle/chunks/gzip-3IFADYVU.js +2 -0
- package/dist/bundle/chunks/head-5YWCKNNQ.js +2 -0
- package/dist/bundle/chunks/html-to-markdown-EOWI2I5J.js +2 -0
- package/dist/bundle/chunks/join-MSZXRLNV.js +2 -0
- package/dist/bundle/chunks/jq-MKA6BDYV.js +2 -0
- package/dist/bundle/chunks/js-exec-CNDWLKWB.js +1616 -0
- package/dist/bundle/chunks/ls-WMN4WCCI.js +2 -0
- package/dist/bundle/chunks/md5sum-OCX4NZ2Q.js +2 -0
- package/dist/bundle/chunks/mkdir-YJMG55FX.js +2 -0
- package/dist/bundle/chunks/mktemp-RA55VAN3.js +2 -0
- package/dist/bundle/chunks/mv-NTJL2AHI.js +2 -0
- package/dist/bundle/chunks/nl-Z5DVHZ3S.js +2 -0
- package/dist/bundle/chunks/od-TRWBMEIO.js +2 -0
- package/dist/bundle/chunks/paste-VPYCLIL6.js +2 -0
- package/dist/bundle/chunks/printf-BNADL4RX.js +2 -0
- package/dist/bundle/chunks/python3-TIKLWPZJ.js +22 -0
- package/dist/bundle/chunks/readlink-HGACDFRD.js +2 -0
- package/dist/bundle/chunks/rev-W57N4M5B.js +2 -0
- package/dist/bundle/chunks/rg-IN3KT335.js +2 -0
- package/dist/bundle/chunks/rm-CDVWO5CO.js +2 -0
- package/dist/bundle/chunks/rmdir-HI3UE4KQ.js +2 -0
- package/dist/bundle/chunks/sed-MXZDFQ7I.js +2 -0
- package/dist/bundle/chunks/seq-E3UP3G65.js +2 -0
- package/dist/bundle/chunks/sha1sum-QUWYL7G6.js +2 -0
- package/dist/bundle/chunks/sha256sum-FGHIABMA.js +2 -0
- package/dist/bundle/chunks/sort-ATCMEITA.js +2 -0
- package/dist/bundle/chunks/split-YZFCWIZI.js +2 -0
- package/dist/bundle/chunks/sqlite3-JL36RFBZ.js +2 -0
- package/dist/bundle/chunks/stat-APUQD6WQ.js +2 -0
- package/dist/bundle/chunks/strings-WA2ZGNUN.js +2 -0
- package/dist/bundle/chunks/tac-OCV6R4TG.js +2 -0
- package/dist/bundle/chunks/tail-IBKQAMFW.js +2 -0
- package/dist/bundle/chunks/tar-WJV4DGKA.js +2 -0
- package/dist/bundle/chunks/tee-VOXQ2UGV.js +2 -0
- package/dist/bundle/chunks/time-GOHAC6VO.js +2 -0
- package/dist/bundle/chunks/timeout-FVGYB3MD.js +2 -0
- package/dist/bundle/chunks/touch-57OKADDG.js +2 -0
- package/dist/bundle/chunks/tr-M4D6SICQ.js +2 -0
- package/dist/bundle/chunks/unexpand-SYZZ5ZBE.js +2 -0
- package/dist/bundle/chunks/uniq-TUUUYPVF.js +2 -0
- package/dist/bundle/chunks/wc-HQPGW3KR.js +2 -0
- package/dist/bundle/chunks/xan-CZJZCC57.js +2 -0
- package/dist/bundle/chunks/xan-view-HETEUD3G.js +2 -0
- package/dist/bundle/chunks/xargs-WFPZZ3FK.js +2 -0
- package/dist/bundle/chunks/yes-ACSNSE7T.js +2 -0
- package/dist/bundle/chunks/yq-XDJLIJPZ.js +2 -0
- package/dist/bundle/index.cjs +1042 -993
- package/dist/bundle/index.js +345 -343
- package/dist/commands/awk/interpreter/fields.d.ts +16 -0
- package/dist/commands/js-exec/module-shims.d.ts +1 -1
- package/dist/commands/rg/rg-options.d.ts +2 -0
- package/dist/commands/search-engine/matcher.d.ts +2 -0
- package/dist/interpreter/builtin-dispatch.d.ts +9 -3
- package/dist/interpreter/fd-table.d.ts +4 -1
- package/dist/interpreter/helpers/errors.d.ts +5 -0
- package/dist/interpreter/pipeline-execution.d.ts +1 -1
- package/dist/interpreter/redirections.d.ts +25 -10
- package/dist/interpreter/types.d.ts +2 -0
- package/dist/types.d.ts +15 -0
- package/dist/utils/string-builder.d.ts +9 -0
- package/package.json +1 -1
- package/dist/bin/chunks/awk2-U22OR5B5.js +0 -3
- package/dist/bin/chunks/base64-2KKH5BCT.js +0 -3
- package/dist/bin/chunks/bash-CFCBBWVH.js +0 -3
- package/dist/bin/chunks/cat-V45MVNBT.js +0 -3
- package/dist/bin/chunks/chmod-A54R4UUQ.js +0 -3
- package/dist/bin/chunks/chunk-2NJJXU4K.js +0 -27
- package/dist/bin/chunks/chunk-2YLY6FJA.js +0 -10
- package/dist/bin/chunks/chunk-3LKMI5IX.js +0 -34
- package/dist/bin/chunks/chunk-3VSWQCPN.js +0 -18
- package/dist/bin/chunks/chunk-44SKMHU6.js +0 -16
- package/dist/bin/chunks/chunk-5SKEZPTU.js +0 -12
- package/dist/bin/chunks/chunk-5SR55TXB.js +0 -16
- package/dist/bin/chunks/chunk-6D75E4LV.js +0 -3
- package/dist/bin/chunks/chunk-6DAR25KN.js +0 -12
- package/dist/bin/chunks/chunk-6SAZRW7E.js +0 -15
- package/dist/bin/chunks/chunk-723HNGID.js +0 -13
- package/dist/bin/chunks/chunk-7FGDUBSN.js +0 -14
- package/dist/bin/chunks/chunk-7X4QBCFW.js +0 -36
- package/dist/bin/chunks/chunk-AINNAQBQ.js +0 -6
- package/dist/bin/chunks/chunk-AL7RVSF4.js +0 -8
- package/dist/bin/chunks/chunk-ARYCSNJJ.js +0 -101
- package/dist/bin/chunks/chunk-BCJ42NCM.js +0 -15
- package/dist/bin/chunks/chunk-BJF6B4YW.js +0 -22
- package/dist/bin/chunks/chunk-BOXG6XBN.js +0 -143
- package/dist/bin/chunks/chunk-CPKBPQ2C.js +0 -3
- package/dist/bin/chunks/chunk-DA3RFNKK.js +0 -17
- package/dist/bin/chunks/chunk-DH7M46D3.js +0 -20
- package/dist/bin/chunks/chunk-DTGQQKI2.js +0 -87
- package/dist/bin/chunks/chunk-ECZAFQ22.js +0 -9
- package/dist/bin/chunks/chunk-ETWDDV6I.js +0 -10
- package/dist/bin/chunks/chunk-HFW2LXQV.js +0 -13
- package/dist/bin/chunks/chunk-HRKG3ZK2.js +0 -8
- package/dist/bin/chunks/chunk-I4IRHQDW.js +0 -3
- package/dist/bin/chunks/chunk-IKUY74NG.js +0 -3
- package/dist/bin/chunks/chunk-ILXMFIYG.js +0 -7
- package/dist/bin/chunks/chunk-IMVXTSPG.js +0 -275
- package/dist/bin/chunks/chunk-ISW2U76N.js +0 -17
- package/dist/bin/chunks/chunk-K5KT6DMM.js +0 -4
- package/dist/bin/chunks/chunk-KG2KXL4Y.js +0 -3
- package/dist/bin/chunks/chunk-LCP3IKI7.js +0 -9
- package/dist/bin/chunks/chunk-LG6IN6SW.js +0 -34
- package/dist/bin/chunks/chunk-LMFAALLO.js +0 -21
- package/dist/bin/chunks/chunk-LXFMIXGA.js +0 -3
- package/dist/bin/chunks/chunk-M5ZBECGM.js +0 -22
- package/dist/bin/chunks/chunk-MA6BMA4M.js +0 -3
- package/dist/bin/chunks/chunk-MPQMTLXN.js +0 -3
- package/dist/bin/chunks/chunk-MUIYG2RB.js +0 -65
- package/dist/bin/chunks/chunk-MYTNZ7MA.js +0 -7
- package/dist/bin/chunks/chunk-NGMFI3RH.js +0 -15
- package/dist/bin/chunks/chunk-NLMTGTSG.js +0 -11
- package/dist/bin/chunks/chunk-O74FSWB4.js +0 -4
- package/dist/bin/chunks/chunk-OBVTFHVP.js +0 -7
- package/dist/bin/chunks/chunk-OOKVPG5D.js +0 -6
- package/dist/bin/chunks/chunk-PL4EU7Y2.js +0 -3
- package/dist/bin/chunks/chunk-Q3LE3Y66.js +0 -13
- package/dist/bin/chunks/chunk-QCGH2ZOW.js +0 -13
- package/dist/bin/chunks/chunk-QKWMWSV3.js +0 -3
- package/dist/bin/chunks/chunk-QL33F2W6.js +0 -8
- package/dist/bin/chunks/chunk-S5Z7DMIE.js +0 -26
- package/dist/bin/chunks/chunk-SQ7SZZMW.js +0 -8
- package/dist/bin/chunks/chunk-SQUH76NP.js +0 -3
- package/dist/bin/chunks/chunk-TGRZ42DS.js +0 -12
- package/dist/bin/chunks/chunk-THTKNRO6.js +0 -7
- package/dist/bin/chunks/chunk-TQXLQEIT.js +0 -9
- package/dist/bin/chunks/chunk-TZ3S7MY6.js +0 -12
- package/dist/bin/chunks/chunk-U6BXPMLD.js +0 -7
- package/dist/bin/chunks/chunk-U6DBRMD5.js +0 -5
- package/dist/bin/chunks/chunk-URRH3GPG.js +0 -10
- package/dist/bin/chunks/chunk-VBU3UEG5.js +0 -7
- package/dist/bin/chunks/chunk-VLWZ6L7C.js +0 -4
- package/dist/bin/chunks/chunk-VTHA5UK5.js +0 -7
- package/dist/bin/chunks/chunk-WBST7XJW.js +0 -9
- package/dist/bin/chunks/chunk-WDV2ECOC.js +0 -3
- package/dist/bin/chunks/chunk-WEQ5WM2M.js +0 -20
- package/dist/bin/chunks/chunk-WFVCEB5T.js +0 -3
- package/dist/bin/chunks/chunk-WZ7MIBLR.js +0 -37
- package/dist/bin/chunks/chunk-X45GP3AQ.js +0 -3
- package/dist/bin/chunks/chunk-XEQ7KSRM.js +0 -5
- package/dist/bin/chunks/chunk-YIANER7Y.js +0 -8
- package/dist/bin/chunks/chunk-YYZSYLJO.js +0 -6
- package/dist/bin/chunks/chunk-Z3KAV6YJ.js +0 -10
- package/dist/bin/chunks/chunk-Z5KICK5X.js +0 -22
- package/dist/bin/chunks/column-LHHS4D3K.js +0 -3
- package/dist/bin/chunks/comm-URDMZCXL.js +0 -3
- package/dist/bin/chunks/cp-HPLQA35N.js +0 -3
- package/dist/bin/chunks/curl-FIRG3RB6.js +0 -31
- package/dist/bin/chunks/cut-KP3S36XS.js +0 -3
- package/dist/bin/chunks/date-FJUBX7TJ.js +0 -3
- package/dist/bin/chunks/diff-JSJ56EOK.js +0 -3
- package/dist/bin/chunks/du-WEF5YWQK.js +0 -3
- package/dist/bin/chunks/env-2TSVF4W7.js +0 -3
- package/dist/bin/chunks/expand-P6SNTBGZ.js +0 -3
- package/dist/bin/chunks/expr-FLWT4OCO.js +0 -3
- package/dist/bin/chunks/file-JLUCGBCB.js +0 -3
- package/dist/bin/chunks/find-XGVQ6N6L.js +0 -3
- package/dist/bin/chunks/flag-coverage-4JYKIAVV.js +0 -3
- package/dist/bin/chunks/fold-YEY7X54W.js +0 -3
- package/dist/bin/chunks/grep-DCPCPQOS.js +0 -3
- package/dist/bin/chunks/gzip-6DZIKNBW.js +0 -3
- package/dist/bin/chunks/head-TLFXMM2T.js +0 -3
- package/dist/bin/chunks/html-to-markdown-E22RLT2U.js +0 -3
- package/dist/bin/chunks/join-UQKXU2QP.js +0 -3
- package/dist/bin/chunks/jq-GDM3OBBK.js +0 -3
- package/dist/bin/chunks/js-exec-VU6F6WLS.js +0 -1578
- package/dist/bin/chunks/ls-67NUUIYT.js +0 -3
- package/dist/bin/chunks/md5sum-Z6KAYGDK.js +0 -3
- package/dist/bin/chunks/mkdir-AWDWRBKC.js +0 -3
- package/dist/bin/chunks/mktemp-L6OGMDUO.js +0 -3
- package/dist/bin/chunks/mv-4BJSOT4Y.js +0 -3
- package/dist/bin/chunks/nl-XHWFVVKH.js +0 -3
- package/dist/bin/chunks/od-SI75GLRE.js +0 -3
- package/dist/bin/chunks/paste-5TSIBDF7.js +0 -3
- package/dist/bin/chunks/printf-CNXNRQ3I.js +0 -3
- package/dist/bin/chunks/python3-GUWCSSDP.js +0 -23
- package/dist/bin/chunks/readlink-URO5XTBB.js +0 -3
- package/dist/bin/chunks/rev-CZTQCNOZ.js +0 -3
- package/dist/bin/chunks/rg-RVULUPDH.js +0 -3
- package/dist/bin/chunks/rm-UCUTHC3I.js +0 -3
- package/dist/bin/chunks/rmdir-J3HM7GGM.js +0 -3
- package/dist/bin/chunks/sed-MCLGHZOI.js +0 -3
- package/dist/bin/chunks/seq-I54NZE75.js +0 -3
- package/dist/bin/chunks/sha1sum-CATBXX76.js +0 -3
- package/dist/bin/chunks/sha256sum-YGSNBVY3.js +0 -3
- package/dist/bin/chunks/sort-M3DO25D5.js +0 -3
- package/dist/bin/chunks/split-VZO7223N.js +0 -3
- package/dist/bin/chunks/sqlite3-HXVFVP4Z.js +0 -3
- package/dist/bin/chunks/stat-UJ37RBMM.js +0 -3
- package/dist/bin/chunks/strings-J2X2Z6N2.js +0 -3
- package/dist/bin/chunks/tac-DG4BMYM5.js +0 -3
- package/dist/bin/chunks/tail-5TSF5YM4.js +0 -3
- package/dist/bin/chunks/tar-ZGZZDQXO.js +0 -3
- package/dist/bin/chunks/tee-L4HKV5PD.js +0 -3
- package/dist/bin/chunks/time-J2DAZUIN.js +0 -3
- package/dist/bin/chunks/timeout-ATTDYXLX.js +0 -3
- package/dist/bin/chunks/touch-TVQAUQOG.js +0 -3
- package/dist/bin/chunks/tr-6RPFASYV.js +0 -3
- package/dist/bin/chunks/unexpand-JPOQORZF.js +0 -3
- package/dist/bin/chunks/uniq-K5VRDP4Q.js +0 -3
- package/dist/bin/chunks/wc-VSQBRD6B.js +0 -3
- package/dist/bin/chunks/xan-CCS53B7D.js +0 -3
- package/dist/bin/chunks/xan-view-KOXASOEV.js +0 -3
- package/dist/bin/chunks/xargs-HMISWW4I.js +0 -3
- package/dist/bin/chunks/yes-ELH3XQWY.js +0 -3
- package/dist/bin/chunks/yq-GSCDUHGM.js +0 -3
- package/dist/bin/shell/chunks/awk2-U22OR5B5.js +0 -3
- package/dist/bin/shell/chunks/base64-2KKH5BCT.js +0 -3
- package/dist/bin/shell/chunks/bash-CFCBBWVH.js +0 -3
- package/dist/bin/shell/chunks/cat-V45MVNBT.js +0 -3
- package/dist/bin/shell/chunks/chmod-A54R4UUQ.js +0 -3
- package/dist/bin/shell/chunks/chunk-2NJJXU4K.js +0 -27
- package/dist/bin/shell/chunks/chunk-2YLY6FJA.js +0 -10
- package/dist/bin/shell/chunks/chunk-3LKMI5IX.js +0 -34
- package/dist/bin/shell/chunks/chunk-3VSWQCPN.js +0 -18
- package/dist/bin/shell/chunks/chunk-44SKMHU6.js +0 -16
- package/dist/bin/shell/chunks/chunk-5SKEZPTU.js +0 -12
- package/dist/bin/shell/chunks/chunk-5SR55TXB.js +0 -16
- package/dist/bin/shell/chunks/chunk-6D75E4LV.js +0 -3
- package/dist/bin/shell/chunks/chunk-6DAR25KN.js +0 -12
- package/dist/bin/shell/chunks/chunk-6SAZRW7E.js +0 -15
- package/dist/bin/shell/chunks/chunk-723HNGID.js +0 -13
- package/dist/bin/shell/chunks/chunk-7FGDUBSN.js +0 -14
- package/dist/bin/shell/chunks/chunk-7X4QBCFW.js +0 -36
- package/dist/bin/shell/chunks/chunk-AINNAQBQ.js +0 -6
- package/dist/bin/shell/chunks/chunk-AL7RVSF4.js +0 -8
- package/dist/bin/shell/chunks/chunk-ARYCSNJJ.js +0 -101
- package/dist/bin/shell/chunks/chunk-BCJ42NCM.js +0 -15
- package/dist/bin/shell/chunks/chunk-BJF6B4YW.js +0 -22
- package/dist/bin/shell/chunks/chunk-BOXG6XBN.js +0 -143
- package/dist/bin/shell/chunks/chunk-CPKBPQ2C.js +0 -3
- package/dist/bin/shell/chunks/chunk-DA3RFNKK.js +0 -17
- package/dist/bin/shell/chunks/chunk-DH7M46D3.js +0 -20
- package/dist/bin/shell/chunks/chunk-DTGQQKI2.js +0 -87
- package/dist/bin/shell/chunks/chunk-ECZAFQ22.js +0 -9
- package/dist/bin/shell/chunks/chunk-ETWDDV6I.js +0 -10
- package/dist/bin/shell/chunks/chunk-HFW2LXQV.js +0 -13
- package/dist/bin/shell/chunks/chunk-HRKG3ZK2.js +0 -8
- package/dist/bin/shell/chunks/chunk-I4IRHQDW.js +0 -3
- package/dist/bin/shell/chunks/chunk-IKUY74NG.js +0 -3
- package/dist/bin/shell/chunks/chunk-ILXMFIYG.js +0 -7
- package/dist/bin/shell/chunks/chunk-IMVXTSPG.js +0 -275
- package/dist/bin/shell/chunks/chunk-ISW2U76N.js +0 -17
- package/dist/bin/shell/chunks/chunk-K5KT6DMM.js +0 -4
- package/dist/bin/shell/chunks/chunk-KG2KXL4Y.js +0 -3
- package/dist/bin/shell/chunks/chunk-LCP3IKI7.js +0 -9
- package/dist/bin/shell/chunks/chunk-LG6IN6SW.js +0 -34
- package/dist/bin/shell/chunks/chunk-LMFAALLO.js +0 -21
- package/dist/bin/shell/chunks/chunk-LXFMIXGA.js +0 -3
- package/dist/bin/shell/chunks/chunk-M5ZBECGM.js +0 -22
- package/dist/bin/shell/chunks/chunk-MA6BMA4M.js +0 -3
- package/dist/bin/shell/chunks/chunk-MPQMTLXN.js +0 -3
- package/dist/bin/shell/chunks/chunk-MUIYG2RB.js +0 -65
- package/dist/bin/shell/chunks/chunk-MYTNZ7MA.js +0 -7
- package/dist/bin/shell/chunks/chunk-NGMFI3RH.js +0 -15
- package/dist/bin/shell/chunks/chunk-NLMTGTSG.js +0 -11
- package/dist/bin/shell/chunks/chunk-O74FSWB4.js +0 -4
- package/dist/bin/shell/chunks/chunk-OBVTFHVP.js +0 -7
- package/dist/bin/shell/chunks/chunk-OOKVPG5D.js +0 -6
- package/dist/bin/shell/chunks/chunk-PL4EU7Y2.js +0 -3
- package/dist/bin/shell/chunks/chunk-Q3LE3Y66.js +0 -13
- package/dist/bin/shell/chunks/chunk-QCGH2ZOW.js +0 -13
- package/dist/bin/shell/chunks/chunk-QKWMWSV3.js +0 -3
- package/dist/bin/shell/chunks/chunk-QL33F2W6.js +0 -8
- package/dist/bin/shell/chunks/chunk-S5Z7DMIE.js +0 -26
- package/dist/bin/shell/chunks/chunk-SQ7SZZMW.js +0 -8
- package/dist/bin/shell/chunks/chunk-SQUH76NP.js +0 -3
- package/dist/bin/shell/chunks/chunk-TGRZ42DS.js +0 -12
- package/dist/bin/shell/chunks/chunk-THTKNRO6.js +0 -7
- package/dist/bin/shell/chunks/chunk-TQXLQEIT.js +0 -9
- package/dist/bin/shell/chunks/chunk-TZ3S7MY6.js +0 -12
- package/dist/bin/shell/chunks/chunk-U6BXPMLD.js +0 -7
- package/dist/bin/shell/chunks/chunk-U6DBRMD5.js +0 -5
- package/dist/bin/shell/chunks/chunk-URRH3GPG.js +0 -10
- package/dist/bin/shell/chunks/chunk-VBU3UEG5.js +0 -7
- package/dist/bin/shell/chunks/chunk-VLWZ6L7C.js +0 -4
- package/dist/bin/shell/chunks/chunk-VTHA5UK5.js +0 -7
- package/dist/bin/shell/chunks/chunk-WBST7XJW.js +0 -9
- package/dist/bin/shell/chunks/chunk-WDV2ECOC.js +0 -3
- package/dist/bin/shell/chunks/chunk-WEQ5WM2M.js +0 -20
- package/dist/bin/shell/chunks/chunk-WFVCEB5T.js +0 -3
- package/dist/bin/shell/chunks/chunk-WZ7MIBLR.js +0 -37
- package/dist/bin/shell/chunks/chunk-X45GP3AQ.js +0 -3
- package/dist/bin/shell/chunks/chunk-XEQ7KSRM.js +0 -5
- package/dist/bin/shell/chunks/chunk-YIANER7Y.js +0 -8
- package/dist/bin/shell/chunks/chunk-YYZSYLJO.js +0 -6
- package/dist/bin/shell/chunks/chunk-Z3KAV6YJ.js +0 -10
- package/dist/bin/shell/chunks/chunk-Z5KICK5X.js +0 -22
- package/dist/bin/shell/chunks/column-LHHS4D3K.js +0 -3
- package/dist/bin/shell/chunks/comm-URDMZCXL.js +0 -3
- package/dist/bin/shell/chunks/cp-HPLQA35N.js +0 -3
- package/dist/bin/shell/chunks/curl-FIRG3RB6.js +0 -31
- package/dist/bin/shell/chunks/cut-KP3S36XS.js +0 -3
- package/dist/bin/shell/chunks/date-FJUBX7TJ.js +0 -3
- package/dist/bin/shell/chunks/diff-JSJ56EOK.js +0 -3
- package/dist/bin/shell/chunks/du-WEF5YWQK.js +0 -3
- package/dist/bin/shell/chunks/env-2TSVF4W7.js +0 -3
- package/dist/bin/shell/chunks/expand-P6SNTBGZ.js +0 -3
- package/dist/bin/shell/chunks/expr-FLWT4OCO.js +0 -3
- package/dist/bin/shell/chunks/file-JLUCGBCB.js +0 -3
- package/dist/bin/shell/chunks/find-XGVQ6N6L.js +0 -3
- package/dist/bin/shell/chunks/flag-coverage-4JYKIAVV.js +0 -3
- package/dist/bin/shell/chunks/fold-YEY7X54W.js +0 -3
- package/dist/bin/shell/chunks/grep-DCPCPQOS.js +0 -3
- package/dist/bin/shell/chunks/gzip-6DZIKNBW.js +0 -3
- package/dist/bin/shell/chunks/head-TLFXMM2T.js +0 -3
- package/dist/bin/shell/chunks/html-to-markdown-E22RLT2U.js +0 -3
- package/dist/bin/shell/chunks/join-UQKXU2QP.js +0 -3
- package/dist/bin/shell/chunks/jq-GDM3OBBK.js +0 -3
- package/dist/bin/shell/chunks/js-exec-VU6F6WLS.js +0 -1578
- package/dist/bin/shell/chunks/ls-67NUUIYT.js +0 -3
- package/dist/bin/shell/chunks/md5sum-Z6KAYGDK.js +0 -3
- package/dist/bin/shell/chunks/mkdir-AWDWRBKC.js +0 -3
- package/dist/bin/shell/chunks/mktemp-L6OGMDUO.js +0 -3
- package/dist/bin/shell/chunks/mv-4BJSOT4Y.js +0 -3
- package/dist/bin/shell/chunks/nl-XHWFVVKH.js +0 -3
- package/dist/bin/shell/chunks/od-SI75GLRE.js +0 -3
- package/dist/bin/shell/chunks/paste-5TSIBDF7.js +0 -3
- package/dist/bin/shell/chunks/printf-CNXNRQ3I.js +0 -3
- package/dist/bin/shell/chunks/python3-GUWCSSDP.js +0 -23
- package/dist/bin/shell/chunks/readlink-URO5XTBB.js +0 -3
- package/dist/bin/shell/chunks/rev-CZTQCNOZ.js +0 -3
- package/dist/bin/shell/chunks/rg-RVULUPDH.js +0 -3
- package/dist/bin/shell/chunks/rm-UCUTHC3I.js +0 -3
- package/dist/bin/shell/chunks/rmdir-J3HM7GGM.js +0 -3
- package/dist/bin/shell/chunks/sed-MCLGHZOI.js +0 -3
- package/dist/bin/shell/chunks/seq-I54NZE75.js +0 -3
- package/dist/bin/shell/chunks/sha1sum-CATBXX76.js +0 -3
- package/dist/bin/shell/chunks/sha256sum-YGSNBVY3.js +0 -3
- package/dist/bin/shell/chunks/sort-M3DO25D5.js +0 -3
- package/dist/bin/shell/chunks/split-VZO7223N.js +0 -3
- package/dist/bin/shell/chunks/sqlite3-HXVFVP4Z.js +0 -3
- package/dist/bin/shell/chunks/stat-UJ37RBMM.js +0 -3
- package/dist/bin/shell/chunks/strings-J2X2Z6N2.js +0 -3
- package/dist/bin/shell/chunks/tac-DG4BMYM5.js +0 -3
- package/dist/bin/shell/chunks/tail-5TSF5YM4.js +0 -3
- package/dist/bin/shell/chunks/tar-ZGZZDQXO.js +0 -3
- package/dist/bin/shell/chunks/tee-L4HKV5PD.js +0 -3
- package/dist/bin/shell/chunks/time-J2DAZUIN.js +0 -3
- package/dist/bin/shell/chunks/timeout-ATTDYXLX.js +0 -3
- package/dist/bin/shell/chunks/touch-TVQAUQOG.js +0 -3
- package/dist/bin/shell/chunks/tr-6RPFASYV.js +0 -3
- package/dist/bin/shell/chunks/unexpand-JPOQORZF.js +0 -3
- package/dist/bin/shell/chunks/uniq-K5VRDP4Q.js +0 -3
- package/dist/bin/shell/chunks/wc-VSQBRD6B.js +0 -3
- package/dist/bin/shell/chunks/xan-CCS53B7D.js +0 -3
- package/dist/bin/shell/chunks/xan-view-KOXASOEV.js +0 -3
- package/dist/bin/shell/chunks/xargs-HMISWW4I.js +0 -3
- package/dist/bin/shell/chunks/yes-ELH3XQWY.js +0 -3
- package/dist/bin/shell/chunks/yq-GSCDUHGM.js +0 -3
- package/dist/bundle/chunks/awk2-V7KYQWCD.js +0 -2
- package/dist/bundle/chunks/base64-QPSYZAAJ.js +0 -2
- package/dist/bundle/chunks/bash-HIEWVHJ2.js +0 -2
- package/dist/bundle/chunks/cat-54BXBS6X.js +0 -2
- package/dist/bundle/chunks/chmod-4OPV4QKK.js +0 -2
- package/dist/bundle/chunks/chunk-2KNTH3KH.js +0 -9
- package/dist/bundle/chunks/chunk-2VWG4LDT.js +0 -11
- package/dist/bundle/chunks/chunk-2WBUTDF5.js +0 -2
- package/dist/bundle/chunks/chunk-3HDTNUL3.js +0 -6
- package/dist/bundle/chunks/chunk-3KWM4FFA.js +0 -12
- package/dist/bundle/chunks/chunk-4AKAIZPW.js +0 -15
- package/dist/bundle/chunks/chunk-4IMUNIUJ.js +0 -21
- package/dist/bundle/chunks/chunk-5ATEFZLC.js +0 -4
- package/dist/bundle/chunks/chunk-5BMPT6SF.js +0 -19
- package/dist/bundle/chunks/chunk-5QWGR2WA.js +0 -21
- package/dist/bundle/chunks/chunk-5UTZMNI5.js +0 -64
- package/dist/bundle/chunks/chunk-5VCAQBXL.js +0 -17
- package/dist/bundle/chunks/chunk-65LVAUWW.js +0 -7
- package/dist/bundle/chunks/chunk-6D3WD6YU.js +0 -3
- package/dist/bundle/chunks/chunk-6R4OQQWP.js +0 -16
- package/dist/bundle/chunks/chunk-6WGIZV3E.js +0 -13
- package/dist/bundle/chunks/chunk-72JHTO7E.js +0 -2
- package/dist/bundle/chunks/chunk-7GA3QWJJ.js +0 -33
- package/dist/bundle/chunks/chunk-7M672HB6.js +0 -21
- package/dist/bundle/chunks/chunk-AFFAMSJT.js +0 -14
- package/dist/bundle/chunks/chunk-ANCQ4SCV.js +0 -2
- package/dist/bundle/chunks/chunk-B3NGH6KE.js +0 -5
- package/dist/bundle/chunks/chunk-B5Z5HTFY.js +0 -14
- package/dist/bundle/chunks/chunk-B6OSJB22.js +0 -26
- package/dist/bundle/chunks/chunk-BM3X75NC.js +0 -36
- package/dist/bundle/chunks/chunk-CGI6V2HW.js +0 -11
- package/dist/bundle/chunks/chunk-CHHWTPDH.js +0 -3
- package/dist/bundle/chunks/chunk-D5ZJISRS.js +0 -11
- package/dist/bundle/chunks/chunk-DIRWTBKE.js +0 -19
- package/dist/bundle/chunks/chunk-DIWMSSQY.js +0 -2
- package/dist/bundle/chunks/chunk-DPZVOEUP.js +0 -6
- package/dist/bundle/chunks/chunk-EFORKKSH.js +0 -8
- package/dist/bundle/chunks/chunk-EGTVQWAP.js +0 -20
- package/dist/bundle/chunks/chunk-EJFBIRMD.js +0 -6
- package/dist/bundle/chunks/chunk-EQQGPAXI.js +0 -9
- package/dist/bundle/chunks/chunk-EXXOLIVE.js +0 -35
- package/dist/bundle/chunks/chunk-FIMO5HLX.js +0 -2
- package/dist/bundle/chunks/chunk-FT6ODGOU.js +0 -2
- package/dist/bundle/chunks/chunk-FZRQOL3C.js +0 -7
- package/dist/bundle/chunks/chunk-GLAFXDZC.js +0 -4
- package/dist/bundle/chunks/chunk-GN6CQ3J4.js +0 -2
- package/dist/bundle/chunks/chunk-H42OAUJL.js +0 -12
- package/dist/bundle/chunks/chunk-H53EPEGD.js +0 -12
- package/dist/bundle/chunks/chunk-HDOXCDVK.js +0 -7
- package/dist/bundle/chunks/chunk-HIQEVPXM.js +0 -2
- package/dist/bundle/chunks/chunk-J2OBOJ64.js +0 -2
- package/dist/bundle/chunks/chunk-LVDUF74R.js +0 -7
- package/dist/bundle/chunks/chunk-M4LDT7V7.js +0 -6
- package/dist/bundle/chunks/chunk-MDE25PQK.js +0 -15
- package/dist/bundle/chunks/chunk-MHDZERK4.js +0 -6
- package/dist/bundle/chunks/chunk-MHZF23KB.js +0 -33
- package/dist/bundle/chunks/chunk-N6W6FM4N.js +0 -8
- package/dist/bundle/chunks/chunk-NRLE7KYI.js +0 -6
- package/dist/bundle/chunks/chunk-OB46N7Q7.js +0 -2
- package/dist/bundle/chunks/chunk-OQ7C4FYO.js +0 -2
- package/dist/bundle/chunks/chunk-P5BOIHWV.js +0 -6
- package/dist/bundle/chunks/chunk-PPDMRIJ7.js +0 -11
- package/dist/bundle/chunks/chunk-PPHGMG47.js +0 -142
- package/dist/bundle/chunks/chunk-R6ZGLVXI.js +0 -9
- package/dist/bundle/chunks/chunk-RCRHDT54.js +0 -274
- package/dist/bundle/chunks/chunk-RIIUVFUS.js +0 -7
- package/dist/bundle/chunks/chunk-SQX6WQXB.js +0 -7
- package/dist/bundle/chunks/chunk-SRB6FXRH.js +0 -2
- package/dist/bundle/chunks/chunk-T4INBNHX.js +0 -8
- package/dist/bundle/chunks/chunk-TUQG2YRH.js +0 -5
- package/dist/bundle/chunks/chunk-U7UNEMLJ.js +0 -2
- package/dist/bundle/chunks/chunk-UHHCL65P.js +0 -3
- package/dist/bundle/chunks/chunk-UK2K3DHN.js +0 -8
- package/dist/bundle/chunks/chunk-VDJ53ESK.js +0 -9
- package/dist/bundle/chunks/chunk-VGCXKMXN.js +0 -10
- package/dist/bundle/chunks/chunk-W5DWRFSU.js +0 -2
- package/dist/bundle/chunks/chunk-W5J5ADJF.js +0 -100
- package/dist/bundle/chunks/chunk-XHFP44Y4.js +0 -5
- package/dist/bundle/chunks/chunk-Y32R7EZP.js +0 -25
- package/dist/bundle/chunks/chunk-Y62SXZKJ.js +0 -12
- package/dist/bundle/chunks/chunk-YUFU7O6I.js +0 -16
- package/dist/bundle/chunks/chunk-YZH7FUSY.js +0 -14
- package/dist/bundle/chunks/column-F5JDBRV6.js +0 -2
- package/dist/bundle/chunks/comm-DTWKU2MC.js +0 -2
- package/dist/bundle/chunks/cp-LTFB4EUA.js +0 -2
- package/dist/bundle/chunks/curl-XCX2ZQEA.js +0 -30
- package/dist/bundle/chunks/cut-IRSHL3BB.js +0 -2
- package/dist/bundle/chunks/date-FN2DXAEE.js +0 -2
- package/dist/bundle/chunks/diff-VDB6RXHO.js +0 -2
- package/dist/bundle/chunks/du-DOWSRLXR.js +0 -2
- package/dist/bundle/chunks/env-VUUMB47B.js +0 -2
- package/dist/bundle/chunks/expand-2BPPGGSM.js +0 -2
- package/dist/bundle/chunks/expr-GZ4DABKB.js +0 -2
- package/dist/bundle/chunks/file-UI6QJAAU.js +0 -2
- package/dist/bundle/chunks/find-JTXDH3MR.js +0 -2
- package/dist/bundle/chunks/flag-coverage-EDO3VM43.js +0 -2
- package/dist/bundle/chunks/fold-QJBPHRFJ.js +0 -2
- package/dist/bundle/chunks/grep-OZCR76FT.js +0 -2
- package/dist/bundle/chunks/gzip-GQC6CWVL.js +0 -2
- package/dist/bundle/chunks/head-J6RVJFRS.js +0 -2
- package/dist/bundle/chunks/html-to-markdown-7OG5VWYG.js +0 -2
- package/dist/bundle/chunks/join-KQ4Z5OD4.js +0 -2
- package/dist/bundle/chunks/jq-FCG2IUBK.js +0 -2
- package/dist/bundle/chunks/js-exec-NDLXDUBN.js +0 -1577
- package/dist/bundle/chunks/ls-MQTYWW4T.js +0 -2
- package/dist/bundle/chunks/md5sum-JEDX55KS.js +0 -2
- package/dist/bundle/chunks/mkdir-4A5W3RXH.js +0 -2
- package/dist/bundle/chunks/mktemp-XKIE5N3X.js +0 -2
- package/dist/bundle/chunks/mv-ZPIATQJL.js +0 -2
- package/dist/bundle/chunks/nl-RFXH2GNX.js +0 -2
- package/dist/bundle/chunks/od-LUHOH7CG.js +0 -2
- package/dist/bundle/chunks/paste-U57ZU47S.js +0 -2
- package/dist/bundle/chunks/printf-V42QCPHL.js +0 -2
- package/dist/bundle/chunks/python3-SDFCGIU4.js +0 -22
- package/dist/bundle/chunks/readlink-YNNS6F7K.js +0 -2
- package/dist/bundle/chunks/rev-EPOS3MFH.js +0 -2
- package/dist/bundle/chunks/rg-F4SX2PHI.js +0 -2
- package/dist/bundle/chunks/rm-3XUUYAXQ.js +0 -2
- package/dist/bundle/chunks/rmdir-OGSEXEF4.js +0 -2
- package/dist/bundle/chunks/sed-MBB5SXGD.js +0 -2
- package/dist/bundle/chunks/seq-IN77HD3S.js +0 -2
- package/dist/bundle/chunks/sha1sum-BLPZJ6MP.js +0 -2
- package/dist/bundle/chunks/sha256sum-VJZ4PHQ4.js +0 -2
- package/dist/bundle/chunks/sort-PV2NEQHF.js +0 -2
- package/dist/bundle/chunks/split-6R2TSQY6.js +0 -2
- package/dist/bundle/chunks/sqlite3-7MBPFI6W.js +0 -2
- package/dist/bundle/chunks/stat-YLVJ4L67.js +0 -2
- package/dist/bundle/chunks/strings-WTD7Q2EF.js +0 -2
- package/dist/bundle/chunks/tac-YXC4HBTR.js +0 -2
- package/dist/bundle/chunks/tail-UGFWX3YY.js +0 -2
- package/dist/bundle/chunks/tar-BNHPWTOY.js +0 -2
- package/dist/bundle/chunks/tee-OOWSWHRQ.js +0 -2
- package/dist/bundle/chunks/time-N6J6DC6C.js +0 -2
- package/dist/bundle/chunks/timeout-ZHCL5KTP.js +0 -2
- package/dist/bundle/chunks/touch-W4DF6Z4T.js +0 -2
- package/dist/bundle/chunks/tr-4NGL47UU.js +0 -2
- package/dist/bundle/chunks/unexpand-YD5BWFH4.js +0 -2
- package/dist/bundle/chunks/uniq-OVOW532K.js +0 -2
- package/dist/bundle/chunks/wc-RUR7HE5O.js +0 -2
- package/dist/bundle/chunks/xan-7R3I2DJO.js +0 -2
- package/dist/bundle/chunks/xan-view-S4ZILLPU.js +0 -2
- package/dist/bundle/chunks/xargs-L7TJHOJT.js +0 -2
- package/dist/bundle/chunks/yes-I7SAR7XX.js +0 -2
- package/dist/bundle/chunks/yq-IOMBQYB2.js +0 -2
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{d as S}from"./chunk-GN6CQ3J4.js";import{a as v}from"./chunk-QIQMJJZ4.js";import{a as T,b as F}from"./chunk-QAYAQNCG.js";import*as k from"diff";var z=`\
|
|
3
|
-
`,b=3;function x(o){if(o==="")return{lines:[],noEol:!1};let n=!o.endsWith(`
|
|
4
|
-
`),t=o.split(`
|
|
5
|
-
`);return n||t.pop(),{lines:t,noEol:n}}function N(o,n){let t=o.lines.length-1;return o.lines.map((e,i)=>{let s=i===t&&o.noEol?e:`${e}
|
|
6
|
-
`;return n?s.toLowerCase():s})}function D(o,n,t){let e=k.diffArrays(N(o,t),N(n,t)),i=[],s=0,f=0,l=0;for(;l<e.length;){let r=e[l];if(!r.added&&!r.removed){s+=r.count??r.value.length,f+=r.count??r.value.length,l++;continue}let u={oldStart:s,oldCount:0,newStart:f,newCount:0};for(;l<e.length&&(e[l].added||e[l].removed);){let a=e[l].count??e[l].value.length;e[l].removed?(u.oldCount+=a,s+=a):(u.newCount+=a,f+=a),l++}i.push(u)}return i}function C(o){if(!/[\s"\u0000-\u001f\u007f]/.test(o))return o;let n='"';for(let t of o)t==='"'||t==="\\"?n+=`\\${t}`:t===" "?n+="\\t":t===`
|
|
7
|
-
`?n+="\\n":t==="\r"?n+="\\r":t<" "||t==="\x7F"?n+=`\\${t.charCodeAt(0).toString(8).padStart(3,"0")}`:n+=t;return`${n}"`}function p(o,n,t,e){o.push(`${e}${n.lines[t]}
|
|
8
|
-
`),n.noEol&&t===n.lines.length-1&&o.push(z)}function E(o,n){return n===0?String(o):n===1?String(o+1):`${o+1},${o+n}`}function U(o,n,t){let e=[];for(let i of t){let s=i.oldCount===0?"a":i.newCount===0?"d":"c";e.push(`${E(i.oldStart,i.oldCount)}${s}${E(i.newStart,i.newCount)}
|
|
9
|
-
`);for(let f=0;f<i.oldCount;f++)p(e,o,i.oldStart+f,"< ");s==="c"&&e.push(`---
|
|
10
|
-
`);for(let f=0;f<i.newCount;f++)p(e,n,i.newStart+f,"> ")}return e.join("")}function j(o,n){let t=[],e=[];for(let i of o){let s=e[e.length-1];s&&i.oldStart-(s.oldStart+s.oldCount)>2*n&&(t.push(e),e=[]),e.push(i)}return e.length>0&&t.push(e),t}function q(o,n,t,e){let i=o[0],s=o[o.length-1];return{oldFrom:Math.max(0,i.oldStart-e),oldTo:Math.min(n.lines.length,s.oldStart+s.oldCount+e),newFrom:Math.max(0,i.newStart-e),newTo:Math.min(t.lines.length,s.newStart+s.newCount+e)}}function L(o,n){let t=n-o;return t===0?`${o},0`:t===1?String(o+1):`${o+1},${t}`}function H(o,n,t,e,i,s){let f=[`--- ${C(o)}
|
|
11
|
-
`,`+++ ${C(n)}
|
|
12
|
-
`];for(let l of j(i,s)){let r=q(l,t,e,s);f.push(`@@ -${L(r.oldFrom,r.oldTo)} +${L(r.newFrom,r.newTo)} @@
|
|
13
|
-
`);let u=r.oldFrom;for(let a of l){for(;u<a.oldStart;u++)p(f,t,u," ");for(let d=0;d<a.oldCount;d++)p(f,t,a.oldStart+d,"-");for(let d=0;d<a.newCount;d++)p(f,e,a.newStart+d,"+");u=a.oldStart+a.oldCount}for(;u<r.oldTo;u++)p(f,t,u," ")}return f.join("")}function I(o,n){let t=n-o;return t===0?String(o):t===1?String(o+1):`${o+1},${n}`}function A(o,n,t,e,i,s){if(!t.some(r=>(s?r.oldCount:r.newCount)>0))return;let l=e;for(let r of t){let u=s?r.oldStart:r.newStart,a=s?r.oldCount:r.newCount;for(;l<u;l++)p(o,n,l," ");let d=r.oldCount>0&&r.newCount>0?"! ":s?"- ":"+ ";for(let c=0;c<a;c++)p(o,n,u+c,d);l=u+a}for(;l<i;l++)p(o,n,l," ")}function M(o,n,t,e,i,s){let f=[`*** ${C(o)}
|
|
14
|
-
`,`--- ${C(n)}
|
|
15
|
-
`];for(let l of j(i,s)){let r=q(l,t,e,s);f.push(`***************
|
|
16
|
-
`),f.push(`*** ${I(r.oldFrom,r.oldTo)} ****
|
|
17
|
-
`),A(f,t,l,r.oldFrom,r.oldTo,!0),f.push(`--- ${I(r.newFrom,r.newTo)} ----
|
|
18
|
-
`),A(f,e,l,r.newFrom,r.newTo,!1)}return f.join("")}var P={name:"diff",summary:"compare files line by line",usage:"diff [OPTION]... FILE1 FILE2",options:[" --normal output a normal diff (default)","-u, --unified output a unified diff","-c, --context output a context diff","-q, --brief report only whether files differ","-s, --report-identical-files report when files are the same","-i, --ignore-case ignore case differences"," --version output version information and exit"," --help display this help and exit"]},R={normal:{long:"normal",type:"boolean"},unified:{short:"u",long:"unified",type:"boolean"},context:{short:"c",long:"context",type:"boolean"},brief:{short:"q",long:"brief",type:"boolean"},reportSame:{short:"s",long:"report-identical-files",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"},version:{long:"version",type:"boolean"}},G={name:"diff",async execute(o,n){if(F(o))return T(P);let t=v("diff",o,R);if(!t.ok)return t.error;let e=t.result.flags;if(e.version)return{stdout:`diff (just-bash)
|
|
19
|
-
`,stderr:"",exitCode:0};if(Number(e.normal)+Number(e.unified)+Number(e.context)>1)return{stdout:"",stderr:`diff: conflicting output style options
|
|
20
|
-
diff: Try 'diff --help' for more information.
|
|
21
|
-
`,exitCode:2};let s=e.brief,f=e.reportSame,l=e.ignoreCase,r=t.result.positional;if(r.length<2)return{stdout:"",stderr:`diff: missing operand
|
|
22
|
-
`,exitCode:2};let u,a,[d,c]=r;try{u=d==="-"?S(n.stdin):await n.fs.readFile(n.fs.resolvePath(n.cwd,d))}catch{return{stdout:"",stderr:`diff: ${d}: No such file or directory
|
|
23
|
-
`,exitCode:2}}try{a=c==="-"?S(n.stdin):await n.fs.readFile(n.fs.resolvePath(n.cwd,c))}catch{return{stdout:"",stderr:`diff: ${c}: No such file or directory
|
|
24
|
-
`,exitCode:2}}let w=u,$=a;if(l&&(w=w.toLowerCase(),$=$.toLowerCase()),w===$)return f?{stdout:`Files ${d} and ${c} are identical
|
|
25
|
-
`,stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0};if(s)return{stdout:`Files ${d} and ${c} differ
|
|
26
|
-
`,stderr:"",exitCode:1};let h=x(u),g=x(a),y=D(h,g,l),m;return e.unified?m=H(d,c,h,g,y,b):e.context?m=M(d,c,h,g,y,b):m=U(h,g,y),{stdout:m,stderr:"",exitCode:1}}},J={name:"diff",flags:[{flag:"--normal",type:"boolean"},{flag:"-u",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-i",type:"boolean"}],needsArgs:!0,minArgs:2};export{G as a,J as b};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as W}from"./chunk-VOQZ5TSL.js";import{c as $}from"./chunk-CHWP6GRK.js";import{b as C}from"./chunk-CBM6J4AL.js";import{a as V}from"./chunk-2WBUTDF5.js";import{d as I}from"./chunk-GN6CQ3J4.js";import{a as x}from"./chunk-W5DWRFSU.js";import{a as B,b}from"./chunk-FOCWZZDE.js";import{a as N,b as R}from"./chunk-QAYAQNCG.js";import{existsSync as ce}from"node:fs";import{dirname as de,join as T,sep as Q}from"node:path";import{fileURLToPath as me}from"node:url";import{Worker as he}from"node:worker_threads";import pe from"sql.js";function K(e,t){return e==null?Buffer.byteLength(t,"utf8"):e instanceof Uint8Array||Buffer.isBuffer(e)?e.byteLength:Buffer.byteLength(String(e),"utf8")}function X(e,t,r){let n=r.maxOutputSize??Number.MAX_SAFE_INTEGER,s=Buffer.byteLength(r.separator,"utf8");s+=Buffer.byteLength(r.newline,"utf8");for(let a of e)s+=Buffer.byteLength(a,"utf8");for(let a of t){s+=a.length*16;for(let i of a)s+=K(i,r.nullValue);if(s>n)break}let o=s*8+(t.length+3)*(e.length+3)*16;if(!Number.isSafeInteger(o)||o>n)throw new Error(`formatted output exceeds ${n} byte limit`);return n}function _(e,t,r){let n=X(e,t,r),s;switch(r.mode){case"list":s=Y(e,t,r);break;case"csv":s=Z(e,t,r);break;case"json":s=te(e,t);break;case"line":s=re(e,t,r);break;case"column":s=ne(e,t,r);break;case"table":s=se(e,t,r);break;case"markdown":s=oe(e,t,r);break;case"tabs":s=ie(e,t,r);break;case"box":s=ae(e,t,r);break;case"quote":s=le(e,t,r);break;case"html":s=fe(e,t,r);break;case"ascii":s=ue(e,t,r);break}if(Buffer.byteLength(s,"utf8")>n)throw new Error(`formatted output exceeds ${n} byte limit`);return s}function m(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 Y(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let s of t)n.push(s.map(o=>m(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function Z(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(v).join(","));for(let s of t)n.push(s.map(o=>v(m(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
|
|
3
|
-
`)}
|
|
4
|
-
`:""}function v(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
|
|
5
|
-
`)?`"${e.replace(/"/g,'""')}"`:e}function F(e){return e.toPrecision(17).replace(/\.?0+$/,"")}function ee(e){return e===null?"null":typeof e=="number"?Number.isInteger(e)?String(e):F(e):JSON.stringify(e)}function te(e,t){return t.length===0?"":`[${t.map(n=>`{${e.map((o,a)=>`${JSON.stringify(o)}:${ee(n[a])}`).join(",")}}`).join(`,
|
|
6
|
-
`)}]
|
|
7
|
-
`}function re(e,t,r){if(e.length===0||t.length===0)return"";let n=Math.max(5,...e.map(o=>o.length)),s=[];for(let o of t)for(let a=0;a<e.length;a++){let i=e[a].padStart(n);s.push(`${i} = ${m(o[a],r.nullValue)}`)}return`${s.join(`
|
|
8
|
-
`)}
|
|
9
|
-
`}function ne(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let a=0;a<o.length;a++){let i=m(o[a],r.nullValue).length;i>n[a]&&(n[a]=i)}let s=[];r.header&&(s.push(e.map((o,a)=>o.padEnd(n[a])).join(" ")),s.push(n.map(o=>"-".repeat(o)).join(" ")));for(let o of t)s.push(o.map((a,i)=>m(a,r.nullValue).padEnd(n[i])).join(" "));return s.length>0?`${s.join(`
|
|
10
|
-
`)}
|
|
11
|
-
`:""}function se(e,t,r){if(e.length===0)return"";let n=e.map(a=>a.length);for(let a of t)for(let i=0;i<a.length;i++){let c=m(a[i],r.nullValue).length;c>n[i]&&(n[i]=c)}let s=[],o=`+${n.map(a=>"-".repeat(a+2)).join("+")}+`;s.push(o),r.header&&(s.push(`| ${e.map((a,i)=>a.padEnd(n[i])).join(" | ")} |`),s.push(o));for(let a of t)s.push(`| ${a.map((i,c)=>m(i,r.nullValue).padEnd(n[c])).join(" | ")} |`);return s.push(o),`${s.join(`
|
|
12
|
-
`)}
|
|
13
|
-
`}function oe(e,t,r){if(e.length===0)return"";let n=[];r.header&&(n.push(`| ${e.join(" | ")} |`),n.push(`|${e.map(()=>"---").join("|")}|`));for(let s of t)n.push(`| ${s.map(o=>m(o,r.nullValue)).join(" | ")} |`);return n.length>0?`${n.join(`
|
|
14
|
-
`)}
|
|
15
|
-
`:""}function ie(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(" "));for(let s of t)n.push(s.map(o=>m(o,r.nullValue)).join(" "));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function ae(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let a=0;a<o.length;a++){let i=m(o[a],r.nullValue).length;i>n[a]&&(n[a]=i)}let s=[];s.push(`\u250C${n.map(o=>"\u2500".repeat(o+2)).join("\u252C")}\u2510`),s.push(`\u2502 ${e.map((o,a)=>o.padEnd(n[a])).join(" \u2502 ")} \u2502`),s.push(`\u251C${n.map(o=>"\u2500".repeat(o+2)).join("\u253C")}\u2524`);for(let o of t)s.push(`\u2502 ${o.map((a,i)=>m(a,r.nullValue).padEnd(n[i])).join(" \u2502 ")} \u2502`);return s.push(`\u2514${n.map(o=>"\u2500".repeat(o+2)).join("\u2534")}\u2518`),`${s.join(`
|
|
16
|
-
`)}
|
|
17
|
-
`}function le(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(P).join(","));for(let s of t)n.push(s.map(P).join(","));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function P(e){if(e==null)return"NULL";if(e instanceof Uint8Array||Buffer.isBuffer(e))return`X'${Buffer.from(e).toString("hex").toUpperCase()}'`;if(typeof e=="number"){if(Number.isInteger(e))return String(e);if(Number.isFinite(e))return F(e)}return`'${String(e).replace(/'/g,"''")}'`}function fe(e,t,r){let n=[];r.header&&e.length>0&&(n.push(`<TR>${e.map(s=>`<TH>${D(s)}</TH>`).join("")}`),n.push("</TR>"));for(let s of t)n.push(`<TR>${s.map(o=>`<TD>${D(m(o,r.nullValue))}</TD>`).join("")}`),n.push("</TR>");return n.length>0?`${n.join(`
|
|
18
|
-
`)}
|
|
19
|
-
`:""}function D(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function ue(e,t,r){let o=[];r.header&&e.length>0&&o.push(e.join(""));for(let a of t)o.push(a.map(i=>m(i,r.nullValue)).join(""));return o.length>0?o.join("")+"":""}var ge=1024,be=128,we=16,U="Worker termination was not acknowledged";function M(e,t){if(!Number.isSafeInteger(e)||e<0||e>t)throw new Error(`database exceeds ${t} byte limit`)}var O=new WeakMap;async function z(e,t,r){let n=O.get(e);n||(n=new Map,O.set(e,n));let s=n.get(t);if(s||(s={held:!1,waiters:[]},n.set(t,s)),s.poisonedError)throw new Error(s.poisonedError);if(s.held){if(s.waiters.length>=ge)throw new Error("too many concurrent database operations");await new Promise((a,i)=>{let c={signal:r,grant(){r&&c.abort&&r.removeEventListener("abort",c.abort),a()},reject:i};if(r&&(c.abort=()=>{let u=s?.waiters.indexOf(c)??-1;u!==-1&&s?.waiters.splice(u,1),i(new Error("database lock wait aborted"))},r.addEventListener("abort",c.abort,{once:!0}),r.aborted)){c.abort();return}s?.waiters.push(c)})}else s.held=!0;let o=!1;return()=>{if(o||(o=!0,s?.poisonedError))return;let a=s?.waiters.shift();a?a.grant():(s&&(s.held=!1),n?.delete(t))}}async function ye(e,t,r){let n=[];try{for(let s of[...new Set(t)].sort())n.push(await z(e,s,r))}catch(s){for(let o of n.reverse())o();throw s}return()=>{for(let s of n.reverse())s()}}function ke(e,t,r){let n=O.get(e)?.get(t);if(!(!n||n.poisonedError)){n.poisonedError=r;for(let s of n.waiters.splice(0))s.signal&&s.abort&&s.signal.removeEventListener("abort",s.abort),s.reject(new Error(r))}}var Ee={name:"sqlite3",summary:"SQLite database CLI",usage:"sqlite3 [OPTIONS] DATABASE [SQL]",options:["-list output in list mode (default)","-csv output in CSV mode","-json output in JSON mode","-line output in line mode","-column output in column mode","-table output as ASCII table","-markdown output as markdown table","-tabs output in tab-separated mode","-box output in Unicode box mode","-quote output in SQL quote mode","-html output as HTML table","-ascii output in ASCII mode (control chars)","-header show column headers","-noheader hide column headers","-separator SEP field separator for list mode (default: |)","-newline SEP row separator (default: \\n)","-nullvalue TEXT text for NULL values (default: empty)","-readonly open database read-only (no writeback)","-bail stop on first error","-echo print SQL before execution","-cmd COMMAND run SQL command before main SQL","-version show SQLite version","-- end of options","--help show this help"],examples:['sqlite3 :memory: "CREATE TABLE t(x); INSERT INTO t VALUES(1); SELECT * FROM t"','sqlite3 -json data.db "SELECT * FROM users"','sqlite3 -csv -header data.db "SELECT id, name FROM products"','sqlite3 -box data.db "SELECT * FROM users"']};function Se(e){let t={mode:"list",header:!1,separator:"|",newline:`
|
|
20
|
-
`,nullValue:"",readonly:!1,bail:!1,echo:!1,cmd:null},r=null,n=null,s=!1,o=!1;for(let a=0;a<e.length;a++){let i=e[a];if(o){r===null?r=i:n===null&&(n=i);continue}if(i==="--")o=!0;else if(i==="-version")s=!0;else if(i==="-list")t.mode="list";else if(i==="-csv")t.mode="csv";else if(i==="-json")t.mode="json";else if(i==="-line")t.mode="line";else if(i==="-column")t.mode="column";else if(i==="-table")t.mode="table";else if(i==="-markdown")t.mode="markdown";else if(i==="-tabs")t.mode="tabs";else if(i==="-box")t.mode="box";else if(i==="-quote")t.mode="quote";else if(i==="-html")t.mode="html";else if(i==="-ascii")t.mode="ascii";else if(i==="-header")t.header=!0;else if(i==="-noheader")t.header=!1;else if(i==="-readonly")t.readonly=!0;else if(i==="-bail")t.bail=!0;else if(i==="-echo")t.echo=!0;else if(i==="-separator"){if(a+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -separator
|
|
21
|
-
`,exitCode:1};t.separator=e[++a]}else if(i==="-newline"){if(a+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -newline
|
|
22
|
-
`,exitCode:1};t.newline=e[++a]}else if(i==="-nullvalue"){if(a+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -nullvalue
|
|
23
|
-
`,exitCode:1};t.nullValue=e[++a]}else if(i==="-cmd"){if(a+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -cmd
|
|
24
|
-
`,exitCode:1};t.cmd=e[++a]}else{if(i.startsWith("-"))return{stdout:"",stderr:`sqlite3: Error: unknown option: ${i.startsWith("--")?i.slice(1):i}
|
|
25
|
-
Use -help for a list of options.
|
|
26
|
-
`,exitCode:1};r===null?r=i:n===null&&(n=i)}}return{options:t,database:r,sql:n,showVersion:s}}async function Le(){let e=await C.runTrustedAsync(()=>pe()),t=new e.Database;try{let r=t.exec("SELECT sqlite_version()");return r.length>0&&r[0].values.length>0?String(r[0].values[0][0]):"unknown"}finally{t.close()}}function H(e=de(me(import.meta.url))){let t=[T(e,"sqlite3-worker.js"),T(e,"../../commands/sqlite3/worker.js")];(e.endsWith(`${Q}commands${Q}sqlite3`)||e.endsWith("/commands/sqlite3"))&&t.push(T(e,"worker.js")),t.push(T(e,"../../../dist/commands/sqlite3/worker.js"));for(let r of t)if(ce(r))return r;throw new Error("sqlite3 worker not found. Run 'pnpm build' to compile the worker.")}var $e={createWorker(e,t){return new he(e,{workerData:t,resourceLimits:{maxOldGenerationSizeMb:be,maxYoungGenerationSizeMb:we}})},findWorkerPath:H,acquireDatabaseLock:z};function qe(e,t){if(!e||typeof e!="object")return{success:!1,error:"Malformed worker response"};let r=e;return typeof r.protocolToken!="string"||r.protocolToken!==t?{success:!1,error:"Malformed worker response: invalid protocol token"}:r.type==="security-violation"?{success:!1,error:`Security violation: ${typeof r.violation?.type=="string"?r.violation.type:"unknown"}`}:typeof r.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:r.success?Array.isArray(r.results)?typeof r.hasModifications!="boolean"?{success:!1,error:"Malformed worker response: missing hasModifications flag"}:r.dbBuffer!==null&&r.dbBuffer!==void 0&&!(r.dbBuffer instanceof Uint8Array)?{success:!1,error:"Malformed worker response: invalid dbBuffer"}:{success:!0,results:r.results,hasModifications:r.hasModifications,dbBuffer:r.dbBuffer===void 0?null:r.dbBuffer,defenseStats:r.defenseStats}:{success:!1,error:"Malformed worker response: missing results array"}:{success:!1,error:typeof r.error=="string"&&r.error.length>0?r.error:"Worker execution failed"}}async function je(e,t,r){try{let n=H();return await new Promise(s=>{let o,a=!1,i=!1,c=()=>{!i||!o||(i=!1,o.removeListener?.("message",d),o.removeListener?.("error",p),o.removeListener?.("exit",L))},u=async(l,f)=>{if(a)return;a=!0,c();let g=f?await t.terminate(o):!1;t.close(),s(g?l:{success:!1,error:U})},w=$(r,"sqlite3","worker cancellation callback",l=>{u({success:!1,error:l==="abort"?t.abortMessage():t.timeoutMessage("Query")},!0)});if(t.arm(l=>{try{w(l)}catch(f){u({success:!1,error:b(x(f))},!0)}}),t.isCanceled)return;try{o=C.runTrusted(()=>$e.createWorker(n,e))}catch(l){throw t.close(),l}let y=$(r,"sqlite3","worker message callback",l=>{try{let f=l&&typeof l=="object"?{protocolToken:l.protocolToken,type:l.type,violation:l.violation,success:l.success,error:l.error,results:l.results,hasModifications:l.hasModifications,defenseStats:l.defenseStats}:l;t.assertMessageSize(f,"response"),u(qe(l,e.protocolToken),!0)}catch(f){u({success:!1,error:b(x(f))},!0)}}),S=$(r,"sqlite3","worker error callback",l=>{u({success:!1,error:b(x(l))},!0)}),q=$(r,"sqlite3","worker exit callback",l=>{l!==0&&u({success:!1,error:`Worker exited with code ${l}`},!1)}),d=l=>{try{y(l)}catch(f){let g=f instanceof Error?f.message:String(f);u({success:!1,error:b(g)},!0)}},p=l=>{try{S(l)}catch(f){let g=f instanceof Error?f.message:String(f);u({success:!1,error:b(g)},!0)}},L=l=>{try{q(l)}catch(f){let g=f instanceof Error?f.message:String(f);u({success:!1,error:b(g)},!0)}};o.on("message",d),o.on("error",p),o.on("exit",L),i=!0})}catch(n){let s=b(n.message);throw new Error(`sqlite3 worker failed to load: ${s}`)}}var _e={name:"sqlite3",async execute(e,t){if(R(e)||e.includes("-help"))return N(Ee);let r=Se(e);if("exitCode"in r)return r;let{options:n,database:s,sql:o,showVersion:a}=r;if(a)return{stdout:`${await Le()}
|
|
27
|
-
`,stderr:"",exitCode:0};if(!s)return{stdout:"",stderr:`sqlite3: missing database argument
|
|
28
|
-
`,exitCode:1};let i=o||I(t.stdin).trim();if(n.cmd&&(i=n.cmd+(i?`; ${i}`:"")),!i)return{stdout:"",stderr:`sqlite3: no SQL provided
|
|
29
|
-
`,exitCode:1};let c=s===":memory:",u="",w=[],y=null,S,q;try{if(!c){u=t.fs.resolvePath(t.cwd,s);let d=await V(t.fs,u);if(d.existence==="unknown")throw new Error("database identity cannot be determined safely");if(d.canonicalPath!==void 0&&(u=d.canonicalPath),w=[],d.canonicalPath!==void 0&&w.push(`path:${d.canonicalPath}`),d.existence==="existing"){if(d.stableIdentity===void 0)throw new Error("database identity cannot be determined safely");w.push(`identity:${d.stableIdentity}`)}if(w.length===0)throw new Error("database identity cannot be determined safely");if(S=await ye(t.fsIdentity??t.fs,w,t.signal),await t.fs.exists(u)){let p=await t.fs.stat(u);M(p.size,t.limits.maxDatabaseBytes),y=await t.fs.readFileBuffer(u),M(y.byteLength,t.limits.maxDatabaseBytes),q=t.executionScope?.reserveBytes("sqlite-database",y.byteLength,"sqlite3 database")}}}catch(d){S?.();let p=B(d.message);return{stdout:"",stderr:`sqlite3: unable to open database "${s}": ${p}
|
|
30
|
-
`,exitCode:1}}try{let d=t.limits.maxSqliteTimeoutMs,p=new W({commandName:"sqlite3",timeoutMs:d,signal:t.signal,maxMessageBytes:t.limits.maxWorkerMessageBytes}),L={protocolToken:p.protocolToken,dbBuffer:y,sql:i,options:{bail:n.bail,echo:n.echo},limits:{maxResultRows:t.limits.maxArrayElements,maxResultBytes:t.limits.maxDatabaseResultBytes,maxDatabaseBytes:t.limits.maxDatabaseBytes}};p.assertMessageSize({...L,dbBuffer:void 0},"request");let l,f;try{y&&(M(y.byteLength,t.limits.maxDatabaseBytes),f=t.executionScope?.reserveBytes("sqlite-worker-clone",y.byteLength,"sqlite3 worker clone")),l=await je(L,p,t.requireDefenseContext)}catch(h){return{stdout:"",stderr:`sqlite3: worker error: ${b(h.message)}
|
|
31
|
-
`,exitCode:1}}finally{f?.release()}if(!l.success){if(w.length>0&&l.error===U)for(let k of w)ke(t.fsIdentity??t.fs,k,l.error);return{stdout:"",stderr:`sqlite3: ${b(l.error)}
|
|
32
|
-
`,exitCode:1}}let g=Math.min(t.limits.maxStringLength,t.limits.maxOutputSize),G={mode:n.mode,header:n.header,separator:n.separator,newline:n.newline,nullValue:n.nullValue,maxOutputSize:g},E="";n.echo&&(E+=`${i}
|
|
33
|
-
`);let j="",A=!1;for(let h of l.results)if(h.type==="error"){if(j+=`Error: ${h.error??"SQL error"}
|
|
34
|
-
`,A=!0,n.bail)break}else if(h.columns&&h.rows&&(h.rows.length>0||n.header))try{let k=Math.max(0,g-Buffer.byteLength(E,"utf8"));E+=_(h.columns,h.rows,{...G,maxOutputSize:k})}catch(k){let J=B(k.message);return{stdout:E,stderr:`${j}sqlite3: ${J}
|
|
35
|
-
`,exitCode:1}}if(l.hasModifications&&!n.readonly&&!c&&u&&l.dbBuffer)try{M(l.dbBuffer.byteLength,t.limits.maxDatabaseBytes),await t.fs.writeFile(u,l.dbBuffer)}catch(h){let k=B(h.message);return{stdout:E,stderr:`${j}sqlite3: failed to write database: ${k}
|
|
36
|
-
`,exitCode:1}}return{stdout:E,stderr:j,exitCode:A?1:0}}finally{q?.release(),S?.()}}},Fe={name:"sqlite3",flags:[],needsArgs:!0};export{$e as a,_e as b,Fe as c};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as $}from"./chunk-U7UNEMLJ.js";import{e as y}from"./chunk-DIWMSSQY.js";import{l as h}from"./chunk-EFORKKSH.js";import{e as I,g as b}from"./chunk-GN6CQ3J4.js";import{c as w}from"./chunk-QAYAQNCG.js";function A(e,s){let i=10,r=null,u=!1,n=!1,l=!1,f=[];for(let o=0;o<e.length;o++){let t=e[o];if(t==="-n"&&o+1<e.length){let a=e[++o];s==="tail"&&a.startsWith("+")?(l=!0,i=parseInt(a.slice(1),10)):i=parseInt(a,10)}else if(s==="tail"&&t.startsWith("-n+"))l=!0,i=parseInt(t.slice(3),10);else if(t.startsWith("-n"))i=parseInt(t.slice(2),10);else if(t==="-c"&&o+1<e.length)r=parseInt(e[++o],10);else if(t.startsWith("-c"))r=parseInt(t.slice(2),10);else if(t.startsWith("--bytes="))r=parseInt(t.slice(8),10);else if(t.startsWith("--lines="))i=parseInt(t.slice(8),10);else if(t==="-q"||t==="--quiet"||t==="--silent")u=!0;else if(t==="-v"||t==="--verbose")n=!0;else if(t.match(/^-\d+$/))i=parseInt(t.slice(1),10);else{if(t.startsWith("--"))return{ok:!1,error:w(s,t)};if(t.startsWith("-")&&t!=="-")return{ok:!1,error:w(s,t)};f.push(t)}}return r!==null&&(Number.isNaN(r)||r<0)?{ok:!1,error:{stdout:"",stderr:`${s}: invalid number of bytes
|
|
3
|
-
`,exitCode:1}}:Number.isNaN(i)||i<0?{ok:!1,error:{stdout:"",stderr:`${s}: invalid number of lines
|
|
4
|
-
`,exitCode:1}}:{ok:!0,options:{lines:i,bytes:r,quiet:u,verbose:n,files:f,fromLine:l}}}async function F(e,s,i,r){let{quiet:u,verbose:n,files:l}=s;if(l.length>e.limits.maxArrayElements)throw new h(`${i}: file operand limit exceeded (${e.limits.maxArrayElements})`,"array_elements");if(l.length===0)return{stdout:r(e.stdin),stderr:"",exitCode:0,stdoutEncoding:"binary"};let f=Math.min(e.limits.maxOutputSize,e.limits.maxStringLength),o=new y(f,i),t=new y(f,i),a=0,g=0,B=n||!u&&l.length>1,x=0;for(let m=0;m<l.length;m++){let c=l[m];try{let p=e.fs.resolvePath(e.cwd,c);if((await e.fs.stat(p)).size>e.limits.maxInputBytes-g)throw new h(`${i}: aggregate input size limit exceeded (${e.limits.maxInputBytes} bytes)`,"string_length");let d=await b(e.fs,p);if(d.length>e.limits.maxInputBytes-g)throw new h(`${i}: aggregate input size limit exceeded (${e.limits.maxInputBytes} bytes)`,"string_length");g+=d.length,e.executionScope?.consumeInput(d.length,i),B&&(x>0&&o.append(`
|
|
5
|
-
`),o.append(I(`==> ${c} <==
|
|
6
|
-
`))),o.append(r(d)),x++}catch(p){$(p),t.append(`${i}: ${c}: No such file or directory
|
|
7
|
-
`),a=1}}return{stdout:o.build(),stderr:t.build(),exitCode:a,stdoutEncoding:"binary"}}function H(e,s,i){if(i!==null)return e.slice(0,i);if(s===0)return"";let r=0,u=0,n=e.length;for(;r<n&&u<s;){let l=e.indexOf(`
|
|
8
|
-
`,r);if(l===-1)return e;u++,r=l+1}return r>0?e.slice(0,r):""}function O(e,s,i,r){if(i!==null)return i===0?"":e.slice(-i);let u=e.length;if(u===0)return"";if(r){let f=0,o=1;for(;f<u&&o<s;){let t=e.indexOf(`
|
|
9
|
-
`,f);if(t===-1)return"";o++,f=t+1}return e.slice(f)}if(s===0)return"";let n=u-1;e[n]===`
|
|
10
|
-
`&&n--;let l=0;for(;n>=0&&l<s;){if(e[n]===`
|
|
11
|
-
`&&(l++,l===s)){n++;break}n--}return n<0&&(n=0),e.slice(n)}export{A as a,F as b,H as c,O as d};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{l as p}from"./chunk-EFORKKSH.js";import{f as m,g as d}from"./chunk-GN6CQ3J4.js";function B(e,t,n){if(!Number.isSafeInteger(t)||t<0||t>e.limits.maxInputBytes)throw new p(`${n}: input size limit exceeded (${e.limits.maxInputBytes} bytes)`,"string_length");e.executionScope?.consumeInput(t,n)}async function y(e,t,n){let{cmdName:o,allowStdinMarker:u=!0,stopOnError:s=!1,batchSize:f=100}=n;if(t.length===0)return{files:[{filename:"",content:e.stdin}],stderr:"",exitCode:0};let a=[],c="",l=0;for(let i=0;i<t.length;i+=f){let h=t.slice(i,i+f),E=await Promise.all(h.map(async r=>{if(u&&r==="-")return{filename:"-",content:e.stdin,error:null};try{let w=e.fs.resolvePath(e.cwd,r),x=await d(e.fs,w);return{filename:r,content:x,error:null}}catch{return{filename:r,content:m,error:`${o}: ${r}: No such file or directory
|
|
3
|
-
`}}}));for(let r of E)if(r.error){if(c+=r.error,l=1,s)return{files:a,stderr:c,exitCode:l}}else a.push({filename:r.filename,content:r.content})}return{files:a,stderr:c,exitCode:l}}async function F(e,t,n){let o=await y(e,t,{...n,stopOnError:!0});return o.exitCode!==0?{ok:!1,error:{stdout:"",stderr:o.stderr,exitCode:o.exitCode}}:{ok:!0,content:o.files.map(s=>s.content).join("")}}export{B as a,y as b,F as c};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as Y,b as C,c as Z,d as ee}from"./chunk-H53EPEGD.js";import{d as M}from"./chunk-FIMO5HLX.js";import{a as K,b as X}from"./chunk-CHWP6GRK.js";import{b as F}from"./chunk-CHHWTPDH.js";import{a as H}from"./chunk-CBM6J4AL.js";import{l as j}from"./chunk-EFORKKSH.js";import{a as P,d as L}from"./chunk-GN6CQ3J4.js";import{a as B}from"./chunk-FOCWZZDE.js";import{a as W,b as G,c as T}from"./chunk-QAYAQNCG.js";function se(i){switch(i){case"\b":return"\\b";case"\f":return"\\f";case`
|
|
3
|
-
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return`\\u${i.charCodeAt(0).toString(16).padStart(4,"0")}`}}function ne(i){let t="",d=!1,m=!1;for(let s=0;s<i.length;s++){let a=i[s];if(m){t+=a,m=!1;continue}if(a==="\\"){t+=a,m=!0;continue}if(a==='"'){t+=a,d=!d;continue}if(d&&a.charCodeAt(0)<=31){t+=se(a);continue}t+=a}return t}function R(i,t,d){return JSON.parse(ne(i.slice(t,d)))}function J(i,t){let d=[],m=x=>{if(d.length>=t.maxElements)throw new j(`query result element limit exceeded (${t.maxElements})`,"array_elements");d.push(x)},s=0,a=i.length;for(;s<a;){for(;s<a&&/\s/.test(i[s]);)s++;if(s>=a)break;let x=s,p=i[s];if(p==="{"||p==="["){let u=[p==="{"?"}":"]"],h=!1,E=!1;for(s++;s<a&&u.length>0;){let g=i[s];if(E)E=!1;else if(g==="\\")E=!0;else if(g==='"')h=!h;else if(!h){if(g==="{"||g==="["){if(u.push(g==="{"?"}":"]"),u.length>t.maxDepth)throw new j(`query depth limit exceeded (${t.maxDepth})`,"recursion")}else if((g==="}"||g==="]")&&u.pop()!==g)throw new Error(`Mismatched JSON delimiter at position ${s}`)}s++}if(u.length!==0)throw new Error(`Unexpected end of JSON input at position ${s} (unclosed ${p})`);m(M(R(i,x,s),{maxDepth:t.maxDepth,maxElements:t.maxElements}))}else if(p==='"'){let u=!1;for(s++;s<a;){let h=i[s];if(u)u=!1;else if(h==="\\")u=!0;else if(h==='"'){s++;break}s++}m(M(R(i,x,s),t))}else if(p==="-"||p>="0"&&p<="9"){for(;s<a&&/[\d.eE+-]/.test(i[s]);)s++;m(M(R(i,x,s),t))}else if(i.slice(s,s+4)==="true")m(!0),s+=4;else if(i.slice(s,s+5)==="false")m(!1),s+=5;else if(i.slice(s,s+4)==="null")m(null),s+=4;else{let u=i.slice(s,s+10);throw new Error(`Invalid JSON at position ${x}: unexpected '${u.split(/\s/)[0]}'`)}}return d}function S(i){return{stdout:"",stderr:`jq: ${i}
|
|
4
|
-
`,exitCode:2}}var re={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE...]",options:["-R, --raw-input read each line as string instead of JSON","-r, --raw-output output strings without quotes","-c, --compact-output compact instead of pretty-printed output","-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"," --arg NAME VALUE bind $NAME to the string VALUE"," --argjson NAME JSON bind $NAME to the JSON-decoded value JSON"," --rawfile NAME FILE bind $NAME to the raw contents of FILE"," --slurpfile NAME FILE bind $NAME to the array of JSON values in FILE"," --args remaining arguments are string positional args ($ARGS.positional)"," --jsonargs remaining arguments are JSON positional args ($ARGS.positional)"," --help display this help and exit"]},we={name:"jq",async execute(i,t){K(t.requireDefenseContext,"jq","execution entry");let d=(r,e)=>X(t.requireDefenseContext,"jq",r,e);if(G(i))return W(re);let m=!1,s=!1,a=!1,x=!1,p=!1,u=!1,h=!1,E=!1,g=!1,V=".",_=!1,A="none",N=[],$=new Map,k=[],q=[],v={maxDepth:t.limits.maxQueryDepth,maxElements:t.limits.maxQueryElements};for(let r=0;r<i.length;r++){let e=i[r];if(e==="-R"||e==="--raw-input")s=!0;else if(e==="-r"||e==="--raw-output")m=!0;else if(e==="-c"||e==="--compact-output")a=!0;else if(e==="-e"||e==="--exit-status")x=!0;else if(e==="-s"||e==="--slurp")p=!0;else if(e==="-n"||e==="--null-input")u=!0;else if(e==="-j"||e==="--join-output")h=!0;else if(!(e==="-a"||e==="--ascii")){if(e==="-S"||e==="--sort-keys")E=!0;else if(!(e==="-C"||e==="--color")){if(!(e==="-M"||e==="--monochrome"))if(e==="--tab")g=!0;else if(e==="--arg"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--arg takes two parameters (e.g. --arg varname value)");$.set(n,l),r+=2}else if(e==="--argjson"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--argjson takes two parameters (e.g. --argjson varname text)");let y;try{y=J(l.trim(),v)}catch{return S("invalid JSON text passed to --argjson")}if(y.length!==1)return S("invalid JSON text passed to --argjson");$.set(n,y[0]),r+=2}else if(e==="--rawfile"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--rawfile takes two parameters (e.g. --rawfile varname filename)");q.push({name:n,file:l,mode:"raw"}),r+=2}else if(e==="--slurpfile"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--slurpfile takes two parameters (e.g. --slurpfile varname filename)");q.push({name:n,file:l,mode:"slurp"}),r+=2}else if(e==="--args")A="args";else if(e==="--jsonargs")A="jsonargs";else if(e==="-")N.push("-");else{if(e.startsWith("--"))return T("jq",e);if(e.startsWith("-")){for(let n of e.slice(1))if(n==="R")s=!0;else if(n==="r")m=!0;else if(n==="c")a=!0;else if(n==="e")x=!0;else if(n==="s")p=!0;else if(n==="n")u=!0;else if(n==="j")h=!0;else if(n!=="a"){if(n==="S")E=!0;else if(n!=="C"){if(n!=="M")return T("jq",`-${n}`)}}}else if(!_)V=e,_=!0;else if(A==="args")k.push(e);else if(A==="jsonargs"){let n;try{n=J(e.trim(),v)}catch{return S("invalid JSON text passed to --jsonargs")}if(n.length!==1)return S("invalid JSON text passed to --jsonargs");k.push(n[0])}else N.push(e)}}}}if(q.length>0){let r=await d("arg file read",()=>F(t,q.map(e=>e.file),{cmdName:"jq",stopOnError:!0}));if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:2};for(let e=0;e<q.length;e++){let{name:n,mode:l}=q[e],y=L(r.files[e].content);if(l==="raw")$.set(n,y);else{let b=y.trim();try{$.set(n,b?J(b,v):[])}catch{return S("invalid JSON text passed to --slurpfile")}}}}let D=[];if(!u)if(N.length===0||N.length===1&&N[0]==="-")D.push({source:"stdin",content:L(t.stdin)});else{let r=await d("file read",()=>F(t,N,{cmdName:"jq",stopOnError:!0}));if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:2};D=r.files.map(e=>({source:e.filename||"stdin",content:L(e.content)}))}try{let r=Z(V,{maxDepth:t.limits.maxQueryDepth,maxTokens:t.limits.maxQueryTokens,maxSourceLength:t.limits.maxStringLength}),e=[],n={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength,maxOutputSize:t.limits.maxOutputSize,maxArrayElements:t.limits.maxQueryElements,maxDepth:t.limits.maxQueryDepth}:void 0,env:t.env,namedArgs:$,positionalArgs:k,coverage:t.coverage,requireDefenseContext:t.requireDefenseContext,budget:{operations:0,callDepth:0}},l=(o,f)=>{if(f.length>t.limits.maxQueryElements-o.length)throw new j(`query result element limit exceeded (${t.limits.maxQueryElements})`,"array_elements");for(let c of f)o.push(c)};if(u)e=C(null,r,n);else if(s&&p){let o=D.map(({content:f})=>f).join("");e=C(o,r,n)}else if(s){let o="";for(let{content:f}of D){let c=o+f,w=0,O=c.indexOf(`
|
|
5
|
-
`,w);for(;O!==-1;)l(e,C(c.slice(w,O),r,n)),w=O+1,O=c.indexOf(`
|
|
6
|
-
`,w);o=c.slice(w)}o!==""&&l(e,C(o,r,n))}else if(p){let o=[];for(let{content:f}of D){let c=f.trim();c&&l(o,J(c,v))}e=C(o,r,n)}else for(let{content:o}of D){let f=o.trim();if(!f)continue;let c=J(f,v);for(let w of c)l(e,C(w,r,n))}let y=h?"":`
|
|
7
|
-
`,b=Math.min(t.limits.maxStringLength,t.limits.maxOutputSize),I=[],z=0;for(let o of e){let f=I.length>0?y.length:0,c=h?0:1,w=b-z-f-c;if(w<0)throw new j(`output size limit exceeded (${b} bytes)`,"string_length");if(Y(o,t.limits.maxQueryDepth+1)>t.limits.maxQueryDepth)throw new j(`query depth limit exceeded (${t.limits.maxQueryDepth})`,"recursion");let O=ee(o,w,{compact:a,raw:m,sortKeys:E,useTab:g,limitKind:"string_length"}),U=P(O);if(z+f+U+c>b)throw new j(`output size limit exceeded (${b} bytes)`,"string_length");z+=f+U,I.push(O)}let Q=I.join(y),te=x&&(e.length===0||e.every(o=>o==null||o===!1))?1:0;return{stdout:Q?h?Q:`${Q}
|
|
8
|
-
`:"",stderr:"",exitCode:te}}catch(r){if(r instanceof H)throw r;if(r instanceof j)return{stdout:"",stderr:`jq: ${B(r.message)}
|
|
9
|
-
`,exitCode:j.EXIT_CODE};let e=B(r.message);return e.includes("Unknown function")?{stdout:"",stderr:`jq: error: ${e}
|
|
10
|
-
`,exitCode:3}:{stdout:"",stderr:`jq: parse error: ${e}
|
|
11
|
-
`,exitCode:5}}}},ye={name:"jq",flags:[{flag:"-R",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"--tab",type:"boolean"}],stdinType:"json",needsArgs:!0};export{we as a,ye as b};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as Y}from"./chunk-7GA3QWJJ.js";import{l as G,m as V}from"./chunk-EFORKKSH.js";function X(t,n){let e=t.ignoreCase?n.toLowerCase():n,i=t.needles;for(let s=0;s<i.length;s++)if(e.indexOf(i[s])!==-1)return!0;return!1}function ee(t,n){return t.replace(/\$(&|\d+|<([^>]+)>)/g,(e,i,s)=>{if(i==="&")return n[0];if(s!==void 0)return n.groups?.[s]??"";let o=parseInt(i,10);return n[o]??""})}function ne(t,n,e={}){let{invertMatch:i=!1,showLineNumbers:s=!1,countOnly:o=!1,countMatches:c=!1,filename:h="",onlyMatching:L=!1,beforeContext:F=0,afterContext:O=0,maxCount:A=0,contextSeparator:q="--",showColumn:Z=!1,vimgrep:H=!1,showByteOffset:W=!1,replace:E=null,passthru:K=!1,multiline:Q=!1,kResetGroup:S,preFilter:R,maxWork:N,maxMatches:g,signal:U}=e;if(Q)return ie(t,n,{invertMatch:i,showLineNumbers:s,countOnly:o,countMatches:c,filename:h,onlyMatching:L,beforeContext:F,afterContext:O,maxCount:A,contextSeparator:q,showColumn:Z,showByteOffset:W,replace:E,kResetGroup:S,preFilter:R,maxWork:N,maxMatches:g,signal:U});let _=0,C=(l=1)=>{if(U?.aborted)throw new V;if(_+=l,N!==void 0&&_>N)throw new G(`search: matching work limit exceeded (${N})`,"iterations")},b=(l,a)=>{if(g!==void 0&&l.length>=g)throw new G(`search: result limit exceeded (${g})`,"array_elements");l.push(a)},j=1;for(let l=0;l<t.length;l++)if((l&1023)===0&&C(),t.charCodeAt(l)===10&&(j++,g!==void 0&&j>g))throw new G(`search: line limit exceeded (${g})`,"array_elements");let P=t.split(`
|
|
3
|
-
`),y=P.length,k=y>0&&P[y-1]===""?y-1:y;if(o||c){let l=0,a=(c||L)&&!i;for(let r=0;r<k;r++){C();let u=P[r];if(!(R&&!i&&!X(R,u)))if(n.lastIndex=0,a)for(let x=n.exec(u);x!==null;x=n.exec(u))C(),l++,x[0].length===0&&n.lastIndex++;else n.test(u)!==i&&l++}return{output:`${h?`${h}:${l}`:String(l)}
|
|
4
|
-
`,matched:l>0,matchCount:l}}if(F===0&&O===0&&!K){let l=[],a=!1,d=0,r=0;for(let u=0;u<k&&(C(),!(A>0&&d>=A));u++){let x=P[u],I=null;if(R&&!X(R,x)||(n.lastIndex=0,I=n.exec(x)),I!==null!==i)if(a=!0,d++,L)for(let w=I;w!==null;w=n.exec(x)){C();let z=S!==void 0?w[S]??"":w[0],B=E!==null?ee(E,w):z,p=h?`${h}:`:"";W&&(p+=`${r+w.index}:`),s&&(p+=`${u+1}:`),Z&&(p+=`${w.index+1}:`),b(l,p+B),w[0].length===0&&n.lastIndex++}else if(H)for(let w=I;w!==null;w=n.exec(x)){C();let z=h?`${h}:`:"";W&&(z+=`${r+w.index}:`),s&&(z+=`${u+1}:`),Z&&(z+=`${w.index+1}:`),b(l,z+x),w[0].length===0&&n.lastIndex++}else{let w=I?I.index+1:1,z=x;E!==null&&(n.lastIndex=0,z=n.replace(x,(...p)=>{if(p[0].length===0)return"";let D=p,J=p[p.length-1];return typeof J=="object"&&J!==null?(D.groups=J,D.input=p[p.length-2],D.index=p[p.length-3]):(D.input=p[p.length-1],D.index=p[p.length-2]),ee(E,D)}));let B=h?`${h}:`:"";W&&(B+=`${r+(I?I.index:0)}:`),s&&(B+=`${u+1}:`),Z&&(B+=`${w}:`),b(l,B+z)}r+=x.length+1}return{output:l.length>0?`${l.join(`
|
|
5
|
-
`)}
|
|
6
|
-
`:"",matched:a,matchCount:d}}if(K){let l=[],a=!1,d=0;for(let r=0;r<k;r++){C();let u=P[r],x;R&&!X(R,u)?x=!1:(n.lastIndex=0,x=n.test(u));let I=x!==i;I&&(a=!0,d++);let T=I?":":"-",w=h?`${h}${T}`:"";s&&(w+=`${r+1}${T}`),b(l,w+u)}return{output:l.length>0?`${l.join(`
|
|
7
|
-
`)}
|
|
8
|
-
`:"",matched:a,matchCount:d}}let M=[],v=0,f=new Set,m=-1,$=[];for(let l=0;l<k&&(C(),!(A>0&&v>=A));l++){let a=P[l],d;if(R&&!X(R,a)?d=!1:(n.lastIndex=0,d=n.test(a)),d!==i){if(g!==void 0&&$.length>=g)throw new G(`search: match limit exceeded (${g})`,"array_elements");$.push(l),v++}}for(let l of $){C();let a=Math.max(0,l-F);m>=0&&a>m+1&&b(M,q);for(let r=a;r<l;r++)if(C(),!f.has(r)){f.add(r),m=r;let u=P[r];s&&(u=`${r+1}-${u}`),h&&(u=`${h}-${u}`),b(M,u)}if(!f.has(l)){f.add(l),m=l;let r=P[l];if(L){n.lastIndex=0;for(let u=n.exec(r);u!==null;u=n.exec(r)){C();let x=S!==void 0?u[S]??"":u[0],I=E!==null?E:x,T=h?`${h}:`:"";s&&(T+=`${l+1}:`),Z&&(T+=`${u.index+1}:`),b(M,T+I),u[0].length===0&&n.lastIndex++}}else{let u=r;s&&(u=`${l+1}:${u}`),h&&(u=`${h}:${u}`),b(M,u)}}let d=Math.min(k-1,l+O);for(let r=l+1;r<=d;r++)if(C(),!f.has(r)){f.add(r),m=r;let u=P[r];s&&(u=`${r+1}-${u}`),h&&(u=`${h}-${u}`),b(M,u)}}return{output:M.length>0?`${M.join(`
|
|
9
|
-
`)}
|
|
10
|
-
`:"",matched:v>0,matchCount:v}}function ie(t,n,e){let{invertMatch:i,showLineNumbers:s,countOnly:o,countMatches:c,filename:h,onlyMatching:L,beforeContext:F,afterContext:O,maxCount:A,contextSeparator:q,showColumn:Z,showByteOffset:H,replace:W,kResetGroup:E,preFilter:K,maxWork:Q,maxMatches:S,signal:R}=e,N=0,g=(f=1)=>{if(R?.aborted)throw new V;if(N+=f,Q!==void 0&&N>Q)throw new G(`search: matching work limit exceeded (${Q})`,"iterations")};if(K&&!i&&!X(K,t))return o||c?{output:`${h?`${h}:0`:"0"}
|
|
11
|
-
`,matched:!1,matchCount:0}:{output:"",matched:!1,matchCount:0};let U=[0];for(let f=0;f<t.length;f++)if((f&1023)===0&&g(),t[f]===`
|
|
12
|
-
`){if(S!==void 0&&U.length>=S)throw new G(`search: line index limit exceeded (${S})`,"array_elements");U.push(f+1)}let _=t.split(`
|
|
13
|
-
`),C=_.length,b=C>0&&_[C-1]===""?C-1:C,j=f=>{let m=0,$=U.length;for(;m<$;){let l=m+Math.floor(($-m)/2);U[l]<=f?m=l+1:$=l}return Math.max(0,m-1)},P=f=>{let m=j(f);return f-U[m]+1};if(o||c){let f=0,m=0,$=-1;n.lastIndex=0;for(let d=n.exec(t);d!==null&&(g(),!(A>0&&f>=A));d=n.exec(t)){if(f++,!c){let r=j(d.index),u=j(d.index+Math.max(0,d[0].length-1)),x=Math.max(r,$+1);x<=u&&(m+=u-x+1,$=u)}d[0].length===0&&n.lastIndex++}let l=c?i?0:f:i?b-m:m;return{output:`${h?`${h}:${l}`:String(l)}
|
|
14
|
-
`,matched:l>0,matchCount:l}}let y=[];n.lastIndex=0;for(let f=n.exec(t);f!==null&&(g(),!(A>0&&y.length>=A));f=n.exec(t)){if(S!==void 0&&y.length>=S)throw new G(`search: match limit exceeded (${S})`,"array_elements");let m=j(f.index),$=j(f.index+Math.max(0,f[0].length-1)),l=E!==void 0?f[E]??"":f[0];y.push({startLine:m,endLine:$,byteOffset:f.index,column:P(f.index),matchText:l}),f[0].length===0&&n.lastIndex++}if(i){let f=new Set;for(let $ of y)for(let l=$.startLine;l<=$.endLine;l++)g(),f.add(l);let m=[];for(let $=0;$<b;$++)if(g(),!f.has($)){let l=_[$];s&&(l=`${$+1}:${l}`),h&&(l=`${h}:${l}`),m.push(l)}return{output:m.length>0?`${m.join(`
|
|
15
|
-
`)}
|
|
16
|
-
`:"",matched:m.length>0,matchCount:m.length}}if(y.length===0)return{output:"",matched:!1,matchCount:0};let k=new Set,M=-1,v=[];for(let f of y){g();let m=Math.max(0,f.startLine-F),$=Math.min(b-1,f.endLine+O);M>=0&&m>M+1&&v.push(q);for(let l=m;l<f.startLine;l++)if(g(),!k.has(l)){k.add(l),M=l;let a=_[l];s&&(a=`${l+1}-${a}`),h&&(a=`${h}-${a}`),v.push(a)}if(L){let l=W!==null?W:f.matchText,a=h?`${h}:`:"";H&&(a+=`${f.byteOffset}:`),s&&(a+=`${f.startLine+1}:`),Z&&(a+=`${f.column}:`),v.push(a+l);for(let d=f.startLine;d<=f.endLine;d++)g(),k.add(d),M=d}else for(let l=f.startLine;l<=f.endLine&&l<b;l++)if(g(),!k.has(l)){k.add(l),M=l;let a=_[l];W!==null&&l===f.startLine&&(n.lastIndex=0,a=n.replace(a,W));let d=h?`${h}:`:"";H&&l===f.startLine&&(d+=`${f.byteOffset}:`),s&&(d+=`${l+1}:`),Z&&l===f.startLine&&(d+=`${f.column}:`),v.push(d+a)}for(let l=f.endLine+1;l<=$;l++)if(g(),!k.has(l)){k.add(l),M=l;let a=_[l];s&&(a=`${l+1}-${a}`),h&&(a=`${h}-${a}`),v.push(a)}}return{output:v.length>0?`${v.join(`
|
|
17
|
-
`)}
|
|
18
|
-
`:"",matched:!0,matchCount:y.length}}var le=new Map([["alpha","a-zA-Z"],["digit","0-9"],["alnum","a-zA-Z0-9"],["lower","a-z"],["upper","A-Z"],["xdigit","0-9A-Fa-f"],["space"," \\t\\n\\r\\f\\v"],["blank"," \\t"],["punct","!-/:-@\\[-`{-~"],["graph","!-~"],["print"," -~"],["cntrl","\\x00-\\x1F\\x7F"],["ascii","\\x00-\\x7F"],["word","a-zA-Z0-9_"]]);function te(t){let n="",e=0;for(;e<t.length;){if(t.slice(e,e+7)==="[[:<:]]"){n+="\\b",e+=7;continue}if(t.slice(e,e+7)==="[[:>:]]"){n+="\\b",e+=7;continue}if(t[e]==="["){let i="[";for(e++,e<t.length&&(t[e]==="^"||t[e]==="!")&&(i+="^",e++),e<t.length&&t[e]==="]"&&(i+="\\]",e++);e<t.length&&t[e]!=="]";){if(t[e]==="["&&e+1<t.length&&t[e+1]===":"){let s=t.indexOf(":]",e+2);if(s!==-1){let o=t.slice(e+2,s),c=le.get(o);if(c){i+=c,e=s+2;continue}}}if(t[e]==="\\"&&e+1<t.length){i+=t[e]+t[e+1],e+=2;continue}i+=t[e],e++}e<t.length&&t[e]==="]"&&(i+="]",e++),n+=i;continue}if(t[e]==="\\"&&e+1<t.length){n+=t[e]+t[e+1],e+=2;continue}n+=t[e],e++}return n}function se(t,n){let e,i;switch(n.mode){case"fixed":e=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");break;case"extended":case"perl":{if(e=te(t),e=e.replace(/\(\?P<([^>]+)>/g,"(?<$1>"),n.mode==="perl"){e=ue(e),e=he(e),e=ae(e);let h=$e(e);e=h.pattern,i=h.kResetGroup}break}default:e=te(t),e=Ce(e);break}n.wholeWord&&(e=`\\b(?:${e})\\b`),n.lineRegexp&&(e=`^(?:${e})$`);let s=/\\u\{[0-9A-Fa-f]+\}/.test(e),o="g"+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.multilineDotall?"s":"")+(s?"u":""),c=oe(e,n.ignoreCase??!1);return{regex:Y(e,o),kResetGroup:i,preFilter:c??void 0}}function oe(t,n){let e=t;if(e.startsWith("\\b(?:")&&e.endsWith(")\\b")?e=e.slice(5,e.length-3):e.startsWith("\\b")&&e.endsWith("\\b")&&e.length>=4&&(e=e.slice(2,e.length-2)),e.length===0)return null;let i=fe(e);if(i===null)return null;let s=[];for(let o of i){let c=ce(o);if(c===null||c.length===0)return null;s.push(c)}return s.length===0?null:{needles:n?s.map(o=>o.toLowerCase()):s,ignoreCase:n}}function fe(t){let n=[],e=0,i=!1,s=0;for(let o=0;o<t.length;o++){let c=t[o];if(c==="\\"){o++;continue}if(i){c==="]"&&(i=!1);continue}if(c==="[")i=!0;else if(c==="(")e++;else if(c===")"){if(e--,e<0)return null}else c==="|"&&e===0&&(n.push(t.slice(s,o)),s=o+1)}return e!==0||i?null:(n.push(t.slice(s)),n)}function ce(t){let n=t;if(n.startsWith("^")&&(n=n.slice(1)),n.endsWith("$")){let i=0;for(let s=n.length-2;s>=0&&n[s]==="\\";s--)i++;i%2===0&&(n=n.slice(0,-1))}if(n.length===0)return null;let e="";for(let i=0;i<n.length;i++){let s=n[i];if(s==="\\"){let o=n[i+1];if(o===void 0||/[dDwWsSbBAZzGQE0-9ckpPNXRxuU]/.test(o))return null;o==="n"?e+=`
|
|
19
|
-
`:o==="t"?e+=" ":o==="r"?e+="\r":o==="f"?e+="\f":o==="v"?e+="\v":e+=o,i++;continue}if(/[.*+?^${}()|[\]]/.test(s))return null;e+=s}return e}function ue(t){let n="",e=0;for(;e<t.length;)if(t[e]==="\\"&&e+1<t.length&&t[e+1]==="Q"){e+=2;let i="";for(;e<t.length;){if(t[e]==="\\"&&e+1<t.length&&t[e+1]==="E"){e+=2;break}i+=t[e],e++}n+=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}else n+=t[e],e++;return n}function he(t){return t.replace(/\\x\{([0-9A-Fa-f]+)\}/g,"\\u{$1}")}function ae(t){let n="",e=0;for(;e<t.length;){if(t[e]==="("&&e+1<t.length&&t[e+1]==="?"){let i=t.slice(e).match(/^\(\?([imsx]*)(-[imsx]*)?(:|$|\))/);if(i){let s=i[1]||"",o=i[2]||"",c=i[3];if(c===":"){let h=e+i[0].length-1,L=re(t,e);if(L!==-1){let F=t.slice(h+1,L),O=de(F,s,o);n+=`(?:${O})`,e=L+1;continue}}else if(c===")"||c===""){e+=i[0].length;continue}}}n+=t[e],e++}return n}function re(t,n){let e=0,i=n;for(;i<t.length;){if(t[i]==="\\"){i+=2;continue}if(t[i]==="["){for(i++;i<t.length&&t[i]!=="]";)t[i]==="\\"&&i++,i++;i++;continue}if(t[i]==="(")e++;else if(t[i]===")"&&(e--,e===0))return i;i++}return-1}function de(t,n,e){let i=t;return n.includes("i")&&(i=me(i)),i}function me(t){let n="",e=0;for(;e<t.length;){let i=t[e];if(i==="\\"){e+1<t.length?(n+=i+t[e+1],e+=2):(n+=i,e++);continue}if(i==="["){n+=i,e++,e<t.length&&t[e]==="^"&&(n+=t[e],e++);let s=[];for(;e<t.length&&t[e]!=="]";)if(t[e]==="\\")s.push(t[e]),e++,e<t.length&&(s.push(t[e]),e++);else if(t[e]==="-"&&s.length>0&&e+1<t.length&&t[e+1]!=="]"){let o=s[s.length-1],c=t[e+1];s.push("-"),s.push(c),/[a-z]/.test(o)&&/[a-z]/.test(c)?(s.push(o.toUpperCase()),s.push("-"),s.push(c.toUpperCase())):/[A-Z]/.test(o)&&/[A-Z]/.test(c)&&(s.push(o.toLowerCase()),s.push("-"),s.push(c.toLowerCase())),e+=2}else{let o=t[e];if(s.push(o),/[a-zA-Z]/.test(o)){let c=o===o.toLowerCase()?o.toUpperCase():o.toLowerCase();s.includes(c)||s.push(c)}e++}n+=s.join(""),e<t.length&&(n+=t[e],e++);continue}if(/[a-zA-Z]/.test(i)){let s=i.toLowerCase(),o=i.toUpperCase();n+=`[${o}${s}]`}else n+=i;e++}return n}function $e(t){let n=ge(t);if(n===-1)return{pattern:t};let e=t.slice(0,n),i=t.slice(n+2),s=xe(e);return{pattern:`(?:${e})(${i})`,kResetGroup:s+1}}function ge(t){let n=0;for(;n<t.length-1;)if(t[n]==="\\"){if(t[n+1]==="K"){let e=0,i=n-1;for(;i>=0&&t[i]==="\\";)e++,i--;if(e%2===0)return n}n+=2}else n++;return-1}function xe(t){let n=0,e=0;for(;e<t.length;){if(t[e]==="\\"){e+=2;continue}if(t[e]==="["){for(e++;e<t.length&&t[e]!=="]";)t[e]==="\\"&&e++,e++;e++;continue}if(t[e]==="(")if(e+1<t.length&&t[e+1]==="?"){if(e+2<t.length){let i=t[e+2];if(i===":"||i==="="||i==="!"){e++;continue}if(i==="<"&&e+3<t.length){let s=t[e+3];if(s==="="||s==="!"){e++;continue}n++,e++;continue}}}else n++;e++}return n}function we(t){let n=t.replace(/\$\{0\}|\$0(?![0-9])/g,"$$&");return n=n.replace(/\$\{([^0-9}][^}]*)\}/g,"$$<$1>"),n=n.replace(/\$([a-zA-Z_][a-zA-Z0-9_]*)(?![>0-9])/g,"$$<$1>"),n}function Ce(t){let n="",e=0,i=!0,s=0;for(;e<t.length;){let o=t[e];if(o==="["){for(n+=o,e++,e<t.length&&(t[e]==="^"||t[e]==="!")&&(n+=t[e],e++),e<t.length&&t[e]==="]"&&(n+=t[e],e++);e<t.length&&t[e]!=="]";)t[e]==="\\"&&e+1<t.length?(n+=t[e]+t[e+1],e+=2):(n+=t[e],e++);e<t.length&&t[e]==="]"&&(n+=t[e],e++),i=!1;continue}if(o==="\\"&&e+1<t.length){let c=t[e+1];if(c==="|"){n+="|",e+=2,i=!0;continue}if(c==="("){n+="(",e+=2,s++,i=!0;continue}if(c===")"){n+=")",e+=2,s=Math.max(0,s-1),i=!1;continue}if(c==="{"){let L=t.slice(e).match(/^\\{(\d+)(,(\d*)?)?\\}/);if(L){let F=L[1],O=L[2]!==void 0,A=L[3]||"";O?n+=`{${F},${A}}`:n+=`{${F}}`,e+=L[0].length,i=!1;continue}n+="\\{",e+=2,i=!1;continue}if(c==="}"){n+="\\}",e+=2,i=!1;continue}n+=o+c,e+=2,i=!1;continue}if(o==="*"&&i){n+="\\*",e++;continue}if(o==="^"){if(i){n+="^",e++;continue}n+="\\^",e++;continue}if(o==="$"){let c=e===t.length-1,h=e+2<t.length&&t[e+1]==="\\"&&t[e+2]===")";c||h?n+="$":n+="\\$",e++,i=!1;continue}o==="+"||o==="?"||o==="|"||o==="("||o===")"||o==="{"||o==="}"?n+=`\\${o}`:n+=o,e++,i=!1}return n}export{ne as a,se as b,we as c};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{l as o}from"./chunk-EFORKKSH.js";import{a}from"./chunk-GN6CQ3J4.js";function r(s,t){if(!Number.isSafeInteger(s)||s<0)throw new o(`${t}: invalid bounded allocation count`,"array_elements")}function c(s){return new o(`${s}: invalid bounded allocation count`,"array_elements")}function f(s,t,e){r(s,e),r(t,e);let i=s+t;if(!Number.isSafeInteger(i))throw c(e);return i}function p(s,t,e){if(r(s,e),r(t,e),s!==0&&t>Math.floor(Number.MAX_SAFE_INTEGER/s))throw c(e);return s*t}function m(s,t,e,i){let n=new u(e,i);return n.repeat(s,t),n.build()}function b(s,t,e,i){let n=new u(e,i);for(let h=0;h<s.length;h++)h>0&&n.append(t),n.append(s[h]);return n.build()}var u=class{maxBytes;label;createLimitError;reservedBytes;chunks=[];usedBytes=0;constructor(t,e,i=void 0,n=0){this.maxBytes=t,this.label=e,this.createLimitError=i,this.reservedBytes=n,r(t,e),r(n,e),n>t&&this.fail()}fail(){throw this.createLimitError?.()??new o(`${this.label}: output size limit exceeded (${this.maxBytes} bytes)`,"output_size")}get byteLength(){return this.usedBytes}get remainingBytes(){return this.maxBytes-this.reservedBytes-this.usedBytes}reserve(t){r(t,this.label),t>this.remainingBytes&&this.fail()}append(t){let e=a(t);return this.reserve(e),t&&this.chunks.push(t),this.usedBytes+=e,this}repeat(t,e){r(e,this.label);let i=a(t);return i!==0&&e>Math.floor(this.remainingBytes/i)&&this.fail(),this.append(t.repeat(e))}reset(){this.chunks.length=0,this.usedBytes=0}build(){return this.chunks.join("")}};export{f as a,p as b,m as c,b as d,u as e};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{c as E}from"./chunk-CHHWTPDH.js";import{e as W}from"./chunk-DIWMSSQY.js";import{l as h}from"./chunk-EFORKKSH.js";import{d as N}from"./chunk-GN6CQ3J4.js";import{a as v,b as L,c as b}from"./chunk-QAYAQNCG.js";var k={name:"cut",summary:"remove sections from each line of files",usage:"cut [OPTION]... [FILE]...",options:["-c LIST select only these characters","-d DELIM use DELIM instead of TAB for field delimiter","-f LIST select only these fields","-s, --only-delimited do not print lines without delimiters"," --help display this help and exit"]};function M(r,o){let l=[],a=r.split(",");if(a.length>o)throw new h(`cut: range count limit exceeded (${o})`,"array_elements");for(let s of a)if(s.includes("-")){let[i,u]=s.split("-"),t=i?Number(i):1,f=u?Number(u):null;if(!Number.isSafeInteger(t)||t<1||f!==null&&(!Number.isSafeInteger(f)||f<t))throw new h("cut: invalid range","array_elements");l.push({start:t,end:f})}else{let i=Number(s);if(!Number.isSafeInteger(i)||i<1)throw new h("cut: invalid range","array_elements");l.push({start:i,end:i})}return l}function B(r,o){let l=[],a=new Set;for(let s of o){let i=s.start-1,u=s.end===null?r.length:s.end;for(let t=i;t<u&&t<r.length;t++)t>=0&&!a.has(t)&&(a.add(t),l.push(r[t]))}return l}var R={name:"cut",async execute(r,o){if(L(r))return v(k);let l=" ",a=null,s=null,i=!1,u=[];for(let n=0;n<r.length;n++){let e=r[n];if(e==="-d")l=r[++n]||" ";else if(e.startsWith("-d"))l=e.slice(2);else if(e==="-f")a=r[++n];else if(e.startsWith("-f"))a=e.slice(2);else if(e==="-c")s=r[++n];else if(e.startsWith("-c"))s=e.slice(2);else if(e==="-s"||e==="--only-delimited")i=!0;else{if(e.startsWith("--"))return b("cut",e);if(e.startsWith("-")){let d=!1;for(let c of e.slice(1))if(c==="s")i=!0;else if(!"dfc".includes(c)){d=!0;break}if(d)return b("cut",e)}else u.push(e)}}if(!a&&!s)return{stdout:"",stderr:`cut: you must specify a list of bytes, characters, or fields
|
|
3
|
-
`,exitCode:1};let t=await E(o,u,{cmdName:"cut"});if(!t.ok)return t.error;let m=(s?N(t.content):t.content).split(`
|
|
4
|
-
`);m.length>0&&m[m.length-1]===""&&m.pop();let x=M(a||s||"1",o.limits.maxArrayElements),g=new W(Math.min(o.limits.maxOutputSize,o.limits.maxStringLength),"cut"),S=0,I=n=>{if(!Number.isSafeInteger(n)||n<0||n>o.limits.maxLoopIterations-S)throw new h(`cut: range expansion limit exceeded (${o.limits.maxLoopIterations})`,"iterations");S+=n,o.executionScope?.consumeWork(n,"cut range expansion")};for(let n of m)if(s){let e=Array.from(n),d=[];for(let c of x){let y=c.start-1,w=c.end===null?e.length:c.end;I(Math.max(0,Math.min(w,e.length)-y));for(let p=y;p<w&&p<e.length;p++)p>=0&&d.push(e[p])}g.append(`${d.join("")}
|
|
5
|
-
`)}else{if(i&&!n.includes(l))continue;let e=n.split(l);for(let c of x){let y=c.start-1,w=c.end===null?e.length:c.end;I(Math.max(0,Math.min(w,e.length)-y))}let d=B(e,x);g.append(`${d.join(l)}
|
|
6
|
-
`)}return s?{stdout:g.build(),stderr:"",exitCode:0}:{stdout:g.build(),stderr:"",exitCode:0,stdoutKind:"bytes",stdoutEncoding:"binary"}}},$={name:"cut",flags:[{flag:"-d",type:"value",valueHint:"delimiter"},{flag:"-f",type:"value",valueHint:"string"},{flag:"-c",type:"value",valueHint:"string"},{flag:"-s",type:"boolean"}],stdinType:"text",needsFiles:!0};export{R as a,$ as b};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as c}from"./chunk-GN6CQ3J4.js";var n=class extends Error{stdout;stderr;internalOutputAccounting={stdout:0,stderr:0};constructor(t,e="",s=""){super(t),this.stdout=e,this.stderr=s}prependOutput(t,e){this.stdout=t+this.stdout,this.stderr=e+this.stderr,this.internalOutputAccounting.stdout+=c(t),this.internalOutputAccounting.stderr+=c(e)}},u=class extends n{levels;name="BreakError";constructor(t=1,e="",s=""){super("break",e,s),this.levels=t}},i=class extends n{levels;name="ContinueError";constructor(t=1,e="",s=""){super("continue",e,s),this.levels=t}},a=class extends n{exitCode;name="ReturnError";constructor(t=0,e="",s=""){super("return",e,s),this.exitCode=t}},x=class extends n{exitCode;name="ErrexitError";constructor(t,e="",s=""){super(`errexit: command exited with status ${t}`,e,s),this.exitCode=t}},p=class extends n{varName;name="NounsetError";constructor(t,e=""){super(`${t}: unbound variable`,e,`bash: ${t}: unbound variable
|
|
3
|
-
`),this.varName=t}},d=class extends n{exitCode;name="ExitError";constructor(t,e="",s=""){super("exit",e,s),this.exitCode=t}},l=class extends n{name="ArithmeticError";fatal;constructor(t,e="",s="",o=!1){super(t,e,s),this.stderr=s||`bash: ${t}
|
|
4
|
-
`,this.fatal=o}},h=class extends n{name="BadSubstitutionError";constructor(t,e="",s=""){super(t,e,s),this.stderr=s||`bash: ${t}: bad substitution
|
|
5
|
-
`}},m=class extends n{name="GlobError";constructor(t,e="",s=""){super(`no match: ${t}`,e,s),this.stderr=s||`bash: no match: ${t}
|
|
6
|
-
`}},b=class extends n{name="BraceExpansionError";constructor(t,e="",s=""){super(t,e,s),this.stderr=s||`bash: ${t}
|
|
7
|
-
`}},f=class extends n{limitType;name="ExecutionLimitError";static EXIT_CODE=126;constructor(t,e,s="",o=""){super(t,s,o),this.limitType=e,this.stderr=o||`bash: ${t}
|
|
8
|
-
`}},$=class extends n{name="ExecutionAbortedError";constructor(t="",e=""){super("execution aborted",t,e)}},C=class extends n{name="SubshellExitError";constructor(t="",e=""){super("subshell exit",t,e)}};function E(r){return r instanceof u||r instanceof i||r instanceof a}var v=class extends n{exitCode;name="PosixFatalError";constructor(t,e="",s=""){super("posix fatal error",e,s),this.exitCode=t}};export{n as a,u as b,i as c,a as d,x as e,p as f,d as g,l as h,h as i,m as j,b as k,f as l,$ as m,C as n,E as o,v as p};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as E}from"./chunk-OB46N7Q7.js";import{a as ne,b as se}from"./chunk-DIRWTBKE.js";import{a as I}from"./chunk-U7UNEMLJ.js";import{l as A}from"./chunk-EFORKKSH.js";import{d as D}from"./chunk-GN6CQ3J4.js";import{a as ce,c as te}from"./chunk-QAYAQNCG.js";var ye="(standard input)";function he(t){let e=t.limits.maxLoopIterations,i=t.limits.maxArrayElements;return Math.max(e,Math.min(i,e*10))}function F(t){if(++t.operations>t.maxOperations)throw new A(`grep: glob operation limit exceeded (${t.maxOperations})`,"glob_operations")}function U(t){if(t.results>=t.maxResults)throw new A(`grep: array element limit exceeded (${t.maxResults})`,"array_elements");t.results++}var xe="[^\\s\\S]";function we(t){return t.split(`
|
|
3
|
-
`)}function Fe(t){if(t==="")return[];let e=t.split(`
|
|
4
|
-
`);return e[e.length-1]===""&&e.pop(),e}function ve(t,e){return t.length===1?{pattern:t[0],mode:e}:e==="fixed"?{pattern:t.map(i=>`(?:${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`).join("|"),mode:"extended"}:e==="basic"?{pattern:t.join("\\|"),mode:e}:{pattern:t.map(i=>`(?:${i})`).join("|"),mode:e}}var Ce={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",description:["Search for PATTERN in each FILE.","With no FILE, or when FILE is -, read standard input."],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","-f FILE, --file=FILE obtain patterns from FILE, one per line"," --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"]},me={name:"grep",async execute(t,e){let i=!1,g=!1,f=!1,m=!1,c=!1,u=!1,l=!1,a=!1,h=!1,v=!1,$=!1,y=!1,x=!1,M=!1,_=!1,O=0,N=0,W=0,S=[],B=[],V=[],w=[],b=[],X=[],G=!0;for(let s=0;s<t.length;s++){let r=t[s];if(G&&r==="--"){G=!1;continue}if(G&&r==="--help")return ce(Ce);if(G&&r.startsWith("-")&&r!=="-"){if(r==="-e"&&s+1<t.length){w.push(t[++s]);continue}if(r.startsWith("--file=")){b.push(r.slice(7));continue}if(r.startsWith("--include=")){S.push(r.slice(10));continue}if(r.startsWith("--exclude=")){B.push(r.slice(10));continue}if(r.startsWith("--exclude-dir=")){V.push(r.slice(14));continue}if(r.startsWith("--max-count=")){O=parseInt(r.slice(12),10);continue}let C=r.match(/^-m(\d+)$/);if(C){O=parseInt(C[1],10);continue}if(r==="-m"&&s+1<t.length){O=parseInt(t[++s],10);continue}let o=r.match(/^-([ABC])(\d+)$/);if(o){let p=parseInt(o[2],10);o[1]==="A"?W=p:o[1]==="B"?N=p:o[1]==="C"&&(N=p,W=p);continue}if((r==="-A"||r==="-B"||r==="-C")&&s+1<t.length){let p=parseInt(t[++s],10);r==="-A"?W=p:r==="-B"?N=p:(N=p,W=p);continue}let d=r.startsWith("--")?[r]:r.slice(1).split("");for(let p=0;p<d.length;p++){let n=d[p];if(n==="f"||n==="--file"){let q=n==="f"?d.slice(p+1).join(""):"";if(q.length>0)b.push(q);else if(s+1<t.length)b.push(t[++s]);else return{stdout:"",stderr:n==="f"?`grep: option requires an argument -- 'f'
|
|
5
|
-
`:`grep: option '--file' requires an argument
|
|
6
|
-
`,exitCode:2};break}if(n==="i"||n==="--ignore-case")i=!0;else if(n==="n"||n==="--line-number")g=!0;else if(n==="v"||n==="--invert-match")f=!0;else if(n==="c"||n==="--count")m=!0;else if(n==="l"||n==="--files-with-matches")c=!0;else if(n==="L"||n==="--files-without-match")u=!0;else if(n==="r"||n==="R"||n==="--recursive")l=!0;else if(n==="w"||n==="--word-regexp")a=!0;else if(n==="x"||n==="--line-regexp")h=!0;else if(n==="E"||n==="--extended-regexp")v=!0;else if(n==="P"||n==="--perl-regexp")$=!0;else if(n==="F"||n==="--fixed-strings")y=!0;else if(n==="o"||n==="--only-matching")x=!0;else if(n==="h"||n==="--no-filename")M=!0;else if(n==="q"||n==="--quiet"||n==="--silent")_=!0;else{if(n.startsWith("--"))return te("grep",n);if(n.length===1)return te("grep",`-${n}`)}}}else X.push(r)}if(w.length===0&&b.length===0){let s=X.shift();if(s===void 0)return{stdout:"",stderr:`grep: missing pattern
|
|
7
|
-
`,exitCode:2};w.push(s)}w=w.flatMap(we);let Z=!1;for(let s of b){let r;if(s==="")return{stdout:"",stderr:`grep: : No such file or directory
|
|
8
|
-
`,exitCode:2};if(s==="-")r=Z?"":D(e.stdin),Z=!0;else try{let o=e.fs.resolvePath(e.cwd,s);if((await e.fs.stat(o)).isDirectory)return{stdout:"",stderr:`grep: ${s}: Is a directory
|
|
9
|
-
`,exitCode:2};r=await e.fs.readFile(o)}catch(o){return I(o),{stdout:"",stderr:`grep: ${s}: No such file or directory
|
|
10
|
-
`,exitCode:2}}let C=Fe(r);if(w.length+C.length>e.limits.maxArrayElements)throw new A(`grep: array element limit exceeded (${e.limits.maxArrayElements})`,"array_elements");w.push(...C)}if(w.length===0&&!f&&!u)return{stdout:"",stderr:"",exitCode:1};let J=X,Q=y?"fixed":v?"extended":$?"perl":"basic";if(Q==="perl"&&new Set(w).size>1)return{stdout:"",stderr:`grep: the -P option only supports a single pattern
|
|
11
|
-
`,exitCode:2};if(w.length>1&&Q!=="fixed")for(let s of w)try{se(s,{mode:Q})}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${s}
|
|
12
|
-
`,exitCode:2}}let re=w.length===0?{pattern:xe,mode:"extended"}:ve(w,Q),K,Y,L;try{let s=se(re.pattern,{mode:re.mode,ignoreCase:i,wholeWord:a,lineRegexp:h});K=s.regex,Y=s.kResetGroup,L=s.preFilter}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${w.join(`
|
|
13
|
-
`)}
|
|
14
|
-
`,exitCode:2}}if(J.length===0&&e.stdin!==void 0){let s=Z?"":D(e.stdin),r=ne(s,K,{invertMatch:f,showLineNumbers:g,countOnly:m,filename:"",onlyMatching:x,beforeContext:N,afterContext:W,maxCount:O,kResetGroup:Y,preFilter:L,maxWork:he(e),maxMatches:e.limits.maxArrayElements,signal:e.signal});return _?{stdout:"",stderr:"",exitCode:r.matched?0:1}:{stdout:r.output,stderr:"",exitCode:r.matched?0:1}}if(J.length===0)return{stdout:"",stderr:`grep: no input files
|
|
15
|
-
`,exitCode:2};let H="",ie="",oe=!1,ae=!1,P=[],R={operations:0,results:0,maxOperations:e.limits.maxGlobOperations,maxResults:e.limits.maxArrayElements},ee=s=>{if(s.length>R.maxResults-P.length)throw new A(`grep: array element limit exceeded (${R.maxResults})`,"array_elements");P.push(...s)},le=!1,fe=!1;for(let s of J){if(s==="-"){if(P.length>=R.maxResults)throw new A(`grep: array element limit exceeded (${R.maxResults})`,"array_elements");P.push({path:ye,isFile:!0,isStdin:!0,stdinAtEof:le}),le=!0;continue}if(fe=!0,s.includes("*")||s.includes("?")||s.includes("[")){let r=await Ee(s,e,R);if(l)for(let C of r){let o=await j(C.path,e,S,B,V,C.isFile,R);ee(o)}else ee(r)}else if(l){let r=await j(s,e,S,B,V,void 0,R);ee(r)}else{if(P.length>=R.maxResults)throw new A(`grep: array element limit exceeded (${R.maxResults})`,"array_elements");P.push({path:s})}}let ue=(P.length>1||l&&fe)&&!M,pe=50;for(let s=0;s<P.length;s+=pe){let r=P.slice(s,s+pe),C=await Promise.all(r.map(async o=>{let d=o.path,p=d.split("/").pop()||d;if(B.length>0&&!l&&!o.isStdin&&B.some(n=>E(p,n,{stripQuotes:!0}))||S.length>0&&!l&&!o.isStdin&&!S.some(n=>E(p,n,{stripQuotes:!0})))return null;try{let n;if(o.isStdin)n=o.stdinAtEof||e.stdin===void 0?"":D(e.stdin);else{let z=e.fs.resolvePath(e.cwd,d),T=!1;if(o.isFile===void 0?T=(await e.fs.stat(z)).isDirectory:T=!o.isFile,T)return l?null:{error:`grep: ${d}: Is a directory
|
|
16
|
-
`};n=await e.fs.readFile(z)}if(L&&!f){let z=L.ignoreCase?n.toLowerCase():n;if(!L.needles.some(T=>z.includes(T))){if(m){let T=ue?`${d}:0`:"0";return{file:d,result:{output:`${T}
|
|
17
|
-
`,matched:!1,matchCount:0}}}return{file:d,result:{output:"",matched:!1,matchCount:0}}}}let q=ne(n,K,{invertMatch:f,showLineNumbers:g,countOnly:m,filename:ue?d:"",onlyMatching:x,beforeContext:N,afterContext:W,maxCount:O,kResetGroup:Y,preFilter:L,maxWork:he(e),maxMatches:e.limits.maxArrayElements,signal:e.signal});return{file:d,result:q}}catch(n){return I(n),{error:`grep: ${d}: No such file or directory
|
|
18
|
-
`}}}));for(let o of C){if(o===null)continue;if("error"in o&&o.error){ie+=o.error,o.error.includes("Is a directory")||(ae=!0);continue}if(!("file"in o)||!o.result)continue;let{file:d,result:p}=o;if(p.matched){if(oe=!0,_)return{stdout:"",stderr:"",exitCode:0};c?H+=`${d}
|
|
19
|
-
`:u||(H+=p.output)}else u?H+=`${d}
|
|
20
|
-
`:m&&!c&&(H+=p.output)}}let k;return ae?k=2:k=oe?0:1,_?{stdout:"",stderr:"",exitCode:k}:{stdout:H,stderr:ie,exitCode:k}}},de=256;async function ge(t,e,i,g,f,m=0){if(m>=de)return;let c=i.fs.resolvePath(i.cwd,t);try{if(F(f),!(await i.fs.stat(c)).isDirectory){let a=t.split("/").pop()||"";if(e){let h=e.replace(/^\//,"");E(a,h,{stripQuotes:!0})&&(U(f),g.push(t))}return}F(f);let l=await i.fs.readdir(c);for(let a of l){let h=t==="."?a:`${t}/${a}`,v=i.fs.resolvePath(i.cwd,h);if(F(f),(await i.fs.stat(v)).isDirectory)await ge(h,e,i,g,f,m+1);else if(e){let y=e.replace(/^\//,"");E(a,y,{stripQuotes:!0})&&(U(f),g.push(h))}}}catch(u){I(u)}}async function Ee(t,e,i){let g=[],f=t.lastIndexOf("/"),m,c;if(f===-1?(m=e.cwd,c=t):(m=t.slice(0,f)||"/",c=t.slice(f+1)),t.includes("**")){let l=[],a=t.split("**"),h=a[0].replace(/\/$/,"")||".",v=a[1]||"";return await ge(h,v,e,l,i),l.map($=>({path:$}))}let u=e.fs.resolvePath(e.cwd,m);try{if(e.fs.readdirWithFileTypes){F(i);let l=await e.fs.readdirWithFileTypes(u);for(let a of l)if(F(i),E(a.name,c,{stripQuotes:!0})){let h=f===-1?a.name:`${m}/${a.name}`;U(i),g.push({path:h,isFile:a.isFile})}}else{F(i);let l=await e.fs.readdir(u);for(let a of l)if(F(i),E(a,c,{stripQuotes:!0})){let h=f===-1?a:`${m}/${a}`;U(i),g.push({path:h})}}}catch(l){I(l)}return g.sort((l,a)=>l.path.localeCompare(a.path))}async function j(t,e,i=[],g=[],f=[],m,c={operations:0,results:0,maxOperations:e.limits.maxGlobOperations,maxResults:e.limits.maxArrayElements},u=[],l=0){if(l>=de)return u;let a=e.fs.resolvePath(e.cwd,t);try{let h,v;if(m!==void 0)h=m,v=!m;else{F(c);let y=await e.fs.stat(a);h=y.isFile,v=y.isDirectory}if(h){let y=t.split("/").pop()||t;return g.length>0&&g.some(x=>E(y,x,{stripQuotes:!0}))||i.length>0&&!i.some(x=>E(y,x,{stripQuotes:!0}))||(U(c),u.push({path:t,isFile:!0})),u}if(!v)return u;let $=t.split("/").pop()||t;if(f.length>0&&f.some(y=>E($,y,{stripQuotes:!0})))return u;if(e.fs.readdirWithFileTypes){F(c);let y=await e.fs.readdirWithFileTypes(a);for(let x of y){if(F(c),x.name.startsWith("."))continue;let M=t==="."?x.name:`${t}/${x.name}`;await j(M,e,i,g,f,x.isFile,c,u,l+1)}}else{F(c);let y=await e.fs.readdir(a);for(let x of y){if(F(c),x.startsWith("."))continue;let M=t==="."?x:`${t}/${x}`;await j(M,e,i,g,f,void 0,c,u,l+1)}}}catch(h){I(h)}return u}var We={name:"fgrep",async execute(t,e){return me.execute(["-F",...t],e)}},Le={name:"egrep",async execute(t,e){return me.execute(["-E",...t],e)}},Ie={name:"grep",flags:[{flag:"-E",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-P",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-L",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-o",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-m",type:"value",valueHint:"number"},{flag:"-A",type:"value",valueHint:"number"},{flag:"-B",type:"value",valueHint:"number"},{flag:"-C",type:"value",valueHint:"number"},{flag:"-e",type:"value",valueHint:"pattern"},{flag:"-f",type:"value",valueHint:"path"}],stdinType:"text",needsArgs:!0},Oe={name:"fgrep",flags:[],stdinType:"text",needsArgs:!0},Se={name:"egrep",flags:[],stdinType:"text",needsArgs:!0};export{me as a,We as b,Le as c,Ie as d,Oe as e,Se as f};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{c as u}from"./chunk-DLL7UR66.js";import{d as l}from"./chunk-GN6CQ3J4.js";import{a as d,b as h}from"./chunk-QAYAQNCG.js";var m={name:"bash",summary:"execute shell commands or scripts",usage:"bash [OPTIONS] [SCRIPT_FILE] [ARGUMENTS...]",options:["-c COMMAND execute COMMAND string"," --help display this help and exit"],notes:["Without -c, reads and executes commands from SCRIPT_FILE.","Arguments are passed as $1, $2, etc. to the script.",'$0 is set to the script name (or "bash" with -c).']},g={name:"bash",async execute(t,e){if(h(t))return d(m);if(t[0]==="-c"&&t.length>=2){let s=t[1],n=t[2]||"bash",r=t.slice(3);return c(s,n,r,e)}if(t.length===0){let s=l(e.stdin);return s.trim()?c(s,"bash",[],e):{stdout:"",stderr:"",exitCode:0}}let o=t[0],i=t.slice(1);try{let s=e.fs.resolvePath(e.cwd,o),n=await e.fs.readFile(s);return c(n,o,i,e)}catch{return{stdout:"",stderr:`bash: ${o}: No such file or directory
|
|
3
|
-
`,exitCode:127}}}},v={name:"sh",async execute(t,e){if(h(t))return d({...m,name:"sh",summary:"execute shell commands or scripts (POSIX shell)"});if(t[0]==="-c"&&t.length>=2){let s=t[1],n=t[2]||"sh",r=t.slice(3);return c(s,n,r,e)}if(t.length===0){let s=l(e.stdin);return s.trim()?c(s,"sh",[],e):{stdout:"",stderr:"",exitCode:0}}let o=t[0],i=t.slice(1);try{let s=e.fs.resolvePath(e.cwd,o),n=await e.fs.readFile(s);return c(n,o,i,e)}catch{return{stdout:"",stderr:`sh: ${o}: No such file or directory
|
|
4
|
-
`,exitCode:127}}}};async function c(t,e,o,i){if(!i.exec)return{stdout:"",stderr:`bash: internal error: exec function not available
|
|
5
|
-
`,exitCode:1};let s=u(i.exportedEnv||{},{0:e,"#":String(o.length),"@":o.join(" "),"*":o.join(" ")});o.forEach((a,p)=>{s[String(p+1)]=a});let n=t;if(n.startsWith("#!")){let a=n.indexOf(`
|
|
6
|
-
`);a!==-1&&(n=n.slice(a+1))}let r=i.execWithInheritedStdin;return r?await r(n,{env:s,cwd:i.cwd,signal:i.signal}):await i.exec(n,{env:s,cwd:i.cwd,stdin:i.stdin,stdinKind:"bytes",signal:i.signal})}var F={name:"bash",flags:[{flag:"-c",type:"value",valueHint:"string"}],stdinType:"text"},P={name:"sh",flags:[{flag:"-c",type:"value",valueHint:"string"}],stdinType:"text"};export{g as a,v as b,F as c,P as d};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as T}from"./chunk-J2OBOJ64.js";import{a as R}from"./chunk-L2UW7DWF.js";import{l}from"./chunk-EFORKKSH.js";import{a as p,d as P}from"./chunk-GN6CQ3J4.js";import{a as k,b as H,c as B}from"./chunk-QAYAQNCG.js";var D={name:"xargs",summary:"build and execute command lines from standard input",usage:"xargs [OPTION]... [COMMAND [INITIAL-ARGS]]",options:["-I REPLACE replace occurrences of REPLACE with input","-d DELIM use DELIM as input delimiter (e.g., -d '\\n' for newline)","-n NUM use at most NUM arguments per command line","-P NUM run at most NUM processes at a time","-0, --null items are separated by null, not whitespace","-t, --verbose print commands before executing","-r, --no-run-if-empty do not run command if input is empty"," --help display this help and exit"]};function U(r,i,u){if(i.length===0)throw new Error("xargs: delimiter must not be empty");let d=[],o=0;for(;o<=r.length;){let a=r.indexOf(i,o),x=r.slice(o,a===-1?r.length:a);if(x.length>0){if(d.length>=u)throw new l(`xargs: array element limit exceeded (${u})`,"array_elements");d.push(x)}if(a===-1)break;o=a+i.length}return d}function F(r,i){let u=[],d=-1;for(let o=0;o<=r.length;o++){let a=o===r.length||/\s/.test(r[o]);if(!a&&d===-1&&(d=o),a&&d!==-1){if(u.length>=i)throw new l(`xargs: array element limit exceeded (${i})`,"array_elements");u.push(r.slice(d,o)),d=-1}}return u}var Y={name:"xargs",async execute(r,i){if(H(r))return k(D);let u=null,d=null,o=null,a=null,x=!1,L=!1,N=!1,f=0;for(let e=0;e<r.length;e++){let t=r[e];if(t==="-I"&&e+1<r.length)u=r[++e],f=e+1;else if(t==="-d"&&e+1<r.length)d=r[++e].replace(/\\n/g,`
|
|
3
|
-
`).replace(/\\t/g," ").replace(/\\r/g,"\r").replace(/\\0/g,"\0").replace(/\\\\/g,"\\"),f=e+1;else if(t==="-n"&&e+1<r.length){let n=r[++e],s=Number(n);if(!/^\d+$/.test(n)||!Number.isSafeInteger(s)||s<1)return{stdout:"",stderr:`xargs: invalid number for -n: '${n}'
|
|
4
|
-
`,exitCode:1};o=s,f=e+1}else if(t==="-P"&&e+1<r.length){let n=r[++e],s=Number(n);if(!/^\d+$/.test(n)||!Number.isSafeInteger(s))return{stdout:"",stderr:`xargs: invalid number for -P: '${n}'
|
|
5
|
-
`,exitCode:1};a=s,f=e+1}else if(t==="-0"||t==="--null")x=!0,f=e+1;else if(t==="-t"||t==="--verbose")L=!0,f=e+1;else if(t==="-r"||t==="--no-run-if-empty")N=!0,f=e+1;else{if(t.startsWith("--"))return B("xargs",t);if(t.startsWith("-")&&t.length>1){for(let n of t.slice(1))if(!"0tr".includes(n))return B("xargs",`-${n}`);t.includes("0")&&(x=!0),t.includes("t")&&(L=!0),t.includes("r")&&(N=!0),f=e+1}else if(!t.startsWith("-")){f=e;break}}}let g=r.slice(f);g.length===0&&g.push("echo");let C=P(i.stdin),y=Math.min(i.limits.maxInputBytes,i.limits.maxStringLength),c=i.limits.maxArrayElements,w=i.limits.maxLoopIterations,E=i.limits.maxOutputSize;if(p(C)>y)throw new l(`xargs: input size limit exceeded (${y} bytes)`,"string_length");if(a!==null&&a>c)throw new l(`xargs: array element limit exceeded (${c})`,"array_elements");let m;if(x)m=U(C,"\0",c);else if(d!==null){let e=C.replace(/\n$/,"");try{m=U(e,d,c)}catch(t){if(t instanceof l)throw t;return{stdout:"",stderr:`xargs: delimiter must not be empty
|
|
6
|
-
`,exitCode:1}}}else m=F(C,c);if(m.length===0)return N?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0};let _=[],S=[],b=0,v=0,W=0,$=i.executionScope?new T(i.executionScope,"xargs"):void 0,M=e=>{if($){$.appendResult(e);return}let t=p(e.stdout)+p(e.stderr);if(t>E-v)throw new l(`xargs: output size limit exceeded (${E} bytes)`,"output_size");e.stdout&&_.push(e.stdout),e.stderr&&S.push(e.stderr),v+=t},j=e=>{if($){$.append("stderr",e);return}let t=p(e);if(t>E-v)throw new l(`xargs: output size limit exceeded (${E} bytes)`,"output_size");e&&S.push(e),v+=t},O=e=>/[\s"'\\$`!*?[\]{}();&|<>#]/.test(e)?`"${e.replace(/([\\"`$])/g,"\\$1")}"`:e,A=async e=>{if(++W>w)throw new l(`xargs: iteration limit exceeded (${w})`,"iterations");if(e.length>c)throw new l(`xargs: array element limit exceeded (${c})`,"array_elements");for(let n of e)if(p(n)>y)throw new l(`xargs: string length limit exceeded (${y} bytes)`,"string_length");if(L){let n=e.map(O).join(" ");j(`${n}
|
|
7
|
-
`)}return i.exec?i.exec(R([e[0]]),{cwd:i.cwd,signal:i.signal,args:e.slice(1)}):{stdout:`${e.map(O).join(" ")}
|
|
8
|
-
`,stderr:"",exitCode:0}},z=async e=>{if(a!==null&&a>1)for(let t=0;t<e.length;t+=a){let n=e.slice(t,t+a),s=await Promise.all(n.map(A));for(let h of s)M(h),h.exitCode!==0&&(b=h.exitCode)}else for(let t of e){let n=await A(t);M(n),n.exitCode!==0&&(b=n.exitCode)}};if(u!==null){if(m.length>w)throw new l(`xargs: iteration limit exceeded (${w})`,"iterations");if(u.length===0)return{stdout:"",stderr:`xargs: replacement string must not be empty
|
|
9
|
-
`,exitCode:1};if(g.length>0&&m.length>Math.floor(c/g.length))throw new l(`xargs: array element limit exceeded (${c})`,"array_elements");let e=(n,s)=>{let h=0,I=0;for(;I=n.indexOf(u,I),I!==-1;)h++,I+=u.length;if(p(n)+h*(p(s)-p(u))>y)throw new l(`xargs: string length limit exceeded (${y} bytes)`,"string_length");return n.replaceAll(u,s)},t=m.map(n=>g.map(s=>e(s,n)));await z(t)}else if(o!==null){let e=[],t=Math.ceil(m.length/o);if(t>Math.min(c,w))throw new l(`xargs: iteration limit exceeded (${w})`,"iterations");if(m.length+t*g.length>c)throw new l(`xargs: array element limit exceeded (${c})`,"array_elements");for(let s=0;s<m.length;s+=o){let h=m.slice(s,s+o);e.push([...g,...h])}await z(e)}else{let e=[...g,...m],t=await A(e);M(t),b=t.exitCode}return $?.build(b)??{stdout:_.join(""),stderr:S.join(""),exitCode:b}}},Z={name:"xargs",flags:[{flag:"-I",type:"value",valueHint:"string"},{flag:"-d",type:"value",valueHint:"delimiter"},{flag:"-n",type:"value",valueHint:"number"},{flag:"-0",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-r",type:"boolean"}],stdinType:"text"};export{Y as a,Z as b};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{f as Y}from"./chunk-FIMO5HLX.js";import{a as P,b as J,c as D}from"./chunk-DIRWTBKE.js";import{a as K}from"./chunk-L2UW7DWF.js";import{a as W}from"./chunk-7GA3QWJJ.js";import{a as N}from"./chunk-U7UNEMLJ.js";import{e as V}from"./chunk-DIWMSSQY.js";import{d as Z}from"./chunk-2WBUTDF5.js";import{l as M}from"./chunk-EFORKKSH.js";import{a as G,d as T,g as _}from"./chunk-GN6CQ3J4.js";import{a as q,b as H,c as O}from"./chunk-QAYAQNCG.js";var X=Y({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:[]}}),A=class{types;constructor(){this.types=new Map(Object.entries(X).map(([t,s])=>[t,{extensions:[...s.extensions],globs:[...s.globs]}]))}addType(t){let s=t.indexOf(":");if(s===-1)return;let n=t.slice(0,s),r=t.slice(s+1);if(r.startsWith("include:")){let i=r.slice(8),l=this.types.get(i);if(l){let o=this.types.get(n)||{extensions:[],globs:[]};o.extensions.push(...l.extensions),o.globs.push(...l.globs),this.types.set(n,o)}}else{let i=this.types.get(n)||{extensions:[],globs:[]};if(r.startsWith("*.")&&!r.slice(2).includes("*")){let l=r.slice(1);i.extensions.includes(l)||i.extensions.push(l)}else i.globs.includes(r)||i.globs.push(r);this.types.set(n,i)}}clearType(t){let s=this.types.get(t);s&&(s.extensions=[],s.globs=[])}getType(t){return this.types.get(t)}getAllTypes(){return this.types}matchesType(t,s){let n=t.toLowerCase();for(let r of s){if(r==="all"){if(this.matchesAnyType(t))return!0;continue}let i=this.types.get(r);if(i){for(let l of i.extensions)if(n.endsWith(l))return!0;for(let l of i.globs)if(l.includes("*")){let o=l.replace(/\./g,"\\.").replace(/\*/g,".*");if(W(`^${o}$`,"i").test(t))return!0}else if(n===l.toLowerCase())return!0}}return!1}matchesAnyType(t){let s=t.toLowerCase();for(let n of this.types.values()){for(let r of n.extensions)if(s.endsWith(r))return!0;for(let r of n.globs)if(r.includes("*")){let i=r.replace(/\./g,"\\.").replace(/\*/g,".*");if(W(`^${i}$`,"i").test(t))return!0}else if(s===r.toLowerCase())return!0}return!1}};function Q(){let e=[];for(let[t,s]of Object.entries(X).sort()){let n=[];for(let r of s.extensions)n.push(`*${r}`);for(let r of s.globs)n.push(r);e.push(`${t}: ${n.join(", ")}`)}return`${e.join(`
|
|
3
|
-
`)}
|
|
4
|
-
`}function ee(){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:512*1024*1024,followSymlinks:!1,searchZip:!1,searchBinary:!1,preprocessor:null,preprocessorGlobs:[]}}function ue(e){let t=e.match(/^(\d+)([KMG])?$/i);if(!t)return 0;let s=parseInt(t[1],10);switch((t[2]||"").toUpperCase()){case"K":return s*1024;case"M":return s*1024*1024;case"G":return s*1024*1024*1024;default:return s}}function fe(e){return/^\d+[KMG]?$/i.test(e)?null:{stdout:"",stderr:`rg: invalid --max-filesize value: ${e}
|
|
5
|
-
`,exitCode:1}}function he(e,t){return!/^\d+$/.test(t)||!Number.isSafeInteger(Number(t))?{stdout:"",stderr:`rg: invalid --${e} value: ${t}
|
|
6
|
-
`,exitCode:1}:null}function te(e){return null}var se=[{short:"g",long:"glob",target:"globs",multi:!0},{long:"iglob",target:"iglobs",multi:!0},{short:"t",long:"type",target:"types",multi:!0,validate:te},{short:"T",long:"type-not",target:"typesNot",multi:!0,validate:te},{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:e=>Number(e),validate:e=>he("max-depth",e)},{long:"max-filesize",target:"maxFilesize",parse:ue,validate:fe},{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}],ge=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}]]),me=new Set(["n","--line-number"]);function pe(e){e.hidden?e.searchBinary=!0:e.noIgnore?e.hidden=!0:e.noIgnore=!0}function de(e,t,s){let n=e[t];for(let r of se){if(n.startsWith(`--${r.long}=`)){let i=n.slice(`--${r.long}=`.length),l=z(s,r,i);return l?{newIndex:t,error:l}:{newIndex:t}}if(r.short&&n.startsWith(`-${r.short}`)&&n.length>2){let i=n.slice(2),l=z(s,r,i);return l?{newIndex:t,error:l}:{newIndex:t}}if(r.short&&n===`-${r.short}`||n===`--${r.long}`){if(t+1>=e.length)return null;let i=e[t+1],l=z(s,r,i);return l?{newIndex:t+1,error:l}:{newIndex:t+1}}}return null}function ye(e){return se.find(t=>t.short===e)}function z(e,t,s){if(t.validate){let r=t.validate(s);if(r)return r}if(t.ignored||!t.target)return;let n=t.parse?t.parse(s):s;t.multi?e[t.target].push(n):e[t.target]=n}function xe(e,t){let s=e[t];if(s==="--sort"&&t+1<e.length){let n=e[t+1];if(n==="path"||n==="none")return{value:n,newIndex:t+1}}if(s.startsWith("--sort=")){let n=s.slice(7);if(n==="path"||n==="none")return{value:n,newIndex:t}}return null}function be(e,t){let s=e[t],n=s.match(/^-([ABC])(\d+)$/);return n?{flag:n[1],value:parseInt(n[2],10),newIndex:t}:(s==="-A"||s==="-B"||s==="-C")&&t+1<e.length?{flag:s[1],value:parseInt(e[t+1],10),newIndex:t+1}:null}function we(e){let t=e.match(/^-m(\d+)$/);return t?parseInt(t[1],10):null}function ne(e){let t=ee(),s=null,n=[],r=-1,i=-1,l=-1,o=!1;for(let a=0;a<e.length;a++){let c=e[a];if(c.startsWith("-")&&c!=="-"){let f=be(e,a);if(f){let{flag:u,value:w,newIndex:v}=f;u==="A"?r=Math.max(r,w):u==="B"?i=Math.max(i,w):l=w,a=v;continue}let h=we(c);if(h!==null){t.maxCount=h;continue}let m=de(e,a,t);if(m){if(m.error)return{success:!1,error:m.error};a=m.newIndex;continue}let y=xe(e,a);if(y){t.sort=y.value,a=y.newIndex;continue}let S=c.startsWith("--")?[c]:c.slice(1).split(""),b=!1;for(let u of S){if(me.has(u)){t.lineNumber=!0,o=!0;continue}if(u==="u"||u==="--unrestricted"){pe(t);continue}if(u==="P"||u==="--pcre2")return{success:!1,error:{stdout:"",stderr:`rg: PCRE2 is not supported. Use standard regex syntax instead.
|
|
7
|
-
`,exitCode:1}};if(u.length===1){let v=ye(u);if(v){if(a+1>=e.length)return{success:!1,error:O("rg",`-${u}`)};let g=z(t,v,e[a+1]);if(g)return{success:!1,error:g};a++,b=!0;continue}}let w=ge.get(u);if(w){w(t);continue}if(u.startsWith("--"))return{success:!1,error:O("rg",u)};if(u.length===1)return{success:!1,error:O("rg",`-${u}`)}}}else s===null&&t.patterns.length===0&&t.patternFiles.length===0?s=c:n.push(c)}return(r>=0||l>=0)&&(t.afterContext=Math.max(r>=0?r:0,l>=0?l:0)),(i>=0||l>=0)&&(t.beforeContext=Math.max(i>=0?i:0,l>=0?l:0)),s!==null&&t.patterns.push(s),(t.column||t.vimgrep)&&(o=!0),{success:!0,options:t,paths:n,explicitLineNumbers:o}}import{gunzipSync as ve}from"node:zlib";var j=class{patterns=[];basePath;constructor(t="/"){this.basePath=t}parse(t){let s=t.split(`
|
|
8
|
-
`);for(let n of s){let r=n.replace(/\s+$/,"");if(!r||r.startsWith("#"))continue;let i=!1;r.startsWith("!")&&(i=!0,r=r.slice(1));let l=!1;r.endsWith("/")&&(l=!0,r=r.slice(0,-1));let o=!1;r.startsWith("/")?(o=!0,r=r.slice(1)):r.includes("/")&&!r.startsWith("**/")&&(o=!0);let a=this.patternToRegex(r,o);this.patterns.push({pattern:n,regex:a,negated:i,directoryOnly:l,rooted:o})}}patternToRegex(t,s){let n="";s?n="^":n="(?:^|/)";let r=0;for(;r<t.length;){let i=t[r];if(i==="*")t[r+1]==="*"?t[r+2]==="/"?(n+="(?:.*/)?",r+=3):(r+2>=t.length,n+=".*",r+=2):(n+="[^/]*",r++);else if(i==="?")n+="[^/]",r++;else if(i==="["){let l=r+1;for(l<t.length&&t[l]==="!"&&l++,l<t.length&&t[l]==="]"&&l++;l<t.length&&t[l]!=="]";)l++;if(l<t.length){let o=t.slice(r,l+1);o.startsWith("[!")&&(o=`[^${o.slice(2)}`),n+=o,r=l+1}else n+="\\[",r++}else i==="/"?(n+="/",r++):(n+=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r++)}return n+="(?:/.*)?$",W(n)}matches(t,s){let n=t.replace(/^\.\//,"");n=n.replace(/^\//,"");let r=!1;for(let i of this.patterns)i.directoryOnly&&!s||i.regex.test(n)&&(r=!i.negated);return r}isWhitelisted(t,s){let n=t.replace(/^\.\//,"");n=n.replace(/^\//,"");for(let r of this.patterns)if(!(r.directoryOnly&&!s)&&r.negated&&r.regex.test(n))return!0;return!1}getBasePath(){return this.basePath}},E=class{parsers=[];fs;skipDotIgnore;skipVcsIgnore;loadedDirs=new Set;constructor(t,s,n=!1,r=!1){this.fs=t,this.skipDotIgnore=n,this.skipVcsIgnore=r}async load(t){let s=[],n=t;for(;;){s.unshift(n);let i=this.fs.resolvePath(n,"..");if(i===n)break;n=i}let r=[];this.skipVcsIgnore||r.push(".gitignore"),this.skipDotIgnore||r.push(".rgignore",".ignore");for(let i of s){this.loadedDirs.add(i);for(let l of r){let o=this.fs.resolvePath(i,l);try{let a=await this.fs.readFile(o),c=new j(i);c.parse(a),this.parsers.push(c)}catch{}}}}async loadForDirectory(t){if(this.loadedDirs.has(t))return;this.loadedDirs.add(t);let s=[];this.skipVcsIgnore||s.push(".gitignore"),this.skipDotIgnore||s.push(".rgignore",".ignore");for(let n of s){let r=this.fs.resolvePath(t,n);try{let i=await this.fs.readFile(r),l=new j(t);l.parse(i),this.parsers.push(l)}catch{}}}addPatternsFromContent(t,s){let n=new j(s);n.parse(t),this.parsers.push(n)}matches(t,s){for(let n of this.parsers){let r=n.getBasePath();if(!t.startsWith(r))continue;let i=t.slice(r.length).replace(/^\//,"");if(n.matches(i,s))return!0}return!1}isWhitelisted(t,s){for(let n of this.parsers){let r=n.getBasePath();if(!t.startsWith(r))continue;let i=t.slice(r.length).replace(/^\//,"");if(n.isWhitelisted(i,s))return!0}return!1}static isCommonIgnored(t){return new Set(["node_modules",".git",".svn",".hg","__pycache__",".pytest_cache",".mypy_cache","venv",".venv",".next",".nuxt",".cargo"]).has(t)}};async function R(e,t,s=!1,n=!1,r=[]){let i=new E(e,t,s,n);await i.load(t);for(let l of r)try{let o=e.resolvePath(t,l),a=await e.readFile(o);i.addPatternsFromContent(a,t)}catch{}return i}function Se(e){return e.length>=2&&e[0]===31&&e[1]===139}function Ce(e){let t=!1;for(let s=0;s<e.length;s++){let n=e[s];n==="["&&!t?t=!0:n==="]"&&t&&(t=!1)}return t?`rg: glob '${e}' has an unclosed character class`:null}function re(e,t){if(!Number.isSafeInteger(t)||t<0||t>e.limits.maxStringLength||t>Math.floor(e.limits.maxLiveBytes/3))throw new M(t>e.limits.maxStringLength?`rg: pattern file exceeds string limit (${e.limits.maxStringLength} bytes)`:`rg: live byte limit exceeded (${e.limits.maxLiveBytes} bytes)`,"string_length");return e.executionScope?.reserveBytes("rg pattern files",t*3,"rg")??{release:()=>{}}}function Ie(e,t,s){let n=0;for(let r=0;r<=t.length;r++)if(!(r<t.length&&t.charCodeAt(r)!==10)){if(r>n){if(e.length>=s.limits.maxArrayElements)throw new M(`rg: pattern limit exceeded (${s.limits.maxArrayElements})`,"iterations");s.executionScope?.consumeWork(1,"rg pattern insertion"),e.push(t.slice(n,r))}n=r+1}}function ie(e,t,s){if(t>e.limits.maxInputBytes-s)throw new M(`rg: aggregate input size limit exceeded (${e.limits.maxInputBytes} bytes)`,"string_length");return e.executionScope?.consumeInput(t,"rg pattern files"),s+t}async function le(e){let{ctx:t,options:s,paths:n,explicitLineNumbers:r}=e;for(let g of s.globs){let d=g.startsWith("!")?g.slice(1):g,x=Ce(d);if(x)return{stdout:"",stderr:`${x}
|
|
9
|
-
`,exitCode:1}}if(s.files){let g=[...s.patterns,...n];return Me(t,g,s)}if(s.patterns.length>t.limits.maxArrayElements)throw new M(`rg: pattern limit exceeded (${t.limits.maxArrayElements})`,"iterations");let i=s.patterns.slice(),l=[],o=0,a,c;try{for(let d of s.patternFiles)try{let x,p;if(d==="-")x=t.stdin,p=t.stdin.length,o=ie(t,p,o);else{let $=t.fs.resolvePath(t.cwd,d);p=(await t.fs.stat($)).size,o=ie(t,p,o);let I=re(t,p);l.push(I),x=await _(t.fs,$);let B=x.length;if(B>p)throw new M("rg: pattern file grew while being read","string_length");p=B}d==="-"&&l.push(re(t,p));let C=T(x,t.limits.maxStringLength);t.executionScope?.consumeWork(C.length,"rg pattern file parsing"),Ie(i,C,t)}catch(x){return N(x),{stdout:"",stderr:`rg: ${d}: No such file or directory
|
|
10
|
-
`,exitCode:2}}if(i.length===0)return s.patternFiles.length>0?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`rg: no pattern given
|
|
11
|
-
`,exitCode:2};let g=Fe(s,i);try{let d=$e(i,s,g);a=d.regex,c=d.kResetGroup}catch{return{stdout:"",stderr:`rg: invalid regex: ${i.join(", ")}
|
|
12
|
-
`,exitCode:2}}}finally{for(let g of l)g.release()}let f=s.patternFiles.includes("-"),h=T(t.stdin);if(n.length===0&&h.length>0&&!f){let d=P(h,a,{invertMatch:s.invertMatch,showLineNumbers:s.lineNumber,countOnly:s.count,countMatches:s.countMatches,filename:"",onlyMatching:s.onlyMatching,beforeContext:s.beforeContext,afterContext:s.afterContext,maxCount:s.maxCount,contextSeparator:s.contextSeparator,showColumn:s.column,vimgrep:s.vimgrep,showByteOffset:s.byteOffset,replace:s.replace!==null?D(s.replace):null,passthru:s.passthru,multiline:s.multiline,kResetGroup:c,maxWork:t.limits.maxLoopIterations,maxMatches:t.limits.maxArrayElements,signal:t.signal});return s.quiet?{stdout:"",stderr:"",exitCode:d.matched?0:1}:s.filesWithMatches?{stdout:d.matched?`(standard input)
|
|
13
|
-
`:"",stderr:"",exitCode:d.matched?0:1}:s.filesWithoutMatch?{stdout:d.matched?"":`(standard input)
|
|
14
|
-
`,stderr:"",exitCode:d.matched?1:0}:{stdout:d.output,stderr:"",exitCode:d.matched?0:1}}let m=n.length===0?["."]:n,y=null;s.noIgnore||(y=await R(t.fs,t.cwd,s.noIgnoreDot,s.noIgnoreVcs,s.ignoreFiles));let S=new A;for(let g of s.typeClear)S.clearType(g);for(let g of s.typeAdd)S.addType(g);let{files:b,singleExplicitFile:u}=await oe(t,m,s,y,S);if(b.length===0)return{stdout:"",stderr:"",exitCode:1};let w=!s.noFilename&&(s.withFilename||!u||b.length>1),v=s.lineNumber;return r||(u&&b.length===1&&(v=!1),s.onlyMatching&&(v=!1)),We(t,b,a,s,w,v,c)}function Fe(e,t){return e.caseSensitive?!1:e.ignoreCase?!0:e.smartCase?!t.some(s=>/[A-Z]/.test(s)):!1}function $e(e,t,s){let n;return e.length===1?n=e[0]:n=e.map(r=>t.fixedStrings?r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):`(?:${r})`).join("|"),J(n,{mode:t.fixedStrings&&e.length===1?"fixed":"perl",ignoreCase:s,wholeWord:t.wordRegexp,lineRegexp:t.lineRegexp,multiline:t.multiline,multilineDotall:t.multilineDotall})}async function oe(e,t,s,n,r){let i=[],l=new Z({limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"rg"}),o=0,a=0;for(let f of t){l.checkpoint();let h=e.fs.resolvePath(e.cwd,f);try{let m=await e.fs.stat(h);if(m.isFile){if(o++,s.maxFilesize>0&&m.size>s.maxFilesize)continue;if(ce(f,s,n,h,r)){if(i.length>=e.limits.maxArrayElements)throw new M(`rg: file collection limit exceeded (${e.limits.maxArrayElements})`,"array_elements");i.push(f)}}else m.isDirectory&&(a++,await ae(e,f,h,0,s,n,r,i,l,new Set))}catch(m){N(m)}}return{files:s.sort==="path"?i.sort():i,singleExplicitFile:o===1&&a===0}}async function ae(e,t,s,n,r,i,l,o,a,c){if(n>=r.maxDepth)return;a.visit(n);let f;if(r.followSymlinks)try{let h=await e.fs.stat(s);if(f=h.identity!==void 0?`identity:${h.identity}`:h.dev!==void 0&&h.ino!==void 0?`inode:${String(h.dev)}:${String(h.ino)}`:`path:${await e.fs.realpath(s)}`,c.has(f))return;c.add(f)}catch(h){N(h);return}i&&await i.loadForDirectory(s);try{let h=e.fs.readdirWithFileTypes?await e.fs.readdirWithFileTypes(s):(await e.fs.readdir(s)).map(m=>({name:m,isFile:void 0}));for(let m of h){a.checkpoint();let y=m.name;if(!r.noIgnore&&E.isCommonIgnored(y))continue;let S=y.startsWith("."),b=t==="."?y:t==="./"?`./${y}`:t.endsWith("/")?`${t}${y}`:`${t}/${y}`,u=e.fs.resolvePath(s,y),w,v,g=!1;if(m.isFile!==void 0&&"isDirectory"in m){let p=m;if(g=p.isSymbolicLink===!0,g&&!r.followSymlinks)continue;if(g&&r.followSymlinks)try{let C=await e.fs.stat(u);w=C.isFile,v=C.isDirectory}catch{continue}else w=p.isFile,v=p.isDirectory}else try{let p=e.fs.lstat?await e.fs.lstat(u):await e.fs.stat(u);if(g=p.isSymbolicLink===!0,g&&!r.followSymlinks)continue;let C=g&&r.followSymlinks?await e.fs.stat(u):p;w=C.isFile,v=C.isDirectory}catch{continue}if(!i?.matches(u,v)&&!(S&&!r.hidden&&!i?.isWhitelisted(u,v))){if(v)await ae(e,b,u,n+1,r,i,l,o,a,c);else if(w){if(a.visit(n+1),r.maxFilesize>0)try{if((await e.fs.stat(u)).size>r.maxFilesize)continue}catch{continue}if(ce(b,r,i,u,l)){if(o.length>=e.limits.maxArrayElements)throw new M(`rg: file collection limit exceeded (${e.limits.maxArrayElements})`,"array_elements");o.push(b)}}}}}catch(h){N(h)}finally{f!==void 0&&c.delete(f)}}function ce(e,t,s,n,r){let i=e.split("/").pop()||e;if(s?.matches(n,!1)||t.types.length>0&&!r.matchesType(i,t.types)||t.typesNot.length>0&&r.matchesType(i,t.typesNot))return!1;if(t.globs.length>0){let l=t.globCaseInsensitive,o=t.globs.filter(c=>!c.startsWith("!")),a=t.globs.filter(c=>c.startsWith("!")).map(c=>c.slice(1));if(o.length>0){let c=!1;for(let f of o)if(F(i,f,l)||F(e,f,l)){c=!0;break}if(!c)return!1}for(let c of a)if(c.startsWith("/")){let f=c.slice(1);if(F(e,f,l))return!1}else if(F(i,c,l)||F(e,c,l))return!1}if(t.iglobs.length>0){let l=t.iglobs.filter(a=>!a.startsWith("!")),o=t.iglobs.filter(a=>a.startsWith("!")).map(a=>a.slice(1));if(l.length>0){let a=!1;for(let c of l)if(F(i,c,!0)||F(e,c,!0)){a=!0;break}if(!a)return!1}for(let a of o)if(a.startsWith("/")){let c=a.slice(1);if(F(e,c,!0))return!1}else if(F(i,a,!0)||F(e,a,!0))return!1}return!0}function F(e,t,s=!1){let n="^";for(let r=0;r<t.length;r++){let i=t[r];if(i==="*")t[r+1]==="*"?(n+=".*",r++):n+="[^/]*";else if(i==="?")n+="[^/]";else if(i==="["){let l=r+1;for(l<t.length&&t[l]==="!"&&l++,l<t.length&&t[l]==="]"&&l++;l<t.length&&t[l]!=="]";)l++;if(l<t.length){let o=t.slice(r,l+1);o.startsWith("[!")&&(o=`[^${o.slice(2)}`),n+=o,r=l}else n+="\\["}else n+=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}return n+="$",W(n,s?"i":"").test(e)}async function Me(e,t,s){let n=null;s.noIgnore||(n=await R(e.fs,e.cwd,s.noIgnoreDot,s.noIgnoreVcs,s.ignoreFiles));let r=new A;for(let f of s.typeClear)r.clearType(f);for(let f of s.typeAdd)r.addType(f);let i=t.length===0?["."]:t,{files:l}=await oe(e,i,s,n,r);if(l.length===0)return{stdout:"",stderr:"",exitCode:1};if(s.quiet)return{stdout:"",stderr:"",exitCode:0};let o=s.nullSeparator?"\0":`
|
|
15
|
-
`,a=new V(Math.min(e.limits.maxOutputSize,e.limits.maxStringLength),"rg");for(let f of l)a.append(f).append(o);return{stdout:a.build(),stderr:"",exitCode:0}}function ke(e,t){if(t.length===0)return!0;for(let s of t)if(F(e,s,!1))return!0;return!1}async function Le(e,t,s,n){let r;try{if(n.preprocessor&&e.exec){let f=s.split("/").pop()||s;if(ke(f,n.preprocessorGlobs)){let h=await e.exec(K([n.preprocessor]),{cwd:e.cwd,signal:e.signal,args:[t]});if(h.exitCode===0&&h.stdout){r=e.executionScope?.reserveBytes("rg preprocessor text",h.stdout.length,"rg preprocessor");let m=T(h.stdout);e.executionScope?.consumeInput(G(m),"rg preprocessor");let y=m.slice(0,8192);return{content:m,isBinary:y.includes("\0"),lease:r}}}}if(n.searchZip&&s.endsWith(".gz")){let f=await e.fs.stat(t),h=e.executionScope?.reserveBytes("rg compressed input",f.size,"rg"),m=await e.fs.readFileBuffer(t);if(m.byteLength>f.size)throw h?.release(),new M("rg: file grew while being read","string_length");if(e.executionScope?.consumeInput(m.byteLength,"rg"),Se(m)){let y;try{let S=Math.min(e.limits.maxStringLength,e.limits.maxOutputSize,Math.floor((e.executionScope?.remainingLiveBytes??e.limits.maxLiveBytes)/2));y=e.executionScope?.reserveBytes("rg decompressed text",S*2,"rg");let b=ve(m,{maxOutputLength:S}),u=new TextDecoder().decode(b),w=u.slice(0,8192);return{content:u,isBinary:w.includes("\0"),lease:Ne(h,y)}}catch(S){return y?.release(),h?.release(),N(S),null}}h?.release()}let i=await e.fs.stat(t);r=e.executionScope?.reserveBytes("rg file text",i.size*2,"rg");let l=await _(e.fs,t),o=l.length;if(o>i.size)throw new M("rg: file grew while being read","string_length");e.executionScope?.consumeInput(o,"rg");let a=T(l,e.limits.maxStringLength),c=a.slice(0,8192);return{content:a,isBinary:c.includes("\0"),lease:r}}catch(i){return r?.release(),N(i),null}}function Ne(...e){let t=e.filter(s=>s!==void 0);if(t.length!==0)return{release:()=>{for(let s of t)s.release()}}}async function We(e,t,s,n,r,i,l){let o="",a=!1,c=[],f=0,h=0,m=0,y=n.searchZip?2:50;e:for(let u=0;u<t.length;u+=y){let w=t.slice(u,u+y),v=await Promise.all(w.map(async g=>{let d=e.fs.resolvePath(e.cwd,g),x=await Le(e,d,g,n);if(!x)return null;let{content:p,isBinary:C,lease:$}=x;if(m+=p.length,C&&!n.searchBinary)return $?.release(),null;let L=r&&!n.heading?g:"";try{let I=P(p,s,{invertMatch:n.invertMatch,showLineNumbers:i,countOnly:n.count,countMatches:n.countMatches,filename:L,onlyMatching:n.onlyMatching,beforeContext:n.beforeContext,afterContext:n.afterContext,maxCount:n.maxCount,contextSeparator:n.contextSeparator,showColumn:n.column,vimgrep:n.vimgrep,showByteOffset:n.byteOffset,replace:n.replace!==null?D(n.replace):null,passthru:n.passthru,multiline:n.multiline,kResetGroup:l,maxWork:e.limits.maxLoopIterations,maxMatches:e.limits.maxArrayElements,signal:e.signal});return n.json&&I.matched?{file:g,result:I,content:p,isBinary:!1,lease:$}:($?.release(),{file:g,result:I})}catch(I){throw $?.release(),I}}));for(let g of v){if(!g)continue;let{file:d,result:x}=g;if(x.matched){if(a=!0,h++,f+=x.matchCount,n.quiet&&!n.json)break e;if(n.json&&!n.quiet){let p=g.content||"";c.push(JSON.stringify({type:"begin",data:{path:{text:d}}}));let C=p.split(`
|
|
16
|
-
`);s.lastIndex=0;let $=0;for(let L=0;L<C.length;L++){let I=C[L];s.lastIndex=0;let B=[];for(let k=s.exec(I);k!==null;k=s.exec(I)){let U={match:{text:k[0]},start:k.index,end:k.index+k[0].length};n.replace!==null&&(U.replacement={text:n.replace}),B.push(U),k[0].length===0&&s.lastIndex++}if(B.length>0){let k={type:"match",data:{path:{text:d},lines:{text:`${I}
|
|
17
|
-
`},line_number:L+1,absolute_offset:$,submatches:B}};c.push(JSON.stringify(k))}$+=I.length+1}c.push(JSON.stringify({type:"end",data:{path:{text:d},binary_offset:null,stats:{elapsed:{secs:0,nanos:0,human:"0s"},searches:1,searches_with_match:1,bytes_searched:p.length,bytes_printed:0,matched_lines:x.matchCount,matches:x.matchCount}}}))}else if(n.filesWithMatches){let p=n.nullSeparator?"\0":`
|
|
18
|
-
`;o+=`${d}${p}`}else n.filesWithoutMatch||(n.heading&&!n.noFilename&&(o+=`${d}
|
|
19
|
-
`),o+=x.output)}else if(n.filesWithoutMatch){let p=n.nullSeparator?"\0":`
|
|
20
|
-
`;o+=`${d}${p}`}else n.includeZero&&(n.count||n.countMatches)&&(o+=x.output);g.lease?.release()}}n.json&&(c.push(JSON.stringify({type:"summary",data:{elapsed_total:{secs:0,nanos:0,human:"0s"},stats:{elapsed:{secs:0,nanos:0,human:"0s"},searches:t.length,searches_with_match:h,bytes_searched:m,bytes_printed:0,matched_lines:f,matches:f}}})),o=`${c.join(`
|
|
21
|
-
`)}
|
|
22
|
-
`);let S=n.quiet&&!n.json?"":o;if(n.stats&&!n.json){let u=["",`${f} matches`,`${f} matched lines`,`${h} files contained matches`,`${t.length} files searched`,`${m} bytes searched`].join(`
|
|
23
|
-
`);S+=`${u}
|
|
24
|
-
`}let b;return n.filesWithoutMatch?b=o.length>0?0:1:b=a?0:1,{stdout:S,stderr:"",exitCode:b}}var Be={name:"rg",summary:"recursively search for a pattern",usage:"rg [OPTIONS] PATTERN [PATH ...]",description:`rg (ripgrep) recursively searches directories for a regex pattern.
|
|
25
|
-
Unlike grep, rg is recursive by default and respects .gitignore files.
|
|
26
|
-
|
|
27
|
-
EXAMPLES:
|
|
28
|
-
rg foo Search for 'foo' in current directory
|
|
29
|
-
rg foo src/ Search in src/ directory
|
|
30
|
-
rg -i foo Case-insensitive search
|
|
31
|
-
rg -w foo Match whole words only
|
|
32
|
-
rg -t js foo Search only JavaScript files
|
|
33
|
-
rg -g '*.ts' foo Search files matching glob
|
|
34
|
-
rg --hidden foo Include hidden files
|
|
35
|
-
rg -l foo List files with matches only`,options:["-e, --regexp PATTERN search for PATTERN (can be used multiple times)","-f, --file FILE read patterns from FILE, one per line","-i, --ignore-case case-insensitive search","-s, --case-sensitive case-sensitive search (overrides smart-case)","-S, --smart-case smart case (default: case-insensitive unless pattern has uppercase)","-F, --fixed-strings treat pattern as literal string","-w, --word-regexp match whole words only","-x, --line-regexp match whole lines only","-v, --invert-match select non-matching lines","-r, --replace TEXT replace matches with TEXT","-c, --count print count of matching lines per file"," --count-matches print count of individual matches per file","-l, --files-with-matches print only file names with matches"," --files-without-match print file names without matches"," --files list files that would be searched","-o, --only-matching print only matching parts","-m, --max-count NUM stop after NUM matches per file","-q, --quiet suppress output, exit 0 on match"," --stats print search statistics","-n, --line-number print line numbers (default: on)","-N, --no-line-number do not print line numbers","-I, --no-filename suppress the prefixing of file names","-0, --null use NUL as filename separator","-b, --byte-offset show byte offset of each match"," --column show column number of first match"," --vimgrep show results in vimgrep format"," --json show results in JSON Lines format","-A NUM print NUM lines after each match","-B NUM print NUM lines before each match","-C NUM print NUM lines before and after each match"," --context-separator SEP separator for context groups (default: --)","-U, --multiline match patterns across lines","-z, --search-zip search in compressed files (gzip only)","-g, --glob GLOB include files matching GLOB","-t, --type TYPE only search files of TYPE (e.g., js, py, ts)","-T, --type-not TYPE exclude files of TYPE","-L, --follow follow symbolic links","-u, --unrestricted reduce filtering (-u: no ignore, -uu: +hidden, -uuu: +binary)","-a, --text search binary files as text"," --hidden search hidden files and directories"," --no-ignore don't respect .gitignore/.ignore files","-d, --max-depth NUM maximum search depth"," --sort TYPE sort files (path, none)"," --heading show file path above matches"," --passthru print all lines (non-matches use - separator)"," --include-zero include files with 0 matches in count output"," --type-list list all available file types"," --help display this help and exit"]},lt={name:"rg",async execute(e,t){if(H(e))return q(Be);if(e.includes("--type-list"))return{stdout:Q(),stderr:"",exitCode:0};let s=ne(e);return s.success?le({ctx:t,options:s.options,paths:s.paths,explicitLineNumbers:s.explicitLineNumbers}):s.error}},ot={name:"rg",flags:[{flag:"-i",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-o",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-N",type:"boolean"},{flag:"--hidden",type:"boolean"},{flag:"--no-ignore",type:"boolean"},{flag:"-m",type:"value",valueHint:"number"},{flag:"-A",type:"value",valueHint:"number"},{flag:"-B",type:"value",valueHint:"number"},{flag:"-C",type:"value",valueHint:"number"},{flag:"-g",type:"value",valueHint:"pattern"},{flag:"-t",type:"value",valueHint:"string"},{flag:"-T",type:"value",valueHint:"string"}],needsArgs:!0};export{lt as a,ot as b};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{l as u}from"./chunk-EFORKKSH.js";var m=new Set(["__proto__","constructor","prototype"]),E=new Set([...m,"__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]);function O(e,n){if(Array.isArray(e))throw new TypeError(`${n}: expected object, got array`);if(Object.getPrototypeOf(e)!==null)throw new TypeError(`${n}: expected null-prototype object, got prototypal object`)}function b(e){return!m.has(e)}function A(e,n,p){O(e,"safeSet"),b(n)&&(e[n]=p)}function j(e,n){return O(e,"safeHasOwn"),Object.hasOwn(e,n)}function D(e,n={}){let p=n.maxDepth??2e3,o=n.maxElements??1e6,_=new WeakMap,i=n.elementBudget??{used:0};if(!Number.isSafeInteger(i.used)||i.used<0||i.used>o)throw new u(`query input element limit exceeded (${o})`,"array_elements");let x=()=>{if(++i.used>o)throw new u(`query input element limit exceeded (${o})`,"array_elements")},y=(t,r,c)=>{if(t===null||typeof t!="object"||t instanceof Date)return t;let l=_.get(t);if(l!==void 0)return l;if(r>p)throw new u(`query depth limit exceeded (${p})`,"recursion");let a=Array.isArray(t)?[]:Object.create(null);return _.set(t,a),c.push({source:t,target:a,depth:r}),a},f=[],h=y(e,0,f);for(;f.length>0;){let t=f.pop();if(!t)break;let{source:r,target:c,depth:l}=t;if(Array.isArray(r)&&Array.isArray(c)){if(r.length>o-i.used)throw new u(`query input element limit exceeded (${o})`,"array_elements");c.length=r.length;for(let s=r.length-1;s>=0;s--)x(),c[s]=y(r[s],l+1,f);continue}let a=r,w=c,d=Object.keys(a);if(d.length>o-i.used)throw new u(`query input element limit exceeded (${o})`,"array_elements");for(let s=0;s<d.length;s++){x();let g=d[s];w[g]=y(a[g],l+1,f)}}return h}function k(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function P(e){return Object.assign(Object.create(null),e)}function $(e){return Object.assign(Object.create(null),e)}function G(...e){return Object.assign(Object.create(null),...e)}export{b as a,A as b,j as c,D as d,k as e,P as f,$ as g,G as h};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-W5DWRFSU.js";import{c}from"./chunk-QAYAQNCG.js";function h(s){let a=s.replace(/\//g,"-"),r=new Date(a);if(!Number.isNaN(r.getTime()))return r;let i=a.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(i){let[,o,l,f]=i;if(r=new Date(Number.parseInt(o,10),Number.parseInt(l,10)-1,Number.parseInt(f,10)),!Number.isNaN(r.getTime()))return r}let u=a.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(u){let[,o,l,f,t,e,d]=u;if(r=new Date(Number.parseInt(o,10),Number.parseInt(l,10)-1,Number.parseInt(f,10),Number.parseInt(t,10),Number.parseInt(e,10),Number.parseInt(d,10)),!Number.isNaN(r.getTime()))return r}return null}var N={name:"touch",async execute(s,a){let r=[],i=null,u=!1;for(let t=0;t<s.length;t++){let e=s[t];if(e==="--"){r.push(...s.slice(t+1));break}else if(e==="-d"||e==="--date"){if(t+1>=s.length)return{stdout:"",stderr:`touch: option requires an argument -- 'd'
|
|
3
|
-
`,exitCode:1};i=s[++t]}else if(e.startsWith("--date="))i=e.slice(7);else if(e==="-c"||e==="--no-create")u=!0;else if(e==="-a"||e==="-m"||e==="-r"||e==="-t")(e==="-r"||e==="-t")&&t++;else{if(e.startsWith("--"))return c("touch",e);if(e.startsWith("-")&&e.length>1){let d=!1;for(let n of e.slice(1))if(n==="c")u=!0;else if(!(n==="a"||n==="m"))if(n==="d"){if(t+1>=s.length)return{stdout:"",stderr:`touch: option requires an argument -- 'd'
|
|
4
|
-
`,exitCode:1};i=s[++t],d=!0;break}else if(n==="r"||n==="t"){t++,d=!0;break}else return c("touch",`-${n}`);if(d)continue}else r.push(e)}}if(r.length===0)return{stdout:"",stderr:`touch: missing file operand
|
|
5
|
-
`,exitCode:1};let o=null;if(i!==null&&(o=h(i),o===null))return{stdout:"",stderr:`touch: invalid date format '${i}'
|
|
6
|
-
`,exitCode:1};let l="",f=0;for(let t of r)try{let e=a.fs.resolvePath(a.cwd,t);if(!await a.fs.exists(e)){if(u)continue;await a.fs.writeFile(e,"")}let n=o??new Date;await a.fs.utimes(e,n,n)}catch(e){l+=`touch: cannot touch '${t}': ${m(e)}
|
|
7
|
-
`,f=1}return{stdout:"",stderr:l,exitCode:f}}},b={name:"touch",flags:[{flag:"-c",type:"boolean"},{flag:"-a",type:"boolean"},{flag:"-m",type:"boolean"},{flag:"-d",type:"value",valueHint:"string"}],needsArgs:!0};export{N as a,b};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{c as u,d as l}from"./chunk-DIWMSSQY.js";import{a as r}from"./chunk-GN6CQ3J4.js";import{a as p,c as o}from"./chunk-QAYAQNCG.js";var y={name:"yes",summary:"output a string repeatedly",usage:"yes [STRING]...",description:["Repeatedly output a line with all specified STRING(s), or 'y'."],options:[" --help display this help and exit"],notes:["Real yes writes until its reader goes away. Pipelines here are not","streaming \u2014 a stage runs to completion before the next one starts \u2014 so","yes stops on its own after executionLimits.maxLoopIterations lines, or","earlier if the repeated line would exceed the output size limit.","`yes | head -3` therefore behaves as expected; an unbounded consumer","sees a finite stream."]},x={name:"yes",async execute(m,s){let t=[],i=!1;for(let e of m){if(i){t.push(e);continue}if(e==="--"){i=!0;continue}if(e==="--help")return p(y);if(e.startsWith("--"))return o("yes",e);if(e.startsWith("-")&&e!=="-")return o("yes",`-${e[1]}`);t.push(e)}let n=Math.min(s.limits.maxStringLength,s.limits.maxOutputSize),a=t.length>0?`${l(t," ",n,"yes")}
|
|
3
|
-
`:`y
|
|
4
|
-
`,d=Math.floor(n/r(a)),h=Math.min(s.limits.maxLoopIterations,Math.max(1,d));return{stdout:u(a,h,n,"yes"),stderr:"",exitCode:0}}},w={name:"yes",flags:[]};export{x as a,w as b};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
var u=new TextDecoder("utf-8",{fatal:!0}),y=new TextEncoder,d=512*1024*1024;function f(t,n,e){if(!Number.isSafeInteger(t)||t<0||!Number.isSafeInteger(n)||n<0||t>n)throw new RangeError(`${e}: byte conversion limit exceeded (${n} bytes)`)}function x(t){let n=0;for(let e=0;e<t.length;e++){let o=t.charCodeAt(e);if(o<=127)n++;else if(o<=2047)n+=2;else if(o>=55296&&o<=56319&&e+1<t.length){let r=t.charCodeAt(e+1);r>=56320&&r<=57343?(n+=4,e++):n+=3}else n+=3}return n}function h(t){return t}function p(t){return t}function a(t,n=d){let e=t;if(!e)return e;f(e.length,n,"UTF-8 decode");let o=!1;for(let i=0;i<e.length;i++){let c=e.charCodeAt(i);if(c>255)return e;c>127&&(o=!0)}if(!o)return e;let r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);try{return u.decode(r)}catch{return e}}function l(t,n=d){if(!t)return t;f(x(t),n,"UTF-8 encode");let e=y.encode(t),o="";for(let r=0;r<e.length;r++)o+=String.fromCharCode(e[r]);return o}var b="";function g(t,n=d){f(t.byteLength,n,"byte-string conversion");let e="";for(let o=0;o<t.length;o++)e+=String.fromCharCode(t[o]);return e}async function B(t,n){return typeof t.readFileBytes=="function"?t.readFileBytes(n):g(await t.readFileBuffer(n))}function s(t){return t.stdoutKind?t.stdoutKind:t.stdoutEncoding==="binary"?"bytes":"text"}function F(t){return s(t)==="bytes"?t.stdout:l(t.stdout)}function T(t){return s(t)==="bytes"?a(t.stdout):t.stdout}function C(t){return{stdout:t,stdoutKind:"text"}}function E(t){return{stdout:t,stdoutKind:"bytes",stdoutEncoding:"binary"}}export{x as a,h as b,p as c,a as d,l as e,b as f,B as g,s as h,F as i,T as j,C as k,E as l};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{b as P,c as F,d as O,e as T}from"./chunk-2WBUTDF5.js";import{b as S}from"./chunk-YUSFCOM7.js";import{l as v,m as w}from"./chunk-EFORKKSH.js";import{a as D}from"./chunk-W5DWRFSU.js";import{a as E}from"./chunk-QIQMJJZ4.js";import{a as $,b as C}from"./chunk-QAYAQNCG.js";var R={name:"cp",summary:"copy files and directories",usage:"cp [OPTION]... SOURCE... DEST",options:["-r, -R, --recursive copy directories recursively","-n, --no-clobber do not overwrite an existing file","-p, --preserve preserve file attributes","-v, --verbose explain what is being done"," --help display this help and exit"]},H={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},preserve:{short:"p",long:"preserve",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},j={name:"cp",async execute(u,e){if(C(u))return $(R);let s=E("cp",u,H);if(!s.ok)return s.error;let d=s.result.flags.recursive||s.result.flags.recursiveUpper,k=s.result.flags.noClobber,A=s.result.flags.preserve,N=s.result.flags.verbose,p=s.result.positional;if(p.length<2)return{stdout:"",stderr:`cp: missing destination file operand
|
|
3
|
-
`,exitCode:1};let g=p.pop()??"",m=p,l=e.fs.resolvePath(e.cwd,g),y="",n="",i=0,h=new O({limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"cp"}),f=!1;try{f=(await e.fs.stat(l)).isDirectory}catch{}if(m.length>1&&!f)return{stdout:"",stderr:`cp: target '${g}' is not a directory
|
|
4
|
-
`,exitCode:1};for(let t of m)try{let o=e.fs.resolvePath(e.cwd,t),a=await e.fs.stat(o),r=l;if(f){let c=t.split("/").pop()||t;r=l==="/"?`/${c}`:`${l}/${c}`}if(a.isDirectory&&!d){n+=`cp: -r not specified; omitting directory '${t}'
|
|
5
|
-
`,i=1;continue}if(a.isDirectory){let c=await F(e.fs,o,r,h);if(S(o,r)||c==="inside"){n+=`cp: cannot copy '${t}' into itself, '${r}'
|
|
6
|
-
`,i=1;continue}if(c==="unknown"){n+=`cp: cannot safely determine whether '${r}' is inside '${t}'
|
|
7
|
-
`,i=1;continue}}if(k)try{await e.fs.stat(r);continue}catch{}let b=await P(e.fs,o,r);if(b==="same"){n+=`cp: '${t}' and '${r}' are the same file
|
|
8
|
-
`,i=1;continue}if(b==="unknown"){n+=`cp: cannot safely determine whether '${t}' and '${r}' are the same file
|
|
9
|
-
`,i=1;continue}a.isDirectory&&await T({fs:e.fs,root:o,limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"cp",symlinks:"never",budget:h},()=>{}),await e.fs.cp(o,r,{recursive:d}),N&&(y+=`'${t}' -> '${r}'
|
|
10
|
-
`)}catch(o){if(o instanceof v||o instanceof w)throw o;let a=D(o);a.includes("ENOENT")||a.includes("no such file")?n+=`cp: cannot stat '${t}': No such file or directory
|
|
11
|
-
`:n+=`cp: cannot copy '${t}': ${a}
|
|
12
|
-
`,i=1}return{stdout:y,stderr:n,exitCode:i}}},q={name:"cp",flags:[{flag:"-r",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-p",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{j as a,q as b};
|