just-binary 3.2.5 → 3.3.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/README.md +1 -1
- package/dist/Bash.d.ts +56 -1
- package/dist/bin/chunks/alias-MILMQPGR.js +2 -0
- package/dist/bin/chunks/awk2-FB5MXVFV.js +2 -0
- package/dist/bin/chunks/base64-NGAPXZAM.js +2 -0
- package/dist/bin/chunks/basename-ZFBDKUVW.js +2 -0
- package/dist/bin/chunks/bash-FQY3C37R.js +2 -0
- package/dist/bin/chunks/cat-UO3ZDQHP.js +2 -0
- package/dist/bin/chunks/chmod-GYXHDITN.js +2 -0
- package/dist/bin/chunks/chunk-2FWUPGJH.js +6 -0
- package/dist/bin/chunks/chunk-2JQKBSIH.js +14 -0
- package/dist/bin/chunks/chunk-2MX7URRE.js +10 -0
- package/dist/bin/chunks/chunk-3G7ONQFJ.js +11 -0
- package/dist/bin/chunks/chunk-3KKXX5QY.js +13 -0
- package/dist/bin/chunks/chunk-3SWITKTS.js +7 -0
- package/dist/bin/chunks/chunk-3V7N5SEN.js +9 -0
- package/dist/bin/chunks/chunk-45S6IACR.js +3 -0
- package/dist/bin/chunks/chunk-4PDI7A54.js +20 -0
- package/dist/bin/chunks/chunk-532RLOPK.js +14 -0
- package/dist/bin/chunks/chunk-5B4HIQFQ.js +7 -0
- package/dist/bin/chunks/chunk-5CTS5L3T.js +18 -0
- package/dist/bin/chunks/chunk-5RANCCE2.js +6 -0
- package/dist/bin/chunks/chunk-63FHXCEF.js +4 -0
- package/dist/bin/chunks/chunk-64ICY43M.js +8 -0
- package/dist/bin/chunks/chunk-6MJ6NBIG.js +8 -0
- package/dist/bin/chunks/chunk-6N6IRP6G.js +6 -0
- package/dist/bin/chunks/chunk-6VQWCKYE.js +2 -0
- package/dist/bin/chunks/chunk-6WKRPHAZ.js +36 -0
- package/dist/bin/chunks/chunk-73X3QWRT.js +80 -0
- package/dist/bin/chunks/chunk-7FCHB2LT.js +14 -0
- package/dist/bin/chunks/chunk-7FGPQVVJ.js +12 -0
- package/dist/bin/chunks/chunk-7FUCLMNU.js +7 -0
- package/dist/bin/chunks/chunk-7LGOLTRR.js +5 -0
- package/dist/bin/chunks/chunk-7POGKC42.js +11 -0
- package/dist/bin/chunks/chunk-A257OMG4.js +2 -0
- package/dist/bin/chunks/chunk-BH4O34VZ.js +26 -0
- package/dist/bin/chunks/chunk-BTCJZ7OY.js +10 -0
- package/dist/bin/chunks/chunk-CEU7KGBV.js +24 -0
- package/dist/bin/chunks/chunk-COM2NIBS.js +3 -0
- package/dist/bin/chunks/chunk-CXEBUGVP.js +7 -0
- package/dist/bin/chunks/chunk-CY4RP66Q.js +21 -0
- package/dist/bin/chunks/chunk-DM55Q4EM.js +5 -0
- package/dist/bin/chunks/chunk-DUBCYODB.js +11 -0
- package/dist/bin/chunks/chunk-DUPNDZ3H.js +6 -0
- package/dist/bin/chunks/chunk-EKD22SYR.js +23 -0
- package/dist/bin/chunks/chunk-EOMAF5KQ.js +6 -0
- package/dist/bin/chunks/chunk-EQOXJHK3.js +2 -0
- package/dist/bin/chunks/chunk-EYZ62W3A.js +8 -0
- package/dist/bin/chunks/chunk-FHWRQZ3L.js +9 -0
- package/dist/bin/chunks/chunk-FUPQF256.js +10 -0
- package/dist/bin/chunks/chunk-GNVKOWAD.js +7 -0
- package/dist/bin/chunks/chunk-GZGWA6JM.js +3 -0
- package/dist/bin/chunks/chunk-HMHPYX5K.js +9 -0
- package/dist/bin/chunks/chunk-IA7QY73Z.js +9 -0
- package/dist/bin/chunks/chunk-J7ARATA6.js +4 -0
- package/dist/bin/chunks/chunk-JGKR7YR7.js +2 -0
- package/dist/bin/chunks/chunk-JILAHEMU.js +2 -0
- package/dist/bin/chunks/chunk-JKVUWQVK.js +12 -0
- package/dist/bin/chunks/chunk-JVUFZWPW.js +3 -0
- package/dist/bin/chunks/chunk-JYZZJOWW.js +2 -0
- package/dist/bin/chunks/chunk-KSXVXC3N.js +2 -0
- package/dist/bin/chunks/chunk-KTGY5SRV.js +2 -0
- package/dist/bin/chunks/chunk-KTZIEG4R.js +13 -0
- package/dist/bin/chunks/chunk-LNAXROAQ.js +5 -0
- package/dist/bin/chunks/chunk-LV3CC7SU.js +7 -0
- package/dist/bin/chunks/chunk-LVWII44I.js +23 -0
- package/dist/bin/chunks/chunk-LZC6DGAO.js +8 -0
- package/dist/bin/chunks/chunk-M3JG3HYB.js +14 -0
- package/dist/bin/chunks/chunk-MJODCFGH.js +140 -0
- package/dist/bin/chunks/chunk-MJTA3OJF.js +7 -0
- package/dist/bin/chunks/chunk-OF45CXLB.js +2 -0
- package/dist/bin/chunks/chunk-PAD6GYRH.js +5 -0
- package/dist/bin/chunks/chunk-PJ7H3LY6.js +8 -0
- package/dist/bin/chunks/chunk-QD4WQ5KK.js +17 -0
- package/dist/bin/chunks/chunk-R2BBWDS3.js +2 -0
- package/dist/bin/chunks/chunk-SIDKYUUQ.js +7 -0
- package/dist/bin/chunks/chunk-TDOAJ4YU.js +3 -0
- package/dist/bin/chunks/chunk-U34CFKX2.js +13 -0
- package/dist/bin/chunks/chunk-U7TJRQHK.js +16 -0
- package/dist/bin/chunks/chunk-UIRJNX5Z.js +2 -0
- package/dist/bin/chunks/chunk-UKL6PNC2.js +63 -0
- package/dist/bin/chunks/chunk-UN3P7MOR.js +16 -0
- package/dist/bin/chunks/chunk-UQKQCSRP.js +16 -0
- package/dist/bin/chunks/chunk-UYAEZFQS.js +100 -0
- package/dist/bin/chunks/chunk-V7OGIT4K.js +3 -0
- package/dist/bin/chunks/chunk-VK4UPKZF.js +3 -0
- package/dist/bin/chunks/chunk-VUUGFF6A.js +9 -0
- package/dist/bin/chunks/chunk-WATFCWHB.js +12 -0
- package/dist/bin/chunks/chunk-WIJCOCAS.js +9 -0
- package/dist/bin/chunks/chunk-XSCMU2VT.js +19 -0
- package/dist/bin/chunks/chunk-XWJ3KFMY.js +287 -0
- package/dist/bin/chunks/chunk-Y6NUYQQX.js +84 -0
- package/dist/bin/chunks/chunk-YLIFZDMR.js +9 -0
- package/dist/bin/chunks/chunk-YQFW27YU.js +33 -0
- package/dist/bin/chunks/chunk-YXVJUBRG.js +5 -0
- package/dist/bin/chunks/chunk-Z6BNZUNQ.js +32 -0
- package/dist/bin/chunks/chunk-ZLGIFJBA.js +5 -0
- package/dist/bin/chunks/clear-FZZM6QD2.js +2 -0
- package/dist/bin/chunks/column-UCIEGSHJ.js +2 -0
- package/dist/bin/chunks/comm-WKYJTISA.js +2 -0
- package/dist/bin/chunks/cp-YSXTOMBS.js +2 -0
- package/dist/bin/chunks/curl-YFYJ2XNC.js +26 -0
- package/dist/bin/chunks/cut-2MSOLU4C.js +2 -0
- package/dist/bin/chunks/date-5LA42436.js +2 -0
- package/dist/bin/chunks/diff-4PEKV4XS.js +2 -0
- package/dist/bin/chunks/dirname-XXQNLCA4.js +2 -0
- package/dist/bin/chunks/du-IKBAW7PG.js +2 -0
- package/dist/bin/chunks/echo-DHVSEP57.js +2 -0
- package/dist/bin/chunks/env-A43LGO53.js +2 -0
- package/dist/bin/chunks/expand-L4NT2YFK.js +2 -0
- package/dist/bin/chunks/expansion-IB7ZIBIF.js +2 -0
- package/dist/bin/chunks/expr-BGBONRHV.js +2 -0
- package/dist/bin/chunks/file-DZRWWDPH.js +2 -0
- package/dist/bin/chunks/find-B6JV4QSG.js +2 -0
- package/dist/bin/chunks/flag-coverage-FTS7XXHM.js +2 -0
- package/dist/bin/chunks/fold-OVU7UR2E.js +2 -0
- package/dist/bin/chunks/grep-RG26XCUN.js +2 -0
- package/dist/bin/chunks/gzip-XZZL25AV.js +2 -0
- package/dist/bin/chunks/head-HT46A7YT.js +2 -0
- package/dist/bin/chunks/help-AOETY73Q.js +2 -0
- package/dist/bin/chunks/history-WO6CMWMT.js +2 -0
- package/dist/bin/chunks/hostname-4O6NEPL2.js +2 -0
- package/dist/bin/chunks/html-to-markdown-34LV4LFQ.js +2 -0
- package/dist/bin/chunks/join-6M3ARIFB.js +2 -0
- package/dist/bin/chunks/jq-HP7VLWBL.js +2 -0
- package/dist/bin/chunks/ln-2OLFXJYU.js +2 -0
- package/dist/bin/chunks/ls-LBW3TTPI.js +2 -0
- package/dist/bin/chunks/md5sum-GAWU76ZU.js +2 -0
- package/dist/bin/chunks/mkdir-UUOVKGHS.js +2 -0
- package/dist/bin/chunks/mv-7VY5OVAU.js +2 -0
- package/dist/bin/chunks/nl-34JIXDXD.js +2 -0
- package/dist/bin/chunks/od-IGVFBAFH.js +2 -0
- package/dist/bin/chunks/paste-Q23K6FU7.js +2 -0
- package/dist/bin/chunks/printf-CVEJOTYB.js +2 -0
- package/dist/bin/chunks/pwd-6OLMY3MQ.js +2 -0
- package/dist/bin/chunks/python3-VZL5HRHR.js +14 -0
- package/dist/bin/chunks/readlink-T4CDCG4Z.js +2 -0
- package/dist/bin/chunks/rev-O3PQMT23.js +2 -0
- package/dist/bin/chunks/rg-PQP4HTR3.js +2 -0
- package/dist/bin/chunks/rm-UMIY7ESO.js +2 -0
- package/dist/bin/chunks/rmdir-NJCSEPRP.js +2 -0
- package/dist/bin/chunks/sed-BZW7POX3.js +2 -0
- package/dist/bin/chunks/seq-3FRPQG5E.js +2 -0
- package/dist/bin/chunks/sha1sum-AOZWHFTU.js +2 -0
- package/dist/bin/chunks/sha256sum-EXJTAPU4.js +2 -0
- package/dist/bin/chunks/sleep-HDMKKRCV.js +2 -0
- package/dist/bin/chunks/sort-TO3IPXI2.js +2 -0
- package/dist/bin/chunks/split-JXCUP73P.js +2 -0
- package/dist/bin/chunks/sqlite3-K7LHCU76.js +2 -0
- package/dist/bin/chunks/stat-J5TUE4U5.js +2 -0
- package/dist/bin/chunks/strings-TDUSHGAB.js +2 -0
- package/dist/bin/chunks/tac-QXOHN3J4.js +2 -0
- package/dist/bin/chunks/tail-LOVA3SKT.js +2 -0
- package/dist/bin/chunks/tar-BAKR5OJO.js +2 -0
- package/dist/bin/chunks/tee-SREYEKO6.js +2 -0
- package/dist/bin/chunks/time-GS6SIFPK.js +2 -0
- package/dist/bin/chunks/timeout-XBYZ5LW5.js +2 -0
- package/dist/bin/chunks/touch-4ZSEFYEW.js +2 -0
- package/dist/bin/chunks/tr-ARR7JBLN.js +2 -0
- package/dist/bin/chunks/tree-7Y7H64VI.js +2 -0
- package/dist/bin/chunks/true-CKHNKYAT.js +2 -0
- package/dist/bin/chunks/unexpand-B4WHWJHL.js +2 -0
- package/dist/bin/chunks/uniq-I2KNCRR6.js +2 -0
- package/dist/bin/chunks/wc-TDIG4RIU.js +2 -0
- package/dist/bin/chunks/which-QMZ276XE.js +2 -0
- package/dist/bin/chunks/whoami-XYB47VCX.js +2 -0
- package/dist/bin/chunks/xan-STBKXZ5W.js +2 -0
- package/dist/bin/chunks/xan-view-BIT4WIPP.js +2 -0
- package/dist/bin/chunks/xargs-6K57XYD6.js +2 -0
- package/dist/bin/chunks/yes-7ZGUE2PX.js +2 -0
- package/dist/bin/chunks/yq-ZHYSTGN3.js +2 -0
- package/dist/bin/just-bash.js +320 -303
- package/dist/bin/shell/chunks/alias-MILMQPGR.js +2 -0
- package/dist/bin/shell/chunks/awk2-FB5MXVFV.js +2 -0
- package/dist/bin/shell/chunks/base64-NGAPXZAM.js +2 -0
- package/dist/bin/shell/chunks/basename-ZFBDKUVW.js +2 -0
- package/dist/bin/shell/chunks/bash-FQY3C37R.js +2 -0
- package/dist/bin/shell/chunks/cat-UO3ZDQHP.js +2 -0
- package/dist/bin/shell/chunks/chmod-GYXHDITN.js +2 -0
- package/dist/bin/shell/chunks/chunk-2FWUPGJH.js +6 -0
- package/dist/bin/shell/chunks/chunk-2JQKBSIH.js +14 -0
- package/dist/bin/shell/chunks/chunk-2MX7URRE.js +10 -0
- package/dist/bin/shell/chunks/chunk-3G7ONQFJ.js +11 -0
- package/dist/bin/shell/chunks/chunk-3KKXX5QY.js +13 -0
- package/dist/bin/shell/chunks/chunk-3SWITKTS.js +7 -0
- package/dist/bin/shell/chunks/chunk-3V7N5SEN.js +9 -0
- package/dist/bin/shell/chunks/chunk-45S6IACR.js +3 -0
- package/dist/bin/shell/chunks/chunk-4PDI7A54.js +20 -0
- package/dist/bin/shell/chunks/chunk-532RLOPK.js +14 -0
- package/dist/bin/shell/chunks/chunk-5B4HIQFQ.js +7 -0
- package/dist/bin/shell/chunks/chunk-5CTS5L3T.js +18 -0
- package/dist/bin/shell/chunks/chunk-5RANCCE2.js +6 -0
- package/dist/bin/shell/chunks/chunk-63FHXCEF.js +4 -0
- package/dist/bin/shell/chunks/chunk-64ICY43M.js +8 -0
- package/dist/bin/shell/chunks/chunk-6MJ6NBIG.js +8 -0
- package/dist/bin/shell/chunks/chunk-6N6IRP6G.js +6 -0
- package/dist/bin/shell/chunks/chunk-6VQWCKYE.js +2 -0
- package/dist/bin/shell/chunks/chunk-6WKRPHAZ.js +36 -0
- package/dist/bin/shell/chunks/chunk-73X3QWRT.js +80 -0
- package/dist/bin/shell/chunks/chunk-7FCHB2LT.js +14 -0
- package/dist/bin/shell/chunks/chunk-7FGPQVVJ.js +12 -0
- package/dist/bin/shell/chunks/chunk-7FUCLMNU.js +7 -0
- package/dist/bin/shell/chunks/chunk-7LGOLTRR.js +5 -0
- package/dist/bin/shell/chunks/chunk-7POGKC42.js +11 -0
- package/dist/bin/shell/chunks/chunk-A257OMG4.js +2 -0
- package/dist/bin/shell/chunks/chunk-BH4O34VZ.js +26 -0
- package/dist/bin/shell/chunks/chunk-BTCJZ7OY.js +10 -0
- package/dist/bin/shell/chunks/chunk-CEU7KGBV.js +24 -0
- package/dist/bin/shell/chunks/chunk-COM2NIBS.js +3 -0
- package/dist/bin/shell/chunks/chunk-CXEBUGVP.js +7 -0
- package/dist/bin/shell/chunks/chunk-CY4RP66Q.js +21 -0
- package/dist/bin/shell/chunks/chunk-DM55Q4EM.js +5 -0
- package/dist/bin/shell/chunks/chunk-DUBCYODB.js +11 -0
- package/dist/bin/shell/chunks/chunk-DUPNDZ3H.js +6 -0
- package/dist/bin/shell/chunks/chunk-EKD22SYR.js +23 -0
- package/dist/bin/shell/chunks/chunk-EOMAF5KQ.js +6 -0
- package/dist/bin/shell/chunks/chunk-EQOXJHK3.js +2 -0
- package/dist/bin/shell/chunks/chunk-EYZ62W3A.js +8 -0
- package/dist/bin/shell/chunks/chunk-FHWRQZ3L.js +9 -0
- package/dist/bin/shell/chunks/chunk-FUPQF256.js +10 -0
- package/dist/bin/shell/chunks/chunk-GNVKOWAD.js +7 -0
- package/dist/bin/shell/chunks/chunk-GZGWA6JM.js +3 -0
- package/dist/bin/shell/chunks/chunk-HMHPYX5K.js +9 -0
- package/dist/bin/shell/chunks/chunk-IA7QY73Z.js +9 -0
- package/dist/bin/shell/chunks/chunk-J7ARATA6.js +4 -0
- package/dist/bin/shell/chunks/chunk-JGKR7YR7.js +2 -0
- package/dist/bin/shell/chunks/chunk-JILAHEMU.js +2 -0
- package/dist/bin/shell/chunks/chunk-JKVUWQVK.js +12 -0
- package/dist/bin/shell/chunks/chunk-JVUFZWPW.js +3 -0
- package/dist/bin/shell/chunks/chunk-JYZZJOWW.js +2 -0
- package/dist/bin/shell/chunks/chunk-KSXVXC3N.js +2 -0
- package/dist/bin/shell/chunks/chunk-KTGY5SRV.js +2 -0
- package/dist/bin/shell/chunks/chunk-KTZIEG4R.js +13 -0
- package/dist/bin/shell/chunks/chunk-LNAXROAQ.js +5 -0
- package/dist/bin/shell/chunks/chunk-LV3CC7SU.js +7 -0
- package/dist/bin/shell/chunks/chunk-LVWII44I.js +23 -0
- package/dist/bin/shell/chunks/chunk-LZC6DGAO.js +8 -0
- package/dist/bin/shell/chunks/chunk-M3JG3HYB.js +14 -0
- package/dist/bin/shell/chunks/chunk-MJODCFGH.js +140 -0
- package/dist/bin/shell/chunks/chunk-MJTA3OJF.js +7 -0
- package/dist/bin/shell/chunks/chunk-OF45CXLB.js +2 -0
- package/dist/bin/shell/chunks/chunk-PAD6GYRH.js +5 -0
- package/dist/bin/shell/chunks/chunk-PJ7H3LY6.js +8 -0
- package/dist/bin/shell/chunks/chunk-QD4WQ5KK.js +17 -0
- package/dist/bin/shell/chunks/chunk-R2BBWDS3.js +2 -0
- package/dist/bin/shell/chunks/chunk-SIDKYUUQ.js +7 -0
- package/dist/bin/shell/chunks/chunk-TDOAJ4YU.js +3 -0
- package/dist/bin/shell/chunks/chunk-U34CFKX2.js +13 -0
- package/dist/bin/shell/chunks/chunk-U7TJRQHK.js +16 -0
- package/dist/bin/shell/chunks/chunk-UIRJNX5Z.js +2 -0
- package/dist/bin/shell/chunks/chunk-UKL6PNC2.js +63 -0
- package/dist/bin/shell/chunks/chunk-UN3P7MOR.js +16 -0
- package/dist/bin/shell/chunks/chunk-UQKQCSRP.js +16 -0
- package/dist/bin/shell/chunks/chunk-UYAEZFQS.js +100 -0
- package/dist/bin/shell/chunks/chunk-V7OGIT4K.js +3 -0
- package/dist/bin/shell/chunks/chunk-VK4UPKZF.js +3 -0
- package/dist/bin/shell/chunks/chunk-VUUGFF6A.js +9 -0
- package/dist/bin/shell/chunks/chunk-WATFCWHB.js +12 -0
- package/dist/bin/shell/chunks/chunk-WIJCOCAS.js +9 -0
- package/dist/bin/shell/chunks/chunk-XSCMU2VT.js +19 -0
- package/dist/bin/shell/chunks/chunk-XWJ3KFMY.js +287 -0
- package/dist/bin/shell/chunks/chunk-Y6NUYQQX.js +84 -0
- package/dist/bin/shell/chunks/chunk-YLIFZDMR.js +9 -0
- package/dist/bin/shell/chunks/chunk-YQFW27YU.js +33 -0
- package/dist/bin/shell/chunks/chunk-YXVJUBRG.js +5 -0
- package/dist/bin/shell/chunks/chunk-Z6BNZUNQ.js +32 -0
- package/dist/bin/shell/chunks/chunk-ZLGIFJBA.js +5 -0
- package/dist/bin/shell/chunks/clear-FZZM6QD2.js +2 -0
- package/dist/bin/shell/chunks/column-UCIEGSHJ.js +2 -0
- package/dist/bin/shell/chunks/comm-WKYJTISA.js +2 -0
- package/dist/bin/shell/chunks/cp-YSXTOMBS.js +2 -0
- package/dist/bin/shell/chunks/curl-YFYJ2XNC.js +26 -0
- package/dist/bin/shell/chunks/cut-2MSOLU4C.js +2 -0
- package/dist/bin/shell/chunks/date-5LA42436.js +2 -0
- package/dist/bin/shell/chunks/diff-4PEKV4XS.js +2 -0
- package/dist/bin/shell/chunks/dirname-XXQNLCA4.js +2 -0
- package/dist/bin/shell/chunks/du-IKBAW7PG.js +2 -0
- package/dist/bin/shell/chunks/echo-DHVSEP57.js +2 -0
- package/dist/bin/shell/chunks/env-A43LGO53.js +2 -0
- package/dist/bin/shell/chunks/expand-L4NT2YFK.js +2 -0
- package/dist/bin/shell/chunks/expansion-IB7ZIBIF.js +2 -0
- package/dist/bin/shell/chunks/expr-BGBONRHV.js +2 -0
- package/dist/bin/shell/chunks/file-DZRWWDPH.js +2 -0
- package/dist/bin/shell/chunks/find-B6JV4QSG.js +2 -0
- package/dist/bin/shell/chunks/flag-coverage-FTS7XXHM.js +2 -0
- package/dist/bin/shell/chunks/fold-OVU7UR2E.js +2 -0
- package/dist/bin/shell/chunks/grep-RG26XCUN.js +2 -0
- package/dist/bin/shell/chunks/gzip-XZZL25AV.js +2 -0
- package/dist/bin/shell/chunks/head-HT46A7YT.js +2 -0
- package/dist/bin/shell/chunks/help-AOETY73Q.js +2 -0
- package/dist/bin/shell/chunks/history-WO6CMWMT.js +2 -0
- package/dist/bin/shell/chunks/hostname-4O6NEPL2.js +2 -0
- package/dist/bin/shell/chunks/html-to-markdown-34LV4LFQ.js +2 -0
- package/dist/bin/shell/chunks/join-6M3ARIFB.js +2 -0
- package/dist/bin/shell/chunks/jq-HP7VLWBL.js +2 -0
- package/dist/bin/shell/chunks/ln-2OLFXJYU.js +2 -0
- package/dist/bin/shell/chunks/ls-LBW3TTPI.js +2 -0
- package/dist/bin/shell/chunks/md5sum-GAWU76ZU.js +2 -0
- package/dist/bin/shell/chunks/mkdir-UUOVKGHS.js +2 -0
- package/dist/bin/shell/chunks/mv-7VY5OVAU.js +2 -0
- package/dist/bin/shell/chunks/nl-34JIXDXD.js +2 -0
- package/dist/bin/shell/chunks/od-IGVFBAFH.js +2 -0
- package/dist/bin/shell/chunks/paste-Q23K6FU7.js +2 -0
- package/dist/bin/shell/chunks/printf-CVEJOTYB.js +2 -0
- package/dist/bin/shell/chunks/pwd-6OLMY3MQ.js +2 -0
- package/dist/bin/shell/chunks/python3-VZL5HRHR.js +14 -0
- package/dist/bin/shell/chunks/readlink-T4CDCG4Z.js +2 -0
- package/dist/bin/shell/chunks/rev-O3PQMT23.js +2 -0
- package/dist/bin/shell/chunks/rg-PQP4HTR3.js +2 -0
- package/dist/bin/shell/chunks/rm-UMIY7ESO.js +2 -0
- package/dist/bin/shell/chunks/rmdir-NJCSEPRP.js +2 -0
- package/dist/bin/shell/chunks/sed-BZW7POX3.js +2 -0
- package/dist/bin/shell/chunks/seq-3FRPQG5E.js +2 -0
- package/dist/bin/shell/chunks/sha1sum-AOZWHFTU.js +2 -0
- package/dist/bin/shell/chunks/sha256sum-EXJTAPU4.js +2 -0
- package/dist/bin/shell/chunks/sleep-HDMKKRCV.js +2 -0
- package/dist/bin/shell/chunks/sort-TO3IPXI2.js +2 -0
- package/dist/bin/shell/chunks/split-JXCUP73P.js +2 -0
- package/dist/bin/shell/chunks/sqlite3-K7LHCU76.js +2 -0
- package/dist/bin/shell/chunks/stat-J5TUE4U5.js +2 -0
- package/dist/bin/shell/chunks/strings-TDUSHGAB.js +2 -0
- package/dist/bin/shell/chunks/tac-QXOHN3J4.js +2 -0
- package/dist/bin/shell/chunks/tail-LOVA3SKT.js +2 -0
- package/dist/bin/shell/chunks/tar-BAKR5OJO.js +2 -0
- package/dist/bin/shell/chunks/tee-SREYEKO6.js +2 -0
- package/dist/bin/shell/chunks/time-GS6SIFPK.js +2 -0
- package/dist/bin/shell/chunks/timeout-XBYZ5LW5.js +2 -0
- package/dist/bin/shell/chunks/touch-4ZSEFYEW.js +2 -0
- package/dist/bin/shell/chunks/tr-ARR7JBLN.js +2 -0
- package/dist/bin/shell/chunks/tree-7Y7H64VI.js +2 -0
- package/dist/bin/shell/chunks/true-CKHNKYAT.js +2 -0
- package/dist/bin/shell/chunks/unexpand-B4WHWJHL.js +2 -0
- package/dist/bin/shell/chunks/uniq-I2KNCRR6.js +2 -0
- package/dist/bin/shell/chunks/wc-TDIG4RIU.js +2 -0
- package/dist/bin/shell/chunks/which-QMZ276XE.js +2 -0
- package/dist/bin/shell/chunks/whoami-XYB47VCX.js +2 -0
- package/dist/bin/shell/chunks/xan-STBKXZ5W.js +2 -0
- package/dist/bin/shell/chunks/xan-view-BIT4WIPP.js +2 -0
- package/dist/bin/shell/chunks/xargs-6K57XYD6.js +2 -0
- package/dist/bin/shell/chunks/yes-7ZGUE2PX.js +2 -0
- package/dist/bin/shell/chunks/yq-ZHYSTGN3.js +2 -0
- package/dist/bin/shell/shell.js +325 -308
- package/dist/browser.d.ts +4 -0
- package/dist/bundle/browser.js +859 -841
- package/dist/bundle/chunks/alias-CIPN5HGG.js +1 -0
- package/dist/bundle/chunks/awk2-RAKURI6M.js +1 -0
- package/dist/bundle/chunks/base64-4GSA7KNI.js +1 -0
- package/dist/bundle/chunks/basename-Q7SIX77Q.js +1 -0
- package/dist/bundle/chunks/bash-HKSQMKKV.js +1 -0
- package/dist/bundle/chunks/cat-L3YELBYM.js +1 -0
- package/dist/bundle/chunks/chmod-IJMA7OGQ.js +1 -0
- package/dist/bundle/chunks/chunk-23R5HQHH.js +22 -0
- package/dist/bundle/chunks/chunk-2C5744E3.js +16 -0
- package/dist/bundle/chunks/chunk-2UAAXNHX.js +1 -0
- package/dist/bundle/chunks/chunk-3JEPB2CL.js +10 -0
- package/dist/bundle/chunks/chunk-4NRX5HFD.js +2 -0
- package/dist/bundle/chunks/chunk-5JHQRYUS.js +5 -0
- package/dist/bundle/chunks/chunk-6B44NYQO.js +8 -0
- package/dist/bundle/chunks/chunk-6D5UCV65.js +23 -0
- package/dist/bundle/chunks/chunk-6TAOLIZ7.js +13 -0
- package/dist/bundle/chunks/chunk-734O2UB7.js +9 -0
- package/dist/bundle/chunks/chunk-7B7AWU7X.js +2 -0
- package/dist/bundle/chunks/chunk-7KFBK6FW.js +1 -0
- package/dist/bundle/chunks/chunk-7ROHLV74.js +31 -0
- package/dist/bundle/chunks/chunk-7SQ2RTI2.js +139 -0
- package/dist/bundle/chunks/chunk-7UPROJVF.js +4 -0
- package/dist/bundle/chunks/chunk-7Z65ZFBM.js +10 -0
- package/dist/bundle/chunks/chunk-A5FEGJHF.js +4 -0
- package/dist/bundle/chunks/chunk-AAVEDJ2B.js +4 -0
- package/dist/bundle/chunks/chunk-AFEP7ZTB.js +4 -0
- package/dist/bundle/chunks/chunk-ALZ5CSTK.js +9 -0
- package/dist/bundle/chunks/chunk-ANMMLK7G.js +2 -0
- package/dist/bundle/chunks/chunk-AXMBAF6A.js +5 -0
- package/dist/bundle/chunks/chunk-BX5K34KY.js +1 -0
- package/dist/bundle/chunks/chunk-BZXBFTL2.js +4 -0
- package/dist/bundle/chunks/chunk-C4UC4TPC.js +8 -0
- package/dist/bundle/chunks/chunk-CNBBFQPC.js +1 -0
- package/dist/bundle/chunks/chunk-CVM2MFM3.js +2 -0
- package/dist/bundle/chunks/chunk-DL5GRV7N.js +5 -0
- package/dist/bundle/chunks/chunk-DS5ORKKQ.js +3 -0
- package/dist/bundle/chunks/chunk-ESLB4XKL.js +15 -0
- package/dist/bundle/chunks/chunk-FPJIAK37.js +8 -0
- package/dist/bundle/chunks/chunk-GBVVD7OP.js +12 -0
- package/dist/bundle/chunks/chunk-GJQGDOOO.js +8 -0
- package/dist/bundle/chunks/chunk-GZRZD5YF.js +4 -0
- package/dist/bundle/chunks/chunk-HDHI347R.js +6 -0
- package/dist/bundle/chunks/chunk-HKMBFRTV.js +2 -0
- package/dist/bundle/chunks/chunk-HMRLLHZE.js +7 -0
- package/dist/bundle/chunks/chunk-HVMFTOQY.js +1 -0
- package/dist/bundle/chunks/chunk-IVTIGXSE.js +11 -0
- package/dist/bundle/chunks/chunk-IXPY5PYY.js +13 -0
- package/dist/bundle/chunks/chunk-J2BTXVXN.js +6 -0
- package/dist/bundle/chunks/chunk-J2GAF4HH.js +15 -0
- package/dist/bundle/chunks/chunk-JJXSCNTG.js +5 -0
- package/dist/bundle/chunks/chunk-JZLKE4XX.js +23 -0
- package/dist/bundle/chunks/chunk-KL7SL7ES.js +1 -0
- package/dist/bundle/chunks/chunk-KLSVVM53.js +6 -0
- package/dist/bundle/chunks/chunk-KMDWD5I5.js +8 -0
- package/dist/bundle/chunks/chunk-KMFEA7OG.js +2 -0
- package/dist/bundle/chunks/chunk-KXZALX7Z.js +7 -0
- package/dist/bundle/chunks/chunk-MQY52TBM.js +7 -0
- package/dist/bundle/chunks/chunk-N552BMHP.js +1 -0
- package/dist/bundle/chunks/chunk-NCNBSBGV.js +286 -0
- package/dist/bundle/chunks/chunk-OBYDR4XV.js +4 -0
- package/dist/bundle/chunks/chunk-OGUNWUEY.js +17 -0
- package/dist/bundle/chunks/chunk-ORNEVHL4.js +99 -0
- package/dist/bundle/chunks/chunk-P3THD7GM.js +6 -0
- package/dist/bundle/chunks/chunk-PEEBONF2.js +2 -0
- package/dist/bundle/chunks/chunk-PMGKXEU7.js +13 -0
- package/dist/bundle/chunks/chunk-PVCFRKJJ.js +13 -0
- package/dist/bundle/chunks/chunk-QFO6LPNQ.js +7 -0
- package/dist/bundle/chunks/chunk-QMUDG3KU.js +12 -0
- package/dist/bundle/chunks/chunk-QWZOR6OX.js +5 -0
- package/dist/bundle/chunks/chunk-R42D4RK2.js +15 -0
- package/dist/bundle/chunks/chunk-S6UKQQAB.js +79 -0
- package/dist/bundle/chunks/chunk-SRQ7BXVR.js +1 -0
- package/dist/bundle/chunks/chunk-SXA5BV42.js +20 -0
- package/dist/bundle/chunks/chunk-TL7ILCBE.js +6 -0
- package/dist/bundle/chunks/chunk-TMW4OG4N.js +6 -0
- package/dist/bundle/chunks/chunk-UPLN3OMW.js +11 -0
- package/dist/bundle/chunks/chunk-UPUUONKD.js +6 -0
- package/dist/bundle/chunks/chunk-USPQ6LOW.js +10 -0
- package/dist/bundle/chunks/chunk-UY2R54E5.js +8 -0
- package/dist/bundle/chunks/chunk-V6WGFVZA.js +6 -0
- package/dist/bundle/chunks/chunk-VAEB4OUK.js +1 -0
- package/dist/bundle/chunks/chunk-VEE747JZ.js +6 -0
- package/dist/bundle/chunks/chunk-WBPZNWSY.js +35 -0
- package/dist/bundle/chunks/chunk-WPPIJX5K.js +22 -0
- package/dist/bundle/chunks/chunk-X7M472ST.js +32 -0
- package/dist/bundle/chunks/chunk-XAYT3L2B.js +1 -0
- package/dist/bundle/chunks/chunk-XCI3COKM.js +12 -0
- package/dist/bundle/chunks/chunk-XDY76TEA.js +19 -0
- package/dist/bundle/chunks/chunk-XEKBP4I4.js +62 -0
- package/dist/bundle/chunks/chunk-XGMYS2QC.js +3 -0
- package/dist/bundle/chunks/chunk-YIIBJSJS.js +11 -0
- package/dist/bundle/chunks/chunk-YMPJSDL2.js +7 -0
- package/dist/bundle/chunks/chunk-YU2FN4NA.js +8 -0
- package/dist/bundle/chunks/chunk-YZSDCIXP.js +9 -0
- package/dist/bundle/chunks/chunk-ZLBJV2VD.js +1 -0
- package/dist/bundle/chunks/clear-J6WBUIX6.js +1 -0
- package/dist/bundle/chunks/column-N7MHP5SX.js +1 -0
- package/dist/bundle/chunks/comm-X7VETT2U.js +1 -0
- package/dist/bundle/chunks/cp-73PGBEPL.js +1 -0
- package/dist/bundle/chunks/curl-MGBYKD7U.js +25 -0
- package/dist/bundle/chunks/cut-7I6UA67F.js +1 -0
- package/dist/bundle/chunks/date-MOZRIQXR.js +1 -0
- package/dist/bundle/chunks/diff-O5NFSBS5.js +1 -0
- package/dist/bundle/chunks/dirname-2TM4IG7K.js +1 -0
- package/dist/bundle/chunks/du-KTUJVIGD.js +1 -0
- package/dist/bundle/chunks/echo-PC3TVS6B.js +1 -0
- package/dist/bundle/chunks/env-MFQH47JH.js +1 -0
- package/dist/bundle/chunks/expand-OYPZZOZC.js +1 -0
- package/dist/bundle/chunks/expansion-QM4WQBBG.js +1 -0
- package/dist/bundle/chunks/expr-4PIUWNB7.js +1 -0
- package/dist/bundle/chunks/file-DZRW6GNH.js +1 -0
- package/dist/bundle/chunks/find-DESNHKKS.js +1 -0
- package/dist/bundle/chunks/flag-coverage-QMBN7WOW.js +1 -0
- package/dist/bundle/chunks/fold-5VRJN4CL.js +1 -0
- package/dist/bundle/chunks/grep-7RC5DPOS.js +1 -0
- package/dist/bundle/chunks/gzip-WH2JWAWT.js +1 -0
- package/dist/bundle/chunks/head-EFRLGDOE.js +1 -0
- package/dist/bundle/chunks/help-3XYFOR43.js +1 -0
- package/dist/bundle/chunks/history-J3C24VIU.js +1 -0
- package/dist/bundle/chunks/hostname-D54LLZ5I.js +1 -0
- package/dist/bundle/chunks/html-to-markdown-TFBDHAZZ.js +1 -0
- package/dist/bundle/chunks/join-36QXZEGR.js +1 -0
- package/dist/bundle/chunks/jq-5KN27BBY.js +1 -0
- package/dist/bundle/chunks/ln-SHI7B5FY.js +1 -0
- package/dist/bundle/chunks/ls-7JNJXADY.js +1 -0
- package/dist/bundle/chunks/md5sum-J7XPNTQZ.js +1 -0
- package/dist/bundle/chunks/mkdir-NM4BUUUC.js +1 -0
- package/dist/bundle/chunks/mv-VDGF4VTT.js +1 -0
- package/dist/bundle/chunks/nl-PD7BPFUB.js +1 -0
- package/dist/bundle/chunks/od-D6RO3GJE.js +1 -0
- package/dist/bundle/chunks/paste-HD4NKO4X.js +1 -0
- package/dist/bundle/chunks/printf-6XMXHDAE.js +1 -0
- package/dist/bundle/chunks/pwd-KKLARPNT.js +1 -0
- package/dist/bundle/chunks/python3-KPG6SQQV.js +13 -0
- package/dist/bundle/chunks/readlink-6XCFQQJH.js +1 -0
- package/dist/bundle/chunks/rev-NJ2ZPNAT.js +1 -0
- package/dist/bundle/chunks/rg-NIW2Q5SV.js +1 -0
- package/dist/bundle/chunks/rm-7ERREV4V.js +1 -0
- package/dist/bundle/chunks/rmdir-Z4ZRV32S.js +1 -0
- package/dist/bundle/chunks/sed-VLSHT4XR.js +1 -0
- package/dist/bundle/chunks/seq-RCBD3IYO.js +1 -0
- package/dist/bundle/chunks/sha1sum-RMRQ75AE.js +1 -0
- package/dist/bundle/chunks/sha256sum-TGW5BMJR.js +1 -0
- package/dist/bundle/chunks/sleep-SAQIXUFW.js +1 -0
- package/dist/bundle/chunks/sort-KCG2A34N.js +1 -0
- package/dist/bundle/chunks/split-EVSSQ6VR.js +1 -0
- package/dist/bundle/chunks/sqlite3-M6BXLMYI.js +1 -0
- package/dist/bundle/chunks/stat-Z22X56GM.js +1 -0
- package/dist/bundle/chunks/strings-EKWOLUFJ.js +1 -0
- package/dist/bundle/chunks/tac-RSIVIUEI.js +1 -0
- package/dist/bundle/chunks/tail-TULUAGKH.js +1 -0
- package/dist/bundle/chunks/tar-KQPQPRTZ.js +1 -0
- package/dist/bundle/chunks/tee-DPV6AVMH.js +1 -0
- package/dist/bundle/chunks/time-RXWT5RNC.js +1 -0
- package/dist/bundle/chunks/timeout-YRSN3MWF.js +1 -0
- package/dist/bundle/chunks/touch-PC42E2OS.js +1 -0
- package/dist/bundle/chunks/tr-F7JZV44S.js +1 -0
- package/dist/bundle/chunks/tree-SVRMFKLQ.js +1 -0
- package/dist/bundle/chunks/true-T4XKISHJ.js +1 -0
- package/dist/bundle/chunks/unexpand-KAIAW5TX.js +1 -0
- package/dist/bundle/chunks/uniq-7HD4DCMD.js +1 -0
- package/dist/bundle/chunks/wc-U424DF7O.js +1 -0
- package/dist/bundle/chunks/which-OY73BBGP.js +1 -0
- package/dist/bundle/chunks/whoami-KUZQQOVR.js +1 -0
- package/dist/bundle/chunks/xan-N66EXZFT.js +1 -0
- package/dist/bundle/chunks/xan-view-RLM3746X.js +1 -0
- package/dist/bundle/chunks/xargs-SWPLSROG.js +1 -0
- package/dist/bundle/chunks/yes-5BWAW2VY.js +1 -0
- package/dist/bundle/chunks/yq-URX6MHLP.js +1 -0
- package/dist/bundle/index.js +313 -296
- package/dist/index.d.ts +4 -0
- package/dist/interpreter/builtins/break.d.ts +1 -1
- package/dist/interpreter/builtins/continue.d.ts +1 -1
- package/dist/interpreter/builtins/exit.d.ts +1 -1
- package/dist/interpreter/builtins/index.d.ts +3 -0
- package/dist/interpreter/builtins/jobs.d.ts +5 -0
- package/dist/interpreter/builtins/kill.d.ts +3 -0
- package/dist/interpreter/builtins/set.d.ts +1 -1
- package/dist/interpreter/builtins/shift.d.ts +1 -1
- package/dist/interpreter/builtins/wait.d.ts +3 -0
- package/dist/interpreter/errors.d.ts +45 -26
- package/dist/interpreter/functions.d.ts +1 -1
- package/dist/interpreter/helpers/condition.d.ts +1 -1
- package/dist/interpreter/helpers/loop.d.ts +1 -6
- package/dist/interpreter/helpers/readonly.d.ts +1 -1
- package/dist/interpreter/helpers/result.d.ts +1 -1
- package/dist/interpreter/helpers/statements.d.ts +2 -5
- package/dist/interpreter/index.d.ts +1 -1
- package/dist/interpreter/interpreter.d.ts +12 -2
- package/dist/interpreter/output-channels.d.ts +50 -0
- package/dist/interpreter/redirect-channels.d.ts +34 -0
- package/dist/interpreter/redirections.d.ts +22 -27
- package/dist/interpreter/types.d.ts +20 -6
- package/dist/limits.d.ts +2 -0
- package/dist/process/process-table.d.ts +92 -0
- package/dist/sandbox/Command.d.ts +15 -2
- package/dist/sandbox/Sandbox.d.ts +5 -0
- package/dist/types.d.ts +13 -1
- package/dist/utils/abort.d.ts +12 -0
- package/dist/utils/stream.d.ts +5 -0
- package/package.json +2 -1
- package/dist/bin/chunks/alias-VEEWI66Q.js +0 -2
- package/dist/bin/chunks/awk2-LEBSBFO3.js +0 -2
- package/dist/bin/chunks/base64-Q2G4GF6R.js +0 -2
- package/dist/bin/chunks/basename-TNVKQHP5.js +0 -2
- package/dist/bin/chunks/bash-E26LCUON.js +0 -2
- package/dist/bin/chunks/cat-6WUYWK6Q.js +0 -2
- package/dist/bin/chunks/chmod-YHG2ADMJ.js +0 -2
- package/dist/bin/chunks/chunk-25DBXZPM.js +0 -100
- package/dist/bin/chunks/chunk-272ZYGP4.js +0 -8
- package/dist/bin/chunks/chunk-2KW5JZDM.js +0 -2
- package/dist/bin/chunks/chunk-33EFJFXL.js +0 -10
- package/dist/bin/chunks/chunk-3CCRFBBL.js +0 -23
- package/dist/bin/chunks/chunk-3OP7VRO7.js +0 -6
- package/dist/bin/chunks/chunk-3PIWDQZL.js +0 -19
- package/dist/bin/chunks/chunk-4C26CCJR.js +0 -4
- package/dist/bin/chunks/chunk-4G37X3GZ.js +0 -14
- package/dist/bin/chunks/chunk-4KTWLZ5A.js +0 -8
- package/dist/bin/chunks/chunk-55N7NX6G.js +0 -9
- package/dist/bin/chunks/chunk-5OQOWWIB.js +0 -7
- package/dist/bin/chunks/chunk-5WAR3CU3.js +0 -3
- package/dist/bin/chunks/chunk-63VB22X2.js +0 -33
- package/dist/bin/chunks/chunk-6KVPD5H7.js +0 -13
- package/dist/bin/chunks/chunk-6OVV6A5W.js +0 -3
- package/dist/bin/chunks/chunk-6PU2WD4P.js +0 -7
- package/dist/bin/chunks/chunk-7ICAP454.js +0 -12
- package/dist/bin/chunks/chunk-7QKMCOGE.js +0 -16
- package/dist/bin/chunks/chunk-7SXBGUE4.js +0 -3
- package/dist/bin/chunks/chunk-7VQY35S5.js +0 -8
- package/dist/bin/chunks/chunk-7VVTANT2.js +0 -7
- package/dist/bin/chunks/chunk-7XV5FI5D.js +0 -8
- package/dist/bin/chunks/chunk-7Y5TZ5CE.js +0 -6
- package/dist/bin/chunks/chunk-A2V4EW6Y.js +0 -10
- package/dist/bin/chunks/chunk-ACV764YE.js +0 -5
- package/dist/bin/chunks/chunk-AJBYK52Q.js +0 -36
- package/dist/bin/chunks/chunk-BCE7PDXY.js +0 -32
- package/dist/bin/chunks/chunk-BVWBX3A2.js +0 -9
- package/dist/bin/chunks/chunk-COBNN6FR.js +0 -11
- package/dist/bin/chunks/chunk-CVXSPZVY.js +0 -2
- package/dist/bin/chunks/chunk-CX7XUPMH.js +0 -13
- package/dist/bin/chunks/chunk-D2V2UKR2.js +0 -12
- package/dist/bin/chunks/chunk-DD4R5YY7.js +0 -7
- package/dist/bin/chunks/chunk-DN7JDLUW.js +0 -26
- package/dist/bin/chunks/chunk-DVODFXEH.js +0 -5
- package/dist/bin/chunks/chunk-EC57ABPL.js +0 -9
- package/dist/bin/chunks/chunk-F7RPLNVE.js +0 -11
- package/dist/bin/chunks/chunk-FEA5SLRN.js +0 -6
- package/dist/bin/chunks/chunk-FJTEZ7ZL.js +0 -9
- package/dist/bin/chunks/chunk-FO6UO5LY.js +0 -12
- package/dist/bin/chunks/chunk-FYKWQWLG.js +0 -9
- package/dist/bin/chunks/chunk-GETENI3B.js +0 -18
- package/dist/bin/chunks/chunk-GTLVINNE.js +0 -4
- package/dist/bin/chunks/chunk-H7WPPRUD.js +0 -2
- package/dist/bin/chunks/chunk-HHBZ7ZEV.js +0 -5
- package/dist/bin/chunks/chunk-IGPJA6SA.js +0 -17
- package/dist/bin/chunks/chunk-J7REVEWS.js +0 -14
- package/dist/bin/chunks/chunk-JHKFD4EI.js +0 -24
- package/dist/bin/chunks/chunk-JUQT3ZM5.js +0 -23
- package/dist/bin/chunks/chunk-LXRRE42A.js +0 -5
- package/dist/bin/chunks/chunk-LYTEJIUW.js +0 -14
- package/dist/bin/chunks/chunk-MFXVUOM3.js +0 -2
- package/dist/bin/chunks/chunk-N3IFSXB3.js +0 -8
- package/dist/bin/chunks/chunk-NHZGQ3Y7.js +0 -84
- package/dist/bin/chunks/chunk-NIBKZJZM.js +0 -3
- package/dist/bin/chunks/chunk-NJTMAMPV.js +0 -3
- package/dist/bin/chunks/chunk-NQSOOEX5.js +0 -20
- package/dist/bin/chunks/chunk-NVK6GU4P.js +0 -3
- package/dist/bin/chunks/chunk-O4WYCXT4.js +0 -2
- package/dist/bin/chunks/chunk-OJGWI2DA.js +0 -63
- package/dist/bin/chunks/chunk-OXIM6UEO.js +0 -11
- package/dist/bin/chunks/chunk-PLF6WISW.js +0 -10
- package/dist/bin/chunks/chunk-PVAWMOD4.js +0 -8
- package/dist/bin/chunks/chunk-PXK4KVSW.js +0 -73
- package/dist/bin/chunks/chunk-Q2EFJFW4.js +0 -2
- package/dist/bin/chunks/chunk-Q5UK2Q5U.js +0 -2
- package/dist/bin/chunks/chunk-Q7XQB3YI.js +0 -7
- package/dist/bin/chunks/chunk-RXYSXOZE.js +0 -287
- package/dist/bin/chunks/chunk-SUC7ET2R.js +0 -14
- package/dist/bin/chunks/chunk-SXGBKAL5.js +0 -16
- package/dist/bin/chunks/chunk-T26GDTOU.js +0 -3
- package/dist/bin/chunks/chunk-T67GIEZU.js +0 -2
- package/dist/bin/chunks/chunk-TC7RJRFD.js +0 -16
- package/dist/bin/chunks/chunk-TWWOPYOU.js +0 -5
- package/dist/bin/chunks/chunk-UDJ6HRS4.js +0 -9
- package/dist/bin/chunks/chunk-UQXDPK2T.js +0 -7
- package/dist/bin/chunks/chunk-UREODEQQ.js +0 -21
- package/dist/bin/chunks/chunk-VDS4FNGM.js +0 -7
- package/dist/bin/chunks/chunk-VKE6V3ZO.js +0 -7
- package/dist/bin/chunks/chunk-VTQCQCQO.js +0 -140
- package/dist/bin/chunks/chunk-W4YU2U3A.js +0 -13
- package/dist/bin/chunks/chunk-X4GHJ5JH.js +0 -6
- package/dist/bin/chunks/chunk-XBI3O5AF.js +0 -9
- package/dist/bin/chunks/chunk-XNMKTUHV.js +0 -6
- package/dist/bin/chunks/chunk-ZTU6ENBH.js +0 -2
- package/dist/bin/chunks/chunk-ZVROZHDE.js +0 -5
- package/dist/bin/chunks/clear-Z6NC6SU4.js +0 -2
- package/dist/bin/chunks/column-UMVTEOKJ.js +0 -2
- package/dist/bin/chunks/comm-Q4W6PSZ3.js +0 -2
- package/dist/bin/chunks/cp-CAN7P3HK.js +0 -2
- package/dist/bin/chunks/curl-3PDMZXZI.js +0 -26
- package/dist/bin/chunks/cut-BQM2BHFI.js +0 -2
- package/dist/bin/chunks/date-XUF36E35.js +0 -2
- package/dist/bin/chunks/diff-7GMSJUJG.js +0 -2
- package/dist/bin/chunks/dirname-F7P24OLR.js +0 -2
- package/dist/bin/chunks/du-HDXNSQIT.js +0 -2
- package/dist/bin/chunks/echo-53OGHYIZ.js +0 -2
- package/dist/bin/chunks/env-N4LYWUJ6.js +0 -2
- package/dist/bin/chunks/expand-535WDY3S.js +0 -2
- package/dist/bin/chunks/expansion-GOJYNUQR.js +0 -2
- package/dist/bin/chunks/expr-Q7K5RKW2.js +0 -2
- package/dist/bin/chunks/file-XMHYEYO5.js +0 -2
- package/dist/bin/chunks/find-SJAABILU.js +0 -2
- package/dist/bin/chunks/flag-coverage-TBMB7M2N.js +0 -2
- package/dist/bin/chunks/fold-MAXEXDKA.js +0 -2
- package/dist/bin/chunks/grep-NXW3ZS2T.js +0 -2
- package/dist/bin/chunks/gzip-4TZR4OHX.js +0 -2
- package/dist/bin/chunks/head-BCMKSPGP.js +0 -2
- package/dist/bin/chunks/help-27WXVVW7.js +0 -2
- package/dist/bin/chunks/history-T6LTHEYW.js +0 -2
- package/dist/bin/chunks/hostname-QJD6DLJM.js +0 -2
- package/dist/bin/chunks/html-to-markdown-V7M7ZTGL.js +0 -2
- package/dist/bin/chunks/join-PWZ5VYJD.js +0 -2
- package/dist/bin/chunks/jq-XOCFM26Q.js +0 -2
- package/dist/bin/chunks/ln-X4VQOGPC.js +0 -2
- package/dist/bin/chunks/ls-O4UJCH3R.js +0 -2
- package/dist/bin/chunks/md5sum-2TRYEYPO.js +0 -2
- package/dist/bin/chunks/mkdir-Z65Y7YPB.js +0 -2
- package/dist/bin/chunks/mv-UULWKEXQ.js +0 -2
- package/dist/bin/chunks/nl-SIHFBFWW.js +0 -2
- package/dist/bin/chunks/od-YQTILXPI.js +0 -2
- package/dist/bin/chunks/paste-JA7SPT5I.js +0 -2
- package/dist/bin/chunks/printf-U3BAFNQW.js +0 -2
- package/dist/bin/chunks/pwd-JNTHRUS7.js +0 -2
- package/dist/bin/chunks/python3-BQAB3G6R.js +0 -14
- package/dist/bin/chunks/readlink-KGURBO5B.js +0 -2
- package/dist/bin/chunks/rev-TGHAXMHE.js +0 -2
- package/dist/bin/chunks/rg-PCNNZYUZ.js +0 -2
- package/dist/bin/chunks/rm-6BNEQYJH.js +0 -2
- package/dist/bin/chunks/rmdir-7PTJOZ3J.js +0 -2
- package/dist/bin/chunks/sed-IBSHYX2R.js +0 -2
- package/dist/bin/chunks/seq-WPCW5LYK.js +0 -2
- package/dist/bin/chunks/sha1sum-LHZ223LR.js +0 -2
- package/dist/bin/chunks/sha256sum-BFG6UGEY.js +0 -2
- package/dist/bin/chunks/sleep-HI2AX63U.js +0 -2
- package/dist/bin/chunks/sort-KLSRAA3S.js +0 -2
- package/dist/bin/chunks/split-OXHHEEHV.js +0 -2
- package/dist/bin/chunks/sqlite3-AKDJPDT5.js +0 -2
- package/dist/bin/chunks/stat-T6DAFOAE.js +0 -2
- package/dist/bin/chunks/strings-4AJIU4EW.js +0 -2
- package/dist/bin/chunks/tac-4GAH3XJY.js +0 -2
- package/dist/bin/chunks/tail-G2U2PW6H.js +0 -2
- package/dist/bin/chunks/tar-FYLHDP55.js +0 -2
- package/dist/bin/chunks/tee-T572YIXT.js +0 -2
- package/dist/bin/chunks/time-XSLSFXAR.js +0 -2
- package/dist/bin/chunks/timeout-ZPMBHNEN.js +0 -2
- package/dist/bin/chunks/touch-PKHKB4B2.js +0 -2
- package/dist/bin/chunks/tr-T7NEIDU6.js +0 -2
- package/dist/bin/chunks/tree-K2GININJ.js +0 -2
- package/dist/bin/chunks/true-JKHT73F3.js +0 -2
- package/dist/bin/chunks/unexpand-OAFTIEDP.js +0 -2
- package/dist/bin/chunks/uniq-2HGY5ABO.js +0 -2
- package/dist/bin/chunks/wc-ZTIOZ2H6.js +0 -2
- package/dist/bin/chunks/which-AHZHM3GH.js +0 -2
- package/dist/bin/chunks/whoami-IM7KVJBM.js +0 -2
- package/dist/bin/chunks/xan-EEBMX2PC.js +0 -2
- package/dist/bin/chunks/xan-view-Z7GM75UK.js +0 -2
- package/dist/bin/chunks/xargs-QPWVMTQK.js +0 -2
- package/dist/bin/chunks/yes-CK5F4N34.js +0 -2
- package/dist/bin/chunks/yq-R26WXE6W.js +0 -2
- package/dist/bin/shell/chunks/alias-VEEWI66Q.js +0 -2
- package/dist/bin/shell/chunks/awk2-LEBSBFO3.js +0 -2
- package/dist/bin/shell/chunks/base64-Q2G4GF6R.js +0 -2
- package/dist/bin/shell/chunks/basename-TNVKQHP5.js +0 -2
- package/dist/bin/shell/chunks/bash-E26LCUON.js +0 -2
- package/dist/bin/shell/chunks/cat-6WUYWK6Q.js +0 -2
- package/dist/bin/shell/chunks/chmod-YHG2ADMJ.js +0 -2
- package/dist/bin/shell/chunks/chunk-25DBXZPM.js +0 -100
- package/dist/bin/shell/chunks/chunk-272ZYGP4.js +0 -8
- package/dist/bin/shell/chunks/chunk-2KW5JZDM.js +0 -2
- package/dist/bin/shell/chunks/chunk-33EFJFXL.js +0 -10
- package/dist/bin/shell/chunks/chunk-3CCRFBBL.js +0 -23
- package/dist/bin/shell/chunks/chunk-3OP7VRO7.js +0 -6
- package/dist/bin/shell/chunks/chunk-3PIWDQZL.js +0 -19
- package/dist/bin/shell/chunks/chunk-4C26CCJR.js +0 -4
- package/dist/bin/shell/chunks/chunk-4G37X3GZ.js +0 -14
- package/dist/bin/shell/chunks/chunk-4KTWLZ5A.js +0 -8
- package/dist/bin/shell/chunks/chunk-55N7NX6G.js +0 -9
- package/dist/bin/shell/chunks/chunk-5OQOWWIB.js +0 -7
- package/dist/bin/shell/chunks/chunk-5WAR3CU3.js +0 -3
- package/dist/bin/shell/chunks/chunk-63VB22X2.js +0 -33
- package/dist/bin/shell/chunks/chunk-6KVPD5H7.js +0 -13
- package/dist/bin/shell/chunks/chunk-6OVV6A5W.js +0 -3
- package/dist/bin/shell/chunks/chunk-6PU2WD4P.js +0 -7
- package/dist/bin/shell/chunks/chunk-7ICAP454.js +0 -12
- package/dist/bin/shell/chunks/chunk-7QKMCOGE.js +0 -16
- package/dist/bin/shell/chunks/chunk-7SXBGUE4.js +0 -3
- package/dist/bin/shell/chunks/chunk-7VQY35S5.js +0 -8
- package/dist/bin/shell/chunks/chunk-7VVTANT2.js +0 -7
- package/dist/bin/shell/chunks/chunk-7XV5FI5D.js +0 -8
- package/dist/bin/shell/chunks/chunk-7Y5TZ5CE.js +0 -6
- package/dist/bin/shell/chunks/chunk-A2V4EW6Y.js +0 -10
- package/dist/bin/shell/chunks/chunk-ACV764YE.js +0 -5
- package/dist/bin/shell/chunks/chunk-AJBYK52Q.js +0 -36
- package/dist/bin/shell/chunks/chunk-BCE7PDXY.js +0 -32
- package/dist/bin/shell/chunks/chunk-BVWBX3A2.js +0 -9
- package/dist/bin/shell/chunks/chunk-COBNN6FR.js +0 -11
- package/dist/bin/shell/chunks/chunk-CVXSPZVY.js +0 -2
- package/dist/bin/shell/chunks/chunk-CX7XUPMH.js +0 -13
- package/dist/bin/shell/chunks/chunk-D2V2UKR2.js +0 -12
- package/dist/bin/shell/chunks/chunk-DD4R5YY7.js +0 -7
- package/dist/bin/shell/chunks/chunk-DN7JDLUW.js +0 -26
- package/dist/bin/shell/chunks/chunk-DVODFXEH.js +0 -5
- package/dist/bin/shell/chunks/chunk-EC57ABPL.js +0 -9
- package/dist/bin/shell/chunks/chunk-F7RPLNVE.js +0 -11
- package/dist/bin/shell/chunks/chunk-FEA5SLRN.js +0 -6
- package/dist/bin/shell/chunks/chunk-FJTEZ7ZL.js +0 -9
- package/dist/bin/shell/chunks/chunk-FO6UO5LY.js +0 -12
- package/dist/bin/shell/chunks/chunk-FYKWQWLG.js +0 -9
- package/dist/bin/shell/chunks/chunk-GETENI3B.js +0 -18
- package/dist/bin/shell/chunks/chunk-GTLVINNE.js +0 -4
- package/dist/bin/shell/chunks/chunk-H7WPPRUD.js +0 -2
- package/dist/bin/shell/chunks/chunk-HHBZ7ZEV.js +0 -5
- package/dist/bin/shell/chunks/chunk-IGPJA6SA.js +0 -17
- package/dist/bin/shell/chunks/chunk-J7REVEWS.js +0 -14
- package/dist/bin/shell/chunks/chunk-JHKFD4EI.js +0 -24
- package/dist/bin/shell/chunks/chunk-JUQT3ZM5.js +0 -23
- package/dist/bin/shell/chunks/chunk-LXRRE42A.js +0 -5
- package/dist/bin/shell/chunks/chunk-LYTEJIUW.js +0 -14
- package/dist/bin/shell/chunks/chunk-MFXVUOM3.js +0 -2
- package/dist/bin/shell/chunks/chunk-N3IFSXB3.js +0 -8
- package/dist/bin/shell/chunks/chunk-NHZGQ3Y7.js +0 -84
- package/dist/bin/shell/chunks/chunk-NIBKZJZM.js +0 -3
- package/dist/bin/shell/chunks/chunk-NJTMAMPV.js +0 -3
- package/dist/bin/shell/chunks/chunk-NQSOOEX5.js +0 -20
- package/dist/bin/shell/chunks/chunk-NVK6GU4P.js +0 -3
- package/dist/bin/shell/chunks/chunk-O4WYCXT4.js +0 -2
- package/dist/bin/shell/chunks/chunk-OJGWI2DA.js +0 -63
- package/dist/bin/shell/chunks/chunk-OXIM6UEO.js +0 -11
- package/dist/bin/shell/chunks/chunk-PLF6WISW.js +0 -10
- package/dist/bin/shell/chunks/chunk-PVAWMOD4.js +0 -8
- package/dist/bin/shell/chunks/chunk-PXK4KVSW.js +0 -73
- package/dist/bin/shell/chunks/chunk-Q2EFJFW4.js +0 -2
- package/dist/bin/shell/chunks/chunk-Q5UK2Q5U.js +0 -2
- package/dist/bin/shell/chunks/chunk-Q7XQB3YI.js +0 -7
- package/dist/bin/shell/chunks/chunk-RXYSXOZE.js +0 -287
- package/dist/bin/shell/chunks/chunk-SUC7ET2R.js +0 -14
- package/dist/bin/shell/chunks/chunk-SXGBKAL5.js +0 -16
- package/dist/bin/shell/chunks/chunk-T26GDTOU.js +0 -3
- package/dist/bin/shell/chunks/chunk-T67GIEZU.js +0 -2
- package/dist/bin/shell/chunks/chunk-TC7RJRFD.js +0 -16
- package/dist/bin/shell/chunks/chunk-TWWOPYOU.js +0 -5
- package/dist/bin/shell/chunks/chunk-UDJ6HRS4.js +0 -9
- package/dist/bin/shell/chunks/chunk-UQXDPK2T.js +0 -7
- package/dist/bin/shell/chunks/chunk-UREODEQQ.js +0 -21
- package/dist/bin/shell/chunks/chunk-VDS4FNGM.js +0 -7
- package/dist/bin/shell/chunks/chunk-VKE6V3ZO.js +0 -7
- package/dist/bin/shell/chunks/chunk-VTQCQCQO.js +0 -140
- package/dist/bin/shell/chunks/chunk-W4YU2U3A.js +0 -13
- package/dist/bin/shell/chunks/chunk-X4GHJ5JH.js +0 -6
- package/dist/bin/shell/chunks/chunk-XBI3O5AF.js +0 -9
- package/dist/bin/shell/chunks/chunk-XNMKTUHV.js +0 -6
- package/dist/bin/shell/chunks/chunk-ZTU6ENBH.js +0 -2
- package/dist/bin/shell/chunks/chunk-ZVROZHDE.js +0 -5
- package/dist/bin/shell/chunks/clear-Z6NC6SU4.js +0 -2
- package/dist/bin/shell/chunks/column-UMVTEOKJ.js +0 -2
- package/dist/bin/shell/chunks/comm-Q4W6PSZ3.js +0 -2
- package/dist/bin/shell/chunks/cp-CAN7P3HK.js +0 -2
- package/dist/bin/shell/chunks/curl-3PDMZXZI.js +0 -26
- package/dist/bin/shell/chunks/cut-BQM2BHFI.js +0 -2
- package/dist/bin/shell/chunks/date-XUF36E35.js +0 -2
- package/dist/bin/shell/chunks/diff-7GMSJUJG.js +0 -2
- package/dist/bin/shell/chunks/dirname-F7P24OLR.js +0 -2
- package/dist/bin/shell/chunks/du-HDXNSQIT.js +0 -2
- package/dist/bin/shell/chunks/echo-53OGHYIZ.js +0 -2
- package/dist/bin/shell/chunks/env-N4LYWUJ6.js +0 -2
- package/dist/bin/shell/chunks/expand-535WDY3S.js +0 -2
- package/dist/bin/shell/chunks/expansion-GOJYNUQR.js +0 -2
- package/dist/bin/shell/chunks/expr-Q7K5RKW2.js +0 -2
- package/dist/bin/shell/chunks/file-XMHYEYO5.js +0 -2
- package/dist/bin/shell/chunks/find-SJAABILU.js +0 -2
- package/dist/bin/shell/chunks/flag-coverage-TBMB7M2N.js +0 -2
- package/dist/bin/shell/chunks/fold-MAXEXDKA.js +0 -2
- package/dist/bin/shell/chunks/grep-NXW3ZS2T.js +0 -2
- package/dist/bin/shell/chunks/gzip-4TZR4OHX.js +0 -2
- package/dist/bin/shell/chunks/head-BCMKSPGP.js +0 -2
- package/dist/bin/shell/chunks/help-27WXVVW7.js +0 -2
- package/dist/bin/shell/chunks/history-T6LTHEYW.js +0 -2
- package/dist/bin/shell/chunks/hostname-QJD6DLJM.js +0 -2
- package/dist/bin/shell/chunks/html-to-markdown-V7M7ZTGL.js +0 -2
- package/dist/bin/shell/chunks/join-PWZ5VYJD.js +0 -2
- package/dist/bin/shell/chunks/jq-XOCFM26Q.js +0 -2
- package/dist/bin/shell/chunks/ln-X4VQOGPC.js +0 -2
- package/dist/bin/shell/chunks/ls-O4UJCH3R.js +0 -2
- package/dist/bin/shell/chunks/md5sum-2TRYEYPO.js +0 -2
- package/dist/bin/shell/chunks/mkdir-Z65Y7YPB.js +0 -2
- package/dist/bin/shell/chunks/mv-UULWKEXQ.js +0 -2
- package/dist/bin/shell/chunks/nl-SIHFBFWW.js +0 -2
- package/dist/bin/shell/chunks/od-YQTILXPI.js +0 -2
- package/dist/bin/shell/chunks/paste-JA7SPT5I.js +0 -2
- package/dist/bin/shell/chunks/printf-U3BAFNQW.js +0 -2
- package/dist/bin/shell/chunks/pwd-JNTHRUS7.js +0 -2
- package/dist/bin/shell/chunks/python3-BQAB3G6R.js +0 -14
- package/dist/bin/shell/chunks/readlink-KGURBO5B.js +0 -2
- package/dist/bin/shell/chunks/rev-TGHAXMHE.js +0 -2
- package/dist/bin/shell/chunks/rg-PCNNZYUZ.js +0 -2
- package/dist/bin/shell/chunks/rm-6BNEQYJH.js +0 -2
- package/dist/bin/shell/chunks/rmdir-7PTJOZ3J.js +0 -2
- package/dist/bin/shell/chunks/sed-IBSHYX2R.js +0 -2
- package/dist/bin/shell/chunks/seq-WPCW5LYK.js +0 -2
- package/dist/bin/shell/chunks/sha1sum-LHZ223LR.js +0 -2
- package/dist/bin/shell/chunks/sha256sum-BFG6UGEY.js +0 -2
- package/dist/bin/shell/chunks/sleep-HI2AX63U.js +0 -2
- package/dist/bin/shell/chunks/sort-KLSRAA3S.js +0 -2
- package/dist/bin/shell/chunks/split-OXHHEEHV.js +0 -2
- package/dist/bin/shell/chunks/sqlite3-AKDJPDT5.js +0 -2
- package/dist/bin/shell/chunks/stat-T6DAFOAE.js +0 -2
- package/dist/bin/shell/chunks/strings-4AJIU4EW.js +0 -2
- package/dist/bin/shell/chunks/tac-4GAH3XJY.js +0 -2
- package/dist/bin/shell/chunks/tail-G2U2PW6H.js +0 -2
- package/dist/bin/shell/chunks/tar-FYLHDP55.js +0 -2
- package/dist/bin/shell/chunks/tee-T572YIXT.js +0 -2
- package/dist/bin/shell/chunks/time-XSLSFXAR.js +0 -2
- package/dist/bin/shell/chunks/timeout-ZPMBHNEN.js +0 -2
- package/dist/bin/shell/chunks/touch-PKHKB4B2.js +0 -2
- package/dist/bin/shell/chunks/tr-T7NEIDU6.js +0 -2
- package/dist/bin/shell/chunks/tree-K2GININJ.js +0 -2
- package/dist/bin/shell/chunks/true-JKHT73F3.js +0 -2
- package/dist/bin/shell/chunks/unexpand-OAFTIEDP.js +0 -2
- package/dist/bin/shell/chunks/uniq-2HGY5ABO.js +0 -2
- package/dist/bin/shell/chunks/wc-ZTIOZ2H6.js +0 -2
- package/dist/bin/shell/chunks/which-AHZHM3GH.js +0 -2
- package/dist/bin/shell/chunks/whoami-IM7KVJBM.js +0 -2
- package/dist/bin/shell/chunks/xan-EEBMX2PC.js +0 -2
- package/dist/bin/shell/chunks/xan-view-Z7GM75UK.js +0 -2
- package/dist/bin/shell/chunks/xargs-QPWVMTQK.js +0 -2
- package/dist/bin/shell/chunks/yes-CK5F4N34.js +0 -2
- package/dist/bin/shell/chunks/yq-R26WXE6W.js +0 -2
- package/dist/bundle/chunks/alias-PFS6JBTL.js +0 -1
- package/dist/bundle/chunks/awk2-HG7QFRRO.js +0 -1
- package/dist/bundle/chunks/base64-UOYRM4DO.js +0 -1
- package/dist/bundle/chunks/basename-PRS2OP6R.js +0 -1
- package/dist/bundle/chunks/bash-UQXFZUPD.js +0 -1
- package/dist/bundle/chunks/cat-VI6AVTST.js +0 -1
- package/dist/bundle/chunks/chmod-5F3XJPPG.js +0 -1
- package/dist/bundle/chunks/chunk-2ERMTDAT.js +0 -1
- package/dist/bundle/chunks/chunk-2KW7BHBP.js +0 -5
- package/dist/bundle/chunks/chunk-2LC6GLRD.js +0 -10
- package/dist/bundle/chunks/chunk-2MWUJW7E.js +0 -13
- package/dist/bundle/chunks/chunk-2U6EPFDM.js +0 -4
- package/dist/bundle/chunks/chunk-4ECLUXYK.js +0 -5
- package/dist/bundle/chunks/chunk-4JZXWCPG.js +0 -2
- package/dist/bundle/chunks/chunk-4R3AYXSH.js +0 -6
- package/dist/bundle/chunks/chunk-4RPVMPGO.js +0 -4
- package/dist/bundle/chunks/chunk-4UNYQEQN.js +0 -6
- package/dist/bundle/chunks/chunk-525AJ4MJ.js +0 -9
- package/dist/bundle/chunks/chunk-54Z5HIDC.js +0 -7
- package/dist/bundle/chunks/chunk-5GE72EGR.js +0 -11
- package/dist/bundle/chunks/chunk-5HZ5BSXK.js +0 -1
- package/dist/bundle/chunks/chunk-5IUZJGTB.js +0 -99
- package/dist/bundle/chunks/chunk-5WPVRWBN.js +0 -12
- package/dist/bundle/chunks/chunk-63X77WZM.js +0 -15
- package/dist/bundle/chunks/chunk-6BNDUHW7.js +0 -72
- package/dist/bundle/chunks/chunk-6V3KZ3UR.js +0 -9
- package/dist/bundle/chunks/chunk-77R5SWIQ.js +0 -10
- package/dist/bundle/chunks/chunk-A6JH2Z2E.js +0 -7
- package/dist/bundle/chunks/chunk-AFZSOIRR.js +0 -1
- package/dist/bundle/chunks/chunk-AYQHTCJ6.js +0 -6
- package/dist/bundle/chunks/chunk-BJQSDFGC.js +0 -139
- package/dist/bundle/chunks/chunk-BOWOEGYM.js +0 -7
- package/dist/bundle/chunks/chunk-BXM5UMV3.js +0 -13
- package/dist/bundle/chunks/chunk-CDJANZJX.js +0 -5
- package/dist/bundle/chunks/chunk-CWN6Z4S3.js +0 -22
- package/dist/bundle/chunks/chunk-DGBRICQ7.js +0 -3
- package/dist/bundle/chunks/chunk-DGCTBS7B.js +0 -13
- package/dist/bundle/chunks/chunk-EBRN7NWX.js +0 -8
- package/dist/bundle/chunks/chunk-EHXIMSVW.js +0 -15
- package/dist/bundle/chunks/chunk-F2PTB6MB.js +0 -5
- package/dist/bundle/chunks/chunk-FTXRTVTE.js +0 -4
- package/dist/bundle/chunks/chunk-GNLJZOAK.js +0 -4
- package/dist/bundle/chunks/chunk-HACWJFGU.js +0 -1
- package/dist/bundle/chunks/chunk-HH6GYTGE.js +0 -13
- package/dist/bundle/chunks/chunk-HHGXJW4R.js +0 -6
- package/dist/bundle/chunks/chunk-HKR53LNA.js +0 -2
- package/dist/bundle/chunks/chunk-HZSJHPS7.js +0 -1
- package/dist/bundle/chunks/chunk-I3XSMOC3.js +0 -12
- package/dist/bundle/chunks/chunk-IYJXP33F.js +0 -1
- package/dist/bundle/chunks/chunk-JKPRCVTG.js +0 -6
- package/dist/bundle/chunks/chunk-K5ZCP6UY.js +0 -62
- package/dist/bundle/chunks/chunk-KMP3F7WZ.js +0 -17
- package/dist/bundle/chunks/chunk-KNKWEAIB.js +0 -4
- package/dist/bundle/chunks/chunk-KNU7V7YY.js +0 -8
- package/dist/bundle/chunks/chunk-KY5NMRVZ.js +0 -4
- package/dist/bundle/chunks/chunk-LHCQ2NLV.js +0 -6
- package/dist/bundle/chunks/chunk-M732FP7L.js +0 -2
- package/dist/bundle/chunks/chunk-MWKKYA7N.js +0 -19
- package/dist/bundle/chunks/chunk-MXTZUALD.js +0 -8
- package/dist/bundle/chunks/chunk-N52SZCYB.js +0 -2
- package/dist/bundle/chunks/chunk-N5W4XZNS.js +0 -32
- package/dist/bundle/chunks/chunk-NFM234IX.js +0 -23
- package/dist/bundle/chunks/chunk-NMWKV3TE.js +0 -9
- package/dist/bundle/chunks/chunk-O3BQP2BR.js +0 -7
- package/dist/bundle/chunks/chunk-ODBLLQG2.js +0 -35
- package/dist/bundle/chunks/chunk-OQWK6IJW.js +0 -1
- package/dist/bundle/chunks/chunk-OR2BZKU5.js +0 -31
- package/dist/bundle/chunks/chunk-OSYWE22E.js +0 -6
- package/dist/bundle/chunks/chunk-PJV5BSDQ.js +0 -8
- package/dist/bundle/chunks/chunk-PUYKMBEQ.js +0 -3
- package/dist/bundle/chunks/chunk-PXCZA2UF.js +0 -2
- package/dist/bundle/chunks/chunk-QDJ7TVPH.js +0 -2
- package/dist/bundle/chunks/chunk-QIE3SEPQ.js +0 -12
- package/dist/bundle/chunks/chunk-QIKTQFYF.js +0 -22
- package/dist/bundle/chunks/chunk-RDRBPOO3.js +0 -4
- package/dist/bundle/chunks/chunk-RO3SVOT2.js +0 -16
- package/dist/bundle/chunks/chunk-RQ7EV7AC.js +0 -7
- package/dist/bundle/chunks/chunk-RTIOH4X2.js +0 -1
- package/dist/bundle/chunks/chunk-RX22KJ4J.js +0 -10
- package/dist/bundle/chunks/chunk-SMDXZHIL.js +0 -8
- package/dist/bundle/chunks/chunk-SVBJBJ5T.js +0 -6
- package/dist/bundle/chunks/chunk-SYMUCSH2.js +0 -5
- package/dist/bundle/chunks/chunk-TPMG4TM3.js +0 -286
- package/dist/bundle/chunks/chunk-TYRM7VD4.js +0 -8
- package/dist/bundle/chunks/chunk-UL3YZMPQ.js +0 -8
- package/dist/bundle/chunks/chunk-V2LCHTLH.js +0 -15
- package/dist/bundle/chunks/chunk-V2U6WR7A.js +0 -11
- package/dist/bundle/chunks/chunk-WLD7KZYW.js +0 -6
- package/dist/bundle/chunks/chunk-WTU2M6ZH.js +0 -1
- package/dist/bundle/chunks/chunk-XG2PXUNT.js +0 -7
- package/dist/bundle/chunks/chunk-XREOVOVJ.js +0 -20
- package/dist/bundle/chunks/chunk-Y33UPDYF.js +0 -23
- package/dist/bundle/chunks/chunk-ZMLEPT2B.js +0 -2
- package/dist/bundle/chunks/chunk-ZVA3RKAH.js +0 -11
- package/dist/bundle/chunks/clear-AQF5Q2LP.js +0 -1
- package/dist/bundle/chunks/column-DTV4DT7Z.js +0 -1
- package/dist/bundle/chunks/comm-XNF4ZFIQ.js +0 -1
- package/dist/bundle/chunks/cp-O5R6UUTB.js +0 -1
- package/dist/bundle/chunks/curl-YF5UPZSP.js +0 -25
- package/dist/bundle/chunks/cut-A6AD4XLN.js +0 -1
- package/dist/bundle/chunks/date-5DATBXSY.js +0 -1
- package/dist/bundle/chunks/diff-4RUNUODF.js +0 -1
- package/dist/bundle/chunks/dirname-UXBVN4ZU.js +0 -1
- package/dist/bundle/chunks/du-URMOHN4N.js +0 -1
- package/dist/bundle/chunks/echo-BU4WS5NB.js +0 -1
- package/dist/bundle/chunks/env-PRCSFHFD.js +0 -1
- package/dist/bundle/chunks/expand-RSU7HJNU.js +0 -1
- package/dist/bundle/chunks/expansion-TBT2U5OQ.js +0 -1
- package/dist/bundle/chunks/expr-WHQ3N3VC.js +0 -1
- package/dist/bundle/chunks/file-OCSDEMRX.js +0 -1
- package/dist/bundle/chunks/find-KQBG3YXR.js +0 -1
- package/dist/bundle/chunks/flag-coverage-ZFQWXDD4.js +0 -1
- package/dist/bundle/chunks/fold-4XHCZTIH.js +0 -1
- package/dist/bundle/chunks/grep-MTDYJMIU.js +0 -1
- package/dist/bundle/chunks/gzip-JISR2QXU.js +0 -1
- package/dist/bundle/chunks/head-25BYUDHC.js +0 -1
- package/dist/bundle/chunks/help-A3QG3UR4.js +0 -1
- package/dist/bundle/chunks/history-GTNR2KMK.js +0 -1
- package/dist/bundle/chunks/hostname-4YOTMKM4.js +0 -1
- package/dist/bundle/chunks/html-to-markdown-3JPCPF2J.js +0 -1
- package/dist/bundle/chunks/join-KEFNDBL6.js +0 -1
- package/dist/bundle/chunks/jq-EBNRPZT5.js +0 -1
- package/dist/bundle/chunks/ln-TBYICXCX.js +0 -1
- package/dist/bundle/chunks/ls-C7B2SA5A.js +0 -1
- package/dist/bundle/chunks/md5sum-2VY2ODII.js +0 -1
- package/dist/bundle/chunks/mkdir-ZLWSOZZZ.js +0 -1
- package/dist/bundle/chunks/mv-VA4VIZE2.js +0 -1
- package/dist/bundle/chunks/nl-VNFLBUHM.js +0 -1
- package/dist/bundle/chunks/od-3KUUCW5I.js +0 -1
- package/dist/bundle/chunks/paste-5WOFHNWA.js +0 -1
- package/dist/bundle/chunks/printf-U3U7M7RB.js +0 -1
- package/dist/bundle/chunks/pwd-QYQ4FLB5.js +0 -1
- package/dist/bundle/chunks/python3-NDB2XLKG.js +0 -13
- package/dist/bundle/chunks/readlink-B3Y2BKAH.js +0 -1
- package/dist/bundle/chunks/rev-ROSGTRA6.js +0 -1
- package/dist/bundle/chunks/rg-F5QIE3YM.js +0 -1
- package/dist/bundle/chunks/rm-7JBDYEU5.js +0 -1
- package/dist/bundle/chunks/rmdir-A2RQAESC.js +0 -1
- package/dist/bundle/chunks/sed-T3Z6L6KJ.js +0 -1
- package/dist/bundle/chunks/seq-JDQVNKUK.js +0 -1
- package/dist/bundle/chunks/sha1sum-DQ6NXZL5.js +0 -1
- package/dist/bundle/chunks/sha256sum-OHTALYKZ.js +0 -1
- package/dist/bundle/chunks/sleep-T43AU6EO.js +0 -1
- package/dist/bundle/chunks/sort-NBGMSGSP.js +0 -1
- package/dist/bundle/chunks/split-KHHBFS6N.js +0 -1
- package/dist/bundle/chunks/sqlite3-XSQIVKH7.js +0 -1
- package/dist/bundle/chunks/stat-LL77MZ57.js +0 -1
- package/dist/bundle/chunks/strings-UEBU67ZB.js +0 -1
- package/dist/bundle/chunks/tac-GPG772JP.js +0 -1
- package/dist/bundle/chunks/tail-Z2TRGEQE.js +0 -1
- package/dist/bundle/chunks/tar-3BUIIPMD.js +0 -1
- package/dist/bundle/chunks/tee-ZZKDAZU6.js +0 -1
- package/dist/bundle/chunks/time-66YFGDFJ.js +0 -1
- package/dist/bundle/chunks/timeout-QN47GEC7.js +0 -1
- package/dist/bundle/chunks/touch-BOVDTDEU.js +0 -1
- package/dist/bundle/chunks/tr-LEOUNZSP.js +0 -1
- package/dist/bundle/chunks/tree-OLQFL5TR.js +0 -1
- package/dist/bundle/chunks/true-3GSKFWKO.js +0 -1
- package/dist/bundle/chunks/unexpand-AV4WTA4X.js +0 -1
- package/dist/bundle/chunks/uniq-RBOLK7C3.js +0 -1
- package/dist/bundle/chunks/wc-VYPMUZSO.js +0 -1
- package/dist/bundle/chunks/which-6QROVGQN.js +0 -1
- package/dist/bundle/chunks/whoami-NJ6ZQ54Y.js +0 -1
- package/dist/bundle/chunks/xan-IVSICJOO.js +0 -1
- package/dist/bundle/chunks/xan-view-JIIHMXCO.js +0 -1
- package/dist/bundle/chunks/xargs-QQG6OLB3.js +0 -1
- package/dist/bundle/chunks/yes-JBIBIE7V.js +0 -1
- package/dist/bundle/chunks/yq-RIVAIAQ2.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a,b}from"./chunk-VTQCQCQO.js";import"./chunk-A2V4EW6Y.js";import"./chunk-TACNCKUC.js";import"./chunk-3OP7VRO7.js";import"./chunk-UYBH3FNE.js";import"./chunk-CAXM2HMK.js";import"./chunk-N7YAMUQG.js";import"./chunk-6OVV6A5W.js";import"./chunk-PVAWMOD4.js";import"./chunk-OBH7XN5N.js";import"./chunk-JUQT3ZM5.js";import"./chunk-2KW5JZDM.js";import"./chunk-463VWH7H.js";export{b as flagsForFuzzing,a as xanCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a,b}from"./chunk-RXYSXOZE.js";import"./chunk-TACNCKUC.js";import"./chunk-3OP7VRO7.js";import"./chunk-UYBH3FNE.js";import"./chunk-CAXM2HMK.js";import"./chunk-N7YAMUQG.js";import"./chunk-PVAWMOD4.js";import"./chunk-JUQT3ZM5.js";import"./chunk-2KW5JZDM.js";import"./chunk-463VWH7H.js";export{b as flagsForFuzzing,a as yqCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-LHCQ2NLV.js";import"./chunk-CWN6Z4S3.js";import"./chunk-2ERMTDAT.js";import"./chunk-DEQBZDPB.js";export{a as aliasCommand,c as flagsForFuzzing,b as unaliasCommand,d as unaliasFlagsForFuzzing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-XREOVOVJ.js";import"./chunk-UBLR5ACC.js";import"./chunk-XYWNAVNS.js";import"./chunk-O3BQP2BR.js";import"./chunk-CWN6Z4S3.js";import"./chunk-2ERMTDAT.js";import"./chunk-DEQBZDPB.js";export{a as awkCommand2,b as flagsForFuzzing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-F2PTB6MB.js";import"./chunk-MIFIRXNI.js";import"./chunk-PUYKMBEQ.js";import"./chunk-CWN6Z4S3.js";import"./chunk-2ERMTDAT.js";import"./chunk-DEQBZDPB.js";export{a as base64Command,b as flagsForFuzzing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-CDJANZJX.js";import"./chunk-CWN6Z4S3.js";import"./chunk-2ERMTDAT.js";import"./chunk-DEQBZDPB.js";export{a as basenameCommand,b as flagsForFuzzing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-2KW7BHBP.js";import"./chunk-UBLR5ACC.js";import"./chunk-CWN6Z4S3.js";import"./chunk-2ERMTDAT.js";import"./chunk-DEQBZDPB.js";export{a as bashCommand,c as flagsForFuzzing,b as shCommand,d as shFlagsForFuzzing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-SVBJBJ5T.js";import"./chunk-4JZXWCPG.js";import"./chunk-NUFRM6SI.js";import"./chunk-PUYKMBEQ.js";import"./chunk-CWN6Z4S3.js";import"./chunk-2ERMTDAT.js";import"./chunk-DEQBZDPB.js";export{a as catCommand,b as flagsForFuzzing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-KNU7V7YY.js";import"./chunk-CWN6Z4S3.js";import"./chunk-2ERMTDAT.js";import"./chunk-DEQBZDPB.js";export{a as chmodCommand,b as flagsForFuzzing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as i,h as d,j as h}from"./chunk-DEQBZDPB.js";var f=64*1024;function s(){return new ReadableStream({start(n){n.close()}})}function y(n){return n.length===0?s():new ReadableStream({start(t){if(n.length<=f)t.enqueue(n);else for(let e=0;e<n.length;e+=f)t.enqueue(n.subarray(e,Math.min(e+f,n.length)));t.close()}})}function m(n){return n.length===0?s():new ReadableStream({start(t){for(let e of n)e.length>0&&t.enqueue(e);t.close()}})}function p(n){return n.length===0?s():y(d(n))}async function x(n,t){let e=[],r=0,a=n.getReader();try{for(;;){let{done:c,value:u}=await a.read();if(c)break;if(!(!u||u.length===0)){if(r+=u.length,t!==void 0&&r>t)throw new Error(`stream exceeded maxBytes=${t} (collected ${r})`);e.push(u)}}}finally{a.releaseLock()}if(e.length===0)return i;if(e.length===1)return e[0];let o=new Uint8Array(r),l=0;for(let c of e)o.set(c,l),l+=c.length;return o}async function k(n){let t=new TextDecoder,e=n.getReader(),r="";try{for(;;){let{done:a,value:o}=await e.read();if(a)break;o&&o.length>0&&(r+=t.decode(o,{stream:!0}))}r+=t.decode()}finally{e.releaseLock()}return r}function R(n,t){let e="a",r=null;return new ReadableStream({async pull(a){for(;;){if(e==="done"){a.close();return}r===null&&(r=(e==="a"?n:t).getReader());let{done:o,value:l}=await r.read();if(o){r.releaseLock(),r=null,e=e==="a"?"b":"done";continue}if(l&&l.length>0){a.enqueue(l);return}}},async cancel(){if(r){try{await r.cancel()}catch{}r=null}}})}function S(n){return n.tee()}async function*g(n){let t=n.getReader(),e=!1;try{for(;;){let{done:r,value:a}=await t.read();if(r){e=!0;return}a&&a.length>0&&(yield a)}}finally{if(!e)try{await t.cancel()}catch{}t.releaseLock()}}async function*b(n){let t=i;for await(let e of g(n)){let r=e;t.length>0&&(r=h(t,e),t=i);let a=0;for(let o=0;o<r.length;o++)r[o]===10&&(yield r.subarray(a,o),a=o+1);a<r.length&&(t=r.subarray(a))}t.length>0&&(yield t)}async function L(n){let t=n.getReader();try{for(;;){let{done:e}=await t.read();if(e)break}}finally{t.releaseLock()}}function q(n,t){return new ReadableStream({async start(e){try{for await(let r of g(n)){let a=t(r);a!==null&&a.length>0&&e.enqueue(a)}e.close()}catch(r){e.error(r)}}})}export{f as a,s as b,y as c,m as d,p as e,x as f,k as g,R as h,S as i,g as j,b as k,L as l,q as m};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{c as g}from"./chunk-UBLR5ACC.js";import{a as p,b as f}from"./chunk-CWN6Z4S3.js";import{b as o,e as u,g as m}from"./chunk-2ERMTDAT.js";import{k as d}from"./chunk-DEQBZDPB.js";var y={name:"bash",summary:"execute shell commands or scripts",usage:"bash [OPTIONS] [SCRIPT_FILE] [ARGUMENTS...]",options:["-c COMMAND execute COMMAND string"," --help display this help and exit"],notes:["Without -c, reads and executes commands from SCRIPT_FILE.","Arguments are passed as $1, $2, etc. to the script.",'$0 is set to the script name (or "bash" with -c).']},P={name:"bash",async execute(a,e){let t=d(a);if(f(t))return p(y);if(t[0]==="-c"&&t.length>=2){let s=t[1],n=t[2]||"bash",l=t.slice(3);return i(s,n,l,e)}if(t.length===0){let s=await m(e.stdin);return s.trim()?i(s,"bash",[],e,o()):{stdout:o(),stderr:o(),exitCode:0}}let r=t[0],c=t.slice(1);try{let s=e.fs.resolvePath(e.cwd,r),n=await e.fs.readFileText(s);return i(n,r,c,e)}catch{return{stdout:o(),stderr:u(`bash: ${r}: No such file or directory
|
|
2
|
-
`),exitCode:127}}}},v={name:"sh",async execute(a,e){let t=d(a);if(f(t))return p({...y,name:"sh",summary:"execute shell commands or scripts (POSIX shell)"});if(t[0]==="-c"&&t.length>=2){let s=t[1],n=t[2]||"sh",l=t.slice(3);return i(s,n,l,e)}if(t.length===0){let s=await m(e.stdin);return s.trim()?i(s,"sh",[],e,o()):{stdout:o(),stderr:o(),exitCode:0}}let r=t[0],c=t.slice(1);try{let s=e.fs.resolvePath(e.cwd,r),n=await e.fs.readFileText(s);return i(n,r,c,e)}catch{return{stdout:o(),stderr:u(`sh: ${r}: No such file or directory
|
|
3
|
-
`),exitCode:127}}}};async function i(a,e,t,r,c=r.stdin){if(!r.exec)return{stdout:o(),stderr:u(`bash: internal error: exec function not available
|
|
4
|
-
`),exitCode:1};let s=g(r.exportedEnv||{},{0:e,"#":String(t.length),"@":t.join(" "),"*":t.join(" ")});t.forEach((h,x)=>{s[String(x+1)]=h});let n=a;if(n.startsWith("#!")){let h=n.indexOf(`
|
|
5
|
-
`);h!==-1&&(n=n.slice(h+1))}return await r.exec(n,{env:s,cwd:r.cwd,stdin:c})}var N={name:"bash",flags:[{flag:"-c",type:"value",valueHint:"string"}],stdinType:"text"},S={name:"sh",flags:[{flag:"-c",type:"value",valueHint:"string"}],stdinType:"text"};export{P as a,v as b,N as c,S as d};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{a as C,b as k,c as w}from"./chunk-CWN6Z4S3.js";import{b as d,e as p,g as v}from"./chunk-2ERMTDAT.js";import{k as b}from"./chunk-DEQBZDPB.js";var T={name:"unexpand",summary:"convert spaces to tabs",usage:"unexpand [OPTION]... [FILE]...",description:"Convert blanks in each FILE to TABs, writing to standard output. If no FILE is specified, standard input is read.",options:["-t N Use N spaces per tab (default: 8)","-t LIST Use comma-separated list of tab stops","-a Convert all sequences of blanks (not just leading)"],examples:["unexpand file.txt # Convert leading spaces to tabs","unexpand -a file.txt # Convert all space sequences","unexpand -t 4 file.txt # Use 4-space tabs"]};function h(o){let a=o.split(",").map(n=>n.trim()),e=[];for(let n of a){let r=parseInt(n,10);if(Number.isNaN(r)||r<1)return null;e.push(r)}for(let n=1;n<e.length;n++)if(e[n]<=e[n-1])return null;return e}function L(o,a){if(a.length===1){let e=a[0];return o+(e-o%e)}for(let e of a)if(e>o)return e;if(a.length>=2){let e=a[a.length-1]-a[a.length-2],n=a[a.length-1],r=Math.floor((o-n)/e)+1;return n+r*e}return-1}function y(o,a){let{tabStops:e,allBlanks:n}=a,r="",s=0,l="",t=0,i=!0,f=()=>{if(l.length===0)return;let u=t+l.length;if(!n&&!i){r+=l,l="";return}let c=t,x="";for(;c<u;){let g=L(c,e);if(g<=u&&g>c)x+=" ",c=g;else break}let m=u-c;m>0&&(x+=" ".repeat(m)),r+=x,l=""};for(let u of o)u===" "?(l.length===0&&(t=s),l+=u,s++):u===" "?(f(),r+=u,s=L(s,e)):(f(),r+=u,s++,i=!1);return f(),r}function N(o,a){if(o==="")return"";let e=o.split(`
|
|
2
|
-
`),n=o.endsWith(`
|
|
3
|
-
`)&&e[e.length-1]==="";return n&&e.pop(),e.map(s=>y(s,a)).join(`
|
|
4
|
-
`)+(n?`
|
|
5
|
-
`:"")}var z={name:"unexpand",execute:async(o,a)=>{let e=b(o);if(k(e))return C(T);let n={tabStops:[8],allBlanks:!1},r=[],s=0;for(;s<e.length;){let t=e[s];if(t==="-t"&&s+1<e.length){let i=h(e[s+1]);if(!i)return{exitCode:1,stdout:d(),stderr:p(`unexpand: invalid tab size: '${e[s+1]}'
|
|
6
|
-
`)};n.tabStops=i,s+=2}else if(t.startsWith("-t")&&t.length>2){let i=h(t.slice(2));if(!i)return{exitCode:1,stdout:d(),stderr:p(`unexpand: invalid tab size: '${t.slice(2)}'
|
|
7
|
-
`)};n.tabStops=i,s++}else if(t==="--tabs"&&s+1<e.length){let i=h(e[s+1]);if(!i)return{exitCode:1,stdout:d(),stderr:p(`unexpand: invalid tab size: '${e[s+1]}'
|
|
8
|
-
`)};n.tabStops=i,s+=2}else if(t.startsWith("--tabs=")){let i=h(t.slice(7));if(!i)return{exitCode:1,stdout:d(),stderr:p(`unexpand: invalid tab size: '${t.slice(7)}'
|
|
9
|
-
`)};n.tabStops=i,s++}else if(t==="-a"||t==="--all")n.allBlanks=!0,s++;else if(t==="--"){r.push(...e.slice(s+1));break}else{if(t.startsWith("-")&&t!=="-")return w("unexpand",t);r.push(t),s++}}let l="";if(r.length===0){let t=await v(a.stdin);l=N(t,n)}else for(let t of r){let i=a.fs.resolvePath(a.cwd,t),f;try{f=await a.fs.readFileText(i)}catch{return{exitCode:1,stdout:p(l),stderr:p(`unexpand: ${t}: No such file or directory
|
|
10
|
-
`)}}l+=N(f,n)}return{exitCode:0,stdout:p(l),stderr:d()}}},B={name:"unexpand",flags:[{flag:"-t",type:"value",valueHint:"number"},{flag:"-a",type:"boolean"}],stdinType:"text",needsFiles:!0};export{z as a,B as b};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{a as F,b as I,c as L}from"./chunk-CWN6Z4S3.js";import{b as f,e as u,g as N}from"./chunk-2ERMTDAT.js";import{k as v}from"./chunk-DEQBZDPB.js";var w={name:"join",summary:"join lines of two files on a common field",usage:"join [OPTION]... FILE1 FILE2",description:"For each pair of input lines with identical join fields, write a line to standard output. The default join field is the first, delimited by blanks.",options:["-1 FIELD Join on this FIELD of file 1 (default: 1)","-2 FIELD Join on this FIELD of file 2 (default: 1)","-t CHAR Use CHAR as input and output field separator","-a FILENUM Also print unpairable lines from file FILENUM (1 or 2)","-v FILENUM Like -a but only output unpairable lines","-e STRING Replace missing fields with STRING","-o FORMAT Output format (comma-separated list of FILENUM.FIELD)","-i Ignore case when comparing fields"],examples:["join file1 file2 # Join on first field","join -1 2 -2 1 file1 file2 # Join file1 col 2 with file2 col 1","join -t ',' file1.csv file2.csv # Join CSV files","join -a 1 file1 file2 # Left outer join"]};function U(a,l){return l?a.split(l):a.split(/[ \t]+/).filter(i=>i.length>0)}function C(a,l,i,n){let r=U(a,l),e=r[i-1]??"";return n&&(e=e.toLowerCase()),{fields:r,joinKey:e,original:a}}function j(a,l,i){let n=i.separator??" ";if(i.outputFormat){let s=[];for(let{file:h,field:c}of i.outputFormat){let p=h===1?a:l;p&&c===0?s.push(p.joinKey):p&&p.fields[c-1]!==void 0?s.push(p.fields[c-1]):s.push(i.emptyString)}return s.join(n)}let r=[],e=a?.joinKey??l?.joinKey??"";if(r.push(e),a)for(let s=0;s<a.fields.length;s++)s!==i.field1-1&&r.push(a.fields[s]);if(l)for(let s=0;s<l.fields.length;s++)s!==i.field2-1&&r.push(l.fields[s]);return r.join(n)}function x(a){let l=a.split(","),i=[];for(let n of l){let r=n.trim().match(/^(\d+)\.(\d+)$/);if(!r)return null;let e=Number.parseInt(r[1],10),s=Number.parseInt(r[2],10);if(e!==1&&e!==2)return null;i.push({file:e,field:s})}return i}var K={name:"join",execute:async(a,l)=>{let i=v(a);if(I(i))return F(w);let n={field1:1,field2:1,separator:null,printUnpairable:new Set,onlyUnpairable:new Set,emptyString:"",outputFormat:null,ignoreCase:!1},r=[],e=0;for(;e<i.length;){let t=i[e];if(t==="-1"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:f(),stderr:u(`join: invalid field number: '${i[e+1]}'
|
|
2
|
-
`)};n.field1=o,e+=2}else if(t==="-2"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:f(),stderr:u(`join: invalid field number: '${i[e+1]}'
|
|
3
|
-
`)};n.field2=o,e+=2}else if((t==="-t"||t==="--field-separator")&&e+1<i.length)n.separator=i[e+1],e+=2;else if(t.startsWith("-t")&&t.length>2)n.separator=t.slice(2),e++;else if(t==="-a"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(o!==1&&o!==2)return{exitCode:1,stdout:f(),stderr:u(`join: invalid file number: '${i[e+1]}'
|
|
4
|
-
`)};n.printUnpairable.add(o),e+=2}else if(t.match(/^-a[12]$/))n.printUnpairable.add(Number.parseInt(t[2],10)),e++;else if(t==="-v"&&e+1<i.length){let o=Number.parseInt(i[e+1],10);if(o!==1&&o!==2)return{exitCode:1,stdout:f(),stderr:u(`join: invalid file number: '${i[e+1]}'
|
|
5
|
-
`)};n.onlyUnpairable.add(o),e+=2}else if(t.match(/^-v[12]$/))n.onlyUnpairable.add(Number.parseInt(t[2],10)),e++;else if(t==="-e"&&e+1<i.length)n.emptyString=i[e+1],e+=2;else if(t==="-o"&&e+1<i.length){let o=x(i[e+1]);if(!o)return{exitCode:1,stdout:f(),stderr:u(`join: invalid field spec: '${i[e+1]}'
|
|
6
|
-
`)};n.outputFormat=o,e+=2}else if(t==="-i"||t==="--ignore-case")n.ignoreCase=!0,e++;else if(t==="--"){r.push(...i.slice(e+1));break}else{if(t.startsWith("-")&&t!=="-")return L("join",t);r.push(t),e++}}if(r.length!==2)return{exitCode:1,stdout:f(),stderr:u(r.length<2?`join: missing file operand
|
|
7
|
-
`:`join: extra operand
|
|
8
|
-
`)};let s=[];for(let t of r)if(t==="-")s.push(await N(l.stdin));else{let o=l.fs.resolvePath(l.cwd,t);try{let d=await l.fs.readFileText(o);s.push(d)}catch{return{exitCode:1,stdout:f(),stderr:u(`join: ${t}: No such file or directory
|
|
9
|
-
`)}}}let h=(t,o)=>{let d=t.split(`
|
|
10
|
-
`);return t.endsWith(`
|
|
11
|
-
`)&&d[d.length-1]===""&&d.pop(),d.filter(b=>b.length>0).map(b=>C(b,n.separator,o,n.ignoreCase))},c=h(s[0],n.field1),p=h(s[1],n.field2),g=new Map;for(let t of p){let o=g.get(t.joinKey);o?o.push(t):g.set(t.joinKey,[t])}let m=[],y=new Set;for(let t of c){let o=g.get(t.joinKey);if(o&&o.length>0){if(y.add(t.joinKey),n.onlyUnpairable.size===0)for(let d of o)m.push(j(t,d,n))}else(n.printUnpairable.has(1)||n.onlyUnpairable.has(1))&&m.push(j(t,null,n))}if(n.printUnpairable.has(2)||n.onlyUnpairable.has(2))for(let t of p)y.has(t.joinKey)||m.push(j(null,t,n));return{exitCode:0,stdout:u(m.length>0?`${m.join(`
|
|
12
|
-
`)}
|
|
13
|
-
`:""),stderr:f()}}},$={name:"join",flags:[{flag:"-1",type:"value",valueHint:"number"},{flag:"-2",type:"value",valueHint:"number"},{flag:"-t",type:"value",valueHint:"delimiter"},{flag:"-a",type:"value",valueHint:"number"},{flag:"-v",type:"value",valueHint:"number"},{flag:"-e",type:"value",valueHint:"string"},{flag:"-o",type:"value",valueHint:"format"},{flag:"-i",type:"boolean"}],needsArgs:!0,minArgs:2};export{K as a,$ as b};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{a as E,b as N,c as v}from"./chunk-CWN6Z4S3.js";import{b as a,e as h,g as i}from"./chunk-2ERMTDAT.js";import{k as $}from"./chunk-DEQBZDPB.js";var S={name:"xargs",summary:"build and execute command lines from standard input",usage:"xargs [OPTION]... [COMMAND [INITIAL-ARGS]]",options:["-I REPLACE replace occurrences of REPLACE with input","-d DELIM use DELIM as input delimiter (e.g., -d '\\n' for newline)","-n NUM use at most NUM arguments per command line","-P NUM run at most NUM processes at a time","-0, --null items are separated by null, not whitespace","-t, --verbose print commands before executing","-r, --no-run-if-empty do not run command if input is empty"," --help display this help and exit"]},U={name:"xargs",async execute(P,d){let s=$(P);if(N(s))return E(S);let x=null,w=null,f=null,o=null,y=!1,C=!1,b=!1,n=0;for(let e=0;e<s.length;e++){let t=s[e];if(t==="-I"&&e+1<s.length)x=s[++e],n=e+1;else if(t==="-d"&&e+1<s.length)w=s[++e].replace(/\\n/g,`
|
|
2
|
-
`).replace(/\\t/g," ").replace(/\\r/g,"\r").replace(/\\0/g,"\0").replace(/\\\\/g,"\\"),n=e+1;else if(t==="-n"&&e+1<s.length)f=parseInt(s[++e],10),n=e+1;else if(t==="-P"&&e+1<s.length)o=parseInt(s[++e],10),n=e+1;else if(t==="-0"||t==="--null")y=!0,n=e+1;else if(t==="-t"||t==="--verbose")C=!0,n=e+1;else if(t==="-r"||t==="--no-run-if-empty")b=!0,n=e+1;else{if(t.startsWith("--"))return v("xargs",t);if(t.startsWith("-")&&t.length>1){for(let r of t.slice(1))if(!"0tr".includes(r))return v("xargs",`-${r}`);t.includes("0")&&(y=!0),t.includes("t")&&(C=!0),t.includes("r")&&(b=!0),n=e+1}else if(!t.startsWith("-")){n=e;break}}}let u=s.slice(n);u.length===0&&u.push("echo");let A=await i(d.stdin),l;if(y?l=A.split("\0").filter(e=>e.length>0):w!==null?l=A.replace(/\n$/,"").split(w).filter(t=>t.length>0):l=A.split(/\s+/).map(e=>e.trim()).filter(e=>e.length>0),l.length===0)return b?{stdout:a(),stderr:a(),exitCode:0}:{stdout:a(),stderr:a(),exitCode:0};let m="",c="",p=0,H=e=>/[\s"'\\$`!*?[\]{}();&|<>#]/.test(e)?`"${e.replace(/([\\"`$])/g,"\\$1")}"`:e,I=async e=>{let t=e.map(H).join(" ");return C&&(c+=`${t}
|
|
3
|
-
`),d.exec?d.exec(t,{cwd:d.cwd}):{stdout:h(`${t}
|
|
4
|
-
`),stderr:a(),exitCode:0}},M=async e=>{if(o!==null&&o>1)for(let t=0;t<e.length;t+=o){let r=e.slice(t,t+o),L=await Promise.all(r.map(I));for(let g of L)m+=await i(g.stdout),c+=await i(g.stderr),g.exitCode!==0&&(p=g.exitCode)}else for(let t of e){let r=await I(t);m+=await i(r.stdout),c+=await i(r.stderr),r.exitCode!==0&&(p=r.exitCode)}};if(x!==null){let e=l.map(t=>u.map(r=>r.replaceAll(x,t)));await M(e)}else if(f!==null){let e=[];for(let t=0;t<l.length;t+=f){let r=l.slice(t,t+f);e.push([...u,...r])}await M(e)}else{let e=[...u,...l],t=await I(e);m+=await i(t.stdout),c+=await i(t.stderr),p=t.exitCode}return{stdout:h(m),stderr:h(c),exitCode:p}}},F={name:"xargs",flags:[{flag:"-I",type:"value",valueHint:"string"},{flag:"-d",type:"value",valueHint:"delimiter"},{flag:"-n",type:"value",valueHint:"number"},{flag:"-0",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-r",type:"boolean"}],stdinType:"text"};export{U as a,F as b};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as b,b as g,c as O,d as k,e as X}from"./chunk-7MKBHGLS.js";import{a as G,c as ht}from"./chunk-UBLR5ACC.js";import{a as S}from"./chunk-XYWNAVNS.js";import{k as P}from"./chunk-O3BQP2BR.js";function W(t,r,e,n,p,i,u,c,s,f){switch(r){case"sort":return Array.isArray(t)?[[...t].sort(u)]:[null];case"sort_by":return!Array.isArray(t)||e.length===0?[null]:[[...t].sort((h,y)=>{let a=p(h,e[0],n)[0],l=p(y,e[0],n)[0];return u(a,l)})];case"bsearch":{if(!Array.isArray(t)){let h=t===null?"null":typeof t=="object"?"object":typeof t;throw new Error(`${h} (${JSON.stringify(t)}) cannot be searched from`)}return e.length===0?[null]:p(t,e[0],n).map(h=>{let y=0,a=t.length;for(;y<a;){let l=y+a>>>1;u(t[l],h)<0?y=l+1:a=l}return y<t.length&&u(t[y],h)===0?y:-y-1})}case"unique_by":{if(!Array.isArray(t)||e.length===0)return[null];let o=new Map;for(let y of t){let a=p(y,e[0],n)[0],l=JSON.stringify(a);o.has(l)||o.set(l,{item:y,key:a})}let h=[...o.values()];return h.sort((y,a)=>u(y.key,a.key)),[h.map(y=>y.item)]}case"group_by":{if(!Array.isArray(t)||e.length===0)return[null];let o=new Map;for(let h of t){let y=JSON.stringify(p(h,e[0],n)[0]);o.has(y)||o.set(y,[]),o.get(y)?.push(h)}return[[...o.values()]]}case"max":return Array.isArray(t)&&t.length>0?[t.reduce((o,h)=>u(o,h)>0?o:h)]:[null];case"max_by":return!Array.isArray(t)||t.length===0||e.length===0?[null]:[t.reduce((o,h)=>{let y=p(o,e[0],n)[0],a=p(h,e[0],n)[0];return u(y,a)>0?o:h})];case"min":return Array.isArray(t)&&t.length>0?[t.reduce((o,h)=>u(o,h)<0?o:h)]:[null];case"min_by":return!Array.isArray(t)||t.length===0||e.length===0?[null]:[t.reduce((o,h)=>{let y=p(o,e[0],n)[0],a=p(h,e[0],n)[0];return u(y,a)<0?o:h})];case"add":{let o=h=>{let y=h.filter(a=>a!==null);return y.length===0?null:y.every(a=>typeof a=="number")?y.reduce((a,l)=>a+l,0):y.every(a=>typeof a=="string")?y.join(""):y.every(a=>Array.isArray(a))?y.flat():y.every(a=>a&&typeof a=="object"&&!Array.isArray(a))?ht(...y):null};if(e.length>=1){let h=p(t,e[0],n);return[o(h)]}return Array.isArray(t)?[o(t)]:[null]}case"any":{if(e.length>=2){try{let o=i(t,e[0],n);for(let h of o)if(p(h,e[1],n).some(c))return[!0]}catch(o){if(o instanceof f)throw o}return[!1]}return e.length===1?Array.isArray(t)?[t.some(o=>c(p(o,e[0],n)[0]))]:[!1]:Array.isArray(t)?[t.some(c)]:[!1]}case"all":{if(e.length>=2){try{let o=i(t,e[0],n);for(let h of o)if(!p(h,e[1],n).some(c))return[!1]}catch(o){if(o instanceof f)throw o}return[!0]}return e.length===1?Array.isArray(t)?[t.every(o=>c(p(o,e[0],n)[0]))]:[!0]:Array.isArray(t)?[t.every(c)]:[!0]}case"select":return e.length===0?[t]:p(t,e[0],n).some(c)?[t]:[];case"map":return e.length===0||!Array.isArray(t)?[null]:[t.flatMap(h=>p(h,e[0],n))];case"map_values":{if(e.length===0)return[null];if(Array.isArray(t))return[t.flatMap(o=>p(o,e[0],n))];if(t&&typeof t=="object"){let o=Object.create(null);for(let[h,y]of Object.entries(t)){if(!b(h))continue;let a=p(y,e[0],n);a.length>0&&g(o,h,a[0])}return[o]}return[null]}case"has":{if(e.length===0)return[!1];let h=p(t,e[0],n)[0];return Array.isArray(t)&&typeof h=="number"?[h>=0&&h<t.length]:t&&typeof t=="object"&&typeof h=="string"?[O(t,h)]:[!1]}case"in":{if(e.length===0)return[!1];let h=p(t,e[0],n)[0];return Array.isArray(h)&&typeof t=="number"?[t>=0&&t<h.length]:h&&typeof h=="object"&&typeof t=="string"?[O(h,t)]:[!1]}case"contains":{if(e.length===0)return[!1];let o=p(t,e[0],n);return[s(t,o[0])]}case"inside":{if(e.length===0)return[!1];let o=p(t,e[0],n);return[s(o[0],t)]}default:return null}}function Q(t,r,e,n,p,i,u,c){switch(r){case"first":if(e.length>0)try{let s=i(t,e[0],n);return s.length>0?[s[0]]:[]}catch(s){if(s instanceof c)throw s;return[]}return Array.isArray(t)&&t.length>0?[t[0]]:[null];case"last":if(e.length>0){let s=p(t,e[0],n);return s.length>0?[s[s.length-1]]:[]}return Array.isArray(t)&&t.length>0?[t[t.length-1]]:[null];case"nth":{if(e.length<1)return[null];let s=p(t,e[0],n);if(e.length>1){for(let o of s)if(o<0)throw new Error("nth doesn't support negative indices");let f;try{f=i(t,e[1],n)}catch(o){if(o instanceof c)throw o;f=[]}return s.flatMap(o=>{let h=o;return h<f.length?[f[h]]:[]})}return Array.isArray(t)?s.flatMap(f=>{let o=f;if(o<0)throw new Error("nth doesn't support negative indices");return o<t.length?[t[o]]:[null]}):[null]}case"range":{if(e.length===0)return[];let s=p(t,e[0],n);if(e.length===1){let y=[];for(let a of s){let l=a;for(let m=0;m<l;m++)y.push(m)}return y}let f=p(t,e[1],n);if(e.length===2){let y=[];for(let a of s)for(let l of f){let m=a,A=l;for(let E=m;E<A;E++)y.push(E)}return y}let o=p(t,e[2],n),h=[];for(let y of s)for(let a of f)for(let l of o){let m=y,A=a,E=l;if(E!==0)if(E>0)for(let w=m;w<A;w+=E)h.push(w);else for(let w=m;w>A;w+=E)h.push(w)}return h}case"limit":return e.length<2?[]:p(t,e[0],n).flatMap(f=>{let o=f;if(o<0)throw new Error("limit doesn't support negative count");if(o===0)return[];let h;try{h=i(t,e[1],n)}catch(y){if(y instanceof c)throw y;h=[]}return h.slice(0,o)});case"isempty":{if(e.length<1)return[!0];try{return[i(t,e[0],n).length===0]}catch(s){if(s instanceof c)throw s;return[!0]}}case"isvalid":{if(e.length<1)return[!0];try{return[p(t,e[0],n).length>0]}catch(s){if(s instanceof c)throw s;return[!1]}}case"skip":return e.length<2?[]:p(t,e[0],n).flatMap(f=>{let o=f;if(o<0)throw new Error("skip doesn't support negative count");return p(t,e[1],n).slice(o)});case"until":{if(e.length<2)return[t];let s=t,f=n.limits.maxIterations;for(let o=0;o<f;o++){if(p(s,e[0],n).some(u))return[s];let y=p(s,e[1],n);if(y.length===0)return[s];s=y[0]}throw new c(`jq until: too many iterations (${f}), increase executionLimits.maxJqIterations`,"iterations")}case"while":{if(e.length<2)return[t];let s=[],f=t,o=n.limits.maxIterations;for(let h=0;h<o&&p(f,e[0],n).some(u);h++){s.push(f);let a=p(f,e[1],n);if(a.length===0)break;f=a[0]}if(s.length>=o)throw new c(`jq while: too many iterations (${o}), increase executionLimits.maxJqIterations`,"iterations");return s}case"repeat":{if(e.length===0)return[t];let s=[],f=t,o=n.limits.maxIterations;for(let h=0;h<o;h++){s.push(f);let y=p(f,e[0],n);if(y.length===0)break;f=y[0]}if(s.length>=o)throw new c(`jq repeat: too many iterations (${o}), increase executionLimits.maxJqIterations`,"iterations");return s}default:return null}}function Z(t,r,e,n,p){switch(r){case"now":return[Date.now()/1e3];case"gmtime":{if(typeof t!="number")return[null];let i=new Date(t*1e3),u=i.getUTCFullYear(),c=i.getUTCMonth(),s=i.getUTCDate(),f=i.getUTCHours(),o=i.getUTCMinutes(),h=i.getUTCSeconds(),y=i.getUTCDay(),a=Date.UTC(u,0,1),l=Math.floor((i.getTime()-a)/(1440*60*1e3));return[[u,c,s,f,o,h,y,l]]}case"mktime":{if(!Array.isArray(t))throw new Error("mktime requires parsed datetime inputs");let[i,u,c,s=0,f=0,o=0]=t;if(typeof i!="number"||typeof u!="number")throw new Error("mktime requires parsed datetime inputs");let h=Date.UTC(i,u,c??1,s??0,f??0,o??0);return[Math.floor(h/1e3)]}case"strftime":{if(e.length===0)return[null];let u=p(t,e[0],n)[0];if(typeof u!="string")throw new Error("strftime/1 requires a string format");let c;if(typeof t=="number")c=new Date(t*1e3);else if(Array.isArray(t)){let[y,a,l,m=0,A=0,E=0]=t;if(typeof y!="number"||typeof a!="number")throw new Error("strftime/1 requires parsed datetime inputs");c=new Date(Date.UTC(y,a,l??1,m??0,A??0,E??0))}else throw new Error("strftime/1 requires parsed datetime inputs");let s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"],o=(y,a=2)=>String(y).padStart(a,"0");return[u.replace(/%Y/g,String(c.getUTCFullYear())).replace(/%m/g,o(c.getUTCMonth()+1)).replace(/%d/g,o(c.getUTCDate())).replace(/%H/g,o(c.getUTCHours())).replace(/%M/g,o(c.getUTCMinutes())).replace(/%S/g,o(c.getUTCSeconds())).replace(/%A/g,s[c.getUTCDay()]).replace(/%B/g,f[c.getUTCMonth()]).replace(/%Z/g,"UTC").replace(/%%/g,"%")]}case"strptime":{if(e.length===0)return[null];if(typeof t!="string")throw new Error("strptime/1 requires a string input");let u=p(t,e[0],n)[0];if(typeof u!="string")throw new Error("strptime/1 requires a string format");if(u==="%Y-%m-%dT%H:%M:%SZ"){let s=t.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/);if(s){let[,f,o,h,y,a,l]=s.map(Number),m=new Date(Date.UTC(f,o-1,h,y,a,l)),A=m.getUTCDay(),E=Date.UTC(f,0,1),w=Math.floor((m.getTime()-E)/(1440*60*1e3));return[[f,o-1,h,y,a,l,A,w]]}}let c=new Date(t);if(!Number.isNaN(c.getTime())){let s=c.getUTCFullYear(),f=c.getUTCMonth(),o=c.getUTCDate(),h=c.getUTCHours(),y=c.getUTCMinutes(),a=c.getUTCSeconds(),l=c.getUTCDay(),m=Date.UTC(s,0,1),A=Math.floor((c.getTime()-m)/(1440*60*1e3));return[[s,f,o,h,y,a,l,A]]}throw new Error(`Cannot parse date: ${t}`)}case"fromdate":{if(typeof t!="string")throw new Error("fromdate requires a string input");let i=new Date(t);if(Number.isNaN(i.getTime()))throw new Error(`date "${t}" does not match format "%Y-%m-%dT%H:%M:%SZ"`);return[Math.floor(i.getTime()/1e3)]}case"todate":{if(typeof t!="number")throw new Error("todate requires a number input");return[new Date(t*1e3).toISOString().replace(/\.\d{3}Z$/,"Z")]}default:return null}}function N(t){return t!==!1&&t!==null}function R(t,r){return JSON.stringify(t)===JSON.stringify(r)}function D(t,r){return typeof t=="number"&&typeof r=="number"?t-r:typeof t=="string"&&typeof r=="string"?t.localeCompare(r):0}function z(t,r){let e=k(t);for(let n of Object.keys(r))b(n)&&(O(e,n)&&e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])&&r[n]&&typeof r[n]=="object"&&!Array.isArray(r[n])?g(e,n,z(e[n],r[n])):g(e,n,r[n]));return e}function M(t,r=3e3){let e=0,n=t;for(;e<r;)if(Array.isArray(n)){if(n.length===0)return e+1;n=n[0],e++}else if(n!==null&&typeof n=="object"){let p=Object.keys(n);if(p.length===0)return e+1;n=n[p[0]],e++}else return e;return e}function L(t,r){let e=i=>i===null?0:typeof i=="boolean"?1:typeof i=="number"?2:typeof i=="string"?3:Array.isArray(i)?4:typeof i=="object"?5:6,n=e(t),p=e(r);if(n!==p)return n-p;if(typeof t=="number"&&typeof r=="number")return t-r;if(typeof t=="string"&&typeof r=="string")return t.localeCompare(r);if(typeof t=="boolean"&&typeof r=="boolean")return(t?1:0)-(r?1:0);if(Array.isArray(t)&&Array.isArray(r)){for(let i=0;i<Math.min(t.length,r.length);i++){let u=L(t[i],r[i]);if(u!==0)return u}return t.length-r.length}if(t&&r&&typeof t=="object"&&typeof r=="object"){let i=t,u=r,c=Object.keys(i).sort(),s=Object.keys(u).sort();for(let f=0;f<Math.min(c.length,s.length);f++){let o=c[f].localeCompare(s[f]);if(o!==0)return o}if(c.length!==s.length)return c.length-s.length;for(let f of c){let o=L(i[f],u[f]);if(o!==0)return o}}return 0}function _(t,r){if(R(t,r))return!0;if(typeof t=="string"&&typeof r=="string")return t.includes(r);if(Array.isArray(t)&&Array.isArray(r))return r.every(e=>t.some(n=>_(n,e)));if(t&&r&&typeof t=="object"&&typeof r=="object"&&!Array.isArray(t)&&!Array.isArray(r)){let e=t,n=r;return Object.keys(n).every(p=>O(e,p)&&_(e[p],n[p]))}return!1}var Et=2e3;function v(t,r,e){switch(r){case"@base64":return typeof t=="string"?typeof Buffer<"u"?[Buffer.from(t,"utf-8").toString("base64")]:[btoa(t)]:[null];case"@base64d":return typeof t=="string"?typeof Buffer<"u"?[Buffer.from(t,"base64").toString("utf-8")]:[atob(t)]:[null];case"@uri":return typeof t=="string"?[encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")]:[null];case"@urid":return typeof t=="string"?[decodeURIComponent(t)]:[null];case"@csv":return Array.isArray(t)?[t.map(p=>{if(p===null)return"";if(typeof p=="boolean")return p?"true":"false";if(typeof p=="number")return String(p);let i=String(p);return i.includes(",")||i.includes('"')||i.includes(`
|
|
2
|
-
`)||i.includes("\r")?`"${i.replace(/"/g,'""')}"`:i}).join(",")]:[null];case"@tsv":return Array.isArray(t)?[t.map(n=>String(n??"").replace(/\t/g,"\\t").replace(/\n/g,"\\n")).join(" ")]:[null];case"@json":{let n=e??Et;return M(t,n+1)>n?[null]:[JSON.stringify(t)]}case"@html":return typeof t=="string"?[t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")]:[null];case"@sh":return typeof t=="string"?[`'${t.replace(/'/g,"'\\''")}'`]:[null];case"@text":return typeof t=="string"?[t]:t==null?[""]:[String(t)];default:return null}}function tt(t,r,e,n,p,i){switch(r){case"index":return e.length===0?[null]:p(t,e[0],n).map(c=>{if(typeof t=="string"&&typeof c=="string"){if(c===""&&t==="")return null;let s=t.indexOf(c);return s>=0?s:null}if(Array.isArray(t)){if(Array.isArray(c)){for(let f=0;f<=t.length-c.length;f++){let o=!0;for(let h=0;h<c.length;h++)if(!i(t[f+h],c[h])){o=!1;break}if(o)return f}return null}let s=t.findIndex(f=>i(f,c));return s>=0?s:null}return null});case"rindex":return e.length===0?[null]:p(t,e[0],n).map(c=>{if(typeof t=="string"&&typeof c=="string"){let s=t.lastIndexOf(c);return s>=0?s:null}if(Array.isArray(t)){if(Array.isArray(c)){for(let s=t.length-c.length;s>=0;s--){let f=!0;for(let o=0;o<c.length;o++)if(!i(t[s+o],c[o])){f=!1;break}if(f)return s}return null}for(let s=t.length-1;s>=0;s--)if(i(t[s],c))return s;return null}return null});case"indices":return e.length===0?[[]]:p(t,e[0],n).map(c=>{let s=[];if(typeof t=="string"&&typeof c=="string"){let f=t.indexOf(c);for(;f!==-1;)s.push(f),f=t.indexOf(c,f+1)}else if(Array.isArray(t))if(Array.isArray(c)){let f=c.length;if(f===0)for(let o=0;o<=t.length;o++)s.push(o);else for(let o=0;o<=t.length-f;o++){let h=!0;for(let y=0;y<f;y++)if(!i(t[o+y],c[y])){h=!1;break}h&&s.push(o)}}else for(let f=0;f<t.length;f++)i(t[f],c)&&s.push(f);return s});default:return null}}function et(t,r,e,n,p){switch(r){case"fabs":case"abs":return typeof t=="number"?[Math.abs(t)]:typeof t=="string"?[t]:[null];case"exp10":return typeof t=="number"?[10**t]:[null];case"exp2":return typeof t=="number"?[2**t]:[null];case"pow":{if(e.length<2)return[null];let i=p(t,e[0],n),u=p(t,e[1],n),c=i[0],s=u[0];return typeof c!="number"||typeof s!="number"?[null]:[c**s]}case"atan2":{if(e.length<2)return[null];let i=p(t,e[0],n),u=p(t,e[1],n),c=i[0],s=u[0];return typeof c!="number"||typeof s!="number"?[null]:[Math.atan2(c,s)]}case"hypot":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[Math.hypot(t,i)]}case"fma":{if(typeof t!="number"||e.length<2)return[null];let i=p(t,e[0],n)[0],u=p(t,e[1],n)[0];return[t*i+u]}case"copysign":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[Math.sign(i)*Math.abs(t)]}case"drem":case"remainder":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[t-Math.round(t/i)*i]}case"fdim":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[Math.max(0,t-i)]}case"fmax":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[Math.max(t,i)]}case"fmin":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[Math.min(t,i)]}case"ldexp":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[t*2**i]}case"scalbn":case"scalbln":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[t*2**i]}case"nearbyint":return typeof t=="number"?[Math.round(t)]:[null];case"logb":return typeof t=="number"?[Math.floor(Math.log2(Math.abs(t)))]:[null];case"significand":if(typeof t=="number"){let i=Math.floor(Math.log2(Math.abs(t)));return[t/2**i]}return[null];case"frexp":if(typeof t=="number"){if(t===0)return[[0,0]];let i=Math.floor(Math.log2(Math.abs(t)))+1;return[[t/2**i,i]]}return[null];case"modf":if(typeof t=="number"){let i=Math.trunc(t);return[[t-i,i]]}return[null];default:return null}}function rt(t,r,e,n,p,i,u,c){switch(r){case"recurse":{if(e.length===0){let a=[],l=m=>{if(a.push(m),Array.isArray(m))for(let A of m)l(A);else if(m&&typeof m=="object")for(let A of Object.keys(m))l(m[A])};return l(t),a}let s=[],f=e.length>=2?e[1]:null,o=1e4,h=0,y=a=>{if(h++>o||f&&!p(a,f,n).some(i))return;s.push(a);let l=p(a,e[0],n);for(let m of l)m!=null&&y(m)};return y(t),s}case"recurse_down":return c(t,"recurse",e,n);case"walk":{if(e.length===0)return[t];let s=new WeakSet,f=o=>{if(o&&typeof o=="object"){if(s.has(o))return o;s.add(o)}let h;if(Array.isArray(o))h=o.map(f);else if(o&&typeof o=="object"){let a=Object.create(null);for(let[l,m]of Object.entries(o))b(l)&&g(a,l,f(m));h=a}else h=o;return p(h,e[0],n)[0]};return[f(t)]}case"transpose":{if(!Array.isArray(t))return[null];if(t.length===0)return[[]];let s=Math.max(...t.map(o=>Array.isArray(o)?o.length:0)),f=[];for(let o=0;o<s;o++)f.push(t.map(h=>Array.isArray(h)?h[o]:null));return[f]}case"combinations":{if(e.length>0){let h=p(t,e[0],n)[0];if(!Array.isArray(t)||h<0)return[];if(h===0)return[[]];let y=[],a=(l,m)=>{if(m===h){y.push([...l]);return}for(let A of t)l.push(A),a(l,m+1),l.pop()};return a([],0),y}if(!Array.isArray(t))return[];if(t.length===0)return[[]];for(let o of t)if(!Array.isArray(o))return[];let s=[],f=(o,h)=>{if(o===t.length){s.push([...h]);return}let y=t[o];for(let a of y)h.push(a),f(o+1,h),h.pop()};return f(0,[]),s}case"parent":{if(n.root===void 0||n.currentPath===void 0)return[];let s=n.currentPath;if(s.length===0)return[];let f=e.length>0?p(t,e[0],n)[0]:1;if(f>=0){if(f>s.length)return[];let o=s.slice(0,s.length-f);return[u(n.root,o)]}else{let o=-f-1;if(o>=s.length)return[t];let h=s.slice(0,o);return[u(n.root,h)]}}case"parents":{if(n.root===void 0||n.currentPath===void 0)return[[]];let s=n.currentPath,f=[];for(let o=s.length-1;o>=0;o--)f.push(u(n.root,s.slice(0,o)));return[f]}case"root":return n.root!==void 0?[n.root]:[];default:return null}}var wt=2e3;function nt(t,r,e,n,p){switch(r){case"keys":return Array.isArray(t)?[t.map((i,u)=>u)]:t&&typeof t=="object"?[Object.keys(t).sort()]:[null];case"keys_unsorted":return Array.isArray(t)?[t.map((i,u)=>u)]:t&&typeof t=="object"?[Object.keys(t)]:[null];case"length":return typeof t=="string"?[t.length]:Array.isArray(t)?[t.length]:t&&typeof t=="object"?[Object.keys(t).length]:t===null?[0]:typeof t=="number"?[Math.abs(t)]:[null];case"utf8bytelength":{if(typeof t=="string")return[new TextEncoder().encode(t).length];let i=t===null?"null":Array.isArray(t)?"array":typeof t,u=i==="array"||i==="object"?JSON.stringify(t):String(t);throw new Error(`${i} (${u}) only strings have UTF-8 byte length`)}case"to_entries":return t&&typeof t=="object"&&!Array.isArray(t)?[Object.entries(t).map(([i,u])=>({key:i,value:u}))]:[null];case"from_entries":if(Array.isArray(t)){let i=Object.create(null);for(let u of t)if(u&&typeof u=="object"){let c=u,s=c.key??c.Key??c.name??c.Name??c.k,f=c.value??c.Value??c.v;if(s!==void 0){let o=String(s);b(o)&&g(i,o,f)}}return[i]}return[null];case"with_entries":{if(e.length===0)return[t];if(t&&typeof t=="object"&&!Array.isArray(t)){let u=Object.entries(t).map(([s,f])=>({key:s,value:f})).flatMap(s=>p(s,e[0],n)),c=Object.create(null);for(let s of u)if(s&&typeof s=="object"){let f=s,o=f.key??f.name??f.k,h=f.value??f.v;if(o!==void 0){let y=String(o);b(y)&&g(c,y,h)}}return[c]}return[null]}case"reverse":return Array.isArray(t)?[[...t].reverse()]:typeof t=="string"?[t.split("").reverse().join("")]:[null];case"flatten":return Array.isArray(t)?(e.length>0?p(t,e[0],n):[Number.POSITIVE_INFINITY]).map(u=>{let c=u;if(c<0)throw new Error("flatten depth must not be negative");return t.flat(c)}):[null];case"unique":if(Array.isArray(t)){let i=new Set,u=[];for(let c of t){let s=JSON.stringify(c);i.has(s)||(i.add(s),u.push(c))}return[u]}return[null];case"tojson":case"tojsonstream":{let i=n.limits.maxDepth??wt;return M(t,i+1)>i?[null]:[JSON.stringify(t)]}case"fromjson":{if(typeof t=="string"){let i=t.trim().toLowerCase();if(i==="nan")return[Number.NaN];if(i==="inf"||i==="infinity")return[Number.POSITIVE_INFINITY];if(i==="-inf"||i==="-infinity")return[Number.NEGATIVE_INFINITY];try{return[JSON.parse(t)]}catch{throw new Error(`Invalid JSON: ${t}`)}}return[t]}case"tostring":return typeof t=="string"?[t]:[JSON.stringify(t)];case"tonumber":if(typeof t=="number")return[t];if(typeof t=="string"){let i=Number(t);if(Number.isNaN(i))throw new Error(`${JSON.stringify(t)} cannot be parsed as a number`);return[i]}throw new Error(`${typeof t} cannot be parsed as a number`);case"toboolean":{if(typeof t=="boolean")return[t];if(typeof t=="string"){if(t==="true")return[!0];if(t==="false")return[!1];throw new Error(`string (${JSON.stringify(t)}) cannot be parsed as a boolean`)}let i=t===null?"null":Array.isArray(t)?"array":typeof t,u=i==="array"||i==="object"?JSON.stringify(t):String(t);throw new Error(`${i} (${u}) cannot be parsed as a boolean`)}case"tostream":{let i=[],u=(c,s)=>{if(c===null||typeof c!="object")i.push([s,c]);else if(Array.isArray(c))if(c.length===0)i.push([s,[]]);else for(let f=0;f<c.length;f++)u(c[f],[...s,f]);else{let f=Object.keys(c);if(f.length===0)i.push([s,Object.create(null)]);else for(let o of f)u(c[o],[...s,o])}};return u(t,[]),i.push([[]]),i}case"fromstream":{if(e.length===0)return[t];let i=p(t,e[0],n),u=null;for(let c of i){if(!Array.isArray(c)||c.length===1&&Array.isArray(c[0])&&c[0].length===0||c.length!==2)continue;let[s,f]=c;if(!Array.isArray(s))continue;if(s.length===0){u=f;continue}u===null&&(u=typeof s[0]=="number"?[]:{});let o=u;for(let y=0;y<s.length-1;y++){let a=s[y],l=s[y+1];if(Array.isArray(o)&&typeof a=="number"){for(;o.length<=a;)o.push(null);o[a]===null&&(o[a]=typeof l=="number"?[]:{}),o=o[a]}else if(o&&typeof o=="object"&&!Array.isArray(o)){let m=String(a);if(!b(m))continue;let A=o;(A[m]===null||A[m]===void 0)&&g(A,m,typeof l=="number"?[]:{}),o=A[m]}}let h=s[s.length-1];if(Array.isArray(o)&&typeof h=="number"){for(;o.length<=h;)o.push(null);o[h]=f}else if(o&&typeof o=="object"&&!Array.isArray(o)){let y=String(h);b(y)&&g(o,y,f)}}return[u]}case"truncate_stream":{let i=typeof t=="number"?Math.floor(t):0;if(e.length===0)return[];let u=[],c=p(t,e[0],n);for(let s of c)if(Array.isArray(s)){if(s.length===1&&Array.isArray(s[0])){let f=s[0];f.length>i&&u.push([f.slice(i)]);continue}if(s.length===2&&Array.isArray(s[0])){let f=s[0],o=s[1];f.length>i&&u.push([f.slice(i),o])}}return u}default:return null}}function st(t,r,e,n,p,i,u,c,s,f){switch(r){case"getpath":{if(e.length===0)return[null];let o=p(t,e[0],n),h=[];for(let y of o){let a=y,l=t;for(let m of a){if(l==null){l=null;break}if(Array.isArray(l)&&typeof m=="number")l=l[m];else if(typeof l=="object"&&typeof m=="string"){let A=l;if(!Object.hasOwn(A,m)){l=null;break}l=A[m]}else{l=null;break}}h.push(l)}return h}case"setpath":{if(e.length<2)return[null];let h=p(t,e[0],n)[0],a=p(t,e[1],n)[0];return[u(t,h,a)]}case"delpaths":{if(e.length===0)return[t];let h=p(t,e[0],n)[0],y=t;for(let a of h.sort((l,m)=>m.length-l.length))y=c(y,a);return[y]}case"path":{if(e.length===0)return[[]];let o=[];return f(t,e[0],n,[],o),o}case"del":return e.length===0?[t]:[s(t,e[0],n)];case"pick":{if(e.length===0)return[null];let o=[];for(let y of e)f(t,y,n,[],o);let h=null;for(let y of o){for(let l of y)if(typeof l=="number"&&l<0)throw new Error("Out of bounds negative array index");let a=t;for(let l of y){if(a==null)break;if(Array.isArray(a)&&typeof l=="number")a=a[l];else if(typeof a=="object"&&typeof l=="string"){let m=a;if(!Object.hasOwn(m,l)){a=null;break}a=m[l]}else{a=null;break}}h=u(h,y,a)}return[h]}case"paths":{let o=[],h=(y,a)=>{if(y&&typeof y=="object")if(Array.isArray(y))for(let l=0;l<y.length;l++)o.push([...a,l]),h(y[l],[...a,l]);else for(let l of Object.keys(y))o.push([...a,l]),h(y[l],[...a,l])};return h(t,[]),e.length>0?o.filter(y=>{let a=t;for(let m of y)if(Array.isArray(a)&&typeof m=="number")a=a[m];else if(a&&typeof a=="object"&&typeof m=="string"){let A=a;if(!Object.hasOwn(A,m))return!1;a=A[m]}else return!1;return p(a,e[0],n).some(i)}):o}case"leaf_paths":{let o=[],h=(y,a)=>{if(y===null||typeof y!="object")o.push(a);else if(Array.isArray(y))for(let l=0;l<y.length;l++)h(y[l],[...a,l]);else for(let l of Object.keys(y))h(y[l],[...a,l])};return h(t,[]),o}default:return null}}function it(t,r,e,n,p,i){switch(r){case"IN":{if(e.length===0)return[!1];if(e.length===1){let f=p(t,e[0],n);for(let o of f)if(i(t,o))return[!0];return[!1]}let u=p(t,e[0],n),c=p(t,e[1],n),s=new Set(c.map(f=>JSON.stringify(f)));for(let f of u)if(s.has(JSON.stringify(f)))return[!0];return[!1]}case"INDEX":{if(e.length===0)return[{}];if(e.length===1){let s=p(t,e[0],n),f=Object.create(null);for(let o of s){let h=String(o);b(h)&&g(f,h,o)}return[f]}if(e.length===2){let s=p(t,e[0],n),f=Object.create(null);for(let o of s){let h=p(o,e[1],n);if(h.length>0){let y=String(h[0]);b(y)&&g(f,y,o)}}return[f]}let u=p(t,e[0],n),c=Object.create(null);for(let s of u){let f=p(s,e[1],n),o=p(s,e[2],n);if(f.length>0&&o.length>0){let h=String(f[0]);b(h)&&g(c,h,o[0])}}return[c]}case"JOIN":{if(e.length<2)return[null];let u=p(t,e[0],n)[0];if(!u||typeof u!="object"||Array.isArray(u))return[null];let c=u;if(!Array.isArray(t))return[null];let s=[];for(let f of t){let o=p(f,e[1],n),h=o.length>0?String(o[0]):"",y=O(c,h)?c[h]:null;s.push([f,y])}return[s]}default:return null}}function ot(t,r,e,n,p){switch(r){case"join":{if(!Array.isArray(t))return[null];let i=e.length>0?p(t,e[0],n):[""];for(let u of t)if(Array.isArray(u)||u!==null&&typeof u=="object")throw new Error("cannot join: contains arrays or objects");return i.map(u=>t.map(c=>c===null?"":typeof c=="string"?c:String(c)).join(String(u)))}case"split":{if(typeof t!="string"||e.length===0)return[null];let i=p(t,e[0],n),u=String(i[0]);return[t.split(u)]}case"splits":{if(typeof t!="string"||e.length===0)return[];let i=p(t,e[0],n),u=String(i[0]);try{let c=e.length>1?String(p(t,e[1],n)[0]):"g";return S(u,c.includes("g")?c:`${c}g`).split(t)}catch{return[]}}case"scan":{if(typeof t!="string"||e.length===0)return[];let i=p(t,e[0],n),u=String(i[0]);try{let c=e.length>1?String(p(t,e[1],n)[0]):"";return[...S(u,c.includes("g")?c:`${c}g`).matchAll(t)].map(o=>o.length>1?o.slice(1):o[0])}catch{return[]}}case"test":{if(typeof t!="string"||e.length===0)return[!1];let i=p(t,e[0],n),u=String(i[0]);try{let c=e.length>1?String(p(t,e[1],n)[0]):"";return[S(u,c).test(t)]}catch{return[!1]}}case"match":{if(typeof t!="string"||e.length===0)return[null];let i=p(t,e[0],n),u=String(i[0]);try{let c=e.length>1?String(p(t,e[1],n)[0]):"",f=S(u,`${c}d`).exec(t);if(!f)return[];let o=f.indices;return[{offset:f.index,length:f[0].length,string:f[0],captures:f.slice(1).map((h,y)=>({offset:o?.[y+1]?.[0]??null,length:h?.length??0,string:h??"",name:null}))}]}catch{return[null]}}case"capture":{if(typeof t!="string"||e.length===0)return[null];let i=p(t,e[0],n),u=String(i[0]);try{let c=e.length>1?String(p(t,e[1],n)[0]):"",f=S(u,c).match(t);return!f||!f.groups?[{}]:[f.groups]}catch{return[null]}}case"sub":{if(typeof t!="string"||e.length<2)return[null];let i=p(t,e[0],n),u=p(t,e[1],n),c=String(i[0]),s=String(u[0]);try{let f=e.length>2?String(p(t,e[2],n)[0]):"";return[S(c,f).replace(t,s)]}catch{return[t]}}case"gsub":{if(typeof t!="string"||e.length<2)return[null];let i=p(t,e[0],n),u=p(t,e[1],n),c=String(i[0]),s=String(u[0]);try{let f=e.length>2?String(p(t,e[2],n)[0]):"g",o=f.includes("g")?f:`${f}g`;return[S(c,o).replace(t,s)]}catch{return[t]}}case"ascii_downcase":return typeof t=="string"?[t.replace(/[A-Z]/g,i=>String.fromCharCode(i.charCodeAt(0)+32))]:[null];case"ascii_upcase":return typeof t=="string"?[t.replace(/[a-z]/g,i=>String.fromCharCode(i.charCodeAt(0)-32))]:[null];case"ltrimstr":{if(typeof t!="string"||e.length===0)return[t];let i=p(t,e[0],n),u=String(i[0]);return[t.startsWith(u)?t.slice(u.length):t]}case"rtrimstr":{if(typeof t!="string"||e.length===0)return[t];let i=p(t,e[0],n),u=String(i[0]);return u===""?[t]:[t.endsWith(u)?t.slice(0,-u.length):t]}case"trimstr":{if(typeof t!="string"||e.length===0)return[t];let i=p(t,e[0],n),u=String(i[0]);if(u==="")return[t];let c=t;return c.startsWith(u)&&(c=c.slice(u.length)),c.endsWith(u)&&(c=c.slice(0,-u.length)),[c]}case"trim":if(typeof t=="string")return[t.trim()];throw new Error("trim input must be a string");case"ltrim":if(typeof t=="string")return[t.trimStart()];throw new Error("trim input must be a string");case"rtrim":if(typeof t=="string")return[t.trimEnd()];throw new Error("trim input must be a string");case"startswith":{if(typeof t!="string"||e.length===0)return[!1];let i=p(t,e[0],n);return[t.startsWith(String(i[0]))]}case"endswith":{if(typeof t!="string"||e.length===0)return[!1];let i=p(t,e[0],n);return[t.endsWith(String(i[0]))]}case"ascii":return typeof t=="string"&&t.length>0?[t.charCodeAt(0)]:[null];case"explode":return typeof t=="string"?[Array.from(t).map(i=>i.codePointAt(0))]:[null];case"implode":if(!Array.isArray(t))throw new Error("implode input must be an array");return[t.map(c=>{if(typeof c=="string")throw new Error(`string (${JSON.stringify(c)}) can't be imploded, unicode codepoint needs to be numeric`);if(typeof c!="number"||Number.isNaN(c))throw new Error("number (null) can't be imploded, unicode codepoint needs to be numeric");let s=Math.trunc(c);return s<0||s>1114111||s>=55296&&s<=57343?String.fromCodePoint(65533):String.fromCodePoint(s)}).join("")];default:return null}}function ft(t,r){switch(r){case"type":return t===null?["null"]:Array.isArray(t)?["array"]:typeof t=="boolean"?["boolean"]:typeof t=="number"?["number"]:typeof t=="string"?["string"]:typeof t=="object"?["object"]:["null"];case"infinite":return[Number.POSITIVE_INFINITY];case"nan":return[Number.NaN];case"isinfinite":return[typeof t=="number"&&!Number.isFinite(t)];case"isnan":return[typeof t=="number"&&Number.isNaN(t)];case"isnormal":return[typeof t=="number"&&Number.isFinite(t)&&t!==0];case"isfinite":return[typeof t=="number"&&Number.isFinite(t)];case"numbers":return typeof t=="number"?[t]:[];case"strings":return typeof t=="string"?[t]:[];case"booleans":return typeof t=="boolean"?[t]:[];case"nulls":return t===null?[t]:[];case"arrays":return Array.isArray(t)?[t]:[];case"objects":return t&&typeof t=="object"&&!Array.isArray(t)?[t]:[];case"iterables":return Array.isArray(t)||t&&typeof t=="object"&&!Array.isArray(t)?[t]:[];case"scalars":return!Array.isArray(t)&&!(t&&typeof t=="object")?[t]:[];case"values":return t===null?[]:[t];case"not":return t===!1||t===null?[!0]:[!1];case"null":return[null];case"true":return[!0];case"false":return[!1];case"empty":return[];default:return null}}function $(t,r,e){if(r.length===0)return e;let[n,...p]=r;if(typeof n=="number"){if(t&&typeof t=="object"&&!Array.isArray(t))throw new Error("Cannot index object with number");if(n>536870911)throw new Error("Array index too large");if(n<0)throw new Error("Out of bounds negative array index");let s=Array.isArray(t)?[...t]:[];for(;s.length<=n;)s.push(null);return s[n]=$(s[n],p,e),s}if(Array.isArray(t))throw new Error("Cannot index array with string");if(!b(n))return t??Object.create(null);let i=t&&typeof t=="object"&&!Array.isArray(t)?k(t):Object.create(null),u=Object.hasOwn(i,n)?i[n]:void 0;return g(i,n,$(u,p,e)),i}function F(t,r){if(r.length===0)return null;if(r.length===1){let p=r[0];if(Array.isArray(t)&&typeof p=="number"){let i=[...t];return i.splice(p,1),i}if(t&&typeof t=="object"&&!Array.isArray(t)){let i=String(p);if(!b(i))return t;let u=k(t);return delete u[i],u}return t}let[e,...n]=r;if(Array.isArray(t)&&typeof e=="number"){let p=[...t];return p[e]=F(p[e],n),p}if(t&&typeof t=="object"&&!Array.isArray(t)){let p=String(e);if(!b(p))return t;let i=k(t);return Object.hasOwn(i,p)&&g(i,p,F(i[p],n)),i}return t}var I=class t extends Error{label;partialResults;constructor(r,e=[]){super(`break ${r}`),this.label=r,this.partialResults=e,this.name="BreakError"}withPrependedResults(r){return new t(this.label,[...r,...this.partialResults])}},V=class extends Error{value;constructor(r){super(typeof r=="string"?r:JSON.stringify(r)),this.value=r,this.name="JqError"}},kt=1e4,lt=2e3,Nt=new Map([["floor",Math.floor],["ceil",Math.ceil],["round",Math.round],["sqrt",Math.sqrt],["log",Math.log],["log10",Math.log10],["log2",Math.log2],["exp",Math.exp],["sin",Math.sin],["cos",Math.cos],["tan",Math.tan],["asin",Math.asin],["acos",Math.acos],["atan",Math.atan],["sinh",Math.sinh],["cosh",Math.cosh],["tanh",Math.tanh],["asinh",Math.asinh],["acosh",Math.acosh],["atanh",Math.atanh],["cbrt",Math.cbrt],["expm1",Math.expm1],["log1p",Math.log1p],["trunc",Math.trunc]]);function Ot(t){return{vars:new Map,limits:{maxIterations:t?.limits?.maxIterations??kt,maxDepth:t?.limits?.maxDepth??lt},env:t?.env,coverage:t?.coverage}}function J(t,r,e){let n=new Map(t.vars);return n.set(r,e),{vars:n,limits:t.limits,env:t.env,root:t.root,currentPath:t.currentPath,funcs:t.funcs,labels:t.labels,coverage:t.coverage}}function B(t,r,e){switch(r.type){case"var":return J(t,r.name,e);case"array":{if(!Array.isArray(e))return null;let n=t;for(let p=0;p<r.elements.length;p++){let i=r.elements[p],u=p<e.length?e[p]:null,c=B(n,i,u);if(c===null)return null;n=c}return n}case"object":{if(e===null||typeof e!="object"||Array.isArray(e))return null;let n=e,p=t;for(let i of r.fields){let u;if(typeof i.key=="string")u=i.key;else{let f=d(e,i.key,t);if(f.length===0)return null;u=String(f[0])}let c=O(n,u)?n[u]:null;i.keyVar&&(p=J(p,i.keyVar,c));let s=B(p,i.pattern,c);if(s===null)return null;p=s}return p}}}function St(t,r){let e=t;for(let n of r)if(e&&typeof e=="object")if(Array.isArray(e))if(typeof n=="number")e=e[n];else return;else{let p=e;if(typeof n=="string"&&Object.hasOwn(p,n))e=p[n];else return}else return;return e}function T(t){if(t.type==="Identity")return[];if(t.type==="Field"){let r=t.base?T(t.base):[];return r===null?null:[...r,t.name]}if(t.type==="Index"&&t.index.type==="Literal"){let r=t.base?T(t.base):[];if(r===null)return null;let e=t.index.value;return typeof e=="number"||typeof e=="string"?[...r,e]:null}if(t.type==="Pipe"){let r=T(t.left);return r===null?null:ct(r,t.right)}if(t.type==="Call"){if(t.name==="parent"||t.name==="root")return null;if(t.name==="first"&&t.args.length===0)return[0];if(t.name==="last"&&t.args.length===0)return[-1]}return null}function ct(t,r){if(r.type==="Call"){if(r.name==="parent"){let e=1;if(r.args.length>0&&r.args[0].type==="Literal"){let n=r.args[0].value;typeof n=="number"&&(e=n)}if(e>=0)return t.slice(0,Math.max(0,t.length-e));{let n=-e-1;return t.slice(0,Math.min(n,t.length))}}if(r.name==="root")return[]}if(r.type==="Field"){let e=T(r);if(e!==null)return[...t,...e]}if(r.type==="Index"&&r.index.type==="Literal"){let e=T(r);if(e!==null)return[...t,...e]}if(r.type==="Pipe"){let e=ct(t,r.left);return e===null?null:ct(e,r.right)}return r.type==="Identity"?t:null}function yt(t,r,e){if(r.type==="Comma"){let n=[];try{n.push(...d(t,r.left,e))}catch(p){if(p instanceof P)throw p;if(n.length>0)return n;throw new Error("evaluation failed")}try{n.push(...d(t,r.right,e))}catch(p){if(p instanceof P)throw p;return n}return n}return d(t,r,e)}function d(t,r,e){let n=e&&"vars"in e?e:Ot(e);switch(n.root===void 0&&(n={...n,root:t,currentPath:[]}),n.coverage?.hit(`jq:node:${r.type}`),r.type){case"Identity":return[t];case"Field":return(r.base?d(t,r.base,n):[t]).flatMap(i=>{if(i&&typeof i=="object"&&!Array.isArray(i)){let c=i;if(!Object.hasOwn(c,r.name))return[null];let s=c[r.name];return[s===void 0?null:s]}if(i===null)return[null];let u=Array.isArray(i)?"array":typeof i;throw new Error(`Cannot index ${u} with string "${r.name}"`)});case"Index":return(r.base?d(t,r.base,n):[t]).flatMap(i=>d(i,r.index,n).flatMap(c=>{if(typeof c=="number"&&Array.isArray(i)){if(Number.isNaN(c))return[null];let s=Math.trunc(c),f=s<0?i.length+s:s;return f>=0&&f<i.length?[i[f]]:[null]}if(typeof c=="string"&&i&&typeof i=="object"&&!Array.isArray(i)){let s=i;return Object.hasOwn(s,c)?[s[c]]:[null]}return[null]}));case"Slice":return(r.base?d(t,r.base,n):[t]).flatMap(i=>{if(i===null)return[null];if(!Array.isArray(i)&&typeof i!="string")throw new Error(`Cannot slice ${typeof i} (${JSON.stringify(i)})`);let u=i.length,c=r.start?d(t,r.start,n):[0],s=r.end?d(t,r.end,n):[u];return c.flatMap(f=>s.map(o=>{let h=f,y=o,a=Number.isNaN(h)?0:Number.isInteger(h)?h:Math.floor(h),l=Number.isNaN(y)?u:Number.isInteger(y)?y:Math.ceil(y),m=at(a,u),A=at(l,u);return Array.isArray(i),i.slice(m,A)}))});case"Iterate":return(r.base?d(t,r.base,n):[t]).flatMap(i=>Array.isArray(i)?i:i&&typeof i=="object"?Object.values(i):[]);case"Pipe":{let p=d(t,r.left,n),i=T(r.left),u=[];for(let c of p)try{if(i!==null){let s={...n,currentPath:[...n.currentPath??[],...i]};u.push(...d(c,r.right,s))}else u.push(...d(c,r.right,n))}catch(s){throw s instanceof I?s.withPrependedResults(u):s}return u}case"Comma":{let p=d(t,r.left,n),i=d(t,r.right,n);return[...p,...i]}case"Literal":return[r.value];case"Array":return r.elements?[d(t,r.elements,n)]:[[]];case"Object":{let p=[Object.create(null)];for(let i of r.entries){let u=typeof i.key=="string"?[i.key]:d(t,i.key,n),c=d(t,i.value,n),s=[];for(let f of p)for(let o of u){if(typeof o!="string"){let h=o===null?"null":Array.isArray(o)?"array":typeof o;throw new Error(`Cannot use ${h} (${JSON.stringify(o)}) as object key`)}if(!b(o)){for(let h of c)s.push(k(f));continue}for(let h of c){let y=k(f);g(y,o,h),s.push(y)}}p.length=0,p.push(...s)}return p}case"Paren":return d(t,r.expr,n);case"BinaryOp":return jt(t,r.op,r.left,r.right,n);case"UnaryOp":return d(t,r.operand,n).map(i=>{if(r.op==="-"){if(typeof i=="number")return-i;if(typeof i=="string"){let u=c=>c.length>5?`"${c.slice(0,3)}...`:JSON.stringify(c);throw new Error(`string (${u(i)}) cannot be negated`)}return null}return r.op==="not"?!N(i):null});case"Cond":return d(t,r.cond,n).flatMap(i=>{if(N(i))return d(t,r.then,n);for(let u of r.elifs)if(d(t,u.cond,n).some(N))return d(t,u.then,n);return r.else?d(t,r.else,n):[t]});case"Try":try{return d(t,r.body,n)}catch(p){if(r.catch){let i=p instanceof V?p.value:p instanceof Error?p.message:String(p);return d(i,r.catch,n)}return[]}case"Call":return mt(t,r.name,r.args,n);case"VarBind":return d(t,r.value,n).flatMap(i=>{let u=null,c=[];r.pattern?c.push(r.pattern):r.name&&c.push({type:"var",name:r.name}),r.alternatives&&c.push(...r.alternatives);for(let s of c)if(u=B(n,s,i),u!==null)break;return u===null?[]:d(t,r.body,u)});case"VarRef":{if(r.name==="$ENV")return[n.env?G(n.env):Object.create(null)];let p=n.vars.get(r.name);return p!==void 0?[p]:[null]}case"Recurse":{let p=[],i=new WeakSet,u=c=>{if(c&&typeof c=="object"){if(i.has(c))return;i.add(c)}if(p.push(c),Array.isArray(c))for(let s of c)u(s);else if(c&&typeof c=="object")for(let s of Object.keys(c))u(c[s])};return u(t),p}case"Optional":try{return d(t,r.expr,n)}catch{return[]}case"StringInterp":return[r.parts.map(i=>typeof i=="string"?i:d(t,i,n).map(c=>typeof c=="string"?c:JSON.stringify(c)).join("")).join("")];case"UpdateOp":return[Tt(t,r.path,r.op,r.value,n)];case"Reduce":{let p=d(t,r.expr,n),i=d(t,r.init,n)[0],u=n.limits.maxDepth??lt;for(let c of p){let s;if(r.pattern){if(s=B(n,r.pattern,c),s===null)continue}else s=J(n,r.varName,c);if(i=d(i,r.update,s)[0],M(i,u+1)>u)return[null]}return[i]}case"Foreach":{let p=d(t,r.expr,n),i=d(t,r.init,n)[0],u=[];for(let c of p)try{let s;if(r.pattern){if(s=B(n,r.pattern,c),s===null)continue}else s=J(n,r.varName,c);if(i=d(i,r.update,s)[0],r.extract){let f=d(i,r.extract,s);u.push(...f)}else u.push(i)}catch(s){throw s instanceof I?s.withPrependedResults(u):s}return u}case"Label":try{return d(t,r.body,{...n,labels:new Set([...n.labels??[],r.name])})}catch(p){if(p instanceof I&&p.label===r.name)return p.partialResults;throw p}case"Break":throw new I(r.name);case"Def":{let p=new Map(n.funcs??[]),i=`${r.name}/${r.params.length}`;p.set(i,{params:r.params,body:r.funcBody,closure:new Map(n.funcs??[])});let u={...n,funcs:p};return d(t,r.body,u)}default:{let p=r;throw new Error(`Unknown AST node type: ${p.type}`)}}}function at(t,r){return t<0?Math.max(0,r+t):Math.min(t,r)}function Tt(t,r,e,n,p){function i(s,f){switch(e){case"=":return f;case"|=":return d(s,n,p)[0]??null;case"+=":return typeof s=="number"&&typeof f=="number"||typeof s=="string"&&typeof f=="string"?s+f:Array.isArray(s)&&Array.isArray(f)?[...s,...f]:s&&f&&typeof s=="object"&&typeof f=="object"?X(s,f):f;case"-=":return typeof s=="number"&&typeof f=="number"?s-f:s;case"*=":return typeof s=="number"&&typeof f=="number"?s*f:s;case"/=":return typeof s=="number"&&typeof f=="number"?s/f:s;case"%=":return typeof s=="number"&&typeof f=="number"?s%f:s;case"//=":return s===null||s===!1?f:s;default:return f}}function u(s,f,o){switch(f.type){case"Identity":return o(s);case"Field":{if(!b(f.name))return s;if(f.base)return u(s,f.base,h=>{if(h&&typeof h=="object"&&!Array.isArray(h)){let y=k(h),a=Object.hasOwn(y,f.name)?y[f.name]:void 0;return g(y,f.name,o(a)),y}return h});if(s&&typeof s=="object"&&!Array.isArray(s)){let h=k(s),y=Object.hasOwn(h,f.name)?h[f.name]:void 0;return g(h,f.name,o(y)),h}return s}case"Index":{let y=d(t,f.index,p)[0];if(typeof y=="number"&&Number.isNaN(y))throw new Error("Cannot set array element at NaN index");if(typeof y=="number"&&!Number.isInteger(y)&&(y=Math.trunc(y)),f.base)return u(s,f.base,a=>{if(typeof y=="number"&&Array.isArray(a)){let l=[...a],m=y<0?l.length+y:y;if(m>=0){for(;l.length<=m;)l.push(null);l[m]=o(l[m])}return l}if(typeof y=="string"&&a&&typeof a=="object"&&!Array.isArray(a)){if(!b(y))return a;let l=k(a),m=Object.hasOwn(l,y)?l[y]:void 0;return g(l,y,o(m)),l}return a});if(typeof y=="number"){if(y>536870911)throw new Error("Array index too large");if(y<0&&(!s||!Array.isArray(s)))throw new Error("Out of bounds negative array index");if(Array.isArray(s)){let l=[...s],m=y<0?l.length+y:y;if(m>=0){for(;l.length<=m;)l.push(null);l[m]=o(l[m])}return l}if(s==null){let l=[];for(;l.length<=y;)l.push(null);return l[y]=o(null),l}return s}if(typeof y=="string"&&s&&typeof s=="object"&&!Array.isArray(s)){if(!b(y))return s;let a=k(s),l=Object.hasOwn(a,y)?a[y]:void 0;return g(a,y,o(l)),a}return s}case"Iterate":{let h=y=>{if(Array.isArray(y))return y.map(a=>o(a));if(y&&typeof y=="object"){let a=Object.create(null);for(let[l,m]of Object.entries(y))b(l)&&g(a,l,o(m));return a}return y};return f.base?u(s,f.base,h):h(s)}case"Pipe":{let h=u(s,f.left,y=>y);return u(h,f.right,o)}default:return o(s)}}return u(t,r,s=>{if(e==="|=")return i(s,s);let f=d(t,n,p);return i(s,f[0]??null)})}function Ct(t,r,e){function n(i,u,c){switch(u.type){case"Identity":return c;case"Field":{if(!b(u.name))return i;if(u.base){let s=d(i,u.base,e)[0],f=n(s,{type:"Field",name:u.name},c);return n(i,u.base,f)}if(i&&typeof i=="object"&&!Array.isArray(i)){let s=k(i);return g(s,u.name,c),s}return i}case"Index":{if(u.base){let o=d(i,u.base,e)[0],h=n(o,{type:"Index",index:u.index},c);return n(i,u.base,h)}let f=d(t,u.index,e)[0];if(typeof f=="number"&&Array.isArray(i)){let o=[...i],h=f<0?o.length+f:f;return h>=0&&h<o.length&&(o[h]=c),o}if(typeof f=="string"&&i&&typeof i=="object"&&!Array.isArray(i)){if(!b(f))return i;let o=k(i);return g(o,f,c),o}return i}default:return i}}function p(i,u){switch(u.type){case"Identity":return null;case"Field":{if(!b(u.name))return i;if(u.base){let s=d(i,u.base,e)[0];if(s==null)return i;let f=p(s,{type:"Field",name:u.name});return n(i,u.base,f)}if(i&&typeof i=="object"&&!Array.isArray(i)){if(!b(u.name))return i;let s=k(i);return delete s[u.name],s}return i}case"Index":{if(u.base){let o=d(i,u.base,e)[0];if(o==null)return i;let h=p(o,{type:"Index",index:u.index});return n(i,u.base,h)}let f=d(t,u.index,e)[0];if(typeof f=="number"&&Array.isArray(i)){let o=[...i],h=f<0?o.length+f:f;return h>=0&&h<o.length&&o.splice(h,1),o}if(typeof f=="string"&&i&&typeof i=="object"&&!Array.isArray(i)){if(!b(f))return i;let o=k(i);return delete o[f],o}return i}case"Iterate":return Array.isArray(i)?[]:i&&typeof i=="object"?Object.create(null):i;case"Pipe":{let o=function(a,l,m){switch(l.type){case"Identity":return m;case"Field":{if(!b(l.name))return a;if(a&&typeof a=="object"&&!Array.isArray(a)){let A=k(a);return g(A,l.name,m),A}return a}case"Index":{let E=d(t,l.index,e)[0];if(typeof E=="number"&&Array.isArray(a)){let w=[...a],x=E<0?w.length+E:E;return x>=0&&x<w.length&&(w[x]=m),w}if(typeof E=="string"&&a&&typeof a=="object"&&!Array.isArray(a)){if(!b(E))return a;let w=k(a);return g(w,E,m),w}return a}case"Pipe":{let A=d(a,l.left,e)[0],E=o(A,l.right,m);return o(a,l.left,E)}default:return a}};var c=o;let s=u.left,f=u.right,h=d(i,s,e)[0];if(h==null)return i;let y=p(h,f);return o(i,s,y)}default:return i}}return p(t,r)}function jt(t,r,e,n,p){if(r==="and")return d(t,e,p).flatMap(s=>N(s)?d(t,n,p).map(o=>N(o)):[!1]);if(r==="or")return d(t,e,p).flatMap(s=>N(s)?[!0]:d(t,n,p).map(o=>N(o)));if(r==="//"){let s=d(t,e,p).filter(f=>f!=null&&f!==!1);return s.length>0?s:d(t,n,p)}let i=d(t,e,p),u=d(t,n,p);return i.flatMap(c=>u.map(s=>{switch(r){case"+":return c===null?s:s===null?c:typeof c=="number"&&typeof s=="number"||typeof c=="string"&&typeof s=="string"?c+s:Array.isArray(c)&&Array.isArray(s)?[...c,...s]:c&&s&&typeof c=="object"&&typeof s=="object"&&!Array.isArray(c)&&!Array.isArray(s)?X(c,s):null;case"-":if(typeof c=="number"&&typeof s=="number")return c-s;if(Array.isArray(c)&&Array.isArray(s)){let f=new Set(s.map(o=>JSON.stringify(o)));return c.filter(o=>!f.has(JSON.stringify(o)))}if(typeof c=="string"&&typeof s=="string"){let f=o=>o.length>10?`"${o.slice(0,10)}...`:JSON.stringify(o);throw new Error(`string (${f(c)}) and string (${f(s)}) cannot be subtracted`)}return null;case"*":return typeof c=="number"&&typeof s=="number"?c*s:typeof c=="string"&&typeof s=="number"?c.repeat(s):c&&s&&typeof c=="object"&&typeof s=="object"&&!Array.isArray(c)&&!Array.isArray(s)?z(c,s):null;case"/":if(typeof c=="number"&&typeof s=="number"){if(s===0)throw new Error(`number (${c}) and number (${s}) cannot be divided because the divisor is zero`);return c/s}return typeof c=="string"&&typeof s=="string"?c.split(s):null;case"%":if(typeof c=="number"&&typeof s=="number"){if(s===0)throw new Error(`number (${c}) and number (${s}) cannot be divided (remainder) because the divisor is zero`);return!Number.isFinite(c)&&!Number.isNaN(c)?!Number.isFinite(s)&&!Number.isNaN(s)&&c<0&&s>0?-1:0:c%s}return null;case"==":return R(c,s);case"!=":return!R(c,s);case"<":return D(c,s)<0;case"<=":return D(c,s)<=0;case">":return D(c,s)>0;case">=":return D(c,s)>=0;default:return null}}))}function mt(t,r,e,n){let p=Nt.get(r);if(p)return typeof t=="number"?[p(t)]:[null];let i=et(t,r,e,n,d);if(i!==null)return i;let u=ot(t,r,e,n,d);if(u!==null)return u;let c=Z(t,r,e,n,d);if(c!==null)return c;let s=v(t,r,n.limits.maxDepth);if(s!==null)return s;let f=ft(t,r);if(f!==null)return f;let o=nt(t,r,e,n,d);if(o!==null)return o;let h=W(t,r,e,n,d,yt,L,N,_,P);if(h!==null)return h;let y=st(t,r,e,n,d,N,$,F,Ct,K);if(y!==null)return y;let a=tt(t,r,e,n,d,R);if(a!==null)return a;let l=Q(t,r,e,n,d,yt,N,P);if(l!==null)return l;let m=rt(t,r,e,n,d,N,St,mt);if(m!==null)return m;let A=it(t,r,e,n,d,R);if(A!==null)return A;switch(r){case"builtins":return[["add/0","all/0","all/1","all/2","any/0","any/1","any/2","arrays/0","ascii/0","ascii_downcase/0","ascii_upcase/0","booleans/0","bsearch/1","builtins/0","combinations/0","combinations/1","contains/1","debug/0","del/1","delpaths/1","empty/0","env/0","error/0","error/1","explode/0","first/0","first/1","flatten/0","flatten/1","floor/0","from_entries/0","fromdate/0","fromjson/0","getpath/1","gmtime/0","group_by/1","gsub/2","gsub/3","has/1","implode/0","IN/1","IN/2","INDEX/1","INDEX/2","index/1","indices/1","infinite/0","inside/1","isempty/1","isnan/0","isnormal/0","isvalid/1","iterables/0","join/1","keys/0","keys_unsorted/0","last/0","last/1","length/0","limit/2","ltrimstr/1","map/1","map_values/1","match/1","match/2","max/0","max_by/1","min/0","min_by/1","mktime/0","modulemeta/1","nan/0","not/0","nth/1","nth/2","null/0","nulls/0","numbers/0","objects/0","path/1","paths/0","paths/1","pick/1","range/1","range/2","range/3","recurse/0","recurse/1","recurse_down/0","repeat/1","reverse/0","rindex/1","rtrimstr/1","scalars/0","scan/1","scan/2","select/1","setpath/2","skip/2","sort/0","sort_by/1","split/1","splits/1","splits/2","sqrt/0","startswith/1","strftime/1","strings/0","strptime/1","sub/2","sub/3","test/1","test/2","to_entries/0","toboolean/0","todate/0","tojson/0","tostream/0","fromstream/1","truncate_stream/1","tonumber/0","tostring/0","transpose/0","trim/0","ltrim/0","rtrim/0","type/0","unique/0","unique_by/1","until/2","utf8bytelength/0","values/0","walk/1","while/2","with_entries/1"]];case"error":{let E=e.length>0?d(t,e[0],n)[0]:t;throw new V(E)}case"env":return[n.env?G(n.env):Object.create(null)];case"debug":return[t];case"input_line_number":return[1];default:{let E=`${r}/${e.length}`,w=n.funcs?.get(E);if(w){let x=w.closure??n.funcs??new Map,Y=new Map(x);Y.set(E,w);for(let U=0;U<w.params.length;U++){let gt=w.params[U],ut=e[U];if(ut){let C=d(t,ut,n),j;if(C.length===0)j={type:"Call",name:"empty",args:[]};else if(C.length===1)j={type:"Literal",value:C[0]};else{j={type:"Literal",value:C[C.length-1]};for(let q=C.length-2;q>=0;q--)j={type:"Comma",left:{type:"Literal",value:C[q]},right:j}}Y.set(`${gt}/0`,{params:[],body:j})}}let bt={...n,funcs:Y};return d(t,w.body,bt)}throw new Error(`Unknown function: ${r}`)}}}function K(t,r,e,n,p){if(r.type==="Comma"){let c=r;K(t,c.left,e,n,p),K(t,c.right,e,n,p);return}let i=T(r);if(i!==null){p.push([...n,...i]);return}if(r.type==="Iterate"){if(Array.isArray(t))for(let c=0;c<t.length;c++)p.push([...n,c]);else if(t&&typeof t=="object")for(let c of Object.keys(t))p.push([...n,c]);return}if(r.type==="Recurse"){let c=(s,f)=>{if(p.push([...n,...f]),s&&typeof s=="object")if(Array.isArray(s))for(let o=0;o<s.length;o++)c(s[o],[...f,o]);else for(let o of Object.keys(s))c(s[o],[...f,o])};c(t,[]);return}if(r.type==="Pipe"){let c=T(r.left);if(c!==null){let s=d(t,r.left,e);for(let f of s)K(f,r.right,e,[...n,...c],p);return}}d(t,r,e).length>0&&p.push(n)}var dt=new Map([["and","AND"],["or","OR"],["not","NOT"],["if","IF"],["then","THEN"],["elif","ELIF"],["else","ELSE"],["end","END"],["as","AS"],["try","TRY"],["catch","CATCH"],["true","TRUE"],["false","FALSE"],["null","NULL"],["reduce","REDUCE"],["foreach","FOREACH"],["label","LABEL"],["break","BREAK"],["def","DEF"]]),H=new Set(dt.values());function At(t){let r=[],e=0,n=(f=0)=>t[e+f],p=()=>t[e++],i=()=>e>=t.length,u=f=>f>="0"&&f<="9",c=f=>f>="a"&&f<="z"||f>="A"&&f<="Z"||f==="_",s=f=>c(f)||u(f);for(;!i();){let f=e,o=p();if(!(o===" "||o===" "||o===`
|
|
3
|
-
`||o==="\r")){if(o==="#"){for(;!i()&&n()!==`
|
|
4
|
-
`;)p();continue}if(o==="."&&n()==="."){p(),r.push({type:"DOTDOT",pos:f});continue}if(o==="="&&n()==="="){p(),r.push({type:"EQ",pos:f});continue}if(o==="!"&&n()==="="){p(),r.push({type:"NE",pos:f});continue}if(o==="<"&&n()==="="){p(),r.push({type:"LE",pos:f});continue}if(o===">"&&n()==="="){p(),r.push({type:"GE",pos:f});continue}if(o==="/"&&n()==="/"){p(),n()==="="?(p(),r.push({type:"UPDATE_ALT",pos:f})):r.push({type:"ALT",pos:f});continue}if(o==="+"&&n()==="="){p(),r.push({type:"UPDATE_ADD",pos:f});continue}if(o==="-"&&n()==="="){p(),r.push({type:"UPDATE_SUB",pos:f});continue}if(o==="*"&&n()==="="){p(),r.push({type:"UPDATE_MUL",pos:f});continue}if(o==="/"&&n()==="="){p(),r.push({type:"UPDATE_DIV",pos:f});continue}if(o==="%"&&n()==="="){p(),r.push({type:"UPDATE_MOD",pos:f});continue}if(o==="="&&n()!=="="){r.push({type:"ASSIGN",pos:f});continue}if(o==="."){r.push({type:"DOT",pos:f});continue}if(o==="|"){n()==="="?(p(),r.push({type:"UPDATE_PIPE",pos:f})):r.push({type:"PIPE",pos:f});continue}if(o===","){r.push({type:"COMMA",pos:f});continue}if(o===":"){r.push({type:"COLON",pos:f});continue}if(o===";"){r.push({type:"SEMICOLON",pos:f});continue}if(o==="("){r.push({type:"LPAREN",pos:f});continue}if(o===")"){r.push({type:"RPAREN",pos:f});continue}if(o==="["){r.push({type:"LBRACKET",pos:f});continue}if(o==="]"){r.push({type:"RBRACKET",pos:f});continue}if(o==="{"){r.push({type:"LBRACE",pos:f});continue}if(o==="}"){r.push({type:"RBRACE",pos:f});continue}if(o==="?"){r.push({type:"QUESTION",pos:f});continue}if(o==="+"){r.push({type:"PLUS",pos:f});continue}if(o==="-"){r.push({type:"MINUS",pos:f});continue}if(o==="*"){r.push({type:"STAR",pos:f});continue}if(o==="/"){r.push({type:"SLASH",pos:f});continue}if(o==="%"){r.push({type:"PERCENT",pos:f});continue}if(o==="<"){r.push({type:"LT",pos:f});continue}if(o===">"){r.push({type:"GT",pos:f});continue}if(u(o)){let h=o;for(;!i()&&(u(n())||n()==="."||n()==="e"||n()==="E");)(n()==="e"||n()==="E")&&(t[e+1]==="+"||t[e+1]==="-")&&(h+=p()),h+=p();r.push({type:"NUMBER",value:Number(h),pos:f});continue}if(o==='"'){let h="";for(;!i()&&n()!=='"';)if(n()==="\\"){if(p(),i())break;let y=p();switch(y){case"n":h+=`
|
|
5
|
-
`;break;case"r":h+="\r";break;case"t":h+=" ";break;case"\\":h+="\\";break;case'"':h+='"';break;case"(":h+="\\(";break;default:h+=y}}else h+=p();i()||p(),r.push({type:"STRING",value:h,pos:f});continue}if(c(o)||o==="$"||o==="@"){let h=o;for(;!i()&&s(n());)h+=p();let y=dt.get(h);y?r.push({type:y,value:h,pos:f}):r.push({type:"IDENT",value:h,pos:f});continue}throw new Error(`Unexpected character '${o}' at position ${f}`)}}return r.push({type:"EOF",pos:e}),r}var pt=class t{tokens;pos=0;constructor(r){this.tokens=r}peek(r=0){return this.tokens[this.pos+r]??{type:"EOF",pos:-1}}advance(){return this.tokens[this.pos++]}check(r){return this.peek().type===r}match(...r){for(let e of r)if(this.check(e))return this.advance();return null}expect(r,e){if(!this.check(r))throw new Error(`${e} at position ${this.peek().pos}, got ${this.peek().type}`);return this.advance()}isFieldNameAfterDot(r=0){let e=this.peek(r),n=this.peek(r+1);return n.type==="STRING"?!0:n.type==="IDENT"||H.has(n.type)?n.pos===e.pos+1:!1}isIdentLike(){let r=this.peek().type;return r==="IDENT"||H.has(r)}consumeFieldNameAfterDot(r){let e=this.peek();return e.type==="STRING"?this.advance().value:(e.type==="IDENT"||H.has(e.type))&&e.pos===r.pos+1?this.advance().value:null}parse(){let r=this.parseExpr();if(!this.check("EOF"))throw new Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`);return r}parseExpr(){return this.parsePipe()}parsePattern(){if(this.match("LBRACKET")){let n=[];if(!this.check("RBRACKET"))for(n.push(this.parsePattern());this.match("COMMA")&&!this.check("RBRACKET");)n.push(this.parsePattern());return this.expect("RBRACKET","Expected ']' after array pattern"),{type:"array",elements:n}}if(this.match("LBRACE")){let n=[];if(!this.check("RBRACE"))for(n.push(this.parsePatternField());this.match("COMMA")&&!this.check("RBRACE");)n.push(this.parsePatternField());return this.expect("RBRACE","Expected '}' after object pattern"),{type:"object",fields:n}}let r=this.expect("IDENT","Expected variable name in pattern"),e=r.value;if(!e.startsWith("$"))throw new Error(`Variable name must start with $ at position ${r.pos}`);return{type:"var",name:e}}parsePatternField(){if(this.match("LPAREN")){let e=this.parseExpr();this.expect("RPAREN","Expected ')' after computed key"),this.expect("COLON","Expected ':' after computed key");let n=this.parsePattern();return{key:e,pattern:n}}let r=this.peek();if(r.type==="IDENT"||H.has(r.type)){let e=r.value;if(e.startsWith("$")){if(this.advance(),this.match("COLON")){let n=this.parsePattern();return{key:e.slice(1),pattern:n,keyVar:e}}return{key:e.slice(1),pattern:{type:"var",name:e}}}if(this.advance(),this.match("COLON")){let n=this.parsePattern();return{key:e,pattern:n}}return{key:e,pattern:{type:"var",name:`$${e}`}}}throw new Error(`Expected field name in object pattern at position ${r.pos}`)}parsePipe(){let r=this.parseComma();for(;this.match("PIPE");){let e=this.parseComma();r={type:"Pipe",left:r,right:e}}return r}parseComma(){let r=this.parseVarBind();for(;this.match("COMMA");){let e=this.parseVarBind();r={type:"Comma",left:r,right:e}}return r}parseVarBind(){let r=this.parseUpdate();if(this.match("AS")){let e=this.parsePattern(),n=[];for(;this.check("QUESTION")&&this.peekAhead(1)?.type==="ALT";)this.advance(),this.advance(),n.push(this.parsePattern());this.expect("PIPE","Expected '|' after variable binding");let p=this.parseExpr();return e.type==="var"&&n.length===0?{type:"VarBind",name:e.name,value:r,body:p}:{type:"VarBind",name:e.type==="var"?e.name:"",value:r,body:p,pattern:e.type!=="var"?e:void 0,alternatives:n.length>0?n:void 0}}return r}peekAhead(r){let e=this.pos+r;return e<this.tokens.length?this.tokens[e]:void 0}parseUpdate(){let r=this.parseAlt(),e=new Map([["ASSIGN","="],["UPDATE_ADD","+="],["UPDATE_SUB","-="],["UPDATE_MUL","*="],["UPDATE_DIV","/="],["UPDATE_MOD","%="],["UPDATE_ALT","//="],["UPDATE_PIPE","|="]]),n=this.match("ASSIGN","UPDATE_ADD","UPDATE_SUB","UPDATE_MUL","UPDATE_DIV","UPDATE_MOD","UPDATE_ALT","UPDATE_PIPE");if(n){let p=this.parseVarBind(),i=e.get(n.type);if(i)return{type:"UpdateOp",op:i,path:r,value:p}}return r}parseAlt(){let r=this.parseOr();for(;this.match("ALT");){let e=this.parseOr();r={type:"BinaryOp",op:"//",left:r,right:e}}return r}parseOr(){let r=this.parseAnd();for(;this.match("OR");){let e=this.parseAnd();r={type:"BinaryOp",op:"or",left:r,right:e}}return r}parseAnd(){let r=this.parseNot();for(;this.match("AND");){let e=this.parseNot();r={type:"BinaryOp",op:"and",left:r,right:e}}return r}parseNot(){return this.parseComparison()}parseComparison(){let r=this.parseAddSub(),e=new Map([["EQ","=="],["NE","!="],["LT","<"],["LE","<="],["GT",">"],["GE",">="]]),n=this.match("EQ","NE","LT","LE","GT","GE");if(n){let p=e.get(n.type);if(p){let i=this.parseAddSub();r={type:"BinaryOp",op:p,left:r,right:i}}}return r}parseAddSub(){let r=this.parseMulDiv();for(;;)if(this.match("PLUS")){let e=this.parseMulDiv();r={type:"BinaryOp",op:"+",left:r,right:e}}else if(this.match("MINUS")){let e=this.parseMulDiv();r={type:"BinaryOp",op:"-",left:r,right:e}}else break;return r}parseMulDiv(){let r=this.parseUnary();for(;;)if(this.match("STAR")){let e=this.parseUnary();r={type:"BinaryOp",op:"*",left:r,right:e}}else if(this.match("SLASH")){let e=this.parseUnary();r={type:"BinaryOp",op:"/",left:r,right:e}}else if(this.match("PERCENT")){let e=this.parseUnary();r={type:"BinaryOp",op:"%",left:r,right:e}}else break;return r}parseUnary(){return this.match("MINUS")?{type:"UnaryOp",op:"-",operand:this.parseUnary()}:this.parsePostfix()}parsePostfix(){let r=this.parsePrimary();for(;;)if(this.match("QUESTION"))r={type:"Optional",expr:r};else if(this.check("DOT")&&this.isFieldNameAfterDot())this.advance(),r={type:"Field",name:this.advance().value,base:r};else if(this.check("LBRACKET"))if(this.advance(),this.match("RBRACKET"))r={type:"Iterate",base:r};else if(this.check("COLON")){this.advance();let e=this.check("RBRACKET")?void 0:this.parseExpr();this.expect("RBRACKET","Expected ']'"),r={type:"Slice",end:e,base:r}}else{let e=this.parseExpr();if(this.match("COLON")){let n=this.check("RBRACKET")?void 0:this.parseExpr();this.expect("RBRACKET","Expected ']'"),r={type:"Slice",start:e,end:n,base:r}}else this.expect("RBRACKET","Expected ']'"),r={type:"Index",index:e,base:r}}else break;return r}parsePrimary(){if(this.match("DOTDOT"))return{type:"Recurse"};if(this.check("DOT")){let r=this.advance();if(this.check("LBRACKET")){if(this.advance(),this.match("RBRACKET"))return{type:"Iterate"};if(this.check("COLON")){this.advance();let p=this.check("RBRACKET")?void 0:this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Slice",end:p}}let n=this.parseExpr();if(this.match("COLON")){let p=this.check("RBRACKET")?void 0:this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Slice",start:n,end:p}}return this.expect("RBRACKET","Expected ']'"),{type:"Index",index:n}}let e=this.consumeFieldNameAfterDot(r);return e!==null?{type:"Field",name:e}:{type:"Identity"}}if(this.match("TRUE"))return{type:"Literal",value:!0};if(this.match("FALSE"))return{type:"Literal",value:!1};if(this.match("NULL"))return{type:"Literal",value:null};if(this.check("NUMBER"))return{type:"Literal",value:this.advance().value};if(this.check("STRING")){let e=this.advance().value;return e.includes("\\(")?this.parseStringInterpolation(e):{type:"Literal",value:e}}if(this.match("LBRACKET")){if(this.match("RBRACKET"))return{type:"Array"};let r=this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Array",elements:r}}if(this.match("LBRACE"))return this.parseObjectConstruction();if(this.match("LPAREN")){let r=this.parseExpr();return this.expect("RPAREN","Expected ')'"),{type:"Paren",expr:r}}if(this.match("IF"))return this.parseIf();if(this.match("TRY")){let r=this.parsePostfix(),e;return this.match("CATCH")&&(e=this.parsePostfix()),{type:"Try",body:r,catch:e}}if(this.match("REDUCE")){let r=this.parseAddSub();this.expect("AS","Expected 'as' after reduce expression");let e=this.parsePattern();this.expect("LPAREN","Expected '(' after variable");let n=this.parseExpr();this.expect("SEMICOLON","Expected ';' after init expression");let p=this.parseExpr();this.expect("RPAREN","Expected ')' after update expression");let i=e.type==="var"?e.name:"";return{type:"Reduce",expr:r,varName:i,init:n,update:p,pattern:e.type!=="var"?e:void 0}}if(this.match("FOREACH")){let r=this.parseAddSub();this.expect("AS","Expected 'as' after foreach expression");let e=this.parsePattern();this.expect("LPAREN","Expected '(' after variable");let n=this.parseExpr();this.expect("SEMICOLON","Expected ';' after init expression");let p=this.parseExpr(),i;this.match("SEMICOLON")&&(i=this.parseExpr()),this.expect("RPAREN","Expected ')' after expressions");let u=e.type==="var"?e.name:"";return{type:"Foreach",expr:r,varName:u,init:n,update:p,extract:i,pattern:e.type!=="var"?e:void 0}}if(this.match("LABEL")){let r=this.expect("IDENT","Expected label name (e.g., $out)"),e=r.value;if(!e.startsWith("$"))throw new Error(`Label name must start with $ at position ${r.pos}`);this.expect("PIPE","Expected '|' after label name");let n=this.parseExpr();return{type:"Label",name:e,body:n}}if(this.match("BREAK")){let r=this.expect("IDENT","Expected label name to break to"),e=r.value;if(!e.startsWith("$"))throw new Error(`Break label must start with $ at position ${r.pos}`);return{type:"Break",name:e}}if(this.match("DEF")){let e=this.expect("IDENT","Expected function name after def").value,n=[];if(this.match("LPAREN")){if(!this.check("RPAREN")){let u=this.expect("IDENT","Expected parameter name");for(n.push(u.value);this.match("SEMICOLON");){let c=this.expect("IDENT","Expected parameter name");n.push(c.value)}}this.expect("RPAREN","Expected ')' after parameters")}this.expect("COLON","Expected ':' after function name");let p=this.parseExpr();this.expect("SEMICOLON","Expected ';' after function body");let i=this.parseExpr();return{type:"Def",name:e,params:n,funcBody:p,body:i}}if(this.match("NOT"))return{type:"Call",name:"not",args:[]};if(this.check("IDENT")){let e=this.advance().value;if(e.startsWith("$"))return{type:"VarRef",name:e};if(this.match("LPAREN")){let n=[];if(!this.check("RPAREN"))for(n.push(this.parseExpr());this.match("SEMICOLON");)n.push(this.parseExpr());return this.expect("RPAREN","Expected ')'"),{type:"Call",name:e,args:n}}return{type:"Call",name:e,args:[]}}throw new Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`)}parseObjectConstruction(){let r=[];if(!this.check("RBRACE"))do{let e,n;if(this.match("LPAREN"))e=this.parseExpr(),this.expect("RPAREN","Expected ')'"),this.expect("COLON","Expected ':'"),n=this.parseObjectValue();else if(this.isIdentLike()){let p=this.advance().value;this.match("COLON")?(e=p,n=this.parseObjectValue()):(e=p,n={type:"Field",name:p})}else if(this.check("STRING"))e=this.advance().value,this.expect("COLON","Expected ':'"),n=this.parseObjectValue();else throw new Error(`Expected object key at position ${this.peek().pos}`);r.push({key:e,value:n})}while(this.match("COMMA"));return this.expect("RBRACE","Expected '}'"),{type:"Object",entries:r}}parseObjectValue(){let r=this.parseVarBind();for(;this.match("PIPE");){let e=this.parseVarBind();r={type:"Pipe",left:r,right:e}}return r}parseIf(){let r=this.parseExpr();this.expect("THEN","Expected 'then'");let e=this.parseExpr(),n=[];for(;this.match("ELIF");){let i=this.parseExpr();this.expect("THEN","Expected 'then' after elif");let u=this.parseExpr();n.push({cond:i,then:u})}let p;return this.match("ELSE")&&(p=this.parseExpr()),this.expect("END","Expected 'end'"),{type:"Cond",cond:r,then:e,elifs:n,else:p}}parseStringInterpolation(r){let e=[],n="",p=0;for(;p<r.length;)if(r[p]==="\\"&&r[p+1]==="("){n&&(e.push(n),n=""),p+=2;let i=1,u="";for(;p<r.length&&i>0;)r[p]==="("?i++:r[p]===")"&&i--,i>0&&(u+=r[p]),p++;let c=At(u),s=new t(c);e.push(s.parse())}else n+=r[p],p++;return n&&e.push(n),{type:"StringInterp",parts:e}}};function ge(t){let r=At(t);return new pt(r).parse()}export{d as a,ge as b};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as w,e as y,f as a}from"./chunk-2ERMTDAT.js";import{g as i,j as p}from"./chunk-DEQBZDPB.js";async function g(e,r,c){let{cmdName:n,allowStdinMarker:l=!0,stopOnError:d=!1,batchSize:s=100}=c;if(r.length===0)return{files:[{filename:"",content:await a(e.stdin)}],stderr:"",exitCode:0};let h=null;l&&r.some(o=>o==="-")&&(h=await a(e.stdin));let f=[],u="",m=0;for(let o=0;o<r.length;o+=s){let C=r.slice(o,o+s),S=await Promise.all(C.map(async t=>{if(l&&t==="-")return{filename:"-",content:h??i,error:null};try{let E=e.fs.resolvePath(e.cwd,t),P=await a(await e.fs.readFile(E));return{filename:t,content:P,error:null}}catch{return{filename:t,content:i,error:`${n}: ${t}: No such file or directory
|
|
2
|
-
`}}}));for(let t of S)if(t.error){if(u+=t.error,m=1,d)return{files:f,stderr:u,exitCode:m}}else f.push({filename:t.filename,content:t.content})}return{files:f,stderr:u,exitCode:m}}async function F(e,r,c){let n=await g(e,r,{...c,stopOnError:!0});return n.exitCode!==0?{ok:!1,error:{stdout:w(),stderr:y(n.stderr),exitCode:n.exitCode}}:{ok:!0,content:n.files.reduce((d,s)=>p(d,s.content),i)}}export{g as a,F as b};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./chunk-44UOCSGV.js";import{a as f}from"./chunk-PUYKMBEQ.js";import{b as m,e as s}from"./chunk-2ERMTDAT.js";import{k as l}from"./chunk-DEQBZDPB.js";var v={recursive:{short:"p",long:"parents",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},E={name:"mkdir",async execute(g,n){let p=l(g),e=f("mkdir",p,v);if(!e.ok)return e.error;let y=e.result.flags.recursive,k=e.result.flags.verbose,a=e.result.positional;if(a.length===0)return{stdout:m(),stderr:s(`mkdir: missing operand
|
|
2
|
-
`),exitCode:1};let d="",o="",c=0;for(let r of a)try{let i=n.fs.resolvePath(n.cwd,r);await n.fs.mkdir(i,{recursive:y}),k&&(d+=`mkdir: created directory '${r}'
|
|
3
|
-
`)}catch(i){let t=u(i);t.includes("ENOENT")||t.includes("no such file")?o+=`mkdir: cannot create directory '${r}': No such file or directory
|
|
4
|
-
`:t.includes("EEXIST")||t.includes("already exists")?o+=`mkdir: cannot create directory '${r}': File exists
|
|
5
|
-
`:o+=`mkdir: cannot create directory '${r}': ${t}
|
|
6
|
-
`,c=1}return{stdout:s(d),stderr:s(o),exitCode:c}}},A={name:"mkdir",flags:[{flag:"-p",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0};export{E as a,A as b};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{a as S}from"./chunk-PUYKMBEQ.js";import{a as C,b as T}from"./chunk-CWN6Z4S3.js";import{b as d,e as p,k as x}from"./chunk-2ERMTDAT.js";import{k as O}from"./chunk-DEQBZDPB.js";var U={name:"uniq",summary:"report or omit repeated lines",usage:"uniq [OPTION]... [INPUT [OUTPUT]]",options:["-c, --count prefix lines by the number of occurrences","-d, --repeated only print duplicate lines","-i, --ignore-case ignore case when comparing","-u, --unique only print unique lines"," --help display this help and exit"]},v={count:{short:"c",long:"count",type:"boolean"},duplicatesOnly:{short:"d",long:"repeated",type:"boolean"},uniqueOnly:{short:"u",long:"unique",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},R={name:"uniq",async execute(F,t){let f=O(F);if(T(f))return C(U);let s=S("uniq",f,v);if(!s.ok)return s.error;let{count:I,duplicatesOnly:P,uniqueOnly:$,ignoreCase:k}=s.result.flags,y=s.result.positional,l,g="";if(y.length===0)l=t.stdin;else{let e=y[0];if(e==="-")l=t.stdin;else try{l=await t.fs.readFile(t.fs.resolvePath(t.cwd,e))}catch{return{stdout:d(),stderr:p(`uniq: ${e}: No such file or directory
|
|
2
|
-
`),exitCode:1}}}let H=new TextDecoder,m=new TextEncoder,h=(e,i)=>P&&i<=1||$&&i!==1?"":I?`${String(i).padStart(4)} ${e}
|
|
3
|
-
`:`${e}
|
|
4
|
-
`,L=e=>k?e.toLowerCase():e,o=null,n=null,u="",r=0,q=!1;return{stdout:new ReadableStream({async pull(e){for(o===null&&(o=x(l)[Symbol.asyncIterator]());;){let{done:i,value:N}=await o.next();if(i){if(!q&&n!==null){q=!0;let w=h(n,r);if(w.length>0){e.enqueue(m.encode(w));return}}e.close();return}let a=H.decode(N),c=L(a);if(n===null){n=a,u=c,r=1;continue}if(c===u){r++;continue}let b=h(n,r);if(n=a,u=c,r=1,b.length>0){e.enqueue(m.encode(b));return}}},async cancel(){if(o?.return)try{await o.return()}catch{}}}),stderr:g.length>0?p(g):d(),exitCode:0}}},j={name:"uniq",flags:[{flag:"-c",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-u",type:"boolean"},{flag:"-i",type:"boolean"}],stdinType:"text",needsFiles:!0};export{R as a,j as b};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as C}from"./chunk-PUYKMBEQ.js";import{a as b,b as w}from"./chunk-CWN6Z4S3.js";import{b as e,e as o,f}from"./chunk-2ERMTDAT.js";import{i as u,k as y}from"./chunk-DEQBZDPB.js";import*as F from"diff";var D={name:"diff",summary:"compare files line by line",usage:"diff [OPTION]... FILE1 FILE2",options:["-u, --unified output unified diff format (default)","-q, --brief report only whether files differ","-s, --report-identical-files report when files are the same","-i, --ignore-case ignore case differences"," --help display this help and exit"]},E={unified:{short:"u",long:"unified",type:"boolean"},brief:{short:"q",long:"brief",type:"boolean"},reportSame:{short:"s",long:"report-identical-files",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},z={name:"diff",async execute(x,t){let c=y(x);if(w(c))return b(D);let r=C("diff",c,E);if(!r.ok)return r.error;let S=r.result.flags.brief,$=r.result.flags.reportSame,q=r.result.flags.ignoreCase,p=r.result.positional;if(r.result.flags.unified,p.length<2)return{stdout:e(),stderr:o(`diff: missing operand
|
|
2
|
-
`),exitCode:2};let n,a,[i,s]=p,l=null,g=async()=>(l===null&&(l=await f(t.stdin)),l);try{n=i==="-"?await g():await f(await t.fs.readFile(t.fs.resolvePath(t.cwd,i)))}catch{return{stdout:e(),stderr:o(`diff: ${i}: No such file or directory
|
|
3
|
-
`),exitCode:2}}try{a=s==="-"?await g():await f(await t.fs.readFile(t.fs.resolvePath(t.cwd,s)))}catch{return{stdout:e(),stderr:o(`diff: ${s}: No such file or directory
|
|
4
|
-
`),exitCode:2}}let v=n.length===a.length&&n.every((L,P)=>L===a[P]),m=u(n),h=u(a),d=v;if(!d&&q&&(d=m.toLowerCase()===h.toLowerCase()),d)return $?{stdout:o(`Files ${i} and ${s} are identical
|
|
5
|
-
`),stderr:e(),exitCode:0}:{stdout:e(),stderr:e(),exitCode:0};if(S)return{stdout:o(`Files ${i} and ${s} differ
|
|
6
|
-
`),stderr:e(),exitCode:1};let A=F.createTwoFilesPatch(i,s,m,h,"","",{context:3});return{stdout:o(A),stderr:e(),exitCode:1}}},O={name:"diff",flags:[{flag:"-u",type:"boolean"},{flag:"-q",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-i",type:"boolean"}],needsArgs:!0,minArgs:2};export{z as a,O as b};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as u,b as m}from"./chunk-CWN6Z4S3.js";import{b as t,e as a}from"./chunk-2ERMTDAT.js";import{k as l}from"./chunk-DEQBZDPB.js";var d={name:"sleep",summary:"delay for a specified amount of time",usage:"sleep NUMBER[SUFFIX]",description:`Pause for NUMBER seconds. SUFFIX may be:
|
|
2
|
-
s - seconds (default)
|
|
3
|
-
m - minutes
|
|
4
|
-
h - hours
|
|
5
|
-
d - days
|
|
6
|
-
|
|
7
|
-
NUMBER may be a decimal number.`,options:[" --help display this help and exit"]};function p(o){let s=o.match(/^(\d+\.?\d*)(s|m|h|d)?$/);if(!s)return null;let e=parseFloat(s[1]);switch(s[2]||"s"){case"s":return e*1e3;case"m":return e*60*1e3;case"h":return e*60*60*1e3;case"d":return e*24*60*60*1e3;default:return null}}var g={name:"sleep",async execute(o,s){let e=l(o);if(m(e))return u(d);if(e.length===0)return{stdout:t(),stderr:a(`sleep: missing operand
|
|
8
|
-
`),exitCode:1};let r=0;for(let n of e){let i=p(n);if(i===null)return{stdout:t(),stderr:a(`sleep: invalid time interval '${n}'
|
|
9
|
-
`),exitCode:1};r+=i}return s.sleep?await s.sleep(r):await new Promise(n=>setTimeout(n,r)),{stdout:t(),stderr:t(),exitCode:0}}},x={name:"sleep",flags:[],needsArgs:!0};export{g as a,x as b};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{a as P}from"./chunk-44UOCSGV.js";import{a as C}from"./chunk-PUYKMBEQ.js";import{a as $,b as w}from"./chunk-CWN6Z4S3.js";import{b as d,e as o}from"./chunk-2ERMTDAT.js";import{k as h}from"./chunk-DEQBZDPB.js";var N={name:"cp",summary:"copy files and directories",usage:"cp [OPTION]... SOURCE... DEST",options:["-r, -R, --recursive copy directories recursively","-n, --no-clobber do not overwrite an existing file","-p, --preserve preserve file attributes","-v, --verbose explain what is being done"," --help display this help and exit"]},O={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},preserve:{short:"p",long:"preserve",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},U={name:"cp",async execute(D,e){let g=h(D);if(w(g))return $(N);let t=C("cp",g,O);if(!t.ok)return t.error;let u=t.result.flags.recursive||t.result.flags.recursiveUpper,E=t.result.flags.noClobber,S=t.result.flags.preserve,A=t.result.flags.verbose,l=t.result.positional;if(l.length<2)return{stdout:d(),stderr:o(`cp: missing destination file operand
|
|
2
|
-
`),exitCode:1};let b=l.pop()??"",y=l,n=e.fs.resolvePath(e.cwd,b),m="",a="",p=0,f=!1;try{f=(await e.fs.stat(n)).isDirectory}catch{}if(y.length>1&&!f)return{stdout:d(),stderr:o(`cp: target '${b}' is not a directory
|
|
3
|
-
`),exitCode:1};for(let r of y)try{let i=e.fs.resolvePath(e.cwd,r),s=await e.fs.stat(i),c=n;if(f){let v=r.split("/").pop()||r;c=n==="/"?`/${v}`:`${n}/${v}`}if(s.isDirectory&&!u){a+=`cp: -r not specified; omitting directory '${r}'
|
|
4
|
-
`,p=1;continue}if(E)try{await e.fs.stat(c);continue}catch{}await e.fs.cp(i,c,{recursive:u}),A&&(m+=`'${r}' -> '${c}'
|
|
5
|
-
`)}catch(i){let s=P(i);s.includes("ENOENT")||s.includes("no such file")?a+=`cp: cannot stat '${r}': No such file or directory
|
|
6
|
-
`:a+=`cp: cannot copy '${r}': ${s}
|
|
7
|
-
`,p=1}return{stdout:o(m),stderr:o(a),exitCode:p}}},z={name:"cp",flags:[{flag:"-r",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-p",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{U as a,z as b};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{a as h,b as x,c as m}from"./chunk-CWN6Z4S3.js";import{b as n,e as o}from"./chunk-2ERMTDAT.js";import{k as p}from"./chunk-DEQBZDPB.js";var k={name:"timeout",summary:"run a command with a time limit",usage:"timeout [OPTION] DURATION COMMAND [ARG]...",description:`Start COMMAND, and kill it if still running after DURATION.
|
|
2
|
-
|
|
3
|
-
DURATION is a number with optional suffix:
|
|
4
|
-
s - seconds (default)
|
|
5
|
-
m - minutes
|
|
6
|
-
h - hours
|
|
7
|
-
d - days`,options:["-k, --kill-after=DURATION send KILL signal after DURATION if still running","-s, --signal=SIGNAL specify signal to send (default: TERM)"," --preserve-status exit with same status as COMMAND, even on timeout"," --foreground run command in foreground"," --help display this help and exit"]};function w(a){let r=a.match(/^(\d+\.?\d*)(s|m|h|d)?$/);if(!r)return null;let i=parseFloat(r[1]);switch(r[2]||"s"){case"s":return i*1e3;case"m":return i*60*1e3;case"h":return i*60*60*1e3;case"d":return i*24*60*60*1e3;default:return null}}var C={name:"timeout",async execute(a,r){let i=p(a);if(x(i))return h(k);let u=!1,s=0;for(let t=0;t<i.length;t++){let e=i[t];if(e==="--preserve-status")u=!0,s=t+1;else if(e==="--foreground")s=t+1;else if(e==="-k"||e==="--kill-after")t++,s=t+1;else if(e.startsWith("--kill-after="))s=t+1;else if(e==="-s"||e==="--signal")t++,s=t+1;else if(e.startsWith("--signal="))s=t+1;else{if(e.startsWith("--")&&e!=="--")return m("timeout",e);if(e.startsWith("-")&&e.length>1&&e!=="--")if(e.startsWith("-k"))s=t+1;else if(e.startsWith("-s"))s=t+1;else return m("timeout",e);else{s=t;break}}}let l=i.slice(s);if(l.length===0)return{stdout:n(),stderr:o(`timeout: missing operand
|
|
8
|
-
`),exitCode:1};let d=l[0],f=w(d);if(f===null)return{stdout:n(),stderr:o(`timeout: invalid time interval '${d}'
|
|
9
|
-
`),exitCode:1};let c=l.slice(1);if(c.length===0)return{stdout:n(),stderr:o(`timeout: missing operand
|
|
10
|
-
`),exitCode:1};if(!r.exec)return{stdout:n(),stderr:o(`timeout: exec not available
|
|
11
|
-
`),exitCode:1};let A=c.map(t=>t.includes(" ")||t.includes(" ")?`'${t.replace(/'/g,"'\\''")}'`:t).join(" "),O=new Promise(t=>{setTimeout(()=>t({timedOut:!0}),f)}),v=r.exec(A,{cwd:r.cwd}).then(t=>({timedOut:!1,result:t})),g=await Promise.race([O,v]);return g.timedOut?{stdout:n(),stderr:n(),exitCode:124}:g.result}},I={name:"timeout",flags:[{flag:"-k",type:"value",valueHint:"string"},{flag:"-s",type:"value",valueHint:"string"},{flag:"--preserve-status",type:"boolean"},{flag:"--foreground",type:"boolean"}],needsArgs:!0,minArgs:2};export{C as a,I as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-SMDXZHIL.js";var s=m("md5sum","md5","compute MD5 message digest"),o={name:"md5sum",flags:[{flag:"-c",type:"boolean"}],needsFiles:!0};export{s as a,o as b};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import{a as A}from"./chunk-XYWNAVNS.js";import{k as S}from"./chunk-O3BQP2BR.js";import{a as J,b as Y,c as W}from"./chunk-CWN6Z4S3.js";import{b as R,e as x,g as D}from"./chunk-2ERMTDAT.js";import{k as Q}from"./chunk-DEQBZDPB.js";var q=new Map([["alnum","a-zA-Z0-9"],["alpha","a-zA-Z"],["ascii","\\x00-\\x7F"],["blank"," \\t"],["cntrl","\\x00-\\x1F\\x7F"],["digit","0-9"],["graph","!-~"],["lower","a-z"],["print"," -~"],["punct","!-/:-@\\[-`{-~"],["space"," \\t\\n\\r\\f\\v"],["upper","A-Z"],["word","a-zA-Z0-9_"],["xdigit","0-9A-Fa-f"]]);function U(i){let e="",t=0,n=!1;for(;t<i.length;){if(i[t]==="["&&!n){if(i[t+1]==="["&&i[t+2]===":"){let s=i.indexOf(":]]",t+3);if(s!==-1){let r=i.slice(t+3,s),a=q.get(r);if(a){e+=`[${a}]`,t=s+3;continue}}}if(i[t+1]==="^"&&i[t+2]==="["&&i[t+3]===":"){let s=i.indexOf(":]]",t+4);if(s!==-1){let r=i.slice(t+4,s),a=q.get(r);if(a){e+=`[^${a}]`,t=s+3;continue}}}e+="[",t++,n=!0,t<i.length&&i[t]==="^"&&(e+="^",t++),t<i.length&&i[t]==="]"&&(e+="\\]",t++);continue}if(n){if(i[t]==="]"){e+="]",t++,n=!1;continue}if(i[t]==="["&&i[t+1]===":"){let s=i.indexOf(":]",t+2);if(s!==-1){let r=i.slice(t+2,s),a=q.get(r);if(a){e+=a,t=s+2;continue}}}if(i[t]==="\\"&&t+1<i.length){e+=i[t]+i[t+1],t+=2;continue}e+=i[t],t++;continue}if(i[t]==="\\"&&t+1<i.length){let s=i[t+1];if(s==="+"||s==="?"||s==="|"){e+=s,t+=2;continue}if(s==="("||s===")"){e+=s,t+=2;continue}if(s==="{"||s==="}"){e+=s,t+=2;continue}if(s==="t"){e+=" ",t+=2;continue}if(s==="n"){e+=`
|
|
2
|
-
`,t+=2;continue}if(s==="r"){e+="\r",t+=2;continue}e+=i[t]+s,t+=2;continue}if(i[t]==="+"||i[t]==="?"||i[t]==="|"||i[t]==="("||i[t]===")"){e+=`\\${i[t]}`,t++;continue}if(i[t]==="^"&&!(e===""||e.endsWith("("))){e+="\\^",t++;continue}if(i[t]==="$"){let s=t===i.length-1,r=t+2<i.length&&i[t+1]==="\\"&&i[t+2]===")";if(!s&&!r){e+="\\$",t++;continue}}e+=i[t],t++}return e}function H(i){let e="",t=!1;for(let n=0;n<i.length;n++)i[n]==="["&&!t?(t=!0,e+="[",n++,n<i.length&&i[n]==="^"&&(e+="^",n++),n<i.length&&i[n]==="]"&&(e+="]",n++),n--):i[n]==="]"&&t?(t=!1,e+="]"):!t&&i[n]==="{"&&i[n+1]===","?(e+="{0,",n++):e+=i[n];return e}function ee(i){let e="";for(let t=0;t<i.length;t++){let n=i[t],s=n.charCodeAt(0);n==="\\"?e+="\\\\":n===" "?e+="\\t":n===`
|
|
3
|
-
`?e+=`$
|
|
4
|
-
`:n==="\r"?e+="\\r":n==="\x07"?e+="\\a":n==="\b"?e+="\\b":n==="\f"?e+="\\f":n==="\v"?e+="\\v":s<32||s>=127?e+=`\\${s.toString(8).padStart(3,"0")}`:e+=n}return`${e}$`}var ue=1e4;function te(i,e,t){return{patternSpace:"",holdSpace:"",lineNumber:0,totalLines:i,deleted:!1,printed:!1,quit:!1,quitSilent:!1,exitCode:void 0,errorMessage:void 0,appendBuffer:[],substitutionMade:!1,lineNumberOutput:[],nCommandOutput:[],restartCycle:!1,inDRestartedCycle:!1,currentFilename:e,pendingFileReads:[],pendingFileWrites:[],pendingExecute:void 0,rangeStates:t||new Map,linesConsumedInCycle:0}}function he(i){return typeof i=="object"&&"first"in i&&"step"in i}function de(i){return typeof i=="object"&&"offset"in i}function L(i,e,t,n,s){if(i==="$")return e===t;if(typeof i=="number")return e===i;if(he(i)){let{first:r,step:a}=i;return a===0?e===r:(e-r)%a===0&&e>=r}if(typeof i=="object"&&"pattern"in i)try{let r=i.pattern;r===""&&s?.lastPattern?r=s.lastPattern:r!==""&&s&&(s.lastPattern=r);let a=H(U(r));return A(a).test(n)}catch{return!1}return!1}function z(i){let e=t=>t===void 0?"undefined":t==="$"?"$":typeof t=="number"?String(t):"pattern"in t?`/${t.pattern}/`:"first"in t?`${t.first}~${t.step}`:"unknown";return`${e(i.start)},${e(i.end)}`}function fe(i,e,t,n,s,r){if(!i||!i.start&&!i.end)return!0;let a=i.start,l=i.end;if(a!==void 0&&l===void 0)return L(a,e,t,n,r);if(a!==void 0&&l!==void 0){let o=typeof a=="object"&&"pattern"in a,u=typeof l=="object"&&"pattern"in l,p=de(l);if(p&&s){let g=z(i),f=s.get(g);if(f||(f={active:!1},s.set(g,f)),f.active){let b=f.startLine||e;return e>=b+l.offset&&(f.active=!1,s.set(g,f)),!0}else return L(a,e,t,n,r)?(f.active=!0,f.startLine=e,s.set(g,f),l.offset===0&&(f.active=!1,s.set(g,f)),!0):!1}if(!o&&!u&&!p){let g=typeof a=="number"?a:a==="$"?t:1,f=typeof l=="number"?l:t;if(g<=f)return e>=g&&e<=f;if(s){let b=z(i),h=s.get(b);return h||(h={active:!1},s.set(b,h)),!h.completed&&e>=g?(h.completed=!0,s.set(b,h),!0):!1}return!1}if(s){let g=z(i),f=s.get(g);if(f||(f={active:!1},s.set(g,f)),f.active)return L(l,e,t,n,r)&&(f.active=!1,typeof a=="number"&&(f.completed=!0),s.set(g,f)),!0;{if(f.completed)return!1;let b=!1;return typeof a=="number"?b=e>=a:b=L(a,e,t,n,r),b?(f.active=!0,f.startLine=e,s.set(g,f),L(l,e,t,n,r)&&(f.active=!1,typeof a=="number"&&(f.completed=!0),s.set(g,f)),!0):!1}}return L(a,e,t,n,r)}return!0}function N(i,e,t,n,s,r){let a=fe(i,e,t,n,s,r);return i?.negated?!a:a}function pe(i,e,t,n){let s="",r=0,a=!1;for(;r<=i.length;){e.lastIndex=r;let l=e.exec(i);if(!l){s+=i.slice(r);break}if(l.index!==r){s+=i.slice(r,l.index),r=l.index,a=!1;continue}let o=l[0],u=l.slice(1);if(a&&o.length===0){if(r<i.length)s+=i[r],r++;else break;a=!1;continue}if(s+=n(o,u),a=!1,o.length===0)if(r<i.length)s+=i[r],r++;else break;else r+=o.length,a=!0}return s}function V(i,e,t){let n="",s=0;for(;s<i.length;){if(i[s]==="\\"&&s+1<i.length){let r=i[s+1];if(r==="&"){n+="&",s+=2;continue}if(r==="n"){n+=`
|
|
5
|
-
`,s+=2;continue}if(r==="t"){n+=" ",s+=2;continue}if(r==="r"){n+="\r",s+=2;continue}let a=parseInt(r,10);if(a===0){n+=e,s+=2;continue}if(a>=1&&a<=9){n+=t[a-1]||"",s+=2;continue}n+=r,s+=2;continue}if(i[s]==="&"){n+=e,s++;continue}n+=i[s],s++}return n}function me(i,e){let{lineNumber:t,totalLines:n,patternSpace:s}=e;if(i.type==="label"){e.coverage?.hit(`sed:cmd:${i.type}`);return}if(N(i.address,t,n,s,e.rangeStates,e))switch(e.coverage?.hit(`sed:cmd:${i.type}`),i.type){case"substitute":{let r=i,a="";r.global&&(a+="g"),r.ignoreCase&&(a+="i");let l=r.pattern;l===""&&e.lastPattern?l=e.lastPattern:l!==""&&(e.lastPattern=l);let o=H(r.extendedRegex?l:U(l));try{let u=A(o,a),p=u.test(e.patternSpace);if(u.lastIndex=0,p){if(e.substitutionMade=!0,r.nthOccurrence&&r.nthOccurrence>0&&!r.global){let C=0,g=r.nthOccurrence,f=A(o,`g${r.ignoreCase?"i":""}`);e.patternSpace=f.replace(e.patternSpace,(b,...h)=>{if(C++,C===g){let d=h.slice(0,-2);return V(r.replacement,b,d)}return b})}else if(r.global){let C=A(o,`g${r.ignoreCase?"i":""}`);e.patternSpace=pe(e.patternSpace,C,r.replacement,(g,f)=>V(r.replacement,g,f))}else e.patternSpace=u.replace(e.patternSpace,(C,...g)=>{let f=g.slice(0,-2);return V(r.replacement,C,f)});r.printOnMatch&&e.lineNumberOutput.push(e.patternSpace)}}catch{}break}case"print":e.lineNumberOutput.push(e.patternSpace);break;case"printFirstLine":{let r=e.patternSpace.indexOf(`
|
|
6
|
-
`);r!==-1?e.lineNumberOutput.push(e.patternSpace.slice(0,r)):e.lineNumberOutput.push(e.patternSpace);break}case"delete":e.deleted=!0;break;case"deleteFirstLine":{let r=e.patternSpace.indexOf(`
|
|
7
|
-
`);r!==-1?(e.patternSpace=e.patternSpace.slice(r+1),e.restartCycle=!0,e.inDRestartedCycle=!0):e.deleted=!0;break}case"zap":e.patternSpace="";break;case"append":e.appendBuffer.push(i.text);break;case"insert":e.appendBuffer.unshift(`__INSERT__${i.text}`);break;case"change":e.deleted=!0,e.changedText=i.text;break;case"hold":e.holdSpace=e.patternSpace;break;case"holdAppend":e.holdSpace?e.holdSpace+=`
|
|
8
|
-
${e.patternSpace}`:e.holdSpace=e.patternSpace;break;case"get":e.patternSpace=e.holdSpace;break;case"getAppend":e.patternSpace+=`
|
|
9
|
-
${e.holdSpace}`;break;case"exchange":{let r=e.patternSpace;e.patternSpace=e.holdSpace,e.holdSpace=r;break}case"next":e.printed=!0;break;case"quit":e.quit=!0,i.exitCode!==void 0&&(e.exitCode=i.exitCode);break;case"quitSilent":e.quit=!0,e.quitSilent=!0,i.exitCode!==void 0&&(e.exitCode=i.exitCode);break;case"list":{let r=ee(e.patternSpace);e.lineNumberOutput.push(r);break}case"printFilename":e.currentFilename&&e.lineNumberOutput.push(e.currentFilename);break;case"version":{let r=[4,8,0];if(i.minVersion){let a=i.minVersion.split("."),l=[],o=!1;for(let u of a){let p=parseInt(u,10);if(Number.isNaN(p)||p<0){e.quit=!0,e.exitCode=1,e.errorMessage=`sed: invalid version string: ${i.minVersion}`,o=!0;break}l.push(p)}if(!o){for(;l.length<3;)l.push(0);for(let u=0;u<3;u++){if(l[u]>r[u]){e.quit=!0,e.exitCode=1,e.errorMessage=`sed: this is not GNU sed version ${i.minVersion}`;break}if(l[u]<r[u])break}}}break}case"readFile":e.pendingFileReads.push({filename:i.filename,wholeFile:!0});break;case"readFileLine":e.pendingFileReads.push({filename:i.filename,wholeFile:!1});break;case"writeFile":e.pendingFileWrites.push({filename:i.filename,content:`${e.patternSpace}
|
|
10
|
-
`});break;case"writeFirstLine":{let r=e.patternSpace.indexOf(`
|
|
11
|
-
`),a=r!==-1?e.patternSpace.slice(0,r):e.patternSpace;e.pendingFileWrites.push({filename:i.filename,content:`${a}
|
|
12
|
-
`});break}case"execute":i.command?e.pendingExecute={command:i.command,replacePattern:!1}:e.pendingExecute={command:e.patternSpace,replacePattern:!0};break;case"transliterate":e.patternSpace=ge(e.patternSpace,i);break;case"lineNumber":e.lineNumberOutput.push(String(e.lineNumber));break;case"branch":break;case"branchOnSubst":break;case"branchOnNoSubst":break;case"group":break}}function ge(i,e){let t="";for(let n of i){let s=e.source.indexOf(n);s!==-1?t+=e.dest[s]:t+=n}return t}function X(i,e,t,n){let s=new Map;for(let o=0;o<i.length;o++){let u=i[o];u.type==="label"&&s.set(u.name,o)}let r=n?.maxIterations??ue,a=0,l=0;for(;l<i.length;){if(a++,a>r)throw new S(`sed: command execution exceeded maximum iterations (${r})`,"iterations");if(e.deleted||e.quit||e.quitSilent||e.restartCycle)break;let o=i[l];if(o.type==="next"){if(N(o.address,e.lineNumber,e.totalLines,e.patternSpace,e.rangeStates,e))if(e.coverage?.hit("sed:cmd:next"),e.nCommandOutput.push(e.patternSpace),t&&t.currentLineIndex+e.linesConsumedInCycle+1<t.lines.length){e.linesConsumedInCycle++;let u=t.lines[t.currentLineIndex+e.linesConsumedInCycle];e.patternSpace=u,e.lineNumber=t.currentLineIndex+e.linesConsumedInCycle+1,e.substitutionMade=!1}else{e.quit=!0,e.deleted=!0;break}l++;continue}if(o.type==="nextAppend"){if(N(o.address,e.lineNumber,e.totalLines,e.patternSpace,e.rangeStates,e))if(e.coverage?.hit("sed:cmd:nextAppend"),t&&t.currentLineIndex+e.linesConsumedInCycle+1<t.lines.length){e.linesConsumedInCycle++;let u=t.lines[t.currentLineIndex+e.linesConsumedInCycle];e.patternSpace+=`
|
|
13
|
-
${u}`,e.lineNumber=t.currentLineIndex+e.linesConsumedInCycle+1}else{e.quit=!0;break}l++;continue}if(o.type==="branch"){let u=o;if(N(u.address,e.lineNumber,e.totalLines,e.patternSpace,e.rangeStates,e)){if(e.coverage?.hit("sed:cmd:branch"),u.label){let p=s.get(u.label);if(p!==void 0){l=p;continue}e.branchRequest=u.label;break}break}l++;continue}if(o.type==="branchOnSubst"){let u=o;if(N(u.address,e.lineNumber,e.totalLines,e.patternSpace,e.rangeStates,e)&&(e.coverage?.hit("sed:cmd:branchOnSubst"),e.substitutionMade)){if(e.substitutionMade=!1,u.label){let p=s.get(u.label);if(p!==void 0){l=p;continue}e.branchRequest=u.label;break}break}l++;continue}if(o.type==="branchOnNoSubst"){let u=o;if(N(u.address,e.lineNumber,e.totalLines,e.patternSpace,e.rangeStates,e)&&(e.coverage?.hit("sed:cmd:branchOnNoSubst"),!e.substitutionMade)){if(u.label){let p=s.get(u.label);if(p!==void 0){l=p;continue}e.branchRequest=u.label;break}break}l++;continue}if(o.type==="group"){let u=o;if(N(u.address,e.lineNumber,e.totalLines,e.patternSpace,e.rangeStates,e)&&(e.coverage?.hit("sed:cmd:group"),X(u.commands,e,t,n),e.branchRequest)){let p=s.get(e.branchRequest);if(p!==void 0){e.branchRequest=void 0,l=p;continue}break}l++;continue}me(o,e),l++}return e.linesConsumedInCycle}var c;(function(i){i.NUMBER="NUMBER",i.DOLLAR="DOLLAR",i.PATTERN="PATTERN",i.STEP="STEP",i.RELATIVE_OFFSET="RELATIVE_OFFSET",i.LBRACE="LBRACE",i.RBRACE="RBRACE",i.SEMICOLON="SEMICOLON",i.NEWLINE="NEWLINE",i.COMMA="COMMA",i.NEGATION="NEGATION",i.COMMAND="COMMAND",i.SUBSTITUTE="SUBSTITUTE",i.TRANSLITERATE="TRANSLITERATE",i.LABEL_DEF="LABEL_DEF",i.BRANCH="BRANCH",i.BRANCH_ON_SUBST="BRANCH_ON_SUBST",i.BRANCH_ON_NO_SUBST="BRANCH_ON_NO_SUBST",i.TEXT_CMD="TEXT_CMD",i.FILE_READ="FILE_READ",i.FILE_READ_LINE="FILE_READ_LINE",i.FILE_WRITE="FILE_WRITE",i.FILE_WRITE_LINE="FILE_WRITE_LINE",i.EXECUTE="EXECUTE",i.VERSION="VERSION",i.EOF="EOF",i.ERROR="ERROR"})(c||(c={}));var _=class{input;pos=0;line=1;column=1;constructor(e){this.input=e}tokenize(){let e=[];for(;this.pos<this.input.length;){let t=this.nextToken();t&&e.push(t)}return e.push(this.makeToken(c.EOF,"")),e}makeToken(e,t,n){return{type:e,value:t,line:this.line,column:this.column,...n}}peek(e=0){return this.input[this.pos+e]||""}advance(){let e=this.input[this.pos++]||"";return e===`
|
|
14
|
-
`?(this.line++,this.column=1):this.column++,e}readEscapedString(e){let t="";for(;this.pos<this.input.length&&this.peek()!==e;)if(this.peek()==="\\"){this.advance();let n=this.advance();n==="n"?t+=`
|
|
15
|
-
`:n==="t"?t+=" ":t+=n}else{if(this.peek()===`
|
|
16
|
-
`)return null;t+=this.advance()}return t}skipWhitespace(){for(;this.pos<this.input.length;){let e=this.peek();if(e===" "||e===" "||e==="\r")this.advance();else if(e==="#")for(;this.pos<this.input.length&&this.peek()!==`
|
|
17
|
-
`;)this.advance();else break}}nextToken(){if(this.skipWhitespace(),this.pos>=this.input.length)return null;let e=this.line,t=this.column,n=this.peek();return n===`
|
|
18
|
-
`?(this.advance(),{type:c.NEWLINE,value:`
|
|
19
|
-
`,line:e,column:t}):n===";"?(this.advance(),{type:c.SEMICOLON,value:";",line:e,column:t}):n==="{"?(this.advance(),{type:c.LBRACE,value:"{",line:e,column:t}):n==="}"?(this.advance(),{type:c.RBRACE,value:"}",line:e,column:t}):n===","?(this.advance(),{type:c.COMMA,value:",",line:e,column:t}):n==="!"?(this.advance(),{type:c.NEGATION,value:"!",line:e,column:t}):n==="$"?(this.advance(),{type:c.DOLLAR,value:"$",line:e,column:t}):this.isDigit(n)?this.readNumber():n==="+"&&this.isDigit(this.input[this.pos+1]||"")?this.readRelativeOffset():n==="/"?this.readPattern():n===":"?this.readLabelDef():this.readCommand()}readNumber(){let e=this.line,t=this.column,n="";for(;this.isDigit(this.peek());)n+=this.advance();if(this.peek()==="~"){this.advance();let s="";for(;this.isDigit(this.peek());)s+=this.advance();let r=parseInt(n,10),a=parseInt(s,10)||0;return{type:c.STEP,value:`${r}~${a}`,first:r,step:a,line:e,column:t}}return{type:c.NUMBER,value:parseInt(n,10),line:e,column:t}}readRelativeOffset(){let e=this.line,t=this.column;this.advance();let n="";for(;this.isDigit(this.peek());)n+=this.advance();let s=parseInt(n,10)||0;return{type:c.RELATIVE_OFFSET,value:`+${s}`,offset:s,line:e,column:t}}readPattern(){let e=this.line,t=this.column;this.advance();let n="",s=!1;for(;this.pos<this.input.length;){let r=this.peek();if(r==="/"&&!s)break;if(r==="\\")n+=this.advance(),this.pos<this.input.length&&this.peek()!==`
|
|
20
|
-
`&&(n+=this.advance());else{if(r===`
|
|
21
|
-
`)break;r==="["&&!s?(s=!0,n+=this.advance(),this.peek()==="^"&&(n+=this.advance()),this.peek()==="]"&&(n+=this.advance())):r==="]"&&s?(s=!1,n+=this.advance()):n+=this.advance()}}return this.peek()==="/"&&this.advance(),{type:c.PATTERN,value:n,pattern:n,line:e,column:t}}readLabelDef(){let e=this.line,t=this.column;for(this.advance();this.peek()===" "||this.peek()===" ";)this.advance();let n="";for(;this.pos<this.input.length;){let s=this.peek();if(s===" "||s===" "||s===`
|
|
22
|
-
`||s===";"||s==="}"||s==="{")break;n+=this.advance()}return{type:c.LABEL_DEF,value:n,label:n,line:e,column:t}}readCommand(){let e=this.line,t=this.column,n=this.advance();switch(n){case"s":return this.readSubstitute(e,t);case"y":return this.readTransliterate(e,t);case"a":case"i":case"c":return this.readTextCommand(n,e,t);case"b":return this.readBranch(c.BRANCH,"b",e,t);case"t":return this.readBranch(c.BRANCH_ON_SUBST,"t",e,t);case"T":return this.readBranch(c.BRANCH_ON_NO_SUBST,"T",e,t);case"r":return this.readFileCommand(c.FILE_READ,"r",e,t);case"R":return this.readFileCommand(c.FILE_READ_LINE,"R",e,t);case"w":return this.readFileCommand(c.FILE_WRITE,"w",e,t);case"W":return this.readFileCommand(c.FILE_WRITE_LINE,"W",e,t);case"e":return this.readExecute(e,t);case"p":case"P":case"d":case"D":case"h":case"H":case"g":case"G":case"x":case"n":case"N":case"q":case"Q":case"z":case"=":case"l":case"F":return{type:c.COMMAND,value:n,line:e,column:t};case"v":return this.readVersion(e,t);default:return{type:c.ERROR,value:n,line:e,column:t}}}readSubstitute(e,t){let n=this.advance();if(!n||n===`
|
|
23
|
-
`)return{type:c.ERROR,value:"s",line:e,column:t};let s="",r=!1;for(;this.pos<this.input.length;){let o=this.peek();if(o===n&&!r)break;if(o==="\\")this.advance(),this.pos<this.input.length&&this.peek()!==`
|
|
24
|
-
`?this.peek()===n&&!r?s+=this.advance():(s+="\\",s+=this.advance()):s+="\\";else{if(o===`
|
|
25
|
-
`)break;o==="["&&!r?(r=!0,s+=this.advance(),this.peek()==="^"&&(s+=this.advance()),this.peek()==="]"&&(s+=this.advance())):o==="]"&&r?(r=!1,s+=this.advance()):s+=this.advance()}}if(this.peek()!==n)return{type:c.ERROR,value:"unterminated substitution pattern",line:e,column:t};this.advance();let a="";for(;this.pos<this.input.length&&this.peek()!==n;)if(this.peek()==="\\")if(this.advance(),this.pos<this.input.length){let o=this.peek();o==="\\"?(this.advance(),this.pos<this.input.length&&this.peek()===`
|
|
26
|
-
`?(a+=`
|
|
27
|
-
`,this.advance()):a+="\\"):o===`
|
|
28
|
-
`?(a+=`
|
|
29
|
-
`,this.advance()):a+=`\\${this.advance()}`}else a+="\\";else{if(this.peek()===`
|
|
30
|
-
`)break;a+=this.advance()}this.peek()===n&&this.advance();let l="";for(;this.pos<this.input.length;){let o=this.peek();if(o==="g"||o==="i"||o==="p"||o==="I"||this.isDigit(o))l+=this.advance();else break}return{type:c.SUBSTITUTE,value:`s${n}${s}${n}${a}${n}${l}`,pattern:s,replacement:a,flags:l,line:e,column:t}}readTransliterate(e,t){let n=this.advance();if(!n||n===`
|
|
31
|
-
`)return{type:c.ERROR,value:"y",line:e,column:t};let s=this.readEscapedString(n);if(s===null||this.peek()!==n)return{type:c.ERROR,value:"unterminated transliteration source",line:e,column:t};this.advance();let r=this.readEscapedString(n);if(r===null||this.peek()!==n)return{type:c.ERROR,value:"unterminated transliteration dest",line:e,column:t};this.advance();let a=this.peek();for(;a===" "||a===" ";)this.advance(),a=this.peek();return a!==""&&a!==";"&&a!==`
|
|
32
|
-
`&&a!=="}"?{type:c.ERROR,value:"extra text at the end of a transform command",line:e,column:t}:{type:c.TRANSLITERATE,value:`y${n}${s}${n}${r}${n}`,source:s,dest:r,line:e,column:t}}readTextCommand(e,t,n){let s=!1;this.peek()==="\\"&&this.pos+1<this.input.length&&(this.input[this.pos+1]===`
|
|
33
|
-
`||this.input[this.pos+1]===" "||this.input[this.pos+1]===" ")&&(s=!0,this.advance()),(this.peek()===" "||this.peek()===" ")&&this.advance(),this.peek()==="\\"&&this.pos+1<this.input.length&&(this.input[this.pos+1]===" "||this.input[this.pos+1]===" ")&&this.advance(),s&&this.peek()===`
|
|
34
|
-
`&&this.advance();let r="";for(;this.pos<this.input.length;){let a=this.peek();if(a===`
|
|
35
|
-
`){if(r.endsWith("\\")){r=`${r.slice(0,-1)}
|
|
36
|
-
`,this.advance();continue}break}if(a==="\\"&&this.pos+1<this.input.length){let l=this.input[this.pos+1];if(l==="n"){r+=`
|
|
37
|
-
`,this.advance(),this.advance();continue}if(l==="t"){r+=" ",this.advance(),this.advance();continue}if(l==="r"){r+="\r",this.advance(),this.advance();continue}}r+=this.advance()}return{type:c.TEXT_CMD,value:e,text:r,line:t,column:n}}readBranch(e,t,n,s){for(;this.peek()===" "||this.peek()===" ";)this.advance();let r="";for(;this.pos<this.input.length;){let a=this.peek();if(a===" "||a===" "||a===`
|
|
38
|
-
`||a===";"||a==="}"||a==="{")break;r+=this.advance()}return{type:e,value:t,label:r||void 0,line:n,column:s}}readVersion(e,t){for(;this.peek()===" "||this.peek()===" ";)this.advance();let n="";for(;this.pos<this.input.length;){let s=this.peek();if(s===" "||s===" "||s===`
|
|
39
|
-
`||s===";"||s==="}"||s==="{")break;n+=this.advance()}return{type:c.VERSION,value:"v",label:n||void 0,line:e,column:t}}readFileCommand(e,t,n,s){for(;this.peek()===" "||this.peek()===" ";)this.advance();let r="";for(;this.pos<this.input.length;){let a=this.peek();if(a===`
|
|
40
|
-
`||a===";")break;r+=this.advance()}return{type:e,value:t,filename:r.trim(),line:n,column:s}}readExecute(e,t){for(;this.peek()===" "||this.peek()===" ";)this.advance();let n="";for(;this.pos<this.input.length;){let s=this.peek();if(s===`
|
|
41
|
-
`||s===";")break;n+=this.advance()}return{type:c.EXECUTE,value:"e",command:n.trim()||void 0,line:e,column:t}}isDigit(e){return e>="0"&&e<="9"}};var G=class{scripts;tokens=[];pos=0;extendedRegex=!1;constructor(e,t=!1){this.scripts=e,this.extendedRegex=t}parse(){let e=[];for(let t of this.scripts){let n=new _(t);for(this.tokens=n.tokenize(),this.pos=0;!this.isAtEnd();){if(this.check(c.NEWLINE)||this.check(c.SEMICOLON)){this.advance();continue}let s=this.parseCommand();if(s.error)return{commands:[],error:s.error};s.command&&e.push(s.command)}}return{commands:e}}parseCommand(){let e=this.parseAddressRange();if(e?.error)return{command:null,error:e.error};let t=e?.address;for(this.check(c.NEGATION)&&(this.advance(),t&&(t.negated=!0));this.check(c.NEWLINE)||this.check(c.SEMICOLON);)this.advance();if(this.isAtEnd())return t&&(t.start!==void 0||t.end!==void 0)?{command:null,error:"command expected"}:{command:null};let n=this.peek();switch(n.type){case c.COMMAND:return this.parseSimpleCommand(n,t);case c.SUBSTITUTE:return this.parseSubstituteFromToken(n,t);case c.TRANSLITERATE:return this.parseTransliterateFromToken(n,t);case c.LABEL_DEF:return this.advance(),{command:{type:"label",name:n.label||""}};case c.BRANCH:return this.advance(),{command:{type:"branch",address:t,label:n.label}};case c.BRANCH_ON_SUBST:return this.advance(),{command:{type:"branchOnSubst",address:t,label:n.label}};case c.BRANCH_ON_NO_SUBST:return this.advance(),{command:{type:"branchOnNoSubst",address:t,label:n.label}};case c.TEXT_CMD:return this.advance(),this.parseTextCommand(n,t);case c.FILE_READ:return this.advance(),{command:{type:"readFile",address:t,filename:n.filename||""}};case c.FILE_READ_LINE:return this.advance(),{command:{type:"readFileLine",address:t,filename:n.filename||""}};case c.FILE_WRITE:return this.advance(),{command:{type:"writeFile",address:t,filename:n.filename||""}};case c.FILE_WRITE_LINE:return this.advance(),{command:{type:"writeFirstLine",address:t,filename:n.filename||""}};case c.EXECUTE:return this.advance(),{command:{type:"execute",address:t,command:n.command}};case c.VERSION:return this.advance(),{command:{type:"version",address:t,minVersion:n.label}};case c.LBRACE:return this.parseGroup(t);case c.RBRACE:return{command:null};case c.ERROR:return{command:null,error:`invalid command: ${n.value}`};default:return t&&(t.start!==void 0||t.end!==void 0)?{command:null,error:"command expected"}:{command:null}}}parseSimpleCommand(e,t){this.advance();let n=e.value;switch(n){case"p":return{command:{type:"print",address:t}};case"P":return{command:{type:"printFirstLine",address:t}};case"d":return{command:{type:"delete",address:t}};case"D":return{command:{type:"deleteFirstLine",address:t}};case"h":return{command:{type:"hold",address:t}};case"H":return{command:{type:"holdAppend",address:t}};case"g":return{command:{type:"get",address:t}};case"G":return{command:{type:"getAppend",address:t}};case"x":return{command:{type:"exchange",address:t}};case"n":return{command:{type:"next",address:t}};case"N":return{command:{type:"nextAppend",address:t}};case"q":return{command:{type:"quit",address:t}};case"Q":return{command:{type:"quitSilent",address:t}};case"z":return{command:{type:"zap",address:t}};case"=":return{command:{type:"lineNumber",address:t}};case"l":return{command:{type:"list",address:t}};case"F":return{command:{type:"printFilename",address:t}};default:return{command:null,error:`unknown command: ${n}`}}}parseSubstituteFromToken(e,t){this.advance();let n=e.flags||"",s,r=n.match(/(\d+)/);return r&&(s=parseInt(r[1],10)),{command:{type:"substitute",address:t,pattern:e.pattern||"",replacement:e.replacement||"",global:n.includes("g"),ignoreCase:n.includes("i")||n.includes("I"),printOnMatch:n.includes("p"),nthOccurrence:s,extendedRegex:this.extendedRegex}}}parseTransliterateFromToken(e,t){this.advance();let n=e.source||"",s=e.dest||"";return n.length!==s.length?{command:null,error:"transliteration sets must have same length"}:{command:{type:"transliterate",address:t,source:n,dest:s}}}parseTextCommand(e,t){let n=e.value,s=e.text||"";switch(n){case"a":return{command:{type:"append",address:t,text:s}};case"i":return{command:{type:"insert",address:t,text:s}};case"c":return{command:{type:"change",address:t,text:s}};default:return{command:null,error:`unknown text command: ${n}`}}}parseGroup(e){this.advance();let t=[];for(;!this.isAtEnd()&&!this.check(c.RBRACE);){if(this.check(c.NEWLINE)||this.check(c.SEMICOLON)){this.advance();continue}let n=this.parseCommand();if(n.error)return{command:null,error:n.error};n.command&&t.push(n.command)}return this.check(c.RBRACE)?(this.advance(),{command:{type:"group",address:e,commands:t}}):{command:null,error:"unmatched brace in grouped commands"}}parseAddressRange(){let e=this.parseAddress();if(e===void 0)return;let t;if(this.check(c.RELATIVE_OFFSET))t={offset:this.advance().offset||0};else if(this.check(c.COMMA)&&(this.advance(),t=this.parseAddress(),t===void 0))return{error:"expected context address"};return{address:{start:e,end:t}}}parseAddress(){let e=this.peek();switch(e.type){case c.NUMBER:return this.advance(),e.value;case c.DOLLAR:return this.advance(),"$";case c.PATTERN:return this.advance(),{pattern:e.pattern||e.value};case c.STEP:return this.advance(),{first:e.first||0,step:e.step||0};case c.RELATIVE_OFFSET:return this.advance(),{offset:e.offset||0};default:return}}peek(){return this.tokens[this.pos]||{type:c.EOF,value:"",line:0,column:0}}advance(){return this.isAtEnd()||this.pos++,this.tokens[this.pos-1]}check(e){return this.peek().type===e}isAtEnd(){return this.peek().type===c.EOF}};function ne(i,e=!1){let t=!1,n=!1,s=[];for(let o=0;o<i.length;o++){let u=i[o];if(s.length===0&&o===0){let p=u.match(/^#([nr]+)\s*(?:\n|$)/i);if(p){let C=p[1].toLowerCase();C.includes("n")&&(t=!0),C.includes("r")&&(n=!0),u=u.slice(p[0].length)}}if(s.length>0&&s[s.length-1].endsWith("\\")){let p=s[s.length-1];s[s.length-1]=`${p}
|
|
42
|
-
${u}`}else s.push(u)}let r=s.join(`
|
|
43
|
-
`),l=new G([r],e||n).parse();if(!l.error&&l.commands.length>0){let o=be(l.commands);if(o)return{commands:[],error:o,silentMode:t,extendedRegexMode:n}}return{...l,silentMode:t,extendedRegexMode:n}}function be(i){let e=new Set;ie(i,e);let t=se(i,e);if(t)return`undefined label '${t}'`}function ie(i,e){for(let t of i)t.type==="label"?e.add(t.name):t.type==="group"&&ie(t.commands,e)}function se(i,e){for(let t of i){if((t.type==="branch"||t.type==="branchOnSubst"||t.type==="branchOnNoSubst")&&t.label&&!e.has(t.label))return t.label;if(t.type==="group"){let n=se(t.commands,e);if(n)return n}}}var Ee={name:"sed",summary:"stream editor for filtering and transforming text",usage:"sed [OPTION]... {script} [input-file]...",options:["-n, --quiet, --silent suppress automatic printing of pattern space","-e script add the script to commands to be executed","-f script-file read script from file","-i, --in-place edit files in place","-E, -r, --regexp-extended use extended regular expressions"," --help display this help and exit"],description:`Commands:
|
|
44
|
-
s/regexp/replacement/[flags] substitute
|
|
45
|
-
d delete pattern space
|
|
46
|
-
p print pattern space
|
|
47
|
-
a\\ text append text after line
|
|
48
|
-
i\\ text insert text before line
|
|
49
|
-
c\\ text change (replace) line with text
|
|
50
|
-
h copy pattern space to hold space
|
|
51
|
-
H append pattern space to hold space
|
|
52
|
-
g copy hold space to pattern space
|
|
53
|
-
G append hold space to pattern space
|
|
54
|
-
x exchange pattern and hold spaces
|
|
55
|
-
n read next line into pattern space
|
|
56
|
-
N append next line to pattern space
|
|
57
|
-
y/source/dest/ transliterate characters
|
|
58
|
-
= print line number
|
|
59
|
-
l list pattern space (escape special chars)
|
|
60
|
-
b [label] branch to label
|
|
61
|
-
t [label] branch on substitution
|
|
62
|
-
T [label] branch if no substitution
|
|
63
|
-
:label define label
|
|
64
|
-
q quit
|
|
65
|
-
Q quit without printing
|
|
66
|
-
|
|
67
|
-
Addresses:
|
|
68
|
-
N line number
|
|
69
|
-
$ last line
|
|
70
|
-
/regexp/ lines matching regexp
|
|
71
|
-
N,M range from line N to M
|
|
72
|
-
first~step every step-th line starting at first`};async function j(i,e,t,n={}){let{limits:s,filename:r,fs:a,cwd:l,coverage:o}=n,u=i.endsWith(`
|
|
73
|
-
`),p=i.split(`
|
|
74
|
-
`);p.length>0&&p[p.length-1]===""&&p.pop();let C=p.length,g="",f,b=!1,h=s?.maxStringLength??0,d=y=>{if(g+=y,h>0&&g.length>h)throw new S(`sed: output size limit exceeded (${h} bytes)`,"string_length")},E="",k,w=new Map,M=new Map,T=new Map,B=new Map,re=s?{maxIterations:s.maxSedIterations}:void 0;for(let y=0;y<p.length;y++){let m={...te(C,r,w),patternSpace:p[y],holdSpace:E,lastPattern:k,lineNumber:y+1,totalLines:C,substitutionMade:!1,coverage:o},ae={lines:p,currentLineIndex:y},Z=0,ce=1e4;m.linesConsumedInCycle=0;do{if(Z++,Z>ce)break;if(m.restartCycle=!1,m.pendingFileReads=[],m.pendingFileWrites=[],X(e,m,ae,re),a&&l){for(let v of m.pendingFileReads){let I=a.resolvePath(l,v.filename);try{if(v.wholeFile){let O=await a.readFileText(I);m.appendBuffer.push(O.replace(/\n$/,""))}else{if(!M.has(I)){let oe=await a.readFileText(I);M.set(I,oe.split(`
|
|
75
|
-
`)),T.set(I,0)}let O=M.get(I),$=T.get(I);O&&$!==void 0&&$<O.length&&(m.appendBuffer.push(O[$]),T.set(I,$+1))}}catch{}}for(let v of m.pendingFileWrites){let I=a.resolvePath(l,v.filename),O=B.get(I)||"";B.set(I,O+v.content)}}}while(m.restartCycle&&!m.deleted&&!m.quit&&!m.quitSilent);if(y+=m.linesConsumedInCycle,E=m.holdSpace,k=m.lastPattern,!t)for(let v of m.nCommandOutput)d(`${v}
|
|
76
|
-
`);let le=m.lineNumberOutput.length>0;for(let v of m.lineNumberOutput)d(`${v}
|
|
77
|
-
`);let K=[],P=[];for(let v of m.appendBuffer)v.startsWith("__INSERT__")?K.push(v.slice(10)):P.push(v);for(let v of K)d(`${v}
|
|
78
|
-
`);let F=!1;!m.deleted&&!m.quitSilent?t?m.printed&&(d(`${m.patternSpace}
|
|
79
|
-
`),F=!0):(d(`${m.patternSpace}
|
|
80
|
-
`),F=!0):m.changedText!==void 0&&(d(`${m.changedText}
|
|
81
|
-
`),F=!0);for(let v of P)d(`${v}
|
|
82
|
-
`);if(b=(le||F)&&P.length===0,m.quit||m.quitSilent){if(m.exitCode!==void 0&&(f=m.exitCode),m.errorMessage)return{output:"",exitCode:f||1,errorMessage:m.errorMessage};break}}if(a&&l)for(let[y,m]of B)try{await a.writeFile(y,m)}catch{}return!u&&b&&g.endsWith(`
|
|
83
|
-
`)&&(g=g.slice(0,-1)),{output:g,exitCode:f}}var _e={name:"sed",async execute(i,e){let t=Q(i);if(Y(t))return J(Ee);let n=[],s=[],r=!1,a=!1,l=!1,o=[];for(let h=0;h<t.length;h++){let d=t[h];if(d==="-n"||d==="--quiet"||d==="--silent")r=!0;else if(d==="-i"||d==="--in-place")a=!0;else if(d.startsWith("-i"))a=!0;else if(d==="-E"||d==="-r"||d==="--regexp-extended")l=!0;else if(d==="-e")h+1<t.length&&n.push(t[++h]);else if(d==="-f")h+1<t.length&&s.push(t[++h]);else{if(d.startsWith("--"))return W("sed",d);if(d==="-")o.push(d);else if(d.startsWith("-")&&d.length>1){for(let E of d.slice(1))if(E!=="n"&&E!=="e"&&E!=="f"&&E!=="i"&&E!=="E"&&E!=="r")return W("sed",`-${E}`);d.includes("n")&&(r=!0),d.includes("i")&&(a=!0),(d.includes("E")||d.includes("r"))&&(l=!0),d.includes("e")&&!d.includes("n")&&!d.includes("i")&&h+1<t.length&&n.push(t[++h]),d.includes("f")&&!d.includes("e")&&h+1<t.length&&s.push(t[++h])}else!d.startsWith("-")&&n.length===0&&s.length===0?n.push(d):d.startsWith("-")||o.push(d)}}for(let h of s){let d=e.fs.resolvePath(e.cwd,h);try{let E=await e.fs.readFileText(d);for(let k of E.split(`
|
|
84
|
-
`)){let w=k.trim();w&&!w.startsWith("#")&&n.push(w)}}catch{return{stdout:R(),stderr:x(`sed: couldn't open file ${h}: No such file or directory
|
|
85
|
-
`),exitCode:1}}}if(n.length===0)return{stdout:R(),stderr:x(`sed: no script specified
|
|
86
|
-
`),exitCode:1};let{commands:u,error:p,silentMode:C}=ne(n,l);if(p)return{stdout:R(),stderr:x(`sed: ${p}
|
|
87
|
-
`),exitCode:1};let g=!!(r||C);if(a){if(o.length===0)return{stdout:R(),stderr:x(`sed: -i requires at least one file argument
|
|
88
|
-
`),exitCode:1};for(let h of o){if(h==="-")continue;let d=e.fs.resolvePath(e.cwd,h);try{let E=await e.fs.readFileText(d),k=await j(E,u,g,{limits:e.limits,filename:h,fs:e.fs,cwd:e.cwd,coverage:e.coverage});if(k.errorMessage)return{stdout:R(),stderr:x(`${k.errorMessage}
|
|
89
|
-
`),exitCode:k.exitCode??1};await e.fs.writeFile(d,k.output)}catch(E){return E instanceof S?{stdout:R(),stderr:x(`sed: ${E.message}
|
|
90
|
-
`),exitCode:S.EXIT_CODE}:{stdout:R(),stderr:x(`sed: ${h}: No such file or directory
|
|
91
|
-
`),exitCode:1}}}return{stdout:R(),stderr:R(),exitCode:0}}let f="";if(o.length===0){f=await D(e.stdin);try{let h=await j(f,u,g,{limits:e.limits,fs:e.fs,cwd:e.cwd,coverage:e.coverage});return{stdout:x(h.output),stderr:x(h.errorMessage?`${h.errorMessage}
|
|
92
|
-
`:""),exitCode:h.exitCode??0}}catch(h){if(h instanceof S)return{stdout:R(),stderr:x(`sed: ${h.message}
|
|
93
|
-
`),exitCode:S.EXIT_CODE};throw h}}let b=!1;for(let h of o){let d;if(h==="-")b?d="":(d=await D(e.stdin),b=!0);else{let E=e.fs.resolvePath(e.cwd,h);try{d=await e.fs.readFileText(E)}catch(k){return k instanceof S?{stdout:R(),stderr:x(`sed: ${k.message}
|
|
94
|
-
`),exitCode:S.EXIT_CODE}:{stdout:R(),stderr:x(`sed: ${h}: No such file or directory
|
|
95
|
-
`),exitCode:1}}}f.length>0&&d.length>0&&!f.endsWith(`
|
|
96
|
-
`)&&(f+=`
|
|
97
|
-
`),f+=d}try{let h=await j(f,u,g,{limits:e.limits,filename:o.length===1?o[0]:void 0,fs:e.fs,cwd:e.cwd,coverage:e.coverage});return{stdout:x(h.output),stderr:x(h.errorMessage?`${h.errorMessage}
|
|
98
|
-
`:""),exitCode:h.exitCode??0}}catch(h){if(h instanceof S)return{stdout:R(),stderr:x(`sed: ${h.message}
|
|
99
|
-
`),exitCode:S.EXIT_CODE};throw h}}},Me={name:"sed",flags:[{flag:"-n",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-E",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-e",type:"value",valueHint:"string"}],stdinType:"text",needsArgs:!0};export{_e as a,Me as b};
|