@poe-platform/safe-bash 0.1.800 → 0.1.802
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 +16 -5
- package/dist/image-ast/index.browser.js +122 -76
- package/dist/image-ast/index.js +122 -76
- package/dist/pdf-ast/index.js +4 -3
- package/dist/safe-bash/chunks/chunk-3HQU4OJO.js +13 -0
- package/dist/safe-bash/chunks/{chunk-LUOFIVNI.js → chunk-3NDIFSNM.js} +3 -3
- package/dist/safe-bash/chunks/{chunk-4SEW2Q6H.js → chunk-3R3AANOR.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-K4YMYFRJ.js → chunk-44ALJ4QG.js} +5809 -7424
- package/dist/safe-bash/chunks/{chunk-KHMGTPD6.js → chunk-46Z5E5EV.js} +2 -2
- package/dist/safe-bash/chunks/chunk-4BSJLKNM.js +14 -0
- package/dist/safe-bash/chunks/chunk-4D4N7IU2.js +47 -0
- package/dist/safe-bash/chunks/chunk-55YJASTN.js +14 -0
- package/dist/safe-bash/chunks/{chunk-XB3B7KMM.js → chunk-6O77NL2S.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-T3JTVIEP.js → chunk-6PAVEFT3.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-PYVEAFJM.js → chunk-74GHTNJA.js} +3 -2
- package/dist/safe-bash/chunks/{chunk-LQHGH25W.js → chunk-7R5BDCG7.js} +1 -1
- package/dist/safe-bash/chunks/chunk-7ZBU7KYV.js +14 -0
- package/dist/safe-bash/chunks/{chunk-MHZ24KEI.js → chunk-AM5ESLPH.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-3L3T6LYV.js → chunk-AUSNDQTJ.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-YG5WAHK7.js → chunk-B7TAL7S5.js} +1 -3
- package/dist/safe-bash/chunks/{chunk-QVSRRNZT.js → chunk-BJA5XNP6.js} +6 -6
- package/dist/safe-bash/chunks/{chunk-K7IQZE7D.js → chunk-C5OWC2TL.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-F3RV2F72.js → chunk-CHYGPFVM.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-M4CFCXHN.js → chunk-CS4MNM6I.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-H6JW3E4F.js → chunk-CTVWDACF.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-BHJE5LPZ.js → chunk-D3ANYGMC.js} +1 -1
- package/dist/safe-bash/chunks/chunk-DQP3VHSB.js +15 -0
- package/dist/safe-bash/chunks/{chunk-NLAW7KDI.js → chunk-E7OYNDGL.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-SOZK5JVX.js → chunk-FBUCWVTE.js} +1 -1
- package/dist/safe-bash/chunks/chunk-FZE4HW6G.js +11 -0
- package/dist/safe-bash/chunks/chunk-GEG3BWGE.js +14 -0
- package/dist/safe-bash/chunks/{chunk-HHW7MGS2.js → chunk-GETUOD5D.js} +4 -4
- package/dist/safe-bash/chunks/chunk-HBCN24ZA.js +50 -0
- package/dist/safe-bash/chunks/chunk-HZ7BWKQ3.js +13 -0
- package/dist/safe-bash/chunks/{chunk-JJSTTIEZ.js → chunk-HZAMGT5I.js} +3 -3
- package/dist/safe-bash/chunks/{chunk-KCVSVD65.js → chunk-I5HZ4FGE.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-KV7PKOHV.js → chunk-IWDICZVK.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-I4OAEOP6.js → chunk-J42RIHHJ.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-K2VCOJ2B.js → chunk-K6VCD7IY.js} +7 -12
- package/dist/safe-bash/chunks/chunk-KDNSPLII.js +83 -0
- package/dist/safe-bash/chunks/{chunk-63FXVDGF.js → chunk-LVOBFF4D.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-U5NUZPCC.js → chunk-MHMMRCYC.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-KW24TAIU.js → chunk-NQCM3TYR.js} +922 -658
- package/dist/safe-bash/chunks/{chunk-VYZTG3GV.js → chunk-NZQXYWA3.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-TFGRKY43.js → chunk-OQRVVGR6.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-PPYM75Z3.js → chunk-OV6IHKO6.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-TYD7EVUJ.js → chunk-PH63PLPZ.js} +8 -8
- package/dist/safe-bash/chunks/chunk-QGUV42T5.js +44 -0
- package/dist/safe-bash/chunks/chunk-R3NAKOED.js +51 -0
- package/dist/safe-bash/chunks/chunk-RRR7AQ24.js +38 -0
- package/dist/safe-bash/chunks/{chunk-RKKRJ54E.js → chunk-RSTHLAF3.js} +30 -23
- package/dist/safe-bash/chunks/{chunk-RMWLWH7Q.js → chunk-SHEMU2Z7.js} +378 -1148
- package/dist/safe-bash/chunks/{chunk-7YSRXFEG.js → chunk-TFIBK2GI.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-I7L3G3NX.js → chunk-UE5KZDEK.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-QU3BVQ53.js → chunk-UTBUUFDM.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-6HZYFL3H.js → chunk-VKNVHEX3.js} +2 -7
- package/dist/safe-bash/chunks/chunk-VSAJ4OTM.js +962 -0
- package/dist/safe-bash/chunks/{chunk-46UISJCK.js → chunk-VTH3MLDU.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-JTLSUJ7V.js → chunk-WDLGKIHD.js} +56 -39
- package/dist/safe-bash/chunks/chunk-XAQMU6OY.js +14 -0
- package/dist/safe-bash/chunks/{chunk-LLZCZ24K.js → chunk-XVOSKJE2.js} +1 -1
- package/dist/safe-bash/chunks/chunk-ZVD5IS4V.js +49 -0
- package/dist/safe-bash/chunks/{csvkit-QGP3GAOB.js → csvkit-TACDU7FC.js} +3 -3
- package/dist/safe-bash/chunks/{ffmpeg-JTVH26MK.js → ffmpeg-WTC3TEFI.js} +2 -2
- package/dist/safe-bash/chunks/{gh-I7QX7N5C.js → gh-6WU6PXL4.js} +2 -2
- package/dist/safe-bash/chunks/{git-MA7NKYVP.js → git-EFZIGJW4.js} +2 -2
- package/dist/safe-bash/chunks/{imagemagick-Y4NPWX2Q.js → imagemagick-EIEYGWPF.js} +2 -2
- package/dist/safe-bash/chunks/{implementation-BWDKOVQJ.js → implementation-MLFHUQ5M.js} +2 -2
- package/dist/safe-bash/chunks/{mmdc-44PELHDG.js → mmdc-ROQJT5HQ.js} +2 -2
- package/dist/safe-bash/chunks/{pdfimages-635TRW4Q.js → pdfimages-DW7LWXFI.js} +2 -2
- package/dist/safe-bash/chunks/{pdfinfo-FSDAA2KY.js → pdfinfo-TIP6XLUQ.js} +2 -2
- package/dist/safe-bash/chunks/{pdftk-GQ5UH3VG.js → pdftk-DMG22ITZ.js} +2 -2
- package/dist/safe-bash/chunks/{pdftoppm-YTXQCAYT.js → pdftoppm-WNDYR72T.js} +2 -2
- package/dist/safe-bash/chunks/{pdftotext-CVA2G7FY.js → pdftotext-5IPZ4NI7.js} +2 -2
- package/dist/safe-bash/chunks/{qpdf-HZMIFG4A.js → qpdf-TTX2DIUA.js} +2 -2
- package/dist/safe-bash/chunks/{sips-E7UBDP33.js → sips-XYS46JPJ.js} +2 -2
- package/dist/safe-bash/chunks/{soffice-ELASUWUK.js → soffice-TU73E5KL.js} +2 -2
- package/dist/safe-bash/chunks/{wkhtmltopdf-EPO6YCMG.js → wkhtmltopdf-FSZ2CHGE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-QBGA56UH.js → chunk-2ELYGJDD.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-52PCQXD2.js → chunk-2NHI5F5S.js} +2 -1
- package/dist/safe-bash/command-chunks/{chunk-HDKVO47G.js → chunk-2SQEIUGJ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-5LSGEIZY.js → chunk-3HHCU5YU.js} +4 -3
- package/dist/safe-bash/command-chunks/{chunk-TF6OA2GK.js → chunk-3NV3HYT2.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2QHG43WJ.js → chunk-4BB2SWJ5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IEXHHNOF.js → chunk-4J5CZ2DP.js} +2 -7
- package/dist/safe-bash/command-chunks/{chunk-WDHI3S6Y.js → chunk-4OOUQTQO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-YMONDXET.js → chunk-4ZQWGOZB.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-L6DVEBW3.js → chunk-5BSTFCXG.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-Q3DII3Q7.js → chunk-5PWJG2UK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-JMPP4TCW.js → chunk-5UBXNSFZ.js} +3 -2
- package/dist/safe-bash/command-chunks/{chunk-3NG75MOB.js → chunk-67GQA75T.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-L6SU4S26.js → chunk-6B7WQIKB.js} +0 -7
- package/dist/safe-bash/command-chunks/{chunk-V6MSPQLA.js → chunk-6BNTBWIK.js} +4 -39
- package/dist/safe-bash/command-chunks/{chunk-SAMH7SQE.js → chunk-6GWJUQAV.js} +237 -145
- package/dist/safe-bash/command-chunks/{chunk-JN7WIP6S.js → chunk-6KJ3LPI2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HLDTOR7M.js → chunk-6ZVI7LUY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-X6NJC3IC.js → chunk-75OFBY5R.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-MRW5HD2D.js → chunk-7O3E4LPT.js} +4 -22
- package/dist/safe-bash/command-chunks/{chunk-TEVJJPTC.js → chunk-7U7EXOXX.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-6CYTRQ24.js → chunk-7VTKQUA5.js} +20 -17
- package/dist/safe-bash/command-chunks/{chunk-BZPAWTUL.js → chunk-AEF5BA3D.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-63R3FEZJ.js → chunk-AIV5BF5W.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-AYUTO323.js → chunk-AKJG2XD3.js} +2 -18
- package/dist/safe-bash/command-chunks/{chunk-J34TZVMW.js → chunk-ALDC4XP4.js} +0 -5
- package/dist/safe-bash/command-chunks/{chunk-CKXV2CLD.js → chunk-ARBYOQUZ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-44AHAB5O.js → chunk-BDSMROQZ.js} +1 -4
- package/dist/safe-bash/command-chunks/{chunk-53P53XFM.js → chunk-BPE5INLI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-OT4LZMLB.js → chunk-BR73BIOW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WB5SVIG7.js → chunk-C5YYCQHW.js} +498 -88
- package/dist/safe-bash/command-chunks/{chunk-EUSPTFAX.js → chunk-CAP7ZJSY.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-DWFLVJC6.js → chunk-CCRHMAU5.js} +2 -1
- package/dist/safe-bash/command-chunks/{chunk-GI4CJED2.js → chunk-CQTRW45K.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KKG4BAFZ.js → chunk-DIEPXUM4.js} +6 -0
- package/dist/safe-bash/command-chunks/{chunk-QJAFJP2G.js → chunk-DZCY63VJ.js} +12 -10
- package/dist/safe-bash/command-chunks/{chunk-QUENU6GM.js → chunk-E55UKBIE.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-MC3VWLIZ.js → chunk-FDBUV4HJ.js} +28 -19
- package/dist/safe-bash/command-chunks/{chunk-7FKUC34S.js → chunk-FPVUD6TH.js} +6 -3
- package/dist/safe-bash/command-chunks/{chunk-E2LB7FRT.js → chunk-FXOA7RBK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QWIDNAAK.js → chunk-FZTK4MFI.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-K543PB3I.js → chunk-G66QUHIZ.js} +6 -35
- package/dist/safe-bash/command-chunks/{chunk-YJDV76GL.js → chunk-GFQZCKO6.js} +29 -19
- package/dist/safe-bash/command-chunks/{chunk-FKKB5X5V.js → chunk-GOB777HR.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IYPAQ7PH.js → chunk-GRBWW4SG.js} +6 -0
- package/dist/safe-bash/command-chunks/{chunk-EFANWIHL.js → chunk-GY3BWK7K.js} +1 -0
- package/dist/safe-bash/command-chunks/{chunk-PPNBNFAU.js → chunk-GYQ2HAKQ.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-PJJUYO3R.js → chunk-II77KPZN.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-VL67NWNS.js → chunk-JDYXY44P.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4QJOYXVB.js → chunk-JV7LBUTP.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IKS2YXZQ.js → chunk-K67MWWWH.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-BKCNF5U3.js → chunk-KQLD3AED.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-UMDIOL3O.js → chunk-KXU3IRUO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QZF3SINC.js → chunk-LAOM65EE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HFII3QYO.js → chunk-LWS62ISU.js} +46 -32
- package/dist/safe-bash/command-chunks/{chunk-BZDDAPSV.js → chunk-LWSBAWLT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-U6G67N23.js → chunk-MIXBO6U7.js} +18 -5
- package/dist/safe-bash/command-chunks/{chunk-JQ74HC37.js → chunk-MQFIPHIQ.js} +23 -50
- package/dist/safe-bash/command-chunks/{chunk-ZJBR5Q5I.js → chunk-MSFXC3OC.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-NI7MKJPN.js → chunk-MTQH74CF.js} +3 -55
- package/dist/safe-bash/command-chunks/chunk-MWUZZWXK.js +354 -0
- package/dist/safe-bash/command-chunks/{chunk-RVLO4DYT.js → chunk-N4PFUSRM.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WBNZ4PRE.js → chunk-NGG2XL56.js} +7 -4
- package/dist/safe-bash/command-chunks/{chunk-D4OP2BR3.js → chunk-NKFYQSES.js} +1 -2
- package/dist/safe-bash/command-chunks/{chunk-NGWB2YBL.js → chunk-O4JQSB7O.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-GLOZX57Y.js → chunk-OQKC5ZU2.js} +23 -114
- package/dist/safe-bash/command-chunks/{chunk-7L24L4UO.js → chunk-OQU6UT6X.js} +2 -20
- package/dist/safe-bash/command-chunks/{chunk-TYCGMRLM.js → chunk-OYYV7ZAF.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-SVULUDOP.js → chunk-P2N33UMN.js} +20 -81
- package/dist/safe-bash/command-chunks/{chunk-Q7Q5GM5S.js → chunk-P5APDEFB.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-3HXDA5PT.js → chunk-PMBFZXTK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4Y3WVMK4.js → chunk-PV66YWHB.js} +1 -0
- package/dist/safe-bash/command-chunks/{chunk-AXK3H4PX.js → chunk-QJ33BHI4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3LSOYLNV.js → chunk-QKFSRZGQ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-JZSNU2MY.js → chunk-QKJLP53H.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-LC2MFKT4.js → chunk-RMWQAAO5.js} +24 -25
- package/dist/safe-bash/command-chunks/{chunk-QDTBMSBE.js → chunk-RO62EWX6.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4C6QI5BQ.js → chunk-RZZI24ZE.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-PFAADCB5.js → chunk-SDNBCQ3X.js} +10 -24
- package/dist/safe-bash/command-chunks/{chunk-36O5OT7E.js → chunk-T35Y7YQD.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-6HMX4CQS.js → chunk-TGSNCQSR.js} +44 -16
- package/dist/safe-bash/command-chunks/{chunk-5T7CRJHW.js → chunk-TIOCQVUQ.js} +4 -7
- package/dist/safe-bash/command-chunks/{chunk-GN2TKLE7.js → chunk-TS65BJHG.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-7RGB363W.js → chunk-TSCGT46G.js} +3 -2
- package/dist/safe-bash/command-chunks/{chunk-KBEURXFF.js → chunk-UN6WS55J.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-SX2X3IH4.js → chunk-V2V5OCL3.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ERYJLO6G.js → chunk-V7A7DRTU.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5SHGJ7NO.js → chunk-VA5ZHYYA.js} +73 -33
- package/dist/safe-bash/command-chunks/{chunk-XETLEHZP.js → chunk-VPR5LQYX.js} +3 -2
- package/dist/safe-bash/command-chunks/{chunk-3DT2YOGW.js → chunk-VSRGNQCP.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-N2F74VRO.js → chunk-VT6MJBEI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-J5SN3PZ3.js → chunk-VXSLJH7G.js} +53 -3
- package/dist/safe-bash/command-chunks/{chunk-PXYOWWMV.js → chunk-W7RAD4EW.js} +4 -3
- package/dist/safe-bash/command-chunks/{chunk-YGC6OS5O.js → chunk-WECIOOQB.js} +5 -8
- package/dist/safe-bash/command-chunks/{chunk-HHP343KT.js → chunk-WTECBRU4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-AO6Z5EQ7.js → chunk-WVE64WM2.js} +6 -5
- package/dist/safe-bash/command-chunks/{chunk-Z7RVSD5K.js → chunk-WVHONVZ4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-HLGKIZ25.js → chunk-X54L3DBL.js} +6 -9
- package/dist/safe-bash/command-chunks/{chunk-QNIMV57G.js → chunk-XNLFHHOC.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XAFSZDY2.js → chunk-XS72HTMA.js} +11 -0
- package/dist/safe-bash/command-chunks/{chunk-KYSPGS33.js → chunk-YIQACGEW.js} +2 -0
- package/dist/safe-bash/command-chunks/{chunk-NAY27PXB.js → chunk-YOFC45RK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-T5H5UJQ3.js → chunk-YVNGTIJO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QI7LGHJJ.js → chunk-Z45N42QC.js} +21 -6
- package/dist/safe-bash/command-chunks/{chunk-67IQF5GC.js → chunk-ZYHTWNAE.js} +23 -9
- package/dist/safe-bash/command-chunks/{chunk-STC3LEWJ.js → chunk-ZYXH3B66.js} +5 -3
- package/dist/safe-bash/commands/apply-patch/index.browser.js +14 -0
- package/dist/safe-bash/commands/archive/index.browser.js +36 -0
- package/dist/safe-bash/commands/bytes/compression/index.js +3 -2
- package/dist/safe-bash/commands/column/index.browser.js +12 -0
- package/dist/safe-bash/commands/copy-preserve.d.ts +1 -0
- package/dist/safe-bash/commands/csplit/index.browser.js +2 -2
- package/dist/safe-bash/commands/docx/index.browser.js +1 -1
- package/dist/safe-bash/commands/du/index.browser.js +14 -0
- package/dist/safe-bash/commands/execution.js +19 -13
- package/dist/safe-bash/commands/expr/index.browser.js +12 -0
- package/dist/safe-bash/commands/factor/index.browser.js +2 -2
- package/dist/safe-bash/commands/file/index.browser.js +14 -0
- package/dist/safe-bash/commands/filesystem.d.ts +1 -1
- package/dist/safe-bash/commands/filesystem.js +26 -15
- package/dist/safe-bash/commands/getopt/index.browser.js +2 -2
- package/dist/safe-bash/commands/grep-aliases/index.browser.js +14 -0
- package/dist/safe-bash/commands/hexdump/index.browser.js +2 -2
- package/dist/safe-bash/commands/html-to-markdown/index.browser.js +16 -0
- package/dist/safe-bash/commands/htmlq/index.d.ts +1 -1
- 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 +1 -1
- package/dist/safe-bash/commands/metadata/index.browser.js +21 -0
- package/dist/safe-bash/commands/network/curl.d.ts +1 -1
- package/dist/safe-bash/commands/network/curl.js +1 -3
- package/dist/safe-bash/commands/network/index.browser.js +4 -4
- package/dist/safe-bash/commands/network/platform-portable.d.ts +1 -5
- package/dist/safe-bash/commands/network/platform-portable.js +1 -26
- package/dist/safe-bash/commands/network/public.d.ts +2 -2
- package/dist/safe-bash/commands/network/public.js +2 -2
- package/dist/safe-bash/commands/network/transport.js +2 -2
- package/dist/safe-bash/commands/network/wget.d.ts +1 -1
- package/dist/safe-bash/commands/network/wget.js +1 -3
- package/dist/safe-bash/commands/node/filesystem.js +3 -2
- package/dist/safe-bash/commands/node/index.browser.js +8 -8
- package/dist/safe-bash/commands/node/types.js +1 -1
- package/dist/safe-bash/commands/op/index.browser.js +3 -3
- package/dist/safe-bash/commands/pr/index.browser.js +2 -2
- package/dist/safe-bash/commands/python/host-capabilities.js +31 -14
- package/dist/safe-bash/commands/python/index.browser.js +11 -11
- package/dist/safe-bash/commands/python/manifest.d.ts +1 -0
- package/dist/safe-bash/commands/python/manifest.js +6 -3
- package/dist/safe-bash/commands/python/shell-capability.d.ts +1 -0
- package/dist/safe-bash/commands/python/shell-capability.js +3 -2
- package/dist/safe-bash/commands/python/worker.browser.js +3 -3
- package/dist/safe-bash/commands/regex-execution/public.browser.js +8 -6
- package/dist/safe-bash/commands/safejs/runtime.js +16 -7
- package/dist/safe-bash/commands/split/index.browser.js +14 -0
- package/dist/safe-bash/commands/standard.d.ts +1 -0
- package/dist/safe-bash/commands/standard.js +2 -1
- package/dist/safe-bash/commands/stream-format/index.browser.js +11 -0
- package/dist/safe-bash/commands/stream-inspection/index.browser.js +11 -0
- package/dist/safe-bash/commands/streams.js +11 -29
- package/dist/safe-bash/commands/table-text/index.browser.js +11 -0
- package/dist/safe-bash/commands/text.js +269 -496
- package/dist/safe-bash/commands/time-env/index.browser.js +15 -0
- package/dist/safe-bash/commands/tree/index.browser.js +14 -0
- package/dist/safe-bash/commands/tsort/index.browser.js +2 -2
- 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 +1 -1
- package/dist/safe-bash/core.d.ts +6 -1
- package/dist/safe-bash/core.js +1 -1
- package/dist/safe-bash/full-core.browser.js +308 -295
- package/dist/safe-bash/jobs.browser.js +5 -5
- package/dist/safe-bash/opt-in/commands/dd/index.js +2 -0
- package/dist/safe-bash/opt-in/optional/commands/shuf/options.d.ts +1 -0
- package/dist/safe-bash/opt-in/optional/commands/shuf/options.js +2 -4
- package/dist/safe-bash/opt-in/optional/commands/shuf/shuf.js +2 -1
- package/dist/safe-bash/optional-host.browser.js +15 -15
- package/dist/safe-bash/plugins/composition.d.ts +1 -0
- package/dist/safe-bash/plugins/composition.js +3 -8
- package/dist/safe-bash/plugins/index.browser.js +41 -27
- package/dist/safe-bash/registry-entry.browser.js +42 -28
- package/dist/safe-bash/search.browser.js +48 -0
- package/dist/safe-bash/shell/arrays/bindings.js +1 -1
- package/dist/safe-bash/shell/arrays/state.js +4 -0
- package/dist/safe-bash/shell/brace-expansion.js +1 -1
- package/dist/safe-bash/shell/dynamic-variables.d.ts +10 -0
- package/dist/safe-bash/shell/dynamic-variables.js +25 -0
- package/dist/safe-bash/shell/parser.js +8 -1
- package/dist/safe-bash/shell/runtime.d.ts +4 -13
- package/dist/safe-bash/shell/runtime.js +334 -1049
- package/dist/safe-bash/shell/shell.js +2 -54
- package/dist/safe-bash/shell-entry.browser.js +35 -26
- package/dist/safe-bash/trap.browser.js +4 -4
- package/dist/safe-bash/yq-browser/index.js +1 -1
- package/dist/safe-bash-base-encoding-engine/base.js +2 -2
- package/dist/safe-bash-base-encoding-engine/shared.js +1 -1
- package/dist/safe-bash-byte-input-engine/index.d.ts +3 -2
- package/dist/safe-bash-byte-input-engine/index.js +4 -1
- package/dist/safe-bash-checksum-engine/index.js +13 -6
- package/dist/safe-bash-command-apply-patch/apply.d.ts +1 -1
- package/dist/safe-bash-command-apply-patch/apply.js +4 -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-inspection.js +2 -2
- package/dist/safe-bash-command-awk/awk-runtime.js +3 -3
- package/dist/safe-bash-command-awk/awk-syntax.d.ts +1 -1
- package/dist/safe-bash-command-awk/awk-syntax.js +2 -2
- package/dist/safe-bash-command-awk/awk-values.js +1 -1
- 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.d.ts +2 -0
- package/dist/safe-bash-command-bc/index.js +123 -92
- package/dist/safe-bash-command-column/column.js +5 -5
- package/dist/safe-bash-command-column/display.d.ts +1 -1
- package/dist/safe-bash-command-column/display.js +1 -1
- package/dist/safe-bash-command-column/index.js +5 -5
- package/dist/safe-bash-command-column/internal.d.ts +0 -2
- package/dist/safe-bash-command-column/internal.js +1 -1
- package/dist/safe-bash-command-column/layout.js +4 -4
- package/dist/safe-bash-command-column/table.js +2 -2
- package/dist/safe-bash-command-comm/comm.js +1 -1
- package/dist/safe-bash-command-comm/index.js +1 -1
- package/dist/safe-bash-command-csvcut/index.d.ts +1 -0
- package/dist/safe-bash-command-csvcut/index.js +1 -0
- package/dist/safe-bash-command-csvgrep/index.d.ts +1 -0
- package/dist/safe-bash-command-csvgrep/index.js +2 -2
- package/dist/safe-bash-command-csvkit/index.js +9 -9
- package/dist/safe-bash-command-csvkit/sync-support.js +1 -1
- 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-dd/index.js +2 -0
- 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-exiftool/index.d.ts +1 -0
- package/dist/safe-bash-command-fd/index.js +9 -9
- package/dist/safe-bash-command-ffmpeg/index.js +31 -8
- package/dist/safe-bash-command-file/index.js +1 -1
- package/dist/safe-bash-command-file/shared.js +1 -1
- package/dist/safe-bash-command-find/find.js +1 -1
- package/dist/safe-bash-command-find/index.js +1 -1
- package/dist/safe-bash-command-gzip/index.js +3 -2
- package/dist/safe-bash-command-hexdump/command.js +4 -4
- package/dist/safe-bash-command-hexdump/custom.d.ts +24 -0
- package/dist/safe-bash-command-hexdump/index.js +4 -4
- package/dist/safe-bash-command-hexdump/internal.d.ts +2 -0
- package/dist/safe-bash-command-hexdump/internal.js +1 -1
- package/dist/safe-bash-command-hexdump/io.js +2 -2
- package/dist/safe-bash-command-hexdump/options.d.ts +3 -0
- package/dist/safe-bash-command-hexdump/options.js +2 -2
- package/dist/safe-bash-command-hostname/index.js +1 -1
- package/dist/safe-bash-command-html-to-markdown/budget.js +1 -1
- package/dist/safe-bash-command-html-to-markdown/entities.js +3 -3
- package/dist/safe-bash-command-html-to-markdown/index.js +6 -6
- package/dist/safe-bash-command-html-to-markdown/input.js +5 -5
- package/dist/safe-bash-command-html-to-markdown/parser.d.ts +1 -0
- package/dist/safe-bash-command-html-to-markdown/parser.js +4 -4
- package/dist/safe-bash-command-html-to-markdown/render.js +5 -5
- package/dist/safe-bash-command-html-to-markdown/text.js +2 -2
- package/dist/safe-bash-command-htmlq/index.d.ts +1 -0
- package/dist/safe-bash-command-htmlq/index.js +27 -9
- package/dist/safe-bash-command-iconv/codec.js +1 -1
- package/dist/safe-bash-command-iconv/command.js +2 -2
- package/dist/safe-bash-command-iconv/index.js +2 -2
- package/dist/safe-bash-command-imagemagick/index.js +24 -6
- package/dist/safe-bash-command-join/index.js +1 -1
- package/dist/safe-bash-command-join/join.js +1 -1
- 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 +43 -28
- package/dist/safe-bash-command-mmdc/index.d.ts +1 -0
- 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-numfmt/index.js +0 -11
- package/dist/safe-bash-command-od/index.js +101 -68
- package/dist/safe-bash-command-pandoc/command.js +1 -1
- package/dist/safe-bash-command-pandoc/index.js +1 -1
- package/dist/safe-bash-command-paste/index.js +1 -1
- package/dist/safe-bash-command-paste/paste.js +1 -1
- package/dist/safe-bash-command-pathchk/index.js +3 -13
- package/dist/safe-bash-command-pdfimages/index.js +27 -11
- package/dist/safe-bash-command-pdfinfo/index.js +19 -10
- package/dist/safe-bash-command-pdftk/index.js +3 -3
- package/dist/safe-bash-command-pdftoppm/index.js +26 -10
- package/dist/safe-bash-command-pdftotext/index.js +27 -13
- package/dist/safe-bash-command-qpdf/index.js +5 -5
- package/dist/safe-bash-command-rg/index.js +1 -1
- package/dist/safe-bash-command-rg/rg-command.d.ts +0 -1
- package/dist/safe-bash-command-rg/rg-command.js +3 -5
- 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/options.d.ts +1 -0
- package/dist/safe-bash-command-shuf/options.js +2 -4
- package/dist/safe-bash-command-shuf/shuf.js +2 -1
- package/dist/safe-bash-command-soffice/index.js +20 -16
- package/dist/safe-bash-command-split/index.js +3 -3
- package/dist/safe-bash-command-split/io.js +1 -1
- package/dist/safe-bash-command-split/outputs.js +2 -2
- package/dist/safe-bash-command-split/split.js +3 -3
- package/dist/safe-bash-command-sqlite3/btree.d.ts +1 -0
- package/dist/safe-bash-command-sqlite3/engine.d.ts +6 -0
- package/dist/safe-bash-command-sqlite3/index.js +284 -85
- package/dist/safe-bash-command-ssconvert/commands.js +9 -9
- package/dist/safe-bash-command-ssconvert/core.js +8 -8
- package/dist/safe-bash-command-ssconvert/formats/csv.js +9 -9
- package/dist/safe-bash-command-ssconvert/formats/ods.js +8 -8
- package/dist/safe-bash-command-ssconvert/formats/spreadsheetml.js +2 -2
- package/dist/safe-bash-command-ssconvert/formats/xls.js +9 -9
- package/dist/safe-bash-command-ssconvert/formats/xlsx.js +8 -8
- package/dist/safe-bash-command-ssconvert/index.js +20 -20
- package/dist/safe-bash-command-tar/extract.js +1 -1
- package/dist/safe-bash-command-tar/index.js +5 -4
- package/dist/safe-bash-command-tar/modes.js +2 -2
- package/dist/safe-bash-command-tree/arguments.js +3 -3
- package/dist/safe-bash-command-tree/charset.js +1 -1
- package/dist/safe-bash-command-tree/index.js +4 -4
- package/dist/safe-bash-command-tree/io.js +1 -1
- package/dist/safe-bash-command-tree/pattern.js +2 -2
- package/dist/safe-bash-command-tree/tree.js +4 -4
- package/dist/safe-bash-command-unexpand/index.js +1 -1
- package/dist/safe-bash-command-unexpand/unexpand.js +1 -1
- package/dist/safe-bash-command-unrtf/index.js +14 -7
- package/dist/safe-bash-command-unzip/index.js +1 -1
- package/dist/safe-bash-command-unzip/unzip.js +1 -1
- package/dist/safe-bash-command-wget/index.js +1 -1
- package/dist/safe-bash-command-wget/wget.js +1 -1
- package/dist/safe-bash-command-xan/argv.d.ts +1 -1
- package/dist/safe-bash-command-xan/argv.js +1 -1
- package/dist/safe-bash-command-xan/commands.js +5 -3
- package/dist/safe-bash-command-xan/csv.d.ts +1 -1
- package/dist/safe-bash-command-xan/csv.js +1 -1
- package/dist/safe-bash-command-xan/index.js +7 -7
- package/dist/safe-bash-command-xan/io.js +3 -3
- package/dist/safe-bash-command-xmllint/index.js +1 -1
- package/dist/safe-bash-command-xxd/index.js +105 -91
- package/dist/safe-bash-command-xz/command.d.ts +2 -0
- package/dist/safe-bash-command-xz/index.d.ts +1 -1
- package/dist/safe-bash-command-xz/index.js +8 -0
- package/dist/safe-bash-command-yq/query.js +1 -1
- package/dist/safe-bash-command-zip/index.js +1 -1
- package/dist/safe-bash-command-zip/zip.js +1 -1
- package/dist/safe-bash-contracts/escaping.js +3 -3
- package/dist/safe-bash-contracts/filesystem-output.js +2 -2
- package/dist/safe-bash-contracts/index.d.ts +1 -0
- package/dist/safe-bash-contracts/index.js +7 -3
- package/dist/safe-bash-contracts/io.d.ts +4 -1
- package/dist/safe-bash-contracts/io.js +3 -1
- package/dist/safe-bash-contracts/managed-abort.d.ts +10 -0
- package/dist/safe-bash-contracts/output.js +2 -2
- package/dist/safe-bash-diff-engine/index.js +1 -1
- package/dist/safe-bash-diff-engine/shared.d.ts +3 -2
- package/dist/safe-bash-diff-engine/shared.js +1 -1
- package/dist/safe-bash-io-engine/commands/archive/internal.js +5 -23
- package/dist/safe-bash-io-engine/commands/search/requirements.js +2 -2
- package/dist/safe-bash-io-engine/commands/text-programs/shared.js +33 -44
- package/dist/safe-bash-io-engine/internal.js +1 -1
- package/dist/safe-bash-io-engine/shell/pattern.js +1 -1
- package/dist/safe-bash-io-engine/shell/string-operations.js +1 -1
- package/dist/safe-bash-mcp/index.browser.d.ts +155 -35
- package/dist/safe-bash-mcp/index.browser.js +416 -0
- package/dist/safe-bash-mcp/index.d.ts +54 -2
- package/dist/safe-bash-mcp/index.js +286 -90
- package/dist/safe-bash-network-engine/aggregate.js +2 -2
- package/dist/safe-bash-network-engine/args.js +4 -4
- package/dist/safe-bash-network-engine/authorizer.js +1 -1
- package/dist/safe-bash-network-engine/body.js +6 -6
- package/dist/safe-bash-network-engine/decode.d.ts +1 -1
- package/dist/safe-bash-network-engine/decode.js +3 -4
- package/dist/safe-bash-network-engine/fetch-transport.js +3 -3
- package/dist/safe-bash-network-engine/form-content-type.js +2 -2
- package/dist/safe-bash-network-engine/form-headers.js +2 -2
- package/dist/safe-bash-network-engine/glob.js +1 -1
- package/dist/safe-bash-network-engine/index.js +4 -4
- package/dist/safe-bash-network-engine/input.js +6 -6
- package/dist/safe-bash-network-engine/output.js +2 -2
- package/dist/safe-bash-network-engine/platform-portable.js +3 -3
- package/dist/safe-bash-network-engine/shared.js +2 -2
- package/dist/safe-bash-network-engine/types.d.ts +7 -2
- package/dist/safe-bash-network-engine/types.js +1 -1
- package/dist/safe-bash-network-engine/url.js +2 -2
- package/dist/safe-bash-query-engine/capture.js +3 -3
- package/dist/safe-bash-query-engine/delpaths.js +3 -3
- package/dist/safe-bash-query-engine/formats.js +2 -2
- package/dist/safe-bash-query-engine/index.js +11 -11
- package/dist/safe-bash-query-engine/indices.js +3 -3
- package/dist/safe-bash-query-engine/input.js +1 -1
- package/dist/safe-bash-query-engine/interpreter.js +9 -9
- package/dist/safe-bash-query-engine/parser.js +1 -1
- package/dist/safe-bash-query-engine/query-core.js +11 -11
- package/dist/safe-bash-query-engine/regex.js +4 -4
- package/dist/safe-bash-query-engine/splits.js +5 -5
- package/dist/safe-bash-query-engine/values.js +2 -2
- package/dist/safe-bash-regex-engine/ere/matcher.js +102 -30
- package/dist/safe-bash-regex-engine/execution/bounded-provider.js +55 -67
- package/dist/safe-bash-regex-engine/execution/portable.d.ts +0 -1
- package/dist/safe-bash-regex-engine/execution/portable.js +6 -10
- package/dist/safe-bash-regex-engine/execution/protocol.d.ts +0 -5
- package/dist/safe-bash-regex-engine/execution/protocol.js +1 -3
- package/dist/safe-bash-regex-engine/index.js +6 -4
- package/dist/safe-bash-regex-engine/text/budget.d.ts +1 -1
- package/dist/safe-bash-regex-engine/text/budget.js +1 -1
- package/dist/safe-bash-regex-engine/text/regex.d.ts +14 -0
- package/dist/safe-bash-regex-engine/text/regex.js +6 -4
- package/dist/safe-bash-regex-engine/text/replacement-buffer.js +2 -2
- package/dist/safe-bash-regex-engine/text/rust-syntax.js +2 -2
- package/dist/safe-bash-search-engine/grep.js +189 -227
- package/dist/safe-bash-table-text-engine/table-text/internal.d.ts +7 -5
- package/dist/safe-bash-table-text-engine/table-text/internal.js +39 -21
- package/dist/safe-playwright-cloudflare/browser-trace-budget.js +6 -2
- package/dist/spreadsheet-engine/codecs/odf-hyperlinks.js +8 -2
- package/dist/spreadsheet-engine/formulas/functions/captured-bessel-phase.js +2 -2
- package/dist/spreadsheet-engine/formulas/label-references.js +54 -33
- package/dist/spreadsheet-engine/formulas/parser.js +3 -1
- package/dist/spreadsheet-engine/formulas/rewriting.js +13 -3
- package/dist/spreadsheet-format-xls/biff-data-tables.js +4 -6
- package/dist/spreadsheet-format-xls/biff-formulas.js +3 -0
- package/dist/spreadsheet-format-xls/biff-label-ranges.js +9 -6
- package/dist/spreadsheet-format-xls/biff.js +1 -1
- package/dist/xlsx-ast/xlsx.js +8 -5
- package/package.json +68 -12
- package/dist/safe-bash/command-chunks/chunk-KAGBORIC.js +0 -88
- /package/dist/safe-bash/command-chunks/{chunk-BWNXWI33.js → chunk-2LMZVE3I.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
diffCommand
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-WVHONVZ4.js";
|
|
4
4
|
import "../safe-bash/command-chunks/chunk-Y5INTD6S.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-UG7SMZFF.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-6F4XCVON.js";
|
|
@@ -6,3 +6,4 @@ export { exiftoolRegistry } from "./registry.js";
|
|
|
6
6
|
export { createExiftoolArguments, type ExiftoolInvocationOptions } from "./sdk.js";
|
|
7
7
|
export { inspectJpeg, editJpeg } from "./jpeg.js";
|
|
8
8
|
export { createExiftoolCommands, evalSyncExiftool, type ExiftoolCommandsOptions } from "./command.js";
|
|
9
|
+
export type { ResourceLimits as ExiftoolLimits } from "./resources.js";
|
|
@@ -52,6 +52,7 @@ function parseFdArguments(argv) {
|
|
|
52
52
|
const a = { patterns: [], roots: [], mode: "regex", caseMode: "smart", hidden: false, ignore: true, ignoreVcs: true, ignoreParent: true, follow: false, fullPath: false, absolute: false, print0: false, quiet: false, details: false, minDepth: 1, maxDepth: Infinity, maxResults: Infinity, extensions: [], types: [], excludes: [], sizes: [], within: void 0, before: void 0, format: void 0, baseDirectory: void 0, pathSeparator: void 0, stripCwdPrefix: false, exec: [], batch: false, help: false, version: false };
|
|
53
53
|
const operands = [];
|
|
54
54
|
let ended = false;
|
|
55
|
+
let unrestricted = 0;
|
|
55
56
|
const number = (value) => {
|
|
56
57
|
if (!value || [...value].some((c) => c < "0" || c > "9") || !Number.isSafeInteger(Number(value))) throw new FdUsageError(`invalid count '${value}'`);
|
|
57
58
|
return Number(value);
|
|
@@ -104,7 +105,7 @@ function parseFdArguments(argv) {
|
|
|
104
105
|
break;
|
|
105
106
|
case "unrestricted":
|
|
106
107
|
a.ignore = false;
|
|
107
|
-
a.hidden = true;
|
|
108
|
+
if (++unrestricted >= 2) a.hidden = true;
|
|
108
109
|
break;
|
|
109
110
|
case "follow":
|
|
110
111
|
a.follow = true;
|
|
@@ -353,16 +354,15 @@ async function find(context, a, matcher, maximum, maxIgnoreFileBytes, maxDepth,
|
|
|
353
354
|
}
|
|
354
355
|
return !ignored;
|
|
355
356
|
};
|
|
356
|
-
const selected = async (path, name, stat, depth) => {
|
|
357
|
+
const selected = async (path, name, stat, depth, display) => {
|
|
357
358
|
if (depth < a.minDepth || depth > a.maxDepth) return false;
|
|
358
359
|
const ordinary = a.types.filter((t) => t !== "empty" && t !== "executable");
|
|
359
|
-
if (ordinary.length && !ordinary.includes(stat.type)) return false;
|
|
360
|
-
if (a.types.includes("executable") && (stat.type === "file" ? !(stat.mode & 73) : !ordinary.includes(stat.type))) return false;
|
|
360
|
+
if ((ordinary.length || a.types.includes("executable")) && !ordinary.includes(stat.type) && !(a.types.includes("executable") && stat.type === "file" && stat.mode & 73)) return false;
|
|
361
361
|
if (a.types.includes("empty") && !(stat.type === "file" ? stat.size === 0 : stat.type === "directory" && (await fs.readdir(path, io)).length === 0)) return false;
|
|
362
|
-
if (a.extensions.length &&
|
|
362
|
+
if (a.extensions.length && !a.extensions.some((e) => name.length > e.length + 1 && name.toLowerCase().endsWith("." + e.toLowerCase()))) return false;
|
|
363
363
|
if (sizes.length && (stat.type !== "file" || !sizes.every((filter) => filter(stat.size)))) return false;
|
|
364
364
|
if (stat.mtimeMs <= within || stat.mtimeMs >= before) return false;
|
|
365
|
-
for (const pattern of a.patterns) if (pattern && !await matcher.pattern(pattern, a.fullPath ? path : name, a.mode, a.caseMode)) return false;
|
|
365
|
+
for (const pattern of a.patterns) if (pattern && !await matcher.pattern(pattern, a.fullPath ? a.absolute ? path : display : name, a.mode, a.caseMode)) return false;
|
|
366
366
|
return true;
|
|
367
367
|
};
|
|
368
368
|
const walk = async (dir, label, depth, rules, ancestors, prefixCwd, searchRoot) => {
|
|
@@ -400,7 +400,7 @@ async function find(context, a, matcher, maximum, maxIgnoreFileBytes, maxDepth,
|
|
|
400
400
|
}
|
|
401
401
|
const directory = stat.type === "directory";
|
|
402
402
|
if (!await accepted(path, entry.name, directory, local, searchRoot)) continue;
|
|
403
|
-
if (await selected(path, entry.name, stat, depth + 1)) {
|
|
403
|
+
if (await selected(path, entry.name, stat, depth + 1, display)) {
|
|
404
404
|
found++;
|
|
405
405
|
const rawOut = a.absolute ? path : !a.stripCwdPrefix && prefixCwd && (a.exec.length || a.print0 || a.details) && !display.startsWith("/") && rootPrefixNeeded(display) ? "./" + display : display;
|
|
406
406
|
const out = a.pathSeparator !== void 0 ? rawOut.replaceAll("/", a.pathSeparator) : rawOut;
|
|
@@ -665,9 +665,9 @@ function evalSyncFd(args, cwd, inspectNode, allowNullBytes = false) {
|
|
|
665
665
|
let extOk = a.extensions.length === 0;
|
|
666
666
|
if (!extOk) {
|
|
667
667
|
const lower = entry.name.toLowerCase();
|
|
668
|
-
extOk = a.extensions.some((ext) => lower.endsWith(`.${ext.toLowerCase()}`));
|
|
668
|
+
extOk = a.extensions.some((ext) => lower.length > ext.length + 1 && lower.endsWith(`.${ext.toLowerCase()}`));
|
|
669
669
|
}
|
|
670
|
-
const subject = a.fullPath ? childRel : entry.name;
|
|
670
|
+
const subject = a.fullPath ? a.absolute ? childAbs : childRel : entry.name;
|
|
671
671
|
if (depthOk && typeOk && sizeOk && extOk && matchFns.every((fn) => fn(subject))) {
|
|
672
672
|
let disp = a.absolute ? childAbs : a.stripCwdPrefix ? childRel.replace(/^\.\//u, "") : childRel;
|
|
673
673
|
if (a.pathSeparator !== void 0) disp = disp.split("/").join(a.pathSeparator);
|
|
@@ -3447,8 +3447,22 @@ function buildProbeResultFromDoc(doc, byteLength, filename = "input.mp4", option
|
|
|
3447
3447
|
const desc = materialized.codecDescriptions[0];
|
|
3448
3448
|
const codecName = desc?.codecName ?? (track.type === "video" ? "h264" : "aac");
|
|
3449
3449
|
const codecLongName = CODEC_LONG_NAMES[codecName] ?? codecName;
|
|
3450
|
-
const
|
|
3451
|
-
const
|
|
3450
|
+
const rawTag = desc?.formatFourCC ?? (track.type === "video" ? "avc1" : "mp4a");
|
|
3451
|
+
const tagFourCC = Array.from(rawTag).map((c) => c.charCodeAt(0) < 32 ? `[${c.charCodeAt(0)}]` : c).join("");
|
|
3452
|
+
const sampleFormat = track.type !== "audio" ? void 0 : {
|
|
3453
|
+
pcm_u8: "u8",
|
|
3454
|
+
pcm_s16le: "s16",
|
|
3455
|
+
pcm_s16be: "s16",
|
|
3456
|
+
pcm_s24le: "s32",
|
|
3457
|
+
pcm_s24be: "s32",
|
|
3458
|
+
pcm_s32le: "s32",
|
|
3459
|
+
pcm_s32be: "s32",
|
|
3460
|
+
pcm_f32le: "flt",
|
|
3461
|
+
pcm_f32be: "flt",
|
|
3462
|
+
pcm_f64le: "dbl",
|
|
3463
|
+
pcm_f64be: "dbl"
|
|
3464
|
+
}[codecName] ?? "fltp";
|
|
3465
|
+
const tagHex = doc.containerFormat === "wav" ? "0x" + (rawTag.charCodeAt(0) | rawTag.charCodeAt(1) << 8).toString(16).padStart(4, "0") : "0x" + Array.from(rawTag.padEnd(4, " ").slice(0, 4)).map((c) => c.charCodeAt(0).toString(16).padStart(2, "0")).join("");
|
|
3452
3466
|
const durationSec = track.duration / Math.max(1, track.timescale);
|
|
3453
3467
|
const totalBytes = materialized.samples.reduce((acc, s) => acc + s.size, 0);
|
|
3454
3468
|
const bitRate = durationSec > 0 ? String(Math.round(totalBytes * 8 / durationSec)) : "0";
|
|
@@ -3477,14 +3491,14 @@ function buildProbeResultFromDoc(doc, byteLength, filename = "input.mp4", option
|
|
|
3477
3491
|
height: h,
|
|
3478
3492
|
coded_width: w ? Math.ceil(w / 16) * 16 : void 0,
|
|
3479
3493
|
coded_height: h ? Math.ceil(h / 16) * 16 : void 0,
|
|
3480
|
-
has_b_frames: materialized.samples.some((s) => s.cts !== 0) ? 1 : 0,
|
|
3494
|
+
has_b_frames: track.type === "video" ? materialized.samples.some((s) => s.cts !== 0) ? 1 : 0 : void 0,
|
|
3481
3495
|
sample_aspect_ratio: track.type === "video" ? `${desc?.sarWidth ?? 1}:${desc?.sarHeight ?? 1}` : void 0,
|
|
3482
3496
|
display_aspect_ratio: track.type === "video" && w && h ? `${w / darGcd}:${h / darGcd}` : void 0,
|
|
3483
3497
|
pix_fmt: track.type === "video" ? desc?.pixFmt ?? "yuv420p" : void 0,
|
|
3484
3498
|
level: desc?.level,
|
|
3485
3499
|
color_range: track.type === "video" ? "tv" : void 0,
|
|
3486
3500
|
color_space: track.type === "video" ? "bt709" : void 0,
|
|
3487
|
-
sample_fmt:
|
|
3501
|
+
sample_fmt: sampleFormat,
|
|
3488
3502
|
sample_rate: track.type === "audio" ? String(desc?.sampleRate ?? track.timescale) : void 0,
|
|
3489
3503
|
channels: track.type === "audio" ? desc?.channels ?? 2 : void 0,
|
|
3490
3504
|
channel_layout: track.type === "audio" ? (desc?.channels ?? 2) === 1 ? "mono" : "stereo" : void 0,
|
|
@@ -3554,7 +3568,7 @@ function buildProbeResultFromDoc(doc, byteLength, filename = "input.mp4", option
|
|
|
3554
3568
|
height: h,
|
|
3555
3569
|
pix_fmt: track.type === "video" ? desc?.pixFmt ?? "yuv420p" : void 0,
|
|
3556
3570
|
pict_type: track.type === "video" ? s.isKeyframe ? "I" : "P" : void 0,
|
|
3557
|
-
sample_fmt:
|
|
3571
|
+
sample_fmt: sampleFormat,
|
|
3558
3572
|
nb_samples: track.type === "audio" ? s.duration : void 0,
|
|
3559
3573
|
channels: track.type === "audio" ? desc?.channels ?? 2 : void 0
|
|
3560
3574
|
});
|
|
@@ -6217,6 +6231,7 @@ function parseWav(bytes) {
|
|
|
6217
6231
|
throw new Error("Invalid WAV file: missing RIFF WAVE signature");
|
|
6218
6232
|
}
|
|
6219
6233
|
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
6234
|
+
let formatTag = 1;
|
|
6220
6235
|
let channels = 2;
|
|
6221
6236
|
let sampleRate = 44100;
|
|
6222
6237
|
let bitsPerSample = 16;
|
|
@@ -6228,6 +6243,7 @@ function parseWav(bytes) {
|
|
|
6228
6243
|
const start = pos + 8;
|
|
6229
6244
|
const end = Math.min(bytes.byteLength, start + size);
|
|
6230
6245
|
if (id === "fmt " && size >= 16) {
|
|
6246
|
+
formatTag = view.getUint16(start, true);
|
|
6231
6247
|
channels = view.getUint16(start + 2, true) || 2;
|
|
6232
6248
|
sampleRate = view.getUint32(start + 4, true) || 44100;
|
|
6233
6249
|
bitsPerSample = view.getUint16(start + 14, true) || 16;
|
|
@@ -6243,7 +6259,14 @@ function parseWav(bytes) {
|
|
|
6243
6259
|
for (let i = 0; i < totalPcmSamples; i++) {
|
|
6244
6260
|
for (let ch = 0; ch < channels; ch++) {
|
|
6245
6261
|
const byteOff = (i * channels + ch) * (bitsPerSample >>> 3);
|
|
6246
|
-
if (bitsPerSample ===
|
|
6262
|
+
if (formatTag === 3 && bitsPerSample === 32 && byteOff + 4 <= pcmData.byteLength) {
|
|
6263
|
+
channelData[ch][i] = pcmView.getFloat32(byteOff, true);
|
|
6264
|
+
} else if (bitsPerSample === 24 && byteOff + 3 <= pcmData.byteLength) {
|
|
6265
|
+
const value = pcmData[byteOff] | pcmData[byteOff + 1] << 8 | pcmData[byteOff + 2] << 16;
|
|
6266
|
+
channelData[ch][i] = (value << 8 >> 8) / 8388608;
|
|
6267
|
+
} else if (bitsPerSample === 32 && byteOff + 4 <= pcmData.byteLength) {
|
|
6268
|
+
channelData[ch][i] = pcmView.getInt32(byteOff, true) / 2147483648;
|
|
6269
|
+
} else if (bitsPerSample === 16 && byteOff + 2 <= pcmData.byteLength) {
|
|
6247
6270
|
channelData[ch][i] = pcmView.getInt16(byteOff, true) / 32768;
|
|
6248
6271
|
} else if (bitsPerSample === 8 && byteOff < pcmData.byteLength) {
|
|
6249
6272
|
channelData[ch][i] = (pcmData[byteOff] - 128) / 128;
|
|
@@ -6284,8 +6307,8 @@ function parseWav(bytes) {
|
|
|
6284
6307
|
enabled: true,
|
|
6285
6308
|
codecDescriptions: [
|
|
6286
6309
|
{
|
|
6287
|
-
formatFourCC:
|
|
6288
|
-
codecName: "
|
|
6310
|
+
formatFourCC: String.fromCharCode(formatTag & 255, formatTag >>> 8, 0, 0),
|
|
6311
|
+
codecName: formatTag === 3 ? `pcm_f${bitsPerSample}le` : bitsPerSample === 8 ? "pcm_u8" : `pcm_s${bitsPerSample}le`,
|
|
6289
6312
|
sampleRate,
|
|
6290
6313
|
channels,
|
|
6291
6314
|
bitsPerSample
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createFindDefinitions,
|
|
3
3
|
evalSyncFind
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-QKFSRZGQ.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-5ZMZ573Q.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
7
7
|
export {
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// packages/safe-bash-command-gzip/src/index.ts
|
|
6
6
|
init_buffer();
|
|
7
|
+
import { withInputByteBudget } from "../safe-bash-contracts/index.js";
|
|
7
8
|
import { planOperands, verifyOperandDestinations } from "../safe-bash-compression-engine/files.js";
|
|
8
9
|
import { runOperand } from "../safe-bash-compression-engine/operand.js";
|
|
9
10
|
import { parseOptions, profiles } from "../safe-bash-compression-engine/options.js";
|
|
@@ -15,7 +16,7 @@ function createGzipCommands(config = {}) {
|
|
|
15
16
|
if (maxDecodedBytes !== void 0 && maxDecodedBytes !== Infinity && (!Number.isSafeInteger(maxDecodedBytes) || maxDecodedBytes < 0)) {
|
|
16
17
|
throw new RangeError("maxDecodedBytes must be a nonnegative safe integer or Infinity");
|
|
17
18
|
}
|
|
18
|
-
const commands = profiles.filter((profile) => profile.format === "gzip").flatMap((profile) => profile.names.map((name) => define(name, async (context) => {
|
|
19
|
+
const commands = profiles.filter((profile) => profile.format === "gzip").flatMap((profile) => profile.names.map((name) => define(name, withInputByteBudget(async (context) => {
|
|
19
20
|
const options = parseOptions(name, context.args);
|
|
20
21
|
if (options.help) {
|
|
21
22
|
await output(context, `Usage: ${name} [OPTION]... [FILE]...
|
|
@@ -69,7 +70,7 @@ No FILE or FILE '-' uses stdin; file output uses private VFS staging.
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
return { exitCode };
|
|
72
|
-
})));
|
|
73
|
+
}))));
|
|
73
74
|
if (maxDecodedBytes === void 0 || maxDecodedBytes === Infinity) {
|
|
74
75
|
for (const c of commands) builtInDirectContextExecutors.add(c.execute);
|
|
75
76
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createHdCommand,
|
|
3
3
|
createHexdumpCommand
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-FDBUV4HJ.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-H47RHXY3.js";
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
8
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-67GQA75T.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-MWUZZWXK.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-DIEPXUM4.js";
|
|
9
9
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
10
10
|
export {
|
|
11
11
|
createHdCommand,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Budget } from './internal.js';
|
|
2
|
+
interface Conversion {
|
|
3
|
+
code: string;
|
|
4
|
+
flags: string;
|
|
5
|
+
width: number;
|
|
6
|
+
precision?: number;
|
|
7
|
+
bytes: number;
|
|
8
|
+
}
|
|
9
|
+
type Part = string | Conversion;
|
|
10
|
+
interface Unit {
|
|
11
|
+
repeat: number;
|
|
12
|
+
bytes: number;
|
|
13
|
+
explicitRepeat: boolean;
|
|
14
|
+
parts: Part[];
|
|
15
|
+
}
|
|
16
|
+
export interface CustomFormat {
|
|
17
|
+
units: Unit[];
|
|
18
|
+
size: number;
|
|
19
|
+
finalUnit?: Unit;
|
|
20
|
+
}
|
|
21
|
+
/** Parse the hexdump format grammar without evaluating format text as code. */
|
|
22
|
+
export declare function parseCustom(text: string, budget: Budget): CustomFormat;
|
|
23
|
+
export declare function formatCustom(format: CustomFormat, block: Uint8Array, used: number, address: number, final: boolean, budget: Budget): Promise<string>;
|
|
24
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createHdCommand,
|
|
3
3
|
createHexdumpCommand
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-FDBUV4HJ.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-H47RHXY3.js";
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
8
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-67GQA75T.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-MWUZZWXK.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-DIEPXUM4.js";
|
|
9
9
|
import {
|
|
10
10
|
init_buffer
|
|
11
11
|
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -48,6 +48,8 @@ export declare class Budget {
|
|
|
48
48
|
charge(amount?: number): void;
|
|
49
49
|
canChargeWithoutCheckpoint(amount: number): boolean;
|
|
50
50
|
checkpointWork(): void | Promise<void>;
|
|
51
|
+
buffered(amount: number): void;
|
|
52
|
+
outputCapacity(amount: number): void;
|
|
51
53
|
retain(amount: number): void;
|
|
52
54
|
inputBytes(amount: number): void;
|
|
53
55
|
emitted(amount: number, diagnostic: boolean): void;
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
Lifecycle,
|
|
3
3
|
Reader,
|
|
4
4
|
fsDetail
|
|
5
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-67GQA75T.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-DIEPXUM4.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
8
|
export {
|
|
9
9
|
Lifecycle,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type CustomFormat } from "./custom.js";
|
|
1
2
|
import { Budget, type HexdumpCommandsOptions } from "./internal.js";
|
|
2
3
|
export type Format = "default" | "C" | "b" | "c" | "d" | "o" | "x";
|
|
3
4
|
export interface Parsed {
|
|
5
|
+
readonly ordered: readonly (Format | CustomFormat)[];
|
|
6
|
+
readonly custom: readonly CustomFormat[];
|
|
4
7
|
readonly files: readonly string[];
|
|
5
8
|
readonly formats: readonly Format[];
|
|
6
9
|
readonly verbose: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parse
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-MWUZZWXK.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-DIEPXUM4.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
6
6
|
export {
|
|
7
7
|
parse
|
|
@@ -235,7 +235,7 @@ function createHostnameCommand(options = {}) {
|
|
|
235
235
|
}
|
|
236
236
|
if (!isFsError(error, "ENOENT")) throw error;
|
|
237
237
|
}
|
|
238
|
-
const rawHost = context.
|
|
238
|
+
const rawHost = sessionHostnames.get(context.fs) || vfsHost || context.env.HOSTNAME || options.hostname || "sandbox";
|
|
239
239
|
const dotIdx = rawHost.indexOf(".");
|
|
240
240
|
const shortName = dotIdx >= 0 ? rawHost.slice(0, dotIdx) : rawHost;
|
|
241
241
|
const domainName = dotIdx >= 0 ? rawHost.slice(dotIdx + 1) : options.domain ?? "vfs.local";
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
destination,
|
|
3
3
|
entities,
|
|
4
4
|
escapeText
|
|
5
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-OQU6UT6X.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-WTECBRU4.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-PV66YWHB.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
9
9
|
export {
|
|
10
10
|
destination,
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
} from "../safe-bash/command-chunks/chunk-MHNNCTHD.js";
|
|
6
6
|
import {
|
|
7
7
|
Renderer
|
|
8
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
8
|
+
} from "../safe-bash/command-chunks/chunk-MSFXC3OC.js";
|
|
9
9
|
import {
|
|
10
10
|
Inputs
|
|
11
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
12
|
-
import "../safe-bash/command-chunks/chunk-
|
|
13
|
-
import "../safe-bash/command-chunks/chunk-
|
|
14
|
-
import "../safe-bash/command-chunks/chunk-
|
|
11
|
+
} from "../safe-bash/command-chunks/chunk-LWSBAWLT.js";
|
|
12
|
+
import "../safe-bash/command-chunks/chunk-LWS62ISU.js";
|
|
13
|
+
import "../safe-bash/command-chunks/chunk-OQU6UT6X.js";
|
|
14
|
+
import "../safe-bash/command-chunks/chunk-WTECBRU4.js";
|
|
15
15
|
import {
|
|
16
16
|
Budget
|
|
17
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
17
|
+
} from "../safe-bash/command-chunks/chunk-PV66YWHB.js";
|
|
18
18
|
import {
|
|
19
19
|
init_buffer
|
|
20
20
|
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Inputs
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-LWSBAWLT.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-LWS62ISU.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-OQU6UT6X.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-WTECBRU4.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-PV66YWHB.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
9
9
|
export {
|
|
10
10
|
Inputs
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Parser,
|
|
3
3
|
blockTags
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-LWS62ISU.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-OQU6UT6X.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-WTECBRU4.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-PV66YWHB.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
9
9
|
export {
|
|
10
10
|
Parser,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Renderer
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-MSFXC3OC.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-LWS62ISU.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-OQU6UT6X.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-WTECBRU4.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-PV66YWHB.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
9
9
|
export {
|
|
10
10
|
Renderer
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
htmlSpace,
|
|
3
3
|
normalizeText,
|
|
4
4
|
trimText
|
|
5
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-WTECBRU4.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-PV66YWHB.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
8
|
export {
|
|
9
9
|
htmlSpace,
|
|
@@ -8,3 +8,4 @@ export { parseHtmlqArguments, type HtmlqArguments } from "./arguments.js";
|
|
|
8
8
|
export { htmlqBytes } from "./behavior.js";
|
|
9
9
|
export { htmlq, createHtmlqCommand, htmlqCommand, htmlqCommands, type HtmlqCommandOptions, type HtmlqRunOptions, type HtmlqResult } from "./command.js";
|
|
10
10
|
export { createHtmlqCommands, type HtmlqCommandsOptions } from "./command.js";
|
|
11
|
+
export type { HtmlLimits as HtmlqLimits } from "./contracts.js";
|
|
@@ -423,6 +423,7 @@ var internals = {
|
|
|
423
423
|
}
|
|
424
424
|
};
|
|
425
425
|
function getInternalHtmlNode(node) {
|
|
426
|
+
if (!node || typeof node !== "object") throw new HtmlError("E_OWNERSHIP", "Unowned HTML node");
|
|
426
427
|
return internals.get(node);
|
|
427
428
|
}
|
|
428
429
|
function getPublicHtmlView(node) {
|
|
@@ -2059,11 +2060,8 @@ function parseHtmlqArguments(argv, options) {
|
|
|
2059
2060
|
seen.add(key);
|
|
2060
2061
|
}
|
|
2061
2062
|
const remainder = short && offset + 1 < option.length ? option.slice(offset + (option[offset + 1] === "=" ? 2 : 1)) : void 0;
|
|
2062
|
-
const separate = attached === void 0 && remainder === void 0;
|
|
2063
2063
|
const value = attached ?? remainder ?? argv[++i];
|
|
2064
2064
|
if (value === void 0) throw new HtmlError("E_ARGUMENT", `Missing value for ${arg}`);
|
|
2065
|
-
if (separate && value.startsWith("-") && value !== "-")
|
|
2066
|
-
throw new HtmlError("E_ARGUMENT", `Missing value for ${arg}`);
|
|
2067
2065
|
budget.bound("tokenBytes", value.length * 2);
|
|
2068
2066
|
budget.charge("work", value.length);
|
|
2069
2067
|
budget.charge("retainedBytes", value.length * 2);
|
|
@@ -2237,16 +2235,36 @@ async function* projectHtmlq(source, args, invocation) {
|
|
|
2237
2235
|
budget.check();
|
|
2238
2236
|
}
|
|
2239
2237
|
}
|
|
2238
|
+
let nodes = selected;
|
|
2239
|
+
if (removal) {
|
|
2240
|
+
const snapshot = [];
|
|
2241
|
+
for (const node of selected) {
|
|
2242
|
+
budget.charge("retainedBytes", 8);
|
|
2243
|
+
snapshot.push(node);
|
|
2244
|
+
}
|
|
2245
|
+
nodes = snapshot;
|
|
2246
|
+
}
|
|
2240
2247
|
let selectedIndex = 0;
|
|
2241
|
-
for (const node of
|
|
2248
|
+
for (const node of nodes) {
|
|
2242
2249
|
if (selectedIndex % 64 === 0) {
|
|
2243
2250
|
await yieldTurn(invocation.signal);
|
|
2244
2251
|
invocation.signal.throwIfAborted();
|
|
2245
2252
|
}
|
|
2246
2253
|
const isFirstNode = selectedIndex++ === 0;
|
|
2247
2254
|
if (removal) {
|
|
2248
|
-
|
|
2249
|
-
|
|
2255
|
+
let ancestor = getInternalHtmlNode(node);
|
|
2256
|
+
while (ancestor?.parent) {
|
|
2257
|
+
budget.charge("work", 1);
|
|
2258
|
+
ancestor = ancestor.parent;
|
|
2259
|
+
}
|
|
2260
|
+
if (ancestor !== getInternalHtmlNode(document)) continue;
|
|
2261
|
+
const matches = [];
|
|
2262
|
+
for (const match of selectHtml(node, removal, invocation)) {
|
|
2263
|
+
budget.charge("retainedBytes", 8);
|
|
2264
|
+
matches.push(match);
|
|
2265
|
+
}
|
|
2266
|
+
for (const match of matches) detachHtmlNode(match, invocation);
|
|
2267
|
+
if (matches.includes(node)) continue;
|
|
2250
2268
|
}
|
|
2251
2269
|
if (base && node.namespace === "html" && ["a", "area", "link"].includes(node.name)) {
|
|
2252
2270
|
const href = node.attributes.find((a) => a.namespace === "none" && a.name === "href")?.value;
|
|
@@ -2523,21 +2541,21 @@ async function htmlq(context, configuration = {}) {
|
|
|
2523
2541
|
}
|
|
2524
2542
|
if (bytes.byteLength >= 8192) {
|
|
2525
2543
|
if (batchOffset > 0) {
|
|
2526
|
-
await writeBytes(stdout.output, batch.
|
|
2544
|
+
await writeBytes(stdout.output, batch.slice(0, batchOffset), options.signal);
|
|
2527
2545
|
batchOffset = 0;
|
|
2528
2546
|
}
|
|
2529
2547
|
await writeBytes(stdout.output, bytes, options.signal);
|
|
2530
2548
|
continue;
|
|
2531
2549
|
}
|
|
2532
2550
|
if (batchOffset + bytes.byteLength > 16384) {
|
|
2533
|
-
await writeBytes(stdout.output, batch.
|
|
2551
|
+
await writeBytes(stdout.output, batch.slice(0, batchOffset), options.signal);
|
|
2534
2552
|
batchOffset = 0;
|
|
2535
2553
|
}
|
|
2536
2554
|
batch.set(bytes, batchOffset);
|
|
2537
2555
|
batchOffset += bytes.byteLength;
|
|
2538
2556
|
}
|
|
2539
2557
|
if (batchOffset > 0) {
|
|
2540
|
-
await writeBytes(stdout.output, batch.
|
|
2558
|
+
await writeBytes(stdout.output, batch.slice(0, batchOffset), options.signal);
|
|
2541
2559
|
}
|
|
2542
2560
|
} else {
|
|
2543
2561
|
for await (const bytes of rendered) await writeBytes(stdout.output, bytes, options.signal);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createIconvCommand
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-V2V5OCL3.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-4J5CZ2DP.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-7D7JRRML.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-JWE54GHQ.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-5HDSFHGW.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createIconvCommand
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-V2V5OCL3.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-4J5CZ2DP.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-7D7JRRML.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-JWE54GHQ.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-5HDSFHGW.js";
|