just-bash 2.15.1-executor.0 → 3.0.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 +43 -0
- package/README.md +38 -2
- package/dist/Bash.d.ts +23 -84
- package/dist/bin/chunks/awk2-CKPJ75GN.js +2 -0
- package/dist/bin/chunks/base64-I3CXGD2Q.js +2 -0
- package/dist/bin/chunks/bash-UYSJL7VA.js +2 -0
- package/dist/bin/chunks/cat-3TMJDECR.js +2 -0
- package/dist/bin/chunks/chunk-24DJ4XAS.js +18 -0
- package/dist/bin/chunks/{chunk-DOXYBGNA.js → chunk-2ACK45YF.js} +4 -4
- package/dist/bin/chunks/chunk-2GZSSMV3.js +14 -0
- package/dist/bin/chunks/{chunk-WXMBDX4P.js → chunk-2TMMAY52.js} +7 -7
- package/dist/bin/chunks/chunk-575DV2PL.js +9 -0
- package/dist/bin/chunks/chunk-5DFR7VRU.js +13 -0
- package/dist/bin/chunks/chunk-63XSH3IT.js +2 -0
- package/dist/bin/{shell/chunks/chunk-N43DJTSI.js → chunks/chunk-6CW6ATOU.js} +1 -1
- package/dist/bin/chunks/chunk-6NYAJMTL.js +14 -0
- package/dist/bin/chunks/chunk-6ZKYK7PO.js +63 -0
- package/dist/bin/chunks/chunk-7FOU5QKD.js +11 -0
- package/dist/bin/chunks/chunk-7RSTZI3G.js +9 -0
- package/dist/bin/chunks/{chunk-SGA7Y45Z.js → chunk-A65XLABI.js} +5 -5
- package/dist/bin/chunks/{chunk-YLE2OYY6.js → chunk-A6CAHGYF.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-XKPFI566.js → chunks/chunk-AM6HJVBI.js} +17 -17
- package/dist/bin/chunks/chunk-AQBEVPZP.js +6 -0
- package/dist/bin/chunks/chunk-AX3QU3MP.js +6 -0
- package/dist/bin/chunks/chunk-B4CUXR3Q.js +33 -0
- package/dist/bin/chunks/{chunk-NLBRLRWD.js → chunk-B5DAHNDY.js} +1 -1
- package/dist/bin/chunks/chunk-BEWZWAXH.js +8 -0
- package/dist/bin/{shell/chunks/chunk-SE4C7FJY.js → chunks/chunk-C6FRS5UB.js} +13 -13
- package/dist/bin/chunks/chunk-CUYKY2BK.js +5 -0
- package/dist/bin/chunks/chunk-D3JRD3JF.js +36 -0
- package/dist/bin/chunks/chunk-D6DORGK7.js +16 -0
- package/dist/bin/chunks/{chunk-SXB55JOI.js → chunk-DH7TPGPX.js} +1 -1
- package/dist/bin/chunks/chunk-FU7JHPYW.js +9 -0
- package/dist/bin/chunks/chunk-G36D7WFF.js +6 -0
- package/dist/bin/chunks/chunk-GQQLQPZG.js +7 -0
- package/dist/bin/chunks/chunk-HIVPP3AM.js +17 -0
- package/dist/bin/{shell/chunks/chunk-NAX7MTAR.js → chunks/chunk-I3X57RP5.js} +6 -6
- package/dist/bin/chunks/chunk-IZ3AT2KX.js +19 -0
- package/dist/bin/chunks/chunk-KHOBXZFG.js +12 -0
- package/dist/bin/chunks/chunk-KMFPV7SR.js +6 -0
- package/dist/bin/chunks/chunk-KX2PR2HV.js +16 -0
- package/dist/bin/chunks/{chunk-54G6AE72.js → chunk-LCJRVV55.js} +1 -1
- package/dist/bin/chunks/chunk-M33SULGQ.js +9 -0
- package/dist/bin/chunks/{chunk-3Y32LPNT.js → chunk-M3T6XOXC.js} +1 -1
- package/dist/bin/chunks/chunk-MWKPB24E.js +11 -0
- package/dist/bin/chunks/chunk-NN2DBOAZ.js +5 -0
- package/dist/bin/chunks/{chunk-RMQC3GS7.js → chunk-NOGXKS2G.js} +23 -23
- package/dist/bin/chunks/chunk-NTW6IA45.js +2 -0
- package/dist/bin/{shell/chunks/chunk-7BORMNPQ.js → chunks/chunk-NWG67HAQ.js} +1 -1
- package/dist/bin/chunks/{chunk-A3HQTYHR.js → chunk-P43NQKUN.js} +1 -1
- package/dist/bin/chunks/chunk-PHZPFNDZ.js +287 -0
- package/dist/bin/chunks/chunk-RX22J4AC.js +14 -0
- package/dist/bin/chunks/chunk-S7KZBLGH.js +3 -0
- package/dist/bin/{shell/chunks/chunk-ZO5PSLKR.js → chunks/chunk-SDOJRQF5.js} +1 -1
- package/dist/bin/chunks/chunk-UFJFAFSS.js +28 -0
- package/dist/bin/chunks/chunk-UMYJNWPA.js +140 -0
- package/dist/bin/chunks/chunk-UO7ZJYDM.js +11 -0
- package/dist/bin/chunks/{chunk-THNL3XFF.js → chunk-VECTAALH.js} +1 -1
- package/dist/bin/chunks/chunk-VRU3NTQB.js +3 -0
- package/dist/bin/chunks/chunk-WJ3HZK2S.js +5 -0
- package/dist/bin/chunks/chunk-WLBA7L7U.js +23 -0
- package/dist/bin/{shell/chunks/chunk-SXRVLCZ4.js → chunks/chunk-WRYJHXRE.js} +1 -1
- package/dist/bin/chunks/chunk-XZEAAOBW.js +8 -0
- package/dist/bin/{shell/chunks/chunk-SDLWFYVT.js → chunks/chunk-YMQY74O7.js} +13 -13
- package/dist/bin/chunks/chunk-ZNMFCOTS.js +10 -0
- package/dist/bin/chunks/{chunk-GOJZHH3L.js → chunk-ZO3PBKJB.js} +3 -3
- package/dist/bin/chunks/column-MTXKQLJH.js +2 -0
- package/dist/bin/chunks/comm-YZHVF2XN.js +2 -0
- package/dist/bin/chunks/{curl-SRTMGOVV.js → curl-2DCNBIKJ.js} +8 -8
- package/dist/bin/chunks/cut-MWPHE25M.js +2 -0
- package/dist/bin/chunks/diff-EINZHDTZ.js +2 -0
- package/dist/bin/chunks/env-NK55NKL6.js +2 -0
- package/dist/bin/chunks/expand-47QQBMM5.js +2 -0
- package/dist/bin/{shell/chunks/expansion-2RO5M3QC.js → chunks/expansion-H3VFC532.js} +1 -1
- package/dist/bin/chunks/{expr-4CJYC4LY.js → expr-VPJ77DR7.js} +1 -1
- package/dist/bin/{shell/chunks/file-D5YKS5NV.js → chunks/file-MMSHRWCJ.js} +1 -1
- package/dist/bin/chunks/find-O2KKT6KZ.js +2 -0
- package/dist/bin/chunks/flag-coverage-FHFMNAV6.js +2 -0
- package/dist/bin/chunks/fold-QC27S46O.js +2 -0
- package/dist/bin/chunks/grep-3X5B47DW.js +2 -0
- package/dist/bin/chunks/gzip-VYBZGPTA.js +2 -0
- package/dist/bin/chunks/head-BM7J6BEI.js +2 -0
- package/dist/bin/chunks/html-to-markdown-G2FXKDLR.js +2 -0
- package/dist/bin/chunks/join-5J5VA3I7.js +2 -0
- package/dist/bin/chunks/jq-HYQ3KMGL.js +2 -0
- package/dist/bin/chunks/js-exec-LZPKIZ5V.js +97 -0
- package/dist/bin/chunks/js-exec-worker.js +27 -185
- package/dist/bin/chunks/{ls-G2PXHSNX.js → ls-WONXDVOX.js} +1 -1
- package/dist/bin/chunks/md5sum-GVZ66MRR.js +2 -0
- package/dist/bin/chunks/nl-XLPXDHHK.js +2 -0
- package/dist/bin/chunks/od-CRBL7ZML.js +2 -0
- package/dist/bin/chunks/paste-7MEIW3PG.js +2 -0
- package/dist/bin/chunks/{printf-P3QVL4IO.js → printf-NA7DYZBO.js} +1 -1
- package/dist/bin/chunks/python3-BBQ4SVHU.js +12 -0
- package/dist/bin/chunks/rev-6LTZEDBA.js +2 -0
- package/dist/bin/chunks/rg-UPQTBQZR.js +2 -0
- package/dist/bin/chunks/sed-OKEUW2KT.js +2 -0
- package/dist/bin/chunks/sha1sum-HFI2SRA4.js +2 -0
- package/dist/bin/chunks/sha256sum-N44D3OCP.js +2 -0
- package/dist/bin/chunks/sort-ES3NRFJA.js +2 -0
- package/dist/bin/chunks/split-QFBCCUR5.js +2 -0
- package/dist/bin/chunks/sqlite3-V4SEWTIR.js +2 -0
- package/dist/bin/chunks/sqlite3-worker.js +1728 -0
- package/dist/bin/chunks/strings-YGI6HF5M.js +2 -0
- package/dist/bin/chunks/tac-HWXFWOGO.js +2 -0
- package/dist/bin/chunks/tail-YX6MELZ5.js +2 -0
- package/dist/bin/chunks/tar-UO62YC6N.js +2 -0
- package/dist/bin/chunks/tee-XKJM7HV7.js +2 -0
- package/dist/bin/chunks/time-RPVNTV72.js +2 -0
- package/dist/bin/chunks/timeout-4QMASFQG.js +2 -0
- package/dist/bin/chunks/tr-A6IXSBQX.js +2 -0
- package/dist/bin/chunks/unexpand-UCJETXUX.js +2 -0
- package/dist/bin/chunks/uniq-2KXDTNDX.js +2 -0
- package/dist/bin/chunks/wc-KTXPMRYY.js +2 -0
- package/dist/bin/chunks/worker.js +28 -9
- package/dist/bin/chunks/xan-IHA7IHBM.js +2 -0
- package/dist/bin/chunks/xan-view-JFFJAU35.js +2 -0
- package/dist/bin/chunks/xargs-EWL5DXR3.js +2 -0
- package/dist/bin/chunks/yq-LDGFI4EM.js +2 -0
- package/dist/bin/just-bash.js +292 -292
- package/dist/bin/shell/chunks/awk2-CKPJ75GN.js +2 -0
- package/dist/bin/shell/chunks/base64-I3CXGD2Q.js +2 -0
- package/dist/bin/shell/chunks/bash-UYSJL7VA.js +2 -0
- package/dist/bin/shell/chunks/cat-3TMJDECR.js +2 -0
- package/dist/bin/shell/chunks/chunk-24DJ4XAS.js +18 -0
- package/dist/bin/shell/chunks/{chunk-DOXYBGNA.js → chunk-2ACK45YF.js} +4 -4
- package/dist/bin/shell/chunks/chunk-2GZSSMV3.js +14 -0
- package/dist/bin/shell/chunks/{chunk-WXMBDX4P.js → chunk-2TMMAY52.js} +7 -7
- package/dist/bin/shell/chunks/chunk-575DV2PL.js +9 -0
- package/dist/bin/shell/chunks/chunk-5DFR7VRU.js +13 -0
- package/dist/bin/shell/chunks/chunk-63XSH3IT.js +2 -0
- package/dist/bin/{chunks/chunk-N43DJTSI.js → shell/chunks/chunk-6CW6ATOU.js} +1 -1
- package/dist/bin/shell/chunks/chunk-6NYAJMTL.js +14 -0
- package/dist/bin/shell/chunks/chunk-6ZKYK7PO.js +63 -0
- package/dist/bin/shell/chunks/chunk-7FOU5QKD.js +11 -0
- package/dist/bin/shell/chunks/chunk-7RSTZI3G.js +9 -0
- package/dist/bin/shell/chunks/{chunk-SGA7Y45Z.js → chunk-A65XLABI.js} +5 -5
- package/dist/bin/shell/chunks/{chunk-YLE2OYY6.js → chunk-A6CAHGYF.js} +1 -1
- package/dist/bin/{chunks/chunk-XKPFI566.js → shell/chunks/chunk-AM6HJVBI.js} +17 -17
- package/dist/bin/shell/chunks/chunk-AQBEVPZP.js +6 -0
- package/dist/bin/shell/chunks/chunk-AX3QU3MP.js +6 -0
- package/dist/bin/shell/chunks/chunk-B4CUXR3Q.js +33 -0
- package/dist/bin/shell/chunks/{chunk-NLBRLRWD.js → chunk-B5DAHNDY.js} +1 -1
- package/dist/bin/shell/chunks/chunk-BEWZWAXH.js +8 -0
- package/dist/bin/{chunks/chunk-SE4C7FJY.js → shell/chunks/chunk-C6FRS5UB.js} +13 -13
- package/dist/bin/shell/chunks/chunk-CUYKY2BK.js +5 -0
- package/dist/bin/shell/chunks/chunk-D3JRD3JF.js +36 -0
- package/dist/bin/shell/chunks/chunk-D6DORGK7.js +16 -0
- package/dist/bin/shell/chunks/{chunk-SXB55JOI.js → chunk-DH7TPGPX.js} +1 -1
- package/dist/bin/shell/chunks/chunk-FU7JHPYW.js +9 -0
- package/dist/bin/shell/chunks/chunk-G36D7WFF.js +6 -0
- package/dist/bin/shell/chunks/chunk-GQQLQPZG.js +7 -0
- package/dist/bin/shell/chunks/chunk-HIVPP3AM.js +17 -0
- package/dist/bin/{chunks/chunk-NAX7MTAR.js → shell/chunks/chunk-I3X57RP5.js} +6 -6
- package/dist/bin/shell/chunks/chunk-IZ3AT2KX.js +19 -0
- package/dist/bin/shell/chunks/chunk-KHOBXZFG.js +12 -0
- package/dist/bin/shell/chunks/chunk-KMFPV7SR.js +6 -0
- package/dist/bin/shell/chunks/chunk-KX2PR2HV.js +16 -0
- package/dist/bin/shell/chunks/{chunk-54G6AE72.js → chunk-LCJRVV55.js} +1 -1
- package/dist/bin/shell/chunks/chunk-M33SULGQ.js +9 -0
- package/dist/bin/shell/chunks/{chunk-3Y32LPNT.js → chunk-M3T6XOXC.js} +1 -1
- package/dist/bin/shell/chunks/chunk-MWKPB24E.js +11 -0
- package/dist/bin/shell/chunks/chunk-NN2DBOAZ.js +5 -0
- package/dist/bin/shell/chunks/{chunk-RMQC3GS7.js → chunk-NOGXKS2G.js} +23 -23
- package/dist/bin/shell/chunks/chunk-NTW6IA45.js +2 -0
- package/dist/bin/{chunks/chunk-7BORMNPQ.js → shell/chunks/chunk-NWG67HAQ.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-A3HQTYHR.js → chunk-P43NQKUN.js} +1 -1
- package/dist/bin/shell/chunks/chunk-PHZPFNDZ.js +287 -0
- package/dist/bin/shell/chunks/chunk-RX22J4AC.js +14 -0
- package/dist/bin/shell/chunks/chunk-S7KZBLGH.js +3 -0
- package/dist/bin/{chunks/chunk-ZO5PSLKR.js → shell/chunks/chunk-SDOJRQF5.js} +1 -1
- package/dist/bin/shell/chunks/chunk-UFJFAFSS.js +28 -0
- package/dist/bin/shell/chunks/chunk-UMYJNWPA.js +140 -0
- package/dist/bin/shell/chunks/chunk-UO7ZJYDM.js +11 -0
- package/dist/bin/shell/chunks/{chunk-THNL3XFF.js → chunk-VECTAALH.js} +1 -1
- package/dist/bin/shell/chunks/chunk-VRU3NTQB.js +3 -0
- package/dist/bin/shell/chunks/chunk-WJ3HZK2S.js +5 -0
- package/dist/bin/shell/chunks/chunk-WLBA7L7U.js +23 -0
- package/dist/bin/{chunks/chunk-SXRVLCZ4.js → shell/chunks/chunk-WRYJHXRE.js} +1 -1
- package/dist/bin/shell/chunks/chunk-XZEAAOBW.js +8 -0
- package/dist/bin/{chunks/chunk-SDLWFYVT.js → shell/chunks/chunk-YMQY74O7.js} +13 -13
- package/dist/bin/shell/chunks/chunk-ZNMFCOTS.js +10 -0
- package/dist/bin/shell/chunks/{chunk-GOJZHH3L.js → chunk-ZO3PBKJB.js} +3 -3
- package/dist/bin/shell/chunks/column-MTXKQLJH.js +2 -0
- package/dist/bin/shell/chunks/comm-YZHVF2XN.js +2 -0
- package/dist/bin/shell/chunks/{curl-SRTMGOVV.js → curl-2DCNBIKJ.js} +8 -8
- package/dist/bin/shell/chunks/cut-MWPHE25M.js +2 -0
- package/dist/bin/shell/chunks/diff-EINZHDTZ.js +2 -0
- package/dist/bin/shell/chunks/env-NK55NKL6.js +2 -0
- package/dist/bin/shell/chunks/expand-47QQBMM5.js +2 -0
- package/dist/bin/{chunks/expansion-2RO5M3QC.js → shell/chunks/expansion-H3VFC532.js} +1 -1
- package/dist/bin/shell/chunks/{expr-4CJYC4LY.js → expr-VPJ77DR7.js} +1 -1
- package/dist/bin/{chunks/file-D5YKS5NV.js → shell/chunks/file-MMSHRWCJ.js} +1 -1
- package/dist/bin/shell/chunks/find-O2KKT6KZ.js +2 -0
- package/dist/bin/shell/chunks/flag-coverage-FHFMNAV6.js +2 -0
- package/dist/bin/shell/chunks/fold-QC27S46O.js +2 -0
- package/dist/bin/shell/chunks/grep-3X5B47DW.js +2 -0
- package/dist/bin/shell/chunks/gzip-VYBZGPTA.js +2 -0
- package/dist/bin/shell/chunks/head-BM7J6BEI.js +2 -0
- package/dist/bin/shell/chunks/html-to-markdown-G2FXKDLR.js +2 -0
- package/dist/bin/shell/chunks/join-5J5VA3I7.js +2 -0
- package/dist/bin/shell/chunks/jq-HYQ3KMGL.js +2 -0
- package/dist/bin/shell/chunks/js-exec-LZPKIZ5V.js +97 -0
- package/dist/bin/shell/chunks/{ls-G2PXHSNX.js → ls-WONXDVOX.js} +1 -1
- package/dist/bin/shell/chunks/md5sum-GVZ66MRR.js +2 -0
- package/dist/bin/shell/chunks/nl-XLPXDHHK.js +2 -0
- package/dist/bin/shell/chunks/od-CRBL7ZML.js +2 -0
- package/dist/bin/shell/chunks/paste-7MEIW3PG.js +2 -0
- package/dist/bin/shell/chunks/{printf-P3QVL4IO.js → printf-NA7DYZBO.js} +1 -1
- package/dist/bin/shell/chunks/python3-BBQ4SVHU.js +12 -0
- package/dist/bin/shell/chunks/rev-6LTZEDBA.js +2 -0
- package/dist/bin/shell/chunks/rg-UPQTBQZR.js +2 -0
- package/dist/bin/shell/chunks/sed-OKEUW2KT.js +2 -0
- package/dist/bin/shell/chunks/sha1sum-HFI2SRA4.js +2 -0
- package/dist/bin/shell/chunks/sha256sum-N44D3OCP.js +2 -0
- package/dist/bin/shell/chunks/sort-ES3NRFJA.js +2 -0
- package/dist/bin/shell/chunks/split-QFBCCUR5.js +2 -0
- package/dist/bin/shell/chunks/sqlite3-V4SEWTIR.js +2 -0
- package/dist/bin/shell/chunks/strings-YGI6HF5M.js +2 -0
- package/dist/bin/shell/chunks/tac-HWXFWOGO.js +2 -0
- package/dist/bin/shell/chunks/tail-YX6MELZ5.js +2 -0
- package/dist/bin/shell/chunks/tar-UO62YC6N.js +2 -0
- package/dist/bin/shell/chunks/tee-XKJM7HV7.js +2 -0
- package/dist/bin/shell/chunks/time-RPVNTV72.js +2 -0
- package/dist/bin/shell/chunks/timeout-4QMASFQG.js +2 -0
- package/dist/bin/shell/chunks/tr-A6IXSBQX.js +2 -0
- package/dist/bin/shell/chunks/unexpand-UCJETXUX.js +2 -0
- package/dist/bin/shell/chunks/uniq-2KXDTNDX.js +2 -0
- package/dist/bin/shell/chunks/wc-KTXPMRYY.js +2 -0
- package/dist/bin/shell/chunks/xan-IHA7IHBM.js +2 -0
- package/dist/bin/shell/chunks/xan-view-JFFJAU35.js +2 -0
- package/dist/bin/shell/chunks/xargs-EWL5DXR3.js +2 -0
- package/dist/bin/shell/chunks/yq-LDGFI4EM.js +2 -0
- package/dist/bin/shell/shell.js +274 -274
- package/dist/browser.d.ts +1 -0
- package/dist/bundle/browser.js +676 -674
- package/dist/bundle/chunks/awk2-RXRC54TM.js +1 -0
- package/dist/bundle/chunks/base64-FJOOBRMC.js +1 -0
- package/dist/bundle/chunks/bash-4WLDO24C.js +1 -0
- package/dist/bundle/chunks/cat-VQEWZT5O.js +1 -0
- package/dist/bundle/chunks/chunk-2TRDZQLB.js +17 -0
- package/dist/bundle/chunks/chunk-5DI2YNX7.js +10 -0
- package/dist/bundle/chunks/chunk-6N5CMDSQ.js +9 -0
- package/dist/bundle/chunks/{chunk-F23WWYKW.js → chunk-7P5JCWX5.js} +5 -5
- package/dist/bundle/chunks/chunk-7RIQPKJE.js +2 -0
- package/dist/bundle/chunks/{chunk-APT7OOP2.js → chunk-7ZUB672J.js} +1 -1
- package/dist/bundle/chunks/chunk-AH77CRWX.js +1 -0
- package/dist/bundle/chunks/{chunk-YNYSPYQ5.js → chunk-B74TABJS.js} +13 -13
- package/dist/bundle/chunks/{chunk-QJ7O6ZN3.js → chunk-BAXBSHE5.js} +3 -3
- package/dist/bundle/chunks/{chunk-FEIOJCZD.js → chunk-BGSUD5R5.js} +1 -1
- package/dist/bundle/chunks/chunk-CHRGJY5U.js +10 -0
- package/dist/bundle/chunks/chunk-CYJSRRNG.js +4 -0
- package/dist/bundle/chunks/chunk-CZYXTGMR.js +139 -0
- package/dist/bundle/chunks/{chunk-OL3S66CO.js → chunk-DFS4EHCX.js} +23 -23
- package/dist/bundle/chunks/chunk-DIB23V32.js +8 -0
- package/dist/bundle/chunks/chunk-DMJSDIQO.js +6 -0
- package/dist/bundle/chunks/chunk-DRGAV7ST.js +11 -0
- package/dist/bundle/chunks/chunk-DZCB42NK.js +2 -0
- package/dist/bundle/chunks/{chunk-DCAAORBQ.js → chunk-EIUAYBIC.js} +1 -1
- package/dist/bundle/chunks/chunk-G22IYMH5.js +16 -0
- package/dist/bundle/chunks/chunk-GFPLGF6W.js +5 -0
- package/dist/bundle/chunks/chunk-HCKS7PTH.js +10 -0
- package/dist/bundle/chunks/{chunk-5V6VZH6T.js → chunk-HKY7IG73.js} +1 -1
- package/dist/bundle/chunks/chunk-HL6NGDO2.js +22 -0
- package/dist/bundle/chunks/chunk-IIJDG7QW.js +13 -0
- package/dist/bundle/chunks/{chunk-Z6LRHWXI.js → chunk-JKZMQVSS.js} +7 -7
- package/dist/bundle/chunks/chunk-JMNW4NXI.js +8 -0
- package/dist/bundle/chunks/{chunk-LPQPILI2.js → chunk-K6LIBGJA.js} +1 -1
- package/dist/bundle/chunks/chunk-KBZ5NVXE.js +5 -0
- package/dist/bundle/chunks/chunk-KK2SFKTN.js +13 -0
- package/dist/bundle/chunks/{chunk-BBXLRYSX.js → chunk-KRBPSX3W.js} +1 -1
- package/dist/bundle/chunks/{chunk-LTZRCH7N.js → chunk-LBUR6QMO.js} +1 -1
- package/dist/bundle/chunks/chunk-MBDW4C5R.js +8 -0
- package/dist/bundle/chunks/chunk-MIV7TH6W.js +32 -0
- package/dist/bundle/chunks/chunk-MOLNCDQJ.js +5 -0
- package/dist/bundle/chunks/chunk-NUY2ZGZL.js +286 -0
- package/dist/bundle/chunks/chunk-OYFKMNOH.js +4 -0
- package/dist/bundle/chunks/{chunk-62RKD26F.js → chunk-Q7DN34BC.js} +6 -6
- package/dist/bundle/chunks/chunk-R6VWJ2ZL.js +1 -0
- package/dist/bundle/chunks/chunk-RGAX6VXO.js +6 -0
- package/dist/bundle/chunks/chunk-RHD3NWJY.js +15 -0
- package/dist/bundle/chunks/chunk-S7CS4O3M.js +5 -0
- package/dist/bundle/chunks/chunk-SFQDTSOG.js +8 -0
- package/dist/bundle/chunks/{chunk-J642UCRS.js → chunk-SNN4IESC.js} +1 -1
- package/dist/bundle/chunks/{chunk-64BAICW3.js → chunk-T6RP4YO5.js} +1 -1
- package/dist/bundle/chunks/chunk-TWHVX65V.js +4 -0
- package/dist/bundle/chunks/chunk-U2ATS66X.js +4 -0
- package/dist/bundle/chunks/chunk-UGMTY5A7.js +15 -0
- package/dist/bundle/chunks/chunk-UKBVVIW7.js +62 -0
- package/dist/bundle/chunks/chunk-USP7VSKV.js +12 -0
- package/dist/bundle/chunks/{chunk-OARHFVLG.js → chunk-UTKQPLMD.js} +13 -13
- package/dist/bundle/chunks/{chunk-YFG2CMIF.js → chunk-V5MWI2OL.js} +1 -1
- package/dist/bundle/chunks/{chunk-XKQRETAK.js → chunk-WEZK5ELQ.js} +1 -1
- package/dist/bundle/chunks/{chunk-YTNYSM6T.js → chunk-WURK7XMI.js} +4 -4
- package/dist/bundle/chunks/chunk-WZG5CB4V.js +7 -0
- package/dist/bundle/chunks/chunk-XUZRLD2X.js +35 -0
- package/dist/bundle/chunks/chunk-YDILEREV.js +7 -0
- package/dist/bundle/chunks/chunk-YXVMSFJA.js +13 -0
- package/dist/bundle/chunks/column-DCCLCHUR.js +1 -0
- package/dist/bundle/chunks/comm-AXP77KC4.js +1 -0
- package/dist/bundle/chunks/{curl-COE4TZE6.js → curl-47BFPSFW.js} +8 -8
- package/dist/bundle/chunks/cut-RBX7IXC7.js +1 -0
- package/dist/bundle/chunks/diff-AYXX5MI5.js +1 -0
- package/dist/bundle/chunks/env-GBSZDQLS.js +1 -0
- package/dist/bundle/chunks/expand-UMGRCDTC.js +1 -0
- package/dist/bundle/chunks/{expansion-ENLSRCXJ.js → expansion-VBDYWVZR.js} +1 -1
- package/dist/bundle/chunks/{expr-5T3UU5KE.js → expr-YYCVMXE3.js} +1 -1
- package/dist/bundle/chunks/{file-ZIGAJ4YS.js → file-IGDTDPLG.js} +1 -1
- package/dist/bundle/chunks/find-DH2ALKQS.js +1 -0
- package/dist/bundle/chunks/flag-coverage-WZWBNOJT.js +1 -0
- package/dist/bundle/chunks/fold-V23GDLZD.js +1 -0
- package/dist/bundle/chunks/grep-7CE2SS3X.js +1 -0
- package/dist/bundle/chunks/gzip-EVI6YRMT.js +1 -0
- package/dist/bundle/chunks/head-FG33BE3W.js +1 -0
- package/dist/bundle/chunks/html-to-markdown-AQHC3PHD.js +1 -0
- package/dist/bundle/chunks/join-TLHD7S7W.js +1 -0
- package/dist/bundle/chunks/jq-OKCSVTHN.js +1 -0
- package/dist/bundle/chunks/js-exec-2U7NEXAP.js +96 -0
- package/dist/bundle/chunks/js-exec-worker.js +27 -185
- package/dist/bundle/chunks/md5sum-XMCB7L5Z.js +1 -0
- package/dist/bundle/chunks/nl-LBU6FPPF.js +1 -0
- package/dist/bundle/chunks/od-O6TPXWVX.js +1 -0
- package/dist/bundle/chunks/paste-HIF3YKHC.js +1 -0
- package/dist/bundle/chunks/python3-ZR6W2FR3.js +11 -0
- package/dist/bundle/chunks/rev-SKETTPXH.js +1 -0
- package/dist/bundle/chunks/rg-GMXITNCP.js +1 -0
- package/dist/bundle/chunks/sed-YRQXQDMQ.js +1 -0
- package/dist/bundle/chunks/sha1sum-ZHNS7PS4.js +1 -0
- package/dist/bundle/chunks/sha256sum-YWE2HB65.js +1 -0
- package/dist/bundle/chunks/sort-5KALNK6P.js +1 -0
- package/dist/bundle/chunks/split-4CXZNBGE.js +1 -0
- package/dist/bundle/chunks/sqlite3-FXN2MHWU.js +1 -0
- package/dist/bundle/chunks/sqlite3-worker.js +1728 -0
- package/dist/bundle/chunks/strings-7VYWRFIZ.js +1 -0
- package/dist/bundle/chunks/tac-74F3WHUM.js +1 -0
- package/dist/bundle/chunks/tail-EDLAF4WW.js +1 -0
- package/dist/bundle/chunks/tar-RKYTUGDT.js +1 -0
- package/dist/bundle/chunks/tee-DUMXETDQ.js +1 -0
- package/dist/bundle/chunks/time-U22WPHDM.js +1 -0
- package/dist/bundle/chunks/timeout-PWE4AOYD.js +1 -0
- package/dist/bundle/chunks/tr-2QSZN4JB.js +1 -0
- package/dist/bundle/chunks/unexpand-ZTD2RXS2.js +1 -0
- package/dist/bundle/chunks/uniq-DCP6SV3B.js +1 -0
- package/dist/bundle/chunks/wc-J6YO4AFR.js +1 -0
- package/dist/bundle/chunks/worker.js +28 -9
- package/dist/bundle/chunks/xan-74G4ZYYZ.js +1 -0
- package/dist/bundle/chunks/xan-view-FLG5O7II.js +1 -0
- package/dist/bundle/chunks/xargs-LB2QOP6N.js +1 -0
- package/dist/bundle/chunks/yq-4NJ2P5VT.js +1 -0
- package/dist/bundle/index.cjs +984 -985
- package/dist/bundle/index.js +271 -271
- package/dist/commands/js-exec/{worker.d.ts → js-exec-worker.d.ts} +4 -10
- package/dist/commands/js-exec/js-exec.d.ts +1 -19
- package/dist/commands/search-engine/matcher.d.ts +6 -0
- package/dist/commands/search-engine/regex.d.ts +13 -0
- package/dist/commands/sqlite3/sqlite3.d.ts +1 -0
- package/dist/commands/sqlite3/worker.js +1728 -0
- package/dist/commands/tar/bzip2-compress.d.ts +17 -0
- package/dist/commands/worker-bridge/sync-backend.d.ts +2 -1
- package/dist/encoding.d.ts +115 -0
- package/dist/fs/in-memory-fs/in-memory-fs.d.ts +2 -0
- package/dist/fs/interface.d.ts +23 -1
- package/dist/fs/mountable-fs/mountable-fs.d.ts +2 -0
- package/dist/fs/overlay-fs/overlay-fs.d.ts +2 -0
- package/dist/fs/read-write-fs/read-write-fs.d.ts +2 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/interpreter/interpreter.d.ts +2 -7
- package/dist/interpreter/types.d.ts +3 -8
- package/dist/network/dns-pin.d.ts +43 -0
- package/dist/network/types.d.ts +2 -1
- package/dist/types.d.ts +48 -21
- package/dist/utils/file-reader.d.ts +12 -5
- package/package.json +36 -40
- package/vendor/cpython-emscripten/python.wasm +0 -0
- package/dist/bin/chunks/awk2-VTJMI54B.js +0 -2
- package/dist/bin/chunks/base64-43M2R3GA.js +0 -2
- package/dist/bin/chunks/bash-6ZHZ6BX7.js +0 -2
- package/dist/bin/chunks/cat-XZIJZXKP.js +0 -2
- package/dist/bin/chunks/chunk-26NO42TF.js +0 -14
- package/dist/bin/chunks/chunk-5G2VOPPJ.js +0 -7
- package/dist/bin/chunks/chunk-5WFYIUU2.js +0 -3
- package/dist/bin/chunks/chunk-AAW7UMPO.js +0 -9
- package/dist/bin/chunks/chunk-B3RU2PUI.js +0 -140
- package/dist/bin/chunks/chunk-CGE2EHYP.js +0 -5
- package/dist/bin/chunks/chunk-CM4532DS.js +0 -36
- package/dist/bin/chunks/chunk-CQG2HEAL.js +0 -5
- package/dist/bin/chunks/chunk-EUXCM6C4.js +0 -12
- package/dist/bin/chunks/chunk-F3LGZXLQ.js +0 -9
- package/dist/bin/chunks/chunk-FA2CHD73.js +0 -16
- package/dist/bin/chunks/chunk-FLPVVSN5.js +0 -5
- package/dist/bin/chunks/chunk-FSZWFMB4.js +0 -16
- package/dist/bin/chunks/chunk-G43H2WGH.js +0 -17
- package/dist/bin/chunks/chunk-GO6FXSC4.js +0 -6
- package/dist/bin/chunks/chunk-GZHFXDDO.js +0 -10
- package/dist/bin/chunks/chunk-HJEHIH4P.js +0 -33
- package/dist/bin/chunks/chunk-JQBC3FXE.js +0 -8
- package/dist/bin/chunks/chunk-L2JBII6Z.js +0 -287
- package/dist/bin/chunks/chunk-LGJM5YFT.js +0 -17
- package/dist/bin/chunks/chunk-LMK6G2HH.js +0 -8
- package/dist/bin/chunks/chunk-MNMRGJJM.js +0 -11
- package/dist/bin/chunks/chunk-MRP4ZCD7.js +0 -6
- package/dist/bin/chunks/chunk-MXVNCVD6.js +0 -30
- package/dist/bin/chunks/chunk-MY5PY2PL.js +0 -2
- package/dist/bin/chunks/chunk-N5OTVT4F.js +0 -23
- package/dist/bin/chunks/chunk-OBI37ZY4.js +0 -9
- package/dist/bin/chunks/chunk-P6GNZPVW.js +0 -19
- package/dist/bin/chunks/chunk-RJSAGJQJ.js +0 -11
- package/dist/bin/chunks/chunk-ROJPSS6N.js +0 -3
- package/dist/bin/chunks/chunk-S7OHMN3F.js +0 -6
- package/dist/bin/chunks/chunk-VHUYNUT7.js +0 -13
- package/dist/bin/chunks/chunk-WS6P4H4S.js +0 -63
- package/dist/bin/chunks/chunk-WWZVR5NN.js +0 -6
- package/dist/bin/chunks/chunk-YEKSVVRC.js +0 -11
- package/dist/bin/chunks/chunk-YFPDB4PH.js +0 -9
- package/dist/bin/chunks/chunk-ZA4HUKJ3.js +0 -13
- package/dist/bin/chunks/chunk-ZKC5HQYO.js +0 -14
- package/dist/bin/chunks/column-XGV32UPN.js +0 -2
- package/dist/bin/chunks/comm-R3F3Z5DX.js +0 -2
- package/dist/bin/chunks/cut-5EY2XPXX.js +0 -2
- package/dist/bin/chunks/diff-LE7GMFZD.js +0 -2
- package/dist/bin/chunks/env-NTPN5QYM.js +0 -2
- package/dist/bin/chunks/expand-26XPP5KB.js +0 -2
- package/dist/bin/chunks/find-GAYRV4IF.js +0 -2
- package/dist/bin/chunks/flag-coverage-LBMWMYOO.js +0 -2
- package/dist/bin/chunks/fold-XSVNTAWH.js +0 -2
- package/dist/bin/chunks/grep-OZJTRD4D.js +0 -2
- package/dist/bin/chunks/gzip-LHOO65AN.js +0 -2
- package/dist/bin/chunks/head-YMNRW3F3.js +0 -2
- package/dist/bin/chunks/html-to-markdown-WVZA3MCP.js +0 -2
- package/dist/bin/chunks/join-Y4Q5WVVE.js +0 -2
- package/dist/bin/chunks/jq-FIV5Q5T4.js +0 -2
- package/dist/bin/chunks/js-exec-RGKNWHHL.js +0 -100
- package/dist/bin/chunks/md5sum-NCLXV2S3.js +0 -2
- package/dist/bin/chunks/nl-XH3L75DR.js +0 -2
- package/dist/bin/chunks/od-52FBC34W.js +0 -2
- package/dist/bin/chunks/paste-3UVLMQ2K.js +0 -2
- package/dist/bin/chunks/python3-QOJU2POC.js +0 -12
- package/dist/bin/chunks/rev-UHEPS2UL.js +0 -2
- package/dist/bin/chunks/rg-C6KMBFNG.js +0 -2
- package/dist/bin/chunks/sed-HALRQZKY.js +0 -2
- package/dist/bin/chunks/sha1sum-BHNJ5ALF.js +0 -2
- package/dist/bin/chunks/sha256sum-HJJ3NJ5L.js +0 -2
- package/dist/bin/chunks/sort-7GENYU2I.js +0 -2
- package/dist/bin/chunks/split-YWV64TJH.js +0 -2
- package/dist/bin/chunks/sqlite3-CVNFMP3Z.js +0 -2
- package/dist/bin/chunks/strings-XXKZCWY5.js +0 -2
- package/dist/bin/chunks/tac-T42SKDDI.js +0 -2
- package/dist/bin/chunks/tail-V537TDFR.js +0 -2
- package/dist/bin/chunks/tar-TOWX2TDU.js +0 -2
- package/dist/bin/chunks/tee-HK2SYCAR.js +0 -2
- package/dist/bin/chunks/time-5R4QWCYF.js +0 -2
- package/dist/bin/chunks/timeout-Z24MNWOP.js +0 -2
- package/dist/bin/chunks/tr-4FPGAEVB.js +0 -2
- package/dist/bin/chunks/unexpand-OYZ7KOYR.js +0 -2
- package/dist/bin/chunks/uniq-TMSAIZM3.js +0 -2
- package/dist/bin/chunks/wc-ZIV3TFVG.js +0 -2
- package/dist/bin/chunks/xan-MOZFJGMY.js +0 -2
- package/dist/bin/chunks/xan-view-5SZBYPLG.js +0 -2
- package/dist/bin/chunks/xargs-SCYIFXOW.js +0 -2
- package/dist/bin/chunks/yq-Q47JUWL6.js +0 -2
- package/dist/bin/shell/chunks/awk2-VTJMI54B.js +0 -2
- package/dist/bin/shell/chunks/base64-43M2R3GA.js +0 -2
- package/dist/bin/shell/chunks/bash-6ZHZ6BX7.js +0 -2
- package/dist/bin/shell/chunks/cat-XZIJZXKP.js +0 -2
- package/dist/bin/shell/chunks/chunk-26NO42TF.js +0 -14
- package/dist/bin/shell/chunks/chunk-5G2VOPPJ.js +0 -7
- package/dist/bin/shell/chunks/chunk-5WFYIUU2.js +0 -3
- package/dist/bin/shell/chunks/chunk-AAW7UMPO.js +0 -9
- package/dist/bin/shell/chunks/chunk-B3RU2PUI.js +0 -140
- package/dist/bin/shell/chunks/chunk-CGE2EHYP.js +0 -5
- package/dist/bin/shell/chunks/chunk-CM4532DS.js +0 -36
- package/dist/bin/shell/chunks/chunk-CQG2HEAL.js +0 -5
- package/dist/bin/shell/chunks/chunk-D64U2VGQ.js +0 -2
- package/dist/bin/shell/chunks/chunk-EUXCM6C4.js +0 -12
- package/dist/bin/shell/chunks/chunk-F3LGZXLQ.js +0 -9
- package/dist/bin/shell/chunks/chunk-FA2CHD73.js +0 -16
- package/dist/bin/shell/chunks/chunk-FLPVVSN5.js +0 -5
- package/dist/bin/shell/chunks/chunk-FSZWFMB4.js +0 -16
- package/dist/bin/shell/chunks/chunk-G43H2WGH.js +0 -17
- package/dist/bin/shell/chunks/chunk-GO6FXSC4.js +0 -6
- package/dist/bin/shell/chunks/chunk-GZHFXDDO.js +0 -10
- package/dist/bin/shell/chunks/chunk-HJEHIH4P.js +0 -33
- package/dist/bin/shell/chunks/chunk-JQBC3FXE.js +0 -8
- package/dist/bin/shell/chunks/chunk-L2JBII6Z.js +0 -287
- package/dist/bin/shell/chunks/chunk-LGJM5YFT.js +0 -17
- package/dist/bin/shell/chunks/chunk-LMK6G2HH.js +0 -8
- package/dist/bin/shell/chunks/chunk-MNMRGJJM.js +0 -11
- package/dist/bin/shell/chunks/chunk-MRP4ZCD7.js +0 -6
- package/dist/bin/shell/chunks/chunk-MXVNCVD6.js +0 -30
- package/dist/bin/shell/chunks/chunk-N5OTVT4F.js +0 -23
- package/dist/bin/shell/chunks/chunk-OBI37ZY4.js +0 -9
- package/dist/bin/shell/chunks/chunk-P6GNZPVW.js +0 -19
- package/dist/bin/shell/chunks/chunk-RJSAGJQJ.js +0 -11
- package/dist/bin/shell/chunks/chunk-ROJPSS6N.js +0 -3
- package/dist/bin/shell/chunks/chunk-S7OHMN3F.js +0 -6
- package/dist/bin/shell/chunks/chunk-VHUYNUT7.js +0 -13
- package/dist/bin/shell/chunks/chunk-WS6P4H4S.js +0 -63
- package/dist/bin/shell/chunks/chunk-WWZVR5NN.js +0 -6
- package/dist/bin/shell/chunks/chunk-YEKSVVRC.js +0 -11
- package/dist/bin/shell/chunks/chunk-YFPDB4PH.js +0 -9
- package/dist/bin/shell/chunks/chunk-ZA4HUKJ3.js +0 -13
- package/dist/bin/shell/chunks/chunk-ZKC5HQYO.js +0 -14
- package/dist/bin/shell/chunks/column-XGV32UPN.js +0 -2
- package/dist/bin/shell/chunks/comm-R3F3Z5DX.js +0 -2
- package/dist/bin/shell/chunks/cut-5EY2XPXX.js +0 -2
- package/dist/bin/shell/chunks/diff-LE7GMFZD.js +0 -2
- package/dist/bin/shell/chunks/env-NTPN5QYM.js +0 -2
- package/dist/bin/shell/chunks/expand-26XPP5KB.js +0 -2
- package/dist/bin/shell/chunks/find-GAYRV4IF.js +0 -2
- package/dist/bin/shell/chunks/flag-coverage-LBMWMYOO.js +0 -2
- package/dist/bin/shell/chunks/fold-XSVNTAWH.js +0 -2
- package/dist/bin/shell/chunks/grep-OZJTRD4D.js +0 -2
- package/dist/bin/shell/chunks/gzip-LHOO65AN.js +0 -2
- package/dist/bin/shell/chunks/head-YMNRW3F3.js +0 -2
- package/dist/bin/shell/chunks/html-to-markdown-WVZA3MCP.js +0 -2
- package/dist/bin/shell/chunks/join-Y4Q5WVVE.js +0 -2
- package/dist/bin/shell/chunks/jq-FIV5Q5T4.js +0 -2
- package/dist/bin/shell/chunks/js-exec-DUGJM6RL.js +0 -100
- package/dist/bin/shell/chunks/md5sum-NCLXV2S3.js +0 -2
- package/dist/bin/shell/chunks/nl-XH3L75DR.js +0 -2
- package/dist/bin/shell/chunks/od-52FBC34W.js +0 -2
- package/dist/bin/shell/chunks/paste-3UVLMQ2K.js +0 -2
- package/dist/bin/shell/chunks/python3-O4VTP6TD.js +0 -12
- package/dist/bin/shell/chunks/rev-UHEPS2UL.js +0 -2
- package/dist/bin/shell/chunks/rg-C6KMBFNG.js +0 -2
- package/dist/bin/shell/chunks/sed-HALRQZKY.js +0 -2
- package/dist/bin/shell/chunks/sha1sum-BHNJ5ALF.js +0 -2
- package/dist/bin/shell/chunks/sha256sum-HJJ3NJ5L.js +0 -2
- package/dist/bin/shell/chunks/sort-7GENYU2I.js +0 -2
- package/dist/bin/shell/chunks/split-YWV64TJH.js +0 -2
- package/dist/bin/shell/chunks/sqlite3-CVNFMP3Z.js +0 -2
- package/dist/bin/shell/chunks/strings-XXKZCWY5.js +0 -2
- package/dist/bin/shell/chunks/tac-T42SKDDI.js +0 -2
- package/dist/bin/shell/chunks/tail-V537TDFR.js +0 -2
- package/dist/bin/shell/chunks/tar-TOWX2TDU.js +0 -2
- package/dist/bin/shell/chunks/tee-HK2SYCAR.js +0 -2
- package/dist/bin/shell/chunks/time-5R4QWCYF.js +0 -2
- package/dist/bin/shell/chunks/timeout-Z24MNWOP.js +0 -2
- package/dist/bin/shell/chunks/tr-4FPGAEVB.js +0 -2
- package/dist/bin/shell/chunks/unexpand-OYZ7KOYR.js +0 -2
- package/dist/bin/shell/chunks/uniq-TMSAIZM3.js +0 -2
- package/dist/bin/shell/chunks/wc-ZIV3TFVG.js +0 -2
- package/dist/bin/shell/chunks/xan-MOZFJGMY.js +0 -2
- package/dist/bin/shell/chunks/xan-view-5SZBYPLG.js +0 -2
- package/dist/bin/shell/chunks/xargs-SCYIFXOW.js +0 -2
- package/dist/bin/shell/chunks/yq-Q47JUWL6.js +0 -2
- package/dist/bundle/chunks/awk2-POPGKRAI.js +0 -1
- package/dist/bundle/chunks/base64-4YMZCVJ5.js +0 -1
- package/dist/bundle/chunks/bash-IJWYRKFO.js +0 -1
- package/dist/bundle/chunks/cat-RDUMLXKC.js +0 -1
- package/dist/bundle/chunks/chunk-55VFSPNA.js +0 -2
- package/dist/bundle/chunks/chunk-7L36YK2X.js +0 -2
- package/dist/bundle/chunks/chunk-A7ICOL4V.js +0 -13
- package/dist/bundle/chunks/chunk-B6O2PIY4.js +0 -10
- package/dist/bundle/chunks/chunk-CR5AFCPT.js +0 -22
- package/dist/bundle/chunks/chunk-D4J545R4.js +0 -11
- package/dist/bundle/chunks/chunk-D6CWQ5DW.js +0 -5
- package/dist/bundle/chunks/chunk-EIZGF4BS.js +0 -8
- package/dist/bundle/chunks/chunk-F55TLFGB.js +0 -9
- package/dist/bundle/chunks/chunk-GXVXFKBA.js +0 -5
- package/dist/bundle/chunks/chunk-HDQ56CKY.js +0 -15
- package/dist/bundle/chunks/chunk-HWBSOZZR.js +0 -35
- package/dist/bundle/chunks/chunk-JVPRLUMK.js +0 -7
- package/dist/bundle/chunks/chunk-KMEYNNUA.js +0 -15
- package/dist/bundle/chunks/chunk-LWEGUNWT.js +0 -7
- package/dist/bundle/chunks/chunk-MDLLFABN.js +0 -4
- package/dist/bundle/chunks/chunk-MHTUABJP.js +0 -8
- package/dist/bundle/chunks/chunk-MYE6AGBJ.js +0 -16
- package/dist/bundle/chunks/chunk-NAERJDUW.js +0 -8
- package/dist/bundle/chunks/chunk-NYQYO467.js +0 -32
- package/dist/bundle/chunks/chunk-PP6PSHAB.js +0 -4
- package/dist/bundle/chunks/chunk-PYSFUGCK.js +0 -10
- package/dist/bundle/chunks/chunk-QCDB2VPH.js +0 -6
- package/dist/bundle/chunks/chunk-SDNKECQQ.js +0 -5
- package/dist/bundle/chunks/chunk-TLSUDHID.js +0 -6
- package/dist/bundle/chunks/chunk-TOMNU26N.js +0 -4
- package/dist/bundle/chunks/chunk-TXBZCHCQ.js +0 -5
- package/dist/bundle/chunks/chunk-UNYNJIFU.js +0 -139
- package/dist/bundle/chunks/chunk-VJFXDYWH.js +0 -10
- package/dist/bundle/chunks/chunk-VLGZJRPG.js +0 -16
- package/dist/bundle/chunks/chunk-VYOJP4TV.js +0 -13
- package/dist/bundle/chunks/chunk-WKFATFPP.js +0 -4
- package/dist/bundle/chunks/chunk-XHM67O4N.js +0 -1
- package/dist/bundle/chunks/chunk-XORM457F.js +0 -286
- package/dist/bundle/chunks/chunk-YCFVLTST.js +0 -12
- package/dist/bundle/chunks/chunk-YS3AZT3J.js +0 -8
- package/dist/bundle/chunks/chunk-Z7JVV2SM.js +0 -12
- package/dist/bundle/chunks/chunk-ZXL7TQLN.js +0 -62
- package/dist/bundle/chunks/column-WLPMMSTS.js +0 -1
- package/dist/bundle/chunks/comm-5SLSESQG.js +0 -1
- package/dist/bundle/chunks/cut-OPC3VAGB.js +0 -1
- package/dist/bundle/chunks/diff-HJF2MPDN.js +0 -1
- package/dist/bundle/chunks/env-5EPCWSXR.js +0 -1
- package/dist/bundle/chunks/expand-DTNXU4LQ.js +0 -1
- package/dist/bundle/chunks/find-TPUOAIUQ.js +0 -1
- package/dist/bundle/chunks/flag-coverage-LMTH7T5F.js +0 -1
- package/dist/bundle/chunks/fold-LDSORVYE.js +0 -1
- package/dist/bundle/chunks/grep-3AIAIJVR.js +0 -1
- package/dist/bundle/chunks/gzip-AQXSGOVS.js +0 -1
- package/dist/bundle/chunks/head-HT2B6D2J.js +0 -1
- package/dist/bundle/chunks/html-to-markdown-TFCECAGV.js +0 -1
- package/dist/bundle/chunks/join-GG2LDHE5.js +0 -1
- package/dist/bundle/chunks/jq-ODXZBPLY.js +0 -1
- package/dist/bundle/chunks/js-exec-LSIPMWTQ.js +0 -99
- package/dist/bundle/chunks/md5sum-INMIK4DX.js +0 -1
- package/dist/bundle/chunks/nl-U5YJDM32.js +0 -1
- package/dist/bundle/chunks/od-VJEF2UR5.js +0 -1
- package/dist/bundle/chunks/paste-7N6AFSDS.js +0 -1
- package/dist/bundle/chunks/python3-5F2XPEW4.js +0 -11
- package/dist/bundle/chunks/rev-XOSYPP45.js +0 -1
- package/dist/bundle/chunks/rg-FOQSCCX3.js +0 -1
- package/dist/bundle/chunks/sed-VFTTATXJ.js +0 -1
- package/dist/bundle/chunks/sha1sum-VJPNLNU6.js +0 -1
- package/dist/bundle/chunks/sha256sum-PI32XWXY.js +0 -1
- package/dist/bundle/chunks/sort-DCNRDA7U.js +0 -1
- package/dist/bundle/chunks/split-SITCSYCZ.js +0 -1
- package/dist/bundle/chunks/sqlite3-56UMWEY3.js +0 -1
- package/dist/bundle/chunks/strings-7PLOGTPD.js +0 -1
- package/dist/bundle/chunks/tac-SJGXQ4T2.js +0 -1
- package/dist/bundle/chunks/tail-S5ULNTJU.js +0 -1
- package/dist/bundle/chunks/tar-232RCEFK.js +0 -1
- package/dist/bundle/chunks/tee-O7VXZDCO.js +0 -1
- package/dist/bundle/chunks/time-DEUO3QV2.js +0 -1
- package/dist/bundle/chunks/timeout-VRKMCG72.js +0 -1
- package/dist/bundle/chunks/tr-2HXZRDSW.js +0 -1
- package/dist/bundle/chunks/unexpand-RGTMIGZM.js +0 -1
- package/dist/bundle/chunks/uniq-SUNANL47.js +0 -1
- package/dist/bundle/chunks/wc-TQB3VNOX.js +0 -1
- package/dist/bundle/chunks/xan-BXDXYEIB.js +0 -1
- package/dist/bundle/chunks/xan-view-ECQUO7AJ.js +0 -1
- package/dist/bundle/chunks/xargs-I6EZUCYF.js +0 -1
- package/dist/bundle/chunks/yq-MJMAR36V.js +0 -1
- package/dist/commands/js-exec/executor-adapter.d.ts +0 -66
- package/dist/executor-init.d.ts +0 -19
- package/vendor/executor/executor-sdk-bundle.d.mts +0 -18
- package/vendor/executor/executor-sdk-bundle.mjs +0 -512
- package/vendor/executor/openapi-extractor-wasm/openapi_extractor_bg.wasm +0 -0
- /package/dist/bin/chunks/{chunk-QSDVMMYI.js → chunk-4CFAYBLV.js} +0 -0
- /package/dist/bin/chunks/{chunk-ND23BJUM.js → chunk-LCDPWJBA.js} +0 -0
- /package/dist/bin/shell/chunks/{chunk-QSDVMMYI.js → chunk-4CFAYBLV.js} +0 -0
- /package/dist/bin/shell/chunks/{chunk-ND23BJUM.js → chunk-LCDPWJBA.js} +0 -0
- /package/dist/bundle/chunks/{chunk-SYMJJMQ4.js → chunk-PXTK5WE2.js} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a,b}from"./chunk-L2JBII6Z.js";import"./chunk-QSDVMMYI.js";import"./chunk-ZO5PSLKR.js";import"./chunk-V7ZOPVQS.js";import"./chunk-4PRVMER6.js";import"./chunk-MO4RPBN2.js";import"./chunk-YU6OGPZR.js";import"./chunk-SE4C7FJY.js";import"./chunk-6KZRLMG3.js";import"./chunk-RLNOQILG.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as yqCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-OARHFVLG.js";import"./chunk-OJDRYQWQ.js";import"./chunk-24IMIIXA.js";import"./chunk-5QMZ5MUS.js";import"./chunk-YNYSPYQ5.js";import"./chunk-GFQRA5P5.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as awkCommand2,b as flagsForFuzzing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-QJ7O6ZN3.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as base64Command,b as flagsForFuzzing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-D6CWQ5DW.js";import"./chunk-OJDRYQWQ.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as bashCommand,c as flagsForFuzzing,b as shCommand,d as shFlagsForFuzzing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-TXBZCHCQ.js";import"./chunk-7L36YK2X.js";import"./chunk-NUFRM6SI.js";import"./chunk-HWKDQ44K.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{a as catCommand,b as flagsForFuzzing};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./chunk-HWKDQ44K.js";import{a as p,b as l}from"./chunk-74CEPOFO.js";var u={name:"tee",summary:"read from stdin and write to stdout and files",usage:"tee [OPTION]... [FILE]...",options:["-a, --append append to the given FILEs, do not overwrite"," --help display this help and exit"]},m={append:{short:"a",long:"append",type:"boolean"}},y={name:"tee",async execute(n,e){if(l(n))return p(u);let t=d("tee",n,m);if(!t.ok)return t.error;let{append:f}=t.result.flags,c=t.result.positional,o=e.stdin,r="",a=0;for(let i of c)try{let s=e.fs.resolvePath(e.cwd,i);f?await e.fs.appendFile(s,o):await e.fs.writeFile(s,o)}catch{r+=`tee: ${i}: No such file or directory
|
|
2
|
-
`,a=1}return{stdout:o,stderr:r,exitCode:a}}},w={name:"tee",flags:[{flag:"-a",type:"boolean"}],stdinType:"text",needsArgs:!0};export{y as a,w as b};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
async function y(t,n,s){let{cmdName:r,allowStdinMarker:f=!0,stopOnError:a=!1,batchSize:u=100}=s;if(n.length===0)return{files:[{filename:"",content:t.stdin}],stderr:"",exitCode:0};let i=[],c="",l=0;for(let o=0;o<n.length;o+=u){let d=n.slice(o,o+u),m=await Promise.all(d.map(async e=>{if(f&&e==="-")return{filename:"-",content:t.stdin,error:null};try{let h=t.fs.resolvePath(t.cwd,e),p=await t.fs.readFile(h,"binary");return{filename:e,content:p,error:null}}catch{return{filename:e,content:"",error:`${r}: ${e}: No such file or directory
|
|
2
|
-
`}}}));for(let e of m)if(e.error){if(c+=e.error,l=1,a)return{files:i,stderr:c,exitCode:l}}else i.push({filename:e.filename,content:e.content})}return{files:i,stderr:c,exitCode:l}}async function b(t,n,s){let r=await y(t,n,{...s,stopOnError:!0});return r.exitCode!==0?{ok:!1,error:{stdout:"",stderr:r.stderr,exitCode:r.exitCode}}:{ok:!0,content:r.files.map(a=>a.content).join("")}}export{y as a,b};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{a as j,b as y,c as g}from"./chunk-74CEPOFO.js";var v={name:"join",summary:"join lines of two files on a common field",usage:"join [OPTION]... FILE1 FILE2",description:"For each pair of input lines with identical join fields, write a line to standard output. The default join field is the first, delimited by blanks.",options:["-1 FIELD Join on this FIELD of file 1 (default: 1)","-2 FIELD Join on this FIELD of file 2 (default: 1)","-t CHAR Use CHAR as input and output field separator","-a FILENUM Also print unpairable lines from file FILENUM (1 or 2)","-v FILENUM Like -a but only output unpairable lines","-e STRING Replace missing fields with STRING","-o FORMAT Output format (comma-separated list of FILENUM.FIELD)","-i Ignore case when comparing fields"],examples:["join file1 file2 # Join on first field","join -1 2 -2 1 file1 file2 # Join file1 col 2 with file2 col 1","join -t ',' file1.csv file2.csv # Join CSV files","join -a 1 file1 file2 # Left outer join"]};function N(i,s){return s?i.split(s):i.split(/[ \t]+/).filter(n=>n.length>0)}function F(i,s,n,f){let e=N(i,s),r=e[n-1]??"";return f&&(r=r.toLowerCase()),{fields:e,joinKey:r,original:i}}function m(i,s,n){let f=n.separator??" ";if(n.outputFormat){let o=[];for(let{file:c,field:p}of n.outputFormat){let a=c===1?i:s;a&&p===0?o.push(a.joinKey):a&&a.fields[p-1]!==void 0?o.push(a.fields[p-1]):o.push(n.emptyString)}return o.join(f)}let e=[],r=i?.joinKey??s?.joinKey??"";if(e.push(r),i)for(let o=0;o<i.fields.length;o++)o!==n.field1-1&&e.push(i.fields[o]);if(s)for(let o=0;o<s.fields.length;o++)o!==n.field2-1&&e.push(s.fields[o]);return e.join(f)}function I(i){let s=i.split(","),n=[];for(let f of s){let e=f.trim().match(/^(\d+)\.(\d+)$/);if(!e)return null;let r=Number.parseInt(e[1],10),o=Number.parseInt(e[2],10);if(r!==1&&r!==2)return null;n.push({file:r,field:o})}return n}var w={name:"join",execute:async(i,s)=>{if(y(i))return j(v);let n={field1:1,field2:1,separator:null,printUnpairable:new Set,onlyUnpairable:new Set,emptyString:"",outputFormat:null,ignoreCase:!1},f=[],e=0;for(;e<i.length;){let t=i[e];if(t==="-1"&&e+1<i.length){let l=Number.parseInt(i[e+1],10);if(Number.isNaN(l)||l<1)return{exitCode:1,stdout:"",stderr:`join: invalid field number: '${i[e+1]}'
|
|
2
|
-
`};n.field1=l,e+=2}else if(t==="-2"&&e+1<i.length){let l=Number.parseInt(i[e+1],10);if(Number.isNaN(l)||l<1)return{exitCode:1,stdout:"",stderr:`join: invalid field number: '${i[e+1]}'
|
|
3
|
-
`};n.field2=l,e+=2}else if((t==="-t"||t==="--field-separator")&&e+1<i.length)n.separator=i[e+1],e+=2;else if(t.startsWith("-t")&&t.length>2)n.separator=t.slice(2),e++;else if(t==="-a"&&e+1<i.length){let l=Number.parseInt(i[e+1],10);if(l!==1&&l!==2)return{exitCode:1,stdout:"",stderr:`join: invalid file number: '${i[e+1]}'
|
|
4
|
-
`};n.printUnpairable.add(l),e+=2}else if(t.match(/^-a[12]$/))n.printUnpairable.add(Number.parseInt(t[2],10)),e++;else if(t==="-v"&&e+1<i.length){let l=Number.parseInt(i[e+1],10);if(l!==1&&l!==2)return{exitCode:1,stdout:"",stderr:`join: invalid file number: '${i[e+1]}'
|
|
5
|
-
`};n.onlyUnpairable.add(l),e+=2}else if(t.match(/^-v[12]$/))n.onlyUnpairable.add(Number.parseInt(t[2],10)),e++;else if(t==="-e"&&e+1<i.length)n.emptyString=i[e+1],e+=2;else if(t==="-o"&&e+1<i.length){let l=I(i[e+1]);if(!l)return{exitCode:1,stdout:"",stderr:`join: invalid field spec: '${i[e+1]}'
|
|
6
|
-
`};n.outputFormat=l,e+=2}else if(t==="-i"||t==="--ignore-case")n.ignoreCase=!0,e++;else if(t==="--"){f.push(...i.slice(e+1));break}else{if(t.startsWith("-")&&t!=="-")return g("join",t);f.push(t),e++}}if(f.length!==2)return{exitCode:1,stdout:"",stderr:f.length<2?`join: missing file operand
|
|
7
|
-
`:`join: extra operand
|
|
8
|
-
`};let r=[];for(let t of f)if(t==="-")r.push(s.stdin??"");else{let l=s.fs.resolvePath(s.cwd,t),u=await s.fs.readFile(l);if(u===null)return{exitCode:1,stdout:"",stderr:`join: ${t}: No such file or directory
|
|
9
|
-
`};r.push(u)}let o=(t,l)=>{let u=t.split(`
|
|
10
|
-
`);return t.endsWith(`
|
|
11
|
-
`)&&u[u.length-1]===""&&u.pop(),u.filter(h=>h.length>0).map(h=>F(h,n.separator,l,n.ignoreCase))},c=o(r[0],n.field1),p=o(r[1],n.field2),a=new Map;for(let t of p){let l=a.get(t.joinKey);l?l.push(t):a.set(t.joinKey,[t])}let d=[],b=new Set;for(let t of c){let l=a.get(t.joinKey);if(l&&l.length>0){if(b.add(t.joinKey),n.onlyUnpairable.size===0)for(let u of l)d.push(m(t,u,n))}else(n.printUnpairable.has(1)||n.onlyUnpairable.has(1))&&d.push(m(t,null,n))}if(n.printUnpairable.has(2)||n.onlyUnpairable.has(2))for(let t of p)b.has(t.joinKey)||d.push(m(null,t,n));return{exitCode:0,stdout:d.length>0?`${d.join(`
|
|
12
|
-
`)}
|
|
13
|
-
`:"",stderr:""}}},U={name:"join",flags:[{flag:"-1",type:"value",valueHint:"number"},{flag:"-2",type:"value",valueHint:"number"},{flag:"-t",type:"value",valueHint:"delimiter"},{flag:"-a",type:"value",valueHint:"number"},{flag:"-v",type:"value",valueHint:"number"},{flag:"-e",type:"value",valueHint:"string"},{flag:"-o",type:"value",valueHint:"format"},{flag:"-i",type:"boolean"}],needsArgs:!0,minArgs:2};export{w as a,U as b};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{a as w,b as h}from"./chunk-CWQS3NFK.js";import{a as T,b as g}from"./chunk-A5O5YHGN.js";import{a as F}from"./chunk-IPJHKYVM.js";import{a as m}from"./chunk-3THT3N7L.js";var n={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,RENAME:14,COPY_FILE:15,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300,INVOKE_TOOL:400},r={PENDING:0,READY:1,SUCCESS:2,ERROR:3},l={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,TIMEOUT:8,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10},o={OP_CODE:0,STATUS:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,PATH_BUFFER:32,DATA_BUFFER:4128},p={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:1048576,TOTAL:1052704},S={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},u={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function _(){return new w(p.TOTAL)}var R=class{int32View;uint8View;dataView;constructor(t){this.int32View=new Int32Array(t),this.uint8View=new Uint8Array(t),this.dataView=new DataView(t)}getOpCode(){return h.load(this.int32View,o.OP_CODE/4)}setOpCode(t){h.store(this.int32View,o.OP_CODE/4,t)}getStatus(){return h.load(this.int32View,o.STATUS/4)}setStatus(t){h.store(this.int32View,o.STATUS/4,t)}getPathLength(){return h.load(this.int32View,o.PATH_LENGTH/4)}setPathLength(t){h.store(this.int32View,o.PATH_LENGTH/4,t)}getDataLength(){return h.load(this.int32View,o.DATA_LENGTH/4)}setDataLength(t){h.store(this.int32View,o.DATA_LENGTH/4,t)}getResultLength(){return h.load(this.int32View,o.RESULT_LENGTH/4)}setResultLength(t){h.store(this.int32View,o.RESULT_LENGTH/4,t)}getErrorCode(){return h.load(this.int32View,o.ERROR_CODE/4)}setErrorCode(t){h.store(this.int32View,o.ERROR_CODE/4,t)}getFlags(){return h.load(this.int32View,o.FLAGS/4)}setFlags(t){h.store(this.int32View,o.FLAGS/4,t)}getMode(){return h.load(this.int32View,o.MODE/4)}setMode(t){h.store(this.int32View,o.MODE/4,t)}getPath(){let t=this.getPathLength(),e=this.uint8View.slice(o.PATH_BUFFER,o.PATH_BUFFER+t);return new TextDecoder().decode(e)}setPath(t){let e=new TextEncoder().encode(t);if(e.length>p.PATH_BUFFER)throw new Error(`Path too long: ${e.length} > ${p.PATH_BUFFER}`);this.uint8View.set(e,o.PATH_BUFFER),this.setPathLength(e.length)}getData(){let t=this.getDataLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setData(t){if(t.length>p.DATA_BUFFER)throw new Error(`Data too large: ${t.length} > ${p.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setDataLength(t.length)}getDataAsString(){let t=this.getData();return new TextDecoder().decode(t)}setDataFromString(t){let e=new TextEncoder().encode(t);this.setData(e)}getResult(){let t=this.getResultLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setResult(t){if(t.length>p.DATA_BUFFER)throw new Error(`Result too large: ${t.length} > ${p.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setResultLength(t.length)}getResultAsString(){let t=this.getResult();return new TextDecoder().decode(t)}setResultFromString(t){let e=new TextEncoder().encode(t);this.setResult(e)}encodeStat(t){this.uint8View[o.DATA_BUFFER+u.IS_FILE]=t.isFile?1:0,this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]=t.isDirectory?1:0,this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]=t.isSymbolicLink?1:0,this.dataView.setInt32(o.DATA_BUFFER+u.MODE,t.mode,!0);let e=Math.min(t.size,Number.MAX_SAFE_INTEGER);this.dataView.setFloat64(o.DATA_BUFFER+u.SIZE,e,!0),this.dataView.setFloat64(o.DATA_BUFFER+u.MTIME,t.mtime.getTime(),!0),this.setResultLength(u.TOTAL)}decodeStat(){return{isFile:this.uint8View[o.DATA_BUFFER+u.IS_FILE]===1,isDirectory:this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]===1,mode:this.dataView.getInt32(o.DATA_BUFFER+u.MODE,!0),size:this.dataView.getFloat64(o.DATA_BUFFER+u.SIZE,!0),mtime:new Date(this.dataView.getFloat64(o.DATA_BUFFER+u.MTIME,!0))}}waitForReady(t){return h.wait(this.int32View,o.STATUS/4,r.PENDING,t)}waitForReadyAsync(t){return h.waitAsync(this.int32View,o.STATUS/4,r.PENDING,t)}async waitUntilReady(t){let e=Date.now();for(;;){let a=this.getStatus();if(a===r.READY)return!0;let s=Date.now()-e;if(s>=t)return!1;let i=t-s,c=h.waitAsync(this.int32View,o.STATUS/4,a,i);if(c.async&&await c.value==="timed-out")return!1}}waitForResult(t){return h.wait(this.int32View,o.STATUS/4,r.READY,t)}notify(){return h.notify(this.int32View,o.STATUS/4)}reset(){this.setOpCode(n.NOOP),this.setStatus(r.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(l.NONE),this.setFlags(S.NONE),this.setMode(0)}};var O=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;invokeTool;protocol;running=!1;output={stdout:"",stderr:"",exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;constructor(t,e,a,s,i=void 0,c=0,d=void 0,E=void 0){this.fs=e,this.cwd=a,this.commandName=s,this.secureFetch=i,this.maxOutputSize=c,this.exec=d,this.invokeTool=E,this.protocol=new R(t)}remainingMs(){return Math.max(0,this.timeoutMs-(Date.now()-this.startTime))}raceDeadline(t){let e=this.remainingMs();if(e<=0)return this.running=!1,this.output.exitCode=124,this.output.stderr+=`
|
|
2
|
-
${this.commandName}: execution timeout exceeded
|
|
3
|
-
`,Promise.reject(new Error("Operation timed out"));let a=t();return new Promise((s,i)=>{let c=T(()=>{this.running=!1,this.output.exitCode=124,this.output.stderr+=`
|
|
4
|
-
${this.commandName}: execution timeout exceeded
|
|
5
|
-
`,i(new Error("Operation timed out"))},e);a.then(d=>{g(c),s(d)},d=>{g(c),i(d)})})}async run(t){for(this.running=!0,this.startTime=Date.now(),this.timeoutMs=t;this.running;){if(Date.now()-this.startTime>=t){this.output.stderr+=`
|
|
6
|
-
${this.commandName}: execution timeout exceeded
|
|
7
|
-
`,this.output.exitCode=124;break}let a=this.remainingMs();if(!await this.protocol.waitUntilReady(a)){this.output.stderr+=`
|
|
8
|
-
${this.commandName}: execution timeout exceeded
|
|
9
|
-
`,this.output.exitCode=124;break}let i=this.protocol.getOpCode();await this.handleOperation(i),this.protocol.notify()}return this.output}stop(){this.running=!1}async handleOperation(t){try{switch(t){case n.READ_FILE:await this.handleReadFile();break;case n.WRITE_FILE:await this.handleWriteFile();break;case n.STAT:await this.handleStat();break;case n.LSTAT:await this.handleLstat();break;case n.READDIR:await this.handleReaddir();break;case n.MKDIR:await this.handleMkdir();break;case n.RM:await this.handleRm();break;case n.EXISTS:await this.handleExists();break;case n.APPEND_FILE:await this.handleAppendFile();break;case n.SYMLINK:await this.handleSymlink();break;case n.READLINK:await this.handleReadlink();break;case n.CHMOD:await this.handleChmod();break;case n.REALPATH:await this.handleRealpath();break;case n.RENAME:await this.handleRename();break;case n.COPY_FILE:await this.handleCopyFile();break;case n.WRITE_STDOUT:this.handleWriteStdout();break;case n.WRITE_STDERR:this.handleWriteStderr();break;case n.EXIT:this.handleExit();break;case n.HTTP_REQUEST:await this.handleHttpRequest();break;case n.EXEC_COMMAND:await this.handleExecCommand();break;case n.INVOKE_TOOL:await this.handleInvokeTool();break;default:this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setStatus(r.ERROR)}}catch(e){this.setErrorFromException(e)}}resolvePath(t){return this.fs.resolvePath(this.cwd,t)}async handleReadFile(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readFileBuffer(t);this.protocol.setResult(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleWriteFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getData();try{await this.fs.writeFile(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleStat(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.stat(t);this.protocol.encodeStat(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleLstat(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.lstat(t);this.protocol.encodeStat(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleReaddir(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readdir(t);this.protocol.setResultFromString(JSON.stringify(e)),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleMkdir(){let t=this.resolvePath(this.protocol.getPath()),a=(this.protocol.getFlags()&S.MKDIR_RECURSIVE)!==0;try{await this.fs.mkdir(t,{recursive:a}),this.protocol.setStatus(r.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleRm(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getFlags(),a=(e&S.RECURSIVE)!==0,s=(e&S.FORCE)!==0;try{await this.fs.rm(t,{recursive:a,force:s}),this.protocol.setStatus(r.SUCCESS)}catch(i){this.setErrorFromException(i)}}async handleExists(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.exists(t);this.protocol.setResult(new Uint8Array([e?1:0])),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleAppendFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getData();try{await this.fs.appendFile(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleSymlink(){let t=this.protocol.getPath(),e=this.protocol.getDataAsString(),a=this.resolvePath(t);try{await this.fs.symlink(e,a),this.protocol.setStatus(r.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleReadlink(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readlink(t);this.protocol.setResultFromString(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleChmod(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getMode();try{await this.fs.chmod(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleRealpath(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.realpath(t);this.protocol.setResultFromString(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleRename(){let t=this.resolvePath(this.protocol.getPath()),e=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.mv(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleCopyFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.cp(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}handleWriteStdout(){let t=this.protocol.getDataAsString();if(!this.tryAppendOutput("stdout",t)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Output size limit exceeded"),this.protocol.setStatus(r.ERROR);return}this.protocol.setStatus(r.SUCCESS)}handleWriteStderr(){let t=this.protocol.getDataAsString();if(!this.tryAppendOutput("stderr",t)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Output size limit exceeded"),this.protocol.setStatus(r.ERROR);return}this.protocol.setStatus(r.SUCCESS)}handleExit(){let t=this.protocol.getFlags();this.outputLimitExceeded?this.output.exitCode===0&&(this.output.exitCode=1):this.output.exitCode=t,this.protocol.setStatus(r.SUCCESS),this.running=!1}tryAppendOutput(t,e){return this.outputLimitExceeded?!1:this.maxOutputSize<=0?(t==="stdout"?this.output.stdout+=e:this.output.stderr+=e,!0):this.output.stdout.length+this.output.stderr.length+e.length>this.maxOutputSize?!1:(t==="stdout"?this.output.stdout+=e:this.output.stderr+=e,!0)}appendOutputLimitError(){if(this.maxOutputSize<=0)return;let t=`${this.commandName}: total output size exceeded (>${this.maxOutputSize} bytes), increase executionLimits.maxOutputSize
|
|
10
|
-
`,e=t.length>this.maxOutputSize?t.slice(0,this.maxOutputSize):t;if(this.output.stderr.includes("total output size exceeded"))return;let s=this.output.stdout.length+this.output.stderr.length+e.length-this.maxOutputSize;if(s>0)if(this.output.stdout.length>=s)this.output.stdout=this.output.stdout.slice(0,this.output.stdout.length-s);else{let i=s-this.output.stdout.length;this.output.stdout="",i>=this.output.stderr.length?this.output.stderr="":this.output.stderr=this.output.stderr.slice(0,this.output.stderr.length-i)}this.output.stderr+=e}async handleHttpRequest(){let t=this.secureFetch;if(!t){this.protocol.setErrorCode(l.NETWORK_NOT_CONFIGURED),this.protocol.setResultFromString("Network access not configured. Enable network in Bash options."),this.protocol.setStatus(r.ERROR);return}let e=this.protocol.getPath(),a=this.protocol.getDataAsString();try{let s=a?JSON.parse(a):{},i=this.remainingMs(),c=await this.raceDeadline(()=>t(e,{method:s.method,headers:s.headers,body:s.body,timeoutMs:i})),d=JSON.stringify({status:c.status,statusText:c.statusText,headers:c.headers,body:c.body,url:c.url});this.protocol.setResultFromString(d),this.protocol.setStatus(r.SUCCESS)}catch(s){let i=m(s instanceof Error?s.message:String(s));this.protocol.setErrorCode(l.NETWORK_ERROR),this.protocol.setResultFromString(i),this.protocol.setStatus(r.ERROR)}}async handleExecCommand(){let t=this.exec;if(!t){this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Command execution not available in this context."),this.protocol.setStatus(r.ERROR);return}let e=this.protocol.getPath(),a=this.protocol.getDataAsString(),s=new AbortController;try{let i={cwd:this.cwd,signal:s.signal};if(a){let E=JSON.parse(a);E.stdin&&(i.stdin=E.stdin),E.args&&Array.isArray(E.args)&&(i.args=E.args.map(D=>String(D)),e=F([e]))}let c=await this.raceDeadline(()=>t(e,i)),d=JSON.stringify({stdout:c.stdout,stderr:c.stderr,exitCode:c.exitCode});this.protocol.setResultFromString(d),this.protocol.setStatus(r.SUCCESS)}catch(i){s.abort();let c=i instanceof Error?i.message:String(i);this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(c),this.protocol.setStatus(r.ERROR)}}async handleInvokeTool(){let t=this.invokeTool;if(!t){this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Tool invocation not available in this context."),this.protocol.setStatus(r.ERROR);return}let e=this.protocol.getPath(),a=this.protocol.getDataAsString();try{let s=await this.raceDeadline(()=>t(e,a));this.protocol.setResultFromString(s),this.protocol.setStatus(r.SUCCESS)}catch(s){let i=s instanceof Error?s.message:String(s);this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(i),this.protocol.setStatus(r.ERROR)}}setErrorFromException(t){let e=t instanceof Error?t.message:String(t),a=m(e),s=l.IO_ERROR,i=e.toLowerCase();i.includes("no such file")||i.includes("not found")||i.includes("enoent")?s=l.NOT_FOUND:i.includes("is a directory")||i.includes("eisdir")?s=l.IS_DIRECTORY:i.includes("not a directory")||i.includes("enotdir")?s=l.NOT_DIRECTORY:i.includes("already exists")||i.includes("eexist")?s=l.EXISTS:(i.includes("permission")||i.includes("eperm")||i.includes("eacces"))&&(s=l.PERMISSION_DENIED),this.protocol.setErrorCode(s),this.protocol.setResultFromString(a),this.protocol.setStatus(r.ERROR)}};export{_ as a,O as b};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{a as Ce,b as Fe,c as ne}from"./chunk-74CEPOFO.js";import{a as G,c as B,e as be}from"./chunk-DXB73IDG.js";var Te=B(ae=>{ae.read=function(i,e,t,r,n){var o,s,c=n*8-r-1,p=(1<<c)-1,m=p>>1,a=-7,f=t?n-1:0,l=t?-1:1,u=i[e+f];for(f+=l,o=u&(1<<-a)-1,u>>=-a,a+=c;a>0;o=o*256+i[e+f],f+=l,a-=8);for(s=o&(1<<-a)-1,o>>=-a,a+=r;a>0;s=s*256+i[e+f],f+=l,a-=8);if(o===0)o=1-m;else{if(o===p)return s?NaN:(u?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-m}return(u?-1:1)*s*Math.pow(2,o-r)};ae.write=function(i,e,t,r,n,o){var s,c,p,m=o*8-n-1,a=(1<<m)-1,f=a>>1,l=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=r?0:o-1,T=r?1:-1,k=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,s=a):(s=Math.floor(Math.log(e)/Math.LN2),e*(p=Math.pow(2,-s))<1&&(s--,p*=2),s+f>=1?e+=l/p:e+=l*Math.pow(2,1-f),e*p>=2&&(s++,p/=2),s+f>=a?(c=0,s=a):s+f>=1?(c=(e*p-1)*Math.pow(2,n),s=s+f):(c=e*Math.pow(2,f-1)*Math.pow(2,n),s=0));n>=8;i[t+u]=c&255,u+=T,c/=256,n-=8);for(s=s<<n|c,m+=n;m>0;i[t+u]=s&255,u+=T,s/=256,m-=8);i[t+u-T]|=k*128}});var ze=B((Ki,Me)=>{var j=1e3,P=j*60,N=P*60,z=N*24,wt=z*7,kt=z*365.25;Me.exports=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return yt(i);if(t==="number"&&isFinite(i))return e.long?Ct(i):bt(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function yt(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*kt;case"weeks":case"week":case"w":return t*wt;case"days":case"day":case"d":return t*z;case"hours":case"hour":case"hrs":case"hr":case"h":return t*N;case"minutes":case"minute":case"mins":case"min":case"m":return t*P;case"seconds":case"second":case"secs":case"sec":case"s":return t*j;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function bt(i){var e=Math.abs(i);return e>=z?Math.round(i/z)+"d":e>=N?Math.round(i/N)+"h":e>=P?Math.round(i/P)+"m":e>=j?Math.round(i/j)+"s":i+"ms"}function Ct(i){var e=Math.abs(i);return e>=z?Y(i,e,z,"day"):e>=N?Y(i,e,N,"hour"):e>=P?Y(i,e,P,"minute"):e>=j?Y(i,e,j,"second"):i+" ms"}function Y(i,e,t,r){var n=e>=t*1.5;return Math.round(i/t)+" "+r+(n?"s":"")}});var fe=B((er,Ue)=>{function Ft(i){t.debug=t,t.default=t,t.coerce=p,t.disable=s,t.enable=n,t.enabled=c,t.humanize=ze(),t.destroy=m,Object.keys(i).forEach(a=>{t[a]=i[a]}),t.names=[],t.skips=[],t.formatters={};function e(a){let f=0;for(let l=0;l<a.length;l++)f=(f<<5)-f+a.charCodeAt(l),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=e;function t(a){let f,l=null,u,T;function k(...F){if(!k.enabled)return;let O=k,V=Number(new Date),tt=V-(f||V);O.diff=tt,O.prev=f,O.curr=V,f=V,F[0]=t.coerce(F[0]),typeof F[0]!="string"&&F.unshift("%O");let q=0;F[0]=F[0].replace(/%([a-zA-Z%])/g,(re,it)=>{if(re==="%%")return"%";q++;let ye=t.formatters[it];if(typeof ye=="function"){let rt=F[q];re=ye.call(O,rt),F.splice(q,1),q--}return re}),t.formatArgs.call(O,F),(O.log||t.log).apply(O,F)}return k.namespace=a,k.useColors=t.useColors(),k.color=t.selectColor(a),k.extend=r,k.destroy=t.destroy,Object.defineProperty(k,"enabled",{enumerable:!0,configurable:!1,get:()=>l!==null?l:(u!==t.namespaces&&(u=t.namespaces,T=t.enabled(a)),T),set:F=>{l=F}}),typeof t.init=="function"&&t.init(k),k}function r(a,f){let l=t(this.namespace+(typeof f>"u"?":":f)+a);return l.log=this.log,l}function n(a){t.save(a),t.namespaces=a,t.names=[],t.skips=[];let f=(typeof a=="string"?a:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let l of f)l[0]==="-"?t.skips.push(l.slice(1)):t.names.push(l)}function o(a,f){let l=0,u=0,T=-1,k=0;for(;l<a.length;)if(u<f.length&&(f[u]===a[l]||f[u]==="*"))f[u]==="*"?(T=u,k=l,u++):(l++,u++);else if(T!==-1)u=T+1,k++,l=k;else return!1;for(;u<f.length&&f[u]==="*";)u++;return u===f.length}function s(){let a=[...t.names,...t.skips.map(f=>"-"+f)].join(",");return t.enable(""),a}function c(a){for(let f of t.skips)if(o(a,f))return!1;for(let f of t.names)if(o(a,f))return!0;return!1}function p(a){return a instanceof Error?a.stack||a.message:a}function m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}Ue.exports=Ft});var Le=B((C,K)=>{C.formatArgs=St;C.save=Tt;C.load=Et;C.useColors=vt;C.storage=At();C.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();C.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function vt(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let i;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(i=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(i[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function St(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+K.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;i.splice(1,0,e,"color: inherit");let t=0,r=0;i[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(r=t))}),i.splice(r,0,e)}C.log=console.debug||console.log||(()=>{});function Tt(i){try{i?C.storage.setItem("debug",i):C.storage.removeItem("debug")}catch{}}function Et(){let i;try{i=C.storage.getItem("debug")||C.storage.getItem("DEBUG")}catch{}return!i&&typeof process<"u"&&"env"in process&&(i=process.env.DEBUG),i}function At(){try{return localStorage}catch{}}K.exports=fe()(C);var{formatters:Bt}=K.exports;Bt.j=function(i){try{return JSON.stringify(i)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var je=B((tr,Re)=>{"use strict";Re.exports=(i,e=process.argv)=>{let t=i.startsWith("-")?"":i.length===1?"-":"--",r=e.indexOf(t+i),n=e.indexOf("--");return r!==-1&&(n===-1||r<n)}});var _e=B((ir,Ne)=>{"use strict";var It=G("os"),Pe=G("tty"),v=je(),{env:g}=process,I;v("no-color")||v("no-colors")||v("color=false")||v("color=never")?I=0:(v("color")||v("colors")||v("color=true")||v("color=always"))&&(I=1);"FORCE_COLOR"in g&&(g.FORCE_COLOR==="true"?I=1:g.FORCE_COLOR==="false"?I=0:I=g.FORCE_COLOR.length===0?1:Math.min(parseInt(g.FORCE_COLOR,10),3));function pe(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function me(i,e){if(I===0)return 0;if(v("color=16m")||v("color=full")||v("color=truecolor"))return 3;if(v("color=256"))return 2;if(i&&!e&&I===void 0)return 0;let t=I||0;if(g.TERM==="dumb")return t;if(process.platform==="win32"){let r=It.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in g)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in g)||g.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in g)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(g.TEAMCITY_VERSION)?1:0;if(g.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in g){let r=parseInt((g.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(g.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(g.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(g.TERM)||"COLORTERM"in g?1:t}function Ot(i){let e=me(i,i&&i.isTTY);return pe(e)}Ne.exports={supportsColor:Ot,stdout:pe(me(!0,Pe.isatty(1))),stderr:pe(me(!0,Pe.isatty(2)))}});var He=B((w,te)=>{var Dt=G("tty"),ee=G("util");w.init=Pt;w.log=Lt;w.formatArgs=zt;w.save=Rt;w.load=jt;w.useColors=Mt;w.destroy=ee.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");w.colors=[6,2,3,4,5,1];try{let i=_e();i&&(i.stderr||i).level>=2&&(w.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}w.inspectOpts=Object.keys(process.env).filter(i=>/^debug_/i.test(i)).reduce((i,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,o)=>o.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),i[t]=r,i},{});function Mt(){return"colors"in w.inspectOpts?!!w.inspectOpts.colors:Dt.isatty(process.stderr.fd)}function zt(i){let{namespace:e,useColors:t}=this;if(t){let r=this.color,n="\x1B[3"+(r<8?r:"8;5;"+r),o=` ${n};1m${e} \x1B[0m`;i[0]=o+i[0].split(`
|
|
2
|
-
`).join(`
|
|
3
|
-
`+o),i.push(n+"m+"+te.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=Ut()+e+" "+i[0]}function Ut(){return w.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Lt(...i){return process.stderr.write(ee.formatWithOptions(w.inspectOpts,...i)+`
|
|
4
|
-
`)}function Rt(i){i?process.env.DEBUG=i:delete process.env.DEBUG}function jt(){return process.env.DEBUG}function Pt(i){i.inspectOpts={};let e=Object.keys(w.inspectOpts);for(let t=0;t<e.length;t++)i.inspectOpts[e[t]]=w.inspectOpts[e[t]]}te.exports=fe()(w);var{formatters:$e}=te.exports;$e.o=function(i){return this.inspectOpts.colors=this.useColors,ee.inspect(i,this.inspectOpts).split(`
|
|
5
|
-
`).map(e=>e.trim()).join(" ")};$e.O=function(i){return this.inspectOpts.colors=this.useColors,ee.inspect(i,this.inspectOpts)}});var We=B((rr,le)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?le.exports=Le():le.exports=He()});var nt="End-Of-Stream",x=class extends Error{constructor(){super(nt),this.name="EndOfStreamError"}},D=class extends Error{constructor(e="The operation was aborted"){super(e),this.name="AbortError"}};var M=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(e,t=!1){let r=await this.read(e,t);return this.peekQueue.push(e.subarray(0,r)),r}async read(e,t=!1){if(e.length===0)return 0;let r=this.readFromPeekBuffer(e);if(this.endOfStream||(r+=await this.readRemainderFromStream(e.subarray(r),t)),r===0&&!t)throw new x;return r}readFromPeekBuffer(e){let t=e.length,r=0;for(;this.peekQueue.length>0&&t>0;){let n=this.peekQueue.pop();if(!n)throw new Error("peekData should be defined");let o=Math.min(n.length,t);e.set(n.subarray(0,o),r),r+=o,t-=o,o<n.length&&this.peekQueue.push(n.subarray(o))}return r}async readRemainderFromStream(e,t){let r=0;for(;r<e.length&&!this.endOfStream;){if(this.interrupted)throw new D;let n=await this.readFromStream(e.subarray(r),t);if(n===0)break;r+=n}if(!t&&r<e.length)throw new x;return r}};var J=class extends M{constructor(e){super(),this.reader=e}async abort(){return this.close()}async close(){this.reader.releaseLock()}};var _=class extends J{async readFromStream(e,t){if(e.length===0)return 0;let r=await this.reader.read(new Uint8Array(e.length),{min:t?void 0:e.length});return r.done&&(this.endOfStream=r.done),r.value?(e.set(r.value),r.value.length):0}};var L=class extends M{constructor(e){super(),this.reader=e,this.buffer=null}writeChunk(e,t){let r=Math.min(t.length,e.length);return e.set(t.subarray(0,r)),r<t.length?this.buffer=t.subarray(r):this.buffer=null,r}async readFromStream(e,t){if(e.length===0)return 0;let r=0;for(this.buffer&&(r+=this.writeChunk(e,this.buffer));r<e.length&&!this.endOfStream;){let n=await this.reader.read();if(n.done){this.endOfStream=!0;break}n.value&&(r+=this.writeChunk(e.subarray(r),n.value))}if(!t&&r===0&&this.endOfStream)throw new x;return r}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}};function oe(i){try{let e=i.getReader({mode:"byob"});return e instanceof ReadableStreamDefaultReader?new L(e):new _(e)}catch(e){if(e instanceof TypeError)return new L(i.getReader());throw e}}var S=class{constructor(e){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=e?.onClose,e?.abortSignal&&e.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(e,t=this.position){let r=new Uint8Array(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new x;return e.get(r,0)}async peekToken(e,t=this.position){let r=new Uint8Array(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new x;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new x;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new x;return e.get(this.numBuffer,0)}async ignore(e){if(this.fileInfo.size!==void 0){let t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(e,t){if(!this.supportsRandomAccess()&&t&&t.position!==void 0&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return{mayBeLess:!1,offset:0,length:e.length,position:this.position,...t}}abort(){return Promise.resolve()}};var st=256e3,X=class extends S{constructor(e,t){super(t),this.streamReader=e,this.fileInfo=t?.fileInfo??{}}async readBuffer(e,t){let r=this.normalizeOptions(e,t),n=r.position-this.position;if(n>0)return await this.ignore(n),this.readBuffer(e,t);if(n<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(r.length===0)return 0;let o=await this.streamReader.read(e.subarray(0,r.length),r.mayBeLess);if(this.position+=o,(!t||!t.mayBeLess)&&o<r.length)throw new x;return o}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=0;if(r.position){let o=r.position-this.position;if(o>0){let s=new Uint8Array(r.length+o);return n=await this.peekBuffer(s,{mayBeLess:r.mayBeLess}),e.set(s.subarray(o)),n-o}if(o<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{n=await this.streamReader.peek(e.subarray(0,r.length),r.mayBeLess)}catch(o){if(t?.mayBeLess&&o instanceof x)return 0;throw o}if(!r.mayBeLess&&n<r.length)throw new x}return n}async ignore(e){let t=Math.min(st,e),r=new Uint8Array(t),n=0;for(;n<e;){let o=e-n,s=await this.readBuffer(r,{length:Math.min(t,o)});if(s<0)return s;n+=s}return n}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}};var Z=class extends S{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo={...t?.fileInfo??{},size:e.length}}async readBuffer(e,t){t?.position&&(this.position=t.position);let r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&n<r.length)throw new x;return e.set(this.uint8Array.subarray(r.position,r.position+n)),n}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}};var Q=class extends S{constructor(e,t){super(t),this.blob=e,this.fileInfo={...t?.fileInfo??{},size:e.size,mimeType:e.type}}async readBuffer(e,t){t?.position&&(this.position=t.position);let r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=Math.min(this.blob.size-r.position,r.length);if(!r.mayBeLess&&n<r.length)throw new x;let o=await this.blob.slice(r.position,r.position+n).arrayBuffer();return e.set(new Uint8Array(o)),n}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}};function se(i,e){let t=oe(i),r=e??{},n=r.onClose;return r.onClose=async()=>{if(await t.close(),n)return n()},new X(t,r)}function ve(i,e){return new Z(i,e)}function Se(i,e){return new Q(i,e)}import{open as ct}from"node:fs/promises";var $=class i extends S{static async fromFile(e){let t=await ct(e,"r"),r=await t.stat();return new i(t,{fileInfo:{path:e,size:r.size}})}constructor(e,t){super(t),this.fileHandle=e,this.fileInfo=t.fileInfo}async readBuffer(e,t){let r=this.normalizeOptions(e,t);if(this.position=r.position,r.length===0)return 0;let n=await this.fileHandle.read(e,0,r.length,r.position);if(this.position+=n.bytesRead,n.bytesRead<r.length&&(!t||!t.mayBeLess))throw new x;return n.bytesRead}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=await this.fileHandle.read(e,0,r.length,r.position);if(!r.mayBeLess&&n.bytesRead<r.length)throw new x;return n.bytesRead}async close(){return await this.fileHandle.close(),super.close()}setPosition(e){this.position=e}supportsRandomAccess(){return!0}};var ft=$.fromFile;var Ae=be(Te(),1);var ce={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},mt={};for(let[i,e]of Object.entries(ce))mt[e]=Number.parseInt(i);function Ee(i,e="utf-8"){switch(e.toLowerCase()){case"utf-8":case"utf8":return typeof globalThis.TextDecoder<"u"?new globalThis.TextDecoder("utf-8").decode(i):lt(i);case"utf-16le":return ut(i);case"ascii":return xt(i);case"latin1":case"iso-8859-1":return dt(i);case"windows-1252":return ht(i);default:throw new RangeError(`Encoding '${e}' not supported`)}}function lt(i){let e="",t=0;for(;t<i.length;){let r=i[t++];if(r<128)e+=String.fromCharCode(r);else if(r<224){let n=i[t++]&63;e+=String.fromCharCode((r&31)<<6|n)}else if(r<240){let n=i[t++]&63,o=i[t++]&63;e+=String.fromCharCode((r&15)<<12|n<<6|o)}else{let n=i[t++]&63,o=i[t++]&63,s=i[t++]&63,c=(r&7)<<18|n<<12|o<<6|s;c-=65536,e+=String.fromCharCode(55296+(c>>10&1023),56320+(c&1023))}}return e}function ut(i){let e="";for(let t=0;t<i.length;t+=2)e+=String.fromCharCode(i[t]|i[t+1]<<8);return e}function xt(i){return String.fromCharCode(...i.map(e=>e&127))}function dt(i){return String.fromCharCode(...i)}function ht(i){let e="";for(let t of i)t>=128&&t<=159&&ce[t]?e+=ce[t]:e+=String.fromCharCode(t);return e}function y(i){return new DataView(i.buffer,i.byteOffset)}var Be={len:1,get(i,e){return y(i).getUint8(e)},put(i,e,t){return y(i).setUint8(e,t),e+1}},d={len:2,get(i,e){return y(i).getUint16(e,!0)},put(i,e,t){return y(i).setUint16(e,t,!0),e+2}},R={len:2,get(i,e){return y(i).getUint16(e)},put(i,e,t){return y(i).setUint16(e,t),e+2}};var h={len:4,get(i,e){return y(i).getUint32(e,!0)},put(i,e,t){return y(i).setUint32(e,t,!0),e+4}},Ie={len:4,get(i,e){return y(i).getUint32(e)},put(i,e,t){return y(i).setUint32(e,t),e+4}};var Oe={len:4,get(i,e){return y(i).getInt32(e)},put(i,e,t){return y(i).setInt32(e,t),e+4}};var De={len:8,get(i,e){return y(i).getBigUint64(e,!0)},put(i,e,t){return y(i).setBigUint64(e,t,!0),e+8}};var b=class{constructor(e,t){this.len=e,this.encoding=t}get(e,t=0){let r=e.subarray(t,t+this.len);return Ee(r,this.encoding)}};var Je=be(We(),1);var U={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},ue={get(i){return{signature:h.get(i,0),compressedSize:h.get(i,8),uncompressedSize:h.get(i,12)}},len:16},Ve={get(i){let e=d.get(i,6);return{signature:h.get(i,0),minVersion:d.get(i,4),dataDescriptor:!!(e&8),compressedMethod:d.get(i,8),compressedSize:h.get(i,18),uncompressedSize:h.get(i,22),filenameLength:d.get(i,26),extraFieldLength:d.get(i,28),filename:null}},len:30},qe={get(i){return{signature:h.get(i,0),nrOfThisDisk:d.get(i,4),nrOfThisDiskWithTheStart:d.get(i,6),nrOfEntriesOnThisDisk:d.get(i,8),nrOfEntriesOfSize:d.get(i,10),sizeOfCd:h.get(i,12),offsetOfStartOfCd:h.get(i,16),zipFileCommentLength:d.get(i,20)}},len:22},Ge={get(i){let e=d.get(i,8);return{signature:h.get(i,0),minVersion:d.get(i,6),dataDescriptor:!!(e&8),compressedMethod:d.get(i,10),compressedSize:h.get(i,20),uncompressedSize:h.get(i,24),filenameLength:d.get(i,28),extraFieldLength:d.get(i,30),fileCommentLength:d.get(i,32),relativeOffsetOfLocalHeader:h.get(i,42),filename:null}},len:46};function Xe(i){let e=new Uint8Array(h.len);return h.put(e,0,i),e}var E=(0,Je.default)("tokenizer:inflate"),xe=256*1024,Nt=Xe(U.DataDescriptor),ie=Xe(U.EndOfCentralDirectory),H=class i{constructor(e){this.tokenizer=e,this.syncBuffer=new Uint8Array(xe)}async isZip(){return await this.peekSignature()===U.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(h)}async findEndOfCentralDirectoryLocator(){let e=this.tokenizer,t=Math.min(16*1024,e.fileInfo.size),r=this.syncBuffer.subarray(0,t);await this.tokenizer.readBuffer(r,{position:e.fileInfo.size-t});for(let n=r.length-4;n>=0;n--)if(r[n]===ie[0]&&r[n+1]===ie[1]&&r[n+2]===ie[2]&&r[n+3]===ie[3])return e.fileInfo.size-t+n;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){E("Cannot reading central-directory without random-read support");return}E("Reading central-directory...");let e=this.tokenizer.position,t=await this.findEndOfCentralDirectoryLocator();if(t>0){E("Central-directory 32-bit signature found");let r=await this.tokenizer.readToken(qe,t),n=[];this.tokenizer.setPosition(r.offsetOfStartOfCd);for(let o=0;o<r.nrOfEntriesOfSize;++o){let s=await this.tokenizer.readToken(Ge);if(s.signature!==U.CentralFileHeader)throw new Error("Expected Central-File-Header signature");s.filename=await this.tokenizer.readToken(new b(s.filenameLength,"utf-8")),await this.tokenizer.ignore(s.extraFieldLength),await this.tokenizer.ignore(s.fileCommentLength),n.push(s),E(`Add central-directory file-entry: n=${o+1}/${n.length}: filename=${n[o].filename}`)}return this.tokenizer.setPosition(e),n}this.tokenizer.setPosition(e)}async unzip(e){let t=await this.readCentralDirectory();if(t)return this.iterateOverCentralDirectory(t,e);let r=!1;do{let n=await this.readLocalFileHeader();if(!n)break;let o=e(n);r=!!o.stop;let s;if(await this.tokenizer.ignore(n.extraFieldLength),n.dataDescriptor&&n.compressedSize===0){let c=[],p=xe;E("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let m=-1;for(;m<0&&p===xe;){p=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0}),m=_t(this.syncBuffer.subarray(0,p),Nt);let a=m>=0?m:p;if(o.handler){let f=new Uint8Array(a);await this.tokenizer.readBuffer(f),c.push(f)}else await this.tokenizer.ignore(a)}E(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),o.handler&&await this.inflate(n,$t(c),o.handler)}else o.handler?(E(`Reading compressed-file-data: ${n.compressedSize} bytes`),s=new Uint8Array(n.compressedSize),await this.tokenizer.readBuffer(s),await this.inflate(n,s,o.handler)):(E(`Ignoring compressed-file-data: ${n.compressedSize} bytes`),await this.tokenizer.ignore(n.compressedSize));if(E(`Reading data-descriptor at pos=${this.tokenizer.position}`),n.dataDescriptor&&(await this.tokenizer.readToken(ue)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-ue.len}`)}while(!r)}async iterateOverCentralDirectory(e,t){for(let r of e){let n=t(r);if(n.handler){this.tokenizer.setPosition(r.relativeOffsetOfLocalHeader);let o=await this.readLocalFileHeader();if(o){await this.tokenizer.ignore(o.extraFieldLength);let s=new Uint8Array(r.compressedSize);await this.tokenizer.readBuffer(s),await this.inflate(o,s,n.handler)}}if(n.stop)break}}async inflate(e,t,r){if(e.compressedMethod===0)return r(t);if(e.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${e.compressedMethod}`);E(`Decompress filename=${e.filename}, compressed-size=${t.length}`);let n=await i.decompressDeflateRaw(t);return r(n)}static async decompressDeflateRaw(e){let t=new ReadableStream({start(o){o.enqueue(e),o.close()}}),r=new DecompressionStream("deflate-raw"),n=t.pipeThrough(r);try{let s=await new Response(n).arrayBuffer();return new Uint8Array(s)}catch(o){let s=o instanceof Error?`Failed to deflate ZIP entry: ${o.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(s)}}async readLocalFileHeader(){let e=await this.tokenizer.peekToken(h);if(e===U.LocalFileHeader){let t=await this.tokenizer.readToken(Ve);return t.filename=await this.tokenizer.readToken(new b(t.filenameLength,"utf-8")),t}if(e===U.CentralFileHeader)return!1;throw e===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}};function _t(i,e){let t=i.length,r=e.length;if(r>t)return-1;for(let n=0;n<=t-r;n++){let o=!0;for(let s=0;s<r;s++)if(i[n+s]!==e[s]){o=!1;break}if(o)return n}return-1}function $t(i){let e=i.reduce((n,o)=>n+o.length,0),t=new Uint8Array(e),r=0;for(let n of i)t.set(n,r),r+=n.length;return t}var W=class{constructor(e){this.tokenizer=e}inflate(){let e=this.tokenizer;return new ReadableStream({async pull(t){let r=new Uint8Array(1024),n=await e.readBuffer(r,{mayBeLess:!0});if(n===0){t.close();return}t.enqueue(r.subarray(0,n))}}).pipeThrough(new DecompressionStream("gzip"))}};var ur={utf8:new globalThis.TextDecoder("utf8")};var xr=new globalThis.TextEncoder;var dr=Array.from({length:256},(i,e)=>e.toString(16).padStart(2,"0"));function de(i){let{byteLength:e}=i;if(e===6)return i.getUint16(0)*2**32+i.getUint32(2);if(e===5)return i.getUint8(0)*2**32+i.getUint32(1);if(e===4)return i.getUint32(0);if(e===3)return i.getUint8(0)*2**16+i.getUint16(1);if(e===2)return i.getUint16(0);if(e===1)return i.getUint8(0)}function Ze(i,e){if(e==="utf-16le"){let t=[];for(let r=0;r<i.length;r++){let n=i.charCodeAt(r);t.push(n&255,n>>8&255)}return t}if(e==="utf-16be"){let t=[];for(let r=0;r<i.length;r++){let n=i.charCodeAt(r);t.push(n>>8&255,n&255)}return t}return[...i].map(t=>t.charCodeAt(0))}function Qe(i,e=0){let t=Number.parseInt(new b(6).get(i,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(t))return!1;let r=256;for(let n=e;n<e+148;n++)r+=i[n];for(let n=e+156;n<e+512;n++)r+=i[n];return t===r}var Ye={get:(i,e)=>i[e+3]&127|i[e+2]<<7|i[e+1]<<14|i[e]<<21,len:4};var Ke=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","jmp","rm","sav","ppsm","ppsx","tar.gz","reg","dat"],et=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia","application/x-spss-sav","application/x-ms-regedit","application/x-ft-windows-registry-hive","application/x-jmp-data"];var he=4100;async function ke(i,e){return new we(e).fromBuffer(i)}function ge(i){switch(i=i.toLowerCase(),i){case"application/epub+zip":return{ext:"epub",mime:i};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:i};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:i};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:i};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:i};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:i};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:i};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:i};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:i};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:i};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:i};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:i};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:i};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:i};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:i};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:i};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function A(i,e,t){t={offset:0,...t};for(let[r,n]of e.entries())if(t.mask){if(n!==(t.mask[r]&i[r+t.offset]))return!1}else if(n!==i[r+t.offset])return!1;return!0}var we=class{constructor(e){this.options={mpegOffsetTolerance:0,...e},this.detectors=[...e?.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:e?.signal}}async fromTokenizer(e){let t=e.position;for(let r of this.detectors){let n=await r.detect(e);if(n)return n;if(t!==e.position)return}}async fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);let t=e instanceof Uint8Array?e:new Uint8Array(e);if(t?.length>1)return this.fromTokenizer(ve(t,this.tokenizerOptions))}async fromBlob(e){let t=Se(e,this.tokenizerOptions);try{return await this.fromTokenizer(t)}finally{await t.close()}}async fromStream(e){let t=se(e,this.tokenizerOptions);try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){let{sampleSize:r=he}=t,n,o,s=e.getReader({mode:"byob"});try{let{value:m,done:a}=await s.read(new Uint8Array(r));if(o=m,!a&&m)try{n=await this.fromBuffer(m.subarray(0,r))}catch(f){if(!(f instanceof x))throw f;n=void 0}o=m}finally{s.releaseLock()}let c=new TransformStream({async start(m){m.enqueue(o)},transform(m,a){a.enqueue(m)}}),p=e.pipeThrough(c);return p.fileType=n,p}check(e,t){return A(this.buffer,e,t)}checkString(e,t){return this.check(Ze(e,t?.encoding),t)}detectConfident=async e=>{if(this.buffer=new Uint8Array(he),e.fileInfo.size===void 0&&(e.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e,await e.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await e.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.tokenizer.ignore(3),this.detectConfident(e);if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8])){let r=new W(e).inflate(),n=!0;try{let o;try{o=await this.fromStream(r)}catch{n=!1}if(o&&o.ext==="tar")return{ext:"tar.gz",mime:"application/gzip"}}finally{n&&await r.cancel()}return{ext:"gz",mime:"application/gzip"}}if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await e.ignore(6);let t=await e.readToken(Ye);return e.position+t>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(t),this.fromTokenizer(e))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let t;return await new H(e).unzip(r=>{switch(r.filename){case"META-INF/mozilla.rsa":return t={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return t={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return{async handler(n){let o=new TextDecoder("utf-8").decode(n).trim();t=ge(o)},stop:!0};case"[Content_Types].xml":return{async handler(n){let o=new TextDecoder("utf-8").decode(n),s=o.indexOf('.main+xml"');if(s===-1){let c="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";o.includes(`ContentType="${c}"`)&&(t=ge(c))}else{o=o.slice(0,Math.max(0,s));let c=o.lastIndexOf('"'),p=o.slice(Math.max(0,c+1));t=ge(p)}},stop:!0};default:return/classes\d*\.dex/.test(r.filename)?(t={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}}).catch(r=>{if(!(r instanceof x))throw r}),t??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);let t=new Uint8Array(8);return await e.readBuffer(t),A(t,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:A(t,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:A(t,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:A(t,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:A(t,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:A(t,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let t=await this.readTiffHeader(!1);if(t)return t}if(this.check([77,77])){let t=await this.readTiffHeader(!0);if(t)return t}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function t(){let c=await e.peekNumber(Be),p=128,m=0;for(;(c&p)===0&&p!==0;)++m,p>>=1;let a=new Uint8Array(m+1);return await e.readBuffer(a),a}async function r(){let c=await t(),p=await t();p[0]^=128>>p.length-1;let m=Math.min(6,p.length),a=new DataView(c.buffer),f=new DataView(p.buffer,p.length-m,m);return{id:de(a),len:de(f)}}async function n(c){for(;c>0;){let p=await r();if(p.id===17026)return(await e.readToken(new b(p.len))).replaceAll(/\00.*$/g,"");await e.ignore(p.len),--c}}let o=await r();switch(await n(o.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190]))return{ext:"class",mime:"application/java-vm"};if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(this.buffer[6]===0||this.buffer[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){let t=new b(4,"latin1").get(this.buffer,2);if(t.match("^d*")&&t>=1e3&&t<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return await e.ignore(8),await e.readToken(new b(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[`
|
|
6
|
-
`,"\r"," "," ","\0"].some(t=>this.checkString(t,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){await e.ignore(8);async function t(){return{length:await e.readToken(Oe),type:await e.readToken(new b(4,"latin1"))}}do{let r=await t();if(r.length<0)return;switch(r.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(r.length+4)}}while(e.position+8<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/vnd.apache.arrow.file"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.checkString("ftyp",{offset:4})&&(this.buffer[8]&96)!==0){let t=new b(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(t){case"avif":case"avis":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return t.startsWith("3g")?t.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(this.checkString(`REGEDIT4\r
|
|
7
|
-
`))return{ext:"reg",mime:"application/x-ms-regedit"};if(this.check([82,73,70,70])){if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){async function t(){let r=new Uint8Array(16);return await e.readBuffer(r),{id:r,size:Number(await e.readToken(De))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){let r=await t(),n=r.size-24;if(A(r.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let o=new Uint8Array(16);if(n-=await e.readBuffer(o),A(o,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(A(o,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await e.ignore(n)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new b(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("<?xml ",{offset:2,encoding:"utf-16be"})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(this.buffer,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){let t=new DataView(this.buffer.buffer).getUint32(12,!0);if(t>12&&this.buffer.length>=t+16)try{let r=new TextDecoder().decode(this.buffer.subarray(16,t+16));if(JSON.parse(r).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await e.peekBuffer(this.buffer,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&Qe(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let t="utf-16le";return this.checkString("<?xml ",{offset:2,encoding:t})?{ext:"xml",mime:"application/xml"}:this.check([255,14],{offset:2})&&this.checkString("SketchUp Model",{offset:4,encoding:t})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:this.checkString(`Windows Registry Editor Version 5.00\r
|
|
8
|
-
`,{offset:2,encoding:t})?{ext:"reg",mime:"application/x-ms-regedit"}:void 0}if(this.checkString("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"}};detectImprecise=async e=>{if(this.buffer=new Uint8Array(he),await e.peekBuffer(this.buffer,{length:Math.min(8,e.fileInfo.size),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await e.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,e.fileInfo.size),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let t=0;t<=this.options.mpegOffsetTolerance;++t){let r=this.scanMpeg(t);if(r)return r}};async readTiffTag(e){let t=await this.tokenizer.readToken(e?R:d);switch(this.tokenizer.ignore(10),t){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"};default:}}async readTiffIFD(e){let t=await this.tokenizer.readToken(e?R:d);for(let r=0;r<t;++r){let n=await this.readTiffTag(e);if(n)return n}}async readTiffHeader(e){let t=(e?R:d).get(this.buffer,2),r=(e?Ie:h).get(this.buffer,4);if(t===42){if(r>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r>=8){let o=(e?R:d).get(this.buffer,8),s=(e?R:d).get(this.buffer,10);if(o===28&&s===254||o===31&&s===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}return await this.tokenizer.ignore(r),await this.readTiffIFD(e)??{ext:"tif",mime:"image/tiff"}}if(t===43)return{ext:"tif",mime:"image/tiff"}}scanMpeg(e){if(this.check([255,224],{offset:e,mask:[255,224]})){if(this.check([16],{offset:e+1,mask:[22]}))return this.check([8],{offset:e+1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:e+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:e+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:e+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}},Ht=new Set(Ke),Wt=new Set(et);var Vt={name:"file",summary:"determine file type",usage:"file [OPTION]... FILE...",options:["-b, --brief do not prepend filenames to output","-i, --mime output MIME type strings","-L, --dereference follow symlinks"," --help display this help and exit"]},qt=new Map([[".js",{description:"JavaScript source",mime:"text/javascript"}],[".mjs",{description:"JavaScript module",mime:"text/javascript"}],[".cjs",{description:"CommonJS module",mime:"text/javascript"}],[".ts",{description:"TypeScript source",mime:"text/typescript"}],[".tsx",{description:"TypeScript JSX source",mime:"text/typescript"}],[".jsx",{description:"JavaScript JSX source",mime:"text/javascript"}],[".py",{description:"Python script",mime:"text/x-python"}],[".rb",{description:"Ruby script",mime:"text/x-ruby"}],[".go",{description:"Go source",mime:"text/x-go"}],[".rs",{description:"Rust source",mime:"text/x-rust"}],[".c",{description:"C source",mime:"text/x-c"}],[".h",{description:"C header",mime:"text/x-c"}],[".cpp",{description:"C++ source",mime:"text/x-c++"}],[".hpp",{description:"C++ header",mime:"text/x-c++"}],[".java",{description:"Java source",mime:"text/x-java"}],[".sh",{description:"Bourne-Again shell script",mime:"text/x-shellscript"}],[".bash",{description:"Bourne-Again shell script",mime:"text/x-shellscript"}],[".zsh",{description:"Zsh shell script",mime:"text/x-shellscript"}],[".json",{description:"JSON data",mime:"application/json"}],[".yaml",{description:"YAML data",mime:"text/yaml"}],[".yml",{description:"YAML data",mime:"text/yaml"}],[".xml",{description:"XML document",mime:"application/xml"}],[".csv",{description:"CSV text",mime:"text/csv"}],[".toml",{description:"TOML data",mime:"text/toml"}],[".html",{description:"HTML document",mime:"text/html"}],[".htm",{description:"HTML document",mime:"text/html"}],[".css",{description:"CSS stylesheet",mime:"text/css"}],[".svg",{description:"SVG image",mime:"image/svg+xml"}],[".md",{description:"Markdown document",mime:"text/markdown"}],[".markdown",{description:"Markdown document",mime:"text/markdown"}],[".txt",{description:"ASCII text",mime:"text/plain"}],[".rst",{description:"reStructuredText",mime:"text/x-rst"}],[".env",{description:"ASCII text",mime:"text/plain"}],[".gitignore",{description:"ASCII text",mime:"text/plain"}],[".dockerignore",{description:"ASCII text",mime:"text/plain"}]]),Gt=new Map([["jpg","JPEG image data"],["jpeg","JPEG image data"],["png","PNG image data"],["gif","GIF image data"],["webp","WebP image data"],["bmp","PC bitmap"],["ico","MS Windows icon resource"],["tif","TIFF image data"],["tiff","TIFF image data"],["psd","Adobe Photoshop Document"],["avif","AVIF image"],["heic","HEIC image"],["heif","HEIF image"],["jxl","JPEG XL image"],["icns","Mac OS X icon"],["svg","SVG Scalable Vector Graphics image"],["pdf","PDF document"],["epub","EPUB document"],["mobi","Mobipocket E-book"],["djvu","DjVu document"],["zip","Zip archive data"],["gz","gzip compressed data"],["gzip","gzip compressed data"],["bz2","bzip2 compressed data"],["xz","XZ compressed data"],["tar","POSIX tar archive"],["rar","RAR archive data"],["7z","7-zip archive data"],["lz","lzip compressed data"],["lzma","LZMA compressed data"],["zst","Zstandard compressed data"],["cab","Microsoft Cabinet archive"],["ar","Unix ar archive"],["rpm","RPM package"],["deb","Debian binary package"],["apk","Android Package"],["dmg","Apple disk image"],["iso","ISO 9660 CD-ROM filesystem data"],["vhd","Microsoft Virtual Hard Disk"],["vhdx","Microsoft Virtual Hard Disk (new format)"],["qcow2","QEMU QCOW Image"],["mp3","Audio file with ID3"],["m4a","MPEG-4 audio"],["aac","AAC audio"],["wav","RIFF (little-endian) data, WAVE audio"],["flac","FLAC audio bitstream data"],["ogg","Ogg data"],["oga","Ogg audio"],["opus","Ogg Opus audio"],["aiff","AIFF audio"],["wma","Windows Media Audio"],["amr","AMR audio"],["mid","MIDI audio"],["midi","MIDI audio"],["ape","Monkey's Audio"],["mp4","ISO Media, MPEG-4"],["m4v","MPEG-4 video"],["webm","WebM"],["avi","RIFF (little-endian) data, AVI"],["mov","ISO Media, Apple QuickTime movie"],["mkv","Matroska data"],["wmv","Windows Media Video"],["flv","Flash Video"],["3gp","3GPP multimedia"],["3g2","3GPP2 multimedia"],["ogv","Ogg video"],["mts","MPEG transport stream"],["m2ts","MPEG transport stream"],["ts","MPEG transport stream"],["mpg","MPEG video"],["mpeg","MPEG video"],["exe","PE32 executable"],["dll","PE32 DLL"],["elf","ELF executable"],["mach","Mach-O executable"],["wasm","WebAssembly (wasm) binary module"],["dex","Android Dalvik executable"],["class","Java class file"],["swf","Adobe Flash"],["doc","Microsoft Word Document"],["docx","Microsoft Word 2007+ Document"],["xls","Microsoft Excel Spreadsheet"],["xlsx","Microsoft Excel 2007+ Spreadsheet"],["ppt","Microsoft PowerPoint Presentation"],["pptx","Microsoft PowerPoint 2007+ Presentation"],["odt","OpenDocument Text"],["ods","OpenDocument Spreadsheet"],["odp","OpenDocument Presentation"],["ttf","TrueType Font"],["otf","OpenType Font"],["woff","Web Open Font Format"],["woff2","Web Open Font Format 2"],["eot","Embedded OpenType font"],["stl","Stereolithography CAD"],["obj","Wavefront 3D Object"],["gltf","GL Transmission Format"],["glb","GL Transmission Format (binary)"],["sqlite","SQLite 3.x database"],["mdb","Microsoft Access Database"],["xml","XML document"],["json","JSON data"],["macho","Mach-O binary"],["ics","iCalendar data"],["vcf","vCard data"],["msi","Microsoft Installer"],["ps","PostScript"],["ai","Adobe Illustrator"],["indd","Adobe InDesign"],["sketch","Sketch design file"],["fig","Figma design file"],["xd","Adobe XD"],["blend","Blender"],["fbx","Autodesk FBX"],["lnk","MS Windows shortcut"],["alias","Mac OS alias"],["torrent","BitTorrent file"],["pcap","pcap capture file"],["arrow","Apache Arrow"],["parquet","Apache Parquet"]]);function Jt(i,e){let t=Gt.get(i);if(t)return t;let[r,n]=e.split("/"),o=n?.split("+")[0]?.replace(/-/g," ")||i;switch(r){case"image":return`${o.toUpperCase()} image data`;case"audio":return`${o.toUpperCase()} audio`;case"video":return`${o.toUpperCase()} video`;case"font":return`${o} font`;case"model":return`${o} 3D model`;case"application":return n?.includes("zip")||n?.includes("compressed")?`${o} archive data`:n?.includes("executable")?`${o} executable`:`${i.toUpperCase()} data`;default:return`${i.toUpperCase()} data`}}function Xt(i){let e=i.split("/").pop()||i;if(e.startsWith(".")&&!e.includes(".",1))return e;let t=e.lastIndexOf(".");return t===-1||t===0?"":e.slice(t).toLowerCase()}function Zt(i,e){if(i.startsWith("#!")){let m=i.split(`
|
|
9
|
-
`)[0];return m.includes("python")?{description:"Python script, ASCII text executable",mime:"text/x-python"}:m.includes("node")||m.includes("bun")||m.includes("deno")?{description:"JavaScript script, ASCII text executable",mime:"text/javascript"}:m.includes("bash")?{description:"Bourne-Again shell script, ASCII text executable",mime:"text/x-shellscript"}:m.includes("sh")?{description:"POSIX shell script, ASCII text executable",mime:"text/x-shellscript"}:m.includes("ruby")?{description:"Ruby script, ASCII text executable",mime:"text/x-ruby"}:m.includes("perl")?{description:"Perl script, ASCII text executable",mime:"text/x-perl"}:{description:"script, ASCII text executable",mime:"text/plain"}}let t=i.trimStart();if(t.startsWith("<?xml"))return{description:"XML document",mime:"application/xml"};if(t.startsWith("<!DOCTYPE html")||t.toLowerCase().startsWith("<html"))return{description:"HTML document",mime:"text/html"};let r=i.includes(`\r
|
|
10
|
-
`),n=i.includes("\r")&&!r,o="";r?o=", with CRLF line terminators":n&&(o=", with CR line terminators");let s=Xt(e),c=s?qt.get(s):void 0;if(c)return c.mime.startsWith("text/")&&o?{description:`${c.description}${o}`,mime:c.mime}:c;let p=!1;for(let m=0;m<Math.min(i.length,8192);m++)if(i.charCodeAt(m)>127){p=!0;break}return p?{description:`UTF-8 Unicode text${o}`,mime:"text/plain; charset=utf-8"}:{description:`ASCII text${o}`,mime:"text/plain"}}async function Qt(i,e){if(e.length===0)return{description:"empty",mime:"inode/x-empty"};let t=await ke(e);if(t)return{description:Jt(t.ext,t.mime),mime:t.mime};let r=new TextDecoder("utf-8",{fatal:!1}).decode(e);return Zt(r,i)}var Dr={name:"file",async execute(i,e){if(Fe(i))return Ce(Vt);let t=!1,r=!1,n=[];for(let c of i)if(c.startsWith("--")){if(c==="--brief")t=!0;else if(c==="--mime"||c==="--mime-type")r=!0;else if(c!=="--dereference")return ne("file",c)}else if(c.startsWith("-")&&c!=="-"){for(let p of c.slice(1))if(p==="b")t=!0;else if(p==="i")r=!0;else if(p!=="L")return ne("file",`-${p}`)}else n.push(c);if(n.length===0)return{stdout:"",stderr:`Usage: file [-bLi] FILE...
|
|
11
|
-
`,exitCode:1};let o="",s=0;for(let c of n)try{let p=e.fs.resolvePath(e.cwd,c);if((await e.fs.stat(p)).isDirectory){let u=r?"inode/directory":"directory";o+=t?`${u}
|
|
12
|
-
`:`${c}: ${u}
|
|
13
|
-
`;continue}let a=await e.fs.readFileBuffer(p),f=await Qt(c,a),l=r?f.mime:f.description;o+=t?`${l}
|
|
14
|
-
`:`${c}: ${l}
|
|
15
|
-
`}catch{o+=t?`cannot open
|
|
16
|
-
`:`${c}: cannot open (No such file or directory)
|
|
17
|
-
`,s=1}return{stdout:o,stderr:"",exitCode:s}}},Mr={name:"file",flags:[{flag:"-b",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-L",type:"boolean"}],needsArgs:!0};export{Dr as a,Mr as b};
|
|
18
|
-
/*! Bundled license information:
|
|
19
|
-
|
|
20
|
-
ieee754/index.js:
|
|
21
|
-
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
22
|
-
*/
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{a as p,b as h,c as w}from"./chunk-74CEPOFO.js";var m={name:"fold",summary:"wrap each input line to fit in specified width",usage:"fold [OPTION]... [FILE]...",description:"Wrap input lines in each FILE, writing to standard output. If no FILE is specified, standard input is read.",options:["-w WIDTH Use WIDTH columns instead of 80","-s Break at spaces","-b Count bytes rather than columns"],examples:["fold -w 40 file.txt # Wrap at 40 columns","fold -sw 40 file.txt # Word wrap at 40 columns","echo 'long line' | fold -w 5 # Force wrap at 5"]};function g(s,r,n){return n?new TextEncoder().encode(s).length:s===" "?8-r%8:s==="\b"?-1:1}function y(s,r){if(s.length===0)return s;let{width:n,breakAtSpaces:u,countBytes:i}=r,l=[],e="",t=0,o=-1,f=0;for(let c=0;c<s.length;c++){let a=s[c],d=g(a,t,i);t+d>n&&e.length>0?u&&o>=0?(l.push(e.slice(0,o+1)),e=e.slice(o+1)+a,t=t-f-1+d,o=-1,f=0):(l.push(e),e=a,t=d,o=-1,f=0):(e+=a,t+=d,(a===" "||a===" ")&&(o=e.length-1,f=t-d))}return e.length>0&&l.push(e),l.join(`
|
|
2
|
-
`)}function b(s,r){if(s==="")return"";let n=s.split(`
|
|
3
|
-
`),u=s.endsWith(`
|
|
4
|
-
`)&&n[n.length-1]==="";return u&&n.pop(),n.map(l=>y(l,r)).join(`
|
|
5
|
-
`)+(u?`
|
|
6
|
-
`:"")}var k={name:"fold",execute:async(s,r)=>{if(h(s))return p(m);let n={width:80,breakAtSpaces:!1,countBytes:!1},u=[],i=0;for(;i<s.length;){let e=s[i];if(e==="-w"&&i+1<s.length){let t=parseInt(s[i+1],10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${s[i+1]}'
|
|
7
|
-
`};n.width=t,i+=2}else if(e.startsWith("-w")&&e.length>2){let t=parseInt(e.slice(2),10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${e.slice(2)}'
|
|
8
|
-
`};n.width=t,i++}else if(e==="-s")n.breakAtSpaces=!0,i++;else if(e==="-b")n.countBytes=!0,i++;else if(e==="-bs"||e==="-sb")n.breakAtSpaces=!0,n.countBytes=!0,i++;else if(e.match(/^-[sb]+w\d+$/)){e.includes("s")&&(n.breakAtSpaces=!0),e.includes("b")&&(n.countBytes=!0);let t=e.replace(/^-[sb]+w/,""),o=parseInt(t,10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${t}'
|
|
9
|
-
`};n.width=o,i++}else if(e.match(/^-[sb]+w$/)&&i+1<s.length){e.includes("s")&&(n.breakAtSpaces=!0),e.includes("b")&&(n.countBytes=!0);let t=parseInt(s[i+1],10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${s[i+1]}'
|
|
10
|
-
`};n.width=t,i+=2}else if(e==="--"){u.push(...s.slice(i+1));break}else if(e.startsWith("-")&&e!=="-"){let t=e.slice(1),o=!1;for(let f of t)if(f==="s")n.breakAtSpaces=!0;else if(f==="b")n.countBytes=!0;else{o=!0;break}if(o)return w("fold",e);i++}else u.push(e),i++}let l="";if(u.length===0){let e=r.stdin??"";l=b(e,n)}else for(let e of u){let t=r.fs.resolvePath(r.cwd,e),o=await r.fs.readFile(t);if(o===null)return{exitCode:1,stdout:l,stderr:`fold: ${e}: No such file or directory
|
|
11
|
-
`};l+=b(o,n)}return{exitCode:0,stdout:l,stderr:""}}},x={name:"fold",flags:[{flag:"-w",type:"value",valueHint:"number"},{flag:"-s",type:"boolean"},{flag:"-b",type:"boolean"}],stdinType:"text",needsFiles:!0};export{k as a,x as b};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{c as u}from"./chunk-OJDRYQWQ.js";import{a as l,b as h}from"./chunk-74CEPOFO.js";var d={name:"bash",summary:"execute shell commands or scripts",usage:"bash [OPTIONS] [SCRIPT_FILE] [ARGUMENTS...]",options:["-c COMMAND execute COMMAND string"," --help display this help and exit"],notes:["Without -c, reads and executes commands from SCRIPT_FILE.","Arguments are passed as $1, $2, etc. to the script.",'$0 is set to the script name (or "bash" with -c).']},y={name:"bash",async execute(t,e){if(h(t))return l(d);if(t[0]==="-c"&&t.length>=2){let i=t[1],s=t[2]||"bash",c=t.slice(3);return o(i,s,c,e)}if(t.length===0)return e.stdin?.trim()?o(e.stdin,"bash",[],e):{stdout:"",stderr:"",exitCode:0};let n=t[0],r=t.slice(1);try{let i=e.fs.resolvePath(e.cwd,n),s=await e.fs.readFile(i);return o(s,n,r,e)}catch{return{stdout:"",stderr:`bash: ${n}: No such file or directory
|
|
2
|
-
`,exitCode:127}}}},C={name:"sh",async execute(t,e){if(h(t))return l({...d,name:"sh",summary:"execute shell commands or scripts (POSIX shell)"});if(t[0]==="-c"&&t.length>=2){let i=t[1],s=t[2]||"sh",c=t.slice(3);return o(i,s,c,e)}if(t.length===0)return e.stdin?.trim()?o(e.stdin,"sh",[],e):{stdout:"",stderr:"",exitCode:0};let n=t[0],r=t.slice(1);try{let i=e.fs.resolvePath(e.cwd,n),s=await e.fs.readFile(i);return o(s,n,r,e)}catch{return{stdout:"",stderr:`sh: ${n}: No such file or directory
|
|
3
|
-
`,exitCode:127}}}};async function o(t,e,n,r){if(!r.exec)return{stdout:"",stderr:`bash: internal error: exec function not available
|
|
4
|
-
`,exitCode:1};let i=u(r.exportedEnv||{},{0:e,"#":String(n.length),"@":n.join(" "),"*":n.join(" ")});n.forEach((a,m)=>{i[String(m+1)]=a});let s=t;if(s.startsWith("#!")){let a=s.indexOf(`
|
|
5
|
-
`);a!==-1&&(s=s.slice(a+1))}return await r.exec(s,{env:i,cwd:r.cwd,stdin:r.stdin,signal:r.signal})}var b={name:"bash",flags:[{flag:"-c",type:"value",valueHint:"string"}],stdinType:"text"},P={name:"sh",flags:[{flag:"-c",type:"value",valueHint:"string"}],stdinType:"text"};export{y as a,C as b,b as c,P as d};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{a as m,b as y,c as k}from"./chunk-74CEPOFO.js";var F=new Map([["sha1","SHA-1"],["sha256","SHA-256"]]);function L(n){function h(r,u){return r<<u|r>>>32-u}let g=new Uint32Array([3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955,4249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,1272893353,4139469664,3200236656,681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690,4293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745]),A=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],b=n.length*8,o=(n.length%64<56?56:120)-n.length%64,s=new Uint8Array(n.length+o+8);s.set(n),s[n.length]=128;let d=new DataView(s.buffer);d.setUint32(s.length-8,b>>>0,!0),d.setUint32(s.length-4,Math.floor(b/4294967296),!0);let w=1732584193,l=4023233417,p=2562383102,e=271733878;for(let r=0;r<s.length;r+=64){let u=new Uint32Array(16);for(let t=0;t<16;t++)u[t]=d.getUint32(r+t*4,!0);let U=w,a=l,x=p,c=e;for(let t=0;t<64;t++){let i,$;t<16?(i=a&x|~a&c,$=t):t<32?(i=c&a|~c&x,$=(5*t+1)%16):t<48?(i=a^x^c,$=(3*t+5)%16):(i=x^(a|~c),$=7*t%16),i=i+U+g[t]+u[$]>>>0,U=c,c=x,x=a,a=a+h(i,A[t])>>>0}w=w+U>>>0,l=l+a>>>0,p=p+x>>>0,e=e+c>>>0}let f=new Uint8Array(16);return new DataView(f.buffer).setUint32(0,w,!0),new DataView(f.buffer).setUint32(4,l,!0),new DataView(f.buffer).setUint32(8,p,!0),new DataView(f.buffer).setUint32(12,e,!0),Array.from(f).map(r=>r.toString(16).padStart(2,"0")).join("")}async function C(n,h){if(n==="md5")return L(h);let g=F.get(n);if(!g)throw new Error(`Unknown algorithm: ${n}`);let A=await globalThis.crypto.subtle.digest(g,new Uint8Array(h).buffer);return Array.from(new Uint8Array(A)).map(b=>b.toString(16).padStart(2,"0")).join("")}function S(n,h,g){let A={name:n,summary:g,usage:`${n} [OPTION]... [FILE]...`,options:["-c, --check read checksums from FILEs and check them"," --help display this help and exit"]};return{name:n,async execute(b,o){if(y(b))return m(A);let s=!1,d=[];for(let e of b)if(e==="-c"||e==="--check")s=!0;else if(!(e==="-b"||e==="-t"||e==="--binary"||e==="--text")){if(e.startsWith("-")&&e!=="-")return k(n,e);d.push(e)}d.length===0&&d.push("-");let w=async e=>{if(e==="-")return Uint8Array.from(o.stdin,f=>f.charCodeAt(0));try{return await o.fs.readFileBuffer(o.fs.resolvePath(o.cwd,e))}catch{return null}};if(s){let e=0,f="";for(let r of d){let u=r==="-"?o.stdin:await o.fs.readFile(o.fs.resolvePath(o.cwd,r)).catch(()=>null);if(u===null)return{stdout:"",stderr:`${n}: ${r}: No such file or directory
|
|
2
|
-
`,exitCode:1};for(let U of u.split(`
|
|
3
|
-
`)){let a=U.match(/^([a-fA-F0-9]+)\s+[* ]?(.+)$/);if(!a)continue;let[,x,c]=a,t=await w(c);if(t===null){f+=`${c}: FAILED open or read
|
|
4
|
-
`,e++;continue}let i=await C(h,t)===x.toLowerCase();f+=`${c}: ${i?"OK":"FAILED"}
|
|
5
|
-
`,i||e++}}return e>0&&(f+=`${n}: WARNING: ${e} computed checksum${e>1?"s":""} did NOT match
|
|
6
|
-
`),{stdout:f,stderr:"",exitCode:e>0?1:0}}let l="",p=0;for(let e of d){let f=await w(e);if(f===null){l+=`${n}: ${e}: No such file or directory
|
|
7
|
-
`,p=1;continue}l+=`${await C(h,f)} ${e}
|
|
8
|
-
`}return{stdout:l,stderr:"",exitCode:p}}}}export{S as a};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as v}from"./chunk-SYMJJMQ4.js";import{e as x}from"./chunk-DXB73IDG.js";var w=x(v(),1);function j(){return Object.create(null)}function S(e,o,r){e[o]=r}function C(e){let o=j();for(let r of Object.keys(e)){let s=e[r];(typeof s=="string"||typeof s=="number"||typeof s=="boolean"||s===null)&&(o[r]=s)}return o}function b(e){let o=w.default.parse(e.trim(),{header:!0,dynamicTyping:!0,skipEmptyLines:!0}),r=o.data.map(s=>C(s));return{headers:o.meta.fields||[],data:r}}function R(e,o){return o.length===0?`${e.join(",")}
|
|
2
|
-
`:`${w.default.unparse(o,{columns:e}).replace(/\r\n/g,`
|
|
3
|
-
`)}
|
|
4
|
-
`}async function g(e,o){let r=e.find(p=>!p.startsWith("-")),s;if(!r||r==="-")s=o.stdin;else try{let p=o.fs.resolvePath(o.cwd,r);s=await o.fs.readFile(p)}catch{return{headers:[],data:[],error:{stdout:"",stderr:`xan: ${r}: No such file or directory
|
|
5
|
-
`,exitCode:1}}}let{headers:i,data:f}=b(s);return{headers:i,data:f}}async function W(e,o){let r=0,s=[],i=[];for(let t=0;t<e.length;t++){let n=e[t];(n==="-l"||n==="--limit")&&t+1<e.length?r=Number.parseInt(e[++t],10):(n==="-s"||n==="--select")&&t+1<e.length?s=e[++t].split(","):n.startsWith("-")||i.push(n)}let{headers:f,data:p,error:d}=await g(i,o);if(d)return d;let c=s.length>0?s.filter(t=>f.includes(t)):f,l=r>0?p.slice(0,r):p,h=Math.max(...c.map(t=>t.length)),a=[],$="\u2500".repeat(80);for(let t=0;t<l.length;t++){let n=l[t];a.push(`Row n\xB0${t}`),a.push($);for(let u of c){let m=n[u],y=m==null?"":String(m);a.push(`${u.padEnd(h)} ${y}`)}t<l.length-1&&a.push("")}return{stdout:`${a.join(`
|
|
6
|
-
`)}
|
|
7
|
-
`,stderr:"",exitCode:0}}async function k(e,o){let r=0,s=[];for(let t=0;t<e.length;t++){let n=e[t];n==="-n"&&t+1<e.length?r=Number.parseInt(e[++t],10):n.startsWith("-")||s.push(n)}let{headers:i,data:f,error:p}=await g(s,o);if(p)return p;let d=r>0?f.slice(0,r):f,c=i.map(t=>t.length);for(let t of d)for(let n=0;n<i.length;n++){let u=String(t[i[n]]??"");c[n]=Math.max(c[n],u.length)}let l=[],h="\u2500",a="\u2502";l.push(`\u250C${c.map(t=>h.repeat(t+2)).join("\u252C")}\u2510`);let $=i.map((t,n)=>` ${t.padEnd(c[n])} `).join(a);l.push(`${a}${$}${a}`),l.push(`\u251C${c.map(t=>h.repeat(t+2)).join("\u253C")}\u2524`);for(let t of d){let n=i.map((u,m)=>` ${String(t[u]??"").padEnd(c[m])} `).join(a);l.push(`${a}${n}${a}`)}return l.push(`\u2514${c.map(t=>h.repeat(t+2)).join("\u2534")}\u2518`),{stdout:`${l.join(`
|
|
8
|
-
`)}
|
|
9
|
-
`,stderr:"",exitCode:0}}export{j as a,S as b,C as c,b as d,R as e,g as f,W as g,k as h};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as S}from"./chunk-7L36YK2X.js";import{a as b}from"./chunk-HWKDQ44K.js";import{a as x,b as y}from"./chunk-74CEPOFO.js";var $={name:"wc",summary:"print newline, word, and byte counts for each file",usage:"wc [OPTION]... [FILE]...",options:["-c, --bytes print the byte counts","-m, --chars print the character counts","-l, --lines print the newline counts","-w, --words print the word counts"," --help display this help and exit"]},H={lines:{short:"l",long:"lines",type:"boolean"},words:{short:"w",long:"words",type:"boolean"},bytes:{short:"c",long:"bytes",type:"boolean"},chars:{short:"m",long:"chars",type:"boolean"}},E={name:"wc",async execute(a,c){if(y(a))return x($);let n=b("wc",a,H);if(!n.ok)return n.error;let{lines:o,words:e}=n.result.flags,s=n.result.flags.bytes||n.result.flags.chars,t=n.result.positional;!o&&!e&&!s&&(o=e=s=!0);let i=await S(c,t,{cmdName:"wc",stopOnError:!1});if(t.length===0){let r=C(i.files[0].content);return{stdout:`${w(r,o,e,s,"",0)}
|
|
2
|
-
`,stderr:"",exitCode:0}}let h=[],p=0,d=0,u=0;for(let{filename:r,content:m}of i.files){let f=C(m);p+=f.lines,d+=f.words,u+=f.chars,h.push({filename:r,stats:f})}let F=t.length>1?p:Math.max(...h.map(r=>r.stats.lines)),M=t.length>1?d:Math.max(...h.map(r=>r.stats.words)),L=t.length>1?u:Math.max(...h.map(r=>r.stats.chars)),l=t.length>1?3:0;o&&(l=Math.max(l,String(F).length)),e&&(l=Math.max(l,String(M).length)),s&&(l=Math.max(l,String(L).length));let g="";for(let{filename:r,stats:m}of h)g+=`${w(m,o,e,s,r,l)}
|
|
3
|
-
`;return t.length>1&&(g+=`${w({lines:p,words:d,chars:u},o,e,s,"total",l)}
|
|
4
|
-
`),{stdout:g,stderr:i.stderr,exitCode:i.exitCode}}};function C(a){let c=a.length,n=0,o=0,e=!1;for(let s=0;s<c;s++){let t=a[s];t===`
|
|
5
|
-
`?(n++,e&&(o++,e=!1)):t===" "||t===" "||t==="\r"?e&&(o++,e=!1):e=!0}return e&&o++,{lines:n,words:o,chars:c}}function w(a,c,n,o,e,s){let t=[];c&&t.push(String(a.lines).padStart(s)),n&&t.push(String(a.words).padStart(s)),o&&t.push(String(a.chars).padStart(s));let i=t.join(" ");return e&&(i+=` ${e}`),i}var I={name:"wc",flags:[{flag:"-l",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-m",type:"boolean"}],stdinType:"text",needsFiles:!0};export{E as a,I as b};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{c}from"./chunk-74CEPOFO.js";function I(t,r){let i=10,s=null,o=!1,l=!1,n=!1,u=[];for(let f=0;f<t.length;f++){let e=t[f];if(e==="-n"&&f+1<t.length){let a=t[++f];r==="tail"&&a.startsWith("+")?(n=!0,i=parseInt(a.slice(1),10)):i=parseInt(a,10)}else if(r==="tail"&&e.startsWith("-n+"))n=!0,i=parseInt(e.slice(3),10);else if(e.startsWith("-n"))i=parseInt(e.slice(2),10);else if(e==="-c"&&f+1<t.length)s=parseInt(t[++f],10);else if(e.startsWith("-c"))s=parseInt(e.slice(2),10);else if(e.startsWith("--bytes="))s=parseInt(e.slice(8),10);else if(e.startsWith("--lines="))i=parseInt(e.slice(8),10);else if(e==="-q"||e==="--quiet"||e==="--silent")o=!0;else if(e==="-v"||e==="--verbose")l=!0;else if(e.match(/^-\d+$/))i=parseInt(e.slice(1),10);else{if(e.startsWith("--"))return{ok:!1,error:c(r,e)};if(e.startsWith("-")&&e!=="-")return{ok:!1,error:c(r,e)};u.push(e)}}return s!==null&&(Number.isNaN(s)||s<0)?{ok:!1,error:{stdout:"",stderr:`${r}: invalid number of bytes
|
|
2
|
-
`,exitCode:1}}:Number.isNaN(i)||i<0?{ok:!1,error:{stdout:"",stderr:`${r}: invalid number of lines
|
|
3
|
-
`,exitCode:1}}:{ok:!0,options:{lines:i,bytes:s,quiet:o,verbose:l,files:u,fromLine:n}}}async function W(t,r,i,s){let{quiet:o,verbose:l,files:n}=r;if(n.length===0)return{stdout:s(t.stdin),stderr:"",exitCode:0};let u="",f="",e=0,a=l||!o&&n.length>1,h=0;for(let d=0;d<n.length;d++){let p=n[d];try{let b=t.fs.resolvePath(t.cwd,p),x=await t.fs.readFile(b);a&&(h>0&&(u+=`
|
|
4
|
-
`),u+=`==> ${p} <==
|
|
5
|
-
`),u+=s(x),h++}catch{f+=`${i}: ${p}: No such file or directory
|
|
6
|
-
`,e=1}}return{stdout:u,stderr:f,exitCode:e}}function $(t,r,i){if(i!==null)return t.slice(0,i);if(r===0)return"";let s=0,o=0,l=t.length;for(;s<l&&o<r;){let n=t.indexOf(`
|
|
7
|
-
`,s);if(n===-1)return`${t}
|
|
8
|
-
`;o++,s=n+1}return s>0?t.slice(0,s):""}function g(t,r,i,s){if(i!==null)return t.slice(-i);let o=t.length;if(o===0)return"";if(s){let f=0,e=1;for(;f<o&&e<r;){let h=t.indexOf(`
|
|
9
|
-
`,f);if(h===-1)break;e++,f=h+1}let a=t.slice(f);return a.endsWith(`
|
|
10
|
-
`)?a:`${a}
|
|
11
|
-
`}if(r===0)return"";let l=o-1;t[l]===`
|
|
12
|
-
`&&l--;let n=0;for(;l>=0&&n<r;){if(t[l]===`
|
|
13
|
-
`&&(n++,n===r)){l++;break}l--}l<0&&(l=0);let u=t.slice(l);return t[o-1]===`
|
|
14
|
-
`?u:`${u}
|
|
15
|
-
`}export{I as a,W as b,$ as c,g as d};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import{a as q,b as w}from"./chunk-A5O5YHGN.js";import{c as b}from"./chunk-24IMIIXA.js";import{b as j}from"./chunk-5QMZ5MUS.js";import{a as E,b as g}from"./chunk-3THT3N7L.js";import{a as C,b as M}from"./chunk-74CEPOFO.js";import{randomBytes as z}from"node:crypto";import{existsSync as T}from"node:fs";import{dirname as X,join as x}from"node:path";import{fileURLToPath as Y}from"node:url";import{Worker as G}from"node:worker_threads";import K from"sql.js";function A(e,t,r){switch(r.mode){case"list":return O(e,t,r);case"csv":return P(e,t,r);case"json":return N(e,t);case"line":return R(e,t,r);case"column":return F(e,t,r);case"table":return Q(e,t,r);case"markdown":return U(e,t,r);case"tabs":return W(e,t,r);case"box":return D(e,t,r);case"quote":return H(e,t,r);case"html":return J(e,t,r);case"ascii":return _(e,t,r)}}function f(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function O(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let a of t)n.push(a.map(o=>f(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function P(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(L).join(","));for(let a of t)n.push(a.map(o=>L(f(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
|
|
2
|
-
`)}
|
|
3
|
-
`:""}function L(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
|
|
4
|
-
`)?`"${e.replace(/"/g,'""')}"`:e}function B(e){return e.toPrecision(17).replace(/\.?0+$/,"")}function I(e){return e===null?"null":typeof e=="number"?Number.isInteger(e)?String(e):B(e):JSON.stringify(e)}function N(e,t){return t.length===0?"":`[${t.map(n=>`{${e.map((o,i)=>`${JSON.stringify(o)}:${I(n[i])}`).join(",")}}`).join(`,
|
|
5
|
-
`)}]
|
|
6
|
-
`}function R(e,t,r){if(e.length===0||t.length===0)return"";let n=Math.max(5,...e.map(o=>o.length)),a=[];for(let o of t)for(let i=0;i<e.length;i++){let s=e[i].padStart(n);a.push(`${s} = ${f(o[i],r.nullValue)}`)}return`${a.join(`
|
|
7
|
-
`)}
|
|
8
|
-
`}function F(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let i=0;i<o.length;i++){let s=f(o[i],r.nullValue).length;s>n[i]&&(n[i]=s)}let a=[];r.header&&(a.push(e.map((o,i)=>o.padEnd(n[i])).join(" ")),a.push(n.map(o=>"-".repeat(o)).join(" ")));for(let o of t)a.push(o.map((i,s)=>f(i,r.nullValue).padEnd(n[s])).join(" "));return a.length>0?`${a.join(`
|
|
9
|
-
`)}
|
|
10
|
-
`:""}function Q(e,t,r){if(e.length===0)return"";let n=e.map(i=>i.length);for(let i of t)for(let s=0;s<i.length;s++){let m=f(i[s],r.nullValue).length;m>n[s]&&(n[s]=m)}let a=[],o=`+${n.map(i=>"-".repeat(i+2)).join("+")}+`;a.push(o),r.header&&(a.push(`| ${e.map((i,s)=>i.padEnd(n[s])).join(" | ")} |`),a.push(o));for(let i of t)a.push(`| ${i.map((s,m)=>f(s,r.nullValue).padEnd(n[m])).join(" | ")} |`);return a.push(o),`${a.join(`
|
|
11
|
-
`)}
|
|
12
|
-
`}function U(e,t,r){if(e.length===0)return"";let n=[];r.header&&(n.push(`| ${e.join(" | ")} |`),n.push(`|${e.map(()=>"---").join("|")}|`));for(let a of t)n.push(`| ${a.map(o=>f(o,r.nullValue)).join(" | ")} |`);return n.length>0?`${n.join(`
|
|
13
|
-
`)}
|
|
14
|
-
`:""}function W(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(" "));for(let a of t)n.push(a.map(o=>f(o,r.nullValue)).join(" "));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function D(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let i=0;i<o.length;i++){let s=f(o[i],r.nullValue).length;s>n[i]&&(n[i]=s)}let a=[];a.push(`\u250C${n.map(o=>"\u2500".repeat(o+2)).join("\u252C")}\u2510`),a.push(`\u2502 ${e.map((o,i)=>o.padEnd(n[i])).join(" \u2502 ")} \u2502`),a.push(`\u251C${n.map(o=>"\u2500".repeat(o+2)).join("\u253C")}\u2524`);for(let o of t)a.push(`\u2502 ${o.map((i,s)=>f(i,r.nullValue).padEnd(n[s])).join(" \u2502 ")} \u2502`);return a.push(`\u2514${n.map(o=>"\u2500".repeat(o+2)).join("\u2534")}\u2518`),`${a.join(`
|
|
15
|
-
`)}
|
|
16
|
-
`}function H(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(a=>`'${a}'`).join(","));for(let a of t)n.push(a.map(o=>o==null?"NULL":typeof o=="number"?Number.isInteger(o)?String(o):B(o):`'${String(o)}'`).join(","));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function J(e,t,r){let n=[];r.header&&e.length>0&&(n.push(`<TR>${e.map(a=>`<TH>${V(a)}</TH>`).join("")}`),n.push("</TR>"));for(let a of t)n.push(`<TR>${a.map(o=>`<TD>${V(f(o,r.nullValue))}</TD>`).join("")}`),n.push("</TR>");return n.length>0?`${n.join(`
|
|
17
|
-
`)}
|
|
18
|
-
`:""}function V(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function _(e,t,r){let o=[];r.header&&e.length>0&&o.push(e.join(""));for(let i of t)o.push(i.map(s=>f(s,r.nullValue)).join(""));return o.length>0?o.join("")+"":""}var Z=5e3,v={name:"sqlite3",summary:"SQLite database CLI",usage:"sqlite3 [OPTIONS] DATABASE [SQL]",options:["-list output in list mode (default)","-csv output in CSV mode","-json output in JSON mode","-line output in line mode","-column output in column mode","-table output as ASCII table","-markdown output as markdown table","-tabs output in tab-separated mode","-box output in Unicode box mode","-quote output in SQL quote mode","-html output as HTML table","-ascii output in ASCII mode (control chars)","-header show column headers","-noheader hide column headers","-separator SEP field separator for list mode (default: |)","-newline SEP row separator (default: \\n)","-nullvalue TEXT text for NULL values (default: empty)","-readonly open database read-only (no writeback)","-bail stop on first error","-echo print SQL before execution","-cmd COMMAND run SQL command before main SQL","-version show SQLite version","-- end of options","--help show this help"],examples:['sqlite3 :memory: "CREATE TABLE t(x); INSERT INTO t VALUES(1); SELECT * FROM t"','sqlite3 -json data.db "SELECT * FROM users"','sqlite3 -csv -header data.db "SELECT id, name FROM products"','sqlite3 -box data.db "SELECT * FROM users"']};function ee(e){let t={mode:"list",header:!1,separator:"|",newline:`
|
|
19
|
-
`,nullValue:"",readonly:!1,bail:!1,echo:!1,cmd:null},r=null,n=null,a=!1,o=!1;for(let i=0;i<e.length;i++){let s=e[i];if(o){r===null?r=s:n===null&&(n=s);continue}if(s==="--")o=!0;else if(s==="-version")a=!0;else if(s==="-list")t.mode="list";else if(s==="-csv")t.mode="csv";else if(s==="-json")t.mode="json";else if(s==="-line")t.mode="line";else if(s==="-column")t.mode="column";else if(s==="-table")t.mode="table";else if(s==="-markdown")t.mode="markdown";else if(s==="-tabs")t.mode="tabs";else if(s==="-box")t.mode="box";else if(s==="-quote")t.mode="quote";else if(s==="-html")t.mode="html";else if(s==="-ascii")t.mode="ascii";else if(s==="-header")t.header=!0;else if(s==="-noheader")t.header=!1;else if(s==="-readonly")t.readonly=!0;else if(s==="-bail")t.bail=!0;else if(s==="-echo")t.echo=!0;else if(s==="-separator"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -separator
|
|
20
|
-
`,exitCode:1};t.separator=e[++i]}else if(s==="-newline"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -newline
|
|
21
|
-
`,exitCode:1};t.newline=e[++i]}else if(s==="-nullvalue"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -nullvalue
|
|
22
|
-
`,exitCode:1};t.nullValue=e[++i]}else if(s==="-cmd"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -cmd
|
|
23
|
-
`,exitCode:1};t.cmd=e[++i]}else{if(s.startsWith("-"))return{stdout:"",stderr:`sqlite3: Error: unknown option: ${s.startsWith("--")?s.slice(1):s}
|
|
24
|
-
Use -help for a list of options.
|
|
25
|
-
`,exitCode:1};r===null?r=s:n===null&&(n=s)}}return{options:t,database:r,sql:n,showVersion:a}}async function re(){let e=await j.runTrustedAsync(()=>K()),t=new e.Database;try{let r=t.exec("SELECT sqlite_version()");return r.length>0&&r[0].values.length>0?String(r[0].values[0][0]):"unknown"}finally{t.close()}}function te(){let e=X(Y(import.meta.url)),t=x(e,"../../commands/sqlite3/worker.js");if(T(t))return t;let r=x(e,"worker.js");if(T(r))return r;let n=x(e,"../../../dist/commands/sqlite3/worker.js");if(T(n))return n;throw new Error("sqlite3 worker not found. Run 'pnpm build' to compile the worker.")}var ne={createWorker(e,t){return new G(e,{workerData:t})}};function oe(){return z(16).toString("hex")}function se(e,t){if(!e||typeof e!="object")return{success:!1,error:"Malformed worker response"};let r=e;return typeof r.protocolToken!="string"||r.protocolToken!==t?{success:!1,error:"Malformed worker response: invalid protocol token"}:r.type==="security-violation"?{success:!1,error:`Security violation: ${typeof r.violation?.type=="string"?r.violation.type:"unknown"}`}:typeof r.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:r.success?Array.isArray(r.results)?typeof r.hasModifications!="boolean"?{success:!1,error:"Malformed worker response: missing hasModifications flag"}:r.dbBuffer!==null&&r.dbBuffer!==void 0&&!(r.dbBuffer instanceof Uint8Array)?{success:!1,error:"Malformed worker response: invalid dbBuffer"}:{success:!0,results:r.results,hasModifications:r.hasModifications,dbBuffer:r.dbBuffer===void 0?null:r.dbBuffer,defenseStats:r.defenseStats}:{success:!1,error:"Malformed worker response: missing results array"}:{success:!1,error:typeof r.error=="string"&&r.error.length>0?r.error:"Worker execution failed"}}async function ie(e,t,r){try{let n=te();return await new Promise((a,o)=>{let i=j.runTrusted(()=>ne.createWorker(n,e)),s=b(r,"sqlite3","worker timeout callback",()=>{i.terminate(),a({success:!1,error:`Query timeout: execution exceeded ${t}ms limit`})}),c=q(()=>{try{s()}catch(u){let l=u instanceof Error?u.message:String(u);a({success:!1,error:g(l)})}},t),S=b(r,"sqlite3","worker message callback",u=>{w(c),a(se(u,e.protocolToken))}),$=b(r,"sqlite3","worker error callback",u=>{w(c),o(u)}),y=b(r,"sqlite3","worker exit callback",u=>{w(c),u!==0&&a({success:!1,error:`Worker exited with code ${u}`})}),p=u=>{try{S(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);a({success:!1,error:g(d)})}},k=u=>{try{$(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);o(new Error(g(d)))}},h=u=>{try{y(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);a({success:!1,error:g(d)})}};i.on("message",p),i.on("error",k),i.on("exit",h)})}catch(n){let a=g(n.message);throw new Error(`sqlite3 worker failed to load: ${a}`)}}var $e={name:"sqlite3",async execute(e,t){if(M(e)||e.includes("-help"))return C(v);let r=ee(e);if("exitCode"in r)return r;let{options:n,database:a,sql:o,showVersion:i}=r;if(i)return{stdout:`${await re()}
|
|
26
|
-
`,stderr:"",exitCode:0};if(!a)return{stdout:"",stderr:`sqlite3: missing database argument
|
|
27
|
-
`,exitCode:1};let s=o||t.stdin.trim();if(n.cmd&&(s=n.cmd+(s?`; ${s}`:"")),!s)return{stdout:"",stderr:`sqlite3: no SQL provided
|
|
28
|
-
`,exitCode:1};let m=a===":memory:",c="",S=null;try{m||(c=t.fs.resolvePath(t.cwd,a),await t.fs.exists(c)&&(S=await t.fs.readFileBuffer(c)))}catch(l){let d=E(l.message);return{stdout:"",stderr:`sqlite3: unable to open database "${a}": ${d}
|
|
29
|
-
`,exitCode:1}}let $=t.limits?.maxSqliteTimeoutMs??Z,y={protocolToken:oe(),dbBuffer:S,sql:s,options:{bail:n.bail,echo:n.echo}},p;try{p=await ie(y,$,t.requireDefenseContext)}catch(l){return{stdout:"",stderr:`sqlite3: worker error: ${g(l.message)}
|
|
30
|
-
`,exitCode:1}}if(!p.success)return{stdout:"",stderr:`sqlite3: ${g(p.error)}
|
|
31
|
-
`,exitCode:1};let k={mode:n.mode,header:n.header,separator:n.separator,newline:n.newline,nullValue:n.nullValue},h="";n.echo&&(h+=`${s}
|
|
32
|
-
`);let u=!1;for(let l of p.results)if(l.type==="error"){if(n.bail)return{stdout:h,stderr:`Error: ${l.error}
|
|
33
|
-
`,exitCode:1};h+=`Error: ${l.error}
|
|
34
|
-
`,u=!0}else l.columns&&l.rows&&(l.rows.length>0||n.header)&&(h+=A(l.columns,l.rows,k));if(p.hasModifications&&!n.readonly&&!m&&c&&p.dbBuffer)try{await t.fs.writeFile(c,p.dbBuffer)}catch(l){let d=E(l.message);return{stdout:h,stderr:`sqlite3: failed to write database: ${d}
|
|
35
|
-
`,exitCode:1}}return{stdout:h,stderr:"",exitCode:u&&n.bail?1:0}}},ye={name:"sqlite3",flags:[],needsArgs:!0};export{ne as a,$e as b,ye as c};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{a as g}from"./chunk-HWKDQ44K.js";import{a as c,b as m}from"./chunk-74CEPOFO.js";var I={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"]},F={delimiter:{short:"d",long:"delimiters",type:"string",default:" "},serial:{short:"s",long:"serial",type:"boolean"}},P={name:"paste",async execute(s,i){if(m(s))return c(I);let n=g("paste",s,F);if(!n.ok)return n.error;let l=n.result.flags.delimiter,d=n.result.flags.serial,p=n.result.positional;if(p.length===0)return{stdout:"",stderr:`usage: paste [-s] [-d delimiters] file ...
|
|
2
|
-
`,exitCode:1};let a=i.stdin?i.stdin.split(`
|
|
3
|
-
`):[""];a.length>0&&a[a.length-1]===""&&a.pop();let x=p.filter(e=>e==="-").length,f=[],h=0;for(let e of p)if(e==="-"){let t=[];for(let o=h;o<a.length;o+=x)t.push(a[o]);f.push(t),h++}else{let t=i.fs.resolvePath(i.cwd,e);try{let r=(await i.fs.readFile(t)).split(`
|
|
4
|
-
`);r.length>0&&r[r.length-1]===""&&r.pop(),f.push(r)}catch{return{stdout:"",stderr:`paste: ${e}: No such file or directory
|
|
5
|
-
`,exitCode:1}}}let u="";if(d)for(let e of f)e&&(u+=`${y(e,l)}
|
|
6
|
-
`);else{let e=Math.max(...f.map(t=>t?.length??0));for(let t=0;t<e;t++){let o=[];for(let r of f)o.push(r?.[t]??"");u+=`${y(o,l)}
|
|
7
|
-
`}}return{stdout:u,stderr:"",exitCode:0}}};function y(s,i){if(s.length===0)return"";if(s.length===1)return s[0];let n=s[0];for(let l=1;l<s.length;l++){let d=(l-1)%i.length;n+=i[d]+s[l]}return n}var T={name:"paste",flags:[{flag:"-d",type:"value",valueHint:"delimiter"},{flag:"-s",type:"boolean"}],stdinType:"text",needsFiles:!0};export{P as a,T as b};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{b as w}from"./chunk-7L36YK2X.js";import{a as F,b as N,c as k}from"./chunk-74CEPOFO.js";var A=new Map([["",1],["k",1024],["m",1048576],["g",1073741824],["t",1099511627776],["p",0x4000000000000],["e",1152921504606847e3]]),P=new Map([["jan",1],["feb",2],["mar",3],["apr",4],["may",5],["jun",6],["jul",7],["aug",8],["sep",9],["oct",10],["nov",11],["dec",12]]);function O(u){let r=u.trim(),e=r.match(/^([+-]?\d*\.?\d+)\s*([kmgtpeKMGTPE])?[iI]?[bB]?$/);if(!e){let n=parseFloat(r);return Number.isNaN(n)?0:n}let l=parseFloat(e[1]),s=(e[2]||"").toLowerCase(),i=A.get(s)??1;return l*i}function x(u){let r=u.trim().toLowerCase().slice(0,3);return P.get(r)??0}function D(u,r){let e=u.split(/(\d+)/),l=r.split(/(\d+)/),s=Math.max(e.length,l.length);for(let i=0;i<s;i++){let n=e[i]||"",d=l[i]||"",o=/^\d+$/.test(n)?parseInt(n,10):null,c=/^\d+$/.test(d)?parseInt(d,10):null;if(o!==null&&c!==null){if(o!==c)return o-c}else if(n!==d)return n.localeCompare(d)}return 0}function M(u){return u.replace(/[^a-zA-Z0-9\s]/g,"")}function v(u,r,e){let l=e!==null?e:/\s+/,s=u.split(l),i=r.startField-1;if(i>=s.length)return"";if(r.endField===void 0){let o=s[i]||"";return r.startChar!==void 0&&(o=o.slice(r.startChar-1)),r.ignoreLeading&&(o=o.trimStart()),o}let n=Math.min(r.endField-1,s.length-1),d="";for(let o=i;o<=n&&o<s.length;o++){let c=s[o]||"";if(o===i&&r.startChar!==void 0&&(c=c.slice(r.startChar-1)),o===n&&r.endChar!==void 0){let t=o===i&&r.startChar!==void 0?r.endChar-r.startChar+1:r.endChar;c=c.slice(0,t)}o>i&&(d+=e||" "),d+=c}return r.ignoreLeading&&(d=d.trimStart()),d}function L(u,r,e){let l=u,s=r;if(e.dictionaryOrder&&(l=M(l),s=M(s)),e.ignoreCase&&(l=l.toLowerCase(),s=s.toLowerCase()),e.monthSort){let i=x(l),n=x(s);return i-n}if(e.humanNumeric){let i=O(l),n=O(s);return i-n}if(e.versionSort)return D(l,s);if(e.numeric){let i=parseFloat(l)||0,n=parseFloat(s)||0;return i-n}return l.localeCompare(s)}function I(u){let{keys:r,fieldDelimiter:e,numeric:l,ignoreCase:s,reverse:i,humanNumeric:n,versionSort:d,dictionaryOrder:o,monthSort:c,ignoreLeadingBlanks:t,stable:a}=u;return(f,C)=>{let g=f,b=C;if(t&&(g=g.trimStart(),b=b.trimStart()),r.length===0){let h=L(g,b,{numeric:l,ignoreCase:s,humanNumeric:n,versionSort:d,dictionaryOrder:o,monthSort:c});if(h!==0)return i?-h:h;if(!a){let p=f.localeCompare(C);return i?-p:p}return 0}for(let m of r){let h=v(g,m,e),p=v(b,m,e);m.ignoreLeading&&(h=h.trimStart(),p=p.trimStart());let B={numeric:m.numeric??l,ignoreCase:m.ignoreCase??s,humanNumeric:m.humanNumeric??n,versionSort:m.versionSort??d,dictionaryOrder:m.dictionaryOrder??o,monthSort:m.monthSort??c},V=m.reverse??i,S=L(h,p,B);if(S!==0)return V?-S:S}if(!a){let m=f.localeCompare(C);return i?-m:m}return 0}}function E(u,r){if(r.keys.length===0){if(r.ignoreCase){let s=new Set;return u.filter(i=>{let n=i.toLowerCase();return s.has(n)?!1:(s.add(n),!0)})}return[...new Set(u)]}let e=r.keys[0],l=new Set;return u.filter(s=>{let i=v(s,e,r.fieldDelimiter);return(e.ignoreCase??r.ignoreCase)&&(i=i.toLowerCase()),l.has(i)?!1:(l.add(i),!0)})}function y(u){let r={startField:1},e="",l=u,s=l.match(/([bdfhMnrV]+)$/);s&&(e=s[1],l=l.slice(0,-e.length)),e.includes("n")&&(r.numeric=!0),e.includes("r")&&(r.reverse=!0),e.includes("f")&&(r.ignoreCase=!0),e.includes("b")&&(r.ignoreLeading=!0),e.includes("h")&&(r.humanNumeric=!0),e.includes("V")&&(r.versionSort=!0),e.includes("d")&&(r.dictionaryOrder=!0),e.includes("M")&&(r.monthSort=!0);let i=l.split(",");if(i.length===0||i[0]==="")return null;let n=i[0].split("."),d=parseInt(n[0],10);if(Number.isNaN(d)||d<1)return null;if(r.startField=d,n.length>1&&n[1]){let o=parseInt(n[1],10);!Number.isNaN(o)&&o>=1&&(r.startChar=o)}if(i.length>1&&i[1]){let o=i[1],c=o.match(/([bdfhMnrV]+)$/);if(c){let a=c[1];a.includes("n")&&(r.numeric=!0),a.includes("r")&&(r.reverse=!0),a.includes("f")&&(r.ignoreCase=!0),a.includes("b")&&(r.ignoreLeading=!0),a.includes("h")&&(r.humanNumeric=!0),a.includes("V")&&(r.versionSort=!0),a.includes("d")&&(r.dictionaryOrder=!0),a.includes("M")&&(r.monthSort=!0),o=o.slice(0,-a.length)}let t=o.split(".");if(t[0]){let a=parseInt(t[0],10);if(!Number.isNaN(a)&&a>=1&&(r.endField=a),t.length>1&&t[1]){let f=parseInt(t[1],10);!Number.isNaN(f)&&f>=1&&(r.endChar=f)}}}return r}var q={name:"sort",summary:"sort lines of text files",usage:"sort [OPTION]... [FILE]...",options:["-b, --ignore-leading-blanks ignore leading blanks","-d, --dictionary-order consider only blanks and alphanumeric characters","-f, --ignore-case fold lower case to upper case characters","-h, --human-numeric-sort compare human readable numbers (e.g., 2K 1G)","-M, --month-sort compare (unknown) < 'JAN' < ... < 'DEC'","-n, --numeric-sort compare according to string numerical value","-r, --reverse reverse the result of comparisons","-V, --version-sort natural sort of (version) numbers within text","-c, --check check for sorted input; do not sort","-o, --output=FILE write result to FILE instead of stdout","-s, --stable stabilize sort by disabling last-resort comparison","-u, --unique output only unique lines","-k, --key=KEYDEF sort via a key; KEYDEF gives location and type","-t, --field-separator=SEP use SEP as field separator"," --help display this help and exit"],description:`KEYDEF is F[.C][OPTS][,F[.C][OPTS]]
|
|
2
|
-
F is a field number (1-indexed)
|
|
3
|
-
C is a character position within the field (1-indexed)
|
|
4
|
-
OPTS can be: b d f h M n r V (per-key modifiers)
|
|
5
|
-
|
|
6
|
-
Examples:
|
|
7
|
-
-k1 sort by first field
|
|
8
|
-
-k2,2 sort by second field only
|
|
9
|
-
-k1.3 sort by first field starting at 3rd character
|
|
10
|
-
-k1,2n sort by fields 1-2 numerically
|
|
11
|
-
-k2 -k1 sort by field 2, then by field 1`},j={name:"sort",async execute(u,r){if(N(u))return F(q);let e={reverse:!1,numeric:!1,unique:!1,ignoreCase:!1,humanNumeric:!1,versionSort:!1,dictionaryOrder:!1,monthSort:!1,ignoreLeadingBlanks:!1,stable:!1,checkOnly:!1,outputFile:null,keys:[],fieldDelimiter:null},l=[];for(let c=0;c<u.length;c++){let t=u[c];if(t==="-r"||t==="--reverse")e.reverse=!0;else if(t==="-n"||t==="--numeric-sort")e.numeric=!0;else if(t==="-u"||t==="--unique")e.unique=!0;else if(t==="-f"||t==="--ignore-case")e.ignoreCase=!0;else if(t==="-h"||t==="--human-numeric-sort")e.humanNumeric=!0;else if(t==="-V"||t==="--version-sort")e.versionSort=!0;else if(t==="-d"||t==="--dictionary-order")e.dictionaryOrder=!0;else if(t==="-M"||t==="--month-sort")e.monthSort=!0;else if(t==="-b"||t==="--ignore-leading-blanks")e.ignoreLeadingBlanks=!0;else if(t==="-s"||t==="--stable")e.stable=!0;else if(t==="-c"||t==="--check")e.checkOnly=!0;else if(t==="-o"||t==="--output")e.outputFile=u[++c]||null;else if(t.startsWith("-o"))e.outputFile=t.slice(2)||null;else if(t.startsWith("--output="))e.outputFile=t.slice(9)||null;else if(t==="-t"||t==="--field-separator")e.fieldDelimiter=u[++c]||null;else if(t.startsWith("-t"))e.fieldDelimiter=t.slice(2)||null;else if(t.startsWith("--field-separator="))e.fieldDelimiter=t.slice(18)||null;else if(t==="-k"||t==="--key"){let a=u[++c];if(a){let f=y(a);f&&e.keys.push(f)}}else if(t.startsWith("-k")){let a=y(t.slice(2));a&&e.keys.push(a)}else if(t.startsWith("--key=")){let a=y(t.slice(6));a&&e.keys.push(a)}else{if(t.startsWith("--"))return k("sort",t);if(t.startsWith("-")&&!t.startsWith("--")){let a=!1;for(let f of t.slice(1))if(f==="r")e.reverse=!0;else if(f==="n")e.numeric=!0;else if(f==="u")e.unique=!0;else if(f==="f")e.ignoreCase=!0;else if(f==="h")e.humanNumeric=!0;else if(f==="V")e.versionSort=!0;else if(f==="d")e.dictionaryOrder=!0;else if(f==="M")e.monthSort=!0;else if(f==="b")e.ignoreLeadingBlanks=!0;else if(f==="s")e.stable=!0;else if(f==="c")e.checkOnly=!0;else{a=!0;break}if(a)return k("sort",t)}else l.push(t)}}let s=await w(r,l,{cmdName:"sort"});if(!s.ok)return s.error;let n=s.content.split(`
|
|
12
|
-
`);n.length>0&&n[n.length-1]===""&&n.pop();let d=I(e);if(e.checkOnly){let c=l.length>0?l[0]:"-";for(let t=1;t<n.length;t++)if(d(n[t-1],n[t])>0)return{stdout:"",stderr:`sort: ${c}:${t+1}: disorder: ${n[t]}
|
|
13
|
-
`,exitCode:1};return{stdout:"",stderr:"",exitCode:0}}n.sort(d),e.unique&&(n=E(n,e));let o=n.length>0?`${n.join(`
|
|
14
|
-
`)}
|
|
15
|
-
`:"";if(e.outputFile){let c=r.fs.resolvePath(r.cwd,e.outputFile);return await r.fs.writeFile(c,o,"binary"),{stdout:"",stderr:"",exitCode:0}}return{stdout:o,stderr:"",exitCode:0,stdoutEncoding:"binary"}}},U={name:"sort",flags:[{flag:"-r",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-u",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-V",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-M",type:"boolean"},{flag:"-b",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-k",type:"value",valueHint:"string"},{flag:"-t",type:"value",valueHint:"delimiter"},{flag:"-o",type:"value",valueHint:"path"}],stdinType:"text",needsFiles:!0};export{j as a,U as b};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{a as x}from"./chunk-HWKDQ44K.js";import{a as b,b as F}from"./chunk-74CEPOFO.js";var v={name:"column",summary:"columnate lists",usage:"column [OPTION]... [FILE]...",description:"Format input into multiple columns. By default, fills rows first. Use -t to create a table based on whitespace-delimited input.",options:["-t Create a table (determine columns from input)","-s SEP Input field delimiter (default: whitespace)","-o SEP Output field delimiter (default: two spaces)","-c WIDTH Output width for fill mode (default: 80)","-n Don't merge multiple adjacent delimiters"],examples:["ls | column # Fill columns with ls output","cat data | column -t # Format as table","column -t -s ',' file # Format CSV as table","column -c 40 file # Fill 40-char wide columns"]},H={table:{short:"t",long:"table",type:"boolean"},separator:{short:"s",type:"string"},outputSep:{short:"o",type:"string"},width:{short:"c",type:"number",default:80},noMerge:{short:"n",type:"boolean"}};function C(t,e,l){return e?l?t.split(e):t.split(e).filter(n=>n.length>0):l?t.split(/[ \t]/):t.split(/[ \t]+/).filter(n=>n.length>0)}function I(t){let e=[];for(let l of t)for(let n=0;n<l.length;n++){let o=l[n].length;(e[n]===void 0||o>e[n])&&(e[n]=o)}return e}function W(t,e){if(t.length===0)return"";let l=I(t),n=[];for(let o of t){let c=[];for(let s=0;s<o.length;s++)s===o.length-1?c.push(o[s]):c.push(o[s].padEnd(l[s]));n.push(c.join(e))}return n.join(`
|
|
2
|
-
`)}function j(t,e,l){if(t.length===0)return"";let n=Math.max(...t.map(a=>a.length)),o=l.length,c=n+o,s=Math.max(1,Math.floor((e+o)/c)),p=Math.ceil(t.length/s),d=[];for(let a=0;a<p;a++){let i=[];for(let r=0;r<s;r++){let m=r*p+a;m<t.length&&(r===s-1||(r+1)*p+a>=t.length?i.push(t[m]):i.push(t[m].padEnd(n)))}d.push(i.join(l))}return d.join(`
|
|
3
|
-
`)}var M={name:"column",execute:async(t,e)=>{if(F(t))return b(v);let l=x("column",t,H);if(!l.ok)return l.error;let{table:n,separator:o,outputSep:c,width:s,noMerge:p}=l.result.flags,d=l.result.positional,a=c??" ",i;if(d.length===0)i=e.stdin??"";else{let u=[];for(let f of d)if(f==="-")u.push(e.stdin??"");else{let w=e.fs.resolvePath(e.cwd,f),y=await e.fs.readFile(w);if(y===null)return{exitCode:1,stdout:"",stderr:`column: ${f}: No such file or directory
|
|
4
|
-
`};u.push(y)}i=u.join("")}if(i===""||i.trim()==="")return{exitCode:0,stdout:"",stderr:""};let r=i.split(`
|
|
5
|
-
`);i.endsWith(`
|
|
6
|
-
`)&&r[r.length-1]===""&&r.pop();let g=r.filter(u=>u.trim().length>0),h;if(n){let u=g.map(f=>C(f,o,p));h=W(u,a)}else{let u=[];for(let f of g){let w=C(f,o,p);u.push(...w)}h=j(u,s,a)}return h.length>0&&(h+=`
|
|
7
|
-
`),{exitCode:0,stdout:h,stderr:""}}},P={name:"column",flags:[{flag:"-t",type:"boolean"},{flag:"-s",type:"value",valueHint:"delimiter"},{flag:"-o",type:"value",valueHint:"string"},{flag:"-c",type:"value",valueHint:"number"},{flag:"-n",type:"boolean"}],stdinType:"text",needsFiles:!0};export{M as a,P as b};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{a as c,b as u,c as h}from"./chunk-74CEPOFO.js";import f from"turndown";var p={name:"html-to-markdown",summary:"convert HTML to Markdown (BashEnv extension)",usage:"html-to-markdown [OPTION]... [FILE]",description:["Convert HTML content to Markdown format using the turndown library.","This is a non-standard BashEnv extension command, not available in regular bash.","","Read HTML from FILE or standard input and output Markdown to standard output.","Commonly used with curl to convert web pages:"," curl -s https://example.com | html-to-markdown","","Supported HTML elements:"," - Headings (h1-h6) \u2192 # Markdown headings"," - Paragraphs (p) \u2192 Plain text with blank lines"," - Links (a) \u2192 [text](url)"," - Images (img) \u2192 "," - Bold/Strong \u2192 **text**"," - Italic/Em \u2192 _text_"," - Code (code, pre) \u2192 `inline` or fenced blocks"," - Lists (ul, ol, li) \u2192 - or 1. items"," - Blockquotes \u2192 > quoted text"," - Horizontal rules (hr) \u2192 ---"],options:["-b, --bullet=CHAR bullet character for unordered lists (-, +, or *)","-c, --code=FENCE fence style for code blocks (``` or ~~~)","-r, --hr=STRING string for horizontal rules (default: ---)"," --heading-style=STYLE"," heading style: 'atx' for # headings (default),"," 'setext' for underlined headings (h1/h2 only)"," --help display this help and exit"],examples:["echo '<h1>Hello</h1><p>World</p>' | html-to-markdown","html-to-markdown page.html","curl -s https://example.com | html-to-markdown > page.md"]},g={name:"html-to-markdown",async execute(r,n){if(u(r))return c(p);let s="-",a="```",i="---",m="atx",o=[];for(let e=0;e<r.length;e++){let t=r[e];if(t==="-b"||t==="--bullet")s=r[++e]??"-";else if(t.startsWith("--bullet="))s=t.slice(9);else if(t==="-c"||t==="--code")a=r[++e]??"```";else if(t.startsWith("--code="))a=t.slice(7);else if(t==="-r"||t==="--hr")i=r[++e]??"---";else if(t.startsWith("--hr="))i=t.slice(5);else if(t.startsWith("--heading-style=")){let d=t.slice(16);(d==="setext"||d==="atx")&&(m=d)}else if(t==="-")o.push("-");else{if(t.startsWith("--"))return h("html-to-markdown",t);if(t.startsWith("-"))return h("html-to-markdown",t);o.push(t)}}let l;if(o.length===0||o.length===1&&o[0]==="-")l=n.stdin;else try{let e=n.fs.resolvePath(n.cwd,o[0]);l=await n.fs.readFile(e)}catch{return{stdout:"",stderr:`html-to-markdown: ${o[0]}: No such file or directory
|
|
2
|
-
`,exitCode:1}}if(!l.trim())return{stdout:"",stderr:"",exitCode:0};try{let e=new f({bulletListMarker:s,codeBlockStyle:"fenced",fence:a,hr:i,headingStyle:m});return e.remove(["script","style","footer"]),{stdout:`${e.turndown(l).trim()}
|
|
3
|
-
`,stderr:"",exitCode:0}}catch(e){return{stdout:"",stderr:`html-to-markdown: conversion error: ${e.message}
|
|
4
|
-
`,exitCode:1}}}},x={name:"html-to-markdown",flags:[],stdinType:"text"};export{g as a,x as b};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
async function c(e,t){if(e.length>0&&e[0]!=="-"){let i=t.fs.resolvePath(t.cwd,e[0]);try{let s=(await t.fs.readFile(i)).split(`
|
|
2
|
-
`);s[s.length-1]===""&&s.pop();let r=s.reverse();return{stdout:r.length>0?`${r.join(`
|
|
3
|
-
`)}
|
|
4
|
-
`:"",stderr:"",exitCode:0}}catch{return{stdout:"",stderr:`tac: ${e[0]}: No such file or directory
|
|
5
|
-
`,exitCode:1}}}let n=t.stdin.split(`
|
|
6
|
-
`);n[n.length-1]===""&&n.pop();let o=n.reverse();return{stdout:o.length>0?`${o.join(`
|
|
7
|
-
`)}
|
|
8
|
-
`:"",stderr:"",exitCode:0}}var l={name:"tac",execute:c},a={name:"tac",flags:[],stdinType:"text",needsFiles:!0};export{l as a,a as b};
|