just-bash 3.0.3 → 3.2.0
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 +49 -0
- package/README.md +72 -9
- package/dist/Bash.d.ts +12 -4
- package/dist/abort-signals.d.ts +10 -0
- package/dist/bin/chunks/alias-3R4G6HQY.js +3 -0
- package/dist/bin/chunks/awk2-7UZLEPVX.js +3 -0
- package/dist/bin/chunks/base64-W6FVFNXJ.js +3 -0
- package/dist/bin/chunks/basename-C4CRGDXP.js +3 -0
- package/dist/bin/chunks/bash-CFCBBWVH.js +3 -0
- package/dist/bin/chunks/cat-5YECZSFQ.js +3 -0
- package/dist/bin/chunks/chmod-45TMYSW2.js +3 -0
- package/dist/bin/chunks/chunk-23OI2XDJ.js +20 -0
- package/dist/bin/chunks/chunk-2OQ5HPZE.js +7 -0
- package/dist/bin/chunks/chunk-2YLY6FJA.js +10 -0
- package/dist/bin/chunks/chunk-3HUI54BW.js +143 -0
- package/dist/bin/chunks/chunk-3OYRDLJJ.js +101 -0
- package/dist/bin/chunks/chunk-3PCPQIUD.js +3 -0
- package/dist/bin/chunks/chunk-3VSWQCPN.js +18 -0
- package/dist/bin/chunks/chunk-43E7AR6A.js +3 -0
- package/dist/bin/chunks/chunk-46CDVHZ3.js +5 -0
- package/dist/bin/chunks/chunk-4SQKKW2M.js +3 -0
- package/dist/bin/chunks/chunk-5SKEZPTU.js +12 -0
- package/dist/bin/chunks/chunk-6D75E4LV.js +3 -0
- package/dist/bin/chunks/chunk-6SAZRW7E.js +15 -0
- package/dist/bin/chunks/chunk-7FGDUBSN.js +14 -0
- package/dist/bin/chunks/chunk-7I6MNC5I.js +3 -0
- package/dist/bin/chunks/chunk-B7RRNV3A.js +22 -0
- package/dist/bin/chunks/chunk-BCJ42NCM.js +15 -0
- package/dist/bin/chunks/chunk-BNYIXXC2.js +3 -0
- package/dist/bin/chunks/chunk-BPWZ7ADB.js +8 -0
- package/dist/bin/chunks/chunk-BWRQ5HYX.js +9 -0
- package/dist/bin/chunks/chunk-CB4SODHK.js +34 -0
- package/dist/bin/chunks/chunk-CC2AQ6B7.js +15 -0
- package/dist/bin/chunks/chunk-CPKBPQ2C.js +3 -0
- package/dist/bin/chunks/chunk-CPTQXTBJ.js +3 -0
- package/dist/bin/chunks/chunk-D3MUBZ4P.js +65 -0
- package/dist/bin/chunks/chunk-DN2YCFOR.js +3 -0
- package/dist/bin/chunks/chunk-DSZQ22OX.js +12 -0
- package/dist/bin/chunks/chunk-E5VZGTZ6.js +10 -0
- package/dist/bin/chunks/chunk-ETWDDV6I.js +10 -0
- package/dist/bin/chunks/chunk-GEUCQ4AB.js +10 -0
- package/dist/bin/chunks/chunk-H4BRFPKY.js +3 -0
- package/dist/bin/chunks/chunk-IAAPXDHN.js +11 -0
- package/dist/bin/chunks/chunk-ISW2U76N.js +17 -0
- package/dist/bin/chunks/chunk-JQER3HUP.js +20 -0
- package/dist/bin/chunks/chunk-K5KT6DMM.js +4 -0
- package/dist/bin/chunks/chunk-KG2KXL4Y.js +3 -0
- package/dist/bin/chunks/chunk-LCP3IKI7.js +9 -0
- package/dist/bin/chunks/chunk-LGERQ5TD.js +22 -0
- package/dist/bin/chunks/chunk-LNFTLSWJ.js +22 -0
- package/dist/bin/chunks/chunk-LUHU7UUN.js +7 -0
- package/dist/bin/chunks/chunk-LXFMIXGA.js +3 -0
- package/dist/bin/chunks/chunk-MYTNZ7MA.js +7 -0
- package/dist/bin/chunks/chunk-MZM7RVYU.js +8 -0
- package/dist/bin/chunks/chunk-NGD6G5ZG.js +9 -0
- package/dist/bin/chunks/chunk-NJ67YJRE.js +6 -0
- package/dist/bin/chunks/chunk-NQQ3X7MZ.js +36 -0
- package/dist/bin/chunks/chunk-O74FSWB4.js +4 -0
- package/dist/bin/chunks/chunk-OKU677H3.js +87 -0
- package/dist/bin/chunks/chunk-P6NPCASY.js +11 -0
- package/dist/bin/chunks/chunk-PKWK3LQM.js +22 -0
- package/dist/bin/chunks/chunk-PQPFDJFF.js +34 -0
- package/dist/bin/chunks/chunk-PRKSLEHG.js +291 -0
- package/dist/bin/chunks/chunk-PUZGSIMN.js +15 -0
- package/dist/bin/chunks/chunk-Q3LE3Y66.js +13 -0
- package/dist/bin/chunks/chunk-QAYU7HPM.js +7 -0
- package/dist/bin/chunks/chunk-QES5OSUC.js +3 -0
- package/dist/bin/chunks/chunk-QF7PPON7.js +16 -0
- package/dist/bin/chunks/chunk-QK6BXSHU.js +13 -0
- package/dist/bin/chunks/chunk-RYQB6GQ7.js +11 -0
- package/dist/bin/chunks/chunk-SSK3N7FN.js +3 -0
- package/dist/bin/chunks/chunk-TL4JI2SL.js +38 -0
- package/dist/bin/chunks/chunk-TPU3OX2A.js +3 -0
- package/dist/bin/chunks/chunk-TW2IJRUF.js +3 -0
- package/dist/bin/chunks/chunk-TZ3S7MY6.js +12 -0
- package/dist/bin/chunks/chunk-VGR3NA3H.js +13 -0
- package/dist/bin/chunks/chunk-VLWZ6L7C.js +4 -0
- package/dist/bin/chunks/chunk-VTAIIBJT.js +16 -0
- package/dist/bin/chunks/chunk-VTHA5UK5.js +7 -0
- package/dist/bin/chunks/chunk-VY2K25J4.js +16 -0
- package/dist/bin/chunks/chunk-W4U4QOZF.js +7 -0
- package/dist/bin/chunks/chunk-WDV2ECOC.js +3 -0
- package/dist/bin/chunks/chunk-WFVCEB5T.js +3 -0
- package/dist/bin/chunks/chunk-WSLBBXPJ.js +12 -0
- package/dist/bin/chunks/chunk-WWOUFMMY.js +3 -0
- package/dist/bin/chunks/chunk-WYTPLN2M.js +11 -0
- package/dist/bin/chunks/chunk-X5VUGFUL.js +3 -0
- package/dist/bin/chunks/chunk-X63MJBLH.js +26 -0
- package/dist/bin/chunks/chunk-XAAXPEOP.js +6 -0
- package/dist/bin/chunks/chunk-XEQ7KSRM.js +5 -0
- package/dist/bin/chunks/chunk-YIANER7Y.js +8 -0
- package/dist/bin/chunks/chunk-YMELOXDK.js +13 -0
- package/dist/bin/chunks/chunk-YTL6DXBO.js +11 -0
- package/dist/bin/chunks/chunk-YYZSYLJO.js +6 -0
- package/dist/bin/chunks/chunk-ZXIW4JPL.js +22 -0
- package/dist/bin/chunks/clear-OE52K3TM.js +3 -0
- package/dist/bin/chunks/column-7VBJL757.js +3 -0
- package/dist/bin/chunks/comm-URDMZCXL.js +3 -0
- package/dist/bin/chunks/cp-MF5GADQN.js +3 -0
- package/dist/bin/chunks/curl-FS5LAEYI.js +30 -0
- package/dist/bin/chunks/cut-QOTYBJJJ.js +3 -0
- package/dist/bin/chunks/date-FJUBX7TJ.js +3 -0
- package/dist/bin/chunks/diff-YXZZCUSQ.js +3 -0
- package/dist/bin/chunks/dirname-TPUFCYF6.js +3 -0
- package/dist/bin/chunks/du-A3UGHIKJ.js +3 -0
- package/dist/bin/chunks/echo-4OUEL7QB.js +3 -0
- package/dist/bin/chunks/env-2TSVF4W7.js +3 -0
- package/dist/bin/chunks/expand-P6SNTBGZ.js +3 -0
- package/dist/bin/chunks/expr-56X7LYOS.js +3 -0
- package/dist/bin/chunks/file-SQSOBJLR.js +3 -0
- package/dist/bin/chunks/find-XY2NTAT5.js +3 -0
- package/dist/bin/chunks/flag-coverage-WGSE667D.js +3 -0
- package/dist/bin/chunks/fold-YEY7X54W.js +3 -0
- package/dist/bin/chunks/grep-CMT2H2S7.js +3 -0
- package/dist/bin/chunks/gzip-DJSFJOY6.js +3 -0
- package/dist/bin/chunks/head-KPRH4HKC.js +3 -0
- package/dist/bin/chunks/help-HVIDHJ6M.js +3 -0
- package/dist/bin/chunks/history-3HAU45KT.js +3 -0
- package/dist/bin/chunks/hostname-2I76DUQL.js +3 -0
- package/dist/bin/chunks/html-to-markdown-WUBAMB4O.js +3 -0
- package/dist/bin/chunks/join-UQKXU2QP.js +3 -0
- package/dist/bin/chunks/jq-ACCMBTSD.js +3 -0
- package/dist/bin/chunks/js-exec-4KNUPGHA.js +99 -0
- package/dist/bin/chunks/js-exec-worker.js +187 -110
- package/dist/bin/chunks/ln-XSDIE6SU.js +3 -0
- package/dist/bin/chunks/ls-FTHYNINH.js +3 -0
- package/dist/bin/chunks/md5sum-Z6KAYGDK.js +3 -0
- package/dist/bin/chunks/mkdir-74BP5NTG.js +3 -0
- package/dist/bin/chunks/mv-YG75IRRE.js +3 -0
- package/dist/bin/chunks/nl-XHWFVVKH.js +3 -0
- package/dist/bin/chunks/od-A7CW5RMS.js +3 -0
- package/dist/bin/chunks/paste-YJLYVJMP.js +3 -0
- package/dist/bin/chunks/printf-F2KOCULO.js +3 -0
- package/dist/bin/chunks/pwd-YKLNXWZI.js +3 -0
- package/dist/bin/chunks/python3-AYUQQRCR.js +14 -0
- package/dist/bin/chunks/readlink-HMHVGSAM.js +3 -0
- package/dist/bin/chunks/rev-CZTQCNOZ.js +3 -0
- package/dist/bin/chunks/rg-JRKJ6I4X.js +3 -0
- package/dist/bin/chunks/rm-3PLW4O4B.js +3 -0
- package/dist/bin/chunks/rmdir-DCJ3XJRR.js +3 -0
- package/dist/bin/chunks/sed-QJ2LNV2N.js +3 -0
- package/dist/bin/chunks/seq-Q4LZ6EXV.js +3 -0
- package/dist/bin/chunks/sha1sum-CATBXX76.js +3 -0
- package/dist/bin/chunks/sha256sum-YGSNBVY3.js +3 -0
- package/dist/bin/chunks/sleep-FUDWGDCE.js +3 -0
- package/dist/bin/chunks/sort-M3DO25D5.js +3 -0
- package/dist/bin/chunks/split-7IYQYKOW.js +3 -0
- package/dist/bin/chunks/sqlite3-ZXF6BGDW.js +3 -0
- package/dist/bin/chunks/sqlite3-worker.js +316 -173
- package/dist/bin/chunks/stat-Y5D3VPLG.js +3 -0
- package/dist/bin/chunks/strings-J2X2Z6N2.js +3 -0
- package/dist/bin/chunks/tac-DG4BMYM5.js +3 -0
- package/dist/bin/chunks/tail-QISQLA3I.js +3 -0
- package/dist/bin/chunks/tar-TB2XWXF6.js +3 -0
- package/dist/bin/chunks/tee-L4HKV5PD.js +3 -0
- package/dist/bin/chunks/time-LF7BTSK5.js +3 -0
- package/dist/bin/chunks/timeout-TDOV6JDA.js +3 -0
- package/dist/bin/chunks/touch-TVQAUQOG.js +3 -0
- package/dist/bin/chunks/tr-AR6EK7JH.js +3 -0
- package/dist/bin/chunks/tree-ZGP6NPGS.js +3 -0
- package/dist/bin/chunks/true-KFTJGQLQ.js +3 -0
- package/dist/bin/chunks/undici-JES22UVU.js +141 -0
- package/dist/bin/chunks/unexpand-JPOQORZF.js +3 -0
- package/dist/bin/chunks/uniq-K5VRDP4Q.js +3 -0
- package/dist/bin/chunks/wc-VSQBRD6B.js +3 -0
- package/dist/bin/chunks/which-4TPGVSBZ.js +3 -0
- package/dist/bin/chunks/whoami-B5HDVKW6.js +3 -0
- package/dist/bin/chunks/worker.js +212 -105
- package/dist/bin/chunks/xan-D6US4ZGL.js +3 -0
- package/dist/bin/chunks/xan-view-QGKWT354.js +3 -0
- package/dist/bin/chunks/xargs-HMISWW4I.js +3 -0
- package/dist/bin/chunks/yq-EYV7HLKK.js +3 -0
- package/dist/bin/just-bash.js +412 -387
- package/dist/bin/shell/chunks/alias-3R4G6HQY.js +3 -0
- package/dist/bin/shell/chunks/awk2-7UZLEPVX.js +3 -0
- package/dist/bin/shell/chunks/base64-W6FVFNXJ.js +3 -0
- package/dist/bin/shell/chunks/basename-C4CRGDXP.js +3 -0
- package/dist/bin/shell/chunks/bash-CFCBBWVH.js +3 -0
- package/dist/bin/shell/chunks/cat-5YECZSFQ.js +3 -0
- package/dist/bin/shell/chunks/chmod-45TMYSW2.js +3 -0
- package/dist/bin/shell/chunks/chunk-23OI2XDJ.js +20 -0
- package/dist/bin/shell/chunks/chunk-2OQ5HPZE.js +7 -0
- package/dist/bin/shell/chunks/chunk-2YLY6FJA.js +10 -0
- package/dist/bin/shell/chunks/chunk-3HUI54BW.js +143 -0
- package/dist/bin/shell/chunks/chunk-3OYRDLJJ.js +101 -0
- package/dist/bin/shell/chunks/chunk-3PCPQIUD.js +3 -0
- package/dist/bin/shell/chunks/chunk-3VSWQCPN.js +18 -0
- package/dist/bin/shell/chunks/chunk-43E7AR6A.js +3 -0
- package/dist/bin/shell/chunks/chunk-46CDVHZ3.js +5 -0
- package/dist/bin/shell/chunks/chunk-4SQKKW2M.js +3 -0
- package/dist/bin/shell/chunks/chunk-5SKEZPTU.js +12 -0
- package/dist/bin/shell/chunks/chunk-6D75E4LV.js +3 -0
- package/dist/bin/shell/chunks/chunk-6SAZRW7E.js +15 -0
- package/dist/bin/shell/chunks/chunk-7FGDUBSN.js +14 -0
- package/dist/bin/shell/chunks/chunk-7I6MNC5I.js +3 -0
- package/dist/bin/shell/chunks/chunk-B7RRNV3A.js +22 -0
- package/dist/bin/shell/chunks/chunk-BCJ42NCM.js +15 -0
- package/dist/bin/shell/chunks/chunk-BNYIXXC2.js +3 -0
- package/dist/bin/shell/chunks/chunk-BPWZ7ADB.js +8 -0
- package/dist/bin/shell/chunks/chunk-BWRQ5HYX.js +9 -0
- package/dist/bin/shell/chunks/chunk-CB4SODHK.js +34 -0
- package/dist/bin/shell/chunks/chunk-CC2AQ6B7.js +15 -0
- package/dist/bin/shell/chunks/chunk-CPKBPQ2C.js +3 -0
- package/dist/bin/shell/chunks/chunk-CPTQXTBJ.js +3 -0
- package/dist/bin/shell/chunks/chunk-D3MUBZ4P.js +65 -0
- package/dist/bin/shell/chunks/chunk-DN2YCFOR.js +3 -0
- package/dist/bin/shell/chunks/chunk-DSZQ22OX.js +12 -0
- package/dist/bin/shell/chunks/chunk-E5VZGTZ6.js +10 -0
- package/dist/bin/shell/chunks/chunk-ETWDDV6I.js +10 -0
- package/dist/bin/shell/chunks/chunk-GEUCQ4AB.js +10 -0
- package/dist/bin/shell/chunks/chunk-H4BRFPKY.js +3 -0
- package/dist/bin/shell/chunks/chunk-IAAPXDHN.js +11 -0
- package/dist/bin/shell/chunks/chunk-ISW2U76N.js +17 -0
- package/dist/bin/shell/chunks/chunk-JQER3HUP.js +20 -0
- package/dist/bin/shell/chunks/chunk-K5KT6DMM.js +4 -0
- package/dist/bin/shell/chunks/chunk-KG2KXL4Y.js +3 -0
- package/dist/bin/shell/chunks/chunk-LCP3IKI7.js +9 -0
- package/dist/bin/shell/chunks/chunk-LGERQ5TD.js +22 -0
- package/dist/bin/shell/chunks/chunk-LNFTLSWJ.js +22 -0
- package/dist/bin/shell/chunks/chunk-LUHU7UUN.js +7 -0
- package/dist/bin/shell/chunks/chunk-LXFMIXGA.js +3 -0
- package/dist/bin/shell/chunks/chunk-MYTNZ7MA.js +7 -0
- package/dist/bin/shell/chunks/chunk-MZM7RVYU.js +8 -0
- package/dist/bin/shell/chunks/chunk-NGD6G5ZG.js +9 -0
- package/dist/bin/shell/chunks/chunk-NJ67YJRE.js +6 -0
- package/dist/bin/shell/chunks/chunk-NQQ3X7MZ.js +36 -0
- package/dist/bin/shell/chunks/chunk-O74FSWB4.js +4 -0
- package/dist/bin/shell/chunks/chunk-OKU677H3.js +87 -0
- package/dist/bin/shell/chunks/chunk-P6NPCASY.js +11 -0
- package/dist/bin/shell/chunks/chunk-PKWK3LQM.js +22 -0
- package/dist/bin/shell/chunks/chunk-PQPFDJFF.js +34 -0
- package/dist/bin/shell/chunks/chunk-PRKSLEHG.js +291 -0
- package/dist/bin/shell/chunks/chunk-PUZGSIMN.js +15 -0
- package/dist/bin/shell/chunks/chunk-Q3LE3Y66.js +13 -0
- package/dist/bin/shell/chunks/chunk-QAYU7HPM.js +7 -0
- package/dist/bin/shell/chunks/chunk-QES5OSUC.js +3 -0
- package/dist/bin/shell/chunks/chunk-QF7PPON7.js +16 -0
- package/dist/bin/shell/chunks/chunk-QK6BXSHU.js +13 -0
- package/dist/bin/shell/chunks/chunk-RYQB6GQ7.js +11 -0
- package/dist/bin/shell/chunks/chunk-SSK3N7FN.js +3 -0
- package/dist/bin/shell/chunks/chunk-TL4JI2SL.js +38 -0
- package/dist/bin/shell/chunks/chunk-TPU3OX2A.js +3 -0
- package/dist/bin/shell/chunks/chunk-TW2IJRUF.js +3 -0
- package/dist/bin/shell/chunks/chunk-TZ3S7MY6.js +12 -0
- package/dist/bin/shell/chunks/chunk-VGR3NA3H.js +13 -0
- package/dist/bin/shell/chunks/chunk-VLWZ6L7C.js +4 -0
- package/dist/bin/shell/chunks/chunk-VTAIIBJT.js +16 -0
- package/dist/bin/shell/chunks/chunk-VTHA5UK5.js +7 -0
- package/dist/bin/shell/chunks/chunk-VY2K25J4.js +16 -0
- package/dist/bin/shell/chunks/chunk-W4U4QOZF.js +7 -0
- package/dist/bin/shell/chunks/chunk-WDV2ECOC.js +3 -0
- package/dist/bin/shell/chunks/chunk-WFVCEB5T.js +3 -0
- package/dist/bin/shell/chunks/chunk-WSLBBXPJ.js +12 -0
- package/dist/bin/shell/chunks/chunk-WWOUFMMY.js +3 -0
- package/dist/bin/shell/chunks/chunk-WYTPLN2M.js +11 -0
- package/dist/bin/shell/chunks/chunk-X5VUGFUL.js +3 -0
- package/dist/bin/shell/chunks/chunk-X63MJBLH.js +26 -0
- package/dist/bin/shell/chunks/chunk-XAAXPEOP.js +6 -0
- package/dist/bin/shell/chunks/chunk-XEQ7KSRM.js +5 -0
- package/dist/bin/shell/chunks/chunk-YIANER7Y.js +8 -0
- package/dist/bin/shell/chunks/chunk-YMELOXDK.js +13 -0
- package/dist/bin/shell/chunks/chunk-YTL6DXBO.js +11 -0
- package/dist/bin/shell/chunks/chunk-YYZSYLJO.js +6 -0
- package/dist/bin/shell/chunks/chunk-ZXIW4JPL.js +22 -0
- package/dist/bin/shell/chunks/clear-OE52K3TM.js +3 -0
- package/dist/bin/shell/chunks/column-7VBJL757.js +3 -0
- package/dist/bin/shell/chunks/comm-URDMZCXL.js +3 -0
- package/dist/bin/shell/chunks/cp-MF5GADQN.js +3 -0
- package/dist/bin/shell/chunks/curl-FS5LAEYI.js +30 -0
- package/dist/bin/shell/chunks/cut-QOTYBJJJ.js +3 -0
- package/dist/bin/shell/chunks/date-FJUBX7TJ.js +3 -0
- package/dist/bin/shell/chunks/diff-YXZZCUSQ.js +3 -0
- package/dist/bin/shell/chunks/dirname-TPUFCYF6.js +3 -0
- package/dist/bin/shell/chunks/du-A3UGHIKJ.js +3 -0
- package/dist/bin/shell/chunks/echo-4OUEL7QB.js +3 -0
- package/dist/bin/shell/chunks/env-2TSVF4W7.js +3 -0
- package/dist/bin/shell/chunks/expand-P6SNTBGZ.js +3 -0
- package/dist/bin/shell/chunks/expr-56X7LYOS.js +3 -0
- package/dist/bin/shell/chunks/file-SQSOBJLR.js +3 -0
- package/dist/bin/shell/chunks/find-XY2NTAT5.js +3 -0
- package/dist/bin/shell/chunks/flag-coverage-WGSE667D.js +3 -0
- package/dist/bin/shell/chunks/fold-YEY7X54W.js +3 -0
- package/dist/bin/shell/chunks/grep-CMT2H2S7.js +3 -0
- package/dist/bin/shell/chunks/gzip-DJSFJOY6.js +3 -0
- package/dist/bin/shell/chunks/head-KPRH4HKC.js +3 -0
- package/dist/bin/shell/chunks/help-HVIDHJ6M.js +3 -0
- package/dist/bin/shell/chunks/history-3HAU45KT.js +3 -0
- package/dist/bin/shell/chunks/hostname-2I76DUQL.js +3 -0
- package/dist/bin/shell/chunks/html-to-markdown-WUBAMB4O.js +3 -0
- package/dist/bin/shell/chunks/join-UQKXU2QP.js +3 -0
- package/dist/bin/shell/chunks/jq-ACCMBTSD.js +3 -0
- package/dist/bin/shell/chunks/js-exec-4KNUPGHA.js +99 -0
- package/dist/bin/shell/chunks/ln-XSDIE6SU.js +3 -0
- package/dist/bin/shell/chunks/ls-FTHYNINH.js +3 -0
- package/dist/bin/shell/chunks/md5sum-Z6KAYGDK.js +3 -0
- package/dist/bin/shell/chunks/mkdir-74BP5NTG.js +3 -0
- package/dist/bin/shell/chunks/mv-YG75IRRE.js +3 -0
- package/dist/bin/shell/chunks/nl-XHWFVVKH.js +3 -0
- package/dist/bin/shell/chunks/od-A7CW5RMS.js +3 -0
- package/dist/bin/shell/chunks/paste-YJLYVJMP.js +3 -0
- package/dist/bin/shell/chunks/printf-F2KOCULO.js +3 -0
- package/dist/bin/shell/chunks/pwd-YKLNXWZI.js +3 -0
- package/dist/bin/shell/chunks/python3-AYUQQRCR.js +14 -0
- package/dist/bin/shell/chunks/readlink-HMHVGSAM.js +3 -0
- package/dist/bin/shell/chunks/rev-CZTQCNOZ.js +3 -0
- package/dist/bin/shell/chunks/rg-JRKJ6I4X.js +3 -0
- package/dist/bin/shell/chunks/rm-3PLW4O4B.js +3 -0
- package/dist/bin/shell/chunks/rmdir-DCJ3XJRR.js +3 -0
- package/dist/bin/shell/chunks/sed-QJ2LNV2N.js +3 -0
- package/dist/bin/shell/chunks/seq-Q4LZ6EXV.js +3 -0
- package/dist/bin/shell/chunks/sha1sum-CATBXX76.js +3 -0
- package/dist/bin/shell/chunks/sha256sum-YGSNBVY3.js +3 -0
- package/dist/bin/shell/chunks/sleep-FUDWGDCE.js +3 -0
- package/dist/bin/shell/chunks/sort-M3DO25D5.js +3 -0
- package/dist/bin/shell/chunks/split-7IYQYKOW.js +3 -0
- package/dist/bin/shell/chunks/sqlite3-ZXF6BGDW.js +3 -0
- package/dist/bin/shell/chunks/stat-Y5D3VPLG.js +3 -0
- package/dist/bin/shell/chunks/strings-J2X2Z6N2.js +3 -0
- package/dist/bin/shell/chunks/tac-DG4BMYM5.js +3 -0
- package/dist/bin/shell/chunks/tail-QISQLA3I.js +3 -0
- package/dist/bin/shell/chunks/tar-TB2XWXF6.js +3 -0
- package/dist/bin/shell/chunks/tee-L4HKV5PD.js +3 -0
- package/dist/bin/shell/chunks/time-LF7BTSK5.js +3 -0
- package/dist/bin/shell/chunks/timeout-TDOV6JDA.js +3 -0
- package/dist/bin/shell/chunks/touch-TVQAUQOG.js +3 -0
- package/dist/bin/shell/chunks/tr-AR6EK7JH.js +3 -0
- package/dist/bin/shell/chunks/tree-ZGP6NPGS.js +3 -0
- package/dist/bin/shell/chunks/true-KFTJGQLQ.js +3 -0
- package/dist/bin/shell/chunks/undici-JES22UVU.js +141 -0
- package/dist/bin/shell/chunks/unexpand-JPOQORZF.js +3 -0
- package/dist/bin/shell/chunks/uniq-K5VRDP4Q.js +3 -0
- package/dist/bin/shell/chunks/wc-VSQBRD6B.js +3 -0
- package/dist/bin/shell/chunks/which-4TPGVSBZ.js +3 -0
- package/dist/bin/shell/chunks/whoami-B5HDVKW6.js +3 -0
- package/dist/bin/shell/chunks/xan-D6US4ZGL.js +3 -0
- package/dist/bin/shell/chunks/xan-view-QGKWT354.js +3 -0
- package/dist/bin/shell/chunks/xargs-HMISWW4I.js +3 -0
- package/dist/bin/shell/chunks/yq-EYV7HLKK.js +3 -0
- package/dist/bin/shell/shell.js +413 -391
- package/dist/bounded-builder.d.ts +37 -0
- package/dist/browser.d.ts +3 -3
- package/dist/bundle/browser.js +869 -830
- package/dist/bundle/chunks/alias-T5TO5GWK.js +2 -0
- package/dist/bundle/chunks/awk2-IPNBFNH2.js +2 -0
- package/dist/bundle/chunks/base64-OXGTKKDA.js +2 -0
- package/dist/bundle/chunks/basename-SJZQ5W65.js +2 -0
- package/dist/bundle/chunks/bash-HIEWVHJ2.js +2 -0
- package/dist/bundle/chunks/cat-636HYSH4.js +2 -0
- package/dist/bundle/chunks/chmod-4CIOYX5Q.js +2 -0
- package/dist/bundle/chunks/chunk-273265WK.js +6 -0
- package/dist/bundle/chunks/chunk-2KNTH3KH.js +9 -0
- package/dist/bundle/chunks/chunk-2VWG4LDT.js +11 -0
- package/dist/bundle/chunks/chunk-3DHFIWMM.js +15 -0
- package/dist/bundle/chunks/chunk-5ATEFZLC.js +4 -0
- package/dist/bundle/chunks/chunk-5HXWWNWH.js +11 -0
- package/dist/bundle/chunks/chunk-5KGKXQF6.js +142 -0
- package/dist/bundle/chunks/chunk-5VCAQBXL.js +17 -0
- package/dist/bundle/chunks/chunk-65Z4QURM.js +12 -0
- package/dist/bundle/chunks/chunk-6D3WD6YU.js +3 -0
- package/dist/bundle/chunks/chunk-6IUGGJ2Y.js +8 -0
- package/dist/bundle/chunks/chunk-6R4OQQWP.js +16 -0
- package/dist/bundle/chunks/chunk-6WGIZV3E.js +13 -0
- package/dist/bundle/chunks/chunk-AFFAMSJT.js +14 -0
- package/dist/bundle/chunks/chunk-AH7VTVWU.js +2 -0
- package/dist/bundle/chunks/chunk-AI5LSBJC.js +2 -0
- package/dist/bundle/chunks/chunk-AMLHAS2N.js +15 -0
- package/dist/bundle/chunks/chunk-ANCQ4SCV.js +2 -0
- package/dist/bundle/chunks/chunk-B3NGH6KE.js +5 -0
- package/dist/bundle/chunks/chunk-B5Z5HTFY.js +14 -0
- package/dist/bundle/chunks/chunk-BRJERIF4.js +2 -0
- package/dist/bundle/chunks/chunk-CHHWTPDH.js +3 -0
- package/dist/bundle/chunks/chunk-CN3HTJTZ.js +11 -0
- package/dist/bundle/chunks/chunk-D3W7DTI6.js +9 -0
- package/dist/bundle/chunks/chunk-E3D4WVAH.js +21 -0
- package/dist/bundle/chunks/chunk-EAQUR2NP.js +25 -0
- package/dist/bundle/chunks/chunk-EFORKKSH.js +8 -0
- package/dist/bundle/chunks/chunk-EJFBIRMD.js +6 -0
- package/dist/bundle/chunks/chunk-ELHOZMBD.js +10 -0
- package/dist/bundle/chunks/chunk-EQQGPAXI.js +9 -0
- package/dist/bundle/chunks/chunk-EWWPEE2G.js +37 -0
- package/dist/bundle/chunks/chunk-FBXMKFE2.js +2 -0
- package/dist/bundle/chunks/chunk-FIMO5HLX.js +2 -0
- package/dist/bundle/chunks/chunk-FT6ODGOU.js +2 -0
- package/dist/bundle/chunks/chunk-G4SEENI7.js +6 -0
- package/dist/bundle/chunks/chunk-GN6CQ3J4.js +2 -0
- package/dist/bundle/chunks/chunk-HW6ZCMM5.js +9 -0
- package/dist/bundle/chunks/chunk-IBRT3OJS.js +2 -0
- package/dist/bundle/chunks/chunk-INDA53JL.js +21 -0
- package/dist/bundle/chunks/chunk-INHMNORI.js +6 -0
- package/dist/bundle/chunks/chunk-J2OBOJ64.js +2 -0
- package/dist/bundle/chunks/chunk-JCPCQREJ.js +15 -0
- package/dist/bundle/chunks/chunk-JYQ6MII2.js +33 -0
- package/dist/bundle/chunks/chunk-K3XJ2WT4.js +2 -0
- package/dist/bundle/chunks/chunk-KIGPB52X.js +2 -0
- package/dist/bundle/chunks/chunk-KKVPMNSS.js +5 -0
- package/dist/bundle/chunks/chunk-LGLR6TFP.js +7 -0
- package/dist/bundle/chunks/chunk-LJRVJXUI.js +2 -0
- package/dist/bundle/chunks/chunk-LVDUF74R.js +7 -0
- package/dist/bundle/chunks/chunk-MAWVZWRK.js +12 -0
- package/dist/bundle/chunks/chunk-MF4F4ZPP.js +7 -0
- package/dist/bundle/chunks/chunk-MFGH46GH.js +14 -0
- package/dist/bundle/chunks/chunk-N4TGZ6H7.js +7 -0
- package/dist/bundle/chunks/chunk-NCUTH6QL.js +2 -0
- package/dist/bundle/chunks/chunk-NNH4ERNJ.js +100 -0
- package/dist/bundle/chunks/chunk-NOPXHH6G.js +290 -0
- package/dist/bundle/chunks/chunk-OQ7C4FYO.js +2 -0
- package/dist/bundle/chunks/chunk-ORDZCFFT.js +2 -0
- package/dist/bundle/chunks/chunk-OTYP7VVT.js +21 -0
- package/dist/bundle/chunks/chunk-P5BOIHWV.js +6 -0
- package/dist/bundle/chunks/chunk-PJWSSENQ.js +5 -0
- package/dist/bundle/chunks/chunk-PMYUC5JF.js +12 -0
- package/dist/bundle/chunks/chunk-POIWRLUV.js +6 -0
- package/dist/bundle/chunks/chunk-PPDMRIJ7.js +11 -0
- package/dist/bundle/chunks/chunk-QTLI5LUD.js +21 -0
- package/dist/bundle/chunks/chunk-R2FBRMDU.js +14 -0
- package/dist/bundle/chunks/chunk-RAHPENCM.js +35 -0
- package/dist/bundle/chunks/chunk-SELXJ5KQ.js +10 -0
- package/dist/bundle/chunks/chunk-T2RHALUC.js +64 -0
- package/dist/bundle/chunks/chunk-UB6T3UHL.js +8 -0
- package/dist/bundle/chunks/chunk-UBTKJ6MG.js +4 -0
- package/dist/bundle/chunks/chunk-UHHCL65P.js +3 -0
- package/dist/bundle/chunks/chunk-UK4BO5W3.js +2 -0
- package/dist/bundle/chunks/chunk-UTKGYVUZ.js +7 -0
- package/dist/bundle/chunks/chunk-VECGTAPW.js +10 -0
- package/dist/bundle/chunks/chunk-VOSNSQE2.js +2 -0
- package/dist/bundle/chunks/chunk-WENIVVEE.js +19 -0
- package/dist/bundle/chunks/chunk-WHHRIZS3.js +10 -0
- package/dist/bundle/chunks/chunk-WZQNMEQW.js +2 -0
- package/dist/bundle/chunks/chunk-XVL654YD.js +33 -0
- package/dist/bundle/chunks/chunk-Y3DGIAIG.js +21 -0
- package/dist/bundle/chunks/chunk-Y62SXZKJ.js +12 -0
- package/dist/bundle/chunks/chunk-YOUUMJLJ.js +10 -0
- package/dist/bundle/chunks/chunk-YUSFCOM7.js +2 -0
- package/dist/bundle/chunks/clear-KPIUNI6K.js +2 -0
- package/dist/bundle/chunks/column-LKMDIDCH.js +2 -0
- package/dist/bundle/chunks/comm-DTWKU2MC.js +2 -0
- package/dist/bundle/chunks/cp-FKTQRFYJ.js +2 -0
- package/dist/bundle/chunks/curl-DEHFBW27.js +29 -0
- package/dist/bundle/chunks/cut-RWPUW5FY.js +2 -0
- package/dist/bundle/chunks/date-FN2DXAEE.js +2 -0
- package/dist/bundle/chunks/diff-CSARC7WF.js +2 -0
- package/dist/bundle/chunks/dirname-Z2ZMOOW2.js +2 -0
- package/dist/bundle/chunks/du-PR3M44X6.js +2 -0
- package/dist/bundle/chunks/echo-HZOVZAPR.js +2 -0
- package/dist/bundle/chunks/env-VUUMB47B.js +2 -0
- package/dist/bundle/chunks/expand-2BPPGGSM.js +2 -0
- package/dist/bundle/chunks/expr-SHRJJ4PX.js +2 -0
- package/dist/bundle/chunks/file-YC4YEI4P.js +2 -0
- package/dist/bundle/chunks/find-DWWMZFO5.js +2 -0
- package/dist/bundle/chunks/flag-coverage-THYQHOT3.js +2 -0
- package/dist/bundle/chunks/fold-QJBPHRFJ.js +2 -0
- package/dist/bundle/chunks/grep-S6SNTIHZ.js +2 -0
- package/dist/bundle/chunks/gzip-BTI6CWY4.js +2 -0
- package/dist/bundle/chunks/head-UCOA3VQC.js +2 -0
- package/dist/bundle/chunks/help-QDDMBDU7.js +2 -0
- package/dist/bundle/chunks/history-3N762S3K.js +2 -0
- package/dist/bundle/chunks/hostname-CESD3CQR.js +2 -0
- package/dist/bundle/chunks/html-to-markdown-NUF6QEX4.js +2 -0
- package/dist/bundle/chunks/join-KQ4Z5OD4.js +2 -0
- package/dist/bundle/chunks/jq-D6N4QCAJ.js +2 -0
- package/dist/bundle/chunks/js-exec-PNUEDFT5.js +98 -0
- package/dist/bundle/chunks/js-exec-worker.js +187 -110
- package/dist/bundle/chunks/ln-VYDFOFNO.js +2 -0
- package/dist/bundle/chunks/ls-R5CQLZQM.js +2 -0
- package/dist/bundle/chunks/md5sum-JEDX55KS.js +2 -0
- package/dist/bundle/chunks/mkdir-WDDKK2P3.js +2 -0
- package/dist/bundle/chunks/mv-XSJA2FNL.js +2 -0
- package/dist/bundle/chunks/nl-RFXH2GNX.js +2 -0
- package/dist/bundle/chunks/od-YXD2NNIU.js +2 -0
- package/dist/bundle/chunks/paste-ZU3EODNI.js +2 -0
- package/dist/bundle/chunks/printf-QHD2JRWQ.js +2 -0
- package/dist/bundle/chunks/pwd-76BPYV5F.js +2 -0
- package/dist/bundle/chunks/python3-QDNG2UXX.js +13 -0
- package/dist/bundle/chunks/readlink-IY6QKK2P.js +2 -0
- package/dist/bundle/chunks/rev-EPOS3MFH.js +2 -0
- package/dist/bundle/chunks/rg-OUJZ5DH6.js +2 -0
- package/dist/bundle/chunks/rm-JQ4GDKDD.js +2 -0
- package/dist/bundle/chunks/rmdir-WZKAT6M5.js +2 -0
- package/dist/bundle/chunks/sed-TZIPJOGL.js +2 -0
- package/dist/bundle/chunks/seq-5R2GKXC6.js +2 -0
- package/dist/bundle/chunks/sha1sum-BLPZJ6MP.js +2 -0
- package/dist/bundle/chunks/sha256sum-VJZ4PHQ4.js +2 -0
- package/dist/bundle/chunks/sleep-VPYWSKDR.js +2 -0
- package/dist/bundle/chunks/sort-PV2NEQHF.js +2 -0
- package/dist/bundle/chunks/split-KNDNAFPT.js +2 -0
- package/dist/bundle/chunks/sqlite3-WWZJZW37.js +2 -0
- package/dist/bundle/chunks/sqlite3-worker.js +316 -173
- package/dist/bundle/chunks/stat-MLNSW25G.js +2 -0
- package/dist/bundle/chunks/strings-WTD7Q2EF.js +2 -0
- package/dist/bundle/chunks/tac-YXC4HBTR.js +2 -0
- package/dist/bundle/chunks/tail-G3W6PNG3.js +2 -0
- package/dist/bundle/chunks/tar-GLX6QUHW.js +2 -0
- package/dist/bundle/chunks/tee-OOWSWHRQ.js +2 -0
- package/dist/bundle/chunks/time-NERE2JJ2.js +2 -0
- package/dist/bundle/chunks/timeout-SYQCWBMZ.js +2 -0
- package/dist/bundle/chunks/touch-W4DF6Z4T.js +2 -0
- package/dist/bundle/chunks/tr-3KPFH3J4.js +2 -0
- package/dist/bundle/chunks/tree-7OOL2MH6.js +2 -0
- package/dist/bundle/chunks/true-QUBPEGGU.js +2 -0
- package/dist/bundle/chunks/undici-HCLAUJT3.js +140 -0
- package/dist/bundle/chunks/unexpand-YD5BWFH4.js +2 -0
- package/dist/bundle/chunks/uniq-OVOW532K.js +2 -0
- package/dist/bundle/chunks/wc-RUR7HE5O.js +2 -0
- package/dist/bundle/chunks/which-UWVKETYW.js +2 -0
- package/dist/bundle/chunks/whoami-KR6E7UIR.js +2 -0
- package/dist/bundle/chunks/worker.js +212 -105
- package/dist/bundle/chunks/xan-KKPV2TJ3.js +2 -0
- package/dist/bundle/chunks/xan-view-47P277LZ.js +2 -0
- package/dist/bundle/chunks/xargs-L7TJHOJT.js +2 -0
- package/dist/bundle/chunks/yq-ZGB3W46S.js +2 -0
- package/dist/bundle/index.cjs +1450 -1261
- package/dist/bundle/index.js +407 -386
- package/dist/commands/alias/alias.d.ts +3 -3
- package/dist/commands/awk/awk2.d.ts +3 -3
- package/dist/commands/awk/builtins.d.ts +1 -1
- package/dist/commands/awk/interpreter/context.d.ts +13 -0
- package/dist/commands/awk/lexer.d.ts +2 -1
- package/dist/commands/awk/parser2-print.d.ts +3 -0
- package/dist/commands/awk/parser2.d.ts +15 -0
- package/dist/commands/base64/base64.d.ts +2 -2
- package/dist/commands/basename/basename.d.ts +2 -2
- package/dist/commands/bash/bash.d.ts +3 -3
- package/dist/commands/cat/cat.d.ts +2 -2
- package/dist/commands/chmod/chmod.d.ts +2 -2
- package/dist/commands/clear/clear.d.ts +2 -2
- package/dist/commands/column/column.d.ts +2 -2
- package/dist/commands/comm/comm.d.ts +2 -2
- package/dist/commands/compression/codec-budget.d.ts +35 -0
- package/dist/commands/cp/cp.d.ts +2 -2
- package/dist/commands/curl/curl.d.ts +2 -2
- package/dist/commands/curl/form.d.ts +3 -1
- package/dist/commands/curl/types.d.ts +30 -25
- package/dist/commands/cut/cut.d.ts +2 -2
- package/dist/commands/date/date.d.ts +2 -2
- package/dist/commands/diff/diff.d.ts +2 -2
- package/dist/commands/dirname/dirname.d.ts +2 -2
- package/dist/commands/du/du.d.ts +2 -2
- package/dist/commands/echo/echo.d.ts +2 -2
- package/dist/commands/env/env.d.ts +3 -3
- package/dist/commands/expand/expand.d.ts +2 -2
- package/dist/commands/expand/unexpand.d.ts +2 -2
- package/dist/commands/expr/expr.d.ts +2 -2
- package/dist/commands/file/file.d.ts +2 -2
- package/dist/commands/find/find.d.ts +2 -2
- package/dist/commands/find/matcher.d.ts +0 -16
- package/dist/commands/find/types.d.ts +3 -2
- package/dist/commands/fold/fold.d.ts +2 -2
- package/dist/commands/grep/grep.d.ts +4 -4
- package/dist/commands/gzip/gzip.d.ts +4 -4
- package/dist/commands/head/head-tail-shared.d.ts +2 -2
- package/dist/commands/head/head.d.ts +2 -2
- package/dist/commands/help/help.d.ts +2 -2
- package/dist/commands/history/history.d.ts +2 -2
- package/dist/commands/hostname/hostname.d.ts +2 -2
- package/dist/commands/html-to-markdown/html-to-markdown.d.ts +2 -2
- package/dist/commands/join/join.d.ts +2 -2
- package/dist/commands/jq/jq.d.ts +3 -3
- package/dist/commands/js-exec/fetch-polyfill.d.ts +1 -1
- package/dist/commands/js-exec/js-exec-worker.d.ts +1 -0
- package/dist/commands/js-exec/js-exec.d.ts +5 -3
- package/dist/commands/ln/ln.d.ts +2 -2
- package/dist/commands/ls/ls.d.ts +2 -2
- package/dist/commands/md5sum/checksum.d.ts +2 -2
- package/dist/commands/md5sum/md5sum.d.ts +2 -2
- package/dist/commands/md5sum/sha1sum.d.ts +2 -2
- package/dist/commands/md5sum/sha256sum.d.ts +2 -2
- package/dist/commands/mkdir/mkdir.d.ts +2 -2
- package/dist/commands/mv/mv.d.ts +2 -2
- package/dist/commands/nl/nl.d.ts +2 -2
- package/dist/commands/od/od.d.ts +2 -2
- package/dist/commands/paste/paste.d.ts +2 -2
- package/dist/commands/printf/escapes.d.ts +5 -3
- package/dist/commands/printf/printf.d.ts +2 -2
- package/dist/commands/printf/strftime.d.ts +6 -1
- package/dist/commands/pwd/pwd.d.ts +2 -2
- package/dist/commands/python3/python3.d.ts +3 -3
- package/dist/commands/python3/worker.d.ts +2 -0
- package/dist/commands/query-engine/builtins/control-builtins.d.ts +1 -1
- package/dist/commands/query-engine/builtins/path-builtins.d.ts +1 -1
- package/dist/commands/query-engine/evaluator.d.ts +15 -1
- package/dist/commands/query-engine/json-output.d.ts +11 -0
- package/dist/commands/query-engine/parser.d.ts +6 -1
- package/dist/commands/query-engine/safe-object.d.ts +9 -8
- package/dist/commands/query-engine/value-operations.d.ts +4 -1
- package/dist/commands/readlink/readlink.d.ts +2 -2
- package/dist/commands/registry.d.ts +5 -5
- package/dist/commands/rev/rev.d.ts +2 -2
- package/dist/commands/rg/rg-search.d.ts +2 -2
- package/dist/commands/rg/rg.d.ts +2 -2
- package/dist/commands/rm/rm.d.ts +2 -2
- package/dist/commands/rmdir/rmdir.d.ts +2 -2
- package/dist/commands/search-engine/matcher.d.ts +6 -0
- package/dist/commands/sed/lexer.d.ts +3 -1
- package/dist/commands/sed/parser.d.ts +4 -1
- package/dist/commands/sed/sed.d.ts +2 -2
- package/dist/commands/seq/seq.d.ts +2 -2
- package/dist/commands/sleep/sleep.d.ts +2 -2
- package/dist/commands/sort/sort.d.ts +2 -2
- package/dist/commands/split/split.d.ts +2 -2
- package/dist/commands/sqlite3/formatters.d.ts +2 -0
- package/dist/commands/sqlite3/sqlite3.d.ts +3 -2
- package/dist/commands/sqlite3/worker.d.ts +5 -0
- package/dist/commands/sqlite3/worker.js +316 -173
- package/dist/commands/stat/stat.d.ts +2 -2
- package/dist/commands/strings/strings.d.ts +2 -2
- package/dist/commands/tac/tac.d.ts +2 -2
- package/dist/commands/tail/tail.d.ts +2 -2
- package/dist/commands/tar/archive.d.ts +29 -14
- package/dist/commands/tar/bzip2-compress.d.ts +2 -1
- package/dist/commands/tar/tar.d.ts +2 -2
- package/dist/commands/tee/tee.d.ts +2 -2
- package/dist/commands/time/time.d.ts +2 -2
- package/dist/commands/timeout/timeout.d.ts +2 -2
- package/dist/commands/touch/touch.d.ts +2 -2
- package/dist/commands/tr/tr.d.ts +2 -2
- package/dist/commands/tree/tree.d.ts +2 -2
- package/dist/commands/true/true.d.ts +3 -3
- package/dist/commands/uniq/uniq.d.ts +2 -2
- package/dist/commands/wc/wc.d.ts +2 -2
- package/dist/commands/which/which.d.ts +2 -2
- package/dist/commands/whoami/whoami.d.ts +2 -2
- package/dist/commands/worker-request-controller.d.ts +36 -0
- package/dist/commands/xan/aggregation.d.ts +13 -3
- package/dist/commands/xan/bounded-output.d.ts +4 -0
- package/dist/commands/xan/column-selection.d.ts +2 -1
- package/dist/commands/xan/csv.d.ts +29 -4
- package/dist/commands/xan/moonblade-parser.d.ts +11 -2
- package/dist/commands/xan/moonblade-to-jq.d.ts +2 -2
- package/dist/commands/xan/moonblade-tokenizer.d.ts +8 -1
- package/dist/commands/xan/xan-agg.d.ts +5 -5
- package/dist/commands/xan/xan-columns.d.ts +5 -5
- package/dist/commands/xan/xan-core.d.ts +7 -7
- package/dist/commands/xan/xan-data.d.ts +8 -8
- package/dist/commands/xan/xan-filter.d.ts +5 -5
- package/dist/commands/xan/xan-map.d.ts +3 -3
- package/dist/commands/xan/xan-reshape.d.ts +6 -6
- package/dist/commands/xan/xan-simple.d.ts +7 -7
- package/dist/commands/xan/xan-view.d.ts +3 -3
- package/dist/commands/xan/xan.d.ts +2 -2
- package/dist/commands/xargs/xargs.d.ts +2 -2
- package/dist/commands/yq/formats.d.ts +5 -4
- package/dist/commands/yq/yq.d.ts +3 -3
- package/dist/custom-commands.d.ts +25 -2
- package/dist/encoding.d.ts +5 -3
- package/dist/execution-output.d.ts +28 -0
- package/dist/execution-scope.d.ts +89 -0
- package/dist/fatal-execution-error.d.ts +5 -0
- package/dist/fs/identity.d.ts +9 -0
- package/dist/fs/in-memory-fs/in-memory-fs.d.ts +24 -1
- package/dist/fs/interface.d.ts +4 -0
- package/dist/fs/overlay-fs/overlay-fs.d.ts +13 -0
- package/dist/fs/path-utils.d.ts +2 -0
- package/dist/fs/read-write-fs/read-write-fs.d.ts +11 -0
- package/dist/fs/real-fs-utils.d.ts +1 -1
- package/dist/fs/traversal.d.ts +98 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/interpreter/alias-expansion.d.ts +4 -0
- package/dist/interpreter/builtins/declare-array-parsing.d.ts +6 -2
- package/dist/interpreter/builtins/index.d.ts +0 -1
- package/dist/interpreter/builtins/variable-assignment.d.ts +4 -1
- package/dist/interpreter/conditionals.d.ts +1 -1
- package/dist/interpreter/defense-aware-command-context.d.ts +2 -2
- package/dist/interpreter/errors.d.ts +7 -17
- package/dist/interpreter/expansion/brace-range.d.ts +5 -1
- package/dist/interpreter/expansion/pattern-removal.d.ts +2 -3
- package/dist/interpreter/expansion/pattern-replacement.d.ts +4 -0
- package/dist/interpreter/expansion/tilde.d.ts +2 -0
- package/dist/interpreter/helpers/array.d.ts +16 -3
- package/dist/interpreter/helpers/bounded-array.d.ts +2 -0
- package/dist/interpreter/helpers/condition.d.ts +2 -5
- package/dist/interpreter/helpers/ifs.d.ts +3 -3
- package/dist/interpreter/helpers/quoting.d.ts +2 -0
- package/dist/interpreter/helpers/string-compare.d.ts +1 -1
- package/dist/interpreter/interpreter.d.ts +4 -8
- package/dist/interpreter/redirections.d.ts +5 -2
- package/dist/interpreter/simple-command-assignments.d.ts +7 -0
- package/dist/interpreter/state-transaction.d.ts +7 -0
- package/dist/interpreter/types.d.ts +24 -8
- package/dist/limits.d.ts +76 -17
- package/dist/network/dns-pin.d.ts +23 -32
- package/dist/network/fetch.d.ts +4 -0
- package/dist/network/types.d.ts +10 -1
- package/dist/parser/parser.d.ts +5 -2
- package/dist/parser/types.d.ts +10 -1
- package/dist/sandbox/Sandbox.d.ts +33 -2
- package/dist/source-limit.d.ts +2 -0
- package/dist/timers.d.ts +12 -0
- package/dist/types.d.ts +43 -7
- package/dist/utils/file-reader.d.ts +5 -3
- package/package.json +10 -5
- package/dist/bin/chunks/alias-YRVAW27Y.js +0 -3
- package/dist/bin/chunks/awk2-UFCNQFCV.js +0 -3
- package/dist/bin/chunks/base64-EGKVQIBC.js +0 -3
- package/dist/bin/chunks/basename-F3AQ4KAQ.js +0 -3
- package/dist/bin/chunks/bash-BEG4JB7K.js +0 -3
- package/dist/bin/chunks/cat-NBL6MU5H.js +0 -3
- package/dist/bin/chunks/chmod-S564JCJW.js +0 -3
- package/dist/bin/chunks/chunk-2AIXTPH2.js +0 -9
- package/dist/bin/chunks/chunk-2GG3NVC4.js +0 -10
- package/dist/bin/chunks/chunk-2ZAK22BG.js +0 -9
- package/dist/bin/chunks/chunk-3WIMLJM7.js +0 -8
- package/dist/bin/chunks/chunk-47WZ2U6M.js +0 -9
- package/dist/bin/chunks/chunk-4BNS566Q.js +0 -4
- package/dist/bin/chunks/chunk-4J4UC7OD.js +0 -17
- package/dist/bin/chunks/chunk-52FZYTIX.js +0 -34
- package/dist/bin/chunks/chunk-5KX5YUWT.js +0 -37
- package/dist/bin/chunks/chunk-5XSZHUEI.js +0 -15
- package/dist/bin/chunks/chunk-6FYCU7QB.js +0 -3
- package/dist/bin/chunks/chunk-6JKLDBRW.js +0 -18
- package/dist/bin/chunks/chunk-6WJQNLR2.js +0 -7
- package/dist/bin/chunks/chunk-7HK63L6Y.js +0 -3
- package/dist/bin/chunks/chunk-7NDRU2ZN.js +0 -5
- package/dist/bin/chunks/chunk-7VCQWCSH.js +0 -15
- package/dist/bin/chunks/chunk-AFAD5U2A.js +0 -8
- package/dist/bin/chunks/chunk-AZH64XMJ.js +0 -3
- package/dist/bin/chunks/chunk-BPZJYOUA.js +0 -33
- package/dist/bin/chunks/chunk-BZP56QBM.js +0 -24
- package/dist/bin/chunks/chunk-C6JOQKE2.js +0 -22
- package/dist/bin/chunks/chunk-CX5CEEGI.js +0 -11
- package/dist/bin/chunks/chunk-D7YFPDMV.js +0 -22
- package/dist/bin/chunks/chunk-DHIKZU63.js +0 -3
- package/dist/bin/chunks/chunk-DWECIBLJ.js +0 -3
- package/dist/bin/chunks/chunk-FEENTUVZ.js +0 -18
- package/dist/bin/chunks/chunk-FJABJBIW.js +0 -141
- package/dist/bin/chunks/chunk-FYCT4DWY.js +0 -6
- package/dist/bin/chunks/chunk-G7ZWT7BT.js +0 -9
- package/dist/bin/chunks/chunk-GTO74SFS.js +0 -7
- package/dist/bin/chunks/chunk-GXX3QUMM.js +0 -34
- package/dist/bin/chunks/chunk-HMCRB24D.js +0 -15
- package/dist/bin/chunks/chunk-HWNCK5BB.js +0 -10
- package/dist/bin/chunks/chunk-IX7LKVVH.js +0 -15
- package/dist/bin/chunks/chunk-J7XTZ47D.js +0 -288
- package/dist/bin/chunks/chunk-JDFKEXLG.js +0 -12
- package/dist/bin/chunks/chunk-JJC4ENJL.js +0 -13
- package/dist/bin/chunks/chunk-JSZBZ2XU.js +0 -3
- package/dist/bin/chunks/chunk-JXLDT4KX.js +0 -4
- package/dist/bin/chunks/chunk-KMZUSEWI.js +0 -12
- package/dist/bin/chunks/chunk-KWCO3YXP.js +0 -17
- package/dist/bin/chunks/chunk-LMA4D2KK.js +0 -7
- package/dist/bin/chunks/chunk-LNVSXNT7.js +0 -3
- package/dist/bin/chunks/chunk-LX2H4DPL.js +0 -6
- package/dist/bin/chunks/chunk-MLUOPG3W.js +0 -3
- package/dist/bin/chunks/chunk-MNWK4UIM.js +0 -22
- package/dist/bin/chunks/chunk-MP77TJMM.js +0 -6
- package/dist/bin/chunks/chunk-MTK7VLZG.js +0 -12
- package/dist/bin/chunks/chunk-N3FQJLPZ.js +0 -17
- package/dist/bin/chunks/chunk-N6YW4W3Z.js +0 -29
- package/dist/bin/chunks/chunk-NMMVECGD.js +0 -14
- package/dist/bin/chunks/chunk-NXYVRP6D.js +0 -11
- package/dist/bin/chunks/chunk-NYIPFY36.js +0 -3
- package/dist/bin/chunks/chunk-OVVMB2JI.js +0 -7
- package/dist/bin/chunks/chunk-OXZSG3ZZ.js +0 -7
- package/dist/bin/chunks/chunk-PKE7GKU5.js +0 -3
- package/dist/bin/chunks/chunk-PSJORJRS.js +0 -6
- package/dist/bin/chunks/chunk-R36DS2UF.js +0 -20
- package/dist/bin/chunks/chunk-RKBWTGBZ.js +0 -7
- package/dist/bin/chunks/chunk-RVGYO2OU.js +0 -3
- package/dist/bin/chunks/chunk-SF2OLINE.js +0 -12
- package/dist/bin/chunks/chunk-TIRU5FOD.js +0 -101
- package/dist/bin/chunks/chunk-TKYWUEON.js +0 -13
- package/dist/bin/chunks/chunk-UI7CV277.js +0 -20
- package/dist/bin/chunks/chunk-UNWZQG7U.js +0 -3
- package/dist/bin/chunks/chunk-UOMNSQEZ.js +0 -10
- package/dist/bin/chunks/chunk-W5OBQVJ2.js +0 -6
- package/dist/bin/chunks/chunk-WDWNEHHE.js +0 -9
- package/dist/bin/chunks/chunk-WHUKZ3K3.js +0 -85
- package/dist/bin/chunks/chunk-XHCCSVP6.js +0 -9
- package/dist/bin/chunks/chunk-XPTYN6UE.js +0 -8
- package/dist/bin/chunks/chunk-XRUDFQG5.js +0 -7
- package/dist/bin/chunks/chunk-Y2IUEWQD.js +0 -11
- package/dist/bin/chunks/chunk-Y5OWCEDV.js +0 -64
- package/dist/bin/chunks/chunk-ZFUVUYWG.js +0 -15
- package/dist/bin/chunks/chunk-ZZP3RSWL.js +0 -4
- package/dist/bin/chunks/clear-FGNEKYDU.js +0 -3
- package/dist/bin/chunks/column-QLGOK3XM.js +0 -3
- package/dist/bin/chunks/comm-PLYUTVP3.js +0 -3
- package/dist/bin/chunks/cp-HYXTMN3D.js +0 -3
- package/dist/bin/chunks/curl-DCSPNPEW.js +0 -27
- package/dist/bin/chunks/cut-JNQTCQY7.js +0 -3
- package/dist/bin/chunks/date-OFYBOAUE.js +0 -3
- package/dist/bin/chunks/diff-LZ4WRLIF.js +0 -3
- package/dist/bin/chunks/dirname-VCINTLPD.js +0 -3
- package/dist/bin/chunks/du-4LRQIGRG.js +0 -3
- package/dist/bin/chunks/echo-KCOHTNDF.js +0 -3
- package/dist/bin/chunks/env-FNVYNLGB.js +0 -3
- package/dist/bin/chunks/expand-CB7FG7LQ.js +0 -3
- package/dist/bin/chunks/expr-6A2XZORA.js +0 -3
- package/dist/bin/chunks/file-GRZLWDVH.js +0 -3
- package/dist/bin/chunks/find-5OZWMYCV.js +0 -3
- package/dist/bin/chunks/flag-coverage-H6NG6ZQL.js +0 -3
- package/dist/bin/chunks/fold-7YEITA5L.js +0 -3
- package/dist/bin/chunks/grep-KKBXRB73.js +0 -3
- package/dist/bin/chunks/gzip-ZJP5VIAQ.js +0 -3
- package/dist/bin/chunks/head-B6GFQHKF.js +0 -3
- package/dist/bin/chunks/help-CGUEOGXQ.js +0 -3
- package/dist/bin/chunks/history-AQQWW3QB.js +0 -3
- package/dist/bin/chunks/hostname-USNWOQCK.js +0 -3
- package/dist/bin/chunks/html-to-markdown-3HJ7L7NL.js +0 -3
- package/dist/bin/chunks/join-WRM6S6CO.js +0 -3
- package/dist/bin/chunks/jq-33GJJXTL.js +0 -3
- package/dist/bin/chunks/js-exec-F7JAZ4ZQ.js +0 -98
- package/dist/bin/chunks/ln-LP4HMCSM.js +0 -3
- package/dist/bin/chunks/ls-KBNHNZWQ.js +0 -3
- package/dist/bin/chunks/md5sum-ZNYCDRQL.js +0 -3
- package/dist/bin/chunks/mkdir-P4DKRCDX.js +0 -3
- package/dist/bin/chunks/mv-QQK4FQX6.js +0 -3
- package/dist/bin/chunks/nl-6TVYE4ZB.js +0 -3
- package/dist/bin/chunks/od-Y3E3QXOL.js +0 -3
- package/dist/bin/chunks/paste-LYNFXXCM.js +0 -3
- package/dist/bin/chunks/printf-MR3FXCDE.js +0 -3
- package/dist/bin/chunks/pwd-FCNDA467.js +0 -3
- package/dist/bin/chunks/python3-R5OFWJIH.js +0 -13
- package/dist/bin/chunks/readlink-25V57VOL.js +0 -3
- package/dist/bin/chunks/rev-AJECDD4L.js +0 -3
- package/dist/bin/chunks/rg-2YWJS6TE.js +0 -3
- package/dist/bin/chunks/rm-ECNUFR66.js +0 -3
- package/dist/bin/chunks/rmdir-DLOHIA7Q.js +0 -3
- package/dist/bin/chunks/sed-IGRH7EGG.js +0 -3
- package/dist/bin/chunks/seq-UXDJE6FB.js +0 -3
- package/dist/bin/chunks/sha1sum-5QZSNFY3.js +0 -3
- package/dist/bin/chunks/sha256sum-DI7JAVAU.js +0 -3
- package/dist/bin/chunks/sleep-RPGCUUGX.js +0 -3
- package/dist/bin/chunks/sort-HQPAFL76.js +0 -3
- package/dist/bin/chunks/split-F6FSB5KI.js +0 -3
- package/dist/bin/chunks/sqlite3-7TRACAE7.js +0 -3
- package/dist/bin/chunks/stat-BD6KT3BP.js +0 -3
- package/dist/bin/chunks/strings-6PE3YMPO.js +0 -3
- package/dist/bin/chunks/tac-NERJXVOM.js +0 -3
- package/dist/bin/chunks/tail-24F643A4.js +0 -3
- package/dist/bin/chunks/tar-5HK3VMV2.js +0 -3
- package/dist/bin/chunks/tee-5B7P2QRJ.js +0 -3
- package/dist/bin/chunks/time-FN6VJGRS.js +0 -3
- package/dist/bin/chunks/timeout-ZARIAF3K.js +0 -3
- package/dist/bin/chunks/touch-DFGSVIX7.js +0 -3
- package/dist/bin/chunks/tr-QQZYZ3CH.js +0 -3
- package/dist/bin/chunks/tree-6D7SMPUR.js +0 -3
- package/dist/bin/chunks/true-SKL4L7JP.js +0 -3
- package/dist/bin/chunks/unexpand-3JWOSSBQ.js +0 -3
- package/dist/bin/chunks/uniq-Q5UH5NL3.js +0 -3
- package/dist/bin/chunks/wc-4HXNTHY3.js +0 -3
- package/dist/bin/chunks/which-LCXKCLFC.js +0 -3
- package/dist/bin/chunks/whoami-TZDZDU7T.js +0 -3
- package/dist/bin/chunks/xan-TSDTZVY3.js +0 -3
- package/dist/bin/chunks/xan-view-XBMA362V.js +0 -3
- package/dist/bin/chunks/xargs-VTFN762K.js +0 -3
- package/dist/bin/chunks/yq-KU5YTNAK.js +0 -3
- package/dist/bin/shell/chunks/alias-YRVAW27Y.js +0 -3
- package/dist/bin/shell/chunks/awk2-UFCNQFCV.js +0 -3
- package/dist/bin/shell/chunks/base64-EGKVQIBC.js +0 -3
- package/dist/bin/shell/chunks/basename-F3AQ4KAQ.js +0 -3
- package/dist/bin/shell/chunks/bash-BEG4JB7K.js +0 -3
- package/dist/bin/shell/chunks/cat-NBL6MU5H.js +0 -3
- package/dist/bin/shell/chunks/chmod-S564JCJW.js +0 -3
- package/dist/bin/shell/chunks/chunk-2AIXTPH2.js +0 -9
- package/dist/bin/shell/chunks/chunk-2GG3NVC4.js +0 -10
- package/dist/bin/shell/chunks/chunk-2ZAK22BG.js +0 -9
- package/dist/bin/shell/chunks/chunk-3WIMLJM7.js +0 -8
- package/dist/bin/shell/chunks/chunk-47WZ2U6M.js +0 -9
- package/dist/bin/shell/chunks/chunk-4BNS566Q.js +0 -4
- package/dist/bin/shell/chunks/chunk-4J4UC7OD.js +0 -17
- package/dist/bin/shell/chunks/chunk-52FZYTIX.js +0 -34
- package/dist/bin/shell/chunks/chunk-5KX5YUWT.js +0 -37
- package/dist/bin/shell/chunks/chunk-5XSZHUEI.js +0 -15
- package/dist/bin/shell/chunks/chunk-6FYCU7QB.js +0 -3
- package/dist/bin/shell/chunks/chunk-6JKLDBRW.js +0 -18
- package/dist/bin/shell/chunks/chunk-6WJQNLR2.js +0 -7
- package/dist/bin/shell/chunks/chunk-7HK63L6Y.js +0 -3
- package/dist/bin/shell/chunks/chunk-7NDRU2ZN.js +0 -5
- package/dist/bin/shell/chunks/chunk-7VCQWCSH.js +0 -15
- package/dist/bin/shell/chunks/chunk-AFAD5U2A.js +0 -8
- package/dist/bin/shell/chunks/chunk-AZH64XMJ.js +0 -3
- package/dist/bin/shell/chunks/chunk-BPZJYOUA.js +0 -33
- package/dist/bin/shell/chunks/chunk-BZP56QBM.js +0 -24
- package/dist/bin/shell/chunks/chunk-C6JOQKE2.js +0 -22
- package/dist/bin/shell/chunks/chunk-CX5CEEGI.js +0 -11
- package/dist/bin/shell/chunks/chunk-D7YFPDMV.js +0 -22
- package/dist/bin/shell/chunks/chunk-DHIKZU63.js +0 -3
- package/dist/bin/shell/chunks/chunk-DWECIBLJ.js +0 -3
- package/dist/bin/shell/chunks/chunk-FEENTUVZ.js +0 -18
- package/dist/bin/shell/chunks/chunk-FJABJBIW.js +0 -141
- package/dist/bin/shell/chunks/chunk-FYCT4DWY.js +0 -6
- package/dist/bin/shell/chunks/chunk-G7ZWT7BT.js +0 -9
- package/dist/bin/shell/chunks/chunk-GTO74SFS.js +0 -7
- package/dist/bin/shell/chunks/chunk-GXX3QUMM.js +0 -34
- package/dist/bin/shell/chunks/chunk-HMCRB24D.js +0 -15
- package/dist/bin/shell/chunks/chunk-HWNCK5BB.js +0 -10
- package/dist/bin/shell/chunks/chunk-IX7LKVVH.js +0 -15
- package/dist/bin/shell/chunks/chunk-J7XTZ47D.js +0 -288
- package/dist/bin/shell/chunks/chunk-JDFKEXLG.js +0 -12
- package/dist/bin/shell/chunks/chunk-JJC4ENJL.js +0 -13
- package/dist/bin/shell/chunks/chunk-JSZBZ2XU.js +0 -3
- package/dist/bin/shell/chunks/chunk-JXLDT4KX.js +0 -4
- package/dist/bin/shell/chunks/chunk-KMZUSEWI.js +0 -12
- package/dist/bin/shell/chunks/chunk-KWCO3YXP.js +0 -17
- package/dist/bin/shell/chunks/chunk-LMA4D2KK.js +0 -7
- package/dist/bin/shell/chunks/chunk-LNVSXNT7.js +0 -3
- package/dist/bin/shell/chunks/chunk-LX2H4DPL.js +0 -6
- package/dist/bin/shell/chunks/chunk-MLUOPG3W.js +0 -3
- package/dist/bin/shell/chunks/chunk-MNWK4UIM.js +0 -22
- package/dist/bin/shell/chunks/chunk-MP77TJMM.js +0 -6
- package/dist/bin/shell/chunks/chunk-MTK7VLZG.js +0 -12
- package/dist/bin/shell/chunks/chunk-N3FQJLPZ.js +0 -17
- package/dist/bin/shell/chunks/chunk-N6YW4W3Z.js +0 -29
- package/dist/bin/shell/chunks/chunk-NMMVECGD.js +0 -14
- package/dist/bin/shell/chunks/chunk-NXYVRP6D.js +0 -11
- package/dist/bin/shell/chunks/chunk-NYIPFY36.js +0 -3
- package/dist/bin/shell/chunks/chunk-OVVMB2JI.js +0 -7
- package/dist/bin/shell/chunks/chunk-OXZSG3ZZ.js +0 -7
- package/dist/bin/shell/chunks/chunk-PKE7GKU5.js +0 -3
- package/dist/bin/shell/chunks/chunk-PSJORJRS.js +0 -6
- package/dist/bin/shell/chunks/chunk-R36DS2UF.js +0 -20
- package/dist/bin/shell/chunks/chunk-RKBWTGBZ.js +0 -7
- package/dist/bin/shell/chunks/chunk-RVGYO2OU.js +0 -3
- package/dist/bin/shell/chunks/chunk-SF2OLINE.js +0 -12
- package/dist/bin/shell/chunks/chunk-TIRU5FOD.js +0 -101
- package/dist/bin/shell/chunks/chunk-TKYWUEON.js +0 -13
- package/dist/bin/shell/chunks/chunk-UI7CV277.js +0 -20
- package/dist/bin/shell/chunks/chunk-UNWZQG7U.js +0 -3
- package/dist/bin/shell/chunks/chunk-UOMNSQEZ.js +0 -10
- package/dist/bin/shell/chunks/chunk-W5OBQVJ2.js +0 -6
- package/dist/bin/shell/chunks/chunk-WDWNEHHE.js +0 -9
- package/dist/bin/shell/chunks/chunk-WHUKZ3K3.js +0 -85
- package/dist/bin/shell/chunks/chunk-XHCCSVP6.js +0 -9
- package/dist/bin/shell/chunks/chunk-XPTYN6UE.js +0 -8
- package/dist/bin/shell/chunks/chunk-XRUDFQG5.js +0 -7
- package/dist/bin/shell/chunks/chunk-Y2IUEWQD.js +0 -11
- package/dist/bin/shell/chunks/chunk-Y5OWCEDV.js +0 -64
- package/dist/bin/shell/chunks/chunk-ZFUVUYWG.js +0 -15
- package/dist/bin/shell/chunks/chunk-ZZP3RSWL.js +0 -4
- package/dist/bin/shell/chunks/clear-FGNEKYDU.js +0 -3
- package/dist/bin/shell/chunks/column-QLGOK3XM.js +0 -3
- package/dist/bin/shell/chunks/comm-PLYUTVP3.js +0 -3
- package/dist/bin/shell/chunks/cp-HYXTMN3D.js +0 -3
- package/dist/bin/shell/chunks/curl-DCSPNPEW.js +0 -27
- package/dist/bin/shell/chunks/cut-JNQTCQY7.js +0 -3
- package/dist/bin/shell/chunks/date-OFYBOAUE.js +0 -3
- package/dist/bin/shell/chunks/diff-LZ4WRLIF.js +0 -3
- package/dist/bin/shell/chunks/dirname-VCINTLPD.js +0 -3
- package/dist/bin/shell/chunks/du-4LRQIGRG.js +0 -3
- package/dist/bin/shell/chunks/echo-KCOHTNDF.js +0 -3
- package/dist/bin/shell/chunks/env-FNVYNLGB.js +0 -3
- package/dist/bin/shell/chunks/expand-CB7FG7LQ.js +0 -3
- package/dist/bin/shell/chunks/expr-6A2XZORA.js +0 -3
- package/dist/bin/shell/chunks/file-GRZLWDVH.js +0 -3
- package/dist/bin/shell/chunks/find-5OZWMYCV.js +0 -3
- package/dist/bin/shell/chunks/flag-coverage-H6NG6ZQL.js +0 -3
- package/dist/bin/shell/chunks/fold-7YEITA5L.js +0 -3
- package/dist/bin/shell/chunks/grep-KKBXRB73.js +0 -3
- package/dist/bin/shell/chunks/gzip-ZJP5VIAQ.js +0 -3
- package/dist/bin/shell/chunks/head-B6GFQHKF.js +0 -3
- package/dist/bin/shell/chunks/help-CGUEOGXQ.js +0 -3
- package/dist/bin/shell/chunks/history-AQQWW3QB.js +0 -3
- package/dist/bin/shell/chunks/hostname-USNWOQCK.js +0 -3
- package/dist/bin/shell/chunks/html-to-markdown-3HJ7L7NL.js +0 -3
- package/dist/bin/shell/chunks/join-WRM6S6CO.js +0 -3
- package/dist/bin/shell/chunks/jq-33GJJXTL.js +0 -3
- package/dist/bin/shell/chunks/js-exec-F7JAZ4ZQ.js +0 -98
- package/dist/bin/shell/chunks/ln-LP4HMCSM.js +0 -3
- package/dist/bin/shell/chunks/ls-KBNHNZWQ.js +0 -3
- package/dist/bin/shell/chunks/md5sum-ZNYCDRQL.js +0 -3
- package/dist/bin/shell/chunks/mkdir-P4DKRCDX.js +0 -3
- package/dist/bin/shell/chunks/mv-QQK4FQX6.js +0 -3
- package/dist/bin/shell/chunks/nl-6TVYE4ZB.js +0 -3
- package/dist/bin/shell/chunks/od-Y3E3QXOL.js +0 -3
- package/dist/bin/shell/chunks/paste-LYNFXXCM.js +0 -3
- package/dist/bin/shell/chunks/printf-MR3FXCDE.js +0 -3
- package/dist/bin/shell/chunks/pwd-FCNDA467.js +0 -3
- package/dist/bin/shell/chunks/python3-R5OFWJIH.js +0 -13
- package/dist/bin/shell/chunks/readlink-25V57VOL.js +0 -3
- package/dist/bin/shell/chunks/rev-AJECDD4L.js +0 -3
- package/dist/bin/shell/chunks/rg-2YWJS6TE.js +0 -3
- package/dist/bin/shell/chunks/rm-ECNUFR66.js +0 -3
- package/dist/bin/shell/chunks/rmdir-DLOHIA7Q.js +0 -3
- package/dist/bin/shell/chunks/sed-IGRH7EGG.js +0 -3
- package/dist/bin/shell/chunks/seq-UXDJE6FB.js +0 -3
- package/dist/bin/shell/chunks/sha1sum-5QZSNFY3.js +0 -3
- package/dist/bin/shell/chunks/sha256sum-DI7JAVAU.js +0 -3
- package/dist/bin/shell/chunks/sleep-RPGCUUGX.js +0 -3
- package/dist/bin/shell/chunks/sort-HQPAFL76.js +0 -3
- package/dist/bin/shell/chunks/split-F6FSB5KI.js +0 -3
- package/dist/bin/shell/chunks/sqlite3-7TRACAE7.js +0 -3
- package/dist/bin/shell/chunks/stat-BD6KT3BP.js +0 -3
- package/dist/bin/shell/chunks/strings-6PE3YMPO.js +0 -3
- package/dist/bin/shell/chunks/tac-NERJXVOM.js +0 -3
- package/dist/bin/shell/chunks/tail-24F643A4.js +0 -3
- package/dist/bin/shell/chunks/tar-5HK3VMV2.js +0 -3
- package/dist/bin/shell/chunks/tee-5B7P2QRJ.js +0 -3
- package/dist/bin/shell/chunks/time-FN6VJGRS.js +0 -3
- package/dist/bin/shell/chunks/timeout-ZARIAF3K.js +0 -3
- package/dist/bin/shell/chunks/touch-DFGSVIX7.js +0 -3
- package/dist/bin/shell/chunks/tr-QQZYZ3CH.js +0 -3
- package/dist/bin/shell/chunks/tree-6D7SMPUR.js +0 -3
- package/dist/bin/shell/chunks/true-SKL4L7JP.js +0 -3
- package/dist/bin/shell/chunks/unexpand-3JWOSSBQ.js +0 -3
- package/dist/bin/shell/chunks/uniq-Q5UH5NL3.js +0 -3
- package/dist/bin/shell/chunks/wc-4HXNTHY3.js +0 -3
- package/dist/bin/shell/chunks/which-LCXKCLFC.js +0 -3
- package/dist/bin/shell/chunks/whoami-TZDZDU7T.js +0 -3
- package/dist/bin/shell/chunks/xan-TSDTZVY3.js +0 -3
- package/dist/bin/shell/chunks/xan-view-XBMA362V.js +0 -3
- package/dist/bin/shell/chunks/xargs-VTFN762K.js +0 -3
- package/dist/bin/shell/chunks/yq-KU5YTNAK.js +0 -3
- package/dist/bundle/chunks/alias-RTYYYW3D.js +0 -2
- package/dist/bundle/chunks/awk2-SREAOJRG.js +0 -2
- package/dist/bundle/chunks/base64-WIGL46P3.js +0 -2
- package/dist/bundle/chunks/basename-UB3CIYNI.js +0 -2
- package/dist/bundle/chunks/bash-F4KHPMTX.js +0 -2
- package/dist/bundle/chunks/cat-LPZ6XNHG.js +0 -2
- package/dist/bundle/chunks/chmod-TFEPA42X.js +0 -2
- package/dist/bundle/chunks/chunk-27JIFWUR.js +0 -3
- package/dist/bundle/chunks/chunk-2VDTE5BV.js +0 -14
- package/dist/bundle/chunks/chunk-2VJJEDV2.js +0 -8
- package/dist/bundle/chunks/chunk-4I3HOE5Z.js +0 -21
- package/dist/bundle/chunks/chunk-4JLVZKHC.js +0 -8
- package/dist/bundle/chunks/chunk-4WKZNNJK.js +0 -2
- package/dist/bundle/chunks/chunk-55LZFN6S.js +0 -36
- package/dist/bundle/chunks/chunk-5MV7Q5QB.js +0 -5
- package/dist/bundle/chunks/chunk-6L65G6A7.js +0 -17
- package/dist/bundle/chunks/chunk-6NYPZ4NX.js +0 -8
- package/dist/bundle/chunks/chunk-7CSMHFIJ.js +0 -33
- package/dist/bundle/chunks/chunk-AAGO7IQ5.js +0 -11
- package/dist/bundle/chunks/chunk-AFQAPVZ3.js +0 -16
- package/dist/bundle/chunks/chunk-AX2X3SZS.js +0 -11
- package/dist/bundle/chunks/chunk-AXMYAPFA.js +0 -9
- package/dist/bundle/chunks/chunk-BU36VZYL.js +0 -4
- package/dist/bundle/chunks/chunk-BZUGFHVS.js +0 -2
- package/dist/bundle/chunks/chunk-CJFAMHFC.js +0 -7
- package/dist/bundle/chunks/chunk-CN5XGDNN.js +0 -6
- package/dist/bundle/chunks/chunk-CQV3EITV.js +0 -2
- package/dist/bundle/chunks/chunk-DJ7QC6LC.js +0 -140
- package/dist/bundle/chunks/chunk-DVJY2RAX.js +0 -2
- package/dist/bundle/chunks/chunk-EUCNMMRD.js +0 -287
- package/dist/bundle/chunks/chunk-FLMHFDSN.js +0 -5
- package/dist/bundle/chunks/chunk-GE6OQDB2.js +0 -10
- package/dist/bundle/chunks/chunk-GHB6M7KA.js +0 -2
- package/dist/bundle/chunks/chunk-GRQJA2J7.js +0 -21
- package/dist/bundle/chunks/chunk-H2TS57O5.js +0 -5
- package/dist/bundle/chunks/chunk-H7WISVP3.js +0 -6
- package/dist/bundle/chunks/chunk-HAIOEUEV.js +0 -63
- package/dist/bundle/chunks/chunk-HBVMHTO5.js +0 -2
- package/dist/bundle/chunks/chunk-IZ6KBTV7.js +0 -100
- package/dist/bundle/chunks/chunk-JTMQLUCH.js +0 -16
- package/dist/bundle/chunks/chunk-K5JMLDHX.js +0 -13
- package/dist/bundle/chunks/chunk-KAPG5ONA.js +0 -2
- package/dist/bundle/chunks/chunk-KSBHIW2H.js +0 -19
- package/dist/bundle/chunks/chunk-KTL5PAHY.js +0 -5
- package/dist/bundle/chunks/chunk-KTPCYKBB.js +0 -3
- package/dist/bundle/chunks/chunk-KWGBQNTV.js +0 -32
- package/dist/bundle/chunks/chunk-LZUPLYFM.js +0 -6
- package/dist/bundle/chunks/chunk-MFDPAVC6.js +0 -14
- package/dist/bundle/chunks/chunk-MFRETFZB.js +0 -6
- package/dist/bundle/chunks/chunk-MIZIUC5M.js +0 -8
- package/dist/bundle/chunks/chunk-MJLETYZI.js +0 -14
- package/dist/bundle/chunks/chunk-MTHXXA6H.js +0 -6
- package/dist/bundle/chunks/chunk-NGPDJCUE.js +0 -5
- package/dist/bundle/chunks/chunk-OVH44QKR.js +0 -11
- package/dist/bundle/chunks/chunk-PDUL32DM.js +0 -16
- package/dist/bundle/chunks/chunk-PYDWFCTN.js +0 -11
- package/dist/bundle/chunks/chunk-QAJKDPNS.js +0 -2
- package/dist/bundle/chunks/chunk-R4IFXNY5.js +0 -28
- package/dist/bundle/chunks/chunk-R4QNMLOB.js +0 -12
- package/dist/bundle/chunks/chunk-RBQG6ZUG.js +0 -3
- package/dist/bundle/chunks/chunk-RCXNPPJY.js +0 -17
- package/dist/bundle/chunks/chunk-S2BIZAWY.js +0 -7
- package/dist/bundle/chunks/chunk-SAI2SPQQ.js +0 -8
- package/dist/bundle/chunks/chunk-SETW5JBN.js +0 -9
- package/dist/bundle/chunks/chunk-SJYEXC2Z.js +0 -14
- package/dist/bundle/chunks/chunk-SY4HAUHP.js +0 -2
- package/dist/bundle/chunks/chunk-TA74ENH7.js +0 -14
- package/dist/bundle/chunks/chunk-TC2WHAIS.js +0 -2
- package/dist/bundle/chunks/chunk-VACKIICN.js +0 -5
- package/dist/bundle/chunks/chunk-VBLMIJON.js +0 -6
- package/dist/bundle/chunks/chunk-WKPK7M56.js +0 -10
- package/dist/bundle/chunks/chunk-WM5IJFMP.js +0 -8
- package/dist/bundle/chunks/chunk-WPGQVBSY.js +0 -6
- package/dist/bundle/chunks/chunk-WVRWIZF5.js +0 -23
- package/dist/bundle/chunks/chunk-XEKXHOPO.js +0 -2
- package/dist/bundle/chunks/chunk-XPK7ZFVA.js +0 -12
- package/dist/bundle/chunks/chunk-XZUZRAAC.js +0 -10
- package/dist/bundle/chunks/chunk-Y4LIDHSD.js +0 -7
- package/dist/bundle/chunks/chunk-YRNR2VHY.js +0 -21
- package/dist/bundle/chunks/chunk-YS4NUBYX.js +0 -9
- package/dist/bundle/chunks/chunk-YWOZZRSK.js +0 -2
- package/dist/bundle/chunks/chunk-Z3KJQD7F.js +0 -33
- package/dist/bundle/chunks/chunk-ZDIT6ST5.js +0 -7
- package/dist/bundle/chunks/clear-HKGFEOF6.js +0 -2
- package/dist/bundle/chunks/column-PVOEF65J.js +0 -2
- package/dist/bundle/chunks/comm-5QMYEAJL.js +0 -2
- package/dist/bundle/chunks/cp-BISAAS7A.js +0 -2
- package/dist/bundle/chunks/curl-PAWGO3EH.js +0 -26
- package/dist/bundle/chunks/cut-NDMV7SPO.js +0 -2
- package/dist/bundle/chunks/date-XKUEQ4WF.js +0 -2
- package/dist/bundle/chunks/diff-TT4M7WM3.js +0 -2
- package/dist/bundle/chunks/dirname-MPHRFUTI.js +0 -2
- package/dist/bundle/chunks/du-572XNP42.js +0 -2
- package/dist/bundle/chunks/echo-NDWZZHPO.js +0 -2
- package/dist/bundle/chunks/env-DLFRY633.js +0 -2
- package/dist/bundle/chunks/expand-T2TH4TBQ.js +0 -2
- package/dist/bundle/chunks/expr-YLACLCSM.js +0 -2
- package/dist/bundle/chunks/file-IPZJC3FQ.js +0 -2
- package/dist/bundle/chunks/find-T5TGGXUU.js +0 -2
- package/dist/bundle/chunks/flag-coverage-TRYUZMPS.js +0 -2
- package/dist/bundle/chunks/fold-XR2JMFCW.js +0 -2
- package/dist/bundle/chunks/grep-VUESTEZ7.js +0 -2
- package/dist/bundle/chunks/gzip-HF3D26QX.js +0 -2
- package/dist/bundle/chunks/head-AEMOMQSZ.js +0 -2
- package/dist/bundle/chunks/help-HZ6M2CKN.js +0 -2
- package/dist/bundle/chunks/history-WYYKSLSZ.js +0 -2
- package/dist/bundle/chunks/hostname-C4HQXXUP.js +0 -2
- package/dist/bundle/chunks/html-to-markdown-LXXMVQ3V.js +0 -2
- package/dist/bundle/chunks/join-YIABB6WR.js +0 -2
- package/dist/bundle/chunks/jq-3FAAQVR6.js +0 -2
- package/dist/bundle/chunks/js-exec-SR6IMNWM.js +0 -97
- package/dist/bundle/chunks/ln-4LGSXXGD.js +0 -2
- package/dist/bundle/chunks/ls-ZJGQER7M.js +0 -2
- package/dist/bundle/chunks/md5sum-LU7RVIB7.js +0 -2
- package/dist/bundle/chunks/mkdir-MEPGZOB6.js +0 -2
- package/dist/bundle/chunks/mv-W5BIQ646.js +0 -2
- package/dist/bundle/chunks/nl-Q2L5XQWZ.js +0 -2
- package/dist/bundle/chunks/od-RDSM4TQJ.js +0 -2
- package/dist/bundle/chunks/paste-ABCY7E6C.js +0 -2
- package/dist/bundle/chunks/printf-JPOOWRJC.js +0 -2
- package/dist/bundle/chunks/pwd-WE6EN5AV.js +0 -2
- package/dist/bundle/chunks/python3-JPCH6LLN.js +0 -12
- package/dist/bundle/chunks/readlink-OPJF4DL5.js +0 -2
- package/dist/bundle/chunks/rev-GCV6X22K.js +0 -2
- package/dist/bundle/chunks/rg-N5WLPMSA.js +0 -2
- package/dist/bundle/chunks/rm-SSGETQVQ.js +0 -2
- package/dist/bundle/chunks/rmdir-OC4ZLPYA.js +0 -2
- package/dist/bundle/chunks/sed-DX2SGXMF.js +0 -2
- package/dist/bundle/chunks/seq-M5EC7Q57.js +0 -2
- package/dist/bundle/chunks/sha1sum-O6DM3TPQ.js +0 -2
- package/dist/bundle/chunks/sha256sum-WPVZLZPS.js +0 -2
- package/dist/bundle/chunks/sleep-HZ4QEFOK.js +0 -2
- package/dist/bundle/chunks/sort-VW2NIZHW.js +0 -2
- package/dist/bundle/chunks/split-NBMH43M2.js +0 -2
- package/dist/bundle/chunks/sqlite3-UE3PJTDQ.js +0 -2
- package/dist/bundle/chunks/stat-CD34IZ4P.js +0 -2
- package/dist/bundle/chunks/strings-MCXFXPDL.js +0 -2
- package/dist/bundle/chunks/tac-BQ7EDZW2.js +0 -2
- package/dist/bundle/chunks/tail-GJMTLMNE.js +0 -2
- package/dist/bundle/chunks/tar-WIZ3PDF4.js +0 -2
- package/dist/bundle/chunks/tee-SGANDVNY.js +0 -2
- package/dist/bundle/chunks/time-FCZCDIAM.js +0 -2
- package/dist/bundle/chunks/timeout-VDIEAB4R.js +0 -2
- package/dist/bundle/chunks/touch-UA33VN3N.js +0 -2
- package/dist/bundle/chunks/tr-JNNR5JMS.js +0 -2
- package/dist/bundle/chunks/tree-YLD52CNT.js +0 -2
- package/dist/bundle/chunks/true-FHQXJXBE.js +0 -2
- package/dist/bundle/chunks/unexpand-2TKXAENW.js +0 -2
- package/dist/bundle/chunks/uniq-DMFKT3AB.js +0 -2
- package/dist/bundle/chunks/wc-TZFYWFLA.js +0 -2
- package/dist/bundle/chunks/which-XEM24D5D.js +0 -2
- package/dist/bundle/chunks/whoami-XMTX52VE.js +0 -2
- package/dist/bundle/chunks/xan-U6654PZR.js +0 -2
- package/dist/bundle/chunks/xan-view-YATJ4KAA.js +0 -2
- package/dist/bundle/chunks/xargs-VDP7DLOU.js +0 -2
- package/dist/bundle/chunks/yq-ZBXLBSXV.js +0 -2
- package/dist/interpreter/helpers/statements.d.ts +0 -20
- package/dist/interpreter/helpers/tilde.d.ts +0 -13
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as W}from"./chunk-WZQNMEQW.js";import{a as Se}from"./chunk-TDD4NFYE.js";import{a as D}from"./chunk-XVL654YD.js";import{b as oe}from"./chunk-UBTKJ6MG.js";import{a as Z}from"./chunk-GN6CQ3J4.js";import{a as ke,b as Ae,c as le}from"./chunk-QAYAQNCG.js";var nt="file",it="link",st="symlink",Ie="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:Ie,6:"fifo",x:"pax-header",g:"pax-global-header",L:"gnu-long-name",K:"gnu-long-link-name"},lt=new Uint8Array(512),J=new Uint8Array(0),I=new TextEncoder,Oe=new TextDecoder;function R(e,t,r,n){n&&I.encodeInto(n,e.subarray(t,t+r))}function _(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 Oe.decode(e.subarray(t,i))}function ue(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 q(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 ue(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 Fe(e){if(e==null)return J;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 Ee=(e,t)=>{let r=e.split("/").filter(Boolean);return t>=r.length?"":r.slice(t).join("/")};function Le(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=Ee(s.name,r);if(!o)return null;if(s.name=s.type==="directory"&&!o.endsWith("/")?`${o}/`:o,s.linkname){let l=s.linkname.startsWith("/");if(l||s.type==="link"){let c=Ee(s.linkname,r);s.linkname=l?`/${c}`||"/":c}}}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 fe=32,ct=48;function ft(e){let t=ue(e,148,8),r=0;for(let n=0;n<e.length;n++)n>=148&&n<156?r+=fe:r+=e[n];return t===r}function ut(e){e.fill(fe,148,156);let t=0;for(let r of e)t+=r;for(let r=153;r>=148;r--)e[r]=(t&7)+ct,t>>=3;e[154]=0,e[155]=fe}var dt=256;function mt(e){let t={};I.encode(e.name).length>100&&Ne(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,l=o+String(o).length;return l=o+String(l).length,`${l} ${a}`}).join(""));return{paxHeader:Ue({name:Oe.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 Ne(e){let t=I.encode(e).length;if(t<=100||t>dt)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 Ue(e){let t=new Uint8Array(512),r=M(e)?0:e.size??0,n=e.name,i="";if(!e.pax?.path){let s=Ne(n);s&&(n=s.name,i=s.prefix)}return R(t,0,100,n),_(t,100,8,e.mode??(e.type==="directory"?493:420)),_(t,108,8,e.uid??0),_(t,116,8,e.gid??0),_(t,124,12,r),_(t,136,12,Math.floor((e.mtime?.getTime()??Date.now())/1e3)),R(t,156,1,at[e.type??"file"]),R(t,157,100,e.linkname),R(t,257,6,"ustar\0"),R(t,263,2,"00"),R(t,265,32,e.uname),R(t,297,32,e.gname),R(t,345,155,i),ut(t),t}function ht(e,t){if(t&&!ft(e))throw new Error("Invalid tar header checksum.");let r=F(e,156,1),n={name:F(e,0,100),mode:ue(e,100,8),uid:q(e,108,8),gid:q(e,116,8),size:q(e,124,12),mtime:new Date(q(e,136,12)*1e3),type:ot[r]||"file",linkname:F(e,157,100)},i=F(e,257,6);return M(n)&&(n.size=0),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 Be={path:["name",e=>e],linkpath:["linkname",e=>e],size:["size",e=>parseInt(e,10)],mtime:["mtime",parseFloat],uid:["uid",e=>parseInt(e,10)],gid:["gid",e=>parseInt(e,10)],uname:["uname",e=>e],gname:["gname",e=>e]};function pt(e){let t=new TextDecoder("utf-8"),r=Object.create(null),n=Object.create(null),i=0;for(;i<e.length;){let s=e.indexOf(32,i);if(s===-1)break;let a=parseInt(t.decode(e.subarray(i,s)),10);if(Number.isNaN(a)||a===0)break;let o=i+a,[l,c]=t.decode(e.subarray(s+1,o-1)).split("=",2);if(l&&c!==void 0&&(n[l]=c,Object.hasOwn(Be,l))){let[f,u]=Be[l],g=u(c);(typeof g=="string"||!Number.isNaN(g))&&(r[f]=g)}i=o}return Object.keys(n).length>0&&(r.pax=n),r}function $e(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 gt(e){switch(e){case"pax-global-header":case"pax-header":return pt;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 yt(e){let t=Ue(e),r=mt(e);if(!r)return[t];let n=-r.paxBody.length&511,i=n>0?[lt.subarray(0,n)]:[];return[r.paxHeader,r.paxBody,...i,t]}var wt=new Uint8Array(512*2);function Re(e,t,r){let n=null,i=0,s=!1,a=o=>{let l=new Error(o);throw t(l),l};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 l=M(o)?0:o.size;(!Number.isSafeInteger(l)||l<0)&&a("Invalid tar entry size.");try{let c=yt({...o,size:l});for(let f of c)e(f);n={...o,size:l},i=0}catch(c){t(c)}},write(o){n||a("No active tar entry."),s&&a("Cannot write data after finalize.");let l=i+o.length;l>n.size&&a(`"${n.name}" exceeds given size of ${n.size} bytes.`);try{i=l,e(o)}catch(c){t(c)}},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(wt),s=!0,r&&r()}catch(o){t(o)}}}}var Y=256;function xt(){let e=new Array(Y),t=e.length-1,r=0,n=0,i=0,s=o=>{let l=e[r];o===l.length?(e[r]=J,r=r+1&t):e[r]=l.subarray(o),i-=o,i===0&&e.length>Y&&(e=new Array(Y),t=Y-1,r=0,n=0)};function a(o,l){if(l){let y=0,d=Math.min(o,i);for(;d>0;){let m=e[r],h=Math.min(d,m.length),b=h===m.length?m:m.subarray(0,h);if(s(h),d-=h,y+=h,!l(b))break}return y}if(i<o)return null;if(o===0)return J;let c=e[r];if(c.length>=o){let y=c.length===o?c:c.subarray(0,o);return s(o),y}let f=new Uint8Array(o),u=0,g=o;for(;g>0;){let y=e[r],d=Math.min(g,y.length);f.set(d===y.length?y:y.subarray(0,d),u),u+=d,g-=d,s(d)}return f}return{push:o=>{if(o.length===0)return;let l=n+1&t;if(l===r){let c=e.length,f=c*2,u=new Array(f),g=n-r+c&c-1;if(r<n)for(let y=0;y<g;y++)u[y]=e[r+y];else if(g>0){let y=c-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=g,l=n+1&t}e[n]=o,n=l,i+=o.length},available:()=>i,peek:o=>{if(i<o)return null;if(o===0)return J;let l=e[r];if(l.length>=o)return l.length===o?l:l.subarray(0,o);let c=new Uint8Array(o),f=0,u=r;for(;f<o;){let g=e[u],y=Math.min(o-f,g.length);y===g.length?c.set(g,f):c.set(g.subarray(0,y),f),f+=y,u=u+1&t}return c},discard:o=>{if(o>i)throw new Error("Too many bytes consumed");if(o===0)return;let l=o;for(;l>0;){let c=e[r],f=Math.min(l,c.length);s(f),l-=f}},pull:a}}var ce=0,j=1,K=new Error("Tar archive is truncated.");function Pe(e={}){let t=e.strict??!1,{available:r,peek:n,push:i,discard:s,pull:a}=xt(),o=ce,l=!1,c=!1,f=!1,u=null,g={},y={},d={isEntryActive:()=>o===j,isBodyComplete:()=>!u||u.remaining===0,canFinish:()=>!u||r()>=u.remaining+u.padding,write(m){if(l)throw new Error("Archive already ended.");i(m)},end(){l=!0},readHeader(){if(o!==ce)throw new Error("Cannot read header while an entry is active");if(!c)for(;!c;){if(r()<512){if(l){if(r()>0&&t)throw K;c=!0;return}return null}let m=n(512);if(Te(m)){if(r()<512*2){if(l){if(t)throw K;c=!0;return}return null}if(Te(n(512*2).subarray(512))){s(512*2),c=!0,f=!0;return}if(t)throw new Error("Invalid tar header.");s(512);continue}let h;try{h=ht(m,t)}catch(S){if(t)throw S;s(512);continue}let b=gt(h.type);if(b){let S=h.size+(-h.size&511);if(r()<512+S){if(l&&t)throw K;return null}s(512);let z=b(a(S).subarray(0,h.size)),E=h.type==="pax-global-header"?g:y;for(let C in z)E[C]=z[C];continue}s(512);let x=h;return h.prefix&&(x.name=`${h.prefix}/${x.name}`),$e(x,g),$e(x,y),x.name.endsWith("/")&&x.type==="file"&&(x.type=Ie),y={},u={header:x,remaining:x.size,padding:-x.size&511},o=j,x}},streamBody(m){if(o!==j||!u||u.remaining===0)return 0;let h=Math.min(u.remaining,r());if(h===0)return 0;let b=a(h,m);return u.remaining-=b,b},skipPadding(){if(o!==j||!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=ce,!0)},skipEntry(){if(o!==j||!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 K;if(r()>0&&a(r()).some(m=>m!==0))throw new Error("Invalid EOF.")}}};return d}function Te(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}function Me(){return new CompressionStream("gzip")}function We(){return new DecompressionStream("gzip")}function bt(){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 De=e=>e.pipeTo(new WritableStream);function zt(e={}){let t=Pe(e),r=e.strict??!1,n=null,i=null,s=!1,a=!1,o=!1,l=!1,c=()=>{try{i?.close()}catch{}i=null},f=d=>{if(!l){l=!0;try{i?.error(d)}catch{}i=null;try{n.error(d)}catch{}n=null}},u=()=>{if(!l){l=!0,c();try{n.close()}catch{}n=null}},g=()=>{if(r)throw new Error("Tar archive is truncated.");u()},y=()=>{if(!(s||l||!n)){s=!0;try{for(;;){if(a){o&&(t.validateEOF(),u());break}if(t.isEntryActive()){if(o&&!t.canFinish()){g();break}if(i){if((i.desiredSize??1)<=0)break;if(t.streamBody(d=>(i.enqueue(d),(i.desiredSize??1)>0))===0&&!t.isBodyComplete()){o&&g();break}}else if(!t.skipEntry()){o&&g();break}if(t.isBodyComplete()&&(c(),!t.skipPadding())){o&&g();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}=bt();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 Fe(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)),new Uint8Array(await _e(t))}async function He(e,t={}){let r=e instanceof ReadableStream?e:new ReadableStream({start(s){s.enqueue(e instanceof Uint8Array?e:new Uint8Array(e)),s.close()}}),n=[],i=r.pipeThrough(zt(t));for await(let s of i){let a;try{a=Le(s.header,t)}catch(o){throw await s.body.cancel(),o}if(a===null){await De(s.body);continue}M(a)?(await De(s.body),n.push({header:a})):n.push({header:a,data:await _e(s.body)})}return n}import Ot from"seek-bzip";var vt=(()=>{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 Ct(e,t){return(e<<8^vt[(e>>>24^t)&255])>>>0}var de=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 kt(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 At(e){let t=e.length;if(t===0)return{transformed:new Uint8Array(0),pointer:0};let r=St(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 St(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 Et(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],l=0;for(;s[l]!==o;)l++;if(i[a]=l,l>0){let c=s[l];for(let f=l;f>0;f--)s[f]=s[f-1];s[0]=c}}return{encoded:i,length:e.length}}function Bt(e,t,r){let s=r+1,a=[],o=0;for(;o<t;)if(e[o]===0){let c=0;for(;o<t&&e[o]===0;)c++,o++;let f=c;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 l=new Uint16Array(a.length);for(let c=0;c<a.length;c++)l[c]=a[c];return{symbols:l,length:a.length,eob:s}}function Xe(e,t,r){if(t<=1){let c=new Array(e.length).fill(0);for(let f=0;f<e.length;f++)e[f]>0&&(c[f]=1);return{codeLengths:c,maxLen:1,minLen:1}}let n=[];for(let c=0;c<e.length;c++)e[c]>0&&n.push({freq:e[c],symbol:c,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 c=new Array(e.length).fill(0);return c[n[0].symbol]=1,{codeLengths:c,maxLen:1,minLen:1}}for(;n.length>1;){n.sort((u,g)=>u.freq-g.freq);let c=n.shift(),f=n.shift();n.push({freq:c.freq+f.freq,symbol:-1,left:c,right:f})}let i=new Array(e.length).fill(0);function s(c,f){if(!c.left&&!c.right){i[c.symbol]=f;return}c.left&&s(c.left,f+1),c.right&&s(c.right,f+1)}s(n[0],0);let a=!0;for(;a;){a=!1;for(let c=0;c<i.length;c++)i[c]>r&&(i[c]=r,a=!0);if(a){let c=0;for(let f=0;f<i.length;f++)i[f]>0&&(c+=1/(1<<i[f]));if(c>1)for(let f=1;f<r&&c>1;f++)for(let u=0;u<i.length&&c>1;u++)i[u]===f&&(i[u]++,c-=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,l=0;for(let c=0;c<i.length;c++)i[c]>0&&(i[c]<o&&(o=i[c]),i[c]>l&&(l=i[c]));return{codeLengths:i,maxLen:l,minLen:o}}function $t(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 l=0;l<t;l++)n[l]>0&&s[n[l]]++;let a=new Array(i+1).fill(0),o=0;for(let l=1;l<=i;l++)o=o+s[l-1]<<1,a[l]=o;for(let l=0;l<t;l++)n[l]>0&&(r[l]=a[n[l]]++);return{codes:r,lengths:n}}function Tt(e,t,r){e.writeBits(24,3227993),e.writeBits(24,2511705),e.writeBits(32,r),e.writeBit(0);let n=kt(t),{transformed:i,pointer:s}=At(n);e.writeBits(24,s);let a=new Array(256).fill(!1);for(let p=0;p<i.length;p++)a[i[p]]=!0;let o=new Array(16).fill(!1);for(let p=0;p<16;p++)for(let w=0;w<16;w++)if(a[p*16+w]){o[p]=!0;break}for(let p=0;p<16;p++)e.writeBit(o[p]?1:0);for(let p=0;p<16;p++)if(o[p])for(let w=0;w<16;w++)e.writeBit(a[p*16+w]?1:0);let l=0;for(let p=0;p<256;p++)a[p]&&l++;let{encoded:c,length:f}=Et(i,a),{symbols:u,length:g}=Bt(c,f,l),y=l+2,d=50,m=Math.ceil(g/d),h;g<200?h=2:g<600?h=3:g<1200?h=4:g<2400?h=5:h=6,h>m&&(h=Math.max(2,m));let b=[];for(let p=0;p<h;p++)b.push(new Array(y).fill(0));let x=new Int32Array(m);for(let p=0;p<m;p++)x[p]=p%h;for(let p=0;p<m;p++){let w=p*d,v=Math.min(w+d,g),T=x[p];for(let A=w;A<v;A++)b[T][u[A]]++}function S(p){for(let w=0;w<y;w++)p[w]<1&&(p[w]=1)}let z=[];for(let p=0;p<h;p++)S(b[p]),z.push(Xe(b[p],y,20));for(let p=0;p<4;p++){for(let w=0;w<h;w++)b[w].fill(0);for(let w=0;w<m;w++){let v=w*d,T=Math.min(v+d,g),A=0,G=1/0;for(let U=0;U<h;U++){let se=0;for(let ae=v;ae<T;ae++)se+=z[U].codeLengths[u[ae]]||20;se<G&&(G=se,A=U)}x[w]=A;for(let U=v;U<T;U++)b[A][u[U]]++}for(let w=0;w<h;w++)S(b[w]),z[w]=Xe(b[w],y,20)}e.writeBits(3,h),e.writeBits(15,m);let E=[],C=[];for(let p=0;p<h;p++)C.push(p);for(let p=0;p<m;p++){let w=x[p],v=0;for(;C[v]!==w;)v++;if(E.push(v),v>0){let T=C[v];for(let A=v;A>0;A--)C[A]=C[A-1];C[0]=T}}for(let p=0;p<m;p++){for(let w=0;w<E[p];w++)e.writeBit(1);e.writeBit(0)}for(let p=0;p<h;p++){let w=z[p].codeLengths,v=w[0];e.writeBits(5,v);for(let T=0;T<y;T++){let A=w[T];for(;v<A;)e.writeBit(1),e.writeBit(0),v++;for(;v>A;)e.writeBit(1),e.writeBit(1),v--;e.writeBit(0)}}for(let p=0;p<h;p++){let{codes:w,lengths:v}=$t(z[p].codeLengths,y);z[p]=Object.assign(z[p],{_codes:w,_lengths:v})}let Ce=0,X=0;for(let p=0;p<g;p++){(X===0||X>=d)&&(p>0&&Ce++,X=0);let w=x[Ce],v=z[w],T=u[p],A=v._lengths[T],G=v._codes[T];A>0&&e.writeBits(A,G),X++}}var It=10*1024*1024;function Ge(e,t=9,r=It,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 de(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 l=Math.min(o+i,e.length),c=e.subarray(o,l),f=4294967295;for(let u=0;u<c.length;u++)f=Ct(f,c[u]);f=~f>>>0,a=(a<<1|a>>>31)>>>0,a=(a^f)>>>0,Tt(s,c,f),o=l}return s.writeBits(24,1536581),s.writeBits(24,3690640),s.writeBits(32,a),s.finish()}var V=null,Q=null;async function Ze(){if(V)return V;if(Q)throw Q;try{return V=await oe.runTrustedAsync(()=>import("node-liblzma")),V}catch{throw Q=new Error("xz compression requires node-liblzma which failed to load. Install liblzma-dev (apt) or xz (brew) and reinstall dependencies."),Q}}var ee=null,te=null;async function qe(){if(ee)return ee;if(te)throw te;try{return ee=await oe.runTrustedAsync(()=>import("@mongodb-js/zstd")),ee}catch{throw te=new Error("zstd compression requires @mongodb-js/zstd which is not installed. Install it with: npm install @mongodb-js/zstd"),te}}var me=1024*1024*1024,$=512,Ft=1e6;function H(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:H(e?.maxArchiveSize,me),maxEntries:H(e?.maxEntries,Ft),maxEntrySize:H(e?.maxEntrySize,me),maxCompressedSize:H(e?.maxCompressedSize,e?.maxArchiveSize??me),maxExpansionRatio:H(e?.maxExpansionRatio,1e4),signal:e?.signal,executionScope:e?.executionScope,allowTrustedWholeBufferCodecs:e?.allowTrustedWholeBufferCodecs??!0}}function Lt(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"?Z(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=Z(a),l=Z(i.linkTarget??"");if(o>t.maxArchiveSize||l>t.maxArchiveSize)throw new Error(`Archive too large (max ${t.maxArchiveSize} bytes)`);let c=0;if(o>100&&(c+=o+64),l>100&&(c+=l+64),!Number.isSafeInteger(c))throw new Error(`Archive too large (max ${t.maxArchiveSize} bytes)`);let f=Math.ceil(s/$)*$;if(r($+f),c>0){let u=Math.ceil(c/$)*$;r($+u)}}return n}function re(e,t,r){return e.executionScope?.reserveBytes(t,r,`tar: ${t}`)}function Nt(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 Ut(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=Nt(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 Rt(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 P(e,t){let r=O(t),n=Lt(e,r),i=re(r,"archive construction",n);try{let s=e.map(Rt),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 P(e,r),i=re(r,"gzip input",n.byteLength),s=new W({maxInputBytes:r.maxArchiveSize,maxOutputBytes:r.maxCompressedSize,signal:r.signal,label:"gzip archive"});s.acceptInput(n.length);let l=new ReadableStream({start(g){g.enqueue(n),g.close()}}).pipeThrough(Me()).getReader(),c=[],f=[],u=0;try{for(;;){let{done:y,value:d}=await l.read();if(y)break;try{s.acceptOutput(d.length);let m=re(r,"gzip chunks",d.byteLength);m&&f.push(m)}catch(m){throw await l.cancel(),m}u+=d.length,c.push(d)}let g=re(r,"gzip result",u);try{let y=new Uint8Array(u),d=0;for(let m of c)y.set(m,d),d+=m.length;return y}finally{g?.release()}}finally{for(let g of f)g.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=Ut(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 l="file";switch(a.header.type){case"directory":l="directory";break;case"symlink":l="symlink";break;case"link":l="hardlink";break;case"file":l="file";break;default:l="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:l,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 he(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 W({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=[],l=0;for(;;){let{done:u,value:g}=await a.read();if(u)break;try{n.acceptOutput(g.length)}catch(y){throw await a.cancel(),y}l+=g.length,o.push(g)}let c=new Uint8Array(l),f=0;for(let u of o)c.set(u,f),f+=u.length;return L(c,r)}catch(n){let i=n instanceof Error?n.message:"Unknown error";return{entries:[],error:`Decompression failed: ${i}`}}}function pe(e){return e.length>=2&&e[0]===31&&e[1]===139}function ge(e){return e.length>=3&&e[0]===66&&e[1]===90&&e[2]===104}function ye(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 Pt(e,t){let r=new W({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,l={writeByte(c){r.acceptOutput(1),a===s.length&&(i.push(s),s=Buffer.allocUnsafe(n),a=0),s[a++]=c,o++}};return Ot.decode(Buffer.from(e),l),a>0&&i.push(s.subarray(0,a)),new Uint8Array(Buffer.concat(i,o))}async function Dt(e,t){let r=new W({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 Mt(e){let r=(await Ze()).unxzSync(Buffer.from(e));return new Uint8Array(r)}async function Wt(e){let r=(await Ze()).xzSync(Buffer.from(e));return new Uint8Array(r)}async function Ke(e,t){let r=O(t),n=await P(e,r);return Dt(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 P(e,r),i=await Wt(n);if(r.signal?.throwIfAborted(),i.length>r.maxCompressedSize)throw new Error(`xz archive: output exceeds limit (${r.maxCompressedSize} bytes)`);return i}async function we(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 Pt(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 xe(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 Mt(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 be(e){return e.length>=4&&e[0]===40&&e[1]===181&&e[2]===47&&e[3]===253}async function _t(e){let r=await(await qe()).compress(Buffer.from(e),3);return new Uint8Array(r)}async function jt(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 P(e,r),i=await _t(n);if(r.signal?.throwIfAborted(),i.length>r.maxCompressedSize)throw new Error(`zstd archive: output exceeds limit (${r.maxCompressedSize} bytes)`);return i}async function ze(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 jt(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("-")?Ht(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:le("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:le("tar",s)};n.push(s)}i++}return{ok:!0,options:r,files:n}}function Ht(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 Xt={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 ve(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 ne(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 Gt(e,t){if(t)return{safePath:e};let r=e.replace(/^\/+/,"");return r.length===0?{safePath:""}:rt(r)?{error:"Path contains '..'"}:{safePath:r}}function Zt(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 ie(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(ve(r,n))return{entries:i,errors:s};if(o.isDirectory){i.push({name:r,isDirectory:!0,mode:o.mode,mtime:o.mtime});let l=await e.fs.readdir(a);if(B(e))return{entries:i,errors:["tar: operation aborted"]};for(let c=0;c<l.length;c+=et){if(B(e))return{entries:i,errors:["tar: operation aborted"]};let f=l.slice(c,c+et),u=await Promise.all(f.map(g=>ie(e,t,r?`${r}/${g}`:g,n)));for(let g of u)i.push(...g.entries),s.push(...g.errors)}}else if(o.isFile){let l=await e.fs.readFileBuffer(a);if(B(e))return{entries:i,errors:["tar: operation aborted"]};i.push({name:r,content:l,mode:o.mode,mtime:o.mtime})}else if(o.isSymbolicLink){let l=await e.fs.readlink(a);if(B(e))return{entries:i,errors:["tar: operation aborted"]};i.push({name:r,isSymlink:!0,linkTarget:l,mode:o.mode,mtime:o.mtime})}}catch(o){let l=o instanceof Error?o.message:"unknown error";s.push(`tar: ${r}: ${l}`)}return{entries:i,errors:s}}async function qt(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:g}=await ie(e,n,f,t.exclude);if(i.push(...u),s.push(...g),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 P(i,k(e))}catch(f){return{stdout:"",stderr:`tar: error creating archive: ${f instanceof Error?f.message:"unknown error"}
|
|
19
|
+
`,exitCode:2}}let l="";if(t.file&&t.file!=="-"){let f=e.fs.resolvePath(e.cwd,t.file);try{await e.fs.writeFile(f,o)}catch(u){let g=u instanceof Error?u.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${g}
|
|
20
|
+
`,exitCode:2}}}else l=Buffer.from(o).toString("latin1");let c=a;return s.length>0&&(c+=`${s.join(`
|
|
21
|
+
`)}
|
|
22
|
+
`),{stdout:l,stderr:c,exitCode:s.length>0?2:0,stdoutKind:l.length>0?"bytes":"text"}}async function Yt(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,l=[],c=[],f="";for(let d of r){let{entries:m,errors:h}=await ie(e,o,d,t.exclude);if(l.push(...m),c.push(...h),t.verbose)for(let b of m)f+=`${b.name}${b.isDirectory?"/":""}
|
|
27
|
+
`}let u=[...a,...l],g;try{g=await P(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,g)}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 c.length>0&&(y+=`${c.join(`
|
|
30
|
+
`)}
|
|
31
|
+
`),{stdout:"",stderr:y,exitCode:c.length>0?2:0}}async function Kt(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 h of s.entries)a.set(h.name,h.mtime);let o=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,l=[],c=[],f="";for(let h of r){let{entries:b,errors:x}=await ie(e,o,h,t.exclude);c.push(...x);for(let S of b){let z=a.get(S.name);(!z||S.mtime&&S.mtime.getTime()>z.getTime())&&(l.push(S),t.verbose&&(f+=`${S.name}${S.isDirectory?"/":""}
|
|
36
|
+
`))}}if(l.length===0){let h="";return c.length>0&&(h=`${c.join(`
|
|
37
|
+
`)}
|
|
38
|
+
`),{stdout:"",stderr:h,exitCode:c.length>0?2:0}}let u=new Set(l.map(h=>h.name)),y=[...s.entries.filter(h=>!u.has(h.name)).map(h=>({name:h.name,content:h.content,mode:h.mode,mtime:h.mtime,isDirectory:h.type==="directory",isSymlink:h.type==="symlink",linkTarget:h.linkTarget,uid:h.uid,gid:h.gid})),...l],d;try{d=await P(y,k(e))}catch(h){return{stdout:"",stderr:`tar: error creating archive: ${h instanceof Error?h.message:"unknown error"}
|
|
39
|
+
`,exitCode:2}}try{await e.fs.writeFile(n,d)}catch(h){let b=h instanceof Error?h.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${b}
|
|
40
|
+
`,exitCode:2}}let m=f;return c.length>0&&(m+=`${c.join(`
|
|
41
|
+
`)}
|
|
42
|
+
`),{stdout:"",stderr:m,exitCode:c.length>0?2:0}}async function Jt(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||pe(n),a=t.bzip2||ge(n),o=t.xz||ye(n),l=t.zstd||be(n);if(s?i=await he(n,k(e)):a?i=await we(n,k(e)):o?i=await xe(n,k(e)):l?i=await ze(n,k(e)):i=await L(n,k(e)),i.error)return{stdout:"",stderr:`tar: ${i.error}
|
|
44
|
+
`,exitCode:2};let c=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="",g="",y=[];if(t.directory&&!t.toStdout){if(B(e))return N();try{await e.fs.mkdir(c,{recursive:!0})}catch{}}for(let m of i.entries){if(B(e))return N();let h=tt(m.name,t.strip);if(!h)continue;let b=Gt(h,t.absoluteNames);if(b.error){y.push(`tar: ${h}: ${b.error}`);continue}let x=b.safePath??"";if(!x)continue;let S=x.endsWith("/")?x.slice(0,-1):x;if(f.length>0){let E;if(t.wildcards?E=f.some(C=>ne(x,C)||ne(S,C)||x.startsWith(`${C}/`)):E=f.some(C=>x===C||x.startsWith(`${C}/`)||S===C),!E)continue}if(ve(x,t.exclude))continue;let z=e.fs.resolvePath(c,x);try{if(m.type==="directory"){if(t.toStdout)continue;if(B(e))return N();await e.fs.mkdir(z,{recursive:!0}),t.verbose&&(u+=`${x}
|
|
45
|
+
`)}else if(m.type==="file"){if(t.toStdout){g+=new TextDecoder().decode(m.content),t.verbose&&(u+=`${x}
|
|
46
|
+
`);continue}if(t.keepOldFiles)try{await e.fs.stat(z),t.verbose&&(u+=`${x}: not overwritten, file exists
|
|
47
|
+
`);continue}catch{}let E=z.substring(0,z.lastIndexOf("/"));if(E)try{await e.fs.mkdir(E,{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+=`${x}
|
|
48
|
+
`)}else if(m.type==="symlink"&&m.linkTarget){if(t.toStdout)continue;if(!t.absoluteNames&&(m.linkTarget.startsWith("/")||rt(m.linkTarget))){y.push(`tar: ${x}: unsafe symlink target`);continue}if(t.keepOldFiles)try{await e.fs.stat(z),t.verbose&&(u+=`${x}: not overwritten, file exists
|
|
49
|
+
`);continue}catch{}let E=z.substring(0,z.lastIndexOf("/"));if(E)try{await e.fs.mkdir(E,{recursive:!0})}catch{}try{if(B(e))return N();await e.fs.symlink(m.linkTarget,z)}catch{}t.verbose&&(u+=`${x}
|
|
50
|
+
`)}}catch(E){if(B(e))return N();let C=E instanceof Error?E.message:"unknown error";y.push(`tar: ${x}: ${C}`)}}let d=u;return y.length>0&&(d+=`${y.join(`
|
|
51
|
+
`)}
|
|
52
|
+
`),{stdout:g,stderr:d,exitCode:y.length>0?2:0}}async function Vt(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||pe(n),a=t.bzip2||ge(n),o=t.xz||ye(n),l=t.zstd||be(n);if(s?i=await he(n,k(e)):a?i=await we(n,k(e)):o?i=await xe(n,k(e)):l?i=await ze(n,k(e)):i=await L(n,k(e)),i.error)return{stdout:"",stderr:`tar: ${i.error}
|
|
54
|
+
`,exitCode:2};let c="";for(let f of i.entries){if(B(e))return N();let u=tt(f.name,t.strip);if(!u)continue;let g=u.endsWith("/")?u.slice(0,-1):u;if(r.length>0){let y;if(t.wildcards?y=r.some(d=>ne(u,d)||ne(g,d)||u.startsWith(`${d}/`)):y=r.some(d=>u===d||u.startsWith(`${d}/`)||g===d),!y)continue}if(!ve(u,t.exclude))if(t.verbose){let y=f.type==="directory",d=Se(f.mode,y),m=`${f.uid}/${f.gid}`,h=f.size.toString().padStart(8," "),b=Zt(f.mtime),x=`${d} ${m.padEnd(10)} ${h} ${b} ${u}`;f.type==="symlink"&&f.linkTarget&&(x+=` -> ${f.linkTarget}`),c+=`${x}
|
|
55
|
+
`}else c+=`${u}
|
|
56
|
+
`}return{stdout:c,stderr:"",exitCode:0}}var xr={name:"tar",async execute(e,t){if(B(t))return N();if(Ae(e))return ke(Xt);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 l=n.file.toLowerCase();l.endsWith(".tar.gz")||l.endsWith(".tgz")?n.gzip=!0:l.endsWith(".tar.bz2")||l.endsWith(".tbz2")?n.bzip2=!0:l.endsWith(".tar.xz")||l.endsWith(".txz")?n.xz=!0:(l.endsWith(".tar.zst")||l.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 l=t.fs.resolvePath(t.cwd,n.filesFrom);try{let f=(await t.fs.readFile(l)).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 l=t.fs.resolvePath(t.cwd,n.excludeFrom);try{let f=(await t.fs.readFile(l)).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?qt(t,n,o):n.append?Yt(t,n,o):n.update?Kt(t,n,o):n.extract?Jt(t,n,o):Vt(t,n,o)}},br={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{xr as a,br as b};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as E}from"./chunk-LJRVJXUI.js";import{d as T}from"./chunk-AH7VTVWU.js";import{l as m}from"./chunk-EFORKKSH.js";import{a as u,d as I}from"./chunk-GN6CQ3J4.js";import{a as S}from"./chunk-QIQMJJZ4.js";import{a as B,b as F}from"./chunk-QAYAQNCG.js";var $={name:"paste",summary:"merge lines of files",usage:"paste [OPTION]... [FILE]...",description:["Write lines consisting of the sequentially corresponding lines from","each FILE, separated by TABs, to standard output.","","With no FILE, or when FILE is -, read standard input."],options:["-d, --delimiters=LIST reuse characters from LIST instead of TABs","-s, --serial paste one file at a time instead of in parallel"," --help display this help and exit"],examples:["paste file1 file2 Merge file1 and file2 side by side","paste -d, file1 file2 Use comma as delimiter","paste -s file1 Paste all lines of file1 on one line","paste - - < file Paste pairs of lines from file"]},C={delimiter:{short:"d",long:"delimiters",type:"string",default:" "},serial:{short:"s",long:"serial",type:"boolean"}},M={name:"paste",async execute(n,e){if(F(n))return B($);let l=S("paste",n,C);if(!l.ok)return l.error;let r=l.result.flags.delimiter,h=l.result.flags.serial,p=l.result.positional;if(p.length>e.limits.maxArrayElements)throw new m(`paste: file operand limit exceeded (${e.limits.maxArrayElements})`,"array_elements");if(u(r)>e.limits.maxStringLength)throw new m(`paste: delimiter size limit exceeded (${e.limits.maxStringLength} bytes)`,"string_length");if(p.length===0)return{stdout:"",stderr:`usage: paste [-s] [-d delimiters] file ...
|
|
3
|
+
`,exitCode:1};let g=I(e.stdin),o=g?g.split(`
|
|
4
|
+
`):[""];o.length>0&&o[o.length-1]===""&&o.pop();let A=p.filter(t=>t==="-").length,f=[],y=0,x=u(g),L=t=>{if(t.length>e.limits.maxArrayElements-y)throw new m(`paste: line limit exceeded (${e.limits.maxArrayElements})`,"array_elements");y+=t.length,e.executionScope?.consumeWork(t.length,"paste lines")},w=0;for(let t of p)if(t==="-"){let i=[];for(let s=w;s<o.length;s+=A)i.push(o[s]);L(i),f.push(i),w++}else{let i=e.fs.resolvePath(e.cwd,t);try{let s=await e.fs.readFile(i),d=u(s);if(d>e.limits.maxInputBytes-x)throw new m(`paste: aggregate input size limit exceeded (${e.limits.maxInputBytes} bytes)`,"string_length");x+=d,e.executionScope?.consumeInput(d,"paste");let a=s.split(`
|
|
5
|
+
`);a.length>0&&a[a.length-1]===""&&a.pop(),L(a),f.push(a)}catch(s){return E(s),{stdout:"",stderr:`paste: ${t}: No such file or directory
|
|
6
|
+
`,exitCode:1}}}let c=new T(Math.min(e.limits.maxOutputSize,e.limits.maxStringLength),"paste");if(h)for(let t of f)t&&c.append(`${b(t,r)}
|
|
7
|
+
`);else{let t=0;for(let i of f)t=Math.max(t,i?.length??0);for(let i=0;i<t;i++){let s=[];for(let d of f)s.push(d?.[i]??"");c.append(`${b(s,r)}
|
|
8
|
+
`)}}return{stdout:c.build(),stderr:"",exitCode:0}}};function b(n,e){if(n.length===0)return"";if(n.length===1)return n[0];if(e.length===0)return n.join("");let l=n[0];for(let r=1;r<n.length;r++){let h=(r-1)%e.length;l+=e[h]+n[r]}return l}var O={name:"paste",flags:[{flag:"-d",type:"value",valueHint:"delimiter"},{flag:"-s",type:"boolean"}],stdinType:"text",needsFiles:!0};export{M as a,O as b};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import*as E from"node:async_hooks";import*as I from"node:module";function P(){let l=[{prop:"Function",target:globalThis,violationType:"function_constructor",strategy:"throw",reason:"Function constructor allows arbitrary code execution"},{prop:"eval",target:globalThis,violationType:"eval",strategy:"throw",reason:"eval() allows arbitrary code execution"},{prop:"setTimeout",target:globalThis,violationType:"setTimeout",strategy:"throw",reason:"setTimeout with string argument allows code execution"},{prop:"setInterval",target:globalThis,violationType:"setInterval",strategy:"throw",reason:"setInterval with string argument allows code execution"},{prop:"setImmediate",target:globalThis,violationType:"setImmediate",strategy:"throw",reason:"setImmediate could be used to escape sandbox context"},{prop:"env",target:process,violationType:"process_env",strategy:"throw",reason:"process.env could leak sensitive environment variables",allowedKeys:new Set(["NODE_V8_COVERAGE","NODE_DEBUG","NODE_DEBUG_NATIVE","NODE_COMPILE_CACHE","WATCH_REPORT_DEPENDENCIES","FORCE_COLOR","DEBUG","UNDICI_NO_FG","JEST_WORKER_ID","__MINIMATCH_TESTING_PLATFORM__","LOG_TOKENS","LOG_STREAM"])},{prop:"binding",target:process,violationType:"process_binding",strategy:"throw",reason:"process.binding provides access to native Node.js modules"},{prop:"_linkedBinding",target:process,violationType:"process_binding",strategy:"throw",reason:"process._linkedBinding provides access to native Node.js modules"},{prop:"dlopen",target:process,violationType:"process_dlopen",strategy:"throw",reason:"process.dlopen allows loading native addons"},{prop:"getBuiltinModule",target:process,violationType:"process_get_builtin_module",strategy:"throw",reason:"process.getBuiltinModule allows loading native Node.js modules (fs, child_process, vm)"},{prop:"exit",target:process,violationType:"process_exit",strategy:"throw",reason:"process.exit could terminate the interpreter"},{prop:"abort",target:process,violationType:"process_exit",strategy:"throw",reason:"process.abort could crash the interpreter"},{prop:"kill",target:process,violationType:"process_kill",strategy:"throw",reason:"process.kill could signal other processes"},{prop:"setuid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setuid could escalate privileges"},{prop:"setgid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setgid could escalate privileges"},{prop:"seteuid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.seteuid could escalate effective user privileges"},{prop:"setegid",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setegid could escalate effective group privileges"},{prop:"initgroups",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.initgroups could modify supplementary group IDs"},{prop:"setgroups",target:process,violationType:"process_setuid",strategy:"throw",reason:"process.setgroups could modify supplementary group IDs"},{prop:"umask",target:process,violationType:"process_umask",strategy:"throw",reason:"process.umask could modify file creation permissions"},{prop:"argv",target:process,violationType:"process_argv",strategy:"throw",reason:"process.argv may contain secrets in CLI arguments"},{prop:"cwd",target:process,violationType:"process_chdir",strategy:"throw",reason:"process.cwd could disclose real host working directory path"},{prop:"chdir",target:process,violationType:"process_chdir",strategy:"throw",reason:"process.chdir could confuse the interpreter's CWD tracking"},{prop:"report",target:process,violationType:"process_report",strategy:"throw",reason:"process.report could disclose full environment, host paths, and system info"},{prop:"loadEnvFile",target:process,violationType:"process_env",strategy:"throw",reason:"process.loadEnvFile could load env files bypassing env proxy"},{prop:"setUncaughtExceptionCaptureCallback",target:process,violationType:"process_exception_handler",strategy:"throw",reason:"setUncaughtExceptionCaptureCallback could intercept security errors"},...["on","once","addListener","prependListener","prependOnceListener"].map(e=>({prop:e,target:process,violationType:"process_exception_handler",strategy:"throw",reason:"process-global listeners can outlive the sandbox and lose its security context"})),{prop:"send",target:process,violationType:"process_send",strategy:"throw",reason:"process.send could communicate with parent process in IPC contexts"},{prop:"channel",target:process,violationType:"process_channel",strategy:"throw",reason:"process.channel could access IPC channel to parent process"},{prop:"cpuUsage",target:process,violationType:"process_timing",strategy:"throw",reason:"process.cpuUsage could enable timing side-channel attacks"},{prop:"memoryUsage",target:process,violationType:"process_timing",strategy:"throw",reason:"process.memoryUsage could enable timing side-channel attacks"},{prop:"hrtime",target:process,violationType:"process_timing",strategy:"throw",reason:"process.hrtime could enable timing side-channel attacks"},{prop:"WeakRef",target:globalThis,violationType:"weak_ref",strategy:"throw",reason:"WeakRef could be used to leak references outside sandbox"},{prop:"FinalizationRegistry",target:globalThis,violationType:"finalization_registry",strategy:"throw",reason:"FinalizationRegistry could be used to leak references outside sandbox"},{prop:"Reflect",target:globalThis,violationType:"reflect",strategy:"freeze",reason:"Reflect provides introspection capabilities"},{prop:"Proxy",target:globalThis,violationType:"proxy",strategy:"throw",reason:"Proxy allows intercepting and modifying object behavior"},{prop:"WebAssembly",target:globalThis,violationType:"webassembly",strategy:"throw",reason:"WebAssembly allows executing arbitrary compiled code"},{prop:"SharedArrayBuffer",target:globalThis,violationType:"shared_array_buffer",strategy:"throw",reason:"SharedArrayBuffer could enable side-channel communication or timing attacks"},{prop:"Atomics",target:globalThis,violationType:"atomics",strategy:"throw",reason:"Atomics could enable side-channel communication or timing attacks"},{prop:"performance",target:globalThis,violationType:"performance_timing",strategy:"throw",reason:"performance.now() provides sub-millisecond timing for side-channel attacks"},{prop:"stdout",target:process,violationType:"process_stdout",strategy:"throw",reason:"process.stdout could bypass interpreter output to write to host stdout"},{prop:"stderr",target:process,violationType:"process_stderr",strategy:"throw",reason:"process.stderr could bypass interpreter output to write to host stderr"},{prop:"__defineGetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__defineGetter__ allows prototype pollution via getter injection"},{prop:"__defineSetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__defineSetter__ allows prototype pollution via setter injection"},{prop:"__lookupGetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__lookupGetter__ enables introspection for prototype pollution attacks"},{prop:"__lookupSetter__",target:Object.prototype,violationType:"prototype_mutation",strategy:"throw",reason:"__lookupSetter__ enables introspection for prototype pollution attacks"},{prop:"JSON",target:globalThis,violationType:"json_mutation",strategy:"freeze",reason:"Freeze JSON to prevent mutation of parsing/serialization"},{prop:"Math",target:globalThis,violationType:"math_mutation",strategy:"freeze",reason:"Freeze Math to prevent mutation of math utilities"}];try{let e=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&l.push({prop:"constructor",target:Object.getPrototypeOf(async()=>{}),violationType:"async_function_constructor",strategy:"throw",reason:"AsyncFunction constructor allows arbitrary async code execution"})}catch{}try{let e=Object.getPrototypeOf(function*(){}).constructor;e&&e!==Function&&l.push({prop:"constructor",target:Object.getPrototypeOf(function*(){}),violationType:"generator_function_constructor",strategy:"throw",reason:"GeneratorFunction constructor allows arbitrary generator code execution"})}catch{}try{let e=Object.getPrototypeOf(async function*(){}).constructor;e&&e!==Function&&e!==Object.getPrototypeOf(async()=>{}).constructor&&l.push({prop:"constructor",target:Object.getPrototypeOf(async function*(){}),violationType:"async_generator_function_constructor",strategy:"throw",reason:"AsyncGeneratorFunction constructor allows arbitrary async generator code execution"})}catch{}return l.filter(e=>{try{return e.target[e.prop]!==void 0}catch{return!1}})}var f=typeof __BROWSER__<"u"&&__BROWSER__;function _(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,l=>{let e=Math.random()*16|0;return(l==="x"?e:e&3|8).toString(16)})}var x=null,m=null,S=null;if(!f)try{x=E.AsyncLocalStorage,m=I,S=m.Module??m.default??null}catch{}var C=`
|
|
3
|
+
|
|
4
|
+
This is a defense-in-depth measure and indicates a bug in just-bash. Please report this at security@vercel.com`,d=class extends Error{violation;constructor(e,t){super(e+C),this.violation=t,this.name="SecurityViolationError"}},u=!f&&x?new x:null,B=1e3;function M(l,e,...t){return u.run(l,()=>e(...t))}var A={enabled:!0,auditMode:!1,processLifetimeIntrinsicHardening:!1};function k(){return!f&&typeof m?.registerHooks=="function"}function T(l){let e=typeof l=="boolean"?{enabled:l}:l??{};if(e.enabled!==void 0&&e.enabled!==!0&&e.enabled!==!1&&e.enabled!=="auto")throw new RangeError('defenseInDepth.enabled must be true, false, or "auto"');let t={...A,...e},i=t.enabled==="auto"?"auto":t.enabled?"enabled":"disabled",s={...t,enabled:i!=="disabled",requested:i};return s.excludeViolationTypes&&(s.excludeViolationTypes=[...new Set(s.excludeViolationTypes)].sort()),s}function F(l,e){if(l.enabled!==e.enabled||l.auditMode!==e.auditMode||l.processLifetimeIntrinsicHardening!==e.processLifetimeIntrinsicHardening||l.onViolation!==e.onViolation)return!1;let t=l.excludeViolationTypes??[],i=e.excludeViolationTypes??[];return t.length===i.length&&t.every((s,o)=>s===i[o])}var D=class l{static instance=null;static importHooksRegistered=!1;static trustedExecutionDepth=new Map;config;refCount=0;patchFailures=[];activeExecutionIds=new Set;contextCache=new Map;originalDescriptors=[];temporaryIntrinsicDescriptors=[];violations=[];activationTime=0;totalActiveTimeMs=0;constructor(e){this.config=e}static getInstance(e){let t=T(e);if(!l.instance)l.instance=new l(t);else{let i=l.instance.config;if(!F(t,i))throw new Error("DefenseInDepthBox config conflict: all resolved defense options, including exclusions and the violation callback, must match across Bash instances. Call DefenseInDepthBox.resetInstance() between incompatible configurations.")}return l.instance}static resetInstance(){l.instance&&(l.instance.forceDeactivate(),l.instance=null),l.trustedExecutionDepth.clear()}static isInSandboxedContext(){return u?u?.getStore()?.sandboxActive===!0:!1}static getCurrentExecutionId(){if(u)return u?.getStore()?.executionId}static enterTrustedScope(e){let t=l.trustedExecutionDepth.get(e)??0;l.trustedExecutionDepth.set(e,t+1)}static leaveTrustedScope(e){let t=l.trustedExecutionDepth.get(e);if(t){if(t===1){l.trustedExecutionDepth.delete(e);return}l.trustedExecutionDepth.set(e,t-1)}}static isTrustedScopeActive(e){return e?(l.trustedExecutionDepth.get(e)??0)>0:!1}isExecutionIdActive(e){return this.activeExecutionIds.has(e)}getCachedContext(e){let t=this.contextCache.get(e);return t||(t={sandboxActive:!0,executionId:e},this.contextCache.set(e,t)),t}static bindCurrentContext(e){if(!u)return e;let t=u.getStore(),i=t?.sandboxActive===!0?t.executionId:void 0;if(!i)return e;let o=l.instance?.getCachedContext(i)??{sandboxActive:!0,executionId:i};return((...r)=>{let n=l.instance;if(!(n&&!n.isExecutionIdActive(i)&&(n.recordViolation("bound_callback_after_deactivate","bound callback","Bound callback blocked after originating execution was deactivated"),!n.config.auditMode)))return M(o,e,...r)})}isEnabled(){return this.getStatus().state==="enabled"}getStatus(){let e=k();return this.config.requested==="disabled"?{requested:"disabled",state:"disabled",level:"none",contextualDynamicImportProtection:e,processLifetimeIntrinsicHardening:this.config.processLifetimeIntrinsicHardening===!0,intrinsicProtection:this.config.processLifetimeIntrinsicHardening?"process-lifetime":"scoped-best-effort"}:!u||f?{requested:this.config.requested,state:"unsupported",level:"none",contextualDynamicImportProtection:!1,processLifetimeIntrinsicHardening:this.config.processLifetimeIntrinsicHardening===!0,intrinsicProtection:this.config.processLifetimeIntrinsicHardening?"process-lifetime":"scoped-best-effort",reason:"context-aware ESM loader hooks (node:module.registerHooks) are unavailable"}:{requested:this.config.requested,state:"enabled",level:this.config.auditMode?"none":e?"full":"best-effort",contextualDynamicImportProtection:e,processLifetimeIntrinsicHardening:this.config.processLifetimeIntrinsicHardening===!0,intrinsicProtection:this.config.processLifetimeIntrinsicHardening?"process-lifetime":"scoped-best-effort",reason:this.config.auditMode?"audit mode records violations but does not block them":e?void 0:"best-effort protection; context-aware ESM loader hooks are unavailable"}}updateConfig(e){if(this.refCount>0)throw new Error("DefenseInDepthBox configuration cannot change while protection is active");this.config=T({...this.config,...e})}activate(){if(!f&&this.config.enabled&&!u)throw new Error("DefenseInDepthBox: enabled protection requires node:async_hooks and node:module");if(f||!this.config.enabled){let i=_(),s=!1;return{run:o=>s?Promise.reject(new Error("DefenseInDepthBox handle is deactivated and cannot run new work")):o(),deactivate:()=>{s=!0},executionId:i}}if(this.refCount++,this.refCount===1){try{this.applyPatches()}catch(i){throw this.restorePatches(),this.activeExecutionIds.clear(),this.contextCache.clear(),this.refCount=0,i}this.activationTime=Date.now()}let e=_(),t=!1;return{run:i=>t?Promise.reject(new Error("DefenseInDepthBox handle is deactivated and cannot run new work")):(this.activeExecutionIds.add(e),u.run({sandboxActive:!0,executionId:e},i)),deactivate:()=>{t||(t=!0,this.activeExecutionIds.delete(e),this.contextCache.delete(e),this.refCount--,this.refCount===0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.refCount<0&&(this.refCount=0))},executionId:e}}forceDeactivate(){this.refCount>0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.activeExecutionIds.clear(),this.contextCache.clear(),this.refCount=0}isActive(){return this.refCount>0}getStats(){return{violationsBlocked:this.violations.length,violations:[...this.violations],activeTimeMs:this.totalActiveTimeMs+(this.refCount>0?Date.now()-this.activationTime:0),refCount:this.refCount}}getPatchFailures(){return[...this.patchFailures]}clearViolations(){this.violations=[]}getPathForTarget(e,t){return e===globalThis?`globalThis.${t}`:e===process?`process.${t}`:e===Error?`Error.${t}`:e===Function.prototype?`Function.prototype.${t}`:e===Object.prototype?`Object.prototype.${t}`:`<object>.${t}`}static runTrusted(e){if(!u)return e();let t=u.getStore();if(!t)return e();let{executionId:i}=t;return u.run({...t,trusted:!0},()=>{l.enterTrustedScope(i);try{let s=e();return typeof s=="object"&&s!==null&&"finally"in s&&typeof s.finally=="function"?s.finally(()=>{l.leaveTrustedScope(i)}):(l.leaveTrustedScope(i),s)}catch(s){throw l.leaveTrustedScope(i),s}})}static async runTrustedAsync(e){if(!u)return e();let t=u.getStore();if(!t)return e();let{executionId:i}=t;return u.run({...t,trusted:!0},async()=>{l.enterTrustedScope(i);try{return await e()}finally{l.leaveTrustedScope(i)}})}shouldBlock(){if(f||this.config.auditMode||!u)return!1;let e=u?.getStore();return!(e?.sandboxActive!==!0||e.trusted||l.isTrustedScopeActive(e.executionId))}shouldAudit(){if(!this.config.auditMode||!u)return!1;let e=u.getStore();return e?.sandboxActive===!0&&e.trusted!==!0&&!l.isTrustedScopeActive(e.executionId)}recordViolation(e,t,i){let s={timestamp:Date.now(),type:e,message:i,path:t,stack:new Error().stack,executionId:u?.getStore()?.executionId};if(this.violations.length<B&&this.violations.push(s),this.config.onViolation)try{this.config.onViolation(s)}catch(o){console.debug("[DefenseInDepthBox] onViolation callback threw:",o instanceof Error?o.message:o)}return s}createBlockingProxy(e,t,i){let s=this;return new Proxy(e,{apply(o,r,n){if(s.shouldBlock()){let c=`${t} is blocked during script execution`,a=s.recordViolation(i,t,c);throw new d(c,a)}return s.shouldAudit()&&s.recordViolation(i,t,`${t} called (audit mode)`),Reflect.apply(o,r,n)},construct(o,r,n){if(s.shouldBlock()){let c=`${t} constructor is blocked during script execution`,a=s.recordViolation(i,t,c);throw new d(c,a)}return s.shouldAudit()&&s.recordViolation(i,t,`${t} constructor called (audit mode)`),Reflect.construct(o,r,n)}})}createBlockingObjectProxy(e,t,i,s){let o=this;return new Proxy(e,{get(r,n,c){if(o.shouldBlock()){if(s&&typeof n=="string"&&s.has(n))return Reflect.get(r,n,c);let a=`${t}.${String(n)}`,p=`${a} is blocked during script execution`,h=o.recordViolation(i,a,p);throw new d(p,h)}if(o.shouldAudit()){let a=`${t}.${String(n)}`;o.recordViolation(i,a,`${a} accessed (audit mode)`)}return Reflect.get(r,n,c)},set(r,n,c,a){if(o.shouldBlock()){let p=`${t}.${String(n)}`,h=`${p} modification is blocked during script execution`,g=o.recordViolation(i,p,h);throw new d(h,g)}return t==="process.env"&&n==="DEBUG"?Reflect.set(r,n,c):Reflect.set(r,n,c,a)},ownKeys(r){if(o.shouldBlock()){let n=`${t} enumeration is blocked during script execution`,c=o.recordViolation(i,t,n);throw new d(n,c)}return Reflect.ownKeys(r)},getOwnPropertyDescriptor(r,n){if(o.shouldBlock()){let c=`${t}.${String(n)}`,a=`${c} descriptor access is blocked during script execution`,p=o.recordViolation(i,c,a);throw new d(a,p)}return Reflect.getOwnPropertyDescriptor(r,n)},has(r,n){if(o.shouldBlock()){let c=`${t}.${String(n)}`,a=`${c} existence check is blocked during script execution`,p=o.recordViolation(i,c,a);throw new d(a,p)}return Reflect.has(r,n)},deleteProperty(r,n){if(o.shouldBlock()){let c=`${t}.${String(n)}`,a=`${c} deletion is blocked during script execution`,p=o.recordViolation(i,c,a);throw new d(a,p)}return Reflect.deleteProperty(r,n)},setPrototypeOf(r,n){if(o.shouldBlock()){let c=`${t} setPrototypeOf is blocked during script execution`,a=o.recordViolation(i,t,c);throw new d(c,a)}return Reflect.setPrototypeOf(r,n)},defineProperty(r,n,c){if(o.shouldBlock()){let a=`${t}.${String(n)}`,p=`${a} defineProperty is blocked during script execution`,h=o.recordViolation(i,a,p);throw new d(p,h)}return Reflect.defineProperty(r,n,c)}})}createReadonlyObjectProxy(e,t,i){let s=this,o=r=>{let n=`${t} ${r} is blocked during script execution`,c=s.recordViolation(i,t,n);throw new d(n,c)};return new Proxy(e,{set(r,n,c,a){return s.shouldBlock()&&o("modification"),Reflect.set(r,n,c,a)},defineProperty(r,n,c){return s.shouldBlock()&&o("defineProperty"),Reflect.defineProperty(r,n,c)},deleteProperty(r,n){return s.shouldBlock()&&o("deletion"),Reflect.deleteProperty(r,n)},setPrototypeOf(r,n){return s.shouldBlock()&&o("setPrototypeOf"),Reflect.setPrototypeOf(r,n)},preventExtensions(r){return s.shouldBlock()&&o("preventExtensions"),Reflect.preventExtensions(r)}})}applyPatches(){this.patchFailures=[];let e=P(),t=new Set(["process_send","process_channel","process_stdout","process_stderr"]),i=[];for(let r of e)if(!t.has(r.violationType)){if(r.strategy==="freeze"){i.push(r);continue}this.applyPatch(r)}this.protectConstructorChain(),this.protectErrorPrepareStackTrace(),this.protectPromiseThen(),k()&&this.protectDynamicImport(),this.protectModuleLoad(),this.protectModuleResolveFilename(),this.protectProcessMainModule(),this.protectProcessExecPath(),this.protectProxyRevocable();let s=["Function.prototype.constructor","Module._load","Module._resolveFilename"],o=this.patchFailures.filter(r=>s.includes(r));if(o.length>0)throw this.restorePatches(),new Error(`DefenseInDepthBox: critical patches failed: ${o.join(", ")}`);this.config.processLifetimeIntrinsicHardening||this.protectReversibleIntrinsics(i);for(let r of i)this.applyPatch(r,this.config.processLifetimeIntrinsicHardening===!0);this.config.processLifetimeIntrinsicHardening&&this.lockWellKnownSymbols()}protectReversibleIntrinsics(e){let t=new Set,i=(r,n)=>{let c=Object.getOwnPropertyDescriptor(r,n);!c||!("value"in c)||c.writable!==!0||c.configurable!==!0||(this.temporaryIntrinsicDescriptors.push({target:r,prop:n,descriptor:c}),Object.defineProperty(r,n,{...c,writable:!1}))};for(let{target:r,prop:n}of e){let c=r[n];if(!(typeof c!="object"||c===null)){t.add(c);for(let a of Reflect.ownKeys(c))i(c,a)}}let s=[];for(let r of[Array,Map,Set,RegExp,Promise])s.push([r,Symbol.species]);for(let r of[Array.prototype,String.prototype,Map.prototype,Set.prototype])s.push([r,Symbol.iterator]);s.push([Symbol.prototype,Symbol.toPrimitive],[Date.prototype,Symbol.toPrimitive],[Function.prototype,Symbol.hasInstance],[Array.prototype,Symbol.unscopables]);for(let r of[Symbol.match,Symbol.matchAll,Symbol.replace,Symbol.search,Symbol.split])s.push([RegExp.prototype,r]);for(let r of[Map.prototype,Set.prototype,Promise.prototype,ArrayBuffer.prototype])s.push([r,Symbol.toStringTag]);for(let[r,n]of s)t.add(r),i(r,n);let o=(r,n,c)=>{let a=Object.getOwnPropertyDescriptor(r,n);if(!a||!("value"in a)||typeof a.value!="function"||a.configurable!==!0)return;let p=a.value,h=this,g=function(...y){let b=y[0];if(h.shouldBlock()&&typeof b=="object"&&b!==null&&t.has(b)){let v=`${c}.${n}`,w=`${v} is blocked for protected intrinsics during script execution`,O=h.recordViolation("prototype_mutation",v,w);throw new d(w,O)}return Reflect.apply(p,this,y)};this.temporaryIntrinsicDescriptors.push({target:r,prop:n,descriptor:a}),Object.defineProperty(r,n,{...a,value:g,writable:!1})};for(let r of["assign","defineProperties","defineProperty","freeze","preventExtensions","seal","setPrototypeOf"])o(Object,r,"Object");for(let r of["defineProperty","deleteProperty","preventExtensions","set","setPrototypeOf"])o(Reflect,r,"Reflect")}protectConstructorChain(){this.patchPrototypeConstructor(Function.prototype,"Function.prototype.constructor","function_constructor");try{let e=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,"AsyncFunction.prototype.constructor","async_function_constructor")}catch(e){this.patchFailures.push("AsyncFunction.prototype.constructor"),console.debug("[DefenseInDepthBox] Could not patch AsyncFunction.prototype.constructor:",e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(function*(){}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,"GeneratorFunction.prototype.constructor","generator_function_constructor")}catch(e){this.patchFailures.push("GeneratorFunction.prototype.constructor"),console.debug("[DefenseInDepthBox] Could not patch GeneratorFunction.prototype.constructor:",e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(async function*(){}).constructor,t=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&e!==t&&this.patchPrototypeConstructor(e.prototype,"AsyncGeneratorFunction.prototype.constructor","async_generator_function_constructor")}catch(e){this.patchFailures.push("AsyncGeneratorFunction.prototype.constructor"),console.debug("[DefenseInDepthBox] Could not patch AsyncGeneratorFunction.prototype.constructor:",e instanceof Error?e.message:e)}}protectErrorPrepareStackTrace(){let e=this;try{let t=Object.getOwnPropertyDescriptor(Error,"prepareStackTrace");this.originalDescriptors.push({target:Error,prop:"prepareStackTrace",descriptor:t});let i=t?.value;Object.defineProperty(Error,"prepareStackTrace",{get(){return i},set(s){if(e.shouldBlock()){let o="Error.prepareStackTrace modification is blocked during script execution",r=e.recordViolation("error_prepare_stack_trace","Error.prepareStackTrace",o);throw new d(o,r)}e.shouldAudit()&&e.recordViolation("error_prepare_stack_trace","Error.prepareStackTrace","Error.prepareStackTrace set (audit mode)"),i=s},configurable:!0})}catch(t){this.patchFailures.push("Error.prepareStackTrace"),console.debug("[DefenseInDepthBox] Could not protect Error.prepareStackTrace:",t instanceof Error?t.message:t)}}protectPromiseThen(){let e=this;try{let o=function(...r){return u.run(this.captured,()=>{if(!this.box.isExecutionIdActive(this.executionId)){if(this.box.recordViolation("promise_then_after_deactivate","Promise.then","Promise.then callback is blocked after defense deactivation"),this.box.config.auditMode)return Reflect.apply(this.cb,void 0,r);if(this.kind==="fulfilled")return r[0];throw r[0]}return Reflect.apply(this.cb,void 0,r)})};var t=o;let i=Object.getOwnPropertyDescriptor(Promise.prototype,"then");this.originalDescriptors.push({target:Promise.prototype,prop:"then",descriptor:i});let s=i?.value;if(typeof s!="function")return;Object.defineProperty(Promise.prototype,"then",{value:function(n,c){if(!u)return Reflect.apply(s,this,[n,c]);let a=u.getStore(),p=a?.sandboxActive===!0&&a.trusted!==!0?a.executionId:void 0;if(!p)return Reflect.apply(s,this,[n,c]);let h=e.getCachedContext(p),g=(y,b)=>typeof y!="function"?y:o.bind({box:e,executionId:p,captured:h,cb:y,kind:b});return Reflect.apply(s,this,[g(n,"fulfilled"),g(c,"rejected")])},writable:!0,configurable:!0})}catch(i){this.patchFailures.push("Promise.prototype.then"),console.debug("[DefenseInDepthBox] Could not protect Promise.prototype.then:",i instanceof Error?i.message:i)}}patchPrototypeConstructor(e,t,i){let s=this;try{let o=Object.getOwnPropertyDescriptor(e,"constructor");this.originalDescriptors.push({target:e,prop:"constructor",descriptor:o});let r=o?.value;Object.defineProperty(e,"constructor",{get(){if(s.shouldBlock()){let n=`${t} access is blocked during script execution`,c=s.recordViolation(i,t,n);throw new d(n,c)}return s.shouldAudit()&&s.recordViolation(i,t,`${t} accessed (audit mode)`),r},set(n){if(s.shouldBlock()){let c=`${t} modification is blocked during script execution`,a=s.recordViolation(i,t,c);throw new d(c,a)}Object.defineProperty(this,"constructor",{value:n,writable:!0,configurable:!0})},configurable:!0})}catch(o){this.patchFailures.push(t),console.debug(`[DefenseInDepthBox] Could not patch ${t}:`,o instanceof Error?o.message:o)}}protectProcessMainModule(){if(typeof process>"u")return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,"mainModule");this.originalDescriptors.push({target:process,prop:"mainModule",descriptor:t});let i=t?.value;i!==void 0&&Object.defineProperty(process,"mainModule",{get(){if(e.shouldBlock()){let s="process.mainModule access is blocked during script execution",o=e.recordViolation("process_main_module","process.mainModule",s);throw new d(s,o)}return e.shouldAudit()&&e.recordViolation("process_main_module","process.mainModule","process.mainModule accessed (audit mode)"),i},set(s){if(e.shouldBlock()){let o="process.mainModule modification is blocked during script execution",r=e.recordViolation("process_main_module","process.mainModule",o);throw new d(o,r)}Object.defineProperty(process,"mainModule",{value:s,writable:!0,configurable:!0})},configurable:!0})}catch(t){this.patchFailures.push("process.mainModule"),console.debug("[DefenseInDepthBox] Could not protect process.mainModule:",t instanceof Error?t.message:t)}}protectProcessExecPath(){if(typeof process>"u")return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,"execPath");this.originalDescriptors.push({target:process,prop:"execPath",descriptor:t});let i=t?.value??process.execPath;Object.defineProperty(process,"execPath",{get(){if(e.shouldBlock()){let s="process.execPath access is blocked during script execution",o=e.recordViolation("process_exec_path","process.execPath",s);throw new d(s,o)}return e.shouldAudit()&&e.recordViolation("process_exec_path","process.execPath","process.execPath accessed (audit mode)"),i},set(s){if(e.shouldBlock()){let o="process.execPath modification is blocked during script execution",r=e.recordViolation("process_exec_path","process.execPath",o);throw new d(o,r)}Object.defineProperty(process,"execPath",{value:s,writable:!0,configurable:!0})},configurable:!0})}catch(t){this.patchFailures.push("process.execPath"),console.debug("[DefenseInDepthBox] Could not protect process.execPath:",t instanceof Error?t.message:t)}}lockWellKnownSymbols(){let e=(t,i)=>{try{let s=Object.getOwnPropertyDescriptor(t,i);if(s?.configurable){if("value"in s){Object.defineProperty(t,i,{...s,configurable:!1,writable:!1});return}Object.defineProperty(t,i,{...s,configurable:!1})}}catch{}};for(let t of[Array,Map,Set,RegExp,Promise])e(t,Symbol.species);for(let t of[Array.prototype,String.prototype,Map.prototype,Set.prototype])e(t,Symbol.iterator);e(Symbol.prototype,Symbol.toPrimitive),e(Date.prototype,Symbol.toPrimitive);for(let t of[Symbol.match,Symbol.matchAll,Symbol.replace,Symbol.search,Symbol.split])e(RegExp.prototype,t);e(Function.prototype,Symbol.hasInstance),e(Array.prototype,Symbol.unscopables);for(let t of[Map.prototype,Set.prototype,Promise.prototype,ArrayBuffer.prototype])e(t,Symbol.toStringTag)}protectProxyRevocable(){let e=this;try{let t=Proxy.revocable;if(typeof t!="function")return;let i=Object.getOwnPropertyDescriptor(Proxy,"revocable");this.originalDescriptors.push({target:Proxy,prop:"revocable",descriptor:i}),Object.defineProperty(Proxy,"revocable",{value:function(o,r){if(e.shouldBlock()){let n="Proxy.revocable is blocked during script execution",c=e.recordViolation("proxy","Proxy.revocable",n);throw new d(n,c)}return e.shouldAudit()&&e.recordViolation("proxy","Proxy.revocable","Proxy.revocable called (audit mode)"),t(o,r)},writable:!1,configurable:!0})}catch(t){this.patchFailures.push("Proxy.revocable"),console.debug("[DefenseInDepthBox] Could not protect Proxy.revocable:",t instanceof Error?t.message:t)}}protectDynamicImport(){if(!(f||l.importHooksRegistered))try{let e=m;if(!e)throw new Error("node:module is unavailable");let t=new Set;for(let o of e.builtinModules??[]){let r=o.startsWith("node:")?o.slice(5):o;t.add(r);let n=r.indexOf("/");n>0&&t.add(r.slice(0,n))}let i=o=>{if(o.startsWith("./")||o.startsWith("../")||o.startsWith("/")||o.startsWith("file:")||o.startsWith("data:")||o.startsWith("blob:")||o.startsWith("http:")||o.startsWith("https:"))return!1;let r=o.startsWith("node:")?o.slice(5):o;if(!r)return!1;if(typeof e.isBuiltin=="function"&&e.isBuiltin(r)||t.has(r))return!0;let n=r.indexOf("/");return n>0&&t.has(r.slice(0,n))},s=o=>{let r=u?.getStore();return o.config.auditMode===!0&&r?.sandboxActive===!0&&r.trusted!==!0&&!l.isTrustedScopeActive(r.executionId)};if(typeof e.registerHooks=="function"){e.registerHooks({resolve(o,r,n){let c=l.instance;if(!c)return n(o,r);if((o.startsWith("data:")||o.startsWith("blob:"))&&c.shouldBlock()){let a=`import(${o.startsWith("data:")?"data:":"blob:"})`,p=`dynamic import of ${o.startsWith("data:")?"data:":"blob:"} URLs is blocked by defense-in-depth`,h=c.recordViolation("dynamic_import_builtin",a,p);throw new d(p,h)}if(i(o)){let a=`import(${o})`,p=`dynamic import of Node.js builtin '${o}' is blocked during script execution`;if(c.shouldBlock()){let h=c.recordViolation("dynamic_import_builtin",a,p);throw new d(p,h)}s(c)&&c.recordViolation("dynamic_import_builtin",a,`dynamic import of Node.js builtin '${o}' called (audit mode)`)}return n(o,r)}}),l.importHooksRegistered=!0;return}throw new Error("context-aware ESM loader hooks (node:module.registerHooks) are unavailable")}catch(e){throw new Error(`DefenseInDepthBox: could not register dynamic-import hooks: ${e instanceof Error?e.message:String(e)}`,{cause:e})}}protectModuleLoad(){this.protectModuleMethod("_load","module_load")}protectModuleResolveFilename(){this.protectModuleMethod("_resolveFilename","module_resolve_filename")}protectModuleMethod(e,t){if(f)return;let i=`Module.${e}`;try{let s=S,o=s?.[e];if(!s||typeof o!="function")throw new Error("node:module Module class or method is unavailable");let r=Object.getOwnPropertyDescriptor(s,e);if(!r)throw new Error("method has no own property descriptor");if(r.configurable===!1&&r.writable===!1)throw new Error("method is non-configurable and non-writable");let n=this.createBlockingProxy(o,i,t);this.originalDescriptors.push({target:s,prop:e,descriptor:r}),Object.defineProperty(s,e,{...r,value:n});let c=Object.getOwnPropertyDescriptor(s,e);if(s[e]!==n||c?.value!==n)throw new Error("installed patch failed verification")}catch{this.patchFailures.push(i)}}applyPatch(e,t=!1){let{target:i,prop:s,violationType:o,strategy:r}=e;try{let n=i[s];if(n===void 0)return;let c=Object.getOwnPropertyDescriptor(i,s);if(this.originalDescriptors.push({target:i,prop:s,descriptor:c}),r==="freeze"){if(typeof n=="object"&&n!==null){t&&Object.freeze(n);let a=this.getPathForTarget(i,s),p=this.createReadonlyObjectProxy(n,a,o);Object.defineProperty(i,s,{...c,value:p})}}else{let a=this.getPathForTarget(i,s),p=typeof n=="function"?this.createBlockingProxy(n,a,o):this.createBlockingObjectProxy(n,a,o,e.allowedKeys);Object.defineProperty(i,s,{value:p,writable:!0,configurable:!0})}}catch(n){let c=this.getPathForTarget(i,s);this.patchFailures.push(c),console.debug(`[DefenseInDepthBox] Could not patch ${c}:`,n instanceof Error?n.message:n)}}restorePatches(){for(let e=this.temporaryIntrinsicDescriptors.length-1;e>=0;e--){let{target:t,prop:i,descriptor:s}=this.temporaryIntrinsicDescriptors[e];try{Object.defineProperty(t,i,s)}catch(o){console.debug(`[DefenseInDepthBox] Could not restore temporary intrinsic ${String(i)}:`,o instanceof Error?o.message:o)}}this.temporaryIntrinsicDescriptors=[];for(let e=this.originalDescriptors.length-1;e>=0;e--){let{target:t,prop:i,descriptor:s}=this.originalDescriptors[e];try{s?Object.defineProperty(t,i,s):delete t[i]}catch(o){let r=this.getPathForTarget(t,i);console.debug(`[DefenseInDepthBox] Could not restore ${r}:`,o instanceof Error?o.message:o)}}this.originalDescriptors=[]}};export{d as a,D as b};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{l as g}from"./chunk-EFORKKSH.js";import{a as f}from"./chunk-GN6CQ3J4.js";function O(n,e,u,r={}){let t=new Date(e*1e3),a=M(t,u),c="",s=0,o=0,i=0,y=new Map,h=d=>{let m=f(d);if(r.maxOutputBytes!==void 0&&m>r.maxOutputBytes-s)throw new g(`strftime: output size limit exceeded (${r.maxOutputBytes} bytes)`,"output_size");c+=d,s+=m};for(;o<n.length;){if(i++,r.maxOperations!==void 0&&i>r.maxOperations)throw new g(`strftime: iteration limit exceeded (${r.maxOperations})`,"iterations");if(n[o]==="%"&&o+1<n.length){let d=n[o+1],m;y.has(d)?m=y.get(d)??null:(m=w(t,a,d,u),y.set(d,m)),m!==null?(h(m),o+=2):(h(n[o]),o++)}else h(n[o]),o++}return c}function M(n,e){let u={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",hour12:!1,timeZone:e};try{let t=new Intl.DateTimeFormat("en-US",u).formatToParts(n),a=i=>t.find(y=>y.type===i)?.value??"",c=new Map([["Sun",0],["Mon",1],["Tue",2],["Wed",3],["Thu",4],["Fri",5],["Sat",6]]),s=a("weekday"),o=(i,y)=>{let h=Number.parseInt(i,10);return Number.isNaN(h)?y:h};return{year:o(a("year"),n.getFullYear()),month:o(a("month"),n.getMonth()+1),day:o(a("day"),n.getDate()),hour:o(a("hour"),n.getHours())%24,minute:o(a("minute"),n.getMinutes()),second:o(a("second"),n.getSeconds()),weekday:c.get(s)??n.getDay()}}catch{return{year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate(),hour:n.getHours(),minute:n.getMinutes(),second:n.getSeconds(),weekday:n.getDay()}}}function w(n,e,u,r){let t=(o,i=2)=>String(o).padStart(i,"0"),a=$(e.year,e.month,e.day),c=l(e.year,e.month,e.day,e.weekday,0),s=l(e.year,e.month,e.day,e.weekday,1);switch(u){case"a":return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][e.weekday];case"A":return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.weekday];case"b":case"h":return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.month-1];case"B":return["January","February","March","April","May","June","July","August","September","October","November","December"][e.month-1];case"c":return`${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][e.weekday]} ${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.month-1]} ${String(e.day).padStart(2," ")} ${t(e.hour)}:${t(e.minute)}:${t(e.second)} ${e.year}`;case"C":return t(Math.floor(e.year/100));case"d":return t(e.day);case"D":return`${t(e.month)}/${t(e.day)}/${t(e.year%100)}`;case"e":return String(e.day).padStart(2," ");case"F":return`${e.year}-${t(e.month)}-${t(e.day)}`;case"g":return t(S(e.year,e.month,e.day)%100);case"G":return String(S(e.year,e.month,e.day));case"H":return t(e.hour);case"I":return t(e.hour%12||12);case"j":return String(a).padStart(3,"0");case"k":return String(e.hour).padStart(2," ");case"l":return String(e.hour%12||12).padStart(2," ");case"m":return t(e.month);case"M":return t(e.minute);case"n":return`
|
|
3
|
+
`;case"N":return"000000000";case"p":return e.hour<12?"AM":"PM";case"P":return e.hour<12?"am":"pm";case"r":return`${t(e.hour%12||12)}:${t(e.minute)}:${t(e.second)} ${e.hour<12?"AM":"PM"}`;case"R":return`${t(e.hour)}:${t(e.minute)}`;case"s":return String(Math.floor(n.getTime()/1e3));case"S":return t(e.second);case"t":return" ";case"T":return`${t(e.hour)}:${t(e.minute)}:${t(e.second)}`;case"u":return String(e.weekday===0?7:e.weekday);case"U":return t(c);case"V":return t(k(e.year,e.month,e.day));case"w":return String(e.weekday);case"W":return t(s);case"x":return`${t(e.month)}/${t(e.day)}/${t(e.year%100)}`;case"X":return`${t(e.hour)}:${t(e.minute)}:${t(e.second)}`;case"y":return t(e.year%100);case"Y":return String(e.year);case"z":return D(n,r);case"Z":return T(n,r);case"%":return"%";default:return null}}function D(n,e){if(!e){let c=-n.getTimezoneOffset(),s=c>=0?"+":"-",o=Math.floor(Math.abs(c)/60),i=Math.abs(c)%60;return`${s}${String(o).padStart(2,"0")}${String(i).padStart(2,"0")}`}try{let o=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).formatToParts(n).find(i=>i.type==="timeZoneName");if(o){let i=o.value.match(/GMT([+-])(\d{2}):(\d{2})/);if(i)return`${i[1]}${i[2]}${i[3]}`;if(o.value==="GMT"||o.value==="UTC")return"+0000"}}catch{}let u=-n.getTimezoneOffset(),r=u>=0?"+":"-",t=Math.floor(Math.abs(u)/60),a=Math.abs(u)%60;return`${r}${String(t).padStart(2,"0")}${String(a).padStart(2,"0")}`}function T(n,e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"short"}).formatToParts(n).find(a=>a.type==="timeZoneName")?.value??"UTC"}catch{return"UTC"}}function $(n,e,u){let r=[31,28,31,30,31,30,31,31,30,31,30,31];(n%4===0&&n%100!==0||n%400===0)&&(r[1]=29);let a=u;for(let c=0;c<e-1;c++)a+=r[c];return a}function l(n,e,u,r,t){let a=$(n,e,u),c=new Date(n,0,1).getDay(),s=1+(7+t-c)%7,o=a-s;return o<0?0:Math.floor(o/7)+1}function k(n,e,u){let r=new Date(n,e-1,u,12,0,0);r.setDate(r.getDate()+3-(r.getDay()+6)%7);let t=new Date(r.getFullYear(),0,4);t.setDate(t.getDate()+3-(t.getDay()+6)%7);let a=r.getTime()-t.getTime();return 1+Math.round(a/(10080*60*1e3))}function S(n,e,u){let r=new Date(n,e-1,u,12,0,0);return r.setDate(r.getDate()+3-(r.getDay()+6)%7),r.getFullYear()}export{O as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{c as l,d as u}from"./chunk-K3XJ2WT4.js";import{randomBytes as h}from"node:crypto";var d=class{options;protocolToken=h(16).toString("hex");deadline;cleanups=[];cancelHandler;canceledReason;closed=!1;constructor(t){this.options=t,this.deadline=Date.now()+t.timeoutMs}arm(t){if(this.cancelHandler)throw new Error("worker request is already armed");this.cancelHandler=t;let a=this.options.signal;if(a){let i=()=>this.cancel("abort");a.addEventListener("abort",i,{once:!0}),this.cleanups.push(()=>a.removeEventListener("abort",i)),a.aborted&&this.cancel("abort")}if(!this.canceledReason){let i=l(()=>this.cancel("timeout"),Math.max(0,this.options.timeoutMs));i!==void 0&&this.cleanups.push(()=>u(i))}}get isCanceled(){return this.canceledReason!==void 0}remainingTimeMs(){return Math.max(0,this.deadline-Date.now())}timeoutMessage(t="Execution"){return`${t} timeout: exceeded ${this.options.timeoutMs}ms limit`}abortMessage(){return"Execution aborted"}assertMessageSize(t,a){if(f(t,this.options.maxMessageBytes)>this.options.maxMessageBytes)throw new Error(`${this.options.commandName}: worker ${a} exceeds ${this.options.maxMessageBytes} byte limit`)}async terminate(t){if(!t)return!0;try{return await t.terminate(),!0}catch{return!1}}close(){if(!this.closed){this.closed=!0;for(let t=this.cleanups.length-1;t>=0;t--)this.cleanups[t]();this.cleanups.length=0,this.cancelHandler=void 0}}cancel(t){this.closed||this.canceledReason||(this.canceledReason=t,this.cancelHandler?.(t))}};function f(o,t){let a=function*(n){for(let e in n)Object.hasOwn(n,e)&&(yield[e,n[e]])},i=[{kind:"value",value:o}],c=new WeakSet,s=0;for(;i.length>0&&s<=t;){let n=i.pop();if(!n)break;if(n.kind==="array"){n.index<n.value.length&&(i.push({...n,index:n.index+1}),i.push({kind:"value",value:n.value[n.index]}));continue}if(n.kind==="object"){let r=n.iterator.next();r.done||(s+=8+Buffer.byteLength(r.value[0],"utf8"),i.push(n),i.push({kind:"value",value:r.value[1]}));continue}let e=n.value;if(e==null)s+=4;else if(typeof e=="string")s+=Buffer.byteLength(e,"utf8");else if(typeof e=="number"||typeof e=="bigint")s+=8;else if(typeof e=="boolean")s+=1;else if(typeof e=="object"){if(c.has(e))continue;if(c.add(e),ArrayBuffer.isView(e))s+=e.byteLength;else if(e instanceof ArrayBuffer||e instanceof SharedArrayBuffer)s+=e.byteLength;else if(Array.isArray(e)){if(e.length>Math.floor((t-s)/8))return t+1;s+=e.length*8,i.push({kind:"array",value:e,index:0})}else i.push({kind:"object",iterator:a(e)})}}return s}export{d as a};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{d as a}from"./chunk-GN6CQ3J4.js";import{a as c}from"./chunk-QIQMJJZ4.js";import{a as u,b as p}from"./chunk-QAYAQNCG.js";import*as g from"diff";var b={name:"diff",summary:"compare files line by line",usage:"diff [OPTION]... FILE1 FILE2",options:["-u, --unified output unified diff format (default)","-q, --brief report only whether files differ","-s, --report-identical-files report when files are the same","-i, --ignore-case ignore case differences"," --help display this help and exit"]},C={unified:{short:"u",long:"unified",type:"boolean"},brief:{short:"q",long:"brief",type:"boolean"},reportSame:{short:"s",long:"report-identical-files",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},L={name:"diff",async execute(d,e){if(p(d))return u(b);let t=c("diff",d,C);if(!t.ok)return t.error;let m=t.result.flags.brief,h=t.result.flags.reportSame,y=t.result.flags.ignoreCase,l=t.result.positional;if(t.result.flags.unified,l.length<2)return{stdout:"",stderr:`diff: missing operand
|
|
3
|
+
`,exitCode:2};let i,s,[r,o]=l;try{i=r==="-"?a(e.stdin):await e.fs.readFile(e.fs.resolvePath(e.cwd,r))}catch{return{stdout:"",stderr:`diff: ${r}: No such file or directory
|
|
4
|
+
`,exitCode:2}}try{s=o==="-"?a(e.stdin):await e.fs.readFile(e.fs.resolvePath(e.cwd,o))}catch{return{stdout:"",stderr:`diff: ${o}: No such file or directory
|
|
5
|
+
`,exitCode:2}}let f=i,n=s;return y&&(f=f.toLowerCase(),n=n.toLowerCase()),f===n?h?{stdout:`Files ${r} and ${o} are identical
|
|
6
|
+
`,stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0}:m?{stdout:`Files ${r} and ${o} differ
|
|
7
|
+
`,stderr:"",exitCode:1}:{stdout:g.createTwoFilesPatch(r,o,i,s,"","",{context:3}),stderr:"",exitCode:1}}},P={name:"diff",flags:[{flag:"-u",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-i",type:"boolean"}],needsArgs:!0,minArgs:2};export{L as a,P as b};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as P,b as j,c as U,d as W}from"./chunk-65Z4QURM.js";import{d as D}from"./chunk-FIMO5HLX.js";import{a as A,b as H}from"./chunk-AI5LSBJC.js";import{b as _}from"./chunk-CHHWTPDH.js";import{a as F}from"./chunk-UBTKJ6MG.js";import{l as y}from"./chunk-EFORKKSH.js";import{a as M,d as z}from"./chunk-GN6CQ3J4.js";import{a as J}from"./chunk-FOCWZZDE.js";import{a as R,b as V,c as I}from"./chunk-QAYAQNCG.js";function G(n){switch(n){case"\b":return"\\b";case"\f":return"\\f";case`
|
|
3
|
+
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return`\\u${n.charCodeAt(0).toString(16).padStart(4,"0")}`}}function Y(n){let s="",d=!1,f=!1;for(let t=0;t<n.length;t++){let l=n[t];if(f){s+=l,f=!1;continue}if(l==="\\"){s+=l,f=!0;continue}if(l==='"'){s+=l,d=!d;continue}if(d&&l.charCodeAt(0)<=31){s+=G(l);continue}s+=l}return s}function L(n,s,d){return JSON.parse(Y(n.slice(s,d)))}function K(n,s){let d=[],f=g=>{if(d.length>=s.maxElements)throw new y(`query result element limit exceeded (${s.maxElements})`,"array_elements");d.push(g)},t=0,l=n.length;for(;t<l;){for(;t<l&&/\s/.test(n[t]);)t++;if(t>=l)break;let g=t,c=n[t];if(c==="{"||c==="["){let a=[c==="{"?"}":"]"],p=!1,w=!1;for(t++;t<l&&a.length>0;){let h=n[t];if(w)w=!1;else if(h==="\\")w=!0;else if(h==='"')p=!p;else if(!p){if(h==="{"||h==="["){if(a.push(h==="{"?"}":"]"),a.length>s.maxDepth)throw new y(`query depth limit exceeded (${s.maxDepth})`,"recursion")}else if((h==="}"||h==="]")&&a.pop()!==h)throw new Error(`Mismatched JSON delimiter at position ${t}`)}t++}if(a.length!==0)throw new Error(`Unexpected end of JSON input at position ${t} (unclosed ${c})`);f(D(L(n,g,t),{maxDepth:s.maxDepth,maxElements:s.maxElements}))}else if(c==='"'){let a=!1;for(t++;t<l;){let p=n[t];if(a)a=!1;else if(p==="\\")a=!0;else if(p==='"'){t++;break}t++}f(D(L(n,g,t),s))}else if(c==="-"||c>="0"&&c<="9"){for(;t<l&&/[\d.eE+-]/.test(n[t]);)t++;f(D(L(n,g,t),s))}else if(n.slice(t,t+4)==="true")f(!0),t+=4;else if(n.slice(t,t+5)==="false")f(!1),t+=5;else if(n.slice(t,t+4)==="null")f(null),t+=4;else{let a=n.slice(t,t+10);throw new Error(`Invalid JSON at position ${g}: unexpected '${a.split(/\s/)[0]}'`)}}return d}var Z={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE...]",options:["-R, --raw-input read each line as string instead of JSON","-r, --raw-output output strings without quotes","-c, --compact-output compact instead of pretty-printed output","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --help display this help and exit"]},pe={name:"jq",async execute(n,s){A(s.requireDefenseContext,"jq","execution entry");let d=(r,e)=>H(s.requireDefenseContext,"jq",r,e);if(V(n))return R(Z);let f=!1,t=!1,l=!1,g=!1,c=!1,a=!1,p=!1,w=!1,h=!1,Q=".",T=!1,E=[];for(let r=0;r<n.length;r++){let e=n[r];if(e==="-R"||e==="--raw-input")t=!0;else if(e==="-r"||e==="--raw-output")f=!0;else if(e==="-c"||e==="--compact-output")l=!0;else if(e==="-e"||e==="--exit-status")g=!0;else if(e==="-s"||e==="--slurp")c=!0;else if(e==="-n"||e==="--null-input")a=!0;else if(e==="-j"||e==="--join-output")p=!0;else if(!(e==="-a"||e==="--ascii")){if(e==="-S"||e==="--sort-keys")w=!0;else if(!(e==="-C"||e==="--color")){if(!(e==="-M"||e==="--monochrome"))if(e==="--tab")h=!0;else if(e==="-")E.push("-");else{if(e.startsWith("--"))return I("jq",e);if(e.startsWith("-")){for(let i of e.slice(1))if(i==="R")t=!0;else if(i==="r")f=!0;else if(i==="c")l=!0;else if(i==="e")g=!0;else if(i==="s")c=!0;else if(i==="n")a=!0;else if(i==="j")p=!0;else if(i!=="a"){if(i==="S")w=!0;else if(i!=="C"){if(i!=="M")return I("jq",`-${i}`)}}}else T?E.push(e):(Q=e,T=!0)}}}}let C=[];if(!a)if(E.length===0||E.length===1&&E[0]==="-")C.push({source:"stdin",content:z(s.stdin)});else{let r=await d("file read",()=>_(s,E,{cmdName:"jq",stopOnError:!0}));if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:2};C=r.files.map(e=>({source:e.filename||"stdin",content:z(e.content)}))}try{let r=U(Q,{maxDepth:s.limits.maxQueryDepth,maxTokens:s.limits.maxQueryTokens,maxSourceLength:s.limits.maxStringLength}),e=[],i={limits:s.limits?{maxIterations:s.limits.maxJqIterations,maxStringLength:s.limits.maxStringLength,maxOutputSize:s.limits.maxOutputSize,maxArrayElements:s.limits.maxQueryElements,maxDepth:s.limits.maxQueryDepth}:void 0,env:s.env,coverage:s.coverage,requireDefenseContext:s.requireDefenseContext,budget:{operations:0,callDepth:0}},v={maxDepth:s.limits.maxQueryDepth,maxElements:s.limits.maxQueryElements},b=(o,u)=>{if(u.length>s.limits.maxQueryElements-o.length)throw new y(`query result element limit exceeded (${s.limits.maxQueryElements})`,"array_elements");for(let m of u)o.push(m)};if(a)e=j(null,r,i);else if(t&&c){let o=C.map(({content:u})=>u).join("");e=j(o,r,i)}else if(t){let o="";for(let{content:u}of C){let m=o+u,x=0,S=m.indexOf(`
|
|
4
|
+
`,x);for(;S!==-1;)b(e,j(m.slice(x,S),r,i)),x=S+1,S=m.indexOf(`
|
|
5
|
+
`,x);o=m.slice(x)}o!==""&&b(e,j(o,r,i))}else if(c){let o=[];for(let{content:u}of C){let m=u.trim();m&&b(o,K(m,v))}e=j(o,r,i)}else for(let{content:o}of C){let u=o.trim();if(!u)continue;let m=K(u,v);for(let x of m)b(e,j(x,r,i))}let N=p?"":`
|
|
6
|
+
`,q=Math.min(s.limits.maxStringLength,s.limits.maxOutputSize),O=[],$=0;for(let o of e){let u=O.length>0?N.length:0,m=p?0:1,x=q-$-u-m;if(x<0)throw new y(`output size limit exceeded (${q} bytes)`,"string_length");if(P(o,s.limits.maxQueryDepth+1)>s.limits.maxQueryDepth)throw new y(`query depth limit exceeded (${s.limits.maxQueryDepth})`,"recursion");let S=W(o,x,{compact:l,raw:f,sortKeys:w,useTab:h,limitKind:"string_length"}),B=M(S);if($+u+B+m>q)throw new y(`output size limit exceeded (${q} bytes)`,"string_length");$+=u+B,O.push(S)}let k=O.join(N),X=g&&(e.length===0||e.every(o=>o==null||o===!1))?1:0;return{stdout:k?p?k:`${k}
|
|
7
|
+
`:"",stderr:"",exitCode:X}}catch(r){if(r instanceof F)throw r;if(r instanceof y)return{stdout:"",stderr:`jq: ${J(r.message)}
|
|
8
|
+
`,exitCode:y.EXIT_CODE};let e=J(r.message);return e.includes("Unknown function")?{stdout:"",stderr:`jq: error: ${e}
|
|
9
|
+
`,exitCode:3}:{stdout:"",stderr:`jq: parse error: ${e}
|
|
10
|
+
`,exitCode:5}}}},de={name:"jq",flags:[{flag:"-R",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"--tab",type:"boolean"}],stdinType:"json",needsArgs:!0};export{pe as a,de as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as l,b as n,d as s}from"./chunk-5HXWWNWH.js";import{a,b as i}from"./chunk-QAYAQNCG.js";var m={name:"tail",summary:"output the last part of files",usage:"tail [OPTION]... [FILE]...",options:["-c, --bytes=NUM print the last NUM bytes","-n, --lines=NUM print the last NUM lines (default 10)","-n +NUM print starting from line NUM","-q, --quiet never print headers giving file names","-v, --verbose always print headers giving file names"," --help display this help and exit"]},d={name:"tail",async execute(t,r){if(i(t))return a(m);let e=l(t,"tail");if(!e.ok)return e.error;let{lines:o,bytes:p,fromLine:f}=e.options;return n(r,e.options,"tail",u=>s(u,o,p,f??!1))}},c={name:"tail",flags:[{flag:"-n",type:"value",valueHint:"number"},{flag:"-c",type:"value",valueHint:"number"},{flag:"-q",type:"boolean"},{flag:"-v",type:"boolean"}],stdinType:"text",needsFiles:!0};export{d as a,c 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-XVL654YD.js";import{l as G,m as V}from"./chunk-EFORKKSH.js";function X(t,n){let e=t.ignoreCase?n.toLowerCase():n,i=t.needles;for(let s=0;s<i.length;s++)if(e.indexOf(i[s])!==-1)return!0;return!1}function ee(t,n){return t.replace(/\$(&|\d+|<([^>]+)>)/g,(e,i,s)=>{if(i==="&")return n[0];if(s!==void 0)return n.groups?.[s]??"";let o=parseInt(i,10);return n[o]??""})}function ne(t,n,e={}){let{invertMatch:i=!1,showLineNumbers:s=!1,countOnly:o=!1,countMatches:c=!1,filename:h="",onlyMatching:L=!1,beforeContext:F=0,afterContext:O=0,maxCount:A=0,contextSeparator:q="--",showColumn:Z=!1,vimgrep:H=!1,showByteOffset:W=!1,replace:E=null,passthru:K=!1,multiline:Q=!1,kResetGroup:S,preFilter:R,maxWork:N,maxMatches:g,signal:U}=e;if(Q)return ie(t,n,{invertMatch:i,showLineNumbers:s,countOnly:o,countMatches:c,filename:h,onlyMatching:L,beforeContext:F,afterContext:O,maxCount:A,contextSeparator:q,showColumn:Z,showByteOffset:W,replace:E,kResetGroup:S,preFilter:R,maxWork:N,maxMatches:g,signal:U});let _=0,C=(l=1)=>{if(U?.aborted)throw new V;if(_+=l,N!==void 0&&_>N)throw new G(`search: matching work limit exceeded (${N})`,"iterations")},b=(l,a)=>{if(g!==void 0&&l.length>=g)throw new G(`search: result limit exceeded (${g})`,"array_elements");l.push(a)},j=1;for(let l=0;l<t.length;l++)if((l&1023)===0&&C(),t.charCodeAt(l)===10&&(j++,g!==void 0&&j>g))throw new G(`search: line limit exceeded (${g})`,"array_elements");let P=t.split(`
|
|
3
|
+
`),y=P.length,k=y>0&&P[y-1]===""?y-1:y;if(o||c){let l=0,a=(c||L)&&!i;for(let r=0;r<k;r++){C();let u=P[r];if(!(R&&!i&&!X(R,u)))if(n.lastIndex=0,a)for(let x=n.exec(u);x!==null;x=n.exec(u))C(),l++,x[0].length===0&&n.lastIndex++;else n.test(u)!==i&&l++}return{output:`${h?`${h}:${l}`:String(l)}
|
|
4
|
+
`,matched:l>0,matchCount:l}}if(F===0&&O===0&&!K){let l=[],a=!1,d=0,r=0;for(let u=0;u<k&&(C(),!(A>0&&d>=A));u++){let x=P[u],I=null;if(R&&!X(R,x)||(n.lastIndex=0,I=n.exec(x)),I!==null!==i)if(a=!0,d++,L)for(let w=I;w!==null;w=n.exec(x)){C();let z=S!==void 0?w[S]??"":w[0],B=E!==null?ee(E,w):z,p=h?`${h}:`:"";W&&(p+=`${r+w.index}:`),s&&(p+=`${u+1}:`),Z&&(p+=`${w.index+1}:`),b(l,p+B),w[0].length===0&&n.lastIndex++}else if(H)for(let w=I;w!==null;w=n.exec(x)){C();let z=h?`${h}:`:"";W&&(z+=`${r+w.index}:`),s&&(z+=`${u+1}:`),Z&&(z+=`${w.index+1}:`),b(l,z+x),w[0].length===0&&n.lastIndex++}else{let w=I?I.index+1:1,z=x;E!==null&&(n.lastIndex=0,z=n.replace(x,(...p)=>{if(p[0].length===0)return"";let D=p,J=p[p.length-1];return typeof J=="object"&&J!==null?(D.groups=J,D.input=p[p.length-2],D.index=p[p.length-3]):(D.input=p[p.length-1],D.index=p[p.length-2]),ee(E,D)}));let B=h?`${h}:`:"";W&&(B+=`${r+(I?I.index:0)}:`),s&&(B+=`${u+1}:`),Z&&(B+=`${w}:`),b(l,B+z)}r+=x.length+1}return{output:l.length>0?`${l.join(`
|
|
5
|
+
`)}
|
|
6
|
+
`:"",matched:a,matchCount:d}}if(K){let l=[],a=!1,d=0;for(let r=0;r<k;r++){C();let u=P[r],x;R&&!X(R,u)?x=!1:(n.lastIndex=0,x=n.test(u));let I=x!==i;I&&(a=!0,d++);let T=I?":":"-",w=h?`${h}${T}`:"";s&&(w+=`${r+1}${T}`),b(l,w+u)}return{output:l.length>0?`${l.join(`
|
|
7
|
+
`)}
|
|
8
|
+
`:"",matched:a,matchCount:d}}let M=[],v=0,f=new Set,m=-1,$=[];for(let l=0;l<k&&(C(),!(A>0&&v>=A));l++){let a=P[l],d;if(R&&!X(R,a)?d=!1:(n.lastIndex=0,d=n.test(a)),d!==i){if(g!==void 0&&$.length>=g)throw new G(`search: match limit exceeded (${g})`,"array_elements");$.push(l),v++}}for(let l of $){C();let a=Math.max(0,l-F);m>=0&&a>m+1&&b(M,q);for(let r=a;r<l;r++)if(C(),!f.has(r)){f.add(r),m=r;let u=P[r];s&&(u=`${r+1}-${u}`),h&&(u=`${h}-${u}`),b(M,u)}if(!f.has(l)){f.add(l),m=l;let r=P[l];if(L){n.lastIndex=0;for(let u=n.exec(r);u!==null;u=n.exec(r)){C();let x=S!==void 0?u[S]??"":u[0],I=E!==null?E:x,T=h?`${h}:`:"";s&&(T+=`${l+1}:`),Z&&(T+=`${u.index+1}:`),b(M,T+I),u[0].length===0&&n.lastIndex++}}else{let u=r;s&&(u=`${l+1}:${u}`),h&&(u=`${h}:${u}`),b(M,u)}}let d=Math.min(k-1,l+O);for(let r=l+1;r<=d;r++)if(C(),!f.has(r)){f.add(r),m=r;let u=P[r];s&&(u=`${r+1}-${u}`),h&&(u=`${h}-${u}`),b(M,u)}}return{output:M.length>0?`${M.join(`
|
|
9
|
+
`)}
|
|
10
|
+
`:"",matched:v>0,matchCount:v}}function ie(t,n,e){let{invertMatch:i,showLineNumbers:s,countOnly:o,countMatches:c,filename:h,onlyMatching:L,beforeContext:F,afterContext:O,maxCount:A,contextSeparator:q,showColumn:Z,showByteOffset:H,replace:W,kResetGroup:E,preFilter:K,maxWork:Q,maxMatches:S,signal:R}=e,N=0,g=(f=1)=>{if(R?.aborted)throw new V;if(N+=f,Q!==void 0&&N>Q)throw new G(`search: matching work limit exceeded (${Q})`,"iterations")};if(K&&!i&&!X(K,t))return o||c?{output:`${h?`${h}:0`:"0"}
|
|
11
|
+
`,matched:!1,matchCount:0}:{output:"",matched:!1,matchCount:0};let U=[0];for(let f=0;f<t.length;f++)if((f&1023)===0&&g(),t[f]===`
|
|
12
|
+
`){if(S!==void 0&&U.length>=S)throw new G(`search: line index limit exceeded (${S})`,"array_elements");U.push(f+1)}let _=t.split(`
|
|
13
|
+
`),C=_.length,b=C>0&&_[C-1]===""?C-1:C,j=f=>{let m=0,$=U.length;for(;m<$;){let l=m+Math.floor(($-m)/2);U[l]<=f?m=l+1:$=l}return Math.max(0,m-1)},P=f=>{let m=j(f);return f-U[m]+1};if(o||c){let f=0,m=0,$=-1;n.lastIndex=0;for(let d=n.exec(t);d!==null&&(g(),!(A>0&&f>=A));d=n.exec(t)){if(f++,!c){let r=j(d.index),u=j(d.index+Math.max(0,d[0].length-1)),x=Math.max(r,$+1);x<=u&&(m+=u-x+1,$=u)}d[0].length===0&&n.lastIndex++}let l=c?i?0:f:i?b-m:m;return{output:`${h?`${h}:${l}`:String(l)}
|
|
14
|
+
`,matched:l>0,matchCount:l}}let y=[];n.lastIndex=0;for(let f=n.exec(t);f!==null&&(g(),!(A>0&&y.length>=A));f=n.exec(t)){if(S!==void 0&&y.length>=S)throw new G(`search: match limit exceeded (${S})`,"array_elements");let m=j(f.index),$=j(f.index+Math.max(0,f[0].length-1)),l=E!==void 0?f[E]??"":f[0];y.push({startLine:m,endLine:$,byteOffset:f.index,column:P(f.index),matchText:l}),f[0].length===0&&n.lastIndex++}if(i){let f=new Set;for(let $ of y)for(let l=$.startLine;l<=$.endLine;l++)g(),f.add(l);let m=[];for(let $=0;$<b;$++)if(g(),!f.has($)){let l=_[$];s&&(l=`${$+1}:${l}`),h&&(l=`${h}:${l}`),m.push(l)}return{output:m.length>0?`${m.join(`
|
|
15
|
+
`)}
|
|
16
|
+
`:"",matched:m.length>0,matchCount:m.length}}if(y.length===0)return{output:"",matched:!1,matchCount:0};let k=new Set,M=-1,v=[];for(let f of y){g();let m=Math.max(0,f.startLine-F),$=Math.min(b-1,f.endLine+O);M>=0&&m>M+1&&v.push(q);for(let l=m;l<f.startLine;l++)if(g(),!k.has(l)){k.add(l),M=l;let a=_[l];s&&(a=`${l+1}-${a}`),h&&(a=`${h}-${a}`),v.push(a)}if(L){let l=W!==null?W:f.matchText,a=h?`${h}:`:"";H&&(a+=`${f.byteOffset}:`),s&&(a+=`${f.startLine+1}:`),Z&&(a+=`${f.column}:`),v.push(a+l);for(let d=f.startLine;d<=f.endLine;d++)g(),k.add(d),M=d}else for(let l=f.startLine;l<=f.endLine&&l<b;l++)if(g(),!k.has(l)){k.add(l),M=l;let a=_[l];W!==null&&l===f.startLine&&(n.lastIndex=0,a=n.replace(a,W));let d=h?`${h}:`:"";H&&l===f.startLine&&(d+=`${f.byteOffset}:`),s&&(d+=`${l+1}:`),Z&&l===f.startLine&&(d+=`${f.column}:`),v.push(d+a)}for(let l=f.endLine+1;l<=$;l++)if(g(),!k.has(l)){k.add(l),M=l;let a=_[l];s&&(a=`${l+1}-${a}`),h&&(a=`${h}-${a}`),v.push(a)}}return{output:v.length>0?`${v.join(`
|
|
17
|
+
`)}
|
|
18
|
+
`:"",matched:!0,matchCount:y.length}}var le=new Map([["alpha","a-zA-Z"],["digit","0-9"],["alnum","a-zA-Z0-9"],["lower","a-z"],["upper","A-Z"],["xdigit","0-9A-Fa-f"],["space"," \\t\\n\\r\\f\\v"],["blank"," \\t"],["punct","!-/:-@\\[-`{-~"],["graph","!-~"],["print"," -~"],["cntrl","\\x00-\\x1F\\x7F"],["ascii","\\x00-\\x7F"],["word","a-zA-Z0-9_"]]);function te(t){let n="",e=0;for(;e<t.length;){if(t.slice(e,e+7)==="[[:<:]]"){n+="\\b",e+=7;continue}if(t.slice(e,e+7)==="[[:>:]]"){n+="\\b",e+=7;continue}if(t[e]==="["){let i="[";for(e++,e<t.length&&(t[e]==="^"||t[e]==="!")&&(i+="^",e++),e<t.length&&t[e]==="]"&&(i+="\\]",e++);e<t.length&&t[e]!=="]";){if(t[e]==="["&&e+1<t.length&&t[e+1]===":"){let s=t.indexOf(":]",e+2);if(s!==-1){let o=t.slice(e+2,s),c=le.get(o);if(c){i+=c,e=s+2;continue}}}if(t[e]==="\\"&&e+1<t.length){i+=t[e]+t[e+1],e+=2;continue}i+=t[e],e++}e<t.length&&t[e]==="]"&&(i+="]",e++),n+=i;continue}if(t[e]==="\\"&&e+1<t.length){n+=t[e]+t[e+1],e+=2;continue}n+=t[e],e++}return n}function se(t,n){let e,i;switch(n.mode){case"fixed":e=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");break;case"extended":case"perl":{if(e=te(t),e=e.replace(/\(\?P<([^>]+)>/g,"(?<$1>"),n.mode==="perl"){e=ue(e),e=he(e),e=ae(e);let h=$e(e);e=h.pattern,i=h.kResetGroup}break}default:e=te(t),e=Ce(e);break}n.wholeWord&&(e=`\\b(?:${e})\\b`),n.lineRegexp&&(e=`^${e}$`);let s=/\\u\{[0-9A-Fa-f]+\}/.test(e),o="g"+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.multilineDotall?"s":"")+(s?"u":""),c=oe(e,n.ignoreCase??!1);return{regex:Y(e,o),kResetGroup:i,preFilter:c??void 0}}function oe(t,n){let e=t;if(e.startsWith("\\b(?:")&&e.endsWith(")\\b")?e=e.slice(5,e.length-3):e.startsWith("\\b")&&e.endsWith("\\b")&&e.length>=4&&(e=e.slice(2,e.length-2)),e.length===0)return null;let i=fe(e);if(i===null)return null;let s=[];for(let o of i){let c=ce(o);if(c===null||c.length===0)return null;s.push(c)}return s.length===0?null:{needles:n?s.map(o=>o.toLowerCase()):s,ignoreCase:n}}function fe(t){let n=[],e=0,i=!1,s=0;for(let o=0;o<t.length;o++){let c=t[o];if(c==="\\"){o++;continue}if(i){c==="]"&&(i=!1);continue}if(c==="[")i=!0;else if(c==="(")e++;else if(c===")"){if(e--,e<0)return null}else c==="|"&&e===0&&(n.push(t.slice(s,o)),s=o+1)}return e!==0||i?null:(n.push(t.slice(s)),n)}function ce(t){let n=t;if(n.startsWith("^")&&(n=n.slice(1)),n.endsWith("$")){let i=0;for(let s=n.length-2;s>=0&&n[s]==="\\";s--)i++;i%2===0&&(n=n.slice(0,-1))}if(n.length===0)return null;let e="";for(let i=0;i<n.length;i++){let s=n[i];if(s==="\\"){let o=n[i+1];if(o===void 0||/[dDwWsSbBAZzGQE0-9ckpPNXRxuU]/.test(o))return null;o==="n"?e+=`
|
|
19
|
+
`:o==="t"?e+=" ":o==="r"?e+="\r":o==="f"?e+="\f":o==="v"?e+="\v":e+=o,i++;continue}if(/[.*+?^${}()|[\]]/.test(s))return null;e+=s}return e}function ue(t){let n="",e=0;for(;e<t.length;)if(t[e]==="\\"&&e+1<t.length&&t[e+1]==="Q"){e+=2;let i="";for(;e<t.length;){if(t[e]==="\\"&&e+1<t.length&&t[e+1]==="E"){e+=2;break}i+=t[e],e++}n+=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}else n+=t[e],e++;return n}function he(t){return t.replace(/\\x\{([0-9A-Fa-f]+)\}/g,"\\u{$1}")}function ae(t){let n="",e=0;for(;e<t.length;){if(t[e]==="("&&e+1<t.length&&t[e+1]==="?"){let i=t.slice(e).match(/^\(\?([imsx]*)(-[imsx]*)?(:|$|\))/);if(i){let s=i[1]||"",o=i[2]||"",c=i[3];if(c===":"){let h=e+i[0].length-1,L=re(t,e);if(L!==-1){let F=t.slice(h+1,L),O=de(F,s,o);n+=`(?:${O})`,e=L+1;continue}}else if(c===")"||c===""){e+=i[0].length;continue}}}n+=t[e],e++}return n}function re(t,n){let e=0,i=n;for(;i<t.length;){if(t[i]==="\\"){i+=2;continue}if(t[i]==="["){for(i++;i<t.length&&t[i]!=="]";)t[i]==="\\"&&i++,i++;i++;continue}if(t[i]==="(")e++;else if(t[i]===")"&&(e--,e===0))return i;i++}return-1}function de(t,n,e){let i=t;return n.includes("i")&&(i=me(i)),i}function me(t){let n="",e=0;for(;e<t.length;){let i=t[e];if(i==="\\"){e+1<t.length?(n+=i+t[e+1],e+=2):(n+=i,e++);continue}if(i==="["){n+=i,e++,e<t.length&&t[e]==="^"&&(n+=t[e],e++);let s=[];for(;e<t.length&&t[e]!=="]";)if(t[e]==="\\")s.push(t[e]),e++,e<t.length&&(s.push(t[e]),e++);else if(t[e]==="-"&&s.length>0&&e+1<t.length&&t[e+1]!=="]"){let o=s[s.length-1],c=t[e+1];s.push("-"),s.push(c),/[a-z]/.test(o)&&/[a-z]/.test(c)?(s.push(o.toUpperCase()),s.push("-"),s.push(c.toUpperCase())):/[A-Z]/.test(o)&&/[A-Z]/.test(c)&&(s.push(o.toLowerCase()),s.push("-"),s.push(c.toLowerCase())),e+=2}else{let o=t[e];if(s.push(o),/[a-zA-Z]/.test(o)){let c=o===o.toLowerCase()?o.toUpperCase():o.toLowerCase();s.includes(c)||s.push(c)}e++}n+=s.join(""),e<t.length&&(n+=t[e],e++);continue}if(/[a-zA-Z]/.test(i)){let s=i.toLowerCase(),o=i.toUpperCase();n+=`[${o}${s}]`}else n+=i;e++}return n}function $e(t){let n=ge(t);if(n===-1)return{pattern:t};let e=t.slice(0,n),i=t.slice(n+2),s=xe(e);return{pattern:`(?:${e})(${i})`,kResetGroup:s+1}}function ge(t){let n=0;for(;n<t.length-1;)if(t[n]==="\\"){if(t[n+1]==="K"){let e=0,i=n-1;for(;i>=0&&t[i]==="\\";)e++,i--;if(e%2===0)return n}n+=2}else n++;return-1}function xe(t){let n=0,e=0;for(;e<t.length;){if(t[e]==="\\"){e+=2;continue}if(t[e]==="["){for(e++;e<t.length&&t[e]!=="]";)t[e]==="\\"&&e++,e++;e++;continue}if(t[e]==="(")if(e+1<t.length&&t[e+1]==="?"){if(e+2<t.length){let i=t[e+2];if(i===":"||i==="="||i==="!"){e++;continue}if(i==="<"&&e+3<t.length){let s=t[e+3];if(s==="="||s==="!"){e++;continue}n++,e++;continue}}}else n++;e++}return n}function we(t){let n=t.replace(/\$\{0\}|\$0(?![0-9])/g,"$$&");return n=n.replace(/\$\{([^0-9}][^}]*)\}/g,"$$<$1>"),n=n.replace(/\$([a-zA-Z_][a-zA-Z0-9_]*)(?![>0-9])/g,"$$<$1>"),n}function Ce(t){let n="",e=0,i=!0,s=0;for(;e<t.length;){let o=t[e];if(o==="["){for(n+=o,e++,e<t.length&&(t[e]==="^"||t[e]==="!")&&(n+=t[e],e++),e<t.length&&t[e]==="]"&&(n+=t[e],e++);e<t.length&&t[e]!=="]";)t[e]==="\\"&&e+1<t.length?(n+=t[e]+t[e+1],e+=2):(n+=t[e],e++);e<t.length&&t[e]==="]"&&(n+=t[e],e++),i=!1;continue}if(o==="\\"&&e+1<t.length){let c=t[e+1];if(c==="|"){n+="|",e+=2,i=!0;continue}if(c==="("){n+="(",e+=2,s++,i=!0;continue}if(c===")"){n+=")",e+=2,s=Math.max(0,s-1),i=!1;continue}if(c==="{"){let L=t.slice(e).match(/^\\{(\d+)(,(\d*)?)?\\}/);if(L){let F=L[1],O=L[2]!==void 0,A=L[3]||"";O?n+=`{${F},${A}}`:n+=`{${F}}`,e+=L[0].length,i=!1;continue}n+="\\{",e+=2,i=!1;continue}if(c==="}"){n+="\\}",e+=2,i=!1;continue}n+=o+c,e+=2,i=!1;continue}if(o==="*"&&i){n+="\\*",e++;continue}if(o==="^"){if(i){n+="^",e++;continue}n+="\\^",e++;continue}if(o==="$"){let c=e===t.length-1,h=e+2<t.length&&t[e+1]==="\\"&&t[e+2]===")";c||h?n+="$":n+="\\$",e++,i=!1;continue}o==="+"||o==="?"||o==="|"||o==="("||o===")"||o==="{"||o==="}"?n+=`\\${o}`:n+=o,e++,i=!1}return n}export{ne as a,se as b,we as c};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{b as F,c as N,d as O,e as T}from"./chunk-IBRT3OJS.js";import{b as P}from"./chunk-YUSFCOM7.js";import{l as w,m as $}from"./chunk-EFORKKSH.js";import{a as S}from"./chunk-QIQMJJZ4.js";import{a as D}from"./chunk-W5DWRFSU.js";import{a as C,b as E}from"./chunk-QAYAQNCG.js";var A={name:"mv",summary:"move (rename) files",usage:"mv [OPTION]... SOURCE... DEST",options:["-f, --force do not prompt before overwriting","-n, --no-clobber do not overwrite an existing file","-v, --verbose explain what is being done"," --help display this help and exit"]},H={force:{short:"f",long:"force",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},U={name:"mv",async execute(p,e){if(E(p))return C(A);let r=S("mv",p,H);if(!r.ok)return r.error;let u=r.result.flags.force,v=r.result.flags.noClobber,k=r.result.flags.verbose,d=r.result.positional;if(v&&(u=!1),d.length<2)return{stdout:"",stderr:`mv: missing destination file operand
|
|
3
|
+
`,exitCode:1};let f=d.pop()??"",g=d,c=e.fs.resolvePath(e.cwd,f),h="",i="",l=0,b=new O({limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"mv"}),m=!1;try{m=(await e.fs.stat(c)).isDirectory}catch{}if(g.length>1&&!m)return{stdout:"",stderr:`mv: target '${f}' is not a directory
|
|
4
|
+
`,exitCode:1};for(let t of g)try{let o=e.fs.resolvePath(e.cwd,t),a=await e.fs.stat(o),n=c;if(m){let s=t.split("/").pop()||t;n=c==="/"?`/${s}`:`${c}/${s}`}if(a.isDirectory){let s=await N(e.fs,o,n,b);if(P(o,n)||s==="inside"){i+=`mv: cannot move '${t}' into itself, '${n}'
|
|
5
|
+
`,l=1;continue}if(s==="unknown"){i+=`mv: cannot safely determine whether '${n}' is inside '${t}'
|
|
6
|
+
`,l=1;continue}}if(v)try{await e.fs.stat(n);continue}catch{}let y=await F(e.fs,o,n);if(y==="same")continue;if(y==="unknown"){i+=`mv: cannot safely determine whether '${t}' and '${n}' are the same file
|
|
7
|
+
`,l=1;continue}if(a.isDirectory&&await T({fs:e.fs,root:o,limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"mv",symlinks:"never",budget:b},()=>{}),await e.fs.mv(o,n),k){let s=m?`${f}/${t.split("/").pop()||t}`:f;h+=`renamed '${t}' -> '${s}'
|
|
8
|
+
`}}catch(o){if(o instanceof w||o instanceof $)throw o;let a=D(o);a.includes("ENOENT")||a.includes("no such file")?i+=`mv: cannot stat '${t}': No such file or directory
|
|
9
|
+
`:i+=`mv: cannot move '${t}': ${a}
|
|
10
|
+
`,l=1}return{stdout:h,stderr:i,exitCode:l}}},j={name:"mv",flags:[{flag:"-f",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{U as a,j as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
var o=class{options;inputBytes=0;outputBytes=0;workBytes=0;label;constructor(t){this.options=t,this.label=t.label??"codec";for(let[i,e]of[["maxInputBytes",t.maxInputBytes],["maxOutputBytes",t.maxOutputBytes],["maxExpansionRatio",t.maxExpansionRatio],["ratioGraceBytes",t.ratioGraceBytes],["maxWorkBytes",t.maxWorkBytes]])if(e!==void 0&&(!Number.isSafeInteger(e)||e<0))throw new Error(`${this.label}: invalid ${i}`)}checkpoint(){if(this.options.signal?.aborted)throw new Error(`${this.label}: operation aborted`)}acceptInput(t){this.checkpoint(),this.inputBytes=this.addWithinLimit(this.inputBytes,t,this.options.maxInputBytes,"input"),this.chargeWork(t)}acceptOutput(t){this.checkpoint();let i=this.addWithinLimit(this.outputBytes,t,this.options.maxOutputBytes,"output"),e=this.options.ratioGraceBytes??1024*1024,s=this.options.maxExpansionRatio;if(s!==void 0&&i>e&&(this.inputBytes===0||i>this.inputBytes*s))throw new Error(`${this.label}: expansion ratio exceeds limit (${s}:1)`);this.outputBytes=i,this.chargeWork(t)}get inputLength(){return this.inputBytes}get outputLength(){return this.outputBytes}chargeWork(t){let i=this.options.maxWorkBytes??this.options.maxInputBytes+this.options.maxOutputBytes;this.workBytes=this.addWithinLimit(this.workBytes,t,i,"work")}addWithinLimit(t,i,e,s){if(!Number.isSafeInteger(i)||i<0||i>e-t)throw new Error(`${this.label}: ${s} exceeds limit (${e} bytes)`);return t+i}};export{o as a};
|