just-bash-nx 2.14.4
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 +13 -0
- package/LICENSE +201 -0
- package/README.md +573 -0
- package/dist/AGENTS.md +325 -0
- package/dist/Bash.d.ts +229 -0
- package/dist/ast/types.d.ts +609 -0
- package/dist/banned-patterns-test.d.ts +1 -0
- package/dist/bin/chunks/alias-3GODYSFD.js +2 -0
- package/dist/bin/chunks/awk2-RSUCURL4.js +2 -0
- package/dist/bin/chunks/base64-43M2R3GA.js +2 -0
- package/dist/bin/chunks/basename-KBUKWB2E.js +2 -0
- package/dist/bin/chunks/bash-6ZHZ6BX7.js +2 -0
- package/dist/bin/chunks/cat-XZIJZXKP.js +2 -0
- package/dist/bin/chunks/chmod-N5CQATDW.js +2 -0
- package/dist/bin/chunks/chunk-22NDZXS5.js +33 -0
- package/dist/bin/chunks/chunk-26NO42TF.js +14 -0
- package/dist/bin/chunks/chunk-2W2SCVT6.js +140 -0
- package/dist/bin/chunks/chunk-3MBAUIBB.js +7 -0
- package/dist/bin/chunks/chunk-3Y32LPNT.js +2 -0
- package/dist/bin/chunks/chunk-4CFAYBLV.js +21 -0
- package/dist/bin/chunks/chunk-4OALHZXB.js +2 -0
- package/dist/bin/chunks/chunk-4PRVMER6.js +2 -0
- package/dist/bin/chunks/chunk-4VDEBYW7.js +2 -0
- package/dist/bin/chunks/chunk-54G6AE72.js +32 -0
- package/dist/bin/chunks/chunk-5G2VOPPJ.js +7 -0
- package/dist/bin/chunks/chunk-5WFYIUU2.js +3 -0
- package/dist/bin/chunks/chunk-6KZRLMG3.js +8 -0
- package/dist/bin/chunks/chunk-7ADG3DNO.js +8 -0
- package/dist/bin/chunks/chunk-7BORMNPQ.js +2 -0
- package/dist/bin/chunks/chunk-7G3MC56B.js +7 -0
- package/dist/bin/chunks/chunk-AAW7UMPO.js +9 -0
- package/dist/bin/chunks/chunk-AXWFPG37.js +10 -0
- package/dist/bin/chunks/chunk-AZ3RUDR2.js +9 -0
- package/dist/bin/chunks/chunk-BGGF3ELU.js +5 -0
- package/dist/bin/chunks/chunk-BYDV4VEF.js +3 -0
- package/dist/bin/chunks/chunk-CGE2EHYP.js +5 -0
- package/dist/bin/chunks/chunk-CM4532DS.js +36 -0
- package/dist/bin/chunks/chunk-CQG2HEAL.js +5 -0
- package/dist/bin/chunks/chunk-D5WP4CKS.js +3 -0
- package/dist/bin/chunks/chunk-DOXYBGNA.js +12 -0
- package/dist/bin/chunks/chunk-E5BDLLK6.js +15 -0
- package/dist/bin/chunks/chunk-EJQKHROT.js +14 -0
- package/dist/bin/chunks/chunk-EONWONZV.js +2 -0
- package/dist/bin/chunks/chunk-EPPBDXOG.js +8 -0
- package/dist/bin/chunks/chunk-EUXCM6C4.js +12 -0
- package/dist/bin/chunks/chunk-EWDHVLQL.js +21 -0
- package/dist/bin/chunks/chunk-F3LGZXLQ.js +9 -0
- package/dist/bin/chunks/chunk-FA2CHD73.js +16 -0
- package/dist/bin/chunks/chunk-FIHFXGT6.js +287 -0
- package/dist/bin/chunks/chunk-FLPVVSN5.js +5 -0
- package/dist/bin/chunks/chunk-FSZWFMB4.js +16 -0
- package/dist/bin/chunks/chunk-GO6FXSC4.js +6 -0
- package/dist/bin/chunks/chunk-GOJZHH3L.js +6 -0
- package/dist/bin/chunks/chunk-GTNBSMZR.js +23 -0
- package/dist/bin/chunks/chunk-IDGH4PGU.js +3 -0
- package/dist/bin/chunks/chunk-IO2FYBEM.js +6 -0
- package/dist/bin/chunks/chunk-ITA43A73.js +7 -0
- package/dist/bin/chunks/chunk-JBABAK44.js +4 -0
- package/dist/bin/chunks/chunk-JDNI5HBX.js +33 -0
- package/dist/bin/chunks/chunk-JLX6YWGA.js +3 -0
- package/dist/bin/chunks/chunk-JQBC3FXE.js +8 -0
- package/dist/bin/chunks/chunk-JTF74J6E.js +2 -0
- package/dist/bin/chunks/chunk-KCMUAACL.js +19 -0
- package/dist/bin/chunks/chunk-KGOUQS5A.js +2 -0
- package/dist/bin/chunks/chunk-L6XUBS6H.js +84 -0
- package/dist/bin/chunks/chunk-LCDPWJBA.js +15 -0
- package/dist/bin/chunks/chunk-LGJM5YFT.js +17 -0
- package/dist/bin/chunks/chunk-LIYVQA3X.js +2 -0
- package/dist/bin/chunks/chunk-LJKIWB5F.js +4 -0
- package/dist/bin/chunks/chunk-LMK6G2HH.js +8 -0
- package/dist/bin/chunks/chunk-LOJMXC4F.js +5 -0
- package/dist/bin/chunks/chunk-MAVV76T4.js +2 -0
- package/dist/bin/chunks/chunk-MO4RPBN2.js +2 -0
- package/dist/bin/chunks/chunk-MRP4ZCD7.js +6 -0
- package/dist/bin/chunks/chunk-N43DJTSI.js +2 -0
- package/dist/bin/chunks/chunk-NAX7MTAR.js +21 -0
- package/dist/bin/chunks/chunk-NSUMEERA.js +12 -0
- package/dist/bin/chunks/chunk-NTW6IA45.js +2 -0
- package/dist/bin/chunks/chunk-OBH7XN5N.js +1 -0
- package/dist/bin/chunks/chunk-OBI37ZY4.js +9 -0
- package/dist/bin/chunks/chunk-OOJCYVYF.js +2 -0
- package/dist/bin/chunks/chunk-ORUYSLP4.js +16 -0
- package/dist/bin/chunks/chunk-OXHVTSNH.js +74 -0
- package/dist/bin/chunks/chunk-PNI5NMXP.js +100 -0
- package/dist/bin/chunks/chunk-PPBQJBC2.js +5 -0
- package/dist/bin/chunks/chunk-PQNTKMH3.js +6 -0
- package/dist/bin/chunks/chunk-PS4LOXE5.js +8 -0
- package/dist/bin/chunks/chunk-PXVBSPBE.js +2 -0
- package/dist/bin/chunks/chunk-RA3TG4UK.js +9 -0
- package/dist/bin/chunks/chunk-RBQGQWGV.js +10 -0
- package/dist/bin/chunks/chunk-RJSAGJQJ.js +11 -0
- package/dist/bin/chunks/chunk-RLNOQILG.js +2 -0
- package/dist/bin/chunks/chunk-ROJPSS6N.js +3 -0
- package/dist/bin/chunks/chunk-RT7TRQVZ.js +3 -0
- package/dist/bin/chunks/chunk-S3QAKT3R.js +11 -0
- package/dist/bin/chunks/chunk-S7OHMN3F.js +6 -0
- package/dist/bin/chunks/chunk-SGA7Y45Z.js +17 -0
- package/dist/bin/chunks/chunk-SXRVLCZ4.js +2 -0
- package/dist/bin/chunks/chunk-TEFXEYX3.js +3 -0
- package/dist/bin/chunks/chunk-THALLNXT.js +7 -0
- package/dist/bin/chunks/chunk-TTNNO45C.js +17 -0
- package/dist/bin/chunks/chunk-UFJFAFSS.js +28 -0
- package/dist/bin/chunks/chunk-V7ZOPVQS.js +2 -0
- package/dist/bin/chunks/chunk-VNER2XXL.js +7 -0
- package/dist/bin/chunks/chunk-WLBA7L7U.js +23 -0
- package/dist/bin/chunks/chunk-WWZVR5NN.js +6 -0
- package/dist/bin/chunks/chunk-WXMBDX4P.js +14 -0
- package/dist/bin/chunks/chunk-XXCTETRW.js +11 -0
- package/dist/bin/chunks/chunk-XY5HGZW5.js +8 -0
- package/dist/bin/chunks/chunk-YEKSVVRC.js +11 -0
- package/dist/bin/chunks/chunk-YLE2OYY6.js +2 -0
- package/dist/bin/chunks/chunk-YMMJLYIX.js +2 -0
- package/dist/bin/chunks/chunk-YTIURC67.js +2 -0
- package/dist/bin/chunks/chunk-YU6OGPZR.js +5 -0
- package/dist/bin/chunks/chunk-YWZOGBFE.js +9 -0
- package/dist/bin/chunks/chunk-ZA4HUKJ3.js +13 -0
- package/dist/bin/chunks/chunk-ZKC5HQYO.js +14 -0
- package/dist/bin/chunks/chunk-ZSVBYEY4.js +6 -0
- package/dist/bin/chunks/chunk-ZUDPEMHG.js +63 -0
- package/dist/bin/chunks/clear-KRGKPFOI.js +2 -0
- package/dist/bin/chunks/column-XGV32UPN.js +2 -0
- package/dist/bin/chunks/comm-R3F3Z5DX.js +2 -0
- package/dist/bin/chunks/cp-XH2ZB7WT.js +2 -0
- package/dist/bin/chunks/curl-2DCNBIKJ.js +26 -0
- package/dist/bin/chunks/cut-5EY2XPXX.js +2 -0
- package/dist/bin/chunks/date-WUPBL2TL.js +2 -0
- package/dist/bin/chunks/diff-5NUI5BHG.js +2 -0
- package/dist/bin/chunks/dirname-5FAOMLBL.js +2 -0
- package/dist/bin/chunks/du-LDAPXSGF.js +2 -0
- package/dist/bin/chunks/echo-2MUAOGUE.js +2 -0
- package/dist/bin/chunks/env-NTPN5QYM.js +2 -0
- package/dist/bin/chunks/expand-26XPP5KB.js +2 -0
- package/dist/bin/chunks/expansion-QUT3FT7V.js +2 -0
- package/dist/bin/chunks/expr-G4EF4POQ.js +2 -0
- package/dist/bin/chunks/file-MMSHRWCJ.js +2 -0
- package/dist/bin/chunks/find-7CVMEZBO.js +2 -0
- package/dist/bin/chunks/flag-coverage-UJISFT4M.js +2 -0
- package/dist/bin/chunks/fold-XSVNTAWH.js +2 -0
- package/dist/bin/chunks/grep-7BJ7HFBM.js +2 -0
- package/dist/bin/chunks/gzip-LHOO65AN.js +2 -0
- package/dist/bin/chunks/head-YMNRW3F3.js +2 -0
- package/dist/bin/chunks/help-DVG4AAGE.js +2 -0
- package/dist/bin/chunks/history-UUKG55YW.js +2 -0
- package/dist/bin/chunks/hostname-WY6RKE32.js +2 -0
- package/dist/bin/chunks/html-to-markdown-V6PK6S5U.js +2 -0
- package/dist/bin/chunks/join-Y4Q5WVVE.js +2 -0
- package/dist/bin/chunks/jq-4JWOFG7X.js +2 -0
- package/dist/bin/chunks/js-exec-RWEELTC2.js +97 -0
- package/dist/bin/chunks/js-exec-worker.js +4380 -0
- package/dist/bin/chunks/ln-EGC4HRXZ.js +2 -0
- package/dist/bin/chunks/ls-WONXDVOX.js +2 -0
- package/dist/bin/chunks/md5sum-NCLXV2S3.js +2 -0
- package/dist/bin/chunks/mkdir-Z47OISSR.js +2 -0
- package/dist/bin/chunks/mv-OY7X62QC.js +2 -0
- package/dist/bin/chunks/nl-XH3L75DR.js +2 -0
- package/dist/bin/chunks/od-52FBC34W.js +2 -0
- package/dist/bin/chunks/paste-3UVLMQ2K.js +2 -0
- package/dist/bin/chunks/printf-NA7DYZBO.js +2 -0
- package/dist/bin/chunks/pwd-6VBAPL3Y.js +2 -0
- package/dist/bin/chunks/python3-JUJKPBFB.js +12 -0
- package/dist/bin/chunks/readlink-BD5VFOC5.js +2 -0
- package/dist/bin/chunks/rev-UHEPS2UL.js +2 -0
- package/dist/bin/chunks/rg-DK6FRF6Q.js +2 -0
- package/dist/bin/chunks/rm-L3NZOLLG.js +2 -0
- package/dist/bin/chunks/rmdir-5KLM4EA6.js +2 -0
- package/dist/bin/chunks/sed-WWXBUNG3.js +2 -0
- package/dist/bin/chunks/seq-V7KBLSQ7.js +2 -0
- package/dist/bin/chunks/sha1sum-BHNJ5ALF.js +2 -0
- package/dist/bin/chunks/sha256sum-HJJ3NJ5L.js +2 -0
- package/dist/bin/chunks/sleep-ND6FZRZ4.js +2 -0
- package/dist/bin/chunks/sort-7GENYU2I.js +2 -0
- package/dist/bin/chunks/split-YWV64TJH.js +2 -0
- package/dist/bin/chunks/sqlite3-CVNFMP3Z.js +2 -0
- package/dist/bin/chunks/stat-XS2LXYS2.js +2 -0
- package/dist/bin/chunks/strings-XXKZCWY5.js +2 -0
- package/dist/bin/chunks/tac-T42SKDDI.js +2 -0
- package/dist/bin/chunks/tail-V537TDFR.js +2 -0
- package/dist/bin/chunks/tar-GTGFEWDS.js +2 -0
- package/dist/bin/chunks/tee-HK2SYCAR.js +2 -0
- package/dist/bin/chunks/time-5R4QWCYF.js +2 -0
- package/dist/bin/chunks/timeout-Z24MNWOP.js +2 -0
- package/dist/bin/chunks/touch-DWKSZGOQ.js +2 -0
- package/dist/bin/chunks/tr-4FPGAEVB.js +2 -0
- package/dist/bin/chunks/tree-HEKABARE.js +2 -0
- package/dist/bin/chunks/true-DP5UZP52.js +2 -0
- package/dist/bin/chunks/unexpand-OYZ7KOYR.js +2 -0
- package/dist/bin/chunks/uniq-TMSAIZM3.js +2 -0
- package/dist/bin/chunks/wc-ZIV3TFVG.js +2 -0
- package/dist/bin/chunks/which-5PO4LAOG.js +2 -0
- package/dist/bin/chunks/whoami-E7PN2UWC.js +2 -0
- package/dist/bin/chunks/worker.js +3136 -0
- package/dist/bin/chunks/xan-FKXPSPE5.js +2 -0
- package/dist/bin/chunks/xan-view-6J5MMMQB.js +2 -0
- package/dist/bin/chunks/xargs-SCYIFXOW.js +2 -0
- package/dist/bin/chunks/yq-RGXFWYJN.js +2 -0
- package/dist/bin/just-bash.js +754 -0
- package/dist/bin/shell/chunks/alias-3GODYSFD.js +2 -0
- package/dist/bin/shell/chunks/awk2-RSUCURL4.js +2 -0
- package/dist/bin/shell/chunks/base64-43M2R3GA.js +2 -0
- package/dist/bin/shell/chunks/basename-KBUKWB2E.js +2 -0
- package/dist/bin/shell/chunks/bash-6ZHZ6BX7.js +2 -0
- package/dist/bin/shell/chunks/cat-XZIJZXKP.js +2 -0
- package/dist/bin/shell/chunks/chmod-N5CQATDW.js +2 -0
- package/dist/bin/shell/chunks/chunk-22NDZXS5.js +33 -0
- package/dist/bin/shell/chunks/chunk-26NO42TF.js +14 -0
- package/dist/bin/shell/chunks/chunk-2W2SCVT6.js +140 -0
- package/dist/bin/shell/chunks/chunk-3MBAUIBB.js +7 -0
- package/dist/bin/shell/chunks/chunk-3Y32LPNT.js +2 -0
- package/dist/bin/shell/chunks/chunk-4CFAYBLV.js +21 -0
- package/dist/bin/shell/chunks/chunk-4OALHZXB.js +2 -0
- package/dist/bin/shell/chunks/chunk-4PRVMER6.js +2 -0
- package/dist/bin/shell/chunks/chunk-4VDEBYW7.js +2 -0
- package/dist/bin/shell/chunks/chunk-54G6AE72.js +32 -0
- package/dist/bin/shell/chunks/chunk-5G2VOPPJ.js +7 -0
- package/dist/bin/shell/chunks/chunk-5WFYIUU2.js +3 -0
- package/dist/bin/shell/chunks/chunk-6KZRLMG3.js +8 -0
- package/dist/bin/shell/chunks/chunk-7ADG3DNO.js +8 -0
- package/dist/bin/shell/chunks/chunk-7BORMNPQ.js +2 -0
- package/dist/bin/shell/chunks/chunk-7G3MC56B.js +7 -0
- package/dist/bin/shell/chunks/chunk-AAW7UMPO.js +9 -0
- package/dist/bin/shell/chunks/chunk-AXWFPG37.js +10 -0
- package/dist/bin/shell/chunks/chunk-AZ3RUDR2.js +9 -0
- package/dist/bin/shell/chunks/chunk-BGGF3ELU.js +5 -0
- package/dist/bin/shell/chunks/chunk-BYDV4VEF.js +3 -0
- package/dist/bin/shell/chunks/chunk-CGE2EHYP.js +5 -0
- package/dist/bin/shell/chunks/chunk-CM4532DS.js +36 -0
- package/dist/bin/shell/chunks/chunk-CQG2HEAL.js +5 -0
- package/dist/bin/shell/chunks/chunk-D5WP4CKS.js +3 -0
- package/dist/bin/shell/chunks/chunk-DOXYBGNA.js +12 -0
- package/dist/bin/shell/chunks/chunk-E5BDLLK6.js +15 -0
- package/dist/bin/shell/chunks/chunk-EJQKHROT.js +14 -0
- package/dist/bin/shell/chunks/chunk-EONWONZV.js +2 -0
- package/dist/bin/shell/chunks/chunk-EPPBDXOG.js +8 -0
- package/dist/bin/shell/chunks/chunk-EUXCM6C4.js +12 -0
- package/dist/bin/shell/chunks/chunk-EWDHVLQL.js +21 -0
- package/dist/bin/shell/chunks/chunk-F3LGZXLQ.js +9 -0
- package/dist/bin/shell/chunks/chunk-FA2CHD73.js +16 -0
- package/dist/bin/shell/chunks/chunk-FIHFXGT6.js +287 -0
- package/dist/bin/shell/chunks/chunk-FLPVVSN5.js +5 -0
- package/dist/bin/shell/chunks/chunk-FSZWFMB4.js +16 -0
- package/dist/bin/shell/chunks/chunk-GO6FXSC4.js +6 -0
- package/dist/bin/shell/chunks/chunk-GOJZHH3L.js +6 -0
- package/dist/bin/shell/chunks/chunk-GTNBSMZR.js +23 -0
- package/dist/bin/shell/chunks/chunk-HC7WB764.js +2 -0
- package/dist/bin/shell/chunks/chunk-IDGH4PGU.js +3 -0
- package/dist/bin/shell/chunks/chunk-IO2FYBEM.js +6 -0
- package/dist/bin/shell/chunks/chunk-ITA43A73.js +7 -0
- package/dist/bin/shell/chunks/chunk-JBABAK44.js +4 -0
- package/dist/bin/shell/chunks/chunk-JDNI5HBX.js +33 -0
- package/dist/bin/shell/chunks/chunk-JLX6YWGA.js +3 -0
- package/dist/bin/shell/chunks/chunk-JQBC3FXE.js +8 -0
- package/dist/bin/shell/chunks/chunk-JTF74J6E.js +2 -0
- package/dist/bin/shell/chunks/chunk-KCMUAACL.js +19 -0
- package/dist/bin/shell/chunks/chunk-KGOUQS5A.js +2 -0
- package/dist/bin/shell/chunks/chunk-L6XUBS6H.js +84 -0
- package/dist/bin/shell/chunks/chunk-LCDPWJBA.js +15 -0
- package/dist/bin/shell/chunks/chunk-LGJM5YFT.js +17 -0
- package/dist/bin/shell/chunks/chunk-LIYVQA3X.js +2 -0
- package/dist/bin/shell/chunks/chunk-LJKIWB5F.js +4 -0
- package/dist/bin/shell/chunks/chunk-LMK6G2HH.js +8 -0
- package/dist/bin/shell/chunks/chunk-LOJMXC4F.js +5 -0
- package/dist/bin/shell/chunks/chunk-MAVV76T4.js +2 -0
- package/dist/bin/shell/chunks/chunk-MO4RPBN2.js +2 -0
- package/dist/bin/shell/chunks/chunk-MRP4ZCD7.js +6 -0
- package/dist/bin/shell/chunks/chunk-N43DJTSI.js +2 -0
- package/dist/bin/shell/chunks/chunk-NAX7MTAR.js +21 -0
- package/dist/bin/shell/chunks/chunk-NSUMEERA.js +12 -0
- package/dist/bin/shell/chunks/chunk-NTW6IA45.js +2 -0
- package/dist/bin/shell/chunks/chunk-OBH7XN5N.js +1 -0
- package/dist/bin/shell/chunks/chunk-OBI37ZY4.js +9 -0
- package/dist/bin/shell/chunks/chunk-OOJCYVYF.js +2 -0
- package/dist/bin/shell/chunks/chunk-ORUYSLP4.js +16 -0
- package/dist/bin/shell/chunks/chunk-OXHVTSNH.js +74 -0
- package/dist/bin/shell/chunks/chunk-PNI5NMXP.js +100 -0
- package/dist/bin/shell/chunks/chunk-PPBQJBC2.js +5 -0
- package/dist/bin/shell/chunks/chunk-PQNTKMH3.js +6 -0
- package/dist/bin/shell/chunks/chunk-PS4LOXE5.js +8 -0
- package/dist/bin/shell/chunks/chunk-RA3TG4UK.js +9 -0
- package/dist/bin/shell/chunks/chunk-RBQGQWGV.js +10 -0
- package/dist/bin/shell/chunks/chunk-RJSAGJQJ.js +11 -0
- package/dist/bin/shell/chunks/chunk-RLNOQILG.js +2 -0
- package/dist/bin/shell/chunks/chunk-ROJPSS6N.js +3 -0
- package/dist/bin/shell/chunks/chunk-RT7TRQVZ.js +3 -0
- package/dist/bin/shell/chunks/chunk-S3QAKT3R.js +11 -0
- package/dist/bin/shell/chunks/chunk-S7OHMN3F.js +6 -0
- package/dist/bin/shell/chunks/chunk-SGA7Y45Z.js +17 -0
- package/dist/bin/shell/chunks/chunk-SXRVLCZ4.js +2 -0
- package/dist/bin/shell/chunks/chunk-TEFXEYX3.js +3 -0
- package/dist/bin/shell/chunks/chunk-THALLNXT.js +7 -0
- package/dist/bin/shell/chunks/chunk-TTNNO45C.js +17 -0
- package/dist/bin/shell/chunks/chunk-UFJFAFSS.js +28 -0
- package/dist/bin/shell/chunks/chunk-V7ZOPVQS.js +2 -0
- package/dist/bin/shell/chunks/chunk-VNER2XXL.js +7 -0
- package/dist/bin/shell/chunks/chunk-WLBA7L7U.js +23 -0
- package/dist/bin/shell/chunks/chunk-WWZVR5NN.js +6 -0
- package/dist/bin/shell/chunks/chunk-WXMBDX4P.js +14 -0
- package/dist/bin/shell/chunks/chunk-XXCTETRW.js +11 -0
- package/dist/bin/shell/chunks/chunk-XY5HGZW5.js +8 -0
- package/dist/bin/shell/chunks/chunk-YEKSVVRC.js +11 -0
- package/dist/bin/shell/chunks/chunk-YLE2OYY6.js +2 -0
- package/dist/bin/shell/chunks/chunk-YMMJLYIX.js +2 -0
- package/dist/bin/shell/chunks/chunk-YTIURC67.js +2 -0
- package/dist/bin/shell/chunks/chunk-YU6OGPZR.js +5 -0
- package/dist/bin/shell/chunks/chunk-YWZOGBFE.js +9 -0
- package/dist/bin/shell/chunks/chunk-ZA4HUKJ3.js +13 -0
- package/dist/bin/shell/chunks/chunk-ZKC5HQYO.js +14 -0
- package/dist/bin/shell/chunks/chunk-ZSVBYEY4.js +6 -0
- package/dist/bin/shell/chunks/chunk-ZUDPEMHG.js +63 -0
- package/dist/bin/shell/chunks/clear-KRGKPFOI.js +2 -0
- package/dist/bin/shell/chunks/column-XGV32UPN.js +2 -0
- package/dist/bin/shell/chunks/comm-R3F3Z5DX.js +2 -0
- package/dist/bin/shell/chunks/cp-XH2ZB7WT.js +2 -0
- package/dist/bin/shell/chunks/curl-2DCNBIKJ.js +26 -0
- package/dist/bin/shell/chunks/cut-5EY2XPXX.js +2 -0
- package/dist/bin/shell/chunks/date-WUPBL2TL.js +2 -0
- package/dist/bin/shell/chunks/diff-5NUI5BHG.js +2 -0
- package/dist/bin/shell/chunks/dirname-5FAOMLBL.js +2 -0
- package/dist/bin/shell/chunks/du-LDAPXSGF.js +2 -0
- package/dist/bin/shell/chunks/echo-2MUAOGUE.js +2 -0
- package/dist/bin/shell/chunks/env-NTPN5QYM.js +2 -0
- package/dist/bin/shell/chunks/expand-26XPP5KB.js +2 -0
- package/dist/bin/shell/chunks/expansion-QUT3FT7V.js +2 -0
- package/dist/bin/shell/chunks/expr-G4EF4POQ.js +2 -0
- package/dist/bin/shell/chunks/file-MMSHRWCJ.js +2 -0
- package/dist/bin/shell/chunks/find-7CVMEZBO.js +2 -0
- package/dist/bin/shell/chunks/flag-coverage-UJISFT4M.js +2 -0
- package/dist/bin/shell/chunks/fold-XSVNTAWH.js +2 -0
- package/dist/bin/shell/chunks/grep-7BJ7HFBM.js +2 -0
- package/dist/bin/shell/chunks/gzip-LHOO65AN.js +2 -0
- package/dist/bin/shell/chunks/head-YMNRW3F3.js +2 -0
- package/dist/bin/shell/chunks/help-DVG4AAGE.js +2 -0
- package/dist/bin/shell/chunks/history-UUKG55YW.js +2 -0
- package/dist/bin/shell/chunks/hostname-WY6RKE32.js +2 -0
- package/dist/bin/shell/chunks/html-to-markdown-V6PK6S5U.js +2 -0
- package/dist/bin/shell/chunks/join-Y4Q5WVVE.js +2 -0
- package/dist/bin/shell/chunks/jq-4JWOFG7X.js +2 -0
- package/dist/bin/shell/chunks/js-exec-AKWY6BP5.js +97 -0
- package/dist/bin/shell/chunks/ln-EGC4HRXZ.js +2 -0
- package/dist/bin/shell/chunks/ls-WONXDVOX.js +2 -0
- package/dist/bin/shell/chunks/md5sum-NCLXV2S3.js +2 -0
- package/dist/bin/shell/chunks/mkdir-Z47OISSR.js +2 -0
- package/dist/bin/shell/chunks/mv-OY7X62QC.js +2 -0
- package/dist/bin/shell/chunks/nl-XH3L75DR.js +2 -0
- package/dist/bin/shell/chunks/od-52FBC34W.js +2 -0
- package/dist/bin/shell/chunks/paste-3UVLMQ2K.js +2 -0
- package/dist/bin/shell/chunks/printf-NA7DYZBO.js +2 -0
- package/dist/bin/shell/chunks/pwd-6VBAPL3Y.js +2 -0
- package/dist/bin/shell/chunks/python3-RRCCYJKA.js +12 -0
- package/dist/bin/shell/chunks/readlink-BD5VFOC5.js +2 -0
- package/dist/bin/shell/chunks/rev-UHEPS2UL.js +2 -0
- package/dist/bin/shell/chunks/rg-DK6FRF6Q.js +2 -0
- package/dist/bin/shell/chunks/rm-L3NZOLLG.js +2 -0
- package/dist/bin/shell/chunks/rmdir-5KLM4EA6.js +2 -0
- package/dist/bin/shell/chunks/sed-WWXBUNG3.js +2 -0
- package/dist/bin/shell/chunks/seq-V7KBLSQ7.js +2 -0
- package/dist/bin/shell/chunks/sha1sum-BHNJ5ALF.js +2 -0
- package/dist/bin/shell/chunks/sha256sum-HJJ3NJ5L.js +2 -0
- package/dist/bin/shell/chunks/sleep-ND6FZRZ4.js +2 -0
- package/dist/bin/shell/chunks/sort-7GENYU2I.js +2 -0
- package/dist/bin/shell/chunks/split-YWV64TJH.js +2 -0
- package/dist/bin/shell/chunks/sqlite3-CVNFMP3Z.js +2 -0
- package/dist/bin/shell/chunks/stat-XS2LXYS2.js +2 -0
- package/dist/bin/shell/chunks/strings-XXKZCWY5.js +2 -0
- package/dist/bin/shell/chunks/tac-T42SKDDI.js +2 -0
- package/dist/bin/shell/chunks/tail-V537TDFR.js +2 -0
- package/dist/bin/shell/chunks/tar-GTGFEWDS.js +2 -0
- package/dist/bin/shell/chunks/tee-HK2SYCAR.js +2 -0
- package/dist/bin/shell/chunks/time-5R4QWCYF.js +2 -0
- package/dist/bin/shell/chunks/timeout-Z24MNWOP.js +2 -0
- package/dist/bin/shell/chunks/touch-DWKSZGOQ.js +2 -0
- package/dist/bin/shell/chunks/tr-4FPGAEVB.js +2 -0
- package/dist/bin/shell/chunks/tree-HEKABARE.js +2 -0
- package/dist/bin/shell/chunks/true-DP5UZP52.js +2 -0
- package/dist/bin/shell/chunks/unexpand-OYZ7KOYR.js +2 -0
- package/dist/bin/shell/chunks/uniq-TMSAIZM3.js +2 -0
- package/dist/bin/shell/chunks/wc-ZIV3TFVG.js +2 -0
- package/dist/bin/shell/chunks/which-5PO4LAOG.js +2 -0
- package/dist/bin/shell/chunks/whoami-E7PN2UWC.js +2 -0
- package/dist/bin/shell/chunks/xan-FKXPSPE5.js +2 -0
- package/dist/bin/shell/chunks/xan-view-6J5MMMQB.js +2 -0
- package/dist/bin/shell/chunks/xargs-SCYIFXOW.js +2 -0
- package/dist/bin/shell/chunks/yq-RGXFWYJN.js +2 -0
- package/dist/bin/shell/shell.js +733 -0
- package/dist/browser.d.ts +23 -0
- package/dist/bundle/browser.js +1515 -0
- package/dist/bundle/chunks/alias-JE7RI5QX.js +1 -0
- package/dist/bundle/chunks/awk2-JFGEGLFP.js +1 -0
- package/dist/bundle/chunks/base64-4YMZCVJ5.js +1 -0
- package/dist/bundle/chunks/basename-AA2KJYZQ.js +1 -0
- package/dist/bundle/chunks/bash-IJWYRKFO.js +1 -0
- package/dist/bundle/chunks/cat-RDUMLXKC.js +1 -0
- package/dist/bundle/chunks/chmod-SYMGL4JA.js +1 -0
- package/dist/bundle/chunks/chunk-24IMIIXA.js +1 -0
- package/dist/bundle/chunks/chunk-3THT3N7L.js +1 -0
- package/dist/bundle/chunks/chunk-3ZUFRYJ4.js +1 -0
- package/dist/bundle/chunks/chunk-43RSSTFA.js +73 -0
- package/dist/bundle/chunks/chunk-44UOCSGV.js +1 -0
- package/dist/bundle/chunks/chunk-4GTNDTRF.js +7 -0
- package/dist/bundle/chunks/chunk-4HHKTUW3.js +2 -0
- package/dist/bundle/chunks/chunk-4Q4SM6WR.js +4 -0
- package/dist/bundle/chunks/chunk-55VFSPNA.js +2 -0
- package/dist/bundle/chunks/chunk-5PYKJV42.js +4 -0
- package/dist/bundle/chunks/chunk-5QMZ5MUS.js +4 -0
- package/dist/bundle/chunks/chunk-5QVNJEHU.js +8 -0
- package/dist/bundle/chunks/chunk-5V6VZH6T.js +1 -0
- package/dist/bundle/chunks/chunk-62RKD26F.js +20 -0
- package/dist/bundle/chunks/chunk-64BAICW3.js +1 -0
- package/dist/bundle/chunks/chunk-74CEPOFO.js +22 -0
- package/dist/bundle/chunks/chunk-7ESWU5HP.js +14 -0
- package/dist/bundle/chunks/chunk-7L36YK2X.js +2 -0
- package/dist/bundle/chunks/chunk-7TSDKFEO.js +1 -0
- package/dist/bundle/chunks/chunk-A4HU7SVR.js +2 -0
- package/dist/bundle/chunks/chunk-A4JSPFCI.js +6 -0
- package/dist/bundle/chunks/chunk-A5O5YHGN.js +1 -0
- package/dist/bundle/chunks/chunk-A65PWWJC.js +2 -0
- package/dist/bundle/chunks/chunk-A7A2DBEE.js +6 -0
- package/dist/bundle/chunks/chunk-A7ICOL4V.js +13 -0
- package/dist/bundle/chunks/chunk-ALLTKNUZ.js +5 -0
- package/dist/bundle/chunks/chunk-APT7OOP2.js +1 -0
- package/dist/bundle/chunks/chunk-B53Y5JFV.js +8 -0
- package/dist/bundle/chunks/chunk-BAQA74XA.js +1 -0
- package/dist/bundle/chunks/chunk-CWQS3NFK.js +1 -0
- package/dist/bundle/chunks/chunk-D4J545R4.js +11 -0
- package/dist/bundle/chunks/chunk-D6CWQ5DW.js +5 -0
- package/dist/bundle/chunks/chunk-D6EWIDSU.js +20 -0
- package/dist/bundle/chunks/chunk-D7MEQ3VN.js +4 -0
- package/dist/bundle/chunks/chunk-DBKNVD4L.js +9 -0
- package/dist/bundle/chunks/chunk-DCAAORBQ.js +1 -0
- package/dist/bundle/chunks/chunk-DXB73IDG.js +1 -0
- package/dist/bundle/chunks/chunk-EEXR5ZDP.js +2 -0
- package/dist/bundle/chunks/chunk-EIZGF4BS.js +8 -0
- package/dist/bundle/chunks/chunk-F23WWYKW.js +16 -0
- package/dist/bundle/chunks/chunk-GCTKCWKD.js +3 -0
- package/dist/bundle/chunks/chunk-GFQRA5P5.js +7 -0
- package/dist/bundle/chunks/chunk-GJTDUJ5Q.js +10 -0
- package/dist/bundle/chunks/chunk-GOV5EKKI.js +9 -0
- package/dist/bundle/chunks/chunk-GXVXFKBA.js +5 -0
- package/dist/bundle/chunks/chunk-HDQ56CKY.js +15 -0
- package/dist/bundle/chunks/chunk-HJQJAYMS.js +2 -0
- package/dist/bundle/chunks/chunk-HJWBQKYG.js +5 -0
- package/dist/bundle/chunks/chunk-HL6NGDO2.js +22 -0
- package/dist/bundle/chunks/chunk-HWBSOZZR.js +35 -0
- package/dist/bundle/chunks/chunk-HWKDQ44K.js +3 -0
- package/dist/bundle/chunks/chunk-I57KEIP3.js +10 -0
- package/dist/bundle/chunks/chunk-IPJHKYVM.js +1 -0
- package/dist/bundle/chunks/chunk-IVYA2HK4.js +286 -0
- package/dist/bundle/chunks/chunk-JVPRLUMK.js +7 -0
- package/dist/bundle/chunks/chunk-KMEYNNUA.js +15 -0
- package/dist/bundle/chunks/chunk-KX3P26DQ.js +1 -0
- package/dist/bundle/chunks/chunk-LL3S3NLB.js +1 -0
- package/dist/bundle/chunks/chunk-LTZRCH7N.js +31 -0
- package/dist/bundle/chunks/chunk-LWEGUNWT.js +7 -0
- package/dist/bundle/chunks/chunk-MDDMCKUK.js +6 -0
- package/dist/bundle/chunks/chunk-MDLLFABN.js +4 -0
- package/dist/bundle/chunks/chunk-MHTUABJP.js +8 -0
- package/dist/bundle/chunks/chunk-MIZPJHVH.js +7 -0
- package/dist/bundle/chunks/chunk-MLXIYONF.js +15 -0
- package/dist/bundle/chunks/chunk-MYE6AGBJ.js +16 -0
- package/dist/bundle/chunks/chunk-NAERJDUW.js +8 -0
- package/dist/bundle/chunks/chunk-NCNPKYJZ.js +2 -0
- package/dist/bundle/chunks/chunk-NUFRM6SI.js +0 -0
- package/dist/bundle/chunks/chunk-NUYSJFDK.js +7 -0
- package/dist/bundle/chunks/chunk-OCLXQMOG.js +6 -0
- package/dist/bundle/chunks/chunk-OCS6LSEM.js +13 -0
- package/dist/bundle/chunks/chunk-OJDRYQWQ.js +1 -0
- package/dist/bundle/chunks/chunk-P7UWRQ44.js +139 -0
- package/dist/bundle/chunks/chunk-PBXLG62G.js +8 -0
- package/dist/bundle/chunks/chunk-PP6PSHAB.js +4 -0
- package/dist/bundle/chunks/chunk-PXTK5WE2.js +20 -0
- package/dist/bundle/chunks/chunk-PYDZ2LCK.js +16 -0
- package/dist/bundle/chunks/chunk-PYSFUGCK.js +10 -0
- package/dist/bundle/chunks/chunk-QCDB2VPH.js +6 -0
- package/dist/bundle/chunks/chunk-QJ7O6ZN3.js +5 -0
- package/dist/bundle/chunks/chunk-R6QSAL5T.js +1 -0
- package/dist/bundle/chunks/chunk-R6VWJ2ZL.js +1 -0
- package/dist/bundle/chunks/chunk-RPNGRAAP.js +7 -0
- package/dist/bundle/chunks/chunk-SDNKECQQ.js +5 -0
- package/dist/bundle/chunks/chunk-T56QNPHK.js +14 -0
- package/dist/bundle/chunks/chunk-TLSUDHID.js +6 -0
- package/dist/bundle/chunks/chunk-TOMNU26N.js +4 -0
- package/dist/bundle/chunks/chunk-TXBZCHCQ.js +5 -0
- package/dist/bundle/chunks/chunk-U6NMAV24.js +32 -0
- package/dist/bundle/chunks/chunk-V7TAPXDL.js +27 -0
- package/dist/bundle/chunks/chunk-VBEY5J6R.js +99 -0
- package/dist/bundle/chunks/chunk-VJFXDYWH.js +10 -0
- package/dist/bundle/chunks/chunk-VOBGTVA6.js +6 -0
- package/dist/bundle/chunks/chunk-VXBA5RYO.js +5 -0
- package/dist/bundle/chunks/chunk-VYOJP4TV.js +13 -0
- package/dist/bundle/chunks/chunk-WKFATFPP.js +4 -0
- package/dist/bundle/chunks/chunk-X2AJGDEF.js +1 -0
- package/dist/bundle/chunks/chunk-XIZSGUXJ.js +62 -0
- package/dist/bundle/chunks/chunk-XKQRETAK.js +1 -0
- package/dist/bundle/chunks/chunk-XVDPCNWR.js +11 -0
- package/dist/bundle/chunks/chunk-YSHZL3MF.js +32 -0
- package/dist/bundle/chunks/chunk-YTNYSM6T.js +11 -0
- package/dist/bundle/chunks/chunk-Z6LRHWXI.js +13 -0
- package/dist/bundle/chunks/chunk-Z7JVV2SM.js +12 -0
- package/dist/bundle/chunks/clear-5CZ5X4YR.js +1 -0
- package/dist/bundle/chunks/column-WLPMMSTS.js +1 -0
- package/dist/bundle/chunks/comm-5SLSESQG.js +1 -0
- package/dist/bundle/chunks/cp-XOYR4ABJ.js +1 -0
- package/dist/bundle/chunks/curl-47BFPSFW.js +25 -0
- package/dist/bundle/chunks/cut-OPC3VAGB.js +1 -0
- package/dist/bundle/chunks/date-DD7FVA2V.js +1 -0
- package/dist/bundle/chunks/diff-HJF2MPDN.js +1 -0
- package/dist/bundle/chunks/dirname-LEMTZZFS.js +1 -0
- package/dist/bundle/chunks/du-WO2ENHXQ.js +1 -0
- package/dist/bundle/chunks/echo-O45JWWI2.js +1 -0
- package/dist/bundle/chunks/env-5EPCWSXR.js +1 -0
- package/dist/bundle/chunks/expand-DTNXU4LQ.js +1 -0
- package/dist/bundle/chunks/expansion-UGGADTZC.js +1 -0
- package/dist/bundle/chunks/expr-DNFUYZGY.js +1 -0
- package/dist/bundle/chunks/file-IGDTDPLG.js +1 -0
- package/dist/bundle/chunks/find-KNMMLVJD.js +1 -0
- package/dist/bundle/chunks/flag-coverage-B26Z36PC.js +1 -0
- package/dist/bundle/chunks/fold-LDSORVYE.js +1 -0
- package/dist/bundle/chunks/grep-2UMHPO7Y.js +1 -0
- package/dist/bundle/chunks/gzip-AQXSGOVS.js +1 -0
- package/dist/bundle/chunks/head-HT2B6D2J.js +1 -0
- package/dist/bundle/chunks/help-VVWX7SA5.js +1 -0
- package/dist/bundle/chunks/history-J4QRNGRO.js +1 -0
- package/dist/bundle/chunks/hostname-BK6HG2DE.js +1 -0
- package/dist/bundle/chunks/html-to-markdown-TFCECAGV.js +1 -0
- package/dist/bundle/chunks/join-GG2LDHE5.js +1 -0
- package/dist/bundle/chunks/jq-CRLZNLQG.js +1 -0
- package/dist/bundle/chunks/js-exec-VXN6TZ7U.js +96 -0
- package/dist/bundle/chunks/js-exec-worker.js +4380 -0
- package/dist/bundle/chunks/ln-4TRFBYAT.js +1 -0
- package/dist/bundle/chunks/ls-KSXFZCWH.js +1 -0
- package/dist/bundle/chunks/md5sum-INMIK4DX.js +1 -0
- package/dist/bundle/chunks/mkdir-TDEMSB6C.js +1 -0
- package/dist/bundle/chunks/mv-Z6MORUFL.js +1 -0
- package/dist/bundle/chunks/nl-U5YJDM32.js +1 -0
- package/dist/bundle/chunks/od-VJEF2UR5.js +1 -0
- package/dist/bundle/chunks/paste-7N6AFSDS.js +1 -0
- package/dist/bundle/chunks/printf-CX64KX2P.js +1 -0
- package/dist/bundle/chunks/pwd-D4OZ7N27.js +1 -0
- package/dist/bundle/chunks/python3-BFV3N3GY.js +11 -0
- package/dist/bundle/chunks/readlink-MI4GCHJF.js +1 -0
- package/dist/bundle/chunks/rev-XOSYPP45.js +1 -0
- package/dist/bundle/chunks/rg-KYSTAD4Q.js +1 -0
- package/dist/bundle/chunks/rm-RTZG23RL.js +1 -0
- package/dist/bundle/chunks/rmdir-XTQXT7RK.js +1 -0
- package/dist/bundle/chunks/sed-OFX3F4FE.js +1 -0
- package/dist/bundle/chunks/seq-RN5ZUASB.js +1 -0
- package/dist/bundle/chunks/sha1sum-VJPNLNU6.js +1 -0
- package/dist/bundle/chunks/sha256sum-PI32XWXY.js +1 -0
- package/dist/bundle/chunks/sleep-VZFPZFWA.js +1 -0
- package/dist/bundle/chunks/sort-DCNRDA7U.js +1 -0
- package/dist/bundle/chunks/split-SITCSYCZ.js +1 -0
- package/dist/bundle/chunks/sqlite3-56UMWEY3.js +1 -0
- package/dist/bundle/chunks/stat-BT5A227F.js +1 -0
- package/dist/bundle/chunks/strings-7PLOGTPD.js +1 -0
- package/dist/bundle/chunks/tac-SJGXQ4T2.js +1 -0
- package/dist/bundle/chunks/tail-S5ULNTJU.js +1 -0
- package/dist/bundle/chunks/tar-LYLTEJV3.js +1 -0
- package/dist/bundle/chunks/tee-O7VXZDCO.js +1 -0
- package/dist/bundle/chunks/time-DEUO3QV2.js +1 -0
- package/dist/bundle/chunks/timeout-VRKMCG72.js +1 -0
- package/dist/bundle/chunks/touch-DX2IJOQ4.js +1 -0
- package/dist/bundle/chunks/tr-2HXZRDSW.js +1 -0
- package/dist/bundle/chunks/tree-LYXBS7DC.js +1 -0
- package/dist/bundle/chunks/true-WHJNXCHG.js +1 -0
- package/dist/bundle/chunks/unexpand-RGTMIGZM.js +1 -0
- package/dist/bundle/chunks/uniq-SUNANL47.js +1 -0
- package/dist/bundle/chunks/wc-TQB3VNOX.js +1 -0
- package/dist/bundle/chunks/which-XZHEH76L.js +1 -0
- package/dist/bundle/chunks/whoami-DGKU3D2X.js +1 -0
- package/dist/bundle/chunks/worker.js +3136 -0
- package/dist/bundle/chunks/xan-DHUKCGIW.js +1 -0
- package/dist/bundle/chunks/xan-view-OW2TB7Z3.js +1 -0
- package/dist/bundle/chunks/xargs-I6EZUCYF.js +1 -0
- package/dist/bundle/chunks/yq-NDDDSAXH.js +1 -0
- package/dist/bundle/index.cjs +2178 -0
- package/dist/bundle/index.js +709 -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 +75 -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 +100 -0
- package/dist/commands/awk/parser2-print.d.ts +35 -0
- package/dist/commands/awk/parser2.d.ts +81 -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/cp/cp.d.ts +4 -0
- package/dist/commands/curl/curl.d.ts +8 -0
- package/dist/commands/curl/form.d.ts +21 -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 +31 -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 +69 -0
- package/dist/commands/find/parser.d.ts +2 -0
- package/dist/commands/find/types.d.ts +88 -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 +30 -0
- package/dist/commands/js-exec/js-exec.d.ts +11 -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 +25 -0
- package/dist/commands/printf/printf.d.ts +4 -0
- package/dist/commands/printf/strftime.d.ts +9 -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 +28 -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 +41 -0
- package/dist/commands/query-engine/index.d.ts +8 -0
- package/dist/commands/query-engine/parser-types.d.ts +171 -0
- package/dist/commands/query-engine/parser.d.ts +9 -0
- package/dist/commands/query-engine/path-operations.d.ts +15 -0
- package/dist/commands/query-engine/safe-object.d.ts +83 -0
- package/dist/commands/query-engine/value-operations.d.ts +41 -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 +60 -0
- package/dist/commands/search-engine/regex.d.ts +33 -0
- package/dist/commands/sed/executor.d.ts +7 -0
- package/dist/commands/sed/lexer.d.ts +86 -0
- package/dist/commands/sed/parser.d.ts +18 -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 +15 -0
- package/dist/commands/sqlite3/sqlite3.d.ts +22 -0
- package/dist/commands/sqlite3/worker.d.ts +45 -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 +135 -0
- package/dist/commands/tar/bzip2-compress.d.ts +17 -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 +71 -0
- package/dist/commands/worker-bridge/protocol.d.ts +140 -0
- package/dist/commands/worker-bridge/sync-backend.d.ts +81 -0
- package/dist/commands/xan/aggregation.d.ts +20 -0
- package/dist/commands/xan/column-selection.d.ts +19 -0
- package/dist/commands/xan/csv.d.ts +37 -0
- package/dist/commands/xan/moonblade-parser.d.ts +80 -0
- package/dist/commands/xan/moonblade-to-jq.d.ts +12 -0
- package/dist/commands/xan/moonblade-tokenizer.d.ts +25 -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 +64 -0
- package/dist/commands/yq/yq.d.ts +13 -0
- package/dist/custom-commands.d.ts +42 -0
- package/dist/fs/encoding.d.ts +17 -0
- package/dist/fs/in-memory-fs/in-memory-fs.d.ts +73 -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 +229 -0
- package/dist/fs/mountable-fs/index.d.ts +1 -0
- package/dist/fs/mountable-fs/mountable-fs.d.ts +116 -0
- package/dist/fs/overlay-fs/index.d.ts +1 -0
- package/dist/fs/overlay-fs/overlay-fs.d.ts +163 -0
- package/dist/fs/path-utils.d.ts +46 -0
- package/dist/fs/read-write-fs/index.d.ts +1 -0
- package/dist/fs/read-write-fs/read-write-fs.d.ts +96 -0
- package/dist/fs/real-fs-utils.d.ts +90 -0
- package/dist/fs/sanitize-error.d.ts +19 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/interpreter/alias-expansion.d.ts +23 -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 +39 -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 +14 -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 +9 -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 +45 -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 +66 -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 +158 -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 +20 -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 +18 -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 +12 -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/functions.d.ts +12 -0
- package/dist/interpreter/helpers/array.d.ts +43 -0
- package/dist/interpreter/helpers/condition.d.ts +22 -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 +24 -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 +25 -0
- package/dist/interpreter/helpers/shellopts.d.ts +28 -0
- package/dist/interpreter/helpers/statements.d.ts +20 -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/tilde.d.ts +13 -0
- package/dist/interpreter/helpers/variable-tests.d.ts +9 -0
- package/dist/interpreter/helpers/word-matching.d.ts +26 -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 +77 -0
- package/dist/interpreter/pipeline-execution.d.ts +16 -0
- package/dist/interpreter/redirections.d.ts +51 -0
- package/dist/interpreter/simple-command-assignments.d.ts +29 -0
- package/dist/interpreter/subshell-group.d.ts +32 -0
- package/dist/interpreter/type-command.d.ts +37 -0
- package/dist/interpreter/types.d.ts +344 -0
- package/dist/limits.d.ts +52 -0
- package/dist/network/allow-list/shared.d.ts +57 -0
- package/dist/network/allow-list.d.ts +59 -0
- package/dist/network/fetch.d.ts +25 -0
- package/dist/network/index.d.ts +7 -0
- package/dist/network/types.d.ts +155 -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 +16 -0
- package/dist/parser/lexer.d.ts +197 -0
- package/dist/parser/parser-substitution.d.ts +62 -0
- package/dist/parser/parser.d.ts +135 -0
- package/dist/parser/types.d.ts +25 -0
- package/dist/parser/word-parser.d.ts +33 -0
- package/dist/sandbox/Command.d.ts +35 -0
- package/dist/sandbox/Sandbox.d.ts +90 -0
- package/dist/sandbox/index.d.ts +2 -0
- package/dist/shell-metadata.d.ts +25 -0
- package/dist/timers.d.ts +4 -0
- package/dist/types.d.ts +198 -0
- package/dist/utils/args.d.ts +55 -0
- package/dist/utils/constants.d.ts +15 -0
- package/dist/utils/file-reader.d.ts +67 -0
- package/dist/utils/glob.d.ts +25 -0
- package/dist/vitest-setup.d.ts +1 -0
- package/package.json +127 -0
- package/vendor/cpython-emscripten/python.cjs +2 -0
- package/vendor/cpython-emscripten/python.wasm +3 -0
- package/vendor/cpython-emscripten/python313.zip +0 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Control Flow Errors
|
|
3
|
+
*
|
|
4
|
+
* Error classes used to implement shell control flow:
|
|
5
|
+
* - break: Exit loops
|
|
6
|
+
* - continue: Skip to next iteration
|
|
7
|
+
* - return: Exit functions
|
|
8
|
+
* - errexit: Exit on error (set -e)
|
|
9
|
+
* - nounset: Error on unset variables (set -u)
|
|
10
|
+
*
|
|
11
|
+
* All control flow errors carry stdout/stderr to accumulate output
|
|
12
|
+
* as they propagate through the execution stack.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Base class for all control flow errors.
|
|
16
|
+
* Carries stdout/stderr to preserve output during propagation.
|
|
17
|
+
*/
|
|
18
|
+
declare abstract class ControlFlowError extends Error {
|
|
19
|
+
stdout: string;
|
|
20
|
+
stderr: string;
|
|
21
|
+
constructor(message: string, stdout?: string, stderr?: string);
|
|
22
|
+
/**
|
|
23
|
+
* Prepend output from the current context before re-throwing.
|
|
24
|
+
*/
|
|
25
|
+
prependOutput(stdout: string, stderr: string): void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Error thrown when break is called to exit loops.
|
|
29
|
+
*/
|
|
30
|
+
export declare class BreakError extends ControlFlowError {
|
|
31
|
+
levels: number;
|
|
32
|
+
readonly name = "BreakError";
|
|
33
|
+
constructor(levels?: number, stdout?: string, stderr?: string);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Error thrown when continue is called to skip to next iteration.
|
|
37
|
+
*/
|
|
38
|
+
export declare class ContinueError extends ControlFlowError {
|
|
39
|
+
levels: number;
|
|
40
|
+
readonly name = "ContinueError";
|
|
41
|
+
constructor(levels?: number, stdout?: string, stderr?: string);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Error thrown when return is called to exit a function.
|
|
45
|
+
*/
|
|
46
|
+
export declare class ReturnError extends ControlFlowError {
|
|
47
|
+
exitCode: number;
|
|
48
|
+
readonly name = "ReturnError";
|
|
49
|
+
constructor(exitCode?: number, stdout?: string, stderr?: string);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Error thrown when set -e (errexit) is enabled and a command fails.
|
|
53
|
+
*/
|
|
54
|
+
export declare class ErrexitError extends ControlFlowError {
|
|
55
|
+
readonly exitCode: number;
|
|
56
|
+
readonly name = "ErrexitError";
|
|
57
|
+
constructor(exitCode: number, stdout?: string, stderr?: string);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Error thrown when set -u (nounset) is enabled and an unset variable is referenced.
|
|
61
|
+
*/
|
|
62
|
+
export declare class NounsetError extends ControlFlowError {
|
|
63
|
+
varName: string;
|
|
64
|
+
readonly name = "NounsetError";
|
|
65
|
+
constructor(varName: string, stdout?: string);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Error thrown when exit builtin is called to terminate the script.
|
|
69
|
+
*/
|
|
70
|
+
export declare class ExitError extends ControlFlowError {
|
|
71
|
+
readonly exitCode: number;
|
|
72
|
+
readonly name = "ExitError";
|
|
73
|
+
constructor(exitCode: number, stdout?: string, stderr?: string);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Error thrown for arithmetic expression errors (e.g., floating point, invalid syntax).
|
|
77
|
+
* Returns exit code 1 instead of 2 (syntax error).
|
|
78
|
+
*/
|
|
79
|
+
export declare class ArithmeticError extends ControlFlowError {
|
|
80
|
+
readonly name = "ArithmeticError";
|
|
81
|
+
/**
|
|
82
|
+
* If true, this error should abort script execution (like missing operand after binary operator).
|
|
83
|
+
* If false, the error is recoverable and execution can continue.
|
|
84
|
+
*/
|
|
85
|
+
fatal: boolean;
|
|
86
|
+
constructor(message: string, stdout?: string, stderr?: string, fatal?: boolean);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Error thrown for bad substitution errors (e.g., ${#var:1:3}).
|
|
90
|
+
* Returns exit code 1.
|
|
91
|
+
*/
|
|
92
|
+
export declare class BadSubstitutionError extends ControlFlowError {
|
|
93
|
+
readonly name = "BadSubstitutionError";
|
|
94
|
+
constructor(message: string, stdout?: string, stderr?: string);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Error thrown when failglob is enabled and a glob pattern has no matches.
|
|
98
|
+
* Returns exit code 1.
|
|
99
|
+
*/
|
|
100
|
+
export declare class GlobError extends ControlFlowError {
|
|
101
|
+
readonly name = "GlobError";
|
|
102
|
+
constructor(pattern: string, stdout?: string, stderr?: string);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Error thrown for invalid brace expansions (e.g., mixed case character ranges like {z..A}).
|
|
106
|
+
* Returns exit code 1 (matching bash behavior).
|
|
107
|
+
*/
|
|
108
|
+
export declare class BraceExpansionError extends ControlFlowError {
|
|
109
|
+
readonly name = "BraceExpansionError";
|
|
110
|
+
constructor(message: string, stdout?: string, stderr?: string);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Error thrown when execution limits are exceeded (recursion depth, command count, loop iterations).
|
|
114
|
+
* This should ALWAYS be thrown before JavaScript's native RangeError kicks in.
|
|
115
|
+
* Exit code 126 indicates a limit was exceeded.
|
|
116
|
+
*/
|
|
117
|
+
export declare class ExecutionLimitError extends ControlFlowError {
|
|
118
|
+
readonly limitType: "recursion" | "commands" | "iterations" | "string_length" | "glob_operations" | "substitution_depth" | "output_size" | "file_descriptors";
|
|
119
|
+
readonly name = "ExecutionLimitError";
|
|
120
|
+
static readonly EXIT_CODE = 126;
|
|
121
|
+
constructor(message: string, limitType: "recursion" | "commands" | "iterations" | "string_length" | "glob_operations" | "substitution_depth" | "output_size" | "file_descriptors", stdout?: string, stderr?: string);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Error thrown when execution is aborted via an AbortSignal.
|
|
125
|
+
* Used by the `timeout` command to stop timed-out commands at statement boundaries.
|
|
126
|
+
*/
|
|
127
|
+
export declare class ExecutionAbortedError extends ControlFlowError {
|
|
128
|
+
readonly name = "ExecutionAbortedError";
|
|
129
|
+
constructor(stdout?: string, stderr?: string);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Error thrown when break/continue is called in a subshell that was
|
|
133
|
+
* spawned from within a loop context. Causes the subshell to exit cleanly.
|
|
134
|
+
*/
|
|
135
|
+
export declare class SubshellExitError extends ControlFlowError {
|
|
136
|
+
readonly name = "SubshellExitError";
|
|
137
|
+
constructor(stdout?: string, stderr?: string);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Type guard for errors that exit the current scope (return, break, continue).
|
|
141
|
+
* These need special handling vs errexit/nounset which terminate execution.
|
|
142
|
+
*/
|
|
143
|
+
export declare function isScopeExitError(error: unknown): error is BreakError | ContinueError | ReturnError;
|
|
144
|
+
/**
|
|
145
|
+
* Error thrown when a POSIX special builtin fails in POSIX mode.
|
|
146
|
+
* In POSIX mode (set -o posix), errors in special builtins like
|
|
147
|
+
* shift, set, readonly, export, etc. cause the entire script to exit.
|
|
148
|
+
*
|
|
149
|
+
* Per POSIX 2.8.1 - Consequences of Shell Errors:
|
|
150
|
+
* "A special built-in utility causes an interactive or non-interactive shell
|
|
151
|
+
* to exit when an error occurs."
|
|
152
|
+
*/
|
|
153
|
+
export declare class PosixFatalError extends ControlFlowError {
|
|
154
|
+
readonly exitCode: number;
|
|
155
|
+
readonly name = "PosixFatalError";
|
|
156
|
+
constructor(exitCode: number, stdout?: string, stderr?: string);
|
|
157
|
+
}
|
|
158
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Word Analysis
|
|
3
|
+
*
|
|
4
|
+
* Functions for analyzing word parts to determine what types of expansions are present.
|
|
5
|
+
*/
|
|
6
|
+
import type { ParameterExpansionPart, WordPart } from "../../ast/types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Check if a glob pattern string contains variable references ($var or ${var})
|
|
9
|
+
* This is used to detect when IFS splitting should apply to expanded glob patterns.
|
|
10
|
+
*/
|
|
11
|
+
export declare function globPatternHasVarRef(pattern: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Check if a parameter expansion's operation word is entirely quoted (all parts are quoted).
|
|
14
|
+
* This is different from hasQuotedOperationWord which returns true if ANY part is quoted.
|
|
15
|
+
*
|
|
16
|
+
* For word splitting purposes:
|
|
17
|
+
* - ${v:-"AxBxC"} - entirely quoted, should NOT be split
|
|
18
|
+
* - ${v:-x"AxBxC"x} - mixed quoted/unquoted, SHOULD be split (on unquoted parts)
|
|
19
|
+
* - ${v:-AxBxC} - entirely unquoted, SHOULD be split
|
|
20
|
+
*/
|
|
21
|
+
export declare function isOperationWordEntirelyQuoted(part: ParameterExpansionPart): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Result of analyzing word parts
|
|
24
|
+
*/
|
|
25
|
+
export interface WordPartsAnalysis {
|
|
26
|
+
hasQuoted: boolean;
|
|
27
|
+
hasCommandSub: boolean;
|
|
28
|
+
hasArrayVar: boolean;
|
|
29
|
+
hasArrayAtExpansion: boolean;
|
|
30
|
+
hasParamExpansion: boolean;
|
|
31
|
+
hasVarNamePrefixExpansion: boolean;
|
|
32
|
+
hasIndirection: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Analyze word parts for expansion behavior
|
|
36
|
+
*/
|
|
37
|
+
export declare function analyzeWordParts(parts: WordPart[]): WordPartsAnalysis;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arithmetic Text Expansion
|
|
3
|
+
*
|
|
4
|
+
* Functions for expanding variables within arithmetic expression text.
|
|
5
|
+
* This handles the bash behavior where $(( $x * 3 )) with x='1 + 2' should
|
|
6
|
+
* expand to $(( 1 + 2 * 3 )) = 7, not $(( (1+2) * 3 )) = 9.
|
|
7
|
+
*/
|
|
8
|
+
import type { InterpreterContext } from "../types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Expand $var patterns in arithmetic expression text for text substitution.
|
|
11
|
+
* Only expands simple $var patterns, not ${...}, $(()), $(), etc.
|
|
12
|
+
*/
|
|
13
|
+
export declare function expandDollarVarsInArithText(ctx: InterpreterContext, text: string): Promise<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Expand variable references and command substitutions in an array subscript.
|
|
16
|
+
* e.g., "${array[@]}" -> "1 2 3", "$(echo 1)" -> "1"
|
|
17
|
+
* This is needed for associative array subscripts like assoc["${array[@]}"]
|
|
18
|
+
* where the subscript may contain variable or array expansions.
|
|
19
|
+
*/
|
|
20
|
+
export declare function expandSubscriptForAssocArray(ctx: InterpreterContext, subscript: string): Promise<string>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Array Pattern Operations
|
|
3
|
+
*
|
|
4
|
+
* Handles pattern replacement and pattern removal for array expansions:
|
|
5
|
+
* - "${arr[@]/pattern/replacement}" - pattern replacement
|
|
6
|
+
* - "${arr[@]#pattern}" - prefix removal
|
|
7
|
+
* - "${arr[@]%pattern}" - suffix removal
|
|
8
|
+
*/
|
|
9
|
+
import type { WordPart } from "../../ast/types.js";
|
|
10
|
+
import type { InterpreterContext } from "../types.js";
|
|
11
|
+
import type { ArrayExpansionResult, ExpandPartFn, ExpandWordPartsAsyncFn } from "./array-word-expansion.js";
|
|
12
|
+
/**
|
|
13
|
+
* Handle "${arr[@]/pattern/replacement}" and "${arr[*]/pattern/replacement}"
|
|
14
|
+
* Returns null if this handler doesn't apply.
|
|
15
|
+
*/
|
|
16
|
+
export declare function handleArrayPatternReplacement(ctx: InterpreterContext, wordParts: WordPart[], expandWordPartsAsync: ExpandWordPartsAsyncFn, expandPart: ExpandPartFn): Promise<ArrayExpansionResult>;
|
|
17
|
+
/**
|
|
18
|
+
* Handle "${arr[@]#pattern}" and "${arr[*]#pattern}" - array pattern removal
|
|
19
|
+
* Returns null if this handler doesn't apply.
|
|
20
|
+
*/
|
|
21
|
+
export declare function handleArrayPatternRemoval(ctx: InterpreterContext, wordParts: WordPart[], expandWordPartsAsync: ExpandWordPartsAsyncFn, expandPart: ExpandPartFn): Promise<ArrayExpansionResult>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Array Expansion with Prefix/Suffix Handlers
|
|
3
|
+
*
|
|
4
|
+
* Handles array expansions that have adjacent text in double quotes:
|
|
5
|
+
* - "${prefix}${arr[@]#pattern}${suffix}" - pattern removal with prefix/suffix
|
|
6
|
+
* - "${prefix}${arr[@]/pattern/replacement}${suffix}" - pattern replacement with prefix/suffix
|
|
7
|
+
* - "${prefix}${arr[@]}${suffix}" - simple array expansion with prefix/suffix
|
|
8
|
+
* - "${arr[@]:-${default[@]}}" - array default/alternative values
|
|
9
|
+
*/
|
|
10
|
+
import type { WordPart } from "../../ast/types.js";
|
|
11
|
+
import type { InterpreterContext } from "../types.js";
|
|
12
|
+
/**
|
|
13
|
+
* Result type for array expansion handlers.
|
|
14
|
+
* `null` means the handler doesn't apply to this case.
|
|
15
|
+
*/
|
|
16
|
+
export type ArrayExpansionResult = {
|
|
17
|
+
values: string[];
|
|
18
|
+
quoted: boolean;
|
|
19
|
+
} | null;
|
|
20
|
+
/**
|
|
21
|
+
* Type for expandPart function reference
|
|
22
|
+
*/
|
|
23
|
+
export type ExpandPartFn = (ctx: InterpreterContext, part: WordPart) => Promise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Type for expandWordPartsAsync function reference
|
|
26
|
+
*/
|
|
27
|
+
export type ExpandWordPartsAsyncFn = (ctx: InterpreterContext, parts: WordPart[]) => Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Handle "${arr[@]:-${default[@]}}", "${arr[@]:+${alt[@]}}", and "${arr[@]:=default}"
|
|
30
|
+
* Also handles "${var:-${default[@]}}" where var is a scalar variable.
|
|
31
|
+
* When the default value contains an array expansion, each element should become a separate word.
|
|
32
|
+
*/
|
|
33
|
+
export declare function handleArrayDefaultValue(ctx: InterpreterContext, wordParts: WordPart[]): Promise<ArrayExpansionResult>;
|
|
34
|
+
/**
|
|
35
|
+
* Handle "${prefix}${arr[@]#pattern}${suffix}" and "${prefix}${arr[@]/pat/rep}${suffix}"
|
|
36
|
+
* Array pattern operations with adjacent text in double quotes.
|
|
37
|
+
* Each array element has the pattern applied, then becomes a separate word
|
|
38
|
+
* with prefix joined to first and suffix joined to last.
|
|
39
|
+
*/
|
|
40
|
+
export declare function handleArrayPatternWithPrefixSuffix(ctx: InterpreterContext, wordParts: WordPart[], hasArrayAtExpansion: boolean, expandPart: ExpandPartFn, expandWordPartsAsync: ExpandWordPartsAsyncFn): Promise<ArrayExpansionResult>;
|
|
41
|
+
/**
|
|
42
|
+
* Handle "${prefix}${arr[@]}${suffix}" - array expansion with adjacent text in double quotes.
|
|
43
|
+
* Each array element becomes a separate word, with prefix joined to first and suffix joined to last.
|
|
44
|
+
* This is similar to how "$@" works with prefix/suffix.
|
|
45
|
+
*/
|
|
46
|
+
export declare function handleArrayWithPrefixSuffix(ctx: InterpreterContext, wordParts: WordPart[], hasArrayAtExpansion: boolean, expandPart: ExpandPartFn): Promise<ArrayExpansionResult>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Array Slicing and Transform Operations
|
|
3
|
+
*
|
|
4
|
+
* Handles array expansion with slicing and transform operators:
|
|
5
|
+
* - "${arr[@]:offset}" and "${arr[@]:offset:length}" - array slicing
|
|
6
|
+
* - "${arr[@]@a}", "${arr[@]@P}", "${arr[@]@Q}" - transform operations
|
|
7
|
+
*/
|
|
8
|
+
import type { WordPart } from "../../ast/types.js";
|
|
9
|
+
import type { InterpreterContext } from "../types.js";
|
|
10
|
+
/**
|
|
11
|
+
* Result type for array expansion handlers.
|
|
12
|
+
* `null` means the handler doesn't apply to this case.
|
|
13
|
+
*/
|
|
14
|
+
export type ArrayExpansionResult = {
|
|
15
|
+
values: string[];
|
|
16
|
+
quoted: boolean;
|
|
17
|
+
} | null;
|
|
18
|
+
import type { ArithExpr } from "../../ast/types.js";
|
|
19
|
+
/**
|
|
20
|
+
* Type for evaluateArithmetic function
|
|
21
|
+
*/
|
|
22
|
+
export type EvaluateArithmeticFn = (ctx: InterpreterContext, expr: ArithExpr, isExpansionContext?: boolean) => Promise<number>;
|
|
23
|
+
/**
|
|
24
|
+
* Handle "${arr[@]:offset}" and "${arr[@]:offset:length}" - array slicing with multiple return values
|
|
25
|
+
* "${arr[@]:n:m}" returns m elements starting from index n as separate words
|
|
26
|
+
* "${arr[*]:n:m}" returns m elements starting from index n joined with IFS as one word
|
|
27
|
+
*/
|
|
28
|
+
export declare function handleArraySlicing(ctx: InterpreterContext, wordParts: WordPart[], evaluateArithmetic: EvaluateArithmeticFn): Promise<ArrayExpansionResult>;
|
|
29
|
+
/**
|
|
30
|
+
* Handle "${arr[@]@a}", "${arr[@]@P}", "${arr[@]@Q}" - array Transform operations
|
|
31
|
+
* "${arr[@]@a}": Return attribute letter for each element (e.g., 'a' for indexed array)
|
|
32
|
+
* "${arr[@]@P}": Return each element's value (prompt expansion, limited implementation)
|
|
33
|
+
* "${arr[@]@Q}": Return each element quoted for shell reuse
|
|
34
|
+
* "${arr[*]@X}": Same as above but joined with IFS as one word
|
|
35
|
+
*/
|
|
36
|
+
export declare function handleArrayTransform(ctx: InterpreterContext, wordParts: WordPart[]): ArrayExpansionResult;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Array Word Expansion Handlers
|
|
3
|
+
*
|
|
4
|
+
* Handles complex array expansion cases in word expansion:
|
|
5
|
+
* - "${arr[@]}" and "${arr[*]}" - array element expansion
|
|
6
|
+
* - "${arr[@]:-default}" - array with defaults
|
|
7
|
+
* - "${arr[@]:offset:length}" - array slicing
|
|
8
|
+
* - "${arr[@]/pattern/replacement}" - pattern replacement
|
|
9
|
+
* - "${arr[@]#pattern}" - pattern removal
|
|
10
|
+
* - "${arr[@]@op}" - transform operations
|
|
11
|
+
*/
|
|
12
|
+
import type { WordPart } from "../../ast/types.js";
|
|
13
|
+
import type { InterpreterContext } from "../types.js";
|
|
14
|
+
/**
|
|
15
|
+
* Result type for array expansion handlers.
|
|
16
|
+
* `null` means the handler doesn't apply to this case.
|
|
17
|
+
*/
|
|
18
|
+
export type ArrayExpansionResult = {
|
|
19
|
+
values: string[];
|
|
20
|
+
quoted: boolean;
|
|
21
|
+
} | null;
|
|
22
|
+
/**
|
|
23
|
+
* Helper type for expandWordPartsAsync function reference
|
|
24
|
+
*/
|
|
25
|
+
export type ExpandWordPartsAsyncFn = (ctx: InterpreterContext, parts: WordPart[]) => Promise<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Helper type for expandPart function reference
|
|
28
|
+
*/
|
|
29
|
+
export type ExpandPartFn = (ctx: InterpreterContext, part: WordPart) => Promise<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Handle simple "${arr[@]}" expansion without operations.
|
|
32
|
+
* Returns each array element as a separate word.
|
|
33
|
+
*/
|
|
34
|
+
export declare function handleSimpleArrayExpansion(ctx: InterpreterContext, wordParts: WordPart[]): ArrayExpansionResult;
|
|
35
|
+
/**
|
|
36
|
+
* Handle namerefs pointing to array[@] - "${ref}" where ref='arr[@]'
|
|
37
|
+
* When a nameref points to array[@], expanding "$ref" should produce multiple words
|
|
38
|
+
*/
|
|
39
|
+
export declare function handleNamerefArrayExpansion(ctx: InterpreterContext, wordParts: WordPart[]): ArrayExpansionResult;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brace Range Expansion
|
|
3
|
+
*
|
|
4
|
+
* Handles numeric {1..10} and character {a..z} range expansion.
|
|
5
|
+
* These are pure functions with no external dependencies.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Result of a brace range expansion.
|
|
9
|
+
* Either contains expanded values or a literal fallback for invalid ranges.
|
|
10
|
+
*/
|
|
11
|
+
export interface BraceRangeResult {
|
|
12
|
+
expanded: string[] | null;
|
|
13
|
+
literal: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Unified brace range expansion helper.
|
|
17
|
+
* Handles both numeric and character ranges, returning either expanded values
|
|
18
|
+
* or a literal string for invalid ranges.
|
|
19
|
+
*/
|
|
20
|
+
export declare function expandBraceRange(start: number | string, end: number | string, step: number | undefined, startStr?: string, endStr?: string): BraceRangeResult;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command Substitution Helpers
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for handling command substitution patterns.
|
|
5
|
+
*/
|
|
6
|
+
import type { ScriptNode, WordNode } from "../../ast/types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Check if a command substitution body matches the $(<file) shorthand pattern.
|
|
9
|
+
* This is a special case where $(< file) is equivalent to $(cat file) but reads
|
|
10
|
+
* the file directly without spawning a subprocess.
|
|
11
|
+
*
|
|
12
|
+
* For this to match, the body must consist of:
|
|
13
|
+
* - One statement without operators (no && or ||)
|
|
14
|
+
* - One pipeline with one command
|
|
15
|
+
* - A SimpleCommand with no name, no args, no assignments
|
|
16
|
+
* - Exactly one input redirection (<)
|
|
17
|
+
*
|
|
18
|
+
* Note: The special $(<file) behavior only works when it's the ONLY element
|
|
19
|
+
* in the command substitution. $(< file; cmd) or $(cmd; < file) are NOT special.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getFileReadShorthand(body: ScriptNode): {
|
|
22
|
+
target: WordNode;
|
|
23
|
+
} | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glob Helper Functions
|
|
3
|
+
*
|
|
4
|
+
* Functions for handling glob patterns, escaping, and unescaping.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Check if a string contains glob patterns, including extglob when enabled.
|
|
8
|
+
*/
|
|
9
|
+
export declare function hasGlobPattern(value: string, extglob: boolean): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Unescape a glob pattern - convert escaped glob chars to literal chars.
|
|
12
|
+
* For example, [\]_ (escaped pattern) becomes [\\]_ (literal string).
|
|
13
|
+
*
|
|
14
|
+
* This is used when we need to take a pattern that was built with escaped
|
|
15
|
+
* glob characters and convert it back to a literal string (e.g., for
|
|
16
|
+
* no-match fallback when nullglob is off).
|
|
17
|
+
*
|
|
18
|
+
* Note: The input is expected to be a pattern string where backslashes escape
|
|
19
|
+
* the following character. For patterns like "test\\[*" (user input: test\[*)
|
|
20
|
+
* the output is "\\_" (with processed escapes), not [\\]_ (raw pattern).
|
|
21
|
+
*/
|
|
22
|
+
export declare function unescapeGlobPattern(pattern: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Escape glob metacharacters in a string for literal matching.
|
|
25
|
+
* Includes extglob metacharacters: ( ) |
|
|
26
|
+
*/
|
|
27
|
+
export declare function escapeGlobChars(str: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Escape regex metacharacters in a string for literal matching.
|
|
30
|
+
* Used when quoted patterns are used with =~ operator.
|
|
31
|
+
*/
|
|
32
|
+
export declare function escapeRegexChars(str: string): string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Indirect Array Expansion Handlers
|
|
3
|
+
*
|
|
4
|
+
* Handles "${!ref}" style indirect expansions where ref points to an array:
|
|
5
|
+
* - "${!ref}" where ref='arr[@]' or ref='arr[*]'
|
|
6
|
+
* - "${!ref:offset}" and "${!ref:offset:length}" - array slicing via indirection
|
|
7
|
+
* - "${!ref:-default}" and "${!ref:+alternative}" - default/alternative via indirection
|
|
8
|
+
* - "${ref+${!ref}}" - indirect in alternative value
|
|
9
|
+
*/
|
|
10
|
+
import type { ParameterExpansionPart, WordPart } from "../../ast/types.js";
|
|
11
|
+
import type { InterpreterContext } from "../types.js";
|
|
12
|
+
/**
|
|
13
|
+
* Result type for indirect expansion handlers.
|
|
14
|
+
* `null` means the handler doesn't apply to this case.
|
|
15
|
+
*/
|
|
16
|
+
export type IndirectExpansionResult = {
|
|
17
|
+
values: string[];
|
|
18
|
+
quoted: boolean;
|
|
19
|
+
} | null;
|
|
20
|
+
/**
|
|
21
|
+
* Type for expandParameterAsync function reference
|
|
22
|
+
*/
|
|
23
|
+
export type ExpandParameterAsyncFn = (ctx: InterpreterContext, part: ParameterExpansionPart, inDoubleQuotes?: boolean) => Promise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Type for expandWordPartsAsync function reference
|
|
26
|
+
*/
|
|
27
|
+
export type ExpandWordPartsAsyncFn = (ctx: InterpreterContext, parts: WordPart[], inDoubleQuotes?: boolean) => Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Handle "${!ref}" where ref='arr[@]' or ref='arr[*]' - indirect array expansion.
|
|
30
|
+
* This handles all the inner operation cases as well.
|
|
31
|
+
*/
|
|
32
|
+
export declare function handleIndirectArrayExpansion(ctx: InterpreterContext, wordParts: WordPart[], hasIndirection: boolean, expandParameterAsync: ExpandParameterAsyncFn, expandWordPartsAsync: ExpandWordPartsAsyncFn): Promise<IndirectExpansionResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Handle ${ref+${!ref}} or ${ref-${!ref}} - indirect in alternative/default value.
|
|
35
|
+
* This handles patterns like: ${hooksSlice+"${!hooksSlice}"} which should preserve element boundaries
|
|
36
|
+
*/
|
|
37
|
+
export declare function handleIndirectInAlternative(ctx: InterpreterContext, wordParts: WordPart[]): Promise<IndirectExpansionResult>;
|
|
38
|
+
/**
|
|
39
|
+
* Handle ${!ref+${!ref}} or ${!ref-${!ref}} - indirect with innerOp in alternative/default value.
|
|
40
|
+
* This handles patterns like: ${!hooksSlice+"${!hooksSlice}"} which should preserve element boundaries
|
|
41
|
+
*/
|
|
42
|
+
export declare function handleIndirectionWithInnerAlternative(ctx: InterpreterContext, wordParts: WordPart[]): Promise<IndirectExpansionResult>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameter Operation Handlers
|
|
3
|
+
*
|
|
4
|
+
* Handles individual parameter expansion operations:
|
|
5
|
+
* - DefaultValue, AssignDefault, UseAlternative, ErrorIfUnset
|
|
6
|
+
* - PatternRemoval, PatternReplacement
|
|
7
|
+
* - Length, Substring
|
|
8
|
+
* - CaseModification, Transform
|
|
9
|
+
* - Indirection, ArrayKeys, VarNamePrefix
|
|
10
|
+
*/
|
|
11
|
+
import type { CaseModificationOp, ErrorIfUnsetOp, InnerParameterOperation, ParameterExpansionPart, PatternRemovalOp, PatternReplacementOp, SubstringOp, WordNode, WordPart } from "../../ast/types.js";
|
|
12
|
+
import type { InterpreterContext } from "../types.js";
|
|
13
|
+
/**
|
|
14
|
+
* Type for expandWordPartsAsync function reference
|
|
15
|
+
*/
|
|
16
|
+
export type ExpandWordPartsAsyncFn = (ctx: InterpreterContext, parts: WordPart[], inDoubleQuotes?: boolean) => Promise<string>;
|
|
17
|
+
/**
|
|
18
|
+
* Type for expandPart function reference
|
|
19
|
+
*/
|
|
20
|
+
export type ExpandPartFn = (ctx: InterpreterContext, part: WordPart, inDoubleQuotes?: boolean) => Promise<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Type for self-reference to expandParameterAsync
|
|
23
|
+
*/
|
|
24
|
+
export type ExpandParameterAsyncFn = (ctx: InterpreterContext, part: ParameterExpansionPart, inDoubleQuotes?: boolean) => Promise<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Context with computed values used across multiple operation handlers
|
|
27
|
+
*/
|
|
28
|
+
export interface ParameterOpContext {
|
|
29
|
+
value: string;
|
|
30
|
+
isUnset: boolean;
|
|
31
|
+
isEmpty: boolean;
|
|
32
|
+
effectiveValue: string;
|
|
33
|
+
inDoubleQuotes: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Handle DefaultValue operation: ${param:-word}
|
|
37
|
+
*/
|
|
38
|
+
export declare function handleDefaultValue(ctx: InterpreterContext, operation: {
|
|
39
|
+
word?: WordNode;
|
|
40
|
+
checkEmpty?: boolean;
|
|
41
|
+
}, opCtx: ParameterOpContext, expandWordPartsAsync: ExpandWordPartsAsyncFn): Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Handle AssignDefault operation: ${param:=word}
|
|
44
|
+
*/
|
|
45
|
+
export declare function handleAssignDefault(ctx: InterpreterContext, parameter: string, operation: {
|
|
46
|
+
word?: WordNode;
|
|
47
|
+
checkEmpty?: boolean;
|
|
48
|
+
}, opCtx: ParameterOpContext, expandWordPartsAsync: ExpandWordPartsAsyncFn): Promise<string>;
|
|
49
|
+
/**
|
|
50
|
+
* Handle ErrorIfUnset operation: ${param:?word}
|
|
51
|
+
*/
|
|
52
|
+
export declare function handleErrorIfUnset(ctx: InterpreterContext, parameter: string, operation: ErrorIfUnsetOp, opCtx: ParameterOpContext, expandWordPartsAsync: ExpandWordPartsAsyncFn): Promise<string>;
|
|
53
|
+
/**
|
|
54
|
+
* Handle UseAlternative operation: ${param:+word}
|
|
55
|
+
*/
|
|
56
|
+
export declare function handleUseAlternative(ctx: InterpreterContext, operation: {
|
|
57
|
+
word?: WordNode;
|
|
58
|
+
checkEmpty?: boolean;
|
|
59
|
+
}, opCtx: ParameterOpContext, expandWordPartsAsync: ExpandWordPartsAsyncFn): Promise<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Handle PatternRemoval operation: ${param#pattern}, ${param%pattern}
|
|
62
|
+
*/
|
|
63
|
+
export declare function handlePatternRemoval(ctx: InterpreterContext, value: string, operation: PatternRemovalOp, expandWordPartsAsync: ExpandWordPartsAsyncFn, expandPart: ExpandPartFn): Promise<string>;
|
|
64
|
+
/**
|
|
65
|
+
* Handle PatternReplacement operation: ${param/pattern/replacement}
|
|
66
|
+
*/
|
|
67
|
+
export declare function handlePatternReplacement(ctx: InterpreterContext, value: string, operation: PatternReplacementOp, expandWordPartsAsync: ExpandWordPartsAsyncFn, expandPart: ExpandPartFn): Promise<string>;
|
|
68
|
+
/**
|
|
69
|
+
* Handle Length operation: ${#param}
|
|
70
|
+
*/
|
|
71
|
+
export declare function handleLength(ctx: InterpreterContext, parameter: string, value: string): string;
|
|
72
|
+
/**
|
|
73
|
+
* Handle Substring operation: ${param:offset:length}
|
|
74
|
+
*/
|
|
75
|
+
export declare function handleSubstring(ctx: InterpreterContext, parameter: string, value: string, operation: SubstringOp): Promise<string>;
|
|
76
|
+
/**
|
|
77
|
+
* Handle CaseModification operation: ${param^pattern}, ${param,pattern}
|
|
78
|
+
*/
|
|
79
|
+
export declare function handleCaseModification(ctx: InterpreterContext, value: string, operation: CaseModificationOp, expandWordPartsAsync: ExpandWordPartsAsyncFn, expandParameterAsync: ExpandParameterAsyncFn): Promise<string>;
|
|
80
|
+
/**
|
|
81
|
+
* Handle Transform operation: ${param@operator}
|
|
82
|
+
*/
|
|
83
|
+
export declare function handleTransform(ctx: InterpreterContext, parameter: string, value: string, isUnset: boolean, operation: {
|
|
84
|
+
operator: string;
|
|
85
|
+
}): string;
|
|
86
|
+
/**
|
|
87
|
+
* Handle Indirection operation: ${!param}
|
|
88
|
+
*/
|
|
89
|
+
export declare function handleIndirection(ctx: InterpreterContext, parameter: string, value: string, isUnset: boolean, operation: {
|
|
90
|
+
innerOp?: InnerParameterOperation;
|
|
91
|
+
}, expandParameterAsync: ExpandParameterAsyncFn, inDoubleQuotes?: boolean): Promise<string>;
|
|
92
|
+
/**
|
|
93
|
+
* Handle ArrayKeys operation: ${!arr[@]}, ${!arr[*]}
|
|
94
|
+
*/
|
|
95
|
+
export declare function handleArrayKeys(ctx: InterpreterContext, operation: {
|
|
96
|
+
array: string;
|
|
97
|
+
star: boolean;
|
|
98
|
+
}): string;
|
|
99
|
+
/**
|
|
100
|
+
* Handle VarNamePrefix operation: ${!prefix*}, ${!prefix@}
|
|
101
|
+
*/
|
|
102
|
+
export declare function handleVarNamePrefix(ctx: InterpreterContext, operation: {
|
|
103
|
+
prefix: string;
|
|
104
|
+
star: boolean;
|
|
105
|
+
}): string;
|
|
106
|
+
/**
|
|
107
|
+
* Compute whether the parameter value is "empty" for expansion purposes.
|
|
108
|
+
* This handles special cases for $*, $@, array[*], and array[@].
|
|
109
|
+
*/
|
|
110
|
+
export declare function computeIsEmpty(ctx: InterpreterContext, parameter: string, value: string, inDoubleQuotes: boolean): {
|
|
111
|
+
isEmpty: boolean;
|
|
112
|
+
effectiveValue: string;
|
|
113
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pattern Expansion
|
|
3
|
+
*
|
|
4
|
+
* Functions for expanding variables within glob/extglob patterns.
|
|
5
|
+
* Handles command substitution, variable expansion, and quoting within patterns.
|
|
6
|
+
*/
|
|
7
|
+
import type { InterpreterContext } from "../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Check if a pattern string contains command substitution $(...)
|
|
10
|
+
*/
|
|
11
|
+
export declare function patternHasCommandSubstitution(pattern: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Expand variables within a glob/extglob pattern string.
|
|
14
|
+
* This handles patterns like @($var|$other) where variables need expansion.
|
|
15
|
+
* Also handles quoted strings inside patterns (e.g., @(foo|'bar'|"$baz")).
|
|
16
|
+
* Preserves pattern metacharacters while expanding $var and ${var} references.
|
|
17
|
+
*/
|
|
18
|
+
export declare function expandVariablesInPattern(ctx: InterpreterContext, pattern: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Async version of expandVariablesInPattern that handles command substitutions.
|
|
21
|
+
* This handles patterns like @($var|$(echo foo)) where command substitutions need expansion.
|
|
22
|
+
*/
|
|
23
|
+
export declare function expandVariablesInPatternAsync(ctx: InterpreterContext, pattern: string): Promise<string>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pattern Removal Helpers
|
|
3
|
+
*
|
|
4
|
+
* Functions for ${var#pattern}, ${var%pattern}, ${!prefix*} etc.
|
|
5
|
+
*/
|
|
6
|
+
import type { InterpreterContext } from "../types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Apply pattern removal (prefix or suffix strip) to a single value.
|
|
9
|
+
* Used by both scalar and vectorized array operations.
|
|
10
|
+
*/
|
|
11
|
+
export declare function applyPatternRemoval(value: string, regexStr: string, side: "prefix" | "suffix", greedy: boolean): string;
|
|
12
|
+
/**
|
|
13
|
+
* Get variable names that match a given prefix.
|
|
14
|
+
* Used for ${!prefix*} and ${!prefix@} expansions.
|
|
15
|
+
* Handles arrays properly - includes array base names from __length markers,
|
|
16
|
+
* excludes internal storage keys like arr_0, arr__length.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getVarNamesWithPrefix(ctx: InterpreterContext, prefix: string): string[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pattern Matching
|
|
3
|
+
*
|
|
4
|
+
* Converts shell glob patterns to regex equivalents for pattern matching
|
|
5
|
+
* in parameter expansion (${var%pattern}, ${var/pattern/replacement}, etc.)
|
|
6
|
+
* and case statements.
|
|
7
|
+
*
|
|
8
|
+
* ## Error Handling
|
|
9
|
+
*
|
|
10
|
+
* This module follows bash's behavior for invalid patterns:
|
|
11
|
+
* - Invalid character ranges (e.g., `[z-a]`) result in regex compilation failure
|
|
12
|
+
* - Unknown POSIX classes (e.g., `[:foo:]`) produce empty match groups
|
|
13
|
+
* - Unclosed character classes (`[abc`) are treated as literal `[`
|
|
14
|
+
*
|
|
15
|
+
* Callers should wrap regex compilation in try/catch to handle invalid patterns.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Convert a shell glob pattern to a regex string.
|
|
19
|
+
* @param pattern - The glob pattern (*, ?, [...])
|
|
20
|
+
* @param greedy - Whether * should be greedy (true for suffix matching, false for prefix)
|
|
21
|
+
* @param extglob - Whether to support extended glob patterns (@(...), *(...), +(...), ?(...), !(...))
|
|
22
|
+
*/
|
|
23
|
+
export declare function patternToRegex(pattern: string, greedy: boolean, extglob?: boolean): string;
|