@poe-platform/safe-bash 0.1.800 → 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 +16 -5
- package/dist/image-ast/index.browser.js +119 -75
- package/dist/image-ast/index.js +119 -75
- package/dist/pdf-ast/index.js +4 -3
- package/dist/safe-bash/chunks/{chunk-LUOFIVNI.js → chunk-3NDIFSNM.js} +3 -3
- package/dist/safe-bash/chunks/{chunk-4SEW2Q6H.js → chunk-3R3AANOR.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-HHW7MGS2.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-RMWLWH7Q.js → chunk-7VNF5BFF.js} +300 -737
- package/dist/safe-bash/chunks/{chunk-QVSRRNZT.js → chunk-A7XEHALN.js} +4 -4
- 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-BHJE5LPZ.js → chunk-D3ANYGMC.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-NLAW7KDI.js → chunk-E7OYNDGL.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-SOZK5JVX.js → chunk-FBUCWVTE.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-RKKRJ54E.js → chunk-FNDNHAGE.js} +30 -23
- package/dist/safe-bash/chunks/{chunk-KCVSVD65.js → chunk-I5HZ4FGE.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-JJSTTIEZ.js → chunk-ICFDYV64.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-TYD7EVUJ.js → chunk-IVRQ4BXL.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-KV7PKOHV.js → chunk-IWDICZVK.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-I4OAEOP6.js → chunk-J42RIHHJ.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-K2VCOJ2B.js → chunk-K6VCD7IY.js} +7 -12
- package/dist/safe-bash/chunks/{chunk-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-TFGRKY43.js → chunk-OQRVVGR6.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-PPYM75Z3.js → chunk-OV6IHKO6.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-KW24TAIU.js → chunk-PQRAK7HU.js} +920 -432
- package/dist/safe-bash/chunks/{chunk-K4YMYFRJ.js → chunk-SZH7EJLD.js} +116 -697
- package/dist/safe-bash/chunks/{chunk-7YSRXFEG.js → chunk-TFIBK2GI.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-I7L3G3NX.js → chunk-UE5KZDEK.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-QU3BVQ53.js → chunk-UTBUUFDM.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-JTLSUJ7V.js → chunk-VQDD3G76.js} +42 -25
- package/dist/safe-bash/chunks/{chunk-46UISJCK.js → chunk-VTH3MLDU.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-LLZCZ24K.js → chunk-XVOSKJE2.js} +1 -1
- package/dist/safe-bash/chunks/{csvkit-QGP3GAOB.js → csvkit-TACDU7FC.js} +3 -3
- package/dist/safe-bash/chunks/{ffmpeg-JTVH26MK.js → ffmpeg-WTC3TEFI.js} +2 -2
- package/dist/safe-bash/chunks/{gh-I7QX7N5C.js → gh-6WU6PXL4.js} +2 -2
- package/dist/safe-bash/chunks/{git-MA7NKYVP.js → git-EFZIGJW4.js} +2 -2
- package/dist/safe-bash/chunks/{imagemagick-Y4NPWX2Q.js → imagemagick-EIEYGWPF.js} +2 -2
- package/dist/safe-bash/chunks/{implementation-BWDKOVQJ.js → implementation-MLFHUQ5M.js} +2 -2
- package/dist/safe-bash/chunks/{mmdc-44PELHDG.js → mmdc-ROQJT5HQ.js} +2 -2
- package/dist/safe-bash/chunks/{pdfimages-635TRW4Q.js → pdfimages-DW7LWXFI.js} +2 -2
- package/dist/safe-bash/chunks/{pdfinfo-FSDAA2KY.js → pdfinfo-TIP6XLUQ.js} +2 -2
- package/dist/safe-bash/chunks/{pdftk-GQ5UH3VG.js → pdftk-DMG22ITZ.js} +2 -2
- package/dist/safe-bash/chunks/{pdftoppm-YTXQCAYT.js → pdftoppm-WNDYR72T.js} +2 -2
- package/dist/safe-bash/chunks/{pdftotext-CVA2G7FY.js → pdftotext-5IPZ4NI7.js} +2 -2
- package/dist/safe-bash/chunks/{qpdf-HZMIFG4A.js → qpdf-TTX2DIUA.js} +2 -2
- package/dist/safe-bash/chunks/{sips-E7UBDP33.js → sips-XYS46JPJ.js} +2 -2
- package/dist/safe-bash/chunks/{soffice-ELASUWUK.js → soffice-TU73E5KL.js} +2 -2
- package/dist/safe-bash/chunks/{wkhtmltopdf-EPO6YCMG.js → wkhtmltopdf-FSZ2CHGE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-QBGA56UH.js → chunk-2ELYGJDD.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-52PCQXD2.js → chunk-2NHI5F5S.js} +2 -1
- package/dist/safe-bash/command-chunks/{chunk-HDKVO47G.js → chunk-2SQEIUGJ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-5LSGEIZY.js → chunk-3HHCU5YU.js} +4 -3
- package/dist/safe-bash/command-chunks/{chunk-TF6OA2GK.js → chunk-3NV3HYT2.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2QHG43WJ.js → chunk-4BB2SWJ5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IEXHHNOF.js → chunk-4J5CZ2DP.js} +2 -7
- package/dist/safe-bash/command-chunks/{chunk-WDHI3S6Y.js → chunk-4OOUQTQO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-YMONDXET.js → chunk-4ZQWGOZB.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-L6DVEBW3.js → chunk-5BSTFCXG.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-Q3DII3Q7.js → chunk-5PWJG2UK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-JMPP4TCW.js → chunk-5UBXNSFZ.js} +3 -2
- package/dist/safe-bash/command-chunks/{chunk-3NG75MOB.js → chunk-67GQA75T.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-L6SU4S26.js → chunk-6B7WQIKB.js} +0 -7
- package/dist/safe-bash/command-chunks/{chunk-V6MSPQLA.js → chunk-6BNTBWIK.js} +4 -39
- package/dist/safe-bash/command-chunks/{chunk-JN7WIP6S.js → chunk-6KJ3LPI2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HLDTOR7M.js → chunk-6ZVI7LUY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-X6NJC3IC.js → chunk-75OFBY5R.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-MRW5HD2D.js → chunk-7O3E4LPT.js} +4 -22
- package/dist/safe-bash/command-chunks/{chunk-TEVJJPTC.js → chunk-7U7EXOXX.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-6CYTRQ24.js → chunk-7VTKQUA5.js} +20 -17
- package/dist/safe-bash/command-chunks/{chunk-BZPAWTUL.js → chunk-AEF5BA3D.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-63R3FEZJ.js → chunk-AIV5BF5W.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-AYUTO323.js → chunk-AKJG2XD3.js} +2 -18
- package/dist/safe-bash/command-chunks/{chunk-J34TZVMW.js → chunk-ALDC4XP4.js} +0 -5
- package/dist/safe-bash/command-chunks/{chunk-CKXV2CLD.js → chunk-ARBYOQUZ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-44AHAB5O.js → chunk-BDSMROQZ.js} +1 -4
- package/dist/safe-bash/command-chunks/{chunk-53P53XFM.js → chunk-BPE5INLI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-OT4LZMLB.js → chunk-BR73BIOW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WB5SVIG7.js → chunk-C5YYCQHW.js} +498 -88
- package/dist/safe-bash/command-chunks/{chunk-EUSPTFAX.js → chunk-CAP7ZJSY.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-DWFLVJC6.js → chunk-CCRHMAU5.js} +2 -1
- package/dist/safe-bash/command-chunks/{chunk-GI4CJED2.js → chunk-CQTRW45K.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-N2F74VRO.js → chunk-CZ7EN3JG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KKG4BAFZ.js → chunk-DIEPXUM4.js} +6 -0
- package/dist/safe-bash/command-chunks/{chunk-QJAFJP2G.js → chunk-DZCY63VJ.js} +12 -10
- package/dist/safe-bash/command-chunks/{chunk-QUENU6GM.js → chunk-E55UKBIE.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-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-E2LB7FRT.js → chunk-FXOA7RBK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QWIDNAAK.js → chunk-FZTK4MFI.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-K543PB3I.js → chunk-G66QUHIZ.js} +6 -35
- package/dist/safe-bash/command-chunks/{chunk-YJDV76GL.js → chunk-GFQZCKO6.js} +29 -19
- package/dist/safe-bash/command-chunks/{chunk-FKKB5X5V.js → chunk-GOB777HR.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IYPAQ7PH.js → chunk-GRBWW4SG.js} +6 -0
- package/dist/safe-bash/command-chunks/{chunk-PPNBNFAU.js → chunk-GYQ2HAKQ.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-PJJUYO3R.js → chunk-II77KPZN.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-VL67NWNS.js → chunk-JDYXY44P.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4QJOYXVB.js → chunk-JV7LBUTP.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IKS2YXZQ.js → chunk-K67MWWWH.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-BKCNF5U3.js → chunk-KQLD3AED.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-UMDIOL3O.js → chunk-KXU3IRUO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QZF3SINC.js → chunk-LAOM65EE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HFII3QYO.js → chunk-LWS62ISU.js} +46 -32
- package/dist/safe-bash/command-chunks/{chunk-BZDDAPSV.js → chunk-LWSBAWLT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-U6G67N23.js → chunk-MIXBO6U7.js} +18 -5
- package/dist/safe-bash/command-chunks/{chunk-JQ74HC37.js → chunk-MQFIPHIQ.js} +23 -50
- package/dist/safe-bash/command-chunks/{chunk-ZJBR5Q5I.js → chunk-MSFXC3OC.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-NI7MKJPN.js → chunk-MTQH74CF.js} +3 -55
- package/dist/safe-bash/command-chunks/chunk-MWUZZWXK.js +354 -0
- package/dist/safe-bash/command-chunks/{chunk-RVLO4DYT.js → chunk-N4PFUSRM.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-D4OP2BR3.js → chunk-NKFYQSES.js} +1 -2
- package/dist/safe-bash/command-chunks/{chunk-NGWB2YBL.js → chunk-O4JQSB7O.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-7L24L4UO.js → chunk-OQU6UT6X.js} +2 -20
- package/dist/safe-bash/command-chunks/{chunk-TYCGMRLM.js → chunk-OYYV7ZAF.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-SVULUDOP.js → chunk-P2N33UMN.js} +20 -81
- package/dist/safe-bash/command-chunks/{chunk-Q7Q5GM5S.js → chunk-P5APDEFB.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-SAMH7SQE.js → chunk-PCEFOYA3.js} +237 -145
- package/dist/safe-bash/command-chunks/{chunk-3HXDA5PT.js → chunk-PMBFZXTK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4Y3WVMK4.js → chunk-PV66YWHB.js} +1 -0
- package/dist/safe-bash/command-chunks/{chunk-AXK3H4PX.js → chunk-QJ33BHI4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3LSOYLNV.js → chunk-QKFSRZGQ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-JZSNU2MY.js → chunk-QKJLP53H.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-LC2MFKT4.js → chunk-RMWQAAO5.js} +24 -25
- package/dist/safe-bash/command-chunks/{chunk-QDTBMSBE.js → chunk-RO62EWX6.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4C6QI5BQ.js → chunk-RZZI24ZE.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-PFAADCB5.js → chunk-SDNBCQ3X.js} +10 -24
- package/dist/safe-bash/command-chunks/{chunk-36O5OT7E.js → chunk-T35Y7YQD.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-6HMX4CQS.js → chunk-TGSNCQSR.js} +44 -16
- package/dist/safe-bash/command-chunks/{chunk-5T7CRJHW.js → chunk-TIOCQVUQ.js} +4 -7
- package/dist/safe-bash/command-chunks/{chunk-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-7RGB363W.js → chunk-TSCGT46G.js} +3 -2
- package/dist/safe-bash/command-chunks/{chunk-KBEURXFF.js → chunk-UN6WS55J.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-SX2X3IH4.js → chunk-V2V5OCL3.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ERYJLO6G.js → chunk-V7A7DRTU.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5SHGJ7NO.js → chunk-VA5ZHYYA.js} +73 -33
- package/dist/safe-bash/command-chunks/{chunk-XETLEHZP.js → chunk-VPR5LQYX.js} +3 -2
- package/dist/safe-bash/command-chunks/{chunk-3DT2YOGW.js → chunk-VSRGNQCP.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-J5SN3PZ3.js → chunk-VXSLJH7G.js} +53 -3
- package/dist/safe-bash/command-chunks/{chunk-PXYOWWMV.js → chunk-W7RAD4EW.js} +4 -3
- package/dist/safe-bash/command-chunks/{chunk-YGC6OS5O.js → chunk-WECIOOQB.js} +5 -8
- package/dist/safe-bash/command-chunks/{chunk-HHP343KT.js → chunk-WTECBRU4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-AO6Z5EQ7.js → chunk-WVE64WM2.js} +6 -5
- package/dist/safe-bash/command-chunks/{chunk-Z7RVSD5K.js → chunk-WVHONVZ4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QNIMV57G.js → chunk-XNLFHHOC.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XAFSZDY2.js → chunk-XS72HTMA.js} +11 -0
- package/dist/safe-bash/command-chunks/{chunk-KYSPGS33.js → chunk-YIQACGEW.js} +2 -0
- package/dist/safe-bash/command-chunks/{chunk-NAY27PXB.js → chunk-YOFC45RK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QI7LGHJJ.js → chunk-Z45N42QC.js} +21 -6
- package/dist/safe-bash/command-chunks/{chunk-67IQF5GC.js → chunk-ZYHTWNAE.js} +23 -9
- package/dist/safe-bash/command-chunks/{chunk-STC3LEWJ.js → chunk-ZYXH3B66.js} +5 -3
- package/dist/safe-bash/commands/bytes/compression/index.js +3 -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/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/getopt/index.browser.js +2 -2
- 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/llm/index.browser.js +2 -2
- package/dist/safe-bash/commands/llm/providers/index.browser.js +1 -1
- package/dist/safe-bash/commands/mdq/index.browser.js +3 -3
- package/dist/safe-bash/commands/media/index.browser.js +1 -1
- package/dist/safe-bash/commands/network/curl.d.ts +1 -1
- package/dist/safe-bash/commands/network/curl.js +1 -3
- package/dist/safe-bash/commands/network/index.browser.js +4 -4
- package/dist/safe-bash/commands/network/platform-portable.d.ts +1 -5
- package/dist/safe-bash/commands/network/platform-portable.js +1 -26
- package/dist/safe-bash/commands/network/public.d.ts +2 -2
- package/dist/safe-bash/commands/network/public.js +2 -2
- package/dist/safe-bash/commands/network/transport.js +2 -2
- package/dist/safe-bash/commands/network/wget.d.ts +1 -1
- package/dist/safe-bash/commands/network/wget.js +1 -3
- package/dist/safe-bash/commands/node/filesystem.js +3 -2
- package/dist/safe-bash/commands/node/index.browser.js +8 -8
- package/dist/safe-bash/commands/node/types.js +1 -1
- package/dist/safe-bash/commands/op/index.browser.js +3 -3
- package/dist/safe-bash/commands/pr/index.browser.js +2 -2
- package/dist/safe-bash/commands/python/host-capabilities.js +31 -14
- package/dist/safe-bash/commands/python/index.browser.js +11 -11
- package/dist/safe-bash/commands/python/manifest.d.ts +1 -0
- package/dist/safe-bash/commands/python/manifest.js +6 -3
- package/dist/safe-bash/commands/python/shell-capability.d.ts +1 -0
- package/dist/safe-bash/commands/python/shell-capability.js +3 -2
- package/dist/safe-bash/commands/python/worker.browser.js +3 -3
- package/dist/safe-bash/commands/regex-execution/public.browser.js +4 -4
- package/dist/safe-bash/commands/safejs/runtime.js +16 -7
- 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/text.js +268 -364
- package/dist/safe-bash/commands/tsort/index.browser.js +2 -2
- package/dist/safe-bash/commands/xml/index.browser.js +2 -2
- package/dist/safe-bash/commands/yq/index.browser.js +2 -2
- package/dist/safe-bash/core.browser.js +1 -1
- package/dist/safe-bash/core.d.ts +6 -1
- package/dist/safe-bash/core.js +1 -1
- package/dist/safe-bash/full-core.browser.js +108 -104
- package/dist/safe-bash/jobs.browser.js +5 -5
- package/dist/safe-bash/opt-in/commands/dd/index.js +2 -0
- package/dist/safe-bash/opt-in/optional/commands/shuf/options.d.ts +1 -0
- package/dist/safe-bash/opt-in/optional/commands/shuf/options.js +2 -4
- package/dist/safe-bash/opt-in/optional/commands/shuf/shuf.js +2 -1
- package/dist/safe-bash/optional-host.browser.js +11 -11
- 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 -27
- package/dist/safe-bash/registry-entry.browser.js +28 -28
- package/dist/safe-bash/shell/arrays/bindings.js +1 -1
- package/dist/safe-bash/shell/arrays/state.js +4 -0
- package/dist/safe-bash/shell/brace-expansion.js +1 -1
- package/dist/safe-bash/shell/dynamic-variables.d.ts +10 -0
- package/dist/safe-bash/shell/dynamic-variables.js +25 -0
- package/dist/safe-bash/shell/parser.js +8 -1
- package/dist/safe-bash/shell/runtime.d.ts +4 -4
- package/dist/safe-bash/shell/runtime.js +291 -741
- package/dist/safe-bash/shell/shell.js +2 -31
- package/dist/safe-bash/shell-entry.browser.js +25 -25
- package/dist/safe-bash/trap.browser.js +4 -4
- package/dist/safe-bash/yq-browser/index.js +1 -1
- package/dist/safe-bash-base-encoding-engine/base.js +2 -2
- package/dist/safe-bash-base-encoding-engine/shared.js +1 -1
- package/dist/safe-bash-byte-input-engine/index.d.ts +3 -2
- package/dist/safe-bash-byte-input-engine/index.js +4 -1
- package/dist/safe-bash-checksum-engine/index.js +13 -6
- package/dist/safe-bash-command-apply-patch/apply.d.ts +1 -1
- package/dist/safe-bash-command-apply-patch/apply.js +4 -3
- package/dist/safe-bash-command-apply-patch/index.js +3 -3
- package/dist/safe-bash-command-apply-patch/matcher.js +1 -1
- package/dist/safe-bash-command-apply-patch/parser.js +1 -1
- package/dist/safe-bash-command-awk/awk-inspection.js +2 -2
- package/dist/safe-bash-command-awk/awk-runtime.js +3 -3
- package/dist/safe-bash-command-awk/awk-syntax.d.ts +1 -1
- package/dist/safe-bash-command-awk/awk-syntax.js +2 -2
- package/dist/safe-bash-command-awk/awk-values.js +1 -1
- package/dist/safe-bash-command-awk/awk.js +5 -5
- package/dist/safe-bash-command-awk/index.js +5 -5
- package/dist/safe-bash-command-bc/index.d.ts +2 -0
- package/dist/safe-bash-command-bc/index.js +123 -92
- package/dist/safe-bash-command-column/column.js +5 -5
- package/dist/safe-bash-command-column/display.d.ts +1 -1
- package/dist/safe-bash-command-column/display.js +1 -1
- package/dist/safe-bash-command-column/index.js +5 -5
- package/dist/safe-bash-command-column/internal.d.ts +0 -2
- package/dist/safe-bash-command-column/internal.js +1 -1
- package/dist/safe-bash-command-column/layout.js +4 -4
- package/dist/safe-bash-command-column/table.js +2 -2
- package/dist/safe-bash-command-comm/comm.js +1 -1
- package/dist/safe-bash-command-comm/index.js +1 -1
- package/dist/safe-bash-command-csvcut/index.d.ts +1 -0
- package/dist/safe-bash-command-csvcut/index.js +1 -0
- package/dist/safe-bash-command-csvgrep/index.d.ts +1 -0
- package/dist/safe-bash-command-csvgrep/index.js +2 -2
- package/dist/safe-bash-command-csvkit/index.js +9 -9
- package/dist/safe-bash-command-csvkit/sync-support.js +1 -1
- package/dist/safe-bash-command-curl/curl.js +1 -1
- package/dist/safe-bash-command-curl/index.js +1 -1
- package/dist/safe-bash-command-dd/index.js +2 -0
- package/dist/safe-bash-command-diff/diff.js +1 -1
- package/dist/safe-bash-command-diff/index.js +1 -1
- package/dist/safe-bash-command-exiftool/index.d.ts +1 -0
- package/dist/safe-bash-command-fd/index.js +9 -9
- package/dist/safe-bash-command-ffmpeg/index.js +31 -8
- package/dist/safe-bash-command-file/index.js +1 -1
- package/dist/safe-bash-command-file/shared.js +1 -1
- package/dist/safe-bash-command-find/find.js +1 -1
- package/dist/safe-bash-command-find/index.js +1 -1
- package/dist/safe-bash-command-gzip/index.js +3 -2
- package/dist/safe-bash-command-hexdump/command.js +4 -4
- package/dist/safe-bash-command-hexdump/custom.d.ts +24 -0
- package/dist/safe-bash-command-hexdump/index.js +4 -4
- package/dist/safe-bash-command-hexdump/internal.d.ts +2 -0
- package/dist/safe-bash-command-hexdump/internal.js +1 -1
- package/dist/safe-bash-command-hexdump/io.js +2 -2
- package/dist/safe-bash-command-hexdump/options.d.ts +3 -0
- package/dist/safe-bash-command-hexdump/options.js +2 -2
- package/dist/safe-bash-command-hostname/index.js +1 -1
- package/dist/safe-bash-command-html-to-markdown/budget.js +1 -1
- package/dist/safe-bash-command-html-to-markdown/entities.js +3 -3
- package/dist/safe-bash-command-html-to-markdown/index.js +6 -6
- package/dist/safe-bash-command-html-to-markdown/input.js +5 -5
- package/dist/safe-bash-command-html-to-markdown/parser.d.ts +1 -0
- package/dist/safe-bash-command-html-to-markdown/parser.js +4 -4
- package/dist/safe-bash-command-html-to-markdown/render.js +5 -5
- package/dist/safe-bash-command-html-to-markdown/text.js +2 -2
- package/dist/safe-bash-command-htmlq/index.d.ts +1 -0
- package/dist/safe-bash-command-htmlq/index.js +27 -9
- package/dist/safe-bash-command-iconv/codec.js +1 -1
- package/dist/safe-bash-command-iconv/command.js +2 -2
- package/dist/safe-bash-command-iconv/index.js +2 -2
- package/dist/safe-bash-command-imagemagick/index.js +24 -6
- package/dist/safe-bash-command-join/index.js +1 -1
- package/dist/safe-bash-command-join/join.js +1 -1
- package/dist/safe-bash-command-jq/index.js +1 -1
- package/dist/safe-bash-command-jq/jq.js +1 -1
- package/dist/safe-bash-command-less/index.js +43 -28
- package/dist/safe-bash-command-mmdc/index.d.ts +1 -0
- package/dist/safe-bash-command-numfmt/index.js +0 -11
- package/dist/safe-bash-command-od/index.js +101 -68
- package/dist/safe-bash-command-pandoc/command.js +1 -1
- package/dist/safe-bash-command-pandoc/index.js +1 -1
- package/dist/safe-bash-command-paste/index.js +1 -1
- package/dist/safe-bash-command-paste/paste.js +1 -1
- package/dist/safe-bash-command-pathchk/index.js +3 -13
- package/dist/safe-bash-command-pdfimages/index.js +27 -11
- package/dist/safe-bash-command-pdfinfo/index.js +19 -10
- package/dist/safe-bash-command-pdftk/index.js +3 -3
- package/dist/safe-bash-command-pdftoppm/index.js +26 -10
- package/dist/safe-bash-command-pdftotext/index.js +27 -13
- package/dist/safe-bash-command-qpdf/index.js +5 -5
- package/dist/safe-bash-command-sed/index.js +1 -1
- package/dist/safe-bash-command-sed/sed.js +1 -1
- package/dist/safe-bash-command-shuf/options.d.ts +1 -0
- package/dist/safe-bash-command-shuf/options.js +2 -4
- package/dist/safe-bash-command-shuf/shuf.js +2 -1
- package/dist/safe-bash-command-soffice/index.js +20 -16
- package/dist/safe-bash-command-split/index.js +3 -3
- package/dist/safe-bash-command-split/io.js +1 -1
- package/dist/safe-bash-command-split/outputs.js +2 -2
- package/dist/safe-bash-command-split/split.js +3 -3
- package/dist/safe-bash-command-sqlite3/btree.d.ts +1 -0
- package/dist/safe-bash-command-sqlite3/engine.d.ts +6 -0
- package/dist/safe-bash-command-sqlite3/index.js +284 -85
- package/dist/safe-bash-command-ssconvert/commands.js +9 -9
- package/dist/safe-bash-command-ssconvert/core.js +8 -8
- package/dist/safe-bash-command-ssconvert/formats/csv.js +9 -9
- package/dist/safe-bash-command-ssconvert/formats/ods.js +8 -8
- package/dist/safe-bash-command-ssconvert/formats/spreadsheetml.js +2 -2
- package/dist/safe-bash-command-ssconvert/formats/xls.js +9 -9
- package/dist/safe-bash-command-ssconvert/formats/xlsx.js +8 -8
- package/dist/safe-bash-command-ssconvert/index.js +20 -20
- package/dist/safe-bash-command-tar/extract.js +1 -1
- package/dist/safe-bash-command-tar/index.js +5 -4
- package/dist/safe-bash-command-tar/modes.js +2 -2
- package/dist/safe-bash-command-tree/arguments.js +3 -3
- package/dist/safe-bash-command-tree/charset.js +1 -1
- package/dist/safe-bash-command-tree/index.js +4 -4
- package/dist/safe-bash-command-tree/io.js +1 -1
- package/dist/safe-bash-command-tree/pattern.js +2 -2
- package/dist/safe-bash-command-tree/tree.js +4 -4
- package/dist/safe-bash-command-unrtf/index.js +14 -7
- package/dist/safe-bash-command-unzip/index.js +1 -1
- package/dist/safe-bash-command-unzip/unzip.js +1 -1
- package/dist/safe-bash-command-wget/index.js +1 -1
- package/dist/safe-bash-command-wget/wget.js +1 -1
- package/dist/safe-bash-command-xan/argv.d.ts +1 -1
- package/dist/safe-bash-command-xan/argv.js +1 -1
- package/dist/safe-bash-command-xan/commands.js +5 -3
- package/dist/safe-bash-command-xan/csv.d.ts +1 -1
- package/dist/safe-bash-command-xan/csv.js +1 -1
- package/dist/safe-bash-command-xan/index.js +7 -7
- package/dist/safe-bash-command-xan/io.js +3 -3
- package/dist/safe-bash-command-xmllint/index.js +1 -1
- package/dist/safe-bash-command-xxd/index.js +105 -91
- package/dist/safe-bash-command-xz/command.d.ts +2 -0
- package/dist/safe-bash-command-xz/index.d.ts +1 -1
- package/dist/safe-bash-command-xz/index.js +8 -0
- package/dist/safe-bash-command-yq/query.js +1 -1
- package/dist/safe-bash-command-zip/index.js +1 -1
- package/dist/safe-bash-command-zip/zip.js +1 -1
- package/dist/safe-bash-contracts/escaping.js +3 -3
- package/dist/safe-bash-contracts/filesystem-output.js +2 -2
- package/dist/safe-bash-contracts/index.d.ts +1 -0
- package/dist/safe-bash-contracts/index.js +7 -3
- package/dist/safe-bash-contracts/io.d.ts +4 -1
- package/dist/safe-bash-contracts/io.js +3 -1
- package/dist/safe-bash-contracts/managed-abort.d.ts +10 -0
- package/dist/safe-bash-contracts/output.js +2 -2
- package/dist/safe-bash-diff-engine/index.js +1 -1
- package/dist/safe-bash-diff-engine/shared.d.ts +3 -2
- package/dist/safe-bash-diff-engine/shared.js +1 -1
- package/dist/safe-bash-io-engine/commands/archive/internal.js +5 -23
- package/dist/safe-bash-io-engine/commands/search/requirements.js +2 -2
- package/dist/safe-bash-io-engine/commands/text-programs/shared.js +33 -44
- package/dist/safe-bash-io-engine/internal.js +1 -1
- package/dist/safe-bash-io-engine/shell/pattern.js +1 -1
- package/dist/safe-bash-io-engine/shell/string-operations.js +1 -1
- package/dist/safe-bash-mcp/index.browser.d.ts +155 -35
- package/dist/safe-bash-mcp/index.browser.js +416 -0
- package/dist/safe-bash-mcp/index.d.ts +54 -2
- package/dist/safe-bash-mcp/index.js +283 -89
- package/dist/safe-bash-network-engine/aggregate.js +2 -2
- package/dist/safe-bash-network-engine/args.js +4 -4
- package/dist/safe-bash-network-engine/authorizer.js +1 -1
- package/dist/safe-bash-network-engine/body.js +6 -6
- package/dist/safe-bash-network-engine/decode.d.ts +1 -1
- package/dist/safe-bash-network-engine/decode.js +3 -4
- package/dist/safe-bash-network-engine/fetch-transport.js +3 -3
- package/dist/safe-bash-network-engine/form-content-type.js +2 -2
- package/dist/safe-bash-network-engine/form-headers.js +2 -2
- package/dist/safe-bash-network-engine/glob.js +1 -1
- package/dist/safe-bash-network-engine/index.js +4 -4
- package/dist/safe-bash-network-engine/input.js +6 -6
- package/dist/safe-bash-network-engine/output.js +2 -2
- package/dist/safe-bash-network-engine/platform-portable.js +3 -3
- package/dist/safe-bash-network-engine/shared.js +2 -2
- package/dist/safe-bash-network-engine/types.d.ts +7 -2
- package/dist/safe-bash-network-engine/types.js +1 -1
- package/dist/safe-bash-network-engine/url.js +2 -2
- package/dist/safe-bash-query-engine/capture.js +3 -3
- package/dist/safe-bash-query-engine/delpaths.js +3 -3
- package/dist/safe-bash-query-engine/formats.js +2 -2
- package/dist/safe-bash-query-engine/index.js +11 -11
- package/dist/safe-bash-query-engine/indices.js +3 -3
- package/dist/safe-bash-query-engine/input.js +1 -1
- package/dist/safe-bash-query-engine/interpreter.js +9 -9
- package/dist/safe-bash-query-engine/parser.js +1 -1
- package/dist/safe-bash-query-engine/query-core.js +11 -11
- package/dist/safe-bash-query-engine/regex.js +4 -4
- package/dist/safe-bash-query-engine/splits.js +5 -5
- package/dist/safe-bash-query-engine/values.js +2 -2
- package/dist/safe-bash-regex-engine/ere/matcher.js +102 -30
- package/dist/safe-bash-regex-engine/execution/bounded-provider.js +55 -67
- package/dist/safe-bash-regex-engine/execution/portable.d.ts +0 -1
- package/dist/safe-bash-regex-engine/execution/portable.js +6 -10
- package/dist/safe-bash-regex-engine/execution/protocol.d.ts +0 -5
- package/dist/safe-bash-regex-engine/execution/protocol.js +1 -3
- package/dist/safe-bash-regex-engine/index.js +6 -4
- package/dist/safe-bash-regex-engine/text/budget.d.ts +1 -0
- package/dist/safe-bash-regex-engine/text/budget.js +1 -1
- package/dist/safe-bash-regex-engine/text/regex.d.ts +14 -0
- package/dist/safe-bash-regex-engine/text/regex.js +6 -4
- package/dist/safe-bash-regex-engine/text/replacement-buffer.js +2 -2
- package/dist/safe-bash-regex-engine/text/rust-syntax.js +2 -2
- package/dist/safe-bash-search-engine/grep.js +189 -227
- package/dist/safe-bash-table-text-engine/table-text/internal.d.ts +7 -5
- package/dist/safe-bash-table-text-engine/table-text/internal.js +39 -21
- package/dist/safe-playwright-cloudflare/browser-trace-budget.js +6 -2
- package/dist/spreadsheet-engine/codecs/odf-hyperlinks.js +8 -2
- package/dist/spreadsheet-engine/formulas/functions/captured-bessel-phase.js +2 -2
- package/dist/spreadsheet-engine/formulas/label-references.js +54 -33
- package/dist/spreadsheet-engine/formulas/parser.js +3 -1
- package/dist/spreadsheet-engine/formulas/rewriting.js +13 -3
- package/dist/spreadsheet-format-xls/biff-data-tables.js +4 -6
- package/dist/spreadsheet-format-xls/biff-formulas.js +3 -0
- package/dist/spreadsheet-format-xls/biff-label-ranges.js +9 -6
- package/dist/spreadsheet-format-xls/biff.js +1 -1
- package/dist/xlsx-ast/xlsx.js +8 -5
- package/package.json +9 -8
- package/dist/safe-bash/command-chunks/chunk-KAGBORIC.js +0 -88
- /package/dist/safe-bash/command-chunks/{chunk-BWNXWI33.js → chunk-2LMZVE3I.js} +0 -0
|
@@ -1921,7 +1921,7 @@ async function requestTokens(input) {
|
|
|
1921
1921
|
if (method === "client_secret_basic") {
|
|
1922
1922
|
const encoded = new URLSearchParams({ credential: input.clientId }).toString().slice("credential=".length);
|
|
1923
1923
|
const encodedSecret = new URLSearchParams({ credential: input.clientSecret }).toString().slice("credential=".length);
|
|
1924
|
-
headers.set("Authorization", `Basic ${
|
|
1924
|
+
headers.set("Authorization", `Basic ${btoa(`${encoded}:${encodedSecret}`)}`);
|
|
1925
1925
|
} else {
|
|
1926
1926
|
body.set("client_id", input.clientId);
|
|
1927
1927
|
if (method === "client_secret_post")
|
|
@@ -2111,10 +2111,10 @@ function createDefaultOAuthClientProvider(options) {
|
|
|
2111
2111
|
if (resourceIdentity !== void 0 && selectedSessionStore !== void 0)
|
|
2112
2112
|
throw new Error("OAuth resourceIdentity requires native-owned persistence; custom stores own their resource trust policy");
|
|
2113
2113
|
const now = () => {
|
|
2114
|
-
const
|
|
2115
|
-
if (!Number.isSafeInteger(
|
|
2114
|
+
const timestamp2 = clock();
|
|
2115
|
+
if (!Number.isSafeInteger(timestamp2) || Math.abs(timestamp2) > MAX_JS_DATE_MS3)
|
|
2116
2116
|
throw new Error("OAuth clock must return valid epoch milliseconds");
|
|
2117
|
-
return
|
|
2117
|
+
return timestamp2;
|
|
2118
2118
|
};
|
|
2119
2119
|
const registeredClients = /* @__PURE__ */ new Map();
|
|
2120
2120
|
const resourceStores = resourceIdentity === void 0 ? void 0 : createResourceBoundOAuthStores(authStore ?? {}, persistenceNamespace, resourceIdentity);
|
|
@@ -2901,6 +2901,155 @@ function shouldReRegisterStoredDynamicClient(error, client, alreadyAttempted) {
|
|
|
2901
2901
|
return client.registrationOwnership !== "caller";
|
|
2902
2902
|
}
|
|
2903
2903
|
|
|
2904
|
+
// ../mcp-oauth/dist/client/resumable.js
|
|
2905
|
+
var responseParameters = ["code", "state", "iss", "error", "error_description", "error_uri"];
|
|
2906
|
+
function httpsUrl(value) {
|
|
2907
|
+
const url = new URL(value);
|
|
2908
|
+
if (url.protocol !== "https:" || url.username || url.password || url.href.includes("#"))
|
|
2909
|
+
throw new Error();
|
|
2910
|
+
return url;
|
|
2911
|
+
}
|
|
2912
|
+
function base64url(bytes) {
|
|
2913
|
+
return btoa(String.fromCharCode(...bytes)).split("+").join("-").split("/").join("_").split("=").join("");
|
|
2914
|
+
}
|
|
2915
|
+
function timestamp(now) {
|
|
2916
|
+
const value = now();
|
|
2917
|
+
if (!Number.isSafeInteger(value) || value < 0 || value > 864e13 - 6e5)
|
|
2918
|
+
throw new Error();
|
|
2919
|
+
return value;
|
|
2920
|
+
}
|
|
2921
|
+
async function beginRemoteMcpAuthorization(options) {
|
|
2922
|
+
try {
|
|
2923
|
+
const { store, signal, discover } = options;
|
|
2924
|
+
const now = options.now?.bind(options) ?? Date.now;
|
|
2925
|
+
const resource = httpsUrl(options.resource).href;
|
|
2926
|
+
const redirect = httpsUrl(options.redirectUri);
|
|
2927
|
+
if (responseParameters.some((key2) => redirect.searchParams.has(key2)))
|
|
2928
|
+
throw new Error();
|
|
2929
|
+
const client = structuredClone(options.client);
|
|
2930
|
+
if (typeof client.clientId !== "string" || !client.clientId.trim())
|
|
2931
|
+
throw new Error();
|
|
2932
|
+
const method = normalizeOAuthTokenEndpointAuthMethod(client.tokenEndpointAuthMethod) ?? (client.clientSecret === void 0 ? "none" : "client_secret_post");
|
|
2933
|
+
if (client.clientSecret !== void 0 && (typeof client.clientSecret !== "string" || !client.clientSecret.trim()))
|
|
2934
|
+
throw new Error();
|
|
2935
|
+
if (method !== "none" && client.clientSecret === void 0)
|
|
2936
|
+
throw new Error();
|
|
2937
|
+
if (client.registration !== void 0 && (client.registration.client_id !== client.clientId || client.registration.client_secret != null && client.registration.client_secret !== client.clientSecret || client.registration.token_endpoint_auth_method != null && client.registration.token_endpoint_auth_method !== method))
|
|
2938
|
+
throw new Error();
|
|
2939
|
+
client.tokenEndpointAuthMethod = method;
|
|
2940
|
+
if (client.requestedRedirectUri !== void 0 && client.requestedRedirectUri !== redirect.href)
|
|
2941
|
+
throw new Error();
|
|
2942
|
+
if (client.registration?.redirect_uris != null && !client.registration.redirect_uris.includes(redirect.href))
|
|
2943
|
+
throw new Error();
|
|
2944
|
+
const scope = normalizeOAuthScope(options.scope);
|
|
2945
|
+
const ttl = options.ttlMs ?? 6e5;
|
|
2946
|
+
if (!Number.isSafeInteger(ttl) || ttl < 1 || ttl > 6e5)
|
|
2947
|
+
throw new Error();
|
|
2948
|
+
signal?.throwIfAborted();
|
|
2949
|
+
const metadata = structuredClone(await discover(resource, signal));
|
|
2950
|
+
signal?.throwIfAborted();
|
|
2951
|
+
const server = metadata.authorizationServerMetadata;
|
|
2952
|
+
if (httpsUrl(metadata.resource).href !== resource || httpsUrl(metadata.resourceMetadata.resource).href !== resource || server.issuer !== metadata.authorizationServer || !metadata.resourceMetadata.authorization_servers.includes(server.issuer) || !server.response_types_supported.includes("code") || !server.code_challenge_methods_supported.includes("S256"))
|
|
2953
|
+
throw new Error();
|
|
2954
|
+
httpsUrl(server.issuer);
|
|
2955
|
+
httpsUrl(server.token_endpoint);
|
|
2956
|
+
const authorization = httpsUrl(server.authorization_endpoint);
|
|
2957
|
+
const state = base64url(crypto.getRandomValues(new Uint8Array(32)));
|
|
2958
|
+
const codeVerifier = base64url(crypto.getRandomValues(new Uint8Array(32)));
|
|
2959
|
+
const challenge = base64url(new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(codeVerifier))));
|
|
2960
|
+
const expiresAt = timestamp(now) + ttl;
|
|
2961
|
+
const session = {
|
|
2962
|
+
resource,
|
|
2963
|
+
authorizationServer: server.issuer,
|
|
2964
|
+
client: { ...client, registrationOwnership: "caller", requestedRedirectUri: redirect.href },
|
|
2965
|
+
...scope === void 0 ? {} : { requestedScope: scope },
|
|
2966
|
+
discovery: { resourceMetadataUrl: metadata.resourceMetadataUrl, resourceMetadata: metadata.resourceMetadata, authorizationServerMetadata: server }
|
|
2967
|
+
};
|
|
2968
|
+
for (const [key2, value] of Object.entries({
|
|
2969
|
+
response_type: "code",
|
|
2970
|
+
client_id: client.clientId,
|
|
2971
|
+
redirect_uri: redirect.href,
|
|
2972
|
+
resource,
|
|
2973
|
+
state,
|
|
2974
|
+
code_challenge: challenge,
|
|
2975
|
+
code_challenge_method: "S256"
|
|
2976
|
+
}))
|
|
2977
|
+
authorization.searchParams.set(key2, value);
|
|
2978
|
+
authorization.searchParams.delete("scope");
|
|
2979
|
+
if (scope !== void 0)
|
|
2980
|
+
authorization.searchParams.set("scope", scope);
|
|
2981
|
+
signal?.throwIfAborted();
|
|
2982
|
+
await store.create({
|
|
2983
|
+
state,
|
|
2984
|
+
expiresAt,
|
|
2985
|
+
redirectUri: redirect.href,
|
|
2986
|
+
codeVerifier,
|
|
2987
|
+
requireIssuer: server.authorization_response_iss_parameter_supported === true,
|
|
2988
|
+
session
|
|
2989
|
+
});
|
|
2990
|
+
signal?.throwIfAborted();
|
|
2991
|
+
return { authorizationUrl: authorization.href, expiresAt };
|
|
2992
|
+
} catch {
|
|
2993
|
+
throw new Error("Unable to begin MCP authorization");
|
|
2994
|
+
}
|
|
2995
|
+
}
|
|
2996
|
+
async function completeRemoteMcpAuthorization(options) {
|
|
2997
|
+
try {
|
|
2998
|
+
const { store, fetch: fetch2, signal } = options;
|
|
2999
|
+
const now = options.now?.bind(options) ?? Date.now;
|
|
3000
|
+
const callback = httpsUrl(options.callbackUrl);
|
|
3001
|
+
for (const key2 of responseParameters)
|
|
3002
|
+
if (callback.searchParams.getAll(key2).length > 1)
|
|
3003
|
+
throw new Error();
|
|
3004
|
+
const state = callback.searchParams.get("state");
|
|
3005
|
+
if (!state || state.length > 256)
|
|
3006
|
+
throw new Error();
|
|
3007
|
+
signal?.throwIfAborted();
|
|
3008
|
+
const stored = await store.consume(state);
|
|
3009
|
+
if (stored === null)
|
|
3010
|
+
throw new Error();
|
|
3011
|
+
const transaction = structuredClone(stored);
|
|
3012
|
+
if (transaction.state !== state || !Number.isSafeInteger(transaction.expiresAt) || transaction.expiresAt <= timestamp(now))
|
|
3013
|
+
throw new Error();
|
|
3014
|
+
const expected = httpsUrl(transaction.redirectUri);
|
|
3015
|
+
const issuer = callback.searchParams.get("iss");
|
|
3016
|
+
if (transaction.requireIssuer && issuer === null || issuer !== null && issuer !== transaction.session.authorizationServer)
|
|
3017
|
+
throw new Error();
|
|
3018
|
+
const code = callback.searchParams.get("code");
|
|
3019
|
+
if (!code || callback.searchParams.has("error"))
|
|
3020
|
+
throw new Error();
|
|
3021
|
+
for (const key2 of responseParameters)
|
|
3022
|
+
callback.searchParams.delete(key2);
|
|
3023
|
+
const actualPairs = [...callback.searchParams].sort(), expectedPairs = [...expected.searchParams].sort();
|
|
3024
|
+
if (callback.origin !== expected.origin || callback.pathname !== expected.pathname || JSON.stringify(actualPairs) !== JSON.stringify(expectedPairs))
|
|
3025
|
+
throw new Error();
|
|
3026
|
+
const session = structuredClone(transaction.session);
|
|
3027
|
+
const tokenEndpoint = httpsUrl(String(session.discovery.authorizationServerMetadata.token_endpoint)).href;
|
|
3028
|
+
signal?.throwIfAborted();
|
|
3029
|
+
session.tokens = await exchangeAuthorizationCode({
|
|
3030
|
+
tokenEndpoint,
|
|
3031
|
+
clientId: session.client.clientId,
|
|
3032
|
+
clientSecret: session.client.clientSecret,
|
|
3033
|
+
tokenEndpointAuthMethod: session.client.tokenEndpointAuthMethod,
|
|
3034
|
+
code,
|
|
3035
|
+
codeVerifier: transaction.codeVerifier,
|
|
3036
|
+
redirectUri: transaction.redirectUri,
|
|
3037
|
+
resource: session.resource,
|
|
3038
|
+
fetch: fetch2,
|
|
3039
|
+
signal,
|
|
3040
|
+
now
|
|
3041
|
+
});
|
|
3042
|
+
if (session.tokens.scope === void 0 && session.requestedScope !== void 0)
|
|
3043
|
+
session.tokens.scope = session.requestedScope;
|
|
3044
|
+
signal?.throwIfAborted();
|
|
3045
|
+
if (transaction.expiresAt <= timestamp(now) || !await store.commit(transaction, session))
|
|
3046
|
+
throw new Error();
|
|
3047
|
+
return { resource: session.resource };
|
|
3048
|
+
} catch {
|
|
3049
|
+
throw new Error("Unable to complete MCP authorization");
|
|
3050
|
+
}
|
|
3051
|
+
}
|
|
3052
|
+
|
|
2904
3053
|
// src/oauth-policy.ts
|
|
2905
3054
|
function snapshotOAuthBindingOptions(oauth) {
|
|
2906
3055
|
return {
|
|
@@ -2932,8 +3081,8 @@ function snapshotOAuthBrowserOptions(browser) {
|
|
|
2932
3081
|
// ../tiny-mcp-client/dist/index.js
|
|
2933
3082
|
import { PassThrough } from "node:stream";
|
|
2934
3083
|
import http2 from "node:http";
|
|
2935
|
-
import crypto5 from "node:crypto";
|
|
2936
3084
|
import crypto22 from "node:crypto";
|
|
3085
|
+
import crypto32 from "node:crypto";
|
|
2937
3086
|
import path42 from "node:path";
|
|
2938
3087
|
import { createCipheriv as createCipheriv2, createDecipheriv as createDecipheriv2, randomBytes as randomBytes2, randomUUID as randomUUID22, scrypt as scrypt2 } from "node:crypto";
|
|
2939
3088
|
import { promises as fs2 } from "node:fs";
|
|
@@ -2948,7 +3097,7 @@ import { homedir as homedir22 } from "node:os";
|
|
|
2948
3097
|
import path32 from "node:path";
|
|
2949
3098
|
import { isIP as isIP2 } from "node:net";
|
|
2950
3099
|
import { URL as URL22 } from "node:url";
|
|
2951
|
-
import
|
|
3100
|
+
import crypto42 from "node:crypto";
|
|
2952
3101
|
var __defProp = Object.defineProperty;
|
|
2953
3102
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2954
3103
|
var __esm = (fn, res, err) => function __init() {
|
|
@@ -6473,7 +6622,7 @@ function copyBoundedOAuthJson2(value, message) {
|
|
|
6473
6622
|
function createAuthorizationState2(input) {
|
|
6474
6623
|
const payload = {
|
|
6475
6624
|
v: 1,
|
|
6476
|
-
n:
|
|
6625
|
+
n: crypto22.randomBytes(16).toString("base64url"),
|
|
6477
6626
|
i: input.issuer,
|
|
6478
6627
|
r: input.requireIssuer
|
|
6479
6628
|
};
|
|
@@ -7731,7 +7880,7 @@ function snapshotPersistenceOptions2(options) {
|
|
|
7731
7880
|
}
|
|
7732
7881
|
function createNamedSecretStore2(key2, options, defaults, namespace) {
|
|
7733
7882
|
options = snapshotOAuthPersistenceOptions2(options);
|
|
7734
|
-
const hash =
|
|
7883
|
+
const hash = crypto32.createHash("sha256").update(namespace === void 0 ? key2 : JSON.stringify([namespace, key2])).digest("hex");
|
|
7735
7884
|
const configuredFilePath = options.fileStore?.filePath;
|
|
7736
7885
|
const parsedFilePath = configuredFilePath === void 0 ? null : path42.parse(configuredFilePath);
|
|
7737
7886
|
const fileStore = {
|
|
@@ -8033,10 +8182,10 @@ async function fetchMcpResponse2(fetchImplementation, input, init = {}) {
|
|
|
8033
8182
|
});
|
|
8034
8183
|
}
|
|
8035
8184
|
function generateCodeVerifier2() {
|
|
8036
|
-
return
|
|
8185
|
+
return crypto42.randomBytes(32).toString("base64url");
|
|
8037
8186
|
}
|
|
8038
8187
|
function generateCodeChallenge2(verifier) {
|
|
8039
|
-
return
|
|
8188
|
+
return crypto42.createHash("sha256").update(verifier).digest("base64url");
|
|
8040
8189
|
}
|
|
8041
8190
|
async function readBoundedResponseText2(response, maxBytes, readers, signal) {
|
|
8042
8191
|
if (maxBytes !== Infinity && (!Number.isSafeInteger(maxBytes) || maxBytes < 1))
|
|
@@ -8165,7 +8314,7 @@ async function requestTokens2(input) {
|
|
|
8165
8314
|
if (method === "client_secret_basic") {
|
|
8166
8315
|
const encoded = new URLSearchParams({ credential: input.clientId }).toString().slice("credential=".length);
|
|
8167
8316
|
const encodedSecret = new URLSearchParams({ credential: input.clientSecret }).toString().slice("credential=".length);
|
|
8168
|
-
headers.set("Authorization", `Basic ${
|
|
8317
|
+
headers.set("Authorization", `Basic ${btoa(`${encoded}:${encodedSecret}`)}`);
|
|
8169
8318
|
} else {
|
|
8170
8319
|
body.set("client_id", input.clientId);
|
|
8171
8320
|
if (method === "client_secret_post")
|
|
@@ -8357,10 +8506,10 @@ function createDefaultOAuthClientProvider2(options) {
|
|
|
8357
8506
|
if (resourceIdentity !== void 0 && selectedSessionStore !== void 0)
|
|
8358
8507
|
throw new Error("OAuth resourceIdentity requires native-owned persistence; custom stores own their resource trust policy");
|
|
8359
8508
|
const now = () => {
|
|
8360
|
-
const
|
|
8361
|
-
if (!Number.isSafeInteger(
|
|
8509
|
+
const timestamp2 = clock();
|
|
8510
|
+
if (!Number.isSafeInteger(timestamp2) || Math.abs(timestamp2) > MAX_JS_DATE_MS32)
|
|
8362
8511
|
throw new Error("OAuth clock must return valid epoch milliseconds");
|
|
8363
|
-
return
|
|
8512
|
+
return timestamp2;
|
|
8364
8513
|
};
|
|
8365
8514
|
const registeredClients = /* @__PURE__ */ new Map();
|
|
8366
8515
|
const resourceStores = resourceIdentity === void 0 ? void 0 : createResourceBoundOAuthStores2(authStore ?? {}, persistenceNamespace, resourceIdentity);
|
|
@@ -14863,16 +15012,31 @@ async function openFileDescriptor(path6, options, capabilities, acquire) {
|
|
|
14863
15012
|
}
|
|
14864
15013
|
|
|
14865
15014
|
// ../safe-fs/dist/contracts/virtual-path.js
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
|
|
15015
|
+
function pathByteLength(path6) {
|
|
15016
|
+
let bytes = 0;
|
|
15017
|
+
for (const point of path6) {
|
|
15018
|
+
const code = point.codePointAt(0);
|
|
15019
|
+
bytes += code <= 127 ? 1 : code <= 2047 ? 2 : code <= 65535 ? 3 : 4;
|
|
15020
|
+
}
|
|
15021
|
+
return bytes;
|
|
15022
|
+
}
|
|
15023
|
+
function validatePath(path6, limits = {}) {
|
|
15024
|
+
const maxBytes = typeof limits === "number" ? Infinity : limits.maxPathBytes ?? Infinity;
|
|
15025
|
+
const maxComponents = typeof limits === "number" ? limits : limits.maxPathComponents ?? Infinity;
|
|
15026
|
+
for (const value of [maxBytes, maxComponents]) {
|
|
15027
|
+
if (value !== Infinity && (!Number.isSafeInteger(value) || value < 0)) {
|
|
15028
|
+
throw new RangeError("Path limits must be nonnegative safe integers or Infinity");
|
|
15029
|
+
}
|
|
15030
|
+
}
|
|
14869
15031
|
if (typeof path6 !== "string" || path6.includes("\0")) {
|
|
14870
15032
|
throw new FsError("EINVAL", { syscall: "resolve", message: "paths must be strings without NUL bytes" });
|
|
14871
15033
|
}
|
|
14872
|
-
if (path6
|
|
15034
|
+
if (maxBytes !== Infinity && pathByteLength(path6) > maxBytes) {
|
|
14873
15035
|
throw new FsError("ENAMETOOLONG", { syscall: "resolve", path: path6 });
|
|
14874
15036
|
}
|
|
14875
|
-
|
|
15037
|
+
if (maxComponents === Infinity)
|
|
15038
|
+
return;
|
|
15039
|
+
const limit = maxComponents;
|
|
14876
15040
|
let components2 = 0;
|
|
14877
15041
|
let inComponent = false;
|
|
14878
15042
|
for (let i = 0; i < path6.length; i++) {
|
|
@@ -15536,11 +15700,14 @@ function components(path6, signal) {
|
|
|
15536
15700
|
}
|
|
15537
15701
|
return result;
|
|
15538
15702
|
}
|
|
15539
|
-
function resolveMissingTarget(root, path6, signal) {
|
|
15703
|
+
function resolveMissingTarget(root, path6, signal, limits = {}) {
|
|
15704
|
+
validatePath(path6, limits);
|
|
15540
15705
|
const fail3 = (code, failedPath = path6) => {
|
|
15541
15706
|
throw new FsError(code, { syscall: "realpath", path: failedPath });
|
|
15542
15707
|
};
|
|
15543
15708
|
const origin = components(path6, signal);
|
|
15709
|
+
let remainingBytes = (limits.maxPathBytes ?? Infinity) - pathByteLength(path6);
|
|
15710
|
+
let remainingComponents = (limits.maxPathComponents ?? Infinity) - origin.length;
|
|
15544
15711
|
const initial = { node: root, name: "" };
|
|
15545
15712
|
let position = initial;
|
|
15546
15713
|
let links = 0;
|
|
@@ -15593,7 +15760,10 @@ function resolveMissingTarget(root, path6, signal) {
|
|
|
15593
15760
|
if (node.type === "symlink") {
|
|
15594
15761
|
if (++links > 40)
|
|
15595
15762
|
return fail3("ELOOP");
|
|
15763
|
+
validatePath(node.target, { maxPathBytes: remainingBytes, maxPathComponents: remainingComponents });
|
|
15596
15764
|
const names2 = components(node.target, signal);
|
|
15765
|
+
remainingBytes -= pathByteLength(node.target);
|
|
15766
|
+
remainingComponents -= names2.length;
|
|
15597
15767
|
if (node.target.endsWith("/"))
|
|
15598
15768
|
names2.push({ name: ".", start: node.target.length });
|
|
15599
15769
|
if (node.target.startsWith("/"))
|
|
@@ -15797,26 +15967,22 @@ function readConfigRecord(value, label, keys) {
|
|
|
15797
15967
|
|
|
15798
15968
|
// ../safe-fs/dist/fs/memory/limits.js
|
|
15799
15969
|
var defaultMemoryFileSystemLimits = Object.freeze({
|
|
15970
|
+
maxPathBytes: Infinity,
|
|
15971
|
+
maxPathComponents: Infinity,
|
|
15800
15972
|
maxFileBytes: Infinity,
|
|
15801
15973
|
maxRetainedBytes: Infinity,
|
|
15802
15974
|
maxMetadataUnits: Infinity
|
|
15803
15975
|
});
|
|
15804
15976
|
function normalizeMemoryFileSystemLimits(options) {
|
|
15805
|
-
const keys = ["maxFileBytes", "maxRetainedBytes", "maxMetadataUnits"];
|
|
15977
|
+
const keys = ["maxPathBytes", "maxPathComponents", "maxFileBytes", "maxRetainedBytes", "maxMetadataUnits"];
|
|
15806
15978
|
const record3 = readConfigRecord(options, "memory option", [...keys, "maxBytes"]);
|
|
15807
15979
|
const limits = { ...defaultMemoryFileSystemLimits };
|
|
15808
|
-
|
|
15809
|
-
if (typeof record3.maxBytes !== "number" || !Number.isSafeInteger(record3.maxBytes) || record3.maxBytes < 0) {
|
|
15810
|
-
throw new RangeError("maxBytes must be a nonnegative safe integer");
|
|
15811
|
-
}
|
|
15812
|
-
limits.maxBytes = record3.maxBytes;
|
|
15813
|
-
}
|
|
15814
|
-
for (const key2 of keys) {
|
|
15815
|
-
if (!Object.hasOwn(record3, key2))
|
|
15816
|
-
continue;
|
|
15980
|
+
for (const key2 of [...keys, "maxBytes"]) {
|
|
15817
15981
|
const value = record3[key2];
|
|
15982
|
+
if (value === void 0 || value === Infinity)
|
|
15983
|
+
continue;
|
|
15818
15984
|
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < (key2 === "maxMetadataUnits" ? 1 : 0)) {
|
|
15819
|
-
throw new RangeError(`${key2} must be a ${key2 === "maxMetadataUnits" ? "positive" : "nonnegative"} safe integer`);
|
|
15985
|
+
throw new RangeError(`${key2} must be a ${key2 === "maxMetadataUnits" ? "positive" : "nonnegative"} safe integer or Infinity`);
|
|
15820
15986
|
}
|
|
15821
15987
|
limits[key2] = value;
|
|
15822
15988
|
}
|
|
@@ -15865,12 +16031,10 @@ var DUMMY_POOL_FILE_NODE = new MemoryFileNode(0, 0, null, 0, DUMMY_POOL_ALLOCATI
|
|
|
15865
16031
|
DUMMY_POOL_FILE_NODE.atimeMs = DUMMY_POOL_FILE_NODE.mtimeMs = DUMMY_POOL_FILE_NODE.ctimeMs = DUMMY_POOL_FILE_NODE.birthtimeMs = 17e11;
|
|
15866
16032
|
var defaultDateNow = Date.now;
|
|
15867
16033
|
var fastWriteCachedNow = Date.now();
|
|
15868
|
-
var lastFastMapMiss = {
|
|
15869
|
-
map: void 0,
|
|
15870
|
-
key: "",
|
|
15871
|
-
slot: -1
|
|
15872
|
-
};
|
|
15873
16034
|
var FastDirectoryEntriesMap = class {
|
|
16035
|
+
// Keep speculative slots local so a failed write cannot pin a tenant globally.
|
|
16036
|
+
_missKey = "";
|
|
16037
|
+
_missSlot = -1;
|
|
15874
16038
|
_table = new Int16Array(128).fill(-1);
|
|
15875
16039
|
_mask = 127;
|
|
15876
16040
|
_keys = new Array(64).fill("");
|
|
@@ -15907,9 +16071,8 @@ var FastDirectoryEntriesMap = class {
|
|
|
15907
16071
|
getForWriteWithHash(k, h) {
|
|
15908
16072
|
let slot = h & this._mask;
|
|
15909
16073
|
if (this.size === 0) {
|
|
15910
|
-
|
|
15911
|
-
|
|
15912
|
-
lastFastMapMiss.slot = slot;
|
|
16074
|
+
this._missKey = k;
|
|
16075
|
+
this._missSlot = slot;
|
|
15913
16076
|
return void 0;
|
|
15914
16077
|
}
|
|
15915
16078
|
const mask = this._mask;
|
|
@@ -15919,9 +16082,8 @@ var FastDirectoryEntriesMap = class {
|
|
|
15919
16082
|
while (true) {
|
|
15920
16083
|
const idx = table[slot];
|
|
15921
16084
|
if (idx === -1) {
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
lastFastMapMiss.slot = firstDeleted !== -1 ? firstDeleted : slot;
|
|
16085
|
+
this._missKey = k;
|
|
16086
|
+
this._missSlot = firstDeleted !== -1 ? firstDeleted : slot;
|
|
15925
16087
|
return void 0;
|
|
15926
16088
|
}
|
|
15927
16089
|
if (idx === -2) {
|
|
@@ -15970,6 +16132,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
15970
16132
|
return this.get(k) !== void 0;
|
|
15971
16133
|
}
|
|
15972
16134
|
_rebuild(newCap) {
|
|
16135
|
+
this._missKey = "";
|
|
15973
16136
|
const newTableLen = newCap * 2;
|
|
15974
16137
|
const newMask = newTableLen - 1;
|
|
15975
16138
|
const newTable = newCap <= 16384 ? new Int16Array(newTableLen).fill(-1) : new Int32Array(newTableLen).fill(-1);
|
|
@@ -16009,15 +16172,16 @@ var FastDirectoryEntriesMap = class {
|
|
|
16009
16172
|
this._next = writeIdx;
|
|
16010
16173
|
}
|
|
16011
16174
|
set(k, v) {
|
|
16012
|
-
if (
|
|
16175
|
+
if (k === this._missKey && this._next < this._keys.length) {
|
|
16013
16176
|
const entryIdx = this._next++;
|
|
16014
|
-
this._table[
|
|
16177
|
+
this._table[this._missSlot] = entryIdx;
|
|
16015
16178
|
this._keys[entryIdx] = k;
|
|
16016
16179
|
this._vals[entryIdx] = v;
|
|
16017
16180
|
this.size++;
|
|
16018
|
-
|
|
16181
|
+
this._missKey = "";
|
|
16019
16182
|
return this;
|
|
16020
16183
|
}
|
|
16184
|
+
this._missKey = "";
|
|
16021
16185
|
if (this._next >= this._keys.length) {
|
|
16022
16186
|
this._rebuild(this.size * 2 <= this._keys.length ? this._keys.length : this._keys.length * 2);
|
|
16023
16187
|
}
|
|
@@ -16048,6 +16212,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
16048
16212
|
}
|
|
16049
16213
|
}
|
|
16050
16214
|
delete(k) {
|
|
16215
|
+
this._missKey = "";
|
|
16051
16216
|
if (this.size === 0)
|
|
16052
16217
|
return false;
|
|
16053
16218
|
let slot = this._hash(k);
|
|
@@ -16073,6 +16238,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
16073
16238
|
}
|
|
16074
16239
|
}
|
|
16075
16240
|
clear() {
|
|
16241
|
+
this._missKey = "";
|
|
16076
16242
|
if (this._next > 0) {
|
|
16077
16243
|
this._table.fill(-1);
|
|
16078
16244
|
for (let i = 0; i < this._next; i++) {
|
|
@@ -16525,7 +16691,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16525
16691
|
const owner = ownedStores.get(this);
|
|
16526
16692
|
if (path6 !== "")
|
|
16527
16693
|
this.validatePath(path6, "realpath");
|
|
16528
|
-
return resolveMissingTarget(owner.root, path6 || ".", options.signal);
|
|
16694
|
+
return resolveMissingTarget(owner.root, path6 || ".", options.signal, this.ledger.limits);
|
|
16529
16695
|
}
|
|
16530
16696
|
async confineExtraction(roots, options = {}) {
|
|
16531
16697
|
options.signal?.throwIfAborted();
|
|
@@ -16778,6 +16944,8 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16778
16944
|
this.fail("EINVAL", syscall, path6);
|
|
16779
16945
|
if (path6.length === 0)
|
|
16780
16946
|
this.fail("ENOENT", syscall, path6);
|
|
16947
|
+
if (this.ledger.limits.maxPathBytes !== Infinity || this.ledger.limits.maxPathComponents !== Infinity)
|
|
16948
|
+
validatePath(path6, this.ledger.limits);
|
|
16781
16949
|
}
|
|
16782
16950
|
permission(node, mask, syscall, path6) {
|
|
16783
16951
|
if ((node.mode >> 6 & mask) !== mask)
|
|
@@ -16799,6 +16967,8 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16799
16967
|
node.mtimeMs = node.ctimeMs = now;
|
|
16800
16968
|
}
|
|
16801
16969
|
resolveNode(path6, syscall, followFinal = true) {
|
|
16970
|
+
if (this.ledger.limits.maxPathBytes !== Infinity || this.ledger.limits.maxPathComponents !== Infinity)
|
|
16971
|
+
validatePath(path6, this.ledger.limits);
|
|
16802
16972
|
const cache = memoryCaches.get(this.ledger);
|
|
16803
16973
|
if (this.symlinkCount === 0 && isCleanAbsolutePath(path6)) {
|
|
16804
16974
|
const fastDir = cache.lastFastDirNode;
|
|
@@ -16883,7 +17053,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16883
17053
|
start = slash + 1;
|
|
16884
17054
|
}
|
|
16885
17055
|
}
|
|
16886
|
-
let remainingPathUnits =
|
|
17056
|
+
let remainingPathUnits = this.ledger.limits.maxPathBytes - pathByteLength(path6);
|
|
16887
17057
|
if (remainingPathUnits < 0)
|
|
16888
17058
|
this.fail("ENAMETOOLONG", syscall, path6);
|
|
16889
17059
|
let initialComponents = 0;
|
|
@@ -16893,12 +17063,12 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16893
17063
|
inComp = false;
|
|
16894
17064
|
else if (!inComp) {
|
|
16895
17065
|
inComp = true;
|
|
16896
|
-
if (++initialComponents >
|
|
17066
|
+
if (++initialComponents > this.ledger.limits.maxPathComponents)
|
|
16897
17067
|
this.fail("ENAMETOOLONG", syscall, path6);
|
|
16898
17068
|
}
|
|
16899
17069
|
}
|
|
16900
|
-
|
|
16901
|
-
let remainingComponents =
|
|
17070
|
+
let pending = path6.split("/").filter(Boolean);
|
|
17071
|
+
let remainingComponents = this.ledger.limits.maxPathComponents - pending.length;
|
|
16902
17072
|
if (path6.endsWith("/"))
|
|
16903
17073
|
pending.push("");
|
|
16904
17074
|
const stack = [{ node: this.root, name: "" }];
|
|
@@ -16948,9 +17118,9 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16948
17118
|
if (node.type === "symlink" && (options.followFinal !== false || pending.length > 0)) {
|
|
16949
17119
|
if (++links > 40)
|
|
16950
17120
|
this.fail("ELOOP", syscall, path6);
|
|
16951
|
-
if (node.target
|
|
17121
|
+
if (pathByteLength(node.target) > remainingPathUnits)
|
|
16952
17122
|
this.fail("ENAMETOOLONG", syscall, path6);
|
|
16953
|
-
remainingPathUnits -= node.target
|
|
17123
|
+
remainingPathUnits -= pathByteLength(node.target);
|
|
16954
17124
|
const target = node.target.split("/").filter(Boolean);
|
|
16955
17125
|
if (target.length > remainingComponents)
|
|
16956
17126
|
this.fail("ENAMETOOLONG", syscall, path6);
|
|
@@ -16959,7 +17129,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16959
17129
|
target.push("");
|
|
16960
17130
|
if (options.resizeCreate !== void 0 && target.at(-1) === "" && pending[0] === "")
|
|
16961
17131
|
target.pop();
|
|
16962
|
-
pending.
|
|
17132
|
+
pending = target.concat(pending);
|
|
16963
17133
|
if (node.target.startsWith("/"))
|
|
16964
17134
|
stack.splice(1);
|
|
16965
17135
|
continue;
|
|
@@ -16975,6 +17145,8 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16975
17145
|
};
|
|
16976
17146
|
}
|
|
16977
17147
|
file(path6, syscall) {
|
|
17148
|
+
if (this.ledger.limits.maxPathBytes !== Infinity || this.ledger.limits.maxPathComponents !== Infinity)
|
|
17149
|
+
validatePath(path6, this.ledger.limits);
|
|
16978
17150
|
if (this.symlinkCount === 0 && path6.charCodeAt(0) === 47 && path6.length > 1 && path6.indexOf("/", 1) === -1 && !path6.includes("\0")) {
|
|
16979
17151
|
const name = path6 === _lastFileSlice1Path ? _lastFileSlice1Name : (_lastFileSlice1Path = path6, _lastFileSlice1Name = path6.slice(1));
|
|
16980
17152
|
if (name !== "." && name !== "..") {
|
|
@@ -17249,6 +17421,8 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17249
17421
|
}, syscall, path6);
|
|
17250
17422
|
}
|
|
17251
17423
|
writeData(path6, data, options, syscall) {
|
|
17424
|
+
if (this.ledger.limits.maxPathBytes !== Infinity || this.ledger.limits.maxPathComponents !== Infinity)
|
|
17425
|
+
validatePath(path6, this.ledger.limits);
|
|
17252
17426
|
if (!(data instanceof Uint8Array))
|
|
17253
17427
|
throw new TypeError("Memory files require Uint8Array data");
|
|
17254
17428
|
const target = this.prepareWrite(path6, options, syscall);
|
|
@@ -17365,9 +17539,11 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17365
17539
|
this.changed(node, now);
|
|
17366
17540
|
}
|
|
17367
17541
|
writeMemoryFileFast(path6, data, append, mode) {
|
|
17542
|
+
if (this.ledger.limits.maxPathBytes !== Infinity || this.ledger.limits.maxPathComponents !== Infinity)
|
|
17543
|
+
validatePath(path6, this.ledger.limits);
|
|
17368
17544
|
const cache = memoryCaches.get(this.ledger);
|
|
17369
17545
|
const syscall = append ? "appendFile" : "writeFile";
|
|
17370
|
-
if (append && path6 === cache.lastFastFilePath && cache.lastFastFileNode !== void 0 && cache.lastFastFileNode.nlink !== 0 && cache.lastFastDirNode !== void 0 && cache.lastFastDirNode.nlink !== 0 && (cache.lastFastDirNode.mode &
|
|
17546
|
+
if (append && path6 === cache.lastFastFilePath && cache.lastFastFileNode !== void 0 && cache.lastFastFileNode.nlink !== 0 && cache.lastFastDirNode !== void 0 && cache.lastFastDirNode.nlink !== 0 && (cache.lastFastDirNode.mode & 64) !== 0 && (cache.lastFastFileNode.mode & 128) !== 0) {
|
|
17371
17547
|
const current2 = cache.lastFastFileNode;
|
|
17372
17548
|
const length2 = current2.byteLength + data.byteLength;
|
|
17373
17549
|
this.admitSize(current2, length2, syscall, path6);
|
|
@@ -17381,7 +17557,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17381
17557
|
let name = "";
|
|
17382
17558
|
const cachedPrefix = cache.lastFastDirPrefix;
|
|
17383
17559
|
const cachedDir = cache.lastFastDirNode;
|
|
17384
|
-
if (cachedDir !== void 0 && cachedDir.nlink !== 0 && (cachedDir.mode &
|
|
17560
|
+
if (cachedDir !== void 0 && cachedDir.nlink !== 0 && (cachedDir.mode & 64) !== 0 && cachedPrefix.length > 1 && path6.startsWith(cachedPrefix) && path6.indexOf("/", cachedPrefix.length) === -1) {
|
|
17385
17561
|
parent = cachedDir;
|
|
17386
17562
|
name = path6.slice(cachedPrefix.length);
|
|
17387
17563
|
if (exceedsComponentByteLimit2(name))
|
|
@@ -17394,7 +17570,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17394
17570
|
name = path6.slice(start);
|
|
17395
17571
|
if (exceedsComponentByteLimit2(name))
|
|
17396
17572
|
this.fail("ENAMETOOLONG", syscall, path6);
|
|
17397
|
-
if (start > 1 && (parent.mode &
|
|
17573
|
+
if (start > 1 && (parent.mode & 64) !== 0) {
|
|
17398
17574
|
cache.lastFastDirPrefix = path6.slice(0, start);
|
|
17399
17575
|
cache.lastFastDirNode = parent;
|
|
17400
17576
|
}
|
|
@@ -17514,6 +17690,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17514
17690
|
let ino = this.nextInode;
|
|
17515
17691
|
this.nextInode = ino + batchCount;
|
|
17516
17692
|
let nextIdx = 1;
|
|
17693
|
+
entries2._missKey = "";
|
|
17517
17694
|
entries2._next = 1 + batchCount;
|
|
17518
17695
|
entries2.size = 1 + batchCount;
|
|
17519
17696
|
const table = entries2._table;
|
|
@@ -17563,6 +17740,8 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17563
17740
|
}
|
|
17564
17741
|
}
|
|
17565
17742
|
writeMemoryFileInDirFast(dirPrefix, name, data, append, mode, nameHash) {
|
|
17743
|
+
if (this.ledger.limits.maxPathBytes !== Infinity || this.ledger.limits.maxPathComponents !== Infinity)
|
|
17744
|
+
validatePath(dirPrefix + name, this.ledger.limits);
|
|
17566
17745
|
const cache = this._cache;
|
|
17567
17746
|
if (!append && dirPrefix === cache.lastFastDirPrefix && cache.lastFastDirNode !== void 0 && cache.lastFastDirNode.nlink !== 0 && (cache.lastFastDirNode.mode & 192) === 192 && name.length <= 85 && this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && this.ledger.limits.maxBytes === void 0 && sharedFileNodePoolLen > 0) {
|
|
17568
17747
|
const parent = cache.lastFastDirNode;
|
|
@@ -17590,12 +17769,11 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17590
17769
|
node.allocation = DUMMY_POOL_ALLOCATION;
|
|
17591
17770
|
node.sourceRef = node.data.subarray(0);
|
|
17592
17771
|
const entryIdx = entries2._next++;
|
|
17593
|
-
entries2._table[
|
|
17772
|
+
entries2._table[entries2._missSlot] = entryIdx;
|
|
17594
17773
|
entries2._keys[entryIdx] = name;
|
|
17595
17774
|
entries2._vals[entryIdx] = node;
|
|
17596
17775
|
entries2.size++;
|
|
17597
|
-
|
|
17598
|
-
lastFastMapMiss.key = "";
|
|
17776
|
+
entries2._missKey = "";
|
|
17599
17777
|
this.ledger.reserve(name.length * 2, 2, "writeFile", name);
|
|
17600
17778
|
this.totalBytes += length;
|
|
17601
17779
|
this.mutationTick = this.mutationTick + 1 | 0;
|
|
@@ -17609,7 +17787,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17609
17787
|
}
|
|
17610
17788
|
const syscall = append ? "appendFile" : "writeFile";
|
|
17611
17789
|
try {
|
|
17612
|
-
if (append && dirPrefix === cache.lastFastDirPrefix && name === cache.lastFastFileName && cache.lastFastFileNode !== void 0 && cache.lastFastFileNode.nlink !== 0 && cache.lastFastDirNode !== void 0 && cache.lastFastDirNode.nlink !== 0 && (cache.lastFastDirNode.mode &
|
|
17790
|
+
if (append && dirPrefix === cache.lastFastDirPrefix && name === cache.lastFastFileName && cache.lastFastFileNode !== void 0 && cache.lastFastFileNode.nlink !== 0 && cache.lastFastDirNode !== void 0 && cache.lastFastDirNode.nlink !== 0 && (cache.lastFastDirNode.mode & 64) !== 0 && (cache.lastFastFileNode.mode & 128) !== 0) {
|
|
17613
17791
|
const current2 = cache.lastFastFileNode;
|
|
17614
17792
|
const length2 = current2.byteLength + data.byteLength;
|
|
17615
17793
|
this.admitSize(current2, length2, syscall, name);
|
|
@@ -17620,7 +17798,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17620
17798
|
}
|
|
17621
17799
|
let parent = this.root;
|
|
17622
17800
|
const cachedDir = cache.lastFastDirNode;
|
|
17623
|
-
if (cachedDir !== void 0 && cachedDir.nlink !== 0 && (cachedDir.mode &
|
|
17801
|
+
if (cachedDir !== void 0 && cachedDir.nlink !== 0 && (cachedDir.mode & 64) !== 0 && dirPrefix === cache.lastFastDirPrefix) {
|
|
17624
17802
|
parent = cachedDir;
|
|
17625
17803
|
if (exceedsComponentByteLimit2(name))
|
|
17626
17804
|
this.fail("ENAMETOOLONG", syscall, name);
|
|
@@ -17645,7 +17823,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17645
17823
|
this.permission(parent, 1, syscall, name);
|
|
17646
17824
|
if (exceedsComponentByteLimit2(name))
|
|
17647
17825
|
this.fail("ENAMETOOLONG", syscall, name);
|
|
17648
|
-
if (dirPrefix.length > 1 && (parent.mode &
|
|
17826
|
+
if (dirPrefix.length > 1 && (parent.mode & 64) !== 0) {
|
|
17649
17827
|
cache.lastFastDirPrefix = dirPrefix;
|
|
17650
17828
|
cache.lastFastDirNode = parent;
|
|
17651
17829
|
}
|
|
@@ -17721,11 +17899,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17721
17899
|
cache.lastFastFilePath = "";
|
|
17722
17900
|
cache.lastFastFileName = name;
|
|
17723
17901
|
cache.lastFastFileNode = node;
|
|
17724
|
-
lastFastMapMiss.map = void 0;
|
|
17725
|
-
lastFastMapMiss.key = "";
|
|
17726
17902
|
} catch (error) {
|
|
17727
|
-
lastFastMapMiss.map = void 0;
|
|
17728
|
-
lastFastMapMiss.key = "";
|
|
17729
17903
|
this.ledger.release(nameBytes, 2);
|
|
17730
17904
|
throw error;
|
|
17731
17905
|
}
|
|
@@ -19719,27 +19893,42 @@ function* parseXmlSteps(input, limits = {}) {
|
|
|
19719
19893
|
throw new XmlLimitError("maxContentNodes", "XML content node limit exceeded");
|
|
19720
19894
|
};
|
|
19721
19895
|
let pendingWork = 0;
|
|
19722
|
-
const skipWhitespace = ()
|
|
19896
|
+
const skipWhitespace = function* () {
|
|
19723
19897
|
const start2 = offset;
|
|
19724
19898
|
while (offset < source.length) {
|
|
19725
19899
|
const c = source.charCodeAt(offset);
|
|
19726
19900
|
if (c !== 32 && c !== 9 && c !== 10 && c !== 13)
|
|
19727
19901
|
break;
|
|
19728
19902
|
offset++;
|
|
19903
|
+
pendingWork++;
|
|
19904
|
+
if (pendingWork >= 512) {
|
|
19905
|
+
yield 512;
|
|
19906
|
+
pendingWork -= 512;
|
|
19907
|
+
}
|
|
19729
19908
|
}
|
|
19730
19909
|
return offset - start2;
|
|
19731
19910
|
};
|
|
19732
|
-
const scanName = ()
|
|
19911
|
+
const scanName = function* () {
|
|
19733
19912
|
const start2 = offset;
|
|
19734
19913
|
while (offset < source.length) {
|
|
19735
19914
|
const c = source.charCodeAt(offset);
|
|
19736
19915
|
if (c === 32 || c === 9 || c === 13 || c === 10 || c === 47 || c === 61 || c === 62 || c === 63)
|
|
19737
19916
|
break;
|
|
19738
19917
|
offset++;
|
|
19918
|
+
pendingWork++;
|
|
19919
|
+
if (pendingWork >= 512) {
|
|
19920
|
+
yield 512;
|
|
19921
|
+
pendingWork -= 512;
|
|
19922
|
+
}
|
|
19739
19923
|
}
|
|
19740
19924
|
const name = source.slice(start2, offset);
|
|
19925
|
+
pendingWork += offset - start2;
|
|
19926
|
+
while (pendingWork >= 512) {
|
|
19927
|
+
yield 512;
|
|
19928
|
+
pendingWork -= 512;
|
|
19929
|
+
}
|
|
19741
19930
|
const [prefix, localName] = qualifiedNameSync(name, qualifiedNames);
|
|
19742
|
-
return [name, prefix, localName
|
|
19931
|
+
return [name, prefix, localName];
|
|
19743
19932
|
};
|
|
19744
19933
|
while (offset < source.length) {
|
|
19745
19934
|
pendingWork += 1;
|
|
@@ -19776,11 +19965,15 @@ function* parseXmlSteps(input, limits = {}) {
|
|
|
19776
19965
|
}
|
|
19777
19966
|
} else {
|
|
19778
19967
|
for (let index = 0; index < resolved.length; index++) {
|
|
19968
|
+
pendingWork++;
|
|
19969
|
+
if (pendingWork >= 512) {
|
|
19970
|
+
yield 512;
|
|
19971
|
+
pendingWork -= 512;
|
|
19972
|
+
}
|
|
19779
19973
|
const c = resolved.charCodeAt(index);
|
|
19780
19974
|
if (c !== 32 && c !== 9 && c !== 13 && c !== 10)
|
|
19781
19975
|
invalid("text outside the root");
|
|
19782
19976
|
}
|
|
19783
|
-
pendingWork += resolved.length;
|
|
19784
19977
|
while (pendingWork >= 512) {
|
|
19785
19978
|
yield 512;
|
|
19786
19979
|
pendingWork -= 512;
|
|
@@ -19822,8 +20015,7 @@ function* parseXmlSteps(input, limits = {}) {
|
|
|
19822
20015
|
} else if (source.startsWith("<?", offset)) {
|
|
19823
20016
|
const start2 = offset;
|
|
19824
20017
|
offset += 2;
|
|
19825
|
-
const [target
|
|
19826
|
-
pendingWork += wName;
|
|
20018
|
+
const [target] = yield* scanName();
|
|
19827
20019
|
while (pendingWork >= 512) {
|
|
19828
20020
|
yield 512;
|
|
19829
20021
|
pendingWork -= 512;
|
|
@@ -19862,8 +20054,8 @@ function* parseXmlSteps(input, limits = {}) {
|
|
|
19862
20054
|
invalid("DTD and entity declarations are forbidden");
|
|
19863
20055
|
} else if (source.charCodeAt(offset + 1) === 47) {
|
|
19864
20056
|
offset += 2;
|
|
19865
|
-
const [name
|
|
19866
|
-
|
|
20057
|
+
const [name] = yield* scanName();
|
|
20058
|
+
yield* skipWhitespace();
|
|
19867
20059
|
while (pendingWork >= 512) {
|
|
19868
20060
|
yield 512;
|
|
19869
20061
|
pendingWork -= 512;
|
|
@@ -19876,10 +20068,11 @@ function* parseXmlSteps(input, limits = {}) {
|
|
|
19876
20068
|
} else {
|
|
19877
20069
|
offset++;
|
|
19878
20070
|
const repeated = previousEmpty && source.startsWith(previousEmpty.suffix, offset) ? previousEmpty : void 0;
|
|
19879
|
-
const [name, prefix, localName
|
|
20071
|
+
const [name, prefix, localName] = repeated ? [repeated.name, repeated.prefix, repeated.localName] : yield* scanName();
|
|
19880
20072
|
if (repeated)
|
|
19881
20073
|
offset += name.length;
|
|
19882
|
-
|
|
20074
|
+
if (repeated)
|
|
20075
|
+
pendingWork += name.length * 2;
|
|
19883
20076
|
while (pendingWork >= 512) {
|
|
19884
20077
|
yield 512;
|
|
19885
20078
|
pendingWork -= 512;
|
|
@@ -19889,8 +20082,7 @@ function* parseXmlSteps(input, limits = {}) {
|
|
|
19889
20082
|
let namespaces = stack.at(-1)?.namespaces ?? /* @__PURE__ */ new Map([["xml", xmlNamespace]]);
|
|
19890
20083
|
let ownsNamespaces = stack.length === 0;
|
|
19891
20084
|
while (!repeated) {
|
|
19892
|
-
const ws = skipWhitespace();
|
|
19893
|
-
pendingWork += ws;
|
|
20085
|
+
const ws = yield* skipWhitespace();
|
|
19894
20086
|
while (pendingWork >= 512) {
|
|
19895
20087
|
yield 512;
|
|
19896
20088
|
pendingWork -= 512;
|
|
@@ -19900,8 +20092,7 @@ function* parseXmlSteps(input, limits = {}) {
|
|
|
19900
20092
|
break;
|
|
19901
20093
|
if (ws === 0)
|
|
19902
20094
|
invalid("attributes require whitespace");
|
|
19903
|
-
const [attribute, attrPrefix, attrLocal
|
|
19904
|
-
pendingWork += wAttr;
|
|
20095
|
+
const [attribute, attrPrefix, attrLocal] = yield* scanName();
|
|
19905
20096
|
while (pendingWork >= 512) {
|
|
19906
20097
|
yield 512;
|
|
19907
20098
|
pendingWork -= 512;
|
|
@@ -19912,10 +20103,10 @@ function* parseXmlSteps(input, limits = {}) {
|
|
|
19912
20103
|
throw new XmlLimitError("maxAttributes", "XML attribute limit exceeded");
|
|
19913
20104
|
if ((attributes?.size ?? 0) >= maxAttributesPerElement)
|
|
19914
20105
|
throw new XmlLimitError("maxAttributesPerElement", "XML attribute limit exceeded");
|
|
19915
|
-
|
|
20106
|
+
yield* skipWhitespace();
|
|
19916
20107
|
if (source[offset++] !== "=")
|
|
19917
20108
|
invalid("missing attribute equals");
|
|
19918
|
-
|
|
20109
|
+
yield* skipWhitespace();
|
|
19919
20110
|
const quote = source[offset++];
|
|
19920
20111
|
if (quote !== '"' && quote !== "'")
|
|
19921
20112
|
invalid("unquoted attribute");
|
|
@@ -20102,14 +20293,13 @@ function scalar(element) {
|
|
|
20102
20293
|
|
|
20103
20294
|
// ../safe-fs/dist/fs/webdav/webdav.js
|
|
20104
20295
|
var timestampNamespace = "urn:virtual-bash:metadata";
|
|
20105
|
-
|
|
20106
|
-
function preflightTimestamps(property) {
|
|
20296
|
+
function preflightTimestamps(property, maxTimestampPropertyBytes) {
|
|
20107
20297
|
let bytes = 0;
|
|
20108
20298
|
for (const point of property.text) {
|
|
20109
20299
|
const code = point.codePointAt(0);
|
|
20110
20300
|
bytes += code <= 127 ? 1 : code <= 2047 ? 2 : code <= 65535 ? 3 : 4;
|
|
20111
20301
|
if (bytes > maxTimestampPropertyBytes)
|
|
20112
|
-
throw new Error("timestamp property exceeds
|
|
20302
|
+
throw new Error("timestamp property exceeds byte limit");
|
|
20113
20303
|
}
|
|
20114
20304
|
const text = scalar(property);
|
|
20115
20305
|
let offset = 0;
|
|
@@ -20350,6 +20540,7 @@ var WebDavFileSystem = class {
|
|
|
20350
20540
|
headers;
|
|
20351
20541
|
maxResponseBytes;
|
|
20352
20542
|
maxXmlBytes;
|
|
20543
|
+
maxTimestampPropertyBytes;
|
|
20353
20544
|
maxEntries;
|
|
20354
20545
|
xmlLimits;
|
|
20355
20546
|
timeoutMs;
|
|
@@ -20419,6 +20610,7 @@ var WebDavFileSystem = class {
|
|
|
20419
20610
|
streamingAppend: this.requestStreamSupport !== false
|
|
20420
20611
|
});
|
|
20421
20612
|
this.maxResponseBytes = options.maxResponseBytes === void 0 ? Infinity : positive(options.maxResponseBytes, "maxResponseBytes", false, true);
|
|
20613
|
+
this.maxTimestampPropertyBytes = positive(options.maxTimestampPropertyBytes ?? Infinity, "maxTimestampPropertyBytes", true, true);
|
|
20422
20614
|
this.maxXmlBytes = options.maxXmlBytes === void 0 ? Infinity : positive(options.maxXmlBytes, "maxXmlBytes", false, true);
|
|
20423
20615
|
this.xmlLimits = Object.freeze({ ...options.xmlLimits });
|
|
20424
20616
|
for (const [name, value] of Object.entries(this.xmlLimits))
|
|
@@ -20854,7 +21046,7 @@ var WebDavFileSystem = class {
|
|
|
20854
21046
|
let mtimeMs = date("getlastmodified") ?? 0;
|
|
20855
21047
|
let atimeMs = 0;
|
|
20856
21048
|
if (timestampProperty) {
|
|
20857
|
-
const timestamps = JSON.parse(preflightTimestamps(timestampProperty));
|
|
21049
|
+
const timestamps = JSON.parse(preflightTimestamps(timestampProperty, this.maxTimestampPropertyBytes));
|
|
20858
21050
|
if (typeof timestamps !== "object" || timestamps === null || !("version" in timestamps) || timestamps.version !== 1 || !("etag" in timestamps) || typeof timestamps.etag !== "string" || !/^"[\x21\x23-\x7e\x80-\xff]*"$/.test(timestamps.etag) || !("type" in timestamps) || timestamps.type !== "file" && timestamps.type !== "directory" || !("atimeMs" in timestamps) || typeof timestamps.atimeMs !== "number" || !Number.isFinite(timestamps.atimeMs) || Math.abs(timestamps.atimeMs) > 864e13 || !("mtimeMs" in timestamps) || typeof timestamps.mtimeMs !== "number" || !Number.isFinite(timestamps.mtimeMs) || Math.abs(timestamps.mtimeMs) > 864e13)
|
|
20859
21051
|
throw new Error("invalid timestamp property");
|
|
20860
21052
|
if (timestamps.etag === validator && timestamps.type === (directory ? "directory" : "file")) {
|
|
@@ -21857,7 +22049,7 @@ var S3FileSystem = class {
|
|
|
21857
22049
|
const modified = metadata?.LastModified?.getTime() ?? 0;
|
|
21858
22050
|
if (!Number.isFinite(modified))
|
|
21859
22051
|
fail2("EIO", "stat", "", "transport returned an invalid LastModified");
|
|
21860
|
-
const
|
|
22052
|
+
const timestamp2 = (key2, fallback) => {
|
|
21861
22053
|
const value = metadata?.Metadata?.[key2];
|
|
21862
22054
|
if (value === void 0)
|
|
21863
22055
|
return fallback;
|
|
@@ -21874,8 +22066,8 @@ var S3FileSystem = class {
|
|
|
21874
22066
|
type,
|
|
21875
22067
|
size,
|
|
21876
22068
|
mode: (type === "directory" ? 16384 : 32768) | mode,
|
|
21877
|
-
mtimeMs:
|
|
21878
|
-
atimeMs:
|
|
22069
|
+
mtimeMs: timestamp2("virtual-bash-mtime", modified),
|
|
22070
|
+
atimeMs: timestamp2("virtual-bash-atime", 0),
|
|
21879
22071
|
ctimeMs: modified
|
|
21880
22072
|
};
|
|
21881
22073
|
}
|
|
@@ -23780,8 +23972,10 @@ Redirect URI: ${textLine(request.redirectUri)}
|
|
|
23780
23972
|
export {
|
|
23781
23973
|
accessRemoteMcpResources,
|
|
23782
23974
|
authenticateRemoteMcpServer,
|
|
23975
|
+
beginRemoteMcpAuthorization,
|
|
23783
23976
|
bindRemoteMcpConfiguration,
|
|
23784
23977
|
compileToolArguments,
|
|
23978
|
+
completeRemoteMcpAuthorization,
|
|
23785
23979
|
createRemoteMcpCommands,
|
|
23786
23980
|
createRemoteMcpManagementCommand,
|
|
23787
23981
|
fetchRemoteMcpSchema,
|