@farm.js/core 0.1.66 → 0.1.67
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/dist/{agent-mcp-handler-QLFDDTYN.mjs → agent-mcp-handler-AZ7QW4UP.mjs} +5 -5
- package/dist/{agent-mcp-handler-OXT73ZBY.cjs → agent-mcp-handler-FER4MQDF.cjs} +6 -6
- package/dist/{agent-mcp.d-QD2WZ9BS.d.ts → agent-mcp.d-BFu9xHAi.d.ts} +1 -1
- package/dist/{agent-mcp.d-CO_ABmNK.d.mts → agent-mcp.d-DWyWkTSy.d.mts} +1 -1
- package/dist/agent-runtime.cjs +6 -5
- package/dist/agent-runtime.d.mts +6 -6
- package/dist/agent-runtime.d.ts +6 -6
- package/dist/agent-runtime.mjs +5 -4
- package/dist/analyzer-KVZGVY5Q.cjs +16 -0
- package/dist/{analyzer-4UFP4HVP.mjs → analyzer-TTIIXXMQ.mjs} +2 -2
- package/dist/api/client.cjs +12 -2
- package/dist/api/client.d.mts +4 -4
- package/dist/api/client.d.ts +4 -4
- package/dist/api/client.mjs +12 -2
- package/dist/api/client.native.cjs +12 -2
- package/dist/api/client.native.d.mts +5 -5
- package/dist/api/client.native.d.ts +5 -5
- package/dist/api/client.native.mjs +12 -2
- package/dist/api/node.cjs +223 -0
- package/dist/api/node.d.mts +59 -0
- package/dist/api/node.d.ts +59 -0
- package/dist/api/node.mjs +223 -0
- package/dist/api/route-manager.cjs +11 -11
- package/dist/api/route-manager.d.mts +10 -9
- package/dist/api/route-manager.d.ts +10 -9
- package/dist/api/route-manager.mjs +10 -10
- package/dist/api/runtime.cjs +11 -7
- package/dist/api/runtime.d.mts +7 -7
- package/dist/api/runtime.d.ts +7 -7
- package/dist/api/runtime.mjs +10 -6
- package/dist/{api-client.d-BNLXNCXJ.d.mts → api-client.d-Bp35zMqR.d.mts} +1 -1
- package/dist/{api-client.d-ddQBNGtu.d.ts → api-client.d-CFI_xL0V.d.ts} +1 -1
- package/dist/api.cjs +17 -13
- package/dist/api.d.mts +11 -10
- package/dist/api.d.ts +11 -10
- package/dist/api.mjs +16 -12
- package/dist/{app-manifest.d-BpKxiU_E.d.mts → app-manifest.d-CRmjN5j9.d.mts} +1 -1
- package/dist/{app-manifest.d-DDmNkYQQ.d.ts → app-manifest.d-CwfhGrVR.d.ts} +1 -1
- package/dist/app-markdown.cjs +5 -5
- package/dist/app-markdown.d.mts +7 -7
- package/dist/app-markdown.d.ts +7 -7
- package/dist/app-markdown.mjs +4 -4
- package/dist/{app.d-x68Cwr0_.d.ts → app.d-BX9LVTiP.d.ts} +50 -9
- package/dist/{app.d-kuoVWhWM.d.mts → app.d-uBBUxwyV.d.mts} +50 -9
- package/dist/{chunk-V56632LA.cjs → chunk-22IWL4YD.cjs} +19 -5
- package/dist/{chunk-RY4ABNPE.cjs → chunk-23PVOIPT.cjs} +3 -3
- package/dist/{chunk-5C7XMKQ4.cjs → chunk-2AFW7673.cjs} +6 -1
- package/dist/{chunk-SYW346ZN.cjs → chunk-2LHZD3OP.cjs} +1 -21
- package/dist/{chunk-ZZI56IUY.mjs → chunk-2ZOYOYEE.mjs} +13 -13
- package/dist/{chunk-RVGSVQWT.mjs → chunk-3T5TLFCQ.mjs} +10 -5
- package/dist/{chunk-XBSKPLHF.cjs → chunk-3T7ALZJF.cjs} +2 -2
- package/dist/{chunk-7ONGIFYX.cjs → chunk-4DRINDGN.cjs} +319 -138
- package/dist/{chunk-O6L3YYPM.cjs → chunk-4E57QHPW.cjs} +8 -16
- package/dist/{chunk-WKPBIT5Q.cjs → chunk-4HGLJOXZ.cjs} +6 -6
- package/dist/{chunk-JGAE5XPL.cjs → chunk-4JX3M4C6.cjs} +2 -1
- package/dist/{chunk-CJNAUEVC.mjs → chunk-4QENVMG7.mjs} +1 -1
- package/dist/{chunk-CHYTADNK.cjs → chunk-556H7JCE.cjs} +65 -48
- package/dist/{chunk-OLIGNTWU.cjs → chunk-5NFQ6AZI.cjs} +7 -7
- package/dist/{chunk-6HRAK7I5.mjs → chunk-5OFNUETM.mjs} +8 -2
- package/dist/{chunk-TZVUF5JJ.mjs → chunk-5TA63JD3.mjs} +4 -4
- package/dist/{chunk-RD623KW4.cjs → chunk-67MZTLTF.cjs} +21 -3
- package/dist/chunk-6I4BFRE7.cjs +51 -0
- package/dist/{chunk-4TVPYN32.cjs → chunk-6R53ZWX2.cjs} +7 -7
- package/dist/{chunk-MGKW5XZE.cjs → chunk-6SQZXRJ2.cjs} +7 -7
- package/dist/{chunk-MPJEIHW2.cjs → chunk-6V5YWI4W.cjs} +2 -2
- package/dist/{chunk-BM2LH2JM.mjs → chunk-6YBYX4K4.mjs} +13 -12
- package/dist/{chunk-X3XUZWRB.mjs → chunk-724MGMIL.mjs} +17 -3
- package/dist/{chunk-K5EW7GUU.mjs → chunk-7BIW7VCW.mjs} +13 -5
- package/dist/{chunk-HPP2II4Z.mjs → chunk-7PJARAQQ.mjs} +1 -1
- package/dist/{chunk-LEJDW34D.cjs → chunk-7PPLTD3P.cjs} +3 -3
- package/dist/{chunk-TGULJSHD.mjs → chunk-AJNBTOVQ.mjs} +20 -9
- package/dist/{chunk-FBEBSAVI.cjs → chunk-AKIQ54FK.cjs} +82 -63
- package/dist/{chunk-2NGZFOKG.mjs → chunk-AOIUYHPH.mjs} +2 -2
- package/dist/{chunk-ZEXE4TGY.mjs → chunk-AQDLVHNF.mjs} +230 -110
- package/dist/{chunk-NKRZLQUK.mjs → chunk-AQIO3RNL.mjs} +1 -1
- package/dist/chunk-AQIRXBBY.cjs +26 -0
- package/dist/chunk-AZ6IW6SF.mjs +28 -0
- package/dist/{chunk-QMDU6QHN.mjs → chunk-B6RBJJ5G.mjs} +1 -1
- package/dist/{chunk-I32V5CZL.cjs → chunk-BDYM2TN3.cjs} +28 -17
- package/dist/{chunk-JLDNXURZ.cjs → chunk-BZWTBELF.cjs} +32 -32
- package/dist/{chunk-ITV4QQL2.cjs → chunk-C6CUUBY5.cjs} +14 -3
- package/dist/{chunk-YN6BHOYY.cjs → chunk-CL52PD6D.cjs} +10 -3
- package/dist/{chunk-UBMHQVWN.mjs → chunk-CO3YMZFD.mjs} +1 -1
- package/dist/{chunk-XURDCXNH.cjs → chunk-CSLHNBPS.cjs} +6 -6
- package/dist/{chunk-CNNBFGL5.cjs → chunk-DB2HSHQA.cjs} +14 -14
- package/dist/{chunk-XQSYOVCW.cjs → chunk-DBYNZIIQ.cjs} +13 -5
- package/dist/{chunk-DVKH2RVN.cjs → chunk-DCXSIEFE.cjs} +40 -41
- package/dist/{chunk-D4MRNBVF.cjs → chunk-DGOFR7D5.cjs} +2 -2
- package/dist/{chunk-QTD6EMN2.mjs → chunk-DQ2DI3Y7.mjs} +11 -4
- package/dist/chunk-DXZ57EPE.mjs +375 -0
- package/dist/{chunk-SA7MLSP4.mjs → chunk-E3HDJCWF.mjs} +3 -3
- package/dist/{chunk-BYRZ5VTH.mjs → chunk-E6CD45JK.mjs} +30 -31
- package/dist/{chunk-752XUZIM.cjs → chunk-EGIY4A7V.cjs} +6 -6
- package/dist/chunk-EIVGPQN5.mjs +51 -0
- package/dist/{chunk-KPAJWD3N.mjs → chunk-EYPSKXO4.mjs} +1 -1
- package/dist/{chunk-E552H232.cjs → chunk-F43OG25P.cjs} +1 -1
- package/dist/{chunk-UAQD67HM.mjs → chunk-F7JKVHU2.mjs} +1 -1
- package/dist/{chunk-QISW423S.cjs → chunk-FPBOAG6N.cjs} +2 -2
- package/dist/{chunk-2C5L5RPM.cjs → chunk-FT6KJHS3.cjs} +71 -38
- package/dist/{chunk-ES2LD2YD.mjs → chunk-GCRT6GJG.mjs} +18 -0
- package/dist/{chunk-5OJVKXFV.cjs → chunk-GDM3ZD2O.cjs} +10 -8
- package/dist/{chunk-EMDGXYUD.mjs → chunk-GJ7QVFAG.mjs} +16 -7
- package/dist/{chunk-TGSEVBPO.mjs → chunk-GJEC5S4V.mjs} +11 -0
- package/dist/{chunk-672ISQIG.mjs → chunk-GTV2ABO7.mjs} +218 -37
- package/dist/{chunk-MPIGW42F.mjs → chunk-H37MDCPR.mjs} +1 -1
- package/dist/{chunk-HNAISJFD.cjs → chunk-HDPT6OYE.cjs} +9 -3
- package/dist/{chunk-25T5VXOE.mjs → chunk-HFHJJXSV.mjs} +106 -19
- package/dist/{chunk-ZNH6NR3H.cjs → chunk-HJZZSBVK.cjs} +2 -2
- package/dist/{chunk-BIF5MLTH.cjs → chunk-HM7AGSKU.cjs} +1 -1
- package/dist/{chunk-GL7N5UHF.cjs → chunk-HNVAZGQD.cjs} +20 -9
- package/dist/{chunk-SK7QSNWE.mjs → chunk-HP2DQGQH.mjs} +1 -1
- package/dist/{chunk-435QJNC2.mjs → chunk-HRPTMX5C.mjs} +4 -4
- package/dist/{chunk-K7OZAVOI.mjs → chunk-IFR74W6S.mjs} +46 -13
- package/dist/{chunk-5A77OEIG.cjs → chunk-IHTDLCDJ.cjs} +5 -5
- package/dist/{chunk-VQJHT2ND.mjs → chunk-IRA2CZAY.mjs} +2 -2
- package/dist/{chunk-OYZXVBZP.cjs → chunk-IUKBPBM7.cjs} +2 -1
- package/dist/chunk-J6TZRYCO.cjs +22 -0
- package/dist/{chunk-WYAXRIYP.cjs → chunk-J7JHVCWA.cjs} +8 -8
- package/dist/chunk-JSOCDYER.cjs +375 -0
- package/dist/{chunk-TKK5QHKZ.mjs → chunk-JVM3DKZE.mjs} +3 -3
- package/dist/{chunk-UPYIFH2H.cjs → chunk-JWLRBDDC.cjs} +2 -2
- package/dist/{chunk-BQWBHWEW.mjs → chunk-JWSI5WO4.mjs} +1 -1
- package/dist/{chunk-OLGQZRW6.mjs → chunk-JZBU7V4D.mjs} +37 -17
- package/dist/{chunk-ONG4RDW3.mjs → chunk-JZGL2PIH.mjs} +13 -3
- package/dist/chunk-K63OWRY2.mjs +22 -0
- package/dist/{chunk-TUPKMMXT.mjs → chunk-K6HIIWUB.mjs} +1 -1
- package/dist/{chunk-MESQF2JC.mjs → chunk-K6SXMVXO.mjs} +2 -2
- package/dist/{chunk-L2JG337G.cjs → chunk-K6VFYFOY.cjs} +33 -31
- package/dist/{chunk-3CCAICF7.cjs → chunk-KCY52OUQ.cjs} +4 -4
- package/dist/{chunk-EZ34EHQP.mjs → chunk-KI3MU7B5.mjs} +1 -1
- package/dist/{chunk-GHNW564E.mjs → chunk-KSZK34HU.mjs} +30 -10
- package/dist/{chunk-RFKTJTWZ.mjs → chunk-KWFNUODD.mjs} +2 -1
- package/dist/{chunk-ECKQFEX2.mjs → chunk-LENKRGBV.mjs} +8 -6
- package/dist/{chunk-752IHQTD.cjs → chunk-LPIZMU7D.cjs} +12 -12
- package/dist/{chunk-HEPJIKKQ.cjs → chunk-MCSRMEQV.cjs} +2 -2
- package/dist/{chunk-DQF3QLOH.mjs → chunk-ME7RVELR.mjs} +3 -2
- package/dist/{chunk-E4UDLFWR.cjs → chunk-N5DQMOAG.cjs} +588 -677
- package/dist/{chunk-O4F3JUST.mjs → chunk-NDDRTFN4.mjs} +4 -0
- package/dist/{chunk-CBOEJ5Z4.cjs → chunk-OB3IFUK6.cjs} +133 -46
- package/dist/{chunk-R62SF5R4.mjs → chunk-OB45EAQL.mjs} +6 -1
- package/dist/{chunk-SYXPWJ7N.cjs → chunk-OFBLGH6V.cjs} +17 -18
- package/dist/{chunk-VQ4NWOWO.mjs → chunk-OGVTUGMU.mjs} +5 -13
- package/dist/{chunk-3UZVPO72.mjs → chunk-OIOPQ25L.mjs} +6 -7
- package/dist/{chunk-2XGBJSDV.cjs → chunk-OO7DYIJD.cjs} +73 -24
- package/dist/{chunk-27FPUFWR.mjs → chunk-P2NBQ5JI.mjs} +1 -1
- package/dist/{chunk-HZPKJRYA.cjs → chunk-PDFFYZAT.cjs} +2 -2
- package/dist/{chunk-GSVJ3IIF.cjs → chunk-PHCJJJZV.cjs} +2 -2
- package/dist/{chunk-EVMXPJCB.mjs → chunk-PKMUQ7LM.mjs} +2 -1
- package/dist/{chunk-4OSOLDPL.cjs → chunk-PL6RTBDE.cjs} +2 -2
- package/dist/{chunk-OAJOQU5J.mjs → chunk-PLJKJJ2H.mjs} +82 -63
- package/dist/{chunk-WMTBBQHY.cjs → chunk-PPX7UOFY.cjs} +271 -151
- package/dist/{chunk-6XQSPIN6.cjs → chunk-PWKAX5MS.cjs} +13 -3
- package/dist/{chunk-7XGWBPQQ.cjs → chunk-Q37INCXG.cjs} +13 -8
- package/dist/{chunk-OP7LHY4Y.cjs → chunk-Q5UX55YA.cjs} +1445 -601
- package/dist/{chunk-NHQM2Q4I.cjs → chunk-QGQP6QKO.cjs} +2 -2
- package/dist/{chunk-IT6WRNGB.cjs → chunk-QITSS4TD.cjs} +1381 -626
- package/dist/{chunk-4ZJ5C7UJ.cjs → chunk-QIXEU2WV.cjs} +19 -10
- package/dist/{chunk-HCGWDRZO.mjs → chunk-QJVW76JG.mjs} +17 -6
- package/dist/{chunk-FJWN7RV4.cjs → chunk-QO43L7Z4.cjs} +38 -8
- package/dist/{chunk-ZIHWAN55.cjs → chunk-RE5E2G5S.cjs} +1 -1
- package/dist/chunk-RWR7SMD7.cjs +50 -0
- package/dist/{chunk-7PTISZSQ.cjs → chunk-S7MWSFFP.cjs} +4 -0
- package/dist/chunk-SD6JGJOM.mjs +50 -0
- package/dist/{chunk-7H4SVNC4.cjs → chunk-SPP3EZTJ.cjs} +46 -26
- package/dist/{chunk-E4RDMG3K.mjs → chunk-TEG6HJVF.mjs} +4 -4
- package/dist/{chunk-WAY6LOQH.mjs → chunk-TEJ67GD2.mjs} +1 -1
- package/dist/{chunk-IFTGERT3.mjs → chunk-TTXIITYA.mjs} +49 -0
- package/dist/{chunk-ZFWYCVKS.mjs → chunk-TY5KCYDE.mjs} +22 -4
- package/dist/{chunk-W2ZXMMHA.mjs → chunk-UHE5JUKB.mjs} +1 -1
- package/dist/{chunk-OB7VKCUZ.mjs → chunk-UHNSY2PQ.mjs} +1302 -458
- package/dist/{chunk-UJ3R2AH2.cjs → chunk-UPOYKX4S.cjs} +5 -5
- package/dist/{chunk-2DLGV2ZG.mjs → chunk-UTUS6JUH.mjs} +1 -21
- package/dist/{chunk-WVYRLP5E.mjs → chunk-V5MQMQ2P.mjs} +1 -1
- package/dist/{chunk-VBCQ5WOI.cjs → chunk-V5RTHYJB.cjs} +30 -10
- package/dist/{chunk-WFWFECDW.mjs → chunk-VK54PDQ6.mjs} +25 -5
- package/dist/{chunk-LQNW3ABP.cjs → chunk-VX2HZGC7.cjs} +14 -14
- package/dist/{chunk-XBSLKXBL.mjs → chunk-WDD5CTZW.mjs} +49 -32
- package/dist/{chunk-EMNKZGF4.mjs → chunk-WGHY3OL5.mjs} +354 -443
- package/dist/{chunk-A2MN5PQJ.mjs → chunk-WMLSZAKN.mjs} +9 -9
- package/dist/{chunk-3EEET2Q5.cjs → chunk-WUTFJOV7.cjs} +32 -12
- package/dist/chunk-WVQNXXNE.cjs +28 -0
- package/dist/{chunk-Y5TOT5F6.cjs → chunk-X3MHKLCO.cjs} +5 -5
- package/dist/{chunk-Z7P2BTZ3.cjs → chunk-XGTFLG73.cjs} +30 -12
- package/dist/{chunk-AZUUKA66.mjs → chunk-XNZWMXCF.mjs} +1090 -335
- package/dist/{chunk-FIR62CR3.mjs → chunk-XUES6OET.mjs} +1 -1
- package/dist/{chunk-XCXHQBMM.mjs → chunk-Y2LU4LE5.mjs} +1 -1
- package/dist/{chunk-5J45H65F.mjs → chunk-Y5LEPEVH.mjs} +1 -1
- package/dist/{chunk-BT4SEFLC.cjs → chunk-YAEN3L2F.cjs} +3 -2
- package/dist/chunk-YFTGIHNC.mjs +26 -0
- package/dist/{chunk-KL7SHLQB.mjs → chunk-YGJ5P3TJ.mjs} +31 -1
- package/dist/{chunk-O75GQVUK.mjs → chunk-YQYTQJZN.mjs} +1 -1
- package/dist/{chunk-X4K7TYN6.cjs → chunk-YVTS3S3F.cjs} +24 -23
- package/dist/{chunk-72KABRWN.mjs → chunk-ZJGFAW5U.mjs} +5 -3
- package/dist/{chunk-TNBJ4LZG.mjs → chunk-ZPKJPM7K.mjs} +4 -4
- package/dist/client/lifecycle.cjs +2 -2
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/client/lifecycle.mjs +1 -1
- package/dist/{client-component.d-D74pqdea.d.mts → client-component.d-CDRvRmbU.d.mts} +2 -2
- package/dist/{client-component.d-D8VcypQA.d.ts → client-component.d-DWRKyAp5.d.ts} +2 -2
- package/dist/client-plugins.cjs +2 -2
- package/dist/{client-plugins.d-D4-6hNx7.d.mts → client-plugins.d-BNILjfX3.d.mts} +94 -140
- package/dist/{client-plugins.d-CXElzotB.d.ts → client-plugins.d-CrKZiNSN.d.ts} +94 -140
- package/dist/client-plugins.d.mts +6 -6
- package/dist/client-plugins.d.ts +6 -6
- package/dist/client-plugins.mjs +1 -1
- package/dist/client.cjs +11 -9
- package/dist/client.d.mts +13 -13
- package/dist/client.d.ts +13 -13
- package/dist/client.mjs +10 -8
- package/dist/{config.d-qt-mE8O5.d.mts → config.d-BKIhJtmr.d.mts} +7 -2
- package/dist/{config.d-qt-mE8O5.d.ts → config.d-BKIhJtmr.d.ts} +7 -2
- package/dist/config.d.mts +6 -6
- package/dist/config.d.ts +6 -6
- package/dist/cron.cjs +2 -2
- package/dist/cron.mjs +1 -1
- package/dist/deferred.cjs +2 -2
- package/dist/deferred.mjs +1 -1
- package/dist/deployment.cjs +2 -2
- package/dist/deployment.mjs +1 -1
- package/dist/desktop.d.mts +7 -7
- package/dist/desktop.d.ts +7 -7
- package/dist/{devtools-N2JQCMXB.cjs → devtools-RZVT4JVN.cjs} +36 -32
- package/dist/{devtools-NZUVNUP3.mjs → devtools-UFQYT3VA.mjs} +31 -27
- package/dist/docs.cjs +26 -25
- package/dist/docs.d.mts +20 -8
- package/dist/docs.d.ts +20 -8
- package/dist/docs.mjs +25 -24
- package/dist/env-types.cjs +3 -3
- package/dist/env-types.mjs +2 -2
- package/dist/environment/vite.cjs +5 -5
- package/dist/environment/vite.mjs +4 -4
- package/dist/headers.cjs +3 -3
- package/dist/headers.mjs +2 -2
- package/dist/image/server.d.mts +1 -1
- package/dist/image/server.d.ts +1 -1
- package/dist/image/sharp.d.mts +1 -1
- package/dist/image/sharp.d.ts +1 -1
- package/dist/{image-config.d-CeDgNyX4.d.mts → image-config.d-ByhQ0TT7.d.mts} +3 -1
- package/dist/{image-config.d-CeDgNyX4.d.ts → image-config.d-ByhQ0TT7.d.ts} +3 -1
- package/dist/image.cjs +6 -6
- package/dist/image.d.mts +1 -1
- package/dist/image.d.ts +1 -1
- package/dist/image.mjs +1 -1
- package/dist/index.cjs +142 -127
- package/dist/{index.d-SSgYDv4D.d.mts → index.d-Bdm6866n.d.mts} +1 -1
- package/dist/{index.d-A_x10zGS.d.ts → index.d-Dey5T14f.d.ts} +1 -1
- package/dist/index.d.mts +31 -82
- package/dist/index.d.ts +31 -82
- package/dist/index.mjs +213 -198
- package/dist/{integration-orm-52GPGTHO.cjs → integrations/orm.cjs} +5 -5
- package/dist/integrations/orm.d.mts +33 -0
- package/dist/integrations/orm.d.ts +33 -0
- package/dist/{integration-orm-CO23MSFE.mjs → integrations/orm.mjs} +5 -5
- package/dist/integrations.cjs +6 -5
- package/dist/integrations.d.mts +6 -6
- package/dist/integrations.d.ts +6 -6
- package/dist/integrations.mjs +5 -4
- package/dist/internal/app-markdown-runtime.cjs +4 -4
- package/dist/internal/app-markdown-runtime.d.mts +17 -8
- package/dist/internal/app-markdown-runtime.d.ts +17 -8
- package/dist/internal/app-markdown-runtime.mjs +3 -3
- package/dist/internal/build-runtime.cjs +68 -66
- package/dist/internal/build-runtime.d.mts +8 -8
- package/dist/internal/build-runtime.d.ts +8 -8
- package/dist/internal/build-runtime.mjs +67 -65
- package/dist/internal/cli-runtime.cjs +45 -44
- package/dist/internal/cli-runtime.mjs +44 -43
- package/dist/internal/client-error-overlay.cjs +6 -6
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +60 -6
- package/dist/internal/client-runtime.d.mts +40 -11
- package/dist/internal/client-runtime.d.ts +40 -11
- package/dist/internal/client-runtime.mjs +58 -4
- package/dist/internal/compression-runtime.d.mts +6 -6
- package/dist/internal/compression-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.cjs +25 -24
- package/dist/internal/config-runtime.d.mts +9 -9
- package/dist/internal/config-runtime.d.ts +9 -9
- package/dist/internal/config-runtime.mjs +24 -23
- package/dist/internal/docs-precompiled-runtime.cjs +16 -5
- package/dist/internal/docs-precompiled-runtime.d.mts +7 -0
- package/dist/internal/docs-precompiled-runtime.d.ts +7 -0
- package/dist/internal/docs-precompiled-runtime.mjs +15 -4
- package/dist/internal/infra-analytics-runtime.cjs +11 -11
- package/dist/internal/infra-analytics-runtime.mjs +9 -9
- package/dist/internal/islands-runtime.cjs +33 -4
- package/dist/internal/islands-runtime.d.mts +1 -1
- package/dist/internal/islands-runtime.d.ts +1 -1
- package/dist/internal/islands-runtime.mjs +31 -2
- package/dist/internal/native-server-fns.cjs +5 -5
- package/dist/internal/native-server-fns.mjs +4 -4
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +53 -39
- package/dist/internal/production-runtime.d.mts +16 -15
- package/dist/internal/production-runtime.d.ts +16 -15
- package/dist/internal/production-runtime.mjs +68 -54
- package/dist/internal/react-cache.cjs +3 -3
- package/dist/internal/react-cache.mjs +1 -1
- package/dist/{lifecycle.d-C2aLBOwu.d.ts → lifecycle.d-keQs5Swc.d.mts} +7 -1
- package/dist/{lifecycle.d-C2aLBOwu.d.mts → lifecycle.d-keQs5Swc.d.ts} +7 -1
- package/dist/{manager-H5ZM3HAM.mjs → manager-JIA66YJ2.mjs} +4 -3
- package/dist/manager-JOHU6BQI.cjs +15 -0
- package/dist/markdown.cjs +7 -3
- package/dist/markdown.d.mts +6 -6
- package/dist/markdown.d.ts +6 -6
- package/dist/markdown.mjs +6 -2
- package/dist/middleware.cjs +10 -10
- package/dist/middleware.d.mts +8 -8
- package/dist/middleware.d.ts +8 -8
- package/dist/middleware.mjs +9 -9
- package/dist/mobile.d.mts +4 -4
- package/dist/mobile.d.ts +4 -4
- package/dist/mount.d-BP0nLYQO.d.mts +38 -0
- package/dist/mount.d-CkiPky_F.d.ts +38 -0
- package/dist/{native-server-fn-handler-GLRHAYWV.mjs → native-server-fn-handler-EP5AFJYE.mjs} +5 -5
- package/dist/{native-server-fn-handler-J5MYRXN6.cjs → native-server-fn-handler-QRTXGZA4.cjs} +6 -6
- package/dist/{native-tree-7LPH57Z4.cjs → native-tree-W2SSJB3Y.cjs} +4 -4
- package/dist/{native-tree-VV6WN3GX.mjs → native-tree-Y5YQANW7.mjs} +3 -3
- package/dist/{navigation-delegate.d-DQVYKoaZ.d.mts → navigation-delegate.d-CdBP-hkZ.d.mts} +1 -1
- package/dist/{navigation-delegate.d-GghbHJuK.d.ts → navigation-delegate.d-DchcGzAQ.d.ts} +1 -1
- package/dist/navigation.cjs +8 -7
- package/dist/navigation.d.mts +9 -9
- package/dist/navigation.d.ts +9 -9
- package/dist/navigation.mjs +7 -6
- package/dist/{nitro-DD4QCA66.mjs → nitro-55YOZWRA.mjs} +11 -11
- package/dist/{nitro-VRDX2H4M.cjs → nitro-EEX2J3KB.cjs} +13 -13
- package/dist/{plugin-53SY5YBS.mjs → plugin-SAS22JL7.mjs} +4 -3
- package/dist/{plugin-HZIBL3DW.cjs → plugin-WIU4GDD4.cjs} +5 -4
- package/dist/plugin.cjs +61 -59
- package/dist/plugin.d.mts +8 -8
- package/dist/plugin.d.ts +8 -8
- package/dist/plugin.mjs +60 -58
- package/dist/{production-runtime.d-Bzns3NW9.d.ts → production-runtime.d-Dou_Htas.d.ts} +1 -1
- package/dist/{production-runtime.d-DiFa5vHW.d.mts → production-runtime.d-VwsBzIee.d.mts} +1 -1
- package/dist/query/client.cjs +9 -7
- package/dist/query/client.mjs +5 -3
- package/dist/{render-plan.d-CL_Ikfg_.d.ts → render-plan.d-D8UakAIk.d.ts} +1 -1
- package/dist/{render-plan.d-CcF0MeCf.d.mts → render-plan.d-LKymStDJ.d.mts} +1 -1
- package/dist/renderer/none/server.cjs +35 -0
- package/dist/renderer/none/server.d.mts +21 -0
- package/dist/renderer/none/server.d.ts +21 -0
- package/dist/renderer/none/server.mjs +35 -0
- package/dist/renderer/react/server.cjs +2 -2
- package/dist/renderer/react/server.mjs +3 -3
- package/dist/renderer-client.cjs +8 -6
- package/dist/renderer-client.d.mts +9 -9
- package/dist/renderer-client.d.ts +9 -9
- package/dist/renderer-client.mjs +5 -3
- package/dist/renderer.cjs +6 -2
- package/dist/renderer.d.mts +20 -2
- package/dist/renderer.d.ts +20 -2
- package/dist/renderer.mjs +5 -1
- package/dist/request.cjs +2 -2
- package/dist/{request.d-B1RnTLri.d.ts → request.d-B928QjWy.d.ts} +1 -1
- package/dist/{request.d-DarDOCk9.d.mts → request.d-KG-4d2eG.d.mts} +1 -1
- package/dist/request.d.mts +7 -7
- package/dist/request.d.ts +7 -7
- package/dist/request.mjs +1 -1
- package/dist/{route-rendering.d-BTUYCIj4.d.ts → route-rendering.d-DoEe_w9t.d.ts} +1 -1
- package/dist/{route-rendering.d-D_2Ual0-.d.mts → route-rendering.d-NIHQeb4m.d.mts} +1 -1
- package/dist/{route.d-BaVH3V0w.d.mts → route.d-DrXkpvcg.d.mts} +1 -1
- package/dist/{route.d-DBTEqifW.d.ts → route.d-hs-_cyHn.d.ts} +1 -1
- package/dist/{router.d-Cuv1jntg.d.mts → router.d-B8PkJSGp.d.mts} +1 -1
- package/dist/{router.d-CMANF6da.d.ts → router.d-DYnRHQwz.d.ts} +1 -1
- package/dist/routes.cjs +3 -3
- package/dist/{routes.d-c2HKfrfL.d.mts → routes.d-DgZ_jgGG.d.mts} +1 -1
- package/dist/{routes.d-B6yFe6jm.d.ts → routes.d-uUBZyWoK.d.ts} +1 -1
- package/dist/routes.d.mts +6 -6
- package/dist/routes.d.ts +6 -6
- package/dist/routes.mjs +2 -2
- package/dist/{rsc-pipeline-7PNVJSTR.mjs → rsc-pipeline-4OJ5ZQNZ.mjs} +26 -25
- package/dist/{rsc-pipeline-Z7QBZOIJ.cjs → rsc-pipeline-7K5H2RPH.cjs} +27 -26
- package/dist/{runtime-QQHX4BP3.mjs → runtime-U7O3HZOZ.mjs} +60 -34
- package/dist/{runtime-FKFCUHSK.cjs → runtime-X52Q7JFR.cjs} +70 -44
- package/dist/{runtime.d-wvh4ngU0.d.mts → runtime.d-BxQIzwfy.d.mts} +11 -3
- package/dist/{runtime.d-C3RQUj6_.d.ts → runtime.d-DP7mEkEF.d.ts} +11 -3
- package/dist/{schema-dev-notice-JMXEQWIQ.mjs → schema-dev-notice-C2JINRZI.mjs} +3 -2
- package/dist/{schema-dev-notice-PLBFDTOF.cjs → schema-dev-notice-X7GG7QVB.cjs} +5 -4
- package/dist/schema.cjs +6 -2
- package/dist/schema.d-Dny9pnrm.d.mts +298 -0
- package/dist/schema.d-Dny9pnrm.d.ts +298 -0
- package/dist/schema.d.mts +1 -115
- package/dist/schema.d.ts +1 -115
- package/dist/schema.mjs +5 -1
- package/dist/server-fn-client.d.mts +2 -2
- package/dist/server-fn-client.d.ts +2 -2
- package/dist/server-fn.cjs +5 -5
- package/dist/server-fn.mjs +4 -4
- package/dist/server-plugins.cjs +7 -7
- package/dist/server-plugins.d.mts +16 -10
- package/dist/server-plugins.d.ts +16 -10
- package/dist/server-plugins.mjs +8 -8
- package/dist/server-query.cjs +6 -6
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +160 -120
- package/dist/server.d.mts +20 -14
- package/dist/server.d.ts +20 -14
- package/dist/server.mjs +138 -98
- package/dist/{spa-router.d-WU_qS5gJ.d.mts → spa-router.d-BgHPVMhz.d.mts} +15 -5
- package/dist/{spa-router.d-m8H_Kl_B.d.ts → spa-router.d-DsFDHTsv.d.ts} +15 -5
- package/dist/testing.cjs +17 -17
- package/dist/testing.d.mts +6 -6
- package/dist/testing.d.ts +6 -6
- package/dist/testing.mjs +13 -13
- package/dist/theme/server.cjs +3 -3
- package/dist/theme/server.mjs +2 -2
- package/dist/{utils.d-W9IiEqmW.d.mts → utils.d-BKyKDBR1.d.mts} +1 -1
- package/dist/{utils.d-C9dQD5Zg.d.ts → utils.d-zxAVcf_V.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +63 -61
- package/dist/vite.d.mts +32 -12
- package/dist/vite.d.ts +32 -12
- package/dist/vite.mjs +62 -60
- package/dist/workflows.cjs +4 -4
- package/dist/workflows.mjs +3 -3
- package/package.json +31 -1
- package/dist/analyzer-H7SIX6BJ.cjs +0 -16
- package/dist/chunk-5YPBFMBN.cjs +0 -19
- package/dist/chunk-OM7WILES.mjs +0 -100
- package/dist/chunk-Q5B4LNON.mjs +0 -19
- package/dist/chunk-QPJ4MZTO.mjs +0 -60
- package/dist/chunk-R53QDV6T.cjs +0 -100
- package/dist/chunk-UYTAP4FQ.cjs +0 -60
- package/dist/manager-2LUKNX2N.cjs +0 -14
- /package/dist/{chunk-QGOZLGVP.mjs → chunk-I6FIAWNT.mjs} +0 -0
- /package/dist/{chunk-XPIPMWY3.cjs → chunk-K5NI5YQR.cjs} +0 -0
- /package/dist/{chunk-NWUHS6GV.cjs → chunk-QEJWNXRI.cjs} +0 -0
- /package/dist/{chunk-FSXSQQTV.mjs → chunk-TXE4SAMV.mjs} +0 -0
- /package/dist/{chunk-ZXK2EYQW.cjs → chunk-UUQNJDGH.cjs} +0 -0
- /package/dist/{chunk-46P5KNTE.mjs → chunk-VZBAW44S.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
var _chunkWT6RAN2Icjs = require('./chunk-WT6RAN2I.cjs');
|
|
4
4
|
|
|
@@ -9,19 +9,28 @@ var _chunkOOZEU5KKcjs = require('./chunk-OOZEU5KK.cjs');
|
|
|
9
9
|
var _chunkR5U7OIPIcjs = require('./chunk-R5U7OIPI.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkHDPT6OYEcjs = require('./chunk-HDPT6OYE.cjs');
|
|
13
13
|
|
|
14
14
|
// src/theme/server.ts
|
|
15
|
-
var
|
|
15
|
+
var FARM_THEME_DEFAULT_CONFIG = /* @__PURE__ */ Symbol.for("farm.js.theme.default-config");
|
|
16
|
+
var DISABLED_THEME_CONFIG = _chunkWT6RAN2Icjs.resolveFarmThemeConfig.call(void 0, void 0);
|
|
17
|
+
function getDefaultThemeConfig() {
|
|
18
|
+
return _nullishCoalesce(globalThis[FARM_THEME_DEFAULT_CONFIG], () => ( DISABLED_THEME_CONFIG));
|
|
19
|
+
}
|
|
16
20
|
function _setDefaultFarmThemeConfig(config, basePath = "/") {
|
|
17
|
-
|
|
21
|
+
globalThis[FARM_THEME_DEFAULT_CONFIG] = _chunkWT6RAN2Icjs.resolveFarmThemeConfig.call(void 0,
|
|
22
|
+
config,
|
|
23
|
+
basePath
|
|
24
|
+
);
|
|
18
25
|
}
|
|
19
|
-
function getTheme(request =
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
function getTheme(request = _chunkHDPT6OYEcjs.getCurrentRequestOrNull.call(void 0, )) {
|
|
27
|
+
const config = getDefaultThemeConfig();
|
|
28
|
+
if (!request) return config.default;
|
|
29
|
+
return readFarmThemePreference(request, config);
|
|
22
30
|
}
|
|
23
|
-
function getThemeSnapshot(request =
|
|
24
|
-
const
|
|
31
|
+
function getThemeSnapshot(request = _chunkHDPT6OYEcjs.getCurrentRequestOrNull.call(void 0, )) {
|
|
32
|
+
const config = getDefaultThemeConfig();
|
|
33
|
+
const theme = request ? readFarmThemePreference(request, config) : config.default;
|
|
25
34
|
return {
|
|
26
35
|
theme,
|
|
27
36
|
resolvedTheme: theme === "system" ? void 0 : theme,
|
|
@@ -58,7 +67,7 @@ _chunkOOZEU5KKcjs._setFarmThemeServerSnapshotResolver.call(void 0, () => {
|
|
|
58
67
|
try {
|
|
59
68
|
return getThemeSnapshot();
|
|
60
69
|
} catch (e2) {
|
|
61
|
-
const theme =
|
|
70
|
+
const theme = getDefaultThemeConfig().default;
|
|
62
71
|
return {
|
|
63
72
|
theme,
|
|
64
73
|
resolvedTheme: theme === "system" ? void 0 : theme,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isExplicitFarmServerComponentsMode,
|
|
3
3
|
resolveFarmServerComponentsMode
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4QENVMG7.mjs";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "./chunk-JSDV2NUN.mjs";
|
|
@@ -113,14 +113,25 @@ function farmAppUsesRscPipeline(config, root) {
|
|
|
113
113
|
throw new Error(`[Farm.js] ${formatFarmRscBlockingMessage(status.blockingKeys)}`);
|
|
114
114
|
}
|
|
115
115
|
if (status.ignoredKeys.length > 0) {
|
|
116
|
-
logger.warn(
|
|
117
|
-
`[Farm.js] experimental.serverComponents runs on the RSC pipeline, which does not run ${formatKeys(
|
|
118
|
-
status.ignoredKeys
|
|
119
|
-
)} yet. ${status.ignoredKeys.length === 1 ? "It is" : "They are"} ignored.`
|
|
120
|
-
);
|
|
116
|
+
logger.warn(`[Farm.js] ${formatFarmRscIgnoredMessage(status.ignoredKeys)}`);
|
|
121
117
|
}
|
|
122
118
|
return true;
|
|
123
119
|
}
|
|
120
|
+
function formatFarmRscIgnoredMessage(ignoredKeys) {
|
|
121
|
+
const others = ignoredKeys.filter((key) => key !== "plugins");
|
|
122
|
+
const clauses = [];
|
|
123
|
+
if (others.length > 0) {
|
|
124
|
+
clauses.push(
|
|
125
|
+
`does not run ${formatKeys(others)} yet. ${others.length === 1 ? "It is" : "They are"} ignored.`
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
if (others.length < ignoredKeys.length) {
|
|
129
|
+
clauses.push(
|
|
130
|
+
"runs only the browser `client` hooks of `plugins` and ignores their other hooks."
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
return `experimental.serverComponents runs on the RSC pipeline, which ${clauses.join(" It also ")}`;
|
|
134
|
+
}
|
|
124
135
|
|
|
125
136
|
export {
|
|
126
137
|
FARM_RSC_PACKAGES,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkFT6KJHS3cjs = require('./chunk-FT6KJHS3.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -59,12 +59,12 @@ function collectFarmLlmsTxtPages(sources, options) {
|
|
|
59
59
|
for (const source of sources) {
|
|
60
60
|
const path = source.pattern;
|
|
61
61
|
if (path.includes("[") || pages.has(path)) continue;
|
|
62
|
-
if (include.length && !include.some((pattern) =>
|
|
62
|
+
if (include.length && !include.some((pattern) => _chunkFT6KJHS3cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
|
|
63
63
|
continue;
|
|
64
64
|
}
|
|
65
|
-
if (exclude.some((pattern) =>
|
|
65
|
+
if (exclude.some((pattern) => _chunkFT6KJHS3cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
|
|
66
66
|
if (isFarmMetadataNoIndex(source.metadata)) continue;
|
|
67
|
-
const target =
|
|
67
|
+
const target = _chunkFT6KJHS3cjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? _chunkFT6KJHS3cjs.getFarmMarkdownMirrorPath.call(void 0, path) : path;
|
|
68
68
|
const description = readMetadataString(source.metadata, "description");
|
|
69
69
|
pages.set(path, {
|
|
70
70
|
path,
|
|
@@ -75,6 +75,27 @@ function collectFarmLlmsTxtPages(sources, options) {
|
|
|
75
75
|
}
|
|
76
76
|
return [...pages.values()].sort((left, right) => left.path.localeCompare(right.path));
|
|
77
77
|
}
|
|
78
|
+
function resolveFarmAgentOrigin(metadataBase, requestOrigin) {
|
|
79
|
+
if (typeof metadataBase !== "string" && !(metadataBase instanceof URL)) return requestOrigin;
|
|
80
|
+
try {
|
|
81
|
+
const url = new URL(String(metadataBase));
|
|
82
|
+
return url.protocol === "https:" || url.protocol === "http:" ? url.origin : requestOrigin;
|
|
83
|
+
} catch (e) {
|
|
84
|
+
return requestOrigin;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function readFarmLlmsMarkdownFrom(readOrigin, origin, read) {
|
|
88
|
+
if (readOrigin === origin) return read;
|
|
89
|
+
return (url) => {
|
|
90
|
+
let target;
|
|
91
|
+
try {
|
|
92
|
+
target = new URL(url);
|
|
93
|
+
} catch (e2) {
|
|
94
|
+
return read(url);
|
|
95
|
+
}
|
|
96
|
+
return read(target.origin === origin ? `${readOrigin}${target.pathname}${target.search}` : url);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
78
99
|
function isFarmMetadataNoIndex(metadata) {
|
|
79
100
|
if (!metadata || typeof metadata !== "object") return false;
|
|
80
101
|
const robots = metadata.robots;
|
|
@@ -85,6 +106,12 @@ function isFarmMetadataNoIndex(metadata) {
|
|
|
85
106
|
robots && typeof robots === "object" && robots.index === false
|
|
86
107
|
);
|
|
87
108
|
}
|
|
109
|
+
function isFarmPageNoIndex(pageMetadata, layoutMetadata = []) {
|
|
110
|
+
for (const metadata of [pageMetadata, ...[...layoutMetadata].reverse()]) {
|
|
111
|
+
if (isRecord(metadata) && "robots" in metadata) return isFarmMetadataNoIndex(metadata);
|
|
112
|
+
}
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
88
115
|
function createFarmDefaultLlmsTxt(options) {
|
|
89
116
|
const { config, pages } = options;
|
|
90
117
|
const mcp = _nullishCoalesce(options.mcp, () => ( []));
|
|
@@ -155,7 +182,7 @@ function createFarmLlmsMarkdownReader(fetchMarkdown) {
|
|
|
155
182
|
try {
|
|
156
183
|
const response = await fetchMarkdown(
|
|
157
184
|
new Request(url, {
|
|
158
|
-
headers: { accept: "text/markdown", [
|
|
185
|
+
headers: { accept: "text/markdown", [_chunkFT6KJHS3cjs.FARM_INTERNAL_READ_HEADER]: "llms-full" }
|
|
159
186
|
})
|
|
160
187
|
);
|
|
161
188
|
const type = _nullishCoalesce(response.headers.get("content-type"), () => ( ""));
|
|
@@ -164,7 +191,7 @@ function createFarmLlmsMarkdownReader(fetchMarkdown) {
|
|
|
164
191
|
return null;
|
|
165
192
|
}
|
|
166
193
|
return await response.text();
|
|
167
|
-
} catch (
|
|
194
|
+
} catch (e3) {
|
|
168
195
|
return null;
|
|
169
196
|
}
|
|
170
197
|
};
|
|
@@ -263,7 +290,7 @@ function shouldInlineLlmsLink(url, origin) {
|
|
|
263
290
|
let target;
|
|
264
291
|
try {
|
|
265
292
|
target = new URL(url, origin);
|
|
266
|
-
} catch (
|
|
293
|
+
} catch (e4) {
|
|
267
294
|
return false;
|
|
268
295
|
}
|
|
269
296
|
return target.origin === origin && !/\/llms(-full)?\.txt$/.test(target.pathname);
|
|
@@ -338,4 +365,7 @@ function isRecord(value) {
|
|
|
338
365
|
|
|
339
366
|
|
|
340
367
|
|
|
341
|
-
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
exports.resolveFarmLlmsTxtConfig = resolveFarmLlmsTxtConfig; exports.collectFarmLlmsTxtPages = collectFarmLlmsTxtPages; exports.resolveFarmAgentOrigin = resolveFarmAgentOrigin; exports.readFarmLlmsMarkdownFrom = readFarmLlmsMarkdownFrom; exports.isFarmMetadataNoIndex = isFarmMetadataNoIndex; exports.isFarmPageNoIndex = isFarmPageNoIndex; exports.createFarmDefaultLlmsTxt = createFarmDefaultLlmsTxt; exports.serializeFarmLlmsTxt = serializeFarmLlmsTxt; exports.createFarmLlmsMarkdownReader = createFarmLlmsMarkdownReader; exports.renderFarmLlmsFullTxt = renderFarmLlmsFullTxt; exports.createFarmLlmsFullRenderer = createFarmLlmsFullRenderer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/server-components-mode.ts
|
|
2
2
|
function resolveFarmServerComponentsMode(value) {
|
|
3
3
|
if (value === void 0 || value === null || value === false) return void 0;
|
|
4
|
-
if (value === true) return "
|
|
4
|
+
if (value === true) return "islands";
|
|
5
5
|
const mode = typeof value === "object" ? value.mode : void 0;
|
|
6
6
|
if (mode === "rsc" || mode === "islands") return mode;
|
|
7
7
|
throw new TypeError(
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunk7JUIK547cjs = require('./chunk-7JUIK547.cjs');
|
|
5
|
+
|
|
6
|
+
// src/navigation/page-data-redirect.ts
|
|
7
|
+
var FARM_PAGE_DATA_REDIRECT_NAVIGATION = "redirect";
|
|
8
|
+
function getFarmPageDataRedirect(error) {
|
|
9
|
+
const signal = _chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error);
|
|
10
|
+
if (signal) return { location: signal.url, status: signal.status };
|
|
11
|
+
if (error instanceof Response) {
|
|
12
|
+
return getFarmPageDataRedirectFromResponse(error.status, error.headers.get("location"));
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
function getFarmPageDataRedirectFromResponse(status, location) {
|
|
17
|
+
return _chunk7JUIK547cjs.isFarmRedirectStatus.call(void 0, status) && typeof location === "string" && location ? { location, status } : null;
|
|
18
|
+
}
|
|
19
|
+
function createFarmPageDataRedirectResponse(redirect) {
|
|
20
|
+
return new Response(
|
|
21
|
+
JSON.stringify({ redirect: { location: redirect.location, status: redirect.status } }),
|
|
22
|
+
{
|
|
23
|
+
status: 200,
|
|
24
|
+
headers: {
|
|
25
|
+
"Content-Type": "application/json; charset=utf-8",
|
|
26
|
+
"Cache-Control": "no-store",
|
|
27
|
+
"X-Farm-Navigation": FARM_PAGE_DATA_REDIRECT_NAVIGATION
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
async function readFarmPageDataRedirect(response) {
|
|
33
|
+
if (response.headers.get("X-Farm-Navigation") !== FARM_PAGE_DATA_REDIRECT_NAVIGATION) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const payload = await response.json();
|
|
37
|
+
const redirect = getFarmPageDataRedirectFromResponse(
|
|
38
|
+
Number(_optionalChain([payload, 'optionalAccess', _ => _.redirect, 'optionalAccess', _2 => _2.status])),
|
|
39
|
+
_optionalChain([payload, 'optionalAccess', _3 => _3.redirect, 'optionalAccess', _4 => _4.location])
|
|
40
|
+
);
|
|
41
|
+
if (!redirect) throw new Error("Farm page data returned an invalid redirect");
|
|
42
|
+
return redirect;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
exports.getFarmPageDataRedirect = getFarmPageDataRedirect; exports.getFarmPageDataRedirectFromResponse = getFarmPageDataRedirectFromResponse; exports.createFarmPageDataRedirectResponse = createFarmPageDataRedirectResponse; exports.readFarmPageDataRedirect = readFarmPageDataRedirect;
|
|
@@ -12,6 +12,7 @@ var CHUNK_ERROR_PATTERNS = [
|
|
|
12
12
|
/unable to preload CSS/i,
|
|
13
13
|
/module script failed/i
|
|
14
14
|
];
|
|
15
|
+
var LAZY_ROUTER_CHUNK = /\/farm-client-router-h[0-9a-f]+\.js(?:[?#]|$)/;
|
|
15
16
|
function isChunkLoadError(errorLike) {
|
|
16
17
|
const values = collectErrorText(errorLike);
|
|
17
18
|
if (values.some((value) => CHUNK_ERROR_PATTERNS.some((pattern) => pattern.test(value)))) {
|
|
@@ -38,6 +39,9 @@ function installChunkErrorRecovery(options = {}) {
|
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
41
|
const recover = (errorLike) => {
|
|
42
|
+
if (LAZY_ROUTER_CHUNK.test(_nullishCoalesce(getEventTargetAssetUrl(errorLike), () => ( "")))) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
41
45
|
if (!isChunkLoadError(errorLike)) {
|
|
42
46
|
return;
|
|
43
47
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getFarmRedirectError,
|
|
3
|
+
isFarmRedirectStatus
|
|
4
|
+
} from "./chunk-JNYFXL7X.mjs";
|
|
5
|
+
|
|
6
|
+
// src/navigation/page-data-redirect.ts
|
|
7
|
+
var FARM_PAGE_DATA_REDIRECT_NAVIGATION = "redirect";
|
|
8
|
+
function getFarmPageDataRedirect(error) {
|
|
9
|
+
const signal = getFarmRedirectError(error);
|
|
10
|
+
if (signal) return { location: signal.url, status: signal.status };
|
|
11
|
+
if (error instanceof Response) {
|
|
12
|
+
return getFarmPageDataRedirectFromResponse(error.status, error.headers.get("location"));
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
function getFarmPageDataRedirectFromResponse(status, location) {
|
|
17
|
+
return isFarmRedirectStatus(status) && typeof location === "string" && location ? { location, status } : null;
|
|
18
|
+
}
|
|
19
|
+
function createFarmPageDataRedirectResponse(redirect) {
|
|
20
|
+
return new Response(
|
|
21
|
+
JSON.stringify({ redirect: { location: redirect.location, status: redirect.status } }),
|
|
22
|
+
{
|
|
23
|
+
status: 200,
|
|
24
|
+
headers: {
|
|
25
|
+
"Content-Type": "application/json; charset=utf-8",
|
|
26
|
+
"Cache-Control": "no-store",
|
|
27
|
+
"X-Farm-Navigation": FARM_PAGE_DATA_REDIRECT_NAVIGATION
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
async function readFarmPageDataRedirect(response) {
|
|
33
|
+
if (response.headers.get("X-Farm-Navigation") !== FARM_PAGE_DATA_REDIRECT_NAVIGATION) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const payload = await response.json();
|
|
37
|
+
const redirect = getFarmPageDataRedirectFromResponse(
|
|
38
|
+
Number(payload?.redirect?.status),
|
|
39
|
+
payload?.redirect?.location
|
|
40
|
+
);
|
|
41
|
+
if (!redirect) throw new Error("Farm page data returned an invalid redirect");
|
|
42
|
+
return redirect;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
getFarmPageDataRedirect,
|
|
47
|
+
getFarmPageDataRedirectFromResponse,
|
|
48
|
+
createFarmPageDataRedirectResponse,
|
|
49
|
+
readFarmPageDataRedirect
|
|
50
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkFPBOAG6Ncjs = require('./chunk-FPBOAG6N.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkSNP33A33cjs = require('./chunk-SNP33A33.cjs');
|
|
4
7
|
|
|
5
8
|
|
|
6
9
|
var _chunkBTZ5O6VMcjs = require('./chunk-BTZ5O6VM.cjs');
|
|
@@ -11,12 +14,14 @@ var zodTypeNameKinds = {
|
|
|
11
14
|
ZodArray: "array",
|
|
12
15
|
ZodBoolean: "boolean",
|
|
13
16
|
ZodDefault: "default",
|
|
17
|
+
ZodEffects: "effects",
|
|
14
18
|
ZodEnum: "enum",
|
|
15
19
|
ZodLiteral: "literal",
|
|
16
20
|
ZodNullable: "nullable",
|
|
17
21
|
ZodNumber: "number",
|
|
18
22
|
ZodObject: "object",
|
|
19
23
|
ZodOptional: "optional",
|
|
24
|
+
ZodPipeline: "pipe",
|
|
20
25
|
ZodRecord: "record",
|
|
21
26
|
ZodString: "string",
|
|
22
27
|
ZodTuple: "tuple",
|
|
@@ -35,8 +40,22 @@ function getZodObjectShape(schema) {
|
|
|
35
40
|
const shape = typeof candidate === "function" ? candidate() : candidate;
|
|
36
41
|
return shape && typeof shape === "object" ? shape : void 0;
|
|
37
42
|
}
|
|
43
|
+
function getZodTransformInput(schema) {
|
|
44
|
+
const kind = getZodKind(schema);
|
|
45
|
+
const definition = _optionalChain([schema, 'optionalAccess', _3 => _3._def]);
|
|
46
|
+
if (kind === "effects") return definition.schema;
|
|
47
|
+
if (kind !== "pipe") return void 0;
|
|
48
|
+
return getZodKind(definition.in) === "transform" ? definition.out : definition.in;
|
|
49
|
+
}
|
|
50
|
+
function unwrapZodTransforms(schema) {
|
|
51
|
+
let current = schema;
|
|
52
|
+
for (let input = getZodTransformInput(current); input; input = getZodTransformInput(current)) {
|
|
53
|
+
current = input;
|
|
54
|
+
}
|
|
55
|
+
return current;
|
|
56
|
+
}
|
|
38
57
|
function isStandardSchema(schema) {
|
|
39
|
-
return !!schema && typeof schema === "object" && typeof _optionalChain([schema, 'access',
|
|
58
|
+
return !!schema && typeof schema === "object" && typeof _optionalChain([schema, 'access', _4 => _4["~standard"], 'optionalAccess', _5 => _5.validate]) === "function";
|
|
40
59
|
}
|
|
41
60
|
function openAPITypeForLiteralValues(values) {
|
|
42
61
|
if (values.length === 0) return "string";
|
|
@@ -73,7 +92,7 @@ var OpenAPIGenerator = class {
|
|
|
73
92
|
* which documented every `.default()` field as required.
|
|
74
93
|
*/
|
|
75
94
|
isRequiredField(value) {
|
|
76
|
-
const kind = getZodKind(value);
|
|
95
|
+
const kind = getZodKind(unwrapZodTransforms(value));
|
|
77
96
|
return kind !== "optional" && kind !== "default";
|
|
78
97
|
}
|
|
79
98
|
/**
|
|
@@ -81,10 +100,16 @@ var OpenAPIGenerator = class {
|
|
|
81
100
|
*/
|
|
82
101
|
processZodType(zodType) {
|
|
83
102
|
const kind = getZodKind(zodType);
|
|
84
|
-
const definition = _optionalChain([zodType, 'optionalAccess',
|
|
103
|
+
const definition = _optionalChain([zodType, 'optionalAccess', _6 => _6._def]);
|
|
85
104
|
if (!kind) {
|
|
86
105
|
return isStandardSchema(zodType) ? { description: "Schema metadata is unavailable for this Standard Schema validator." } : { description: "Schema metadata is unavailable." };
|
|
87
106
|
}
|
|
107
|
+
const transformInput = getZodTransformInput(zodType);
|
|
108
|
+
if (transformInput) {
|
|
109
|
+
const inputSchema = this.processZodType(transformInput);
|
|
110
|
+
const description = zodType.description;
|
|
111
|
+
return description === void 0 || inputSchema.description !== void 0 ? inputSchema : { ...inputSchema, description };
|
|
112
|
+
}
|
|
88
113
|
if (kind === "optional") {
|
|
89
114
|
return this.processZodType(definition.innerType);
|
|
90
115
|
}
|
|
@@ -187,9 +212,9 @@ var OpenAPIGenerator = class {
|
|
|
187
212
|
["maximum", zodType.maxValue]
|
|
188
213
|
];
|
|
189
214
|
for (const check of _nullishCoalesce(definition.checks, () => ( []))) {
|
|
190
|
-
if (_optionalChain([check, 'optionalAccess',
|
|
215
|
+
if (_optionalChain([check, 'optionalAccess', _7 => _7.kind]) === "min") {
|
|
191
216
|
constraints.push([kind === "string" ? "minLength" : "minimum", check.value]);
|
|
192
|
-
} else if (_optionalChain([check, 'optionalAccess',
|
|
217
|
+
} else if (_optionalChain([check, 'optionalAccess', _8 => _8.kind]) === "max") {
|
|
193
218
|
constraints.push([kind === "string" ? "maxLength" : "maximum", check.value]);
|
|
194
219
|
}
|
|
195
220
|
}
|
|
@@ -286,7 +311,7 @@ var OpenAPIGenerator = class {
|
|
|
286
311
|
for (const route of routeList) {
|
|
287
312
|
for (const method of route.methods) {
|
|
288
313
|
if (variant.operationIdSuffix === "base") {
|
|
289
|
-
const existingOperation = method === "QUERY" ? _optionalChain([spec, 'access',
|
|
314
|
+
const existingOperation = method === "QUERY" ? _optionalChain([spec, 'access', _9 => _9.paths, 'access', _10 => _10[variant.path], 'access', _11 => _11["x-oai-additionalOperations"], 'optionalAccess', _12 => _12.QUERY]) : spec.paths[variant.path][method.toLowerCase()];
|
|
290
315
|
if (existingOperation) continue;
|
|
291
316
|
}
|
|
292
317
|
const operation = await this.generateOperation(
|
|
@@ -377,6 +402,12 @@ var OpenAPIGenerator = class {
|
|
|
377
402
|
schema: { type: "string" }
|
|
378
403
|
}));
|
|
379
404
|
}
|
|
405
|
+
loadRouteModule(filePath) {
|
|
406
|
+
return this.context.loadModule ? this.context.loadModule(filePath) : import(
|
|
407
|
+
/* @vite-ignore */
|
|
408
|
+
_chunkSNP33A33cjs.toFileModuleUrl.call(void 0, filePath)
|
|
409
|
+
);
|
|
410
|
+
}
|
|
380
411
|
/**
|
|
381
412
|
* Extract request body schema from endpoint
|
|
382
413
|
*/
|
|
@@ -385,13 +416,9 @@ var OpenAPIGenerator = class {
|
|
|
385
416
|
return void 0;
|
|
386
417
|
}
|
|
387
418
|
try {
|
|
388
|
-
const
|
|
389
|
-
const routeModule = await import(
|
|
390
|
-
/* @vite-ignore */
|
|
391
|
-
modulePath
|
|
392
|
-
);
|
|
419
|
+
const routeModule = await this.loadRouteModule(route.filePath);
|
|
393
420
|
const handler = routeModule[method];
|
|
394
|
-
const bodySchema = _nullishCoalesce(_optionalChain([handler, 'optionalAccess',
|
|
421
|
+
const bodySchema = _nullishCoalesce(_optionalChain([handler, 'optionalAccess', _13 => _13.__types, 'optionalAccess', _14 => _14.body]), () => ( _optionalChain([handler, 'optionalAccess', _15 => _15._type, 'optionalAccess', _16 => _16.body])));
|
|
395
422
|
if (bodySchema) {
|
|
396
423
|
return {
|
|
397
424
|
required: this.isRequiredField(bodySchema),
|
|
@@ -424,14 +451,10 @@ var OpenAPIGenerator = class {
|
|
|
424
451
|
async getParameters(route, method) {
|
|
425
452
|
const parameters = [];
|
|
426
453
|
try {
|
|
427
|
-
const
|
|
428
|
-
const routeModule = await import(
|
|
429
|
-
/* @vite-ignore */
|
|
430
|
-
modulePath
|
|
431
|
-
);
|
|
454
|
+
const routeModule = await this.loadRouteModule(route.filePath);
|
|
432
455
|
const handler = routeModule[method];
|
|
433
|
-
const querySchema = _nullishCoalesce(_optionalChain([handler, 'optionalAccess',
|
|
434
|
-
const shape = getZodObjectShape(querySchema);
|
|
456
|
+
const querySchema = _nullishCoalesce(_optionalChain([handler, 'optionalAccess', _17 => _17.__types, 'optionalAccess', _18 => _18.query]), () => ( _optionalChain([handler, 'optionalAccess', _19 => _19._type, 'optionalAccess', _20 => _20.query])));
|
|
457
|
+
const shape = getZodObjectShape(unwrapZodTransforms(querySchema));
|
|
435
458
|
if (shape) {
|
|
436
459
|
Object.entries(shape).forEach(([key, value]) => {
|
|
437
460
|
if (getZodKind(value) || isStandardSchema(value)) {
|
|
@@ -482,11 +505,8 @@ var OpenAPIGenerator = class {
|
|
|
482
505
|
}
|
|
483
506
|
async getEndpointOpenAPIMetadata(route, method) {
|
|
484
507
|
try {
|
|
485
|
-
const routeModule = await
|
|
486
|
-
|
|
487
|
-
route.filePath
|
|
488
|
-
);
|
|
489
|
-
return _nullishCoalesce(_optionalChain([routeModule, 'access', _20 => _20[method], 'optionalAccess', _21 => _21.__openapi]), () => ( {}));
|
|
508
|
+
const routeModule = await this.loadRouteModule(route.filePath);
|
|
509
|
+
return _nullishCoalesce(_optionalChain([routeModule, 'access', _21 => _21[method], 'optionalAccess', _22 => _22.__openapi]), () => ( {}));
|
|
490
510
|
} catch (e) {
|
|
491
511
|
return {};
|
|
492
512
|
}
|
|
@@ -594,7 +614,7 @@ var OpenAPIManager = class {
|
|
|
594
614
|
this.appDir = appDirs[appDirs.length - 1];
|
|
595
615
|
this.config = config;
|
|
596
616
|
this.generator = new OpenAPIGenerator(this.appDir, config, context);
|
|
597
|
-
this.apiTypeGenerator = new (0,
|
|
617
|
+
this.apiTypeGenerator = new (0, _chunkFPBOAG6Ncjs.APITypeGenerator)(appDirs);
|
|
598
618
|
}
|
|
599
619
|
/**
|
|
600
620
|
* Generate OpenAPI spec from API routes
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
parseMiddlewareCookieHeader,
|
|
4
4
|
serializeMiddlewareCookie,
|
|
5
5
|
serializeMiddlewareCookieDeletion
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EYPSKXO4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
compileMiddlewareConfig,
|
|
9
9
|
compileMiddlewareRoute,
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
matchesMiddlewareRouteAt,
|
|
13
13
|
toMiddlewareRoutePathname
|
|
14
14
|
} from "./chunk-EDPENAVO.mjs";
|
|
15
|
-
import {
|
|
16
|
-
emitFarmEvent
|
|
17
|
-
} from "./chunk-2DA7CLY7.mjs";
|
|
18
15
|
import {
|
|
19
16
|
createFarmAPIMiddlewarePathnames
|
|
20
17
|
} from "./chunk-2I6PUKWJ.mjs";
|
|
21
18
|
import {
|
|
22
19
|
withFarmRequestClientAddress
|
|
23
20
|
} from "./chunk-QDWMCFTH.mjs";
|
|
21
|
+
import {
|
|
22
|
+
emitFarmEvent
|
|
23
|
+
} from "./chunk-2DA7CLY7.mjs";
|
|
24
24
|
import {
|
|
25
25
|
_withFarmResponseHeaders
|
|
26
26
|
} from "./chunk-LM55GS4R.mjs";
|
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
// src/client/route-announcer.ts
|
|
2
|
+
var FARM_ROUTE_ANNOUNCER_ID = "farm-route-announcer";
|
|
3
|
+
var FARM_ROUTE_ANNOUNCEMENT_DELAY_MS = 60;
|
|
4
|
+
var VISUALLY_HIDDEN = "position:absolute;top:0;left:0;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap";
|
|
5
|
+
function readFarmRouteAnnouncement(target) {
|
|
6
|
+
const document = target.document;
|
|
7
|
+
const heading = document.querySelector("h1");
|
|
8
|
+
return document.title.trim() || (heading?.innerText || heading?.textContent || "").trim() || target.location.pathname;
|
|
9
|
+
}
|
|
10
|
+
function getAnnouncerRegion(document) {
|
|
11
|
+
let region = document.getElementById(FARM_ROUTE_ANNOUNCER_ID);
|
|
12
|
+
if (!region) {
|
|
13
|
+
region = document.createElement("div");
|
|
14
|
+
region.id = FARM_ROUTE_ANNOUNCER_ID;
|
|
15
|
+
region.setAttribute("aria-live", "assertive");
|
|
16
|
+
region.setAttribute("aria-atomic", "true");
|
|
17
|
+
region.style.cssText = VISUALLY_HIDDEN;
|
|
18
|
+
document.body.appendChild(region);
|
|
19
|
+
}
|
|
20
|
+
return region;
|
|
21
|
+
}
|
|
22
|
+
function createFarmRouteAnnouncer(target = typeof window === "undefined" ? void 0 : window) {
|
|
23
|
+
if (!target?.document) return () => {
|
|
24
|
+
};
|
|
25
|
+
let pathname = target.location.pathname;
|
|
26
|
+
let title = target.document.title;
|
|
27
|
+
let timer;
|
|
28
|
+
return () => {
|
|
29
|
+
const document = target.document;
|
|
30
|
+
if (!document.body) return;
|
|
31
|
+
const nextPathname = target.location.pathname;
|
|
32
|
+
const nextTitle = document.title;
|
|
33
|
+
if (nextPathname === pathname && nextTitle === title) return;
|
|
34
|
+
pathname = nextPathname;
|
|
35
|
+
title = nextTitle;
|
|
36
|
+
const message = readFarmRouteAnnouncement(target);
|
|
37
|
+
const region = getAnnouncerRegion(document);
|
|
38
|
+
region.textContent = "";
|
|
39
|
+
clearTimeout(timer);
|
|
40
|
+
timer = setTimeout(() => {
|
|
41
|
+
region.textContent = message;
|
|
42
|
+
}, FARM_ROUTE_ANNOUNCEMENT_DELAY_MS);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
1
46
|
// src/client/plugin.ts
|
|
2
47
|
function defineClient(definition) {
|
|
3
48
|
return definition;
|
|
@@ -42,6 +87,8 @@ var FarmClientPluginManager = class {
|
|
|
42
87
|
isProd: options.isProd ?? !options.isDev,
|
|
43
88
|
window: options.window ?? (typeof window !== "undefined" ? window : void 0)
|
|
44
89
|
};
|
|
90
|
+
this.announceRoute = options.announceRoutes === false ? () => {
|
|
91
|
+
} : createFarmRouteAnnouncer(this.options.window);
|
|
45
92
|
}
|
|
46
93
|
start() {
|
|
47
94
|
if (this.startPromise) return this.startPromise;
|
|
@@ -140,6 +187,7 @@ var FarmClientPluginManager = class {
|
|
|
140
187
|
resolve();
|
|
141
188
|
return;
|
|
142
189
|
}
|
|
190
|
+
this.announceRoute();
|
|
143
191
|
void this.runHook(
|
|
144
192
|
"navigation.rendered",
|
|
145
193
|
(instance) => instance.plugin.navigation?.rendered?.({
|
|
@@ -402,6 +450,7 @@ function isObject(value) {
|
|
|
402
450
|
}
|
|
403
451
|
|
|
404
452
|
export {
|
|
453
|
+
createFarmRouteAnnouncer,
|
|
405
454
|
defineClient,
|
|
406
455
|
FarmClientPluginManager,
|
|
407
456
|
createClientPluginManager
|