just-bash 3.6.0 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/README.md +6 -0
- package/dist/bin/chunks/awk2-EPZ2CEQT.js +3 -0
- package/dist/bin/chunks/base64-D7ZXJQN6.js +3 -0
- package/dist/bin/chunks/bash-4Q4RMIZL.js +3 -0
- package/dist/bin/chunks/cat-AST5Y57Y.js +3 -0
- package/dist/bin/chunks/chmod-BFP7P5CD.js +3 -0
- package/dist/bin/chunks/chunk-26O2G5LX.js +34 -0
- package/dist/bin/chunks/chunk-2RDKEB6Z.js +15 -0
- package/dist/bin/chunks/chunk-35U2THFB.js +3 -0
- package/dist/bin/chunks/chunk-3F7UWBEM.js +17 -0
- package/dist/bin/chunks/chunk-3WLAERUX.js +3 -0
- package/dist/bin/chunks/chunk-3WZIZUMC.js +8 -0
- package/dist/bin/chunks/chunk-4ARWO6Y3.js +4 -0
- package/dist/bin/chunks/chunk-4HVMRZ5N.js +8 -0
- package/dist/bin/chunks/chunk-5AS7PRVN.js +34 -0
- package/dist/bin/chunks/chunk-5GYAEVIB.js +10 -0
- package/dist/bin/chunks/chunk-5IPYW47P.js +27 -0
- package/dist/bin/chunks/chunk-5ZTIV6TI.js +20 -0
- package/dist/bin/chunks/chunk-6C2YS7G6.js +14 -0
- package/dist/bin/chunks/chunk-74MYVPDY.js +3 -0
- package/dist/bin/chunks/chunk-74UP5NWP.js +3 -0
- package/dist/bin/chunks/chunk-7DPD5PK3.js +3 -0
- package/dist/bin/chunks/chunk-7LJGZPVP.js +18 -0
- package/dist/bin/chunks/chunk-7NEXHFSS.js +3 -0
- package/dist/bin/chunks/chunk-7XFMCB5C.js +21 -0
- package/dist/bin/chunks/chunk-A53Y4KDG.js +7 -0
- package/dist/bin/chunks/chunk-AALAYQ6J.js +17 -0
- package/dist/bin/chunks/chunk-AM4WIHAG.js +10 -0
- package/dist/bin/chunks/chunk-BC5OXEFJ.js +3 -0
- package/dist/bin/chunks/chunk-C5ABXV4P.js +15 -0
- package/dist/bin/chunks/chunk-CT6P7ILU.js +3 -0
- package/dist/bin/chunks/chunk-CYHG3NVG.js +9 -0
- package/dist/bin/chunks/chunk-D7PDAJWE.js +7 -0
- package/dist/bin/chunks/chunk-DB3G3UVZ.js +5 -0
- package/dist/bin/chunks/chunk-EIUU35ZP.js +37 -0
- package/dist/bin/chunks/chunk-EMHJNKV5.js +20 -0
- package/dist/bin/chunks/chunk-EPWMLTS6.js +9 -0
- package/dist/bin/chunks/chunk-F4QFFLWZ.js +8 -0
- package/dist/bin/chunks/chunk-F5R5O2Y6.js +9 -0
- package/dist/bin/chunks/chunk-FBEYY2HM.js +13 -0
- package/dist/bin/chunks/chunk-FIJBWMXU.js +12 -0
- package/dist/bin/chunks/chunk-FMVH4N2P.js +5 -0
- package/dist/bin/chunks/chunk-G6W2HMNY.js +7 -0
- package/dist/bin/chunks/chunk-GFI5BHZX.js +3 -0
- package/dist/bin/chunks/chunk-GJAVHEWO.js +143 -0
- package/dist/bin/chunks/chunk-GUVSOVQU.js +8 -0
- package/dist/bin/chunks/chunk-H22PAKR6.js +3 -0
- package/dist/bin/chunks/chunk-HXOJHK2Z.js +8 -0
- package/dist/bin/chunks/chunk-IAAYIH44.js +3 -0
- package/dist/bin/chunks/chunk-J7W2CRXT.js +7 -0
- package/dist/bin/chunks/chunk-JNWWOKCN.js +6 -0
- package/dist/bin/chunks/chunk-JQLGE4OW.js +22 -0
- package/dist/bin/chunks/chunk-K3U4M4MF.js +7 -0
- package/dist/bin/chunks/chunk-KRXYOWIP.js +12 -0
- package/dist/bin/chunks/chunk-L4L2QFS4.js +10 -0
- package/dist/bin/chunks/chunk-LU6ZEQNN.js +13 -0
- package/dist/bin/chunks/chunk-MLMKRR7L.js +12 -0
- package/dist/bin/chunks/chunk-MVN5WALS.js +7 -0
- package/dist/bin/chunks/chunk-MYOGTYIH.js +22 -0
- package/dist/bin/chunks/chunk-NF5LHCVV.js +275 -0
- package/dist/bin/chunks/chunk-OUGDZVL6.js +10 -0
- package/dist/bin/chunks/chunk-QCNQD6ME.js +11 -0
- package/dist/bin/chunks/chunk-QIDBJNMB.js +3 -0
- package/dist/bin/chunks/chunk-QKTQYL37.js +9 -0
- package/dist/bin/chunks/chunk-R6CMNMNX.js +22 -0
- package/dist/bin/chunks/chunk-RCP3WQND.js +7 -0
- package/dist/bin/chunks/chunk-RJG4JS32.js +6 -0
- package/dist/bin/chunks/chunk-SIMSIBUA.js +13 -0
- package/dist/bin/chunks/chunk-TNB7M24H.js +87 -0
- package/dist/bin/chunks/chunk-TU6P6AC2.js +4 -0
- package/dist/bin/chunks/chunk-TX4WSLXK.js +101 -0
- package/dist/bin/chunks/chunk-U4UY6P77.js +3 -0
- package/dist/bin/chunks/chunk-U5BNATW4.js +3 -0
- package/dist/bin/chunks/chunk-U7VJCJQR.js +16 -0
- package/dist/bin/chunks/chunk-VJE2PQW6.js +15 -0
- package/dist/bin/chunks/chunk-W4ENG3BR.js +44 -0
- package/dist/bin/chunks/chunk-XUFO4QPW.js +65 -0
- package/dist/bin/chunks/chunk-XVKL2UZA.js +4 -0
- package/dist/bin/chunks/chunk-YCUNLSHF.js +12 -0
- package/dist/bin/chunks/chunk-YDH7Q5WV.js +6 -0
- package/dist/bin/chunks/chunk-YDWLU56G.js +26 -0
- package/dist/bin/chunks/chunk-YILPYZYP.js +16 -0
- package/dist/bin/chunks/chunk-YZQ4SVJV.js +13 -0
- package/dist/bin/chunks/chunk-ZKLKNN6B.js +3 -0
- package/dist/bin/chunks/column-EGAQ7QMC.js +3 -0
- package/dist/bin/chunks/comm-JEJ6GWEA.js +3 -0
- package/dist/bin/chunks/cp-7AH7TSQ6.js +3 -0
- package/dist/bin/chunks/curl-7FCZQCFU.js +31 -0
- package/dist/bin/chunks/cut-OVTLUT2B.js +3 -0
- package/dist/bin/chunks/date-MKP5YWWY.js +3 -0
- package/dist/bin/chunks/diff-R6QTSWD2.js +3 -0
- package/dist/bin/chunks/dist-Q3QP7DWN.js +141 -0
- package/dist/bin/chunks/du-M2PB5NUH.js +3 -0
- package/dist/bin/chunks/env-EUSAZGWO.js +3 -0
- package/dist/bin/chunks/expand-B4CPOZN5.js +3 -0
- package/dist/bin/chunks/expr-AQBMSEFL.js +3 -0
- package/dist/bin/chunks/file-22CVQBNS.js +3 -0
- package/dist/bin/chunks/find-QYLHUYOP.js +3 -0
- package/dist/bin/chunks/flag-coverage-CTPK5ZWJ.js +3 -0
- package/dist/bin/chunks/fold-E6A5I4DW.js +3 -0
- package/dist/bin/chunks/grep-HI55D7F7.js +3 -0
- package/dist/bin/chunks/gzip-2GJMVXCF.js +3 -0
- package/dist/bin/chunks/head-ZQIB2GSI.js +3 -0
- package/dist/bin/chunks/html-to-markdown-7ZNLM4SQ.js +3 -0
- package/dist/bin/chunks/join-KCYMLQ3V.js +3 -0
- package/dist/bin/chunks/jq-KNI4FJIL.js +3 -0
- package/dist/bin/chunks/js-exec-OWDAX677.js +1617 -0
- package/dist/bin/chunks/ls-QCAGDEDW.js +3 -0
- package/dist/bin/chunks/md5sum-OPJ77ZY7.js +3 -0
- package/dist/bin/chunks/mkdir-3XFSFVPC.js +3 -0
- package/dist/bin/chunks/mktemp-5FA55IJS.js +3 -0
- package/dist/bin/chunks/mv-UASF6NAX.js +3 -0
- package/dist/bin/chunks/nl-HUDE6DQC.js +3 -0
- package/dist/bin/chunks/od-CECQKF5P.js +3 -0
- package/dist/bin/chunks/paste-SH5RZ4ZO.js +3 -0
- package/dist/bin/chunks/printf-PQKUEWX5.js +3 -0
- package/dist/bin/chunks/python3-UE36ZXQT.js +23 -0
- package/dist/bin/chunks/readlink-4Z75K3AI.js +3 -0
- package/dist/bin/chunks/rev-6SA3VC3J.js +3 -0
- package/dist/bin/chunks/rg-ULWB5MQG.js +3 -0
- package/dist/bin/chunks/rm-NPIAQT6U.js +3 -0
- package/dist/bin/chunks/rmdir-57J3AGQU.js +3 -0
- package/dist/bin/chunks/sed-XV7BZPKI.js +3 -0
- package/dist/bin/chunks/seq-ZVBT2JEI.js +3 -0
- package/dist/bin/chunks/sha1sum-JGOB5K4J.js +3 -0
- package/dist/bin/chunks/sha256sum-S5DS6Q6N.js +3 -0
- package/dist/bin/chunks/sort-UOMFLGRW.js +3 -0
- package/dist/bin/chunks/split-IBL3NIVH.js +3 -0
- package/dist/bin/chunks/sqlite3-YIM3BYLS.js +3 -0
- package/dist/bin/chunks/stat-RKSIL4YV.js +3 -0
- package/dist/bin/chunks/strings-AL7T5GDQ.js +3 -0
- package/dist/bin/chunks/tac-36B6LBNS.js +3 -0
- package/dist/bin/chunks/tail-G4PLDIOK.js +3 -0
- package/dist/bin/chunks/tar-YG6SY2RU.js +3 -0
- package/dist/bin/chunks/tee-NP4ULCWD.js +3 -0
- package/dist/bin/chunks/time-ZMFJL7MD.js +3 -0
- package/dist/bin/chunks/timeout-EJIGKZUX.js +3 -0
- package/dist/bin/chunks/touch-YE5LMLLE.js +3 -0
- package/dist/bin/chunks/tr-7KFUMSUF.js +3 -0
- package/dist/bin/chunks/unexpand-67EBVEPB.js +3 -0
- package/dist/bin/chunks/uniq-SZDRNEYK.js +3 -0
- package/dist/bin/chunks/wc-VLOME6PL.js +3 -0
- package/dist/bin/chunks/xan-FVGJAHFV.js +3 -0
- package/dist/bin/chunks/xan-view-LYATQWQB.js +3 -0
- package/dist/bin/chunks/xargs-CLQL2WFV.js +3 -0
- package/dist/bin/chunks/yes-OOBLAITP.js +3 -0
- package/dist/bin/chunks/yq-YQ4YFM26.js +3 -0
- package/dist/bin/just-bash.js +347 -345
- package/dist/bin/shell/chunks/awk2-EPZ2CEQT.js +3 -0
- package/dist/bin/shell/chunks/base64-D7ZXJQN6.js +3 -0
- package/dist/bin/shell/chunks/bash-4Q4RMIZL.js +3 -0
- package/dist/bin/shell/chunks/cat-AST5Y57Y.js +3 -0
- package/dist/bin/shell/chunks/chmod-BFP7P5CD.js +3 -0
- package/dist/bin/shell/chunks/chunk-26O2G5LX.js +34 -0
- package/dist/bin/shell/chunks/chunk-2RDKEB6Z.js +15 -0
- package/dist/bin/shell/chunks/chunk-35U2THFB.js +3 -0
- package/dist/bin/shell/chunks/chunk-3F7UWBEM.js +17 -0
- package/dist/bin/shell/chunks/chunk-3WLAERUX.js +3 -0
- package/dist/bin/shell/chunks/chunk-3WZIZUMC.js +8 -0
- package/dist/bin/shell/chunks/chunk-4ARWO6Y3.js +4 -0
- package/dist/bin/shell/chunks/chunk-4HVMRZ5N.js +8 -0
- package/dist/bin/shell/chunks/chunk-5AS7PRVN.js +34 -0
- package/dist/bin/shell/chunks/chunk-5GYAEVIB.js +10 -0
- package/dist/bin/shell/chunks/chunk-5IPYW47P.js +27 -0
- package/dist/bin/shell/chunks/chunk-5ZTIV6TI.js +20 -0
- package/dist/bin/shell/chunks/chunk-6C2YS7G6.js +14 -0
- package/dist/bin/shell/chunks/chunk-74MYVPDY.js +3 -0
- package/dist/bin/shell/chunks/chunk-74UP5NWP.js +3 -0
- package/dist/bin/shell/chunks/chunk-7DPD5PK3.js +3 -0
- package/dist/bin/shell/chunks/chunk-7LJGZPVP.js +18 -0
- package/dist/bin/shell/chunks/chunk-7NEXHFSS.js +3 -0
- package/dist/bin/shell/chunks/chunk-7XFMCB5C.js +21 -0
- package/dist/bin/shell/chunks/chunk-A53Y4KDG.js +7 -0
- package/dist/bin/shell/chunks/chunk-AALAYQ6J.js +17 -0
- package/dist/bin/shell/chunks/chunk-AM4WIHAG.js +10 -0
- package/dist/bin/shell/chunks/chunk-BC5OXEFJ.js +3 -0
- package/dist/bin/shell/chunks/chunk-C5ABXV4P.js +15 -0
- package/dist/bin/shell/chunks/chunk-CT6P7ILU.js +3 -0
- package/dist/bin/shell/chunks/chunk-CYHG3NVG.js +9 -0
- package/dist/bin/shell/chunks/chunk-D7PDAJWE.js +7 -0
- package/dist/bin/shell/chunks/chunk-DB3G3UVZ.js +5 -0
- package/dist/bin/shell/chunks/chunk-EIUU35ZP.js +37 -0
- package/dist/bin/shell/chunks/chunk-EMHJNKV5.js +20 -0
- package/dist/bin/shell/chunks/chunk-EPWMLTS6.js +9 -0
- package/dist/bin/shell/chunks/chunk-F4QFFLWZ.js +8 -0
- package/dist/bin/shell/chunks/chunk-F5R5O2Y6.js +9 -0
- package/dist/bin/shell/chunks/chunk-FBEYY2HM.js +13 -0
- package/dist/bin/shell/chunks/chunk-FIJBWMXU.js +12 -0
- package/dist/bin/shell/chunks/chunk-FMVH4N2P.js +5 -0
- package/dist/bin/shell/chunks/chunk-G6W2HMNY.js +7 -0
- package/dist/bin/shell/chunks/chunk-GFI5BHZX.js +3 -0
- package/dist/bin/shell/chunks/chunk-GJAVHEWO.js +143 -0
- package/dist/bin/shell/chunks/chunk-GUVSOVQU.js +8 -0
- package/dist/bin/shell/chunks/chunk-H22PAKR6.js +3 -0
- package/dist/bin/shell/chunks/chunk-HXOJHK2Z.js +8 -0
- package/dist/bin/shell/chunks/chunk-IAAYIH44.js +3 -0
- package/dist/bin/shell/chunks/chunk-J7W2CRXT.js +7 -0
- package/dist/bin/shell/chunks/chunk-JNWWOKCN.js +6 -0
- package/dist/bin/shell/chunks/chunk-JQLGE4OW.js +22 -0
- package/dist/bin/shell/chunks/chunk-K3U4M4MF.js +7 -0
- package/dist/bin/shell/chunks/chunk-KRXYOWIP.js +12 -0
- package/dist/bin/shell/chunks/chunk-L4L2QFS4.js +10 -0
- package/dist/bin/shell/chunks/chunk-LU6ZEQNN.js +13 -0
- package/dist/bin/shell/chunks/chunk-MLMKRR7L.js +12 -0
- package/dist/bin/shell/chunks/chunk-MVN5WALS.js +7 -0
- package/dist/bin/shell/chunks/chunk-MYOGTYIH.js +22 -0
- package/dist/bin/shell/chunks/chunk-NF5LHCVV.js +275 -0
- package/dist/bin/shell/chunks/chunk-OUGDZVL6.js +10 -0
- package/dist/bin/shell/chunks/chunk-QCNQD6ME.js +11 -0
- package/dist/bin/shell/chunks/chunk-QIDBJNMB.js +3 -0
- package/dist/bin/shell/chunks/chunk-QKTQYL37.js +9 -0
- package/dist/bin/shell/chunks/chunk-R6CMNMNX.js +22 -0
- package/dist/bin/shell/chunks/chunk-RCP3WQND.js +7 -0
- package/dist/bin/shell/chunks/chunk-RJG4JS32.js +6 -0
- package/dist/bin/shell/chunks/chunk-SIMSIBUA.js +13 -0
- package/dist/bin/shell/chunks/chunk-TNB7M24H.js +87 -0
- package/dist/bin/shell/chunks/chunk-TU6P6AC2.js +4 -0
- package/dist/bin/shell/chunks/chunk-TX4WSLXK.js +101 -0
- package/dist/bin/shell/chunks/chunk-U4UY6P77.js +3 -0
- package/dist/bin/shell/chunks/chunk-U5BNATW4.js +3 -0
- package/dist/bin/shell/chunks/chunk-U7VJCJQR.js +16 -0
- package/dist/bin/shell/chunks/chunk-VJE2PQW6.js +15 -0
- package/dist/bin/shell/chunks/chunk-W4ENG3BR.js +44 -0
- package/dist/bin/shell/chunks/chunk-XUFO4QPW.js +65 -0
- package/dist/bin/shell/chunks/chunk-XVKL2UZA.js +4 -0
- package/dist/bin/shell/chunks/chunk-YCUNLSHF.js +12 -0
- package/dist/bin/shell/chunks/chunk-YDH7Q5WV.js +6 -0
- package/dist/bin/shell/chunks/chunk-YDWLU56G.js +26 -0
- package/dist/bin/shell/chunks/chunk-YILPYZYP.js +16 -0
- package/dist/bin/shell/chunks/chunk-YZQ4SVJV.js +13 -0
- package/dist/bin/shell/chunks/chunk-ZKLKNN6B.js +3 -0
- package/dist/bin/shell/chunks/column-EGAQ7QMC.js +3 -0
- package/dist/bin/shell/chunks/comm-JEJ6GWEA.js +3 -0
- package/dist/bin/shell/chunks/cp-7AH7TSQ6.js +3 -0
- package/dist/bin/shell/chunks/curl-7FCZQCFU.js +31 -0
- package/dist/bin/shell/chunks/cut-OVTLUT2B.js +3 -0
- package/dist/bin/shell/chunks/date-MKP5YWWY.js +3 -0
- package/dist/bin/shell/chunks/diff-R6QTSWD2.js +3 -0
- package/dist/bin/shell/chunks/dist-Q3QP7DWN.js +141 -0
- package/dist/bin/shell/chunks/du-M2PB5NUH.js +3 -0
- package/dist/bin/shell/chunks/env-EUSAZGWO.js +3 -0
- package/dist/bin/shell/chunks/expand-B4CPOZN5.js +3 -0
- package/dist/bin/shell/chunks/expr-AQBMSEFL.js +3 -0
- package/dist/bin/shell/chunks/file-22CVQBNS.js +3 -0
- package/dist/bin/shell/chunks/find-QYLHUYOP.js +3 -0
- package/dist/bin/shell/chunks/flag-coverage-CTPK5ZWJ.js +3 -0
- package/dist/bin/shell/chunks/fold-E6A5I4DW.js +3 -0
- package/dist/bin/shell/chunks/grep-HI55D7F7.js +3 -0
- package/dist/bin/shell/chunks/gzip-2GJMVXCF.js +3 -0
- package/dist/bin/shell/chunks/head-ZQIB2GSI.js +3 -0
- package/dist/bin/shell/chunks/html-to-markdown-7ZNLM4SQ.js +3 -0
- package/dist/bin/shell/chunks/join-KCYMLQ3V.js +3 -0
- package/dist/bin/shell/chunks/jq-KNI4FJIL.js +3 -0
- package/dist/bin/shell/chunks/js-exec-OWDAX677.js +1617 -0
- package/dist/bin/shell/chunks/ls-QCAGDEDW.js +3 -0
- package/dist/bin/shell/chunks/md5sum-OPJ77ZY7.js +3 -0
- package/dist/bin/shell/chunks/mkdir-3XFSFVPC.js +3 -0
- package/dist/bin/shell/chunks/mktemp-5FA55IJS.js +3 -0
- package/dist/bin/shell/chunks/mv-UASF6NAX.js +3 -0
- package/dist/bin/shell/chunks/nl-HUDE6DQC.js +3 -0
- package/dist/bin/shell/chunks/od-CECQKF5P.js +3 -0
- package/dist/bin/shell/chunks/paste-SH5RZ4ZO.js +3 -0
- package/dist/bin/shell/chunks/printf-PQKUEWX5.js +3 -0
- package/dist/bin/shell/chunks/python3-UE36ZXQT.js +23 -0
- package/dist/bin/shell/chunks/readlink-4Z75K3AI.js +3 -0
- package/dist/bin/shell/chunks/rev-6SA3VC3J.js +3 -0
- package/dist/bin/shell/chunks/rg-ULWB5MQG.js +3 -0
- package/dist/bin/shell/chunks/rm-NPIAQT6U.js +3 -0
- package/dist/bin/shell/chunks/rmdir-57J3AGQU.js +3 -0
- package/dist/bin/shell/chunks/sed-XV7BZPKI.js +3 -0
- package/dist/bin/shell/chunks/seq-ZVBT2JEI.js +3 -0
- package/dist/bin/shell/chunks/sha1sum-JGOB5K4J.js +3 -0
- package/dist/bin/shell/chunks/sha256sum-S5DS6Q6N.js +3 -0
- package/dist/bin/shell/chunks/sort-UOMFLGRW.js +3 -0
- package/dist/bin/shell/chunks/split-IBL3NIVH.js +3 -0
- package/dist/bin/shell/chunks/sqlite3-YIM3BYLS.js +3 -0
- package/dist/bin/shell/chunks/stat-RKSIL4YV.js +3 -0
- package/dist/bin/shell/chunks/strings-AL7T5GDQ.js +3 -0
- package/dist/bin/shell/chunks/tac-36B6LBNS.js +3 -0
- package/dist/bin/shell/chunks/tail-G4PLDIOK.js +3 -0
- package/dist/bin/shell/chunks/tar-YG6SY2RU.js +3 -0
- package/dist/bin/shell/chunks/tee-NP4ULCWD.js +3 -0
- package/dist/bin/shell/chunks/time-ZMFJL7MD.js +3 -0
- package/dist/bin/shell/chunks/timeout-EJIGKZUX.js +3 -0
- package/dist/bin/shell/chunks/touch-YE5LMLLE.js +3 -0
- package/dist/bin/shell/chunks/tr-7KFUMSUF.js +3 -0
- package/dist/bin/shell/chunks/unexpand-67EBVEPB.js +3 -0
- package/dist/bin/shell/chunks/uniq-SZDRNEYK.js +3 -0
- package/dist/bin/shell/chunks/wc-VLOME6PL.js +3 -0
- package/dist/bin/shell/chunks/xan-FVGJAHFV.js +3 -0
- package/dist/bin/shell/chunks/xan-view-LYATQWQB.js +3 -0
- package/dist/bin/shell/chunks/xargs-CLQL2WFV.js +3 -0
- package/dist/bin/shell/chunks/yes-OOBLAITP.js +3 -0
- package/dist/bin/shell/chunks/yq-YQ4YFM26.js +3 -0
- package/dist/bin/shell/shell.js +385 -383
- package/dist/bundle/browser.js +873 -863
- package/dist/bundle/chunks/awk2-LEEKKBPN.js +2 -0
- package/dist/bundle/chunks/base64-GBEVK7UP.js +2 -0
- package/dist/bundle/chunks/bash-QTX2IUM4.js +2 -0
- package/dist/bundle/chunks/cat-UBR2ABBH.js +2 -0
- package/dist/bundle/chunks/chmod-5VBARXGU.js +2 -0
- package/dist/bundle/chunks/chunk-2LOOLBWC.js +33 -0
- package/dist/bundle/chunks/chunk-34XJ6PLO.js +20 -0
- package/dist/bundle/chunks/chunk-3DUKINTI.js +7 -0
- package/dist/bundle/chunks/chunk-3VXY25LY.js +2 -0
- package/dist/bundle/chunks/chunk-5G2D2EZB.js +7 -0
- package/dist/bundle/chunks/chunk-5Q4R6KJE.js +4 -0
- package/dist/bundle/chunks/chunk-5ZVTEBKG.js +7 -0
- package/dist/bundle/chunks/chunk-77XFWF43.js +13 -0
- package/dist/bundle/chunks/chunk-B2EYYRZX.js +9 -0
- package/dist/bundle/chunks/chunk-BC3VKZCL.js +10 -0
- package/dist/bundle/chunks/chunk-BEIP3OYT.js +6 -0
- package/dist/bundle/chunks/chunk-BLTFJFWH.js +2 -0
- package/dist/bundle/chunks/chunk-C2GCPQ2D.js +15 -0
- package/dist/bundle/chunks/chunk-CGCA7SGA.js +25 -0
- package/dist/bundle/chunks/chunk-CIY4XCGA.js +2 -0
- package/dist/bundle/chunks/chunk-CXBOPNEG.js +11 -0
- package/dist/bundle/chunks/chunk-CYJQAYUX.js +142 -0
- package/dist/bundle/chunks/chunk-D55UUXDJ.js +100 -0
- package/dist/bundle/chunks/chunk-EOMWWW4L.js +33 -0
- package/dist/bundle/chunks/chunk-ER6ZGLPS.js +26 -0
- package/dist/bundle/chunks/chunk-EZHC6HLV.js +3 -0
- package/dist/bundle/chunks/chunk-FBRDM6EM.js +12 -0
- package/dist/bundle/chunks/chunk-FDAXSABU.js +11 -0
- package/dist/bundle/chunks/chunk-FEKEA5Y2.js +2 -0
- package/dist/bundle/chunks/chunk-GEANXVKK.js +15 -0
- package/dist/bundle/chunks/chunk-GIQ3LRFL.js +21 -0
- package/dist/bundle/chunks/chunk-HBIJBKHP.js +14 -0
- package/dist/bundle/chunks/chunk-IDYF47VD.js +11 -0
- package/dist/bundle/chunks/chunk-IH6MZAKK.js +6 -0
- package/dist/bundle/chunks/chunk-IIWAWB3H.js +274 -0
- package/dist/bundle/chunks/chunk-IQGNPH54.js +8 -0
- package/dist/bundle/chunks/chunk-IVYY6YFV.js +7 -0
- package/dist/bundle/chunks/chunk-IXOG2DXK.js +14 -0
- package/dist/bundle/chunks/chunk-J6QAN4PZ.js +6 -0
- package/dist/bundle/chunks/chunk-JMGGZYF2.js +2 -0
- package/dist/bundle/chunks/chunk-JU5GJH4X.js +9 -0
- package/dist/bundle/chunks/chunk-JWGTQTBU.js +16 -0
- package/dist/bundle/chunks/chunk-KQSMX4HM.js +11 -0
- package/dist/bundle/chunks/chunk-KZMK2KYL.js +43 -0
- package/dist/bundle/chunks/chunk-L4MC7WH4.js +14 -0
- package/dist/bundle/chunks/chunk-L5AKA7GO.js +5 -0
- package/dist/bundle/chunks/chunk-LBKOJW6K.js +2 -0
- package/dist/bundle/chunks/chunk-LNJ6EIKX.js +2 -0
- package/dist/bundle/chunks/chunk-LQXMSLW5.js +16 -0
- package/dist/bundle/chunks/chunk-MOOFDAFS.js +7 -0
- package/dist/bundle/chunks/chunk-N3VQQRLQ.js +8 -0
- package/dist/bundle/chunks/chunk-NJUHQKMR.js +3 -0
- package/dist/bundle/chunks/chunk-NOZTFL4F.js +12 -0
- package/dist/bundle/chunks/chunk-OEZKBUXP.js +8 -0
- package/dist/bundle/chunks/chunk-OZMQI3HV.js +17 -0
- package/dist/bundle/chunks/chunk-POI4XBDP.js +6 -0
- package/dist/bundle/chunks/chunk-PV2DCWLJ.js +6 -0
- package/dist/bundle/chunks/chunk-Q6ZH76O4.js +2 -0
- package/dist/bundle/chunks/chunk-QECDICRF.js +9 -0
- package/dist/bundle/chunks/chunk-QJTRVYQA.js +5 -0
- package/dist/bundle/chunks/chunk-QZPG6UCH.js +9 -0
- package/dist/bundle/chunks/chunk-R23EAHN5.js +2 -0
- package/dist/bundle/chunks/chunk-R3HY2GCO.js +3 -0
- package/dist/bundle/chunks/chunk-RQTEROQ5.js +6 -0
- package/dist/bundle/chunks/chunk-SAE7VUIM.js +21 -0
- package/dist/bundle/chunks/chunk-SBG7KYI4.js +12 -0
- package/dist/bundle/chunks/chunk-SRNYBHIU.js +21 -0
- package/dist/bundle/chunks/chunk-T7CFNHX6.js +2 -0
- package/dist/bundle/chunks/chunk-U3UTFNHI.js +2 -0
- package/dist/bundle/chunks/chunk-UQZ5HJXB.js +64 -0
- package/dist/bundle/chunks/chunk-US6XQQ6W.js +19 -0
- package/dist/bundle/chunks/chunk-UZ4TKNEJ.js +2 -0
- package/dist/bundle/chunks/chunk-VW6FDS6X.js +2 -0
- package/dist/bundle/chunks/chunk-W4A6TADR.js +36 -0
- package/dist/bundle/chunks/chunk-WAL3MOLR.js +6 -0
- package/dist/bundle/chunks/chunk-WFEUQRHM.js +2 -0
- package/dist/bundle/chunks/chunk-WNAEYQTE.js +8 -0
- package/dist/bundle/chunks/chunk-WOSSFIAE.js +12 -0
- package/dist/bundle/chunks/chunk-WTG3OCY4.js +5 -0
- package/dist/bundle/chunks/chunk-XIEMQVCO.js +19 -0
- package/dist/bundle/chunks/chunk-YFGP6M45.js +7 -0
- package/dist/bundle/chunks/chunk-ZARLSKBF.js +2 -0
- package/dist/bundle/chunks/chunk-ZVANIJV2.js +4 -0
- package/dist/bundle/chunks/column-46NX3HG3.js +2 -0
- package/dist/bundle/chunks/comm-QHEYSM4I.js +2 -0
- package/dist/bundle/chunks/cp-AQ4Y4WVV.js +2 -0
- package/dist/bundle/chunks/curl-LMCQFYWH.js +30 -0
- package/dist/bundle/chunks/cut-A6NXJGOH.js +2 -0
- package/dist/bundle/chunks/date-YMEJ62OQ.js +2 -0
- package/dist/bundle/chunks/diff-SECJC7CN.js +2 -0
- package/dist/bundle/chunks/du-JOLY42MC.js +2 -0
- package/dist/bundle/chunks/env-MI6QVNMM.js +2 -0
- package/dist/bundle/chunks/expand-YVEZTU7W.js +2 -0
- package/dist/bundle/chunks/expr-U7WETT5R.js +2 -0
- package/dist/bundle/chunks/file-6QDI3H7G.js +2 -0
- package/dist/bundle/chunks/find-UYQIFSZI.js +2 -0
- package/dist/bundle/chunks/flag-coverage-5YCE6ILG.js +2 -0
- package/dist/bundle/chunks/fold-A24KLKHY.js +2 -0
- package/dist/bundle/chunks/grep-ZELVZ7JB.js +2 -0
- package/dist/bundle/chunks/gzip-3IFADYVU.js +2 -0
- package/dist/bundle/chunks/head-5YWCKNNQ.js +2 -0
- package/dist/bundle/chunks/html-to-markdown-EOWI2I5J.js +2 -0
- package/dist/bundle/chunks/join-MSZXRLNV.js +2 -0
- package/dist/bundle/chunks/jq-MKA6BDYV.js +2 -0
- package/dist/bundle/chunks/js-exec-CNDWLKWB.js +1616 -0
- package/dist/bundle/chunks/ls-WMN4WCCI.js +2 -0
- package/dist/bundle/chunks/md5sum-OCX4NZ2Q.js +2 -0
- package/dist/bundle/chunks/mkdir-YJMG55FX.js +2 -0
- package/dist/bundle/chunks/mktemp-RA55VAN3.js +2 -0
- package/dist/bundle/chunks/mv-NTJL2AHI.js +2 -0
- package/dist/bundle/chunks/nl-Z5DVHZ3S.js +2 -0
- package/dist/bundle/chunks/od-TRWBMEIO.js +2 -0
- package/dist/bundle/chunks/paste-VPYCLIL6.js +2 -0
- package/dist/bundle/chunks/printf-BNADL4RX.js +2 -0
- package/dist/bundle/chunks/python3-TIKLWPZJ.js +22 -0
- package/dist/bundle/chunks/readlink-HGACDFRD.js +2 -0
- package/dist/bundle/chunks/rev-W57N4M5B.js +2 -0
- package/dist/bundle/chunks/rg-IN3KT335.js +2 -0
- package/dist/bundle/chunks/rm-CDVWO5CO.js +2 -0
- package/dist/bundle/chunks/rmdir-HI3UE4KQ.js +2 -0
- package/dist/bundle/chunks/sed-MXZDFQ7I.js +2 -0
- package/dist/bundle/chunks/seq-E3UP3G65.js +2 -0
- package/dist/bundle/chunks/sha1sum-QUWYL7G6.js +2 -0
- package/dist/bundle/chunks/sha256sum-FGHIABMA.js +2 -0
- package/dist/bundle/chunks/sort-ATCMEITA.js +2 -0
- package/dist/bundle/chunks/split-YZFCWIZI.js +2 -0
- package/dist/bundle/chunks/sqlite3-JL36RFBZ.js +2 -0
- package/dist/bundle/chunks/stat-APUQD6WQ.js +2 -0
- package/dist/bundle/chunks/strings-WA2ZGNUN.js +2 -0
- package/dist/bundle/chunks/tac-OCV6R4TG.js +2 -0
- package/dist/bundle/chunks/tail-IBKQAMFW.js +2 -0
- package/dist/bundle/chunks/tar-WJV4DGKA.js +2 -0
- package/dist/bundle/chunks/tee-VOXQ2UGV.js +2 -0
- package/dist/bundle/chunks/time-GOHAC6VO.js +2 -0
- package/dist/bundle/chunks/timeout-FVGYB3MD.js +2 -0
- package/dist/bundle/chunks/touch-57OKADDG.js +2 -0
- package/dist/bundle/chunks/tr-M4D6SICQ.js +2 -0
- package/dist/bundle/chunks/unexpand-SYZZ5ZBE.js +2 -0
- package/dist/bundle/chunks/uniq-TUUUYPVF.js +2 -0
- package/dist/bundle/chunks/wc-HQPGW3KR.js +2 -0
- package/dist/bundle/chunks/xan-CZJZCC57.js +2 -0
- package/dist/bundle/chunks/xan-view-HETEUD3G.js +2 -0
- package/dist/bundle/chunks/xargs-WFPZZ3FK.js +2 -0
- package/dist/bundle/chunks/yes-ACSNSE7T.js +2 -0
- package/dist/bundle/chunks/yq-XDJLIJPZ.js +2 -0
- package/dist/bundle/index.cjs +1042 -993
- package/dist/bundle/index.js +345 -343
- package/dist/commands/awk/interpreter/fields.d.ts +16 -0
- package/dist/commands/js-exec/module-shims.d.ts +1 -1
- package/dist/commands/rg/rg-options.d.ts +2 -0
- package/dist/commands/search-engine/matcher.d.ts +2 -0
- package/dist/interpreter/builtin-dispatch.d.ts +9 -3
- package/dist/interpreter/fd-table.d.ts +4 -1
- package/dist/interpreter/helpers/errors.d.ts +5 -0
- package/dist/interpreter/pipeline-execution.d.ts +1 -1
- package/dist/interpreter/redirections.d.ts +25 -10
- package/dist/interpreter/types.d.ts +2 -0
- package/dist/types.d.ts +15 -0
- package/dist/utils/string-builder.d.ts +9 -0
- package/package.json +2 -2
- package/dist/bin/chunks/awk2-U22OR5B5.js +0 -3
- package/dist/bin/chunks/base64-2KKH5BCT.js +0 -3
- package/dist/bin/chunks/bash-CFCBBWVH.js +0 -3
- package/dist/bin/chunks/cat-V45MVNBT.js +0 -3
- package/dist/bin/chunks/chmod-A54R4UUQ.js +0 -3
- package/dist/bin/chunks/chunk-2NJJXU4K.js +0 -27
- package/dist/bin/chunks/chunk-2YLY6FJA.js +0 -10
- package/dist/bin/chunks/chunk-3LKMI5IX.js +0 -34
- package/dist/bin/chunks/chunk-3VSWQCPN.js +0 -18
- package/dist/bin/chunks/chunk-44SKMHU6.js +0 -16
- package/dist/bin/chunks/chunk-5SKEZPTU.js +0 -12
- package/dist/bin/chunks/chunk-5SR55TXB.js +0 -16
- package/dist/bin/chunks/chunk-6D75E4LV.js +0 -3
- package/dist/bin/chunks/chunk-6DAR25KN.js +0 -12
- package/dist/bin/chunks/chunk-6SAZRW7E.js +0 -15
- package/dist/bin/chunks/chunk-723HNGID.js +0 -13
- package/dist/bin/chunks/chunk-7FGDUBSN.js +0 -14
- package/dist/bin/chunks/chunk-7X4QBCFW.js +0 -36
- package/dist/bin/chunks/chunk-AINNAQBQ.js +0 -6
- package/dist/bin/chunks/chunk-AL7RVSF4.js +0 -8
- package/dist/bin/chunks/chunk-ARYCSNJJ.js +0 -101
- package/dist/bin/chunks/chunk-BCJ42NCM.js +0 -15
- package/dist/bin/chunks/chunk-BJF6B4YW.js +0 -22
- package/dist/bin/chunks/chunk-BOXG6XBN.js +0 -143
- package/dist/bin/chunks/chunk-CPKBPQ2C.js +0 -3
- package/dist/bin/chunks/chunk-DA3RFNKK.js +0 -17
- package/dist/bin/chunks/chunk-DH7M46D3.js +0 -20
- package/dist/bin/chunks/chunk-DTGQQKI2.js +0 -87
- package/dist/bin/chunks/chunk-ECZAFQ22.js +0 -9
- package/dist/bin/chunks/chunk-ETWDDV6I.js +0 -10
- package/dist/bin/chunks/chunk-HFW2LXQV.js +0 -13
- package/dist/bin/chunks/chunk-HRKG3ZK2.js +0 -8
- package/dist/bin/chunks/chunk-I4IRHQDW.js +0 -3
- package/dist/bin/chunks/chunk-IKUY74NG.js +0 -3
- package/dist/bin/chunks/chunk-ILXMFIYG.js +0 -7
- package/dist/bin/chunks/chunk-IMVXTSPG.js +0 -275
- package/dist/bin/chunks/chunk-ISW2U76N.js +0 -17
- package/dist/bin/chunks/chunk-K5KT6DMM.js +0 -4
- package/dist/bin/chunks/chunk-KG2KXL4Y.js +0 -3
- package/dist/bin/chunks/chunk-LCP3IKI7.js +0 -9
- package/dist/bin/chunks/chunk-LG6IN6SW.js +0 -34
- package/dist/bin/chunks/chunk-LMFAALLO.js +0 -21
- package/dist/bin/chunks/chunk-LXFMIXGA.js +0 -3
- package/dist/bin/chunks/chunk-M5ZBECGM.js +0 -22
- package/dist/bin/chunks/chunk-MA6BMA4M.js +0 -3
- package/dist/bin/chunks/chunk-MPQMTLXN.js +0 -3
- package/dist/bin/chunks/chunk-MUIYG2RB.js +0 -65
- package/dist/bin/chunks/chunk-MYTNZ7MA.js +0 -7
- package/dist/bin/chunks/chunk-NGMFI3RH.js +0 -15
- package/dist/bin/chunks/chunk-NLMTGTSG.js +0 -11
- package/dist/bin/chunks/chunk-O74FSWB4.js +0 -4
- package/dist/bin/chunks/chunk-OBVTFHVP.js +0 -7
- package/dist/bin/chunks/chunk-OOKVPG5D.js +0 -6
- package/dist/bin/chunks/chunk-PL4EU7Y2.js +0 -3
- package/dist/bin/chunks/chunk-Q3LE3Y66.js +0 -13
- package/dist/bin/chunks/chunk-QCGH2ZOW.js +0 -13
- package/dist/bin/chunks/chunk-QKWMWSV3.js +0 -3
- package/dist/bin/chunks/chunk-QL33F2W6.js +0 -8
- package/dist/bin/chunks/chunk-S5Z7DMIE.js +0 -26
- package/dist/bin/chunks/chunk-SQ7SZZMW.js +0 -8
- package/dist/bin/chunks/chunk-SQUH76NP.js +0 -3
- package/dist/bin/chunks/chunk-TGRZ42DS.js +0 -12
- package/dist/bin/chunks/chunk-THTKNRO6.js +0 -7
- package/dist/bin/chunks/chunk-TQXLQEIT.js +0 -9
- package/dist/bin/chunks/chunk-TZ3S7MY6.js +0 -12
- package/dist/bin/chunks/chunk-U6BXPMLD.js +0 -7
- package/dist/bin/chunks/chunk-U6DBRMD5.js +0 -5
- package/dist/bin/chunks/chunk-URRH3GPG.js +0 -10
- package/dist/bin/chunks/chunk-VBU3UEG5.js +0 -7
- package/dist/bin/chunks/chunk-VLWZ6L7C.js +0 -4
- package/dist/bin/chunks/chunk-VTHA5UK5.js +0 -7
- package/dist/bin/chunks/chunk-WBST7XJW.js +0 -9
- package/dist/bin/chunks/chunk-WDV2ECOC.js +0 -3
- package/dist/bin/chunks/chunk-WEQ5WM2M.js +0 -20
- package/dist/bin/chunks/chunk-WFVCEB5T.js +0 -3
- package/dist/bin/chunks/chunk-WZ7MIBLR.js +0 -37
- package/dist/bin/chunks/chunk-X45GP3AQ.js +0 -3
- package/dist/bin/chunks/chunk-XEQ7KSRM.js +0 -5
- package/dist/bin/chunks/chunk-YIANER7Y.js +0 -8
- package/dist/bin/chunks/chunk-YYZSYLJO.js +0 -6
- package/dist/bin/chunks/chunk-Z3KAV6YJ.js +0 -10
- package/dist/bin/chunks/chunk-Z5KICK5X.js +0 -22
- package/dist/bin/chunks/column-LHHS4D3K.js +0 -3
- package/dist/bin/chunks/comm-URDMZCXL.js +0 -3
- package/dist/bin/chunks/cp-HPLQA35N.js +0 -3
- package/dist/bin/chunks/curl-FIRG3RB6.js +0 -31
- package/dist/bin/chunks/cut-KP3S36XS.js +0 -3
- package/dist/bin/chunks/date-FJUBX7TJ.js +0 -3
- package/dist/bin/chunks/diff-JSJ56EOK.js +0 -3
- package/dist/bin/chunks/dist-4NZ74CRE.js +0 -141
- package/dist/bin/chunks/du-WEF5YWQK.js +0 -3
- package/dist/bin/chunks/env-2TSVF4W7.js +0 -3
- package/dist/bin/chunks/expand-P6SNTBGZ.js +0 -3
- package/dist/bin/chunks/expr-FLWT4OCO.js +0 -3
- package/dist/bin/chunks/file-JLUCGBCB.js +0 -3
- package/dist/bin/chunks/find-XGVQ6N6L.js +0 -3
- package/dist/bin/chunks/flag-coverage-4JYKIAVV.js +0 -3
- package/dist/bin/chunks/fold-YEY7X54W.js +0 -3
- package/dist/bin/chunks/grep-DCPCPQOS.js +0 -3
- package/dist/bin/chunks/gzip-6DZIKNBW.js +0 -3
- package/dist/bin/chunks/head-TLFXMM2T.js +0 -3
- package/dist/bin/chunks/html-to-markdown-E22RLT2U.js +0 -3
- package/dist/bin/chunks/join-UQKXU2QP.js +0 -3
- package/dist/bin/chunks/jq-GDM3OBBK.js +0 -3
- package/dist/bin/chunks/js-exec-VU6F6WLS.js +0 -1578
- package/dist/bin/chunks/ls-67NUUIYT.js +0 -3
- package/dist/bin/chunks/md5sum-Z6KAYGDK.js +0 -3
- package/dist/bin/chunks/mkdir-AWDWRBKC.js +0 -3
- package/dist/bin/chunks/mktemp-L6OGMDUO.js +0 -3
- package/dist/bin/chunks/mv-4BJSOT4Y.js +0 -3
- package/dist/bin/chunks/nl-XHWFVVKH.js +0 -3
- package/dist/bin/chunks/od-SI75GLRE.js +0 -3
- package/dist/bin/chunks/paste-5TSIBDF7.js +0 -3
- package/dist/bin/chunks/printf-CNXNRQ3I.js +0 -3
- package/dist/bin/chunks/python3-GUWCSSDP.js +0 -23
- package/dist/bin/chunks/readlink-URO5XTBB.js +0 -3
- package/dist/bin/chunks/rev-CZTQCNOZ.js +0 -3
- package/dist/bin/chunks/rg-RVULUPDH.js +0 -3
- package/dist/bin/chunks/rm-UCUTHC3I.js +0 -3
- package/dist/bin/chunks/rmdir-J3HM7GGM.js +0 -3
- package/dist/bin/chunks/sed-MCLGHZOI.js +0 -3
- package/dist/bin/chunks/seq-I54NZE75.js +0 -3
- package/dist/bin/chunks/sha1sum-CATBXX76.js +0 -3
- package/dist/bin/chunks/sha256sum-YGSNBVY3.js +0 -3
- package/dist/bin/chunks/sort-M3DO25D5.js +0 -3
- package/dist/bin/chunks/split-VZO7223N.js +0 -3
- package/dist/bin/chunks/sqlite3-HXVFVP4Z.js +0 -3
- package/dist/bin/chunks/stat-UJ37RBMM.js +0 -3
- package/dist/bin/chunks/strings-J2X2Z6N2.js +0 -3
- package/dist/bin/chunks/tac-DG4BMYM5.js +0 -3
- package/dist/bin/chunks/tail-5TSF5YM4.js +0 -3
- package/dist/bin/chunks/tar-ZGZZDQXO.js +0 -3
- package/dist/bin/chunks/tee-L4HKV5PD.js +0 -3
- package/dist/bin/chunks/time-J2DAZUIN.js +0 -3
- package/dist/bin/chunks/timeout-ATTDYXLX.js +0 -3
- package/dist/bin/chunks/touch-TVQAUQOG.js +0 -3
- package/dist/bin/chunks/tr-6RPFASYV.js +0 -3
- package/dist/bin/chunks/unexpand-JPOQORZF.js +0 -3
- package/dist/bin/chunks/uniq-K5VRDP4Q.js +0 -3
- package/dist/bin/chunks/wc-VSQBRD6B.js +0 -3
- package/dist/bin/chunks/xan-CCS53B7D.js +0 -3
- package/dist/bin/chunks/xan-view-KOXASOEV.js +0 -3
- package/dist/bin/chunks/xargs-HMISWW4I.js +0 -3
- package/dist/bin/chunks/yes-ELH3XQWY.js +0 -3
- package/dist/bin/chunks/yq-GSCDUHGM.js +0 -3
- package/dist/bin/shell/chunks/awk2-U22OR5B5.js +0 -3
- package/dist/bin/shell/chunks/base64-2KKH5BCT.js +0 -3
- package/dist/bin/shell/chunks/bash-CFCBBWVH.js +0 -3
- package/dist/bin/shell/chunks/cat-V45MVNBT.js +0 -3
- package/dist/bin/shell/chunks/chmod-A54R4UUQ.js +0 -3
- package/dist/bin/shell/chunks/chunk-2NJJXU4K.js +0 -27
- package/dist/bin/shell/chunks/chunk-2YLY6FJA.js +0 -10
- package/dist/bin/shell/chunks/chunk-3LKMI5IX.js +0 -34
- package/dist/bin/shell/chunks/chunk-3VSWQCPN.js +0 -18
- package/dist/bin/shell/chunks/chunk-44SKMHU6.js +0 -16
- package/dist/bin/shell/chunks/chunk-5SKEZPTU.js +0 -12
- package/dist/bin/shell/chunks/chunk-5SR55TXB.js +0 -16
- package/dist/bin/shell/chunks/chunk-6D75E4LV.js +0 -3
- package/dist/bin/shell/chunks/chunk-6DAR25KN.js +0 -12
- package/dist/bin/shell/chunks/chunk-6SAZRW7E.js +0 -15
- package/dist/bin/shell/chunks/chunk-723HNGID.js +0 -13
- package/dist/bin/shell/chunks/chunk-7FGDUBSN.js +0 -14
- package/dist/bin/shell/chunks/chunk-7X4QBCFW.js +0 -36
- package/dist/bin/shell/chunks/chunk-AINNAQBQ.js +0 -6
- package/dist/bin/shell/chunks/chunk-AL7RVSF4.js +0 -8
- package/dist/bin/shell/chunks/chunk-ARYCSNJJ.js +0 -101
- package/dist/bin/shell/chunks/chunk-BCJ42NCM.js +0 -15
- package/dist/bin/shell/chunks/chunk-BJF6B4YW.js +0 -22
- package/dist/bin/shell/chunks/chunk-BOXG6XBN.js +0 -143
- package/dist/bin/shell/chunks/chunk-CPKBPQ2C.js +0 -3
- package/dist/bin/shell/chunks/chunk-DA3RFNKK.js +0 -17
- package/dist/bin/shell/chunks/chunk-DH7M46D3.js +0 -20
- package/dist/bin/shell/chunks/chunk-DTGQQKI2.js +0 -87
- package/dist/bin/shell/chunks/chunk-ECZAFQ22.js +0 -9
- package/dist/bin/shell/chunks/chunk-ETWDDV6I.js +0 -10
- package/dist/bin/shell/chunks/chunk-HFW2LXQV.js +0 -13
- package/dist/bin/shell/chunks/chunk-HRKG3ZK2.js +0 -8
- package/dist/bin/shell/chunks/chunk-I4IRHQDW.js +0 -3
- package/dist/bin/shell/chunks/chunk-IKUY74NG.js +0 -3
- package/dist/bin/shell/chunks/chunk-ILXMFIYG.js +0 -7
- package/dist/bin/shell/chunks/chunk-IMVXTSPG.js +0 -275
- package/dist/bin/shell/chunks/chunk-ISW2U76N.js +0 -17
- package/dist/bin/shell/chunks/chunk-K5KT6DMM.js +0 -4
- package/dist/bin/shell/chunks/chunk-KG2KXL4Y.js +0 -3
- package/dist/bin/shell/chunks/chunk-LCP3IKI7.js +0 -9
- package/dist/bin/shell/chunks/chunk-LG6IN6SW.js +0 -34
- package/dist/bin/shell/chunks/chunk-LMFAALLO.js +0 -21
- package/dist/bin/shell/chunks/chunk-LXFMIXGA.js +0 -3
- package/dist/bin/shell/chunks/chunk-M5ZBECGM.js +0 -22
- package/dist/bin/shell/chunks/chunk-MA6BMA4M.js +0 -3
- package/dist/bin/shell/chunks/chunk-MPQMTLXN.js +0 -3
- package/dist/bin/shell/chunks/chunk-MUIYG2RB.js +0 -65
- package/dist/bin/shell/chunks/chunk-MYTNZ7MA.js +0 -7
- package/dist/bin/shell/chunks/chunk-NGMFI3RH.js +0 -15
- package/dist/bin/shell/chunks/chunk-NLMTGTSG.js +0 -11
- package/dist/bin/shell/chunks/chunk-O74FSWB4.js +0 -4
- package/dist/bin/shell/chunks/chunk-OBVTFHVP.js +0 -7
- package/dist/bin/shell/chunks/chunk-OOKVPG5D.js +0 -6
- package/dist/bin/shell/chunks/chunk-PL4EU7Y2.js +0 -3
- package/dist/bin/shell/chunks/chunk-Q3LE3Y66.js +0 -13
- package/dist/bin/shell/chunks/chunk-QCGH2ZOW.js +0 -13
- package/dist/bin/shell/chunks/chunk-QKWMWSV3.js +0 -3
- package/dist/bin/shell/chunks/chunk-QL33F2W6.js +0 -8
- package/dist/bin/shell/chunks/chunk-S5Z7DMIE.js +0 -26
- package/dist/bin/shell/chunks/chunk-SQ7SZZMW.js +0 -8
- package/dist/bin/shell/chunks/chunk-SQUH76NP.js +0 -3
- package/dist/bin/shell/chunks/chunk-TGRZ42DS.js +0 -12
- package/dist/bin/shell/chunks/chunk-THTKNRO6.js +0 -7
- package/dist/bin/shell/chunks/chunk-TQXLQEIT.js +0 -9
- package/dist/bin/shell/chunks/chunk-TZ3S7MY6.js +0 -12
- package/dist/bin/shell/chunks/chunk-U6BXPMLD.js +0 -7
- package/dist/bin/shell/chunks/chunk-U6DBRMD5.js +0 -5
- package/dist/bin/shell/chunks/chunk-URRH3GPG.js +0 -10
- package/dist/bin/shell/chunks/chunk-VBU3UEG5.js +0 -7
- package/dist/bin/shell/chunks/chunk-VLWZ6L7C.js +0 -4
- package/dist/bin/shell/chunks/chunk-VTHA5UK5.js +0 -7
- package/dist/bin/shell/chunks/chunk-WBST7XJW.js +0 -9
- package/dist/bin/shell/chunks/chunk-WDV2ECOC.js +0 -3
- package/dist/bin/shell/chunks/chunk-WEQ5WM2M.js +0 -20
- package/dist/bin/shell/chunks/chunk-WFVCEB5T.js +0 -3
- package/dist/bin/shell/chunks/chunk-WZ7MIBLR.js +0 -37
- package/dist/bin/shell/chunks/chunk-X45GP3AQ.js +0 -3
- package/dist/bin/shell/chunks/chunk-XEQ7KSRM.js +0 -5
- package/dist/bin/shell/chunks/chunk-YIANER7Y.js +0 -8
- package/dist/bin/shell/chunks/chunk-YYZSYLJO.js +0 -6
- package/dist/bin/shell/chunks/chunk-Z3KAV6YJ.js +0 -10
- package/dist/bin/shell/chunks/chunk-Z5KICK5X.js +0 -22
- package/dist/bin/shell/chunks/column-LHHS4D3K.js +0 -3
- package/dist/bin/shell/chunks/comm-URDMZCXL.js +0 -3
- package/dist/bin/shell/chunks/cp-HPLQA35N.js +0 -3
- package/dist/bin/shell/chunks/curl-FIRG3RB6.js +0 -31
- package/dist/bin/shell/chunks/cut-KP3S36XS.js +0 -3
- package/dist/bin/shell/chunks/date-FJUBX7TJ.js +0 -3
- package/dist/bin/shell/chunks/diff-JSJ56EOK.js +0 -3
- package/dist/bin/shell/chunks/dist-4NZ74CRE.js +0 -141
- package/dist/bin/shell/chunks/du-WEF5YWQK.js +0 -3
- package/dist/bin/shell/chunks/env-2TSVF4W7.js +0 -3
- package/dist/bin/shell/chunks/expand-P6SNTBGZ.js +0 -3
- package/dist/bin/shell/chunks/expr-FLWT4OCO.js +0 -3
- package/dist/bin/shell/chunks/file-JLUCGBCB.js +0 -3
- package/dist/bin/shell/chunks/find-XGVQ6N6L.js +0 -3
- package/dist/bin/shell/chunks/flag-coverage-4JYKIAVV.js +0 -3
- package/dist/bin/shell/chunks/fold-YEY7X54W.js +0 -3
- package/dist/bin/shell/chunks/grep-DCPCPQOS.js +0 -3
- package/dist/bin/shell/chunks/gzip-6DZIKNBW.js +0 -3
- package/dist/bin/shell/chunks/head-TLFXMM2T.js +0 -3
- package/dist/bin/shell/chunks/html-to-markdown-E22RLT2U.js +0 -3
- package/dist/bin/shell/chunks/join-UQKXU2QP.js +0 -3
- package/dist/bin/shell/chunks/jq-GDM3OBBK.js +0 -3
- package/dist/bin/shell/chunks/js-exec-VU6F6WLS.js +0 -1578
- package/dist/bin/shell/chunks/ls-67NUUIYT.js +0 -3
- package/dist/bin/shell/chunks/md5sum-Z6KAYGDK.js +0 -3
- package/dist/bin/shell/chunks/mkdir-AWDWRBKC.js +0 -3
- package/dist/bin/shell/chunks/mktemp-L6OGMDUO.js +0 -3
- package/dist/bin/shell/chunks/mv-4BJSOT4Y.js +0 -3
- package/dist/bin/shell/chunks/nl-XHWFVVKH.js +0 -3
- package/dist/bin/shell/chunks/od-SI75GLRE.js +0 -3
- package/dist/bin/shell/chunks/paste-5TSIBDF7.js +0 -3
- package/dist/bin/shell/chunks/printf-CNXNRQ3I.js +0 -3
- package/dist/bin/shell/chunks/python3-GUWCSSDP.js +0 -23
- package/dist/bin/shell/chunks/readlink-URO5XTBB.js +0 -3
- package/dist/bin/shell/chunks/rev-CZTQCNOZ.js +0 -3
- package/dist/bin/shell/chunks/rg-RVULUPDH.js +0 -3
- package/dist/bin/shell/chunks/rm-UCUTHC3I.js +0 -3
- package/dist/bin/shell/chunks/rmdir-J3HM7GGM.js +0 -3
- package/dist/bin/shell/chunks/sed-MCLGHZOI.js +0 -3
- package/dist/bin/shell/chunks/seq-I54NZE75.js +0 -3
- package/dist/bin/shell/chunks/sha1sum-CATBXX76.js +0 -3
- package/dist/bin/shell/chunks/sha256sum-YGSNBVY3.js +0 -3
- package/dist/bin/shell/chunks/sort-M3DO25D5.js +0 -3
- package/dist/bin/shell/chunks/split-VZO7223N.js +0 -3
- package/dist/bin/shell/chunks/sqlite3-HXVFVP4Z.js +0 -3
- package/dist/bin/shell/chunks/stat-UJ37RBMM.js +0 -3
- package/dist/bin/shell/chunks/strings-J2X2Z6N2.js +0 -3
- package/dist/bin/shell/chunks/tac-DG4BMYM5.js +0 -3
- package/dist/bin/shell/chunks/tail-5TSF5YM4.js +0 -3
- package/dist/bin/shell/chunks/tar-ZGZZDQXO.js +0 -3
- package/dist/bin/shell/chunks/tee-L4HKV5PD.js +0 -3
- package/dist/bin/shell/chunks/time-J2DAZUIN.js +0 -3
- package/dist/bin/shell/chunks/timeout-ATTDYXLX.js +0 -3
- package/dist/bin/shell/chunks/touch-TVQAUQOG.js +0 -3
- package/dist/bin/shell/chunks/tr-6RPFASYV.js +0 -3
- package/dist/bin/shell/chunks/unexpand-JPOQORZF.js +0 -3
- package/dist/bin/shell/chunks/uniq-K5VRDP4Q.js +0 -3
- package/dist/bin/shell/chunks/wc-VSQBRD6B.js +0 -3
- package/dist/bin/shell/chunks/xan-CCS53B7D.js +0 -3
- package/dist/bin/shell/chunks/xan-view-KOXASOEV.js +0 -3
- package/dist/bin/shell/chunks/xargs-HMISWW4I.js +0 -3
- package/dist/bin/shell/chunks/yes-ELH3XQWY.js +0 -3
- package/dist/bin/shell/chunks/yq-GSCDUHGM.js +0 -3
- package/dist/bundle/chunks/awk2-V7KYQWCD.js +0 -2
- package/dist/bundle/chunks/base64-QPSYZAAJ.js +0 -2
- package/dist/bundle/chunks/bash-HIEWVHJ2.js +0 -2
- package/dist/bundle/chunks/cat-54BXBS6X.js +0 -2
- package/dist/bundle/chunks/chmod-4OPV4QKK.js +0 -2
- package/dist/bundle/chunks/chunk-2KNTH3KH.js +0 -9
- package/dist/bundle/chunks/chunk-2VWG4LDT.js +0 -11
- package/dist/bundle/chunks/chunk-2WBUTDF5.js +0 -2
- package/dist/bundle/chunks/chunk-3HDTNUL3.js +0 -6
- package/dist/bundle/chunks/chunk-3KWM4FFA.js +0 -12
- package/dist/bundle/chunks/chunk-4AKAIZPW.js +0 -15
- package/dist/bundle/chunks/chunk-4IMUNIUJ.js +0 -21
- package/dist/bundle/chunks/chunk-5ATEFZLC.js +0 -4
- package/dist/bundle/chunks/chunk-5BMPT6SF.js +0 -19
- package/dist/bundle/chunks/chunk-5QWGR2WA.js +0 -21
- package/dist/bundle/chunks/chunk-5UTZMNI5.js +0 -64
- package/dist/bundle/chunks/chunk-5VCAQBXL.js +0 -17
- package/dist/bundle/chunks/chunk-65LVAUWW.js +0 -7
- package/dist/bundle/chunks/chunk-6D3WD6YU.js +0 -3
- package/dist/bundle/chunks/chunk-6R4OQQWP.js +0 -16
- package/dist/bundle/chunks/chunk-6WGIZV3E.js +0 -13
- package/dist/bundle/chunks/chunk-72JHTO7E.js +0 -2
- package/dist/bundle/chunks/chunk-7GA3QWJJ.js +0 -33
- package/dist/bundle/chunks/chunk-7M672HB6.js +0 -21
- package/dist/bundle/chunks/chunk-AFFAMSJT.js +0 -14
- package/dist/bundle/chunks/chunk-ANCQ4SCV.js +0 -2
- package/dist/bundle/chunks/chunk-B3NGH6KE.js +0 -5
- package/dist/bundle/chunks/chunk-B5Z5HTFY.js +0 -14
- package/dist/bundle/chunks/chunk-B6OSJB22.js +0 -26
- package/dist/bundle/chunks/chunk-BM3X75NC.js +0 -36
- package/dist/bundle/chunks/chunk-CGI6V2HW.js +0 -11
- package/dist/bundle/chunks/chunk-CHHWTPDH.js +0 -3
- package/dist/bundle/chunks/chunk-D5ZJISRS.js +0 -11
- package/dist/bundle/chunks/chunk-DIRWTBKE.js +0 -19
- package/dist/bundle/chunks/chunk-DIWMSSQY.js +0 -2
- package/dist/bundle/chunks/chunk-DPZVOEUP.js +0 -6
- package/dist/bundle/chunks/chunk-EFORKKSH.js +0 -8
- package/dist/bundle/chunks/chunk-EGTVQWAP.js +0 -20
- package/dist/bundle/chunks/chunk-EJFBIRMD.js +0 -6
- package/dist/bundle/chunks/chunk-EQQGPAXI.js +0 -9
- package/dist/bundle/chunks/chunk-EXXOLIVE.js +0 -35
- package/dist/bundle/chunks/chunk-FIMO5HLX.js +0 -2
- package/dist/bundle/chunks/chunk-FT6ODGOU.js +0 -2
- package/dist/bundle/chunks/chunk-FZRQOL3C.js +0 -7
- package/dist/bundle/chunks/chunk-GLAFXDZC.js +0 -4
- package/dist/bundle/chunks/chunk-GN6CQ3J4.js +0 -2
- package/dist/bundle/chunks/chunk-H42OAUJL.js +0 -12
- package/dist/bundle/chunks/chunk-H53EPEGD.js +0 -12
- package/dist/bundle/chunks/chunk-HDOXCDVK.js +0 -7
- package/dist/bundle/chunks/chunk-HIQEVPXM.js +0 -2
- package/dist/bundle/chunks/chunk-J2OBOJ64.js +0 -2
- package/dist/bundle/chunks/chunk-LVDUF74R.js +0 -7
- package/dist/bundle/chunks/chunk-M4LDT7V7.js +0 -6
- package/dist/bundle/chunks/chunk-MDE25PQK.js +0 -15
- package/dist/bundle/chunks/chunk-MHDZERK4.js +0 -6
- package/dist/bundle/chunks/chunk-MHZF23KB.js +0 -33
- package/dist/bundle/chunks/chunk-N6W6FM4N.js +0 -8
- package/dist/bundle/chunks/chunk-NRLE7KYI.js +0 -6
- package/dist/bundle/chunks/chunk-OB46N7Q7.js +0 -2
- package/dist/bundle/chunks/chunk-OQ7C4FYO.js +0 -2
- package/dist/bundle/chunks/chunk-P5BOIHWV.js +0 -6
- package/dist/bundle/chunks/chunk-PPDMRIJ7.js +0 -11
- package/dist/bundle/chunks/chunk-PPHGMG47.js +0 -142
- package/dist/bundle/chunks/chunk-R6ZGLVXI.js +0 -9
- package/dist/bundle/chunks/chunk-RCRHDT54.js +0 -274
- package/dist/bundle/chunks/chunk-RIIUVFUS.js +0 -7
- package/dist/bundle/chunks/chunk-SQX6WQXB.js +0 -7
- package/dist/bundle/chunks/chunk-SRB6FXRH.js +0 -2
- package/dist/bundle/chunks/chunk-T4INBNHX.js +0 -8
- package/dist/bundle/chunks/chunk-TUQG2YRH.js +0 -5
- package/dist/bundle/chunks/chunk-U7UNEMLJ.js +0 -2
- package/dist/bundle/chunks/chunk-UHHCL65P.js +0 -3
- package/dist/bundle/chunks/chunk-UK2K3DHN.js +0 -8
- package/dist/bundle/chunks/chunk-VDJ53ESK.js +0 -9
- package/dist/bundle/chunks/chunk-VGCXKMXN.js +0 -10
- package/dist/bundle/chunks/chunk-W5DWRFSU.js +0 -2
- package/dist/bundle/chunks/chunk-W5J5ADJF.js +0 -100
- package/dist/bundle/chunks/chunk-XHFP44Y4.js +0 -5
- package/dist/bundle/chunks/chunk-Y32R7EZP.js +0 -25
- package/dist/bundle/chunks/chunk-Y62SXZKJ.js +0 -12
- package/dist/bundle/chunks/chunk-YUFU7O6I.js +0 -16
- package/dist/bundle/chunks/chunk-YZH7FUSY.js +0 -14
- package/dist/bundle/chunks/column-F5JDBRV6.js +0 -2
- package/dist/bundle/chunks/comm-DTWKU2MC.js +0 -2
- package/dist/bundle/chunks/cp-LTFB4EUA.js +0 -2
- package/dist/bundle/chunks/curl-XCX2ZQEA.js +0 -30
- package/dist/bundle/chunks/cut-IRSHL3BB.js +0 -2
- package/dist/bundle/chunks/date-FN2DXAEE.js +0 -2
- package/dist/bundle/chunks/diff-VDB6RXHO.js +0 -2
- package/dist/bundle/chunks/du-DOWSRLXR.js +0 -2
- package/dist/bundle/chunks/env-VUUMB47B.js +0 -2
- package/dist/bundle/chunks/expand-2BPPGGSM.js +0 -2
- package/dist/bundle/chunks/expr-GZ4DABKB.js +0 -2
- package/dist/bundle/chunks/file-UI6QJAAU.js +0 -2
- package/dist/bundle/chunks/find-JTXDH3MR.js +0 -2
- package/dist/bundle/chunks/flag-coverage-EDO3VM43.js +0 -2
- package/dist/bundle/chunks/fold-QJBPHRFJ.js +0 -2
- package/dist/bundle/chunks/grep-OZCR76FT.js +0 -2
- package/dist/bundle/chunks/gzip-GQC6CWVL.js +0 -2
- package/dist/bundle/chunks/head-J6RVJFRS.js +0 -2
- package/dist/bundle/chunks/html-to-markdown-7OG5VWYG.js +0 -2
- package/dist/bundle/chunks/join-KQ4Z5OD4.js +0 -2
- package/dist/bundle/chunks/jq-FCG2IUBK.js +0 -2
- package/dist/bundle/chunks/js-exec-NDLXDUBN.js +0 -1577
- package/dist/bundle/chunks/ls-MQTYWW4T.js +0 -2
- package/dist/bundle/chunks/md5sum-JEDX55KS.js +0 -2
- package/dist/bundle/chunks/mkdir-4A5W3RXH.js +0 -2
- package/dist/bundle/chunks/mktemp-XKIE5N3X.js +0 -2
- package/dist/bundle/chunks/mv-ZPIATQJL.js +0 -2
- package/dist/bundle/chunks/nl-RFXH2GNX.js +0 -2
- package/dist/bundle/chunks/od-LUHOH7CG.js +0 -2
- package/dist/bundle/chunks/paste-U57ZU47S.js +0 -2
- package/dist/bundle/chunks/printf-V42QCPHL.js +0 -2
- package/dist/bundle/chunks/python3-SDFCGIU4.js +0 -22
- package/dist/bundle/chunks/readlink-YNNS6F7K.js +0 -2
- package/dist/bundle/chunks/rev-EPOS3MFH.js +0 -2
- package/dist/bundle/chunks/rg-F4SX2PHI.js +0 -2
- package/dist/bundle/chunks/rm-3XUUYAXQ.js +0 -2
- package/dist/bundle/chunks/rmdir-OGSEXEF4.js +0 -2
- package/dist/bundle/chunks/sed-MBB5SXGD.js +0 -2
- package/dist/bundle/chunks/seq-IN77HD3S.js +0 -2
- package/dist/bundle/chunks/sha1sum-BLPZJ6MP.js +0 -2
- package/dist/bundle/chunks/sha256sum-VJZ4PHQ4.js +0 -2
- package/dist/bundle/chunks/sort-PV2NEQHF.js +0 -2
- package/dist/bundle/chunks/split-6R2TSQY6.js +0 -2
- package/dist/bundle/chunks/sqlite3-7MBPFI6W.js +0 -2
- package/dist/bundle/chunks/stat-YLVJ4L67.js +0 -2
- package/dist/bundle/chunks/strings-WTD7Q2EF.js +0 -2
- package/dist/bundle/chunks/tac-YXC4HBTR.js +0 -2
- package/dist/bundle/chunks/tail-UGFWX3YY.js +0 -2
- package/dist/bundle/chunks/tar-BNHPWTOY.js +0 -2
- package/dist/bundle/chunks/tee-OOWSWHRQ.js +0 -2
- package/dist/bundle/chunks/time-N6J6DC6C.js +0 -2
- package/dist/bundle/chunks/timeout-ZHCL5KTP.js +0 -2
- package/dist/bundle/chunks/touch-W4DF6Z4T.js +0 -2
- package/dist/bundle/chunks/tr-4NGL47UU.js +0 -2
- package/dist/bundle/chunks/unexpand-YD5BWFH4.js +0 -2
- package/dist/bundle/chunks/uniq-OVOW532K.js +0 -2
- package/dist/bundle/chunks/wc-RUR7HE5O.js +0 -2
- package/dist/bundle/chunks/xan-7R3I2DJO.js +0 -2
- package/dist/bundle/chunks/xan-view-S4ZILLPU.js +0 -2
- package/dist/bundle/chunks/xargs-L7TJHOJT.js +0 -2
- package/dist/bundle/chunks/yes-I7SAR7XX.js +0 -2
- package/dist/bundle/chunks/yq-IOMBQYB2.js +0 -2
|
@@ -1,1578 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as me}from"./chunk-3MRB66F4.js";import{a as pe}from"./chunk-MA6BMA4M.js";import{c as ce,d as de}from"./chunk-EFS34UUR.js";import{a as ye}from"./chunk-MROECM42.js";import{b as _}from"./chunk-VGSRQOLD.js";import"./chunk-LCP3IKI7.js";import{b as z}from"./chunk-CPKBPQ2C.js";import{a as O}from"./chunk-I4IRHQDW.js";import{a as g,b as B}from"./chunk-PBOVSFTJ.js";import{b as he}from"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";import{AsyncLocalStorage as Ke}from"node:async_hooks";import{Buffer as h}from"node:buffer";import{createRunner as Qe,getHostFunctionContext as D,RunAbortedError as Xe,RunBridgeLimitError as Ze,RunError as et,RunTimeoutError as Ue}from"run";var be=`
|
|
4
|
-
(function() {
|
|
5
|
-
// --- URLSearchParams ---
|
|
6
|
-
function URLSearchParams(init) {
|
|
7
|
-
this._entries = [];
|
|
8
|
-
if (!init) return;
|
|
9
|
-
if (typeof init === 'string') {
|
|
10
|
-
var s = init;
|
|
11
|
-
if (s.charAt(0) === '?') s = s.slice(1);
|
|
12
|
-
var pairs = s.split('&');
|
|
13
|
-
for (var i = 0; i < pairs.length; i++) {
|
|
14
|
-
var pair = pairs[i];
|
|
15
|
-
if (pair === '') continue;
|
|
16
|
-
var eq = pair.indexOf('=');
|
|
17
|
-
if (eq === -1) {
|
|
18
|
-
this._entries.push([decodeURIComponent(pair), '']);
|
|
19
|
-
} else {
|
|
20
|
-
this._entries.push([
|
|
21
|
-
decodeURIComponent(pair.slice(0, eq)),
|
|
22
|
-
decodeURIComponent(pair.slice(eq + 1))
|
|
23
|
-
]);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
} else if (typeof init === 'object' && init !== null) {
|
|
27
|
-
if (init instanceof URLSearchParams) {
|
|
28
|
-
this._entries = init._entries.slice();
|
|
29
|
-
} else {
|
|
30
|
-
var keys = Object.keys(init);
|
|
31
|
-
for (var i = 0; i < keys.length; i++) {
|
|
32
|
-
this._entries.push([keys[i], String(init[keys[i]])]);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
URLSearchParams.prototype.append = function(name, value) {
|
|
39
|
-
this._entries.push([String(name), String(value)]);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
URLSearchParams.prototype.delete = function(name) {
|
|
43
|
-
var n = String(name);
|
|
44
|
-
this._entries = this._entries.filter(function(e) { return e[0] !== n; });
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
URLSearchParams.prototype.get = function(name) {
|
|
48
|
-
var n = String(name);
|
|
49
|
-
for (var i = 0; i < this._entries.length; i++) {
|
|
50
|
-
if (this._entries[i][0] === n) return this._entries[i][1];
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
URLSearchParams.prototype.getAll = function(name) {
|
|
56
|
-
var n = String(name);
|
|
57
|
-
var result = [];
|
|
58
|
-
for (var i = 0; i < this._entries.length; i++) {
|
|
59
|
-
if (this._entries[i][0] === n) result.push(this._entries[i][1]);
|
|
60
|
-
}
|
|
61
|
-
return result;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
URLSearchParams.prototype.has = function(name) {
|
|
65
|
-
var n = String(name);
|
|
66
|
-
for (var i = 0; i < this._entries.length; i++) {
|
|
67
|
-
if (this._entries[i][0] === n) return true;
|
|
68
|
-
}
|
|
69
|
-
return false;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
URLSearchParams.prototype.set = function(name, value) {
|
|
73
|
-
var n = String(name);
|
|
74
|
-
var v = String(value);
|
|
75
|
-
var found = false;
|
|
76
|
-
var newEntries = [];
|
|
77
|
-
for (var i = 0; i < this._entries.length; i++) {
|
|
78
|
-
if (this._entries[i][0] === n) {
|
|
79
|
-
if (!found) {
|
|
80
|
-
newEntries.push([n, v]);
|
|
81
|
-
found = true;
|
|
82
|
-
}
|
|
83
|
-
} else {
|
|
84
|
-
newEntries.push(this._entries[i]);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
if (!found) newEntries.push([n, v]);
|
|
88
|
-
this._entries = newEntries;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
URLSearchParams.prototype.sort = function() {
|
|
92
|
-
this._entries.sort(function(a, b) {
|
|
93
|
-
if (a[0] < b[0]) return -1;
|
|
94
|
-
if (a[0] > b[0]) return 1;
|
|
95
|
-
return 0;
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
URLSearchParams.prototype.toString = function() {
|
|
100
|
-
return this._entries.map(function(e) {
|
|
101
|
-
return encodeURIComponent(e[0]) + '=' + encodeURIComponent(e[1]);
|
|
102
|
-
}).join('&');
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
URLSearchParams.prototype.forEach = function(callback, thisArg) {
|
|
106
|
-
for (var i = 0; i < this._entries.length; i++) {
|
|
107
|
-
callback.call(thisArg, this._entries[i][1], this._entries[i][0], this);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
URLSearchParams.prototype.entries = function() {
|
|
112
|
-
var idx = 0;
|
|
113
|
-
var entries = this._entries;
|
|
114
|
-
return {
|
|
115
|
-
next: function() {
|
|
116
|
-
if (idx >= entries.length) return { done: true, value: undefined };
|
|
117
|
-
return { done: false, value: entries[idx++].slice() };
|
|
118
|
-
},
|
|
119
|
-
[Symbol.iterator]: function() { return this; }
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
URLSearchParams.prototype.keys = function() {
|
|
124
|
-
var idx = 0;
|
|
125
|
-
var entries = this._entries;
|
|
126
|
-
return {
|
|
127
|
-
next: function() {
|
|
128
|
-
if (idx >= entries.length) return { done: true, value: undefined };
|
|
129
|
-
return { done: false, value: entries[idx++][0] };
|
|
130
|
-
},
|
|
131
|
-
[Symbol.iterator]: function() { return this; }
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
URLSearchParams.prototype.values = function() {
|
|
136
|
-
var idx = 0;
|
|
137
|
-
var entries = this._entries;
|
|
138
|
-
return {
|
|
139
|
-
next: function() {
|
|
140
|
-
if (idx >= entries.length) return { done: true, value: undefined };
|
|
141
|
-
return { done: false, value: entries[idx++][1] };
|
|
142
|
-
},
|
|
143
|
-
[Symbol.iterator]: function() { return this; }
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
URLSearchParams.prototype[Symbol.iterator] = URLSearchParams.prototype.entries;
|
|
148
|
-
|
|
149
|
-
Object.defineProperty(URLSearchParams.prototype, 'size', {
|
|
150
|
-
get: function() { return this._entries.length; }
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
// --- URL ---
|
|
154
|
-
var urlRegex = /^([a-zA-Z][a-zA-Z0-9+.-]*):(?:\\/\\/(?:([^:@/?#]*)(?::([^@/?#]*))?@)?([^:/?#]*)(?::([0-9]+))?)?(\\/[^?#]*)?(?:\\?([^#]*))?(?:#(.*))?$/;
|
|
155
|
-
|
|
156
|
-
function URL(url, base) {
|
|
157
|
-
var input = String(url);
|
|
158
|
-
|
|
159
|
-
if (base !== undefined) {
|
|
160
|
-
var baseUrl = (base instanceof URL) ? base : new URL(String(base));
|
|
161
|
-
// Resolve relative URL against base
|
|
162
|
-
if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(input)) {
|
|
163
|
-
// Absolute URL - parse as-is
|
|
164
|
-
} else if (input.charAt(0) === '/' && input.charAt(1) === '/') {
|
|
165
|
-
// Protocol-relative
|
|
166
|
-
input = baseUrl.protocol + input;
|
|
167
|
-
} else if (input.charAt(0) === '/') {
|
|
168
|
-
// Absolute path
|
|
169
|
-
input = baseUrl.origin + input;
|
|
170
|
-
} else if (input.charAt(0) === '?' || input.charAt(0) === '#') {
|
|
171
|
-
// Query or hash only
|
|
172
|
-
var basePath = baseUrl.protocol + '//' + baseUrl.host + baseUrl.pathname;
|
|
173
|
-
if (input.charAt(0) === '#') {
|
|
174
|
-
input = basePath + baseUrl.search + input;
|
|
175
|
-
} else {
|
|
176
|
-
input = basePath + input;
|
|
177
|
-
}
|
|
178
|
-
} else {
|
|
179
|
-
// Relative path
|
|
180
|
-
var basePath = baseUrl.protocol + '//' + baseUrl.host;
|
|
181
|
-
var dirPath = baseUrl.pathname;
|
|
182
|
-
var lastSlash = dirPath.lastIndexOf('/');
|
|
183
|
-
if (lastSlash >= 0) dirPath = dirPath.slice(0, lastSlash + 1);
|
|
184
|
-
else dirPath = '/';
|
|
185
|
-
input = basePath + dirPath + input;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
var m = urlRegex.exec(input);
|
|
190
|
-
if (!m) throw new TypeError("Invalid URL: " + String(url));
|
|
191
|
-
|
|
192
|
-
this.protocol = m[1].toLowerCase() + ':';
|
|
193
|
-
this.username = m[2] ? decodeURIComponent(m[2]) : '';
|
|
194
|
-
this.password = m[3] ? decodeURIComponent(m[3]) : '';
|
|
195
|
-
this.hostname = m[4] || '';
|
|
196
|
-
this.port = m[5] || '';
|
|
197
|
-
this.pathname = m[6] || '/';
|
|
198
|
-
this.hash = m[8] ? '#' + m[8] : '';
|
|
199
|
-
|
|
200
|
-
// Normalize pathname (resolve . and ..)
|
|
201
|
-
var parts = this.pathname.split('/');
|
|
202
|
-
var resolved = [];
|
|
203
|
-
for (var i = 0; i < parts.length; i++) {
|
|
204
|
-
if (parts[i] === '..') { if (resolved.length > 1) resolved.pop(); }
|
|
205
|
-
else if (parts[i] !== '.') resolved.push(parts[i]);
|
|
206
|
-
}
|
|
207
|
-
this.pathname = resolved.join('/') || '/';
|
|
208
|
-
|
|
209
|
-
// searchParams is live
|
|
210
|
-
this._searchParamsStr = m[7] || '';
|
|
211
|
-
this.searchParams = new URLSearchParams(this._searchParamsStr);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
Object.defineProperty(URL.prototype, 'search', {
|
|
215
|
-
get: function() {
|
|
216
|
-
var s = this.searchParams.toString();
|
|
217
|
-
return s ? '?' + s : '';
|
|
218
|
-
},
|
|
219
|
-
set: function(v) {
|
|
220
|
-
this.searchParams = new URLSearchParams(String(v));
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
Object.defineProperty(URL.prototype, 'host', {
|
|
225
|
-
get: function() {
|
|
226
|
-
return this.port ? this.hostname + ':' + this.port : this.hostname;
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
Object.defineProperty(URL.prototype, 'origin', {
|
|
231
|
-
get: function() {
|
|
232
|
-
return this.protocol + '//' + this.host;
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
Object.defineProperty(URL.prototype, 'href', {
|
|
237
|
-
get: function() {
|
|
238
|
-
var auth = '';
|
|
239
|
-
if (this.username) {
|
|
240
|
-
auth = this.username;
|
|
241
|
-
if (this.password) auth += ':' + this.password;
|
|
242
|
-
auth += '@';
|
|
243
|
-
}
|
|
244
|
-
return this.protocol + '//' + auth + this.host + this.pathname + this.search + this.hash;
|
|
245
|
-
},
|
|
246
|
-
set: function(v) {
|
|
247
|
-
var parsed = new URL(String(v));
|
|
248
|
-
this.protocol = parsed.protocol;
|
|
249
|
-
this.username = parsed.username;
|
|
250
|
-
this.password = parsed.password;
|
|
251
|
-
this.hostname = parsed.hostname;
|
|
252
|
-
this.port = parsed.port;
|
|
253
|
-
this.pathname = parsed.pathname;
|
|
254
|
-
this.searchParams = parsed.searchParams;
|
|
255
|
-
this.hash = parsed.hash;
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
|
|
259
|
-
URL.prototype.toString = function() { return this.href; };
|
|
260
|
-
URL.prototype.toJSON = function() { return this.href; };
|
|
261
|
-
|
|
262
|
-
// --- Headers ---
|
|
263
|
-
function Headers(init) {
|
|
264
|
-
this._map = Object.create(null);
|
|
265
|
-
if (!init) return;
|
|
266
|
-
if (init instanceof Headers) {
|
|
267
|
-
var keys = Object.keys(init._map);
|
|
268
|
-
for (var i = 0; i < keys.length; i++) {
|
|
269
|
-
this._map[keys[i]] = init._map[keys[i]].slice();
|
|
270
|
-
}
|
|
271
|
-
} else if (typeof init === 'object') {
|
|
272
|
-
var keys = Object.keys(init);
|
|
273
|
-
for (var i = 0; i < keys.length; i++) {
|
|
274
|
-
this._map[keys[i].toLowerCase()] = [String(init[keys[i]])];
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
Headers.prototype.append = function(name, value) {
|
|
280
|
-
var key = String(name).toLowerCase();
|
|
281
|
-
if (!Object.prototype.hasOwnProperty.call(this._map, key)) this._map[key] = [];
|
|
282
|
-
this._map[key].push(String(value));
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
Headers.prototype.delete = function(name) {
|
|
286
|
-
delete this._map[String(name).toLowerCase()];
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
Headers.prototype.get = function(name) {
|
|
290
|
-
var vals = this._map[String(name).toLowerCase()];
|
|
291
|
-
return vals ? vals.join(', ') : null;
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
Headers.prototype.has = function(name) {
|
|
295
|
-
return Object.prototype.hasOwnProperty.call(this._map, String(name).toLowerCase());
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
Headers.prototype.set = function(name, value) {
|
|
299
|
-
this._map[String(name).toLowerCase()] = [String(value)];
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
Headers.prototype.forEach = function(callback, thisArg) {
|
|
303
|
-
var keys = Object.keys(this._map).sort();
|
|
304
|
-
for (var i = 0; i < keys.length; i++) {
|
|
305
|
-
callback.call(thisArg, this._map[keys[i]].join(', '), keys[i], this);
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
Headers.prototype.entries = function() {
|
|
310
|
-
var keys = Object.keys(this._map).sort();
|
|
311
|
-
var map = this._map;
|
|
312
|
-
var idx = 0;
|
|
313
|
-
return {
|
|
314
|
-
next: function() {
|
|
315
|
-
if (idx >= keys.length) return { done: true, value: undefined };
|
|
316
|
-
var k = keys[idx++];
|
|
317
|
-
return { done: false, value: [k, map[k].join(', ')] };
|
|
318
|
-
},
|
|
319
|
-
[Symbol.iterator]: function() { return this; }
|
|
320
|
-
};
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
Headers.prototype.keys = function() {
|
|
324
|
-
var keys = Object.keys(this._map).sort();
|
|
325
|
-
var idx = 0;
|
|
326
|
-
return {
|
|
327
|
-
next: function() {
|
|
328
|
-
if (idx >= keys.length) return { done: true, value: undefined };
|
|
329
|
-
return { done: false, value: keys[idx++] };
|
|
330
|
-
},
|
|
331
|
-
[Symbol.iterator]: function() { return this; }
|
|
332
|
-
};
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
Headers.prototype.values = function() {
|
|
336
|
-
var keys = Object.keys(this._map).sort();
|
|
337
|
-
var map = this._map;
|
|
338
|
-
var idx = 0;
|
|
339
|
-
return {
|
|
340
|
-
next: function() {
|
|
341
|
-
if (idx >= keys.length) return { done: true, value: undefined };
|
|
342
|
-
return { done: false, value: map[keys[idx++]].join(', ') };
|
|
343
|
-
},
|
|
344
|
-
[Symbol.iterator]: function() { return this; }
|
|
345
|
-
};
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
|
|
349
|
-
|
|
350
|
-
// --- Response ---
|
|
351
|
-
function Response(body, init) {
|
|
352
|
-
if (init === undefined) init = {};
|
|
353
|
-
this.status = init.status !== undefined ? init.status : 200;
|
|
354
|
-
this.statusText = init.statusText !== undefined ? init.statusText : '';
|
|
355
|
-
this.headers = init.headers instanceof Headers ? init.headers : new Headers(init.headers);
|
|
356
|
-
this.body = body !== undefined && body !== null ? String(body) : '';
|
|
357
|
-
this.ok = this.status >= 200 && this.status <= 299;
|
|
358
|
-
this.url = '';
|
|
359
|
-
this.redirected = false;
|
|
360
|
-
this.type = 'basic';
|
|
361
|
-
this.bodyUsed = false;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
Response.prototype.text = function() {
|
|
365
|
-
this.bodyUsed = true;
|
|
366
|
-
return Promise.resolve(this.body);
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
Response.prototype.json = function() {
|
|
370
|
-
this.bodyUsed = true;
|
|
371
|
-
try {
|
|
372
|
-
return Promise.resolve(JSON.parse(this.body));
|
|
373
|
-
} catch (e) {
|
|
374
|
-
return Promise.reject(e);
|
|
375
|
-
}
|
|
376
|
-
};
|
|
377
|
-
|
|
378
|
-
Response.prototype.clone = function() {
|
|
379
|
-
var r = new Response(this.body, {
|
|
380
|
-
status: this.status,
|
|
381
|
-
statusText: this.statusText,
|
|
382
|
-
headers: new Headers(this.headers)
|
|
383
|
-
});
|
|
384
|
-
r.url = this.url;
|
|
385
|
-
r.redirected = this.redirected;
|
|
386
|
-
r.type = this.type;
|
|
387
|
-
return r;
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
Response.json = function(data, init) {
|
|
391
|
-
if (init === undefined) init = {};
|
|
392
|
-
var headers = init.headers instanceof Headers ? init.headers : new Headers(init.headers);
|
|
393
|
-
if (!headers.has('content-type')) {
|
|
394
|
-
headers.set('content-type', 'application/json');
|
|
395
|
-
}
|
|
396
|
-
return new Response(JSON.stringify(data), {
|
|
397
|
-
status: init.status !== undefined ? init.status : 200,
|
|
398
|
-
statusText: init.statusText || '',
|
|
399
|
-
headers: headers
|
|
400
|
-
});
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
Response.error = function() {
|
|
404
|
-
var r = new Response(null, { status: 0, statusText: '' });
|
|
405
|
-
r.type = 'error';
|
|
406
|
-
r.ok = false;
|
|
407
|
-
return r;
|
|
408
|
-
};
|
|
409
|
-
|
|
410
|
-
Response.redirect = function(url, status) {
|
|
411
|
-
if (status === undefined) status = 302;
|
|
412
|
-
var r = new Response(null, {
|
|
413
|
-
status: status,
|
|
414
|
-
statusText: '',
|
|
415
|
-
headers: new Headers({ location: String(url) })
|
|
416
|
-
});
|
|
417
|
-
r.redirected = true;
|
|
418
|
-
return r;
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
// --- Request ---
|
|
422
|
-
function Request(input, init) {
|
|
423
|
-
if (init === undefined) init = {};
|
|
424
|
-
if (input instanceof Request) {
|
|
425
|
-
this.url = input.url;
|
|
426
|
-
this.method = input.method;
|
|
427
|
-
this.headers = new Headers(input.headers);
|
|
428
|
-
this.body = input.body;
|
|
429
|
-
} else {
|
|
430
|
-
this.url = String(input);
|
|
431
|
-
this.method = 'GET';
|
|
432
|
-
this.headers = new Headers();
|
|
433
|
-
this.body = null;
|
|
434
|
-
}
|
|
435
|
-
if (init.method !== undefined) this.method = String(init.method).toUpperCase();
|
|
436
|
-
if (init.headers !== undefined) this.headers = init.headers instanceof Headers ? init.headers : new Headers(init.headers);
|
|
437
|
-
if (init.body !== undefined) this.body = init.body !== null ? String(init.body) : null;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
Request.prototype.clone = function() {
|
|
441
|
-
return new Request(this);
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
// --- Assign to globalThis ---
|
|
445
|
-
globalThis.URLSearchParams = URLSearchParams;
|
|
446
|
-
globalThis.URL = URL;
|
|
447
|
-
globalThis.Headers = Headers;
|
|
448
|
-
globalThis.Response = Response;
|
|
449
|
-
globalThis.Request = Request;
|
|
450
|
-
|
|
451
|
-
// --- Wrap native fetch ---
|
|
452
|
-
var _nativeFetch = globalThis[Symbol.for('jb:fetch')];
|
|
453
|
-
globalThis.fetch = function fetch(input, init) {
|
|
454
|
-
try {
|
|
455
|
-
var url, method, headers, body;
|
|
456
|
-
|
|
457
|
-
if (input instanceof Request) {
|
|
458
|
-
url = input.url;
|
|
459
|
-
method = input.method;
|
|
460
|
-
headers = {};
|
|
461
|
-
input.headers.forEach(function(v, k) { headers[k] = v; });
|
|
462
|
-
body = input.body;
|
|
463
|
-
} else {
|
|
464
|
-
url = String(input);
|
|
465
|
-
method = undefined;
|
|
466
|
-
headers = undefined;
|
|
467
|
-
body = undefined;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
if (init) {
|
|
471
|
-
if (init.method !== undefined) method = String(init.method).toUpperCase();
|
|
472
|
-
if (init.headers !== undefined) {
|
|
473
|
-
var h = init.headers instanceof Headers ? init.headers : new Headers(init.headers);
|
|
474
|
-
headers = {};
|
|
475
|
-
h.forEach(function(v, k) { headers[k] = v; });
|
|
476
|
-
}
|
|
477
|
-
if (init.body !== undefined) body = init.body !== null ? String(init.body) : undefined;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
var opts = Object.create(null);
|
|
481
|
-
if (method) opts.method = method;
|
|
482
|
-
if (headers) opts.headers = headers;
|
|
483
|
-
if (body) opts.body = body;
|
|
484
|
-
|
|
485
|
-
var raw = _nativeFetch(url, opts);
|
|
486
|
-
|
|
487
|
-
var respHeaders = new Headers(raw.headers || {});
|
|
488
|
-
var response = new Response(raw.body, {
|
|
489
|
-
status: raw.status,
|
|
490
|
-
statusText: raw.statusText || '',
|
|
491
|
-
headers: respHeaders
|
|
492
|
-
});
|
|
493
|
-
response.url = raw.url || url;
|
|
494
|
-
|
|
495
|
-
return Promise.resolve(response);
|
|
496
|
-
} catch (e) {
|
|
497
|
-
return Promise.reject(new TypeError(e.message || 'fetch failed'));
|
|
498
|
-
}
|
|
499
|
-
};
|
|
500
|
-
})();
|
|
501
|
-
`;var ge=`
|
|
502
|
-
var EventEmitter = (function() {
|
|
503
|
-
function EE() {
|
|
504
|
-
this._events = {};
|
|
505
|
-
this._maxListeners = 10;
|
|
506
|
-
}
|
|
507
|
-
EE.prototype.on = function(event, listener) {
|
|
508
|
-
if (!this._events[event]) this._events[event] = [];
|
|
509
|
-
this._events[event].push(listener);
|
|
510
|
-
return this;
|
|
511
|
-
};
|
|
512
|
-
EE.prototype.addListener = EE.prototype.on;
|
|
513
|
-
EE.prototype.once = function(event, listener) {
|
|
514
|
-
var self = this;
|
|
515
|
-
function wrapper() {
|
|
516
|
-
self.removeListener(event, wrapper);
|
|
517
|
-
listener.apply(this, arguments);
|
|
518
|
-
}
|
|
519
|
-
wrapper._original = listener;
|
|
520
|
-
return this.on(event, wrapper);
|
|
521
|
-
};
|
|
522
|
-
EE.prototype.off = function(event, listener) {
|
|
523
|
-
return this.removeListener(event, listener);
|
|
524
|
-
};
|
|
525
|
-
EE.prototype.removeListener = function(event, listener) {
|
|
526
|
-
var list = this._events[event];
|
|
527
|
-
if (list) {
|
|
528
|
-
this._events[event] = list.filter(function(fn) {
|
|
529
|
-
return fn !== listener && fn._original !== listener;
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
return this;
|
|
533
|
-
};
|
|
534
|
-
EE.prototype.removeAllListeners = function(event) {
|
|
535
|
-
if (event) delete this._events[event];
|
|
536
|
-
else this._events = {};
|
|
537
|
-
return this;
|
|
538
|
-
};
|
|
539
|
-
EE.prototype.emit = function(event) {
|
|
540
|
-
var list = this._events[event];
|
|
541
|
-
if (!list || list.length === 0) return false;
|
|
542
|
-
var args = Array.prototype.slice.call(arguments, 1);
|
|
543
|
-
var fns = list.slice();
|
|
544
|
-
for (var i = 0; i < fns.length; i++) fns[i].apply(this, args);
|
|
545
|
-
return true;
|
|
546
|
-
};
|
|
547
|
-
EE.prototype.listeners = function(event) {
|
|
548
|
-
return (this._events[event] || []).slice();
|
|
549
|
-
};
|
|
550
|
-
EE.prototype.listenerCount = function(event) {
|
|
551
|
-
return (this._events[event] || []).length;
|
|
552
|
-
};
|
|
553
|
-
EE.prototype.setMaxListeners = function(n) {
|
|
554
|
-
this._maxListeners = n;
|
|
555
|
-
return this;
|
|
556
|
-
};
|
|
557
|
-
EE.prototype.eventNames = function() {
|
|
558
|
-
return Object.keys(this._events);
|
|
559
|
-
};
|
|
560
|
-
EE.prototype.prependListener = function(event, listener) {
|
|
561
|
-
if (!this._events[event]) this._events[event] = [];
|
|
562
|
-
this._events[event].unshift(listener);
|
|
563
|
-
return this;
|
|
564
|
-
};
|
|
565
|
-
return EE;
|
|
566
|
-
})();
|
|
567
|
-
globalThis[Symbol.for('jb:events')] = { EventEmitter: EventEmitter };
|
|
568
|
-
`,ve=`
|
|
569
|
-
var _os = {
|
|
570
|
-
platform: function() { return globalThis.process.platform; },
|
|
571
|
-
arch: function() { return globalThis.process.arch; },
|
|
572
|
-
homedir: function() { return '/home/user'; },
|
|
573
|
-
tmpdir: function() { return '/tmp'; },
|
|
574
|
-
type: function() { return 'Linux'; },
|
|
575
|
-
hostname: function() { return 'sandbox'; },
|
|
576
|
-
EOL: '\\n',
|
|
577
|
-
cpus: function() { return []; },
|
|
578
|
-
totalmem: function() { return 0; },
|
|
579
|
-
freemem: function() { return 0; },
|
|
580
|
-
endianness: function() { return 'LE'; }
|
|
581
|
-
};
|
|
582
|
-
globalThis[Symbol.for('jb:os')] = _os;
|
|
583
|
-
`,Se=`
|
|
584
|
-
var _urlMod = {
|
|
585
|
-
URL: globalThis.URL,
|
|
586
|
-
URLSearchParams: globalThis.URLSearchParams,
|
|
587
|
-
parse: function(urlStr) {
|
|
588
|
-
try {
|
|
589
|
-
var u = new URL(urlStr);
|
|
590
|
-
return {
|
|
591
|
-
protocol: u.protocol, host: u.host, hostname: u.hostname,
|
|
592
|
-
port: u.port, pathname: u.pathname, search: u.search,
|
|
593
|
-
hash: u.hash, href: u.href, path: u.pathname + u.search
|
|
594
|
-
};
|
|
595
|
-
} catch(e) {
|
|
596
|
-
return {
|
|
597
|
-
protocol: null, host: null, hostname: null, port: null,
|
|
598
|
-
pathname: urlStr, search: '', hash: '', href: urlStr, path: urlStr
|
|
599
|
-
};
|
|
600
|
-
}
|
|
601
|
-
},
|
|
602
|
-
format: function(obj) {
|
|
603
|
-
if (typeof obj === 'string') return obj;
|
|
604
|
-
if (obj instanceof URL) return obj.href;
|
|
605
|
-
var auth = obj.auth ? obj.auth + '@' : '';
|
|
606
|
-
var host = obj.host || ((obj.hostname || '') + (obj.port ? ':' + obj.port : ''));
|
|
607
|
-
return (obj.protocol ? obj.protocol + '//' : '') + auth + host +
|
|
608
|
-
(obj.pathname || '/') + (obj.search || '') + (obj.hash || '');
|
|
609
|
-
}
|
|
610
|
-
};
|
|
611
|
-
globalThis[Symbol.for('jb:url')] = _urlMod;
|
|
612
|
-
`,_e=`
|
|
613
|
-
var _deepEqual = function(a, b) {
|
|
614
|
-
if (a === b) return true;
|
|
615
|
-
if (a === null || b === null || typeof a !== 'object' || typeof b !== 'object') return false;
|
|
616
|
-
if (Array.isArray(a) !== Array.isArray(b)) return false;
|
|
617
|
-
var ka = Object.keys(a), kb = Object.keys(b);
|
|
618
|
-
if (ka.length !== kb.length) return false;
|
|
619
|
-
for (var i = 0; i < ka.length; i++) {
|
|
620
|
-
if (!_deepEqual(a[ka[i]], b[ka[i]])) return false;
|
|
621
|
-
}
|
|
622
|
-
return true;
|
|
623
|
-
};
|
|
624
|
-
var _assert = function(val, msg) {
|
|
625
|
-
if (!val) throw new Error(msg || 'AssertionError: expected truthy value');
|
|
626
|
-
};
|
|
627
|
-
_assert.ok = _assert;
|
|
628
|
-
_assert.equal = function(a, b, msg) {
|
|
629
|
-
if (a != b) throw new Error(msg || 'AssertionError: ' + a + ' != ' + b);
|
|
630
|
-
};
|
|
631
|
-
_assert.notEqual = function(a, b, msg) {
|
|
632
|
-
if (a == b) throw new Error(msg || 'AssertionError: ' + a + ' == ' + b);
|
|
633
|
-
};
|
|
634
|
-
_assert.strictEqual = function(a, b, msg) {
|
|
635
|
-
if (a !== b) throw new Error(msg || 'AssertionError: ' + a + ' !== ' + b);
|
|
636
|
-
};
|
|
637
|
-
_assert.notStrictEqual = function(a, b, msg) {
|
|
638
|
-
if (a === b) throw new Error(msg || 'AssertionError: ' + a + ' === ' + b);
|
|
639
|
-
};
|
|
640
|
-
_assert.deepEqual = function(a, b, msg) {
|
|
641
|
-
if (!_deepEqual(a, b)) throw new Error(msg || 'AssertionError: objects not deep equal');
|
|
642
|
-
};
|
|
643
|
-
_assert.deepStrictEqual = _assert.deepEqual;
|
|
644
|
-
_assert.notDeepEqual = function(a, b, msg) {
|
|
645
|
-
if (_deepEqual(a, b)) throw new Error(msg || 'AssertionError: objects are deep equal');
|
|
646
|
-
};
|
|
647
|
-
_assert.throws = function(fn, expected, msg) {
|
|
648
|
-
var threw = false;
|
|
649
|
-
try { fn(); } catch(e) {
|
|
650
|
-
threw = true;
|
|
651
|
-
if (expected instanceof RegExp && !expected.test(e.message))
|
|
652
|
-
throw new Error(msg || 'AssertionError: error message did not match');
|
|
653
|
-
}
|
|
654
|
-
if (!threw) throw new Error(msg || 'AssertionError: function did not throw');
|
|
655
|
-
};
|
|
656
|
-
_assert.doesNotThrow = function(fn, msg) {
|
|
657
|
-
// @banned-pattern-ignore: sandbox-internal assertion helper; e.message is from user code inside QuickJS, not host details
|
|
658
|
-
try { fn(); } catch(e) {
|
|
659
|
-
throw new Error(msg || 'AssertionError: function threw: ' + e.message);
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
|
-
_assert.fail = function(msg) {
|
|
663
|
-
throw new Error(msg || 'AssertionError: assert.fail()');
|
|
664
|
-
};
|
|
665
|
-
globalThis[Symbol.for('jb:assert')] = _assert;
|
|
666
|
-
`,xe=`
|
|
667
|
-
var _util = {
|
|
668
|
-
format: function() {
|
|
669
|
-
var args = Array.prototype.slice.call(arguments);
|
|
670
|
-
if (args.length === 0) return '';
|
|
671
|
-
var fmt = args[0];
|
|
672
|
-
if (typeof fmt !== 'string') {
|
|
673
|
-
return args.map(function(a) {
|
|
674
|
-
return typeof a === 'string' ? a : JSON.stringify(a);
|
|
675
|
-
}).join(' ');
|
|
676
|
-
}
|
|
677
|
-
var i = 1;
|
|
678
|
-
var str = fmt.replace(/%[sdjifoO%]/g, function(m) {
|
|
679
|
-
if (m === '%%') return '%';
|
|
680
|
-
if (i >= args.length) return m;
|
|
681
|
-
var v = args[i++];
|
|
682
|
-
if (m === '%s') return String(v);
|
|
683
|
-
if (m === '%d') return Number(v).toString();
|
|
684
|
-
if (m === '%i') { var n = Number(v); return (isNaN(n) ? 'NaN' : Math.trunc(n)).toString(); }
|
|
685
|
-
if (m === '%j') return JSON.stringify(v);
|
|
686
|
-
if (m === '%f') return parseFloat(v).toString();
|
|
687
|
-
if (m === '%o' || m === '%O') return JSON.stringify(v);
|
|
688
|
-
return m;
|
|
689
|
-
});
|
|
690
|
-
while (i < args.length) {
|
|
691
|
-
str += ' ' + (typeof args[i] === 'string' ? args[i] : JSON.stringify(args[i]));
|
|
692
|
-
i++;
|
|
693
|
-
}
|
|
694
|
-
return str;
|
|
695
|
-
},
|
|
696
|
-
inspect: function(obj, opts) {
|
|
697
|
-
if (obj === null) return 'null';
|
|
698
|
-
if (obj === undefined) return 'undefined';
|
|
699
|
-
if (typeof obj === 'string') return "'" + obj + "'";
|
|
700
|
-
if (typeof obj === 'function') return '[Function: ' + (obj.name || 'anonymous') + ']';
|
|
701
|
-
var seen = [];
|
|
702
|
-
try {
|
|
703
|
-
return JSON.stringify(obj, function(key, val) {
|
|
704
|
-
if (typeof val === 'object' && val !== null) {
|
|
705
|
-
if (seen.indexOf(val) !== -1) return '[Circular]';
|
|
706
|
-
seen.push(val);
|
|
707
|
-
}
|
|
708
|
-
return val;
|
|
709
|
-
});
|
|
710
|
-
} catch(e) { return String(obj); }
|
|
711
|
-
},
|
|
712
|
-
promisify: function(fn) {
|
|
713
|
-
return function() {
|
|
714
|
-
var args = Array.prototype.slice.call(arguments);
|
|
715
|
-
return new Promise(function(resolve, reject) {
|
|
716
|
-
args.push(function(err, val) { if (err) reject(err); else resolve(val); });
|
|
717
|
-
fn.apply(null, args);
|
|
718
|
-
});
|
|
719
|
-
};
|
|
720
|
-
},
|
|
721
|
-
types: {
|
|
722
|
-
isDate: function(v) { return v instanceof Date; },
|
|
723
|
-
isRegExp: function(v) { return v instanceof RegExp; },
|
|
724
|
-
isArray: function(v) { return Array.isArray(v); },
|
|
725
|
-
isMap: function(v) { return typeof Map !== 'undefined' && v instanceof Map; },
|
|
726
|
-
isSet: function(v) { return typeof Set !== 'undefined' && v instanceof Set; }
|
|
727
|
-
},
|
|
728
|
-
inherits: function(ctor, superCtor) {
|
|
729
|
-
ctor.prototype = Object.create(superCtor.prototype);
|
|
730
|
-
ctor.prototype.constructor = ctor;
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
globalThis[Symbol.for('jb:util')] = _util;
|
|
734
|
-
`,Ee=`
|
|
735
|
-
function _utf8Encode(str) {
|
|
736
|
-
var bytes = [];
|
|
737
|
-
for (var i = 0; i < str.length; i++) {
|
|
738
|
-
var c = str.charCodeAt(i);
|
|
739
|
-
if (c < 0x80) {
|
|
740
|
-
bytes.push(c);
|
|
741
|
-
} else if (c < 0x800) {
|
|
742
|
-
bytes.push(0xC0 | (c >> 6), 0x80 | (c & 0x3F));
|
|
743
|
-
} else if (c >= 0xD800 && c <= 0xDBFF && i + 1 < str.length) {
|
|
744
|
-
var lo = str.charCodeAt(++i);
|
|
745
|
-
var cp = ((c - 0xD800) * 0x400) + (lo - 0xDC00) + 0x10000;
|
|
746
|
-
bytes.push(0xF0 | (cp >> 18), 0x80 | ((cp >> 12) & 0x3F), 0x80 | ((cp >> 6) & 0x3F), 0x80 | (cp & 0x3F));
|
|
747
|
-
} else {
|
|
748
|
-
bytes.push(0xE0 | (c >> 12), 0x80 | ((c >> 6) & 0x3F), 0x80 | (c & 0x3F));
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
return bytes;
|
|
752
|
-
}
|
|
753
|
-
function _utf8Decode(bytes) {
|
|
754
|
-
var str = '';
|
|
755
|
-
var i = 0;
|
|
756
|
-
while (i < bytes.length) {
|
|
757
|
-
var b = bytes[i];
|
|
758
|
-
if (b < 0x80) { str += String.fromCharCode(b); i++; }
|
|
759
|
-
else if ((b & 0xE0) === 0xC0) { str += String.fromCharCode(((b & 0x1F) << 6) | (bytes[i+1] & 0x3F)); i += 2; }
|
|
760
|
-
else if ((b & 0xF0) === 0xE0) { str += String.fromCharCode(((b & 0x0F) << 12) | ((bytes[i+1] & 0x3F) << 6) | (bytes[i+2] & 0x3F)); i += 3; }
|
|
761
|
-
else if ((b & 0xF8) === 0xF0) { var cp = ((b & 0x07) << 18) | ((bytes[i+1] & 0x3F) << 12) | ((bytes[i+2] & 0x3F) << 6) | (bytes[i+3] & 0x3F); cp -= 0x10000; str += String.fromCharCode((cp >> 10) + 0xD800, (cp & 0x3FF) + 0xDC00); i += 4; }
|
|
762
|
-
else { i++; }
|
|
763
|
-
}
|
|
764
|
-
return str;
|
|
765
|
-
}
|
|
766
|
-
// _utf8Encode/_utf8Decode are IIFE-local vars, available to all module shims
|
|
767
|
-
// IMPORTANT: round-trip tests (encode then decode) mask broken encodings
|
|
768
|
-
// because both sides become no-ops. Encoding tests MUST assert the encoded
|
|
769
|
-
// constant directly.
|
|
770
|
-
function _normEnc(enc) {
|
|
771
|
-
if (enc === undefined || enc === null) return 'utf8';
|
|
772
|
-
var e = String(enc).toLowerCase();
|
|
773
|
-
if (e === 'utf8' || e === 'utf-8') return 'utf8';
|
|
774
|
-
if (e === 'utf16le' || e === 'utf-16le' || e === 'ucs2' || e === 'ucs-2') return 'utf16le';
|
|
775
|
-
if (e === 'latin1' || e === 'binary') return 'latin1';
|
|
776
|
-
if (e === 'ascii') return 'ascii';
|
|
777
|
-
if (e === 'base64') return 'base64';
|
|
778
|
-
if (e === 'base64url') return 'base64url';
|
|
779
|
-
if (e === 'hex') return 'hex';
|
|
780
|
-
return undefined;
|
|
781
|
-
}
|
|
782
|
-
function _badEnc(enc) {
|
|
783
|
-
throw new TypeError("Unknown encoding: " + enc);
|
|
784
|
-
}
|
|
785
|
-
var _HEX = '0123456789abcdef';
|
|
786
|
-
function _hexEncode(bytes) {
|
|
787
|
-
var s = '';
|
|
788
|
-
for (var i = 0; i < bytes.length; i++) {
|
|
789
|
-
var b = bytes[i] & 0xff;
|
|
790
|
-
s += _HEX.charAt(b >> 4) + _HEX.charAt(b & 0x0f);
|
|
791
|
-
}
|
|
792
|
-
return s;
|
|
793
|
-
}
|
|
794
|
-
function _hexDecode(str) {
|
|
795
|
-
var out = [];
|
|
796
|
-
for (var i = 0; i + 1 < str.length; i += 2) {
|
|
797
|
-
var hi = _hexVal(str.charCodeAt(i));
|
|
798
|
-
var lo = _hexVal(str.charCodeAt(i + 1));
|
|
799
|
-
if (hi < 0 || lo < 0) break;
|
|
800
|
-
out.push((hi << 4) | lo);
|
|
801
|
-
}
|
|
802
|
-
return out;
|
|
803
|
-
}
|
|
804
|
-
function _hexVal(c) {
|
|
805
|
-
if (c >= 48 && c <= 57) return c - 48;
|
|
806
|
-
if (c >= 97 && c <= 102) return c - 87;
|
|
807
|
-
if (c >= 65 && c <= 70) return c - 55;
|
|
808
|
-
return -1;
|
|
809
|
-
}
|
|
810
|
-
function _rawEncode(str) {
|
|
811
|
-
var out = new Array(str.length);
|
|
812
|
-
for (var i = 0; i < str.length; i++) out[i] = str.charCodeAt(i) & 0xff;
|
|
813
|
-
return out;
|
|
814
|
-
}
|
|
815
|
-
function _latin1Decode(bytes) {
|
|
816
|
-
var s = '';
|
|
817
|
-
for (var i = 0; i < bytes.length; i++) s += String.fromCharCode(bytes[i] & 0xff);
|
|
818
|
-
return s;
|
|
819
|
-
}
|
|
820
|
-
function _asciiDecode(bytes) {
|
|
821
|
-
var s = '';
|
|
822
|
-
for (var i = 0; i < bytes.length; i++) s += String.fromCharCode(bytes[i] & 0x7f);
|
|
823
|
-
return s;
|
|
824
|
-
}
|
|
825
|
-
function _utf16leEncode(str) {
|
|
826
|
-
var out = new Array(str.length * 2);
|
|
827
|
-
for (var i = 0; i < str.length; i++) {
|
|
828
|
-
var c = str.charCodeAt(i);
|
|
829
|
-
out[i * 2] = c & 0xff;
|
|
830
|
-
out[i * 2 + 1] = (c >> 8) & 0xff;
|
|
831
|
-
}
|
|
832
|
-
return out;
|
|
833
|
-
}
|
|
834
|
-
function _utf16leDecode(bytes) {
|
|
835
|
-
var s = '';
|
|
836
|
-
var end = bytes.length & ~1;
|
|
837
|
-
for (var i = 0; i < end; i += 2) {
|
|
838
|
-
s += String.fromCharCode(bytes[i] | (bytes[i + 1] << 8));
|
|
839
|
-
}
|
|
840
|
-
return s;
|
|
841
|
-
}
|
|
842
|
-
var _B64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
843
|
-
var _B64DEC = null;
|
|
844
|
-
function _b64DecTable() {
|
|
845
|
-
if (_B64DEC) return _B64DEC;
|
|
846
|
-
var t = new Array(256);
|
|
847
|
-
for (var i = 0; i < 256; i++) t[i] = -1;
|
|
848
|
-
for (var j = 0; j < 64; j++) t[_B64.charCodeAt(j)] = j;
|
|
849
|
-
t[45] = 62;
|
|
850
|
-
t[95] = 63;
|
|
851
|
-
_B64DEC = t;
|
|
852
|
-
return t;
|
|
853
|
-
}
|
|
854
|
-
function _b64Encode(bytes) {
|
|
855
|
-
var s = '';
|
|
856
|
-
var i = 0, len = bytes.length;
|
|
857
|
-
while (i + 2 < len) {
|
|
858
|
-
var n = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
|
|
859
|
-
s += _B64.charAt((n >> 18) & 63) + _B64.charAt((n >> 12) & 63)
|
|
860
|
-
+ _B64.charAt((n >> 6) & 63) + _B64.charAt(n & 63);
|
|
861
|
-
i += 3;
|
|
862
|
-
}
|
|
863
|
-
var rem = len - i;
|
|
864
|
-
if (rem === 1) {
|
|
865
|
-
var n1 = bytes[i] << 16;
|
|
866
|
-
s += _B64.charAt((n1 >> 18) & 63) + _B64.charAt((n1 >> 12) & 63) + '==';
|
|
867
|
-
} else if (rem === 2) {
|
|
868
|
-
var n2 = (bytes[i] << 16) | (bytes[i + 1] << 8);
|
|
869
|
-
s += _B64.charAt((n2 >> 18) & 63) + _B64.charAt((n2 >> 12) & 63)
|
|
870
|
-
+ _B64.charAt((n2 >> 6) & 63) + '=';
|
|
871
|
-
}
|
|
872
|
-
return s;
|
|
873
|
-
}
|
|
874
|
-
function _b64UrlEncode(bytes) {
|
|
875
|
-
var s = _b64Encode(bytes);
|
|
876
|
-
return s.replace(/=+$/, '').replace(/\\+/g, '-').replace(/\\//g, '_');
|
|
877
|
-
}
|
|
878
|
-
function _b64Decode(str) {
|
|
879
|
-
var t = _b64DecTable();
|
|
880
|
-
var out = [];
|
|
881
|
-
var buf = 0, bits = 0;
|
|
882
|
-
for (var i = 0; i < str.length; i++) {
|
|
883
|
-
var c = str.charCodeAt(i);
|
|
884
|
-
if (c === 61) break;
|
|
885
|
-
var v = c < 256 ? t[c] : -1;
|
|
886
|
-
if (v < 0) continue;
|
|
887
|
-
buf = (buf << 6) | v;
|
|
888
|
-
bits += 6;
|
|
889
|
-
if (bits >= 8) {
|
|
890
|
-
bits -= 8;
|
|
891
|
-
out.push((buf >> bits) & 0xff);
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
return out;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
function Buffer(arg) {
|
|
898
|
-
if (typeof arg === 'number') {
|
|
899
|
-
this._data = new Uint8Array(arg);
|
|
900
|
-
} else if (arg instanceof ArrayBuffer) {
|
|
901
|
-
this._data = new Uint8Array(arg);
|
|
902
|
-
} else if (arg instanceof Uint8Array) {
|
|
903
|
-
this._data = new Uint8Array(arg);
|
|
904
|
-
} else if (Array.isArray(arg)) {
|
|
905
|
-
this._data = new Uint8Array(arg);
|
|
906
|
-
} else {
|
|
907
|
-
this._data = new Uint8Array(0);
|
|
908
|
-
}
|
|
909
|
-
this.length = this._data.length;
|
|
910
|
-
}
|
|
911
|
-
Buffer.from = function(data, encoding) {
|
|
912
|
-
if (typeof data === 'string') {
|
|
913
|
-
var enc = _normEnc(encoding);
|
|
914
|
-
if (enc === undefined) _badEnc(encoding);
|
|
915
|
-
if (enc === 'utf8') return new Buffer(_utf8Encode(data));
|
|
916
|
-
if (enc === 'utf16le') return new Buffer(_utf16leEncode(data));
|
|
917
|
-
if (enc === 'latin1') return new Buffer(_rawEncode(data));
|
|
918
|
-
if (enc === 'ascii') return new Buffer(_rawEncode(data));
|
|
919
|
-
if (enc === 'hex') return new Buffer(_hexDecode(data));
|
|
920
|
-
if (enc === 'base64' || enc === 'base64url') return new Buffer(_b64Decode(data));
|
|
921
|
-
}
|
|
922
|
-
if (data instanceof ArrayBuffer) {
|
|
923
|
-
var off = typeof encoding === 'number' ? encoding : 0;
|
|
924
|
-
var len = arguments.length > 2 ? arguments[2] : undefined;
|
|
925
|
-
var view = len === undefined ? new Uint8Array(data, off) : new Uint8Array(data, off, len);
|
|
926
|
-
var buf = Object.create(Buffer.prototype);
|
|
927
|
-
buf._data = view;
|
|
928
|
-
buf.length = view.length;
|
|
929
|
-
return buf;
|
|
930
|
-
}
|
|
931
|
-
if (data instanceof Uint8Array) return new Buffer(data);
|
|
932
|
-
if (Array.isArray(data)) return new Buffer(data);
|
|
933
|
-
if (data && data._data) return new Buffer(data._data.slice());
|
|
934
|
-
return new Buffer(0);
|
|
935
|
-
};
|
|
936
|
-
Buffer.alloc = function(size, fill) {
|
|
937
|
-
var buf = new Buffer(size);
|
|
938
|
-
if (fill !== undefined) {
|
|
939
|
-
var fillByte = typeof fill === 'number' ? fill : 0;
|
|
940
|
-
buf._data.fill(fillByte);
|
|
941
|
-
}
|
|
942
|
-
return buf;
|
|
943
|
-
};
|
|
944
|
-
Buffer.allocUnsafe = Buffer.alloc;
|
|
945
|
-
Buffer.isBuffer = function(obj) { return obj instanceof Buffer; };
|
|
946
|
-
Buffer.concat = function(list, totalLength) {
|
|
947
|
-
if (!totalLength) {
|
|
948
|
-
totalLength = 0;
|
|
949
|
-
for (var i = 0; i < list.length; i++) totalLength += list[i].length;
|
|
950
|
-
}
|
|
951
|
-
var result = new Uint8Array(totalLength);
|
|
952
|
-
var offset = 0;
|
|
953
|
-
for (var i = 0; i < list.length; i++) {
|
|
954
|
-
result.set(list[i]._data, offset);
|
|
955
|
-
offset += list[i].length;
|
|
956
|
-
}
|
|
957
|
-
return new Buffer(result);
|
|
958
|
-
};
|
|
959
|
-
Buffer.byteLength = function(value, encoding) {
|
|
960
|
-
if (typeof value !== 'string') {
|
|
961
|
-
if (value && value._data) return value._data.length;
|
|
962
|
-
if (value instanceof Uint8Array || value instanceof ArrayBuffer) {
|
|
963
|
-
return value.byteLength;
|
|
964
|
-
}
|
|
965
|
-
throw new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received type ' + typeof value + ' (' + value + ')');
|
|
966
|
-
}
|
|
967
|
-
var enc = _normEnc(encoding);
|
|
968
|
-
if (enc === undefined) _badEnc(encoding);
|
|
969
|
-
if (enc === 'utf8') return _utf8Encode(value).length;
|
|
970
|
-
if (enc === 'utf16le') return value.length * 2;
|
|
971
|
-
if (enc === 'latin1' || enc === 'ascii') return value.length;
|
|
972
|
-
if (enc === 'hex') return (value.length / 2) | 0;
|
|
973
|
-
if (enc === 'base64' || enc === 'base64url') {
|
|
974
|
-
var clean = value.replace(/[^A-Za-z0-9+/=_-]/g, '').replace(/=+$/, '');
|
|
975
|
-
return Math.floor(clean.length * 3 / 4);
|
|
976
|
-
}
|
|
977
|
-
};
|
|
978
|
-
Buffer.prototype.toString = function(encoding, start, end) {
|
|
979
|
-
var bytes = this._data;
|
|
980
|
-
if (start !== undefined || end !== undefined) {
|
|
981
|
-
var len = bytes.length;
|
|
982
|
-
var s = start === undefined ? 0 : (start < 0 ? 0 : (start > len ? len : start | 0));
|
|
983
|
-
var e = end === undefined ? len : (end < 0 ? 0 : (end > len ? len : end | 0));
|
|
984
|
-
bytes = e <= s ? bytes.subarray(0, 0) : bytes.subarray(s, e);
|
|
985
|
-
}
|
|
986
|
-
var enc = _normEnc(encoding);
|
|
987
|
-
if (enc === undefined) _badEnc(encoding);
|
|
988
|
-
if (enc === 'utf8') return _utf8Decode(bytes);
|
|
989
|
-
if (enc === 'utf16le') return _utf16leDecode(bytes);
|
|
990
|
-
if (enc === 'latin1') return _latin1Decode(bytes);
|
|
991
|
-
if (enc === 'ascii') return _asciiDecode(bytes);
|
|
992
|
-
if (enc === 'hex') return _hexEncode(bytes);
|
|
993
|
-
if (enc === 'base64') return _b64Encode(bytes);
|
|
994
|
-
if (enc === 'base64url') return _b64UrlEncode(bytes);
|
|
995
|
-
};
|
|
996
|
-
Buffer.prototype.toJSON = function() {
|
|
997
|
-
return { type: 'Buffer', data: Array.from(this._data) };
|
|
998
|
-
};
|
|
999
|
-
Buffer.prototype.slice = function(start, end) {
|
|
1000
|
-
return new Buffer(this._data.slice(start, end));
|
|
1001
|
-
};
|
|
1002
|
-
Buffer.prototype.copy = function(target, targetStart, sourceStart, sourceEnd) {
|
|
1003
|
-
targetStart = targetStart || 0;
|
|
1004
|
-
sourceStart = sourceStart || 0;
|
|
1005
|
-
sourceEnd = sourceEnd || this.length;
|
|
1006
|
-
var sub = this._data.subarray(sourceStart, sourceEnd);
|
|
1007
|
-
target._data.set(sub, targetStart);
|
|
1008
|
-
return sub.length;
|
|
1009
|
-
};
|
|
1010
|
-
Buffer.prototype.write = function(str, offset, length, encoding) {
|
|
1011
|
-
if (typeof offset === 'string') { encoding = offset; offset = 0; length = undefined; }
|
|
1012
|
-
else if (typeof length === 'string') { encoding = length; length = undefined; }
|
|
1013
|
-
offset = offset | 0;
|
|
1014
|
-
if (offset < 0 || offset > this._data.length) {
|
|
1015
|
-
throw new RangeError('The value of "offset" is out of range. It must be >= 0 && <= ' + this._data.length + '. Received ' + offset);
|
|
1016
|
-
}
|
|
1017
|
-
var enc = _normEnc(encoding);
|
|
1018
|
-
if (enc === undefined) _badEnc(encoding);
|
|
1019
|
-
var bytes;
|
|
1020
|
-
if (enc === 'utf8') bytes = _utf8Encode(str);
|
|
1021
|
-
else if (enc === 'utf16le') bytes = _utf16leEncode(str);
|
|
1022
|
-
else if (enc === 'latin1') bytes = _rawEncode(str);
|
|
1023
|
-
else if (enc === 'ascii') bytes = _rawEncode(str);
|
|
1024
|
-
else if (enc === 'hex') bytes = _hexDecode(str);
|
|
1025
|
-
else bytes = _b64Decode(str);
|
|
1026
|
-
var max = this._data.length - offset;
|
|
1027
|
-
if (length !== undefined) {
|
|
1028
|
-
length = length | 0;
|
|
1029
|
-
if (length < 0 || length > this._data.length) {
|
|
1030
|
-
throw new RangeError('The value of "length" is out of range. It must be >= 0 && <= ' + this._data.length + '. Received ' + length);
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
var write = Math.min(length === undefined ? max : length, bytes.length, max);
|
|
1034
|
-
for (var i = 0; i < write; i++) this._data[offset + i] = bytes[i];
|
|
1035
|
-
return write;
|
|
1036
|
-
};
|
|
1037
|
-
Buffer.prototype.fill = function(val, offset, end) {
|
|
1038
|
-
this._data.fill(typeof val === 'number' ? val : 0, offset, end);
|
|
1039
|
-
return this;
|
|
1040
|
-
};
|
|
1041
|
-
Buffer.prototype.equals = function(other) {
|
|
1042
|
-
if (this.length !== other.length) return false;
|
|
1043
|
-
for (var i = 0; i < this.length; i++) {
|
|
1044
|
-
if (this._data[i] !== other._data[i]) return false;
|
|
1045
|
-
}
|
|
1046
|
-
return true;
|
|
1047
|
-
};
|
|
1048
|
-
Buffer.prototype.readUInt8 = function(offset) { return this._data[offset]; };
|
|
1049
|
-
Buffer.prototype.writeUInt8 = function(value, offset) { this._data[offset] = value; return offset + 1; };
|
|
1050
|
-
globalThis[Symbol.for('jb:buffer')] = { Buffer: Buffer };
|
|
1051
|
-
globalThis.Buffer = Buffer;
|
|
1052
|
-
`,we=`
|
|
1053
|
-
var _EE = globalThis[Symbol.for('jb:events')].EventEmitter;
|
|
1054
|
-
|
|
1055
|
-
function Stream() { _EE.call(this); }
|
|
1056
|
-
Stream.prototype = Object.create(_EE.prototype);
|
|
1057
|
-
Stream.prototype.constructor = Stream;
|
|
1058
|
-
Stream.prototype.pipe = function(dest) {
|
|
1059
|
-
this.on('data', function(chunk) { dest.write(chunk); });
|
|
1060
|
-
this.on('end', function() { if (dest.end) dest.end(); });
|
|
1061
|
-
return dest;
|
|
1062
|
-
};
|
|
1063
|
-
|
|
1064
|
-
function Readable(opts) {
|
|
1065
|
-
Stream.call(this);
|
|
1066
|
-
this.readable = true;
|
|
1067
|
-
this._readableState = { ended: false, buffer: [] };
|
|
1068
|
-
}
|
|
1069
|
-
Readable.prototype = Object.create(Stream.prototype);
|
|
1070
|
-
Readable.prototype.constructor = Readable;
|
|
1071
|
-
Readable.prototype.read = function() { return null; };
|
|
1072
|
-
Readable.prototype.push = function(chunk) {
|
|
1073
|
-
if (chunk === null) { this._readableState.ended = true; this.emit('end'); return false; }
|
|
1074
|
-
this.emit('data', chunk);
|
|
1075
|
-
return true;
|
|
1076
|
-
};
|
|
1077
|
-
Readable.prototype.destroy = function() { this.emit('close'); return this; };
|
|
1078
|
-
|
|
1079
|
-
function Writable(opts) {
|
|
1080
|
-
Stream.call(this);
|
|
1081
|
-
this.writable = true;
|
|
1082
|
-
this._writableState = { ended: false };
|
|
1083
|
-
}
|
|
1084
|
-
Writable.prototype = Object.create(Stream.prototype);
|
|
1085
|
-
Writable.prototype.constructor = Writable;
|
|
1086
|
-
Writable.prototype.write = function(chunk) { return true; };
|
|
1087
|
-
Writable.prototype.end = function(chunk) {
|
|
1088
|
-
if (chunk) this.write(chunk);
|
|
1089
|
-
this._writableState.ended = true;
|
|
1090
|
-
this.emit('finish');
|
|
1091
|
-
return this;
|
|
1092
|
-
};
|
|
1093
|
-
Writable.prototype.destroy = function() { this.emit('close'); return this; };
|
|
1094
|
-
|
|
1095
|
-
function Duplex(opts) {
|
|
1096
|
-
Readable.call(this, opts);
|
|
1097
|
-
Writable.call(this, opts);
|
|
1098
|
-
}
|
|
1099
|
-
Duplex.prototype = Object.create(Readable.prototype);
|
|
1100
|
-
var _wKeys = Object.keys(Writable.prototype);
|
|
1101
|
-
for (var _wi = 0; _wi < _wKeys.length; _wi++) {
|
|
1102
|
-
if (!Duplex.prototype[_wKeys[_wi]]) Duplex.prototype[_wKeys[_wi]] = Writable.prototype[_wKeys[_wi]];
|
|
1103
|
-
}
|
|
1104
|
-
Duplex.prototype.constructor = Duplex;
|
|
1105
|
-
|
|
1106
|
-
function Transform(opts) { Duplex.call(this, opts); }
|
|
1107
|
-
Transform.prototype = Object.create(Duplex.prototype);
|
|
1108
|
-
Transform.prototype.constructor = Transform;
|
|
1109
|
-
Transform.prototype._transform = function(chunk, encoding, cb) { if (cb) cb(null, chunk); };
|
|
1110
|
-
|
|
1111
|
-
function PassThrough(opts) { Transform.call(this, opts); }
|
|
1112
|
-
PassThrough.prototype = Object.create(Transform.prototype);
|
|
1113
|
-
PassThrough.prototype.constructor = PassThrough;
|
|
1114
|
-
|
|
1115
|
-
function pipeline() {
|
|
1116
|
-
var streams = Array.prototype.slice.call(arguments);
|
|
1117
|
-
var cb = typeof streams[streams.length - 1] === 'function' ? streams.pop() : null;
|
|
1118
|
-
for (var i = 0; i < streams.length - 1; i++) streams[i].pipe(streams[i + 1]);
|
|
1119
|
-
if (cb) {
|
|
1120
|
-
var last = streams[streams.length - 1];
|
|
1121
|
-
last.on('finish', function() { cb(null); });
|
|
1122
|
-
last.on('error', function(e) { cb(e); });
|
|
1123
|
-
}
|
|
1124
|
-
return streams[streams.length - 1];
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
globalThis[Symbol.for('jb:stream')] = {
|
|
1128
|
-
Stream: Stream, Readable: Readable, Writable: Writable,
|
|
1129
|
-
Duplex: Duplex, Transform: Transform, PassThrough: PassThrough,
|
|
1130
|
-
pipeline: pipeline
|
|
1131
|
-
};
|
|
1132
|
-
`,Re=`
|
|
1133
|
-
function StringDecoder(encoding) {
|
|
1134
|
-
this.encoding = (encoding || 'utf-8').toLowerCase();
|
|
1135
|
-
if (this.encoding === 'utf8') this.encoding = 'utf-8';
|
|
1136
|
-
}
|
|
1137
|
-
StringDecoder.prototype.write = function(buf) {
|
|
1138
|
-
if (typeof buf === 'string') return buf;
|
|
1139
|
-
var data = buf instanceof Uint8Array ? buf : (buf && buf._data ? buf._data : new Uint8Array(0));
|
|
1140
|
-
return _utf8Decode(data);
|
|
1141
|
-
};
|
|
1142
|
-
StringDecoder.prototype.end = function(buf) {
|
|
1143
|
-
if (buf) return this.write(buf);
|
|
1144
|
-
return '';
|
|
1145
|
-
};
|
|
1146
|
-
globalThis[Symbol.for('jb:string_decoder')] = { StringDecoder: StringDecoder };
|
|
1147
|
-
`,je=`
|
|
1148
|
-
var _qs = {
|
|
1149
|
-
parse: function(str, sep, eq) {
|
|
1150
|
-
sep = sep || '&'; eq = eq || '=';
|
|
1151
|
-
var result = Object.create(null);
|
|
1152
|
-
if (!str || typeof str !== 'string') return result;
|
|
1153
|
-
var pairs = str.split(sep);
|
|
1154
|
-
for (var i = 0; i < pairs.length; i++) {
|
|
1155
|
-
var idx = pairs[i].indexOf(eq);
|
|
1156
|
-
var key, val;
|
|
1157
|
-
if (idx >= 0) {
|
|
1158
|
-
key = decodeURIComponent(pairs[i].slice(0, idx).replace(/\\+/g, ' '));
|
|
1159
|
-
val = decodeURIComponent(pairs[i].slice(idx + 1).replace(/\\+/g, ' '));
|
|
1160
|
-
} else {
|
|
1161
|
-
key = decodeURIComponent(pairs[i].replace(/\\+/g, ' '));
|
|
1162
|
-
val = '';
|
|
1163
|
-
}
|
|
1164
|
-
if (result[key] !== undefined) {
|
|
1165
|
-
if (Array.isArray(result[key])) result[key].push(val);
|
|
1166
|
-
else result[key] = [result[key], val];
|
|
1167
|
-
} else {
|
|
1168
|
-
result[key] = val;
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
return result;
|
|
1172
|
-
},
|
|
1173
|
-
stringify: function(obj, sep, eq) {
|
|
1174
|
-
sep = sep || '&'; eq = eq || '=';
|
|
1175
|
-
var pairs = [];
|
|
1176
|
-
var keys = Object.keys(obj);
|
|
1177
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1178
|
-
var key = keys[i];
|
|
1179
|
-
var val = obj[key];
|
|
1180
|
-
if (Array.isArray(val)) {
|
|
1181
|
-
for (var j = 0; j < val.length; j++) {
|
|
1182
|
-
pairs.push(encodeURIComponent(key) + eq + encodeURIComponent(val[j]));
|
|
1183
|
-
}
|
|
1184
|
-
} else {
|
|
1185
|
-
pairs.push(encodeURIComponent(key) + eq + encodeURIComponent(val));
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
return pairs.join(sep);
|
|
1189
|
-
},
|
|
1190
|
-
escape: function(str) { return encodeURIComponent(str); },
|
|
1191
|
-
unescape: function(str) { return decodeURIComponent(str); }
|
|
1192
|
-
};
|
|
1193
|
-
_qs.decode = _qs.parse;
|
|
1194
|
-
_qs.encode = _qs.stringify;
|
|
1195
|
-
globalThis[Symbol.for('jb:querystring')] = _qs;
|
|
1196
|
-
`,M=Object.assign(Object.create(null),{http:"Use fetch() for HTTP requests.",https:"Use fetch() for HTTP requests.",http2:"Use fetch() for HTTP requests.",net:"Network socket APIs are not supported.",tls:"Network socket APIs are not supported.",dgram:"Network socket APIs are not supported.",dns:"DNS APIs are not supported.",cluster:"Cluster APIs are not supported.",worker_threads:"Worker thread APIs are not supported.",vm:"VM APIs are not supported.",v8:"V8 APIs are not supported.",inspector:"Inspector APIs are not supported.",readline:"Readline APIs are not supported.",repl:"REPL APIs are not supported.",module:"Module APIs are not supported.",perf_hooks:"Performance hooks are not supported.",async_hooks:"Async hooks are not supported.",diagnostics_channel:"Diagnostics channel is not supported.",trace_events:"Trace events are not supported.",crypto:"Crypto APIs are not available in this sandbox.",zlib:"Compression APIs are not supported.",tty:"TTY APIs are not supported.",domain:"Domain APIs are not supported."});var Ae=`
|
|
1197
|
-
(function() {
|
|
1198
|
-
var sep = '/';
|
|
1199
|
-
var delimiter = ':';
|
|
1200
|
-
|
|
1201
|
-
function normalize(p) {
|
|
1202
|
-
if (p === '') return '.';
|
|
1203
|
-
var isAbs = p.charCodeAt(0) === 47;
|
|
1204
|
-
var trailingSlash = p.charCodeAt(p.length - 1) === 47;
|
|
1205
|
-
var parts = p.split('/');
|
|
1206
|
-
var out = [];
|
|
1207
|
-
for (var i = 0; i < parts.length; i++) {
|
|
1208
|
-
var seg = parts[i];
|
|
1209
|
-
if (seg === '' || seg === '.') continue;
|
|
1210
|
-
if (seg === '..') {
|
|
1211
|
-
if (out.length > 0 && out[out.length - 1] !== '..') out.pop();
|
|
1212
|
-
else if (!isAbs) out.push('..');
|
|
1213
|
-
} else {
|
|
1214
|
-
out.push(seg);
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
var result = out.join('/');
|
|
1218
|
-
if (isAbs) result = '/' + result;
|
|
1219
|
-
if (trailingSlash && result[result.length - 1] !== '/') result += '/';
|
|
1220
|
-
return result || (isAbs ? '/' : '.');
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
function join() {
|
|
1224
|
-
var joined = '';
|
|
1225
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
1226
|
-
var arg = arguments[i];
|
|
1227
|
-
if (typeof arg !== 'string') throw new TypeError('Path must be a string');
|
|
1228
|
-
if (arg.length > 0) {
|
|
1229
|
-
if (joined.length > 0) joined += '/' + arg;
|
|
1230
|
-
else joined = arg;
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
if (joined.length === 0) return '.';
|
|
1234
|
-
return normalize(joined);
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
function resolve() {
|
|
1238
|
-
var resolved = '';
|
|
1239
|
-
var resolvedAbsolute = false;
|
|
1240
|
-
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
1241
|
-
var path = i >= 0 ? arguments[i] : globalThis.process.cwd();
|
|
1242
|
-
if (typeof path !== 'string') throw new TypeError('Path must be a string');
|
|
1243
|
-
if (path.length === 0) continue;
|
|
1244
|
-
if (resolved.length > 0) resolved = path + '/' + resolved;
|
|
1245
|
-
else resolved = path;
|
|
1246
|
-
resolvedAbsolute = path.charCodeAt(0) === 47;
|
|
1247
|
-
}
|
|
1248
|
-
resolved = normalize(resolved);
|
|
1249
|
-
if (resolvedAbsolute) return '/' + resolved.replace(/^\\/+/, '');
|
|
1250
|
-
return resolved.length > 0 ? resolved : '.';
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
function isAbsolute(p) {
|
|
1254
|
-
return typeof p === 'string' && p.length > 0 && p.charCodeAt(0) === 47;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
function dirname(p) {
|
|
1258
|
-
if (p.length === 0) return '.';
|
|
1259
|
-
var hasRoot = p.charCodeAt(0) === 47;
|
|
1260
|
-
var end = -1;
|
|
1261
|
-
for (var i = p.length - 1; i >= 1; i--) {
|
|
1262
|
-
if (p.charCodeAt(i) === 47) { end = i; break; }
|
|
1263
|
-
}
|
|
1264
|
-
if (end === -1) return hasRoot ? '/' : '.';
|
|
1265
|
-
if (hasRoot && end === 0) return '/';
|
|
1266
|
-
return p.slice(0, end);
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
function basename(p, ext) {
|
|
1270
|
-
var start = 0;
|
|
1271
|
-
for (var i = p.length - 1; i >= 0; i--) {
|
|
1272
|
-
if (p.charCodeAt(i) === 47) { start = i + 1; break; }
|
|
1273
|
-
}
|
|
1274
|
-
var base = p.slice(start);
|
|
1275
|
-
if (ext && base.endsWith(ext)) {
|
|
1276
|
-
base = base.slice(0, base.length - ext.length);
|
|
1277
|
-
}
|
|
1278
|
-
return base;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
function extname(p) {
|
|
1282
|
-
var startDot = -1;
|
|
1283
|
-
var startPart = 0;
|
|
1284
|
-
for (var i = p.length - 1; i >= 0; i--) {
|
|
1285
|
-
var code = p.charCodeAt(i);
|
|
1286
|
-
if (code === 47) { startPart = i + 1; break; }
|
|
1287
|
-
if (code === 46 && startDot === -1) startDot = i;
|
|
1288
|
-
}
|
|
1289
|
-
if (startDot === -1 || startDot === startPart ||
|
|
1290
|
-
(startDot === startPart + 1 && p.charCodeAt(startPart) === 46)) {
|
|
1291
|
-
return '';
|
|
1292
|
-
}
|
|
1293
|
-
return p.slice(startDot);
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
function relative(from, to) {
|
|
1297
|
-
if (from === to) return '';
|
|
1298
|
-
from = resolve(from);
|
|
1299
|
-
to = resolve(to);
|
|
1300
|
-
if (from === to) return '';
|
|
1301
|
-
var fromParts = from.split('/').filter(Boolean);
|
|
1302
|
-
var toParts = to.split('/').filter(Boolean);
|
|
1303
|
-
var common = 0;
|
|
1304
|
-
var length = Math.min(fromParts.length, toParts.length);
|
|
1305
|
-
for (var i = 0; i < length; i++) {
|
|
1306
|
-
if (fromParts[i] !== toParts[i]) break;
|
|
1307
|
-
common++;
|
|
1308
|
-
}
|
|
1309
|
-
var ups = [];
|
|
1310
|
-
for (var i = common; i < fromParts.length; i++) ups.push('..');
|
|
1311
|
-
return ups.concat(toParts.slice(common)).join('/') || '.';
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
function parse(p) {
|
|
1315
|
-
var root = p.charCodeAt(0) === 47 ? '/' : '';
|
|
1316
|
-
var dir = dirname(p);
|
|
1317
|
-
var base = basename(p);
|
|
1318
|
-
var ext = extname(p);
|
|
1319
|
-
var name = ext ? base.slice(0, base.length - ext.length) : base;
|
|
1320
|
-
return { root: root, dir: dir, base: base, ext: ext, name: name };
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
function format(obj) {
|
|
1324
|
-
var dir = obj.dir || obj.root || '';
|
|
1325
|
-
var base = obj.base || ((obj.name || '') + (obj.ext || ''));
|
|
1326
|
-
if (!dir) return base;
|
|
1327
|
-
if (dir === obj.root) return dir + base;
|
|
1328
|
-
return dir + '/' + base;
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
var posix = { sep: sep, delimiter: delimiter, join: join, resolve: resolve, normalize: normalize, isAbsolute: isAbsolute, dirname: dirname, basename: basename, extname: extname, relative: relative, parse: parse, format: format };
|
|
1332
|
-
posix.posix = posix;
|
|
1333
|
-
|
|
1334
|
-
globalThis[Symbol.for('jb:path')] = posix;
|
|
1335
|
-
})();
|
|
1336
|
-
`;var I=new Ke,F=[],G=!1,tt=64*1024*1024,ke=8*1024*1024,x=2147483647,Oe=4096,rt=64*1024,nt=8*1024,Pe=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID().replaceAll("-",""):`${Date.now().toString(36)}_${Math.random().toString(36).slice(2)}`,st=()=>`__jbHost_${Pe()}`,N=class extends Error{},it=Ee.replace("Buffer.prototype.toString = function(encoding, start, end) {","Object.defineProperty(Buffer.prototype, 'toString', { configurable: true, writable: true, value: function(encoding, start, end) {").replace(`};
|
|
1337
|
-
Buffer.prototype.toJSON = function() {`,`}});
|
|
1338
|
-
Buffer.prototype.toJSON = function() {`),ot=be.replace("URLSearchParams.prototype.toString = function() {","Object.defineProperty(URLSearchParams.prototype, 'toString', { configurable: true, writable: true, value: function() {").replace(` };
|
|
1339
|
-
|
|
1340
|
-
URLSearchParams.prototype.forEach`,` }});
|
|
1341
|
-
|
|
1342
|
-
URLSearchParams.prototype.forEach`).replace("URL.prototype.toString = function() { return this.href; };","Object.defineProperty(URL.prototype, 'toString', { configurable: true, writable: true, value: function() { return this.href; } });"),Be=Object.assign(Object.create(null),{assert:["ok","equal","notEqual","strictEqual","notStrictEqual","deepEqual","deepStrictEqual","notDeepEqual","throws","doesNotThrow","fail"],buffer:["Buffer"],child_process:["exec","execSync","spawnSync"],console:["log","error","warn"],events:["EventEmitter"],fs:["readFile","readFileSync","readFileBuffer","writeFile","writeFileSync","stat","statSync","lstat","lstatSync","readdir","readdirSync","mkdir","mkdirSync","rm","rmSync","exists","existsSync","appendFile","appendFileSync","symlink","symlinkSync","readlink","readlinkSync","chmod","chmodSync","realpath","realpathSync","rename","renameSync","copyFile","copyFileSync","unlink","unlinkSync","rmdir","rmdirSync","promises"],os:["platform","arch","homedir","tmpdir","type","hostname","EOL","cpus","totalmem","freemem","endianness"],path:["join","resolve","normalize","isAbsolute","dirname","basename","extname","relative","parse","format","sep","delimiter","posix"],process:["argv","cwd","exit","env","platform","arch","versions","version"],querystring:["parse","stringify","escape","unescape","decode","encode"],stream:["Stream","Readable","Writable","Duplex","Transform","PassThrough","pipeline"],string_decoder:["StringDecoder"],url:["URL","URLSearchParams","parse","format"],util:["format","inspect","promisify","types","inherits"]}),at=r=>r==="fs"||r==="process"||r==="console"?`globalThis.${r}`:r==="child_process"?"globalThis[Symbol.for('jb:child_process')]":`globalThis[Symbol.for('jb:${r}')]`,ut=r=>{let e=Be[r];if(e===void 0){let n=M[r];if(n!==void 0)return`throw new Error(${JSON.stringify(`Module '${r}' is not available in the js-exec sandbox. ${n} Run 'js-exec --help' for available modules.`)});`;throw new Error(`Cannot find module '${r}'.`)}return[`const value = ${at(r)};`,...e.map(n=>n==="default"?"":`export const ${n} = value.${n};`),"export default value;"].join(`
|
|
1343
|
-
`)},lt=(r,e)=>{let s=(e.startsWith("/")?e:`${r}/${e}`).split("/"),n=[];for(let o of s)!o||o==="."||(o===".."?n.pop():n.push(o));return`/${n.join("/")}`},T=(r,e)=>{if(e<=0)return"";let s=h.from(r);if(s.byteLength<=e)return r;let n=e;for(;n>0&&(s[n]&192)===128;)n--;return s.subarray(0,n).toString("utf8")},Te=r=>{if(r.length===0)return;let e=0;for(let s=0;s<r.length;s++){let n=r.charCodeAt(s)-48;if(n<0||n>9||(e=e*10+n,!Number.isSafeInteger(e)))return}return e},Ce=r=>{let e=r.lastIndexOf(":");if(e<=0)return;let s=r.lastIndexOf(":",e-1);if(s<=0)return;let n=Te(r.slice(s+1,e)),o=Te(r.slice(e+1)),a=r.slice(0,s);if(!(n===void 0||o===void 0||a.length===0))return{column:o,file:a,line:n}},V=r=>{for(let e of r.slice(0,rt).split(`
|
|
1344
|
-
`)){if(e.length>nt)continue;let s=e.trimStart();if(!s.startsWith("at "))continue;let n=s.slice(3);if(n.endsWith(")")){let a=n.lastIndexOf(" (");if(a>0){let u=Ce(n.slice(a+2,-1));if(u!==void 0)return{...u,functionName:n.slice(0,a)}}}let o=Ce(n);if(o!==void 0)return o}},ft=(r,e)=>{let s=2;for(let n=0;n<r.length;n++){let o=r.charCodeAt(n);if(o===34||o===92)s+=2;else if(o===8||o===9||o===10||o===12||o===13)s+=2;else if(o<32)s+=6;else if(o<128)s+=1;else if(o<2048)s+=2;else if(o>=55296&&o<=56319){let a=r.charCodeAt(n+1);a>=56320&&a<=57343?(s+=4,n+=1):s+=6}else o>=56320&&o<=57343?s+=6:s+=3;if(s>e)return e+1}return s},ct=(r,e,s,n)=>{let o=2,a=c=>(o+=ft(c,Math.max(0,n-o)),o<=n),u=!0;for(let[c,y]of Object.entries(r))if(u||(o+=1),u=!1,!a(c)||(o+=1,!a(y)))return n+1;o+=2,u=!0;for(let c of e)if(u||(o+=1),u=!1,!a(c))return n+1;return a(s)?o:n+1},dt=(r,e,s)=>{let n=g(O(r));if(/^[A-Za-z_$][\w$]* is not defined$/u.test(n)&&(n=`'${n.slice(0,n.indexOf(" "))}'${n.slice(n.indexOf(" "))}`),r instanceof Error&&r.name==="SyntaxError"&&n==="Unexpected token '}'"&&(n="expecting ')'"),!(r instanceof Error)||r.stack===void 0)return n;let o=V(r.stack);if(o===void 0)return n;let{column:a,file:u,functionName:c,line:y}=o;return(u==="run.js"||u==="<entry>")&&(u=e.scriptPath,y=Math.max(1,y-s),e.isModule||(c=e.scriptPath==="-c"?"<eval>":void 0)),r.name==="Error"?a+=5:r.name==="TypeError"&&(a+=1),`${c===void 0?`at ${u}:${y}:${a}`:`at ${c} (${u}:${y}:${a})`}: ${n}`},pt=(r,e,s,n,o)=>`
|
|
1345
|
-
(function() {
|
|
1346
|
-
var host = globalThis[${JSON.stringify(o)}];
|
|
1347
|
-
function unwrap(result) {
|
|
1348
|
-
if (!result || result.ok !== true) throw new Error(result && result.error || 'Host operation failed');
|
|
1349
|
-
return result.value;
|
|
1350
|
-
}
|
|
1351
|
-
function bytes(value) {
|
|
1352
|
-
if (value && value._data instanceof Uint8Array) return Array.from(value._data);
|
|
1353
|
-
if (value && Array.isArray(value._data)) return value._data.slice();
|
|
1354
|
-
if (Array.isArray(value)) return value.slice();
|
|
1355
|
-
if (value instanceof Uint8Array) return Array.from(value);
|
|
1356
|
-
return String(value);
|
|
1357
|
-
}
|
|
1358
|
-
function format(value) {
|
|
1359
|
-
if (typeof Buffer === 'function' && value instanceof Buffer) return value.toString();
|
|
1360
|
-
if (typeof value === 'string') return value;
|
|
1361
|
-
if (value === undefined) return 'undefined';
|
|
1362
|
-
try { return JSON.stringify(value); } catch (_) { return String(value); }
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
globalThis.env = ${r};
|
|
1366
|
-
globalThis.process = {
|
|
1367
|
-
argv: ${e},
|
|
1368
|
-
cwd: function() { return ${s}; },
|
|
1369
|
-
env: globalThis.env,
|
|
1370
|
-
platform: 'linux',
|
|
1371
|
-
arch: 'x64',
|
|
1372
|
-
versions: { node: '22.0.0', quickjs: '2025' },
|
|
1373
|
-
version: 'v22.0.0',
|
|
1374
|
-
exit: function(code) { return host.exit(Number(code) || 0); }
|
|
1375
|
-
};
|
|
1376
|
-
|
|
1377
|
-
${it}
|
|
1378
|
-
var fs = {
|
|
1379
|
-
readFileBuffer: function(path) {
|
|
1380
|
-
var data = Buffer.from(unwrap(host.fsRead(path)), 'base64')._data;
|
|
1381
|
-
return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
|
|
1382
|
-
},
|
|
1383
|
-
readFileSync: function(path, opts) {
|
|
1384
|
-
var buffer = Buffer.from(unwrap(host.fsRead(path)), 'base64');
|
|
1385
|
-
var encoding = typeof opts === 'string' ? opts : opts && opts.encoding;
|
|
1386
|
-
return encoding ? buffer.toString(encoding) : buffer;
|
|
1387
|
-
},
|
|
1388
|
-
writeFileSync: function(path, data) { unwrap(host.fsWrite(path, bytes(data))); },
|
|
1389
|
-
appendFileSync: function(path, data) { unwrap(host.fsAppend(path, bytes(data))); },
|
|
1390
|
-
statSync: function(path) { return unwrap(host.fsStat(path, false)); },
|
|
1391
|
-
lstatSync: function(path) { return unwrap(host.fsStat(path, true)); },
|
|
1392
|
-
readdirSync: function(path) { return unwrap(host.fsReaddir(path)); },
|
|
1393
|
-
mkdirSync: function(path, opts) { unwrap(host.fsMkdir(path, Boolean(opts && opts.recursive))); },
|
|
1394
|
-
rmSync: function(path, opts) { unwrap(host.fsRm(path, Boolean(opts && opts.recursive), Boolean(opts && opts.force))); },
|
|
1395
|
-
existsSync: function(path) { return unwrap(host.fsExists(path)); },
|
|
1396
|
-
symlinkSync: function(target, path) { unwrap(host.fsSymlink(target, path)); },
|
|
1397
|
-
readlinkSync: function(path) { return unwrap(host.fsReadlink(path)); },
|
|
1398
|
-
chmodSync: function(path, mode) { unwrap(host.fsChmod(path, Number(mode))); },
|
|
1399
|
-
realpathSync: function(path) { return unwrap(host.fsRealpath(path)); },
|
|
1400
|
-
renameSync: function(from, to) { unwrap(host.fsRename(from, to)); },
|
|
1401
|
-
copyFileSync: function(from, to) { unwrap(host.fsCopy(from, to)); }
|
|
1402
|
-
};
|
|
1403
|
-
fs.unlinkSync = fs.rmSync;
|
|
1404
|
-
fs.rmdirSync = fs.rmSync;
|
|
1405
|
-
function callbackUnsupported(name) {
|
|
1406
|
-
return function() { throw new Error('fs.' + name + '() with callbacks is not supported. Use fs.' + name + 'Sync() or fs.promises.' + name + '() instead.'); };
|
|
1407
|
-
}
|
|
1408
|
-
var names = ['readFile','writeFile','appendFile','stat','lstat','readdir','mkdir','rm','symlink','readlink','chmod','realpath','rename','copyFile'];
|
|
1409
|
-
for (var i = 0; i < names.length; i++) fs[names[i]] = callbackUnsupported(names[i]);
|
|
1410
|
-
fs.exists = callbackUnsupported('exists');
|
|
1411
|
-
fs.unlink = callbackUnsupported('unlink');
|
|
1412
|
-
fs.rmdir = callbackUnsupported('rmdir');
|
|
1413
|
-
fs.promises = {};
|
|
1414
|
-
for (var i = 0; i < names.length; i++) (function(name) {
|
|
1415
|
-
var sync = fs[name + 'Sync'];
|
|
1416
|
-
fs.promises[name] = function() {
|
|
1417
|
-
try { return Promise.resolve(sync.apply(fs, arguments)); }
|
|
1418
|
-
catch (error) { return Promise.reject(error); }
|
|
1419
|
-
};
|
|
1420
|
-
})(names[i]);
|
|
1421
|
-
fs.promises.unlink = fs.promises.rm;
|
|
1422
|
-
fs.promises.rmdir = fs.promises.rm;
|
|
1423
|
-
fs.promises.access = function(path) { return fs.existsSync(path) ? Promise.resolve() : Promise.reject(new Error('ENOENT: no such file or directory: ' + path)); };
|
|
1424
|
-
globalThis.fs = fs;
|
|
1425
|
-
|
|
1426
|
-
${Ae}
|
|
1427
|
-
${ge}
|
|
1428
|
-
${ve}
|
|
1429
|
-
${_e}
|
|
1430
|
-
${xe}
|
|
1431
|
-
${we}
|
|
1432
|
-
${Re}
|
|
1433
|
-
${je}
|
|
1434
|
-
|
|
1435
|
-
var nativeFetch = function(url, opts) { return unwrap(host.fetch(String(url), opts)); };
|
|
1436
|
-
globalThis[Symbol.for('jb:fetch')] = nativeFetch;
|
|
1437
|
-
${ot}
|
|
1438
|
-
${Se}
|
|
1439
|
-
|
|
1440
|
-
var childProcess = {
|
|
1441
|
-
exec: function(command, opts) { return unwrap(host.exec(String(command), opts && opts.stdin)); },
|
|
1442
|
-
execSync: function(command, opts) {
|
|
1443
|
-
var result = unwrap(host.exec(String(command), opts && opts.stdin));
|
|
1444
|
-
if (result.exitCode !== 0) {
|
|
1445
|
-
var error = new Error('Command failed: ' + command);
|
|
1446
|
-
error.status = result.exitCode; error.stdout = result.stdout; error.stderr = result.stderr;
|
|
1447
|
-
throw error;
|
|
1448
|
-
}
|
|
1449
|
-
return result.stdout;
|
|
1450
|
-
},
|
|
1451
|
-
spawnSync: function(command, args) {
|
|
1452
|
-
var result = unwrap(host.execArgs(String(command), args || []));
|
|
1453
|
-
return { stdout: result.stdout, stderr: result.stderr, status: result.exitCode };
|
|
1454
|
-
}
|
|
1455
|
-
};
|
|
1456
|
-
globalThis[Symbol.for('jb:child_process')] = childProcess;
|
|
1457
|
-
|
|
1458
|
-
var modules = Object.create(null);
|
|
1459
|
-
modules.fs = fs;
|
|
1460
|
-
modules.path = globalThis[Symbol.for('jb:path')];
|
|
1461
|
-
modules.child_process = childProcess;
|
|
1462
|
-
modules.process = globalThis.process;
|
|
1463
|
-
modules.console = globalThis.console;
|
|
1464
|
-
modules.os = globalThis[Symbol.for('jb:os')];
|
|
1465
|
-
modules.url = globalThis[Symbol.for('jb:url')];
|
|
1466
|
-
modules.assert = globalThis[Symbol.for('jb:assert')];
|
|
1467
|
-
modules.util = globalThis[Symbol.for('jb:util')];
|
|
1468
|
-
modules.events = globalThis[Symbol.for('jb:events')];
|
|
1469
|
-
modules.buffer = globalThis[Symbol.for('jb:buffer')];
|
|
1470
|
-
modules.stream = globalThis[Symbol.for('jb:stream')];
|
|
1471
|
-
modules.string_decoder = globalThis[Symbol.for('jb:string_decoder')];
|
|
1472
|
-
modules.querystring = globalThis[Symbol.for('jb:querystring')];
|
|
1473
|
-
var unsupported = ${JSON.stringify(M)};
|
|
1474
|
-
globalThis.require = function(name) {
|
|
1475
|
-
name = String(name); if (name.startsWith('node:')) name = name.slice(5);
|
|
1476
|
-
if (Object.prototype.hasOwnProperty.call(modules, name)) return modules[name];
|
|
1477
|
-
if (Object.prototype.hasOwnProperty.call(unsupported, name)) throw new Error("Module '" + name + "' is not available in the js-exec sandbox. " + unsupported[name] + " Run 'js-exec --help' for available modules.");
|
|
1478
|
-
throw new Error("Cannot find module '" + name + "'. Run 'js-exec --help' for available modules.");
|
|
1479
|
-
};
|
|
1480
|
-
globalThis.require.resolve = function(name) { return name; };
|
|
1481
|
-
|
|
1482
|
-
console.log = function() { unwrap(host.stdout(Array.prototype.map.call(arguments, format).join(' ') + '\\n')); };
|
|
1483
|
-
console.info = console.log;
|
|
1484
|
-
console.debug = console.log;
|
|
1485
|
-
console.error = function() { unwrap(host.stderr(Array.prototype.map.call(arguments, format).join(' ') + '\\n')); };
|
|
1486
|
-
console.warn = console.error;
|
|
1487
|
-
|
|
1488
|
-
${n?`globalThis.tools = (function makeProxy(path) {
|
|
1489
|
-
return new Proxy(function(){}, {
|
|
1490
|
-
get: function(_target, property) {
|
|
1491
|
-
if (property === 'then' || typeof property === 'symbol') return undefined;
|
|
1492
|
-
return makeProxy(path.concat([String(property)]));
|
|
1493
|
-
},
|
|
1494
|
-
apply: function(_target, _this, args) {
|
|
1495
|
-
var argsJson = args.length ? JSON.stringify(args[0]) : '';
|
|
1496
|
-
var value = unwrap(host.invokeTool(path.join('.'), argsJson || ''));
|
|
1497
|
-
return value ? JSON.parse(value) : undefined;
|
|
1498
|
-
}
|
|
1499
|
-
});
|
|
1500
|
-
})([]);`:""}
|
|
1501
|
-
})();
|
|
1502
|
-
`,Y=()=>{if(G)return;let r=F.shift();if(r!==void 0){if(r.canceled){Y();return}G=!0,r.start()}},ht=(r,e)=>{let s=_.bindCurrentContext(r);return new Promise((n,o)=>{let a={canceled:!1,start(){e?.removeEventListener("abort",u),(async()=>{try{n(await s())}catch(c){o(c)}finally{G=!1,Y()}})()}},u=()=>{let c=F.indexOf(a);c!==-1&&(F.splice(c,1),a.canceled=!0,e?.removeEventListener("abort",u),o(new N))};e?.addEventListener("abort",u,{once:!0}),F.push(a),e?.aborted?u():Y()})},mt=r=>({isDirectory:r.isDirectory,isFile:r.isFile,isSymbolicLink:r.isSymbolicLink,mode:r.mode,mtime:r.mtime.toISOString(),size:r.size}),Le=r=>({exitCode:r.exitCode,stderr:r.stderr,stdout:r.stdout}),yt=(r,e,s)=>({exitCode:e,stderr:s<=0?r:T(r,s),stdout:""});async function bt(r,e,s,n,o){let a=Math.min(e.limits.maxWorkerMessageBytes,ke),u=Math.max(0,Math.floor((a-Oe)*.75)),c=Math.max(0,Math.min(e.limits.maxWorkerMessageBytes,a-Oe,x)),y=st(),A=`just-bash:bootstrap:${Pe()}`,f={exitCode:0,limitExceeded:!1,stderr:"",stdout:""},b,$,K=r.bootstrapCode!==void 0&&r.bootstrapCode!=="",v=e.limits.maxOutputSize,U=0,Q=0,C=!1,X=!1,E=`JavaScript runtime exceeded the ${e.limits.maxJsBridgeRequests} bridge request limit.`,k=()=>Q>=e.limits.maxJsBridgeRequests?(C=!0,!1):(Q+=1,!0),w=t=>{if(v<=0){f.stderr+=t,U+=h.byteLength(t);return}let i=T(t,Math.max(0,v-U));f.stderr+=i,U+=h.byteLength(i)},Z=()=>{X||(X=!0,f.exitCode=1,w(`js-exec: ${E}
|
|
1503
|
-
`))},ee=(t,i)=>{if(b!==void 0)return{error:"process.exit() already requested",ok:!1};if(!k())return{error:E,ok:!1};if(typeof i!="string")return{error:"Output must be a string",ok:!1};let l=U+h.byteLength(i);return v>0&&l>v?(f.limitExceeded=!0,f.exitCode=1,{error:"Output size limit exceeded",ok:!1}):(f[t]+=i,U=l,{ok:!0,value:void 0})},p=t=>e.fs.resolvePath(e.cwd,t),d=async(t,i=g)=>{if(b!==void 0)return{error:"process.exit() already requested",ok:!1};if(!k())return{error:E,ok:!1};try{return{ok:!0,value:await _.runUntrustedAsync(t)}}catch(l){return{ok:!1,error:i(O(l))}}},te=t=>{if(typeof t=="string")return t;if(!Array.isArray(t)||t.length>a)throw new TypeError("File data must be a bounded byte array or string");for(let i of t)if(!Number.isInteger(i)||i<0||i>255)throw new TypeError("File data contains an invalid byte");return Uint8Array.from(t)},L=ye(e.env),re=[r.scriptPath,...r.scriptArgs],R=Math.min(e.limits.maxWorkerMessageBytes,x),P=h.byteLength(r.source),q=Math.max(0,R-P),Ie=ct(L,re,e.cwd,q);if(P>R||Ie>q)return f.exitCode=1,w(`js-exec: JavaScript runtime ${P>R?"source":"input"} exceeds the ${R} byte size limit.
|
|
1504
|
-
`),f;let ne=JSON.stringify(L),se=JSON.stringify(re),ie=JSON.stringify(e.cwd),H=h.byteLength(ne)+h.byteLength(se)+h.byteLength(ie);if(H>q)return f.exitCode=1,w(`js-exec: JavaScript runtime input exceeds the ${R} byte size limit.
|
|
1505
|
-
`),f;let Fe=_.runTrusted(()=>Qe({syncHostFunctions:{[y]:{bootstrapError(t){throw K?($??=g(typeof t=="string"?t:"Bootstrap failed"),new Error("Bootstrap failed.")):new Error("Bootstrap phase has ended.")},bootstrapDone(){K=!1},exit(t){throw k()?(b??=Number.isFinite(t)?Math.trunc(t):0,f.exitCode=b,new Error("Guest requested process exit.")):new Error(E)},fsRead:t=>d(async()=>{let i=p(t);if((await e.fs.stat(i)).size>u)throw new Error(`File exceeds JavaScript bridge read limit (${u} bytes)`);let m=await e.fs.readFileBuffer(i);if(m.byteLength>u)throw new Error(`File exceeds JavaScript bridge read limit (${u} bytes)`);return h.from(m).toString("base64")}),fsWrite:(t,i)=>d(async()=>await e.fs.writeFile(p(t),te(i))),fsAppend:(t,i)=>d(async()=>await e.fs.appendFile(p(t),te(i))),fsStat:(t,i)=>d(async()=>mt(await(i?e.fs.lstat(p(t)):e.fs.stat(p(t))))),fsReaddir:t=>d(async()=>await e.fs.readdir(p(t))),fsMkdir:(t,i)=>d(async()=>await e.fs.mkdir(p(t),{recursive:i})),fsRm:(t,i,l)=>d(async()=>await e.fs.rm(p(t),{force:l,recursive:i})),fsExists:t=>d(async()=>await e.fs.exists(p(t))),fsSymlink:(t,i)=>d(async()=>await e.fs.symlink(t,p(i))),fsReadlink:t=>d(async()=>await e.fs.readlink(p(t))),fsChmod:(t,i)=>d(async()=>await e.fs.chmod(p(t),i)),fsRealpath:t=>d(async()=>await e.fs.realpath(p(t))),fsRename:(t,i)=>d(async()=>await e.fs.mv(p(t),p(i))),fsCopy:(t,i)=>d(async()=>await e.fs.cp(p(t),p(i))),stdout:t=>ee("stdout",t),stderr:t=>ee("stderr",t),async fetch(t,i){return await d(async()=>{if(!e.fetch)throw new Error("Network access not configured. Enable network in Bash options.");let l=n===Number.POSITIVE_INFINITY?void 0:Math.max(0,n-Date.now()),m=await e.fetch(t,{method:i?.method,headers:i?.headers,body:i?.body,...l===void 0?{}:{timeoutMs:l},signal:D().abortSignal});return{body:h.from(m.body).toString("latin1"),headers:m.headers,status:m.status,statusText:m.statusText,url:m.url}})},async exec(t,i){return await d(async()=>{if(!e.exec)throw new Error("Command execution not available in this context.");let l={cwd:e.cwd,env:L,signal:D().abortSignal,stdin:i??""},m=await I.run(!0,()=>e.exec?.(t,l));return Le(m)})},async execArgs(t,i){return await d(async()=>{if(!e.exec)throw new Error("Command execution not available in this context.");let l=await I.run(!0,()=>e.exec?.(me([t]),{args:i.map(String),cwd:e.cwd,env:L,signal:D().abortSignal}));return Le(l)})},async invokeTool(t,i){return await d(async()=>{if(!e.invokeTool)throw new Error(`Unknown tool: ${t}`);let{abortSignal:l}=D();return await _.runTrustedAsync(()=>e.invokeTool?.(t,i,l))},B)}}}})),oe=pt(ne,se,ie,e.invokeTool!==void 0,y),J=r.bootstrapCode??"",ae=J===""?`globalThis[${JSON.stringify(y)}].bootstrapDone();
|
|
1506
|
-
`:`try {
|
|
1507
|
-
(function() {
|
|
1508
|
-
${J}
|
|
1509
|
-
})();
|
|
1510
|
-
} catch (__jbBootstrapError) {
|
|
1511
|
-
var __jbBootstrapMessage = 'Bootstrap failed';
|
|
1512
|
-
try {
|
|
1513
|
-
__jbBootstrapMessage = __jbBootstrapError && typeof __jbBootstrapError.message === 'string'
|
|
1514
|
-
? __jbBootstrapError.message
|
|
1515
|
-
: String(__jbBootstrapError);
|
|
1516
|
-
} catch (_) {}
|
|
1517
|
-
globalThis[${JSON.stringify(y)}].bootstrapError(__jbBootstrapMessage);
|
|
1518
|
-
} finally {
|
|
1519
|
-
globalThis[${JSON.stringify(y)}].bootstrapDone();
|
|
1520
|
-
}
|
|
1521
|
-
`,W=`${oe}
|
|
1522
|
-
${ae}`,Ne={identity:"just-bash-js-exec-v1",normalize(t,i){let l=t.startsWith("node:")?t.slice(5):t;if(b!==void 0)throw new Error("process.exit() already requested");if(t===A)return t;if(!k())throw new Error(E);if(Be[l]!==void 0||M[l]!==void 0)return`just-bash:builtin:${l}`;if(!t.startsWith(".")&&!t.startsWith("/"))return`just-bash:missing:${t}`;let m=i==="<entry>"||i.startsWith("just-bash:")?r.scriptPath:i,S=m.lastIndexOf("/"),j=S<0?e.cwd:S===0?"/":m.slice(0,S);return lt(j,t)},async load(t){if(b!==void 0)throw new Error("process.exit() already requested");if(t===A)return W;if(!k())throw new Error(E);if(t.startsWith("just-bash:builtin:"))return ut(t.slice(18));if(t.startsWith("just-bash:missing:")){let i=t.slice(18);return`throw new Error(${JSON.stringify(`Cannot find module '${i}': not found. Run 'js-exec --help' for available modules.`)});`}try{return await _.runUntrustedAsync(async()=>{if((await e.fs.stat(t)).size>c)throw new Error(`Module exceeds JavaScript source limit (${c} bytes)`);let l=await e.fs.readFile(t);if(h.byteLength(l)>c)throw new Error(`Module exceeds JavaScript source limit (${c} bytes)`);return l})}catch(i){return`throw new Error(${JSON.stringify(g(O(i)))});`}}},ue=r.isModule?`import ${JSON.stringify(A)};
|
|
1523
|
-
`:`${oe}
|
|
1524
|
-
${ae}`,le=`${ue}${r.source}`,fe=ue.split(`
|
|
1525
|
-
`).length-1,$e=h.byteLength(le),qe=P+(r.isModule?0:H),He=Math.max(0,$e-qe),Je=r.isModule?h.byteLength(W):0,We=Math.max(0,Je-H),ze=Math.min(x,R+Math.max(He,We)),Ge=Math.min(ke,Math.max(a,r.isModule?h.byteLength(JSON.stringify(W)):0)),Ve=n===Number.POSITIVE_INFINITY?x:Math.min(Math.max(1,n-Date.now()),x);try{await I.run(!0,async()=>{let t;_.runTrusted(()=>{t=Fe.run({abortSignal:s,limits:{maxBridgeRequests:Math.min(Math.max(1,e.limits.maxJsBridgeRequests+(r.isModule?4:2)),x),maxConsoleOutputBytes:1,maxHostFunctionArgumentsBytes:a,maxHostFunctionOutputBytes:Ge,maxResultBytes:Math.min(e.limits.maxWorkerMessageBytes,x),maxSourceBytes:ze,memoryLimitBytes:tt,timeoutMs:Ve},moduleLoader:Ne,source:le,sourceType:r.isModule?"module":"function-body"})}),await t})}catch(t){let i=O(t),l=t instanceof Error&&t.stack!==void 0?V(t.stack):void 0,m=J!==""&&l!==void 0&&(l.file===A||!r.isModule&&l.file==="run.js"&&l.line<=fe);if(b!==void 0)f.exitCode=b;else if(C||t instanceof Ze)C=!0,Z();else if($!==void 0||m)f.exitCode=1,w(`js-exec: bootstrap error: ${$??g(i)}
|
|
1526
|
-
`);else if(t instanceof Ue||t instanceof Xe)f.exitCode=124,w(`js-exec: ${t instanceof Ue||o.aborted?`Execution timeout: exceeded ${e.limits.maxJsTimeoutMs}ms limit`:"Execution aborted"}
|
|
1527
|
-
`);else{f.exitCode=1;let S=et.isInstance(t)&&t.code==="RUN_ERROR",j=S?dt(t,r,fe):B(i),Ye=S&&t instanceof Error&&t.stack?.includes("(<run-worker>)")===!0&&V(t.stack)===void 0;w(S?Ye?`${j}
|
|
1528
|
-
`:j===i?`js-exec: ${B(i)}
|
|
1529
|
-
`:`${j}
|
|
1530
|
-
`:`js-exec: ${j}
|
|
1531
|
-
`)}}if(C&&Z(),f.limitExceeded){f.exitCode=1;let t=T(`js-exec: total output size exceeded (>${v} bytes), increase executionLimits.maxOutputSize
|
|
1532
|
-
`,v),i=v-h.byteLength(t);f.stderr=T(f.stderr,i),i-=h.byteLength(f.stderr),f.stdout=T(f.stdout,i),f.stderr+=t}return{exitCode:f.exitCode,stderr:f.stderr,stdout:f.stdout}}async function Me(r,e){if(I.getStore())return{exitCode:1,stderr:`js-exec: recursive invocation is not supported
|
|
1533
|
-
`,stdout:""};let s=new AbortController,n=e.limits.maxJsTimeoutMs===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:Date.now()+e.limits.maxJsTimeoutMs,o=ce(()=>s.abort(),e.limits.maxJsTimeoutMs),a=pe(e.signal,s.signal);try{return await ht(async()=>await bt(r,e,a.signal,n,s.signal),a.signal)}catch(u){if(!(u instanceof N))throw u;let c=s.signal.aborted;return yt(`js-exec: ${c?`Execution timeout: exceeded ${e.limits.maxJsTimeoutMs}ms limit`:"Execution aborted"}
|
|
1534
|
-
`,124,e.limits.maxOutputSize)}finally{a.cleanup(),de(o)}}var De=`js-exec - Sandboxed JavaScript/TypeScript runtime with Node.js-compatible APIs
|
|
1535
|
-
|
|
1536
|
-
Usage: js-exec [OPTIONS] [-c CODE | FILE] [ARGS...]
|
|
1537
|
-
|
|
1538
|
-
Options:
|
|
1539
|
-
-c CODE Execute inline code
|
|
1540
|
-
-m, --module Enable ES module mode (import/export)
|
|
1541
|
-
--strip-types Accepted for compatibility; type stripping is automatic
|
|
1542
|
-
--version, -V Show version
|
|
1543
|
-
--help Show this help
|
|
1544
|
-
|
|
1545
|
-
Examples:
|
|
1546
|
-
js-exec -c "console.log(1 + 2)"
|
|
1547
|
-
js-exec script.js
|
|
1548
|
-
js-exec app.ts
|
|
1549
|
-
echo 'console.log("hello")' | js-exec
|
|
1550
|
-
|
|
1551
|
-
File Extension Auto-Detection:
|
|
1552
|
-
.js function-body mode
|
|
1553
|
-
.mjs ES module mode
|
|
1554
|
-
.ts, .mts ES module mode + TypeScript stripping
|
|
1555
|
-
|
|
1556
|
-
Node.js Compatibility:
|
|
1557
|
-
Code written for Node.js largely works here. Both require and import are
|
|
1558
|
-
supported for the documented built-ins. Filesystem and command APIs retain
|
|
1559
|
-
synchronous Node.js call semantics inside the sandbox.
|
|
1560
|
-
|
|
1561
|
-
Available modules:
|
|
1562
|
-
fs, path, child_process, process, console,
|
|
1563
|
-
os, url, assert, util, events, buffer, stream,
|
|
1564
|
-
string_decoder, querystring
|
|
1565
|
-
|
|
1566
|
-
Limits:
|
|
1567
|
-
Memory: 64 MB per execution
|
|
1568
|
-
Timeout: configurable via maxJsTimeoutMs
|
|
1569
|
-
Engine: run (QuickJS)
|
|
1570
|
-
`;function gt(r){let e={code:null,isModule:!1,scriptArgs:[],scriptFile:null,showVersion:!1};for(let s=0;s<r.length;s++){let n=r[s];if(n==="-m"||n==="--module"){e.isModule=!0;continue}if(n!=="--strip-types")return n==="-c"?s+1>=r.length?{exitCode:2,stderr:`js-exec: option requires an argument -- 'c'
|
|
1571
|
-
`,stdout:""}:(e.code=r[s+1],e.scriptArgs=r.slice(s+2),e):n==="--version"||n==="-V"?(e.showVersion=!0,e):n.startsWith("-")&&n!=="-"&&n!=="--"?{exitCode:2,stderr:`js-exec: unrecognized option '${n}'
|
|
1572
|
-
`,stdout:""}:n==="--"?(s+1<r.length&&(e.scriptFile=r[s+1],e.scriptArgs=r.slice(s+2)),e):n==="-"?(e.scriptArgs=r.slice(s+1),e):(e.scriptFile=n,e.scriptArgs=r.slice(s+1),e)}return e}var Nt={name:"js-exec",async execute(r,e){if(he(r))return{exitCode:0,stderr:"",stdout:De};let s=gt(r);if("exitCode"in s)return s;if(s.showVersion)return{exitCode:0,stderr:"",stdout:`QuickJS (run)
|
|
1573
|
-
`};let n,o;if(s.code!==null)n=s.code,o="-c";else if(s.scriptFile!==null){let u=e.fs.resolvePath(e.cwd,s.scriptFile);if(!await e.fs.exists(u))return{exitCode:2,stderr:`js-exec: can't open file '${s.scriptFile}': No such file or directory
|
|
1574
|
-
`,stdout:""};try{n=await e.fs.readFile(u),o=u}catch(c){return{exitCode:2,stderr:`js-exec: can't open file '${s.scriptFile}': ${g(c.message)}
|
|
1575
|
-
`,stdout:""}}}else if(z(e.stdin).trim())n=z(e.stdin),o="<stdin>";else return{exitCode:2,stderr:`js-exec: no input provided (use -c CODE or provide a script file)
|
|
1576
|
-
`,stdout:""};let a=s.isModule||o.endsWith(".mjs")||o.endsWith(".mts")||o.endsWith(".ts");return await Me({bootstrapCode:e.jsBootstrapCode,isModule:a,scriptArgs:s.scriptArgs,scriptPath:o,source:n},e)}},$t={name:"node",async execute(){return{exitCode:1,stderr:`node: this sandbox uses js-exec instead of node
|
|
1577
|
-
|
|
1578
|
-
${De}`,stdout:""}}};export{Nt as jsExecCommand,$t as nodeStubCommand};
|