@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,33 @@
|
|
|
1
|
+
import type { InterpreterContext } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* File test operators supported by bash
|
|
4
|
+
* Unary operators that test file properties
|
|
5
|
+
*/
|
|
6
|
+
declare const FILE_TEST_OPERATORS: readonly ["-e", "-a", "-f", "-d", "-r", "-w", "-x", "-s", "-L", "-h", "-k", "-g", "-u", "-G", "-O", "-b", "-c", "-p", "-S", "-t", "-N"];
|
|
7
|
+
export type FileTestOperator = (typeof FILE_TEST_OPERATORS)[number];
|
|
8
|
+
export declare function isFileTestOperator(op: string): op is FileTestOperator;
|
|
9
|
+
/**
|
|
10
|
+
* Evaluates a file test operator (-e, -f, -d, etc.) against a path.
|
|
11
|
+
* Returns a boolean result.
|
|
12
|
+
*
|
|
13
|
+
* @param ctx - Interpreter context with filesystem access
|
|
14
|
+
* @param operator - The file test operator (e.g., "-f", "-d", "-e")
|
|
15
|
+
* @param operand - The path to test (will be resolved relative to cwd)
|
|
16
|
+
*/
|
|
17
|
+
export declare function evaluateFileTest(ctx: InterpreterContext, operator: string, operand: string): Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* Binary file test operators for comparing two files
|
|
20
|
+
*/
|
|
21
|
+
declare const BINARY_FILE_TEST_OPERATORS: readonly ["-nt", "-ot", "-ef"];
|
|
22
|
+
export type BinaryFileTestOperator = (typeof BINARY_FILE_TEST_OPERATORS)[number];
|
|
23
|
+
export declare function isBinaryFileTestOperator(op: string): op is BinaryFileTestOperator;
|
|
24
|
+
/**
|
|
25
|
+
* Evaluates a binary file test operator (-nt, -ot, -ef) comparing two files.
|
|
26
|
+
*
|
|
27
|
+
* @param ctx - Interpreter context with filesystem access
|
|
28
|
+
* @param operator - The operator (-nt, -ot, -ef)
|
|
29
|
+
* @param left - Left operand (file path)
|
|
30
|
+
* @param right - Right operand (file path)
|
|
31
|
+
*/
|
|
32
|
+
export declare function evaluateBinaryFileTest(ctx: InterpreterContext, operator: string, left: string, right: string): Promise<boolean>;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IFS (Internal Field Separator) Handling
|
|
3
|
+
*
|
|
4
|
+
* Centralized utilities for IFS-based word splitting used by:
|
|
5
|
+
* - Word expansion (unquoted variable expansion)
|
|
6
|
+
* - read builtin
|
|
7
|
+
* - ${!prefix*} and ${!arr[*]} expansions
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Get the effective IFS value from environment.
|
|
11
|
+
* Returns DEFAULT_IFS if IFS is undefined, or the actual value (including empty string).
|
|
12
|
+
*/
|
|
13
|
+
export declare function getIfs(env: Map<string, string>): string;
|
|
14
|
+
/**
|
|
15
|
+
* Check if IFS is set to empty string (disables word splitting).
|
|
16
|
+
*/
|
|
17
|
+
export declare function isIfsEmpty(env: Map<string, string>): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Check if IFS contains only whitespace characters (space, tab, newline).
|
|
20
|
+
* This affects how empty fields are handled in $@ and $* expansion.
|
|
21
|
+
* When IFS has non-whitespace chars, empty params are preserved.
|
|
22
|
+
* When IFS has only whitespace, empty params are dropped.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isIfsWhitespaceOnly(env: Map<string, string>): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Build a regex-safe pattern from IFS characters for use in character classes.
|
|
27
|
+
* E.g., for IFS=" \t\n", returns " \\t\\n" (escaped for [pattern] use)
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildIfsCharClassPattern(ifs: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Get the first character of IFS (used for joining with $* and ${!prefix*}).
|
|
32
|
+
* Returns space if IFS is undefined, empty string if IFS is empty.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getIfsSeparator(env: Map<string, string>): string;
|
|
35
|
+
/**
|
|
36
|
+
* Advanced IFS splitting for the read builtin with proper whitespace/non-whitespace handling.
|
|
37
|
+
*
|
|
38
|
+
* IFS has two types of characters:
|
|
39
|
+
* - Whitespace (space, tab, newline): Multiple consecutive ones are collapsed,
|
|
40
|
+
* leading/trailing are stripped
|
|
41
|
+
* - Non-whitespace (like 'x', ':'): Create empty fields when consecutive,
|
|
42
|
+
* trailing ones preserved (except the final delimiter)
|
|
43
|
+
*
|
|
44
|
+
* @param value - String to split
|
|
45
|
+
* @param ifs - IFS characters to split on
|
|
46
|
+
* @param maxSplit - Maximum number of splits (for read with multiple vars, the last gets the rest)
|
|
47
|
+
* @param raw - If true, backslash escaping is disabled (like read -r)
|
|
48
|
+
* @returns Object with words array and wordStarts array
|
|
49
|
+
*/
|
|
50
|
+
export declare function splitByIfsForRead(value: string, ifs: string, maxArrayElements: number, maxSplit?: number, raw?: boolean): {
|
|
51
|
+
words: string[];
|
|
52
|
+
wordStarts: number[];
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* IFS splitting for word expansion (unquoted $VAR, $*, etc.).
|
|
56
|
+
*
|
|
57
|
+
* Key differences from splitByIfsForRead:
|
|
58
|
+
* - Trailing non-whitespace delimiter does NOT create an empty field
|
|
59
|
+
* - No maxSplit concept (always splits fully)
|
|
60
|
+
* - No backslash escape handling
|
|
61
|
+
*
|
|
62
|
+
* @param value - String to split
|
|
63
|
+
* @param ifs - IFS characters to split on
|
|
64
|
+
* @returns Array of words after splitting
|
|
65
|
+
*/
|
|
66
|
+
/**
|
|
67
|
+
* Result of splitByIfsForExpansionEx with leading/trailing delimiter info.
|
|
68
|
+
*/
|
|
69
|
+
export interface IfsExpansionSplitResult {
|
|
70
|
+
words: string[];
|
|
71
|
+
/** True if the value started with an IFS whitespace delimiter (affects joining with preceding text) */
|
|
72
|
+
hadLeadingDelimiter: boolean;
|
|
73
|
+
/** True if the value ended with an IFS delimiter (affects joining with subsequent text) */
|
|
74
|
+
hadTrailingDelimiter: boolean;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Extended IFS splitting that tracks trailing delimiters.
|
|
78
|
+
* This is needed for proper word boundary handling when literal text follows an expansion.
|
|
79
|
+
* For example, in `-$x-` where `x='a b c '`, the trailing space means the final `-`
|
|
80
|
+
* should become a separate word, not join with `c`.
|
|
81
|
+
*/
|
|
82
|
+
export declare function splitByIfsForExpansionEx(value: string, ifs: string, maxArrayElements: number): IfsExpansionSplitResult;
|
|
83
|
+
export declare function splitByIfsForExpansion(value: string, ifs: string, maxArrayElements: number): string[];
|
|
84
|
+
/**
|
|
85
|
+
* Strip trailing IFS from the last variable in read builtin.
|
|
86
|
+
*
|
|
87
|
+
* Bash behavior:
|
|
88
|
+
* 1. Strip trailing IFS whitespace characters (but NOT if they're escaped by backslash)
|
|
89
|
+
* 2. If there's a single trailing IFS non-whitespace character, strip it ONLY IF
|
|
90
|
+
* there are no other non-ws IFS chars in the content (excluding the trailing one)
|
|
91
|
+
*
|
|
92
|
+
* Examples with IFS="x ":
|
|
93
|
+
* - "ax " -> "a" (trailing spaces stripped, then trailing single x stripped because no other x)
|
|
94
|
+
* - "ax" -> "a" (trailing single x stripped because no other x in remaining content)
|
|
95
|
+
* - "axx" -> "axx" (two trailing x's, so don't strip - there's another x)
|
|
96
|
+
* - "ax x" -> "ax x" (trailing x NOT stripped because there's an x earlier)
|
|
97
|
+
* - "bx" -> "b" (trailing x stripped, no other x)
|
|
98
|
+
* - "a\ " -> "a " (backslash-escaped space is NOT stripped)
|
|
99
|
+
*
|
|
100
|
+
* @param value - String to strip (raw, before backslash processing)
|
|
101
|
+
* @param ifs - IFS characters
|
|
102
|
+
* @param raw - If true, backslash escaping is disabled
|
|
103
|
+
*/
|
|
104
|
+
export declare function stripTrailingIfsWhitespace(value: string, ifs: string, raw?: boolean): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loop Error Handling Helpers
|
|
3
|
+
*
|
|
4
|
+
* Consolidates the repeated error handling logic used in all loop constructs
|
|
5
|
+
* (for, c-style for, while, until).
|
|
6
|
+
*/
|
|
7
|
+
export type LoopAction = "break" | "continue" | "rethrow" | "error";
|
|
8
|
+
export interface LoopErrorResult {
|
|
9
|
+
action: LoopAction;
|
|
10
|
+
stdout: string;
|
|
11
|
+
stderr: string;
|
|
12
|
+
exitCode?: number;
|
|
13
|
+
error?: unknown;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Handle errors thrown during loop body execution.
|
|
17
|
+
*
|
|
18
|
+
* @param error - The caught error
|
|
19
|
+
* @param stdout - Current accumulated stdout
|
|
20
|
+
* @param stderr - Current accumulated stderr
|
|
21
|
+
* @param loopDepth - Current loop nesting depth from ctx.state.loopDepth
|
|
22
|
+
* @returns Result indicating what action the loop should take
|
|
23
|
+
*/
|
|
24
|
+
export declare function handleLoopError(error: unknown, stdout: string, stderr: string, loopDepth: number): LoopErrorResult;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nameref (declare -n) support
|
|
3
|
+
*
|
|
4
|
+
* Namerefs are variables that reference other variables by name.
|
|
5
|
+
* When a nameref is accessed, it transparently dereferences to the target variable.
|
|
6
|
+
*/
|
|
7
|
+
import type { InterpreterContext } from "../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Check if a variable is a nameref
|
|
10
|
+
*/
|
|
11
|
+
export declare function isNameref(ctx: InterpreterContext, name: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Mark a variable as a nameref
|
|
14
|
+
*/
|
|
15
|
+
export declare function markNameref(ctx: InterpreterContext, name: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* Remove the nameref attribute from a variable
|
|
18
|
+
*/
|
|
19
|
+
export declare function unmarkNameref(ctx: InterpreterContext, name: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Mark a nameref as having an "invalid" target at creation time.
|
|
22
|
+
* Invalid namerefs always read/write their value directly, never resolving.
|
|
23
|
+
*/
|
|
24
|
+
export declare function markNamerefInvalid(ctx: InterpreterContext, name: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Mark a nameref as "bound" - meaning its target existed at creation time.
|
|
27
|
+
* This is kept for tracking purposes but is currently not used in resolution.
|
|
28
|
+
*/
|
|
29
|
+
export declare function markNamerefBound(ctx: InterpreterContext, name: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Check if a name refers to a valid, existing variable or array element.
|
|
32
|
+
* Used to determine if a nameref target is "real" or just a stored value.
|
|
33
|
+
*/
|
|
34
|
+
export declare function targetExists(ctx: InterpreterContext, target: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Resolve a nameref chain to the final variable name.
|
|
37
|
+
* Returns the original name if it's not a nameref.
|
|
38
|
+
* Detects circular references and returns undefined.
|
|
39
|
+
*
|
|
40
|
+
* @param ctx - The interpreter context
|
|
41
|
+
* @param name - The variable name to resolve
|
|
42
|
+
* @param maxDepth - Maximum chain depth to prevent infinite loops (default 100)
|
|
43
|
+
* @returns The resolved variable name, or undefined if circular reference detected
|
|
44
|
+
*/
|
|
45
|
+
export declare function resolveNameref(ctx: InterpreterContext, name: string, maxDepth?: number): string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Get the target name of a nameref (what it points to).
|
|
48
|
+
* Returns the variable's value if it's a nameref, undefined otherwise.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getNamerefTarget(ctx: InterpreterContext, name: string): string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Resolve a nameref for assignment purposes.
|
|
53
|
+
* Unlike resolveNameref, this will resolve to the target variable name
|
|
54
|
+
* even if the target doesn't exist yet (allowing creation).
|
|
55
|
+
*
|
|
56
|
+
* @param ctx - The interpreter context
|
|
57
|
+
* @param name - The variable name to resolve
|
|
58
|
+
* @param valueBeingAssigned - The value being assigned (needed for empty nameref handling)
|
|
59
|
+
* @param maxDepth - Maximum chain depth to prevent infinite loops
|
|
60
|
+
* @returns
|
|
61
|
+
* - undefined if circular reference detected
|
|
62
|
+
* - null if the nameref is empty and value is not an existing variable (skip assignment)
|
|
63
|
+
* - The resolved target name otherwise (may be the nameref itself if target is invalid)
|
|
64
|
+
*/
|
|
65
|
+
export declare function resolveNamerefForAssignment(ctx: InterpreterContext, name: string, valueBeingAssigned?: string, maxDepth?: number): string | null | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Numeric comparison helper for conditionals.
|
|
3
|
+
* Handles -eq, -ne, -lt, -le, -gt, -ge operators.
|
|
4
|
+
*/
|
|
5
|
+
export type NumericOp = "-eq" | "-ne" | "-lt" | "-le" | "-gt" | "-ge";
|
|
6
|
+
/**
|
|
7
|
+
* Check if an operator is a numeric comparison operator.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isNumericOp(op: string): op is NumericOp;
|
|
10
|
+
/**
|
|
11
|
+
* Compare two numbers using a numeric comparison operator.
|
|
12
|
+
*/
|
|
13
|
+
export declare function compareNumeric(op: NumericOp, left: number, right: number): boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shell value quoting utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides functions for quoting values in shell output format,
|
|
5
|
+
* used by both `set` and `declare/typeset` builtins.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Quote a value for shell output (used by 'set' and 'typeset' with no args)
|
|
9
|
+
* Matches bash's output format:
|
|
10
|
+
* - No quotes for simple alphanumeric values
|
|
11
|
+
* - Single quotes for values with spaces or shell metacharacters
|
|
12
|
+
* - $'...' quoting for values with control characters
|
|
13
|
+
*/
|
|
14
|
+
export declare function quotedValueByteLength(value: string): number;
|
|
15
|
+
export declare function quoteValue(value: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Quote a value for array element output
|
|
18
|
+
* Uses $'...' for control characters, double quotes otherwise
|
|
19
|
+
*/
|
|
20
|
+
export declare function quotedArrayValueByteLength(value: string): number;
|
|
21
|
+
export declare function quoteArrayValue(value: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Quote a value for declare -p output
|
|
24
|
+
* Uses $'...' for control characters, double quotes otherwise
|
|
25
|
+
*/
|
|
26
|
+
export declare function quoteDeclareValue(value: string): string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Readonly and export variable helpers.
|
|
3
|
+
*
|
|
4
|
+
* Consolidates readonly and export variable logic used in declare, export, local, etc.
|
|
5
|
+
*/
|
|
6
|
+
import type { ExecResult } from "../../types.js";
|
|
7
|
+
import type { InterpreterContext } from "../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Mark a variable as readonly.
|
|
10
|
+
*/
|
|
11
|
+
export declare function markReadonly(ctx: InterpreterContext, name: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* Check if a variable is readonly.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isReadonly(ctx: InterpreterContext, name: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Check if a variable is readonly and throw an error if so.
|
|
18
|
+
* Returns null if the variable is not readonly (can be modified).
|
|
19
|
+
*
|
|
20
|
+
* Assigning to a readonly variable is a fatal error that stops script execution.
|
|
21
|
+
* This matches the behavior of dash, mksh, ash, and bash in POSIX mode.
|
|
22
|
+
* (Note: bash in non-POSIX mode has a bug where multi-line readonly assignment
|
|
23
|
+
* continues execution, but one-line still stops. We always stop.)
|
|
24
|
+
*
|
|
25
|
+
* @param ctx - Interpreter context
|
|
26
|
+
* @param name - Variable name
|
|
27
|
+
* @param command - Command name for error message (default: "bash")
|
|
28
|
+
* @returns null if variable is not readonly (can be modified)
|
|
29
|
+
* @throws ExitError if variable is readonly
|
|
30
|
+
*/
|
|
31
|
+
export declare function checkReadonlyError(ctx: InterpreterContext, name: string, command?: string): ExecResult | null;
|
|
32
|
+
/**
|
|
33
|
+
* Mark a variable as exported.
|
|
34
|
+
*
|
|
35
|
+
* If we're inside a local scope and the variable is local (exists in the
|
|
36
|
+
* current scope), track it as a locally-exported variable. When the scope
|
|
37
|
+
* is popped, the export attribute will be removed if it wasn't exported
|
|
38
|
+
* before entering the function.
|
|
39
|
+
*/
|
|
40
|
+
export declare function markExported(ctx: InterpreterContext, name: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Remove the export attribute from a variable.
|
|
43
|
+
* The variable value is preserved, just no longer exported to child processes.
|
|
44
|
+
*/
|
|
45
|
+
export declare function unmarkExported(ctx: InterpreterContext, name: string): void;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExecResult factory functions for cleaner code.
|
|
3
|
+
*
|
|
4
|
+
* These helpers reduce verbosity and improve readability when
|
|
5
|
+
* constructing ExecResult objects throughout the interpreter.
|
|
6
|
+
*/
|
|
7
|
+
import type { ExecResult } from "../../types.js";
|
|
8
|
+
import type { InterpreterContext } from "../types.js";
|
|
9
|
+
/**
|
|
10
|
+
* A successful result with no output.
|
|
11
|
+
* Use this for commands that succeed silently.
|
|
12
|
+
*/
|
|
13
|
+
export declare const OK: ExecResult;
|
|
14
|
+
/**
|
|
15
|
+
* Create a successful result with optional stdout.
|
|
16
|
+
*
|
|
17
|
+
* @param stdout - Output to include (default: "")
|
|
18
|
+
* @returns ExecResult with exitCode 0
|
|
19
|
+
*/
|
|
20
|
+
export declare function success(stdout?: string): ExecResult;
|
|
21
|
+
/**
|
|
22
|
+
* Create a failure result with stderr message.
|
|
23
|
+
*
|
|
24
|
+
* @param stderr - Error message to include
|
|
25
|
+
* @param exitCode - Exit code (default: 1)
|
|
26
|
+
* @returns ExecResult with the specified exitCode
|
|
27
|
+
*/
|
|
28
|
+
export declare function failure(stderr: string, exitCode?: number): ExecResult;
|
|
29
|
+
/**
|
|
30
|
+
* Create a result with all fields specified.
|
|
31
|
+
*
|
|
32
|
+
* @param stdout - Standard output
|
|
33
|
+
* @param stderr - Standard error
|
|
34
|
+
* @param exitCode - Exit code
|
|
35
|
+
* @returns ExecResult with all fields
|
|
36
|
+
*/
|
|
37
|
+
export declare function result(stdout: string, stderr: string, exitCode: number): ExecResult;
|
|
38
|
+
/**
|
|
39
|
+
* Convert a boolean test result to an ExecResult.
|
|
40
|
+
* Useful for test/conditional commands where true = exit 0, false = exit 1.
|
|
41
|
+
*
|
|
42
|
+
* @param passed - Boolean test result
|
|
43
|
+
* @returns ExecResult with exitCode 0 if passed, 1 otherwise
|
|
44
|
+
*/
|
|
45
|
+
export declare function testResult(passed: boolean): ExecResult;
|
|
46
|
+
/**
|
|
47
|
+
* Throw an ExecutionLimitError for execution limits (recursion, iterations, commands).
|
|
48
|
+
*
|
|
49
|
+
* @param message - Error message describing the limit exceeded
|
|
50
|
+
* @param limitType - Type of limit exceeded
|
|
51
|
+
* @param stdout - Accumulated stdout to include
|
|
52
|
+
* @param stderr - Accumulated stderr to include
|
|
53
|
+
* @throws ExecutionLimitError always
|
|
54
|
+
*/
|
|
55
|
+
export declare function throwExecutionLimit(message: string, limitType: "recursion" | "iterations" | "commands" | "string_length" | "glob_operations" | "substitution_depth" | "output_size" | "file_descriptors", stdout?: string, stderr?: string): never;
|
|
56
|
+
/**
|
|
57
|
+
* Check file descriptor count against the limit before adding a new one.
|
|
58
|
+
* Throws ExecutionLimitError if the limit would be exceeded.
|
|
59
|
+
*/
|
|
60
|
+
export declare function checkFdLimit(ctx: InterpreterContext): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shell Constants
|
|
3
|
+
*
|
|
4
|
+
* Constants for shell builtins, keywords, and POSIX special builtins.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* POSIX special built-in commands.
|
|
8
|
+
* In POSIX mode, these have special behaviors:
|
|
9
|
+
* - Prefix assignments persist after the command
|
|
10
|
+
* - Cannot be redefined as functions
|
|
11
|
+
* - Errors may be fatal
|
|
12
|
+
*/
|
|
13
|
+
export declare const POSIX_SPECIAL_BUILTINS: Set<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Check if a command name is a POSIX special built-in
|
|
16
|
+
*/
|
|
17
|
+
export declare function isPosixSpecialBuiltin(name: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Shell keywords (for type, command -v, etc.)
|
|
20
|
+
*/
|
|
21
|
+
export declare const SHELL_KEYWORDS: Set<string>;
|
|
22
|
+
/**
|
|
23
|
+
* Shell builtins (for type, command -v, builtin, etc.)
|
|
24
|
+
*/
|
|
25
|
+
export declare const SHELL_BUILTINS: Set<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Names in the builtin display sets that have NO implementation: dispatch
|
|
28
|
+
* has no handler for them, so at runtime they fall through to external
|
|
29
|
+
* resolution and fail with "command not found" (exit 127). Real bash
|
|
30
|
+
* implements these; just-bash does not (yet).
|
|
31
|
+
*
|
|
32
|
+
* Membership in POSIX_SPECIAL_BUILTINS / SHELL_BUILTINS is about DISPLAY
|
|
33
|
+
* (type, command -v) and POSIX mode behavior — not about resolvability.
|
|
34
|
+
* Static analysis (Bash.analyzeCommands) subtracts this set so its
|
|
35
|
+
* results match dispatch. Keep this honest: the parity test in
|
|
36
|
+
* command-analysis.test.ts runs every display-set name through both
|
|
37
|
+
* runtime dispatch and analysis and fails on any divergence — both when
|
|
38
|
+
* a name here gets implemented (remove it) and when a new unimplemented
|
|
39
|
+
* name joins a display set (add it).
|
|
40
|
+
*/
|
|
41
|
+
export declare const UNIMPLEMENTED_BUILTIN_NAMES: ReadonlySet<string>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SHELLOPTS and BASHOPTS variable helpers.
|
|
3
|
+
*
|
|
4
|
+
* SHELLOPTS is a colon-separated list of enabled shell options from `set -o`.
|
|
5
|
+
* BASHOPTS is a colon-separated list of enabled bash-specific options from `shopt`.
|
|
6
|
+
*/
|
|
7
|
+
import type { InterpreterContext, ShellOptions, ShoptOptions } from "../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Build the SHELLOPTS string from current shell options.
|
|
10
|
+
* Returns a colon-separated list of enabled options (alphabetically sorted).
|
|
11
|
+
* Includes always-on options like braceexpand, hashall, interactive-comments.
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildShellopts(options: ShellOptions): string;
|
|
14
|
+
/**
|
|
15
|
+
* Update the SHELLOPTS environment variable to reflect current shell options.
|
|
16
|
+
* Should be called whenever shell options change (via set -o or shopt -o).
|
|
17
|
+
*/
|
|
18
|
+
export declare function updateShellopts(ctx: InterpreterContext): void;
|
|
19
|
+
/**
|
|
20
|
+
* Build the BASHOPTS string from current shopt options.
|
|
21
|
+
* Returns a colon-separated list of enabled options (alphabetically sorted).
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildBashopts(shoptOptions: ShoptOptions): string;
|
|
24
|
+
/**
|
|
25
|
+
* Update the BASHOPTS environment variable to reflect current shopt options.
|
|
26
|
+
* Should be called whenever shopt options change.
|
|
27
|
+
*/
|
|
28
|
+
export declare function updateBashopts(ctx: InterpreterContext): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* String comparison helpers for conditionals.
|
|
3
|
+
*
|
|
4
|
+
* Consolidates string comparison logic (=, ==, !=) used in:
|
|
5
|
+
* - [[ ]] conditional expressions (with optional pattern matching)
|
|
6
|
+
* - test/[ ] command (literal comparison only)
|
|
7
|
+
*/
|
|
8
|
+
export type StringCompareOp = "=" | "==" | "!=";
|
|
9
|
+
/**
|
|
10
|
+
* Check if an operator is a string comparison operator.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isStringCompareOp(op: string): op is StringCompareOp;
|
|
13
|
+
/**
|
|
14
|
+
* Compare two strings using the specified operator.
|
|
15
|
+
*
|
|
16
|
+
* @param op - The comparison operator (=, ==, !=)
|
|
17
|
+
* @param left - Left operand
|
|
18
|
+
* @param right - Right operand
|
|
19
|
+
* @param usePattern - If true, use glob pattern matching for equality (default: false)
|
|
20
|
+
* @param nocasematch - If true, use case-insensitive comparison (default: false)
|
|
21
|
+
* @param extglob - If true, enable extended glob patterns @(), *(), +(), ?(), !() (default: false)
|
|
22
|
+
* @returns True if the comparison succeeds
|
|
23
|
+
*/
|
|
24
|
+
export declare function compareStrings(op: StringCompareOp, left: string, right: string, usePattern?: boolean, nocasematch?: boolean, extglob?: boolean, maxPatternDepth?: number): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* String test helper for conditionals.
|
|
3
|
+
* Handles -z (empty) and -n (non-empty) operators.
|
|
4
|
+
*/
|
|
5
|
+
export type StringTestOp = "-z" | "-n";
|
|
6
|
+
/**
|
|
7
|
+
* Check if an operator is a string test operator.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isStringTestOp(op: string): op is StringTestOp;
|
|
10
|
+
/**
|
|
11
|
+
* Evaluate a string test operator.
|
|
12
|
+
*/
|
|
13
|
+
export declare function evaluateStringTest(op: StringTestOp, value: string): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InterpreterContext } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Evaluates the -v (variable is set) test.
|
|
4
|
+
* Handles both simple variables and array element access with negative indices.
|
|
5
|
+
*
|
|
6
|
+
* @param ctx - Interpreter context with environment variables
|
|
7
|
+
* @param operand - The variable name to test, may include array subscript (e.g., "arr[0]", "arr[-1]")
|
|
8
|
+
*/
|
|
9
|
+
export declare function evaluateVariableTest(ctx: InterpreterContext, operand: string): Promise<boolean>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interpreter Utility Functions
|
|
3
|
+
*
|
|
4
|
+
* Standalone helper functions used by the interpreter.
|
|
5
|
+
*/
|
|
6
|
+
import type { WordNode } from "../../ast/types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Check if a WordNode is a literal match for any of the given strings.
|
|
9
|
+
* Returns true only if the word is a single literal (no expansions, no quoting)
|
|
10
|
+
* that matches one of the target strings.
|
|
11
|
+
*
|
|
12
|
+
* This is used to detect assignment builtins at "parse time" - bash determines
|
|
13
|
+
* whether a command is export/declare/etc based on the literal token, not the
|
|
14
|
+
* runtime value after expansion.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isWordLiteralMatch(word: WordNode, targets: string[]): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Word Part Helper Functions
|
|
3
|
+
*
|
|
4
|
+
* Provides common operations on WordPart types to eliminate duplication
|
|
5
|
+
* across expansion.ts and word-parser.ts.
|
|
6
|
+
*/
|
|
7
|
+
import type { WordPart } from "../../ast/types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Get the literal string value from a word part.
|
|
10
|
+
* Returns the value for Literal, SingleQuoted, and Escaped parts.
|
|
11
|
+
* Returns null for complex parts that require expansion.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getLiteralValue(part: WordPart): string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Check if a word part is "quoted" - meaning glob characters should be treated literally.
|
|
16
|
+
* A part is quoted if it is:
|
|
17
|
+
* - SingleQuoted
|
|
18
|
+
* - Escaped
|
|
19
|
+
* - DoubleQuoted (entirely quoted)
|
|
20
|
+
* - Literal with empty value (doesn't affect quoting)
|
|
21
|
+
*/
|
|
22
|
+
export declare function isQuotedPart(part: WordPart): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xtrace (set -x) helper functions
|
|
3
|
+
*
|
|
4
|
+
* Handles trace output generation when xtrace option is enabled.
|
|
5
|
+
* PS4 variable controls the prefix (default "+ ").
|
|
6
|
+
* PS4 is expanded (variable substitution) before each trace line.
|
|
7
|
+
*/
|
|
8
|
+
import type { InterpreterContext } from "../types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Generate xtrace output for a simple command.
|
|
11
|
+
* Returns the trace line to be added to stderr.
|
|
12
|
+
*/
|
|
13
|
+
export declare function traceSimpleCommand(ctx: InterpreterContext, commandName: string, args: string[]): Promise<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Generate xtrace output for an assignment.
|
|
16
|
+
* Returns the trace line to be added to stderr.
|
|
17
|
+
*/
|
|
18
|
+
export declare function traceAssignment(ctx: InterpreterContext, name: string, value: string): Promise<string>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interpreter - AST Execution Engine
|
|
3
|
+
*
|
|
4
|
+
* Main interpreter class that executes bash AST nodes.
|
|
5
|
+
* Delegates to specialized modules for:
|
|
6
|
+
* - Word expansion (expansion.ts)
|
|
7
|
+
* - Arithmetic evaluation (arithmetic.ts)
|
|
8
|
+
* - Conditional evaluation (conditionals.ts)
|
|
9
|
+
* - Built-in commands (builtins.ts)
|
|
10
|
+
* - Redirections (redirections.ts)
|
|
11
|
+
*/
|
|
12
|
+
import type { ScriptNode } from "../ast/types.js";
|
|
13
|
+
import type { ExecutionScope } from "../execution-scope.js";
|
|
14
|
+
import type { IFileSystem } from "../fs/interface.js";
|
|
15
|
+
import type { ExecutionLimits } from "../limits.js";
|
|
16
|
+
import type { SecureFetch } from "../network/index.js";
|
|
17
|
+
import type { CommandRegistry, ExecResult, FeatureCoverageWriter, TraceCallback } from "../types.js";
|
|
18
|
+
import type { InterpreterExecOptions, InterpreterState } from "./types.js";
|
|
19
|
+
export type { InterpreterContext, InterpreterState } from "./types.js";
|
|
20
|
+
export interface InterpreterOptions {
|
|
21
|
+
fs: IFileSystem;
|
|
22
|
+
commands: CommandRegistry;
|
|
23
|
+
limits: Required<ExecutionLimits>;
|
|
24
|
+
executionScope: ExecutionScope;
|
|
25
|
+
exec: (script: string, options?: InterpreterExecOptions, stdinAlreadyAccounted?: boolean) => Promise<ExecResult>;
|
|
26
|
+
/** Optional secure fetch function for network-enabled commands */
|
|
27
|
+
fetch?: SecureFetch;
|
|
28
|
+
/** Optional sleep function for testing with mock clocks */
|
|
29
|
+
sleep?: (ms: number) => Promise<void>;
|
|
30
|
+
/** Optional trace callback for performance profiling */
|
|
31
|
+
trace?: TraceCallback;
|
|
32
|
+
/** Optional feature coverage writer for fuzzing instrumentation */
|
|
33
|
+
coverage?: FeatureCoverageWriter;
|
|
34
|
+
/**
|
|
35
|
+
* When true, fail closed if execution occurs outside defense async context.
|
|
36
|
+
*/
|
|
37
|
+
requireDefenseContext?: boolean;
|
|
38
|
+
/** Bootstrap JavaScript code for js-exec */
|
|
39
|
+
jsBootstrapCode?: string;
|
|
40
|
+
/** Tool invoker hook for js-exec's `tools` proxy */
|
|
41
|
+
invokeTool?: (path: string, argsJson: string) => Promise<string>;
|
|
42
|
+
}
|
|
43
|
+
export declare class Interpreter {
|
|
44
|
+
private ctx;
|
|
45
|
+
constructor(options: InterpreterOptions, state: InterpreterState);
|
|
46
|
+
/**
|
|
47
|
+
* Fail closed if defense is expected but async context is missing.
|
|
48
|
+
*/
|
|
49
|
+
private assertDefenseContext;
|
|
50
|
+
/**
|
|
51
|
+
* Build environment record containing only exported variables.
|
|
52
|
+
* In bash, only exported variables are passed to child processes.
|
|
53
|
+
* This includes both permanently exported variables (via export/declare -x)
|
|
54
|
+
* and temporarily exported variables (prefix assignments like FOO=bar cmd).
|
|
55
|
+
*/
|
|
56
|
+
private buildExportedEnv;
|
|
57
|
+
executeScript(node: ScriptNode): Promise<ExecResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Execute a user script file found in PATH.
|
|
60
|
+
*/
|
|
61
|
+
private executeUserScript;
|
|
62
|
+
private executeStatement;
|
|
63
|
+
private executePipeline;
|
|
64
|
+
/**
|
|
65
|
+
* Execute a command, tearing down any process substitutions its own word
|
|
66
|
+
* expansion opened. Descriptor numbers are handed out from 63 downwards and
|
|
67
|
+
* released here, so they are reused per command exactly like bash and no
|
|
68
|
+
* backing file outlives the command that created it.
|
|
69
|
+
*/
|
|
70
|
+
private executeCommand;
|
|
71
|
+
private executeCommandInner;
|
|
72
|
+
private executeSimpleCommand;
|
|
73
|
+
private executeSimpleCommandInner;
|
|
74
|
+
private runCommand;
|
|
75
|
+
private aliasExpansionStack;
|
|
76
|
+
private expandAlias;
|
|
77
|
+
findCommandInPath(commandName: string): Promise<string[]>;
|
|
78
|
+
private executeSubshell;
|
|
79
|
+
private executeGroup;
|
|
80
|
+
private executeArithmeticCommand;
|
|
81
|
+
private executeConditionalCommand;
|
|
82
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RedirectionNode } from "../ast/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The descriptor a redirection acts on, or null when it targets both
|
|
4
|
+
* stdout and stderr (`&>`), which never names a user fd.
|
|
5
|
+
*/
|
|
6
|
+
export declare function effectiveRedirectFd(redir: RedirectionNode): number | null;
|
|
7
|
+
/** True when this redirection is installed in the descriptor table. */
|
|
8
|
+
export declare function isNumericFdRedirection(redir: RedirectionNode): boolean;
|