@jerryan/just-bash 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +308 -0
- package/LICENSE +201 -0
- package/README.md +827 -0
- package/dist/AGENTS.md +383 -0
- package/dist/Bash.d.ts +317 -0
- package/dist/abort-signals.d.ts +10 -0
- package/dist/agent-sandbox.d.ts +104 -0
- package/dist/ast/types.d.ts +612 -0
- package/dist/banned-patterns-test.d.ts +1 -0
- package/dist/bin/chunks/alias-3R4G6HQY.js +3 -0
- package/dist/bin/chunks/awk2-KO7ZE3P7.js +3 -0
- package/dist/bin/chunks/base64-TQ5KOCNW.js +3 -0
- package/dist/bin/chunks/basename-C4CRGDXP.js +3 -0
- package/dist/bin/chunks/bash-CFCBBWVH.js +3 -0
- package/dist/bin/chunks/cat-BQ7FQTN5.js +3 -0
- package/dist/bin/chunks/chmod-WYYTXGVB.js +3 -0
- package/dist/bin/chunks/chunk-23OI2XDJ.js +20 -0
- package/dist/bin/chunks/chunk-2ETT4ELS.js +4 -0
- package/dist/bin/chunks/chunk-2UV6ZFHK.js +4 -0
- package/dist/bin/chunks/chunk-2YLY6FJA.js +10 -0
- package/dist/bin/chunks/chunk-3FQBUEB6.js +3 -0
- package/dist/bin/chunks/chunk-3MRB66F4.js +3 -0
- package/dist/bin/chunks/chunk-3PCPQIUD.js +3 -0
- package/dist/bin/chunks/chunk-42AMF6EE.js +3 -0
- package/dist/bin/chunks/chunk-43E7AR6A.js +3 -0
- package/dist/bin/chunks/chunk-45DUHCXR.js +7 -0
- package/dist/bin/chunks/chunk-472JZJ2D.js +22 -0
- package/dist/bin/chunks/chunk-47IFMQYS.js +3 -0
- package/dist/bin/chunks/chunk-4JF56A3P.js +15 -0
- package/dist/bin/chunks/chunk-5SKEZPTU.js +12 -0
- package/dist/bin/chunks/chunk-67XYNGRV.js +9 -0
- package/dist/bin/chunks/chunk-6ESRNSO7.js +7 -0
- package/dist/bin/chunks/chunk-6KHZX4HU.js +12 -0
- package/dist/bin/chunks/chunk-7FGDUBSN.js +14 -0
- package/dist/bin/chunks/chunk-7JZKVC3F.js +2 -0
- package/dist/bin/chunks/chunk-7PPAWLUI.js +12 -0
- package/dist/bin/chunks/chunk-7PUOS2OO.js +143 -0
- package/dist/bin/chunks/chunk-7VWOECJ3.js +101 -0
- package/dist/bin/chunks/chunk-7WBCA2BB.js +3 -0
- package/dist/bin/chunks/chunk-AGKL4LDL.js +4 -0
- package/dist/bin/chunks/chunk-AI7JUA46.js +13 -0
- package/dist/bin/chunks/chunk-AJF3OBTR.js +4 -0
- package/dist/bin/chunks/chunk-B2DRBHGQ.js +3 -0
- package/dist/bin/chunks/chunk-B2GCIQI2.js +16 -0
- package/dist/bin/chunks/chunk-B6WWC6K3.js +9 -0
- package/dist/bin/chunks/chunk-BIJXTWZ4.js +3 -0
- package/dist/bin/chunks/chunk-CC2AQ6B7.js +15 -0
- package/dist/bin/chunks/chunk-CL7IYCGG.js +20 -0
- package/dist/bin/chunks/chunk-CMTQFWZK.js +5 -0
- package/dist/bin/chunks/chunk-CPKBPQ2C.js +3 -0
- package/dist/bin/chunks/chunk-DJAX3ZRG.js +8 -0
- package/dist/bin/chunks/chunk-DN2YCFOR.js +3 -0
- package/dist/bin/chunks/chunk-DYIBFLS3.js +17 -0
- package/dist/bin/chunks/chunk-DZAFUADN.js +36 -0
- package/dist/bin/chunks/chunk-F3UDTTI7.js +13 -0
- package/dist/bin/chunks/chunk-FHMIEBRM.js +6 -0
- package/dist/bin/chunks/chunk-FONAGXRJ.js +17 -0
- package/dist/bin/chunks/chunk-FPWHWWXO.js +8 -0
- package/dist/bin/chunks/chunk-FUT3X2GJ.js +9 -0
- package/dist/bin/chunks/chunk-G4AUMZUY.js +4 -0
- package/dist/bin/chunks/chunk-GA5TPRMF.js +34 -0
- package/dist/bin/chunks/chunk-GOWX7VPU.js +7 -0
- package/dist/bin/chunks/chunk-GQKQEK5N.js +11 -0
- package/dist/bin/chunks/chunk-GR4ZHKXI.js +3 -0
- package/dist/bin/chunks/chunk-HDWHYM2T.js +18 -0
- package/dist/bin/chunks/chunk-HQ63MFHG.js +34 -0
- package/dist/bin/chunks/chunk-HW2VJKFH.js +4 -0
- package/dist/bin/chunks/chunk-HWI42GQO.js +7 -0
- package/dist/bin/chunks/chunk-HZGHQZSY.js +10 -0
- package/dist/bin/chunks/chunk-I4IRHQDW.js +3 -0
- package/dist/bin/chunks/chunk-I57EACSL.js +3 -0
- package/dist/bin/chunks/chunk-JELR4642.js +21 -0
- package/dist/bin/chunks/chunk-JQM3DKCH.js +12 -0
- package/dist/bin/chunks/chunk-K27FY3ES.js +3 -0
- package/dist/bin/chunks/chunk-KG2KXL4Y.js +3 -0
- package/dist/bin/chunks/chunk-KI54R2QB.js +3 -0
- package/dist/bin/chunks/chunk-KP2UH5CJ.js +22 -0
- package/dist/bin/chunks/chunk-KUMHQGUR.js +3 -0
- package/dist/bin/chunks/chunk-LE2XKKGQ.js +7 -0
- package/dist/bin/chunks/chunk-LJQIAFWS.js +5 -0
- package/dist/bin/chunks/chunk-LXFMIXGA.js +3 -0
- package/dist/bin/chunks/chunk-M7SIPZZZ.js +22 -0
- package/dist/bin/chunks/chunk-MF3GVFLC.js +11 -0
- package/dist/bin/chunks/chunk-MROECM42.js +3 -0
- package/dist/bin/chunks/chunk-MUFNRCMY.js +24 -0
- package/dist/bin/chunks/chunk-MVBK66TR.js +22 -0
- package/dist/bin/chunks/chunk-MYTNZ7MA.js +7 -0
- package/dist/bin/chunks/chunk-N26Y42L6.js +10 -0
- package/dist/bin/chunks/chunk-NE4R2FVV.js +5 -0
- package/dist/bin/chunks/chunk-NLU5LALY.js +37 -0
- package/dist/bin/chunks/chunk-NXUXZWS5.js +7 -0
- package/dist/bin/chunks/chunk-O2BCKSMK.js +3 -0
- package/dist/bin/chunks/chunk-OLEQNRKX.js +8 -0
- package/dist/bin/chunks/chunk-OUQKFRVR.js +6 -0
- package/dist/bin/chunks/chunk-OXLC2WWX.js +26 -0
- package/dist/bin/chunks/chunk-OYXHOZZ4.js +15 -0
- package/dist/bin/chunks/chunk-PBOVSFTJ.js +3 -0
- package/dist/bin/chunks/chunk-PPVF2N6C.js +3 -0
- package/dist/bin/chunks/chunk-PQ2INDRF.js +87 -0
- package/dist/bin/chunks/chunk-PXP4YYZA.js +13 -0
- package/dist/bin/chunks/chunk-PZQVSQX6.js +4 -0
- package/dist/bin/chunks/chunk-Q2GOPGDA.js +6 -0
- package/dist/bin/chunks/chunk-Q3LE3Y66.js +13 -0
- package/dist/bin/chunks/chunk-QES5OSUC.js +3 -0
- package/dist/bin/chunks/chunk-QFTZKD5O.js +13 -0
- package/dist/bin/chunks/chunk-QL33F2W6.js +8 -0
- package/dist/bin/chunks/chunk-QMPZXXEK.js +8 -0
- package/dist/bin/chunks/chunk-QYZN33JA.js +3 -0
- package/dist/bin/chunks/chunk-R2J5MJOM.js +20 -0
- package/dist/bin/chunks/chunk-RPUFEP5O.js +65 -0
- package/dist/bin/chunks/chunk-RVPTAYDS.js +4 -0
- package/dist/bin/chunks/chunk-SC5TEGMM.js +12 -0
- package/dist/bin/chunks/chunk-SDGPS6XI.js +10 -0
- package/dist/bin/chunks/chunk-TW2IJRUF.js +3 -0
- package/dist/bin/chunks/chunk-TYBXHT6W.js +10 -0
- package/dist/bin/chunks/chunk-V2XF3TTW.js +276 -0
- package/dist/bin/chunks/chunk-V4U26ZWL.js +16 -0
- package/dist/bin/chunks/chunk-VTAMGD42.js +3 -0
- package/dist/bin/chunks/chunk-WAJVRK5B.js +16 -0
- package/dist/bin/chunks/chunk-WEHA3JFD.js +3 -0
- package/dist/bin/chunks/chunk-WFHYGSLJ.js +6 -0
- package/dist/bin/chunks/chunk-WFVCEB5T.js +3 -0
- package/dist/bin/chunks/chunk-YERKK5B3.js +4 -0
- package/dist/bin/chunks/chunk-YIANER7Y.js +8 -0
- package/dist/bin/chunks/chunk-YJ5OCPSK.js +7 -0
- package/dist/bin/chunks/chunk-YOIFOOGX.js +9 -0
- package/dist/bin/chunks/chunk-YQEKKZTU.js +12 -0
- package/dist/bin/chunks/chunk-YUZRUF5F.js +10 -0
- package/dist/bin/chunks/chunk-ZMGLTHSU.js +15 -0
- package/dist/bin/chunks/clear-OE52K3TM.js +3 -0
- package/dist/bin/chunks/column-AJFK3TWF.js +3 -0
- package/dist/bin/chunks/comm-URDMZCXL.js +3 -0
- package/dist/bin/chunks/cp-OMVKM35F.js +3 -0
- package/dist/bin/chunks/curl-NHNZ46BU.js +31 -0
- package/dist/bin/chunks/cut-42X6363P.js +3 -0
- package/dist/bin/chunks/date-6MQGVWDY.js +3 -0
- package/dist/bin/chunks/diff-YXZZCUSQ.js +3 -0
- package/dist/bin/chunks/dirname-TPUFCYF6.js +3 -0
- package/dist/bin/chunks/dist-5MWO25Y4.js +141 -0
- package/dist/bin/chunks/du-LUFPVLNW.js +3 -0
- package/dist/bin/chunks/echo-NYDCCFWB.js +3 -0
- package/dist/bin/chunks/env-2TSVF4W7.js +3 -0
- package/dist/bin/chunks/expand-IQRKKT7D.js +3 -0
- package/dist/bin/chunks/expr-NNMDHOCN.js +3 -0
- package/dist/bin/chunks/file-4T64QNLS.js +3 -0
- package/dist/bin/chunks/find-AWH2KOY7.js +3 -0
- package/dist/bin/chunks/flag-coverage-J2ZHA465.js +3 -0
- package/dist/bin/chunks/fold-YEY7X54W.js +3 -0
- package/dist/bin/chunks/grep-CVU5V66H.js +3 -0
- package/dist/bin/chunks/gzip-FDPA6EKG.js +3 -0
- package/dist/bin/chunks/head-QKVY3SIO.js +3 -0
- package/dist/bin/chunks/help-HVIDHJ6M.js +3 -0
- package/dist/bin/chunks/history-3HAU45KT.js +3 -0
- package/dist/bin/chunks/hostname-2I76DUQL.js +3 -0
- package/dist/bin/chunks/html-to-markdown-XUMA42ZC.js +3 -0
- package/dist/bin/chunks/join-34DX7YK5.js +3 -0
- package/dist/bin/chunks/jq-V7OTAVU5.js +3 -0
- package/dist/bin/chunks/js-exec-DJQLXWCS.js +99 -0
- package/dist/bin/chunks/js-exec-worker.js +4809 -0
- package/dist/bin/chunks/ln-B35EKC2Q.js +3 -0
- package/dist/bin/chunks/ls-Q6ZZ6SQ2.js +3 -0
- package/dist/bin/chunks/md5sum-Z6KAYGDK.js +3 -0
- package/dist/bin/chunks/mkdir-74BP5NTG.js +3 -0
- package/dist/bin/chunks/mv-76LAHXFR.js +3 -0
- package/dist/bin/chunks/nl-4IZRRT7U.js +3 -0
- package/dist/bin/chunks/od-2GXD4D5K.js +3 -0
- package/dist/bin/chunks/paste-DWWA3JTW.js +3 -0
- package/dist/bin/chunks/printf-YXCSED2H.js +3 -0
- package/dist/bin/chunks/pwd-YKLNXWZI.js +3 -0
- package/dist/bin/chunks/python3-JCJHSX4Z.js +14 -0
- package/dist/bin/chunks/readlink-EHXJNW62.js +3 -0
- package/dist/bin/chunks/rev-CZTQCNOZ.js +3 -0
- package/dist/bin/chunks/rg-PXNKNIMY.js +3 -0
- package/dist/bin/chunks/rm-3PLW4O4B.js +3 -0
- package/dist/bin/chunks/rmdir-7ZIVFZJX.js +3 -0
- package/dist/bin/chunks/sed-4LVDFHIJ.js +3 -0
- package/dist/bin/chunks/seq-X2EAOGV5.js +3 -0
- package/dist/bin/chunks/sha1sum-CATBXX76.js +3 -0
- package/dist/bin/chunks/sha256sum-YGSNBVY3.js +3 -0
- package/dist/bin/chunks/sleep-DVFE2GSF.js +3 -0
- package/dist/bin/chunks/sort-HBOCBBJQ.js +3 -0
- package/dist/bin/chunks/split-ZNNNHKSP.js +3 -0
- package/dist/bin/chunks/sqlite3-KP42NNIY.js +3 -0
- package/dist/bin/chunks/sqlite3-worker.js +1928 -0
- package/dist/bin/chunks/stat-LROLDXHH.js +3 -0
- package/dist/bin/chunks/strings-CNUK76JL.js +3 -0
- package/dist/bin/chunks/tac-DG4BMYM5.js +3 -0
- package/dist/bin/chunks/tail-UOTUV25D.js +3 -0
- package/dist/bin/chunks/tar-7HGZIMZD.js +3 -0
- package/dist/bin/chunks/tee-L4HKV5PD.js +3 -0
- package/dist/bin/chunks/time-LF7BTSK5.js +3 -0
- package/dist/bin/chunks/timeout-YGFHQJKX.js +3 -0
- package/dist/bin/chunks/touch-TVQAUQOG.js +3 -0
- package/dist/bin/chunks/tr-PVFO6FRY.js +3 -0
- package/dist/bin/chunks/tree-ZGP6NPGS.js +3 -0
- package/dist/bin/chunks/true-KFTJGQLQ.js +3 -0
- package/dist/bin/chunks/unexpand-JPOQORZF.js +3 -0
- package/dist/bin/chunks/uniq-JMHDIJXT.js +3 -0
- package/dist/bin/chunks/wc-3KLVOCI2.js +3 -0
- package/dist/bin/chunks/which-4TPGVSBZ.js +3 -0
- package/dist/bin/chunks/whoami-B5HDVKW6.js +3 -0
- package/dist/bin/chunks/worker.js +3330 -0
- package/dist/bin/chunks/xan-WW53ETXT.js +3 -0
- package/dist/bin/chunks/xan-view-PD26QEFN.js +3 -0
- package/dist/bin/chunks/xargs-4AMMXFXL.js +3 -0
- package/dist/bin/chunks/yq-MYZOS2WN.js +3 -0
- package/dist/bin/just-bash.js +858 -0
- package/dist/bin/shell/chunks/alias-3R4G6HQY.js +3 -0
- package/dist/bin/shell/chunks/awk2-KO7ZE3P7.js +3 -0
- package/dist/bin/shell/chunks/base64-TQ5KOCNW.js +3 -0
- package/dist/bin/shell/chunks/basename-C4CRGDXP.js +3 -0
- package/dist/bin/shell/chunks/bash-CFCBBWVH.js +3 -0
- package/dist/bin/shell/chunks/cat-BQ7FQTN5.js +3 -0
- package/dist/bin/shell/chunks/chmod-WYYTXGVB.js +3 -0
- package/dist/bin/shell/chunks/chunk-23OI2XDJ.js +20 -0
- package/dist/bin/shell/chunks/chunk-2ETT4ELS.js +4 -0
- package/dist/bin/shell/chunks/chunk-2UV6ZFHK.js +4 -0
- package/dist/bin/shell/chunks/chunk-2YLY6FJA.js +10 -0
- package/dist/bin/shell/chunks/chunk-3FQBUEB6.js +3 -0
- package/dist/bin/shell/chunks/chunk-3MRB66F4.js +3 -0
- package/dist/bin/shell/chunks/chunk-3PCPQIUD.js +3 -0
- package/dist/bin/shell/chunks/chunk-42AMF6EE.js +3 -0
- package/dist/bin/shell/chunks/chunk-43E7AR6A.js +3 -0
- package/dist/bin/shell/chunks/chunk-45DUHCXR.js +7 -0
- package/dist/bin/shell/chunks/chunk-472JZJ2D.js +22 -0
- package/dist/bin/shell/chunks/chunk-47IFMQYS.js +3 -0
- package/dist/bin/shell/chunks/chunk-4JF56A3P.js +15 -0
- package/dist/bin/shell/chunks/chunk-5SKEZPTU.js +12 -0
- package/dist/bin/shell/chunks/chunk-67XYNGRV.js +9 -0
- package/dist/bin/shell/chunks/chunk-6ESRNSO7.js +7 -0
- package/dist/bin/shell/chunks/chunk-6KHZX4HU.js +12 -0
- package/dist/bin/shell/chunks/chunk-7FGDUBSN.js +14 -0
- package/dist/bin/shell/chunks/chunk-7JZKVC3F.js +2 -0
- package/dist/bin/shell/chunks/chunk-7PPAWLUI.js +12 -0
- package/dist/bin/shell/chunks/chunk-7PUOS2OO.js +143 -0
- package/dist/bin/shell/chunks/chunk-7VWOECJ3.js +101 -0
- package/dist/bin/shell/chunks/chunk-7WBCA2BB.js +3 -0
- package/dist/bin/shell/chunks/chunk-AGKL4LDL.js +4 -0
- package/dist/bin/shell/chunks/chunk-AI7JUA46.js +13 -0
- package/dist/bin/shell/chunks/chunk-AJF3OBTR.js +4 -0
- package/dist/bin/shell/chunks/chunk-B2DRBHGQ.js +3 -0
- package/dist/bin/shell/chunks/chunk-B2GCIQI2.js +16 -0
- package/dist/bin/shell/chunks/chunk-B6WWC6K3.js +9 -0
- package/dist/bin/shell/chunks/chunk-BIJXTWZ4.js +3 -0
- package/dist/bin/shell/chunks/chunk-CC2AQ6B7.js +15 -0
- package/dist/bin/shell/chunks/chunk-CL7IYCGG.js +20 -0
- package/dist/bin/shell/chunks/chunk-CMTQFWZK.js +5 -0
- package/dist/bin/shell/chunks/chunk-CPKBPQ2C.js +3 -0
- package/dist/bin/shell/chunks/chunk-DJAX3ZRG.js +8 -0
- package/dist/bin/shell/chunks/chunk-DN2YCFOR.js +3 -0
- package/dist/bin/shell/chunks/chunk-DYIBFLS3.js +17 -0
- package/dist/bin/shell/chunks/chunk-DZAFUADN.js +36 -0
- package/dist/bin/shell/chunks/chunk-F3UDTTI7.js +13 -0
- package/dist/bin/shell/chunks/chunk-FHMIEBRM.js +6 -0
- package/dist/bin/shell/chunks/chunk-FONAGXRJ.js +17 -0
- package/dist/bin/shell/chunks/chunk-FPWHWWXO.js +8 -0
- package/dist/bin/shell/chunks/chunk-FUT3X2GJ.js +9 -0
- package/dist/bin/shell/chunks/chunk-G4AUMZUY.js +4 -0
- package/dist/bin/shell/chunks/chunk-GA5TPRMF.js +34 -0
- package/dist/bin/shell/chunks/chunk-GOWX7VPU.js +7 -0
- package/dist/bin/shell/chunks/chunk-GQKQEK5N.js +11 -0
- package/dist/bin/shell/chunks/chunk-GR4ZHKXI.js +3 -0
- package/dist/bin/shell/chunks/chunk-HDWHYM2T.js +18 -0
- package/dist/bin/shell/chunks/chunk-HQ63MFHG.js +34 -0
- package/dist/bin/shell/chunks/chunk-HW2VJKFH.js +4 -0
- package/dist/bin/shell/chunks/chunk-HWI42GQO.js +7 -0
- package/dist/bin/shell/chunks/chunk-HZGHQZSY.js +10 -0
- package/dist/bin/shell/chunks/chunk-I4IRHQDW.js +3 -0
- package/dist/bin/shell/chunks/chunk-I57EACSL.js +3 -0
- package/dist/bin/shell/chunks/chunk-JELR4642.js +21 -0
- package/dist/bin/shell/chunks/chunk-JQM3DKCH.js +12 -0
- package/dist/bin/shell/chunks/chunk-K27FY3ES.js +3 -0
- package/dist/bin/shell/chunks/chunk-KG2KXL4Y.js +3 -0
- package/dist/bin/shell/chunks/chunk-KI54R2QB.js +3 -0
- package/dist/bin/shell/chunks/chunk-KP2UH5CJ.js +22 -0
- package/dist/bin/shell/chunks/chunk-KUMHQGUR.js +3 -0
- package/dist/bin/shell/chunks/chunk-LE2XKKGQ.js +7 -0
- package/dist/bin/shell/chunks/chunk-LJQIAFWS.js +5 -0
- package/dist/bin/shell/chunks/chunk-LXFMIXGA.js +3 -0
- package/dist/bin/shell/chunks/chunk-M7SIPZZZ.js +22 -0
- package/dist/bin/shell/chunks/chunk-MF3GVFLC.js +11 -0
- package/dist/bin/shell/chunks/chunk-MROECM42.js +3 -0
- package/dist/bin/shell/chunks/chunk-MUFNRCMY.js +24 -0
- package/dist/bin/shell/chunks/chunk-MVBK66TR.js +22 -0
- package/dist/bin/shell/chunks/chunk-MYTNZ7MA.js +7 -0
- package/dist/bin/shell/chunks/chunk-N26Y42L6.js +10 -0
- package/dist/bin/shell/chunks/chunk-NE4R2FVV.js +5 -0
- package/dist/bin/shell/chunks/chunk-NLU5LALY.js +37 -0
- package/dist/bin/shell/chunks/chunk-NXUXZWS5.js +7 -0
- package/dist/bin/shell/chunks/chunk-O2BCKSMK.js +3 -0
- package/dist/bin/shell/chunks/chunk-OLEQNRKX.js +8 -0
- package/dist/bin/shell/chunks/chunk-OUQKFRVR.js +6 -0
- package/dist/bin/shell/chunks/chunk-OXLC2WWX.js +26 -0
- package/dist/bin/shell/chunks/chunk-OYXHOZZ4.js +15 -0
- package/dist/bin/shell/chunks/chunk-PBOVSFTJ.js +3 -0
- package/dist/bin/shell/chunks/chunk-PPVF2N6C.js +3 -0
- package/dist/bin/shell/chunks/chunk-PQ2INDRF.js +87 -0
- package/dist/bin/shell/chunks/chunk-PXP4YYZA.js +13 -0
- package/dist/bin/shell/chunks/chunk-PZQVSQX6.js +4 -0
- package/dist/bin/shell/chunks/chunk-Q2GOPGDA.js +6 -0
- package/dist/bin/shell/chunks/chunk-Q3LE3Y66.js +13 -0
- package/dist/bin/shell/chunks/chunk-QES5OSUC.js +3 -0
- package/dist/bin/shell/chunks/chunk-QFTZKD5O.js +13 -0
- package/dist/bin/shell/chunks/chunk-QL33F2W6.js +8 -0
- package/dist/bin/shell/chunks/chunk-QMPZXXEK.js +8 -0
- package/dist/bin/shell/chunks/chunk-QYZN33JA.js +3 -0
- package/dist/bin/shell/chunks/chunk-R2J5MJOM.js +20 -0
- package/dist/bin/shell/chunks/chunk-RPUFEP5O.js +65 -0
- package/dist/bin/shell/chunks/chunk-RVPTAYDS.js +4 -0
- package/dist/bin/shell/chunks/chunk-SC5TEGMM.js +12 -0
- package/dist/bin/shell/chunks/chunk-SDGPS6XI.js +10 -0
- package/dist/bin/shell/chunks/chunk-TW2IJRUF.js +3 -0
- package/dist/bin/shell/chunks/chunk-TYBXHT6W.js +10 -0
- package/dist/bin/shell/chunks/chunk-V2XF3TTW.js +276 -0
- package/dist/bin/shell/chunks/chunk-V4U26ZWL.js +16 -0
- package/dist/bin/shell/chunks/chunk-VTAMGD42.js +3 -0
- package/dist/bin/shell/chunks/chunk-WAJVRK5B.js +16 -0
- package/dist/bin/shell/chunks/chunk-WEHA3JFD.js +3 -0
- package/dist/bin/shell/chunks/chunk-WFHYGSLJ.js +6 -0
- package/dist/bin/shell/chunks/chunk-WFVCEB5T.js +3 -0
- package/dist/bin/shell/chunks/chunk-YERKK5B3.js +4 -0
- package/dist/bin/shell/chunks/chunk-YIANER7Y.js +8 -0
- package/dist/bin/shell/chunks/chunk-YJ5OCPSK.js +7 -0
- package/dist/bin/shell/chunks/chunk-YOIFOOGX.js +9 -0
- package/dist/bin/shell/chunks/chunk-YQEKKZTU.js +12 -0
- package/dist/bin/shell/chunks/chunk-YUZRUF5F.js +10 -0
- package/dist/bin/shell/chunks/chunk-ZMGLTHSU.js +15 -0
- package/dist/bin/shell/chunks/clear-OE52K3TM.js +3 -0
- package/dist/bin/shell/chunks/column-AJFK3TWF.js +3 -0
- package/dist/bin/shell/chunks/comm-URDMZCXL.js +3 -0
- package/dist/bin/shell/chunks/cp-OMVKM35F.js +3 -0
- package/dist/bin/shell/chunks/curl-NHNZ46BU.js +31 -0
- package/dist/bin/shell/chunks/cut-42X6363P.js +3 -0
- package/dist/bin/shell/chunks/date-6MQGVWDY.js +3 -0
- package/dist/bin/shell/chunks/diff-YXZZCUSQ.js +3 -0
- package/dist/bin/shell/chunks/dirname-TPUFCYF6.js +3 -0
- package/dist/bin/shell/chunks/dist-5MWO25Y4.js +141 -0
- package/dist/bin/shell/chunks/du-LUFPVLNW.js +3 -0
- package/dist/bin/shell/chunks/echo-NYDCCFWB.js +3 -0
- package/dist/bin/shell/chunks/env-2TSVF4W7.js +3 -0
- package/dist/bin/shell/chunks/expand-IQRKKT7D.js +3 -0
- package/dist/bin/shell/chunks/expr-NNMDHOCN.js +3 -0
- package/dist/bin/shell/chunks/file-4T64QNLS.js +3 -0
- package/dist/bin/shell/chunks/find-AWH2KOY7.js +3 -0
- package/dist/bin/shell/chunks/flag-coverage-J2ZHA465.js +3 -0
- package/dist/bin/shell/chunks/fold-YEY7X54W.js +3 -0
- package/dist/bin/shell/chunks/grep-CVU5V66H.js +3 -0
- package/dist/bin/shell/chunks/gzip-FDPA6EKG.js +3 -0
- package/dist/bin/shell/chunks/head-QKVY3SIO.js +3 -0
- package/dist/bin/shell/chunks/help-HVIDHJ6M.js +3 -0
- package/dist/bin/shell/chunks/history-3HAU45KT.js +3 -0
- package/dist/bin/shell/chunks/hostname-2I76DUQL.js +3 -0
- package/dist/bin/shell/chunks/html-to-markdown-XUMA42ZC.js +3 -0
- package/dist/bin/shell/chunks/join-34DX7YK5.js +3 -0
- package/dist/bin/shell/chunks/jq-V7OTAVU5.js +3 -0
- package/dist/bin/shell/chunks/js-exec-DJQLXWCS.js +99 -0
- package/dist/bin/shell/chunks/ln-B35EKC2Q.js +3 -0
- package/dist/bin/shell/chunks/ls-Q6ZZ6SQ2.js +3 -0
- package/dist/bin/shell/chunks/md5sum-Z6KAYGDK.js +3 -0
- package/dist/bin/shell/chunks/mkdir-74BP5NTG.js +3 -0
- package/dist/bin/shell/chunks/mv-76LAHXFR.js +3 -0
- package/dist/bin/shell/chunks/nl-4IZRRT7U.js +3 -0
- package/dist/bin/shell/chunks/od-2GXD4D5K.js +3 -0
- package/dist/bin/shell/chunks/paste-DWWA3JTW.js +3 -0
- package/dist/bin/shell/chunks/printf-YXCSED2H.js +3 -0
- package/dist/bin/shell/chunks/pwd-YKLNXWZI.js +3 -0
- package/dist/bin/shell/chunks/python3-JCJHSX4Z.js +14 -0
- package/dist/bin/shell/chunks/readlink-EHXJNW62.js +3 -0
- package/dist/bin/shell/chunks/rev-CZTQCNOZ.js +3 -0
- package/dist/bin/shell/chunks/rg-PXNKNIMY.js +3 -0
- package/dist/bin/shell/chunks/rm-3PLW4O4B.js +3 -0
- package/dist/bin/shell/chunks/rmdir-7ZIVFZJX.js +3 -0
- package/dist/bin/shell/chunks/sed-4LVDFHIJ.js +3 -0
- package/dist/bin/shell/chunks/seq-X2EAOGV5.js +3 -0
- package/dist/bin/shell/chunks/sha1sum-CATBXX76.js +3 -0
- package/dist/bin/shell/chunks/sha256sum-YGSNBVY3.js +3 -0
- package/dist/bin/shell/chunks/sleep-DVFE2GSF.js +3 -0
- package/dist/bin/shell/chunks/sort-HBOCBBJQ.js +3 -0
- package/dist/bin/shell/chunks/split-ZNNNHKSP.js +3 -0
- package/dist/bin/shell/chunks/sqlite3-KP42NNIY.js +3 -0
- package/dist/bin/shell/chunks/stat-LROLDXHH.js +3 -0
- package/dist/bin/shell/chunks/strings-CNUK76JL.js +3 -0
- package/dist/bin/shell/chunks/tac-DG4BMYM5.js +3 -0
- package/dist/bin/shell/chunks/tail-UOTUV25D.js +3 -0
- package/dist/bin/shell/chunks/tar-7HGZIMZD.js +3 -0
- package/dist/bin/shell/chunks/tee-L4HKV5PD.js +3 -0
- package/dist/bin/shell/chunks/time-LF7BTSK5.js +3 -0
- package/dist/bin/shell/chunks/timeout-YGFHQJKX.js +3 -0
- package/dist/bin/shell/chunks/touch-TVQAUQOG.js +3 -0
- package/dist/bin/shell/chunks/tr-PVFO6FRY.js +3 -0
- package/dist/bin/shell/chunks/tree-ZGP6NPGS.js +3 -0
- package/dist/bin/shell/chunks/true-KFTJGQLQ.js +3 -0
- package/dist/bin/shell/chunks/unexpand-JPOQORZF.js +3 -0
- package/dist/bin/shell/chunks/uniq-JMHDIJXT.js +3 -0
- package/dist/bin/shell/chunks/wc-3KLVOCI2.js +3 -0
- package/dist/bin/shell/chunks/which-4TPGVSBZ.js +3 -0
- package/dist/bin/shell/chunks/whoami-B5HDVKW6.js +3 -0
- package/dist/bin/shell/chunks/xan-WW53ETXT.js +3 -0
- package/dist/bin/shell/chunks/xan-view-PD26QEFN.js +3 -0
- package/dist/bin/shell/chunks/xargs-4AMMXFXL.js +3 -0
- package/dist/bin/shell/chunks/yq-MYZOS2WN.js +3 -0
- package/dist/bin/shell/shell.js +834 -0
- package/dist/bounded-builder.d.ts +37 -0
- package/dist/browser.d.ts +23 -0
- package/dist/bundle/browser.js +1576 -0
- package/dist/bundle/chunks/alias-T5TO5GWK.js +2 -0
- package/dist/bundle/chunks/awk2-W6BNZEJN.js +2 -0
- package/dist/bundle/chunks/base64-MHVQ5XHI.js +2 -0
- package/dist/bundle/chunks/basename-SJZQ5W65.js +2 -0
- package/dist/bundle/chunks/bash-HIEWVHJ2.js +2 -0
- package/dist/bundle/chunks/cat-VZBWBIJB.js +2 -0
- package/dist/bundle/chunks/chmod-WM2JFFQC.js +2 -0
- package/dist/bundle/chunks/chunk-24NLAR7R.js +36 -0
- package/dist/bundle/chunks/chunk-26GP3ACY.js +12 -0
- package/dist/bundle/chunks/chunk-2KNTH3KH.js +9 -0
- package/dist/bundle/chunks/chunk-2SMD2AUA.js +3 -0
- package/dist/bundle/chunks/chunk-2TSZPVPI.js +21 -0
- package/dist/bundle/chunks/chunk-2VWG4LDT.js +11 -0
- package/dist/bundle/chunks/chunk-3WASQYTF.js +11 -0
- package/dist/bundle/chunks/chunk-44YCJWNC.js +6 -0
- package/dist/bundle/chunks/chunk-4EDQZIAN.js +5 -0
- package/dist/bundle/chunks/chunk-4MJ7VJG4.js +21 -0
- package/dist/bundle/chunks/chunk-4MZPEZTU.js +3 -0
- package/dist/bundle/chunks/chunk-57LGFT4S.js +3 -0
- package/dist/bundle/chunks/chunk-5I5U6IYI.js +142 -0
- package/dist/bundle/chunks/chunk-6DDRR56B.js +33 -0
- package/dist/bundle/chunks/chunk-6QF3PCMO.js +8 -0
- package/dist/bundle/chunks/chunk-6RK4AAB7.js +21 -0
- package/dist/bundle/chunks/chunk-6WGIZV3E.js +13 -0
- package/dist/bundle/chunks/chunk-73JQKNZT.js +33 -0
- package/dist/bundle/chunks/chunk-7AISL3XV.js +12 -0
- package/dist/bundle/chunks/chunk-7EUWTCWK.js +2 -0
- package/dist/bundle/chunks/chunk-7IJWBG4I.js +2 -0
- package/dist/bundle/chunks/chunk-7O2RDO2R.js +14 -0
- package/dist/bundle/chunks/chunk-A4R2GWRF.js +9 -0
- package/dist/bundle/chunks/chunk-AGH5UJJI.js +4 -0
- package/dist/bundle/chunks/chunk-ANCQ4SCV.js +2 -0
- package/dist/bundle/chunks/chunk-ASE6AYV3.js +17 -0
- package/dist/bundle/chunks/chunk-AYSZ5MAE.js +2 -0
- package/dist/bundle/chunks/chunk-BKUWXPEM.js +2 -0
- package/dist/bundle/chunks/chunk-BRJERIF4.js +2 -0
- package/dist/bundle/chunks/chunk-DAKEIWT3.js +21 -0
- package/dist/bundle/chunks/chunk-DLL7UR66.js +2 -0
- package/dist/bundle/chunks/chunk-DMWNBCXJ.js +10 -0
- package/dist/bundle/chunks/chunk-DVSA72LH.js +2 -0
- package/dist/bundle/chunks/chunk-EJFBIRMD.js +6 -0
- package/dist/bundle/chunks/chunk-EZNS4GF7.js +9 -0
- package/dist/bundle/chunks/chunk-F6XU52K3.js +35 -0
- package/dist/bundle/chunks/chunk-FHC24QSK.js +7 -0
- package/dist/bundle/chunks/chunk-FIMF2TLE.js +20 -0
- package/dist/bundle/chunks/chunk-FOCWZZDE.js +2 -0
- package/dist/bundle/chunks/chunk-FQUVK4Q5.js +11 -0
- package/dist/bundle/chunks/chunk-FSJ6TTCC.js +19 -0
- package/dist/bundle/chunks/chunk-FT6ODGOU.js +2 -0
- package/dist/bundle/chunks/chunk-FTET43KM.js +2 -0
- package/dist/bundle/chunks/chunk-FX4RBUYU.js +5 -0
- package/dist/bundle/chunks/chunk-FZRQOL3C.js +7 -0
- package/dist/bundle/chunks/chunk-FZZL53S2.js +275 -0
- package/dist/bundle/chunks/chunk-GN6CQ3J4.js +2 -0
- package/dist/bundle/chunks/chunk-HDRAUQK2.js +2 -0
- package/dist/bundle/chunks/chunk-HP7HWZ2S.js +15 -0
- package/dist/bundle/chunks/chunk-HRIJVWZS.js +14 -0
- package/dist/bundle/chunks/chunk-HXWB4Z5X.js +7 -0
- package/dist/bundle/chunks/chunk-ICLA3MUR.js +3 -0
- package/dist/bundle/chunks/chunk-IXFQXNL4.js +7 -0
- package/dist/bundle/chunks/chunk-KIGPB52X.js +2 -0
- package/dist/bundle/chunks/chunk-L2UW7DWF.js +2 -0
- package/dist/bundle/chunks/chunk-LI6PTSPD.js +9 -0
- package/dist/bundle/chunks/chunk-LPJEKUCB.js +8 -0
- package/dist/bundle/chunks/chunk-LSLPJOYM.js +3 -0
- package/dist/bundle/chunks/chunk-LVDUF74R.js +7 -0
- package/dist/bundle/chunks/chunk-MLIO3BK2.js +7 -0
- package/dist/bundle/chunks/chunk-MQKGGNPS.js +16 -0
- package/dist/bundle/chunks/chunk-N3A4JVFJ.js +2 -0
- package/dist/bundle/chunks/chunk-NBNI7G66.js +8 -0
- package/dist/bundle/chunks/chunk-NCUTH6QL.js +2 -0
- package/dist/bundle/chunks/chunk-OQ7C4FYO.js +2 -0
- package/dist/bundle/chunks/chunk-P57S6Z6R.js +6 -0
- package/dist/bundle/chunks/chunk-PCPW54JH.js +7 -0
- package/dist/bundle/chunks/chunk-PJM5C3HZ.js +25 -0
- package/dist/bundle/chunks/chunk-PPEXVPHR.js +19 -0
- package/dist/bundle/chunks/chunk-Q4JSJ3KQ.js +4 -0
- package/dist/bundle/chunks/chunk-QAYAQNCG.js +23 -0
- package/dist/bundle/chunks/chunk-QHDBQA5N.js +9 -0
- package/dist/bundle/chunks/chunk-QIQMJJZ4.js +4 -0
- package/dist/bundle/chunks/chunk-QJ7OXJAZ.js +6 -0
- package/dist/bundle/chunks/chunk-QJFYYEFV.js +11 -0
- package/dist/bundle/chunks/chunk-R2FBRMDU.js +14 -0
- package/dist/bundle/chunks/chunk-ROAWFE6V.js +5 -0
- package/dist/bundle/chunks/chunk-RPKJJFGZ.js +14 -0
- package/dist/bundle/chunks/chunk-S3ENGQML.js +15 -0
- package/dist/bundle/chunks/chunk-SBBYKIYU.js +3 -0
- package/dist/bundle/chunks/chunk-SGX4WOAM.js +2 -0
- package/dist/bundle/chunks/chunk-SHKOQWO4.js +3 -0
- package/dist/bundle/chunks/chunk-SIOONII3.js +2 -0
- package/dist/bundle/chunks/chunk-STHBFACM.js +1 -0
- package/dist/bundle/chunks/chunk-SX2HC7SO.js +2 -0
- package/dist/bundle/chunks/chunk-T6DNSPYO.js +100 -0
- package/dist/bundle/chunks/chunk-TBVD66LC.js +10 -0
- package/dist/bundle/chunks/chunk-TDD4NFYE.js +2 -0
- package/dist/bundle/chunks/chunk-TVCZIH6M.js +8 -0
- package/dist/bundle/chunks/chunk-U4K5ZDWK.js +9 -0
- package/dist/bundle/chunks/chunk-UC76ZOWM.js +15 -0
- package/dist/bundle/chunks/chunk-UIJUTQPH.js +3 -0
- package/dist/bundle/chunks/chunk-ULXTDFQC.js +2 -0
- package/dist/bundle/chunks/chunk-UTKGYVUZ.js +7 -0
- package/dist/bundle/chunks/chunk-UUIYAOD4.js +2 -0
- package/dist/bundle/chunks/chunk-VJ6UXG2R.js +64 -0
- package/dist/bundle/chunks/chunk-W2Z6LYL6.js +11 -0
- package/dist/bundle/chunks/chunk-W5DWRFSU.js +2 -0
- package/dist/bundle/chunks/chunk-WN54B5NQ.js +12 -0
- package/dist/bundle/chunks/chunk-WNH3HOQA.js +2 -0
- package/dist/bundle/chunks/chunk-WXPNKIIH.js +2 -0
- package/dist/bundle/chunks/chunk-WZQNMEQW.js +2 -0
- package/dist/bundle/chunks/chunk-XV2V56NQ.js +12 -0
- package/dist/bundle/chunks/chunk-XVSR5HHH.js +6 -0
- package/dist/bundle/chunks/chunk-XXBIOG4R.js +5 -0
- package/dist/bundle/chunks/chunk-Y62SXZKJ.js +12 -0
- package/dist/bundle/chunks/chunk-YEYSCLSJ.js +3 -0
- package/dist/bundle/chunks/chunk-YJKHREBZ.js +11 -0
- package/dist/bundle/chunks/chunk-YUSFCOM7.js +2 -0
- package/dist/bundle/chunks/chunk-ZBUZKIPX.js +6 -0
- package/dist/bundle/chunks/chunk-ZDPFA4L3.js +6 -0
- package/dist/bundle/chunks/chunk-ZT3WF5R7.js +16 -0
- package/dist/bundle/chunks/chunk-ZXFELXJH.js +6 -0
- package/dist/bundle/chunks/clear-KPIUNI6K.js +2 -0
- package/dist/bundle/chunks/column-QJI65SH2.js +2 -0
- package/dist/bundle/chunks/comm-DTWKU2MC.js +2 -0
- package/dist/bundle/chunks/cp-2KZIPZJS.js +2 -0
- package/dist/bundle/chunks/curl-K4WT7UPN.js +30 -0
- package/dist/bundle/chunks/cut-FMDNVWQN.js +2 -0
- package/dist/bundle/chunks/date-7OEDRA27.js +2 -0
- package/dist/bundle/chunks/diff-CSARC7WF.js +2 -0
- package/dist/bundle/chunks/dirname-Z2ZMOOW2.js +2 -0
- package/dist/bundle/chunks/du-7AZCLKR6.js +2 -0
- package/dist/bundle/chunks/echo-PLLZYM2L.js +2 -0
- package/dist/bundle/chunks/env-VUUMB47B.js +2 -0
- package/dist/bundle/chunks/expand-J3VOSOMK.js +2 -0
- package/dist/bundle/chunks/expr-XSBELPAC.js +2 -0
- package/dist/bundle/chunks/file-URNAD6FQ.js +2 -0
- package/dist/bundle/chunks/find-END3EAHV.js +2 -0
- package/dist/bundle/chunks/flag-coverage-DPSAPFXA.js +2 -0
- package/dist/bundle/chunks/fold-QJBPHRFJ.js +2 -0
- package/dist/bundle/chunks/grep-4AYF3A5J.js +2 -0
- package/dist/bundle/chunks/gzip-RQOBR22H.js +2 -0
- package/dist/bundle/chunks/head-6UIPFWVJ.js +2 -0
- package/dist/bundle/chunks/help-QDDMBDU7.js +2 -0
- package/dist/bundle/chunks/history-3N762S3K.js +2 -0
- package/dist/bundle/chunks/hostname-CESD3CQR.js +2 -0
- package/dist/bundle/chunks/html-to-markdown-PE6BPRPA.js +2 -0
- package/dist/bundle/chunks/join-C2B6NGXH.js +2 -0
- package/dist/bundle/chunks/jq-NY7PCVMH.js +2 -0
- package/dist/bundle/chunks/js-exec-XKF2B7C3.js +98 -0
- package/dist/bundle/chunks/js-exec-worker.js +4809 -0
- package/dist/bundle/chunks/ln-OPY2ZVGQ.js +2 -0
- package/dist/bundle/chunks/ls-ZPXGZX63.js +2 -0
- package/dist/bundle/chunks/md5sum-JEDX55KS.js +2 -0
- package/dist/bundle/chunks/mkdir-WDDKK2P3.js +2 -0
- package/dist/bundle/chunks/mv-ZF6UBVRB.js +2 -0
- package/dist/bundle/chunks/nl-IELOWYJG.js +2 -0
- package/dist/bundle/chunks/od-Z4AIL3P4.js +2 -0
- package/dist/bundle/chunks/paste-ZNHNSRBW.js +2 -0
- package/dist/bundle/chunks/printf-B2NSYQ3N.js +2 -0
- package/dist/bundle/chunks/pwd-76BPYV5F.js +2 -0
- package/dist/bundle/chunks/python3-F5S5TYGS.js +13 -0
- package/dist/bundle/chunks/readlink-U5OM5A3M.js +2 -0
- package/dist/bundle/chunks/rev-EPOS3MFH.js +2 -0
- package/dist/bundle/chunks/rg-NAMXBYKS.js +2 -0
- package/dist/bundle/chunks/rm-JQ4GDKDD.js +2 -0
- package/dist/bundle/chunks/rmdir-YJKPQVCK.js +2 -0
- package/dist/bundle/chunks/sed-LIRH26EA.js +2 -0
- package/dist/bundle/chunks/seq-B6KDLMYQ.js +2 -0
- package/dist/bundle/chunks/sha1sum-BLPZJ6MP.js +2 -0
- package/dist/bundle/chunks/sha256sum-VJZ4PHQ4.js +2 -0
- package/dist/bundle/chunks/sleep-PPRBTSVR.js +2 -0
- package/dist/bundle/chunks/sort-CB5GO7XH.js +2 -0
- package/dist/bundle/chunks/split-JICLAMP6.js +2 -0
- package/dist/bundle/chunks/sqlite3-4EZ4GXVD.js +2 -0
- package/dist/bundle/chunks/sqlite3-worker.js +1928 -0
- package/dist/bundle/chunks/stat-LXFZND2P.js +2 -0
- package/dist/bundle/chunks/strings-VLFTYX2Z.js +2 -0
- package/dist/bundle/chunks/tac-YXC4HBTR.js +2 -0
- package/dist/bundle/chunks/tail-UBGSN4JF.js +2 -0
- package/dist/bundle/chunks/tar-B72KU357.js +2 -0
- package/dist/bundle/chunks/tee-OOWSWHRQ.js +2 -0
- package/dist/bundle/chunks/time-NERE2JJ2.js +2 -0
- package/dist/bundle/chunks/timeout-C6WDYPLV.js +2 -0
- package/dist/bundle/chunks/touch-W4DF6Z4T.js +2 -0
- package/dist/bundle/chunks/tr-UI2LA3GA.js +2 -0
- package/dist/bundle/chunks/tree-7OOL2MH6.js +2 -0
- package/dist/bundle/chunks/true-QUBPEGGU.js +2 -0
- package/dist/bundle/chunks/unexpand-YD5BWFH4.js +2 -0
- package/dist/bundle/chunks/uniq-PAEPA27E.js +2 -0
- package/dist/bundle/chunks/wc-7WVM7GV4.js +2 -0
- package/dist/bundle/chunks/which-UWVKETYW.js +2 -0
- package/dist/bundle/chunks/whoami-KR6E7UIR.js +2 -0
- package/dist/bundle/chunks/worker.js +3330 -0
- package/dist/bundle/chunks/xan-UIGVJCMA.js +2 -0
- package/dist/bundle/chunks/xan-view-FOCYCKZQ.js +2 -0
- package/dist/bundle/chunks/xargs-VQEXRD3C.js +2 -0
- package/dist/bundle/chunks/yq-FGNXZCGX.js +2 -0
- package/dist/bundle/index.cjs +2237 -0
- package/dist/bundle/index.js +809 -0
- package/dist/commands/alias/alias.d.ts +6 -0
- package/dist/commands/awk/ast.d.ts +202 -0
- package/dist/commands/awk/awk2.d.ts +9 -0
- package/dist/commands/awk/builtins.d.ts +17 -0
- package/dist/commands/awk/interpreter/context.d.ts +88 -0
- package/dist/commands/awk/interpreter/expressions.d.ts +17 -0
- package/dist/commands/awk/interpreter/fields.d.ts +25 -0
- package/dist/commands/awk/interpreter/index.d.ts +8 -0
- package/dist/commands/awk/interpreter/interpreter.d.ts +54 -0
- package/dist/commands/awk/interpreter/statements.d.ts +11 -0
- package/dist/commands/awk/interpreter/type-coercion.d.ts +32 -0
- package/dist/commands/awk/interpreter/types.d.ts +13 -0
- package/dist/commands/awk/interpreter/variables.d.ts +35 -0
- package/dist/commands/awk/lexer.d.ts +101 -0
- package/dist/commands/awk/parser2-print.d.ts +38 -0
- package/dist/commands/awk/parser2.d.ts +96 -0
- package/dist/commands/base64/base64.d.ts +7 -0
- package/dist/commands/basename/basename.d.ts +4 -0
- package/dist/commands/bash/bash.d.ts +6 -0
- package/dist/commands/browser-excluded.d.ts +16 -0
- package/dist/commands/cat/cat.d.ts +4 -0
- package/dist/commands/chmod/chmod.d.ts +4 -0
- package/dist/commands/clear/clear.d.ts +4 -0
- package/dist/commands/column/column.d.ts +11 -0
- package/dist/commands/comm/comm.d.ts +12 -0
- package/dist/commands/compression/codec-budget.d.ts +35 -0
- package/dist/commands/cp/cp.d.ts +4 -0
- package/dist/commands/curl/curl.d.ts +8 -0
- package/dist/commands/curl/form.d.ts +23 -0
- package/dist/commands/curl/help.d.ts +9 -0
- package/dist/commands/curl/parse.d.ts +9 -0
- package/dist/commands/curl/response-formatting.d.ts +20 -0
- package/dist/commands/curl/types.d.ts +70 -0
- package/dist/commands/cut/cut.d.ts +4 -0
- package/dist/commands/date/date.d.ts +7 -0
- package/dist/commands/diff/diff.d.ts +7 -0
- package/dist/commands/dirname/dirname.d.ts +4 -0
- package/dist/commands/du/du.d.ts +4 -0
- package/dist/commands/duration.d.ts +5 -0
- package/dist/commands/echo/echo.d.ts +4 -0
- package/dist/commands/env/env.d.ts +6 -0
- package/dist/commands/expand/expand.d.ts +12 -0
- package/dist/commands/expand/unexpand.d.ts +12 -0
- package/dist/commands/expr/expr.d.ts +9 -0
- package/dist/commands/file/file.d.ts +9 -0
- package/dist/commands/find/find.d.ts +4 -0
- package/dist/commands/find/matcher.d.ts +53 -0
- package/dist/commands/find/parser.d.ts +2 -0
- package/dist/commands/find/types.d.ts +89 -0
- package/dist/commands/flag-coverage.d.ts +2 -0
- package/dist/commands/fold/fold.d.ts +12 -0
- package/dist/commands/format-mode.d.ts +4 -0
- package/dist/commands/fuzz-flags-types.d.ts +17 -0
- package/dist/commands/fuzz-flags.d.ts +8 -0
- package/dist/commands/grep/grep.d.ts +8 -0
- package/dist/commands/gzip/gzip.d.ts +13 -0
- package/dist/commands/head/head-tail-shared.d.ts +38 -0
- package/dist/commands/head/head.d.ts +4 -0
- package/dist/commands/help/help.d.ts +4 -0
- package/dist/commands/help.d.ts +16 -0
- package/dist/commands/history/history.d.ts +4 -0
- package/dist/commands/hostname/hostname.d.ts +11 -0
- package/dist/commands/html-to-markdown/html-to-markdown.d.ts +9 -0
- package/dist/commands/join/join.d.ts +12 -0
- package/dist/commands/jq/jq.d.ts +9 -0
- package/dist/commands/js-exec/fetch-polyfill.d.ts +6 -0
- package/dist/commands/js-exec/js-exec-worker.d.ts +33 -0
- package/dist/commands/js-exec/js-exec.d.ts +13 -0
- package/dist/commands/js-exec/module-shims.d.ts +29 -0
- package/dist/commands/js-exec/path-polyfill.d.ts +6 -0
- package/dist/commands/ln/ln.d.ts +4 -0
- package/dist/commands/ls/ls.d.ts +4 -0
- package/dist/commands/md5sum/checksum.d.ts +7 -0
- package/dist/commands/md5sum/md5sum.d.ts +4 -0
- package/dist/commands/md5sum/sha1sum.d.ts +4 -0
- package/dist/commands/md5sum/sha256sum.d.ts +4 -0
- package/dist/commands/mkdir/mkdir.d.ts +4 -0
- package/dist/commands/mv/mv.d.ts +4 -0
- package/dist/commands/nl/nl.d.ts +12 -0
- package/dist/commands/od/od.d.ts +12 -0
- package/dist/commands/paste/paste.d.ts +4 -0
- package/dist/commands/printf/escapes.d.ts +27 -0
- package/dist/commands/printf/printf.d.ts +4 -0
- package/dist/commands/printf/strftime.d.ts +14 -0
- package/dist/commands/pwd/pwd.d.ts +4 -0
- package/dist/commands/python3/python3.d.ts +16 -0
- package/dist/commands/python3/worker.d.ts +31 -0
- package/dist/commands/query-engine/builtins/array-builtins.d.ts +20 -0
- package/dist/commands/query-engine/builtins/control-builtins.d.ts +18 -0
- package/dist/commands/query-engine/builtins/date-builtins.d.ts +15 -0
- package/dist/commands/query-engine/builtins/format-builtins.d.ts +11 -0
- package/dist/commands/query-engine/builtins/index-builtins.d.ts +16 -0
- package/dist/commands/query-engine/builtins/index.d.ts +17 -0
- package/dist/commands/query-engine/builtins/math-builtins.d.ts +15 -0
- package/dist/commands/query-engine/builtins/navigation-builtins.d.ts +18 -0
- package/dist/commands/query-engine/builtins/object-builtins.d.ts +15 -0
- package/dist/commands/query-engine/builtins/path-builtins.d.ts +20 -0
- package/dist/commands/query-engine/builtins/sql-builtins.d.ts +16 -0
- package/dist/commands/query-engine/builtins/string-builtins.d.ts +15 -0
- package/dist/commands/query-engine/builtins/type-builtins.d.ts +11 -0
- package/dist/commands/query-engine/evaluator.d.ts +62 -0
- package/dist/commands/query-engine/index.d.ts +8 -0
- package/dist/commands/query-engine/json-output.d.ts +11 -0
- package/dist/commands/query-engine/parser-types.d.ts +171 -0
- package/dist/commands/query-engine/parser.d.ts +14 -0
- package/dist/commands/query-engine/path-operations.d.ts +15 -0
- package/dist/commands/query-engine/safe-object.d.ts +84 -0
- package/dist/commands/query-engine/value-operations.d.ts +44 -0
- package/dist/commands/readlink/readlink.d.ts +4 -0
- package/dist/commands/registry.d.ts +56 -0
- package/dist/commands/rev/rev.d.ts +13 -0
- package/dist/commands/rg/file-types.d.ts +49 -0
- package/dist/commands/rg/gitignore.d.ts +98 -0
- package/dist/commands/rg/rg-options.d.ts +61 -0
- package/dist/commands/rg/rg-parser.d.ts +20 -0
- package/dist/commands/rg/rg-search.d.ts +15 -0
- package/dist/commands/rg/rg.d.ts +14 -0
- package/dist/commands/rm/rm.d.ts +4 -0
- package/dist/commands/rmdir/rmdir.d.ts +4 -0
- package/dist/commands/search-engine/index.d.ts +10 -0
- package/dist/commands/search-engine/matcher.d.ts +72 -0
- package/dist/commands/search-engine/regex.d.ts +46 -0
- package/dist/commands/sed/executor.d.ts +7 -0
- package/dist/commands/sed/lexer.d.ts +88 -0
- package/dist/commands/sed/parser.d.ts +21 -0
- package/dist/commands/sed/sed-regex.d.ts +23 -0
- package/dist/commands/sed/sed.d.ts +4 -0
- package/dist/commands/sed/types.d.ts +216 -0
- package/dist/commands/seq/seq.d.ts +16 -0
- package/dist/commands/sleep/sleep.d.ts +4 -0
- package/dist/commands/sort/comparator.d.ts +9 -0
- package/dist/commands/sort/parser.d.ts +11 -0
- package/dist/commands/sort/sort.d.ts +4 -0
- package/dist/commands/sort/types.d.ts +30 -0
- package/dist/commands/split/split.d.ts +12 -0
- package/dist/commands/sqlite3/formatters.d.ts +17 -0
- package/dist/commands/sqlite3/sqlite3.d.ts +24 -0
- package/dist/commands/sqlite3/worker.d.ts +50 -0
- package/dist/commands/sqlite3/worker.js +1928 -0
- package/dist/commands/stat/stat.d.ts +4 -0
- package/dist/commands/strings/strings.d.ts +12 -0
- package/dist/commands/tac/tac.d.ts +11 -0
- package/dist/commands/tail/tail.d.ts +4 -0
- package/dist/commands/tar/archive.d.ts +150 -0
- package/dist/commands/tar/bzip2-compress.d.ts +18 -0
- package/dist/commands/tar/tar-options.d.ts +37 -0
- package/dist/commands/tar/tar.d.ts +10 -0
- package/dist/commands/tee/tee.d.ts +4 -0
- package/dist/commands/time/time.d.ts +27 -0
- package/dist/commands/timeout/timeout.d.ts +4 -0
- package/dist/commands/touch/touch.d.ts +4 -0
- package/dist/commands/tr/tr.d.ts +4 -0
- package/dist/commands/tree/tree.d.ts +4 -0
- package/dist/commands/true/true.d.ts +6 -0
- package/dist/commands/uniq/uniq.d.ts +4 -0
- package/dist/commands/wc/wc.d.ts +4 -0
- package/dist/commands/which/which.d.ts +4 -0
- package/dist/commands/whoami/whoami.d.ts +11 -0
- package/dist/commands/worker-bridge/bridge-handler.d.ts +73 -0
- package/dist/commands/worker-bridge/protocol.d.ts +141 -0
- package/dist/commands/worker-bridge/sync-backend.d.ts +86 -0
- package/dist/commands/worker-request-controller.d.ts +36 -0
- package/dist/commands/xan/aggregation.d.ts +30 -0
- package/dist/commands/xan/bounded-output.d.ts +4 -0
- package/dist/commands/xan/column-selection.d.ts +20 -0
- package/dist/commands/xan/csv.d.ts +62 -0
- package/dist/commands/xan/moonblade-parser.d.ts +89 -0
- package/dist/commands/xan/moonblade-to-jq.d.ts +12 -0
- package/dist/commands/xan/moonblade-tokenizer.d.ts +32 -0
- package/dist/commands/xan/subcommands.d.ts +15 -0
- package/dist/commands/xan/xan-agg.d.ts +8 -0
- package/dist/commands/xan/xan-columns.d.ts +8 -0
- package/dist/commands/xan/xan-core.d.ts +10 -0
- package/dist/commands/xan/xan-data.d.ts +52 -0
- package/dist/commands/xan/xan-filter.d.ts +8 -0
- package/dist/commands/xan/xan-map.d.ts +11 -0
- package/dist/commands/xan/xan-reshape.d.ts +40 -0
- package/dist/commands/xan/xan-simple.d.ts +40 -0
- package/dist/commands/xan/xan-view.d.ts +12 -0
- package/dist/commands/xan/xan.d.ts +10 -0
- package/dist/commands/xargs/xargs.d.ts +4 -0
- package/dist/commands/yq/formats.d.ts +65 -0
- package/dist/commands/yq/yq.d.ts +13 -0
- package/dist/custom-commands.d.ts +65 -0
- package/dist/encoding.d.ts +131 -0
- package/dist/execution-output.d.ts +28 -0
- package/dist/execution-scope.d.ts +110 -0
- package/dist/fatal-execution-error.d.ts +27 -0
- package/dist/fs/encoding.d.ts +17 -0
- package/dist/fs/identity.d.ts +9 -0
- package/dist/fs/in-memory-fs/in-memory-fs.d.ts +98 -0
- package/dist/fs/in-memory-fs/index.d.ts +1 -0
- package/dist/fs/init.d.ts +22 -0
- package/dist/fs/interface.d.ts +255 -0
- package/dist/fs/mountable-fs/index.d.ts +1 -0
- package/dist/fs/mountable-fs/mountable-fs.d.ts +118 -0
- package/dist/fs/overlay-fs/apply.d.ts +22 -0
- package/dist/fs/overlay-fs/index.d.ts +1 -0
- package/dist/fs/overlay-fs/overlay-fs.d.ts +360 -0
- package/dist/fs/overlay-fs/overlay-tree.d.ts +188 -0
- package/dist/fs/path-utils.d.ts +48 -0
- package/dist/fs/read-write-fs/index.d.ts +1 -0
- package/dist/fs/read-write-fs/read-write-fs.d.ts +150 -0
- package/dist/fs/real-fs-utils.d.ts +90 -0
- package/dist/fs/sanitize-error.d.ts +19 -0
- package/dist/fs/traversal.d.ts +98 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/interpreter/alias-expansion.d.ts +27 -0
- package/dist/interpreter/arithmetic.d.ts +24 -0
- package/dist/interpreter/assignment-expansion.d.ts +24 -0
- package/dist/interpreter/builtin-dispatch.d.ts +46 -0
- package/dist/interpreter/builtins/break.d.ts +6 -0
- package/dist/interpreter/builtins/cd.d.ts +6 -0
- package/dist/interpreter/builtins/compgen.d.ts +26 -0
- package/dist/interpreter/builtins/complete.d.ts +17 -0
- package/dist/interpreter/builtins/compopt.d.ts +28 -0
- package/dist/interpreter/builtins/continue.d.ts +6 -0
- package/dist/interpreter/builtins/declare-array-parsing.d.ts +18 -0
- package/dist/interpreter/builtins/declare-print.d.ts +39 -0
- package/dist/interpreter/builtins/declare.d.ts +35 -0
- package/dist/interpreter/builtins/dirs.d.ts +29 -0
- package/dist/interpreter/builtins/eval.d.ts +15 -0
- package/dist/interpreter/builtins/exit.d.ts +5 -0
- package/dist/interpreter/builtins/export.d.ts +14 -0
- package/dist/interpreter/builtins/getopts.d.ts +18 -0
- package/dist/interpreter/builtins/hash.d.ts +19 -0
- package/dist/interpreter/builtins/help.d.ts +12 -0
- package/dist/interpreter/builtins/index.d.ts +44 -0
- package/dist/interpreter/builtins/let.d.ts +18 -0
- package/dist/interpreter/builtins/local.d.ts +6 -0
- package/dist/interpreter/builtins/mapfile.d.ts +17 -0
- package/dist/interpreter/builtins/read.d.ts +6 -0
- package/dist/interpreter/builtins/return.d.ts +6 -0
- package/dist/interpreter/builtins/set.d.ts +9 -0
- package/dist/interpreter/builtins/shift.d.ts +15 -0
- package/dist/interpreter/builtins/shopt.d.ts +7 -0
- package/dist/interpreter/builtins/source.d.ts +6 -0
- package/dist/interpreter/builtins/unset.d.ts +16 -0
- package/dist/interpreter/builtins/variable-assignment.d.ts +69 -0
- package/dist/interpreter/command-analysis.d.ts +30 -0
- package/dist/interpreter/command-resolution.d.ts +43 -0
- package/dist/interpreter/conditionals.d.ts +17 -0
- package/dist/interpreter/control-flow.d.ts +21 -0
- package/dist/interpreter/defense-aware-command-context.d.ts +6 -0
- package/dist/interpreter/errors.d.ts +161 -0
- package/dist/interpreter/expansion/analysis.d.ts +37 -0
- package/dist/interpreter/expansion/arith-text-expansion.d.ts +20 -0
- package/dist/interpreter/expansion/array-pattern-ops.d.ts +21 -0
- package/dist/interpreter/expansion/array-prefix-suffix.d.ts +46 -0
- package/dist/interpreter/expansion/array-slice-transform.d.ts +36 -0
- package/dist/interpreter/expansion/array-word-expansion.d.ts +39 -0
- package/dist/interpreter/expansion/brace-range.d.ts +24 -0
- package/dist/interpreter/expansion/command-substitution.d.ts +23 -0
- package/dist/interpreter/expansion/glob-escape.d.ts +32 -0
- package/dist/interpreter/expansion/indirect-expansion.d.ts +42 -0
- package/dist/interpreter/expansion/parameter-ops.d.ts +113 -0
- package/dist/interpreter/expansion/pattern-expansion.d.ts +23 -0
- package/dist/interpreter/expansion/pattern-removal.d.ts +17 -0
- package/dist/interpreter/expansion/pattern-replacement.d.ts +4 -0
- package/dist/interpreter/expansion/pattern.d.ts +23 -0
- package/dist/interpreter/expansion/positional-params.d.ts +59 -0
- package/dist/interpreter/expansion/prompt.d.ts +39 -0
- package/dist/interpreter/expansion/quoting.d.ts +13 -0
- package/dist/interpreter/expansion/tilde.d.ts +14 -0
- package/dist/interpreter/expansion/unquoted-expansion.d.ts +76 -0
- package/dist/interpreter/expansion/variable-attrs.d.ts +19 -0
- package/dist/interpreter/expansion/variable.d.ts +36 -0
- package/dist/interpreter/expansion/word-glob-expansion.d.ts +33 -0
- package/dist/interpreter/expansion/word-split.d.ts +29 -0
- package/dist/interpreter/expansion.d.ts +53 -0
- package/dist/interpreter/fd-table.d.ts +130 -0
- package/dist/interpreter/functions.d.ts +14 -0
- package/dist/interpreter/helpers/array.d.ts +56 -0
- package/dist/interpreter/helpers/bounded-array.d.ts +2 -0
- package/dist/interpreter/helpers/condition.d.ts +19 -0
- package/dist/interpreter/helpers/errors.d.ts +8 -0
- package/dist/interpreter/helpers/file-tests.d.ts +33 -0
- package/dist/interpreter/helpers/ifs.d.ts +104 -0
- package/dist/interpreter/helpers/loop.d.ts +24 -0
- package/dist/interpreter/helpers/nameref.d.ts +65 -0
- package/dist/interpreter/helpers/numeric-compare.d.ts +13 -0
- package/dist/interpreter/helpers/quoting.d.ts +26 -0
- package/dist/interpreter/helpers/readonly.d.ts +45 -0
- package/dist/interpreter/helpers/regex.d.ts +8 -0
- package/dist/interpreter/helpers/result.d.ts +60 -0
- package/dist/interpreter/helpers/shell-constants.d.ts +41 -0
- package/dist/interpreter/helpers/shellopts.d.ts +28 -0
- package/dist/interpreter/helpers/string-compare.d.ts +24 -0
- package/dist/interpreter/helpers/string-tests.d.ts +13 -0
- package/dist/interpreter/helpers/variable-tests.d.ts +9 -0
- package/dist/interpreter/helpers/word-matching.d.ts +16 -0
- package/dist/interpreter/helpers/word-parts.d.ts +22 -0
- package/dist/interpreter/helpers/xtrace.d.ts +18 -0
- package/dist/interpreter/index.d.ts +3 -0
- package/dist/interpreter/interpreter.d.ts +82 -0
- package/dist/interpreter/numeric-fd-redirects.d.ts +8 -0
- package/dist/interpreter/pipeline-execution.d.ts +16 -0
- package/dist/interpreter/process-substitution.d.ts +62 -0
- package/dist/interpreter/redirections.d.ts +50 -0
- package/dist/interpreter/simple-command-assignments.d.ts +36 -0
- package/dist/interpreter/state-transaction.d.ts +7 -0
- package/dist/interpreter/subshell-group.d.ts +40 -0
- package/dist/interpreter/type-command.d.ts +37 -0
- package/dist/interpreter/types.d.ts +402 -0
- package/dist/limits.d.ts +111 -0
- package/dist/network/allow-list/shared.d.ts +49 -0
- package/dist/network/allow-list.d.ts +59 -0
- package/dist/network/dns-pin.d.ts +42 -0
- package/dist/network/fetch.d.ts +27 -0
- package/dist/network/index.d.ts +7 -0
- package/dist/network/types.d.ts +182 -0
- package/dist/parser/arithmetic-parser.d.ts +23 -0
- package/dist/parser/arithmetic-primaries.d.ts +45 -0
- package/dist/parser/command-parser.d.ts +10 -0
- package/dist/parser/compound-parser.d.ts +28 -0
- package/dist/parser/conditional-parser.d.ts +8 -0
- package/dist/parser/expansion-parser.d.ts +18 -0
- package/dist/parser/lexer.d.ts +195 -0
- package/dist/parser/parser-substitution.d.ts +85 -0
- package/dist/parser/parser.d.ts +152 -0
- package/dist/parser/types.d.ts +40 -0
- package/dist/parser/word-parser.d.ts +35 -0
- package/dist/sandbox/Command.d.ts +35 -0
- package/dist/sandbox/Sandbox.d.ts +121 -0
- package/dist/sandbox/index.d.ts +2 -0
- package/dist/security/blocked-globals.d.ts +60 -0
- package/dist/security/defense-context.d.ts +13 -0
- package/dist/security/defense-in-depth-box.d.ts +354 -0
- package/dist/security/index.d.ts +33 -0
- package/dist/security/safe-timestamp.d.ts +1 -0
- package/dist/security/security-violation-logger.d.ts +99 -0
- package/dist/security/trusted-globals.d.ts +17 -0
- package/dist/security/types.d.ts +151 -0
- package/dist/security/violation-error-message.d.ts +3 -0
- package/dist/security/wasm-callback.d.ts +6 -0
- package/dist/security/worker-defense-in-depth.d.ts +228 -0
- package/dist/shell-metadata.d.ts +25 -0
- package/dist/source-limit.d.ts +2 -0
- package/dist/timers.d.ts +16 -0
- package/dist/transform/pipeline.d.ts +8 -0
- package/dist/transform/plugins/command-collector.d.ts +8 -0
- package/dist/transform/plugins/tee-plugin.d.ts +40 -0
- package/dist/transform/serialize.d.ts +4 -0
- package/dist/transform/types.d.ts +18 -0
- package/dist/types.d.ts +319 -0
- package/dist/utils/args.d.ts +55 -0
- package/dist/utils/constants.d.ts +15 -0
- package/dist/utils/file-reader.d.ts +76 -0
- package/dist/utils/glob.d.ts +25 -0
- package/dist/vitest-setup.d.ts +1 -0
- package/package.json +136 -0
- package/vendor/cpython-emscripten/python.cjs +2 -0
- package/vendor/cpython-emscripten/python.wasm +0 -0
- package/vendor/cpython-emscripten/python313.zip +0 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lexer for Bash Scripts
|
|
3
|
+
*
|
|
4
|
+
* The lexer tokenizes input into a stream of tokens that the parser consumes.
|
|
5
|
+
* It handles:
|
|
6
|
+
* - Operators and delimiters
|
|
7
|
+
* - Words (with quoting rules)
|
|
8
|
+
* - Comments
|
|
9
|
+
* - Here-documents
|
|
10
|
+
* - Escape sequences
|
|
11
|
+
*/
|
|
12
|
+
export interface LexerOptions {
|
|
13
|
+
/** Maximum heredoc size in bytes (default: 10MB) */
|
|
14
|
+
maxHeredocSize?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare enum TokenType {
|
|
17
|
+
EOF = "EOF",
|
|
18
|
+
NEWLINE = "NEWLINE",
|
|
19
|
+
SEMICOLON = "SEMICOLON",
|
|
20
|
+
AMP = "AMP",// &
|
|
21
|
+
PIPE = "PIPE",// |
|
|
22
|
+
PIPE_AMP = "PIPE_AMP",// |&
|
|
23
|
+
AND_AND = "AND_AND",// &&
|
|
24
|
+
OR_OR = "OR_OR",// ||
|
|
25
|
+
BANG = "BANG",// !
|
|
26
|
+
LESS = "LESS",// <
|
|
27
|
+
GREAT = "GREAT",// >
|
|
28
|
+
DLESS = "DLESS",// <<
|
|
29
|
+
DGREAT = "DGREAT",// >>
|
|
30
|
+
LESSAND = "LESSAND",// <&
|
|
31
|
+
GREATAND = "GREATAND",// >&
|
|
32
|
+
LESSGREAT = "LESSGREAT",// <>
|
|
33
|
+
DLESSDASH = "DLESSDASH",// <<-
|
|
34
|
+
CLOBBER = "CLOBBER",// >|
|
|
35
|
+
TLESS = "TLESS",// <<<
|
|
36
|
+
AND_GREAT = "AND_GREAT",// &>
|
|
37
|
+
AND_DGREAT = "AND_DGREAT",// &>>
|
|
38
|
+
LPAREN = "LPAREN",// (
|
|
39
|
+
RPAREN = "RPAREN",// )
|
|
40
|
+
LBRACE = "LBRACE",// {
|
|
41
|
+
RBRACE = "RBRACE",// }
|
|
42
|
+
DSEMI = "DSEMI",// ;;
|
|
43
|
+
SEMI_AND = "SEMI_AND",// ;&
|
|
44
|
+
SEMI_SEMI_AND = "SEMI_SEMI_AND",// ;;&
|
|
45
|
+
DBRACK_START = "DBRACK_START",// [[
|
|
46
|
+
DBRACK_END = "DBRACK_END",// ]]
|
|
47
|
+
DPAREN_START = "DPAREN_START",// ((
|
|
48
|
+
DPAREN_END = "DPAREN_END",// ))
|
|
49
|
+
IF = "IF",
|
|
50
|
+
THEN = "THEN",
|
|
51
|
+
ELSE = "ELSE",
|
|
52
|
+
ELIF = "ELIF",
|
|
53
|
+
FI = "FI",
|
|
54
|
+
FOR = "FOR",
|
|
55
|
+
WHILE = "WHILE",
|
|
56
|
+
UNTIL = "UNTIL",
|
|
57
|
+
DO = "DO",
|
|
58
|
+
DONE = "DONE",
|
|
59
|
+
CASE = "CASE",
|
|
60
|
+
ESAC = "ESAC",
|
|
61
|
+
IN = "IN",
|
|
62
|
+
FUNCTION = "FUNCTION",
|
|
63
|
+
SELECT = "SELECT",
|
|
64
|
+
TIME = "TIME",
|
|
65
|
+
COPROC = "COPROC",
|
|
66
|
+
WORD = "WORD",
|
|
67
|
+
NAME = "NAME",// Valid variable name
|
|
68
|
+
NUMBER = "NUMBER",// For redirections like 2>&1
|
|
69
|
+
ASSIGNMENT_WORD = "ASSIGNMENT_WORD",// VAR=value
|
|
70
|
+
FD_VARIABLE = "FD_VARIABLE",// {varname} before redirect operator
|
|
71
|
+
COMMENT = "COMMENT",
|
|
72
|
+
HEREDOC_CONTENT = "HEREDOC_CONTENT"
|
|
73
|
+
}
|
|
74
|
+
export interface Token {
|
|
75
|
+
type: TokenType;
|
|
76
|
+
value: string;
|
|
77
|
+
/** Original position in input */
|
|
78
|
+
start: number;
|
|
79
|
+
end: number;
|
|
80
|
+
line: number;
|
|
81
|
+
column: number;
|
|
82
|
+
/** For WORD tokens: quote information */
|
|
83
|
+
quoted?: boolean;
|
|
84
|
+
singleQuoted?: boolean;
|
|
85
|
+
/** Quote-removed value for a here-document delimiter token. */
|
|
86
|
+
heredocDelimiter?: string;
|
|
87
|
+
/** Whether a here-document content token ended at its delimiter. */
|
|
88
|
+
heredocTerminated?: boolean;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Error thrown when the lexer encounters invalid input
|
|
92
|
+
*/
|
|
93
|
+
export declare class LexerError extends Error {
|
|
94
|
+
line: number;
|
|
95
|
+
column: number;
|
|
96
|
+
constructor(message: string, line: number, column: number);
|
|
97
|
+
}
|
|
98
|
+
export declare function isReservedWordToken(type: TokenType): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Lexer class
|
|
101
|
+
*/
|
|
102
|
+
export declare class Lexer {
|
|
103
|
+
private input;
|
|
104
|
+
private pos;
|
|
105
|
+
private line;
|
|
106
|
+
private column;
|
|
107
|
+
private tokens;
|
|
108
|
+
private pendingHeredocs;
|
|
109
|
+
private pendingHeredocDelimiterMode;
|
|
110
|
+
private dparenDepth;
|
|
111
|
+
private maxHeredocSize;
|
|
112
|
+
constructor(input: string, options?: LexerOptions);
|
|
113
|
+
/**
|
|
114
|
+
* Tokenize the entire input
|
|
115
|
+
*/
|
|
116
|
+
tokenize(): Token[];
|
|
117
|
+
private skipWhitespace;
|
|
118
|
+
private nextToken;
|
|
119
|
+
/**
|
|
120
|
+
* Look ahead from position after (( to determine if this is nested subshells
|
|
121
|
+
* like ((cmd) || (cmd2)) rather than arithmetic like ((1+2)).
|
|
122
|
+
*
|
|
123
|
+
* Returns true if it looks like nested subshells (command invocation).
|
|
124
|
+
*/
|
|
125
|
+
private looksLikeNestedSubshells;
|
|
126
|
+
private makeToken;
|
|
127
|
+
private readComment;
|
|
128
|
+
private readWord;
|
|
129
|
+
private readHeredocContent;
|
|
130
|
+
private readHeredocDelimiterToken;
|
|
131
|
+
/**
|
|
132
|
+
* Check if position is followed by word characters (not a word boundary).
|
|
133
|
+
* Used to determine if } should be literal or RBRACE token.
|
|
134
|
+
*/
|
|
135
|
+
private isWordCharFollowing;
|
|
136
|
+
/**
|
|
137
|
+
* Read a word that starts with a brace expansion.
|
|
138
|
+
* Includes the brace expansion plus any suffix characters and additional brace expansions.
|
|
139
|
+
*/
|
|
140
|
+
private readWordWithBraceExpansion;
|
|
141
|
+
/**
|
|
142
|
+
* Scan ahead to detect brace expansion pattern.
|
|
143
|
+
* Returns the full brace expansion string if found, null otherwise.
|
|
144
|
+
* Brace expansion must contain either:
|
|
145
|
+
* - A comma (e.g., {a,b,c})
|
|
146
|
+
* - A range with .. (e.g., {1..10})
|
|
147
|
+
*/
|
|
148
|
+
private scanBraceExpansion;
|
|
149
|
+
/**
|
|
150
|
+
* Scan a literal brace word like {foo} (no comma, no range).
|
|
151
|
+
* Returns the literal string if found, null otherwise.
|
|
152
|
+
* This is used when {} contains something but it's not a valid brace expansion.
|
|
153
|
+
*/
|
|
154
|
+
private scanLiteralBraceWord;
|
|
155
|
+
/**
|
|
156
|
+
* Scan an extglob pattern starting at the opening parenthesis.
|
|
157
|
+
* Extglob patterns are: @(...), *(...), +(...), ?(...), !(...)
|
|
158
|
+
* The operator (@, *, +, ?, !) is already consumed; we start at the (.
|
|
159
|
+
* Returns the content including parentheses, or null if not a valid extglob.
|
|
160
|
+
*/
|
|
161
|
+
private scanExtglobPattern;
|
|
162
|
+
/**
|
|
163
|
+
* Scan for FD variable syntax: {varname} immediately followed by a redirect operator.
|
|
164
|
+
* This is the bash 4.1+ feature where {fd}>file allocates an FD and stores it in variable.
|
|
165
|
+
* Returns the variable name and end position if found, null otherwise.
|
|
166
|
+
*
|
|
167
|
+
* Valid patterns:
|
|
168
|
+
* - {varname}>file, {varname}>>file, {varname}>|file
|
|
169
|
+
* - {varname}<file, {varname}<<word, {varname}<<<word
|
|
170
|
+
* - {varname}<>file
|
|
171
|
+
* - {varname}>&N, {varname}<&N
|
|
172
|
+
* - {varname}>&-, {varname}<&- (close FD)
|
|
173
|
+
*/
|
|
174
|
+
private scanFdVariable;
|
|
175
|
+
/**
|
|
176
|
+
* Scan ahead from a $(( position to determine if it should be treated as
|
|
177
|
+
* $( ( subshell ) ) instead of $(( arithmetic )).
|
|
178
|
+
* This handles cases like:
|
|
179
|
+
* echo $(( echo 1
|
|
180
|
+
* echo 2
|
|
181
|
+
* ) )
|
|
182
|
+
* which should be a command substitution containing a subshell, not arithmetic.
|
|
183
|
+
*
|
|
184
|
+
* @param startPos - position at the second ( (i.e., at input[startPos] === "(")
|
|
185
|
+
* @returns true if this is a subshell (closes with ) )), false if arithmetic (closes with )))
|
|
186
|
+
*/
|
|
187
|
+
private dollarDparenIsSubshell;
|
|
188
|
+
/**
|
|
189
|
+
* Scan ahead from a (( position to determine if it closes with ) ) (nested subshells)
|
|
190
|
+
* or )) (arithmetic). We need to track paren depth and quotes to find the matching close.
|
|
191
|
+
* @param startPos - position after the (( (i.e., at the first char of content)
|
|
192
|
+
* @returns true if it closes with ) ) (space between parens), false otherwise
|
|
193
|
+
*/
|
|
194
|
+
private dparenClosesWithSpacedParens;
|
|
195
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command and Arithmetic Substitution Parsing Helpers
|
|
3
|
+
*
|
|
4
|
+
* Contains pure string analysis functions and substitution parsing utilities
|
|
5
|
+
* extracted from the main parser.
|
|
6
|
+
*/
|
|
7
|
+
import { type CommandSubstitutionPart, type ProcessSubstitutionPart, type ScriptNode } from "../ast/types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Type for a parser factory function that creates new parser instances.
|
|
10
|
+
* Used to avoid circular dependencies.
|
|
11
|
+
*/
|
|
12
|
+
export type ParserFactory = () => {
|
|
13
|
+
parse(input: string): ScriptNode;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Type for an error reporting function.
|
|
17
|
+
*/
|
|
18
|
+
export type ErrorFn = (message: string) => never;
|
|
19
|
+
/**
|
|
20
|
+
* Check if $(( at position `start` in `value` is a command substitution with nested
|
|
21
|
+
* subshell rather than arithmetic expansion. This uses similar logic to the lexer's
|
|
22
|
+
* dparenClosesWithSpacedParens but operates on a string within a word/expansion.
|
|
23
|
+
*
|
|
24
|
+
* The key heuristics are:
|
|
25
|
+
* 1. If it closes with `) )` (separated by whitespace or content), it's a subshell
|
|
26
|
+
* 2. If at depth 1 we see `||`, `&&`, or single `|`, it's a command context
|
|
27
|
+
* 3. If it closes with `))`, it's arithmetic
|
|
28
|
+
*
|
|
29
|
+
* @param value The string containing the expansion
|
|
30
|
+
* @param start Position of the `$` in `$((` (so `$((` is at start..start+2)
|
|
31
|
+
* @returns true if this should be parsed as command substitution, false for arithmetic
|
|
32
|
+
*/
|
|
33
|
+
export declare function isDollarDparenSubshell(value: string, start: number): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Read a heredoc delimiter starting at `pos` (the first character after the
|
|
36
|
+
* `<<` / `<<-` operator and any leading blanks). Returns the delimiter after
|
|
37
|
+
* outer-word quote removal, plus metadata needed by both the lexer and nested
|
|
38
|
+
* substitution scanner. Syntax inside unexpanded `$(`, `<(`, and `>(` atoms
|
|
39
|
+
* remains literal.
|
|
40
|
+
*
|
|
41
|
+
* Quoting only controls whether the body is expanded, which is irrelevant to
|
|
42
|
+
* finding the substitution boundary, so `'EOF'`, `"EOF"`, and `\EOF` all yield
|
|
43
|
+
* the delimiter `EOF`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function readHeredocDelimiter(value: string, pos: number): {
|
|
46
|
+
delim: string;
|
|
47
|
+
endPos: number;
|
|
48
|
+
quoted: boolean;
|
|
49
|
+
unclosedQuote: "'" | '"' | undefined;
|
|
50
|
+
unclosedSubstitution: boolean;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Parse a command substitution starting at the given position.
|
|
54
|
+
* Handles $(...) syntax with proper depth tracking for nested substitutions.
|
|
55
|
+
*
|
|
56
|
+
* @param value The string containing the substitution
|
|
57
|
+
* @param start Position of the `$` in `$(`
|
|
58
|
+
* @param createParser Factory function to create a new parser instance
|
|
59
|
+
* @param error Error reporting function
|
|
60
|
+
* @returns The parsed command substitution part and the ending index
|
|
61
|
+
*/
|
|
62
|
+
export declare function parseCommandSubstitutionFromString(value: string, start: number, createParser: ParserFactory, error: ErrorFn): {
|
|
63
|
+
part: CommandSubstitutionPart;
|
|
64
|
+
endIndex: number;
|
|
65
|
+
};
|
|
66
|
+
/** Parse process substitution syntax found inside a recursively parsed word fragment. */
|
|
67
|
+
export declare function parseProcessSubstitutionFromString(value: string, start: number, createParser: ParserFactory, error: ErrorFn): {
|
|
68
|
+
part: ProcessSubstitutionPart;
|
|
69
|
+
endIndex: number;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Parse a backtick command substitution starting at the given position.
|
|
73
|
+
* Handles `...` syntax with proper escape processing.
|
|
74
|
+
*
|
|
75
|
+
* @param value The string containing the substitution
|
|
76
|
+
* @param start Position of the opening backtick
|
|
77
|
+
* @param inDoubleQuotes Whether the backtick is inside double quotes
|
|
78
|
+
* @param createParser Factory function to create a new parser instance
|
|
79
|
+
* @param error Error reporting function
|
|
80
|
+
* @returns The parsed command substitution part and the ending index
|
|
81
|
+
*/
|
|
82
|
+
export declare function parseBacktickSubstitutionFromString(value: string, start: number, inDoubleQuotes: boolean, createParser: ParserFactory, error: ErrorFn): {
|
|
83
|
+
part: CommandSubstitutionPart;
|
|
84
|
+
endIndex: number;
|
|
85
|
+
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursive Descent Parser for Bash Scripts
|
|
3
|
+
*
|
|
4
|
+
* This parser consumes tokens from the lexer and produces an AST.
|
|
5
|
+
* It follows the bash grammar structure for correctness.
|
|
6
|
+
*
|
|
7
|
+
* Grammar (simplified):
|
|
8
|
+
* script ::= statement*
|
|
9
|
+
* statement ::= pipeline ((&&|'||') pipeline)* [&]
|
|
10
|
+
* pipeline ::= [!] command (| command)*
|
|
11
|
+
* command ::= simple_command | compound_command | function_def
|
|
12
|
+
* simple_cmd ::= (assignment)* [word] (word)* (redirection)*
|
|
13
|
+
* compound_cmd ::= if | for | while | until | case | subshell | group | (( | [[
|
|
14
|
+
*/
|
|
15
|
+
import { type ArithmeticExpansionPart, type ArithmeticExpressionNode, type CommandSubstitutionPart, type ProcessSubstitutionPart, type RedirectionNode, type ScriptNode, type StatementNode, type WordNode, type WordPart } from "../ast/types.js";
|
|
16
|
+
import { type LexerOptions, type Token, TokenType } from "./lexer.js";
|
|
17
|
+
import { ParseBudget, WordParseContext } from "./types.js";
|
|
18
|
+
export type { ParseError } from "./types.js";
|
|
19
|
+
export { ParseException } from "./types.js";
|
|
20
|
+
/**
|
|
21
|
+
* Parser class - transforms tokens into AST
|
|
22
|
+
*/
|
|
23
|
+
export declare class Parser {
|
|
24
|
+
private tokens;
|
|
25
|
+
private pos;
|
|
26
|
+
private pendingHeredocs;
|
|
27
|
+
private readonly parseBudget;
|
|
28
|
+
private readonly ownsParseBudget;
|
|
29
|
+
private _input;
|
|
30
|
+
private processLineState;
|
|
31
|
+
constructor(parseBudget?: ParseBudget);
|
|
32
|
+
/**
|
|
33
|
+
* Get the raw input string being parsed.
|
|
34
|
+
* Used by conditional-parser for extracting exact whitespace in regex patterns.
|
|
35
|
+
*/
|
|
36
|
+
getInput(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Check parse iteration limit to prevent infinite loops
|
|
39
|
+
*/
|
|
40
|
+
checkIterationLimit(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Increment parse depth and check limit to prevent stack overflow
|
|
43
|
+
* from deeply nested constructs. Returns a function to decrement depth.
|
|
44
|
+
*/
|
|
45
|
+
enterDepth(): () => void;
|
|
46
|
+
withDepth<T>(callback: () => T): T;
|
|
47
|
+
/**
|
|
48
|
+
* Parse a bash script string
|
|
49
|
+
*/
|
|
50
|
+
parse(input: string, options?: LexerOptions): ScriptNode;
|
|
51
|
+
/**
|
|
52
|
+
* Parse from pre-tokenized input
|
|
53
|
+
*/
|
|
54
|
+
parseTokens(tokens: Token[]): ScriptNode;
|
|
55
|
+
current(): Token;
|
|
56
|
+
peek(offset?: number): Token;
|
|
57
|
+
advance(): Token;
|
|
58
|
+
getPos(): number;
|
|
59
|
+
getSourceLine(token?: Token): number;
|
|
60
|
+
/**
|
|
61
|
+
* Check if current token matches any of the given types.
|
|
62
|
+
* Optimized to avoid array allocation for common cases (1-4 args).
|
|
63
|
+
*/
|
|
64
|
+
check(t1: TokenType, t2?: TokenType, t3?: TokenType, t4?: TokenType, ...rest: TokenType[]): boolean;
|
|
65
|
+
expect(type: TokenType, message?: string): Token;
|
|
66
|
+
error(message: string): never;
|
|
67
|
+
skipNewlines(): void;
|
|
68
|
+
skipSeparators(includeCaseTerminators?: boolean): void;
|
|
69
|
+
addPendingHeredoc(redirect: RedirectionNode, delimiter: string, stripTabs: boolean, quoted: boolean): void;
|
|
70
|
+
private processHeredocs;
|
|
71
|
+
isStatementEnd(): boolean;
|
|
72
|
+
private isCommandStart;
|
|
73
|
+
private parseScript;
|
|
74
|
+
/**
|
|
75
|
+
* Check for unexpected tokens that can't appear at statement start.
|
|
76
|
+
* Returns a deferred error statement for tokens that should cause errors
|
|
77
|
+
* at execution time rather than parse time (to match bash's incremental behavior).
|
|
78
|
+
*/
|
|
79
|
+
private checkUnexpectedToken;
|
|
80
|
+
parseStatement(): StatementNode | null;
|
|
81
|
+
private parseTimePrefix;
|
|
82
|
+
private parsePipeline;
|
|
83
|
+
private parseCommand;
|
|
84
|
+
/**
|
|
85
|
+
* Scan ahead from current DPAREN_START to determine if it closes with ) )
|
|
86
|
+
* (two separate RPAREN tokens) or )) (DPAREN_END token).
|
|
87
|
+
* Returns true if it closes with ) ) (nested subshells case).
|
|
88
|
+
*/
|
|
89
|
+
private dparenClosesWithSpacedParens;
|
|
90
|
+
/**
|
|
91
|
+
* Parse (( ... ) ) as nested subshells when we know it closes with ) ).
|
|
92
|
+
* We've already determined via dparenClosesWithSpacedParens() that this
|
|
93
|
+
* DPAREN_START should be treated as two LPAREN tokens.
|
|
94
|
+
*/
|
|
95
|
+
private parseNestedSubshellsFromDparen;
|
|
96
|
+
isWord(): boolean;
|
|
97
|
+
private isWordToken;
|
|
98
|
+
isProcessSubstitutionStart(offset?: number): boolean;
|
|
99
|
+
private currentTokenJoinsProcessSubstitution;
|
|
100
|
+
private isAdjacentWordToken;
|
|
101
|
+
parseWord(context?: WordParseContext): WordNode;
|
|
102
|
+
parseAdjacentWordParts(parts: WordPart[], previousEnd: number, context?: WordParseContext): WordNode;
|
|
103
|
+
/**
|
|
104
|
+
* Parse a word without brace expansion (for [[ ]] conditionals).
|
|
105
|
+
* In bash, brace expansion does not occur inside [[ ]].
|
|
106
|
+
*/
|
|
107
|
+
parseWordNoBraceExpansion(): WordNode;
|
|
108
|
+
/**
|
|
109
|
+
* Parse a word for regex patterns (in [[ =~ ]]).
|
|
110
|
+
* All escaped characters create Escaped nodes so the backslash is preserved
|
|
111
|
+
* for the regex engine. For example, \$ creates Escaped("$") which becomes \$
|
|
112
|
+
* in the final regex pattern.
|
|
113
|
+
*/
|
|
114
|
+
parseWordForRegex(): WordNode;
|
|
115
|
+
private parseWordToken;
|
|
116
|
+
parseWordFromString(value: string, quoted?: boolean, singleQuoted?: boolean, isAssignment?: boolean, hereDoc?: boolean, noBraceExpansion?: boolean, regexPattern?: boolean, atWordStart?: boolean): WordNode;
|
|
117
|
+
parseCommandSubstitution(value: string, start: number): {
|
|
118
|
+
part: CommandSubstitutionPart;
|
|
119
|
+
endIndex: number;
|
|
120
|
+
};
|
|
121
|
+
parseProcessSubstitutionFromString(value: string, start: number): {
|
|
122
|
+
part: ProcessSubstitutionPart;
|
|
123
|
+
endIndex: number;
|
|
124
|
+
};
|
|
125
|
+
private parseProcessSubstitution;
|
|
126
|
+
parseBacktickSubstitution(value: string, start: number,
|
|
127
|
+
/** Whether the backtick is inside double quotes */
|
|
128
|
+
inDoubleQuotes?: boolean): {
|
|
129
|
+
part: CommandSubstitutionPart;
|
|
130
|
+
endIndex: number;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Check if $(( at position `start` in `value` is a command substitution with nested
|
|
134
|
+
* subshell rather than arithmetic expansion.
|
|
135
|
+
*/
|
|
136
|
+
isDollarDparenSubshell(value: string, start: number): boolean;
|
|
137
|
+
parseArithmeticExpansion(value: string, start: number): {
|
|
138
|
+
part: ArithmeticExpansionPart;
|
|
139
|
+
endIndex: number;
|
|
140
|
+
};
|
|
141
|
+
private parseArithmeticCommand;
|
|
142
|
+
private parseConditionalCommand;
|
|
143
|
+
private parseFunctionDef;
|
|
144
|
+
private parseCompoundCommandBody;
|
|
145
|
+
parseCompoundList(): StatementNode[];
|
|
146
|
+
parseOptionalRedirections(): RedirectionNode[];
|
|
147
|
+
parseArithmeticExpression(input: string): ArithmeticExpressionNode;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Convenience function to parse a bash script
|
|
151
|
+
*/
|
|
152
|
+
export declare function parse(input: string, options?: LexerOptions): ScriptNode;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser Types and Constants
|
|
3
|
+
*
|
|
4
|
+
* Shared types, interfaces, and constants used across parser modules.
|
|
5
|
+
*/
|
|
6
|
+
import { type Token, TokenType } from "./lexer.js";
|
|
7
|
+
export declare const MAX_INPUT_SIZE = 1000000;
|
|
8
|
+
export declare const MAX_TOKENS = 100000;
|
|
9
|
+
export declare const MAX_PARSER_DEPTH = 200;
|
|
10
|
+
export declare enum WordParseContext {
|
|
11
|
+
Default = 0,
|
|
12
|
+
Assignment = 1,
|
|
13
|
+
NoBraceExpansion = 2,
|
|
14
|
+
Regex = 4
|
|
15
|
+
}
|
|
16
|
+
export declare const REDIRECTION_TOKENS: Set<TokenType>;
|
|
17
|
+
export declare const REDIRECTION_AFTER_NUMBER: Set<TokenType>;
|
|
18
|
+
export declare const REDIRECTION_AFTER_FD_VARIABLE: Set<TokenType>;
|
|
19
|
+
export interface ParseError {
|
|
20
|
+
message: string;
|
|
21
|
+
line: number;
|
|
22
|
+
column: number;
|
|
23
|
+
token?: Token;
|
|
24
|
+
}
|
|
25
|
+
export declare class ParseException extends Error {
|
|
26
|
+
line: number;
|
|
27
|
+
column: number;
|
|
28
|
+
token: Token | undefined;
|
|
29
|
+
constructor(message: string, line: number, column: number, token?: Token | undefined);
|
|
30
|
+
}
|
|
31
|
+
/** Mutable limits shared by every parser created for one top-level source. */
|
|
32
|
+
export declare class ParseBudget {
|
|
33
|
+
private iterations;
|
|
34
|
+
private tokens;
|
|
35
|
+
private depth;
|
|
36
|
+
reset(): void;
|
|
37
|
+
chargeIteration(line: number, column: number): void;
|
|
38
|
+
chargeTokens(count: number, line?: number, column?: number): void;
|
|
39
|
+
enter(line: number, column: number): () => void;
|
|
40
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Word Parsing Utilities
|
|
3
|
+
*
|
|
4
|
+
* String manipulation utilities for parsing words, expansions, and patterns.
|
|
5
|
+
* These are pure functions extracted from the Parser class.
|
|
6
|
+
*/
|
|
7
|
+
import { type ArithmeticExpressionNode, type RedirectionOperator, type WordNode, type WordPart } from "../ast/types.js";
|
|
8
|
+
import { TokenType } from "./lexer.js";
|
|
9
|
+
import type { Parser } from "./parser.js";
|
|
10
|
+
/** Lexer-level escapes in unquoted arithmetic subscripts need quote removal. */
|
|
11
|
+
export declare const quoteRemoveEscapes: (value: string) => string;
|
|
12
|
+
export declare function findTildeEnd(_p: Parser, value: string, start: number): number;
|
|
13
|
+
export declare function findMatchingBracket(_p: Parser, value: string, start: number, open: string, close: string): number;
|
|
14
|
+
export declare function findParameterOperationEnd(_p: Parser, value: string, start: number): number;
|
|
15
|
+
export declare function findPatternEnd(_p: Parser, value: string, start: number): number;
|
|
16
|
+
export declare function parseGlobPattern(_p: Parser, value: string, start: number): {
|
|
17
|
+
pattern: string;
|
|
18
|
+
endIndex: number;
|
|
19
|
+
};
|
|
20
|
+
export declare function parseAnsiCQuoted(_p: Parser, value: string, start: number): {
|
|
21
|
+
part: WordPart;
|
|
22
|
+
endIndex: number;
|
|
23
|
+
};
|
|
24
|
+
export declare function parseArithExprFromString(p: Parser, str: string): ArithmeticExpressionNode;
|
|
25
|
+
export type WordPartsParser = (p: Parser, value: string, quoted?: boolean, singleQuoted?: boolean, isAssignment?: boolean) => WordPart[];
|
|
26
|
+
export declare function tryParseBraceExpansion(p: Parser, value: string, start: number, parseWordPartsFn?: WordPartsParser): {
|
|
27
|
+
part: WordPart;
|
|
28
|
+
endIndex: number;
|
|
29
|
+
} | null;
|
|
30
|
+
/**
|
|
31
|
+
* Convert a WordNode back to a string representation.
|
|
32
|
+
* Used for reconstructing array assignment strings for declare/local.
|
|
33
|
+
*/
|
|
34
|
+
export declare function wordToString(_p: Parser, word: WordNode): string;
|
|
35
|
+
export declare function tokenToRedirectOp(_p: Parser, type: TokenType): RedirectionOperator;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Bash } from "../Bash.js";
|
|
2
|
+
export interface OutputMessage {
|
|
3
|
+
type: "stdout" | "stderr";
|
|
4
|
+
data: string;
|
|
5
|
+
timestamp: Date;
|
|
6
|
+
}
|
|
7
|
+
export declare class Command {
|
|
8
|
+
readonly cmdId: string;
|
|
9
|
+
readonly cwd: string;
|
|
10
|
+
readonly startedAt: Date;
|
|
11
|
+
exitCode: number | undefined;
|
|
12
|
+
private bashEnv;
|
|
13
|
+
private cmdLine;
|
|
14
|
+
private env?;
|
|
15
|
+
private explicitCwd;
|
|
16
|
+
private signal?;
|
|
17
|
+
private timeoutMs?;
|
|
18
|
+
private abortController;
|
|
19
|
+
private timeoutId;
|
|
20
|
+
private externalAbortListener;
|
|
21
|
+
private resultPromise;
|
|
22
|
+
constructor(bashEnv: Bash, cmdLine: string, cwd: string, env?: Record<string, string>, explicitCwd?: boolean, signal?: AbortSignal, timeoutMs?: number);
|
|
23
|
+
private setupCancellation;
|
|
24
|
+
private cleanupCancellation;
|
|
25
|
+
private execute;
|
|
26
|
+
logs(): AsyncGenerator<OutputMessage, void, unknown>;
|
|
27
|
+
wait(): Promise<CommandFinished>;
|
|
28
|
+
output(): Promise<string>;
|
|
29
|
+
stdout(): Promise<string>;
|
|
30
|
+
stderr(): Promise<string>;
|
|
31
|
+
kill(): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
export interface CommandFinished extends Command {
|
|
34
|
+
exitCode: number;
|
|
35
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { Writable } from "node:stream";
|
|
2
|
+
import { Bash, type JavaScriptConfig } from "../Bash.js";
|
|
3
|
+
import type { CommandName } from "../commands/registry.js";
|
|
4
|
+
import type { CustomCommand } from "../custom-commands.js";
|
|
5
|
+
import type { IFileSystem } from "../fs/interface.js";
|
|
6
|
+
import type { NetworkConfig, SecureFetch } from "../network/index.js";
|
|
7
|
+
import type { DefenseInDepthConfig } from "../security/types.js";
|
|
8
|
+
import type { CommandFinished } from "./Command.js";
|
|
9
|
+
import { Command } from "./Command.js";
|
|
10
|
+
export interface SandboxOptions {
|
|
11
|
+
cwd?: string;
|
|
12
|
+
env?: Record<string, string>;
|
|
13
|
+
timeoutMs?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Custom filesystem implementation.
|
|
16
|
+
* Mutually exclusive with `overlayRoot`.
|
|
17
|
+
*/
|
|
18
|
+
fs?: IFileSystem;
|
|
19
|
+
/**
|
|
20
|
+
* Path to a directory to use as the root of an OverlayFs.
|
|
21
|
+
* Reads come from this directory, writes stay in memory.
|
|
22
|
+
* Mutually exclusive with `fs`.
|
|
23
|
+
*/
|
|
24
|
+
overlayRoot?: string;
|
|
25
|
+
maxCallDepth?: number;
|
|
26
|
+
maxCommandCount?: number;
|
|
27
|
+
maxLoopIterations?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Network configuration for commands like curl.
|
|
30
|
+
* Network access is disabled by default - you must explicitly configure allowed URLs.
|
|
31
|
+
*/
|
|
32
|
+
network?: NetworkConfig;
|
|
33
|
+
/**
|
|
34
|
+
* Defense-in-depth configuration. Defaults to true (enabled).
|
|
35
|
+
* Monkey-patches dangerous JavaScript globals during bash execution.
|
|
36
|
+
*/
|
|
37
|
+
defenseInDepth?: DefenseInDepthConfig | boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Enable the python3/python commands. Disabled by default: Python adds
|
|
40
|
+
* security surface (arbitrary code execution via CPython). Forwarded to
|
|
41
|
+
* the underlying `Bash`.
|
|
42
|
+
*/
|
|
43
|
+
python?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Enable the js-exec command (sandboxed JavaScript via QuickJS). Accepts a
|
|
46
|
+
* boolean or a {@link JavaScriptConfig} (bootstrap code / `invokeTool`
|
|
47
|
+
* hook). Disabled by default. Forwarded to the underlying `Bash`.
|
|
48
|
+
*/
|
|
49
|
+
javascript?: boolean | JavaScriptConfig;
|
|
50
|
+
/**
|
|
51
|
+
* Restrict the registered command set. When omitted, all built-in commands
|
|
52
|
+
* are available; pass a list to allow only those. Forwarded to the
|
|
53
|
+
* underlying `Bash`.
|
|
54
|
+
*/
|
|
55
|
+
commands?: CommandName[];
|
|
56
|
+
/**
|
|
57
|
+
* Custom commands registered alongside the built-ins (these take precedence
|
|
58
|
+
* over built-ins with the same name). Forwarded to the underlying `Bash`.
|
|
59
|
+
*/
|
|
60
|
+
customCommands?: CustomCommand[];
|
|
61
|
+
/**
|
|
62
|
+
* Custom secure fetch implementation used instead of one derived from
|
|
63
|
+
* `network`. Providing either `fetch` or `network` registers the network
|
|
64
|
+
* commands (curl, wget). Forwarded to the underlying `Bash`.
|
|
65
|
+
*/
|
|
66
|
+
fetch?: SecureFetch;
|
|
67
|
+
}
|
|
68
|
+
export interface RunCommandParams {
|
|
69
|
+
cmd: string;
|
|
70
|
+
args?: string[];
|
|
71
|
+
cwd?: string;
|
|
72
|
+
env?: Record<string, string>;
|
|
73
|
+
/** Run the command with sudo. No-op in just-bash (already runs as root). */
|
|
74
|
+
sudo?: boolean;
|
|
75
|
+
/** Return immediately with a live Command object instead of waiting for completion. */
|
|
76
|
+
detached?: boolean;
|
|
77
|
+
/** Stream standard output to a writable. Written after command completes. */
|
|
78
|
+
stdout?: Writable;
|
|
79
|
+
/** Stream standard error to a writable. Written after command completes. */
|
|
80
|
+
stderr?: Writable;
|
|
81
|
+
signal?: AbortSignal;
|
|
82
|
+
}
|
|
83
|
+
export interface WriteFilesInput {
|
|
84
|
+
[path: string]: string | {
|
|
85
|
+
content: string;
|
|
86
|
+
encoding?: "utf-8" | "base64";
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export declare class Sandbox {
|
|
90
|
+
private bashEnv;
|
|
91
|
+
private timeoutMs?;
|
|
92
|
+
private constructor();
|
|
93
|
+
static create(opts?: SandboxOptions): Promise<Sandbox>;
|
|
94
|
+
runCommand(params: RunCommandParams & {
|
|
95
|
+
detached: true;
|
|
96
|
+
}): Promise<Command>;
|
|
97
|
+
runCommand(params: RunCommandParams): Promise<CommandFinished>;
|
|
98
|
+
runCommand(command: string, args: string[], opts?: {
|
|
99
|
+
signal?: AbortSignal;
|
|
100
|
+
}): Promise<CommandFinished>;
|
|
101
|
+
runCommand(command: string, opts?: {
|
|
102
|
+
cwd?: string;
|
|
103
|
+
env?: Record<string, string>;
|
|
104
|
+
}): Promise<CommandFinished>;
|
|
105
|
+
writeFiles(files: WriteFilesInput): Promise<void>;
|
|
106
|
+
readFile(path: string, encoding?: "utf-8" | "base64"): Promise<string>;
|
|
107
|
+
mkDir(path: string, opts?: {
|
|
108
|
+
recursive?: boolean;
|
|
109
|
+
}): Promise<void>;
|
|
110
|
+
stop(): Promise<void>;
|
|
111
|
+
extendTimeout(_ms: number): Promise<void>;
|
|
112
|
+
get domain(): string | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Bash-specific: Get the underlying Bash instance for advanced operations.
|
|
115
|
+
* Not available in Vercel Sandbox API.
|
|
116
|
+
*/
|
|
117
|
+
get bashEnvInstance(): Bash;
|
|
118
|
+
}
|
|
119
|
+
export { Command };
|
|
120
|
+
export type { CommandFinished };
|
|
121
|
+
export type { OutputMessage } from "./Command.js";
|