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,63 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as oe}from"./chunk-YMMJLYIX.js";import{b as G}from"./chunk-YU6OGPZR.js";import{a as I}from"./chunk-SE4C7FJY.js";import{a as se,b as ae,c as H}from"./chunk-GTNBSMZR.js";import Ue from"compressjs";var j="file",ue="link",fe="symlink",Z="directory",Be={file:"0",link:"1",symlink:"2","character-device":"3","block-device":"4",directory:"5",fifo:"6","pax-header":"x","pax-global-header":"g","gnu-long-name":"L","gnu-long-link-name":"K"},Ne={0:j,1:ue,2:fe,3:"character-device",4:"block-device",5:Z,6:"fifo",x:"pax-header",g:"pax-global-header",L:"gnu-long-name",K:"gnu-long-link-name"},De=new Uint8Array(512),$=new Uint8Array(0),F=new TextEncoder,de=new TextDecoder;function v(e,t,n,r){r&&F.encodeInto(r,e.subarray(t,t+n))}function z(e,t,n,r){if(r===void 0)return;let i=r.toString(8).padStart(n-1,"0");F.encodeInto(i,e.subarray(t,t+n-1))}function C(e,t,n){let r=e.indexOf(0,t),i=r===-1||r>t+n?t+n:r;return de.decode(e.subarray(t,i))}function q(e,t,n){let r=0,i=t+n;for(let s=t;s<i;s++){let o=e[s];if(o===0)break;o!==32&&(r=r*8+(o-48))}return r}function R(e,t,n){if(e[t]&128){let r=0;r=e[t]&127;for(let i=1;i<n;i++)r=r*256+e[t+i];if(!Number.isSafeInteger(r))throw new Error("TAR number too large");return r}return q(e,t,n)}var b=e=>e.type===Z||e.type===fe||e.type===ue;async function me(e){if(e==null)return $;if(e instanceof Uint8Array)return e;if(typeof e=="string")return F.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw new TypeError("Unsupported content type for entry body.")}function pe(e,t){let{strip:n,filter:r,map:i}=t;if(!n&&!r&&!i)return e;let s={...e};if(n&&n>0){let a=s.name.split("/").filter(Boolean);if(n>=a.length)return null;let c=a.slice(n).join("/");if(s.name=s.type===Z&&!c.endsWith("/")?`${c}/`:c,s.linkname?.startsWith("/")){let l=s.linkname.split("/").filter(Boolean);s.linkname=n>=l.length?"/":`/${l.slice(n).join("/")}`}}if(r?.(s)===!1)return null;let o=i?i(s):s;return o&&(!o.name||!o.name.trim()||o.name==="."||o.name==="/")?null:o}var X=32,Le=48;function Pe(e){let t=q(e,148,8),n=0;for(let r=0;r<e.length;r++)r>=148&&r<156?n+=X:n+=e[r];return t===n}function Ke(e){e.fill(X,148,156);let t=0;for(let n of e)t+=n;for(let n=153;n>=148;n--)e[n]=(t&7)+Le,t>>=3;e[154]=0,e[155]=X}function Ge(e){let t={};e.name.length>100&&he(e.name)===null&&(t.path=e.name),e.linkname&&e.linkname.length>100&&(t.linkpath=e.linkname),e.uname&&e.uname.length>32&&(t.uname=e.uname),e.gname&&e.gname.length>32&&(t.gname=e.gname),e.uid!=null&&e.uid>2097151&&(t.uid=String(e.uid)),e.gid!=null&&e.gid>2097151&&(t.gid=String(e.gid)),e.size!=null&&e.size>8589934591&&(t.size=String(e.size)),e.pax&&Object.assign(t,e.pax);let n=Object.entries(t);if(n.length===0)return null;let r=F.encode(n.map(([i,s])=>{let o=`${i}=${s}
|
|
3
|
-
`,a=F.encode(o).length+1,c=a+String(a).length;return c=a+String(c).length,`${c} ${o}`}).join(""));return{paxHeader:ge({name:de.decode(F.encode(`PaxHeader/${e.name}`).slice(0,100)),size:r.length,type:"pax-header",mode:420,mtime:e.mtime,uname:e.uname,gname:e.gname,uid:e.uid,gid:e.gid}),paxBody:r}}function he(e){if(e.length<=100)return null;let t=e.length-100-1,n=e.lastIndexOf("/",155);return n>0&&n>=t?{prefix:e.slice(0,n),name:e.slice(n+1)}:null}function ge(e){let t=new Uint8Array(512),n=b(e)?0:e.size??0,r=e.name,i="";if(!e.pax?.path){let s=he(r);s&&(r=s.name,i=s.prefix)}return v(t,0,100,r),z(t,100,8,e.mode??(e.type===Z?493:420)),z(t,108,8,e.uid??0),z(t,116,8,e.gid??0),z(t,124,12,n),z(t,136,12,Math.floor((e.mtime?.getTime()??Date.now())/1e3)),v(t,156,1,Be[e.type??j]),v(t,157,100,e.linkname),v(t,257,6,"ustar\0"),v(t,263,2,"00"),v(t,265,32,e.uname),v(t,297,32,e.gname),v(t,345,155,i),Ke(t),t}function He(e,t){if(t&&!Pe(e))throw new Error("Invalid tar header checksum.");let n=C(e,156,1),r={name:C(e,0,100),mode:q(e,100,8),uid:R(e,108,8),gid:R(e,116,8),size:R(e,124,12),mtime:new Date(R(e,136,12)*1e3),type:Ne[n]||j,linkname:C(e,157,100)},i=C(e,257,6);return i.trim()==="ustar"&&(r.uname=C(e,265,32),r.gname=C(e,297,32)),i==="ustar"&&(r.prefix=C(e,345,155)),r}var We={path:["name",e=>e],linkpath:["linkname",e=>e],size:["size",e=>parseInt(e,10)],mtime:["mtime",parseFloat],uid:["uid",e=>parseInt(e,10)],gid:["gid",e=>parseInt(e,10)],uname:["uname",e=>e],gname:["gname",e=>e]};function Xe(e){let t=new TextDecoder("utf-8"),n={},r={},i=0;for(;i<e.length;){let s=e.indexOf(32,i);if(s===-1)break;let o=parseInt(t.decode(e.subarray(i,s)),10);if(Number.isNaN(o)||o===0)break;let a=i+o,[c,l]=t.decode(e.subarray(s+1,a-1)).split("=",2);if(c&&l!==void 0){r[c]=l;let f=We[c];if(f){let[u,g]=f,p=g(l);(typeof p=="string"||!Number.isNaN(p))&&(n[u]=p)}}i=a}return Object.keys(r).length>0&&(n.pax=r),n}function ce(e,t){t.name!==void 0&&(e.name=t.name),t.linkname!==void 0&&(e.linkname=t.linkname),t.size!==void 0&&(e.size=t.size),t.mtime!==void 0&&(e.mtime=new Date(t.mtime*1e3)),t.uid!==void 0&&(e.uid=t.uid),t.gid!==void 0&&(e.gid=t.gid),t.uname!==void 0&&(e.uname=t.uname),t.gname!==void 0&&(e.gname=t.gname),t.pax&&(e.pax=Object.assign({},e.pax??{},t.pax))}function je(e){switch(e){case"pax-global-header":case"pax-header":return Xe;case"gnu-long-name":return t=>({name:C(t,0,t.length)});case"gnu-long-link-name":return t=>({linkname:C(t,0,t.length)});default:return}}function qe(e){let t=ge(e),n=Ge(e);if(!n)return[t];let r=-n.paxBody.length&511,i=r>0?[De.subarray(0,r)]:[];return[n.paxHeader,n.paxBody,...i,t]}var Ye=new Uint8Array(512*2);function Se(e,t,n){let r=null,i=0,s=!1;return{add(o){if(s){let a=new Error("No new tar entries after finalize.");throw t(a),a}if(r!==null){let a=new Error("Previous entry must be completed before adding a new one");throw t(a),a}try{let a=b(o)?0:o.size??0,c=qe({...o,size:a});for(let l of c)e(l);r={...o,size:a},i=0}catch(a){t(a)}},write(o){if(!r){let c=new Error("No active tar entry.");throw t(c),c}if(s){let c=new Error("Cannot write data after finalize.");throw t(c),c}let a=i+o.length;if(a>r.size){let c=new Error(`"${r.name}" exceeds given size of ${r.size} bytes.`);throw t(c),c}try{i=a,e(o)}catch(c){t(c)}},endEntry(){if(!r){let o=new Error("No active entry to end.");throw t(o),o}if(s){let o=new Error("Cannot end entry after finalize.");throw t(o),o}try{if(i!==r.size){let a=new Error(`Size mismatch for "${r.name}".`);throw t(a),a}let o=-r.size&511;o>0&&e(new Uint8Array(o)),r=null,i=0}catch(o){throw t(o),o}},finalize(){if(s){let o=new Error("Archive has already been finalized");throw t(o),o}if(r!==null){let o=new Error("Cannot finalize while an entry is still active");throw t(o),o}try{e(Ye),s=!0,n&&n()}catch(o){t(o)}}}}var O=256;function Ve(){let e=new Array(O),t=e.length-1,n=0,r=0,i=0,s=a=>{let c=e[n];a===c.length?(e[n]=$,n=n+1&t):e[n]=c.subarray(a),i-=a,i===0&&e.length>O&&(e=new Array(O),t=O-1,n=0,r=0)};function o(a,c){if(c){let p=0,d=Math.min(a,i);for(;d>0;){let h=e[n],m=Math.min(d,h.length),E=m===h.length?h:h.subarray(0,m);if(s(m),d-=m,p+=m,!c(E))break}return p}if(i<a)return null;if(a===0)return $;let l=e[n];if(l.length>=a){let p=l.length===a?l:l.subarray(0,a);return s(a),p}let f=new Uint8Array(a),u=0,g=a;for(;g>0;){let p=e[n],d=Math.min(g,p.length);f.set(d===p.length?p:p.subarray(0,d),u),u+=d,g-=d,s(d)}return f}return{push:a=>{if(a.length===0)return;let c=r+1&t;if(c===n){let l=e.length,f=l*2,u=new Array(f),g=r-n+l&l-1;if(n<r)for(let p=0;p<g;p++)u[p]=e[n+p];else if(g>0){let p=l-n;for(let d=0;d<p;d++)u[d]=e[n+d];for(let d=0;d<r;d++)u[p+d]=e[d]}e=u,t=f-1,n=0,r=g,c=r+1&t}e[r]=a,r=c,i+=a.length},available:()=>i,peek:a=>{if(i<a)return null;if(a===0)return $;let c=e[n];if(c.length>=a)return c.length===a?c:c.subarray(0,a);let l=new Uint8Array(a),f=0,u=n;for(;f<a;){let g=e[u],p=Math.min(a-f,g.length);p===g.length?l.set(g,f):l.set(g.subarray(0,p),f),f+=p,u=u+1&t}return l},discard:a=>{if(a>i)throw new Error("Too many bytes consumed");if(a===0)return;let c=a;for(;c>0;){let l=e[n],f=Math.min(c,l.length);s(f),c-=f}},pull:o}}var W=0,k=1,M=new Error("Tar archive is truncated.");function Ee(e={}){let t=e.strict??!1,{available:n,peek:r,push:i,discard:s,pull:o}=Ve(),a=W,c=!1,l=!1,f=!1,u=null,g={},p={},d={isEntryActive:()=>a===k,isBodyComplete:()=>!u||u.remaining===0,write(h){if(c)throw new Error("Archive already ended.");i(h)},end(){c=!0},readHeader(){if(a!==W)throw new Error("Cannot read header while an entry is active");if(!l)for(;!l;){if(n()<512){if(c){if(n()>0&&t)throw M;l=!0;return}return null}let h=r(512);if(le(h)){if(n()<512*2){if(c){if(t)throw M;l=!0;return}return null}if(le(r(512*2).subarray(512))){s(512*2),l=!0,f=!0;return}if(t)throw new Error("Invalid tar header.");s(512);continue}let m;try{m=He(h,t)}catch(A){if(t)throw A;s(512);continue}let E=je(m.type);if(E){let A=m.size+511&-512;if(n()<512+A){if(c&&t)throw M;return null}s(512);let w=E(o(A).subarray(0,m.size)),_=m.type==="pax-global-header"?g:p;for(let T in w)_[T]=w[T];continue}s(512);let S=m;return m.prefix&&(S.name=`${m.prefix}/${S.name}`),ce(S,g),ce(S,p),p={},u={header:S,remaining:S.size,padding:-S.size&511},a=k,S}},streamBody(h){if(a!==k||!u||u.remaining===0)return 0;let m=Math.min(u.remaining,n());if(m===0)return 0;let E=o(m,h);return u.remaining-=E,E},skipPadding(){if(a!==k||!u)return!0;if(u.remaining>0)throw new Error("Body not fully consumed");return n()<u.padding?!1:(s(u.padding),u=null,a=W,!0)},skipEntry(){if(a!==k||!u)return!0;let h=Math.min(u.remaining,n());return h>0&&(s(h),u.remaining-=h),u.remaining>0?!1:d.skipPadding()},validateEOF(){if(t){if(!f)throw M;if(n()>0&&o(n()).some(h=>h!==0))throw new Error("Invalid EOF.")}}};return d}function le(e){if(e.byteOffset%8===0){let t=new BigUint64Array(e.buffer,e.byteOffset,e.length/8);for(let n=0;n<t.length;n++)if(t[n]!==0n)return!1;return!0}for(let t=0;t<e.length;t++)if(e[t]!==0)return!1;return!0}function we(){return new CompressionStream("gzip")}function Ae(){return new DecompressionStream("gzip")}function Je(){let e,t;return{readable:new ReadableStream({start(n){e=n,t=Se(n.enqueue.bind(n),n.error.bind(n),n.close.bind(n))}}),controller:{add(n){let r=b(n),i={...n};return r&&(i.size=0),t.add(i),r&&t.endEntry(),new WritableStream({write(s){t.write(s)},close(){r||t.endEntry()},abort(s){e.error(s)}})},finalize(){t.finalize()},error(n){e.error(n)}}}}async function _e(e){let t=[],n=e.getReader(),r=0;try{for(;;){let{done:o,value:a}=await n.read();if(o)break;t.push(a),r+=a.length}let i=new Uint8Array(r),s=0;for(let o of t)i.set(o,s),s+=o.length;return i}finally{n.releaseLock()}}var ye=e=>e.pipeTo(new WritableStream);function Qe(e={}){let t=Ee(e),n=null,r=!1,i=s=>{if(!r){r=!0;try{for(;;)if(t.isEntryActive()){if(n){if(t.streamBody(o=>(n.enqueue(o),!0))===0&&!t.isBodyComplete())break}else if(!t.skipEntry())break;if(t.isBodyComplete()){try{n?.close()}catch{}if(n=null,!t.skipPadding())break}}else{let o=t.readHeader();if(o==null)break;s.enqueue({header:o,body:new ReadableStream({start(a){o.size===0?a.close():n=a},pull:()=>i(s),cancel(){n=null,i(s)}})})}}catch(o){try{n?.error(o)}catch{}throw n=null,o}finally{r=!1}}};return new TransformStream({transform(s,o){try{t.write(s),i(o)}catch(a){try{n?.error(a)}catch{}throw a}},flush(s){try{if(t.end(),i(s),t.validateEOF(),t.isEntryActive()&&!t.isBodyComplete())try{n?.close()}catch{}}catch(o){try{n?.error(o)}catch{}throw o}}},void 0,{highWaterMark:1})}async function Te(e){let{readable:t,controller:n}=Je();return await(async()=>{for(let r of e){let i=n.add(r.header),s="body"in r?r.body:r.data;if(!s){await i.close();continue}if(s instanceof ReadableStream)await s.pipeTo(i);else if(s instanceof Blob)await s.stream().pipeTo(i);else try{let o=await me(s);if(o.length>0){let a=i.getWriter();await a.write(o),await a.close()}else await i.close()}catch{throw new TypeError(`Unsupported content type for entry "${r.header.name}".`)}}})().then(()=>n.finalize()).catch(r=>n.error(r)),new Uint8Array(await _e(t))}async function Ce(e,t={}){let n=e instanceof ReadableStream?e:new ReadableStream({start(s){s.enqueue(e instanceof Uint8Array?e:new Uint8Array(e)),s.close()}}),r=[],i=n.pipeThrough(Qe(t));for await(let s of i){let o;try{o=pe(s.header,t)}catch(a){throw await s.body.cancel(),a}if(o===null){await ye(s.body);continue}b(o)?(await ye(s.body),r.push({header:o})):r.push({header:o,data:await _e(s.body)})}return r}var B=null,N=null;async function Ie(){if(B)return B;if(N)throw N;try{return B=await G.runTrustedAsync(()=>import("node-liblzma")),B}catch{throw N=new Error("xz compression requires node-liblzma which failed to load. Install liblzma-dev (apt) or xz (brew) and reinstall dependencies."),N}}var D=null,L=null;async function Fe(){if(D)return D;if(L)throw L;try{return D=await G.runTrustedAsync(()=>import("@mongodb-js/zstd")),D}catch{throw L=new Error("zstd compression requires @mongodb-js/zstd which is not installed. Install it with: npm install @mongodb-js/zstd"),L}}var y=100*1024*1024,xe=512,ve=1e4;function et(e){let t="file";e.isDirectory?t="directory":e.isSymlink&&(t="symlink");let n=e.name;e.isDirectory&&!n.endsWith("/")&&(n+="/");let r;e.content!==void 0&&(typeof e.content=="string"?r=new TextEncoder().encode(e.content):r=e.content);let i=e.isDirectory||e.isSymlink?0:r?.length??0;return{header:{name:n,mode:e.mode??(e.isDirectory?493:420),uid:e.uid??0,gid:e.gid??0,size:i,mtime:e.mtime??new Date,type:t,linkname:e.linkTarget??"",uname:"user",gname:"user"},body:r}}async function U(e){let t=e.map(et);return Te(t)}async function ze(e){let t=await U(e),i=new ReadableStream({start(l){l.enqueue(t),l.close()}}).pipeThrough(we()).getReader(),s=[];for(;;){let{done:l,value:f}=await i.read();if(l)break;s.push(f)}let o=s.reduce((l,f)=>l+f.length,0),a=new Uint8Array(o),c=0;for(let l of s)a.set(l,c),c+=l.length;return a}async function x(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};if(e.length<xe||e.length%xe!==0)return{entries:[],error:"Invalid tar archive format"};try{let t=await Ce(e),n=[];for(let r of t){if(n.length>=ve)return{entries:n,error:`Too many entries (max ${ve})`};let i="file";switch(r.header.type){case"directory":i="directory";break;case"symlink":i="symlink";break;case"link":i="hardlink";break;case"file":i="file";break;default:i="other"}n.push({name:r.header.name,mode:r.header.mode??420,uid:r.header.uid??0,gid:r.header.gid??0,size:r.header.size,mtime:r.header.mtime??new Date,type:i,linkTarget:r.header.linkname||void 0,content:r.data??new Uint8Array(0)})}return{entries:n}}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:n}}}async function Y(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let r=new ReadableStream({start(c){c.enqueue(e),c.close()}}).pipeThrough(Ae()).getReader(),i=[],s=0;for(;;){let{done:c,value:l}=await r.read();if(c)break;if(s+=l.length,s>y)return await r.cancel(),{entries:[],error:`Decompressed archive too large (max ${y} bytes)`};i.push(l)}let o=new Uint8Array(s),a=0;for(let c of i)o.set(c,a),a+=c.length;return x(o)}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:`Decompression failed: ${n}`}}}function V(e){return e.length>=2&&e[0]===31&&e[1]===139}function J(e){return e.length>=3&&e[0]===66&&e[1]===90&&e[2]===104}function Q(e){return e.length>=6&&e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0}async function tt(e){let n=Ue.Bzip2.decompressFile(Array.from(e));return new Uint8Array(n)}async function rt(e){let t=Ue.Bzip2,n=[];return t.compressFile(Array.from(e),n,9),new Uint8Array(n)}async function nt(e){let n=(await Ie()).unxzSync(Buffer.from(e));return new Uint8Array(n)}async function it(e){let n=(await Ie()).xzSync(Buffer.from(e));return new Uint8Array(n)}async function ke(e){let t=await U(e);return rt(t)}async function be(e,t){if(!t?.allowNativeCodecs)throw new Error("xz compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.");let n=await U(e);return it(n)}async function ee(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let t=await tt(e);return t.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:x(t)}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:n}}}async function te(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:"xz decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction."};if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let n=await nt(e);return n.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:x(n)}catch(n){let r=n instanceof Error?n.message:"Unknown error";return{entries:[],error:r}}}function re(e){return e.length>=4&&e[0]===40&&e[1]===181&&e[2]===47&&e[3]===253}async function st(e){let n=await(await Fe()).compress(Buffer.from(e),3);return new Uint8Array(n)}async function at(e){let n=await(await Fe()).decompress(Buffer.from(e));return new Uint8Array(n)}async function Re(e,t){if(!t?.allowNativeCodecs)throw new Error("zstd compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.");let n=await U(e);return st(n)}async function ne(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:"zstd decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction."};if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let n=await at(e);return n.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:x(n)}catch(n){let r=n instanceof Error?n.message:"Unknown error";return{entries:[],error:r}}}function Oe(e){let t={create:!1,append:!1,update:!1,extract:!1,list:!1,file:"",autoCompress:!1,gzip:!1,bzip2:!1,xz:!1,zstd:!1,verbose:!1,toStdout:!1,keepOldFiles:!1,touch:!1,directory:"",preserve:!1,absoluteNames:!1,strip:0,exclude:[],filesFrom:"",excludeFrom:"",wildcards:!1},n=[],r=0;for(;r<e.length;){let i=e[r];if(i.startsWith("-")&&!i.startsWith("--")&&i.length>2){if(/^-\d+$/.test(i)){n.push(i),r++;continue}for(let s=1;s<i.length;s++){let o=i[s];switch(o){case"c":t.create=!0;break;case"r":t.append=!0;break;case"u":t.update=!0;break;case"x":t.extract=!0;break;case"t":t.list=!0;break;case"a":t.autoCompress=!0;break;case"z":t.gzip=!0;break;case"j":t.bzip2=!0;break;case"J":t.xz=!0;break;case"v":t.verbose=!0;break;case"O":t.toStdout=!0;break;case"k":t.keepOldFiles=!0;break;case"m":t.touch=!0;break;case"p":t.preserve=!0;break;case"P":t.absoluteNames=!0;break;case"f":if(s<i.length-1)t.file=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'f'
|
|
4
|
-
`,exitCode:2}};t.file=e[r]}break;case"C":if(s<i.length-1)t.directory=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'C'
|
|
5
|
-
`,exitCode:2}};t.directory=e[r]}break;case"T":if(s<i.length-1)t.filesFrom=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'T'
|
|
6
|
-
`,exitCode:2}};t.filesFrom=e[r]}break;case"X":if(s<i.length-1)t.excludeFrom=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'X'
|
|
7
|
-
`,exitCode:2}};t.excludeFrom=e[r]}break;default:return{ok:!1,error:H("tar",`-${o}`)}}}r++;continue}if(i==="-c"||i==="--create")t.create=!0;else if(i==="-r"||i==="--append")t.append=!0;else if(i==="-u"||i==="--update")t.update=!0;else if(i==="-x"||i==="--extract"||i==="--get")t.extract=!0;else if(i==="-t"||i==="--list")t.list=!0;else if(i==="-a"||i==="--auto-compress")t.autoCompress=!0;else if(i==="-z"||i==="--gzip"||i==="--gunzip")t.gzip=!0;else if(i==="-j"||i==="--bzip2")t.bzip2=!0;else if(i==="-J"||i==="--xz")t.xz=!0;else if(i==="--zstd")t.zstd=!0;else if(i==="-v"||i==="--verbose")t.verbose=!0;else if(i==="-O"||i==="--to-stdout")t.toStdout=!0;else if(i==="-k"||i==="--keep-old-files")t.keepOldFiles=!0;else if(i==="-m"||i==="--touch")t.touch=!0;else if(i==="--wildcards")t.wildcards=!0;else if(i==="-p"||i==="--preserve"||i==="--preserve-permissions")t.preserve=!0;else if(i==="-P"||i==="--absolute-names")t.absoluteNames=!0;else if(i==="-f"||i==="--file"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'f'
|
|
8
|
-
`,exitCode:2}};t.file=e[r]}else if(i.startsWith("--file="))t.file=i.substring(7);else if(i==="-C"||i==="--directory"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'C'
|
|
9
|
-
`,exitCode:2}};t.directory=e[r]}else if(i.startsWith("--directory="))t.directory=i.substring(12);else if(i.startsWith("--strip-components=")||i.startsWith("--strip=")){let s=i.includes("--strip-components=")?i.substring(19):i.substring(8),o=parseInt(s,10);if(Number.isNaN(o)||o<0)return{ok:!1,error:{stdout:"",stderr:`tar: invalid number for --strip: '${s}'
|
|
10
|
-
`,exitCode:2}};t.strip=o}else if(i.startsWith("--exclude="))t.exclude.push(i.substring(10));else if(i==="--exclude"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option '--exclude' requires an argument
|
|
11
|
-
`,exitCode:2}};t.exclude.push(e[r])}else if(i==="-T"||i==="--files-from"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'T'
|
|
12
|
-
`,exitCode:2}};t.filesFrom=e[r]}else if(i.startsWith("--files-from="))t.filesFrom=i.substring(13);else if(i==="-X"||i==="--exclude-from"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'X'
|
|
13
|
-
`,exitCode:2}};t.excludeFrom=e[r]}else if(i.startsWith("--exclude-from="))t.excludeFrom=i.substring(15);else if(i==="--"){n.push(...e.slice(r+1));break}else{if(i.startsWith("-"))return{ok:!1,error:H("tar",i)};n.push(i)}r++}return{ok:!0,options:t,files:n}}var Me=100,ot={name:"tar",summary:"manipulate tape archives",usage:"tar [options] [file...]",description:["Create, extract, or list contents of tar archives.","","One of -c, -r, -u, -x, or -t is required to specify the operation."],options:["-c, --create create a new archive","-r, --append append files to the end of an archive","-u, --update only append files newer than copy in archive","-x, --extract extract files from an archive","-t, --list list contents of an archive","-f, --file=ARCHIVE use archive file ARCHIVE","-a, --auto-compress use archive suffix to determine compression","-z, --gzip filter archive through gzip","-j, --bzip2 filter archive through bzip2","-J, --xz filter archive through xz","--zstd filter archive through zstd","-v, --verbose verbosely list files processed","-O, --to-stdout extract files to standard output","-k, --keep-old-files don't replace existing files when extracting","-m, --touch don't extract file modified time","-C, --directory=DIR change to directory DIR before performing operations","-p, --preserve preserve permissions","-P, --absolute-names do not strip leading '/' or block '..' paths","-T, --files-from=FILE read files to extract/create from FILE","-X, --exclude-from=FILE read exclude patterns from FILE","--strip=N strip N leading path components on extraction","--exclude=PATTERN exclude files matching PATTERN","--wildcards use wildcards for pattern matching"," --help display this help and exit"],examples:["tar -cvf archive.tar file1 file2 Create archive from files","tar -czvf archive.tar.gz dir/ Create gzip-compressed archive","tar -cjvf archive.tar.bz2 dir/ Create bzip2-compressed archive","tar -rf archive.tar newfile.txt Append file to archive","tar -uf archive.tar dir/ Update archive with newer files","tar -xvf archive.tar Extract archive","tar -xvf archive.tar -C /tmp Extract to /tmp","tar -tvf archive.tar List archive contents","tar -xzf archive.tar.gz Extract gzip archive","tar -xf archive.tar file1.txt Extract specific file","tar -xOf archive.tar file.txt Extract file to stdout","tar -xf archive.tar --wildcards '*.txt' Extract matching files"]};function ie(e,t){let n=e.includes("/")?e.substring(e.lastIndexOf("/")+1):e;for(let r of t){let i=r.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"<<<GLOBSTAR>>>").replace(/\*/g,"[^/]*").replace(/<<<GLOBSTAR>>>/g,".*").replace(/\?/g,".");if(I(`^${i}$`).test(e)||I(`^${i}/`).test(e)||!r.includes("/")&&I(`^${i}$`).test(n))return!0}return!1}function P(e,t){let n=t.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"<<<GLOBSTAR>>>").replace(/\*/g,"[^/]*").replace(/<<<GLOBSTAR>>>/g,".*").replace(/\?/g,"."),r=e.includes("/")?e.substring(e.lastIndexOf("/")+1):e;return I(`^${n}$`).test(e)||I(`^${n}$`).test(r)}function $e(e,t){if(t<=0)return e;let n=e.split("/").filter(r=>r!=="");return n.length<=t?"":n.slice(t).join("/")}function Ze(e){return e.split("/").some(t=>t==="..")}function ct(e,t){if(t)return{safePath:e};let n=e.replace(/^\/+/,"");return n.length===0?{safePath:""}:Ze(n)?{error:"Path contains '..'"}:{safePath:n}}function lt(e){let n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()],r=e.getDate().toString().padStart(2," "),i=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0");return`${n} ${r} ${i}:${s}`}async function K(e,t,n,r){let i=[],s=[],o=e.fs.resolvePath(t,n);try{let a=await e.fs.stat(o);if(ie(n,r))return{entries:i,errors:s};if(a.isDirectory){i.push({name:n,isDirectory:!0,mode:a.mode,mtime:a.mtime});let c=await e.fs.readdir(o);for(let l=0;l<c.length;l+=Me){let f=c.slice(l,l+Me),u=await Promise.all(f.map(g=>K(e,t,n?`${n}/${g}`:g,r)));for(let g of u)i.push(...g.entries),s.push(...g.errors)}}else if(a.isFile){let c=await e.fs.readFileBuffer(o);i.push({name:n,content:c,mode:a.mode,mtime:a.mtime})}else if(a.isSymbolicLink){let c=await e.fs.readlink(o);i.push({name:n,isSymlink:!0,linkTarget:c,mode:a.mode,mtime:a.mtime})}}catch(a){let c=a instanceof Error?a.message:"unknown error";s.push(`tar: ${n}: ${c}`)}return{entries:i,errors:s}}async function ut(e,t,n){if(n.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to create an empty archive
|
|
14
|
-
`,exitCode:2};let r=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,i=[],s=[],o="";for(let f of n){let{entries:u,errors:g}=await K(e,r,f,t.exclude);if(i.push(...u),s.push(...g),t.verbose)for(let p of u)o+=`${p.name}${p.isDirectory?"/":""}
|
|
15
|
-
`}if(i.length===0&&s.length>0)return{stdout:"",stderr:`${s.join(`
|
|
16
|
-
`)}
|
|
17
|
-
`,exitCode:2};let a;try{t.gzip?a=await ze(i):t.bzip2?a=await ke(i):t.xz?a=await be(i):t.zstd?a=await Re(i):a=await U(i)}catch(f){return{stdout:"",stderr:`tar: error creating archive: ${f instanceof Error?f.message:"unknown error"}
|
|
18
|
-
`,exitCode:2}}let c="";if(t.file&&t.file!=="-"){let f=e.fs.resolvePath(e.cwd,t.file);try{await e.fs.writeFile(f,a)}catch(u){let g=u instanceof Error?u.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${g}
|
|
19
|
-
`,exitCode:2}}}else c=Buffer.from(a).toString("latin1");let l=o;return s.length>0&&(l+=`${s.join(`
|
|
20
|
-
`)}
|
|
21
|
-
`),{stdout:c,stderr:l,exitCode:s.length>0?2:0}}async function ft(e,t,n){if(!t.file||t.file==="-")return{stdout:"",stderr:`tar: Cannot append to stdin/stdout
|
|
22
|
-
`,exitCode:2};if(n.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to append nothing to archive
|
|
23
|
-
`,exitCode:2};let r=e.fs.resolvePath(e.cwd,t.file),i;try{i=await e.fs.readFileBuffer(r)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
|
|
24
|
-
`,exitCode:2}}let s=await x(i);if(s.error)return{stdout:"",stderr:`tar: ${s.error}
|
|
25
|
-
`,exitCode:2};let o=s.entries.map(d=>({name:d.name,content:d.content,mode:d.mode,mtime:d.mtime,isDirectory:d.type==="directory",isSymlink:d.type==="symlink",linkTarget:d.linkTarget,uid:d.uid,gid:d.gid})),a=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,c=[],l=[],f="";for(let d of n){let{entries:h,errors:m}=await K(e,a,d,t.exclude);if(c.push(...h),l.push(...m),t.verbose)for(let E of h)f+=`${E.name}${E.isDirectory?"/":""}
|
|
26
|
-
`}let u=[...o,...c],g;try{g=await U(u)}catch(d){return{stdout:"",stderr:`tar: error creating archive: ${d instanceof Error?d.message:"unknown error"}
|
|
27
|
-
`,exitCode:2}}try{await e.fs.writeFile(r,g)}catch(d){let h=d instanceof Error?d.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${h}
|
|
28
|
-
`,exitCode:2}}let p=f;return l.length>0&&(p+=`${l.join(`
|
|
29
|
-
`)}
|
|
30
|
-
`),{stdout:"",stderr:p,exitCode:l.length>0?2:0}}async function dt(e,t,n){if(!t.file||t.file==="-")return{stdout:"",stderr:`tar: Cannot update stdin/stdout
|
|
31
|
-
`,exitCode:2};if(n.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to update with nothing
|
|
32
|
-
`,exitCode:2};let r=e.fs.resolvePath(e.cwd,t.file),i;try{i=await e.fs.readFileBuffer(r)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
|
|
33
|
-
`,exitCode:2}}let s=await x(i);if(s.error)return{stdout:"",stderr:`tar: ${s.error}
|
|
34
|
-
`,exitCode:2};let o=new Map;for(let m of s.entries)o.set(m.name,m.mtime);let a=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,c=[],l=[],f="";for(let m of n){let{entries:E,errors:S}=await K(e,a,m,t.exclude);l.push(...S);for(let A of E){let w=o.get(A.name);(!w||A.mtime&&A.mtime.getTime()>w.getTime())&&(c.push(A),t.verbose&&(f+=`${A.name}${A.isDirectory?"/":""}
|
|
35
|
-
`))}}if(c.length===0){let m="";return l.length>0&&(m=`${l.join(`
|
|
36
|
-
`)}
|
|
37
|
-
`),{stdout:"",stderr:m,exitCode:l.length>0?2:0}}let u=new Set(c.map(m=>m.name)),p=[...s.entries.filter(m=>!u.has(m.name)).map(m=>({name:m.name,content:m.content,mode:m.mode,mtime:m.mtime,isDirectory:m.type==="directory",isSymlink:m.type==="symlink",linkTarget:m.linkTarget,uid:m.uid,gid:m.gid})),...c],d;try{d=await U(p)}catch(m){return{stdout:"",stderr:`tar: error creating archive: ${m instanceof Error?m.message:"unknown error"}
|
|
38
|
-
`,exitCode:2}}try{await e.fs.writeFile(r,d)}catch(m){let E=m instanceof Error?m.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${E}
|
|
39
|
-
`,exitCode:2}}let h=f;return l.length>0&&(h+=`${l.join(`
|
|
40
|
-
`)}
|
|
41
|
-
`),{stdout:"",stderr:h,exitCode:l.length>0?2:0}}async function mt(e,t,n){let r;if(t.file&&t.file!=="-"){let h=e.fs.resolvePath(e.cwd,t.file);try{r=await e.fs.readFileBuffer(h)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
|
|
42
|
-
`,exitCode:2}}}else r=Uint8Array.from(e.stdin,h=>h.charCodeAt(0));let i,s=t.gzip||V(r),o=t.bzip2||J(r),a=t.xz||Q(r),c=t.zstd||re(r);if(s?i=await Y(r):o?i=await ee(r):a?i=await te(r):c?i=await ne(r):i=await x(r),i.error)return{stdout:"",stderr:`tar: ${i.error}
|
|
43
|
-
`,exitCode:2};let l=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,f=t.absoluteNames?n:n.map(h=>h.replace(/^\/+/,"")).filter(h=>h.length>0),u="",g="",p=[];if(t.directory&&!t.toStdout)try{await e.fs.mkdir(l,{recursive:!0})}catch{}for(let h of i.entries){let m=$e(h.name,t.strip);if(!m)continue;let E=ct(m,t.absoluteNames);if(E.error){p.push(`tar: ${m}: ${E.error}`);continue}let S=E.safePath??"";if(!S)continue;let A=S.endsWith("/")?S.slice(0,-1):S;if(f.length>0){let _;if(t.wildcards?_=f.some(T=>P(S,T)||P(A,T)||S.startsWith(`${T}/`)):_=f.some(T=>S===T||S.startsWith(`${T}/`)||A===T),!_)continue}if(ie(S,t.exclude))continue;let w=e.fs.resolvePath(l,S);try{if(h.type==="directory"){if(t.toStdout)continue;await e.fs.mkdir(w,{recursive:!0}),t.verbose&&(u+=`${S}
|
|
44
|
-
`)}else if(h.type==="file"){if(t.toStdout){g+=new TextDecoder().decode(h.content),t.verbose&&(u+=`${S}
|
|
45
|
-
`);continue}if(t.keepOldFiles)try{await e.fs.stat(w),t.verbose&&(u+=`${S}: not overwritten, file exists
|
|
46
|
-
`);continue}catch{}let _=w.substring(0,w.lastIndexOf("/"));if(_)try{await e.fs.mkdir(_,{recursive:!0})}catch{}if(await e.fs.writeFile(w,h.content),t.preserve&&h.mode)try{await e.fs.chmod(w,h.mode)}catch{}t.verbose&&(u+=`${S}
|
|
47
|
-
`)}else if(h.type==="symlink"&&h.linkTarget){if(t.toStdout)continue;if(!t.absoluteNames&&(h.linkTarget.startsWith("/")||Ze(h.linkTarget))){p.push(`tar: ${S}: unsafe symlink target`);continue}if(t.keepOldFiles)try{await e.fs.stat(w),t.verbose&&(u+=`${S}: not overwritten, file exists
|
|
48
|
-
`);continue}catch{}let _=w.substring(0,w.lastIndexOf("/"));if(_)try{await e.fs.mkdir(_,{recursive:!0})}catch{}try{await e.fs.symlink(h.linkTarget,w)}catch{}t.verbose&&(u+=`${S}
|
|
49
|
-
`)}}catch(_){let T=_ instanceof Error?_.message:"unknown error";p.push(`tar: ${S}: ${T}`)}}let d=u;return p.length>0&&(d+=`${p.join(`
|
|
50
|
-
`)}
|
|
51
|
-
`),{stdout:g,stderr:d,exitCode:p.length>0?2:0}}async function pt(e,t,n){let r;if(t.file&&t.file!=="-"){let f=e.fs.resolvePath(e.cwd,t.file);try{r=await e.fs.readFileBuffer(f)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
|
|
52
|
-
`,exitCode:2}}}else r=Uint8Array.from(e.stdin,f=>f.charCodeAt(0));let i,s=t.gzip||V(r),o=t.bzip2||J(r),a=t.xz||Q(r),c=t.zstd||re(r);if(s?i=await Y(r):o?i=await ee(r):a?i=await te(r):c?i=await ne(r):i=await x(r),i.error)return{stdout:"",stderr:`tar: ${i.error}
|
|
53
|
-
`,exitCode:2};let l="";for(let f of i.entries){let u=$e(f.name,t.strip);if(!u)continue;let g=u.endsWith("/")?u.slice(0,-1):u;if(n.length>0){let p;if(t.wildcards?p=n.some(d=>P(u,d)||P(g,d)||u.startsWith(`${d}/`)):p=n.some(d=>u===d||u.startsWith(`${d}/`)||g===d),!p)continue}if(!ie(u,t.exclude))if(t.verbose){let p=f.type==="directory",d=oe(f.mode,p),h=`${f.uid}/${f.gid}`,m=f.size.toString().padStart(8," "),E=lt(f.mtime),S=`${d} ${h.padEnd(10)} ${m} ${E} ${u}`;f.type==="symlink"&&f.linkTarget&&(S+=` -> ${f.linkTarget}`),l+=`${S}
|
|
54
|
-
`}else l+=`${u}
|
|
55
|
-
`}return{stdout:l,stderr:"",exitCode:0}}var Ft={name:"tar",async execute(e,t){if(ae(e))return se(ot);let n=Oe(e);if(!n.ok)return n.error;let{options:r,files:i}=n,s=[r.create,r.append,r.update,r.extract,r.list].filter(Boolean).length;if(s===0)return{stdout:"",stderr:`tar: You must specify one of -c, -r, -u, -x, or -t
|
|
56
|
-
`,exitCode:2};if(s>1)return{stdout:"",stderr:`tar: You may not specify more than one of -c, -r, -u, -x, or -t
|
|
57
|
-
`,exitCode:2};if(r.autoCompress&&r.file&&r.create){let c=r.file.toLowerCase();c.endsWith(".tar.gz")||c.endsWith(".tgz")?r.gzip=!0:c.endsWith(".tar.bz2")||c.endsWith(".tbz2")?r.bzip2=!0:c.endsWith(".tar.xz")||c.endsWith(".txz")?r.xz=!0:(c.endsWith(".tar.zst")||c.endsWith(".tzst"))&&(r.zstd=!0)}let o=[r.gzip,r.bzip2,r.xz,r.zstd].filter(Boolean).length;if(o>1)return{stdout:"",stderr:`tar: You may not specify more than one compression option
|
|
58
|
-
`,exitCode:2};if((r.append||r.update)&&o>0)return{stdout:"",stderr:`tar: Cannot append/update compressed archives - decompress first
|
|
59
|
-
`,exitCode:2};let a=i;if(r.filesFrom){let c=t.fs.resolvePath(t.cwd,r.filesFrom);try{let f=(await t.fs.readFile(c)).split(`
|
|
60
|
-
`).map(u=>u.trim()).filter(u=>u.length>0&&!u.startsWith("#"));a=[...i,...f]}catch{return{stdout:"",stderr:`tar: ${r.filesFrom}: Cannot open: No such file or directory
|
|
61
|
-
`,exitCode:2}}}if(r.excludeFrom){let c=t.fs.resolvePath(t.cwd,r.excludeFrom);try{let f=(await t.fs.readFile(c)).split(`
|
|
62
|
-
`).map(u=>u.trim()).filter(u=>u.length>0&&!u.startsWith("#"));r.exclude.push(...f)}catch{return{stdout:"",stderr:`tar: ${r.excludeFrom}: Cannot open: No such file or directory
|
|
63
|
-
`,exitCode:2}}}return r.create?ut(t,r,a):r.append?ft(t,r,a):r.update?dt(t,r,a):r.extract?mt(t,r,a):pt(t,r,a)}},zt={name:"tar",flags:[{flag:"-c",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-f",type:"value",valueHint:"path"},{flag:"-z",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-C",type:"value",valueHint:"path"},{flag:"--strip-components",type:"value",valueHint:"number"},{flag:"--exclude",type:"value",valueHint:"pattern"}],needsArgs:!0};export{Ft as a,zt as b};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{b as x}from"./chunk-5WFYIUU2.js";import{a as y,b as I,c as g}from"./chunk-GTNBSMZR.js";var w={name:"cut",summary:"remove sections from each line of files",usage:"cut [OPTION]... [FILE]...",options:["-c LIST select only these characters","-d DELIM use DELIM instead of TAB for field delimiter","-f LIST select only these fields","-s, --only-delimited do not print lines without delimiters"," --help display this help and exit"]};function F(t){let c=[],l=t.split(",");for(let n of l)if(n.includes("-")){let[s,r]=n.split("-");c.push({start:s?parseInt(s,10):1,end:r?parseInt(r,10):null})}else{let s=parseInt(n,10);c.push({start:s,end:s})}return c}function L(t,c){let l=[];for(let n of c){let s=n.start-1,r=n.end===null?t.length:n.end;for(let o=s;o<r&&o<t.length;o++)o>=0&&!l.includes(t[o])&&l.push(t[o])}return l}var k={name:"cut",async execute(t,c){if(I(t))return y(w);let l=" ",n=null,s=null,r=!1,o=[];for(let i=0;i<t.length;i++){let e=t[i];if(e==="-d")l=t[++i]||" ";else if(e.startsWith("-d"))l=e.slice(2);else if(e==="-f")n=t[++i];else if(e.startsWith("-f"))n=e.slice(2);else if(e==="-c")s=t[++i];else if(e.startsWith("-c"))s=e.slice(2);else if(e==="-s"||e==="--only-delimited")r=!0;else{if(e.startsWith("--"))return g("cut",e);if(e.startsWith("-")){let a=!1;for(let f of e.slice(1))if(f==="s")r=!0;else if(!"dfc".includes(f)){a=!0;break}if(a)return g("cut",e)}else o.push(e)}}if(!n&&!s)return{stdout:"",stderr:`cut: you must specify a list of bytes, characters, or fields
|
|
3
|
-
`,exitCode:1};let p=await x(c,o,{cmdName:"cut"});if(!p.ok)return p.error;let u=p.content.split(`
|
|
4
|
-
`);u.length>0&&u[u.length-1]===""&&u.pop();let m=F(n||s||"1"),h="";for(let i of u)if(s){let e=i.split(""),a=[];for(let f of m){let v=f.start-1,H=f.end===null?e.length:f.end;for(let d=v;d<H&&d<e.length;d++)d>=0&&a.push(e[d])}h+=`${a.join("")}
|
|
5
|
-
`}else{if(r&&!i.includes(l))continue;let e=i.split(l),a=L(e,m);h+=`${a.join(l)}
|
|
6
|
-
`}return{stdout:h,stderr:"",exitCode:0,stdoutEncoding:"binary"}}},C={name:"cut",flags:[{flag:"-d",type:"value",valueHint:"delimiter"},{flag:"-f",type:"value",valueHint:"string"},{flag:"-c",type:"value",valueHint:"string"},{flag:"-s",type:"boolean"}],stdinType:"text",needsFiles:!0};export{k as a,C as b};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as g,b,c as m}from"./chunk-GTNBSMZR.js";var k={name:"unexpand",summary:"convert spaces to tabs",usage:"unexpand [OPTION]... [FILE]...",description:"Convert blanks in each FILE to TABs, writing to standard output. If no FILE is specified, standard input is read.",options:["-t N Use N spaces per tab (default: 8)","-t LIST Use comma-separated list of tab stops","-a Convert all sequences of blanks (not just leading)"],examples:["unexpand file.txt # Convert leading spaces to tabs","unexpand -a file.txt # Convert all space sequences","unexpand -t 4 file.txt # Use 4-space tabs"]};function f(s){let i=s.split(",").map(l=>l.trim()),e=[];for(let l of i){let n=parseInt(l,10);if(Number.isNaN(n)||n<1)return null;e.push(n)}for(let l=1;l<e.length;l++)if(e[l]<=e[l-1])return null;return e}function v(s,i){if(i.length===1){let e=i[0];return s+(e-s%e)}for(let e of i)if(e>s)return e;if(i.length>=2){let e=i[i.length-1]-i[i.length-2],l=i[i.length-1],n=Math.floor((s-l)/e)+1;return l+n*e}return-1}function L(s,i){let{tabStops:e,allBlanks:l}=i,n="",o=0,t="",a=0,u=!0,d=()=>{if(t.length===0)return;let r=a+t.length;if(!l&&!u){n+=t,t="";return}let p=a,c="";for(;p<r;){let h=v(p,e);if(h<=r&&h>p)c+=" ",p=h;else break}let x=r-p;x>0&&(c+=" ".repeat(x)),n+=c,t=""};for(let r of s)r===" "?(t.length===0&&(a=o),t+=r,o++):r===" "?(d(),n+=r,o=v(o,e)):(d(),n+=r,o++,u=!1);return d(),n}function C(s,i){if(s==="")return"";let e=s.split(`
|
|
3
|
-
`),l=s.endsWith(`
|
|
4
|
-
`)&&e[e.length-1]==="";return l&&e.pop(),e.map(o=>L(o,i)).join(`
|
|
5
|
-
`)+(l?`
|
|
6
|
-
`:"")}var w={name:"unexpand",execute:async(s,i)=>{if(b(s))return g(k);let e={tabStops:[8],allBlanks:!1},l=[],n=0;for(;n<s.length;){let t=s[n];if(t==="-t"&&n+1<s.length){let a=f(s[n+1]);if(!a)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${s[n+1]}'
|
|
7
|
-
`};e.tabStops=a,n+=2}else if(t.startsWith("-t")&&t.length>2){let a=f(t.slice(2));if(!a)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${t.slice(2)}'
|
|
8
|
-
`};e.tabStops=a,n++}else if(t==="--tabs"&&n+1<s.length){let a=f(s[n+1]);if(!a)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${s[n+1]}'
|
|
9
|
-
`};e.tabStops=a,n+=2}else if(t.startsWith("--tabs=")){let a=f(t.slice(7));if(!a)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${t.slice(7)}'
|
|
10
|
-
`};e.tabStops=a,n++}else if(t==="-a"||t==="--all")e.allBlanks=!0,n++;else if(t==="--"){l.push(...s.slice(n+1));break}else{if(t.startsWith("-")&&t!=="-")return m("unexpand",t);l.push(t),n++}}let o="";if(l.length===0){let t=i.stdin??"";o=C(t,e)}else for(let t of l){let a=i.fs.resolvePath(i.cwd,t),u=await i.fs.readFile(a);if(u===null)return{exitCode:1,stdout:o,stderr:`unexpand: ${t}: No such file or directory
|
|
11
|
-
`};o+=C(u,e)}return{exitCode:0,stdout:o,stderr:""}}},F={name:"unexpand",flags:[{flag:"-t",type:"value",valueHint:"number"},{flag:"-a",type:"boolean"}],stdinType:"text",needsFiles:!0};export{w as a,F as b};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as x}from"./chunk-SXB55JOI.js";import{a as q,b as Z}from"./chunk-G43H2WGH.js";import{a as _,b as X,c as G}from"./chunk-GTNBSMZR.js";var se={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",options:["-E, --extended-regexp PATTERN is an extended regular expression","-P, --perl-regexp PATTERN is a Perl regular expression","-F, --fixed-strings PATTERN is a set of newline-separated strings","-i, --ignore-case ignore case distinctions","-v, --invert-match select non-matching lines","-w, --word-regexp match only whole words","-x, --line-regexp match only whole lines","-c, --count print only a count of matching lines","-l, --files-with-matches print only names of files with matches","-L, --files-without-match print names of files with no matches","-m NUM, --max-count=NUM stop after NUM matches","-n, --line-number print line number with output lines","-h, --no-filename suppress the file name prefix on output","-o, --only-matching show only nonempty parts of lines that match","-q, --quiet, --silent suppress all normal output","-r, -R, --recursive search directories recursively","-A NUM print NUM lines of trailing context","-B NUM print NUM lines of leading context","-C NUM print NUM lines of context","-e PATTERN use PATTERN for matching"," --include=GLOB search only files matching GLOB"," --exclude=GLOB skip files matching GLOB"," --exclude-dir=DIR skip directories matching DIR"," --help display this help and exit"]},j={name:"grep",async execute(t,s){if(X(t))return _(se);let l=!1,f=!1,c=!1,p=!1,m=!1,a=!1,n=!1,u=!1,y=!1,w=!1,h=!1,d=!1,v=!1,P=!1,B=!1,$=0,T=0,C=0,W=[],A=[],L=[],R=null,I=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.startsWith("-")&&i!=="-"){if(i==="-e"&&r+1<t.length){R=t[++r];continue}if(i.startsWith("--include=")){W.push(i.slice(10));continue}if(i.startsWith("--exclude=")){A.push(i.slice(10));continue}if(i.startsWith("--exclude-dir=")){L.push(i.slice(14));continue}if(i.startsWith("--max-count=")){$=parseInt(i.slice(12),10);continue}let b=i.match(/^-m(\d+)$/);if(b){$=parseInt(b[1],10);continue}if(i==="-m"&&r+1<t.length){$=parseInt(t[++r],10);continue}let o=i.match(/^-([ABC])(\d+)$/);if(o){let e=parseInt(o[2],10);o[1]==="A"?C=e:o[1]==="B"?T=e:o[1]==="C"&&(T=e,C=e);continue}if((i==="-A"||i==="-B"||i==="-C")&&r+1<t.length){let e=parseInt(t[++r],10);i==="-A"?C=e:i==="-B"?T=e:(T=e,C=e);continue}let g=i.startsWith("--")?[i]:i.slice(1).split("");for(let e of g)if(e==="i"||e==="--ignore-case")l=!0;else if(e==="n"||e==="--line-number")f=!0;else if(e==="v"||e==="--invert-match")c=!0;else if(e==="c"||e==="--count")p=!0;else if(e==="l"||e==="--files-with-matches")m=!0;else if(e==="L"||e==="--files-without-match")a=!0;else if(e==="r"||e==="R"||e==="--recursive")n=!0;else if(e==="w"||e==="--word-regexp")u=!0;else if(e==="x"||e==="--line-regexp")y=!0;else if(e==="E"||e==="--extended-regexp")w=!0;else if(e==="P"||e==="--perl-regexp")h=!0;else if(e==="F"||e==="--fixed-strings")d=!0;else if(e==="o"||e==="--only-matching")v=!0;else if(e==="h"||e==="--no-filename")P=!0;else if(e==="q"||e==="--quiet"||e==="--silent")B=!0;else{if(e.startsWith("--"))return G("grep",e);if(e.length===1)return G("grep",`-${e}`)}}else R===null?R=i:I.push(i)}if(R===null)return{stdout:"",stderr:`grep: missing pattern
|
|
3
|
-
`,exitCode:2};let V=d?"fixed":w?"extended":h?"perl":"basic",O,Q;try{let r=Z(R,{mode:V,ignoreCase:l,wholeWord:u,lineRegexp:y});O=r.regex,Q=r.kResetGroup}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${R}
|
|
4
|
-
`,exitCode:2}}if(I.length===0&&s.stdin!==void 0){let r=q(s.stdin,O,{invertMatch:c,showLineNumbers:f,countOnly:p,filename:"",onlyMatching:v,beforeContext:T,afterContext:C,maxCount:$,kResetGroup:Q});return B?{stdout:"",stderr:"",exitCode:r.matched?0:1}:{stdout:r.output,stderr:"",exitCode:r.matched?0:1}}if(I.length===0)return{stdout:"",stderr:`grep: no input files
|
|
5
|
-
`,exitCode:2};let M="",z="",S=!1,D=!1,F=[];for(let r of I)if(r.includes("*")||r.includes("?")||r.includes("[")){let i=await ne(r,s);if(n)for(let b of i){let o=await H(b.path,s,W,A,L,b.isFile);F.push(...o)}else F.push(...i)}else if(n){let i=await H(r,s,W,A,L);F.push(...i)}else F.push({path:r});let Y=(F.length>1||n)&&!P,k=50;for(let r=0;r<F.length;r+=k){let i=F.slice(r,r+k),b=await Promise.all(i.map(async o=>{let g=o.path,e=g.split("/").pop()||g;if(A.length>0&&!n&&A.some(N=>x(e,N,{stripQuotes:!0}))||W.length>0&&!n&&!W.some(N=>x(e,N,{stripQuotes:!0})))return null;try{let N=s.fs.resolvePath(s.cwd,g),U=!1;if(o.isFile===void 0?U=(await s.fs.stat(N)).isDirectory:U=!o.isFile,U)return n?null:{error:`grep: ${g}: Is a directory
|
|
6
|
-
`};let ee=await s.fs.readFile(N),te=q(ee,O,{invertMatch:c,showLineNumbers:f,countOnly:p,filename:Y?g:"",onlyMatching:v,beforeContext:T,afterContext:C,maxCount:$,kResetGroup:Q});return{file:g,result:te}}catch{return{error:`grep: ${g}: No such file or directory
|
|
7
|
-
`}}}));for(let o of b){if(o===null)continue;if("error"in o&&o.error){z+=o.error,o.error.includes("Is a directory")||(D=!0);continue}if(!("file"in o)||!o.result)continue;let{file:g,result:e}=o;if(e.matched){if(S=!0,B)return{stdout:"",stderr:"",exitCode:0};m?M+=`${g}
|
|
8
|
-
`:a||(M+=e.output)}else a?M+=`${g}
|
|
9
|
-
`:p&&!m&&(M+=e.output)}}let E;return D?E=2:a?E=M.length>0?0:1:E=S?0:1,B?{stdout:"",stderr:"",exitCode:E}:{stdout:M,stderr:z,exitCode:E}}},J=256;async function K(t,s,l,f,c=0){if(c>=J)return;let p=l.fs.resolvePath(l.cwd,t);try{if(!(await l.fs.stat(p)).isDirectory){let n=t.split("/").pop()||"";if(s){let u=s.replace(/^\//,"");x(n,u,{stripQuotes:!0})&&f.push(t)}return}let a=await l.fs.readdir(p);for(let n of a){let u=t==="."?n:`${t}/${n}`,y=l.fs.resolvePath(l.cwd,u);if((await l.fs.stat(y)).isDirectory)await K(u,s,l,f,c+1);else if(s){let h=s.replace(/^\//,"");x(n,h,{stripQuotes:!0})&&f.push(u)}}}catch{}}async function ne(t,s){let l=[],f=t.lastIndexOf("/"),c,p;if(f===-1?(c=s.cwd,p=t):(c=t.slice(0,f)||"/",p=t.slice(f+1)),t.includes("**")){let a=[],n=t.split("**"),u=n[0].replace(/\/$/,"")||".",y=n[1]||"";return await K(u,y,s,a),a.map(w=>({path:w}))}let m=s.fs.resolvePath(s.cwd,c);try{if(s.fs.readdirWithFileTypes){let a=await s.fs.readdirWithFileTypes(m);for(let n of a)if(x(n.name,p,{stripQuotes:!0})){let u=f===-1?n.name:`${c}/${n.name}`;l.push({path:u,isFile:n.isFile})}}else{let a=await s.fs.readdir(m);for(let n of a)if(x(n,p,{stripQuotes:!0})){let u=f===-1?n:`${c}/${n}`;l.push({path:u})}}}catch{}return l.sort((a,n)=>a.path.localeCompare(n.path))}async function H(t,s,l=[],f=[],c=[],p,m=0){if(m>=J)return[];let a=s.fs.resolvePath(s.cwd,t),n=[];try{let u,y;if(p!==void 0)u=p,y=!p;else{let h=await s.fs.stat(a);u=h.isFile,y=h.isDirectory}if(u){let h=t.split("/").pop()||t;return f.length>0&&f.some(d=>x(h,d,{stripQuotes:!0}))?[]:l.length>0&&!l.some(d=>x(h,d,{stripQuotes:!0}))?[]:[{path:t,isFile:!0}]}if(!y)return[];let w=t.split("/").pop()||t;if(c.length>0&&c.some(h=>x(w,h,{stripQuotes:!0})))return[];if(s.fs.readdirWithFileTypes){let h=await s.fs.readdirWithFileTypes(a);for(let d of h){if(d.name.startsWith("."))continue;let v=t==="."?d.name:`${t}/${d.name}`,P=await H(v,s,l,f,c,d.isFile,m+1);n.push(...P)}}else{let h=await s.fs.readdir(a);for(let d of h){if(d.startsWith("."))continue;let v=t==="."?d:`${t}/${d}`,P=await H(v,s,l,f,c,void 0,m+1);n.push(...P)}}}catch{}return n}var ae={name:"fgrep",async execute(t,s){return j.execute(["-F",...t],s)}},fe={name:"egrep",async execute(t,s){return j.execute(["-E",...t],s)}},ue={name:"grep",flags:[{flag:"-E",type:"boolean"},{flag:"-F",type:"boolean"},{flag:"-P",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-w",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-l",type:"boolean"},{flag:"-L",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-o",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-m",type:"value",valueHint:"number"},{flag:"-A",type:"value",valueHint:"number"},{flag:"-B",type:"value",valueHint:"number"},{flag:"-C",type:"value",valueHint:"number"},{flag:"-e",type:"value",valueHint:"pattern"}],stdinType:"text",needsArgs:!0},ce={name:"fgrep",flags:[],stdinType:"text",needsArgs:!0},pe={name:"egrep",flags:[],stdinType:"text",needsArgs:!0};export{j as a,ae as b,fe as c,ue as d,ce as e,pe as f};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as g,b as y,c as $}from"./chunk-GTNBSMZR.js";var x={name:"comm",summary:"compare two sorted files line by line",usage:"comm [OPTION]... FILE1 FILE2",options:["-1 suppress column 1 (lines unique to FILE1)","-2 suppress column 2 (lines unique to FILE2)","-3 suppress column 3 (lines that appear in both files)"," --help display this help and exit"]},C={name:"comm",async execute(p,a){if(y(p))return g(x);let r=!1,l=!1,f=!1,i=[];for(let e of p)if(e==="-1")r=!0;else if(e==="-2")l=!0;else if(e==="-3")f=!0;else if(e==="-12"||e==="-21")r=!0,l=!0;else if(e==="-13"||e==="-31")r=!0,f=!0;else if(e==="-23"||e==="-32")l=!0,f=!0;else if(e==="-123"||e==="-132"||e==="-213"||e==="-231"||e==="-312"||e==="-321")r=!0,l=!0,f=!0;else{if(e.startsWith("-")&&e!=="-")return $("comm",e);i.push(e)}if(i.length!==2)return{stdout:"",stderr:`comm: missing operand
|
|
3
|
-
Try 'comm --help' for more information.
|
|
4
|
-
`,exitCode:1};let c=async e=>{if(e==="-")return a.stdin;try{let w=a.fs.resolvePath(a.cwd,e);return await a.fs.readFile(w)}catch{return null}},m=await c(i[0]);if(m===null)return{stdout:"",stderr:`comm: ${i[0]}: No such file or directory
|
|
5
|
-
`,exitCode:1};let h=await c(i[1]);if(h===null)return{stdout:"",stderr:`comm: ${i[1]}: No such file or directory
|
|
6
|
-
`,exitCode:1};let t=m.split(`
|
|
7
|
-
`),s=h.split(`
|
|
8
|
-
`);t.length>0&&t[t.length-1]===""&&t.pop(),s.length>0&&s[s.length-1]===""&&s.pop();let n=0,o=0,u="",d=r?"":" ",F=(r?"":" ")+(l?"":" ");for(;n<t.length||o<s.length;)n>=t.length?(l||(u+=`${d}${s[o]}
|
|
9
|
-
`),o++):o>=s.length?(r||(u+=`${t[n]}
|
|
10
|
-
`),n++):t[n]<s[o]?(r||(u+=`${t[n]}
|
|
11
|
-
`),n++):t[n]>s[o]?(l||(u+=`${d}${s[o]}
|
|
12
|
-
`),o++):(f||(u+=`${F}${t[n]}
|
|
13
|
-
`),n++,o++);return{stdout:u,stderr:"",exitCode:0}}},I={name:"comm",flags:[{flag:"-1",type:"boolean"},{flag:"-2",type:"boolean"},{flag:"-3",type:"boolean"}],needsArgs:!0,minArgs:2};export{C as a,I as b};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as j,b as y,c as g}from"./chunk-GTNBSMZR.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]}'
|
|
3
|
-
`};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]}'
|
|
4
|
-
`};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]}'
|
|
5
|
-
`};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]}'
|
|
6
|
-
`};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]}'
|
|
7
|
-
`};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
|
|
8
|
-
`:`join: extra operand
|
|
9
|
-
`};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
|
|
10
|
-
`};r.push(u)}let o=(t,l)=>{let u=t.split(`
|
|
11
|
-
`);return t.endsWith(`
|
|
12
|
-
`)&&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(`
|
|
13
|
-
`)}
|
|
14
|
-
`:"",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,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a,b}from"./chunk-THNL3XFF.js";import"./chunk-YMMJLYIX.js";import"./chunk-SXB55JOI.js";import"./chunk-4OALHZXB.js";import"./chunk-SE4C7FJY.js";import"./chunk-D5WP4CKS.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{a as findCommand,b as flagsForFuzzing};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{b as yr}from"./chunk-WS6P4H4S.js";import{b as Ar}from"./chunk-L2JBII6Z.js";import{b as $r}from"./chunk-B3RU2PUI.js";import"./chunk-GZHFXDDO.js";import"./chunk-QSDVMMYI.js";import{c as Sr}from"./chunk-CM4532DS.js";import{b as wr}from"./chunk-XKPFI566.js";import{b as xr}from"./chunk-ORUYSLP4.js";import{b as vr}from"./chunk-IDGH4PGU.js";import{b as kr}from"./chunk-F3LGZXLQ.js";import{b as qr}from"./chunk-BYDV4VEF.js";import{b as Cr}from"./chunk-JLX6YWGA.js";import{b as br}from"./chunk-FLPVVSN5.js";import{d as Ir,e as Mr,f as jr}from"./chunk-54G6AE72.js";import{b as tr}from"./chunk-DOXYBGNA.js";import{b as lr}from"./chunk-WXMBDX4P.js";import{b as ur}from"./chunk-THALLNXT.js";import{b as pr}from"./chunk-NLBRLRWD.js";import{b as er}from"./chunk-3Y32LPNT.js";import{b as dr}from"./chunk-7BORMNPQ.js";import{b as cr}from"./chunk-N43DJTSI.js";import"./chunk-OBI37ZY4.js";import{b as hr}from"./chunk-N5OTVT4F.js";import{c as or,d as ar}from"./chunk-MAVV76T4.js";import{b as sr}from"./chunk-JTF74J6E.js";import{c as ir,d as gr}from"./chunk-GO6FXSC4.js";import{b as mr}from"./chunk-VHUYNUT7.js";import"./chunk-ZO5PSLKR.js";import{b as Fr}from"./chunk-GOJZHH3L.js";import{b as zr}from"./chunk-P6GNZPVW.js";import{b as fr}from"./chunk-LOJMXC4F.js";import{b as nr}from"./chunk-AXWFPG37.js";import"./chunk-YTIURC67.js";import{b as R}from"./chunk-PQNTKMH3.js";import{b as U}from"./chunk-PPBQJBC2.js";import{b as V}from"./chunk-NSUMEERA.js";import{b as W}from"./chunk-XY5HGZW5.js";import{c as X,d as Y}from"./chunk-AAW7UMPO.js";import{c as Z,d as _}from"./chunk-3MBAUIBB.js";import{b as N}from"./chunk-RT7TRQVZ.js";import{b as rr}from"./chunk-CQG2HEAL.js";import{b as G}from"./chunk-RJSAGJQJ.js";import{b as H}from"./chunk-YEKSVVRC.js";import{b as J}from"./chunk-26NO42TF.js";import{b as K}from"./chunk-LGJM5YFT.js";import{b as L}from"./chunk-LMK6G2HH.js";import{b as O}from"./chunk-ZKC5HQYO.js";import{b as P}from"./chunk-ROJPSS6N.js";import{b as Q}from"./chunk-THNL3XFF.js";import{b as y}from"./chunk-CGE2EHYP.js";import{b as A}from"./chunk-ZA4HUKJ3.js";import{b as $}from"./chunk-WWZVR5NN.js";import{b as S}from"./chunk-JQBC3FXE.js";import{b as T}from"./chunk-NAX7MTAR.js";import{b as B}from"./chunk-5G2VOPPJ.js";import{b as D}from"./chunk-SGA7Y45Z.js";import{b as E}from"./chunk-EUXCM6C4.js";import{b as w}from"./chunk-YLE2OYY6.js";import{b as x}from"./chunk-S7OHMN3F.js";import{b as v}from"./chunk-YWZOGBFE.js";import"./chunk-YMMJLYIX.js";import{d as k,e as q,f as C}from"./chunk-YFPDB4PH.js";import"./chunk-SXB55JOI.js";import{b}from"./chunk-HJEHIH4P.js";import"./chunk-V7ZOPVQS.js";import"./chunk-4OALHZXB.js";import"./chunk-G43H2WGH.js";import{b as I}from"./chunk-RMQC3GS7.js";import{b as M}from"./chunk-SDLWFYVT.js";import{b as j}from"./chunk-FA2CHD73.js";import{b as t}from"./chunk-EPPBDXOG.js";import{b as l}from"./chunk-PS4LOXE5.js";import{b as u}from"./chunk-VNER2XXL.js";import{b as p}from"./chunk-AZ3RUDR2.js";import{b as e}from"./chunk-7ADG3DNO.js";import{b as d}from"./chunk-TEFXEYX3.js";import{b as c}from"./chunk-ZSVBYEY4.js";import{b as h}from"./chunk-SXRVLCZ4.js";import"./chunk-FSZWFMB4.js";import"./chunk-LIYVQA3X.js";import"./chunk-OOJCYVYF.js";import"./chunk-4PRVMER6.js";import"./chunk-MO4RPBN2.js";import"./chunk-YU6OGPZR.js";import"./chunk-SE4C7FJY.js";import{b as i}from"./chunk-LJKIWB5F.js";import{b as g}from"./chunk-MRP4ZCD7.js";import"./chunk-5WFYIUU2.js";import{b as m}from"./chunk-ND23BJUM.js";import"./chunk-D5WP4CKS.js";import"./chunk-6KZRLMG3.js";import{b as F}from"./chunk-MXVNCVD6.js";import"./chunk-OBH7XN5N.js";import{b as z}from"./chunk-7G3MC56B.js";import"./chunk-RLNOQILG.js";import{b as f}from"./chunk-EJQKHROT.js";import"./chunk-JBABAK44.js";import{b as n}from"./chunk-ITA43A73.js";import"./chunk-4VDEBYW7.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";var Er=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,I,M,j,y,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,ir,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,Ir,Mr,jr,yr,Ar,$r,Sr];function Tr(){return Er}var Br=new Map;for(let r of Tr())Br.set(r.name,new Set(r.flags.map(o=>o.flag)));function Fa(r,o,Dr){let a=Br.get(o);if(!(!a||a.size===0))for(let s of Dr)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{Fa as emitFlagCoverage};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-YFPDB4PH.js";import"./chunk-SXB55JOI.js";import"./chunk-G43H2WGH.js";import"./chunk-SE4C7FJY.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{c as egrepCommand,f as egrepFlagsForFuzzing,b as fgrepCommand,e as fgrepFlagsForFuzzing,d as flagsForFuzzing,a as grepCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-54G6AE72.js";import"./chunk-JBABAK44.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{d as flagsForFuzzing,b as gunzipCommand,e as gunzipFlagsForFuzzing,a as gzipCommand,c as zcatCommand,f as zcatFlagsForFuzzing};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a,b}from"./chunk-VHUYNUT7.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-5WFYIUU2.js";import"./chunk-6KZRLMG3.js";import"./chunk-OBH7XN5N.js";import"./chunk-RLNOQILG.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as jqCommand};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as F,b as W}from"./chunk-MNMRGJJM.js";import"./chunk-4OALHZXB.js";import"./chunk-D64U2VGQ.js";import"./chunk-LIYVQA3X.js";import{a as T,b as E}from"./chunk-OOJCYVYF.js";import{a as M}from"./chunk-4PRVMER6.js";import{b as L}from"./chunk-YU6OGPZR.js";import{a as O,b as k}from"./chunk-RLNOQILG.js";import{a as j}from"./chunk-4VDEBYW7.js";import{b as B}from"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";import{AsyncLocalStorage as H}from"node:async_hooks";import{randomBytes as q}from"node:crypto";import{fileURLToPath as N}from"node:url";import{Worker as D}from"node:worker_threads";var _=1e4,I=6e4,R=new H,J=`js-exec - Sandboxed JavaScript/TypeScript runtime with Node.js-compatible APIs
|
|
3
|
-
|
|
4
|
-
Usage: js-exec [OPTIONS] [-c CODE | FILE] [ARGS...]
|
|
5
|
-
|
|
6
|
-
Options:
|
|
7
|
-
-c CODE Execute inline code
|
|
8
|
-
-m, --module Enable ES module mode (import/export)
|
|
9
|
-
--strip-types Strip TypeScript type annotations
|
|
10
|
-
--version, -V Show version
|
|
11
|
-
--help Show this help
|
|
12
|
-
|
|
13
|
-
Examples:
|
|
14
|
-
js-exec -c "console.log(1 + 2)"
|
|
15
|
-
js-exec script.js
|
|
16
|
-
js-exec app.ts
|
|
17
|
-
echo 'console.log("hello")' | js-exec
|
|
18
|
-
|
|
19
|
-
File Extension Auto-Detection:
|
|
20
|
-
.js script mode (module mode if top-level await detected)
|
|
21
|
-
.mjs ES module mode
|
|
22
|
-
.ts, .mts ES module mode + TypeScript stripping
|
|
23
|
-
|
|
24
|
-
Node.js Compatibility:
|
|
25
|
-
Code written for Node.js largely works here. Both require and import
|
|
26
|
-
are supported, the node: prefix works, and standard globals like process,
|
|
27
|
-
console, and fetch are available. All I/O is synchronous.
|
|
28
|
-
|
|
29
|
-
Available modules:
|
|
30
|
-
fs, path, child_process, process, console,
|
|
31
|
-
os, url, assert, util, events, buffer, stream,
|
|
32
|
-
string_decoder, querystring
|
|
33
|
-
|
|
34
|
-
fs (global, require('fs'), or import from 'node:fs'):
|
|
35
|
-
readFileSync, writeFileSync, appendFileSync, copyFileSync, renameSync
|
|
36
|
-
readdirSync, mkdirSync, rmSync, unlinkSync, rmdirSync
|
|
37
|
-
statSync, lstatSync, existsSync, realpathSync, chmodSync
|
|
38
|
-
symlinkSync, readlinkSync, readFileBuffer
|
|
39
|
-
fs.promises.readFile, fs.promises.writeFile, fs.promises.access, ...
|
|
40
|
-
|
|
41
|
-
path: join, resolve, dirname, basename, extname, normalize,
|
|
42
|
-
relative, isAbsolute, parse, format, sep, delimiter
|
|
43
|
-
|
|
44
|
-
child_process:
|
|
45
|
-
execSync(cmd) throws on non-zero exit, returns stdout
|
|
46
|
-
spawnSync(cmd, args) returns { stdout, stderr, status }
|
|
47
|
-
|
|
48
|
-
process (also global): argv, cwd(), exit(), env, platform, arch,
|
|
49
|
-
version, versions
|
|
50
|
-
|
|
51
|
-
os: platform(), arch(), homedir(), tmpdir(), type(), hostname(),
|
|
52
|
-
EOL, cpus(), endianness()
|
|
53
|
-
|
|
54
|
-
url: URL, URLSearchParams, parse(), format()
|
|
55
|
-
|
|
56
|
-
assert: ok(), equal(), strictEqual(), deepEqual(), throws(),
|
|
57
|
-
doesNotThrow(), fail()
|
|
58
|
-
|
|
59
|
-
util: format(), inspect(), promisify(), types, inherits()
|
|
60
|
-
|
|
61
|
-
events: EventEmitter (on, once, emit, off, removeListener, ...)
|
|
62
|
-
|
|
63
|
-
buffer: Buffer.from(), Buffer.alloc(), Buffer.concat(),
|
|
64
|
-
Buffer.isBuffer(), toString(), slice(), equals()
|
|
65
|
-
|
|
66
|
-
stream: Readable, Writable, Duplex, Transform, PassThrough, pipeline
|
|
67
|
-
|
|
68
|
-
string_decoder: StringDecoder (write, end)
|
|
69
|
-
|
|
70
|
-
querystring: parse(), stringify(), escape(), unescape()
|
|
71
|
-
|
|
72
|
-
Other Globals:
|
|
73
|
-
console log (stdout), error/warn (stderr)
|
|
74
|
-
fetch(url, opts) HTTP; returns Promise<Response> (Web Fetch API)
|
|
75
|
-
URL, URLSearchParams, Headers, Request, Response
|
|
76
|
-
Buffer Buffer.from(), Buffer.alloc(), etc.
|
|
77
|
-
|
|
78
|
-
Not Available:
|
|
79
|
-
http, https, net, tls, crypto, zlib, dns, cluster, worker_threads,
|
|
80
|
-
vm, v8, readline, and other Node.js built-in modules that require
|
|
81
|
-
native bindings. Use fetch() for HTTP requests.
|
|
82
|
-
|
|
83
|
-
Limits:
|
|
84
|
-
Memory: 64 MB per execution
|
|
85
|
-
Timeout: 10 s (60 s with network; configurable via maxJsTimeoutMs)
|
|
86
|
-
Engine: QuickJS (compiled to WebAssembly)
|
|
87
|
-
`;function z(t){let e={code:null,scriptFile:null,showVersion:!1,scriptArgs:[],isModule:!1,stripTypes:!1};if(t.length===0)return e;for(let r=0;r<t.length;r++){let o=t[r];if(o==="-m"||o==="--module"){e.isModule=!0;continue}if(o==="--strip-types"){e.stripTypes=!0;continue}if(o==="-c")return r+1>=t.length?{stdout:"",stderr:`js-exec: option requires an argument -- 'c'
|
|
88
|
-
`,exitCode:2}:(e.code=t[r+1],e.scriptArgs=t.slice(r+2),e);if(o==="--version"||o==="-V")return e.showVersion=!0,e;if(o.startsWith("-")&&o!=="-"&&o!=="--")return{stdout:"",stderr:`js-exec: unrecognized option '${o}'
|
|
89
|
-
`,exitCode:2};if(o==="--")return r+1<t.length&&(e.scriptFile=t[r+1],e.scriptArgs=t.slice(r+2)),e;if(!o.startsWith("-"))return e.scriptFile=o,e.scriptArgs=t.slice(r+1),e}return e}var i=null,b=null,a=[],n=null,V=N(new URL("./worker.js",import.meta.url));function w(){for(;a.length>0&&a[0].canceled;)a.shift();if(n||a.length===0)return;let t=a.shift();if(!t)return;n=t,G().postMessage(n.input)}function Q(t,e){if(!t||typeof t!="object")return{success:!1,error:"Malformed worker response"};let r=t;if(typeof r.protocolToken!="string"||r.protocolToken!==e)return{success:!1,error:"Malformed worker response: invalid protocol token"};if(typeof r.success!="boolean")return{success:!1,error:"Malformed worker response: missing success flag"};if(r.success){let o={success:!0},s=t;return typeof s.executorResult=="string"&&(o.executorResult=s.executorResult),Array.isArray(s.executorLogs)&&(o.executorLogs=s.executorLogs),o}return{success:!1,error:typeof r.error=="string"&&r.error.length>0?r.error:"Worker execution failed"}}function G(){if(b&&(E(b),b=null),i)return i;let t=L.runTrusted(()=>new D(V));return i=t,t.on("message",e=>{if(i===t){if(n){let r=Q(e,n.input.protocolToken);n.resolve(r),n=null}a.length>0?w():K()}}),t.on("error",e=>{if(i===t){if(n){let r=k(j(e));n.resolve({success:!1,error:r}),n=null}for(let r of a)r.resolve({success:!1,error:"Worker crashed"});a.length=0,i=null}}),t.on("exit",()=>{i===t&&(i=null,n&&(n.resolve({success:!1,error:"Worker exited unexpectedly"}),n=null),a.length>0&&w())}),t}function K(){b=T(()=>{i&&!n&&a.length===0&&(i.terminate(),i=null)},5e3)}async function X(t,e,r,o=[],s,d,f){return R.getStore()?{stdout:"",stderr:`js-exec: recursive invocation is not supported
|
|
90
|
-
`,exitCode:1}:Y(t,e,r,o,s,d,f)}async function Y(t,e,r,o=[],s,d,f){let y=F(),u=e.exec,h=u?(m,P)=>R.run(!0,()=>u(m,P)):void 0,l=new W(y,e.fs,e.cwd,"js-exec",e.fetch,e.limits?.maxOutputSize??0,h,e.executorInvokeTool),x=e.limits?.maxJsTimeoutMs??_,g=e.fetch?Math.max(x,I):x,c={protocolToken:q(16).toString("hex"),sharedBuffer:y,jsCode:t,cwd:e.cwd,env:M(e.env),args:o,scriptPath:r,bootstrapCode:s,isModule:d,stripTypes:f,timeoutMs:g,hasExecutorTools:e.executorInvokeTool!==void 0},A,U=new Promise(m=>{A=m}),S={input:c,resolve:()=>{}},$=T(()=>{if(n===S){let m=i;m&&(i=null,m.terminate()),n=null,w()}else S.canceled=!0,n||w();S.resolve({success:!1,error:`Execution timeout: exceeded ${g}ms limit`})},g);S.resolve=m=>{E($),A(m)},a.push(S),w();let[v,C]=await Promise.all([l.run(g),U.catch(m=>({success:!1,error:k(j(m))}))]);return!C.success&&C.error?{stdout:v.stdout,stderr:`${v.stderr}js-exec: ${k(C.error)}
|
|
91
|
-
`,exitCode:v.exitCode||1}:v}async function de(t,e,r){if(R.getStore())return{result:null,error:"js-exec: recursive invocation is not supported"};let o=F(),s=new W(o,e.fs,e.cwd,"js-exec",e.fetch,e.limits?.maxOutputSize??0,void 0,r),d=e.limits?.maxJsTimeoutMs??_,f=e.fetch?Math.max(d,I):d,u={protocolToken:q(16).toString("hex"),sharedBuffer:o,jsCode:t,cwd:e.cwd,env:M(e.env),args:[],executorMode:!0,timeoutMs:f},h,l=new Promise(c=>{h=c}),x={input:u,resolve:()=>{}},g=T(()=>{if(n===x){let c=i;c&&(i=null,c.terminate()),n=null,w()}else x.canceled=!0,n||w();x.resolve({success:!1,error:`Execution timeout: exceeded ${f}ms limit`})},f);x.resolve=c=>{E(g),h(c)},a.push(x),w();let[,p]=await Promise.all([s.run(f),l.catch(c=>({success:!1,error:k(j(c))}))]);if("executorLogs"in p||"executorResult"in p){if(p.error)return{result:null,error:p.error,logs:p.executorLogs};let c;if(p.executorResult!==void 0)try{c=JSON.parse(p.executorResult)}catch{c=p.executorResult}return{result:c??null,logs:p.executorLogs}}return{result:null,error:p.error||"Unknown execution error"}}var fe={name:"js-exec",async execute(t,e){if(B(t))return{stdout:J,stderr:"",exitCode:0};let r=z(t);if("exitCode"in r)return r;if(r.showVersion)return{stdout:`QuickJS (quickjs-emscripten)
|
|
92
|
-
`,stderr:"",exitCode:0};let o,s;if(r.code!==null)o=r.code,s="-c";else if(r.scriptFile!==null){let u=e.fs.resolvePath(e.cwd,r.scriptFile);if(!await e.fs.exists(u))return{stdout:"",stderr:`js-exec: can't open file '${r.scriptFile}': No such file or directory
|
|
93
|
-
`,exitCode:2};try{o=await e.fs.readFile(u),s=u}catch(h){return{stdout:"",stderr:`js-exec: can't open file '${r.scriptFile}': ${O(h.message)}
|
|
94
|
-
`,exitCode:2}}}else if(e.stdin.trim())o=e.stdin,s="<stdin>";else return{stdout:"",stderr:`js-exec: no input provided (use -c CODE or provide a script file)
|
|
95
|
-
`,exitCode:2};let d=r.isModule,f=r.stripTypes;if(s&&s!=="-c"&&s!=="<stdin>"&&((s.endsWith(".mjs")||s.endsWith(".mts")||s.endsWith(".ts"))&&(d=!0),(s.endsWith(".ts")||s.endsWith(".mts"))&&(f=!0)),!d&&/\bawait\s+[\w([`]/.test(o)&&(d=!0),e.executorExecFn){let u=await e.executorExecFn(o),h=u.logs??[];return{stdout:h.filter(l=>!l.startsWith("[error]")&&!l.startsWith("[warn]")).map(l=>`${l.replace(/^\[(log|info|debug)\] /,"")}
|
|
96
|
-
`).join(""),stderr:u.error?`${u.error}
|
|
97
|
-
`:h.filter(l=>l.startsWith("[error]")||l.startsWith("[warn]")).map(l=>`${l.replace(/^\[(error|warn)\] /,"")}
|
|
98
|
-
`).join(""),exitCode:u.error?1:0}}let y=e.jsBootstrapCode;return X(o,e,s,r.scriptArgs,y,d,f)}},pe={name:"node",async execute(){return{stdout:"",stderr:`node: this sandbox uses js-exec instead of node
|
|
99
|
-
|
|
100
|
-
${J}`,exitCode:1}}};export{de as executeForExecutor,fe as jsExecCommand,pe as nodeStubCommand};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as _,b as O}from"./chunk-MNMRGJJM.js";import"./chunk-4OALHZXB.js";import"./chunk-D64U2VGQ.js";import"./chunk-LIYVQA3X.js";import{a as v,b as T}from"./chunk-OOJCYVYF.js";import{a as D}from"./chunk-4PRVMER6.js";import{c as y}from"./chunk-MO4RPBN2.js";import{b as C}from"./chunk-YU6OGPZR.js";import{a as M,b as c}from"./chunk-RLNOQILG.js";import{a as E}from"./chunk-4VDEBYW7.js";import{a as b,b as P}from"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";import{randomBytes as $}from"node:crypto";import{fileURLToPath as Q}from"node:url";import{Worker as R}from"node:worker_threads";var U=1e4,H=6e4,I={name:"python3",summary:"Execute Python code via CPython Emscripten",usage:"python3 [OPTIONS] [-c CODE | -m MODULE | FILE] [ARGS...]",description:["Execute Python code using CPython compiled to WebAssembly via Emscripten.","","This command runs Python in an isolated environment with access to","the virtual filesystem. Standard library modules are available."],options:["-c CODE Execute CODE as Python script","-m MODULE Run library module as a script","--version Show Python version","--help Show this help"],examples:['python3 -c "print(1 + 2)"','python3 -c "import sys; print(sys.version)"',"python3 script.py","python3 script.py arg1 arg2",`echo 'print("hello")' | python3`],notes:["CPython runs in WebAssembly, so execution may be slower than native Python.","Standard library modules are available (no pip install).","Maximum execution time is 30 seconds by default."]};function L(r){let e={code:null,module:null,scriptFile:null,showVersion:!1,scriptArgs:[]};if(r.length===0)return e;let t=r.findIndex(o=>!o.startsWith("-")||o==="-"||o==="--");for(let o=0;o<(t===-1?r.length:t);o++){let s=r[o];if(s==="-c")return o+1>=r.length?{stdout:"",stderr:`python3: option requires an argument -- 'c'
|
|
3
|
-
`,exitCode:2}:(e.code=r[o+1],e.scriptArgs=r.slice(o+2),e);if(s==="-m")return o+1>=r.length?{stdout:"",stderr:`python3: option requires an argument -- 'm'
|
|
4
|
-
`,exitCode:2}:(e.module=r[o+1],e.scriptArgs=r.slice(o+2),e);if(s==="--version"||s==="-V")return e.showVersion=!0,e;if(s.startsWith("-")&&s!=="-")return{stdout:"",stderr:`python3: unrecognized option '${s}'
|
|
5
|
-
`,exitCode:2}}if(t!==-1){let o=r[t];o==="--"?t+1<r.length&&(e.scriptFile=r[t+1],e.scriptArgs=r.slice(t+2)):(e.scriptFile=o,e.scriptArgs=r.slice(t+1))}return e}var k=new WeakMap;function z(r){let e=k.get(r);return e||(e={executionQueue:[],isExecuting:!1},k.set(r,e)),e}function ie(){k=new WeakMap}var N=Q(new URL("./worker.js",import.meta.url));function B(){return $(16).toString("hex")}function V(r,e){if(!r||typeof r!="object")return{success:!1,error:"Malformed worker response"};let t=r;return typeof t.protocolToken!="string"||t.protocolToken!==e?{success:!1,error:"Malformed worker response: invalid protocol token"}:t.type==="security-violation"?{success:!1,error:`Security violation: ${typeof t.violation?.type=="string"?t.violation.type:"unknown"}`}:typeof t.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:t.success?{success:!0}:{success:!1,error:typeof t.error=="string"&&t.error.length>0?t.error:"Worker execution failed"}}function a(r){if(r.isExecuting||r.executionQueue.length===0)return;for(;r.executionQueue.length>0&&r.executionQueue[0].canceled;)r.executionQueue.shift();if(r.executionQueue.length===0)return;let e=r.executionQueue.shift();if(!e)return;r.isExecuting=!0;let t;try{t=C.runTrusted(()=>new R(N,{workerData:e.input}))}catch(n){let i=n instanceof Error?n.message:String(n);e.resolve({success:!1,error:c(i)}),r.isExecuting=!1,a(r);return}e.workerRef&&(e.workerRef.current=t);let o=y(e.requireDefenseContext,"python3","worker message callback",n=>{e.resolve(V(n,e.input.protocolToken)),r.isExecuting=!1,t.terminate(),a(r)}),s=y(e.requireDefenseContext,"python3","worker error callback",n=>{let i=c(E(n));e.resolve({success:!1,error:i}),r.isExecuting=!1,a(r)}),p=y(e.requireDefenseContext,"python3","worker exit callback",()=>{r.isExecuting&&(e.resolve({success:!1,error:"Worker exited unexpectedly"}),r.isExecuting=!1,a(r))}),f=n=>{try{o(n)}catch(i){let m=i instanceof Error?i.message:String(i);e.resolve({success:!1,error:c(m)}),r.isExecuting=!1,t.terminate(),a(r)}},l=n=>{try{s(n)}catch(i){let m=i instanceof Error?i.message:String(i);e.resolve({success:!1,error:c(m)}),r.isExecuting=!1,a(r)}},g=()=>{try{p()}catch(n){let i=n instanceof Error?n.message:String(n);e.resolve({success:!1,error:c(i)}),r.isExecuting=!1,a(r)}};t.on("message",f),t.on("error",l),t.on("exit",g)}async function j(r,e,t,o=[]){let s=_(),p=new O(s,e.fs,e.cwd,"python3",e.fetch,e.limits?.maxOutputSize??0),f=e.limits?.maxPythonTimeoutMs??U,l=e.fetch?Math.max(f,H):f,g=z(e.fs),n={protocolToken:B(),sharedBuffer:s,pythonCode:r,cwd:e.cwd,env:D(e.env),args:o,scriptPath:t,timeoutMs:l},i={current:null},m=new Promise(u=>{let d={input:n,resolve:()=>{},workerRef:i,requireDefenseContext:e.requireDefenseContext},A=y(e.requireDefenseContext,"python3","worker timeout callback",()=>{i.current?i.current.terminate():d.canceled=!0,u({success:!1,error:`Execution timeout: exceeded ${l}ms limit`})}),F=v(()=>{try{A()}catch(h){let W=h instanceof Error?h.message:String(h);u({success:!1,error:c(W)})}},l);d.resolve=h=>{T(F),u(h)},g.executionQueue.push(d),a(g)}),[x,w]=await Promise.all([p.run(l).catch(u=>({stdout:"",stderr:`python3: bridge error: ${c(E(u))}
|
|
6
|
-
`,exitCode:1})),m.catch(u=>({success:!1,error:c(E(u))}))]);if(!w.success&&w.error){let u=c(w.error);return{stdout:x.stdout,stderr:`${x.stderr}python3: ${u}
|
|
7
|
-
`,exitCode:x.exitCode||1}}return x}var Y={name:"python3",async execute(r,e){if(P(r))return b(I);let t=L(r);if("exitCode"in t)return t;if(t.showVersion)return{stdout:`Python 3.13.2 (Emscripten)
|
|
8
|
-
`,stderr:"",exitCode:0};let o,s;if(t.code!==null)o=t.code,s="-c";else if(t.module!==null){if(!/^[a-zA-Z_][a-zA-Z0-9_.]*$/.test(t.module))return{stdout:"",stderr:`python3: No module named '${t.module.slice(0,200)}'
|
|
9
|
-
`,exitCode:1};o=`import runpy; runpy.run_module('${t.module}', run_name='__main__')`,s=t.module}else if(t.scriptFile!==null){let p=e.fs.resolvePath(e.cwd,t.scriptFile);if(!await e.fs.exists(p))return{stdout:"",stderr:`python3: can't open file '${t.scriptFile}': [Errno 2] No such file or directory
|
|
10
|
-
`,exitCode:2};try{o=await e.fs.readFile(p),s=t.scriptFile}catch(f){let l=M(f.message);return{stdout:"",stderr:`python3: can't open file '${t.scriptFile}': ${l}
|
|
11
|
-
`,exitCode:2}}}else if(e.stdin.trim())o=e.stdin,s="<stdin>";else return{stdout:"",stderr:`python3: no input provided (use -c CODE, -m MODULE, or provide a script file)
|
|
12
|
-
`,exitCode:2};return j(o,e,s,t.scriptArgs)}},ce={name:"python",async execute(r,e){return Y.execute(r,e)}};export{ie as _resetExecutionQueue,Y as python3Command,ce as pythonCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a,b}from"./chunk-RMQC3GS7.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 sedCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a,b,c}from"./chunk-CM4532DS.js";import"./chunk-OOJCYVYF.js";import"./chunk-MO4RPBN2.js";import"./chunk-YU6OGPZR.js";import"./chunk-RLNOQILG.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{a as _internals,c as flagsForFuzzing,b as sqlite3Command};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a,b}from"./chunk-B3RU2PUI.js";import"./chunk-GZHFXDDO.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-5WFYIUU2.js";import"./chunk-6KZRLMG3.js";import"./chunk-OBH7XN5N.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as xanCommand};
|