@poe-platform/safe-bash 0.1.802 → 0.1.804
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 +60 -33
- package/dist/image-ast/ast.d.ts +1 -0
- package/dist/image-ast/browser/ast.d.ts +1 -0
- package/dist/image-ast/browser/codecs/jpeg.d.ts +2 -2
- package/dist/image-ast/codecs/jpeg.d.ts +2 -2
- package/dist/image-ast/index.browser.js +692 -8355
- package/dist/image-ast/index.js +692 -8355
- package/dist/mp4-ast/codecs.d.ts +7 -2
- package/dist/safe-bash/chunks/{chunk-CHYGPFVM.js → chunk-22SX3F2R.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-FBUCWVTE.js → chunk-2IVBJTBD.js} +1 -1
- package/dist/safe-bash/chunks/chunk-2POETUMB.js +190 -0
- package/dist/safe-bash/chunks/{chunk-XVOSKJE2.js → chunk-47D7WBJK.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-VKNVHEX3.js → chunk-4ESI236Y.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-74GHTNJA.js → chunk-4KTMKD5W.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-55YJASTN.js → chunk-4T53AERN.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-DQP3VHSB.js → chunk-5XIFJVOO.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-NZQXYWA3.js → chunk-62BOHHJT.js} +1 -2
- package/dist/safe-bash/chunks/{chunk-HZAMGT5I.js → chunk-67WIFM3N.js} +17 -6
- package/dist/safe-bash/chunks/{chunk-4D4N7IU2.js → chunk-6LNFRPW5.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-6O77NL2S.js → chunk-6SMICPI3.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-4BSJLKNM.js → chunk-7O76UFQD.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-44ALJ4QG.js → chunk-AW5KIT6V.js} +3549 -84
- package/dist/safe-bash/chunks/{chunk-RSTHLAF3.js → chunk-B2Z73HTZ.js} +52 -28
- package/dist/safe-bash/chunks/chunk-B3ZMOJVM.js +319 -0
- package/dist/safe-bash/chunks/{chunk-7ZBU7KYV.js → chunk-CFAWS3O4.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-I5HZ4FGE.js → chunk-CL2FCTTO.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-KDNSPLII.js → chunk-CTXNARJH.js} +2 -1
- package/dist/safe-bash/chunks/{chunk-TFIBK2GI.js → chunk-D5Q7NFWI.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-OQRVVGR6.js → chunk-DSOOVZ6Q.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-VTH3MLDU.js → chunk-DUTAG6ZD.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-XAQMU6OY.js → chunk-EE5YGFIZ.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-FZE4HW6G.js → chunk-EJOYT2ME.js} +1 -1
- package/dist/safe-bash/chunks/chunk-FAAIR6EJ.js +887 -0
- package/dist/safe-bash/chunks/{chunk-OV6IHKO6.js → chunk-FOB2FZR4.js} +2 -2
- package/dist/safe-bash/chunks/chunk-G6V4RRSQ.js +14 -0
- package/dist/safe-bash/chunks/{chunk-UTBUUFDM.js → chunk-GGQAGQXQ.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-K6VCD7IY.js → chunk-HIIYIJ5G.js} +2 -4
- package/dist/safe-bash/chunks/chunk-IOHH2GTI.js +56 -0
- package/dist/safe-bash/chunks/{chunk-CTVWDACF.js → chunk-IQW34XQT.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-HZ7BWKQ3.js → chunk-IS572AAT.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-AUSNDQTJ.js → chunk-JPSUHHOA.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-ZVD5IS4V.js → chunk-KBZ4UB2O.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-AM5ESLPH.js → chunk-KU5CVWKA.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-NQCM3TYR.js → chunk-LPOVNKNB.js} +225 -176
- package/dist/safe-bash/chunks/{chunk-46Z5E5EV.js → chunk-MBOC3LZ4.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-6PAVEFT3.js → chunk-N4BQFD3P.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-CS4MNM6I.js → chunk-NGKCVNWS.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-7R5BDCG7.js → chunk-OHML2BEU.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-C5OWC2TL.js → chunk-OQ3AGYCZ.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-B7TAL7S5.js → chunk-PTAEWLSE.js} +0 -2
- package/dist/safe-bash/chunks/{chunk-LVOBFF4D.js → chunk-Q4FNLOTI.js} +1 -1
- package/dist/safe-bash/chunks/chunk-Q5XO3NAS.js +1036 -0
- package/dist/safe-bash/chunks/{chunk-GEG3BWGE.js → chunk-RHFRJIWQ.js} +1 -1
- package/dist/safe-bash/chunks/chunk-RUR6J33T.js +11 -0
- package/dist/safe-bash/chunks/{chunk-WDLGKIHD.js → chunk-S4RFUUXO.js} +841 -26
- package/dist/safe-bash/chunks/{chunk-RRR7AQ24.js → chunk-SD2ISU5L.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-3NDIFSNM.js → chunk-SUJ3NTMH.js} +3 -3
- package/dist/safe-bash/chunks/{chunk-R3NAKOED.js → chunk-SZRUU5HS.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-PH63PLPZ.js → chunk-TC3F4UFF.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-3R3AANOR.js → chunk-TCKYOLUE.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-D3ANYGMC.js → chunk-UV4X32QU.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-E7OYNDGL.js → chunk-V7QT2RWC.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-SHEMU2Z7.js → chunk-W2IYOVHK.js} +839 -1211
- package/dist/safe-bash/chunks/{chunk-3HQU4OJO.js → chunk-XNGVOSGI.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-J42RIHHJ.js → chunk-XQWCQSRN.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-BJA5XNP6.js → chunk-Y7FW6GLT.js} +6 -6
- package/dist/safe-bash/chunks/{chunk-QGUV42T5.js → chunk-YL3GBUG4.js} +1 -1
- package/dist/safe-bash/chunks/chunk-YOXUCJER.js +389 -0
- package/dist/safe-bash/chunks/{chunk-HBCN24ZA.js → chunk-Z2AAYYJN.js} +2 -2
- package/dist/safe-bash/chunks/chunk-ZKYKJCZZ.js +30 -0
- package/dist/safe-bash/chunks/core-IE3AFIDX.js +85806 -0
- package/dist/safe-bash/chunks/{ffmpeg-WTC3TEFI.js → ffmpeg-YANDK6HU.js} +2 -2
- package/dist/safe-bash/chunks/{gh-6WU6PXL4.js → gh-4MBJ2S5V.js} +2 -2
- package/dist/safe-bash/chunks/{git-EFZIGJW4.js → git-2QONJNRQ.js} +2 -2
- package/dist/safe-bash/chunks/{imagemagick-EIEYGWPF.js → imagemagick-JLEHGYSN.js} +2 -2
- package/dist/safe-bash/chunks/{mmdc-ROQJT5HQ.js → mmdc-6LD7A6ND.js} +2 -2
- package/dist/safe-bash/chunks/{pdfimages-DW7LWXFI.js → pdfimages-RSHL7LOP.js} +2 -2
- package/dist/safe-bash/chunks/{pdfinfo-TIP6XLUQ.js → pdfinfo-L3SGWPNG.js} +2 -2
- package/dist/safe-bash/chunks/{pdftk-DMG22ITZ.js → pdftk-LFBJNU5A.js} +2 -2
- package/dist/safe-bash/chunks/{pdftoppm-WNDYR72T.js → pdftoppm-NXXFUIHG.js} +2 -2
- package/dist/safe-bash/chunks/{pdftotext-5IPZ4NI7.js → pdftotext-4IHNWT6F.js} +2 -2
- package/dist/safe-bash/chunks/{qpdf-TTX2DIUA.js → qpdf-ZEIREV63.js} +2 -2
- package/dist/safe-bash/chunks/read-builtin-A4QKAT45.js +9 -0
- package/dist/safe-bash/chunks/{sips-XYS46JPJ.js → sips-D5YBG2V3.js} +2 -2
- package/dist/safe-bash/chunks/{soffice-TU73E5KL.js → soffice-RAJU3JUT.js} +2 -2
- package/dist/safe-bash/chunks/source-files-3XWRRHFA.js +7 -0
- package/dist/safe-bash/chunks/{wkhtmltopdf-FSZ2CHGE.js → wkhtmltopdf-7UE4FORZ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-7KWZXKY6.js → chunk-26RTBV2I.js} +1 -0
- package/dist/safe-bash/command-chunks/{chunk-AQJ2ROJO.js → chunk-2WYNMZR2.js} +10 -8
- package/dist/safe-bash/command-chunks/{chunk-BDSMROQZ.js → chunk-36GFRF2N.js} +2 -1
- package/dist/safe-bash/command-chunks/{chunk-GC5TJZOF.js → chunk-3VIA2IA7.js} +114 -31
- package/dist/safe-bash/command-chunks/{chunk-NKFYQSES.js → chunk-4CTI3ZTX.js} +1 -0
- package/dist/safe-bash/command-chunks/{chunk-WH627NJL.js → chunk-4MYP2FX4.js} +2 -1
- package/dist/safe-bash/command-chunks/chunk-4R5ADJM5.js +178 -0
- package/dist/safe-bash/command-chunks/{chunk-P2N33UMN.js → chunk-5MIKM54M.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-DB453IE6.js → chunk-6FZQUOSJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WPYIOKE3.js → chunk-6GKYHPJG.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-7K6JYKPJ.js → chunk-6M2ELGEN.js} +17 -15
- package/dist/safe-bash/command-chunks/{chunk-PXEIT2O4.js → chunk-6UR7V3ET.js} +8 -1
- package/dist/safe-bash/command-chunks/{chunk-6KJ3LPI2.js → chunk-6XBS5B46.js} +26 -3
- package/dist/safe-bash/command-chunks/{chunk-5PWJG2UK.js → chunk-6YXLZX7L.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-EK6YNAXT.js → chunk-753YOR54.js} +31 -5
- package/dist/safe-bash/command-chunks/{chunk-RMWQAAO5.js → chunk-7IR4NRNE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-FZTK4MFI.js → chunk-7NM73SVK.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-NXEQ3ESQ.js → chunk-7QD5YY4F.js} +6 -11
- package/dist/safe-bash/command-chunks/{chunk-EMPU65ZK.js → chunk-A5LBSJGH.js} +1 -0
- package/dist/safe-bash/command-chunks/chunk-A7MU7762.js +200 -0
- package/dist/safe-bash/command-chunks/{chunk-ORYGZYKW.js → chunk-ARZMP2L2.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-OQKC5ZU2.js → chunk-BAKFZ477.js} +62 -20
- package/dist/safe-bash/command-chunks/{chunk-QRRYN2KO.js → chunk-BC7BK6R6.js} +0 -2424
- package/dist/safe-bash/command-chunks/{chunk-F4TEEZTL.js → chunk-BOEOJS2Q.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XS72HTMA.js → chunk-BWGGLYEB.js} +5 -22
- package/dist/safe-bash/command-chunks/{chunk-PMBFZXTK.js → chunk-C5ZZKP7V.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LHIOAFWW.js → chunk-C7SEB6WU.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XPT2UGBF.js → chunk-CHJKFRT7.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-TIOCQVUQ.js → chunk-CON26Q2O.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-E55UKBIE.js → chunk-DBAT3IK2.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-Z45N42QC.js → chunk-DPAYAVMS.js} +15 -1
- package/dist/safe-bash/command-chunks/chunk-DS3NXVUM.js +368 -0
- package/dist/safe-bash/command-chunks/{chunk-5ZMZ573Q.js → chunk-DSJ3VRL3.js} +16 -4
- package/dist/safe-bash/command-chunks/{chunk-K2GDEMEU.js → chunk-EFRCFWVR.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-DZCY63VJ.js → chunk-EV6HIJ5H.js} +6 -5
- package/dist/safe-bash/command-chunks/{chunk-JDYXY44P.js → chunk-FJURV46Y.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-TZZ4WUKH.js → chunk-FZAWGKSE.js} +6 -4
- package/dist/safe-bash/command-chunks/{chunk-YHFXOX6U.js → chunk-GOCFQ6XV.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-YOFC45RK.js → chunk-HH5O7DJI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3HHCU5YU.js → chunk-HK7F5SDC.js} +13 -0
- package/dist/safe-bash/command-chunks/{chunk-JNZ3CVAE.js → chunk-HQBXIZC7.js} +8 -3
- package/dist/safe-bash/command-chunks/{chunk-2JRBIDAD.js → chunk-I63DBZXZ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-WNE7FPVR.js → chunk-I64TLTIW.js} +24 -16
- package/dist/safe-bash/command-chunks/{chunk-QKFSRZGQ.js → chunk-ICANWOXH.js} +7 -31
- package/dist/safe-bash/command-chunks/{chunk-SQRQW3CT.js → chunk-IJ6LGLXM.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5E4WAO4O.js → chunk-JD5QNRNO.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-KJIMDLBB.js → chunk-JNANXVJV.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-TGSNCQSR.js → chunk-JT4RYCA6.js} +1771 -1663
- package/dist/safe-bash/command-chunks/{chunk-II77KPZN.js → chunk-JWW6FYBN.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ZYXH3B66.js → chunk-LCJWKTCJ.js} +250 -203
- package/dist/safe-bash/command-chunks/{chunk-I237SNW5.js → chunk-LFJJQQND.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-LU4HBPP2.js +97 -0
- package/dist/safe-bash/command-chunks/{chunk-XJXU3VVH.js → chunk-LWOE65OE.js} +20 -5
- package/dist/safe-bash/command-chunks/{chunk-GMIHJYDG.js → chunk-M32HFSX7.js} +22 -6
- package/dist/safe-bash/command-chunks/{chunk-YG4EPFWC.js → chunk-M3NINRDU.js} +2880 -172
- package/dist/safe-bash/command-chunks/chunk-MQREDAL6.js +164 -0
- package/dist/safe-bash/command-chunks/{chunk-LWS62ISU.js → chunk-N6DIASO2.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-NGL7YK7O.js +188 -0
- package/dist/safe-bash/command-chunks/{chunk-PEF7K3UQ.js → chunk-NJYHWKIL.js} +40 -10
- package/dist/safe-bash/command-chunks/{chunk-VXSLJH7G.js → chunk-OJQRSCBP.js} +27 -7
- package/dist/safe-bash/command-chunks/{chunk-OQU6UT6X.js → chunk-OV3XREFN.js} +11 -0
- package/dist/safe-bash/command-chunks/{chunk-MIXBO6U7.js → chunk-PTZLF456.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ALDC4XP4.js → chunk-QILLRNES.js} +34 -10
- package/dist/safe-bash/command-chunks/{chunk-L22T3H7L.js → chunk-QR25JLKO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-7U7EXOXX.js → chunk-R7C4MGZ5.js} +17 -223
- package/dist/safe-bash/command-chunks/{chunk-LCF3OB7P.js → chunk-RBME3JEH.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2KG2QLJE.js → chunk-RFWGYT7G.js} +3 -0
- package/dist/safe-bash/command-chunks/{chunk-5TBUOBDE.js → chunk-RZMVRT26.js} +27 -13
- package/dist/safe-bash/command-chunks/chunk-TFR6B3WB.js +44 -0
- package/dist/safe-bash/command-chunks/chunk-TOH3OF3O.js +179 -0
- package/dist/safe-bash/command-chunks/{chunk-VGG2DL5Q.js → chunk-TRR4MYWF.js} +4 -0
- package/dist/safe-bash/command-chunks/chunk-TT4DAFBT.js +13621 -0
- package/dist/safe-bash/command-chunks/{chunk-LWSBAWLT.js → chunk-TXI64OAG.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-TZRI7BJZ.js +496 -0
- package/dist/safe-bash/command-chunks/{chunk-QOKBZFFD.js → chunk-U3MMODA5.js} +2 -7
- package/dist/safe-bash/command-chunks/{chunk-ZYHTWNAE.js → chunk-UAW423ZL.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-C5YYCQHW.js → chunk-UXEEUGOV.js} +222 -12
- package/dist/safe-bash/command-chunks/{chunk-GY3BWK7K.js → chunk-VOZPMJRX.js} +87 -80
- package/dist/safe-bash/command-chunks/{chunk-MQFIPHIQ.js → chunk-WPANOB4A.js} +38 -35
- package/dist/safe-bash/command-chunks/{chunk-Y2WBSJG6.js → chunk-X4QZQI5Q.js} +65 -64
- package/dist/safe-bash/command-chunks/{chunk-FPVUD6TH.js → chunk-XGI57GCN.js} +10 -8
- package/dist/safe-bash/command-chunks/{chunk-5UBXNSFZ.js → chunk-XUCU7QQT.js} +1281 -1278
- package/dist/safe-bash/command-chunks/chunk-Y22VXJBD.js +296 -0
- package/dist/safe-bash/command-chunks/{chunk-WVHONVZ4.js → chunk-YMFUUPDX.js} +5 -3
- package/dist/safe-bash/command-chunks/{chunk-IR2BY7EL.js → chunk-YYGIBXFZ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-MSFXC3OC.js → chunk-Z4FO6OHE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-6GWJUQAV.js → chunk-Z5ZZVDUD.js} +181 -133
- package/dist/safe-bash/command-chunks/{chunk-W5DNF4JH.js → chunk-ZHN3QDCI.js} +1 -1
- package/dist/safe-bash/commands/alias/index.d.ts +2 -0
- package/dist/safe-bash/commands/alias/index.js +2 -0
- package/dist/safe-bash/commands/apply-patch/index.browser.js +2 -3
- package/dist/safe-bash/commands/apply-patch/index.d.ts +0 -1
- package/dist/safe-bash/commands/apply-patch/index.js +0 -1
- package/dist/safe-bash/commands/archive/index.browser.js +2 -3
- package/dist/safe-bash/commands/archive/index.d.ts +0 -1
- package/dist/safe-bash/commands/archive/index.js +0 -1
- package/dist/safe-bash/commands/bytes/compression/index.js +54 -51
- package/dist/safe-bash/commands/bytes/index.js +2 -1
- package/dist/safe-bash/commands/chmod/index.browser.js +14 -0
- package/dist/safe-bash/commands/chmod/index.d.ts +2 -0
- package/dist/safe-bash/commands/chmod/index.js +2 -0
- package/dist/safe-bash/commands/column/index.browser.js +2 -3
- package/dist/safe-bash/commands/column/index.d.ts +0 -1
- package/dist/safe-bash/commands/column/index.js +0 -1
- package/dist/safe-bash/commands/copy-source.js +1 -0
- package/dist/safe-bash/commands/csplit/index.browser.js +2 -2
- package/dist/safe-bash/commands/csvkit/index.browser.js +72 -0
- package/dist/safe-bash/commands/csvkit/index.d.ts +0 -5
- package/dist/safe-bash/commands/csvkit/index.js +0 -50
- package/dist/safe-bash/commands/docx/index.browser.js +5 -7
- package/dist/safe-bash/commands/du/index.browser.js +2 -3
- package/dist/safe-bash/commands/du/index.d.ts +0 -1
- package/dist/safe-bash/commands/du/index.js +0 -1
- package/dist/safe-bash/commands/expr/index.browser.js +2 -3
- package/dist/safe-bash/commands/expr/index.d.ts +0 -1
- package/dist/safe-bash/commands/expr/index.js +0 -1
- package/dist/safe-bash/commands/factor/index.browser.js +2 -2
- package/dist/safe-bash/commands/file/index.browser.js +2 -3
- package/dist/safe-bash/commands/file/index.d.ts +0 -1
- package/dist/safe-bash/commands/file/index.js +0 -1
- package/dist/safe-bash/commands/filesystem.js +1 -1
- package/dist/safe-bash/commands/getopt/index.browser.js +2 -2
- package/dist/safe-bash/commands/grep-aliases/index.browser.js +3 -3
- package/dist/safe-bash/commands/hexdump/index.browser.js +2 -2
- package/dist/safe-bash/commands/html-to-markdown/index.browser.js +2 -3
- package/dist/safe-bash/commands/html-to-markdown/index.d.ts +0 -1
- package/dist/safe-bash/commands/html-to-markdown/index.js +0 -1
- package/dist/safe-bash/commands/htmlq/index.d.ts +1 -5
- package/dist/safe-bash/commands/htmlq/index.js +1 -143
- package/dist/safe-bash/commands/iconv/index.browser.js +2 -2
- package/dist/safe-bash/commands/line-endings/index.browser.js +2 -2
- package/dist/safe-bash/commands/llm/index.browser.js +2 -2
- package/dist/safe-bash/commands/llm/providers/index.browser.js +1 -1
- package/dist/safe-bash/commands/mdq/index.browser.js +3 -3
- package/dist/safe-bash/commands/media/index.browser.js +4 -16314
- package/dist/safe-bash/commands/media/index.d.ts +1 -5
- package/dist/safe-bash/commands/media/index.js +1 -3
- package/dist/safe-bash/commands/media/plugin.d.ts +1 -18
- package/dist/safe-bash/commands/media/plugin.js +1 -90
- package/dist/safe-bash/commands/media/remote.d.ts +1 -63
- package/dist/safe-bash/commands/media/remote.js +1 -405
- package/dist/safe-bash/commands/media/settings.d.ts +1 -4
- package/dist/safe-bash/commands/media/settings.js +1 -26
- package/dist/safe-bash/commands/metadata/chmod.d.ts +1 -7
- package/dist/safe-bash/commands/metadata/chmod.js +1 -204
- package/dist/safe-bash/commands/metadata/index.browser.js +3 -8
- package/dist/safe-bash/commands/metadata/index.d.ts +0 -1
- package/dist/safe-bash/commands/metadata/index.js +2 -2
- package/dist/safe-bash/commands/metadata/internal.d.ts +1 -30
- package/dist/safe-bash/commands/metadata/internal.js +1 -76
- package/dist/safe-bash/commands/metadata/mktemp.d.ts +1 -3
- package/dist/safe-bash/commands/metadata/mktemp.js +1 -202
- package/dist/safe-bash/commands/metadata/stat.d.ts +1 -7
- package/dist/safe-bash/commands/metadata/stat.js +1 -530
- package/dist/safe-bash/commands/mktemp/index.browser.js +13 -0
- package/dist/safe-bash/commands/mktemp/index.d.ts +2 -0
- package/dist/safe-bash/commands/mktemp/index.js +2 -0
- package/dist/safe-bash/commands/network/curl.js +1 -3
- package/dist/safe-bash/commands/network/index.browser.js +3 -4
- package/dist/safe-bash/commands/network/public.d.ts +0 -1
- package/dist/safe-bash/commands/network/public.js +0 -1
- package/dist/safe-bash/commands/network/transport.js +2 -1
- package/dist/safe-bash/commands/network/wget.js +1 -3
- package/dist/safe-bash/commands/node/browser.d.ts +0 -1
- package/dist/safe-bash/commands/node/browser.js +0 -1
- package/dist/safe-bash/commands/node/default-runtime.d.ts +3 -0
- package/dist/safe-bash/commands/node/default-runtime.js +15 -0
- package/dist/safe-bash/commands/node/index.browser.js +7 -8
- package/dist/safe-bash/commands/node/index.js +3 -3
- package/dist/safe-bash/commands/node/path.js +1 -1
- package/dist/safe-bash/commands/node/preload.d.ts +1 -1
- package/dist/safe-bash/commands/node/preload.js +4 -1
- package/dist/safe-bash/commands/node/quickjs.d.ts +2 -0
- package/dist/safe-bash/commands/node/quickjs.js +2 -0
- package/dist/safe-bash/commands/node/safejs.js +26 -12
- package/dist/safe-bash/commands/op/index.browser.js +2 -3
- package/dist/safe-bash/commands/op/index.d.ts +0 -11
- package/dist/safe-bash/commands/op/index.js +0 -84
- package/dist/safe-bash/commands/pandoc/index.browser.js +44 -0
- package/dist/safe-bash/commands/pandoc/index.d.ts +0 -1
- package/dist/safe-bash/commands/pandoc/index.js +0 -1
- package/dist/safe-bash/commands/portable-random.d.ts +1 -1
- package/dist/safe-bash/commands/portable-random.js +1 -12
- package/dist/safe-bash/commands/pr/index.browser.js +2 -2
- package/dist/safe-bash/commands/python/docker-runner.js +4 -3
- package/dist/safe-bash/commands/python/docker.d.ts +1 -0
- package/dist/safe-bash/commands/python/docker.js +5 -2
- package/dist/safe-bash/commands/python/index.browser.js +17 -13
- package/dist/safe-bash/commands/python/index.d.ts +2 -1
- package/dist/safe-bash/commands/python/index.js +10 -8
- package/dist/safe-bash/commands/python/llm-capability.js +65 -2
- package/dist/safe-bash/commands/python/llm-dependencies.d.ts +27 -0
- package/dist/safe-bash/commands/python/llm-dependencies.js +66 -0
- package/dist/safe-bash/commands/python/llm-module.js +6 -4
- package/dist/safe-bash/commands/python/llm-reference-module.d.ts +3 -0
- package/dist/safe-bash/commands/python/llm-reference-module.js +690 -0
- package/dist/safe-bash/commands/python/worker.browser.js +2 -3
- package/dist/safe-bash/commands/python/worker.d.ts +0 -1
- package/dist/safe-bash/commands/python/worker.js +0 -1
- package/dist/safe-bash/commands/regex-execution/ere/transport/wire-engine.d.ts +1 -1
- package/dist/safe-bash/commands/regex-execution/ere/transport/wire-engine.js +3 -3
- package/dist/safe-bash/commands/regex-execution/public.browser.js +7 -7
- package/dist/safe-bash/commands/safejs/options.js +5 -1
- package/dist/safe-bash/commands/safejs/runtime.d.ts +1 -0
- package/dist/safe-bash/commands/safejs/runtime.js +1 -1
- package/dist/safe-bash/commands/split/index.browser.js +2 -3
- package/dist/safe-bash/commands/split/index.d.ts +0 -1
- package/dist/safe-bash/commands/split/index.js +0 -1
- package/dist/safe-bash/commands/ssconvert/index.browser.js +98 -0
- package/dist/safe-bash/commands/stat/index.browser.js +13 -0
- package/dist/safe-bash/commands/stat/index.d.ts +2 -0
- package/dist/safe-bash/commands/stat/index.js +2 -0
- package/dist/safe-bash/commands/stream-format/index.browser.js +3 -4
- package/dist/safe-bash/commands/stream-format/index.d.ts +0 -1
- package/dist/safe-bash/commands/stream-format/index.js +0 -1
- package/dist/safe-bash/commands/stream-inspection/index.browser.js +3 -4
- package/dist/safe-bash/commands/stream-inspection/index.d.ts +0 -1
- package/dist/safe-bash/commands/stream-inspection/index.js +0 -1
- package/dist/safe-bash/commands/streams.js +2 -1
- package/dist/safe-bash/commands/table-text/index.browser.js +3 -4
- package/dist/safe-bash/commands/table-text/index.d.ts +0 -1
- package/dist/safe-bash/commands/table-text/index.js +0 -1
- package/dist/safe-bash/commands/text.js +74 -34
- package/dist/safe-bash/commands/time-env/index.browser.js +3 -4
- package/dist/safe-bash/commands/time-env/index.d.ts +0 -1
- package/dist/safe-bash/commands/time-env/index.js +0 -1
- package/dist/safe-bash/commands/tree/index.browser.js +2 -3
- package/dist/safe-bash/commands/tree/index.d.ts +0 -1
- package/dist/safe-bash/commands/tree/index.js +0 -1
- package/dist/safe-bash/commands/tsort/index.browser.js +2 -2
- package/dist/safe-bash/commands/unalias/index.d.ts +2 -0
- package/dist/safe-bash/commands/unalias/index.js +2 -0
- package/dist/safe-bash/commands/xml/index.browser.js +2 -2
- package/dist/safe-bash/commands/yq/index.browser.js +2 -2
- package/dist/safe-bash/core.browser.js +2 -2
- package/dist/safe-bash/core.d.ts +7 -1
- package/dist/safe-bash/core.js +7 -1
- package/dist/safe-bash/execution-runtime.js +2 -1
- package/dist/safe-bash/fs/s3/http/index.d.ts +2 -2
- package/dist/safe-bash/fs/s3/http/index.js +1 -1
- package/dist/safe-bash/full-core.browser.js +254 -916
- package/dist/safe-bash/internal/op/types.d.ts +1 -0
- package/dist/safe-bash/jobs.browser.js +5 -5
- package/dist/safe-bash/lazy-optional.d.ts +3 -3
- package/dist/safe-bash/lazy-optional.js +1 -1
- package/dist/safe-bash/opt-in/commands/cmp/index.js +7 -6
- package/dist/safe-bash/opt-in/commands/dd/index.js +1 -1
- package/dist/safe-bash/opt-in/commands/dd/io.js +51 -5
- package/dist/safe-bash/opt-in/commands/truncate/index.js +2 -2
- package/dist/safe-bash/opt-in/commands/yq/native-work.js +3 -0
- package/dist/safe-bash/opt-in/optional/commands/shuf/input.js +2 -1
- package/dist/safe-bash/opt-in/optional/commands/shuf/shuf.js +4 -2
- package/dist/safe-bash/opt-in/optional.d.ts +1 -1
- package/dist/safe-bash/opt-in/optional.js +1 -1
- package/dist/safe-bash/opt-in/shell/extensions/read/index.js +2 -344
- package/dist/safe-bash/optional-host.browser.js +19 -14
- package/dist/safe-bash/optional-host.d.ts +1 -0
- package/dist/safe-bash/optional-host.js +1 -0
- package/dist/safe-bash/playwright/controller.js +41 -3
- package/dist/safe-bash/playwright/native-storage-targets.js +4 -2
- package/dist/safe-bash/plugins/base.d.ts +1 -1
- package/dist/safe-bash/plugins/base.js +3 -3
- package/dist/safe-bash/plugins/composition.d.ts +5 -2
- package/dist/safe-bash/plugins/composition.js +10 -7
- package/dist/safe-bash/plugins/index.browser.js +44 -41
- package/dist/safe-bash/plugins/index.js +3 -2
- package/dist/safe-bash/plugins/portable-commands.d.ts +3 -0
- package/dist/safe-bash/plugins/portable-commands.js +31 -0
- package/dist/safe-bash/registry-entry.browser.js +41 -42
- package/dist/safe-bash/search.browser.js +32 -33
- package/dist/safe-bash/shell/arithmetic.js +19 -6
- package/dist/safe-bash/shell/arrays/state.js +1 -1
- package/dist/safe-bash/shell/arrays/syntax.js +4 -3
- package/dist/safe-bash/shell/index.d.ts +0 -1
- package/dist/safe-bash/shell/index.js +0 -1
- package/dist/safe-bash/shell/parser.d.ts +2 -2
- package/dist/safe-bash/shell/parser.js +268 -64
- package/dist/safe-bash/shell/read-builtin.d.ts +3 -0
- package/dist/safe-bash/shell/read-builtin.js +344 -0
- package/dist/safe-bash/shell/runtime.d.ts +24 -4
- package/dist/safe-bash/shell/runtime.js +392 -414
- package/dist/safe-bash/shell/session-state.js +25 -0
- package/dist/safe-bash/shell/shell.js +76 -154
- package/dist/safe-bash/shell/tilde-expansion.d.ts +1 -1
- package/dist/safe-bash/shell/tilde-expansion.js +2 -2
- package/dist/safe-bash/shell/types.d.ts +7 -0
- package/dist/safe-bash/shell/value-state.js +1 -1
- package/dist/safe-bash/shell/worker-limits.js +1 -0
- package/dist/safe-bash/shell-entry.browser.js +32 -33
- package/dist/safe-bash/trap.browser.js +4 -4
- package/dist/safe-bash/worker/host.js +1 -1
- package/dist/safe-bash/yq-browser/index.js +1 -1
- package/dist/safe-bash-calendar-engine/time-env/calendar.d.ts +1 -1
- package/dist/safe-bash-calendar-engine/time-env/calendar.js +1 -1
- package/dist/safe-bash-calendar-engine/time-env/format.js +1 -1
- package/dist/safe-bash-command-alias/index.d.ts +13 -0
- package/dist/safe-bash-command-alias/index.js +88 -0
- package/dist/safe-bash-command-apply-patch/apply.js +3 -3
- package/dist/safe-bash-command-apply-patch/index.js +3 -3
- package/dist/safe-bash-command-apply-patch/matcher.js +1 -1
- package/dist/safe-bash-command-apply-patch/parser.js +1 -1
- package/dist/safe-bash-command-awk/awk-pipes.js +2 -2
- package/dist/safe-bash-command-awk/awk-reader.js +1 -1
- package/dist/safe-bash-command-awk/awk-runtime.js +3 -3
- package/dist/safe-bash-command-awk/awk.js +5 -5
- package/dist/safe-bash-command-awk/index.js +5 -5
- package/dist/safe-bash-command-bc/index.js +218 -65
- package/dist/safe-bash-command-bzip2/index.js +4 -3
- package/dist/safe-bash-command-chmod/LICENSE +21 -0
- package/dist/safe-bash-command-chmod/command.d.ts +7 -0
- package/dist/safe-bash-command-chmod/command.js +11 -0
- package/dist/safe-bash-command-chmod/index.d.ts +6 -0
- package/dist/safe-bash-command-chmod/index.js +27 -0
- package/dist/safe-bash-command-cmp/index.js +7 -6
- package/dist/safe-bash-command-column/column.js +3 -3
- package/dist/safe-bash-command-column/index.js +3 -3
- package/dist/safe-bash-command-column/layout.js +2 -2
- package/dist/safe-bash-command-csvkit/index.d.ts +1 -0
- package/dist/safe-bash-command-csvkit/index.js +1505 -7
- package/dist/safe-bash-command-csvkit/sync-support.js +2 -7
- package/dist/safe-bash-command-curl/curl.js +1 -1
- package/dist/safe-bash-command-curl/index.js +1 -1
- package/dist/safe-bash-command-date/date.js +1 -1
- package/dist/safe-bash-command-date/index.js +1 -1
- package/dist/safe-bash-command-dd/index.js +1 -1
- package/dist/safe-bash-command-dd/io.js +51 -5
- package/dist/safe-bash-command-diff/diff.js +1 -1
- package/dist/safe-bash-command-diff/index.js +1 -1
- package/dist/safe-bash-command-diff3/index.js +10 -13
- package/dist/safe-bash-command-exiftool/index.js +283 -55
- package/dist/safe-bash-command-exiftool/registry.d.ts +4 -2
- package/dist/safe-bash-command-factor/command.js +2 -2
- package/dist/safe-bash-command-factor/index.js +2 -2
- package/dist/safe-bash-command-fd/arguments.d.ts +2 -0
- package/dist/safe-bash-command-fd/index.js +42 -12
- package/dist/safe-bash-command-ffmpeg/index.js +356 -66
- package/dist/safe-bash-command-find/find-format.d.ts +3 -0
- package/dist/safe-bash-command-find/find-format.js +1 -1
- package/dist/safe-bash-command-find/find.js +2 -2
- package/dist/safe-bash-command-find/index.js +2 -2
- package/dist/safe-bash-command-fmt/index.js +10 -6
- package/dist/safe-bash-command-fold/engine.d.ts +1 -1
- package/dist/safe-bash-command-fold/family.js +2 -2
- package/dist/safe-bash-command-fold/index.js +1 -1
- package/dist/safe-bash-command-gzip/index.js +45 -42
- package/dist/safe-bash-command-hexdump/command.js +2 -2
- package/dist/safe-bash-command-hexdump/index.js +2 -2
- package/dist/safe-bash-command-html-to-markdown/entities.js +1 -1
- package/dist/safe-bash-command-html-to-markdown/index.js +4 -4
- package/dist/safe-bash-command-html-to-markdown/input.js +3 -3
- package/dist/safe-bash-command-html-to-markdown/parser.js +2 -2
- package/dist/safe-bash-command-html-to-markdown/render.js +3 -3
- package/dist/safe-bash-command-htmlq/contracts.d.ts +5 -2
- package/dist/safe-bash-command-htmlq/index.d.ts +2 -1
- package/dist/safe-bash-command-htmlq/index.js +175 -49
- package/dist/safe-bash-command-htmlq/sync.d.ts +1 -0
- package/dist/safe-bash-command-imagemagick/index.js +59 -7
- package/dist/safe-bash-command-install/arguments.d.ts +27 -0
- package/dist/safe-bash-command-install/arguments.js +224 -0
- package/dist/safe-bash-command-install/index.d.ts +7 -0
- package/dist/safe-bash-command-install/index.js +942 -0
- package/dist/safe-bash-command-install/mode.d.ts +6 -0
- package/dist/safe-bash-command-install/mode.js +71 -0
- package/dist/safe-bash-command-install/options.d.ts +40 -0
- package/dist/safe-bash-command-install/options.js +27 -0
- package/dist/safe-bash-command-jq/index.js +1 -1
- package/dist/safe-bash-command-jq/jq.js +1 -1
- package/dist/safe-bash-command-less/index.js +42 -57
- package/dist/safe-bash-command-llm/command.js +1 -1
- package/dist/safe-bash-command-llm/elevenlabs.js +2 -2
- package/dist/safe-bash-command-llm/index.js +4 -4
- package/dist/safe-bash-command-llm/openai.js +2 -2
- package/dist/safe-bash-command-llm/providers/elevenlabs.js +2 -2
- package/dist/safe-bash-command-llm/providers/index.js +3 -3
- package/dist/safe-bash-command-llm/providers/openai.js +2 -2
- package/dist/safe-bash-command-llm/providers/shared.js +1 -1
- package/dist/{safe-bash-mcp → safe-bash-command-mcp}/index.browser.d.ts +463 -46
- package/dist/safe-bash-command-mcp/index.browser.js +19308 -0
- package/dist/{safe-bash-mcp → safe-bash-command-mcp}/index.d.ts +15 -6
- package/dist/{safe-bash-mcp → safe-bash-command-mcp}/index.js +2835 -2783
- package/dist/safe-bash-command-media/LICENSE +21 -0
- package/dist/safe-bash-command-media/index.d.ts +6 -0
- package/dist/safe-bash-command-media/index.js +30 -0
- package/dist/safe-bash-command-media/plugin.d.ts +18 -0
- package/dist/safe-bash-command-media/plugin.js +11 -0
- package/dist/safe-bash-command-media/remote.d.ts +63 -0
- package/dist/safe-bash-command-media/remote.js +11 -0
- package/dist/safe-bash-command-media/settings.d.ts +4 -0
- package/dist/safe-bash-command-media/settings.js +41 -0
- package/dist/safe-bash-command-mktemp/LICENSE +21 -0
- package/dist/safe-bash-command-mktemp/command.d.ts +3 -0
- package/dist/safe-bash-command-mktemp/command.js +9 -0
- package/dist/safe-bash-command-mktemp/index.d.ts +6 -0
- package/dist/safe-bash-command-mktemp/index.js +25 -0
- package/dist/safe-bash-command-mmdc/arguments.d.ts +1 -0
- package/dist/safe-bash-command-mmdc/command.d.ts +2 -0
- package/dist/safe-bash-command-mmdc/contracts.d.ts +8 -1
- package/dist/safe-bash-command-mmdc/index.js +359 -7
- package/dist/safe-bash-command-nl/index.js +1 -1
- package/dist/safe-bash-command-nl/nl.js +1 -1
- package/dist/safe-bash-command-node/LICENSE +21 -0
- package/dist/safe-bash-command-node/index.d.ts +17 -0
- package/dist/safe-bash-command-node/index.js +328 -0
- package/dist/safe-bash-command-numfmt/index.js +1 -0
- package/dist/safe-bash-command-od/index.js +16 -8
- package/dist/safe-bash-command-op/index.js +62 -36
- package/dist/safe-bash-command-op/types.d.ts +1 -0
- package/dist/safe-bash-command-pandoc/command.js +3 -3
- package/dist/safe-bash-command-pandoc/index.d.ts +1 -0
- package/dist/safe-bash-command-pandoc/index.js +5 -3
- package/dist/safe-bash-command-pandoc/sync.d.ts +1 -0
- package/dist/safe-bash-command-patch/index.js +4 -4
- package/dist/safe-bash-command-patch/patch.js +4 -4
- package/dist/safe-bash-command-pdfimages/index.js +1 -1
- package/dist/safe-bash-command-pdfinfo/index.js +30 -5
- package/dist/safe-bash-command-pdftk/index.js +21 -23
- package/dist/safe-bash-command-pdftoppm/index.js +17 -4
- package/dist/safe-bash-command-pdftotext/index.js +11 -14
- package/dist/safe-bash-command-qpdf/index.d.ts +1 -0
- package/dist/safe-bash-command-qpdf/index.js +9 -6
- package/dist/safe-bash-command-rg/index.js +1 -1
- package/dist/safe-bash-command-rg/rg-command.js +1 -1
- package/dist/safe-bash-command-sed/index.js +1 -1
- package/dist/safe-bash-command-sed/sed.js +1 -1
- package/dist/safe-bash-command-shuf/input.d.ts +2 -2
- package/dist/safe-bash-command-shuf/input.js +2 -1
- package/dist/safe-bash-command-shuf/shuf.js +4 -2
- package/dist/safe-bash-command-sips/index.js +15 -7
- package/dist/safe-bash-command-soffice/index.js +97 -12
- package/dist/safe-bash-command-sponge/index.js +13 -3
- package/dist/safe-bash-command-sqlite3/engine.d.ts +1 -0
- package/dist/safe-bash-command-sqlite3/index.js +510 -70
- package/dist/safe-bash-command-ssconvert/formats/xlsx.js +2 -2
- package/dist/safe-bash-command-ssconvert/index.js +44 -22
- package/dist/safe-bash-command-stat/LICENSE +21 -0
- package/dist/safe-bash-command-stat/command.d.ts +7 -0
- package/dist/safe-bash-command-stat/command.js +9 -0
- package/dist/safe-bash-command-stat/index.d.ts +6 -0
- package/dist/safe-bash-command-stat/index.js +25 -0
- package/dist/safe-bash-command-tar/create.d.ts +1 -0
- package/dist/safe-bash-command-tar/create.js +2 -2
- package/dist/safe-bash-command-tar/extract.js +2 -2
- package/dist/safe-bash-command-tar/index.js +4 -4
- package/dist/safe-bash-command-tar/modes.js +4 -4
- package/dist/safe-bash-command-tar/options.js +1 -1
- package/dist/safe-bash-command-truncate/index.js +2 -2
- package/dist/safe-bash-command-tsort/command.js +2 -2
- package/dist/safe-bash-command-tsort/index.js +2 -2
- package/dist/safe-bash-command-unalias/index.d.ts +12 -0
- package/dist/safe-bash-command-unalias/index.js +67 -0
- package/dist/safe-bash-command-unrtf/index.js +37 -5
- package/dist/safe-bash-command-xan/argv.d.ts +1 -1
- package/dist/safe-bash-command-xan/argv.js +2 -2
- package/dist/safe-bash-command-xan/budget.d.ts +0 -1
- package/dist/safe-bash-command-xan/budget.js +1 -1
- package/dist/safe-bash-command-xan/commands.js +6 -6
- package/dist/safe-bash-command-xan/csv.js +2 -2
- package/dist/safe-bash-command-xan/index.js +8 -9
- package/dist/safe-bash-command-xan/io.js +4 -4
- package/dist/safe-bash-command-xan/options.js +1 -1
- package/dist/safe-bash-command-xan/selector.js +2 -2
- package/dist/safe-bash-command-xmllint/index.js +45 -23
- package/dist/safe-bash-command-xxd/index.js +47 -12
- package/dist/safe-bash-command-xz/command.d.ts +1 -1
- package/dist/safe-bash-command-xz/index.js +3 -2
- package/dist/safe-bash-command-yq/accounting.js +1 -1
- package/dist/safe-bash-command-yq/index.js +4 -2
- package/dist/safe-bash-command-yq/native-work.js +3 -0
- package/dist/safe-bash-command-yq/parser.js +2 -2
- package/dist/safe-bash-command-yq/query.js +8 -5
- package/dist/safe-bash-command-yq/toml.js +2 -2
- package/dist/safe-bash-command-zip/index.js +3 -3
- package/dist/safe-bash-compression-engine/bounded-codec.js +3 -3
- package/dist/safe-bash-compression-engine/codec-loader.js +2 -2
- package/dist/safe-bash-compression-engine/files.js +6 -6
- package/dist/safe-bash-compression-engine/index.js +5 -5
- package/dist/safe-bash-compression-engine/operand.js +6 -6
- package/dist/safe-bash-compression-engine/options.js +1 -1
- package/dist/safe-bash-compression-engine/stream.js +5 -5
- package/dist/safe-bash-compression-engine/zstd-decode.js +4 -4
- package/dist/safe-bash-contracts/command.js +3 -3
- package/dist/safe-bash-contracts/default-executor.js +2 -2
- package/dist/safe-bash-contracts/diagnostics.js +3 -3
- package/dist/safe-bash-contracts/escaping.js +6 -6
- package/dist/safe-bash-contracts/filesystem-descriptor.js +3 -3
- package/dist/safe-bash-contracts/filesystem-output.js +5 -5
- package/dist/safe-bash-contracts/http.d.ts +7 -0
- package/dist/safe-bash-contracts/index.js +8 -8
- package/dist/safe-bash-contracts/io.d.ts +2 -0
- package/dist/safe-bash-contracts/io.js +2 -2
- package/dist/safe-bash-contracts/output.js +3 -3
- package/dist/safe-bash-contracts/runtime-control.d.ts +2 -2
- package/dist/safe-bash-contracts/runtime-control.js +4 -2
- package/dist/safe-bash-contracts/signals.d.ts +2 -0
- package/dist/safe-bash-contracts/signals.js +3 -1
- package/dist/safe-bash-contracts/yield.js +1 -1
- package/dist/safe-bash-csv-engine/index.d.ts +2 -1
- package/dist/safe-bash-csv-engine/index.js +21 -15
- package/dist/safe-bash-io-engine/commands/search/requirements.js +2 -2
- package/dist/safe-bash-io-engine/commands/text-programs/shared.js +6 -6
- package/dist/safe-bash-io-engine/internal.js +1 -1
- package/dist/safe-bash-io-engine/shell/pattern.js +38 -18
- package/dist/safe-bash-line-ending-engine/convert.js +9 -204
- package/dist/safe-bash-line-ending-engine/encoding.js +9 -42
- package/dist/safe-bash-line-ending-engine/index.js +48 -0
- package/dist/safe-bash-line-ending-engine/info.js +9 -90
- package/dist/safe-bash-line-ending-engine/internal.js +15 -160
- package/dist/safe-bash-line-ending-engine/io.js +12 -289
- package/dist/safe-bash-line-ending-engine/stage.js +10 -160
- package/dist/safe-bash-markdown-engine/index.js +3 -3
- package/dist/safe-bash-metadata-engine/LICENSE +21 -0
- package/dist/safe-bash-metadata-engine/index.d.ts +30 -0
- package/dist/safe-bash-metadata-engine/index.js +82 -0
- package/dist/safe-bash-metadata-engine/random.d.ts +1 -0
- package/dist/safe-bash-metadata-engine/random.js +21 -0
- package/dist/safe-bash-network-engine/args.d.ts +6 -0
- package/dist/safe-bash-network-engine/args.js +4 -2
- package/dist/safe-bash-network-engine/body.js +1 -1
- package/dist/safe-bash-network-engine/fetch-transport.js +3 -1
- package/dist/safe-bash-network-engine/index.js +3 -1
- package/dist/safe-bash-network-engine/input.js +2 -2
- package/dist/safe-bash-network-engine/platform-portable.js +3 -1
- package/dist/safe-bash-query-engine/dates.d.ts +1 -1
- package/dist/safe-bash-query-engine/dates.js +1 -1
- package/dist/safe-bash-query-engine/index.js +6 -6
- package/dist/safe-bash-query-engine/interpreter.js +4 -4
- package/dist/safe-bash-query-engine/parser.js +1 -1
- package/dist/safe-bash-query-engine/query-core.js +6 -6
- package/dist/safe-bash-regex-engine/execution/bounded-provider.js +10 -0
- package/dist/safe-bash-regex-engine/index.js +1 -1
- package/dist/safe-bash-regex-engine/text/regex.d.ts +1 -1
- package/dist/safe-bash-regex-engine/text/regex.js +1 -1
- package/dist/safe-bash-search-engine/ergonomic-regex.d.ts +1 -0
- package/dist/safe-bash-search-engine/ergonomic-regex.js +2 -2
- package/dist/safe-bash-search-engine/glob.js +2 -2
- package/dist/safe-bash-search-engine/grep.js +17 -10
- package/dist/safe-bash-search-engine/matcher.d.ts +2 -2
- package/dist/safe-bash-search-engine/matcher.js +13 -9
- package/dist/safe-bash-search-engine/options.d.ts +2 -0
- package/dist/safe-bash-search-engine/options.js +1 -1
- package/dist/safe-bash-search-engine/output.js +1 -1
- package/dist/safe-bash-search-engine/shared.js +2 -2
- package/dist/safe-bash-search-engine/walk.js +15 -3
- package/dist/safe-bash-text-stream-engine/stream-format/shared.d.ts +1 -1
- package/dist/safe-bash-text-stream-engine/stream-format/shared.js +2 -1
- package/dist/safe-bash-xml-engine/document.js +3 -3
- package/dist/safe-bash-xml-engine/evaluate.js +2 -2
- package/dist/safe-bash-xml-engine/index.js +4 -4
- package/dist/safe-bash-xml-engine/io.js +7 -2
- package/dist/safe-bash-xml-engine/limits.d.ts +0 -2
- package/dist/safe-bash-xml-engine/limits.js +1 -1
- package/dist/safe-bash-xml-engine/query.js +3 -3
- package/dist/safe-bash-zip-engine/index.js +3 -3
- package/dist/safe-bash-zip-engine/zip/repair.js +3 -3
- package/dist/safe-bash-zip-engine/zip/safety.js +1 -1
- package/dist/safe-bash-zip-engine/zip/sfx.js +3 -3
- package/dist/safe-bash-zip-engine/zip/volumes.js +1 -1
- package/dist/safe-bash-zip-engine/zip-format.js +3 -3
- package/dist/safe-playwright-cloudflare/browser-snapshot-json.js +2 -2
- package/dist/safe-playwright-cloudflare/browser-snapshot-references.js +1 -1
- package/dist/safe-playwright-cloudflare/browser-socket-closure.js +18 -3
- package/dist/safe-playwright-cloudflare/shell-browser-resource.js +1 -1
- package/dist/xlsx-ast/xlsx.js +6 -5
- package/package.json +112 -98
- package/dist/media-cli/bytes.d.ts +0 -8
- package/dist/media-cli/bytes.js +0 -40
- package/dist/media-cli/concat.d.ts +0 -30
- package/dist/media-cli/concat.js +0 -197
- package/dist/media-cli/content.js +0 -66
- package/dist/media-cli/dependency-grammars.d.ts +0 -12
- package/dist/media-cli/dependency-grammars.js +0 -557
- package/dist/media-cli/discover.js +0 -286
- package/dist/media-cli/engine.js +0 -190
- package/dist/media-cli/filename-expression.js +0 -147
- package/dist/media-cli/filesystem.js +0 -35
- package/dist/media-cli/frontend-contract.js +0 -8
- package/dist/media-cli/frontend-issues.d.ts +0 -6
- package/dist/media-cli/frontend-issues.js +0 -9
- package/dist/media-cli/imagemagick-operand.d.ts +0 -42
- package/dist/media-cli/imagemagick-operand.js +0 -229
- package/dist/media-cli/imagemagick-references.d.ts +0 -7
- package/dist/media-cli/imagemagick-references.js +0 -42
- package/dist/media-cli/imagemagick.generated.js +0 -3254
- package/dist/media-cli/imagemagick.js +0 -615
- package/dist/media-cli/index.js +0 -12
- package/dist/media-cli/mvg.d.ts +0 -10
- package/dist/media-cli/mvg.js +0 -102
- package/dist/media-cli/network.js +0 -78
- package/dist/media-cli/options.generated.js +0 -3312
- package/dist/media-cli/preset.d.ts +0 -11
- package/dist/media-cli/preset.js +0 -57
- package/dist/media-cli/resolution-path.d.ts +0 -23
- package/dist/media-cli/resolution-path.js +0 -217
- package/dist/media-cli/resolver.js +0 -494
- package/dist/media-cli/resources.d.ts +0 -16
- package/dist/media-cli/resources.js +0 -187
- package/dist/media-cli/shim.js +0 -52
- package/dist/media-cli/tee.d.ts +0 -6
- package/dist/media-cli/tee.js +0 -38
- package/dist/office-package/zip-sync.js +0 -111
- package/dist/remote-execution/binary.js +0 -178
- package/dist/remote-execution/callback-result.js +0 -26
- package/dist/remote-execution/canonical-capabilities.d.ts +0 -5
- package/dist/remote-execution/canonical-capabilities.js +0 -45
- package/dist/remote-execution/canonical-metadata.d.ts +0 -4
- package/dist/remote-execution/canonical-metadata.js +0 -32
- package/dist/remote-execution/client.js +0 -824
- package/dist/remote-execution/deployment.js +0 -131
- package/dist/remote-execution/descriptors.js +0 -267
- package/dist/remote-execution/effects.js +0 -357
- package/dist/remote-execution/endpoint.js +0 -224
- package/dist/remote-execution/files.js +0 -291
- package/dist/remote-execution/hosting-operation.js +0 -26
- package/dist/remote-execution/hosting-request.d.ts +0 -4
- package/dist/remote-execution/hosting-request.js +0 -12
- package/dist/remote-execution/hosting-stream.d.ts +0 -8
- package/dist/remote-execution/hosting-stream.js +0 -64
- package/dist/remote-execution/index.js +0 -18
- package/dist/remote-execution/invocation-admission.d.ts +0 -3
- package/dist/remote-execution/invocation-admission.js +0 -17
- package/dist/remote-execution/job-binding.js +0 -1269
- package/dist/remote-execution/materializations.js +0 -284
- package/dist/remote-execution/modal-driver.js +0 -90
- package/dist/remote-execution/native-result.d.ts +0 -3
- package/dist/remote-execution/native-result.js +0 -16
- package/dist/remote-execution/output-freshness.d.ts +0 -4
- package/dist/remote-execution/output-freshness.js +0 -19
- package/dist/remote-execution/output-retrieval.js +0 -474
- package/dist/remote-execution/process-http.js +0 -607
- package/dist/remote-execution/process.js +0 -577
- package/dist/remote-execution/protocol.js +0 -208
- package/dist/remote-execution/relay.js +0 -91
- package/dist/remote-execution/rest-driver.js +0 -93
- package/dist/remote-execution/upload-descriptor.js +0 -201
- package/dist/remote-execution/upload-protocol.js +0 -62
- package/dist/remote-execution/uploads.js +0 -324
- package/dist/remote-execution/wire-json.d.ts +0 -4
- package/dist/remote-execution/wire-json.js +0 -44
- package/dist/remote-execution/wire-validation.js +0 -131
- package/dist/remote-execution/wire.generated.js +0 -4224
- package/dist/safe-bash/chunks/chunk-GETUOD5D.js +0 -161
- package/dist/safe-bash/chunks/chunk-IWDICZVK.js +0 -20
- package/dist/safe-bash/chunks/chunk-MHMMRCYC.js +0 -3464
- package/dist/safe-bash/chunks/chunk-UE5KZDEK.js +0 -77
- package/dist/safe-bash/chunks/chunk-VSAJ4OTM.js +0 -962
- package/dist/safe-bash/chunks/csvkit-TACDU7FC.js +0 -1618
- package/dist/safe-bash/chunks/implementation-MLFHUQ5M.js +0 -133
- package/dist/safe-bash/commands/csvkit/sync.js +0 -1639
- package/dist/safe-bash/commands/node/unconfigured.d.ts +0 -3
- package/dist/safe-bash/commands/node/unconfigured.js +0 -10
- package/dist/safe-bash/commands/pandoc/implementation.d.ts +0 -8
- package/dist/safe-bash/commands/pandoc/implementation.js +0 -94
- package/dist/safe-bash-mcp/index.browser.js +0 -9157
- package/dist/safe-bash/command-chunks/{chunk-ZRRBXU3M.js → chunk-GIN5GUDP.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-LAOM65EE.js → chunk-IEO4XVN6.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-364TMWBT.js → chunk-MWREVL44.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-464RVBGB.js → chunk-Q5TDKFHK.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-AJR3AQYA.js → chunk-UKX3LZHR.js} +0 -0
- package/dist/safe-bash/command-chunks/{chunk-XIIBTGC5.js → chunk-XPXEQKRW.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-FDBUV4HJ.js → chunk-Y4HGTG3E.js} +3 -3
- /package/dist/{safe-bash/commands/csvkit → safe-bash-command-csvkit}/sync.d.ts +0 -0
|
@@ -1,615 +0,0 @@
|
|
|
1
|
-
import { byteText, textBytes } from "./bytes.js";
|
|
2
|
-
import { parseImageMagickOperand, parseImageMagickFontOperand } from "./imagemagick-operand.js";
|
|
3
|
-
import { imageMagickOptions, imageMagickReference, imageMagickGrammarRevision } from "./imagemagick.generated.js";
|
|
4
|
-
/** Script lexical rules from MagickWand/script-token.c. Incomplete tokens are
|
|
5
|
-
* withheld; completed tokens before a lexical failure still carry predictions. */
|
|
6
|
-
export function imageMagickScriptTokens(bytes) {
|
|
7
|
-
// GetChar normalizes standalone CR, but preserves CRLF inside strings.
|
|
8
|
-
const input = byteText(bytes);
|
|
9
|
-
const tokens = [];
|
|
10
|
-
let word = "", quote = "", active = false, column = 0;
|
|
11
|
-
for (let i = 0; i < input.length; i++) {
|
|
12
|
-
const c = input[i] === '\r' && input[i + 1] !== '\n' ? '\n' : input[i];
|
|
13
|
-
const code = c.charCodeAt(0);
|
|
14
|
-
if (code < 7 || (code > 13 && code < 32 && code !== 27))
|
|
15
|
-
return { tokens, incomplete: true };
|
|
16
|
-
if (!quote && !active && (c === '#' || (column === 0 && (c === ':' || c === '@')))) {
|
|
17
|
-
while (i < input.length && input[i] !== '\n' && !(input[i] === '\r' && input[i + 1] !== '\n')) {
|
|
18
|
-
const code = input.charCodeAt(i);
|
|
19
|
-
if (code < 7 || (code > 13 && code < 32 && code !== 27))
|
|
20
|
-
return { tokens, incomplete: true };
|
|
21
|
-
i++;
|
|
22
|
-
}
|
|
23
|
-
column = 0;
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
column = c === '\n' ? 0 : column + 1;
|
|
27
|
-
if (c === '\\' && quote !== "'") {
|
|
28
|
-
const next = input[i + 1] === '\r' && input[i + 2] !== '\n' ? '\n' : input[i + 1];
|
|
29
|
-
if (next === undefined)
|
|
30
|
-
break;
|
|
31
|
-
const code = next.charCodeAt(0);
|
|
32
|
-
if (code < 7 || (code > 13 && code < 32 && code !== 27))
|
|
33
|
-
return { tokens, incomplete: true };
|
|
34
|
-
if (next === '\n') {
|
|
35
|
-
i++;
|
|
36
|
-
column = 0;
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
if (!quote || next === '"' || next === '\\') {
|
|
40
|
-
i++;
|
|
41
|
-
column++;
|
|
42
|
-
word += next;
|
|
43
|
-
active = true;
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (quote) {
|
|
48
|
-
if (c === quote)
|
|
49
|
-
quote = '';
|
|
50
|
-
else
|
|
51
|
-
word += c;
|
|
52
|
-
}
|
|
53
|
-
else if (c === "'" || c === '"') {
|
|
54
|
-
quote = c;
|
|
55
|
-
active = true;
|
|
56
|
-
}
|
|
57
|
-
else if (' \t\r\n'.includes(c)) {
|
|
58
|
-
if (active)
|
|
59
|
-
tokens.push(textBytes(word));
|
|
60
|
-
word = '';
|
|
61
|
-
active = false;
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
word += c;
|
|
65
|
-
active = true;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (quote)
|
|
69
|
-
return { tokens, incomplete: true };
|
|
70
|
-
if (active)
|
|
71
|
-
tokens.push(textBytes(word));
|
|
72
|
-
return { tokens, incomplete: false };
|
|
73
|
-
}
|
|
74
|
-
const noFinalOutput = new Set(['identify', 'mogrify', 'conjure', 'animate', 'display']);
|
|
75
|
-
const imageOperands = new Set(['-read', '--', '-mask', '-read-mask', '-write-mask', '-clip-mask', '-texture', '-tile', '-affinity', '-remap', '-map']);
|
|
76
|
-
export async function discoverImageMagick(tool, args, context = {}) {
|
|
77
|
-
const argv = args.map(a => new Uint8Array(a));
|
|
78
|
-
let command = tool;
|
|
79
|
-
let start = 0;
|
|
80
|
-
// utilities/magick.c matches both installed names with the magick prefix.
|
|
81
|
-
// Subcommand dispatch precedes MagickImageCommand's implied-script branch.
|
|
82
|
-
if ((tool === 'magick' || tool === 'magick-script') && argv[0]) {
|
|
83
|
-
const first = byteText(argv[0]).toLowerCase();
|
|
84
|
-
if (Object.hasOwn(imageMagickReference.executables, first) && first !== 'magick' && first !== 'magick-script') {
|
|
85
|
-
command = first;
|
|
86
|
-
start = 1;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
const tokens = [], resources = [];
|
|
90
|
-
const deferred = [];
|
|
91
|
-
const defer = (index, source, reason) => { deferred.push({ index, source, reason }); };
|
|
92
|
-
const accessible = async (name) => {
|
|
93
|
-
if (name === '-')
|
|
94
|
-
return true;
|
|
95
|
-
try {
|
|
96
|
-
return await context.accessible?.(textBytes(name));
|
|
97
|
-
}
|
|
98
|
-
catch {
|
|
99
|
-
return undefined;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const exists = async (name) => {
|
|
103
|
-
try {
|
|
104
|
-
return await context.exists?.(textBytes(name));
|
|
105
|
-
}
|
|
106
|
-
catch {
|
|
107
|
-
return undefined;
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
let literalFilenames = false;
|
|
111
|
-
let pedantic = false;
|
|
112
|
-
const visited = new Set();
|
|
113
|
-
const read = async (name) => {
|
|
114
|
-
try {
|
|
115
|
-
return await context.read?.(textBytes(name));
|
|
116
|
-
}
|
|
117
|
-
catch {
|
|
118
|
-
return undefined;
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
async function interpreted(value, index, source) {
|
|
122
|
-
// InterpretImageProperties checks leading C whitespace and IsPathAccessible
|
|
123
|
-
// before @ replacement. Do not read/evaluate the replacement in discovery.
|
|
124
|
-
const text = byteText(value);
|
|
125
|
-
let offset = 0;
|
|
126
|
-
while (' \t\r\n\f\v'.includes(text[offset] ?? '\0'))
|
|
127
|
-
offset++;
|
|
128
|
-
if (text[offset] === '@') {
|
|
129
|
-
const path = text.slice(offset + 1);
|
|
130
|
-
const available = await accessible(path);
|
|
131
|
-
if (available !== false) {
|
|
132
|
-
await add(textBytes(path), 'read', index, source, 'text');
|
|
133
|
-
defer(index, source, 'native text replacement can change operand interpretation');
|
|
134
|
-
}
|
|
135
|
-
if (available === undefined)
|
|
136
|
-
defer(index, source, 'filesystem-sensitive text indirection');
|
|
137
|
-
}
|
|
138
|
-
if (text.includes('%'))
|
|
139
|
-
defer(index, source, 'native property expression');
|
|
140
|
-
}
|
|
141
|
-
async function add(operand, access, index, source, role = 'image', raw = false, expandFilenames = true) {
|
|
142
|
-
let name = byteText(operand);
|
|
143
|
-
// utility.c preserves quote bytes in argv and skips ExpandFilenames for
|
|
144
|
-
// these operands. They are not shell quoting to strip or glob candidates.
|
|
145
|
-
if (name.startsWith('"') || name.startsWith("'"))
|
|
146
|
-
expandFilenames = false;
|
|
147
|
-
let kind = 'path';
|
|
148
|
-
let selector;
|
|
149
|
-
if (role === 'text' && name === '-')
|
|
150
|
-
kind = 'descriptor';
|
|
151
|
-
if (raw && role === 'script' && (name === '-' || name.toLowerCase().startsWith('fd:')))
|
|
152
|
-
kind = 'descriptor';
|
|
153
|
-
if (!raw && (role === 'image' || role === 'script')) {
|
|
154
|
-
const parsed = await parseImageMagickOperand(operand, { accessible, exists, literalFilenames, expandFilenames, access });
|
|
155
|
-
name = parsed.name;
|
|
156
|
-
kind = parsed.kind;
|
|
157
|
-
selector = parsed.selector;
|
|
158
|
-
for (const reason of parsed.deferred)
|
|
159
|
-
defer(index, source, reason);
|
|
160
|
-
if (parsed.text !== undefined)
|
|
161
|
-
await interpreted(textBytes(parsed.text), index, source);
|
|
162
|
-
}
|
|
163
|
-
// Concatenate also calls ExpandFilenames before opening its raw operands.
|
|
164
|
-
// Keep coder/scene interpretation out of its eventual fopen/remove paths.
|
|
165
|
-
if (raw && role === 'image' && expandFilenames && await accessible(name) !== true) {
|
|
166
|
-
// ExpandFilenames checks the image tail (without a scene selector),
|
|
167
|
-
// although concatenate subsequently opens the unnormalized raw spelling.
|
|
168
|
-
const expansion = await parseImageMagickOperand(operand, { accessible, exists, literalFilenames, expandFilenames: true });
|
|
169
|
-
// utility.c skips these MagickPath prefixes before testing glob syntax.
|
|
170
|
-
// Concatenate still opens/deletes the original spelling as a raw file.
|
|
171
|
-
// Use the filesystem-sensitive prefix hint, not a lexical colon split.
|
|
172
|
-
const skipsExpansion = expansion.coder !== undefined && ['caption', 'label', 'pango', 'vid'].includes(expansion.coder);
|
|
173
|
-
const tail = name.slice(name.lastIndexOf('/') + 1);
|
|
174
|
-
if (!skipsExpansion && (expansion.kind === 'pattern' || (tail.includes('*') || tail.includes('?')) && await accessible(tail) !== true))
|
|
175
|
-
kind = 'pattern';
|
|
176
|
-
for (const reason of expansion.deferred)
|
|
177
|
-
defer(index, source, reason);
|
|
178
|
-
}
|
|
179
|
-
// ExpandFilenames tests the original argv spelling, before SetImageInfo.
|
|
180
|
-
// A coder-prefixed @name is an image filename, and @names[0] opens the
|
|
181
|
-
// literal list names[0], not the selector-normalized names. Its accessibility
|
|
182
|
-
// check likewise applies to the original operand, never an extracted path.
|
|
183
|
-
const original = byteText(operand);
|
|
184
|
-
if (expandFilenames && (raw || kind === 'path' || kind === 'pattern') && original.startsWith('@') && role === 'image' && await accessible(original) !== true) {
|
|
185
|
-
const list = original.slice(1);
|
|
186
|
-
resources.push({ operand: operand.slice(), path: textBytes(list), index, source, access: 'read', kind: 'path', role: 'list' });
|
|
187
|
-
defer(index, source, 'native filename list expansion');
|
|
188
|
-
const membersStart = resources.length;
|
|
189
|
-
if (visited.has('list:' + list) || visited.size < 32) {
|
|
190
|
-
visited.add('list:' + list);
|
|
191
|
-
const bytes = await read(list);
|
|
192
|
-
if (bytes) {
|
|
193
|
-
// ExpandFilenames uses StringToArgv, NOT the magick-script lexer:
|
|
194
|
-
// quotes only at word start; no escapes or comments.
|
|
195
|
-
const contents = byteText(bytes).split('\0')[0];
|
|
196
|
-
const members = [];
|
|
197
|
-
let offset = 0;
|
|
198
|
-
while (offset < contents.length) {
|
|
199
|
-
while (' \t\r\n\f\v'.includes(contents[offset] ?? '\0'))
|
|
200
|
-
offset++;
|
|
201
|
-
if (offset >= contents.length)
|
|
202
|
-
break;
|
|
203
|
-
const quote = ['"', "'"].includes(contents[offset]) ? contents[offset++] : undefined;
|
|
204
|
-
const start = offset;
|
|
205
|
-
while (offset < contents.length && (quote ? contents[offset] !== quote : !' \t\r\n\f\v'.includes(contents[offset])))
|
|
206
|
-
offset++;
|
|
207
|
-
// utility.c transfers this list directly into argv; it does not
|
|
208
|
-
// recurse through ExpandFilenames for substituted list entries.
|
|
209
|
-
members.push(textBytes(contents.slice(start, offset)));
|
|
210
|
-
while (offset < contents.length && !' \t\r\n\f\v'.includes(contents[offset]))
|
|
211
|
-
offset++;
|
|
212
|
-
}
|
|
213
|
-
const directories = [];
|
|
214
|
-
for (const member of members) {
|
|
215
|
-
let directory;
|
|
216
|
-
try {
|
|
217
|
-
directory = await context.isDirectory?.(member);
|
|
218
|
-
}
|
|
219
|
-
catch { /* Advisory probe only. */ }
|
|
220
|
-
directories.push(directory);
|
|
221
|
-
}
|
|
222
|
-
if (directories.some(directory => directory === undefined))
|
|
223
|
-
defer(index, source, 'filesystem-sensitive filename-list directory filtering');
|
|
224
|
-
// utility.c retains the original argv spelling if every member is a
|
|
225
|
-
// directory. In mixed lists it filters directories, except parameters
|
|
226
|
-
// transferred verbatim using the shared signed command table.
|
|
227
|
-
if (!directories.every(directory => directory === true)) {
|
|
228
|
-
let parameters = 0;
|
|
229
|
-
for (let memberIndex = 0; memberIndex < members.length; memberIndex++) {
|
|
230
|
-
const member = members[memberIndex];
|
|
231
|
-
const name = byteText(member).toLowerCase();
|
|
232
|
-
const arity = Object.hasOwn(imageMagickOptions, name) ? imageMagickOptions[name].arity : 0;
|
|
233
|
-
if (parameters > 0 || arity > 0 || directories[memberIndex] !== true)
|
|
234
|
-
await add(member, access, index, list, 'image', raw, false);
|
|
235
|
-
if (parameters > 0)
|
|
236
|
-
parameters--;
|
|
237
|
-
else
|
|
238
|
-
parameters = arity;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
// Empty/failed expansions retain the original operand in utility.c.
|
|
244
|
-
// Unknown advisory content can do the same; later native expansion still
|
|
245
|
-
// owns the eventual output choice, never these candidate effects.
|
|
246
|
-
if (resources.length === membersStart)
|
|
247
|
-
resources.push({ operand: operand.slice(), path: textBytes(name), ...(selector ? { selector } : {}), index, source, access, kind: 'path', role });
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
resources.push({ operand: operand.slice(), ...(kind === 'path' || kind === 'pattern' ? { path: textBytes(name) } : {}), ...(selector ? { selector } : {}), index, source, access, kind, role });
|
|
251
|
-
}
|
|
252
|
-
async function script(name, index, source) {
|
|
253
|
-
// AcquireScriptTokenInfo opens literal filenames, stdin or fd: streams;
|
|
254
|
-
// it does not call the image coder/scene resolver or ExpandFilenames.
|
|
255
|
-
await add(name, 'read', index, source, 'script', true);
|
|
256
|
-
const path = byteText(name);
|
|
257
|
-
defer(index, source, 'native script stream and runtime dependencies');
|
|
258
|
-
if (path === '-' || path.toLowerCase().startsWith('fd:'))
|
|
259
|
-
return;
|
|
260
|
-
if (visited.has('script:' + path) || visited.size >= 32)
|
|
261
|
-
return;
|
|
262
|
-
visited.add('script:' + path);
|
|
263
|
-
const bytes = await read(path);
|
|
264
|
-
if (!bytes)
|
|
265
|
-
return;
|
|
266
|
-
const lexed = imageMagickScriptTokens(bytes);
|
|
267
|
-
if (lexed.incomplete)
|
|
268
|
-
defer(index, path, 'incomplete script token');
|
|
269
|
-
await scan(lexed.tokens, 0, path, true);
|
|
270
|
-
}
|
|
271
|
-
async function scan(input, begin, source, isScript) {
|
|
272
|
-
const modern = command === 'magick' || command === 'magick-script' || isScript;
|
|
273
|
-
const unexpanded = new Set();
|
|
274
|
-
if (!modern) {
|
|
275
|
-
// Legacy ExpandFilenames runs before command-specific parsing. It skips
|
|
276
|
-
// parameters using the shared table even when IsCommandOption later
|
|
277
|
-
// treats the option as a file, or the legacy signed arity is different.
|
|
278
|
-
for (let i = begin; i < input.length; i++) {
|
|
279
|
-
const count = imageMagickOptions[byteText(input[i]).toLowerCase()]?.arity ?? 0;
|
|
280
|
-
for (let n = 0; n < count && i + 1 < input.length; n++)
|
|
281
|
-
unexpanded.add(++i);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
let depth = 0;
|
|
285
|
-
const outputSettings = new Map();
|
|
286
|
-
const final = !isScript && !noFinalOutput.has(command) ? input.length - 1 : -1;
|
|
287
|
-
for (let i = begin; i < input.length; i++) {
|
|
288
|
-
const raw = input[i], name = byteText(raw), lower = name.toLowerCase();
|
|
289
|
-
if (i !== final && (name === '(' || name === ')' || (modern && (name === '{' || name === '}')))) {
|
|
290
|
-
tokens.push({ raw, index: i, source, depth, kind: name === '(' || name === '{' ? 'open' : 'close', values: [] });
|
|
291
|
-
depth += name === '(' || name === '{' ? 1 : -1;
|
|
292
|
-
continue;
|
|
293
|
-
}
|
|
294
|
-
const entry = Object.hasOwn(imageMagickOptions, lower) ? imageMagickOptions[lower] : undefined;
|
|
295
|
-
const metadata = modern && entry?.flags.includes('NonMagickOptionFlag') ? undefined : entry;
|
|
296
|
-
const signed = (name[0] === '-' || name[0] === '+') && name.length > 1 && 'abcdefghijklmnopqrstuvwxyz'.includes(lower[1]);
|
|
297
|
-
// Modern known-option lookup precedes IsCommandOption. Legacy calls it first.
|
|
298
|
-
const pathAccessible = (!modern || !metadata || i === final) && !pedantic && signed ? await accessible(name) : false;
|
|
299
|
-
if (signed && pathAccessible === undefined)
|
|
300
|
-
defer(i, source, 'filesystem-sensitive option classification');
|
|
301
|
-
const option = i !== final && (modern && metadata || signed && pathAccessible !== true);
|
|
302
|
-
if (option) {
|
|
303
|
-
if (!metadata) {
|
|
304
|
-
defer(i, source, 'unknown option; native validation');
|
|
305
|
-
tokens.push({ raw, index: i, source, depth, kind: 'option', values: [] });
|
|
306
|
-
continue;
|
|
307
|
-
}
|
|
308
|
-
// Audited legacy branch differences (MagickWand/{compare,composite,
|
|
309
|
-
// montage,mogrify,deprecate}.c). Modified discovery hints for the
|
|
310
|
-
// 7.1.2-31 legacy no-operand branches: mogrify.c:4799-4845,
|
|
311
|
-
// deprecate.c:1543-1589 and montage.c:933-942. These signed resets
|
|
312
|
-
// leave following filenames in argv; the modern table consumes values.
|
|
313
|
-
// Other legacy entries remain table hints. See COPYING.ImageMagick.
|
|
314
|
-
const overrides = {
|
|
315
|
-
compare: { '+resize': 0 }, composite: { '+resize': 0, '-tile': 0, '+tile': 0, '-distort': 1, '+distort': 0 },
|
|
316
|
-
montage: { '+resize': 0, '+extent': 0 },
|
|
317
|
-
mogrify: { '+resize': 0, '+function': 0, '+evaluate': 0, '+evaluate-sequence': 0, '+extent': 0 },
|
|
318
|
-
convert: { '+resize': 0, '+function': 0, '+evaluate': 0, '+evaluate-sequence': 0, '+extent': 0 }
|
|
319
|
-
};
|
|
320
|
-
const count = !modern ? overrides[command]?.[lower] ?? metadata.arity : metadata.arity;
|
|
321
|
-
// ProcessCommandOptions reserves the final argv slot before consuming
|
|
322
|
-
// ordinary option arguments. -script alone may borrow that slot.
|
|
323
|
-
// Keep incomplete grammar advisory, and leave the output token intact;
|
|
324
|
-
// native still decides whether any predicted output is reached.
|
|
325
|
-
const argumentEnd = modern && final >= 0 && lower !== '-script' ? final : input.length;
|
|
326
|
-
const values = input.slice(i + 1, Math.min(i + 1 + count, argumentEnd));
|
|
327
|
-
tokens.push({ raw, index: i, source, depth, kind: 'option', values, flags: metadata.flags });
|
|
328
|
-
if (values.length !== count || (modern && final >= 0 && i + count >= final && lower !== '-script'))
|
|
329
|
-
defer(i, source, 'missing option operand before implicit output');
|
|
330
|
-
if (lower === '-script' && modern) {
|
|
331
|
-
if (isScript) {
|
|
332
|
-
// The pinned script parser handles this as a special option, not
|
|
333
|
-
// an fopen or a recursive call. Keep its tokens; native owns the
|
|
334
|
-
// diagnostic and determines whether later predictions execute.
|
|
335
|
-
defer(i, source, 'native script-local special option');
|
|
336
|
-
i += count;
|
|
337
|
-
continue;
|
|
338
|
-
}
|
|
339
|
-
if (values[0]) {
|
|
340
|
-
await script(values[0], i, source);
|
|
341
|
-
return;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
if (lower === '-exit' && modern)
|
|
345
|
-
return;
|
|
346
|
-
// Modern CLI enables ProcessInterpretProperties for ordinary handlers.
|
|
347
|
-
// -set has its own interpretation path despite NeverInterpretArgsFlag;
|
|
348
|
-
// Genesis/special options bypass the ordinary operation handlers.
|
|
349
|
-
const interprets = modern && ((!metadata.flags.includes('NeverInterpretArgsFlag') && !metadata.flags.includes('GenesisOptionFlag') && !metadata.flags.includes('SpecialOptionFlag')) || lower === '-set' || lower === '+set');
|
|
350
|
-
if (interprets)
|
|
351
|
-
for (const value of values)
|
|
352
|
-
await interpreted(value, i, source);
|
|
353
|
-
// Native uses LocaleNCompare for the prefix and LocaleCompare for
|
|
354
|
-
// registry lookup. Track only literal grammar hints, never images.
|
|
355
|
-
const firstValue = values[0] ? byteText(values[0]) : '';
|
|
356
|
-
const registryName = firstValue.slice(0, 9).toLowerCase() === 'registry:' ? firstValue.slice(9).toLowerCase() : undefined;
|
|
357
|
-
if (lower === '-define' && registryName !== undefined) {
|
|
358
|
-
const separator = registryName.indexOf('=');
|
|
359
|
-
const key = separator < 0 ? registryName : registryName.slice(0, separator);
|
|
360
|
-
const enabled = separator >= 0 && ['true', '1', 'yes', 'on'].includes(registryName.slice(separator + 1));
|
|
361
|
-
if (key === 'option:pedantic')
|
|
362
|
-
pedantic = enabled;
|
|
363
|
-
if (key === 'filename:literal')
|
|
364
|
-
literalFilenames = enabled;
|
|
365
|
-
}
|
|
366
|
-
if (lower === '+define' || (modern && lower === '-delete')) {
|
|
367
|
-
if (registryName === 'filename:literal')
|
|
368
|
-
literalFilenames = false;
|
|
369
|
-
if (registryName === 'option:pedantic')
|
|
370
|
-
pedantic = false;
|
|
371
|
-
}
|
|
372
|
-
// CLI -set interprets registry keys/values natively. Only literal
|
|
373
|
-
// hints are useful here; property-derived registry changes stay late.
|
|
374
|
-
if (modern && (lower === '-set' || lower === '+set') && values[0]) {
|
|
375
|
-
const key = registryName === undefined ? firstValue : 'registry:' + registryName;
|
|
376
|
-
const value = values[1] ? byteText(values[1]) : '';
|
|
377
|
-
if (key === 'registry:filename:literal' || key === 'registry:option:pedantic') {
|
|
378
|
-
const enabled = lower === '-set' && ['true', '1', 'yes', 'on'].includes(value.toLowerCase());
|
|
379
|
-
if (key === 'registry:filename:literal')
|
|
380
|
-
literalFilenames = enabled;
|
|
381
|
-
else
|
|
382
|
-
pedantic = enabled;
|
|
383
|
-
if (value.includes('%'))
|
|
384
|
-
defer(i, source, 'native registry property expression');
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
// CLIListOperatorImages and legacy MogrifyImage both treat this
|
|
388
|
-
// literal key as a file read. Native runs SetImageInfo before
|
|
389
|
-
// FileToStringInfo; interpretation timing differs between handlers.
|
|
390
|
-
// +set deletes a property and never reads a profile file.
|
|
391
|
-
if ((modern || ['convert', 'mogrify'].includes(command)) && lower === '-set' && firstValue.toLowerCase() === 'profile') {
|
|
392
|
-
defer(i, source, 'native profile filename normalization or retained filename');
|
|
393
|
-
if (values[1]) {
|
|
394
|
-
const operand = values[1];
|
|
395
|
-
// This handler calls SetImageInfo, then FileToStringInfo, rather
|
|
396
|
-
// than ReadImage. Only ordinary canonical path hints apply here;
|
|
397
|
-
// coder/register/source interpretation and retained filenames stay
|
|
398
|
-
// native. Modern CLI opens the raw value before interpreting the
|
|
399
|
-
// per-image property; legacy MogrifyImage interprets it first.
|
|
400
|
-
const parsed = await parseImageMagickOperand(operand, { accessible, exists, literalFilenames, expandFilenames: false, filenameExpressions: !modern, access: 'write' });
|
|
401
|
-
for (const reason of parsed.deferred)
|
|
402
|
-
defer(i, source, reason);
|
|
403
|
-
const filename = byteText(operand);
|
|
404
|
-
let offset = 0;
|
|
405
|
-
while (' \t\r\n\f\v'.includes(filename[offset] ?? '\0'))
|
|
406
|
-
offset++;
|
|
407
|
-
const replaced = !modern && filename[offset] === '@' && await accessible(filename.slice(offset + 1)) !== false;
|
|
408
|
-
const path = parsed.kind === 'path' && (modern || !filename.includes('%')) && !replaced;
|
|
409
|
-
// Stock explicitly suppresses FileToStringInfo for canonical '-'.
|
|
410
|
-
if (parsed.kind !== 'descriptor' || parsed.name !== '-')
|
|
411
|
-
resources.push({
|
|
412
|
-
operand: operand.slice(), ...(path ? { path: textBytes(parsed.name) } : {}),
|
|
413
|
-
...(path && parsed.selector ? { selector: true } : {}),
|
|
414
|
-
index: i, source, access: 'read', kind: path ? 'path' : 'dynamic', role: 'profile'
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
if (command === 'mogrify' && ['-path', '+path', '-format', '+format'].includes(lower)) {
|
|
419
|
-
if (lower[0] === '+' || !values[0])
|
|
420
|
-
outputSettings.delete(lower.slice(1));
|
|
421
|
-
else
|
|
422
|
-
outputSettings.set(lower.slice(1), values[0]);
|
|
423
|
-
}
|
|
424
|
-
if (values[0]) {
|
|
425
|
-
// WriteImages does not call ExpandFilenames. Legacy preliminary argv
|
|
426
|
-
// expansion also skips known option arguments, including both writes.
|
|
427
|
-
if (lower === '-write' || lower === '+write')
|
|
428
|
-
await add(values[0], 'write', i, source, 'image', false, false);
|
|
429
|
-
else if (['-encipher', '-decipher', '-cdl'].includes(lower)) {
|
|
430
|
-
// FileToStringInfo opens passkeys literally; CDL's FileToString
|
|
431
|
-
// strips one leading @ (with its own native policy check). Both
|
|
432
|
-
// reach FileToBlob, where only '-' denotes stdin, not fd: or coders.
|
|
433
|
-
const operand = values[0], filename = byteText(operand);
|
|
434
|
-
const path = lower === '-cdl' && filename.startsWith('@') && filename.length > 1 ? operand.slice(1) : operand.slice();
|
|
435
|
-
const descriptor = byteText(path) === '-';
|
|
436
|
-
resources.push({ operand: operand.slice(), ...(descriptor ? {} : { path }), index: i, source, access: 'read', kind: descriptor ? 'descriptor' : 'path', role: 'text' });
|
|
437
|
-
}
|
|
438
|
-
// CLI -read/-- expands argv. Cache readers call ReadImage directly;
|
|
439
|
-
// their @names and wildcards are image filenames, not argv lists.
|
|
440
|
-
// Stream's -map selects pixel components, unlike the image-cache
|
|
441
|
-
// reader in the other parsers. IsCommandOption above still owns
|
|
442
|
-
// accessible signed-filename classification before this branch.
|
|
443
|
-
else if (imageOperands.has(lower) && !(lower === '-tile' && ['montage', 'composite'].includes(command)) && !(lower === '-map' && command === 'stream'))
|
|
444
|
-
await add(values[0], 'read', i, source, 'image', false, lower === '-read' || lower === '--');
|
|
445
|
-
else if (lower === '-fill' || lower === '-stroke') {
|
|
446
|
-
// QueryColorCompliance precedes GetImageCache in stock CLI.
|
|
447
|
-
// Path syntax/accessibility predicts candidates, never color validity.
|
|
448
|
-
const paint = byteText(values[0]);
|
|
449
|
-
defer(i, source, 'native color or image classification');
|
|
450
|
-
if (paint.includes('/') || paint.includes('.') || paint.includes(':') || paint.includes('[') || paint.startsWith('@') || await accessible(paint) === true)
|
|
451
|
-
await add(values[0], 'read', i, source, 'image', false, false);
|
|
452
|
-
}
|
|
453
|
-
else if (lower === '-font') {
|
|
454
|
-
const font = await parseImageMagickFontOperand(values[0], { accessible, literalFilenames, interpretProperties: interprets });
|
|
455
|
-
for (const reason of font.deferred)
|
|
456
|
-
defer(i, source, reason);
|
|
457
|
-
if (font.kind !== 'lookup')
|
|
458
|
-
resources.push({ operand: values[0].slice(), ...(font.kind === 'path' ? { path: textBytes(font.name) } : {}), index: i, source, access: 'read', kind: font.kind, role: 'font' });
|
|
459
|
-
}
|
|
460
|
-
else if (lower === '-profile') {
|
|
461
|
-
// GetImageCache first uses ReadImage, including coder/scene/register
|
|
462
|
-
// resolution. On failure FileToStringInfo tries the original literal
|
|
463
|
-
// spelling. Neither reader performs argv list/glob expansion. Predict
|
|
464
|
-
// both candidates without decoding a profile or choosing the branch.
|
|
465
|
-
const operand = values[0];
|
|
466
|
-
const parsed = await parseImageMagickOperand(operand, { accessible, exists, literalFilenames, expandFilenames: false });
|
|
467
|
-
for (const reason of parsed.deferred)
|
|
468
|
-
defer(i, source, reason);
|
|
469
|
-
if (parsed.text !== undefined)
|
|
470
|
-
await interpreted(textBytes(parsed.text), i, source);
|
|
471
|
-
resources.push({ operand: operand.slice(), ...(parsed.kind === 'path' ? { path: textBytes(parsed.name) } : {}), ...(parsed.selector ? { selector: true } : {}), index: i, source, access: 'read', kind: parsed.kind, role: 'profile' });
|
|
472
|
-
if ((parsed.kind !== 'path' || parsed.name !== byteText(operand)) && byteText(operand) !== '-')
|
|
473
|
-
await add(operand, 'read', i, source, 'profile', true, false);
|
|
474
|
-
defer(i, source, 'native profile reader selection and literal fallback');
|
|
475
|
-
}
|
|
476
|
-
else if (['-caption', '-comment', '-label'].includes(lower)) {
|
|
477
|
-
// These settings retain text until ReadImage applies it to decoded
|
|
478
|
-
// images. Constitute's property reader uses the same accessibility
|
|
479
|
-
// rule as direct interpretation; replacement and timing stay native.
|
|
480
|
-
await interpreted(values[0], i, source);
|
|
481
|
-
defer(i, source, 'native text setting interpretation after image read');
|
|
482
|
-
}
|
|
483
|
-
else if (lower === '-print' && !interprets)
|
|
484
|
-
await interpreted(values[0], i, source);
|
|
485
|
-
else if (!interprets && lower === '-format' && ['identify', 'compare', 'montage', 'composite'].includes(command)) {
|
|
486
|
-
// utilities/magick.c requests metadata only for identify/compare.
|
|
487
|
-
// Their handlers interpret retained format text after decoding;
|
|
488
|
-
// montage/composite skip that reader when metadata is NULL.
|
|
489
|
-
if (command === 'identify' || command === 'compare') {
|
|
490
|
-
await interpreted(values[0], i, source);
|
|
491
|
-
defer(i, source, 'native format interpretation after image processing');
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
else if (!interprets && ['convert', 'mogrify'].includes(command) && (lower === '-annotate' || lower === '-set')) {
|
|
495
|
-
// MogrifyImage interprets only the text/value, not the geometry/key.
|
|
496
|
-
// Its property reader probes whitespace-prefixed @ paths and leaves
|
|
497
|
-
// inaccessible names literal. +set deletes a literal key instead.
|
|
498
|
-
if (values[1])
|
|
499
|
-
await interpreted(values[1], i, source);
|
|
500
|
-
}
|
|
501
|
-
else if (!interprets && ['-annotate', '-format', '-set'].includes(lower)) {
|
|
502
|
-
const value = values.at(-1);
|
|
503
|
-
if (byteText(value).startsWith('@'))
|
|
504
|
-
await add(value.slice(1), 'read', i, source, 'text');
|
|
505
|
-
}
|
|
506
|
-
if (['-draw', '-fx', '-format', '-set', '-path'].includes(lower))
|
|
507
|
-
defer(i, source, 'native expression, drawing or output setting');
|
|
508
|
-
}
|
|
509
|
-
i += values.length;
|
|
510
|
-
}
|
|
511
|
-
else {
|
|
512
|
-
// Legacy parsers recognize -- inside their filename branch, not as
|
|
513
|
-
// the modern -read operation. A trailing -- remains a literal file.
|
|
514
|
-
const escaped = !modern && name === '--' && i !== final && i + 1 < input.length;
|
|
515
|
-
tokens.push({ raw, index: i, source, depth, kind: 'operand', values: escaped ? [input[i + 1]] : [] });
|
|
516
|
-
if (escaped) {
|
|
517
|
-
const filenameIndex = ++i;
|
|
518
|
-
const access = command === 'mogrify' ? outputSettings.size ? 'read' : 'read-write' : 'read';
|
|
519
|
-
await add(input[i], access, filenameIndex, source, 'image', false, !unexpanded.has(i));
|
|
520
|
-
if (command === 'mogrify' && outputSettings.size) {
|
|
521
|
-
resources.push({ operand: input[i].slice(), index: i, source, access: 'write', kind: 'dynamic', role: 'image' });
|
|
522
|
-
defer(i, source, 'mogrify path/format output requires native decoded filename');
|
|
523
|
-
}
|
|
524
|
-
if (i === final) {
|
|
525
|
-
await add(input[i], 'write', i, source, 'image', false, false);
|
|
526
|
-
defer(i, source, 'escaped input also reserved as implicit native output');
|
|
527
|
-
}
|
|
528
|
-
continue;
|
|
529
|
-
}
|
|
530
|
-
if (i === final && lower === '-exit')
|
|
531
|
-
continue;
|
|
532
|
-
await add(raw, command === 'mogrify' ? outputSettings.size ? 'read' : 'read-write' : i === final ? 'write' : 'read', i, source, command === 'conjure' ? 'script' : 'image', false, (!modern || i !== final) && !unexpanded.has(i));
|
|
533
|
-
if (command === 'mogrify' && outputSettings.size) {
|
|
534
|
-
resources.push({ operand: raw.slice(), index: i, source, access: 'write', kind: 'dynamic', role: 'image' });
|
|
535
|
-
defer(i, source, 'mogrify path/format output requires native decoded filename');
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
defer(start, 'argv', 'runtime filesystem bridge owns all actual accesses and effects');
|
|
541
|
-
if (command.endsWith('-config'))
|
|
542
|
-
defer(start, 'argv', 'installed build helper; no image grammar');
|
|
543
|
-
else if (command === 'magick-script' && argv[start] && (byteText(argv[start]) === '-' || !byteText(argv[start]).startsWith('-')))
|
|
544
|
-
await script(argv[start], start, 'argv');
|
|
545
|
-
// A script alias starting with an option falls back to MagickImageCommand's
|
|
546
|
-
// ordinary special cases; only the implied-script branch above reads a script.
|
|
547
|
-
else if (['magick', 'magick-script', 'convert'].includes(command) && byteText(argv[start] ?? new Uint8Array()).toLowerCase() === '-concatenate' && argv.length - start >= 2) {
|
|
548
|
-
defer(start, 'argv', 'concatenate filename expansion can change raw output and deletion operands');
|
|
549
|
-
// ExpandFilenames runs over the whole vector before fopen chooses the last
|
|
550
|
-
// operand. Its shared-table parameter skipping applies even though the
|
|
551
|
-
// concatenate loop subsequently opens every argument as a raw filename.
|
|
552
|
-
let parameters = 0;
|
|
553
|
-
for (let i = start + 1; i < argv.length; i++) {
|
|
554
|
-
await add(argv[i], 'read-delete', i, 'argv', 'image', true, parameters === 0);
|
|
555
|
-
if (parameters > 0)
|
|
556
|
-
parameters--;
|
|
557
|
-
else
|
|
558
|
-
parameters = imageMagickOptions[byteText(argv[i]).toLowerCase()]?.arity ?? 0;
|
|
559
|
-
}
|
|
560
|
-
const expanded = resources.splice(0);
|
|
561
|
-
const operands = expanded.filter(r => r.role === 'image');
|
|
562
|
-
const output = operands.pop();
|
|
563
|
-
resources.push(...expanded.filter(r => r.role === 'list'));
|
|
564
|
-
if (output)
|
|
565
|
-
resources.push({ ...output, access: 'write' });
|
|
566
|
-
resources.push(...operands);
|
|
567
|
-
}
|
|
568
|
-
else if ((command === 'magick' || command === 'magick-script') && argv.length - start === 2 && byteText(argv[start]).toLowerCase() === '-list') {
|
|
569
|
-
// MagickImageCommand handles this query before ProcessCommandOptions,
|
|
570
|
-
// without reserving an implicit image output or validating the list here.
|
|
571
|
-
tokens.push({ raw: argv[start], index: start, source: 'argv', depth: 0, kind: 'option', values: [argv[start + 1]], flags: imageMagickOptions['-list'].flags });
|
|
572
|
-
}
|
|
573
|
-
else if (argv.length - start === 1 && ['-version', '--version', '-help', '--help', '-usage'].includes(byteText(argv[start]).toLowerCase())) {
|
|
574
|
-
tokens.push({ raw: argv[start], index: start, source: 'argv', depth: 0, kind: 'option', values: [] });
|
|
575
|
-
}
|
|
576
|
-
else {
|
|
577
|
-
if (command !== 'magick' && command !== 'magick-script')
|
|
578
|
-
defer(start, 'argv', 'legacy parser arities and filename expansion require runtime; modern table hints are not full support');
|
|
579
|
-
await scan(argv, start, 'argv', false);
|
|
580
|
-
}
|
|
581
|
-
return { tool, command, argv, grammarRevision: imageMagickGrammarRevision, tokens, resources, deferred };
|
|
582
|
-
}
|
|
583
|
-
export function createImageMagickShims(binding) {
|
|
584
|
-
if (binding.build !== imageMagickReference.id || binding.grammarRevision !== imageMagickGrammarRevision)
|
|
585
|
-
throw Error('Native ImageMagick build or grammar drift');
|
|
586
|
-
if (binding.argv !== 'bytes' || binding.lateAccess !== 'complete' || binding.effects !== 'live')
|
|
587
|
-
throw Error('ImageMagick requires byte argv, complete late access and live effects');
|
|
588
|
-
const run = binding.run.bind(binding);
|
|
589
|
-
const getDiscoveryContext = binding.discoveryContext?.bind(binding);
|
|
590
|
-
return Object.fromEntries(Object.keys(imageMagickReference.executables).map(tool => [tool, async (args, context) => {
|
|
591
|
-
if (!Array.isArray(args))
|
|
592
|
-
throw new TypeError('Native argv must be an array of byte arguments');
|
|
593
|
-
const argv = Array.from({ length: args.length }, (_, index) => {
|
|
594
|
-
if (!Object.hasOwn(args, index))
|
|
595
|
-
throw new TypeError('Native argv slot is missing');
|
|
596
|
-
const arg = args[index];
|
|
597
|
-
if (!(arg instanceof Uint8Array))
|
|
598
|
-
throw new TypeError('Native argv arguments must be bytes');
|
|
599
|
-
return new Uint8Array(arg);
|
|
600
|
-
});
|
|
601
|
-
if (argv.some(a => a.includes(0)))
|
|
602
|
-
throw Error('NUL is not representable in native argv');
|
|
603
|
-
let discoveryContext;
|
|
604
|
-
try {
|
|
605
|
-
discoveryContext = getDiscoveryContext?.(context);
|
|
606
|
-
}
|
|
607
|
-
catch { /* Advisory lookup must not replace native errors. */ }
|
|
608
|
-
const discovery = await discoverImageMagick(tool, argv, discoveryContext);
|
|
609
|
-
const result = await run({ tool, executable: imageMagickReference.executables[tool], argv, discovery, context });
|
|
610
|
-
const exitCode = result?.exitCode;
|
|
611
|
-
if (!Number.isInteger(exitCode) || exitCode < 0 || exitCode > 255)
|
|
612
|
-
throw new TypeError('Invalid native exit status');
|
|
613
|
-
return { exitCode };
|
|
614
|
-
}]));
|
|
615
|
-
}
|
package/dist/media-cli/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { discover } from "./discover.js";
|
|
2
|
-
export { mediaFrontendContract } from './frontend-contract.js';
|
|
3
|
-
export { discoverContent } from "./content.js";
|
|
4
|
-
export { grammarRevision, nativeReference } from "./options.generated.js";
|
|
5
|
-
export { createFFmpegShims } from "./shim.js";
|
|
6
|
-
export { createImageMagickShims, discoverImageMagick, imageMagickScriptTokens } from "./imagemagick.js";
|
|
7
|
-
export { imageMagickGrammarRevision, imageMagickReference } from "./imagemagick.generated.js";
|
|
8
|
-
export { DependencyResolver, DiscoveryBudgetError, createDependencyResolver, resolveDependencies } from './resolver.js';
|
|
9
|
-
export { parseFilenameExpression } from './filename-expression.js';
|
|
10
|
-
export { classifyResource, filesystemCandidates } from "./network.js";
|
|
11
|
-
export { createMediaEngine } from './engine.js';
|
|
12
|
-
export { createCanonicalMediaFilesystem } from './filesystem.js';
|
package/dist/media-cli/mvg.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AccessReference } from './resolution-types.js';
|
|
2
|
-
import { imageMagickReaderReferences } from './imagemagick-operand.js';
|
|
3
|
-
/** MVG command boundaries and quoted operands; unknown command shapes stop hints
|
|
4
|
-
* instead of scanning arbitrary drawing text for apparent paths. Native still owns
|
|
5
|
-
* primitive validation, macro execution and property evaluation. */
|
|
6
|
-
export declare function parseMvg(content: Uint8Array, cwd: Uint8Array, maxNodes: number, filesystem?: Parameters<typeof imageMagickReaderReferences>[3]): Promise<{
|
|
7
|
-
references: AccessReference[];
|
|
8
|
-
complete: boolean;
|
|
9
|
-
budget: boolean;
|
|
10
|
-
}>;
|