@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,360 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OverlayFs - Copy-on-write filesystem backed by a real directory
|
|
3
|
+
*
|
|
4
|
+
* Reads come from the real filesystem, writes go to an in-memory layer.
|
|
5
|
+
* Changes don't persist to disk and can't escape the root directory.
|
|
6
|
+
*
|
|
7
|
+
* Security: Symlinks are blocked by default (allowSymlinks: false).
|
|
8
|
+
* All real-FS access goes through resolveRealPath_() / resolveRealPathParent_()
|
|
9
|
+
* gates which detect symlink traversal via path comparison and return the
|
|
10
|
+
* canonical path for I/O (closing the TOCTOU gap). New methods must use these
|
|
11
|
+
* gates — never access the real FS directly.
|
|
12
|
+
*
|
|
13
|
+
* Concurrent modification of the underlying directory is not supported.
|
|
14
|
+
* OverlayFs does not detect changes made to the underlying directory outside
|
|
15
|
+
* the overlay while an instance is live. If such changes occur, behavior is
|
|
16
|
+
* undefined and data loss is a possible outcome — including deletion of
|
|
17
|
+
* files the overlay never saw, when applying a diff() computed against a
|
|
18
|
+
* stale view. After intentional external changes (e.g. a native run
|
|
19
|
+
* between sandbox sessions), call sync() or reset() to re-baseline before
|
|
20
|
+
* continuing.
|
|
21
|
+
*/
|
|
22
|
+
import { type ByteString } from "../../encoding.js";
|
|
23
|
+
import { type FileContent } from "../encoding.js";
|
|
24
|
+
import type { CpOptions, DirentEntry, FsStat, IFileSystem, MkdirOptions, ReadFileOptions, RmOptions, WriteFileOptions } from "../interface.js";
|
|
25
|
+
/** Kind of entry recorded in an {@link OverlayWrite}. */
|
|
26
|
+
export type OverlayNodeType = "file" | "directory" | "symlink";
|
|
27
|
+
/**
|
|
28
|
+
* A single write captured in the overlay's upper layer.
|
|
29
|
+
*/
|
|
30
|
+
export interface OverlayWrite {
|
|
31
|
+
/**
|
|
32
|
+
* Path relative to the overlay root, with a leading slash
|
|
33
|
+
* (e.g. `"/src/app.ts"`). Join it with the host-side root directory to
|
|
34
|
+
* materialize the change.
|
|
35
|
+
*/
|
|
36
|
+
path: string;
|
|
37
|
+
/** Kind of entry written. */
|
|
38
|
+
nodeType: OverlayNodeType;
|
|
39
|
+
/**
|
|
40
|
+
* File content; the symlink target (as UTF-8 bytes) for symlinks; empty
|
|
41
|
+
* for directories and for metadata-only writes.
|
|
42
|
+
*/
|
|
43
|
+
content: Uint8Array;
|
|
44
|
+
/**
|
|
45
|
+
* Unix-style permission mode to apply when materializing on the host.
|
|
46
|
+
* Advisory on Windows (maps at most to the read-only attribute).
|
|
47
|
+
*/
|
|
48
|
+
mode: number;
|
|
49
|
+
/** Modification time; hosts may apply it (utimes) for fidelity. */
|
|
50
|
+
mtime: Date;
|
|
51
|
+
/**
|
|
52
|
+
* When true, only metadata changed (chmod/utimes via a metacopy shadow):
|
|
53
|
+
* apply `mode` and `mtime` and never touch file content.
|
|
54
|
+
*/
|
|
55
|
+
metadataOnly?: boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* All changes recorded in an overlay relative to its lower directory:
|
|
59
|
+
* the upper-layer write set plus the deletions (whiteouts) of lower paths.
|
|
60
|
+
*
|
|
61
|
+
* Hosts embedding just-bash use this to apply sandboxed writes to the real
|
|
62
|
+
* project directory after execution (or prompt about them) — the overlay
|
|
63
|
+
* itself never modifies disk.
|
|
64
|
+
*/
|
|
65
|
+
export interface OverlayDiff {
|
|
66
|
+
/** Every entry created or modified under the mount point, sorted by path. */
|
|
67
|
+
writes: OverlayWrite[];
|
|
68
|
+
/**
|
|
69
|
+
* Root-relative paths deleted during execution, sorted. Whiteout nodes
|
|
70
|
+
* never nest, so each entry is a top-most deletion covering its subtree.
|
|
71
|
+
*/
|
|
72
|
+
deletions: string[];
|
|
73
|
+
}
|
|
74
|
+
export interface OverlayFsOptions {
|
|
75
|
+
/**
|
|
76
|
+
* The root directory on the real filesystem.
|
|
77
|
+
* All paths are relative to this root and cannot escape it.
|
|
78
|
+
*/
|
|
79
|
+
root: string;
|
|
80
|
+
/**
|
|
81
|
+
* The virtual mount point where the root directory appears.
|
|
82
|
+
* Defaults to "/home/user/project".
|
|
83
|
+
*/
|
|
84
|
+
mountPoint?: string;
|
|
85
|
+
/**
|
|
86
|
+
* If true, all write operations will throw an error.
|
|
87
|
+
* Useful for truly read-only access to the filesystem.
|
|
88
|
+
* Defaults to false.
|
|
89
|
+
*/
|
|
90
|
+
readOnly?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Maximum file size in bytes that can be read from the real filesystem.
|
|
93
|
+
* Files larger than this will throw an EFBIG error.
|
|
94
|
+
* Defaults to 10MB (10485760).
|
|
95
|
+
*/
|
|
96
|
+
maxFileReadSize?: number;
|
|
97
|
+
/**
|
|
98
|
+
* Maximum bytes retained by copy-on-write files in the memory layer.
|
|
99
|
+
* Defaults to 1 GiB. Real backing files are not counted until copied.
|
|
100
|
+
*/
|
|
101
|
+
maxMemoryBytes?: number;
|
|
102
|
+
/**
|
|
103
|
+
* Whether to allow following and creating symlinks on the real filesystem.
|
|
104
|
+
* When false (default), any real-FS path traversing a symlink is rejected
|
|
105
|
+
* and symlink() throws EPERM.
|
|
106
|
+
*/
|
|
107
|
+
allowSymlinks?: boolean;
|
|
108
|
+
}
|
|
109
|
+
export declare class OverlayFs implements IFileSystem {
|
|
110
|
+
private readonly root;
|
|
111
|
+
private readonly canonicalRoot;
|
|
112
|
+
private readonly mountPoint;
|
|
113
|
+
private readonly readOnly;
|
|
114
|
+
private readonly maxFileReadSize;
|
|
115
|
+
private readonly maxMemoryBytes;
|
|
116
|
+
private readonly allowSymlinks;
|
|
117
|
+
private readonly tree;
|
|
118
|
+
private nextMemoryIdentity;
|
|
119
|
+
private identityFor;
|
|
120
|
+
constructor(options: OverlayFsOptions);
|
|
121
|
+
/**
|
|
122
|
+
* Throws an error if the filesystem is in read-only mode.
|
|
123
|
+
*/
|
|
124
|
+
private assertWritable;
|
|
125
|
+
/**
|
|
126
|
+
* Create directory entries for the mount point path
|
|
127
|
+
*/
|
|
128
|
+
private createMountPointDirs;
|
|
129
|
+
/**
|
|
130
|
+
* Get the mount point for this overlay
|
|
131
|
+
*/
|
|
132
|
+
getMountPoint(): string;
|
|
133
|
+
/**
|
|
134
|
+
* Return all changes recorded in this overlay since construction (or the
|
|
135
|
+
* last {@link reset}): every write captured in the upper layer and every
|
|
136
|
+
* deletion of a lower-layer path.
|
|
137
|
+
*
|
|
138
|
+
* Paths are reported relative to the overlay root with a leading slash
|
|
139
|
+
* (e.g. `"/README.md"`), ready to join with the host-side root directory.
|
|
140
|
+
* The mount root itself is never reported, and writes outside the mount
|
|
141
|
+
* point (e.g. `/tmp` scratch files) are excluded: they have no disk
|
|
142
|
+
* counterpart to apply against.
|
|
143
|
+
*
|
|
144
|
+
* Semantics worth relying on:
|
|
145
|
+
* - **Modify** — an internal copy-up shadows the disk file; the diff
|
|
146
|
+
* shows one write with the new content.
|
|
147
|
+
* - **Metadata-only change (chmod/utimes)** — one write with
|
|
148
|
+
* `metadataOnly: true` and empty content; apply mode/mtime only.
|
|
149
|
+
* - **Create** — one write, including parent directories created on
|
|
150
|
+
* demand.
|
|
151
|
+
* - **Delete then recreate** — reported as a write, not a deletion.
|
|
152
|
+
* - **`rm -rf dir`** — one deletion for `dir`, not one per child
|
|
153
|
+
* (whiteouts never nest, so every reported deletion is top-most).
|
|
154
|
+
* - **Create then delete (never on disk)** — appears in neither list.
|
|
155
|
+
*
|
|
156
|
+
* Pure tree walk plus a synchronous existence check per whiteout and
|
|
157
|
+
* metacopy node. See the class-level policy on concurrent modification
|
|
158
|
+
* of the underlying directory.
|
|
159
|
+
*/
|
|
160
|
+
diff(): OverlayDiff;
|
|
161
|
+
/**
|
|
162
|
+
* Reconcile the overlay with current disk state: drop every upper-layer
|
|
163
|
+
* shadow that now matches the lower directory, and clear whiteouts whose
|
|
164
|
+
* disk paths no longer exist. Entries that still differ remain pending
|
|
165
|
+
* and keep appearing in {@link diff}.
|
|
166
|
+
*
|
|
167
|
+
* After the host applies writes (or a native run rewrites files),
|
|
168
|
+
* `sync()` leaves the overlay holding "exactly the differences from disk
|
|
169
|
+
* right now": applied writes and deletions disappear, failed or
|
|
170
|
+
* conflicting ones stay visible — no per-path bookkeeping needed.
|
|
171
|
+
* Matching rules: content nodes compare bytes; metacopy nodes compare
|
|
172
|
+
* mtime everywhere and mode on POSIX (mode is advisory on Windows);
|
|
173
|
+
* directories match on existence and drop only once every child was
|
|
174
|
+
* dropped (post-order guarantees children reconcile first).
|
|
175
|
+
*/
|
|
176
|
+
sync(): Promise<void>;
|
|
177
|
+
/**
|
|
178
|
+
* Discard all pending state: clear the upper layer so the overlay
|
|
179
|
+
* re-baselines on current disk state (trust-disk switch after native
|
|
180
|
+
* runs). Unlike {@link sync}, which keeps entries that genuinely differ
|
|
181
|
+
* from disk, `reset()` deliberately forgets them.
|
|
182
|
+
*/
|
|
183
|
+
reset(): void;
|
|
184
|
+
/**
|
|
185
|
+
* Drop pending upper-layer state at the given paths (root-relative with
|
|
186
|
+
* a leading slash, exactly as {@link diff} emits them). Pure tree
|
|
187
|
+
* operation — no disk I/O, no match verification: the caller asserts
|
|
188
|
+
* these entries are done with, for whatever reason (applied to disk,
|
|
189
|
+
* rejected, superseded); the overlay does not care which.
|
|
190
|
+
*
|
|
191
|
+
* Per path: file/symlink nodes detach; whiteouts detach (dropping a
|
|
192
|
+
* pending deletion resurrects the lower-layer view of the path);
|
|
193
|
+
* directory nodes detach only when childless of pending children (same
|
|
194
|
+
* structural rule as {@link sync}), so a listed directory with
|
|
195
|
+
* still-pending children is kept until they drain. Unknown paths are a
|
|
196
|
+
* no-op. Nested paths in one call are handled deepest-first, so
|
|
197
|
+
* children drain before their parents are evaluated.
|
|
198
|
+
*
|
|
199
|
+
* {@link reset} is drop-everything; {@link sync} is drop-what-matches-
|
|
200
|
+
* disk. `drop()` is for callers that already know which entries are
|
|
201
|
+
* done — e.g. a host that just applied a change set.
|
|
202
|
+
*/
|
|
203
|
+
drop(paths: string[]): void;
|
|
204
|
+
/**
|
|
205
|
+
* True when the disk entry at `path` matches the upper-layer shadow:
|
|
206
|
+
* byte-identical content for full file nodes, metadata for metacopy
|
|
207
|
+
* nodes (mtime everywhere, mode on POSIX), existence for directories,
|
|
208
|
+
* same target for symlinks.
|
|
209
|
+
*/
|
|
210
|
+
/**
|
|
211
|
+
* lstat the lower-layer counterpart of a virtual path via parent-based
|
|
212
|
+
* canonical resolution (the path itself may not exist as a real file,
|
|
213
|
+
* e.g. an upper symlink shadow). Returns null when the path has no
|
|
214
|
+
* real-FS counterpart or the lstat fails.
|
|
215
|
+
*/
|
|
216
|
+
private lstatLower;
|
|
217
|
+
private nodeMatchesDisk;
|
|
218
|
+
/**
|
|
219
|
+
* Create a virtual directory in memory (sync, for initialization)
|
|
220
|
+
*/
|
|
221
|
+
mkdirSync(path: string, _options?: MkdirOptions): void;
|
|
222
|
+
/**
|
|
223
|
+
* Create a virtual file in memory (sync, for initialization)
|
|
224
|
+
*/
|
|
225
|
+
writeFileSync(path: string, content: string | Uint8Array): void;
|
|
226
|
+
/**
|
|
227
|
+
* Check if a normalized virtual path is under the mount point.
|
|
228
|
+
* Returns the relative path within the mount point, or null if not under it.
|
|
229
|
+
*/
|
|
230
|
+
private getRelativeToMount;
|
|
231
|
+
/**
|
|
232
|
+
* Convert a virtual path to a real filesystem path.
|
|
233
|
+
* Returns null if the path is not under the mount point or would escape the root.
|
|
234
|
+
*/
|
|
235
|
+
private toRealPath;
|
|
236
|
+
/**
|
|
237
|
+
* Resolve a real-FS path to its canonical form and validate it stays
|
|
238
|
+
* within the sandbox. Returns the canonical path for I/O, or null if
|
|
239
|
+
* the path escapes the root or traverses a symlink (when !allowSymlinks).
|
|
240
|
+
*
|
|
241
|
+
* Callers MUST use the returned canonical path for subsequent I/O to
|
|
242
|
+
* close the TOCTOU gap between validation and use.
|
|
243
|
+
*/
|
|
244
|
+
private resolveRealPath_;
|
|
245
|
+
/**
|
|
246
|
+
* Resolve only the parent directory of a real-FS path, then join with
|
|
247
|
+
* the original basename. Used by lstat/readlink/existsInOverlay where
|
|
248
|
+
* the final component may itself be a symlink we want to inspect (not
|
|
249
|
+
* follow). Returns the canonical parent + basename for I/O, or null.
|
|
250
|
+
*/
|
|
251
|
+
private resolveRealPathParent_;
|
|
252
|
+
private sanitizeError;
|
|
253
|
+
private ensureParentDirs;
|
|
254
|
+
/**
|
|
255
|
+
* List the lower-layer (real-FS) child names of a directory, for
|
|
256
|
+
* whiteout population during resurrection. Returns null when the path
|
|
257
|
+
* has no readable lower directory — lookups then degrade to individual
|
|
258
|
+
* lower-layer errors rather than leaking.
|
|
259
|
+
*/
|
|
260
|
+
private lowerChildren;
|
|
261
|
+
/**
|
|
262
|
+
* Check if a path exists in the overlay (tree + real fs - whiteouts)
|
|
263
|
+
*/
|
|
264
|
+
private existsInOverlay;
|
|
265
|
+
readFile(path: string, options?: ReadFileOptions | BufferEncoding): Promise<string>;
|
|
266
|
+
readFileBytes(path: string): Promise<ByteString>;
|
|
267
|
+
readFileBuffer(path: string, seen?: Set<string>): Promise<Uint8Array>;
|
|
268
|
+
/**
|
|
269
|
+
* Read a path from the lower layer (real filesystem), following lower
|
|
270
|
+
* symlinks through the virtual layer. Shared by clean-miss reads and
|
|
271
|
+
* metacopy fall-through.
|
|
272
|
+
*/
|
|
273
|
+
private readLowerFileBytes;
|
|
274
|
+
writeFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
|
|
275
|
+
/**
|
|
276
|
+
* Mode for a newly attached file shadow: the current entry's mode when
|
|
277
|
+
* overwriting an upper-layer file, the lower file's mode when shadowing
|
|
278
|
+
* a lower-layer file (POSIX O_TRUNC preserves mode), DEFAULT_FILE_MODE
|
|
279
|
+
* for genuinely new files (including recreate-after-delete).
|
|
280
|
+
*
|
|
281
|
+
* The lower-layer stat is POSIX-only: Windows modes are synthesized
|
|
282
|
+
* (0o666/0o444 from the read-only attribute, exec bits from the file
|
|
283
|
+
* extension) and nothing in the overlay enforces them, so the syscall
|
|
284
|
+
* would buy fiction.
|
|
285
|
+
*/
|
|
286
|
+
private inheritedMode;
|
|
287
|
+
appendFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
|
|
288
|
+
exists(path: string): Promise<boolean>;
|
|
289
|
+
stat(path: string, seen?: Set<string>): Promise<FsStat>;
|
|
290
|
+
lstat(path: string): Promise<FsStat>;
|
|
291
|
+
/**
|
|
292
|
+
* Build an FsStat for an upper-layer entry node (lstat semantics:
|
|
293
|
+
* symlinks are reported, not followed).
|
|
294
|
+
*/
|
|
295
|
+
private memoryEntryStat;
|
|
296
|
+
private resolveSymlink;
|
|
297
|
+
/**
|
|
298
|
+
* Convert a real-fs symlink target to a virtual target suitable for resolveSymlink.
|
|
299
|
+
* Handles absolute real-fs paths that point within the root by converting them
|
|
300
|
+
* to virtual paths relative to the mount point.
|
|
301
|
+
*/
|
|
302
|
+
private realTargetToVirtual;
|
|
303
|
+
mkdir(path: string, options?: MkdirOptions): Promise<void>;
|
|
304
|
+
/**
|
|
305
|
+
* Core readdir implementation that returns entries with file types.
|
|
306
|
+
* Both readdir and readdirWithFileTypes use this shared implementation.
|
|
307
|
+
*/
|
|
308
|
+
private readdirCore;
|
|
309
|
+
/**
|
|
310
|
+
* Follow symlinks to resolve the final directory path.
|
|
311
|
+
* Returns outsideOverlay: true if the symlink points outside the overlay or
|
|
312
|
+
* the resolved target doesn't exist (security - broken symlinks return []).
|
|
313
|
+
*/
|
|
314
|
+
private resolveForReaddir;
|
|
315
|
+
readdir(path: string): Promise<string[]>;
|
|
316
|
+
readdirWithFileTypes(path: string): Promise<DirentEntry[]>;
|
|
317
|
+
rm(path: string, options?: RmOptions): Promise<void>;
|
|
318
|
+
/**
|
|
319
|
+
* Check (synchronously) whether a path exists on the real filesystem.
|
|
320
|
+
* Used to decide whether a whiteout is needed after deletion.
|
|
321
|
+
*/
|
|
322
|
+
private existsOnRealFs;
|
|
323
|
+
cp(src: string, dest: string, options?: CpOptions): Promise<void>;
|
|
324
|
+
mv(src: string, dest: string): Promise<void>;
|
|
325
|
+
resolvePath(base: string, rel: string): string;
|
|
326
|
+
getAllPaths(): string[];
|
|
327
|
+
private scanRealFs;
|
|
328
|
+
/**
|
|
329
|
+
* True when the lower layer at `virtualPath` is invisible: a whiteout at
|
|
330
|
+
* or above the path, or a non-directory shadow in the way. Missing paths
|
|
331
|
+
* (clean fall-through) return false.
|
|
332
|
+
*/
|
|
333
|
+
private lowerHidden;
|
|
334
|
+
/** The upper-layer entry at `virtualPath`, or undefined. */
|
|
335
|
+
private entryAt;
|
|
336
|
+
chmod(path: string, mode: number): Promise<void>;
|
|
337
|
+
/**
|
|
338
|
+
* Attach a metadata-only shadow for a lower-layer path: metadata moves
|
|
339
|
+
* to the upper layer, data stays lower (copied lazily on first content
|
|
340
|
+
* write for files). Callers pass the mode/mtime the shadow should carry
|
|
341
|
+
* (the operation's argument or the lower stat, depending on which
|
|
342
|
+
* metadata the operation changes).
|
|
343
|
+
*/
|
|
344
|
+
private attachMetacopyShadow;
|
|
345
|
+
symlink(target: string, linkPath: string): Promise<void>;
|
|
346
|
+
link(existingPath: string, newPath: string): Promise<void>;
|
|
347
|
+
readlink(path: string): Promise<string>;
|
|
348
|
+
/**
|
|
349
|
+
* Resolve all symlinks in a path to get the canonical physical path.
|
|
350
|
+
* This is equivalent to POSIX realpath().
|
|
351
|
+
*/
|
|
352
|
+
realpath(path: string): Promise<string>;
|
|
353
|
+
/**
|
|
354
|
+
* Set access and modification times of a file
|
|
355
|
+
* @param path - The file path
|
|
356
|
+
* @param _atime - Access time (ignored, kept for API compatibility)
|
|
357
|
+
* @param mtime - Modification time
|
|
358
|
+
*/
|
|
359
|
+
utimes(path: string, _atime: Date, mtime: Date): Promise<void>;
|
|
360
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overlay upper-layer tree.
|
|
3
|
+
*
|
|
4
|
+
* Pure data structure backing OverlayFs's copy-on-write layer: entry nodes
|
|
5
|
+
* (file/directory/symlink) shadow lower-layer paths, whiteout nodes mark
|
|
6
|
+
* deleted lower-layer paths. The tree root is the VFS root ("/").
|
|
7
|
+
*
|
|
8
|
+
* Design notes:
|
|
9
|
+
* - No parent pointers. Every operation starts with descend(), whose
|
|
10
|
+
* ancestry stack gives mutations all the context they need — the tree
|
|
11
|
+
* cannot disagree with itself about where a node lives.
|
|
12
|
+
* - Whiteouts are tree nodes, so "is this path hidden?" is answered by the
|
|
13
|
+
* descent itself ("blocked"), not by a parallel tombstone set.
|
|
14
|
+
* - Type-safe mutation: attach() refuses to replace a directory with a
|
|
15
|
+
* file/symlink (EISDIR) or an entry with a directory (EEXIST), mirroring
|
|
16
|
+
* what real bash reports at the syscall boundary. detach()/putWhiteout()
|
|
17
|
+
* may remove anything (rm semantics).
|
|
18
|
+
* - Byte accounting is centralized here so retainedBytes always equals the
|
|
19
|
+
* sum of file bytes over the tree (directories, symlinks, whiteouts: 0).
|
|
20
|
+
*
|
|
21
|
+
* All traversals are iterative — no recursion depth limits on deep trees.
|
|
22
|
+
*/
|
|
23
|
+
export interface OverlayFileNode {
|
|
24
|
+
type: "file";
|
|
25
|
+
content: Uint8Array;
|
|
26
|
+
/**
|
|
27
|
+
* Metacopy marker (Linux overlayfs metacopy semantics): metadata
|
|
28
|
+
* (mode/mtime) is upper-layer, data is still lower-layer. Created by
|
|
29
|
+
* chmod/utimes copy-up so metadata-only changes cost O(1) instead of a
|
|
30
|
+
* full content copy. Reads fall through to the lower file (or promote
|
|
31
|
+
* to a full node on Windows, where metadata is advisory); the first
|
|
32
|
+
* content write completes the copy-up, preserving the upper mode.
|
|
33
|
+
*/
|
|
34
|
+
metacopy?: boolean;
|
|
35
|
+
/** Lower-layer file size recorded at metacopy creation (for stat). */
|
|
36
|
+
lowerSize?: number;
|
|
37
|
+
/** Append segments retained without copying the complete file per append. */
|
|
38
|
+
appendChunks?: Uint8Array[];
|
|
39
|
+
mode: number;
|
|
40
|
+
mtime: Date;
|
|
41
|
+
identity?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface OverlayDirNode {
|
|
44
|
+
type: "directory";
|
|
45
|
+
/** Child nodes keyed by name segment, in insertion order. */
|
|
46
|
+
children: Map<string, OverlayNode>;
|
|
47
|
+
mode: number;
|
|
48
|
+
mtime: Date;
|
|
49
|
+
identity?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface OverlaySymlinkNode {
|
|
52
|
+
type: "symlink";
|
|
53
|
+
target: string;
|
|
54
|
+
mode: number;
|
|
55
|
+
mtime: Date;
|
|
56
|
+
}
|
|
57
|
+
/** Leaf marker hiding a lower-layer (real-FS) path and everything under it. */
|
|
58
|
+
export interface OverlayWhiteoutNode {
|
|
59
|
+
type: "whiteout";
|
|
60
|
+
}
|
|
61
|
+
export type OverlayEntryNode = OverlayFileNode | OverlayDirNode | OverlaySymlinkNode;
|
|
62
|
+
export type OverlayNode = OverlayEntryNode | OverlayWhiteoutNode;
|
|
63
|
+
/**
|
|
64
|
+
* Result of walking a path through the tree.
|
|
65
|
+
*
|
|
66
|
+
* - `found`: an entry or whiteout exists at the exact path. `stack` holds
|
|
67
|
+
* the ancestry of directory nodes, root first, parent last (empty for "/").
|
|
68
|
+
* - `missing`: nothing shadows the path — the caller may fall through to the
|
|
69
|
+
* lower layer. `missingAt` is the index of the first absent segment.
|
|
70
|
+
* - `blocked`: a whiteout sits at or above the path — ENOENT, with no
|
|
71
|
+
* lower-layer fallthrough. `blockedAt` is the whiteout's segment index.
|
|
72
|
+
* - `notdir`: a file/symlink entry blocks descent below it — ENOTDIR.
|
|
73
|
+
* `notdirAt` is the entry's segment index.
|
|
74
|
+
*/
|
|
75
|
+
export type DescentResult = {
|
|
76
|
+
kind: "found";
|
|
77
|
+
stack: OverlayDirNode[];
|
|
78
|
+
node: OverlayNode;
|
|
79
|
+
} | {
|
|
80
|
+
kind: "missing";
|
|
81
|
+
stack: OverlayDirNode[];
|
|
82
|
+
missingAt: number;
|
|
83
|
+
} | {
|
|
84
|
+
kind: "blocked";
|
|
85
|
+
stack: OverlayDirNode[];
|
|
86
|
+
blockedAt: number;
|
|
87
|
+
} | {
|
|
88
|
+
kind: "notdir";
|
|
89
|
+
stack: OverlayDirNode[];
|
|
90
|
+
notdirAt: number;
|
|
91
|
+
};
|
|
92
|
+
/** Byte size of a file node (base content + append chunks). */
|
|
93
|
+
export declare function fileNodeBytes(node: OverlayFileNode): number;
|
|
94
|
+
/**
|
|
95
|
+
* Merge a file node's base content and append chunks into one buffer,
|
|
96
|
+
* compacting the node in place. Total byte accounting is unchanged (the
|
|
97
|
+
* chunk bytes move into content), so the retainedBytes invariant holds.
|
|
98
|
+
*/
|
|
99
|
+
export declare function coalesceFileContent(node: OverlayFileNode, virtualPath: string): Uint8Array;
|
|
100
|
+
export declare class OverlayTree {
|
|
101
|
+
private readonly maxMemoryBytes;
|
|
102
|
+
private rootNode;
|
|
103
|
+
private bytes;
|
|
104
|
+
constructor(maxMemoryBytes: number);
|
|
105
|
+
/** The root directory node — the VFS root ("/"). */
|
|
106
|
+
get root(): OverlayDirNode;
|
|
107
|
+
/** Sum of file bytes retained in the tree (whiteouts and metadata: 0). */
|
|
108
|
+
get retainedBytes(): number;
|
|
109
|
+
/**
|
|
110
|
+
* Walk `path` segment by segment from the root. See DescentResult for the
|
|
111
|
+
* four outcomes and their meanings.
|
|
112
|
+
*/
|
|
113
|
+
descend(path: string): DescentResult;
|
|
114
|
+
/**
|
|
115
|
+
* Ensure every segment of `path` exists as a directory, creating missing
|
|
116
|
+
* ones and resurrecting whiteouts into fresh directories
|
|
117
|
+
* (write-under-deleted-dir semantics). Returns the directory at `path`.
|
|
118
|
+
* Throws ENOTDIR when a file/symlink entry blocks the path.
|
|
119
|
+
*
|
|
120
|
+
* Resurrection preserves deletions explicitly: for each resurrected
|
|
121
|
+
* directory the `lowerChildren` callback is invoked with its VFS path,
|
|
122
|
+
* and every returned lower-layer name gets a whiteout child — the old
|
|
123
|
+
* contents stay deleted exactly where they live, at any depth, with no
|
|
124
|
+
* ancestry state in lookups. A null return (lower layer unreadable or
|
|
125
|
+
* gone) populates nothing: lookups then degrade to individual lower-layer
|
|
126
|
+
* errors rather than leaking.
|
|
127
|
+
*/
|
|
128
|
+
ensureDirs(path: string, lowerChildren?: (vfsPath: string) => Iterable<string> | null): OverlayDirNode;
|
|
129
|
+
/**
|
|
130
|
+
* Replace the whiteout at `parent/name` with a fresh directory, marking
|
|
131
|
+
* each lower-layer child with a whiteout so recreating the directory does
|
|
132
|
+
* not bring its deleted contents back.
|
|
133
|
+
*/
|
|
134
|
+
private resurrectDir;
|
|
135
|
+
/**
|
|
136
|
+
* Insert or replace the entry at `path`. The parent must already exist as
|
|
137
|
+
* a directory (callers use ensureDirs first). Type rules mirror real bash
|
|
138
|
+
* at the syscall boundary:
|
|
139
|
+
* - file/symlink replacing a directory → EISDIR
|
|
140
|
+
* - directory replacing any existing node → EEXIST (directory
|
|
141
|
+
* resurrection after deletion must go through ensureDirs, which
|
|
142
|
+
* populates lower-layer whiteouts)
|
|
143
|
+
* - file/symlink replacing a whiteout, file, or symlink → legal
|
|
144
|
+
* (write-over / recreate-after-delete)
|
|
145
|
+
*/
|
|
146
|
+
attach(path: string, node: OverlayEntryNode): void;
|
|
147
|
+
/**
|
|
148
|
+
* Remove the entry or whiteout at `path`, releasing the byte cost of the
|
|
149
|
+
* whole dropped subtree. Returns the removed node, or undefined when the
|
|
150
|
+
* path is missing, blocked, or the root.
|
|
151
|
+
*/
|
|
152
|
+
detach(path: string): OverlayNode | undefined;
|
|
153
|
+
/**
|
|
154
|
+
* Mark `path` as deleted in the lower layer: ensure the parent chain
|
|
155
|
+
* exists, then replace whatever child is there with a whiteout, releasing
|
|
156
|
+
* the dropped subtree's bytes. Idempotent. This is the rm primitive.
|
|
157
|
+
*/
|
|
158
|
+
putWhiteout(path: string): void;
|
|
159
|
+
/**
|
|
160
|
+
* Append a chunk to a file node, accounting its bytes against capacity.
|
|
161
|
+
*/
|
|
162
|
+
appendChunk(node: OverlayFileNode, chunk: Uint8Array): void;
|
|
163
|
+
/**
|
|
164
|
+
* Yield every node, parents before children (pre-order), starting with the
|
|
165
|
+
* root at path "/". Whiteouts are included; callers filter as needed.
|
|
166
|
+
*/
|
|
167
|
+
preOrder(): Generator<{
|
|
168
|
+
path: string;
|
|
169
|
+
node: OverlayNode;
|
|
170
|
+
}>;
|
|
171
|
+
/**
|
|
172
|
+
* Yield every node, children before parents (post-order) — the order in
|
|
173
|
+
* which bottom-up drops are safe. Whiteouts are included.
|
|
174
|
+
*/
|
|
175
|
+
postOrder(): Generator<{
|
|
176
|
+
path: string;
|
|
177
|
+
node: OverlayNode;
|
|
178
|
+
}>;
|
|
179
|
+
/** Discard the whole tree, resetting byte accounting. */
|
|
180
|
+
clear(): void;
|
|
181
|
+
/** Sum of file bytes over the node's subtree (0 for non-directories). */
|
|
182
|
+
private static subtreeBytes;
|
|
183
|
+
/** Descend to the parent of `segments`, which must exist as directories. */
|
|
184
|
+
private parentDirOf;
|
|
185
|
+
/** Descend one level for putWhiteout, creating/resurrecting as needed. */
|
|
186
|
+
private ensureChildDir;
|
|
187
|
+
private assertCapacity;
|
|
188
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure path utilities for virtual filesystems.
|
|
3
|
+
*
|
|
4
|
+
* No node:fs or node:path dependencies — safe for browser bundles.
|
|
5
|
+
* Real-FS-backed implementations should import from real-fs-utils.ts
|
|
6
|
+
* (which re-exports these) to keep a single import source.
|
|
7
|
+
*/
|
|
8
|
+
/** Maximum depth for symlink resolution loops. */
|
|
9
|
+
export declare const MAX_SYMLINK_DEPTH = 40;
|
|
10
|
+
/** Default directory permissions. */
|
|
11
|
+
export declare const DEFAULT_DIR_MODE = 493;
|
|
12
|
+
/** Default file permissions. */
|
|
13
|
+
export declare const DEFAULT_FILE_MODE = 420;
|
|
14
|
+
/** Default symlink permissions. */
|
|
15
|
+
export declare const SYMLINK_MODE = 511;
|
|
16
|
+
/**
|
|
17
|
+
* Normalize a virtual path: resolve `.` and `..`, ensure it starts with `/`,
|
|
18
|
+
* strip trailing slashes. Pure function, no I/O.
|
|
19
|
+
*/
|
|
20
|
+
export declare function normalizePath(path: string): string;
|
|
21
|
+
/** True when candidate is the same virtual path as parent or below it. */
|
|
22
|
+
export declare function isSameOrDescendantPath(parent: string, candidate: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Validate that a path does not contain null bytes.
|
|
25
|
+
* Null bytes in paths can be used to truncate filenames or bypass security
|
|
26
|
+
* filters.
|
|
27
|
+
*/
|
|
28
|
+
export declare function validatePath(path: string, operation: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Get the directory name of a normalized virtual path.
|
|
31
|
+
*/
|
|
32
|
+
export declare function dirname(path: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Resolve a relative path against a base directory.
|
|
35
|
+
* If `path` is absolute, it is normalized and returned directly.
|
|
36
|
+
*/
|
|
37
|
+
export declare function resolvePath(base: string, path: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Join a parent path with a child name.
|
|
40
|
+
* Handles the root-path edge case (`"/" + "child"` → `"/child"`).
|
|
41
|
+
*/
|
|
42
|
+
export declare function joinPath(parent: string, child: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* Resolve a symlink target relative to the symlink's location.
|
|
45
|
+
* Absolute targets are normalized directly; relative targets are
|
|
46
|
+
* resolved from the symlink's parent directory.
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveSymlinkTarget(symlinkPath: string, target: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ReadWriteFs, type ReadWriteFsOptions } from "./read-write-fs.js";
|