@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,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aH as FarmConfig, P as ParsedRoute, bx as ResolvedFarmRouteRuntimeConfig, by as ApplicationMetadataRouteKind, i as RouteModule, aX as LayoutModule, b8 as SSGCollectionResult, G as FarmRedirectStatus, t as FarmRequest, u as FarmResponse, bz as ResolvedFarmAPIConfig, bA as FarmDocsResolvedConfig, bt as FarmMarkdownResolvedConfig, h as FarmMdxResolvedConfig, az as ResolvedFarmDevtoolsConfig, bB as ResolvedFarmDevIndicatorsConfig, bC as ResolvedFarmAuthConfig, bD as ResolvedFarmPerformanceConfig, bE as ResolvedFarmSecurityConfig } from './client-plugins.d-CrKZiNSN.js';
|
|
2
2
|
import { F as FarmWorkflowsResolvedConfig } from './workflows.d-CRMzQZ3k.js';
|
|
3
3
|
import { FarmCronResolvedConfig } from './cron.js';
|
|
4
|
-
import { R as ResolvedFarmImageConfig } from './image-config.d-
|
|
4
|
+
import { R as ResolvedFarmImageConfig } from './image-config.d-ByhQ0TT7.js';
|
|
5
5
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.js';
|
|
6
|
-
import { I as IsolatedClientBoundaryReference, P as ProgrammaticClientRoutes } from './client-component.d-
|
|
6
|
+
import { I as IsolatedClientBoundaryReference, P as ProgrammaticClientRoutes } from './client-component.d-DWRKyAp5.js';
|
|
7
7
|
import { ViteDevServer } from 'vite';
|
|
8
|
-
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-
|
|
8
|
+
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-BFu9xHAi.js';
|
|
9
9
|
import { F as FarmIslandStrategy } from './island.d-CfGru1MO.js';
|
|
10
|
-
import {
|
|
11
|
-
import { F as FarmRouteRenderPlan } from './render-plan.d-
|
|
10
|
+
import { FarmRenderer, FarmServerRendererRuntime } from './renderer.js';
|
|
11
|
+
import { F as FarmRouteRenderPlan } from './render-plan.d-D8UakAIk.js';
|
|
12
12
|
import { R as ResolvedFarmI18nConfig } from './types.d-C41ePjvP.js';
|
|
13
13
|
import { F as FarmI18nRuntime } from './runtime.d-BtL3PCL3.js';
|
|
14
14
|
import { R as ResolvedFarmThemeConfig } from './types.d-DQnyD3VD.js';
|
|
@@ -25,6 +25,13 @@ interface StaticMetadataImageInfo {
|
|
|
25
25
|
byteLength: number;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* A config whose renderer is resolved: `renderer: false` has become the internal no-renderer
|
|
30
|
+
* descriptor, so runtime code always reads a `FarmRenderer`.
|
|
31
|
+
*/
|
|
32
|
+
type FarmRendererResolvedConfig = Required<FarmConfig> & {
|
|
33
|
+
renderer: FarmRenderer;
|
|
34
|
+
};
|
|
28
35
|
interface RouteEntry {
|
|
29
36
|
route: ParsedRoute;
|
|
30
37
|
modulePath: string;
|
|
@@ -147,9 +154,10 @@ declare class RouteManager {
|
|
|
147
154
|
private programmaticClientRoutes;
|
|
148
155
|
private rendererRuntime?;
|
|
149
156
|
private viteServer?;
|
|
157
|
+
private packageClientBoundaryCacheFile?;
|
|
150
158
|
private clientManifestCache?;
|
|
151
159
|
private reportedIslandsErrors;
|
|
152
|
-
constructor(config:
|
|
160
|
+
constructor(config: FarmRendererResolvedConfig, viteServer?: ViteDevServer);
|
|
153
161
|
setRendererRuntime(rendererRuntime: FarmServerRendererRuntime): void;
|
|
154
162
|
/**
|
|
155
163
|
* Discover all routes in the app directory
|
|
@@ -175,6 +183,8 @@ declare class RouteManager {
|
|
|
175
183
|
*/
|
|
176
184
|
getLayouts(): Map<string, RouteEntry>;
|
|
177
185
|
getRouteSlots(): Map<string, RouteSlotEntry>;
|
|
186
|
+
/** The layouts that wrap a registered page, root first. */
|
|
187
|
+
getRouteLayouts(pattern: string): RouteEntry[];
|
|
178
188
|
/** Resolve route rules, inherited layouts, and the page export in precedence order. */
|
|
179
189
|
resolveRouteRuntimeConfig(pattern: string): Promise<ResolvedFarmRouteRuntimeConfig>;
|
|
180
190
|
/**
|
|
@@ -231,6 +241,12 @@ declare class RouteManager {
|
|
|
231
241
|
* Requests still fetch route data, but never inspect component source.
|
|
232
242
|
*/
|
|
233
243
|
generateClientManifest(projectRoot?: string): FarmClientRouteManifest;
|
|
244
|
+
/**
|
|
245
|
+
* @internal Keep package client-boundary inspections in `file` between plans, as the dev server
|
|
246
|
+
* does. Without it, each plan outside a production build reads every package's sources again.
|
|
247
|
+
*/
|
|
248
|
+
usePackageClientBoundaryCacheFile(file: string): void;
|
|
249
|
+
private computeClientManifest;
|
|
234
250
|
/**
|
|
235
251
|
* Rebuild route metadata transactionally for HMR. If a file is temporarily
|
|
236
252
|
* invalid while it is being edited, keep the last usable plan so unrelated
|
|
@@ -294,7 +310,8 @@ declare class RouteManager {
|
|
|
294
310
|
* their pre-computed paths (for dynamic routes using getStaticPaths)
|
|
295
311
|
*/
|
|
296
312
|
collectSSGPages(): Promise<SSGCollectionResult>;
|
|
297
|
-
|
|
313
|
+
/** A request pathname as routes see it: without the basePath and, with i18n, the locale. */
|
|
314
|
+
toRoutePathname(pathname: string): string;
|
|
298
315
|
private localizeRedirectDestination;
|
|
299
316
|
private getI18nConfig;
|
|
300
317
|
/**
|
|
@@ -311,6 +328,11 @@ declare class RouteManager {
|
|
|
311
328
|
getRouteRevalidateInterval(modulePath: string): Promise<number | undefined>;
|
|
312
329
|
}
|
|
313
330
|
|
|
331
|
+
interface FarmPageDataRedirect {
|
|
332
|
+
location: string;
|
|
333
|
+
status: FarmRedirectStatus;
|
|
334
|
+
}
|
|
335
|
+
|
|
314
336
|
interface FarmNavigationFragmentLayout {
|
|
315
337
|
pattern: string;
|
|
316
338
|
module: {
|
|
@@ -327,6 +349,7 @@ interface FarmNavigationFragmentSlot {
|
|
|
327
349
|
default?: any;
|
|
328
350
|
};
|
|
329
351
|
props: Record<string, unknown>;
|
|
352
|
+
shouldHydrate?: boolean;
|
|
330
353
|
}
|
|
331
354
|
interface FarmNavigationFragmentInput {
|
|
332
355
|
PageComponent: any;
|
|
@@ -356,7 +379,7 @@ declare class ServerRenderer {
|
|
|
356
379
|
private apiRouteExists?;
|
|
357
380
|
private middlewareRoutes?;
|
|
358
381
|
private defaultMCPServer?;
|
|
359
|
-
constructor(config:
|
|
382
|
+
constructor(config: FarmRendererResolvedConfig, routeManager: RouteManager, i18nRuntime?: FarmI18nRuntime, viteServer?: ViteDevServer);
|
|
360
383
|
initialize(): Promise<void>;
|
|
361
384
|
/**
|
|
362
385
|
* Pass the app's renderer setup module (`renderer.appSetup`) to the renderer. In development
|
|
@@ -453,6 +476,11 @@ declare class ServerRenderer {
|
|
|
453
476
|
* matcher) covers, as the production build decides.
|
|
454
477
|
*/
|
|
455
478
|
private getAgentListedRoutes;
|
|
479
|
+
/**
|
|
480
|
+
* Whether a listed page renders noindex: its own `robots`, else its nearest layout's, as
|
|
481
|
+
* the production server decides. A layout that fails to load is surfaced by the page.
|
|
482
|
+
*/
|
|
483
|
+
private isAgentPageNoIndex;
|
|
456
484
|
/**
|
|
457
485
|
* The default read-only MCP server (`agent.mcp`), or undefined when the app has an MCP
|
|
458
486
|
* server of its own: a route that answers /mcp, an API route at /api/mcp, `@farm.js/mcp`,
|
|
@@ -462,6 +490,11 @@ declare class ServerRenderer {
|
|
|
462
490
|
private renderDefaultMCP;
|
|
463
491
|
/** Same inputs the production server gives llms.txt: static pages and root metadata. */
|
|
464
492
|
private createLlmsTxtContext;
|
|
493
|
+
/**
|
|
494
|
+
* The origin llms.txt and llms-full.txt link to: the root layout's `metadataBase`, else the
|
|
495
|
+
* request's origin, as for the sitemap and the production server.
|
|
496
|
+
*/
|
|
497
|
+
private getAgentOrigin;
|
|
465
498
|
/**
|
|
466
499
|
* Reads page mirrors back through this dev server, the way its .md handler
|
|
467
500
|
* renders pages, so Markdown sources and agent overrides are included. Requests
|
|
@@ -490,6 +523,12 @@ declare class ServerRenderer {
|
|
|
490
523
|
* sent. Returns false for any other error.
|
|
491
524
|
*/
|
|
492
525
|
respondToNavigationError(req: FarmRequest, res: FarmResponse, error: unknown): Promise<boolean>;
|
|
526
|
+
/**
|
|
527
|
+
* The redirect a page-data request for `request` ended with. A `redirect()`
|
|
528
|
+
* target is localized as a document render localizes it; a thrown 3xx
|
|
529
|
+
* Response keeps its Location as written, as a document render sends it.
|
|
530
|
+
*/
|
|
531
|
+
resolvePageDataRedirect(request: Request, error: unknown): Promise<FarmPageDataRedirect | null>;
|
|
493
532
|
private localizeRedirectUrl;
|
|
494
533
|
/** The app's not-found component, or null when it relies on the built-in page. */
|
|
495
534
|
private loadNotFoundModule;
|
|
@@ -556,6 +595,8 @@ declare class FarmApp {
|
|
|
556
595
|
getI18nRuntime(): FarmI18nRuntime;
|
|
557
596
|
getConfig(): NormalizedFarmConfig;
|
|
558
597
|
private normalizeConfig;
|
|
598
|
+
/** `renderer: false` serves no pages, so a page or layout file would silently never answer. */
|
|
599
|
+
private assertNoPageRoutes;
|
|
559
600
|
private verifyAppStructure;
|
|
560
601
|
}
|
|
561
602
|
declare function createFarmApp(config?: FarmConfig, viteServer?: ViteDevServer): FarmApp;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aH as FarmConfig, P as ParsedRoute, bx as ResolvedFarmRouteRuntimeConfig, by as ApplicationMetadataRouteKind, i as RouteModule, aX as LayoutModule, b8 as SSGCollectionResult, G as FarmRedirectStatus, t as FarmRequest, u as FarmResponse, bz as ResolvedFarmAPIConfig, bA as FarmDocsResolvedConfig, bt as FarmMarkdownResolvedConfig, h as FarmMdxResolvedConfig, az as ResolvedFarmDevtoolsConfig, bB as ResolvedFarmDevIndicatorsConfig, bC as ResolvedFarmAuthConfig, bD as ResolvedFarmPerformanceConfig, bE as ResolvedFarmSecurityConfig } from './client-plugins.d-BNILjfX3.mjs';
|
|
2
2
|
import { F as FarmWorkflowsResolvedConfig } from './workflows.d-CRMzQZ3k.mjs';
|
|
3
3
|
import { FarmCronResolvedConfig } from './cron.mjs';
|
|
4
|
-
import { R as ResolvedFarmImageConfig } from './image-config.d-
|
|
4
|
+
import { R as ResolvedFarmImageConfig } from './image-config.d-ByhQ0TT7.mjs';
|
|
5
5
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.mjs';
|
|
6
|
-
import { I as IsolatedClientBoundaryReference, P as ProgrammaticClientRoutes } from './client-component.d-
|
|
6
|
+
import { I as IsolatedClientBoundaryReference, P as ProgrammaticClientRoutes } from './client-component.d-CDRvRmbU.mjs';
|
|
7
7
|
import { ViteDevServer } from 'vite';
|
|
8
|
-
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-
|
|
8
|
+
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-DWyWkTSy.mjs';
|
|
9
9
|
import { F as FarmIslandStrategy } from './island.d-CfGru1MO.mjs';
|
|
10
|
-
import {
|
|
11
|
-
import { F as FarmRouteRenderPlan } from './render-plan.d-
|
|
10
|
+
import { FarmRenderer, FarmServerRendererRuntime } from './renderer.mjs';
|
|
11
|
+
import { F as FarmRouteRenderPlan } from './render-plan.d-LKymStDJ.mjs';
|
|
12
12
|
import { R as ResolvedFarmI18nConfig } from './types.d-C41ePjvP.mjs';
|
|
13
13
|
import { F as FarmI18nRuntime } from './runtime.d-3iJAKptR.mjs';
|
|
14
14
|
import { R as ResolvedFarmThemeConfig } from './types.d-DQnyD3VD.mjs';
|
|
@@ -25,6 +25,13 @@ interface StaticMetadataImageInfo {
|
|
|
25
25
|
byteLength: number;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* A config whose renderer is resolved: `renderer: false` has become the internal no-renderer
|
|
30
|
+
* descriptor, so runtime code always reads a `FarmRenderer`.
|
|
31
|
+
*/
|
|
32
|
+
type FarmRendererResolvedConfig = Required<FarmConfig> & {
|
|
33
|
+
renderer: FarmRenderer;
|
|
34
|
+
};
|
|
28
35
|
interface RouteEntry {
|
|
29
36
|
route: ParsedRoute;
|
|
30
37
|
modulePath: string;
|
|
@@ -147,9 +154,10 @@ declare class RouteManager {
|
|
|
147
154
|
private programmaticClientRoutes;
|
|
148
155
|
private rendererRuntime?;
|
|
149
156
|
private viteServer?;
|
|
157
|
+
private packageClientBoundaryCacheFile?;
|
|
150
158
|
private clientManifestCache?;
|
|
151
159
|
private reportedIslandsErrors;
|
|
152
|
-
constructor(config:
|
|
160
|
+
constructor(config: FarmRendererResolvedConfig, viteServer?: ViteDevServer);
|
|
153
161
|
setRendererRuntime(rendererRuntime: FarmServerRendererRuntime): void;
|
|
154
162
|
/**
|
|
155
163
|
* Discover all routes in the app directory
|
|
@@ -175,6 +183,8 @@ declare class RouteManager {
|
|
|
175
183
|
*/
|
|
176
184
|
getLayouts(): Map<string, RouteEntry>;
|
|
177
185
|
getRouteSlots(): Map<string, RouteSlotEntry>;
|
|
186
|
+
/** The layouts that wrap a registered page, root first. */
|
|
187
|
+
getRouteLayouts(pattern: string): RouteEntry[];
|
|
178
188
|
/** Resolve route rules, inherited layouts, and the page export in precedence order. */
|
|
179
189
|
resolveRouteRuntimeConfig(pattern: string): Promise<ResolvedFarmRouteRuntimeConfig>;
|
|
180
190
|
/**
|
|
@@ -231,6 +241,12 @@ declare class RouteManager {
|
|
|
231
241
|
* Requests still fetch route data, but never inspect component source.
|
|
232
242
|
*/
|
|
233
243
|
generateClientManifest(projectRoot?: string): FarmClientRouteManifest;
|
|
244
|
+
/**
|
|
245
|
+
* @internal Keep package client-boundary inspections in `file` between plans, as the dev server
|
|
246
|
+
* does. Without it, each plan outside a production build reads every package's sources again.
|
|
247
|
+
*/
|
|
248
|
+
usePackageClientBoundaryCacheFile(file: string): void;
|
|
249
|
+
private computeClientManifest;
|
|
234
250
|
/**
|
|
235
251
|
* Rebuild route metadata transactionally for HMR. If a file is temporarily
|
|
236
252
|
* invalid while it is being edited, keep the last usable plan so unrelated
|
|
@@ -294,7 +310,8 @@ declare class RouteManager {
|
|
|
294
310
|
* their pre-computed paths (for dynamic routes using getStaticPaths)
|
|
295
311
|
*/
|
|
296
312
|
collectSSGPages(): Promise<SSGCollectionResult>;
|
|
297
|
-
|
|
313
|
+
/** A request pathname as routes see it: without the basePath and, with i18n, the locale. */
|
|
314
|
+
toRoutePathname(pathname: string): string;
|
|
298
315
|
private localizeRedirectDestination;
|
|
299
316
|
private getI18nConfig;
|
|
300
317
|
/**
|
|
@@ -311,6 +328,11 @@ declare class RouteManager {
|
|
|
311
328
|
getRouteRevalidateInterval(modulePath: string): Promise<number | undefined>;
|
|
312
329
|
}
|
|
313
330
|
|
|
331
|
+
interface FarmPageDataRedirect {
|
|
332
|
+
location: string;
|
|
333
|
+
status: FarmRedirectStatus;
|
|
334
|
+
}
|
|
335
|
+
|
|
314
336
|
interface FarmNavigationFragmentLayout {
|
|
315
337
|
pattern: string;
|
|
316
338
|
module: {
|
|
@@ -327,6 +349,7 @@ interface FarmNavigationFragmentSlot {
|
|
|
327
349
|
default?: any;
|
|
328
350
|
};
|
|
329
351
|
props: Record<string, unknown>;
|
|
352
|
+
shouldHydrate?: boolean;
|
|
330
353
|
}
|
|
331
354
|
interface FarmNavigationFragmentInput {
|
|
332
355
|
PageComponent: any;
|
|
@@ -356,7 +379,7 @@ declare class ServerRenderer {
|
|
|
356
379
|
private apiRouteExists?;
|
|
357
380
|
private middlewareRoutes?;
|
|
358
381
|
private defaultMCPServer?;
|
|
359
|
-
constructor(config:
|
|
382
|
+
constructor(config: FarmRendererResolvedConfig, routeManager: RouteManager, i18nRuntime?: FarmI18nRuntime, viteServer?: ViteDevServer);
|
|
360
383
|
initialize(): Promise<void>;
|
|
361
384
|
/**
|
|
362
385
|
* Pass the app's renderer setup module (`renderer.appSetup`) to the renderer. In development
|
|
@@ -453,6 +476,11 @@ declare class ServerRenderer {
|
|
|
453
476
|
* matcher) covers, as the production build decides.
|
|
454
477
|
*/
|
|
455
478
|
private getAgentListedRoutes;
|
|
479
|
+
/**
|
|
480
|
+
* Whether a listed page renders noindex: its own `robots`, else its nearest layout's, as
|
|
481
|
+
* the production server decides. A layout that fails to load is surfaced by the page.
|
|
482
|
+
*/
|
|
483
|
+
private isAgentPageNoIndex;
|
|
456
484
|
/**
|
|
457
485
|
* The default read-only MCP server (`agent.mcp`), or undefined when the app has an MCP
|
|
458
486
|
* server of its own: a route that answers /mcp, an API route at /api/mcp, `@farm.js/mcp`,
|
|
@@ -462,6 +490,11 @@ declare class ServerRenderer {
|
|
|
462
490
|
private renderDefaultMCP;
|
|
463
491
|
/** Same inputs the production server gives llms.txt: static pages and root metadata. */
|
|
464
492
|
private createLlmsTxtContext;
|
|
493
|
+
/**
|
|
494
|
+
* The origin llms.txt and llms-full.txt link to: the root layout's `metadataBase`, else the
|
|
495
|
+
* request's origin, as for the sitemap and the production server.
|
|
496
|
+
*/
|
|
497
|
+
private getAgentOrigin;
|
|
465
498
|
/**
|
|
466
499
|
* Reads page mirrors back through this dev server, the way its .md handler
|
|
467
500
|
* renders pages, so Markdown sources and agent overrides are included. Requests
|
|
@@ -490,6 +523,12 @@ declare class ServerRenderer {
|
|
|
490
523
|
* sent. Returns false for any other error.
|
|
491
524
|
*/
|
|
492
525
|
respondToNavigationError(req: FarmRequest, res: FarmResponse, error: unknown): Promise<boolean>;
|
|
526
|
+
/**
|
|
527
|
+
* The redirect a page-data request for `request` ended with. A `redirect()`
|
|
528
|
+
* target is localized as a document render localizes it; a thrown 3xx
|
|
529
|
+
* Response keeps its Location as written, as a document render sends it.
|
|
530
|
+
*/
|
|
531
|
+
resolvePageDataRedirect(request: Request, error: unknown): Promise<FarmPageDataRedirect | null>;
|
|
493
532
|
private localizeRedirectUrl;
|
|
494
533
|
/** The app's not-found component, or null when it relies on the built-in page. */
|
|
495
534
|
private loadNotFoundModule;
|
|
@@ -556,6 +595,8 @@ declare class FarmApp {
|
|
|
556
595
|
getI18nRuntime(): FarmI18nRuntime;
|
|
557
596
|
getConfig(): NormalizedFarmConfig;
|
|
558
597
|
private normalizeConfig;
|
|
598
|
+
/** `renderer: false` serves no pages, so a page or layout file would silently never answer. */
|
|
599
|
+
private assertNoPageRoutes;
|
|
559
600
|
private verifyAppStructure;
|
|
560
601
|
}
|
|
561
602
|
declare function createFarmApp(config?: FarmConfig, viteServer?: ViteDevServer): FarmApp;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var _chunkOYZXVBZPcjs = require('./chunk-OYZXVBZP.cjs');
|
|
4
3
|
|
|
4
|
+
var _chunkIUKBPBM7cjs = require('./chunk-IUKBPBM7.cjs');
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkPWKAX5MScjs = require('./chunk-PWKAX5MS.cjs');
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
var _chunk7JUIK547cjs = require('./chunk-7JUIK547.cjs');
|
|
@@ -16,7 +18,7 @@ function normalizeRouteRules(routeRules) {
|
|
|
16
18
|
for (const [source, rule] of Object.entries(routeRules)) {
|
|
17
19
|
if (!rule) continue;
|
|
18
20
|
const normalizedSource = normalizeRuleSource(source);
|
|
19
|
-
|
|
21
|
+
_chunkPWKAX5MScjs.validateConfigRouteSource.call(void 0, normalizedSource, `Route rule "${source}" source`);
|
|
20
22
|
const existingSource = normalizedSources.get(normalizedSource);
|
|
21
23
|
if (existingSource !== void 0) {
|
|
22
24
|
throw new Error(
|
|
@@ -31,7 +33,7 @@ function normalizeRouteRules(routeRules) {
|
|
|
31
33
|
}
|
|
32
34
|
normalized[normalizedSource] = {
|
|
33
35
|
...rule,
|
|
34
|
-
...
|
|
36
|
+
..._chunkIUKBPBM7cjs.normalizeFarmRouteRuntimeConfig.call(void 0, rule, `Route rule "${normalizedSource}"`)
|
|
35
37
|
};
|
|
36
38
|
}
|
|
37
39
|
return normalized;
|
|
@@ -100,6 +102,17 @@ function routeRulesToNitroRouteRules(routeRules) {
|
|
|
100
102
|
}
|
|
101
103
|
return nitroRules;
|
|
102
104
|
}
|
|
105
|
+
function resolveRouteRuleCorsPreflightHeaders(routeRules, pathname) {
|
|
106
|
+
if (!routeRules) return void 0;
|
|
107
|
+
let cors;
|
|
108
|
+
let headers = {};
|
|
109
|
+
const matches = Object.entries(routeRules).filter(([source]) => _chunkPWKAX5MScjs.compileConfigRoutePattern.call(void 0, source).regex.test(pathname)).sort(([left], [right]) => _chunkIUKBPBM7cjs.compareFarmRouteRuleSpecificity.call(void 0, left, right));
|
|
110
|
+
for (const [, rule] of matches) {
|
|
111
|
+
if (rule.cors !== void 0) cors = rule.cors;
|
|
112
|
+
headers = { ...headers, ...normalizeCorsHeaders(rule.cors), ...rule.headers };
|
|
113
|
+
}
|
|
114
|
+
return cors ? headers : void 0;
|
|
115
|
+
}
|
|
103
116
|
function normalizeCorsHeaders(cors) {
|
|
104
117
|
if (!cors) return {};
|
|
105
118
|
if (cors === true) {
|
|
@@ -138,4 +151,5 @@ function hasExplicitQuery(destination) {
|
|
|
138
151
|
|
|
139
152
|
|
|
140
153
|
|
|
141
|
-
|
|
154
|
+
|
|
155
|
+
exports.normalizeRouteRules = normalizeRouteRules; exports.routeRulesToRedirects = routeRulesToRedirects; exports.routeRulesToHeaders = routeRulesToHeaders; exports.routeRulesToNitroRouteRules = routeRulesToNitroRouteRules; exports.resolveRouteRuleCorsPreflightHeaders = resolveRouteRuleCorsPreflightHeaders;
|
|
@@ -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(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkPL6RTBDEcjs = require('./chunk-PL6RTBDE.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
|
|
@@ -64,7 +64,7 @@ function findFarmNativeScreenFiles(appDirs) {
|
|
|
64
64
|
}
|
|
65
65
|
function collectFarmNativeServerFns(options) {
|
|
66
66
|
const { root, srcDir } = options;
|
|
67
|
-
const aliases =
|
|
67
|
+
const aliases = _chunkPL6RTBDEcjs.readAliases.call(void 0, root, srcDir);
|
|
68
68
|
const seen = /* @__PURE__ */ new Set();
|
|
69
69
|
const found = /* @__PURE__ */ new Map();
|
|
70
70
|
const queue = [...options.entries];
|
|
@@ -98,7 +98,7 @@ function collectFarmNativeServerFns(options) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
for (const candidate of _nullishCoalesce(candidates, () => ( []))) {
|
|
101
|
-
const resolved =
|
|
101
|
+
const resolved = _chunkPL6RTBDEcjs.resolveFile.call(void 0, candidate);
|
|
102
102
|
if (resolved && SCRIPT.test(resolved) && !resolved.includes(`${_path2.default.sep}node_modules${_path2.default.sep}`)) {
|
|
103
103
|
queue.push(resolved);
|
|
104
104
|
break;
|
|
@@ -12,6 +12,7 @@ var _chunkYTVSWXEZcjs = require('./chunk-YTVSWXEZ.cjs');
|
|
|
12
12
|
|
|
13
13
|
// src/api/endpoint.ts
|
|
14
14
|
var _bettercall = require('better-call');
|
|
15
|
+
var ENDPOINT_FAILURE_SYMBOL = /* @__PURE__ */ Symbol.for("farm.endpoint.failure");
|
|
15
16
|
var EndpointFailure = class extends Error {
|
|
16
17
|
constructor(code, data, options) {
|
|
17
18
|
super(options.message);
|
|
@@ -19,10 +20,14 @@ var EndpointFailure = class extends Error {
|
|
|
19
20
|
this.code = code;
|
|
20
21
|
this.data = data;
|
|
21
22
|
this.status = options.status;
|
|
23
|
+
Object.defineProperty(this, ENDPOINT_FAILURE_SYMBOL, { value: true, enumerable: false });
|
|
22
24
|
}
|
|
23
25
|
};
|
|
24
26
|
function isEndpointFailure(value) {
|
|
25
|
-
|
|
27
|
+
if (value instanceof EndpointFailure) return true;
|
|
28
|
+
if (!value || typeof value !== "object") return false;
|
|
29
|
+
const candidate = value;
|
|
30
|
+
return candidate[ENDPOINT_FAILURE_SYMBOL] === true && typeof candidate.code === "string" && Number.isInteger(candidate.status) && candidate.status >= 400 && candidate.status <= 599;
|
|
26
31
|
}
|
|
27
32
|
function createEndpoint(pathOrOptions, optionsOrHandler, maybeHandler) {
|
|
28
33
|
let path;
|
|
@@ -44,28 +44,8 @@ function describeSchemaExtensionApproval(extension) {
|
|
|
44
44
|
return `schema: { allowExtend: { ${JSON.stringify(extension.owner)}: [${JSON.stringify(extension.modelKey)}] } }`;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
// src/schema-owner.ts
|
|
48
|
-
var FARM_SCHEMA_TABLES = /* @__PURE__ */ Symbol.for("farm.schema-tables");
|
|
49
|
-
function declareSchemaTables(target, declaration) {
|
|
50
|
-
Object.defineProperty(target, FARM_SCHEMA_TABLES, {
|
|
51
|
-
value: declaration,
|
|
52
|
-
enumerable: false,
|
|
53
|
-
configurable: true
|
|
54
|
-
});
|
|
55
|
-
return target;
|
|
56
|
-
}
|
|
57
|
-
function readSchemaTables(candidate) {
|
|
58
|
-
if (!candidate || typeof candidate !== "object" && typeof candidate !== "function") {
|
|
59
|
-
return void 0;
|
|
60
|
-
}
|
|
61
|
-
return candidate[FARM_SCHEMA_TABLES];
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
47
|
|
|
68
48
|
|
|
69
49
|
|
|
70
50
|
|
|
71
|
-
exports.collectSchemaExtensions = collectSchemaExtensions; exports.isSchemaExtensionAllowed = isSchemaExtensionAllowed; exports.describeSchemaExtensionApproval = describeSchemaExtensionApproval;
|
|
51
|
+
exports.collectSchemaExtensions = collectSchemaExtensions; exports.isSchemaExtensionAllowed = isSchemaExtensionAllowed; exports.describeSchemaExtensionApproval = describeSchemaExtensionApproval;
|
|
@@ -9,28 +9,33 @@ import {
|
|
|
9
9
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
APIRouteConflictError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OIOPQ25L.mjs";
|
|
13
13
|
import {
|
|
14
14
|
findProgrammaticRouteFilesInDir
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TXE4SAMV.mjs";
|
|
16
16
|
import {
|
|
17
17
|
isFarmAPIRouteFileName
|
|
18
18
|
} from "./chunk-YX6AFPXC.mjs";
|
|
19
19
|
import {
|
|
20
20
|
API_ROUTE_METHODS,
|
|
21
|
+
FARM_INTERNAL_SERVER_ERROR_BODY,
|
|
22
|
+
createFarmInternalServerErrorResponse,
|
|
21
23
|
getAllowedAPIRouteMethods,
|
|
22
24
|
invokeAPIRouteEndpoint,
|
|
23
25
|
isFarmAPIPathname,
|
|
24
26
|
matchAPIRouteAtBasePath,
|
|
25
27
|
mergePluginAPIRoutes,
|
|
26
28
|
resolveAPIRouteEndpoint
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-TY5KCYDE.mjs";
|
|
28
30
|
import {
|
|
29
31
|
isProgrammaticRoutesFileName
|
|
30
32
|
} from "./chunk-6YFC3ZFX.mjs";
|
|
31
33
|
import {
|
|
32
34
|
createCliColors
|
|
33
35
|
} from "./chunk-IGL6CO6M.mjs";
|
|
36
|
+
import {
|
|
37
|
+
sendWebResponse
|
|
38
|
+
} from "./chunk-CO6UYM2D.mjs";
|
|
34
39
|
import {
|
|
35
40
|
loadFarmDevModule
|
|
36
41
|
} from "./chunk-TUOO6IK3.mjs";
|
|
@@ -38,9 +43,6 @@ import {
|
|
|
38
43
|
toPosixPath,
|
|
39
44
|
toViteModuleId
|
|
40
45
|
} from "./chunk-JSDV2NUN.mjs";
|
|
41
|
-
import {
|
|
42
|
-
sendWebResponse
|
|
43
|
-
} from "./chunk-CO6UYM2D.mjs";
|
|
44
46
|
import {
|
|
45
47
|
createFarmRequestBodyErrorResponse,
|
|
46
48
|
readNodeRequestBody,
|
|
@@ -48,7 +50,7 @@ import {
|
|
|
48
50
|
} from "./chunk-QDWMCFTH.mjs";
|
|
49
51
|
import {
|
|
50
52
|
resolveFarmRequestURL
|
|
51
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-5OFNUETM.mjs";
|
|
52
54
|
import {
|
|
53
55
|
AmbiguousRouteError,
|
|
54
56
|
assertUniqueRouteParameters,
|
|
@@ -231,10 +233,8 @@ function farmApiPlugin(options = {}) {
|
|
|
231
233
|
try {
|
|
232
234
|
return await invokeAPIRouteEndpoint(endpoint, request, params, bodySizeLimit);
|
|
233
235
|
} catch (error) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
headers: { "Content-Type": "application/json" }
|
|
237
|
-
});
|
|
236
|
+
console.error(`[API Error] ${pathname}:`, error);
|
|
237
|
+
return createFarmInternalServerErrorResponse();
|
|
238
238
|
}
|
|
239
239
|
};
|
|
240
240
|
log(`API router created with ${totalEndpoints} endpoints`);
|
|
@@ -469,7 +469,7 @@ function farmApiPlugin(options = {}) {
|
|
|
469
469
|
console.error("[FARM] API error:", error);
|
|
470
470
|
res.statusCode = 500;
|
|
471
471
|
res.setHeader("Content-Type", "application/json");
|
|
472
|
-
res.end(
|
|
472
|
+
res.end(FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
473
473
|
}
|
|
474
474
|
});
|
|
475
475
|
server.middlewares.use((req, res, next) => {
|
|
@@ -492,7 +492,7 @@ function farmApiPlugin(options = {}) {
|
|
|
492
492
|
}
|
|
493
493
|
res.statusCode = 500;
|
|
494
494
|
res.setHeader("Content-Type", "application/json");
|
|
495
|
-
res.end(
|
|
495
|
+
res.end(FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
496
496
|
});
|
|
497
497
|
});
|
|
498
498
|
};
|
|
@@ -4,19 +4,21 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
FARM_MARKDOWN_PAGE_CHECK_HEADER,
|
|
6
6
|
_getFarmMarkdownPageCheckToken,
|
|
7
|
+
_getFarmMarkdownPath,
|
|
8
|
+
_resolveFarmMarkdownIndexAlias,
|
|
7
9
|
createFarmMarkdownViewResponse,
|
|
8
10
|
requestAcceptsMarkdown
|
|
9
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IFR74W6S.mjs";
|
|
10
12
|
|
|
11
13
|
// src/app-markdown-runtime.ts
|
|
12
14
|
import { pathToFileURL } from "url";
|
|
13
15
|
function isFarmMarkdownPageFile(filePath) {
|
|
14
16
|
return /(^|[/\\])page\.mdx?$/i.test(filePath);
|
|
15
17
|
}
|
|
16
|
-
function normalizeFarmMarkdownRoutePath(pathname) {
|
|
18
|
+
function normalizeFarmMarkdownRoutePath(pathname, routePathname) {
|
|
17
19
|
const withoutExtension = pathname.replace(/\.md$/i, "");
|
|
18
20
|
const normalized = withoutExtension.startsWith("/") ? withoutExtension : `/${withoutExtension}`;
|
|
19
|
-
return normalized
|
|
21
|
+
return _resolveFarmMarkdownIndexAlias(normalized.replace(/\/+$/g, "") || "/", routePathname);
|
|
20
22
|
}
|
|
21
23
|
function parseMarkdownFrontmatter(source) {
|
|
22
24
|
if (!source.startsWith("---")) {
|
|
@@ -195,7 +197,7 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
195
197
|
if (!hasMarkdownExtension && !requestAcceptsMarkdown(options.request.headers.get("accept"))) {
|
|
196
198
|
return null;
|
|
197
199
|
}
|
|
198
|
-
const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname);
|
|
200
|
+
const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname, options.routePathname);
|
|
199
201
|
const source = await options.resolveSource(targetPathname);
|
|
200
202
|
if (!source) {
|
|
201
203
|
return null;
|
|
@@ -246,7 +248,10 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
246
248
|
}
|
|
247
249
|
const headers = new Headers({
|
|
248
250
|
"Content-Type": "text/markdown; charset=utf-8",
|
|
249
|
-
"Content-Location":
|
|
251
|
+
"Content-Location": _getFarmMarkdownPath(
|
|
252
|
+
targetPathname,
|
|
253
|
+
options.routePathname?.(targetPathname)
|
|
254
|
+
),
|
|
250
255
|
"Cache-Control": "public, s-maxage=60, stale-while-revalidate=300",
|
|
251
256
|
"X-Farm-Markdown-Route": targetPathname,
|
|
252
257
|
"X-Farm-Markdown-Source": source.filePath
|
|
@@ -1,6 +1,6 @@
|
|
|
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunkQ37INCXGcjs = require('./chunk-Q37INCXG.cjs');
|
|
4
4
|
|
|
5
5
|
// src/app-markdown.ts
|
|
6
6
|
var _promises = require('fs/promises');
|
|
@@ -8,7 +8,7 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
|
8
8
|
var _url = require('url');
|
|
9
9
|
async function createFarmMarkdownRouteModuleFromFile(filePath, options = {}) {
|
|
10
10
|
const source = await _promises.readFile.call(void 0, filePath, "utf8");
|
|
11
|
-
return
|
|
11
|
+
return _chunkQ37INCXGcjs.createFarmMarkdownRouteModule.call(void 0, {
|
|
12
12
|
source,
|
|
13
13
|
filePath,
|
|
14
14
|
components: options.components,
|