just-bash 3.6.0 → 3.6.2
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 +59 -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/dist-Q3QP7DWN.js +141 -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/dist-Q3QP7DWN.js +141 -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 +2 -2
- 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/dist-4NZ74CRE.js +0 -141
- 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/dist-4NZ74CRE.js +0 -141
- 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
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{c as m}from"./chunk-R3HY2GCO.js";import{d}from"./chunk-U3UTFNHI.js";import{a as y}from"./chunk-QIQMJJZ4.js";import{a as f,b as g}from"./chunk-QAYAQNCG.js";var T={name:"uniq",summary:"report or omit repeated lines",usage:"uniq [OPTION]... [INPUT [OUTPUT]]",options:["-c, --count prefix lines by the number of occurrences","-d, --repeated only print duplicate lines","-i, --ignore-case ignore case when comparing","-u, --unique only print unique lines"," --help display this help and exit"]},w={count:{short:"c",long:"count",type:"boolean"},duplicatesOnly:{short:"d",long:"repeated",type:"boolean"},uniqueOnly:{short:"u",long:"unique",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},$={name:"uniq",async execute(p,h){if(g(p))return f(T);let o=y("uniq",p,w);if(!o.ok)return o.error;let{count:q,duplicatesOnly:b,uniqueOnly:C,ignoreCase:a}=o.result.flags,x=o.result.positional,r=await m(h,x,{cmdName:"uniq"});if(!r.ok)return r.error;let t=(a?d(r.content):r.content).split(`
|
|
3
|
+
`);if(t.length>0&&t[t.length-1]===""&&t.pop(),t.length===0)return{stdout:"",stderr:"",exitCode:0};let n=[],i=t[0],s=1,O=(e,u)=>a?e.toLowerCase()===u.toLowerCase():e===u;for(let e=1;e<t.length;e++)O(t[e],i)?s++:(n.push({line:i,count:s}),i=t[e],s=1);n.push({line:i,count:s});let c=n;b?c=n.filter(e=>e.count>1):C&&(c=n.filter(e=>e.count===1));let l="";for(let{line:e,count:u}of c)q?l+=`${String(u).padStart(4)} ${e}
|
|
4
|
+
`:l+=`${e}
|
|
5
|
+
`;return a?{stdout:l,stderr:"",exitCode:0}:{stdout:l,stderr:"",exitCode:0,stdoutKind:"bytes",stdoutEncoding:"binary"}}},k={name:"uniq",flags:[{flag:"-c",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-u",type:"boolean"},{flag:"-i",type:"boolean"}],stdinType:"text",needsFiles:!0};export{$ as a,k as b};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as T}from"./chunk-BLTFJFWH.js";import{a as R}from"./chunk-L2UW7DWF.js";import{l}from"./chunk-IQGNPH54.js";import{a as p,d as P}from"./chunk-U3UTFNHI.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};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{l as p}from"./chunk-IQGNPH54.js";import{f as m,g as d}from"./chunk-U3UTFNHI.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};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{e as F}from"./chunk-JMGGZYF2.js";import{l as d,m as h}from"./chunk-IQGNPH54.js";import{a as x}from"./chunk-QIQMJJZ4.js";import{a as g,b as z}from"./chunk-QAYAQNCG.js";var $={name:"du",summary:"estimate file space usage",usage:"du [OPTION]... [FILE]...",options:["-a write counts for all files, not just directories","-h print sizes in human readable format","-s display only a total for each argument","-c produce a grand total","--max-depth=N print total for directory only if N or fewer levels deep"," --help display this help and exit"]},b={allFiles:{short:"a",type:"boolean"},humanReadable:{short:"h",type:"boolean"},summarize:{short:"s",type:"boolean"},grandTotal:{short:"c",type:"boolean"},maxDepth:{long:"max-depth",type:"number"}},R={name:"du",async execute(t,s){if(z(t))return g($);let a=x("du",t,b);if(!a.ok)return a.error;let l={allFiles:a.result.flags.allFiles,humanReadable:a.result.flags.humanReadable,summarize:a.result.flags.summarize,grandTotal:a.result.flags.grandTotal,maxDepth:a.result.flags.maxDepth??null},i=a.result.positional;i.length===0&&i.push(".");let n="",o="",e=0;for(let u of i){let f=s.fs.resolvePath(s.cwd,u);try{await s.fs.stat(f);let r=await w(s,f,u,l,0);n+=r.output,e+=r.totalSize,o+=r.stderr}catch(r){if(r instanceof d||r instanceof h)throw r;o+=`du: cannot access '${u}': No such file or directory
|
|
3
|
+
`}}return l.grandTotal&&i.length>0&&(n+=`${p(e,l.humanReadable)} total
|
|
4
|
+
`),{stdout:n,stderr:o,exitCode:o?1:0}}};async function w(t,s,a,l,i){let n={output:"",totalSize:0,stderr:""},o=new Map;return await F({fs:t.fs,root:s,limits:t.limits,signal:t.signal,executionScope:t.executionScope,site:"du",symlinks:"never",includeLeave:!0},e=>{let u=e.path.slice(s.length).replace(/^\//,""),f=u?a==="."?u:`${a}/${u}`:a,r=e.path==="/"?"/":e.path.slice(0,e.path.lastIndexOf("/"))||"/";if(e.phase==="enter"){if(e.stat.isDirectory){o.set(e.path,0);return}o.set(r,(o.get(r)??0)+e.stat.size),(l.allFiles||e.depth===i)&&!l.summarize&&(n.output+=`${p(e.stat.size,l.humanReadable)} ${f}
|
|
5
|
+
`),e.depth===i&&(n.totalSize=e.stat.size);return}let m=o.get(e.path)??0;e.depth>i?o.set(r,(o.get(r)??0)+m):n.totalSize=m;let c=e.depth-i;(l.summarize&&c===0||!l.summarize&&(l.maxDepth===null||c<=l.maxDepth))&&(n.output+=`${p(m,l.humanReadable)} ${f}
|
|
6
|
+
`)}),n}function p(t,s){return s?t<1024?`${t}`:t<1024*1024?`${(t/1024).toFixed(1)}K`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)}M`:`${(t/(1024*1024*1024)).toFixed(1)}G`:String(Math.ceil(t/1024)||1)}var E={name:"du",flags:[{flag:"-a",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"--max-depth",type:"value",valueHint:"number"}],needsFiles:!0};export{R as a,E as b};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as F}from"./chunk-CIY4XCGA.js";import{a as M}from"./chunk-T7CFNHX6.js";import{l as x}from"./chunk-IQGNPH54.js";import{d as T}from"./chunk-U3UTFNHI.js";import{a as _}from"./chunk-FOCWZZDE.js";import{a as P}from"./chunk-QIQMJJZ4.js";import{a as q,b as B}from"./chunk-QAYAQNCG.js";var $={name:"tr",summary:"translate or delete characters",usage:"tr [OPTION]... SET1 [SET2]",options:["-c, -C, --complement use the complement of SET1","-d, --delete delete characters in SET1","-s, --squeeze-repeats squeeze repeated characters"," --help display this help and exit"],description:`SET syntax:
|
|
3
|
+
a-z character range
|
|
4
|
+
[:alnum:] all letters and digits
|
|
5
|
+
[:alpha:] all letters
|
|
6
|
+
[:digit:] all digits
|
|
7
|
+
[:lower:] all lowercase letters
|
|
8
|
+
[:upper:] all uppercase letters
|
|
9
|
+
[:space:] all whitespace
|
|
10
|
+
[:blank:] horizontal whitespace
|
|
11
|
+
[:punct:] all punctuation
|
|
12
|
+
[:print:] all printable characters
|
|
13
|
+
[:graph:] all printable characters except space
|
|
14
|
+
[:cntrl:] all control characters
|
|
15
|
+
[:xdigit:] all hexadecimal digits
|
|
16
|
+
\\n, \\t, \\r escape sequences`},k=new Map([["[:alnum:]","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"],["[:alpha:]","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"],["[:blank:]"," "],["[:cntrl:]",Array.from({length:32},(l,s)=>String.fromCharCode(s)).join("").concat("\x7F")],["[:digit:]","0123456789"],["[:graph:]",Array.from({length:94},(l,s)=>String.fromCharCode(33+s)).join("")],["[:lower:]","abcdefghijklmnopqrstuvwxyz"],["[:print:]",Array.from({length:95},(l,s)=>String.fromCharCode(32+s)).join("")],["[:punct:]","!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"],["[:space:]",`
|
|
17
|
+
\r\f\v`],["[:upper:]","ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["[:xdigit:]","0123456789ABCDEFabcdef"]]);function I(l,s,d,y){let h="",r=0,c=e=>{if(e.length>s-h.length)throw new x(`tr: expanded SET exceeds string length limit (${s})`,"string_length");h+=e},g=(e=1)=>{if(e>d-y.iterations)throw new x(`tr: SET expansion iteration limit exceeded (${d})`,"iterations");y.iterations+=e};for(;r<l.length;){if(g(),l[r]==="["&&l[r+1]===":"){let e=!1;for(let[p,f]of k)if(l.slice(r).startsWith(p)){c(f),r+=p.length,e=!0;break}if(e)continue}if(l[r]==="\\"&&r+1<l.length){let e=l[r+1];c(e==="n"?`
|
|
18
|
+
`:e==="t"?" ":e==="r"?"\r":e),r+=2;continue}if(r+2<l.length&&l[r+1]==="-"){let e=l.charCodeAt(r),p=l.charCodeAt(r+2),f=p>=e?p-e+1:0;if(g(f),f>s-h.length)throw new x(`tr: expanded SET exceeds string length limit (${s})`,"string_length");for(let m=e;m<=p;m++)h+=String.fromCharCode(m);r+=3;continue}c(l[r]),r++}return h}var L={complement:{short:"c",long:"complement",type:"boolean"},complementUpper:{short:"C",type:"boolean"},delete:{short:"d",long:"delete",type:"boolean"},squeeze:{short:"s",long:"squeeze-repeats",type:"boolean"}},G={name:"tr",async execute(l,s){if(B(l))return q($);let d=P("tr",l,L);if(!d.ok)return d.error;let y=d.result.flags.complement||d.result.flags.complementUpper,h=d.result.flags.delete,r=d.result.flags.squeeze,c=d.result.positional;if(c.length<1)return{stdout:"",stderr:`tr: missing operand
|
|
19
|
+
`,exitCode:1};if(!h&&!r&&c.length<2)return{stdout:"",stderr:`tr: missing operand after SET1
|
|
20
|
+
`,exitCode:1};let g,e,p=Math.min(s.limits.maxInputBytes,s.limits.maxStringLength),f=s.limits.maxLoopIterations,m=s.limits.maxArrayElements,w=Math.min(s.limits.maxOutputSize,s.limits.maxStringLength);try{let t={iterations:0};g=I(c[0],p,f,t),e=c.length>1?I(c[1],p,f,t):""}catch(t){return M(t),{stdout:"",stderr:`${_(t.message)}
|
|
21
|
+
`,exitCode:1}}if(s.stdin.length>p)throw new x(`tr: input size limit exceeded (${p} bytes)`,"string_length");let i=T(s.stdin);if(g.length>m||e.length>m)throw new x(`tr: array element limit exceeded (${m})`,"array_elements");let E=new Set(g),O=new Set(e),b=t=>{let o=E.has(t);return y?!o:o},z=F(i.length<=32768?32768:32),A=0,S=t=>{let o=0;if(t.length===2)o=4;else if(t.length===1){let a=t.charCodeAt(0);o=a<=127?1:a<=2047?2:3}if(o>w-A)throw new x(`tr: output size limit exceeded (${w} bytes)`,"output_size");z.append(t),A+=o};if(h)for(let t=0;t<i.length;){let a=i.codePointAt(t)>65535?i.slice(t,t+2):i[t];t+=a.length,b(a)||S(a)}else if(r&&c.length===1){let t="";for(let o=0;o<i.length;){let n=i.codePointAt(o)>65535?i.slice(o,o+2):i[o];o+=n.length,!(b(n)&&n===t)&&(S(n),t=n)}}else{let t="",o=a=>{r&&O.has(a)&&a===t||(S(a),t=a)};if(y){let a=e.length>0?e[e.length-1]:"";for(let n=0;n<i.length;){let u=i.codePointAt(n)>65535?i.slice(n,n+2):i[n];n+=u.length,E.has(u)?o(u):o(a)}}else{let a=new Map;for(let n=0;n<g.length;n++){let C=n<e.length?e[n]:e[e.length-1];a.set(g[n],C)}for(let n=0;n<i.length;){let u=i.codePointAt(n)>65535?i.slice(n,n+2):i[n];n+=u.length,o(a.get(u)??u)}}}return{stdout:z.finish(),stderr:"",exitCode:0}}},J={name:"tr",flags:[{flag:"-c",type:"boolean"},{flag:"-C",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-s",type:"boolean"}],stdinType:"text",needsArgs:!0};export{G as a,J as b};
|
|
@@ -0,0 +1,12 @@
|
|
|
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-JMGGZYF2.js";import{b as S}from"./chunk-YUSFCOM7.js";import{l as v,m as w}from"./chunk-IQGNPH54.js";import{a as D}from"./chunk-WFEUQRHM.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};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as E}from"./chunk-T7CFNHX6.js";import{a as h}from"./chunk-JMGGZYF2.js";import{l as $}from"./chunk-IQGNPH54.js";import{a as k}from"./chunk-U3UTFNHI.js";import{a as C,b as L,c as F}from"./chunk-QAYAQNCG.js";var A={name:"split",summary:"split a file into pieces",usage:"split [OPTION]... [FILE [PREFIX]]",description:"Output pieces of FILE to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is 'x'.",options:["-l N Put N lines per output file","-b SIZE Put SIZE bytes per output file (K, M, G suffixes)","-n CHUNKS Split into CHUNKS equal-sized files","-d Use numeric suffixes (00, 01, ...) instead of alphabetic","-a LENGTH Use suffixes of length LENGTH (default: 2)","--additional-suffix=SUFFIX Append SUFFIX to file names"],examples:["split -l 100 file.txt # Split into 100-line chunks","split -b 1M file.bin # Split into 1MB chunks","split -n 5 file.txt # Split into 5 equal parts","split -d file.txt part_ # part_00, part_01, ...","split -a 3 -d file.txt x # x000, x001, ..."]},S=1e5,_=0;function U(e){return Uint8Array.from(e,t=>t.charCodeAt(0))}function N(e){let t=e.match(/^(\d+)([KMGTPEZY]?)([B]?)$/i);if(!t)return null;let i=Number(t[1]);if(!Number.isSafeInteger(i)||i<1)return null;let u=(t[2]||"").toUpperCase(),a=new Map([["",1],["K",1024],["M",1024*1024],["G",1024*1024*1024],["T",1024*1024*1024*1024],["P",1024*1024*1024*1024*1024]]).get(u);return a===void 0||i>Math.floor(Number.MAX_SAFE_INTEGER/a)?null:i*a}function x(e){if(!/^[0-9]+$/.test(e))return null;let t=Number(e);return Number.isSafeInteger(t)&&t>=1?t:null}function H(e,t,i){if(t)return e.toString().padStart(i,"0");let u="abcdefghijklmnopqrstuvwxyz",n=new Array(i),a=e;for(let o=i-1;o>=0;o--)n[o]=u[a%26],a=Math.floor(a/26);return n.join("")}function B(e,t){let i=[],u=0,n=0;for(let a=0;a<e.length;a++)e[a]===10&&(n++,n===t&&(i.push(e.subarray(u,a+1)),u=a+1,n=0));return u<e.length&&i.push(e.subarray(u)),i}function T(e,t){let i=[];for(let u=0;u<e.length;u+=t)i.push(e.subarray(u,u+t));return i}function X(e,t){let i=[],u=Math.ceil(e.length/t);for(let n=0;n<t;n++){let a=n*u,o=Math.min(a+u,e.length);a<o&&i.push(e.subarray(a,o))}return i}function z(e,t){let i=e?10**t:26**t;return Number.isSafeInteger(i)?i:Number.MAX_SAFE_INTEGER}function G(e){if(e.existence!=="unknown")return e.existence==="existing"?e.stableIdentity:e.canonicalPath===void 0?void 0:`missing:${e.canonicalPath}`}function I(e,t){return e.existence!==t.existence||e.existence==="unknown"||t.existence==="unknown"?!1:e.existence==="missing"&&t.existence==="missing"?e.canonicalPath===t.canonicalPath:e.existence==="existing"&&t.existence==="existing"?e.stableIdentity!==void 0&&e.stableIdentity===t.stableIdentity:!1}async function M(e,t,i){let u=t.lastIndexOf("/"),n=u<=0?"/":t.slice(0,u),a=t.slice(u+1);for(let o=0;o<100;o++){let d=_++,c=e.fs.resolvePath(n,`.${a}.just-bash-split-${i}-${d}`),p=await h(e.fs,c);if(p.existence==="missing")return c;if(p.existence==="unknown")break}throw new Error("unable to allocate transaction path")}var Z={name:"split",execute:async(e,t)=>{if(L(e))return C(A);let i={mode:"lines",lines:1e3,bytes:0,chunks:0,useNumericSuffix:!1,suffixLength:2,additionalSuffix:""},u=[],n=0;for(;n<e.length;){let s=e[n];if(s==="-l"&&n+1<e.length){let l=x(e[n+1]);if(l===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of lines: '${e[n+1]}'
|
|
3
|
+
`};i.mode="lines",i.lines=l,n+=2}else if(s.match(/^-l\d+$/)){let l=x(s.slice(2));if(l===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of lines: '${s.slice(2)}'
|
|
4
|
+
`};i.mode="lines",i.lines=l,n++}else if(s==="-b"&&n+1<e.length){let l=N(e[n+1]);if(l===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of bytes: '${e[n+1]}'
|
|
5
|
+
`};i.mode="bytes",i.bytes=l,n+=2}else if(s.match(/^-b.+$/)){let l=N(s.slice(2));if(l===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of bytes: '${s.slice(2)}'
|
|
6
|
+
`};i.mode="bytes",i.bytes=l,n++}else if(s==="-n"&&n+1<e.length){let l=x(e[n+1]);if(l===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of chunks: '${e[n+1]}'
|
|
7
|
+
`};i.mode="chunks",i.chunks=l,n+=2}else if(s.match(/^-n\d+$/)){let l=x(s.slice(2));if(l===null)return{exitCode:1,stdout:"",stderr:`split: invalid number of chunks: '${s.slice(2)}'
|
|
8
|
+
`};i.mode="chunks",i.chunks=l,n++}else if(s==="-a"&&n+1<e.length){let l=x(e[n+1]);if(l===null||l>Math.min(t.limits.maxStringLength,t.limits.maxArrayElements))return{exitCode:1,stdout:"",stderr:`split: invalid suffix length: '${e[n+1]}'
|
|
9
|
+
`};i.suffixLength=l,n+=2}else if(s.match(/^-a\d+$/)){let l=x(s.slice(2));if(l===null||l>Math.min(t.limits.maxStringLength,t.limits.maxArrayElements))return{exitCode:1,stdout:"",stderr:`split: invalid suffix length: '${s.slice(2)}'
|
|
10
|
+
`};i.suffixLength=l,n++}else if(s==="-d"||s==="--numeric-suffixes")i.useNumericSuffix=!0,n++;else if(s.startsWith("--additional-suffix="))i.additionalSuffix=s.slice(20),n++;else if(s==="--additional-suffix"&&n+1<e.length)i.additionalSuffix=e[n+1],n+=2;else if(s==="--"){u.push(...e.slice(n+1));break}else{if(s.startsWith("-")&&s!=="-")return F("split",s);u.push(s),n++}}let a="-",o="x";if(u.length>=1&&(a=u[0]),u.length>=2&&(o=u[1]),u.length>2)return{exitCode:1,stdout:"",stderr:`split: extra operand '${u[2]}'
|
|
11
|
+
`};if(k(o)>t.limits.maxStringLength||k(i.additionalSuffix)>t.limits.maxStringLength||i.suffixLength>t.limits.maxStringLength-Math.min(t.limits.maxStringLength,k(o))-Math.min(t.limits.maxStringLength,k(i.additionalSuffix)))return{exitCode:1,stdout:"",stderr:`split: output filename exceeds configured string limit
|
|
12
|
+
`};let d,c=null,p;if(a==="-"){let s=t.stdin.length;p=t.executionScope?.reserveBytes("split transaction",s*2,"split"),d=U(t.stdin)}else{c=t.fs.resolvePath(t.cwd,a);try{let s=await t.fs.stat(c);if(p=t.executionScope?.reserveBytes("split transaction",s.size*2,"split"),d=await t.fs.readFileBuffer(c),d.byteLength>s.size)throw new $("split: input grew while being read","string_length");t.executionScope?.consumeInput(d.byteLength,"split")}catch(s){return p?.release(),E(s),{exitCode:1,stdout:"",stderr:`split: ${a}: No such file or directory
|
|
13
|
+
`}}}try{if(d.length===0)return{exitCode:0,stdout:"",stderr:""};if(i.mode==="chunks"&&i.chunks>S)return{exitCode:1,stdout:"",stderr:`split: too many output files (${i.chunks}), limit is ${S}
|
|
14
|
+
`};let s;switch(i.mode){case"lines":s=B(d,i.lines);break;case"bytes":s=T(d,i.bytes);break;case"chunks":s=X(d,i.chunks);break;default:return i.mode}if(s.length>S)return{exitCode:1,stdout:"",stderr:`split: too many output files (${s.length}), limit is ${S}
|
|
15
|
+
`};let l=z(i.useNumericSuffix,i.suffixLength);if(s.length>l)return{exitCode:1,stdout:"",stderr:`split: output file suffixes exhausted at ${l} files
|
|
16
|
+
`};t.executionScope?.consumeWork(s.length*i.suffixLength,"split suffix generation");let m=[],P=new Set,f=c?await h(t.fs,c):null;if(f?.existence==="unknown")return{exitCode:1,stdout:"",stderr:`split: cannot safely identify input file
|
|
17
|
+
`};for(let r=0;r<s.length;r++){let y=H(r,i.useNumericSuffix,i.suffixLength),b=`${o}${y}${i.additionalSuffix}`,v=t.fs.resolvePath(t.cwd,b),g=await h(t.fs,v),w=G(g);if(g.existence==="unknown"||w===void 0)return{exitCode:1,stdout:"",stderr:`split: cannot safely identify output file '${b}'
|
|
18
|
+
`};if(w!==void 0&&P.has(w))return{exitCode:1,stdout:"",stderr:`split: duplicate output file '${b}'
|
|
19
|
+
`};if(f!==null&&(f.existence==="existing"&&g.existence==="existing"&&f.stableIdentity!==void 0&&f.stableIdentity===g.stableIdentity||f.canonicalPath!==void 0&&f.canonicalPath===g.canonicalPath))return{exitCode:1,stdout:"",stderr:`split: output file '${b}' would overwrite input
|
|
20
|
+
`};w!==void 0&&P.add(w),m.push({path:v,displayName:b,content:s[r],initialIdentity:g,stagePath:"",committed:!1})}try{for(let r of m)r.stagePath=await M(t,r.path,"stage"),await t.fs.writeFile(r.stagePath,r.content);if(c!==null&&f!==null&&!I(f,await h(t.fs,c)))throw new Error("input identity changed during split");for(let r of m){let y=await h(t.fs,r.path);if(!I(r.initialIdentity,y))throw new Error("output identity changed during split");if(f?.existence==="existing"&&y.existence==="existing"&&f.stableIdentity===y.stableIdentity)throw new Error("output aliases input")}for(let r of m){if(!I(r.initialIdentity,await h(t.fs,r.path)))throw new Error("output identity changed during split");r.initialIdentity.existence==="existing"&&(r.backupPath=await M(t,r.path,"backup"),await t.fs.mv(r.path,r.backupPath)),await t.fs.mv(r.stagePath,r.path),r.committed=!0}for(let r of m)r.backupPath&&(await t.fs.rm(r.backupPath,{force:!0,recursive:!0}).catch(()=>{}),r.backupPath=void 0)}catch{for(let r of[...m].reverse())r.committed&&await t.fs.rm(r.path,{force:!0,recursive:!0}).catch(()=>{}),r.backupPath&&await t.fs.mv(r.backupPath,r.path).catch(()=>{}),r.stagePath&&await t.fs.rm(r.stagePath,{force:!0,recursive:!0}).catch(()=>{});return{exitCode:1,stdout:"",stderr:`split: failed to write output
|
|
21
|
+
`}}return{exitCode:0,stdout:"",stderr:""}}finally{p?.release()}}},Y={name:"split",flags:[{flag:"-l",type:"value",valueHint:"number"},{flag:"-b",type:"value",valueHint:"string"},{flag:"-n",type:"value",valueHint:"number"},{flag:"-d",type:"boolean"},{flag:"-a",type:"value",valueHint:"number"}],needsFiles:!0};export{Z as a,Y as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
var h=new TextDecoder("utf-8",{fatal:!0}),x=new TextEncoder,i=512*1024*1024;function u(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 g(t){if(typeof Buffer<"u")return Buffer.byteLength(t,"utf8");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 f=t.charCodeAt(e+1);f>=56320&&f<=57343?(n+=4,e++):n+=3}else n+=3}return n}function B(t){return t}function b(t){return t}function l(t,n=i){let e=t;if(!e)return e;u(e.length,n,"UTF-8 decode");let o=!1;for(let r=0;r<e.length;r++){let d=e.charCodeAt(r);if(d>255)return e;d>127&&(o=!0)}if(!o)return e;let f=new Uint8Array(e.length);for(let r=0;r<e.length;r++)f[r]=e.charCodeAt(r);try{return h.decode(f)}catch{return e}}function a(t,n=i){if(!t)return t;let e=g(t);return u(e,n,"UTF-8 encode"),e===t.length?t:s(x.encode(t))}var T="",c=8192;function s(t){if(typeof Buffer<"u")return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("latin1");let n=[],e=[];for(let o=0;o<t.length;o+=c){let f=Math.min(c,t.length-o);e.length=f;for(let r=0;r<f;r++)e[r]=t[o+r];n.push(String.fromCharCode.apply(null,e))}return n.join("")}function p(t,n=i){return u(t.byteLength,n,"byte-string conversion"),s(t)}async function E(t,n){return typeof t.readFileBytes=="function"?t.readFileBytes(n):p(await t.readFileBuffer(n))}function y(t){return t.stdoutKind?t.stdoutKind:t.stdoutEncoding==="binary"?"bytes":"text"}function F(t){return y(t)==="bytes"?t.stdout:a(t.stdout)}function S(t){return y(t)==="bytes"?l(t.stdout):t.stdout}function A(t){return{stdout:t,stdoutKind:"text"}}function C(t){return{stdout:t,stdoutKind:"bytes",stdoutEncoding:"binary"}}export{g as a,B as b,b as c,l as d,a as e,T as f,E as g,y as h,F as i,S as j,A as k,C as l};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as _}from"./chunk-WZQNMEQW.js";import{a as $e}from"./chunk-TDD4NFYE.js";import{a as D}from"./chunk-EOMWWW4L.js";import{b as le}from"./chunk-CBM6J4AL.js";import{a as q}from"./chunk-U3UTFNHI.js";import{a as Se,b as Be,c as fe}from"./chunk-QAYAQNCG.js";var nt="file",it="link",st="symlink",Le="directory",at={file:"0",link:"1",symlink:"2","character-device":"3","block-device":"4",directory:"5",fifo:"6","pax-header":"x","pax-global-header":"g","gnu-long-name":"L","gnu-long-link-name":"K"},ot={0:nt,1:it,2:st,3:"character-device",4:"block-device",5:Le,6:"fifo",x:"pax-header",g:"pax-global-header",L:"gnu-long-name",K:"gnu-long-link-name"},ct=new Uint8Array(512),V=new Uint8Array(0),I=new TextEncoder,Q=new TextDecoder;function P(e,t,r,n){n&&I.encodeInto(n,e.subarray(t,t+r))}function j(e,t,r,n){if(n===void 0)return;let i=n.toString(8).padStart(r-1,"0");I.encodeInto(i,e.subarray(t,t+r-1))}function F(e,t,r){let n=e.indexOf(0,t),i=n===-1||n>t+r?t+r:n;return Q.decode(e.subarray(t,i))}function me(e,t,r){let n=0,i=t+r;for(let s=t;s<i;s++){let a=e[s];if(a===0)break;a!==32&&(n=n*8+(a-48))}return n}function Y(e,t,r){if(e[t]&128){let n=0;n=e[t]&127;for(let i=1;i<r;i++)n=n*256+e[t+i];if(!Number.isSafeInteger(n))throw new Error("TAR number too large");return n}return me(e,t,r)}var M=e=>e.type==="directory"||e.type==="symlink"||e.type==="link"||e.type==="character-device"||e.type==="block-device"||e.type==="fifo";async function Ne(e){if(e==null)return V;if(e instanceof Uint8Array)return e;if(typeof e=="string")return I.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw new TypeError("Unsupported content type for entry body.")}var Te=(e,t)=>{let r=e.split("/").filter(Boolean);return t>=r.length?"":r.slice(t).join("/")};function he(e,t){let{strip:r,filter:n,map:i}=t;if(!r&&!n&&!i)return e;let s={...e};if(r&&r>0){let o=Te(s.name,r);if(!o)return null;if(s.name=s.type==="directory"&&!o.endsWith("/")?`${o}/`:o,s.linkname){let c=s.linkname.startsWith("/");if(c||s.type==="link"){let l=Te(s.linkname,r);s.linkname=c?`/${l}`||"/":l}}}if(n?.(s)===!1)return null;let a=i?i(s):s;return a&&(!a.name||!a.name.trim()||a.name==="."||a.name==="/")?null:a}var K=256;function lt(){let e=new Array(K),t=e.length-1,r=0,n=0,i=0,s=o=>{let c=e[r];o===c.length?(e[r]=V,r=r+1&t):e[r]=c.subarray(o),i-=o,i===0&&e.length>K&&(e=new Array(K),t=K-1,r=0,n=0)};function a(o,c){if(c){let y=0,d=Math.min(o,i);for(;d>0;){let m=e[r],p=Math.min(d,m.length),b=p===m.length?m:m.subarray(0,p);if(s(p),d-=p,y+=p,!c(b))break}return y}if(i<o)return null;if(o===0)return V;let l=e[r];if(l.length>=o){let y=l.length===o?l:l.subarray(0,o);return s(o),y}let f=new Uint8Array(o),u=0,h=o;for(;h>0;){let y=e[r],d=Math.min(h,y.length);f.set(d===y.length?y:y.subarray(0,d),u),u+=d,h-=d,s(d)}return f}return{push:o=>{if(o.length===0)return;let c=n+1&t;if(c===r){let l=e.length,f=l*2,u=new Array(f),h=n-r+l&l-1;if(r<n)for(let y=0;y<h;y++)u[y]=e[r+y];else if(h>0){let y=l-r;for(let d=0;d<y;d++)u[d]=e[r+d];for(let d=0;d<n;d++)u[y+d]=e[d]}e=u,t=f-1,r=0,n=h,c=n+1&t}e[n]=o,n=c,i+=o.length},available:()=>i,peek:o=>{if(i<o)return null;if(o===0)return V;let c=e[r];if(c.length>=o)return c.length===o?c:c.subarray(0,o);let l=new Uint8Array(o),f=0,u=r;for(;f<o;){let h=e[u],y=Math.min(o-f,h.length);y===h.length?l.set(h,f):l.set(h.subarray(0,y),f),f+=y,u=u+1&t}return l},discard:o=>{if(o>i)throw new Error("Too many bytes consumed");if(o===0)return;let c=o;for(;c>0;){let l=e[r],f=Math.min(c,l.length);s(f),c-=f}},pull:a}}var de=32,ft=48;function ut(e){let t=me(e,148,8),r=0;for(let n=0;n<e.length;n++)n>=148&&n<156?r+=de:r+=e[n];return t===r}function dt(e){e.fill(de,148,156);let t=0;for(let r of e)t+=r;for(let r=153;r>=148;r--)e[r]=(t&7)+ft,t>>=3;e[154]=0,e[155]=de}var mt=256;function ht(e){let t={};I.encode(e.name).length>100&&Ue(e.name)===null&&(t.path=e.name),e.linkname&&I.encode(e.linkname).length>100&&(t.linkpath=e.linkname),e.uname&&I.encode(e.uname).length>32&&(t.uname=e.uname),e.gname&&I.encode(e.gname).length>32&&(t.gname=e.gname),e.uid!=null&&e.uid>2097151&&(t.uid=String(e.uid)),e.gid!=null&&e.gid>2097151&&(t.gid=String(e.gid)),e.size!=null&&e.size>8589934591&&(t.size=String(e.size)),e.pax&&Object.assign(t,e.pax);let r=Object.entries(t);if(r.length===0)return null;let n=I.encode(r.map(([i,s])=>{let a=`${i}=${s}
|
|
3
|
+
`,o=I.encode(a).length+1,c=o+String(o).length;return c=o+String(c).length,`${c} ${a}`}).join(""));return{paxHeader:Pe({name:Q.decode(I.encode(`PaxHeader/${e.name}`).slice(0,100)),size:n.length,type:"pax-header",mode:420,mtime:e.mtime,uname:e.uname,gname:e.gname,uid:e.uid,gid:e.gid}),paxBody:n}}function Ue(e){let t=I.encode(e).length;if(t<=100||t>mt)return null;for(let r=e.length-1;r>0;r--){if(e[r]!=="/")continue;let n=e.slice(0,r),i=e.slice(r+1);if(I.encode(n).length<=155&&I.encode(i).length<=100)return{prefix:n,name:i}}return null}function Pe(e){let t=new Uint8Array(512),r=M(e)?0:e.size??0,n=e.name,i="";if(!e.pax?.path){let s=Ue(n);s&&(n=s.name,i=s.prefix)}return P(t,0,100,n),j(t,100,8,e.mode??(e.type==="directory"?493:420)),j(t,108,8,e.uid??0),j(t,116,8,e.gid??0),j(t,124,12,r),j(t,136,12,Math.floor((e.mtime?.getTime()??Date.now())/1e3)),P(t,156,1,at[e.type??"file"]),P(t,157,100,e.linkname),P(t,257,6,"ustar\0"),P(t,263,2,"00"),P(t,265,32,e.uname),P(t,297,32,e.gname),P(t,345,155,i),dt(t),t}function pt(e,t){if(t&&!ut(e))throw new Error("Invalid tar header checksum.");let r=F(e,156,1),n={name:F(e,0,100),mode:me(e,100,8),uid:Y(e,108,8),gid:Y(e,116,8),size:Y(e,124,12),mtime:new Date(Y(e,136,12)*1e3),type:ot[r]||"file",linkname:F(e,157,100)},i=F(e,257,6);return i.trim()==="ustar"&&(n.uname=F(e,265,32),n.gname=F(e,297,32)),i==="ustar"&&(n.prefix=F(e,345,155)),n}var Ie={path:["name",e=>e],linkpath:["linkname",e=>e],size:["size",e=>/^\d+$/.test(e)&&Number.isSafeInteger(+e)?+e:NaN],mtime:["mtime",parseFloat],uid:["uid",e=>parseInt(e,10)],gid:["gid",e=>parseInt(e,10)],uname:["uname",e=>e],gname:["gname",e=>e]};function gt(e){let t=Object.create(null),r=Object.create(null),n=!1,i=0;for(;i<e.length;){let s=e.indexOf(32,i);if(s===-1)break;let a=parseInt(Q.decode(e.subarray(i,s)),10);if(!(a>0))break;let o=i+a,c=Q.decode(e.subarray(s+1,o-1)),l=c.indexOf("=");if(l>0){let f=c.slice(0,l),u=c.slice(l+1);if(r[f]=u,n=!0,Object.hasOwn(Ie,f)){let[h,y]=Ie[f],d=y(u);(typeof d=="string"||!Number.isNaN(d))&&(t[h]=d)}}i=o}return n&&(t.pax=r),t}function Oe(e,t){t.name!==void 0&&(e.name=t.name),t.linkname!==void 0&&(e.linkname=t.linkname),t.size!==void 0&&(e.size=t.size),t.mtime!==void 0&&(e.mtime=new Date(t.mtime*1e3)),t.uid!==void 0&&(e.uid=t.uid),t.gid!==void 0&&(e.gid=t.gid),t.uname!==void 0&&(e.uname=t.uname),t.gname!==void 0&&(e.gname=t.gname),t.pax&&(e.pax=Object.assign({},e.pax??{},t.pax))}function yt(e){switch(e){case"pax-global-header":case"pax-header":return gt;case"gnu-long-name":return t=>({name:F(t,0,t.length)});case"gnu-long-link-name":return t=>({linkname:F(t,0,t.length)});default:return}}function wt(e){let t=Pe(e),r=ht(e);if(!r)return[t];let n=-r.paxBody.length&511,i=n>0?[ct.subarray(0,n)]:[];return[r.paxHeader,r.paxBody,...i,t]}var ue=0,H=1,xt=8*1024*1024,J=new Error("Tar archive is truncated.");function pe(e={}){let t=e.strict??!1,{available:r,peek:n,push:i,discard:s,pull:a}=lt(),o=ue,c=!1,l=!1,f=!1,u=null,h={},y={},d={isEntryActive:()=>o===H,isBodyComplete:()=>!u||u.remaining===0,canFinish:()=>!u||r()>=u.remaining+u.padding,bodyBytes:()=>u&&u.remaining>0?Math.min(u.remaining,r()):0,write(m){if(c)throw new Error("Archive already ended.");i(m)},end(){c=!0},readHeader(){if(o!==ue)throw new Error("Cannot read header while an entry is active");if(!l)for(;!l;){if(r()<512){if(c){if(r()>0&&t)throw J;l=!0;return}return null}let m=n(512);if(Fe(m)){if(r()<512*2){if(c){if(t)throw J;l=!0;return}return null}if(Fe(n(512*2).subarray(512))){s(512*2),l=!0,f=!0;return}if(t)throw new Error("Invalid tar header.");s(512);continue}let p;try{p=pt(m,t)}catch(z){if(t)throw z;s(512);continue}let b=yt(p.type);if(b){if(p.size>xt)throw new Error("Tar metadata entry exceeds maximum size.");let z=p.size+(-p.size&511);if(r()<512+z){if(c&&t)throw J;return null}s(512);let C=b(a(z).subarray(0,p.size));y.pax&&(y={});let A=p.type==="pax-global-header"?h:y;for(let W in C)A[W]=C[W];continue}s(512);let w=p;p.prefix&&(w.name=`${p.prefix}/${w.name}`),Oe(w,h),Oe(w,y);let S=w.size;return M(w)?(S=0,w.size=0):w.name.endsWith("/")&&w.type==="file"&&(w.type=Le,w.size=0),y={},u={header:w,remaining:S,padding:-S&511},o=H,w}},streamBody(m){if(o!==H||!u||u.remaining===0)return 0;let p=Math.min(u.remaining,r());if(p===0)return 0;let b=a(p,m);return u.remaining-=b,b},skipPadding(){if(o!==H||!u)return!0;if(u.remaining>0)throw new Error("Body not fully consumed");return r()<u.padding?!1:(s(u.padding),u=null,o=ue,!0)},skipEntry(){if(o!==H||!u)return!0;let m=Math.min(u.remaining,r());return m>0&&(s(m),u.remaining-=m),u.remaining>0?!1:d.skipPadding()},validateEOF(){if(t){if(!f)throw J;if(r()>0&&a(r()).some(m=>m!==0))throw new Error("Invalid EOF.")}}};return d}function Fe(e){if(e.byteOffset%8===0){let t=new BigUint64Array(e.buffer,e.byteOffset,e.length/8);for(let r=0;r<t.length;r++)if(t[r]!==0n)return!1;return!0}for(let t=0;t<e.length;t++)if(e[t]!==0)return!1;return!0}var bt=new Uint8Array(512*2);function Re(e,t,r){let n=null,i=0,s=!1,a=o=>{let c=new Error(o);throw t(c),c};return{add(o){s&&a("No new tar entries after finalize."),n!==null&&a("Previous entry must be completed before adding a new one");let c=M(o)?0:o.size;(!Number.isSafeInteger(c)||c<0)&&a("Invalid tar entry size.");try{let l=wt({...o,size:c});for(let f of l)e(f);n={...o,size:c},i=0}catch(l){t(l)}},write(o){n||a("No active tar entry."),s&&a("Cannot write data after finalize.");let c=i+o.length;c>n.size&&a(`"${n.name}" exceeds given size of ${n.size} bytes.`);try{i=c,e(o)}catch(l){t(l)}},endEntry(){n||a("No active entry to end."),s&&a("Cannot end entry after finalize.");try{i!==n.size&&a(`Size mismatch for "${n.name}".`);let o=-n.size&511;o>0&&e(new Uint8Array(o)),n=null,i=0}catch(o){throw t(o),o}},finalize(){s&&a("Archive has already been finalized"),n!==null&&a("Cannot finalize while an entry is still active");try{e(bt),s=!0,r&&r()}catch(o){t(o)}}}}function De(){return new CompressionStream("gzip")}function We(){return new DecompressionStream("gzip")}function zt(){let e,t;return{readable:new ReadableStream({start(r){e=r,t=Re(r.enqueue.bind(r),r.error.bind(r),r.close.bind(r))}}),controller:{add(r){let n=M(r);return t.add(r),n&&t.endEntry(),new WritableStream({write(i){t.write(i)},close(){n||t.endEntry()},abort(i){e.error(i)}})},finalize(){t.finalize()},error(r){e.error(r)}}}}async function _e(e){let t=[],r=e.getReader(),n=0;try{for(;;){let{done:a,value:o}=await r.read();if(a)break;t.push(o),n+=o.length}let i=new Uint8Array(n),s=0;for(let a of t)i.set(a,s),s+=a.length;return i}finally{r.releaseLock()}}var Me=e=>e.pipeTo(new WritableStream);function vt(e={}){let t=pe(e),r=e.strict??!1,n=null,i=null,s=!1,a=!1,o=!1,c=!1,l=()=>{try{i?.close()}catch{}i=null},f=d=>{if(!c){c=!0;try{i?.error(d)}catch{}i=null;try{n.error(d)}catch{}n=null}},u=()=>{if(!c){c=!0,l();try{n.close()}catch{}n=null}},h=()=>{if(r)throw new Error("Tar archive is truncated.");u()},y=()=>{if(!(s||c||!n)){s=!0;try{for(;;){if(a){o&&(t.validateEOF(),u());break}if(t.isEntryActive()){if(o&&!t.canFinish()){h();break}if(i){if((i.desiredSize??1)<=0)break;if(t.streamBody(d=>(i.enqueue(d),(i.desiredSize??1)>0))===0&&!t.isBodyComplete()){o&&h();break}}else if(!t.skipEntry()){o&&h();break}if(t.isBodyComplete()&&(l(),!t.skipPadding())){o&&h();break}}else{if((n.desiredSize??0)<0)break;let d=t.readHeader();if(d===null){o&&u();break}if(d===void 0){if(o){t.validateEOF(),u();break}a=!0;break}n.enqueue({header:d,body:new ReadableStream({start(m){d.size===0?m.close():i=m},pull:y,cancel(){i=null,y()}})})}}}catch(d){throw f(d),d}finally{s=!1}}};return{readable:new ReadableStream({start(d){n=d},pull:y,cancel(d){d!==void 0?f(d):u()}},{highWaterMark:2}),writable:new WritableStream({write(d){try{if(a&&r&&d.some(m=>m!==0))throw new Error("Invalid EOF.");t.write(d),y()}catch(m){throw f(m),m}},close(){try{o=!0,t.end(),y()}catch(d){throw f(d),d}},abort(d){f(d)}})}}async function je(e){let{readable:t,controller:r}=zt();return await(async()=>{for(let n of e){let i=r.add(n.header),s="body"in n?n.body:n.data;if(!s){await i.close();continue}if(s instanceof ReadableStream)await s.pipeTo(i);else if(s instanceof Blob)await s.stream().pipeTo(i);else try{let a=await Ne(s);if(a.length>0){let o=i.getWriter();await o.write(a),await o.close()}else await i.close()}catch{throw new TypeError(`Unsupported content type for entry "${n.header.name}".`)}}})().then(()=>r.finalize()).catch(n=>r.error(n)),_e(t)}async function He(e,t={}){if(!(e instanceof ReadableStream))return kt(e instanceof Uint8Array?e:new Uint8Array(e),t);let r=[],n=e.pipeThrough(vt(t));for await(let i of n){let s;try{s=he(i.header,t)}catch(a){throw await i.body.cancel(),a}if(s===null){await Me(i.body);continue}M(s)?(await Me(i.body),r.push({header:s})):r.push({header:s,data:await _e(i.body)})}return r}function kt(e,t){let r=pe(t),n=t.strict??!1,i=[];for(r.write(e),r.end();;){let s=r.readHeader();if(s===void 0)break;if(s===null){if(n)throw new Error("Tar archive is truncated.");break}let a=he(s,t);if(a===null){let h=r.skipEntry();if(!h&&n)throw new Error("Tar archive is truncated.");if(!h)break;continue}if(M(a)){let h=r.skipEntry();if(!h&&n)throw new Error("Tar archive is truncated.");if(i.push({header:a}),!h)break;continue}let o=s.size;if(o<0||!r.canFinish()){if(n)throw new Error("Tar archive is truncated.");o=r.bodyBytes()}let c=new Uint8Array(o),l=0;r.streamBody(h=>(c.set(h,l),l+=h.length,!0));let f=r.isBodyComplete(),u=!0;if(f&&(u=r.skipPadding(),!u&&n))throw new Error("Tar archive is truncated.");if(i.push({header:a,data:c}),!f||!u)break}return r.validateEOF(),i}import Lt from"seek-bzip";var Ct=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let r=t<<24;for(let n=0;n<8;n++)r=r&2147483648?r<<1^79764919:r<<1;e[t]=r>>>0}return e})();function At(e,t){return(e<<8^Ct[(e>>>24^t)&255])>>>0}var ge=class{maxOutputBytes;buffer=[];current=0;bitCount=0;constructor(t=Number.MAX_SAFE_INTEGER){if(this.maxOutputBytes=t,!Number.isSafeInteger(t)||t<0)throw new Error("Invalid bzip2 output limit")}pushByte(t){if(this.buffer.length>=this.maxOutputBytes)throw new Error(`bzip2 output exceeds limit (${this.maxOutputBytes} bytes)`);this.buffer.push(t)}writeBits(t,r){for(let n=t-1;n>=0;n--)this.current=this.current<<1|r>>>n&1,this.bitCount++,this.bitCount===8&&(this.pushByte(this.current),this.current=0,this.bitCount=0)}writeBit(t){this.current=this.current<<1|t&1,this.bitCount++,this.bitCount===8&&(this.pushByte(this.current),this.current=0,this.bitCount=0)}finish(){return this.bitCount>0&&this.pushByte(this.current<<8-this.bitCount),new Uint8Array(this.buffer)}};function Et(e){let t=[],r=0;for(;r<e.length;){let n=e[r],i=1;for(;r+i<e.length&&e[r+i]===n&&i<255;)i++;i>=4?(t.push(n,n,n,n),t.push(i-4),r+=i):(t.push(n),r++)}return new Uint8Array(t)}function St(e){let t=e.length;if(t===0)return{transformed:new Uint8Array(0),pointer:0};let r=Bt(e),n=new Uint8Array(t),i=0;for(let s=0;s<t;s++)r[s]===0?(i=s,n[s]=e[t-1]):n[s]=e[r[s]-1];return{transformed:n,pointer:i}}function Bt(e){let t=e.length,r=new Int32Array(t),n=new Int32Array(t);for(let i=0;i<t;i++)r[i]=i,n[i]=e[i];for(let i=1;i<t;i*=2){let s=n.slice();r.sort((a,o)=>s[a]!==s[o]?s[a]-s[o]:s[(a+i)%t]-s[(o+i)%t]),n[r[0]]=0;for(let a=1;a<t;a++)s[r[a]]===s[r[a-1]]&&s[(r[a]+i)%t]===s[(r[a-1]+i)%t]?n[r[a]]=n[r[a-1]]:n[r[a]]=n[r[a-1]]+1;if(n[r[t-1]]===t-1)break}return r}function $t(e,t){let r=[];for(let a=0;a<256;a++)t[a]&&r.push(a);let n=new Array(256).fill(-1);for(let a=0;a<r.length;a++)n[r[a]]=a;let i=new Uint16Array(e.length),s=r.slice();for(let a=0;a<e.length;a++){let o=e[a],c=0;for(;s[c]!==o;)c++;if(i[a]=c,c>0){let l=s[c];for(let f=c;f>0;f--)s[f]=s[f-1];s[0]=l}}return{encoded:i,length:e.length}}function Tt(e,t,r){let s=r+1,a=[],o=0;for(;o<t;)if(e[o]===0){let l=0;for(;o<t&&e[o]===0;)l++,o++;let f=l;for(;f>0;)f--,f&1?a.push(1):a.push(0),f>>>=1}else a.push(e[o]+1),o++;a.push(s);let c=new Uint16Array(a.length);for(let l=0;l<a.length;l++)c[l]=a[l];return{symbols:c,length:a.length,eob:s}}function Xe(e,t,r){if(t<=1){let l=new Array(e.length).fill(0);for(let f=0;f<e.length;f++)e[f]>0&&(l[f]=1);return{codeLengths:l,maxLen:1,minLen:1}}let n=[];for(let l=0;l<e.length;l++)e[l]>0&&n.push({freq:e[l],symbol:l,left:null,right:null});if(n.length===0)return{codeLengths:new Array(e.length).fill(0),maxLen:0,minLen:0};if(n.length===1){let l=new Array(e.length).fill(0);return l[n[0].symbol]=1,{codeLengths:l,maxLen:1,minLen:1}}for(;n.length>1;){n.sort((u,h)=>u.freq-h.freq);let l=n.shift(),f=n.shift();n.push({freq:l.freq+f.freq,symbol:-1,left:l,right:f})}let i=new Array(e.length).fill(0);function s(l,f){if(!l.left&&!l.right){i[l.symbol]=f;return}l.left&&s(l.left,f+1),l.right&&s(l.right,f+1)}s(n[0],0);let a=!0;for(;a;){a=!1;for(let l=0;l<i.length;l++)i[l]>r&&(i[l]=r,a=!0);if(a){let l=0;for(let f=0;f<i.length;f++)i[f]>0&&(l+=1/(1<<i[f]));if(l>1)for(let f=1;f<r&&l>1;f++)for(let u=0;u<i.length&&l>1;u++)i[u]===f&&(i[u]++,l-=1/(1<<f)-1/(1<<f+1));a=!1;for(let f=0;f<i.length;f++)if(i[f]>r){a=!0;break}}}let o=r,c=0;for(let l=0;l<i.length;l++)i[l]>0&&(i[l]<o&&(o=i[l]),i[l]>c&&(c=i[l]));return{codeLengths:i,maxLen:c,minLen:o}}function It(e,t){let r=new Array(t).fill(0),n=e.slice(0,t),i=Math.max(...n,0),s=new Array(i+1).fill(0);for(let c=0;c<t;c++)n[c]>0&&s[n[c]]++;let a=new Array(i+1).fill(0),o=0;for(let c=1;c<=i;c++)o=o+s[c-1]<<1,a[c]=o;for(let c=0;c<t;c++)n[c]>0&&(r[c]=a[n[c]]++);return{codes:r,lengths:n}}function Ot(e,t,r){e.writeBits(24,3227993),e.writeBits(24,2511705),e.writeBits(32,r),e.writeBit(0);let n=Et(t),{transformed:i,pointer:s}=St(n);e.writeBits(24,s);let a=new Array(256).fill(!1);for(let g=0;g<i.length;g++)a[i[g]]=!0;let o=new Array(16).fill(!1);for(let g=0;g<16;g++)for(let x=0;x<16;x++)if(a[g*16+x]){o[g]=!0;break}for(let g=0;g<16;g++)e.writeBit(o[g]?1:0);for(let g=0;g<16;g++)if(o[g])for(let x=0;x<16;x++)e.writeBit(a[g*16+x]?1:0);let c=0;for(let g=0;g<256;g++)a[g]&&c++;let{encoded:l,length:f}=$t(i,a),{symbols:u,length:h}=Tt(l,f,c),y=c+2,d=50,m=Math.ceil(h/d),p;h<200?p=2:h<600?p=3:h<1200?p=4:h<2400?p=5:p=6,p>m&&(p=Math.max(2,m));let b=[];for(let g=0;g<p;g++)b.push(new Array(y).fill(0));let w=new Int32Array(m);for(let g=0;g<m;g++)w[g]=g%p;for(let g=0;g<m;g++){let x=g*d,v=Math.min(x+d,h),T=w[g];for(let E=x;E<v;E++)b[T][u[E]]++}function S(g){for(let x=0;x<y;x++)g[x]<1&&(g[x]=1)}let z=[];for(let g=0;g<p;g++)S(b[g]),z.push(Xe(b[g],y,20));for(let g=0;g<4;g++){for(let x=0;x<p;x++)b[x].fill(0);for(let x=0;x<m;x++){let v=x*d,T=Math.min(v+d,h),E=0,Z=1/0;for(let U=0;U<p;U++){let oe=0;for(let ce=v;ce<T;ce++)oe+=z[U].codeLengths[u[ce]]||20;oe<Z&&(Z=oe,E=U)}w[x]=E;for(let U=v;U<T;U++)b[E][u[U]]++}for(let x=0;x<p;x++)S(b[x]),z[x]=Xe(b[x],y,20)}e.writeBits(3,p),e.writeBits(15,m);let C=[],A=[];for(let g=0;g<p;g++)A.push(g);for(let g=0;g<m;g++){let x=w[g],v=0;for(;A[v]!==x;)v++;if(C.push(v),v>0){let T=A[v];for(let E=v;E>0;E--)A[E]=A[E-1];A[0]=T}}for(let g=0;g<m;g++){for(let x=0;x<C[g];x++)e.writeBit(1);e.writeBit(0)}for(let g=0;g<p;g++){let x=z[g].codeLengths,v=x[0];e.writeBits(5,v);for(let T=0;T<y;T++){let E=x[T];for(;v<E;)e.writeBit(1),e.writeBit(0),v++;for(;v>E;)e.writeBit(1),e.writeBit(1),v--;e.writeBit(0)}}for(let g=0;g<p;g++){let{codes:x,lengths:v}=It(z[g].codeLengths,y);z[g]=Object.assign(z[g],{_codes:x,_lengths:v})}let W=0,G=0;for(let g=0;g<h;g++){(G===0||G>=d)&&(g>0&&W++,G=0);let x=w[W],v=z[x],T=u[g],E=v._lengths[T],Z=v._codes[T];E>0&&e.writeBits(E,Z),G++}}var Ft=10*1024*1024;function Ge(e,t=9,r=Ft,n=Number.MAX_SAFE_INTEGER){if(t<1||t>9)throw new Error("Block size level must be 1-9");if(e.length>r)throw new Error(`Input too large for bzip2 compression (${e.length} bytes, max ${r})`);let i=t*1e5,s=new ge(n);s.writeBits(8,66),s.writeBits(8,90),s.writeBits(8,104),s.writeBits(8,48+t);let a=0,o=0;for(;o<e.length;){let c=Math.min(o+i,e.length),l=e.subarray(o,c),f=4294967295;for(let u=0;u<l.length;u++)f=At(f,l[u]);f=~f>>>0,a=(a<<1|a>>>31)>>>0,a=(a^f)>>>0,Ot(s,l,f),o=c}return s.writeBits(24,1536581),s.writeBits(24,3690640),s.writeBits(32,a),s.finish()}var ee=null,te=null;async function Ze(){if(ee)return ee;if(te)throw te;try{return ee=await le.runTrustedAsync(()=>import("node-liblzma")),ee}catch{throw te=new Error("xz compression requires node-liblzma which failed to load. Install liblzma-dev (apt) or xz (brew) and reinstall dependencies."),te}}var re=null,ne=null;async function qe(){if(re)return re;if(ne)throw ne;try{return re=await le.runTrustedAsync(()=>import("@mongodb-js/zstd")),re}catch{throw ne=new Error("zstd compression requires @mongodb-js/zstd which is not installed. Install it with: npm install @mongodb-js/zstd"),ne}}var ye=1024*1024*1024,$=512,Nt=1e6;function X(e,t){let r=e??t;if(!Number.isSafeInteger(r)||r<=0)throw new Error("Archive limits must be positive safe integers");return r}function O(e){return{maxArchiveSize:X(e?.maxArchiveSize,ye),maxEntries:X(e?.maxEntries,Nt),maxEntrySize:X(e?.maxEntrySize,ye),maxCompressedSize:X(e?.maxCompressedSize,e?.maxArchiveSize??ye),maxExpansionRatio:X(e?.maxExpansionRatio,1e4),signal:e?.signal,executionScope:e?.executionScope,allowTrustedWholeBufferCodecs:e?.allowTrustedWholeBufferCodecs??!0}}function Ut(e,t){if(e.length>t.maxEntries)throw new Error(`Too many archive entries (max ${t.maxEntries})`);let r=i=>{if(!Number.isSafeInteger(i)||i<0||i>t.maxArchiveSize-n)throw new Error(`Archive too large (max ${t.maxArchiveSize} bytes)`);n+=i},n=$*2;for(let i of e){t.signal?.throwIfAborted();let s=i.isDirectory||i.isSymlink?0:typeof i.content=="string"?q(i.content):i.content?.length??0;if(s>t.maxEntrySize)throw new Error(`Archive entry too large (max ${t.maxEntrySize} bytes)`);let a=i.isDirectory&&!i.name.endsWith("/")?`${i.name}/`:i.name,o=q(a),c=q(i.linkTarget??"");if(o>t.maxArchiveSize||c>t.maxArchiveSize)throw new Error(`Archive too large (max ${t.maxArchiveSize} bytes)`);let l=0;if(o>100&&(l+=o+64),c>100&&(l+=c+64),!Number.isSafeInteger(l))throw new Error(`Archive too large (max ${t.maxArchiveSize} bytes)`);let f=Math.ceil(s/$)*$;if(r($+f),l>0){let u=Math.ceil(l/$)*$;r($+u)}}return n}function ie(e,t,r){return e.executionScope?.reserveBytes(t,r,`tar: ${t}`)}function Pt(e){let t=e.subarray(124,136);if((t[0]&128)!==0){let i=t[0]&127;for(let s=1;s<t.length;s++)if(i=i*256+t[s],!Number.isSafeInteger(i))return;return i}let r=new TextDecoder("ascii").decode(t).replace(/\0.*$/,"").trim();if(r==="")return 0;if(!/^[0-7]+$/.test(r))return;let n=Number.parseInt(r,8);return Number.isSafeInteger(n)?n:void 0}function Rt(e,t){let r=0,n=0;for(;r+$<=e.length;){t.signal?.throwIfAborted();let i=e.subarray(r,r+$);if(i.every(o=>o===0))return;if(n++,n>t.maxEntries)return`Too many entries (max ${t.maxEntries})`;let s=Pt(i);if(s===void 0)return"Invalid tar archive format";if(s>t.maxEntrySize)return`Archive entry too large (max ${t.maxEntrySize} bytes)`;let a=Math.ceil(s/$)*$;if(!Number.isSafeInteger(a)||(r+=$+a,r>e.length))return"Invalid tar archive format"}return r===e.length?void 0:"Invalid tar archive format"}function Mt(e){let t="file";e.isDirectory?t="directory":e.isSymlink&&(t="symlink");let r=e.name;e.isDirectory&&!r.endsWith("/")&&(r+="/");let n;e.content!==void 0&&(typeof e.content=="string"?n=new TextEncoder().encode(e.content):n=e.content);let i=e.isDirectory||e.isSymlink?0:n?.length??0;return{header:{name:r,mode:e.mode??(e.isDirectory?493:420),uid:e.uid??0,gid:e.gid??0,size:i,mtime:e.mtime??new Date,type:t,linkname:e.linkTarget??"",uname:"user",gname:"user"},body:n}}async function R(e,t){let r=O(t),n=Ut(e,r),i=ie(r,"archive construction",n);try{let s=e.map(Mt),a=await je(s);if(r.signal?.throwIfAborted(),a.length>r.maxArchiveSize)throw new Error(`Archive too large (max ${r.maxArchiveSize} bytes)`);return a}finally{i?.release()}}async function Ye(e,t){let r=O(t),n=await R(e,r),i=ie(r,"gzip input",n.byteLength),s=new _({maxInputBytes:r.maxArchiveSize,maxOutputBytes:r.maxCompressedSize,signal:r.signal,label:"gzip archive"});s.acceptInput(n.length);let c=new ReadableStream({start(h){h.enqueue(n),h.close()}}).pipeThrough(De()).getReader(),l=[],f=[],u=0;try{for(;;){let{done:y,value:d}=await c.read();if(y)break;try{s.acceptOutput(d.length);let m=ie(r,"gzip chunks",d.byteLength);m&&f.push(m)}catch(m){throw await c.cancel(),m}u+=d.length,l.push(d)}let h=ie(r,"gzip result",u);try{let y=new Uint8Array(u),d=0;for(let m of l)y.set(m,d),d+=m.length;return y}finally{h?.release()}}finally{for(let h of f)h.release();i?.release()}}async function L(e,t){let r=O(t);if(e.length>r.maxArchiveSize)return{entries:[],error:`Archive too large (max ${r.maxArchiveSize} bytes)`};if(e.length<$||e.length%$!==0)return{entries:[],error:"Invalid tar archive format"};let n=Rt(e,r);if(n)return{entries:[],error:n};try{let i=await He(e),s=[];for(let a of i){if(r.signal?.throwIfAborted(),s.length>=r.maxEntries)return{entries:[],error:`Too many entries (max ${r.maxEntries})`};let o=a.data??new Uint8Array(0);if(a.header.size>r.maxEntrySize||o.length>r.maxEntrySize)return{entries:[],error:`Archive entry too large (max ${r.maxEntrySize} bytes)`};let c="file";switch(a.header.type){case"directory":c="directory";break;case"symlink":c="symlink";break;case"link":c="hardlink";break;case"file":c="file";break;default:c="other"}s.push({name:a.header.name,mode:a.header.mode??420,uid:a.header.uid??0,gid:a.header.gid??0,size:a.header.size,mtime:a.header.mtime??new Date,type:c,linkTarget:a.header.linkname||void 0,content:o})}return{entries:s}}catch(i){let s=i instanceof Error?i.message:"Unknown error";return{entries:[],error:s}}}async function we(e,t){let r=O(t);if(e.length>r.maxCompressedSize)return{entries:[],error:`Archive too large (max ${r.maxCompressedSize} bytes)`};try{let n=new _({maxInputBytes:r.maxCompressedSize,maxOutputBytes:r.maxArchiveSize,maxExpansionRatio:r.maxExpansionRatio,signal:r.signal,label:"gzip archive"});n.acceptInput(e.length);let a=new ReadableStream({start(u){u.enqueue(e),u.close()}}).pipeThrough(We()).getReader(),o=[],c=0;for(;;){let{done:u,value:h}=await a.read();if(u)break;try{n.acceptOutput(h.length)}catch(y){throw await a.cancel(),y}c+=h.length,o.push(h)}let l=new Uint8Array(c),f=0;for(let u of o)l.set(u,f),f+=u.length;return L(l,r)}catch(n){let i=n instanceof Error?n.message:"Unknown error";return{entries:[],error:`Decompression failed: ${i}`}}}function xe(e){return e.length>=2&&e[0]===31&&e[1]===139}function be(e){return e.length>=3&&e[0]===66&&e[1]===90&&e[2]===104}function ze(e){return e.length>=6&&e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0}async function Dt(e,t){let r=new _({maxInputBytes:t.maxCompressedSize,maxOutputBytes:t.maxArchiveSize,maxExpansionRatio:t.maxExpansionRatio,signal:t.signal,label:"bzip2 archive"});r.acceptInput(e.length);let n=Math.min(64*1024,t.maxArchiveSize),i=[],s=Buffer.allocUnsafe(n),a=0,o=0,c={writeByte(l){r.acceptOutput(1),a===s.length&&(i.push(s),s=Buffer.allocUnsafe(n),a=0),s[a++]=l,o++}};return Lt.decode(Buffer.from(e),c),a>0&&i.push(s.subarray(0,a)),new Uint8Array(Buffer.concat(i,o))}async function Wt(e,t){let r=new _({maxInputBytes:t.maxArchiveSize,maxOutputBytes:t.maxCompressedSize,signal:t.signal,label:"bzip2 archive"});r.acceptInput(e.length);let n=await Ge(e,9,t.maxArchiveSize,t.maxCompressedSize);return r.acceptOutput(n.length),n}async function _t(e){let r=(await Ze()).unxzSync(Buffer.from(e));return new Uint8Array(r)}async function jt(e){let r=(await Ze()).xzSync(Buffer.from(e));return new Uint8Array(r)}async function Ke(e,t){let r=O(t),n=await R(e,r);return Wt(n,r)}async function Je(e,t){let r=O(t);if(t?.allowNativeCodecs===!1||!r.allowTrustedWholeBufferCodecs)throw new Error("xz compression is disabled by configuration. Enable native and trusted whole-buffer codecs to use it.");let n=await R(e,r),i=await jt(n);if(r.signal?.throwIfAborted(),i.length>r.maxCompressedSize)throw new Error(`xz archive: output exceeds limit (${r.maxCompressedSize} bytes)`);return i}async function ve(e,t){let r=O({...t,maxArchiveSize:t?.maxDecompressedSize??t?.maxArchiveSize});if(e.length>r.maxCompressedSize)return{entries:[],error:`Archive too large (max ${r.maxCompressedSize} bytes)`};try{let n=await Dt(e,r);return L(n,r)}catch(n){let i=n instanceof Error?n.message:"Unknown error";return i===`bzip2 archive: output exceeds limit (${r.maxArchiveSize} bytes)`?{entries:[],error:`Decompressed archive too large (max ${r.maxArchiveSize} bytes)`}:{entries:[],error:i}}}async function ke(e,t){let r=O(t);if(t?.allowNativeCodecs===!1||!r.allowTrustedWholeBufferCodecs)return{entries:[],error:"xz decompression is disabled by configuration. Enable native and trusted whole-buffer codecs, or decompress the archive externally before extraction."};if(e.length>r.maxCompressedSize)return{entries:[],error:`Archive too large (max ${r.maxCompressedSize} bytes)`};try{let n=await _t(e);return r.signal?.throwIfAborted(),n.length>r.maxArchiveSize?{entries:[],error:`Trusted xz codec produced data over limit (${r.maxArchiveSize} bytes)`}:L(n,r)}catch(n){let i=n instanceof Error?n.message:"Unknown error";return{entries:[],error:i}}}function Ce(e){return e.length>=4&&e[0]===40&&e[1]===181&&e[2]===47&&e[3]===253}async function Ht(e){let r=await(await qe()).compress(Buffer.from(e),3);return new Uint8Array(r)}async function Xt(e){let r=await(await qe()).decompress(Buffer.from(e));return new Uint8Array(r)}async function Ve(e,t){let r=O(t);if(t?.allowNativeCodecs===!1||!r.allowTrustedWholeBufferCodecs)throw new Error("zstd compression is disabled by configuration. Enable native and trusted whole-buffer codecs to use it.");let n=await R(e,r),i=await Ht(n);if(r.signal?.throwIfAborted(),i.length>r.maxCompressedSize)throw new Error(`zstd archive: output exceeds limit (${r.maxCompressedSize} bytes)`);return i}async function Ae(e,t){let r=O(t);if(t?.allowNativeCodecs===!1||!r.allowTrustedWholeBufferCodecs)return{entries:[],error:"zstd decompression is disabled by configuration. Enable native and trusted whole-buffer codecs, or decompress the archive externally before extraction."};if(e.length>r.maxCompressedSize)return{entries:[],error:`Archive too large (max ${r.maxCompressedSize} bytes)`};try{let n=await Xt(e);return r.signal?.throwIfAborted(),n.length>r.maxArchiveSize?{entries:[],error:`Trusted zstd codec produced data over limit (${r.maxArchiveSize} bytes)`}:L(n,r)}catch(n){let i=n instanceof Error?n.message:"Unknown error";return{entries:[],error:i}}}function Qe(e){let t=e.length>0&&e[0]!==""&&!e[0].startsWith("-")?Gt(e):e,r={create:!1,append:!1,update:!1,extract:!1,list:!1,file:"",autoCompress:!1,gzip:!1,bzip2:!1,xz:!1,zstd:!1,verbose:!1,toStdout:!1,keepOldFiles:!1,touch:!1,directory:"",preserve:!1,absoluteNames:!1,strip:0,exclude:[],filesFrom:"",excludeFrom:"",wildcards:!1},n=[],i=0;for(;i<t.length;){let s=t[i];if(s.startsWith("-")&&!s.startsWith("--")&&s.length>2){if(/^-\d+$/.test(s)){n.push(s),i++;continue}for(let a=1;a<s.length;a++){let o=s[a];switch(o){case"c":r.create=!0;break;case"r":r.append=!0;break;case"u":r.update=!0;break;case"x":r.extract=!0;break;case"t":r.list=!0;break;case"a":r.autoCompress=!0;break;case"z":r.gzip=!0;break;case"j":r.bzip2=!0;break;case"J":r.xz=!0;break;case"v":r.verbose=!0;break;case"O":r.toStdout=!0;break;case"k":r.keepOldFiles=!0;break;case"m":r.touch=!0;break;case"p":r.preserve=!0;break;case"P":r.absoluteNames=!0;break;case"f":if(a<s.length-1)r.file=s.substring(a+1),a=s.length;else{if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'f'
|
|
4
|
+
`,exitCode:2}};r.file=t[i]}break;case"C":if(a<s.length-1)r.directory=s.substring(a+1),a=s.length;else{if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'C'
|
|
5
|
+
`,exitCode:2}};r.directory=t[i]}break;case"T":if(a<s.length-1)r.filesFrom=s.substring(a+1),a=s.length;else{if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'T'
|
|
6
|
+
`,exitCode:2}};r.filesFrom=t[i]}break;case"X":if(a<s.length-1)r.excludeFrom=s.substring(a+1),a=s.length;else{if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'X'
|
|
7
|
+
`,exitCode:2}};r.excludeFrom=t[i]}break;default:return{ok:!1,error:fe("tar",`-${o}`)}}}i++;continue}if(s==="-c"||s==="--create")r.create=!0;else if(s==="-r"||s==="--append")r.append=!0;else if(s==="-u"||s==="--update")r.update=!0;else if(s==="-x"||s==="--extract"||s==="--get")r.extract=!0;else if(s==="-t"||s==="--list")r.list=!0;else if(s==="-a"||s==="--auto-compress")r.autoCompress=!0;else if(s==="-z"||s==="--gzip"||s==="--gunzip")r.gzip=!0;else if(s==="-j"||s==="--bzip2")r.bzip2=!0;else if(s==="-J"||s==="--xz")r.xz=!0;else if(s==="--zstd")r.zstd=!0;else if(s==="-v"||s==="--verbose")r.verbose=!0;else if(s==="-O"||s==="--to-stdout")r.toStdout=!0;else if(s==="-k"||s==="--keep-old-files")r.keepOldFiles=!0;else if(s==="-m"||s==="--touch")r.touch=!0;else if(s==="--wildcards")r.wildcards=!0;else if(s==="-p"||s==="--preserve"||s==="--preserve-permissions")r.preserve=!0;else if(s==="-P"||s==="--absolute-names")r.absoluteNames=!0;else if(s==="-f"||s==="--file"){if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'f'
|
|
8
|
+
`,exitCode:2}};r.file=t[i]}else if(s.startsWith("--file="))r.file=s.substring(7);else if(s==="-C"||s==="--directory"){if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'C'
|
|
9
|
+
`,exitCode:2}};r.directory=t[i]}else if(s.startsWith("--directory="))r.directory=s.substring(12);else if(s.startsWith("--strip-components=")||s.startsWith("--strip=")){let a=s.includes("--strip-components=")?s.substring(19):s.substring(8),o=parseInt(a,10);if(Number.isNaN(o)||o<0)return{ok:!1,error:{stdout:"",stderr:`tar: invalid number for --strip: '${a}'
|
|
10
|
+
`,exitCode:2}};r.strip=o}else if(s.startsWith("--exclude="))r.exclude.push(s.substring(10));else if(s==="--exclude"){if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option '--exclude' requires an argument
|
|
11
|
+
`,exitCode:2}};r.exclude.push(t[i])}else if(s==="-T"||s==="--files-from"){if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'T'
|
|
12
|
+
`,exitCode:2}};r.filesFrom=t[i]}else if(s.startsWith("--files-from="))r.filesFrom=s.substring(13);else if(s==="-X"||s==="--exclude-from"){if(i++,i>=t.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'X'
|
|
13
|
+
`,exitCode:2}};r.excludeFrom=t[i]}else if(s.startsWith("--exclude-from="))r.excludeFrom=s.substring(15);else if(s==="--"){n.push(...t.slice(i+1));break}else{if(s.startsWith("-"))return{ok:!1,error:fe("tar",s)};n.push(s)}i++}return{ok:!0,options:r,files:n}}function Gt(e){let t=e[0],r=[],n=1;for(let i of t)r.push(`-${i}`),"fCTX".includes(i)&&n<e.length&&(r.push(e[n]),n++);return r.push(...e.slice(n)),r}var et=100;function k(e){return{maxArchiveSize:e.limits.maxArchiveBytes,maxCompressedSize:e.limits.maxArchiveCompressedBytes,maxEntrySize:e.limits.maxArchiveEntryBytes,maxEntries:e.limits.maxArchiveEntries,signal:e.signal,executionScope:e.executionScope}}function B(e){return e.signal?.aborted===!0}function N(){return{stdout:"",stderr:`tar: operation aborted
|
|
14
|
+
`,exitCode:126}}var Zt={name:"tar",summary:"manipulate tape archives",usage:"tar [options] [file...]",description:["Create, extract, or list contents of tar archives.","","One of -c, -r, -u, -x, or -t is required to specify the operation."],options:["-c, --create create a new archive","-r, --append append files to the end of an archive","-u, --update only append files newer than copy in archive","-x, --extract extract files from an archive","-t, --list list contents of an archive","-f, --file=ARCHIVE use archive file ARCHIVE","-a, --auto-compress use archive suffix to determine compression","-z, --gzip filter archive through gzip","-j, --bzip2 filter archive through bzip2","-J, --xz filter archive through xz","--zstd filter archive through zstd","-v, --verbose verbosely list files processed","-O, --to-stdout extract files to standard output","-k, --keep-old-files don't replace existing files when extracting","-m, --touch don't extract file modified time","-C, --directory=DIR change to directory DIR before performing operations","-p, --preserve preserve permissions","-P, --absolute-names do not strip leading '/' or block '..' paths","-T, --files-from=FILE read files to extract/create from FILE","-X, --exclude-from=FILE read exclude patterns from FILE","--strip=N strip N leading path components on extraction","--exclude=PATTERN exclude files matching PATTERN","--wildcards use wildcards for pattern matching"," --help display this help and exit"],examples:["tar -cvf archive.tar file1 file2 Create archive from files","tar -czvf archive.tar.gz dir/ Create gzip-compressed archive","tar -cjvf archive.tar.bz2 dir/ Create bzip2-compressed archive","tar -rf archive.tar newfile.txt Append file to archive","tar -uf archive.tar dir/ Update archive with newer files","tar -xvf archive.tar Extract archive","tar -xvf archive.tar -C /tmp Extract to /tmp","tar -tvf archive.tar List archive contents","tar -xzf archive.tar.gz Extract gzip archive","tar -xf archive.tar file1.txt Extract specific file","tar -xOf archive.tar file.txt Extract file to stdout","tar -xf archive.tar --wildcards '*.txt' Extract matching files"]};function Ee(e,t){let r=e.includes("/")?e.substring(e.lastIndexOf("/")+1):e;for(let n of t){let i=n.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"<<<GLOBSTAR>>>").replace(/\*/g,"[^/]*").replace(/<<<GLOBSTAR>>>/g,".*").replace(/\?/g,".");if(D(`^${i}$`).test(e)||D(`^${i}/`).test(e)||!n.includes("/")&&D(`^${i}$`).test(r))return!0}return!1}function se(e,t){let r=t.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"<<<GLOBSTAR>>>").replace(/\*/g,"[^/]*").replace(/<<<GLOBSTAR>>>/g,".*").replace(/\?/g,"."),n=e.includes("/")?e.substring(e.lastIndexOf("/")+1):e;return D(`^${r}$`).test(e)||D(`^${r}$`).test(n)}function tt(e,t){if(t<=0)return e;let r=e.split("/").filter(n=>n!=="");return r.length<=t?"":r.slice(t).join("/")}function rt(e){return e.split("/").some(t=>t==="..")}function qt(e,t){if(t)return{safePath:e};let r=e.replace(/^\/+/,"");return r.length===0?{safePath:""}:rt(r)?{error:"Path contains '..'"}:{safePath:r}}function Yt(e){let r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()],n=e.getDate().toString().padStart(2," "),i=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0");return`${r} ${n} ${i}:${s}`}async function ae(e,t,r,n){let i=[],s=[],a=e.fs.resolvePath(t,r);if(B(e))return{entries:i,errors:["tar: operation aborted"]};try{let o=await e.fs.stat(a);if(B(e))return{entries:i,errors:["tar: operation aborted"]};if(Ee(r,n))return{entries:i,errors:s};if(o.isDirectory){i.push({name:r,isDirectory:!0,mode:o.mode,mtime:o.mtime});let c=await e.fs.readdir(a);if(B(e))return{entries:i,errors:["tar: operation aborted"]};for(let l=0;l<c.length;l+=et){if(B(e))return{entries:i,errors:["tar: operation aborted"]};let f=c.slice(l,l+et),u=await Promise.all(f.map(h=>ae(e,t,r?`${r}/${h}`:h,n)));for(let h of u)i.push(...h.entries),s.push(...h.errors)}}else if(o.isFile){let c=await e.fs.readFileBuffer(a);if(B(e))return{entries:i,errors:["tar: operation aborted"]};i.push({name:r,content:c,mode:o.mode,mtime:o.mtime})}else if(o.isSymbolicLink){let c=await e.fs.readlink(a);if(B(e))return{entries:i,errors:["tar: operation aborted"]};i.push({name:r,isSymlink:!0,linkTarget:c,mode:o.mode,mtime:o.mtime})}}catch(o){let c=o instanceof Error?o.message:"unknown error";s.push(`tar: ${r}: ${c}`)}return{entries:i,errors:s}}async function Kt(e,t,r){if(r.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to create an empty archive
|
|
15
|
+
`,exitCode:2};let n=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,i=[],s=[],a="";for(let f of r){if(B(e))return N();let{entries:u,errors:h}=await ae(e,n,f,t.exclude);if(i.push(...u),s.push(...h),t.verbose)for(let y of u)a+=`${y.name}${y.isDirectory?"/":""}
|
|
16
|
+
`}if(i.length===0&&s.length>0)return{stdout:"",stderr:`${s.join(`
|
|
17
|
+
`)}
|
|
18
|
+
`,exitCode:2};let o;try{t.gzip?o=await Ye(i,k(e)):t.bzip2?o=await Ke(i,k(e)):t.xz?o=await Je(i,k(e)):t.zstd?o=await Ve(i,k(e)):o=await R(i,k(e))}catch(f){return{stdout:"",stderr:`tar: error creating archive: ${f instanceof Error?f.message:"unknown error"}
|
|
19
|
+
`,exitCode:2}}let c="";if(t.file&&t.file!=="-"){let f=e.fs.resolvePath(e.cwd,t.file);try{await e.fs.writeFile(f,o)}catch(u){let h=u instanceof Error?u.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${h}
|
|
20
|
+
`,exitCode:2}}}else c=Buffer.from(o).toString("latin1");let l=a;return s.length>0&&(l+=`${s.join(`
|
|
21
|
+
`)}
|
|
22
|
+
`),{stdout:c,stderr:l,exitCode:s.length>0?2:0,stdoutKind:c.length>0?"bytes":"text"}}async function Jt(e,t,r){if(!t.file||t.file==="-")return{stdout:"",stderr:`tar: Cannot append to stdin/stdout
|
|
23
|
+
`,exitCode:2};if(r.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to append nothing to archive
|
|
24
|
+
`,exitCode:2};let n=e.fs.resolvePath(e.cwd,t.file),i;try{i=await e.fs.readFileBuffer(n)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
|
|
25
|
+
`,exitCode:2}}let s=await L(i,k(e));if(s.error)return{stdout:"",stderr:`tar: ${s.error}
|
|
26
|
+
`,exitCode:2};let a=s.entries.map(d=>({name:d.name,content:d.content,mode:d.mode,mtime:d.mtime,isDirectory:d.type==="directory",isSymlink:d.type==="symlink",linkTarget:d.linkTarget,uid:d.uid,gid:d.gid})),o=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,c=[],l=[],f="";for(let d of r){let{entries:m,errors:p}=await ae(e,o,d,t.exclude);if(c.push(...m),l.push(...p),t.verbose)for(let b of m)f+=`${b.name}${b.isDirectory?"/":""}
|
|
27
|
+
`}let u=[...a,...c],h;try{h=await R(u,k(e))}catch(d){return{stdout:"",stderr:`tar: error creating archive: ${d instanceof Error?d.message:"unknown error"}
|
|
28
|
+
`,exitCode:2}}try{await e.fs.writeFile(n,h)}catch(d){let m=d instanceof Error?d.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${m}
|
|
29
|
+
`,exitCode:2}}let y=f;return l.length>0&&(y+=`${l.join(`
|
|
30
|
+
`)}
|
|
31
|
+
`),{stdout:"",stderr:y,exitCode:l.length>0?2:0}}async function Vt(e,t,r){if(!t.file||t.file==="-")return{stdout:"",stderr:`tar: Cannot update stdin/stdout
|
|
32
|
+
`,exitCode:2};if(r.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to update with nothing
|
|
33
|
+
`,exitCode:2};let n=e.fs.resolvePath(e.cwd,t.file),i;try{i=await e.fs.readFileBuffer(n)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
|
|
34
|
+
`,exitCode:2}}let s=await L(i,k(e));if(s.error)return{stdout:"",stderr:`tar: ${s.error}
|
|
35
|
+
`,exitCode:2};let a=new Map;for(let p of s.entries)a.set(p.name,p.mtime);let o=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,c=[],l=[],f="";for(let p of r){let{entries:b,errors:w}=await ae(e,o,p,t.exclude);l.push(...w);for(let S of b){let z=a.get(S.name);(!z||S.mtime&&S.mtime.getTime()>z.getTime())&&(c.push(S),t.verbose&&(f+=`${S.name}${S.isDirectory?"/":""}
|
|
36
|
+
`))}}if(c.length===0){let p="";return l.length>0&&(p=`${l.join(`
|
|
37
|
+
`)}
|
|
38
|
+
`),{stdout:"",stderr:p,exitCode:l.length>0?2:0}}let u=new Set(c.map(p=>p.name)),y=[...s.entries.filter(p=>!u.has(p.name)).map(p=>({name:p.name,content:p.content,mode:p.mode,mtime:p.mtime,isDirectory:p.type==="directory",isSymlink:p.type==="symlink",linkTarget:p.linkTarget,uid:p.uid,gid:p.gid})),...c],d;try{d=await R(y,k(e))}catch(p){return{stdout:"",stderr:`tar: error creating archive: ${p instanceof Error?p.message:"unknown error"}
|
|
39
|
+
`,exitCode:2}}try{await e.fs.writeFile(n,d)}catch(p){let b=p instanceof Error?p.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${b}
|
|
40
|
+
`,exitCode:2}}let m=f;return l.length>0&&(m+=`${l.join(`
|
|
41
|
+
`)}
|
|
42
|
+
`),{stdout:"",stderr:m,exitCode:l.length>0?2:0}}async function Qt(e,t,r){let n;if(t.file&&t.file!=="-"){let m=e.fs.resolvePath(e.cwd,t.file);try{n=await e.fs.readFileBuffer(m)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
|
|
43
|
+
`,exitCode:2}}}else n=Uint8Array.from(e.stdin,m=>m.charCodeAt(0));let i,s=t.gzip||xe(n),a=t.bzip2||be(n),o=t.xz||ze(n),c=t.zstd||Ce(n);if(s?i=await we(n,k(e)):a?i=await ve(n,k(e)):o?i=await ke(n,k(e)):c?i=await Ae(n,k(e)):i=await L(n,k(e)),i.error)return{stdout:"",stderr:`tar: ${i.error}
|
|
44
|
+
`,exitCode:2};let l=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,f=t.absoluteNames?r:r.map(m=>m.replace(/^\/+/,"")).filter(m=>m.length>0),u="",h="",y=[];if(t.directory&&!t.toStdout){if(B(e))return N();try{await e.fs.mkdir(l,{recursive:!0})}catch{}}for(let m of i.entries){if(B(e))return N();let p=tt(m.name,t.strip);if(!p)continue;let b=qt(p,t.absoluteNames);if(b.error){y.push(`tar: ${p}: ${b.error}`);continue}let w=b.safePath??"";if(!w)continue;let S=w.endsWith("/")?w.slice(0,-1):w;if(f.length>0){let C;if(t.wildcards?C=f.some(A=>se(w,A)||se(S,A)||w.startsWith(`${A}/`)):C=f.some(A=>w===A||w.startsWith(`${A}/`)||S===A),!C)continue}if(Ee(w,t.exclude))continue;let z=e.fs.resolvePath(l,w);try{if(m.type==="directory"){if(t.toStdout)continue;if(B(e))return N();await e.fs.mkdir(z,{recursive:!0}),t.verbose&&(u+=`${w}
|
|
45
|
+
`)}else if(m.type==="file"){if(t.toStdout){h+=new TextDecoder().decode(m.content),t.verbose&&(u+=`${w}
|
|
46
|
+
`);continue}if(t.keepOldFiles)try{await e.fs.stat(z),t.verbose&&(u+=`${w}: not overwritten, file exists
|
|
47
|
+
`);continue}catch{}let C=z.substring(0,z.lastIndexOf("/"));if(C)try{await e.fs.mkdir(C,{recursive:!0})}catch{}if(B(e))return N();if(await e.fs.writeFile(z,m.content),t.preserve&&m.mode)try{await e.fs.chmod(z,m.mode)}catch{}t.verbose&&(u+=`${w}
|
|
48
|
+
`)}else if(m.type==="symlink"&&m.linkTarget){if(t.toStdout)continue;if(!t.absoluteNames&&(m.linkTarget.startsWith("/")||rt(m.linkTarget))){y.push(`tar: ${w}: unsafe symlink target`);continue}if(t.keepOldFiles)try{await e.fs.stat(z),t.verbose&&(u+=`${w}: not overwritten, file exists
|
|
49
|
+
`);continue}catch{}let C=z.substring(0,z.lastIndexOf("/"));if(C)try{await e.fs.mkdir(C,{recursive:!0})}catch{}try{if(B(e))return N();await e.fs.symlink(m.linkTarget,z)}catch{}t.verbose&&(u+=`${w}
|
|
50
|
+
`)}}catch(C){if(B(e))return N();let A=C instanceof Error?C.message:"unknown error";y.push(`tar: ${w}: ${A}`)}}let d=u;return y.length>0&&(d+=`${y.join(`
|
|
51
|
+
`)}
|
|
52
|
+
`),{stdout:h,stderr:d,exitCode:y.length>0?2:0}}async function er(e,t,r){let n;if(t.file&&t.file!=="-"){let f=e.fs.resolvePath(e.cwd,t.file);try{n=await e.fs.readFileBuffer(f)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
|
|
53
|
+
`,exitCode:2}}}else n=Uint8Array.from(e.stdin,f=>f.charCodeAt(0));let i,s=t.gzip||xe(n),a=t.bzip2||be(n),o=t.xz||ze(n),c=t.zstd||Ce(n);if(s?i=await we(n,k(e)):a?i=await ve(n,k(e)):o?i=await ke(n,k(e)):c?i=await Ae(n,k(e)):i=await L(n,k(e)),i.error)return{stdout:"",stderr:`tar: ${i.error}
|
|
54
|
+
`,exitCode:2};let l="";for(let f of i.entries){if(B(e))return N();let u=tt(f.name,t.strip);if(!u)continue;let h=u.endsWith("/")?u.slice(0,-1):u;if(r.length>0){let y;if(t.wildcards?y=r.some(d=>se(u,d)||se(h,d)||u.startsWith(`${d}/`)):y=r.some(d=>u===d||u.startsWith(`${d}/`)||h===d),!y)continue}if(!Ee(u,t.exclude))if(t.verbose){let y=f.type==="directory",d=$e(f.mode,y),m=`${f.uid}/${f.gid}`,p=f.size.toString().padStart(8," "),b=Yt(f.mtime),w=`${d} ${m.padEnd(10)} ${p} ${b} ${u}`;f.type==="symlink"&&f.linkTarget&&(w+=` -> ${f.linkTarget}`),l+=`${w}
|
|
55
|
+
`}else l+=`${u}
|
|
56
|
+
`}return{stdout:l,stderr:"",exitCode:0}}var zr={name:"tar",async execute(e,t){if(B(t))return N();if(Be(e))return Se(Zt);let r=Qe(e);if(!r.ok)return r.error;let{options:n,files:i}=r,s=[n.create,n.append,n.update,n.extract,n.list].filter(Boolean).length;if(s===0)return{stdout:"",stderr:`tar: You must specify one of -c, -r, -u, -x, or -t
|
|
57
|
+
`,exitCode:2};if(s>1)return{stdout:"",stderr:`tar: You may not specify more than one of -c, -r, -u, -x, or -t
|
|
58
|
+
`,exitCode:2};if(n.autoCompress&&n.file&&n.create){let c=n.file.toLowerCase();c.endsWith(".tar.gz")||c.endsWith(".tgz")?n.gzip=!0:c.endsWith(".tar.bz2")||c.endsWith(".tbz2")?n.bzip2=!0:c.endsWith(".tar.xz")||c.endsWith(".txz")?n.xz=!0:(c.endsWith(".tar.zst")||c.endsWith(".tzst"))&&(n.zstd=!0)}let a=[n.gzip,n.bzip2,n.xz,n.zstd].filter(Boolean).length;if(a>1)return{stdout:"",stderr:`tar: You may not specify more than one compression option
|
|
59
|
+
`,exitCode:2};if((n.append||n.update)&&a>0)return{stdout:"",stderr:`tar: Cannot append/update compressed archives - decompress first
|
|
60
|
+
`,exitCode:2};let o=i;if(n.filesFrom){let c=t.fs.resolvePath(t.cwd,n.filesFrom);try{let f=(await t.fs.readFile(c)).split(`
|
|
61
|
+
`).map(u=>u.trim()).filter(u=>u.length>0&&!u.startsWith("#"));o=[...i,...f]}catch{return{stdout:"",stderr:`tar: ${n.filesFrom}: Cannot open: No such file or directory
|
|
62
|
+
`,exitCode:2}}}if(n.excludeFrom){let c=t.fs.resolvePath(t.cwd,n.excludeFrom);try{let f=(await t.fs.readFile(c)).split(`
|
|
63
|
+
`).map(u=>u.trim()).filter(u=>u.length>0&&!u.startsWith("#"));n.exclude.push(...f)}catch{return{stdout:"",stderr:`tar: ${n.excludeFrom}: Cannot open: No such file or directory
|
|
64
|
+
`,exitCode:2}}}return n.create?Kt(t,n,o):n.append?Jt(t,n,o):n.update?Vt(t,n,o):n.extract?Qt(t,n,o):er(t,n,o)}},vr={name:"tar",flags:[{flag:"-c",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-f",type:"value",valueHint:"path"},{flag:"-z",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-C",type:"value",valueHint:"path"},{flag:"--strip-components",type:"value",valueHint:"number"},{flag:"--exclude",type:"value",valueHint:"pattern"}],needsArgs:!0};export{zr as a,vr as b};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as Y}from"./chunk-EOMWWW4L.js";import{l as U,m as V}from"./chunk-IQGNPH54.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:f=!1,filename:u="",onlyMatching:p=!1,beforeContext:F=0,afterContext:W=0,maxCount:I=0,matchBeyondMaxCount:H=!0,contextSeparator:Q="--",showColumn:z=!1,vimgrep:N=!1,showByteOffset:j=!1,replace:O=null,passthru:T=!1,multiline:Z=!1,kResetGroup:B,preFilter:v,maxWork:b,maxMatches:L,signal:_}=e;if(Z)return ie(t,n,{invertMatch:i,showLineNumbers:s,countOnly:o,countMatches:f,filename:u,onlyMatching:p,beforeContext:F,afterContext:W,maxCount:I,contextSeparator:Q,showColumn:z,showByteOffset:j,replace:O,kResetGroup:B,preFilter:v,maxWork:b,maxMatches:L,signal:_});let G=0,M=(l=1)=>{if(_?.aborted)throw new V;if(G+=l,b!==void 0&&G>b)throw new U(`search: matching work limit exceeded (${b})`,"iterations")},A=(l,h)=>{if(L!==void 0&&l.length>=L)throw new U(`search: result limit exceeded (${L})`,"array_elements");l.push(h)},q=1;for(let l=0;l<t.length;l++)if((l&1023)===0&&M(),t.charCodeAt(l)===10&&(q++,L!==void 0&&q>L))throw new U(`search: line limit exceeded (${L})`,"array_elements");let k=t.split(`
|
|
3
|
+
`),R=k.length,P=R>0&&k[R-1]===""?R-1:R;if(o||f){let l=0,h=0,a=(f||p)&&!i;for(let g=0;g<P&&(M(),!(I>0&&h>=I));g++){let w=l,r=k[g];if(!(v&&!i&&!X(v,r))){if(n.lastIndex=0,a)for(let E=n.exec(r);E!==null;E=n.exec(r))M(),l++,E[0].length===0&&n.lastIndex++;else n.test(r)!==i&&l++;l>w&&h++}}return{output:`${u?`${u}:${l}`:String(l)}
|
|
4
|
+
`,matched:l>0,matchCount:l}}if(F===0&&W===0&&!T){let l=[],h=!1,a=0,x=0;for(let g=0;g<P&&(M(),!(I>0&&a>=I));g++){let w=k[g],r=null;if(v&&!X(v,w)||(n.lastIndex=0,r=n.exec(w)),r!==null!==i)if(h=!0,a++,p)for(let $=r;$!==null;$=n.exec(w)){M();let y=B!==void 0?$[B]??"":$[0],D=O!==null?ee(O,$):y,C=u?`${u}:`:"";j&&(C+=`${x+$.index}:`),s&&(C+=`${g+1}:`),z&&(C+=`${$.index+1}:`),A(l,C+D),$[0].length===0&&n.lastIndex++}else if(N)for(let $=r;$!==null;$=n.exec(w)){M();let y=u?`${u}:`:"";j&&(y+=`${x+$.index}:`),s&&(y+=`${g+1}:`),z&&(y+=`${$.index+1}:`),A(l,y+w),$[0].length===0&&n.lastIndex++}else{let $=r?r.index+1:1,y=w;O!==null&&(n.lastIndex=0,y=n.replace(w,(...C)=>{if(C[0].length===0)return"";let K=C,J=C[C.length-1];return typeof J=="object"&&J!==null?(K.groups=J,K.input=C[C.length-2],K.index=C[C.length-3]):(K.input=C[C.length-1],K.index=C[C.length-2]),ee(O,K)}));let D=u?`${u}:`:"";j&&(D+=`${x+(r?r.index:0)}:`),s&&(D+=`${g+1}:`),z&&(D+=`${$}:`),A(l,D+y)}x+=w.length+1}return{output:l.length>0?`${l.join(`
|
|
5
|
+
`)}
|
|
6
|
+
`:"",matched:h,matchCount:a}}if(T){let l=[],h=!1,a=0;for(let x=0;x<P;x++){M();let g=k[x],w;v&&!X(v,g)?w=!1:(n.lastIndex=0,w=n.test(g));let r=w!==i;r&&(h=!0,a++);let E=r?":":"-",$=u?`${u}${E}`:"";s&&($+=`${x+1}${E}`),A(l,$+g)}return{output:l.length>0?`${l.join(`
|
|
7
|
+
`)}
|
|
8
|
+
`:"",matched:h,matchCount:a}}let S=[],c=0,d=-1,m=[];for(let l=0;l<P&&(M(),!(I>0&&c>=I));l++){let h=k[l],a;if(v&&!X(v,h)?a=!1:(n.lastIndex=0,a=n.test(h)),a!==i){if(L!==void 0&&m.length>=L)throw new U(`search: match limit exceeded (${L})`,"array_elements");m.push(l),c++}}for(let l of m){M();let h=Math.max(0,l-F);d>=0&&h>d+1&&A(S,Q);let a=Math.min(P-1,l+W);for(let x=Math.max(h,d+1);x<=a;x++){M(),d=x;let g=k[x];n.lastIndex=0;let w=(H||x<=m[m.length-1])&&n.test(g)!==i;if(w&&p){n.lastIndex=0;for(let r=n.exec(g);r!==null;r=n.exec(g)){M();let E=B!==void 0?r[B]??"":r[0],$=O!==null?O:E,y=u?`${u}:`:"";s&&(y+=`${x+1}:`),z&&(y+=`${r.index+1}:`),A(S,y+$),r[0].length===0&&n.lastIndex++}}else{let r=g,E=w?":":"-";s&&(r=`${x+1}${E}${r}`),u&&(r=`${u}${E}${r}`),A(S,r)}}}return{output:S.length>0?`${S.join(`
|
|
9
|
+
`)}
|
|
10
|
+
`:"",matched:c>0,matchCount:c}}function ie(t,n,e){let{invertMatch:i,showLineNumbers:s,countOnly:o,countMatches:f,filename:u,onlyMatching:p,beforeContext:F,afterContext:W,maxCount:I,contextSeparator:H,showColumn:Q,showByteOffset:z,replace:N,kResetGroup:j,preFilter:O,maxWork:T,maxMatches:Z,signal:B}=e,v=0,b=(c=1)=>{if(B?.aborted)throw new V;if(v+=c,T!==void 0&&v>T)throw new U(`search: matching work limit exceeded (${T})`,"iterations")};if(O&&!i&&!X(O,t))return o||f?{output:`${u?`${u}:0`:"0"}
|
|
11
|
+
`,matched:!1,matchCount:0}:{output:"",matched:!1,matchCount:0};let L=[0];for(let c=0;c<t.length;c++)if((c&1023)===0&&b(),t[c]===`
|
|
12
|
+
`){if(Z!==void 0&&L.length>=Z)throw new U(`search: line index limit exceeded (${Z})`,"array_elements");L.push(c+1)}let _=t.split(`
|
|
13
|
+
`),G=_.length,M=G>0&&_[G-1]===""?G-1:G,A=c=>{let d=0,m=L.length;for(;d<m;){let l=d+Math.floor((m-d)/2);L[l]<=c?d=l+1:m=l}return Math.max(0,d-1)},q=c=>{let d=A(c);return c-L[d]+1};if(o||f){let c=0,d=0,m=-1;n.lastIndex=0;for(let a=n.exec(t);a!==null&&(b(),!(I>0&&c>=I));a=n.exec(t)){if(c++,!f){let x=A(a.index),g=A(a.index+Math.max(0,a[0].length-1)),w=Math.max(x,m+1);w<=g&&(d+=g-w+1,m=g)}a[0].length===0&&n.lastIndex++}let l=f?i?0:c:i?M-d:d;return{output:`${u?`${u}:${l}`:String(l)}
|
|
14
|
+
`,matched:l>0,matchCount:l}}let k=[];n.lastIndex=0;for(let c=n.exec(t);c!==null&&(b(),!(I>0&&k.length>=I));c=n.exec(t)){if(Z!==void 0&&k.length>=Z)throw new U(`search: match limit exceeded (${Z})`,"array_elements");let d=A(c.index),m=A(c.index+Math.max(0,c[0].length-1)),l=j!==void 0?c[j]??"":c[0];k.push({startLine:d,endLine:m,byteOffset:c.index,column:q(c.index),matchText:l}),c[0].length===0&&n.lastIndex++}if(i){let c=new Set;for(let m of k)for(let l=m.startLine;l<=m.endLine;l++)b(),c.add(l);let d=[];for(let m=0;m<M;m++)if(b(),!c.has(m)){let l=_[m];s&&(l=`${m+1}:${l}`),u&&(l=`${u}:${l}`),d.push(l)}return{output:d.length>0?`${d.join(`
|
|
15
|
+
`)}
|
|
16
|
+
`:"",matched:d.length>0,matchCount:d.length}}if(k.length===0)return{output:"",matched:!1,matchCount:0};let R=new Set,P=-1,S=[];for(let c of k){b();let d=Math.max(0,c.startLine-F),m=Math.min(M-1,c.endLine+W);P>=0&&d>P+1&&S.push(H);for(let l=d;l<c.startLine;l++)if(b(),!R.has(l)){R.add(l),P=l;let h=_[l];s&&(h=`${l+1}-${h}`),u&&(h=`${u}-${h}`),S.push(h)}if(p){let l=N!==null?N:c.matchText,h=u?`${u}:`:"";z&&(h+=`${c.byteOffset}:`),s&&(h+=`${c.startLine+1}:`),Q&&(h+=`${c.column}:`),S.push(h+l);for(let a=c.startLine;a<=c.endLine;a++)b(),R.add(a),P=a}else for(let l=c.startLine;l<=c.endLine&&l<M;l++)if(b(),!R.has(l)){R.add(l),P=l;let h=_[l];N!==null&&l===c.startLine&&(n.lastIndex=0,h=n.replace(h,N));let a=u?`${u}:`:"";z&&l===c.startLine&&(a+=`${c.byteOffset}:`),s&&(a+=`${l+1}:`),Q&&l===c.startLine&&(a+=`${c.column}:`),S.push(a+h)}for(let l=c.endLine+1;l<=m;l++)if(b(),!R.has(l)){R.add(l),P=l;let h=_[l];s&&(h=`${l+1}-${h}`),u&&(h=`${u}-${h}`),S.push(h)}}return{output:S.length>0?`${S.join(`
|
|
17
|
+
`)}
|
|
18
|
+
`:"",matched:!0,matchCount:k.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),f=le.get(o);if(f){i+=f,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 u=ge(e);e=u.pattern,i=u.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":""),f=oe(e,n.ignoreCase??!1);return{regex:Y(e,o),kResetGroup:i,preFilter:f??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=ce(e);if(i===null)return null;let s=[];for(let o of i){let f=fe(o);if(f===null||f.length===0)return null;s.push(f)}return s.length===0?null:{needles:n?s.map(o=>o.toLowerCase()):s,ignoreCase:n}}function ce(t){let n=[],e=0,i=!1,s=0;for(let o=0;o<t.length;o++){let f=t[o];if(f==="\\"){o++;continue}if(i){f==="]"&&(i=!1);continue}if(f==="[")i=!0;else if(f==="(")e++;else if(f===")"){if(e--,e<0)return null}else f==="|"&&e===0&&(n.push(t.slice(s,o)),s=o+1)}return e!==0||i?null:(n.push(t.slice(s)),n)}function fe(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]||"",f=i[3];if(f===":"){let u=e+i[0].length-1,p=re(t,e);if(p!==-1){let F=t.slice(u+1,p),W=de(F,s,o);n+=`(?:${W})`,e=p+1;continue}}else if(f===")"||f===""){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],f=t[e+1];s.push("-"),s.push(f),/[a-z]/.test(o)&&/[a-z]/.test(f)?(s.push(o.toUpperCase()),s.push("-"),s.push(f.toUpperCase())):/[A-Z]/.test(o)&&/[A-Z]/.test(f)&&(s.push(o.toLowerCase()),s.push("-"),s.push(f.toLowerCase())),e+=2}else{let o=t[e];if(s.push(o),/[a-zA-Z]/.test(o)){let f=o===o.toLowerCase()?o.toUpperCase():o.toLowerCase();s.includes(f)||s.push(f)}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 ge(t){let n=$e(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 $e(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 f=t[e+1];if(f==="|"){n+="|",e+=2,i=!0;continue}if(f==="("){n+="(",e+=2,s++,i=!0;continue}if(f===")"){n+=")",e+=2,s=Math.max(0,s-1),i=!1;continue}if(f==="{"){let p=t.slice(e).match(/^\\{(\d+)(,(\d*)?)?\\}/);if(p){let F=p[1],W=p[2]!==void 0,I=p[3]||"";W?n+=`{${F},${I}}`:n+=`{${F}}`,e+=p[0].length,i=!1;continue}n+="\\{",e+=2,i=!1;continue}if(f==="}"){n+="\\}",e+=2,i=!1;continue}n+=o+f,e+=2,i=!1;continue}if(o==="*"&&i){n+="\\*",e++;continue}if(o==="^"){if(i){n+="^",e++;continue}n+="\\^",e++;continue}if(o==="$"){let f=e===t.length-1,u=e+2<t.length&&t[e+1]==="\\"&&t[e+2]===")";f||u?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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as r}from"./chunk-EOMWWW4L.js";var g=2048,o=new Map;function u(l,c,t){let s=typeof t=="boolean"?{ignoreCase:t}:t??{},e=c;s.stripQuotes&&(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1));let i=s.ignoreCase?`i:${e}`:e,n=o.get(i);if(!n){if(n=a(e,s.ignoreCase),o.size>=g){let f=o.keys().next().value;f!==void 0&&o.delete(f)}o.set(i,n)}return n.test(l)}function a(l,c){let t="^";for(let s=0;s<l.length;s++){let e=l[s];if(e==="*")t+=".*";else if(e==="?")t+=".";else if(e==="["){let i=s+1;for(;i<l.length&&l[i]!=="]";)i++;t+=l.slice(s,i+1),s=i}else e==="."||e==="+"||e==="^"||e==="$"||e==="{"||e==="}"||e==="("||e===")"||e==="|"||e==="\\"?t+=`\\${e}`:t+=e}return t+="$",r(t,c?"i":"")}export{u as a};
|
|
@@ -0,0 +1,36 @@
|
|
|
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-JMGGZYF2.js";import{d as I}from"./chunk-U3UTFNHI.js";import{a as x}from"./chunk-WFEUQRHM.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};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as L}from"./chunk-R3HY2GCO.js";import{a as $}from"./chunk-T7CFNHX6.js";import{l as p}from"./chunk-IQGNPH54.js";import{g as k}from"./chunk-U3UTFNHI.js";import{a as x}from"./chunk-QIQMJJZ4.js";import{a as F,b as q}from"./chunk-QAYAQNCG.js";var B={name:"cat",summary:"concatenate files and print on the standard output",usage:"cat [OPTION]... [FILE]...",options:["-A, --show-all equivalent to -vET","-b, --number-nonblank number nonempty output lines, overrides -n","-e equivalent to -vE","-E, --show-ends display $ at end of each line","-n, --number number all output lines","-s, --squeeze-blank suppress repeated empty output lines","-t equivalent to -vT","-T, --show-tabs display TAB characters as ^I","-u (ignored)","-v, --show-nonprinting use ^ and M- notation, except for LFD and TAB"," --help display this help and exit"]},I={number:{short:"n",long:"number",type:"boolean"},numberNonblank:{short:"b",long:"number-nonblank",type:"boolean"},showEnds:{short:"E",long:"show-ends",type:"boolean"},showTabs:{short:"T",long:"show-tabs",type:"boolean"},showNonprinting:{short:"v",long:"show-nonprinting",type:"boolean"},showAll:{short:"A",long:"show-all",type:"boolean"},squeeze:{short:"s",long:"squeeze-blank",type:"boolean"},vE:{short:"e",type:"boolean"},vT:{short:"t",type:"boolean"},ignored:{short:"u",type:"boolean"}},K={name:"cat",async execute(n,t){if(q(n))return F(B);let r=x("cat",n,I);if(!r.ok)return r.error;let e=r.result.flags,a=e.showEnds||e.showAll||e.vE,o=e.showTabs||e.showAll||e.vT,i=e.showNonprinting||e.showAll||e.vE||e.vT,c=e.squeeze,l=e.numberNonblank,f=e.number&&!l,s={numberAll:f,numberNonblank:l,showEnds:a,showTabs:o,showNonprinting:i,squeeze:c},m=r.result.positional,b=t.limits.maxStringLength,u=Math.min(b,t.limits.maxOutputSize),g=m.length===0?["-"]:m,h="",d=0,C=0,E,w=a||o||i||c||f||l,v="";for(let y of g)try{let T=y==="-"?t.stdin:await k(t.fs,t.fs.resolvePath(t.cwd,y)),A=T,z=A.length,N=Math.min(w?b:u,t.limits.maxInputBytes);if(z>N-C)throw new p(`cat: ${w?"input":"output"} size limit exceeded (${N} bytes)`,w?"string_length":"output_size");y!=="-"&&L(t,z,"cat"),C+=z,v+=A}catch(T){$(T),h+=`cat: ${y}: No such file or directory
|
|
3
|
+
`,d=1}return w?E=_(v,s,u,t.limits.maxArrayElements):E=v,{stdout:E,stderr:h,exitCode:d,stdoutEncoding:"binary"}}};function S(n){if(n>=32){if(n<127)return String.fromCharCode(n);if(n===127)return"^?";let t=n-128;return t>=32?t===127?"M-^?":`M-${String.fromCharCode(t)}`:`M-^${String.fromCharCode(t+64)}`}return`^${String.fromCharCode(n+64)}`}function M(n,t,r){if(!t.showNonprinting&&!t.showTabs)return n;let e="",a=o=>{if(o.length>r-e.length)throw new p("cat: output size limit exceeded","output_size");e+=o};for(let o=0;o<n.length;o++){let i=n.charCodeAt(o);i===9?a(t.showTabs?"^I":" "):t.showNonprinting?a(S(i)):a(n[o])}return e}function _(n,t,r,e){let a=1;for(let s=0;s<n.length;s++)if(n.charCodeAt(s)===10&&a++,a>e)throw new p(`cat: array element limit exceeded (${e})`,"array_elements");let o=n.split(`
|
|
4
|
+
`),i="",c=1,l=!1,f=s=>{if(s.length>r-i.length)throw new p(`cat: output size limit exceeded (${r} bytes)`,"output_size");i+=s};for(let s=0;s<o.length;s++){let m=s===o.length-1,b=!m,u=o[s];if(m&&u==="")break;let g=u==="";if(t.squeeze&&g&&l)continue;l=g;let h="";(t.numberAll||t.numberNonblank&&!g)&&(h=`${String(c).padStart(6," ")} `,c++);let d=r-i.length-h.length;if(d<0)throw new p(`cat: output size limit exceeded (${r} bytes)`,"output_size");f(h+M(u,t,d)),b&&f(t.showEnds?`$
|
|
5
|
+
`:`
|
|
6
|
+
`)}return i}var Q={name:"cat",flags:[{flag:"-n",type:"boolean"},{flag:"-A",type:"boolean"},{flag:"-b",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-t",type:"boolean"}],stdinType:"text",needsFiles:!0};export{K as a,Q as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
function n(e){return e instanceof Error?e.message:String(e)}function t(e){return typeof e=="object"&&e!==null&&"code"in e&&typeof e.code=="string"?e.code:e instanceof Error?/^(E[A-Z]+)\b/.exec(e.message)?.[1]:void 0}export{n as a,t as b};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as w}from"./chunk-T7CFNHX6.js";import{e as b}from"./chunk-Q6ZH76O4.js";import{d as S,e as F}from"./chunk-JMGGZYF2.js";import{a as v,b as $,c as y}from"./chunk-QAYAQNCG.js";var E={name:"chmod",summary:"change file mode bits",usage:"chmod [OPTIONS] MODE FILE...",options:["-R change files recursively","-v output a diagnostic for every file processed"," --help display this help and exit"]},O={name:"chmod",async execute(e,a){if($(e))return v(E);if(e.length<2)return{stdout:"",stderr:`chmod: missing operand
|
|
3
|
+
`,exitCode:1};let i=!1,f=!1,n=0;for(;n<e.length&&e[n].startsWith("-");){let t=e[n];if(t==="-R"||t==="--recursive")i=!0,n++;else if(t==="-v"||t==="--verbose")f=!0,n++;else if(t==="--"){n++;break}else{if(/^[+-]?[rwxugo]+/.test(t)||/^\d+$/.test(t))break;if(/^-[Rv]+$/.test(t)){t.includes("R")&&(i=!0),t.includes("v")&&(f=!0),n++;continue}return y("chmod",t)}}if(e.length-n<2)return{stdout:"",stderr:`chmod: missing operand
|
|
4
|
+
`,exitCode:1};let r=e[n],d=e.slice(n+1),o=/^[0-7]+$/.test(r),s;if(o)s=parseInt(r,8);else try{p(r,420)}catch{return{stdout:"",stderr:`chmod: invalid mode: '${r}'
|
|
5
|
+
`,exitCode:1}}let u=new b(Math.min(a.limits.maxOutputSize,a.limits.maxStringLength),"chmod"),l="",c=!1;for(let t of d){let m=a.fs.resolvePath(a.cwd,t);try{let h;if(o&&s!==void 0)h=s;else{let g=await a.fs.stat(m);h=p(r,g.mode)}await a.fs.chmod(m,h),f&&u.append(`mode of '${t}' changed to ${h.toString(8).padStart(4,"0")}
|
|
6
|
+
`),i&&(await a.fs.stat(m)).isDirectory&&await I(a,m,o?s:void 0,o?void 0:r,f,u)}catch(h){w(h),l+=`chmod: cannot access '${t}': No such file or directory
|
|
7
|
+
`,c=!0}}return{stdout:u.build(),stderr:l,exitCode:c?1:0}}};async function I(e,a,i,f,n,r){let d=new S({limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"chmod"});await F({fs:e.fs,root:a,symlinks:"never",budget:d,limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"chmod"},async o=>{if(o.depth===0||o.phase!=="enter")return;let s=i!==void 0?i:f!==void 0?p(f,o.stat.mode):420;await e.fs.chmod(o.path,s),n&&r.append(`mode of '${o.path}' changed to ${s.toString(8).padStart(4,"0")}
|
|
8
|
+
`)})}function p(e,a=420){if(/^[0-7]+$/.test(e))return parseInt(e,8);let i=a&4095,f=e.split(",");for(let n of f){let r=n.match(/^([ugoa]*)([+\-=])([rwxXst]*)$/);if(!r)throw new Error(`Invalid mode: ${e}`);let d=r[1]||"a",o=r[2],s=r[3];(d==="a"||d==="")&&(d="ugo");let u=0;s.includes("r")&&(u|=4),s.includes("w")&&(u|=2),(s.includes("x")||s.includes("X"))&&(u|=1);let l=0;s.includes("s")&&(d.includes("u")&&(l|=2048),d.includes("g")&&(l|=1024)),s.includes("t")&&(l|=512);for(let c of d){let t=0;c==="u"?t=6:c==="g"?t=3:c==="o"&&(t=0);let m=u<<t;o==="+"?i|=m:o==="-"?i&=~m:o==="="&&(i&=~(7<<t),c==="u"&&(i&=-2049),c==="g"&&(i&=-1025),c==="o"&&(i&=-513),i|=m)}o==="+"?i|=l:o==="-"?i&=~l:o==="="&&(s.includes("s")&&(d.includes("u")&&(i|=l&2048),d.includes("g")&&(i|=l&1024)),s.includes("t")&&(i|=l&512))}return i}var k={name:"chmod",flags:[{flag:"-R",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{O as a,k as b};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as w}from"./chunk-SX2HC7SO.js";import{a as b}from"./chunk-LBKOJW6K.js";import{a as h,b as A}from"./chunk-43OP7DFL.js";import{a as y}from"./chunk-L2UW7DWF.js";import{a as v,b as O,c as d}from"./chunk-QAYAQNCG.js";var x={name:"timeout",summary:"run a command with a time limit",usage:"timeout [OPTION] DURATION COMMAND [ARG]...",description:`Start COMMAND, and kill it if still running after DURATION.
|
|
3
|
+
|
|
4
|
+
DURATION is a number with optional suffix:
|
|
5
|
+
s - seconds (default)
|
|
6
|
+
m - minutes
|
|
7
|
+
h - hours
|
|
8
|
+
d - days`,options:["-k, --kill-after=DURATION send KILL signal after DURATION if still running","-s, --signal=SIGNAL specify signal to send (default: TERM)"," --preserve-status exit with same status as COMMAND, even on timeout"," --foreground run command in foreground"," --help display this help and exit"]},R={name:"timeout",async execute(n,s){if(O(n))return v(x);let i=0;for(let e=0;e<n.length;e++){let t=n[e];if(t==="--preserve-status")i=e+1;else if(t==="--foreground")i=e+1;else if(t==="-k"||t==="--kill-after")e++,i=e+1;else if(t.startsWith("--kill-after="))i=e+1;else if(t==="-s"||t==="--signal")e++,i=e+1;else if(t.startsWith("--signal="))i=e+1;else{if(t.startsWith("--")&&t!=="--")return d("timeout",t);if(t.startsWith("-")&&t.length>1&&t!=="--")if(t.startsWith("-k"))i=e+1;else if(t.startsWith("-s"))i=e+1;else return d("timeout",t);else{i=e;break}}}let a=n.slice(i);if(a.length===0)return{stdout:"",stderr:`timeout: missing operand
|
|
9
|
+
`,exitCode:1};let f=a[0],g=w(f);if(g===null)return{stdout:"",stderr:`timeout: invalid time interval '${f}'
|
|
10
|
+
`,exitCode:1};let l=a.slice(1);if(l.length===0)return{stdout:"",stderr:`timeout: missing operand
|
|
11
|
+
`,exitCode:1};if(!s.exec)return{stdout:"",stderr:`timeout: exec not available
|
|
12
|
+
`,exitCode:1};let c=new AbortController,r=b(s.signal,c.signal),u,o;try{let e=new Promise(m=>{o=()=>m({timedOut:!0}),r.signal?.addEventListener("abort",o,{once:!0}),u=h(()=>{c.abort()},g)}),t=s.exec(y([l[0]]),{cwd:s.cwd,signal:r.signal,stdin:s.stdin,stdinKind:"bytes",args:l.slice(1)}).then(m=>({timedOut:!1,result:m})),p=await Promise.race([e,t]);return p.timedOut?(await t.catch(()=>{}),{stdout:"",stderr:"",exitCode:124}):p.result}finally{u!==void 0&&A(u),o&&r.signal?.removeEventListener("abort",o),r.cleanup()}}},L={name:"timeout",flags:[{flag:"-k",type:"value",valueHint:"string"},{flag:"-s",type:"value",valueHint:"string"},{flag:"--preserve-status",type:"boolean"},{flag:"--foreground",type:"boolean"}],needsArgs:!0,minArgs:2};export{R as a,L as b};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as x}from"./chunk-T7CFNHX6.js";import{e as g}from"./chunk-Q6ZH76O4.js";import{l as S}from"./chunk-IQGNPH54.js";import{g as y}from"./chunk-U3UTFNHI.js";async function F(a,n){let s="octal",o=[],p=[];for(let t=0;t<a.length;t++){let e=a[t];if(e==="-c")o.push("char");else if(e==="-An"||e==="-A"&&a[t+1]==="n")s="none",e==="-A"&&t++;else if(e==="-t"&&a[t+1]){let r=a[++t];r==="x1"?o.push("hex"):r==="c"?o.push("char"):r.startsWith("o")&&o.push("octal")}else(!e.startsWith("-")||e==="-")&&p.push(e)}o.length===0&&o.push("octal");let m=new g(n.limits.maxInputBytes,"od input"),A=p.length===0?["-"]:p;for(let t of A){if(t==="-"){m.append(n.stdin);continue}let e=t.startsWith("/")?t:`${n.cwd}/${t}`;try{let r=await y(n.fs,e);n.executionScope?.consumeInput(r.length,"od"),m.append(r)}catch(r){return x(r),{stdout:"",stderr:`od: ${t}: No such file or directory
|
|
3
|
+
`,exitCode:1}}}let C=o.includes("char");function $(t){return t===0?" \\0":t===7?" \\a":t===8?" \\b":t===9?" \\t":t===10?" \\n":t===11?" \\v":t===12?" \\f":t===13?" \\r":t>=32&&t<127?` ${String.fromCharCode(t)}`:` ${t.toString(8).padStart(3,"0")}`}function B(t){return C?` ${t.toString(16).padStart(2,"0")}`:` ${t.toString(16).padStart(2,"0")}`}function w(t){return` ${t.toString(8).padStart(3,"0")}`}let i=m.build(),u=16,d=new g(Math.min(n.limits.maxOutputSize,n.limits.maxStringLength),"od"),h=o.length;if(h>0&&i.length>Math.floor(n.limits.maxLoopIterations/h))throw new S(`od: format work limit exceeded (${n.limits.maxLoopIterations})`,"iterations");n.executionScope?.consumeWork(i.length*h,"od formatting");for(let t=0;t<i.length;t+=u)for(let e=0;e<o.length;e++){let r=o[e],l;r==="char"?l=Array.from(i.slice(t,t+u),f=>$(f.charCodeAt(0))):r==="hex"?l=Array.from(i.slice(t,t+u),f=>B(f.charCodeAt(0))):l=Array.from(i.slice(t,t+u),f=>w(f.charCodeAt(0)));let c="";e===0&&s!=="none"?c=`${t.toString(8).padStart(7,"0")} `:(e>0||s==="none")&&(c=s==="none"?"":" "),d.append(c+l.join("")).append(`
|
|
4
|
+
`)}return s!=="none"&&i.length>0&&d.append(i.length.toString(8).padStart(7,"0")).append(`
|
|
5
|
+
`),{stdout:d.build(),stderr:"",exitCode:0}}var H={name:"od",execute:F},W={name:"od",flags:[{flag:"-c",type:"boolean"},{flag:"-A",type:"value",valueHint:"string"},{flag:"-t",type:"value",valueHint:"string"},{flag:"-N",type:"value",valueHint:"number"}],stdinType:"text",needsFiles:!0};export{H as a,W as b};
|