@poe-platform/safe-bash 0.1.799 → 0.1.801
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 +48 -22
- package/dist/image-ast/index.browser.js +1503 -98
- package/dist/image-ast/index.js +1503 -98
- package/dist/mp4-ast/types.d.ts +1 -0
- package/dist/office-package/zip.d.ts +2 -0
- package/dist/office-package/zip.js +1 -1
- package/dist/pdf-ast/index.js +5 -4
- package/dist/safe-bash/chunks/{chunk-LUOFIVNI.js → chunk-3NDIFSNM.js} +3 -3
- package/dist/safe-bash/chunks/chunk-3R3AANOR.js +26 -0
- package/dist/safe-bash/chunks/{chunk-TRVGCN3U.js → chunk-45PK3NWI.js} +4 -4
- package/dist/safe-bash/chunks/{chunk-KHMGTPD6.js → chunk-46Z5E5EV.js} +2 -2
- 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-WUNK5NXJ.js → chunk-7VNF5BFF.js} +1140 -1660
- package/dist/safe-bash/chunks/{chunk-NHOXKQNE.js → chunk-A7XEHALN.js} +6 -6
- 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-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-KTGR4U57.js → chunk-D3ANYGMC.js} +2 -3
- package/dist/safe-bash/chunks/{chunk-ENR3HB2B.js → chunk-E7OYNDGL.js} +1 -2
- package/dist/safe-bash/chunks/{chunk-SOZK5JVX.js → chunk-FBUCWVTE.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-NX2SQVON.js → chunk-FNDNHAGE.js} +46 -27
- package/dist/safe-bash/chunks/{chunk-KCVSVD65.js → chunk-I5HZ4FGE.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-KMH2DF3I.js → chunk-ICFDYV64.js} +7 -2
- package/dist/safe-bash/chunks/{chunk-T5KKDMYB.js → chunk-IVRQ4BXL.js} +7 -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-K6VCD7IY.js +106 -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-6HZYFL3H.js → chunk-NR3EM4LS.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-VYZTG3GV.js → chunk-NZQXYWA3.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-JSVX4VIA.js → chunk-OQRVVGR6.js} +3 -2
- package/dist/safe-bash/chunks/{chunk-B3DDEDH2.js → chunk-OV6IHKO6.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-SPYL72GN.js → chunk-PQRAK7HU.js} +1196 -5781
- package/dist/safe-bash/chunks/chunk-SZH7EJLD.js +9221 -0
- package/dist/safe-bash/chunks/{chunk-AKC46AF6.js → chunk-TFIBK2GI.js} +8 -41
- package/dist/safe-bash/chunks/{chunk-ZNAFMYIA.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-6IBTC4YL.js → chunk-VQDD3G76.js} +93 -39
- package/dist/safe-bash/chunks/{chunk-IUTD5FH5.js → chunk-VTH3MLDU.js} +2 -7
- package/dist/safe-bash/chunks/{chunk-LLZCZ24K.js → chunk-XVOSKJE2.js} +1 -1
- package/dist/safe-bash/chunks/{csvkit-W2UEKH6P.js → csvkit-TACDU7FC.js} +3 -3
- package/dist/safe-bash/chunks/{ffmpeg-42CGASMV.js → ffmpeg-WTC3TEFI.js} +2 -2
- package/dist/safe-bash/chunks/{gh-26GYLH6D.js → gh-6WU6PXL4.js} +2 -2
- package/dist/safe-bash/chunks/{git-YREKMUVD.js → git-EFZIGJW4.js} +2 -2
- package/dist/safe-bash/chunks/{imagemagick-3YIX4XO2.js → imagemagick-EIEYGWPF.js} +2 -2
- package/dist/safe-bash/chunks/{implementation-E3YMKU3Z.js → implementation-MLFHUQ5M.js} +2 -2
- package/dist/safe-bash/chunks/mmdc-ROQJT5HQ.js +118 -0
- package/dist/safe-bash/chunks/{pdfimages-UE2UISP2.js → pdfimages-DW7LWXFI.js} +2 -2
- package/dist/safe-bash/chunks/{pdfinfo-RGARKLI5.js → pdfinfo-TIP6XLUQ.js} +4 -12
- package/dist/safe-bash/chunks/{pdftk-JY3WVCCC.js → pdftk-DMG22ITZ.js} +2 -2
- package/dist/safe-bash/chunks/{pdftoppm-GPD3BMPY.js → pdftoppm-WNDYR72T.js} +2 -2
- package/dist/safe-bash/chunks/{pdftotext-K7GQ2QJZ.js → pdftotext-5IPZ4NI7.js} +2 -2
- package/dist/safe-bash/chunks/{qpdf-F4U7WUSU.js → qpdf-TTX2DIUA.js} +2 -2
- package/dist/safe-bash/chunks/{sips-RWENS7X5.js → sips-XYS46JPJ.js} +2 -2
- package/dist/safe-bash/chunks/{soffice-IT6W2C5F.js → soffice-TU73E5KL.js} +2 -2
- package/dist/safe-bash/chunks/{wkhtmltopdf-JYNDAHIZ.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-2FGJYFWZ.js +44 -0
- package/dist/safe-bash/command-chunks/chunk-2H4JTFIL.js +53 -0
- 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-364TMWBT.js +946 -0
- package/dist/safe-bash/command-chunks/chunk-3E2OIS2J.js +7037 -0
- package/dist/safe-bash/command-chunks/chunk-3HHCU5YU.js +380 -0
- package/dist/safe-bash/command-chunks/{chunk-TF6OA2GK.js → chunk-3NV3HYT2.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-4B7Y7S6E.js +61 -0
- package/dist/safe-bash/command-chunks/{chunk-LLCXZKZ6.js → chunk-4BB2SWJ5.js} +2 -2
- 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-4ZHMW6F5.js +104 -0
- package/dist/safe-bash/command-chunks/{chunk-YMONDXET.js → chunk-4ZQWGOZB.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-5BSTFCXG.js +553 -0
- package/dist/safe-bash/command-chunks/{chunk-MKQVQMXO.js → chunk-5LU4UCBR.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-5PWJG2UK.js +174 -0
- package/dist/safe-bash/command-chunks/chunk-5TBUOBDE.js +346 -0
- package/dist/safe-bash/command-chunks/{chunk-JMPP4TCW.js → chunk-5UBXNSFZ.js} +3 -2
- package/dist/safe-bash/command-chunks/chunk-5XY4DTNG.js +34 -0
- package/dist/safe-bash/command-chunks/chunk-5ZMZ573Q.js +140 -0
- package/dist/safe-bash/command-chunks/{chunk-3NG75MOB.js → chunk-67GQA75T.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-67QKREJK.js +347 -0
- package/dist/safe-bash/command-chunks/{chunk-L6SU4S26.js → chunk-6B7WQIKB.js} +0 -7
- package/dist/safe-bash/command-chunks/chunk-6BNTBWIK.js +327 -0
- package/dist/safe-bash/command-chunks/chunk-6EPHJGGF.js +23 -0
- package/dist/safe-bash/command-chunks/chunk-6F4XCVON.js +266 -0
- package/dist/safe-bash/command-chunks/chunk-6KJ3LPI2.js +94 -0
- 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-7K6JYKPJ.js +422 -0
- package/dist/safe-bash/command-chunks/chunk-7N2LI2KO.js +206 -0
- package/dist/safe-bash/command-chunks/{chunk-MRW5HD2D.js → chunk-7O3E4LPT.js} +4 -22
- package/dist/safe-bash/command-chunks/chunk-7U7EXOXX.js +1392 -0
- 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/{pptx-GBPNWNEP-7EQEVXV5.js → chunk-AI5JAXQF.js} +34820 -18029
- 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-AMO3THU4.js +105 -0
- package/dist/safe-bash/command-chunks/chunk-ARBYOQUZ.js +65 -0
- package/dist/safe-bash/command-chunks/chunk-BAGCY35S.js +231 -0
- package/dist/safe-bash/command-chunks/chunk-BAXU7B5Z.js +101 -0
- package/dist/safe-bash/command-chunks/{chunk-44AHAB5O.js → chunk-BDSMROQZ.js} +1 -4
- package/dist/safe-bash/command-chunks/chunk-BNOU5YQS.js +182 -0
- package/dist/safe-bash/command-chunks/{chunk-4ZALPDBV.js → chunk-BPE5INLI.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-OT4LZMLB.js → chunk-BR73BIOW.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-C5YYCQHW.js +1444 -0
- package/dist/safe-bash/command-chunks/chunk-C7I25AAL.js +25 -0
- package/dist/safe-bash/command-chunks/{chunk-4ONEXMD3.js → chunk-CAP7ZJSY.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-DWFLVJC6.js → chunk-CCRHMAU5.js} +2 -1
- package/dist/safe-bash/command-chunks/chunk-CQ5YGOGB.js +150 -0
- package/dist/safe-bash/command-chunks/{chunk-JCNNOMBV.js → chunk-CQTRW45K.js} +3 -2
- package/dist/safe-bash/command-chunks/{chunk-N2F74VRO.js → chunk-CZ7EN3JG.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-DB453IE6.js +122 -0
- package/dist/safe-bash/command-chunks/{chunk-KKG4BAFZ.js → chunk-DIEPXUM4.js} +6 -0
- package/dist/safe-bash/command-chunks/chunk-DOKKNRRM.js +87 -0
- package/dist/safe-bash/command-chunks/{chunk-2PX5B7T5.js → chunk-DQAVUDDX.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-DT7BCTWY.js +249 -0
- package/dist/safe-bash/command-chunks/{chunk-6BETHLXZ.js → chunk-DZCY63VJ.js} +13 -11
- package/dist/safe-bash/command-chunks/{chunk-QUENU6GM.js → chunk-E55UKBIE.js} +3 -3
- package/dist/safe-bash/command-chunks/chunk-EK6YNAXT.js +343 -0
- package/dist/safe-bash/command-chunks/chunk-EQ4HV54N.js +22 -0
- package/dist/safe-bash/command-chunks/{chunk-HLGKIZ25.js → chunk-F6OYH562.js} +2 -0
- 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-FXELCPFX.js +195 -0
- package/dist/safe-bash/command-chunks/chunk-FXOA7RBK.js +42 -0
- package/dist/safe-bash/command-chunks/{chunk-LPORMIZS.js → chunk-FZTK4MFI.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-K543PB3I.js → chunk-G66QUHIZ.js} +6 -35
- package/dist/safe-bash/command-chunks/chunk-GFQZCKO6.js +272 -0
- package/dist/safe-bash/command-chunks/{chunk-CU5RLO62.js → chunk-GLOZX57Y.js} +92 -18
- package/dist/safe-bash/command-chunks/chunk-GMIHJYDG.js +331 -0
- package/dist/safe-bash/command-chunks/chunk-GOB777HR.js +97 -0
- package/dist/safe-bash/command-chunks/chunk-GRBWW4SG.js +48 -0
- package/dist/safe-bash/command-chunks/{chunk-PPNBNFAU.js → chunk-GYQ2HAKQ.js} +8 -8
- package/dist/safe-bash/command-chunks/chunk-H622NS6Z.js +11 -0
- package/dist/safe-bash/command-chunks/{chunk-UI32HWGS.js → chunk-HMOZ6XVJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-AVSPNLWV.js → chunk-I237SNW5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-43GSSUAY.js → chunk-II77KPZN.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-ZS3QPNUL.js → chunk-IR2BY7EL.js} +21 -6
- package/dist/safe-bash/command-chunks/{chunk-SG424QWS.js → chunk-JDYXY44P.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-JNZ3CVAE.js +147 -0
- 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-KFVV7ZJO.js +216 -0
- package/dist/safe-bash/command-chunks/{chunk-G4PNVO6Z.js → chunk-KP7AO66M.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KMCZ6P4O.js → chunk-KQLD3AED.js} +68 -7
- package/dist/safe-bash/command-chunks/chunk-KWESKQHR.js +25 -0
- package/dist/safe-bash/command-chunks/{chunk-YZ5SVZFD.js → chunk-KXU3IRUO.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-C7IHMJEW.js → chunk-KZC5UWFF.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-2WRTLCGK.js → chunk-LAOM65EE.js} +5 -5
- package/dist/safe-bash/command-chunks/chunk-LE5LZNHE.js +204 -0
- 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-MDH5T4OS.js +41 -0
- package/dist/safe-bash/command-chunks/{chunk-X7TM3AKW.js → chunk-MIXBO6U7.js} +20 -7
- package/dist/safe-bash/command-chunks/chunk-MM6HU6CX.js +20 -0
- package/dist/safe-bash/command-chunks/{chunk-MYJAZ3U2.js → chunk-MPL2466A.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HLBX5IRS.js → chunk-MQFIPHIQ.js} +46 -81
- 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-N4PFUSRM.js +35 -0
- package/dist/safe-bash/command-chunks/chunk-NCD7PEWH.js +298 -0
- package/dist/safe-bash/command-chunks/chunk-NFGI5IGF.js +266 -0
- package/dist/safe-bash/command-chunks/{chunk-I3K5RYU4.js → chunk-NKFYQSES.js} +73 -26
- package/dist/safe-bash/command-chunks/{chunk-KVFCSLKK.js → chunk-NXEQ3ESQ.js} +6 -0
- package/dist/safe-bash/command-chunks/{chunk-NGWB2YBL.js → chunk-O4JQSB7O.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-7L24L4UO.js → chunk-OQU6UT6X.js} +2 -20
- package/dist/safe-bash/command-chunks/{chunk-3VGGYEDH.js → chunk-ORYGZYKW.js} +4 -3
- package/dist/safe-bash/command-chunks/{chunk-ZXKW7SJ2.js → chunk-OYYV7ZAF.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-P2N33UMN.js +270 -0
- package/dist/safe-bash/command-chunks/{chunk-Q7Q5GM5S.js → chunk-P5APDEFB.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-X2YQLGKS.js → chunk-PCEFOYA3.js} +240 -148
- package/dist/safe-bash/command-chunks/{chunk-OLQG7ZCN.js → chunk-PEF7K3UQ.js} +136 -75
- package/dist/safe-bash/command-chunks/chunk-PII4YEZW.js +123 -0
- package/dist/safe-bash/command-chunks/{chunk-AIRGA2SU.js → chunk-PMBFZXTK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZT4KSS2V.js → chunk-PTT3I223.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4Y3WVMK4.js → chunk-PV66YWHB.js} +1 -0
- package/dist/safe-bash/command-chunks/chunk-Q3EWDEUQ.js +185 -0
- package/dist/safe-bash/command-chunks/{chunk-AXK3H4PX.js → chunk-QJ33BHI4.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-QKFSRZGQ.js +1091 -0
- package/dist/safe-bash/command-chunks/{chunk-JZSNU2MY.js → chunk-QKJLP53H.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-VVI4Z73I.js → chunk-QP4R6GLA.js} +5 -1
- package/dist/safe-bash/command-chunks/chunk-RMWQAAO5.js +2488 -0
- package/dist/safe-bash/command-chunks/{chunk-QDTBMSBE.js → chunk-RO62EWX6.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HRLIAMXC.js → chunk-RZZI24ZE.js} +7 -6
- package/dist/safe-bash/command-chunks/{chunk-PFAADCB5.js → chunk-SDNBCQ3X.js} +10 -24
- package/dist/safe-bash/command-chunks/chunk-SEM36PG5.js +11 -0
- package/dist/safe-bash/command-chunks/{chunk-36O5OT7E.js → chunk-T35Y7YQD.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ESMCX3YV.js → chunk-TGSNCQSR.js} +710 -143
- package/dist/safe-bash/command-chunks/chunk-TIOCQVUQ.js +557 -0
- package/dist/safe-bash/command-chunks/{chunk-T5H5UJQ3.js → chunk-TNOA7FCQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-GN2TKLE7.js → chunk-TS65BJHG.js} +5 -5
- package/dist/safe-bash/command-chunks/chunk-TSCGT46G.js +363 -0
- package/dist/safe-bash/command-chunks/chunk-UG7SMZFF.js +178 -0
- package/dist/safe-bash/command-chunks/{chunk-KBEURXFF.js → chunk-UN6WS55J.js} +3 -3
- package/dist/safe-bash/command-chunks/chunk-UXSR5BZH.js +136 -0
- package/dist/safe-bash/command-chunks/{chunk-SX2X3IH4.js → chunk-V2V5OCL3.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-V6BEDRMQ.js +112 -0
- package/dist/safe-bash/command-chunks/chunk-V7A7DRTU.js +293 -0
- package/dist/safe-bash/command-chunks/{chunk-5SHGJ7NO.js → chunk-VA5ZHYYA.js} +73 -33
- package/dist/safe-bash/command-chunks/{chunk-J4PEQWSF.js → chunk-VGG2DL5Q.js} +0 -1
- package/dist/safe-bash/command-chunks/chunk-VPR5LQYX.js +1228 -0
- package/dist/safe-bash/command-chunks/{chunk-EIVW3X3N.js → chunk-VSRGNQCP.js} +11 -6
- package/dist/safe-bash/command-chunks/{chunk-TYVCKQDH.js → chunk-VXSLJH7G.js} +56 -6
- package/dist/safe-bash/command-chunks/{chunk-PXYOWWMV.js → chunk-W7RAD4EW.js} +4 -3
- package/dist/safe-bash/command-chunks/{src-UJOWAS2S.js → chunk-WD3ERGRY.js} +77 -277
- package/dist/safe-bash/command-chunks/{chunk-5ZSM4UFN.js → chunk-WECIOOQB.js} +8 -64
- package/dist/safe-bash/command-chunks/{chunk-YFSDDFGV.js → chunk-WH627NJL.js} +446 -53
- package/dist/safe-bash/command-chunks/chunk-WNE7FPVR.js +236 -0
- package/dist/safe-bash/command-chunks/{chunk-UKS2XJZI.js → chunk-WPYIOKE3.js} +4 -4
- 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-WVHONVZ4.js +594 -0
- package/dist/safe-bash/command-chunks/chunk-XIIBTGC5.js +580 -0
- package/dist/safe-bash/command-chunks/chunk-XJXU3VVH.js +737 -0
- package/dist/safe-bash/command-chunks/chunk-XNLFHHOC.js +63 -0
- package/dist/safe-bash/command-chunks/{chunk-XAFSZDY2.js → chunk-XS72HTMA.js} +11 -0
- package/dist/safe-bash/command-chunks/chunk-Y5INTD6S.js +220 -0
- package/dist/safe-bash/command-chunks/chunk-YIQACGEW.js +43 -0
- package/dist/safe-bash/command-chunks/chunk-YOF7R4OY.js +80 -0
- package/dist/safe-bash/command-chunks/{chunk-VZHRZMS7.js → chunk-YOFC45RK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2FUAW6GO.js → chunk-Z45N42QC.js} +75 -11
- package/dist/safe-bash/command-chunks/chunk-ZHUWOUWB.js +618 -0
- package/dist/safe-bash/command-chunks/{chunk-OPUJSTHS.js → chunk-ZYHTWNAE.js} +215 -67
- package/dist/safe-bash/command-chunks/chunk-ZYXH3B66.js +636 -0
- package/dist/safe-bash/command-chunks/{model-store-L35QTZMJ.js → model-store-WPKMRPV4.js} +2 -2
- package/dist/safe-bash/command-chunks/pptx-7G52EJ6L-4JACH5FB.js +625 -0
- package/dist/safe-bash/command-chunks/python-worker-source-TYOFJMCW.js +4 -0
- package/dist/safe-bash/command-chunks/src-ICMQISAA.js +501 -0
- package/dist/safe-bash/commands/archive/create.d.ts +1 -17
- package/dist/safe-bash/commands/archive/create.js +1 -252
- package/dist/safe-bash/commands/archive/extract.d.ts +1 -11
- package/dist/safe-bash/commands/archive/extract.js +1 -640
- package/dist/safe-bash/commands/archive/format.d.ts +1 -32
- package/dist/safe-bash/commands/archive/format.js +1 -225
- package/dist/safe-bash/commands/archive/index.d.ts +5 -10
- package/dist/safe-bash/commands/archive/index.js +6 -931
- package/dist/safe-bash/commands/archive/listing.d.ts +1 -2
- package/dist/safe-bash/commands/archive/listing.js +1 -21
- package/dist/safe-bash/commands/archive/modes.d.ts +1 -5
- package/dist/safe-bash/commands/archive/modes.js +1 -182
- package/dist/safe-bash/commands/archive/options.d.ts +1 -53
- package/dist/safe-bash/commands/archive/options.js +1 -462
- package/dist/safe-bash/commands/archive/stream.d.ts +1 -22
- package/dist/safe-bash/commands/archive/stream.js +1 -188
- package/dist/safe-bash/commands/archive/transform.d.ts +1 -16
- package/dist/safe-bash/commands/archive/transform.js +1 -85
- package/dist/safe-bash/commands/archive/unzip/arguments.d.ts +1 -53
- package/dist/safe-bash/commands/archive/unzip/arguments.js +1 -322
- package/dist/safe-bash/commands/archive/unzip/safety.d.ts +1 -32
- package/dist/safe-bash/commands/archive/unzip/safety.js +1 -295
- package/dist/safe-bash/commands/archive/unzip.d.ts +1 -3
- package/dist/safe-bash/commands/archive/unzip.js +1 -398
- package/dist/safe-bash/commands/archive/zip/aes.d.ts +1 -17
- package/dist/safe-bash/commands/archive/zip/aes.js +1 -156
- package/dist/safe-bash/commands/archive/zip/comments.d.ts +1 -17
- package/dist/safe-bash/commands/archive/zip/comments.js +1 -83
- package/dist/safe-bash/commands/archive/zip/crc.d.ts +1 -1
- package/dist/safe-bash/commands/archive/zip/crc.js +1 -1
- package/dist/safe-bash/commands/archive/zip/crypto.d.ts +1 -19
- package/dist/safe-bash/commands/archive/zip/crypto.js +1 -118
- package/dist/safe-bash/commands/archive/zip/dates.d.ts +1 -4
- package/dist/safe-bash/commands/archive/zip/dates.js +1 -66
- package/dist/safe-bash/commands/archive/zip/environment.d.ts +1 -2
- package/dist/safe-bash/commands/archive/zip/environment.js +1 -62
- package/dist/safe-bash/commands/archive/zip/grow.d.ts +1 -3
- package/dist/safe-bash/commands/archive/zip/grow.js +1 -2
- package/dist/safe-bash/commands/archive/zip/help.d.ts +1 -4
- package/dist/safe-bash/commands/archive/zip/help.js +1 -182
- package/dist/safe-bash/commands/archive/zip/line-endings.d.ts +1 -2
- package/dist/safe-bash/commands/archive/zip/line-endings.js +1 -194
- package/dist/safe-bash/commands/archive/zip/log.d.ts +1 -22
- package/dist/safe-bash/commands/archive/zip/log.js +1 -159
- package/dist/safe-bash/commands/archive/zip/lzma.d.ts +1 -9
- package/dist/safe-bash/commands/archive/zip/lzma.js +1 -40
- package/dist/safe-bash/commands/archive/zip/move.d.ts +1 -11
- package/dist/safe-bash/commands/archive/zip/move.js +1 -59
- package/dist/safe-bash/commands/archive/zip/names.d.ts +1 -2
- package/dist/safe-bash/commands/archive/zip/names.js +1 -33
- package/dist/safe-bash/commands/archive/zip/options.d.ts +1 -13
- package/dist/safe-bash/commands/archive/zip/options.js +1 -124
- package/dist/safe-bash/commands/archive/zip/repair.d.ts +1 -10
- package/dist/safe-bash/commands/archive/zip/repair.js +1 -392
- package/dist/safe-bash/commands/archive/zip/safety.d.ts +1 -54
- package/dist/safe-bash/commands/archive/zip/safety.js +1 -360
- package/dist/safe-bash/commands/archive/zip/sfx.d.ts +1 -4
- package/dist/safe-bash/commands/archive/zip/sfx.js +1 -52
- package/dist/safe-bash/commands/archive/zip/test-command.d.ts +1 -5
- package/dist/safe-bash/commands/archive/zip/test-command.js +1 -101
- package/dist/safe-bash/commands/archive/zip/volumes.d.ts +1 -21
- package/dist/safe-bash/commands/archive/zip/volumes.js +1 -281
- package/dist/safe-bash/commands/archive/zip/zip64.d.ts +1 -30
- package/dist/safe-bash/commands/archive/zip/zip64.js +1 -227
- package/dist/safe-bash/commands/archive/zip-format.d.ts +1 -68
- package/dist/safe-bash/commands/archive/zip-format.js +1 -1075
- package/dist/safe-bash/commands/archive/zip.d.ts +1 -3
- package/dist/safe-bash/commands/archive/zip.js +1 -1523
- package/dist/safe-bash/commands/awk/index.d.ts +2 -0
- package/dist/safe-bash/commands/awk/index.js +2 -0
- package/dist/safe-bash/commands/bytes/compression/index.js +4 -2
- 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/curl/index.d.ts +2 -0
- package/dist/safe-bash/commands/curl/index.js +2 -0
- package/dist/safe-bash/commands/diff/index.d.ts +2 -0
- package/dist/safe-bash/commands/diff/index.js +2 -0
- package/dist/safe-bash/commands/diff-patch/diff-format.d.ts +1 -10
- package/dist/safe-bash/commands/diff-patch/diff-format.js +1 -237
- package/dist/safe-bash/commands/diff-patch/diff-options.d.ts +1 -38
- package/dist/safe-bash/commands/diff-patch/diff-options.js +1 -261
- package/dist/safe-bash/commands/diff-patch/diff-output.d.ts +1 -20
- package/dist/safe-bash/commands/diff-patch/diff-output.js +1 -290
- package/dist/safe-bash/commands/diff-patch/diff.d.ts +1 -2
- package/dist/safe-bash/commands/diff-patch/diff.js +1 -656
- package/dist/safe-bash/commands/diff-patch/index.d.ts +4 -5
- package/dist/safe-bash/commands/diff-patch/index.js +8 -333
- package/dist/safe-bash/commands/diff-patch/patch-envelope.d.ts +1 -2
- package/dist/safe-bash/commands/diff-patch/patch-envelope.js +1 -63
- package/dist/safe-bash/commands/diff-patch/patch-formats.d.ts +1 -7
- package/dist/safe-bash/commands/diff-patch/patch-formats.js +1 -264
- package/dist/safe-bash/commands/diff-patch/patch-gnu-paths.d.ts +1 -41
- package/dist/safe-bash/commands/diff-patch/patch-gnu-paths.js +1 -263
- package/dist/safe-bash/commands/diff-patch/patch-gnu-reject.d.ts +1 -3
- package/dist/safe-bash/commands/diff-patch/patch-gnu-reject.js +1 -100
- package/dist/safe-bash/commands/diff-patch/patch-path.d.ts +1 -3
- package/dist/safe-bash/commands/diff-patch/patch-path.js +1 -91
- package/dist/safe-bash/commands/diff-patch/patch-publication.d.ts +1 -13
- package/dist/safe-bash/commands/diff-patch/patch-publication.js +1 -107
- package/dist/safe-bash/commands/diff-patch/patch.d.ts +1 -2
- package/dist/safe-bash/commands/diff-patch/patch.js +1 -653
- package/dist/safe-bash/commands/diff-patch/shared.d.ts +1 -53
- package/dist/safe-bash/commands/diff-patch/shared.js +1 -267
- package/dist/safe-bash/commands/diff-patch/unified.d.ts +1 -52
- package/dist/safe-bash/commands/diff-patch/unified.js +1 -385
- package/dist/safe-bash/commands/directory-admission.d.ts +1 -3
- package/dist/safe-bash/commands/directory-admission.js +1 -26
- package/dist/safe-bash/commands/docx/index.browser.js +1 -1
- package/dist/safe-bash/commands/execution.js +19 -13
- package/dist/safe-bash/commands/factor/index.browser.js +2 -2
- package/dist/safe-bash/commands/filesystem.d.ts +1 -1
- package/dist/safe-bash/commands/filesystem.js +17 -13
- package/dist/safe-bash/commands/find/index.d.ts +2 -0
- package/dist/safe-bash/commands/find/index.js +2 -0
- package/dist/safe-bash/commands/find-format.d.ts +1 -20
- package/dist/safe-bash/commands/find-format.js +1 -161
- package/dist/safe-bash/commands/find.d.ts +2 -18
- package/dist/safe-bash/commands/find.js +2 -1236
- package/dist/safe-bash/commands/getopt/index.browser.js +2 -2
- package/dist/safe-bash/commands/gzip/index.d.ts +2 -0
- package/dist/safe-bash/commands/gzip/index.js +2 -0
- package/dist/safe-bash/commands/hexdump/index.browser.js +2 -2
- 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/line-endings/index.d.ts +1 -1
- package/dist/safe-bash/commands/line-endings/index.js +1 -262
- package/dist/safe-bash/commands/llm/index.browser.js +4 -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/chmod.d.ts +1 -4
- package/dist/safe-bash/commands/metadata/chmod.js +2 -63
- package/dist/safe-bash/commands/network/aggregate.d.ts +1 -4
- package/dist/safe-bash/commands/network/aggregate.js +1 -23
- package/dist/safe-bash/commands/network/args.d.ts +1 -68
- package/dist/safe-bash/commands/network/args.js +1 -321
- package/dist/safe-bash/commands/network/authorizer.d.ts +1 -6
- package/dist/safe-bash/commands/network/authorizer.js +1 -33
- package/dist/safe-bash/commands/network/body.d.ts +1 -9
- package/dist/safe-bash/commands/network/body.js +1 -393
- package/dist/safe-bash/commands/network/curl.d.ts +3 -13
- package/dist/safe-bash/commands/network/curl.js +6 -695
- package/dist/safe-bash/commands/network/deadline.d.ts +1 -2
- package/dist/safe-bash/commands/network/deadline.js +1 -14
- package/dist/safe-bash/commands/network/decode.d.ts +1 -2
- package/dist/safe-bash/commands/network/decode.js +1 -79
- package/dist/safe-bash/commands/network/fetch-transport.d.ts +1 -7
- package/dist/safe-bash/commands/network/fetch-transport.js +1 -94
- package/dist/safe-bash/commands/network/form-content-type.d.ts +1 -5
- package/dist/safe-bash/commands/network/form-content-type.js +1 -63
- package/dist/safe-bash/commands/network/form-headers.d.ts +1 -2
- package/dist/safe-bash/commands/network/form-headers.js +1 -35
- package/dist/safe-bash/commands/network/glob.d.ts +1 -7
- package/dist/safe-bash/commands/network/glob.js +1 -134
- package/dist/safe-bash/commands/network/index.browser.js +4 -12
- package/dist/safe-bash/commands/network/input.d.ts +1 -5
- package/dist/safe-bash/commands/network/input.js +1 -276
- package/dist/safe-bash/commands/network/output.d.ts +1 -6
- package/dist/safe-bash/commands/network/output.js +1 -131
- 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/private-address.d.ts +1 -1
- package/dist/safe-bash/commands/network/private-address.js +1 -44
- 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/shared.d.ts +1 -14
- package/dist/safe-bash/commands/network/shared.js +1 -71
- package/dist/safe-bash/commands/network/transport.js +2 -2
- package/dist/safe-bash/commands/network/types.d.ts +1 -37
- package/dist/safe-bash/commands/network/types.js +1 -31
- package/dist/safe-bash/commands/network/url.d.ts +1 -2
- package/dist/safe-bash/commands/network/url.js +1 -30
- package/dist/safe-bash/commands/network/wget.d.ts +3 -3
- package/dist/safe-bash/commands/network/wget.js +9 -332
- package/dist/safe-bash/commands/node/filesystem.js +3 -2
- package/dist/safe-bash/commands/node/index.browser.js +8 -9
- package/dist/safe-bash/commands/node/index.d.ts +3 -3
- package/dist/safe-bash/commands/node/index.js +5 -0
- package/dist/safe-bash/commands/node/safejs.d.ts +3 -3
- package/dist/safe-bash/commands/node/safejs.js +6 -1
- package/dist/safe-bash/commands/node/types.d.ts +1 -1
- package/dist/safe-bash/commands/node/types.js +1 -1
- package/dist/safe-bash/commands/node/unconfigured.d.ts +3 -0
- package/dist/safe-bash/commands/node/unconfigured.js +10 -0
- package/dist/safe-bash/commands/op/index.browser.js +3 -3
- package/dist/safe-bash/commands/patch/index.d.ts +2 -0
- package/dist/safe-bash/commands/patch/index.js +2 -0
- package/dist/safe-bash/commands/pdfinfo/index.js +2 -1
- package/dist/safe-bash/commands/pr/index.browser.js +2 -2
- package/dist/safe-bash/commands/predicates.js +3 -4
- 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/llm-capability.d.ts +1 -0
- package/dist/safe-bash/commands/python/llm-capability.js +27 -7
- package/dist/safe-bash/commands/python/llm-module.js +11 -0
- package/dist/safe-bash/commands/python/manifest.d.ts +2 -0
- package/dist/safe-bash/commands/python/manifest.js +13 -6
- package/dist/safe-bash/commands/python/provisioning.js +1 -1
- 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/matching.js +1 -2
- package/dist/safe-bash/commands/regex-execution/public.browser.js +8 -8
- package/dist/safe-bash/commands/safejs/runtime.js +16 -7
- package/dist/safe-bash/commands/search/index.d.ts +1 -1
- package/dist/safe-bash/commands/search/index.js +1 -347
- package/dist/safe-bash/commands/search/portable.d.ts +2 -2
- package/dist/safe-bash/commands/search/portable.js +3 -2
- package/dist/safe-bash/commands/sed/index.d.ts +2 -0
- package/dist/safe-bash/commands/sed/index.js +2 -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/streams.js +6 -24
- package/dist/safe-bash/commands/tar/index.d.ts +2 -0
- package/dist/safe-bash/commands/tar/index.js +2 -0
- package/dist/safe-bash/commands/text-programs/awk-inspection.d.ts +1 -19
- package/dist/safe-bash/commands/text-programs/awk-inspection.js +1 -50
- package/dist/safe-bash/commands/text-programs/awk-pipes.d.ts +2 -0
- package/dist/safe-bash/commands/text-programs/awk-pipes.js +2 -0
- package/dist/safe-bash/commands/text-programs/awk-pretty.d.ts +1 -3
- package/dist/safe-bash/commands/text-programs/awk-pretty.js +1 -197
- package/dist/safe-bash/commands/text-programs/awk-quote.d.ts +1 -2
- package/dist/safe-bash/commands/text-programs/awk-quote.js +1 -15
- package/dist/safe-bash/commands/text-programs/awk-reader.d.ts +1 -42
- package/dist/safe-bash/commands/text-programs/awk-reader.js +1 -449
- package/dist/safe-bash/commands/text-programs/awk-retention.d.ts +1 -13
- package/dist/safe-bash/commands/text-programs/awk-retention.js +1 -51
- package/dist/safe-bash/commands/text-programs/awk-runtime.d.ts +1 -150
- package/dist/safe-bash/commands/text-programs/awk-runtime.js +1 -2627
- package/dist/safe-bash/commands/text-programs/awk-syntax.d.ts +1 -142
- package/dist/safe-bash/commands/text-programs/awk-syntax.js +1 -509
- package/dist/safe-bash/commands/text-programs/awk-values.d.ts +1 -32
- package/dist/safe-bash/commands/text-programs/awk-values.js +1 -386
- package/dist/safe-bash/commands/text-programs/awk.d.ts +1 -3
- package/dist/safe-bash/commands/text-programs/awk.js +1 -361
- package/dist/safe-bash/commands/text-programs/inplace.d.ts +1 -16
- package/dist/safe-bash/commands/text-programs/inplace.js +1 -155
- package/dist/safe-bash/commands/text-programs/sed.d.ts +1 -3
- package/dist/safe-bash/commands/text-programs/sed.js +1 -1647
- package/dist/safe-bash/commands/text.js +268 -364
- package/dist/safe-bash/commands/tsort/index.browser.js +2 -2
- package/dist/safe-bash/commands/unzip/index.d.ts +2 -0
- package/dist/safe-bash/commands/unzip/index.js +2 -0
- package/dist/safe-bash/commands/wget/index.d.ts +2 -0
- package/dist/safe-bash/commands/wget/index.js +2 -0
- package/dist/safe-bash/commands/xml/index.browser.js +2 -2
- package/dist/safe-bash/commands/yq/index.browser.js +8 -3
- package/dist/safe-bash/commands/yq/index.d.ts +1 -6
- package/dist/safe-bash/commands/yq/index.js +1 -36
- package/dist/safe-bash/commands/zip/index.d.ts +2 -0
- package/dist/safe-bash/commands/zip/index.js +2 -0
- package/dist/safe-bash/core.browser.js +2 -2
- package/dist/safe-bash/core.d.ts +14 -2
- package/dist/safe-bash/core.js +8 -2
- package/dist/safe-bash/fs/s3/index.d.ts +2 -2
- package/dist/safe-bash/fs/s3/index.js +1 -1
- package/dist/safe-bash/full-core.browser.js +321 -286
- package/dist/safe-bash/jobs.browser.js +5 -5
- package/dist/safe-bash/lazy-mmdc.d.ts +6 -0
- package/dist/safe-bash/lazy-mmdc.js +23 -0
- package/dist/safe-bash/opt-in/commands/dd/index.js +2 -0
- package/dist/safe-bash/opt-in/commands/yq/mike.js +6 -13
- package/dist/safe-bash/opt-in/commands/yq/native-work.d.ts +1 -0
- package/dist/safe-bash/opt-in/commands/yq/native-work.js +17 -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 -11
- package/dist/safe-bash/optional-host.d.ts +1 -1
- package/dist/safe-bash/optional-host.js +1 -1
- package/dist/safe-bash/playwright/ability-execution.js +3 -2
- package/dist/safe-bash/playwright/adapter.js +1 -1
- package/dist/safe-bash/playwright/controller.js +9 -8
- package/dist/safe-bash/playwright/modal-capabilities.js +2 -1
- package/dist/safe-bash/playwright/native-json-snapshot.js +4 -3
- package/dist/safe-bash/playwright/native-snapshot.js +5 -4
- package/dist/safe-bash/playwright/open-options.js +3 -3
- package/dist/safe-bash/playwright/resource-limit.d.ts +2 -0
- package/dist/safe-bash/playwright/resource-limit.js +4 -0
- package/dist/safe-bash/playwright/session-configuration.js +8 -3
- package/dist/safe-bash/playwright/snapshot.js +8 -7
- package/dist/safe-bash/playwright/standard-capabilities.js +5 -4
- 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 +27 -29
- package/dist/safe-bash/registry-entry.browser.js +28 -30
- package/dist/safe-bash/shell/arrays/bindings.d.ts +3 -5
- package/dist/safe-bash/shell/arrays/bindings.js +7 -3
- 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/input.js +16 -14
- package/dist/safe-bash/shell/parser.js +8 -1
- package/dist/safe-bash/shell/runtime.d.ts +7 -4
- package/dist/safe-bash/shell/runtime.js +604 -802
- package/dist/safe-bash/shell/shell.js +2 -31
- package/dist/safe-bash/shell/types.d.ts +2 -0
- package/dist/safe-bash/shell/value-state.js +17 -2
- package/dist/safe-bash/shell/worker-limits.js +1 -0
- package/dist/safe-bash/shell-entry.browser.js +25 -27
- package/dist/safe-bash/trap.browser.d.ts +3 -0
- package/dist/safe-bash/trap.browser.js +14 -0
- package/dist/safe-bash/worker/host.js +1 -1
- 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 +4 -4
- 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/LICENSE +21 -0
- package/dist/safe-bash-command-awk/awk-inspection.d.ts +19 -0
- package/dist/safe-bash-command-awk/awk-inspection.js +9 -0
- package/dist/safe-bash-command-awk/awk-pipes.d.ts +19 -0
- package/dist/safe-bash-command-awk/awk-pipes.js +8 -0
- package/dist/safe-bash-command-awk/awk-pretty.d.ts +3 -0
- package/dist/safe-bash-command-awk/awk-pretty.js +8 -0
- package/dist/safe-bash-command-awk/awk-quote.d.ts +2 -0
- package/dist/safe-bash-command-awk/awk-quote.js +7 -0
- package/dist/safe-bash-command-awk/awk-reader.d.ts +42 -0
- package/dist/safe-bash-command-awk/awk-reader.js +9 -0
- package/dist/safe-bash-command-awk/awk-retention.d.ts +13 -0
- package/dist/safe-bash-command-awk/awk-retention.js +7 -0
- package/dist/safe-bash-command-awk/awk-runtime.d.ts +151 -0
- package/dist/safe-bash-command-awk/awk-runtime.js +11 -0
- package/dist/safe-bash-command-awk/awk-syntax.d.ts +144 -0
- package/dist/safe-bash-command-awk/awk-syntax.js +14 -0
- package/dist/safe-bash-command-awk/awk-values.d.ts +32 -0
- package/dist/safe-bash-command-awk/awk-values.js +35 -0
- package/dist/safe-bash-command-awk/awk.d.ts +3 -0
- package/dist/safe-bash-command-awk/awk.js +16 -0
- package/dist/safe-bash-command-awk/index.d.ts +7 -0
- package/dist/safe-bash-command-awk/index.js +36 -0
- package/dist/safe-bash-command-bc/index.d.ts +6 -0
- package/dist/safe-bash-command-bc/index.js +136 -266
- 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-csplit/command.js +2 -2
- package/dist/safe-bash-command-csplit/index.js +2 -2
- 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/contracts.d.ts +1 -0
- package/dist/safe-bash-command-csvkit/csvpy-interpreter.d.ts +2 -1
- package/dist/safe-bash-command-csvkit/default-csvpy.d.ts +11 -0
- package/dist/safe-bash-command-csvkit/errors.js +22 -0
- package/dist/safe-bash-command-csvkit/index.d.ts +1 -0
- package/dist/safe-bash-command-csvkit/index.js +180 -12
- package/dist/safe-bash-command-csvkit/python-worker-browser.d.ts +3 -0
- package/dist/safe-bash-command-csvkit/python-worker-browser.js +16 -0
- package/dist/safe-bash-command-csvkit/python-worker-contract.d.ts +20 -0
- package/dist/safe-bash-command-csvkit/python-worker-node.d.ts +3 -0
- package/dist/safe-bash-command-csvkit/python-worker-node.js +9 -0
- package/dist/safe-bash-command-csvkit/runtime.d.ts +1 -0
- package/dist/safe-bash-command-csvkit/sync-support.js +1 -1
- package/dist/safe-bash-command-curl/LICENSE +21 -0
- package/dist/safe-bash-command-curl/curl.d.ts +13 -0
- package/dist/safe-bash-command-curl/curl.js +9 -0
- package/dist/safe-bash-command-curl/index.d.ts +6 -0
- package/dist/safe-bash-command-curl/index.js +26 -0
- package/dist/safe-bash-command-dd/index.js +2 -0
- package/dist/safe-bash-command-diff/LICENSE +21 -0
- package/dist/safe-bash-command-diff/diff-format.d.ts +10 -0
- package/dist/safe-bash-command-diff/diff-format.js +10 -0
- package/dist/safe-bash-command-diff/diff-options.d.ts +38 -0
- package/dist/safe-bash-command-diff/diff-options.js +7 -0
- package/dist/safe-bash-command-diff/diff-output.d.ts +20 -0
- package/dist/safe-bash-command-diff/diff-output.js +19 -0
- package/dist/safe-bash-command-diff/diff.d.ts +2 -0
- package/dist/safe-bash-command-diff/diff.js +10 -0
- package/dist/safe-bash-command-diff/index.d.ts +8 -0
- package/dist/safe-bash-command-diff/index.js +34 -0
- package/dist/safe-bash-command-diff/sync.d.ts +2 -0
- package/dist/safe-bash-command-diff/sync.js +9 -0
- package/dist/safe-bash-command-diff3/index.js +5 -5
- package/dist/safe-bash-command-docx/index.d.ts +4 -4
- package/dist/safe-bash-command-docx/index.js +12 -5
- package/dist/safe-bash-command-dos2unix/index.d.ts +1 -0
- package/dist/safe-bash-command-dos2unix/index.js +225 -1
- package/dist/safe-bash-command-dos2unix/sync.d.ts +1 -0
- package/dist/safe-bash-command-exiftool/index.d.ts +1 -0
- package/dist/safe-bash-command-exiftool/index.js +2 -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/index.js +9 -9
- package/dist/safe-bash-command-ffmpeg/index.js +117 -102
- package/dist/safe-bash-command-file/index.js +4 -4
- package/dist/safe-bash-command-file/shared.js +1 -1
- package/dist/safe-bash-command-find/LICENSE +21 -0
- package/dist/safe-bash-command-find/find-format.d.ts +20 -0
- package/dist/safe-bash-command-find/find-format.js +9 -0
- package/dist/safe-bash-command-find/find.d.ts +18 -0
- package/dist/safe-bash-command-find/find.js +10 -0
- package/dist/safe-bash-command-find/index.d.ts +13 -0
- package/dist/safe-bash-command-find/index.js +45 -0
- package/dist/safe-bash-command-fmt/index.js +7 -4
- package/dist/safe-bash-command-git/git_rust.wasm +0 -0
- package/dist/safe-bash-command-git/index.js +5 -7
- package/dist/safe-bash-command-git/wasm.generated.js +1 -1
- package/dist/safe-bash-command-gzip/LICENSE +21 -0
- package/dist/safe-bash-command-gzip/index.d.ts +11 -0
- package/dist/safe-bash-command-gzip/index.js +95 -0
- 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 +11 -11
- 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 +39 -17
- 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 +45 -35
- 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-llm/command.js +1 -1
- package/dist/safe-bash-command-llm/index.d.ts +1 -0
- package/dist/safe-bash-command-llm/index.js +16 -14
- package/dist/safe-bash-command-llm/openai.js +3 -3
- package/dist/safe-bash-command-llm/providers/index.js +3 -3
- package/dist/safe-bash-command-llm/providers/openai.js +3 -3
- package/dist/safe-bash-command-llm/stored-schema.d.ts +10 -0
- package/dist/safe-bash-command-mmdc/index.d.ts +1 -0
- package/dist/safe-bash-command-mmdc/index.js +13 -604
- package/dist/safe-bash-command-mmdc/settings.d.ts +2 -0
- package/dist/safe-bash-command-mmdc/settings.js +7 -0
- 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 +4 -3
- package/dist/safe-bash-command-pandoc/defaults.d.ts +1 -0
- package/dist/safe-bash-command-pandoc/index.js +4 -3
- package/dist/safe-bash-command-pandoc/lua-filters.js +1 -1
- package/dist/safe-bash-command-pandoc/types.d.ts +3 -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-patch/LICENSE +21 -0
- package/dist/safe-bash-command-patch/index.d.ts +8 -0
- package/dist/safe-bash-command-patch/index.js +38 -0
- package/dist/safe-bash-command-patch/patch-envelope.d.ts +2 -0
- package/dist/safe-bash-command-patch/patch-envelope.js +7 -0
- package/dist/safe-bash-command-patch/patch-formats.d.ts +7 -0
- package/dist/safe-bash-command-patch/patch-formats.js +9 -0
- package/dist/safe-bash-command-patch/patch-gnu-paths.d.ts +41 -0
- package/dist/safe-bash-command-patch/patch-gnu-paths.js +26 -0
- package/dist/safe-bash-command-patch/patch-gnu-reject.d.ts +3 -0
- package/dist/safe-bash-command-patch/patch-gnu-reject.js +7 -0
- package/dist/safe-bash-command-patch/patch-path.d.ts +3 -0
- package/dist/safe-bash-command-patch/patch-path.js +11 -0
- package/dist/safe-bash-command-patch/patch-publication.d.ts +13 -0
- package/dist/safe-bash-command-patch/patch-publication.js +7 -0
- package/dist/safe-bash-command-patch/patch.d.ts +2 -0
- package/dist/safe-bash-command-patch/patch.js +14 -0
- package/dist/safe-bash-command-patch/sync.d.ts +2 -0
- package/dist/safe-bash-command-patch/sync.js +7 -0
- package/dist/safe-bash-command-patch/unified.d.ts +52 -0
- package/dist/safe-bash-command-patch/unified.js +16 -0
- package/dist/safe-bash-command-pathchk/index.js +3 -13
- package/dist/safe-bash-command-pdfimages/index.js +62 -25
- package/dist/safe-bash-command-pdfinfo/index.d.ts +0 -23
- package/dist/safe-bash-command-pdfinfo/index.js +39 -782
- package/dist/safe-bash-command-pdftk/index.js +40 -12
- package/dist/safe-bash-command-pdftoppm/index.js +76 -30
- package/dist/safe-bash-command-pdftotext/index.js +37 -15
- package/dist/safe-bash-command-pptx/index.d.ts +4 -4
- package/dist/safe-bash-command-pptx/index.js +11 -5
- package/dist/safe-bash-command-pr/command.js +2 -2
- package/dist/safe-bash-command-pr/index.js +4 -4
- package/dist/safe-bash-command-qpdf/index.js +31 -18
- package/dist/safe-bash-command-rg/index.d.ts +1 -0
- package/dist/safe-bash-command-rg/index.js +222 -1
- package/dist/safe-bash-command-rg/rg-command.js +1 -1
- package/dist/safe-bash-command-rg/sync.d.ts +1 -0
- package/dist/safe-bash-command-sed/LICENSE +21 -0
- package/dist/safe-bash-command-sed/index.d.ts +7 -0
- package/dist/safe-bash-command-sed/index.js +28 -0
- package/dist/safe-bash-command-sed/inplace.d.ts +16 -0
- package/dist/safe-bash-command-sed/inplace.js +9 -0
- package/dist/safe-bash-command-sed/sed.d.ts +3 -0
- package/dist/safe-bash-command-sed/sed.js +8 -0
- 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-sips/index.js +111 -35
- package/dist/safe-bash-command-soffice/index.js +21 -17
- 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 +7 -2
- package/dist/safe-bash-command-sqlite3/index.js +436 -537
- 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 +9 -9
- 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 +9 -9
- package/dist/safe-bash-command-ssconvert/index.js +21 -21
- package/dist/safe-bash-command-tar/LICENSE +21 -0
- package/dist/safe-bash-command-tar/create.d.ts +17 -0
- package/dist/safe-bash-command-tar/create.js +14 -0
- package/dist/safe-bash-command-tar/extract.d.ts +11 -0
- package/dist/safe-bash-command-tar/extract.js +14 -0
- package/dist/safe-bash-command-tar/format.d.ts +32 -0
- package/dist/safe-bash-command-tar/format.js +19 -0
- package/dist/safe-bash-command-tar/index.d.ts +8 -0
- package/dist/safe-bash-command-tar/index.js +551 -0
- package/dist/safe-bash-command-tar/listing.d.ts +2 -0
- package/dist/safe-bash-command-tar/listing.js +7 -0
- package/dist/safe-bash-command-tar/modes.d.ts +5 -0
- package/dist/safe-bash-command-tar/modes.js +16 -0
- package/dist/safe-bash-command-tar/options.d.ts +53 -0
- package/dist/safe-bash-command-tar/options.js +10 -0
- package/dist/safe-bash-command-tar/stream.d.ts +22 -0
- package/dist/safe-bash-command-tar/stream.js +15 -0
- package/dist/safe-bash-command-tar/transform.d.ts +16 -0
- package/dist/safe-bash-command-tar/transform.js +9 -0
- 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-unrtf/index.js +14 -7
- package/dist/safe-bash-command-unzip/LICENSE +21 -0
- package/dist/safe-bash-command-unzip/index.d.ts +7 -0
- package/dist/safe-bash-command-unzip/index.js +39 -0
- package/dist/safe-bash-command-unzip/sync.d.ts +3 -0
- package/dist/safe-bash-command-unzip/sync.js +9 -0
- package/dist/safe-bash-command-unzip/unzip/safety.d.ts +32 -0
- package/dist/safe-bash-command-unzip/unzip/safety.js +7 -0
- package/dist/safe-bash-command-unzip/unzip.d.ts +3 -0
- package/dist/safe-bash-command-unzip/unzip.js +8 -0
- package/dist/safe-bash-command-wget/LICENSE +21 -0
- package/dist/safe-bash-command-wget/index.d.ts +6 -0
- package/dist/safe-bash-command-wget/index.js +26 -0
- package/dist/safe-bash-command-wget/wget.d.ts +3 -0
- package/dist/safe-bash-command-wget/wget.js +7 -0
- package/dist/safe-bash-command-xan/argv.d.ts +4 -1
- package/dist/safe-bash-command-xan/argv.js +1 -1
- package/dist/safe-bash-command-xan/commands.js +6 -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 +18 -17
- package/dist/safe-bash-command-xan/io.js +3 -3
- package/dist/safe-bash-command-xmllint/index.js +190 -50
- 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 +11 -2
- package/dist/safe-bash-command-xz/options.d.ts +9 -1
- package/dist/safe-bash-command-xz/options.js +3 -1
- package/dist/safe-bash-command-yq/index.d.ts +4 -11
- package/dist/safe-bash-command-yq/index.js +3367 -670
- package/dist/safe-bash-command-yq/mike.js +6 -13
- package/dist/safe-bash-command-yq/native-work.d.ts +1 -0
- package/dist/safe-bash-command-yq/native-work.js +17 -0
- package/dist/safe-bash-command-yq/query.d.ts +11 -0
- package/dist/safe-bash-command-yq/query.js +735 -0
- package/dist/safe-bash-command-zip/LICENSE +21 -0
- package/dist/safe-bash-command-zip/index.d.ts +7 -0
- package/dist/safe-bash-command-zip/index.js +38 -0
- package/dist/safe-bash-command-zip/sync.d.ts +3 -0
- package/dist/safe-bash-command-zip/sync.js +9 -0
- package/dist/safe-bash-command-zip/zip.d.ts +3 -0
- package/dist/safe-bash-command-zip/zip.js +7 -0
- package/dist/safe-bash-compression-engine/files.js +4 -4
- package/dist/safe-bash-compression-engine/index.js +2 -2
- package/dist/safe-bash-compression-engine/operand.js +6 -6
- package/dist/safe-bash-compression-engine/stream.js +2 -2
- package/dist/safe-bash-compression-engine/zstd-decode.js +1 -1
- package/dist/safe-bash-contracts/command.js +1 -1
- package/dist/safe-bash-contracts/diagnostics.js +4 -4
- package/dist/safe-bash-contracts/escaping.js +12 -12
- package/dist/safe-bash-contracts/filesystem-descriptor.js +1 -1
- package/dist/safe-bash-contracts/filesystem-output.js +8 -8
- package/dist/safe-bash-contracts/index.d.ts +1 -0
- package/dist/safe-bash-contracts/index.js +39 -35
- package/dist/safe-bash-contracts/io.d.ts +4 -1
- package/dist/safe-bash-contracts/io.js +4 -2
- package/dist/safe-bash-contracts/managed-abort.d.ts +10 -0
- package/dist/safe-bash-contracts/output.js +3 -3
- package/dist/safe-bash-diff-engine/LICENSE +21 -0
- package/dist/safe-bash-diff-engine/index.d.ts +1 -0
- package/dist/safe-bash-diff-engine/index.js +24 -0
- package/dist/safe-bash-diff-engine/shared.d.ts +54 -0
- package/dist/safe-bash-diff-engine/shared.js +19 -0
- package/dist/safe-bash-io-engine/commands/archive/internal.js +5 -23
- package/dist/safe-bash-io-engine/commands/directory-admission.d.ts +3 -0
- package/dist/safe-bash-io-engine/commands/directory-admission.js +34 -0
- package/dist/safe-bash-io-engine/commands/mode-change.d.ts +4 -0
- package/dist/safe-bash-io-engine/commands/mode-change.js +60 -0
- package/dist/safe-bash-io-engine/commands/search/requirements.js +2 -2
- package/dist/safe-bash-io-engine/commands/text-programs/shared.js +44 -66
- package/dist/safe-bash-io-engine/internal.js +1 -1
- package/dist/safe-bash-io-engine/shell/pattern.js +8 -13
- package/dist/safe-bash-io-engine/shell/string-operations.js +1 -1
- package/dist/safe-bash-markdown-engine/commonmark-blocks.js +4 -4
- package/dist/safe-bash-markdown-engine/commonmark-inlines.js +4 -4
- package/dist/safe-bash-markdown-engine/commonmark-syntax.js +2 -2
- package/dist/safe-bash-markdown-engine/gfm-syntax.js +3 -3
- package/dist/safe-bash-markdown-engine/index.js +7 -7
- package/dist/safe-bash-mcp/index.browser.d.ts +161 -35
- package/dist/safe-bash-mcp/index.browser.js +417 -0
- package/dist/safe-bash-mcp/index.d.ts +66 -2
- package/dist/safe-bash-mcp/index.js +1838 -122
- package/dist/safe-bash-network-engine/LICENSE +21 -0
- package/dist/safe-bash-network-engine/aggregate.d.ts +4 -0
- package/dist/safe-bash-network-engine/aggregate.js +37 -0
- package/dist/safe-bash-network-engine/args.d.ts +68 -0
- package/dist/safe-bash-network-engine/args.js +19 -0
- package/dist/safe-bash-network-engine/authorizer.d.ts +6 -0
- package/dist/safe-bash-network-engine/authorizer.js +8 -0
- package/dist/safe-bash-network-engine/body.d.ts +9 -0
- package/dist/safe-bash-network-engine/body.js +374 -0
- package/dist/safe-bash-network-engine/deadline.d.ts +2 -0
- package/dist/safe-bash-network-engine/deadline.js +7 -0
- package/dist/safe-bash-network-engine/decode.d.ts +2 -0
- package/dist/safe-bash-network-engine/decode.js +80 -0
- package/dist/safe-bash-network-engine/fetch-transport.d.ts +7 -0
- package/dist/safe-bash-network-engine/fetch-transport.js +9 -0
- package/dist/safe-bash-network-engine/form-content-type.d.ts +5 -0
- package/dist/safe-bash-network-engine/form-content-type.js +8 -0
- package/dist/safe-bash-network-engine/form-headers.d.ts +2 -0
- package/dist/safe-bash-network-engine/form-headers.js +10 -0
- package/dist/safe-bash-network-engine/glob.d.ts +7 -0
- package/dist/safe-bash-network-engine/glob.js +124 -0
- package/dist/safe-bash-network-engine/index.d.ts +3 -0
- package/dist/safe-bash-network-engine/index.js +26 -0
- package/dist/safe-bash-network-engine/input.d.ts +5 -0
- package/dist/safe-bash-network-engine/input.js +255 -0
- package/dist/safe-bash-network-engine/output.d.ts +6 -0
- package/dist/safe-bash-network-engine/output.js +132 -0
- package/dist/safe-bash-network-engine/platform-portable.d.ts +5 -0
- package/dist/safe-bash-network-engine/platform-portable.js +19 -0
- package/dist/safe-bash-network-engine/private-address.d.ts +1 -0
- package/dist/safe-bash-network-engine/private-address.js +7 -0
- package/dist/safe-bash-network-engine/shared.d.ts +14 -0
- package/dist/safe-bash-network-engine/shared.js +23 -0
- package/dist/safe-bash-network-engine/types.d.ts +42 -0
- package/dist/safe-bash-network-engine/types.js +11 -0
- package/dist/safe-bash-network-engine/url.d.ts +2 -0
- package/dist/safe-bash-network-engine/url.js +8 -0
- package/dist/safe-bash-query-engine/capture.d.ts +1 -0
- package/dist/safe-bash-query-engine/capture.js +9 -7
- package/dist/safe-bash-query-engine/dates.d.ts +5 -1
- package/dist/safe-bash-query-engine/dates.js +10 -2
- package/dist/safe-bash-query-engine/delpaths.js +5 -5
- package/dist/safe-bash-query-engine/formats.js +3 -3
- package/dist/safe-bash-query-engine/index.js +15 -15
- package/dist/safe-bash-query-engine/indices.js +5 -5
- package/dist/safe-bash-query-engine/input.d.ts +1 -2
- package/dist/safe-bash-query-engine/input.js +2 -4
- package/dist/safe-bash-query-engine/interpreter.d.ts +5 -0
- package/dist/safe-bash-query-engine/interpreter.js +13 -13
- package/dist/safe-bash-query-engine/limits.js +1 -1
- package/dist/safe-bash-query-engine/parser.d.ts +8 -1
- package/dist/safe-bash-query-engine/parser.js +2 -2
- package/dist/safe-bash-query-engine/query-core.js +15 -15
- package/dist/safe-bash-query-engine/recurse.js +2 -2
- package/dist/safe-bash-query-engine/regex.d.ts +4 -2
- package/dist/safe-bash-query-engine/regex.js +10 -5
- package/dist/safe-bash-query-engine/split.js +2 -2
- package/dist/safe-bash-query-engine/splits.d.ts +1 -1
- package/dist/safe-bash-query-engine/splits.js +7 -6
- package/dist/safe-bash-query-engine/values.js +4 -4
- package/dist/safe-bash-regex-engine/ere/matcher.js +106 -34
- 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 -0
- package/dist/safe-bash-regex-engine/text/budget.js +1 -1
- package/dist/safe-bash-regex-engine/text/regex.d.ts +15 -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/ergonomic-regex.d.ts +12 -2
- 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 +191 -229
- package/dist/safe-bash-search-engine/matcher.d.ts +6 -2
- package/dist/safe-bash-search-engine/matcher.js +30 -8
- package/dist/safe-bash-search-engine/options.js +1 -1
- package/dist/safe-bash-search-engine/output.d.ts +3 -2
- package/dist/safe-bash-search-engine/output.js +111 -30
- package/dist/safe-bash-search-engine/shared.d.ts +2 -0
- package/dist/safe-bash-search-engine/shared.js +2 -2
- package/dist/safe-bash-search-engine/walk.js +11 -10
- 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-bash-xml-engine/document.d.ts +1 -1
- package/dist/safe-bash-xml-engine/document.js +3 -3
- package/dist/safe-bash-xml-engine/evaluate.d.ts +1 -0
- package/dist/safe-bash-xml-engine/evaluate.js +4 -1
- package/dist/safe-bash-xml-engine/index.js +8 -6
- package/dist/safe-bash-xml-engine/io.js +1 -1
- package/dist/safe-bash-xml-engine/limits.d.ts +2 -0
- package/dist/safe-bash-xml-engine/limits.js +1 -1
- package/dist/safe-bash-xml-engine/predicate.d.ts +57 -0
- package/dist/safe-bash-xml-engine/query.d.ts +3 -15
- package/dist/safe-bash-xml-engine/query.js +3 -2
- package/dist/safe-bash-zip-engine/LICENSE +21 -0
- package/dist/safe-bash-zip-engine/index.d.ts +1 -0
- package/dist/safe-bash-zip-engine/index.js +32 -0
- package/dist/safe-bash-zip-engine/unzip/arguments.d.ts +53 -0
- package/dist/safe-bash-zip-engine/unzip/arguments.js +270 -0
- package/dist/safe-bash-zip-engine/zip/aes.d.ts +17 -0
- package/dist/safe-bash-zip-engine/zip/aes.js +15 -0
- package/dist/safe-bash-zip-engine/zip/comments.d.ts +17 -0
- package/dist/safe-bash-zip-engine/zip/comments.js +77 -0
- package/dist/safe-bash-zip-engine/zip/crc.d.ts +1 -0
- package/dist/safe-bash-zip-engine/zip/crc.js +7 -0
- package/dist/safe-bash-zip-engine/zip/crypto.d.ts +19 -0
- package/dist/safe-bash-zip-engine/zip/crypto.js +16 -0
- package/dist/safe-bash-zip-engine/zip/dates.d.ts +4 -0
- package/dist/safe-bash-zip-engine/zip/dates.js +68 -0
- package/dist/safe-bash-zip-engine/zip/environment.d.ts +2 -0
- package/dist/safe-bash-zip-engine/zip/environment.js +60 -0
- package/dist/safe-bash-zip-engine/zip/grow.d.ts +3 -0
- package/dist/safe-bash-zip-engine/zip/grow.js +7 -0
- package/dist/safe-bash-zip-engine/zip/help.d.ts +4 -0
- package/dist/safe-bash-zip-engine/zip/help.js +194 -0
- package/dist/safe-bash-zip-engine/zip/line-endings.d.ts +2 -0
- package/dist/safe-bash-zip-engine/zip/line-endings.js +165 -0
- package/dist/safe-bash-zip-engine/zip/log.d.ts +22 -0
- package/dist/safe-bash-zip-engine/zip/log.js +153 -0
- package/dist/safe-bash-zip-engine/zip/lzma.d.ts +9 -0
- package/dist/safe-bash-zip-engine/zip/lzma.js +7 -0
- package/dist/safe-bash-zip-engine/zip/move.d.ts +11 -0
- package/dist/safe-bash-zip-engine/zip/move.js +57 -0
- package/dist/safe-bash-zip-engine/zip/names.d.ts +2 -0
- package/dist/safe-bash-zip-engine/zip/names.js +37 -0
- package/dist/safe-bash-zip-engine/zip/options.d.ts +13 -0
- package/dist/safe-bash-zip-engine/zip/options.js +23 -0
- package/dist/safe-bash-zip-engine/zip/repair.d.ts +10 -0
- package/dist/safe-bash-zip-engine/zip/repair.js +348 -0
- package/dist/safe-bash-zip-engine/zip/safety.d.ts +54 -0
- package/dist/safe-bash-zip-engine/zip/safety.js +19 -0
- package/dist/safe-bash-zip-engine/zip/sfx.d.ts +4 -0
- package/dist/safe-bash-zip-engine/zip/sfx.js +58 -0
- package/dist/safe-bash-zip-engine/zip/test-command.d.ts +5 -0
- package/dist/safe-bash-zip-engine/zip/test-command.js +98 -0
- package/dist/safe-bash-zip-engine/zip/volumes.d.ts +21 -0
- package/dist/safe-bash-zip-engine/zip/volumes.js +255 -0
- package/dist/safe-bash-zip-engine/zip/zip64.d.ts +30 -0
- package/dist/safe-bash-zip-engine/zip/zip64.js +25 -0
- package/dist/safe-bash-zip-engine/zip-format.d.ts +68 -0
- package/dist/safe-bash-zip-engine/zip-format.js +27 -0
- package/dist/safe-playwright-cloudflare/browser-codegen.generated.d.ts +7 -7
- package/dist/safe-playwright-cloudflare/browser-codegen.generated.js +866 -8069
- package/dist/safe-playwright-cloudflare/browser-run-code-budget.d.ts +0 -1
- package/dist/safe-playwright-cloudflare/browser-run-code-budget.js +0 -2
- package/dist/safe-playwright-cloudflare/browser-trace-archive.d.ts +5 -1
- package/dist/safe-playwright-cloudflare/browser-trace-archive.js +2 -1
- package/dist/safe-playwright-cloudflare/browser-trace-budget.js +8 -4
- package/dist/safe-playwright-cloudflare/shell-browser-resource.d.ts +2 -0
- package/dist/safe-playwright-cloudflare/shell-browser-resource.js +3 -11
- package/dist/safe-playwright-cloudflare/shell-playwright.d.ts +2 -0
- package/dist/safe-playwright-cloudflare/shell-playwright.js +1 -1
- 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-engine/io/publication.d.ts +1 -0
- 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 +165 -15
- package/dist/safe-bash/chunks/chunk-AZAJJVFX.js +0 -23017
- package/dist/safe-bash/chunks/chunk-O4ZUCRGN.js +0 -13
- package/dist/safe-bash/chunks/chunk-S264DZO2.js +0 -243
- package/dist/safe-bash/chunks/chunk-WVG5SHHQ.js +0 -12
- package/dist/safe-bash/chunks/chunk-ZW6K2J7P.js +0 -2652
- package/dist/safe-bash/command-chunks/chunk-5MPOQ6V3.js +0 -181
- package/dist/safe-bash/command-chunks/chunk-BIXLZ3OG.js +0 -14342
- package/dist/safe-bash/command-chunks/chunk-DUYJE2HY.js +0 -14
- package/dist/safe-bash/command-chunks/chunk-KAGBORIC.js +0 -88
- package/dist/safe-bash/command-chunks/chunk-NETECMOF.js +0 -40
- package/dist/safe-bash/command-chunks/chunk-XS3PGJU2.js +0 -343
- package/dist/safe-bash/command-chunks/chunk-XTZALMLR.js +0 -488
- package/dist/safe-bash/commands/archive/zip/aes-primitives-unavailable.d.ts +0 -2
- package/dist/safe-bash/commands/archive/zip/aes-primitives-unavailable.js +0 -3
- package/dist/safe-bash/commands/archive/zip/aes-primitives.d.ts +0 -2
- package/dist/safe-bash/commands/archive/zip/aes-primitives.js +0 -3
- package/dist/safe-bash/commands/xml/document.d.ts +0 -2
- package/dist/safe-bash/commands/xml/document.js +0 -2
- package/dist/safe-bash/commands/xml/evaluate.d.ts +0 -2
- package/dist/safe-bash/commands/xml/evaluate.js +0 -2
- package/dist/safe-bash/commands/xml/json.d.ts +0 -2
- package/dist/safe-bash/commands/xml/json.js +0 -2
- package/dist/safe-bash/commands/xml/limits.d.ts +0 -2
- package/dist/safe-bash/commands/xml/limits.js +0 -2
- package/dist/safe-bash/commands/xml/query.d.ts +0 -2
- package/dist/safe-bash/commands/xml/query.js +0 -2
- package/dist/safe-bash/command-chunks/{chunk-FIUFIDAO.js → chunk-2JRBIDAD.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-BWNXWI33.js → chunk-2LMZVE3I.js} +0 -0
- package/dist/safe-bash/command-chunks/{chunk-B5BKA5WH.js → chunk-B5TAOCKD.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-2ENZ6JGA.js → chunk-KEV7C3KH.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-S62HELHU.js → chunk-PL6O4K6W.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-DDLQ5YDB.js → chunk-YHFXOX6U.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-DQMOM72Z.js → chunk-ZRRBXU3M.js} +4 -4
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// packages/safe-bash-command-bc/src/index.ts
|
|
6
6
|
init_buffer();
|
|
7
|
+
import { Decimal } from "decimal.js";
|
|
7
8
|
import {
|
|
8
9
|
commandRuntimeIdentity,
|
|
9
10
|
readBytes,
|
|
@@ -56,7 +57,10 @@ function settings(options = {}) {
|
|
|
56
57
|
maxInputBytes: options.limits?.maxInputBytes ?? options.maxInputBytes ?? Infinity,
|
|
57
58
|
maxOutputBytes: options.limits?.maxOutputBytes ?? options.maxOutputBytes ?? Infinity,
|
|
58
59
|
maxSteps: options.limits?.maxSteps ?? options.maxSteps ?? Infinity,
|
|
59
|
-
maxScale: options.limits?.maxScale ?? options.maxScale ?? Infinity
|
|
60
|
+
maxScale: options.limits?.maxScale ?? options.maxScale ?? Infinity,
|
|
61
|
+
maxExponent: options.limits?.maxExponent ?? options.maxExponent ?? Infinity,
|
|
62
|
+
maxRecursionDepth: options.limits?.maxRecursionDepth ?? options.maxRecursionDepth ?? Infinity,
|
|
63
|
+
maxObase: options.limits?.maxObase ?? options.maxObase ?? Infinity
|
|
60
64
|
};
|
|
61
65
|
for (const [name, value] of Object.entries(limits)) {
|
|
62
66
|
if (value !== Infinity && (!Number.isSafeInteger(value) || value < 1)) throw new RangeError(`Invalid bc limit: ${name}`);
|
|
@@ -115,26 +119,21 @@ function modDec(a, b, currentScale) {
|
|
|
115
119
|
function truncToInt(d) {
|
|
116
120
|
return d.scale > 0 ? d.coeff / pow10(d.scale) : d.coeff;
|
|
117
121
|
}
|
|
118
|
-
function powDec(base, exp, currentScale) {
|
|
122
|
+
function powDec(base, exp, currentScale, maxExponent) {
|
|
119
123
|
let n = truncToInt(exp);
|
|
120
124
|
if (n === 0n) return ONE;
|
|
121
125
|
const neg = n < 0n;
|
|
122
126
|
if (neg) n = -n;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
let e = n;
|
|
127
|
-
while (e > 0n) {
|
|
128
|
-
if ((e & 1n) === 1n) {
|
|
129
|
-
result = mulDec(result, cur, workScale);
|
|
130
|
-
}
|
|
131
|
-
e >>= 1n;
|
|
132
|
-
if (e > 0n) cur = mulDec(cur, cur, workScale);
|
|
133
|
-
}
|
|
127
|
+
if (maxExponent !== Infinity && n > BigInt(maxExponent)) throw new Error(`exponent exceeds maximum limit (${maxExponent})`);
|
|
128
|
+
const coeff = base.coeff ** n;
|
|
129
|
+
const fullScale = BigInt(base.scale) * n;
|
|
134
130
|
if (neg) {
|
|
135
|
-
|
|
131
|
+
if (coeff === 0n) throw new Error("Runtime error (func=(main), adr=0): Divide by zero");
|
|
132
|
+
return { coeff: 10n ** (BigInt(currentScale) + fullScale) / coeff, scale: currentScale };
|
|
136
133
|
}
|
|
137
|
-
|
|
134
|
+
const scaleLimit = BigInt(Math.max(currentScale, base.scale));
|
|
135
|
+
const resultScale = fullScale < scaleLimit ? fullScale : scaleLimit;
|
|
136
|
+
return { coeff: coeff / 10n ** (fullScale - resultScale), scale: Number(resultScale) };
|
|
138
137
|
}
|
|
139
138
|
function cmpDec(a, b) {
|
|
140
139
|
const { aCoeff, bCoeff } = alignDecimals(a, b);
|
|
@@ -179,10 +178,7 @@ function parseLiteralInBase(raw, ibase) {
|
|
|
179
178
|
if (code >= 65 && code <= 70) return BigInt(code - 55);
|
|
180
179
|
return 0n;
|
|
181
180
|
};
|
|
182
|
-
if (
|
|
183
|
-
const combined = intPart + fracPart || "0";
|
|
184
|
-
return { coeff: BigInt(combined), scale };
|
|
185
|
-
}
|
|
181
|
+
if (raw.length === 1 && dot < 0) return { coeff: digitVal(raw), scale: 0 };
|
|
186
182
|
let intVal = 0n;
|
|
187
183
|
for (const ch of intPart) {
|
|
188
184
|
const d = digitVal(ch);
|
|
@@ -203,7 +199,7 @@ function formatDecimalInBase(val, obase) {
|
|
|
203
199
|
const neg = val.coeff < 0n;
|
|
204
200
|
const absCoeff = neg ? -val.coeff : val.coeff;
|
|
205
201
|
if (absCoeff === 0n) return "0";
|
|
206
|
-
if (obase ===
|
|
202
|
+
if (obase === 10n) {
|
|
207
203
|
if (val.scale <= 0) {
|
|
208
204
|
return (neg && absCoeff !== 0n ? "-" : "") + absCoeff.toString(10);
|
|
209
205
|
}
|
|
@@ -213,67 +209,84 @@ function formatDecimalInBase(val, obase) {
|
|
|
213
209
|
const prefix = intStr === "0" ? "" : intStr;
|
|
214
210
|
return (neg && absCoeff !== 0n ? "-" : "") + (prefix || (fracStr.length > 0 ? "" : "0")) + "." + fracStr;
|
|
215
211
|
}
|
|
216
|
-
const baseBig = BigInt(obase);
|
|
217
212
|
const scaleFactor = pow10(val.scale);
|
|
218
213
|
let intPart = absCoeff / scaleFactor;
|
|
219
214
|
let rem = absCoeff % scaleFactor;
|
|
220
215
|
const digits = "0123456789ABCDEF";
|
|
216
|
+
const digitWidth = (obase - 1n).toString(10).length;
|
|
221
217
|
let intOut = "";
|
|
222
218
|
if (intPart === 0n) intOut = "0";
|
|
223
219
|
else {
|
|
224
220
|
while (intPart > 0n) {
|
|
225
|
-
const d =
|
|
226
|
-
intOut = (obase <=
|
|
227
|
-
intPart /=
|
|
221
|
+
const d = intPart % obase;
|
|
222
|
+
intOut = (obase <= 16n ? digits[Number(d)] : ` ${d.toString(10).padStart(digitWidth, "0")}`) + intOut;
|
|
223
|
+
intPart /= obase;
|
|
228
224
|
}
|
|
229
225
|
}
|
|
230
226
|
if (val.scale <= 0) {
|
|
231
|
-
return (neg && absCoeff !== 0n ? "-" : "") + intOut
|
|
227
|
+
return (neg && absCoeff !== 0n ? "-" : "") + intOut;
|
|
232
228
|
}
|
|
233
229
|
let fracOut = "";
|
|
234
|
-
for (let
|
|
235
|
-
rem *=
|
|
236
|
-
const d =
|
|
230
|
+
for (let place = 1n; place < scaleFactor; place *= obase) {
|
|
231
|
+
rem *= obase;
|
|
232
|
+
const d = rem / scaleFactor;
|
|
237
233
|
rem %= scaleFactor;
|
|
238
|
-
fracOut += obase <=
|
|
234
|
+
fracOut += obase <= 16n ? digits[Number(d)] : `${fracOut ? " " : ""}${d.toString(10).padStart(digitWidth, "0")}`;
|
|
239
235
|
}
|
|
240
236
|
return (neg && absCoeff !== 0n ? "-" : "") + (intOut === "0" ? "" : intOut) + "." + fracOut;
|
|
241
237
|
}
|
|
242
|
-
function
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
const
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
238
|
+
async function mathValue(name, args, scale, tick) {
|
|
239
|
+
if (!["s", "c", "a", "l", "e", "j"].includes(name)) return void 0;
|
|
240
|
+
const decimal = (value) => `${value.coeff}e-${value.scale}`;
|
|
241
|
+
const raw = args[name === "j" ? 1 : 0] ?? ZERO;
|
|
242
|
+
const magnitude = new Decimal(decimal(raw)).abs();
|
|
243
|
+
const extra = name === "e" || name === "j" ? magnitude.ceil().toNumber() : Math.max(0, magnitude.e + 1);
|
|
244
|
+
const D = Decimal.clone({ precision: scale + extra + 32, rounding: Decimal.ROUND_DOWN });
|
|
245
|
+
const x = new D(decimal(raw));
|
|
246
|
+
let result;
|
|
247
|
+
switch (name) {
|
|
248
|
+
case "s":
|
|
249
|
+
result = x.sin();
|
|
250
|
+
break;
|
|
251
|
+
case "c":
|
|
252
|
+
result = x.cos();
|
|
253
|
+
break;
|
|
254
|
+
case "a":
|
|
255
|
+
result = x.atan();
|
|
256
|
+
break;
|
|
257
|
+
case "l":
|
|
258
|
+
if (x.lte(0)) throw new Error("Runtime error: l(x) domain error");
|
|
259
|
+
result = x.ln();
|
|
260
|
+
break;
|
|
261
|
+
case "e":
|
|
262
|
+
result = x.exp();
|
|
263
|
+
break;
|
|
264
|
+
default: {
|
|
265
|
+
const n = truncToInt(args[0] ?? ZERO);
|
|
266
|
+
const order = n < 0n ? -n : n;
|
|
267
|
+
const half = x.div(2);
|
|
268
|
+
let term = new D(1);
|
|
269
|
+
for (let i = 1n; i <= order; i++) {
|
|
270
|
+
const pending = tick();
|
|
271
|
+
if (pending) await pending;
|
|
272
|
+
term = term.mul(half).div(i.toString());
|
|
273
|
+
}
|
|
274
|
+
result = term;
|
|
275
|
+
const factor = half.mul(half).neg();
|
|
276
|
+
const epsilon = new D(10).pow(-scale - 16);
|
|
277
|
+
for (let k = 1n; !term.isZero(); k++) {
|
|
278
|
+
const pending = tick();
|
|
279
|
+
if (pending) await pending;
|
|
280
|
+
term = term.mul(factor).div((k * (order + k)).toString());
|
|
281
|
+
result = result.add(term);
|
|
282
|
+
if (term.abs().lt(epsilon) && new D((k * (order + k)).toString()).gt(factor.abs())) break;
|
|
283
|
+
}
|
|
284
|
+
if (n < 0n && order % 2n === 1n) result = result.neg();
|
|
285
|
+
}
|
|
255
286
|
}
|
|
256
|
-
if (
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
function fromNumber(num, scale) {
|
|
260
|
-
if (!Number.isFinite(num)) throw new Error("math domain/range error");
|
|
261
|
-
const clampedScale = Math.min(scale, 30);
|
|
262
|
-
const fixed = num.toFixed(Math.min(clampedScale + 4, 20));
|
|
263
|
-
const dot = fixed.indexOf(".");
|
|
264
|
-
const neg = fixed.startsWith("-");
|
|
265
|
-
const clean = neg ? fixed.slice(1) : fixed;
|
|
266
|
-
const cleanDot = clean.indexOf(".");
|
|
267
|
-
const intPart = cleanDot >= 0 ? clean.slice(0, cleanDot) : clean;
|
|
268
|
-
let fracPart = cleanDot >= 0 ? clean.slice(cleanDot + 1) : "";
|
|
269
|
-
if (fracPart.length < scale) fracPart = fracPart.padEnd(scale, "0");
|
|
270
|
-
else if (fracPart.length > scale) fracPart = fracPart.slice(0, scale);
|
|
271
|
-
void dot;
|
|
272
|
-
const coeff = BigInt(intPart + fracPart || "0");
|
|
273
|
-
return { coeff: neg ? -coeff : coeff, scale };
|
|
274
|
-
}
|
|
275
|
-
function toNumber(val) {
|
|
276
|
-
return Number(formatDecimalInBase(val, 10));
|
|
287
|
+
if (!result.isFinite()) throw new Error("math domain/range error");
|
|
288
|
+
const fixed = result.toFixed(scale, Decimal.ROUND_DOWN);
|
|
289
|
+
return { coeff: BigInt(fixed.split(".").join("")), scale };
|
|
277
290
|
}
|
|
278
291
|
function tokenizeBc(source) {
|
|
279
292
|
const clean = source.replace(/\\\r?\n/gu, "");
|
|
@@ -458,10 +471,9 @@ var BcParser = class {
|
|
|
458
471
|
while (true) {
|
|
459
472
|
const p = this.next();
|
|
460
473
|
if (p?.type !== "id") throw new Error("expected variable name in auto");
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
names.push(p.name ?? "");
|
|
474
|
+
const array = this.matchPunct("[");
|
|
475
|
+
if (array && !this.matchPunct("]")) throw new Error("expected ']' in auto");
|
|
476
|
+
names.push({ name: p.name ?? "", array });
|
|
465
477
|
if (!this.matchPunct(",")) break;
|
|
466
478
|
}
|
|
467
479
|
return { kind: "auto", names };
|
|
@@ -619,7 +631,7 @@ var BcParser = class {
|
|
|
619
631
|
if (t.type === "punct" && (t.value ?? "") === "(") {
|
|
620
632
|
const expr = this.parseExpr();
|
|
621
633
|
if (!this.matchPunct(")")) throw new Error("expected ')'");
|
|
622
|
-
return expr;
|
|
634
|
+
return expr.kind === "assign" ? { ...expr, parenthesized: true } : expr;
|
|
623
635
|
}
|
|
624
636
|
if (t.type === "id") {
|
|
625
637
|
if (this.matchPunct("(")) {
|
|
@@ -661,6 +673,7 @@ function createBcCommand(options = {}) {
|
|
|
661
673
|
description: "Arbitrary-precision calculator language",
|
|
662
674
|
runtimeIdentity: commandRuntimeIdentity,
|
|
663
675
|
async execute(context) {
|
|
676
|
+
context.signal.throwIfAborted();
|
|
664
677
|
try {
|
|
665
678
|
let mathlib = false;
|
|
666
679
|
const files = [];
|
|
@@ -715,6 +728,7 @@ function createBcCommand(options = {}) {
|
|
|
715
728
|
sources.push(decoder.decode(await collectSourceBytes(context.stdin, context.signal, maxInputBytes)));
|
|
716
729
|
} else {
|
|
717
730
|
const raw = await context.fs.readFile(pathPosix.resolve(context.cwd, file));
|
|
731
|
+
context.signal.throwIfAborted();
|
|
718
732
|
if (raw.byteLength > maxInputBytes) throw new Error(`bc program exceeds maximum input size (${maxInputBytes} bytes)`);
|
|
719
733
|
sources.push(decoder.decode(raw));
|
|
720
734
|
}
|
|
@@ -727,7 +741,7 @@ function createBcCommand(options = {}) {
|
|
|
727
741
|
const stmts = new BcParser(tokenizeBc(fullProgram)).parseProgram();
|
|
728
742
|
let scale = mathlib ? 20 : 0;
|
|
729
743
|
let ibase = 10;
|
|
730
|
-
let obase =
|
|
744
|
+
let obase = 10n;
|
|
731
745
|
let last = ZERO;
|
|
732
746
|
const globals = /* @__PURE__ */ new Map();
|
|
733
747
|
const arrays = /* @__PURE__ */ new Map();
|
|
@@ -735,25 +749,48 @@ function createBcCommand(options = {}) {
|
|
|
735
749
|
const callStack = [];
|
|
736
750
|
let steps = 0;
|
|
737
751
|
let outBuffer = "";
|
|
752
|
+
let outputBytes = 0;
|
|
753
|
+
const appendOutput = (text) => {
|
|
754
|
+
if (limits.maxOutputBytes !== Infinity) {
|
|
755
|
+
outputBytes += encoder.encode(text).byteLength;
|
|
756
|
+
if (outputBytes > limits.maxOutputBytes) {
|
|
757
|
+
throw new Error(`output exceeds maximum size (${limits.maxOutputBytes} bytes)`);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
outBuffer += text;
|
|
761
|
+
};
|
|
738
762
|
const tick = () => {
|
|
763
|
+
context.signal.throwIfAborted();
|
|
739
764
|
if (++steps > maxSteps) throw new Error(`bc execution exceeded maximum step limit (${maxSteps})`);
|
|
740
765
|
if ((steps & 4095) === 0) {
|
|
741
766
|
return yieldTurn(context.signal);
|
|
742
767
|
}
|
|
743
768
|
return void 0;
|
|
744
769
|
};
|
|
770
|
+
const getArray = (name) => {
|
|
771
|
+
for (let i = callStack.length - 1; i >= 0; i--) {
|
|
772
|
+
const local = callStack[i].arrays.get(name);
|
|
773
|
+
if (local) return local;
|
|
774
|
+
}
|
|
775
|
+
let array = arrays.get(name);
|
|
776
|
+
if (!array) {
|
|
777
|
+
array = /* @__PURE__ */ new Map();
|
|
778
|
+
arrays.set(name, array);
|
|
779
|
+
}
|
|
780
|
+
return array;
|
|
781
|
+
};
|
|
745
782
|
const getVar = async (name, indexExpr) => {
|
|
746
783
|
if (indexExpr) {
|
|
747
784
|
const idxVal = await evalExpr(indexExpr);
|
|
748
785
|
const key = truncToInt(idxVal).toString(10);
|
|
749
|
-
return
|
|
786
|
+
return getArray(name).get(key) ?? ZERO;
|
|
750
787
|
}
|
|
751
788
|
if (name === "scale") return { coeff: BigInt(scale), scale: 0 };
|
|
752
789
|
if (name === "ibase") return { coeff: BigInt(ibase), scale: 0 };
|
|
753
|
-
if (name === "obase") return { coeff:
|
|
790
|
+
if (name === "obase") return { coeff: obase, scale: 0 };
|
|
754
791
|
if (name === "last") return last;
|
|
755
792
|
for (let i = callStack.length - 1; i >= 0; i--) {
|
|
756
|
-
const frame = callStack[i];
|
|
793
|
+
const frame = callStack[i].scalars;
|
|
757
794
|
if (frame.has(name)) return frame.get(name);
|
|
758
795
|
}
|
|
759
796
|
return globals.get(name) ?? ZERO;
|
|
@@ -762,12 +799,7 @@ function createBcCommand(options = {}) {
|
|
|
762
799
|
if (indexExpr) {
|
|
763
800
|
const idxVal = await evalExpr(indexExpr);
|
|
764
801
|
const key = truncToInt(idxVal).toString(10);
|
|
765
|
-
|
|
766
|
-
if (!map) {
|
|
767
|
-
map = /* @__PURE__ */ new Map();
|
|
768
|
-
arrays.set(name, map);
|
|
769
|
-
}
|
|
770
|
-
map.set(key, val);
|
|
802
|
+
getArray(name).set(key, val);
|
|
771
803
|
return val;
|
|
772
804
|
}
|
|
773
805
|
if (name === "scale") {
|
|
@@ -783,61 +815,19 @@ function createBcCommand(options = {}) {
|
|
|
783
815
|
return { coeff: BigInt(ibase), scale: 0 };
|
|
784
816
|
}
|
|
785
817
|
if (name === "obase") {
|
|
786
|
-
const b =
|
|
787
|
-
if (b <
|
|
788
|
-
|
|
789
|
-
return { coeff: BigInt(obase), scale: 0 };
|
|
790
|
-
}
|
|
791
|
-
if (name === "last") {
|
|
792
|
-
last = val;
|
|
793
|
-
return val;
|
|
794
|
-
}
|
|
795
|
-
for (let i = callStack.length - 1; i >= 0; i--) {
|
|
796
|
-
const frame = callStack[i];
|
|
797
|
-
if (frame.has(name)) {
|
|
798
|
-
frame.set(name, val);
|
|
799
|
-
return val;
|
|
818
|
+
const b = truncToInt(val);
|
|
819
|
+
if (b < 2n || limits.maxObase !== Infinity && b > BigInt(limits.maxObase)) {
|
|
820
|
+
throw new Error(`obase (${b}) out of bounds [2, ${limits.maxObase}]`);
|
|
800
821
|
}
|
|
801
|
-
}
|
|
802
|
-
globals.set(name, val);
|
|
803
|
-
return val;
|
|
804
|
-
};
|
|
805
|
-
const getVarScalarSync = (name) => {
|
|
806
|
-
if (name === "scale") return { coeff: BigInt(scale), scale: 0 };
|
|
807
|
-
if (name === "ibase") return { coeff: BigInt(ibase), scale: 0 };
|
|
808
|
-
if (name === "obase") return { coeff: BigInt(obase), scale: 0 };
|
|
809
|
-
if (name === "last") return last;
|
|
810
|
-
for (let i = callStack.length - 1; i >= 0; i--) {
|
|
811
|
-
const frame = callStack[i];
|
|
812
|
-
if (frame.has(name)) return frame.get(name);
|
|
813
|
-
}
|
|
814
|
-
return globals.get(name) ?? ZERO;
|
|
815
|
-
};
|
|
816
|
-
const setVarScalarSync = (name, val) => {
|
|
817
|
-
if (name === "scale") {
|
|
818
|
-
const s = Number(truncToInt(val));
|
|
819
|
-
if (s < 0 || s > maxScale) throw new Error(`scale (${s}) out of bounds [0, ${maxScale}]`);
|
|
820
|
-
scale = s;
|
|
821
|
-
return { coeff: BigInt(scale), scale: 0 };
|
|
822
|
-
}
|
|
823
|
-
if (name === "ibase") {
|
|
824
|
-
const b = Number(truncToInt(val));
|
|
825
|
-
if (b < 2 || b > 16) throw new Error(`ibase (${b}) must be between 2 and 16`);
|
|
826
|
-
ibase = b;
|
|
827
|
-
return { coeff: BigInt(ibase), scale: 0 };
|
|
828
|
-
}
|
|
829
|
-
if (name === "obase") {
|
|
830
|
-
const b = Number(truncToInt(val));
|
|
831
|
-
if (b < 2 || b > 1e3) throw new Error(`obase (${b}) out of bounds`);
|
|
832
822
|
obase = b;
|
|
833
|
-
return { coeff:
|
|
823
|
+
return { coeff: obase, scale: 0 };
|
|
834
824
|
}
|
|
835
825
|
if (name === "last") {
|
|
836
826
|
last = val;
|
|
837
827
|
return val;
|
|
838
828
|
}
|
|
839
829
|
for (let i = callStack.length - 1; i >= 0; i--) {
|
|
840
|
-
const frame = callStack[i];
|
|
830
|
+
const frame = callStack[i].scalars;
|
|
841
831
|
if (frame.has(name)) {
|
|
842
832
|
frame.set(name, val);
|
|
843
833
|
return val;
|
|
@@ -846,101 +836,6 @@ function createBcCommand(options = {}) {
|
|
|
846
836
|
globals.set(name, val);
|
|
847
837
|
return val;
|
|
848
838
|
};
|
|
849
|
-
const evalExprSync = (expr) => {
|
|
850
|
-
if (steps + 1 >= maxSteps || (steps + 1 & 4095) === 0) return null;
|
|
851
|
-
steps++;
|
|
852
|
-
switch (expr.kind) {
|
|
853
|
-
case "num":
|
|
854
|
-
return parseLiteralInBase(expr.raw, ibase);
|
|
855
|
-
case "str":
|
|
856
|
-
outBuffer += expr.value;
|
|
857
|
-
return ZERO;
|
|
858
|
-
case "var":
|
|
859
|
-
if (expr.index) return null;
|
|
860
|
-
return getVarScalarSync(expr.name);
|
|
861
|
-
case "assign": {
|
|
862
|
-
if (expr.target.index) return null;
|
|
863
|
-
const r = evalExprSync(expr.right);
|
|
864
|
-
if (r === null) return null;
|
|
865
|
-
if (expr.op === "=") return setVarScalarSync(expr.target.name, r);
|
|
866
|
-
const cur = getVarScalarSync(expr.target.name);
|
|
867
|
-
let next;
|
|
868
|
-
if (expr.op === "+=") next = addDec(cur, r);
|
|
869
|
-
else if (expr.op === "-=") next = subDec(cur, r);
|
|
870
|
-
else if (expr.op === "*=") next = mulDec(cur, r, scale);
|
|
871
|
-
else if (expr.op === "/=") next = divDec(cur, r, scale);
|
|
872
|
-
else if (expr.op === "%=") next = modDec(cur, r, scale);
|
|
873
|
-
else next = powDec(cur, r, scale);
|
|
874
|
-
return setVarScalarSync(expr.target.name, next);
|
|
875
|
-
}
|
|
876
|
-
case "unary": {
|
|
877
|
-
if (expr.op === "++" || expr.op === "--") {
|
|
878
|
-
if (expr.arg.kind !== "var" || expr.arg.index) return null;
|
|
879
|
-
const cur = getVarScalarSync(expr.arg.name);
|
|
880
|
-
const next = expr.op === "++" ? addDec(cur, ONE) : subDec(cur, ONE);
|
|
881
|
-
setVarScalarSync(expr.arg.name, next);
|
|
882
|
-
return expr.prefix ? next : cur;
|
|
883
|
-
}
|
|
884
|
-
const v = evalExprSync(expr.arg);
|
|
885
|
-
if (v === null) return null;
|
|
886
|
-
if (expr.op === "-") return { coeff: -v.coeff, scale: v.scale };
|
|
887
|
-
if (expr.op === "+") return v;
|
|
888
|
-
if (expr.op === "!") return isNonZero(v) ? ZERO : ONE;
|
|
889
|
-
return v;
|
|
890
|
-
}
|
|
891
|
-
case "binary": {
|
|
892
|
-
if (expr.op === "&&") {
|
|
893
|
-
const l2 = evalExprSync(expr.left);
|
|
894
|
-
if (l2 === null) return null;
|
|
895
|
-
if (!isNonZero(l2)) return ZERO;
|
|
896
|
-
const r2 = evalExprSync(expr.right);
|
|
897
|
-
if (r2 === null) return null;
|
|
898
|
-
return isNonZero(r2) ? ONE : ZERO;
|
|
899
|
-
}
|
|
900
|
-
if (expr.op === "||") {
|
|
901
|
-
const l2 = evalExprSync(expr.left);
|
|
902
|
-
if (l2 === null) return null;
|
|
903
|
-
if (isNonZero(l2)) return ONE;
|
|
904
|
-
const r2 = evalExprSync(expr.right);
|
|
905
|
-
if (r2 === null) return null;
|
|
906
|
-
return isNonZero(r2) ? ONE : ZERO;
|
|
907
|
-
}
|
|
908
|
-
const l = evalExprSync(expr.left);
|
|
909
|
-
if (l === null) return null;
|
|
910
|
-
const r = evalExprSync(expr.right);
|
|
911
|
-
if (r === null) return null;
|
|
912
|
-
switch (expr.op) {
|
|
913
|
-
case "+":
|
|
914
|
-
return addDec(l, r);
|
|
915
|
-
case "-":
|
|
916
|
-
return subDec(l, r);
|
|
917
|
-
case "*":
|
|
918
|
-
return mulDec(l, r, scale);
|
|
919
|
-
case "/":
|
|
920
|
-
return divDec(l, r, scale);
|
|
921
|
-
case "%":
|
|
922
|
-
return modDec(l, r, scale);
|
|
923
|
-
case "^":
|
|
924
|
-
return powDec(l, r, scale);
|
|
925
|
-
case "==":
|
|
926
|
-
return cmpDec(l, r) === 0 ? ONE : ZERO;
|
|
927
|
-
case "!=":
|
|
928
|
-
return cmpDec(l, r) !== 0 ? ONE : ZERO;
|
|
929
|
-
case "<":
|
|
930
|
-
return cmpDec(l, r) < 0 ? ONE : ZERO;
|
|
931
|
-
case "<=":
|
|
932
|
-
return cmpDec(l, r) <= 0 ? ONE : ZERO;
|
|
933
|
-
case ">":
|
|
934
|
-
return cmpDec(l, r) > 0 ? ONE : ZERO;
|
|
935
|
-
case ">=":
|
|
936
|
-
return cmpDec(l, r) >= 0 ? ONE : ZERO;
|
|
937
|
-
}
|
|
938
|
-
return ZERO;
|
|
939
|
-
}
|
|
940
|
-
default:
|
|
941
|
-
return null;
|
|
942
|
-
}
|
|
943
|
-
};
|
|
944
839
|
const evalExpr = async (expr) => {
|
|
945
840
|
{
|
|
946
841
|
const p = tick();
|
|
@@ -950,7 +845,7 @@ function createBcCommand(options = {}) {
|
|
|
950
845
|
case "num":
|
|
951
846
|
return parseLiteralInBase(expr.raw, ibase);
|
|
952
847
|
case "str":
|
|
953
|
-
|
|
848
|
+
appendOutput(expr.value);
|
|
954
849
|
return ZERO;
|
|
955
850
|
case "var":
|
|
956
851
|
return getVar(expr.name, expr.index);
|
|
@@ -964,7 +859,7 @@ function createBcCommand(options = {}) {
|
|
|
964
859
|
else if (expr.op === "*=") next = mulDec(cur, r, scale);
|
|
965
860
|
else if (expr.op === "/=") next = divDec(cur, r, scale);
|
|
966
861
|
else if (expr.op === "%=") next = modDec(cur, r, scale);
|
|
967
|
-
else next = powDec(cur, r, scale);
|
|
862
|
+
else next = powDec(cur, r, scale, limits.maxExponent);
|
|
968
863
|
return setVar(expr.target.name, expr.target.index, next);
|
|
969
864
|
}
|
|
970
865
|
case "unary": {
|
|
@@ -1008,7 +903,7 @@ function createBcCommand(options = {}) {
|
|
|
1008
903
|
case "%":
|
|
1009
904
|
return modDec(l, r, scale);
|
|
1010
905
|
case "^":
|
|
1011
|
-
return powDec(l, r, scale);
|
|
906
|
+
return powDec(l, r, scale, limits.maxExponent);
|
|
1012
907
|
case "==":
|
|
1013
908
|
return cmpDec(l, r) === 0 ? ONE : ZERO;
|
|
1014
909
|
case "!=":
|
|
@@ -1033,30 +928,17 @@ function createBcCommand(options = {}) {
|
|
|
1033
928
|
if (expr.name === "length") return lengthDec(arg0);
|
|
1034
929
|
if (expr.name === "abs") return { coeff: arg0.coeff < 0n ? -arg0.coeff : arg0.coeff, scale: arg0.scale };
|
|
1035
930
|
if (mathlib) {
|
|
1036
|
-
|
|
1037
|
-
if (
|
|
1038
|
-
if (expr.name === "a") return fromNumber(Math.atan(toNumber(arg0)), scale);
|
|
1039
|
-
if (expr.name === "l") {
|
|
1040
|
-
const x = toNumber(arg0);
|
|
1041
|
-
if (x <= 0) throw new Error("Runtime error: l(x) domain error");
|
|
1042
|
-
return fromNumber(Math.log(x), scale);
|
|
1043
|
-
}
|
|
1044
|
-
if (expr.name === "e") return fromNumber(Math.exp(toNumber(arg0)), scale);
|
|
1045
|
-
if (expr.name === "j") {
|
|
1046
|
-
const nVal = Math.trunc(toNumber(arg0));
|
|
1047
|
-
const xVal = toNumber(args[1] ?? ZERO);
|
|
1048
|
-
if (xVal === 0) return nVal === 0 ? fromNumber(1, scale) : { coeff: 0n, scale };
|
|
1049
|
-
return fromNumber(besselJ(nVal, xVal), scale);
|
|
1050
|
-
}
|
|
931
|
+
const result = await mathValue(expr.name, args, scale, tick);
|
|
932
|
+
if (result) return result;
|
|
1051
933
|
}
|
|
1052
934
|
const fn = funcs.get(expr.name);
|
|
1053
935
|
if (!fn) throw new Error(`Function ${expr.name} not defined.`);
|
|
1054
|
-
if (callStack.length >=
|
|
936
|
+
if (callStack.length >= limits.maxRecursionDepth) throw new Error(`bc function recursion depth exceeded (${limits.maxRecursionDepth})`);
|
|
1055
937
|
const frame = /* @__PURE__ */ new Map();
|
|
1056
938
|
for (let i = 0; i < fn.params.length; i++) {
|
|
1057
939
|
frame.set(fn.params[i], args[i] ?? ZERO);
|
|
1058
940
|
}
|
|
1059
|
-
callStack.push(frame);
|
|
941
|
+
callStack.push({ scalars: frame, arrays: /* @__PURE__ */ new Map() });
|
|
1060
942
|
try {
|
|
1061
943
|
await execStmt(fn.body);
|
|
1062
944
|
return ZERO;
|
|
@@ -1083,8 +965,10 @@ function createBcCommand(options = {}) {
|
|
|
1083
965
|
case "auto": {
|
|
1084
966
|
const frame = callStack.at(-1);
|
|
1085
967
|
if (frame) {
|
|
1086
|
-
for (const name of stmt.names) {
|
|
1087
|
-
if (
|
|
968
|
+
for (const { name, array } of stmt.names) {
|
|
969
|
+
if (array) {
|
|
970
|
+
if (!frame.arrays.has(name)) frame.arrays.set(name, /* @__PURE__ */ new Map());
|
|
971
|
+
} else if (!frame.scalars.has(name)) frame.scalars.set(name, ZERO);
|
|
1088
972
|
}
|
|
1089
973
|
}
|
|
1090
974
|
return;
|
|
@@ -1133,11 +1017,11 @@ function createBcCommand(options = {}) {
|
|
|
1133
1017
|
case "print":
|
|
1134
1018
|
for (const item of stmt.items) {
|
|
1135
1019
|
if (item.kind === "str") {
|
|
1136
|
-
|
|
1020
|
+
appendOutput(item.value);
|
|
1137
1021
|
} else {
|
|
1138
1022
|
const v = await evalExpr(item);
|
|
1139
1023
|
last = v;
|
|
1140
|
-
|
|
1024
|
+
appendOutput(formatDecimalInBase(v, obase));
|
|
1141
1025
|
}
|
|
1142
1026
|
}
|
|
1143
1027
|
return;
|
|
@@ -1151,13 +1035,13 @@ function createBcCommand(options = {}) {
|
|
|
1151
1035
|
throw new FlowSignal("halt");
|
|
1152
1036
|
case "expr": {
|
|
1153
1037
|
if (stmt.expr.kind === "str") {
|
|
1154
|
-
|
|
1038
|
+
appendOutput(stmt.expr.value);
|
|
1155
1039
|
return;
|
|
1156
1040
|
}
|
|
1157
1041
|
const val = await evalExpr(stmt.expr);
|
|
1158
|
-
if (stmt.expr.kind !== "assign") {
|
|
1042
|
+
if (stmt.expr.kind !== "assign" || stmt.expr.parenthesized) {
|
|
1159
1043
|
last = val;
|
|
1160
|
-
|
|
1044
|
+
appendOutput(formatDecimalInBase(val, obase) + "\n");
|
|
1161
1045
|
}
|
|
1162
1046
|
return;
|
|
1163
1047
|
}
|
|
@@ -1165,25 +1049,6 @@ function createBcCommand(options = {}) {
|
|
|
1165
1049
|
};
|
|
1166
1050
|
try {
|
|
1167
1051
|
for (const s of stmts) {
|
|
1168
|
-
if (s.kind === "expr" && (steps & 4095) < 4060 && steps + 32 < maxSteps) {
|
|
1169
|
-
const savedSteps = steps;
|
|
1170
|
-
const savedOutLen = outBuffer.length;
|
|
1171
|
-
steps++;
|
|
1172
|
-
if (s.expr.kind === "str") {
|
|
1173
|
-
outBuffer += s.expr.value;
|
|
1174
|
-
continue;
|
|
1175
|
-
}
|
|
1176
|
-
const syncVal = evalExprSync(s.expr);
|
|
1177
|
-
if (syncVal !== null) {
|
|
1178
|
-
if (s.expr.kind !== "assign") {
|
|
1179
|
-
last = syncVal;
|
|
1180
|
-
outBuffer += formatDecimalInBase(syncVal, obase) + "\n";
|
|
1181
|
-
}
|
|
1182
|
-
continue;
|
|
1183
|
-
}
|
|
1184
|
-
steps = savedSteps;
|
|
1185
|
-
outBuffer = outBuffer.slice(0, savedOutLen);
|
|
1186
|
-
}
|
|
1187
1052
|
await execStmt(s);
|
|
1188
1053
|
}
|
|
1189
1054
|
} catch (sig) {
|
|
@@ -1191,15 +1056,20 @@ function createBcCommand(options = {}) {
|
|
|
1191
1056
|
throw sig;
|
|
1192
1057
|
}
|
|
1193
1058
|
}
|
|
1059
|
+
context.signal.throwIfAborted();
|
|
1194
1060
|
if (outBuffer.length > 0) {
|
|
1195
1061
|
await writeText(context.stdout, outBuffer);
|
|
1062
|
+
context.signal.throwIfAborted();
|
|
1196
1063
|
}
|
|
1197
1064
|
return { exitCode: 0 };
|
|
1198
1065
|
} catch (err) {
|
|
1066
|
+
context.signal.throwIfAborted();
|
|
1067
|
+
if (err instanceof Error && err.name === "AbortError") throw err;
|
|
1199
1068
|
const msg = err instanceof Error ? err.message : String(err);
|
|
1200
1069
|
const code = err instanceof UsageError ? 2 : 1;
|
|
1201
1070
|
await writeText(context.stderr, `bc: ${msg}
|
|
1202
1071
|
`);
|
|
1072
|
+
context.signal.throwIfAborted();
|
|
1203
1073
|
return { exitCode: code };
|
|
1204
1074
|
}
|
|
1205
1075
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createColumnCommand
|
|
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-K543PB3I.js";
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-FZTK4MFI.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-LAOM65EE.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-4OOUQTQO.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-G66QUHIZ.js";
|
|
8
7
|
import "../safe-bash/command-chunks/chunk-AHEQ2THG.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-MTQH74CF.js";
|
|
9
9
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
10
10
|
export {
|
|
11
11
|
createColumnCommand
|
|
@@ -8,4 +8,4 @@ export declare function widthOf(point: number): number;
|
|
|
8
8
|
export declare function validateScalar(character: string, allowTab?: boolean): void;
|
|
9
9
|
export declare function cell(text: string, budget: ColumnBudget): Cell | Promise<Cell>;
|
|
10
10
|
export declare function decode(bytes: Uint8Array): string;
|
|
11
|
-
export declare function fields(text: string, separator: Set<string> | undefined, budget: ColumnBudget, remainingCells: number, columnLimit?: number, outputSeparatorBytes?: number):
|
|
11
|
+
export declare function fields(text: string, separator: Set<string> | undefined, budget: ColumnBudget, remainingCells: number, columnLimit?: number, outputSeparatorBytes?: number): Promise<string[]>;
|