@farm.js/core 0.1.77 → 0.1.80
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/after.cjs +1 -1
- package/dist/after.mjs +1 -1
- package/dist/{agent-mcp-handler-PJKZHYSA.mjs → agent-mcp-handler-GDY5CPPW.mjs} +6 -6
- package/dist/{agent-mcp-handler-73SGWVZT.cjs → agent-mcp-handler-IUL6OPC3.cjs} +7 -7
- package/dist/{agent-mcp.d-B1h3RznZ.d.ts → agent-mcp.d-BPa5n0ld.d.ts} +1 -1
- package/dist/{agent-mcp.d-WFQotg8M.d.mts → agent-mcp.d-DOP95Jxm.d.mts} +1 -1
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +4 -4
- package/dist/agent-runtime.d.ts +4 -4
- package/dist/agent-runtime.mjs +2 -2
- package/dist/{analyzer-64YS2OXQ.mjs → analyzer-F7CWE5VA.mjs} +3 -3
- package/dist/analyzer-I7RBBQ65.cjs +16 -0
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.mjs +1 -1
- package/dist/api/client.native.cjs +1 -1
- package/dist/api/client.native.mjs +1 -1
- package/dist/api/node.cjs +7 -7
- package/dist/api/node.d.mts +6 -6
- package/dist/api/node.d.ts +6 -6
- package/dist/api/node.mjs +6 -6
- package/dist/api/route-manager.cjs +10 -10
- package/dist/api/route-manager.d.mts +6 -6
- package/dist/api/route-manager.d.ts +6 -6
- package/dist/api/route-manager.mjs +9 -9
- package/dist/api/runtime.cjs +6 -6
- package/dist/api/runtime.d.mts +5 -5
- package/dist/api/runtime.d.ts +5 -5
- package/dist/api/runtime.mjs +5 -5
- package/dist/api.cjs +12 -12
- package/dist/api.d.mts +7 -7
- package/dist/api.d.ts +7 -7
- package/dist/api.mjs +11 -11
- package/dist/{app-manifest.d-EZEYG-tD.d.mts → app-manifest.d-9UD6BznX.d.mts} +1 -1
- package/dist/{app-manifest.d-Ktsqsuk9.d.ts → app-manifest.d-CO6Iu0Hx.d.ts} +1 -1
- package/dist/app-markdown.cjs +6 -6
- package/dist/app-markdown.d.mts +5 -5
- package/dist/app-markdown.d.ts +5 -5
- package/dist/app-markdown.mjs +5 -5
- package/dist/{app.d-DTkqYcIr.d.mts → app.d-DXeRWZK7.d.mts} +4 -4
- package/dist/{app.d-CSh3y8w8.d.ts → app.d-DwX1ePhs.d.ts} +4 -4
- package/dist/cache.cjs +4 -4
- package/dist/cache.mjs +3 -3
- package/dist/{chunk-QYOAGT3E.cjs → chunk-2BEGVSDF.cjs} +6 -5
- package/dist/{chunk-WW62HKA2.cjs → chunk-2FK47RRZ.cjs} +15 -15
- package/dist/{chunk-2YJ4DHTD.cjs → chunk-2NOHVIJ3.cjs} +2 -2
- package/dist/{chunk-GDM3ZD2O.cjs → chunk-2OFP3IVA.cjs} +5 -1
- package/dist/{chunk-JRBWBMP2.mjs → chunk-2RRTOKRZ.mjs} +1 -1
- package/dist/{chunk-BTHNOAOF.mjs → chunk-3JQBQG7K.mjs} +4 -4
- package/dist/{chunk-H76C5AOU.mjs → chunk-3K2E55BJ.mjs} +2 -2
- package/dist/{chunk-VJ6L7TII.cjs → chunk-3SPECQXI.cjs} +31 -20
- package/dist/{chunk-FNVGK72M.mjs → chunk-44G4XHEL.mjs} +15 -8
- package/dist/{chunk-63EFR2WF.cjs → chunk-4H4ZXUNB.cjs} +3 -3
- package/dist/{chunk-ZBE5EHVJ.mjs → chunk-4MIDUSIX.mjs} +14 -14
- package/dist/{chunk-F4ID7BGO.cjs → chunk-4OFWG4IK.cjs} +7 -7
- package/dist/{chunk-WXMR3OHY.mjs → chunk-4WXNTAOM.mjs} +1 -1
- package/dist/{chunk-LTDMJD2F.cjs → chunk-5OAN7BG5.cjs} +12 -12
- package/dist/{chunk-MQW4LHJR.cjs → chunk-5VDJEKGK.cjs} +4 -4
- package/dist/{chunk-CYNQPKA4.cjs → chunk-5ZHC6QGD.cjs} +2 -2
- package/dist/{chunk-ALEUMLJN.mjs → chunk-67JTJCAS.mjs} +3 -2
- package/dist/{chunk-WHNNDFCJ.mjs → chunk-6GJZJAED.mjs} +1 -1
- package/dist/{chunk-SYPEMXW2.mjs → chunk-6MZSTPD2.mjs} +1 -1
- package/dist/{chunk-SFSTZ7TB.cjs → chunk-7DD5TNPS.cjs} +8 -8
- package/dist/{chunk-GC5ROI3A.cjs → chunk-7U4XF76R.cjs} +1 -1
- package/dist/{chunk-QVBXTSIZ.mjs → chunk-7V5M43ND.mjs} +1 -1
- package/dist/{chunk-62DZHPDK.cjs → chunk-7YLDUB4R.cjs} +10 -10
- package/dist/{chunk-7EOSFIPN.cjs → chunk-A4WWKG2B.cjs} +2 -2
- package/dist/{chunk-OCKQ3YOH.mjs → chunk-A5D3UMLJ.mjs} +2 -2
- package/dist/{chunk-DSRWQ4SJ.cjs → chunk-ANZLZNNX.cjs} +83 -25
- package/dist/{chunk-CSAIIMY3.mjs → chunk-ATISIC6G.mjs} +1 -1
- package/dist/{chunk-FVVGEGQ2.cjs → chunk-AXA2BSX3.cjs} +2 -2
- package/dist/{chunk-BNCKXPCU.cjs → chunk-BIAGSYIZ.cjs} +30 -30
- package/dist/{chunk-FPGSIOWS.mjs → chunk-BPWTSPK6.mjs} +3 -3
- package/dist/{chunk-UYACD4SH.cjs → chunk-CCMP4JD2.cjs} +1 -1
- package/dist/{chunk-JHZ6HULQ.cjs → chunk-CGIVCGH5.cjs} +2 -2
- package/dist/{chunk-ERT6HQAI.mjs → chunk-CNDBLUKI.mjs} +2 -2
- package/dist/{chunk-3AJQFVWW.mjs → chunk-COTFX4GT.mjs} +2 -2
- package/dist/{chunk-RK4MGL6Q.mjs → chunk-CYRO3WP4.mjs} +4 -3
- package/dist/{chunk-PUEPDMWY.cjs → chunk-DVHFIETW.cjs} +29 -22
- package/dist/{chunk-F35C3TJZ.mjs → chunk-E4E4Y5FD.mjs} +1 -1
- package/dist/{chunk-TQOYIPMQ.mjs → chunk-EG5YBYHO.mjs} +2 -2
- package/dist/{chunk-2DA7CLY7.mjs → chunk-EILUVBKS.mjs} +14 -0
- package/dist/{chunk-GAAK3HDZ.mjs → chunk-EY7ED5UW.mjs} +6 -6
- package/dist/{chunk-ZO6TOLHL.mjs → chunk-FS55CNTC.mjs} +1 -1
- package/dist/{chunk-YRQ44JTF.cjs → chunk-G4SZC2WH.cjs} +649 -446
- package/dist/{chunk-OQZF6H6G.cjs → chunk-GAWSWJJ2.cjs} +27 -27
- package/dist/{chunk-QUEYL2WM.cjs → chunk-GBESKA76.cjs} +4 -4
- package/dist/{chunk-NTHAZLVS.mjs → chunk-GBW5DU7V.mjs} +385 -182
- package/dist/{chunk-OVUU2RCQ.mjs → chunk-HD5FLXP2.mjs} +1 -1
- package/dist/{chunk-Q2EKSSEG.cjs → chunk-HEDGTXXB.cjs} +14 -14
- package/dist/{chunk-5QZT2EQN.cjs → chunk-HNUBRUFQ.cjs} +2 -2
- package/dist/{chunk-JA6RML7C.mjs → chunk-HR4N2K4V.mjs} +2 -2
- package/dist/{chunk-6D3CJFNU.cjs → chunk-HR5GU4UU.cjs} +7 -7
- package/dist/{chunk-SX535SU5.cjs → chunk-IJPRCQHW.cjs} +10 -10
- package/dist/{chunk-SMYDCZBW.mjs → chunk-JGEN2FIT.mjs} +1 -1
- package/dist/{chunk-3GMD2E4Q.mjs → chunk-K3XKEZR6.mjs} +3 -3
- package/dist/{chunk-LPXJEZJK.mjs → chunk-KCJBIWBM.mjs} +2 -2
- package/dist/{chunk-IXC6WDMT.mjs → chunk-KEU55O2D.mjs} +1 -1
- package/dist/{chunk-5WFPZG7K.mjs → chunk-KKVRWNDH.mjs} +6 -6
- package/dist/{chunk-NSNQLBHR.cjs → chunk-KMGHXIDA.cjs} +2 -2
- package/dist/{chunk-Z2FFLTF5.mjs → chunk-LTXKRIST.mjs} +2 -2
- package/dist/{chunk-YROK6CJC.cjs → chunk-LVGB5PYK.cjs} +30 -30
- package/dist/{chunk-QODXWUGQ.mjs → chunk-MDEFTF63.mjs} +69 -14
- package/dist/{chunk-FTQUNBRN.cjs → chunk-MHKPXX3J.cjs} +2 -2
- package/dist/{chunk-HFJLMALC.cjs → chunk-MQOHYV6L.cjs} +17 -17
- package/dist/{chunk-BGUTIQII.mjs → chunk-MUZHULW2.mjs} +1 -1
- package/dist/{chunk-WGNGM6MJ.mjs → chunk-MZ5QGWRW.mjs} +2 -2
- package/dist/{chunk-DZZHTMWM.cjs → chunk-N3H7UPBM.cjs} +3 -2
- package/dist/{chunk-CF74ABRI.mjs → chunk-NJ4OASLP.mjs} +4 -4
- package/dist/{chunk-RFXEQYPH.cjs → chunk-NW3DL2PM.cjs} +83 -24
- package/dist/{chunk-QDHR54S6.cjs → chunk-OBVBII5K.cjs} +5 -5
- package/dist/{chunk-WRWJ7IWT.cjs → chunk-OLKYHTLN.cjs} +5 -5
- package/dist/{chunk-EVIWKPJV.cjs → chunk-PLJMEUAN.cjs} +15 -1
- package/dist/{chunk-EMTN5ABC.mjs → chunk-POVHO46S.mjs} +1 -1
- package/dist/{chunk-X3Y6JWJG.cjs → chunk-PWMJBCAN.cjs} +3 -3
- package/dist/{chunk-PG7J7XYT.cjs → chunk-Q4TRGTO7.cjs} +6 -6
- package/dist/{chunk-KUXEII7V.mjs → chunk-Q4YEAWUK.mjs} +1 -1
- package/dist/{chunk-D2RLADWN.mjs → chunk-QBJ6N5MT.mjs} +83 -24
- package/dist/{chunk-PKXGFQZS.mjs → chunk-QD34VE4N.mjs} +1 -1
- package/dist/{chunk-2QPTZMGK.mjs → chunk-QHAISITM.mjs} +1 -1
- package/dist/{chunk-VJI2LWTL.cjs → chunk-RFNQTQ44.cjs} +2 -2
- package/dist/{chunk-TZ2YPXLB.cjs → chunk-RLCOWWE5.cjs} +7 -7
- package/dist/{chunk-IG2JE6WJ.mjs → chunk-RLEAVG6G.mjs} +1 -1
- package/dist/{chunk-SL2BSPDJ.mjs → chunk-RPA45OQS.mjs} +2 -2
- package/dist/{chunk-ORWXJDUN.mjs → chunk-RQBGHHOQ.mjs} +1 -1
- package/dist/{chunk-GC2BSXQS.cjs → chunk-SDICLSQU.cjs} +11 -11
- package/dist/{chunk-FE6KYDHC.cjs → chunk-SHDCKRP4.cjs} +3 -3
- package/dist/{chunk-DUSTJ6A5.mjs → chunk-SLEHAGGV.mjs} +2 -2
- package/dist/{chunk-IIVZTGGP.cjs → chunk-T3SMMLSB.cjs} +2 -2
- package/dist/{chunk-K6DXKHFE.mjs → chunk-TE7AX6HB.mjs} +1 -1
- package/dist/chunk-TIZJYHB7.mjs +42 -0
- package/dist/{chunk-NQZWLIPT.cjs → chunk-TS3ZHJN5.cjs} +3 -3
- package/dist/{chunk-KHS3T3E5.mjs → chunk-TYHWZOA2.mjs} +1 -1
- package/dist/{chunk-Z3QXQN4U.mjs → chunk-U6GMCDRS.mjs} +1 -1
- package/dist/{chunk-URQW27KO.mjs → chunk-UBLKPREL.mjs} +1 -1
- package/dist/{chunk-DD22NQFX.cjs → chunk-UGLTOLTJ.cjs} +2 -2
- package/dist/{chunk-PE2LEWXA.mjs → chunk-UJPE75GF.mjs} +1 -1
- package/dist/{chunk-6ZFGWB75.cjs → chunk-UWOCYINY.cjs} +4 -4
- package/dist/chunk-UZM3PDKK.cjs +46 -0
- package/dist/{chunk-YTGNMKRA.mjs → chunk-V73Y4UBL.mjs} +67 -9
- package/dist/{chunk-G7B6NU4X.cjs → chunk-VFMHE5D3.cjs} +3 -3
- package/dist/{chunk-IXO6O2EL.cjs → chunk-VGVRGGP4.cjs} +2 -2
- package/dist/{chunk-YRXPDKMM.cjs → chunk-W53Z4WDI.cjs} +8 -8
- package/dist/{chunk-47R7CX4A.mjs → chunk-WBPVLCNE.mjs} +1 -1
- package/dist/{chunk-4VLXQ55O.cjs → chunk-WIZRYFB2.cjs} +3 -3
- package/dist/{chunk-WZVESREI.cjs → chunk-WJ2O2MPP.cjs} +312 -291
- package/dist/{chunk-SIYELCIX.cjs → chunk-X4TSMQWF.cjs} +339 -309
- package/dist/{chunk-DASQJ5UD.mjs → chunk-XF7MJSUS.mjs} +1 -1
- package/dist/{chunk-S7QEQCVV.mjs → chunk-XGL42MQ7.mjs} +1 -1
- package/dist/{chunk-YN7G22MP.cjs → chunk-XKUKWMGX.cjs} +3 -3
- package/dist/{chunk-JD42G6BN.cjs → chunk-XY5OZQF6.cjs} +2 -2
- package/dist/{chunk-7EXFAJST.mjs → chunk-XZBBKZGW.mjs} +80 -59
- package/dist/{chunk-3QM74STY.cjs → chunk-Y2FEFQAY.cjs} +3 -3
- package/dist/{chunk-ZJGFAW5U.mjs → chunk-YHHOTKUT.mjs} +5 -1
- package/dist/{chunk-65XXHTVJ.mjs → chunk-YN3YMSKD.mjs} +4 -4
- package/dist/{chunk-PDACTAVX.mjs → chunk-YOVSWY2E.mjs} +1 -1
- package/dist/{chunk-R5X7FDOG.mjs → chunk-YU2MNIIY.mjs} +1 -1
- package/dist/{chunk-42EUEYW6.cjs → chunk-YUQUGVSV.cjs} +8 -8
- package/dist/{chunk-DZ3AZ7UK.cjs → chunk-Z4SMFUZ7.cjs} +28 -28
- package/dist/{chunk-7SAGHWWU.cjs → chunk-Z5BANEQD.cjs} +6 -6
- package/dist/{chunk-IHMSLS2O.mjs → chunk-ZDYYZX73.mjs} +63 -33
- package/dist/{chunk-4PWGLPL6.mjs → chunk-ZIEO3DQ3.mjs} +26 -15
- package/dist/{chunk-FCHEO3LG.cjs → chunk-ZPEZXQTM.cjs} +22 -22
- package/dist/{chunk-PMKUTZGR.cjs → chunk-ZVSQN7NC.cjs} +135 -80
- package/dist/{cli-runtime.d-DljFfr8T.d.ts → cli-runtime.d-8BhZy_wr.d.ts} +7 -6
- package/dist/{cli-runtime.d-HSkdfvoq.d.mts → cli-runtime.d-DPNTN-JV.d.mts} +7 -6
- package/dist/client/lifecycle.cjs +1 -1
- 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-B-1dIlsw.d.mts → client-component.d-CMCdyAr8.d.mts} +1 -1
- package/dist/{client-component.d-_otXB__v.d.ts → client-component.d-CkDcob6D.d.ts} +1 -1
- package/dist/client-plugins.cjs +1 -1
- package/dist/{client-plugins.d-MjxlvbCK.d.ts → client-plugins.d-BYIovYqX.d.ts} +4 -4
- package/dist/{client-plugins.d-BmBzvfSP.d.mts → client-plugins.d-WcMwOZGZ.d.mts} +4 -4
- package/dist/client-plugins.d.mts +4 -4
- package/dist/client-plugins.d.ts +4 -4
- package/dist/client-plugins.mjs +1 -1
- package/dist/client.cjs +4 -4
- package/dist/client.d.mts +9 -9
- package/dist/client.d.ts +9 -9
- package/dist/client.mjs +3 -3
- package/dist/config.cjs +1 -1
- package/dist/config.d.mts +4 -4
- package/dist/config.d.ts +4 -4
- package/dist/config.mjs +1 -1
- package/dist/cron.cjs +4 -4
- package/dist/cron.mjs +3 -3
- package/dist/deferred.cjs +1 -1
- package/dist/deferred.mjs +1 -1
- package/dist/deployment.cjs +1 -1
- package/dist/deployment.mjs +1 -1
- package/dist/desktop.cjs +1 -1
- package/dist/desktop.d.mts +5 -5
- package/dist/desktop.d.ts +5 -5
- package/dist/desktop.mjs +1 -1
- package/dist/{dev-guard-ZDIELV6Q.mjs → dev-guard-K3GJDPEQ.mjs} +1 -1
- package/dist/{dev-guard-ZLLKVO5T.cjs → dev-guard-VIEEA4LS.cjs} +1 -1
- package/dist/{devtools-7LHXG2VS.mjs → devtools-F3FDFV26.mjs} +11 -11
- package/dist/{devtools-NNQN66EZ.cjs → devtools-JJOYTIMS.cjs} +13 -13
- package/dist/{devtools-client-X5OQCXDF.cjs → devtools-client-BKBCCORT.cjs} +1 -1
- package/dist/{devtools-client-SU4XH46J.mjs → devtools-client-L4MUWD6K.mjs} +1 -1
- package/dist/{devtools-ui-CYBVFLPH.mjs → devtools-ui-BOG33MT5.mjs} +1 -1
- package/dist/{devtools-ui-SYRUXUA7.cjs → devtools-ui-C2EMF2SO.cjs} +1 -1
- package/dist/docs.cjs +15 -15
- package/dist/docs.d.mts +6 -6
- package/dist/docs.d.ts +6 -6
- package/dist/docs.mjs +14 -14
- package/dist/env-types.cjs +1 -1
- package/dist/env-types.mjs +1 -1
- package/dist/env.cjs +1 -1
- package/dist/env.mjs +1 -1
- package/dist/environment/vite.cjs +6 -6
- package/dist/environment/vite.d.mts +9 -0
- package/dist/environment/vite.d.ts +9 -0
- package/dist/environment/vite.mjs +5 -5
- package/dist/environment.cjs +1 -1
- package/dist/environment.mjs +1 -1
- package/dist/font.cjs +1 -1
- package/dist/font.mjs +1 -1
- package/dist/{handler.d-C53zFDmp.d.ts → handler.d-BwdOyc9x.d.ts} +1 -1
- package/dist/{handler.d-CaYopqaD.d.mts → handler.d-s3IM6pbJ.d.mts} +1 -1
- package/dist/headers.cjs +1 -1
- package/dist/{headers.d-MBkD9ZLf.d.mts → headers.d-BR-OXrqQ.d.mts} +1 -1
- package/dist/{headers.d-BvtpC90T.d.ts → headers.d-CAW4wPey.d.ts} +1 -1
- package/dist/headers.mjs +1 -1
- package/dist/i18n/client.cjs +1 -1
- package/dist/i18n/client.mjs +1 -1
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.mjs +1 -1
- package/dist/i18n/server.cjs +1 -1
- package/dist/i18n/server.mjs +1 -1
- package/dist/image/server.cjs +1 -1
- package/dist/image/server.mjs +1 -1
- package/dist/image/sharp.cjs +1 -1
- package/dist/image/sharp.mjs +1 -1
- package/dist/image.cjs +1 -1
- package/dist/image.mjs +1 -1
- package/dist/index.cjs +74 -68
- package/dist/{index.d-Mikf-tdP.d.mts → index.d-BEVK61zS.d.mts} +1 -1
- package/dist/{index.d-2hQpPZ-P.d.ts → index.d-ah2c89Wu.d.ts} +1 -1
- package/dist/index.d.mts +25 -25
- package/dist/index.d.ts +25 -25
- package/dist/index.mjs +72 -66
- package/dist/instrumentation.cjs +1 -1
- package/dist/instrumentation.mjs +1 -1
- package/dist/integrations/orm.cjs +4 -4
- package/dist/integrations/orm.d.mts +4 -4
- package/dist/integrations/orm.d.ts +4 -4
- package/dist/integrations/orm.mjs +3 -3
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +4 -4
- package/dist/integrations.d.ts +4 -4
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.cjs +5 -5
- package/dist/internal/app-markdown-runtime.d.mts +5 -5
- package/dist/internal/app-markdown-runtime.d.ts +5 -5
- package/dist/internal/app-markdown-runtime.mjs +4 -4
- package/dist/internal/build-runtime.cjs +51 -51
- package/dist/internal/build-runtime.d.mts +7 -7
- package/dist/internal/build-runtime.d.ts +7 -7
- package/dist/internal/build-runtime.mjs +50 -50
- package/dist/internal/cli-runtime.cjs +31 -28
- package/dist/internal/cli-runtime.d.mts +11 -11
- package/dist/internal/cli-runtime.d.ts +11 -11
- package/dist/internal/cli-runtime.mjs +30 -27
- package/dist/internal/client-error-overlay.cjs +5 -5
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +49 -12
- package/dist/internal/client-runtime.d.mts +17 -21
- package/dist/internal/client-runtime.d.ts +17 -21
- package/dist/internal/client-runtime.mjs +38 -1
- package/dist/internal/compression-runtime.cjs +1 -1
- package/dist/internal/compression-runtime.d.mts +4 -4
- package/dist/internal/compression-runtime.d.ts +4 -4
- package/dist/internal/compression-runtime.mjs +1 -1
- package/dist/internal/config-runtime.cjs +13 -13
- package/dist/internal/config-runtime.d.mts +6 -6
- package/dist/internal/config-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.mjs +12 -12
- package/dist/internal/desktop-guard.cjs +1 -1
- package/dist/internal/desktop-guard.mjs +1 -1
- package/dist/internal/docs-precompiled-runtime.cjs +1 -1
- package/dist/internal/docs-precompiled-runtime.mjs +1 -1
- package/dist/internal/form-actions-client.cjs +1 -1
- package/dist/internal/form-actions-client.mjs +1 -1
- package/dist/internal/form-actions.cjs +1 -1
- package/dist/internal/form-actions.mjs +1 -1
- package/dist/internal/infra-analytics-runtime.cjs +11 -11
- package/dist/internal/infra-analytics-runtime.mjs +9 -9
- package/dist/internal/island-codec.cjs +1 -1
- package/dist/internal/island-codec.mjs +1 -1
- package/dist/internal/island-value-store.cjs +1 -1
- package/dist/internal/island-value-store.mjs +1 -1
- package/dist/internal/islands-boot.cjs +59 -10
- package/dist/internal/islands-boot.d.mts +19 -1
- package/dist/internal/islands-boot.d.ts +19 -1
- package/dist/internal/islands-boot.mjs +55 -6
- package/dist/internal/islands-runtime.cjs +1 -1
- package/dist/internal/islands-runtime.mjs +1 -1
- package/dist/internal/islands-server.cjs +1 -1
- package/dist/internal/islands-server.mjs +1 -1
- package/dist/internal/islx-client.cjs +1 -1
- package/dist/internal/islx-react.cjs +1 -1
- package/dist/internal/islx-server.cjs +1 -1
- package/dist/internal/isolated-boundary.cjs +1 -1
- package/dist/internal/isolated-boundary.mjs +1 -1
- package/dist/internal/metadata-image-runtime.cjs +1 -1
- package/dist/internal/metadata-image-runtime.mjs +1 -1
- 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 +4 -4
- package/dist/internal/product-telemetry-runtime.mjs +3 -3
- package/dist/internal/production-node-env.cjs +1 -1
- package/dist/internal/production-node-env.mjs +1 -1
- package/dist/internal/production-runtime.cjs +27 -27
- package/dist/internal/production-runtime.d.mts +14 -13
- package/dist/internal/production-runtime.d.ts +14 -13
- package/dist/internal/production-runtime.mjs +28 -28
- package/dist/internal/react-cache.cjs +1 -1
- package/dist/internal/react-cache.mjs +1 -1
- package/dist/internal/request-cookies.cjs +1 -1
- package/dist/internal/request-cookies.mjs +1 -1
- package/dist/internal/server-fn-transform.cjs +1 -1
- package/dist/internal/server-fn-transform.mjs +1 -1
- package/dist/internal/server-tree.cjs +1 -1
- package/dist/internal/server-tree.mjs +1 -1
- package/dist/internal/spa-router.cjs +44 -0
- package/dist/internal/spa-router.d.mts +41 -0
- package/dist/internal/spa-router.d.ts +41 -0
- package/dist/internal/spa-router.mjs +44 -0
- package/dist/internal/start-manifest.cjs +1 -1
- package/dist/internal/start-manifest.d.mts +4 -4
- package/dist/internal/start-manifest.d.ts +4 -4
- package/dist/internal/start-manifest.mjs +1 -1
- package/dist/internal/vercel-edge-middleware.cjs +4 -4
- package/dist/internal/vercel-edge-middleware.mjs +3 -3
- package/dist/json-ld.cjs +1 -1
- package/dist/json-ld.mjs +1 -1
- package/dist/{layers-I7VE5Q2Y.mjs → layers-5ZD4764G.mjs} +1 -1
- package/dist/{layers-WP5K5F7W.cjs → layers-HMEGUEXM.cjs} +1 -1
- package/dist/libsql-http-2QD224YS.mjs +600 -0
- package/dist/libsql-http-M6LMNXCN.cjs +600 -0
- package/dist/{lifecycle.d-VzcXyEyn.d.ts → lifecycle.d-OtGWAvJT.d.mts} +1 -1
- package/dist/{lifecycle.d-VzcXyEyn.d.mts → lifecycle.d-OtGWAvJT.d.ts} +1 -1
- package/dist/{manager-YO2RHDYU.mjs → manager-OMTC5FOJ.mjs} +2 -2
- package/dist/{manager-R7FV4A56.cjs → manager-PX4QN4HK.cjs} +4 -4
- package/dist/markdown.cjs +4 -4
- package/dist/markdown.d.mts +4 -4
- package/dist/markdown.d.ts +4 -4
- package/dist/markdown.mjs +3 -3
- package/dist/middleware.cjs +10 -10
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/middleware.mjs +9 -9
- package/dist/mobile.cjs +1 -1
- package/dist/mobile.mjs +1 -1
- package/dist/{modules-KOKD4XS6.mjs → modules-3Q2ZCY4Q.mjs} +1 -1
- package/dist/{modules-QTP7WJPD.cjs → modules-KDHFBQ6L.cjs} +1 -1
- package/dist/{mount.d-GU-tNxbE.d.ts → mount.d-DcoPFqv5.d.ts} +1 -1
- package/dist/{mount.d-DsP46XCy.d.mts → mount.d-Ylo-CmzK.d.mts} +1 -1
- package/dist/{native-server-fn-handler-LII4MDRR.mjs → native-server-fn-handler-OXFTI6V5.mjs} +5 -5
- package/dist/{native-server-fn-handler-IWNKQEXK.cjs → native-server-fn-handler-TNVFEQW3.cjs} +6 -6
- package/dist/{native-specs-LDV6IZ4N.mjs → native-specs-A7YOL463.mjs} +1 -1
- package/dist/{native-specs-5OLED4MM.cjs → native-specs-JDPH26AO.cjs} +1 -1
- package/dist/{native-tree-D3PW64ZL.cjs → native-tree-5TENEQ7Y.cjs} +5 -5
- package/dist/{native-tree-G6ZWS7IR.mjs → native-tree-LNO7K6JR.mjs} +4 -4
- package/dist/native.cjs +1 -1
- package/dist/native.mjs +1 -1
- package/dist/{navigation-delegate.d-DsxNPrLT.d.ts → navigation-delegate.d-2MK4YSlL.d.ts} +1 -1
- package/dist/{navigation-delegate.d-CUtNOYLi.d.mts → navigation-delegate.d-BA5h0fbE.d.mts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +7 -7
- package/dist/navigation.d.ts +7 -7
- package/dist/navigation.mjs +4 -4
- package/dist/{nitro-HKMVYIXY.cjs → nitro-6UOJXJZ6.cjs} +8 -8
- package/dist/{nitro-RHLKLYXH.mjs → nitro-C3MYDX7V.mjs} +4 -4
- package/dist/{node-module-bundle-LIZ2KMVW.cjs → node-module-bundle-M6BISE2P.cjs} +1 -1
- package/dist/{node-module-bundle-VR6NV6AI.mjs → node-module-bundle-XPLBMXRD.mjs} +1 -1
- package/dist/observability.cjs +9 -3
- package/dist/{observability.d-DdJRiaIX.d.ts → observability.d-mXSbp4jc.d.mts} +17 -1
- package/dist/{observability.d-DdJRiaIX.d.mts → observability.d-mXSbp4jc.d.ts} +17 -1
- package/dist/observability.d.mts +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/observability.mjs +8 -2
- package/dist/og.cjs +1 -1
- package/dist/og.mjs +1 -1
- package/dist/platform.cjs +1 -1
- package/dist/platform.mjs +1 -1
- package/dist/{plugin-2KWR2X4B.mjs → plugin-33I3V42N.mjs} +2 -2
- package/dist/{plugin-MW7IDV76.cjs → plugin-LN3JBZRR.cjs} +3 -3
- package/dist/plugin.cjs +41 -41
- package/dist/plugin.d.mts +8 -8
- package/dist/plugin.d.ts +8 -8
- package/dist/plugin.mjs +40 -40
- package/dist/{port-CLL4BC4O.mjs → port-CEZTV776.mjs} +1 -1
- package/dist/{port-HASZTQGY.cjs → port-STMSGUVU.cjs} +1 -1
- package/dist/query/client.cjs +7 -7
- package/dist/query/client.mjs +2 -2
- package/dist/query/index.cjs +1 -1
- package/dist/query/index.mjs +1 -1
- package/dist/query/parsers.cjs +1 -1
- package/dist/query/parsers.mjs +1 -1
- package/dist/query/server.cjs +1 -1
- package/dist/query/server.mjs +1 -1
- package/dist/{render-plan.d-8K6S0h0L.d.ts → render-plan.d-2o-AG-ot.d.ts} +1 -1
- package/dist/{render-plan.d-B7Xp-PPW.d.mts → render-plan.d-ChYBMhLu.d.mts} +1 -1
- package/dist/renderer/none/server.cjs +1 -1
- package/dist/renderer/none/server.mjs +1 -1
- package/dist/renderer/react/client.cjs +1 -1
- package/dist/renderer/react/client.mjs +1 -1
- package/dist/renderer/react/server.cjs +1 -1
- package/dist/renderer/react/server.mjs +1 -1
- package/dist/renderer/react/vite.cjs +1 -1
- package/dist/renderer/react/vite.mjs +1 -1
- package/dist/renderer-client.cjs +5 -5
- package/dist/renderer-client.d.mts +7 -7
- package/dist/renderer-client.d.ts +7 -7
- package/dist/renderer-client.mjs +2 -2
- package/dist/renderer.cjs +1 -1
- package/dist/renderer.d.mts +16 -1
- package/dist/renderer.d.ts +16 -1
- package/dist/renderer.mjs +1 -1
- package/dist/request.cjs +1 -1
- package/dist/{request.d-CuQxmOqX.d.ts → request.d-CE0FIkiM.d.ts} +1 -1
- package/dist/{request.d-nhqciCAz.d.mts → request.d-RCnCBuWq.d.mts} +1 -1
- package/dist/request.d.mts +5 -5
- package/dist/request.d.ts +5 -5
- package/dist/request.mjs +1 -1
- package/dist/{route-rendering.d-BSsdDYC1.d.ts → route-rendering.d-BTPOM2nU.d.ts} +1 -1
- package/dist/{route-rendering.d-CeF1FOnl.d.mts → route-rendering.d-BZJnfKsp.d.mts} +1 -1
- package/dist/router.cjs +1 -1
- package/dist/{router.d-C7yGlhDL.d.ts → router.d-BU_WE6Ol.d.ts} +1 -1
- package/dist/{router.d-D462OX24.d.mts → router.d-D8Vvwl4i.d.mts} +1 -1
- package/dist/router.mjs +1 -1
- package/dist/routes.cjs +5 -5
- package/dist/routes.d.mts +4 -4
- package/dist/routes.d.ts +4 -4
- package/dist/routes.mjs +4 -4
- package/dist/{rsc-pipeline-7PV6ARDS.cjs → rsc-pipeline-A3R4U26C.cjs} +17 -17
- package/dist/{rsc-pipeline-EZU4W4RL.mjs → rsc-pipeline-JZWVSHOR.mjs} +16 -16
- package/dist/{runtime-RWLFEPS3.mjs → runtime-SQFRHRGJ.mjs} +20 -20
- package/dist/{runtime-QOE3NRXF.cjs → runtime-WZ3CHHGJ.cjs} +28 -28
- package/dist/{runtime.d-C-BHQMy5.d.mts → runtime.d-BnmuOXVD.d.mts} +1 -1
- package/dist/{runtime.d-CORDJQMy.d.ts → runtime.d-DJ6IIKcF.d.ts} +1 -1
- package/dist/safe-fetch.cjs +1 -1
- package/dist/safe-fetch.mjs +1 -1
- package/dist/{schema-dev-notice-CA55V57L.mjs → schema-dev-notice-EUPAUJVN.mjs} +3 -3
- package/dist/{schema-dev-notice-RWA2UTR6.cjs → schema-dev-notice-ZSCL47CT.cjs} +6 -6
- package/dist/schema.cjs +1 -1
- package/dist/schema.mjs +1 -1
- package/dist/search-client-A7YJT7JZ.cjs +15 -0
- package/dist/{search-client-OXH6GBNO.mjs → search-client-GIXIEU75.mjs} +2 -2
- package/dist/server-action-security.cjs +1 -1
- package/dist/server-action-security.mjs +1 -1
- package/dist/{server-components-status.d-BbADqqjq.d.ts → server-components-status.d-BeqSXcjM.d.ts} +1 -1
- package/dist/{server-components-status.d-BJ6huueH.d.mts → server-components-status.d-BzOg9M8g.d.mts} +1 -1
- package/dist/server-fn-client.cjs +1 -1
- package/dist/server-fn-client.mjs +1 -1
- package/dist/server-fn.cjs +5 -5
- package/dist/server-fn.mjs +4 -4
- package/dist/server-plugins.cjs +1 -1
- package/dist/server-plugins.d.mts +6 -6
- package/dist/server-plugins.d.ts +6 -6
- package/dist/server-plugins.mjs +1 -1
- package/dist/server-query-client.cjs +1 -1
- package/dist/server-query-client.mjs +1 -1
- package/dist/server-query.cjs +6 -6
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +122 -100
- package/dist/server.d.mts +15 -15
- package/dist/server.d.ts +15 -15
- package/dist/server.mjs +77 -55
- package/dist/{session-WPAT6H76.mjs → session-4IB34X35.mjs} +3 -3
- package/dist/session-MOYQJ7E6.cjs +24 -0
- package/dist/{spa-router.d-DyGJLQc_.d.ts → spa-router.d-BOwuVkMl.d.ts} +20 -4
- package/dist/{spa-router.d-DfjafHyX.d.mts → spa-router.d-CDpftSsk.d.mts} +20 -4
- package/dist/{ssg.d-D11lz_wr.d.ts → ssg.d-BTVqyq8T.d.ts} +2 -2
- package/dist/{ssg.d-iiLTyLAO.d.mts → ssg.d-Bx_WFuwg.d.mts} +2 -2
- package/dist/storage.cjs +3 -3
- package/dist/storage.d.mts +112 -96
- package/dist/storage.d.ts +112 -96
- package/dist/storage.mjs +2 -2
- package/dist/testing.cjs +13 -13
- package/dist/testing.d.mts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.mjs +10 -10
- package/dist/theme/client.cjs +1 -1
- package/dist/theme/client.mjs +1 -1
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.mjs +1 -1
- package/dist/theme/runtime.cjs +1 -1
- package/dist/theme/runtime.mjs +1 -1
- package/dist/theme/server.cjs +1 -1
- package/dist/theme/server.mjs +1 -1
- package/dist/{types.d-DC97bnjj.d.mts → types.d-C5hlNbHa.d.mts} +14 -2
- package/dist/{types.d-DC97bnjj.d.ts → types.d-C5hlNbHa.d.ts} +14 -2
- package/dist/{utils.d-fW-95yEh.d.mts → utils.d-JkrpS-NJ.d.mts} +1 -1
- package/dist/{utils.d-D-GQeEfa.d.ts → utils.d-_dvevm5s.d.ts} +1 -1
- package/dist/version.cjs +3 -3
- package/dist/version.mjs +2 -2
- package/dist/vite.cjs +43 -41
- package/dist/vite.d.mts +15 -10
- package/dist/vite.d.ts +15 -10
- package/dist/vite.mjs +42 -40
- package/dist/workflows.cjs +4 -4
- package/dist/workflows.mjs +3 -3
- package/package.json +9 -5
- package/types/images.d.ts +9 -0
- package/dist/analyzer-HTNXLX6N.cjs +0 -16
- package/dist/chunk-BTZ5O6VM.cjs +0 -14
- package/dist/chunk-Y6FXYEAI.mjs +0 -10
- package/dist/search-client-ZZLKVO5R.cjs +0 -15
- package/dist/session-OU7M4CIF.cjs +0 -24
- package/dist/{chunk-GFXKO4UW.mjs → chunk-3XTRT3MB.mjs} +48 -48
- package/dist/{chunk-BEXH6BGH.mjs → chunk-6JWXHPVR.mjs} +0 -0
- package/dist/{chunk-RL47VZ6J.mjs → chunk-C2OLXVUC.mjs} +0 -0
- package/dist/{chunk-YTNE4KGC.cjs → chunk-HS4JPIGR.cjs} +0 -0
- package/dist/{chunk-PC5OZ4YR.cjs → chunk-TCMRLW3K.cjs} +0 -0
- package/dist/{chunk-UOE6ZZZP.mjs → chunk-URBP6DLH.mjs} +0 -0
- package/dist/{chunk-AF3PNVVF.cjs → chunk-WGWWRV2M.cjs} +0 -0
- package/dist/{chunk-L7Y65BQU.cjs → chunk-WHEQJN4G.cjs} +48 -48
|
@@ -1,7 +1,7 @@
|
|
|
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; } async function _asyncOptionalChain(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 = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkZ5BANEQDcjs = require('./chunk-Z5BANEQD.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
@@ -9,7 +9,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkSDICLSQUcjs = require('./chunk-SDICLSQU.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -45,10 +45,10 @@ var _chunkGC2BSXQScjs = require('./chunk-GC2BSXQS.cjs');
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
var
|
|
48
|
+
var _chunkUWOCYINYcjs = require('./chunk-UWOCYINY.cjs');
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunk5OAN7BG5cjs = require('./chunk-5OAN7BG5.cjs');
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
@@ -56,19 +56,19 @@ var _chunkLTDMJD2Fcjs = require('./chunk-LTDMJD2F.cjs');
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
var
|
|
59
|
+
var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
var _chunkK6PGK7DCcjs = require('./chunk-K6PGK7DC.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
|
+
var _chunk52LTENREcjs = require('./chunk-52LTENRE.cjs');
|
|
66
67
|
|
|
67
|
-
var _chunkPBJ7MEOVcjs = require('./chunk-PBJ7MEOV.cjs');
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
var
|
|
71
|
+
var _chunkPBJ7MEOVcjs = require('./chunk-PBJ7MEOV.cjs');
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
@@ -95,7 +95,7 @@ var _chunk52LTENREcjs = require('./chunk-52LTENRE.cjs');
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
98
|
+
var _chunkZVSQN7NCcjs = require('./chunk-ZVSQN7NC.cjs');
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
|
|
@@ -122,7 +122,7 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
var
|
|
125
|
+
var _chunk4OFWG4IKcjs = require('./chunk-4OFWG4IK.cjs');
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
|
|
@@ -132,7 +132,7 @@ var _chunkF4ID7BGOcjs = require('./chunk-F4ID7BGO.cjs');
|
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
|
|
135
|
-
var
|
|
135
|
+
var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
|
|
@@ -147,7 +147,6 @@ var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
|
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
|
|
150
|
-
var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
|
|
151
150
|
|
|
152
151
|
|
|
153
152
|
|
|
@@ -157,26 +156,27 @@ var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
|
|
|
157
156
|
|
|
158
157
|
|
|
159
158
|
|
|
159
|
+
var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
|
|
163
|
-
var
|
|
163
|
+
var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
|
|
164
164
|
|
|
165
165
|
|
|
166
166
|
var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
|
|
167
167
|
|
|
168
168
|
|
|
169
|
-
var
|
|
169
|
+
var _chunk5ZHC6QGDcjs = require('./chunk-5ZHC6QGD.cjs');
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
var _chunkXRFGOYXGcjs = require('./chunk-XRFGOYXG.cjs');
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
176
|
-
var
|
|
176
|
+
var _chunkHNUBRUFQcjs = require('./chunk-HNUBRUFQ.cjs');
|
|
177
177
|
|
|
178
178
|
|
|
179
|
-
var
|
|
179
|
+
var _chunkQ4TRGTO7cjs = require('./chunk-Q4TRGTO7.cjs');
|
|
180
180
|
|
|
181
181
|
|
|
182
182
|
|
|
@@ -189,10 +189,10 @@ var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
|
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
|
|
192
|
-
var
|
|
192
|
+
var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
|
|
193
193
|
|
|
194
194
|
|
|
195
|
-
var
|
|
195
|
+
var _chunkGBESKA76cjs = require('./chunk-GBESKA76.cjs');
|
|
196
196
|
|
|
197
197
|
|
|
198
198
|
var _chunkWT6RAN2Icjs = require('./chunk-WT6RAN2I.cjs');
|
|
@@ -200,10 +200,10 @@ var _chunkWT6RAN2Icjs = require('./chunk-WT6RAN2I.cjs');
|
|
|
200
200
|
|
|
201
201
|
|
|
202
202
|
|
|
203
|
-
var
|
|
203
|
+
var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
|
|
204
204
|
|
|
205
205
|
|
|
206
|
-
var
|
|
206
|
+
var _chunkNW3DL2PMcjs = require('./chunk-NW3DL2PM.cjs');
|
|
207
207
|
|
|
208
208
|
|
|
209
209
|
|
|
@@ -211,7 +211,7 @@ var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
|
|
|
211
211
|
|
|
212
212
|
|
|
213
213
|
|
|
214
|
-
var
|
|
214
|
+
var _chunk2BEGVSDFcjs = require('./chunk-2BEGVSDF.cjs');
|
|
215
215
|
|
|
216
216
|
|
|
217
217
|
|
|
@@ -221,7 +221,7 @@ var _chunkYDXLC4DWcjs = require('./chunk-YDXLC4DW.cjs');
|
|
|
221
221
|
|
|
222
222
|
|
|
223
223
|
|
|
224
|
-
var
|
|
224
|
+
var _chunkHS4JPIGRcjs = require('./chunk-HS4JPIGR.cjs');
|
|
225
225
|
|
|
226
226
|
|
|
227
227
|
|
|
@@ -250,16 +250,16 @@ var _chunkIUKBPBM7cjs = require('./chunk-IUKBPBM7.cjs');
|
|
|
250
250
|
|
|
251
251
|
|
|
252
252
|
|
|
253
|
-
var
|
|
253
|
+
var _chunkBIAGSYIZcjs = require('./chunk-BIAGSYIZ.cjs');
|
|
254
254
|
|
|
255
255
|
|
|
256
256
|
var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
|
|
257
257
|
|
|
258
258
|
|
|
259
|
-
var
|
|
259
|
+
var _chunk25JGHAGHcjs = require('./chunk-25JGHAGH.cjs');
|
|
260
260
|
|
|
261
261
|
|
|
262
|
-
var
|
|
262
|
+
var _chunkSNP33A33cjs = require('./chunk-SNP33A33.cjs');
|
|
263
263
|
|
|
264
264
|
|
|
265
265
|
var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
|
|
@@ -276,7 +276,7 @@ var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
|
|
|
276
276
|
|
|
277
277
|
|
|
278
278
|
|
|
279
|
-
var
|
|
279
|
+
var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
|
|
280
280
|
|
|
281
281
|
|
|
282
282
|
var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
@@ -295,10 +295,10 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
|
295
295
|
|
|
296
296
|
|
|
297
297
|
|
|
298
|
-
var
|
|
298
|
+
var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
|
|
299
299
|
|
|
300
300
|
|
|
301
|
-
var
|
|
301
|
+
var _chunkCCMP4JD2cjs = require('./chunk-CCMP4JD2.cjs');
|
|
302
302
|
|
|
303
303
|
|
|
304
304
|
var _chunkWKVYF2B5cjs = require('./chunk-WKVYF2B5.cjs');
|
|
@@ -383,7 +383,7 @@ var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
|
383
383
|
var _chunkML4TOUZPcjs = require('./chunk-ML4TOUZP.cjs');
|
|
384
384
|
|
|
385
385
|
|
|
386
|
-
var
|
|
386
|
+
var _chunkUZM3PDKKcjs = require('./chunk-UZM3PDKK.cjs');
|
|
387
387
|
|
|
388
388
|
// src/static-metadata-image.ts
|
|
389
389
|
var _crypto = require('crypto');
|
|
@@ -499,7 +499,7 @@ var RouteManager = class _RouteManager {
|
|
|
499
499
|
this.redirects = /* @__PURE__ */ new Map();
|
|
500
500
|
this.programmaticPages = /* @__PURE__ */ new Map();
|
|
501
501
|
this.programmaticLayouts = /* @__PURE__ */ new Map();
|
|
502
|
-
this.programmaticClientRoutes =
|
|
502
|
+
this.programmaticClientRoutes = _chunkZVSQN7NCcjs.mergeProgrammaticClientRoutes.call(void 0, []);
|
|
503
503
|
this.discovery = Promise.resolve();
|
|
504
504
|
this.reportedIslandsErrors = /* @__PURE__ */ new Set();
|
|
505
505
|
// Each route module's hydration plan from the last plan, with the source files it read, so a dev
|
|
@@ -561,7 +561,7 @@ var RouteManager = class _RouteManager {
|
|
|
561
561
|
await this.discoverFileRoutes(source);
|
|
562
562
|
await this.discoverProgrammaticRoutes(source, programmaticClientRoutes);
|
|
563
563
|
}
|
|
564
|
-
this.programmaticClientRoutes =
|
|
564
|
+
this.programmaticClientRoutes = _chunkZVSQN7NCcjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
|
|
565
565
|
for (const slot of this.routeSlots.values()) {
|
|
566
566
|
if (slot.interception && !this.pageRouteShapes.has(_chunkML4TOUZPcjs.getRoutePatternShape.call(void 0, slot.pattern))) {
|
|
567
567
|
throw new (0, _chunkML4TOUZPcjs.AmbiguousRouteError)(
|
|
@@ -580,18 +580,18 @@ var RouteManager = class _RouteManager {
|
|
|
580
580
|
)
|
|
581
581
|
);
|
|
582
582
|
this.orderedLayouts = Array.from(this.layouts.values()).sort(
|
|
583
|
-
(left, right) =>
|
|
584
|
-
).map((entry) => ({ entry, groupScope:
|
|
583
|
+
(left, right) => _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, left.pattern) - _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, right.pattern)
|
|
584
|
+
).map((entry) => ({ entry, groupScope: _chunkUWOCYINYcjs.getRouteGroupScope.call(void 0, entry.pattern) }));
|
|
585
585
|
for (const slot of this.routeSlots.values()) {
|
|
586
586
|
if (!this.routeSlotOwnerSegments.has(slot.ownerPattern)) {
|
|
587
587
|
this.routeSlotOwnerSegments.set(
|
|
588
588
|
slot.ownerPattern,
|
|
589
|
-
|
|
589
|
+
_chunk7U4XF76Rcjs.parseRoutePath.call(void 0, `${slot.ownerPattern}/page.tsx`).segments
|
|
590
590
|
);
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
if (process.env.FARM_VERBOSE) {
|
|
594
|
-
|
|
594
|
+
_chunk7U4XF76Rcjs.logger.info(
|
|
595
595
|
`Discovered ${this.routes.size} pages, ${this.layouts.size} layouts, and ${this.metadataRoutes.size} metadata routes`
|
|
596
596
|
);
|
|
597
597
|
}
|
|
@@ -605,7 +605,7 @@ var RouteManager = class _RouteManager {
|
|
|
605
605
|
matchRoute(pathname, options = {}) {
|
|
606
606
|
const routePathname = this.toRoutePathname(pathname);
|
|
607
607
|
const normalizedPath = routePathname === "/" ? "/" : routePathname.replace(/\/$/, "");
|
|
608
|
-
const pathParts =
|
|
608
|
+
const pathParts = _chunk7U4XF76Rcjs.splitRoutePath.call(void 0, normalizedPath);
|
|
609
609
|
const trimmedPathname = routePathname.replace(/\/+$/, "");
|
|
610
610
|
const hasEmptySegment = trimmedPathname.includes("//") || trimmedPathname === "" && routePathname.length > 1;
|
|
611
611
|
let matchedRoute = null;
|
|
@@ -614,7 +614,7 @@ var RouteManager = class _RouteManager {
|
|
|
614
614
|
if (hasEmptySegment && !routeEntry.route.segments.some((segment) => segment.isDynamic)) {
|
|
615
615
|
continue;
|
|
616
616
|
}
|
|
617
|
-
const match =
|
|
617
|
+
const match = _chunk7U4XF76Rcjs.matchRouteParts.call(void 0, pathParts, routeEntry.route.segments);
|
|
618
618
|
if (match.matches) {
|
|
619
619
|
matchedRoute = routeEntry;
|
|
620
620
|
params = match.params;
|
|
@@ -672,7 +672,7 @@ var RouteManager = class _RouteManager {
|
|
|
672
672
|
/** The layouts that wrap a registered page, root first. */
|
|
673
673
|
getRouteLayouts(pattern) {
|
|
674
674
|
const routeEntry = this.routes.get(pattern);
|
|
675
|
-
return routeEntry ? this.findMatchingLayouts(
|
|
675
|
+
return routeEntry ? this.findMatchingLayouts(_chunk7U4XF76Rcjs.splitRoutePath.call(void 0, pattern), routeEntry) : [];
|
|
676
676
|
}
|
|
677
677
|
/** Resolve route rules, inherited layouts, and the page export in precedence order. */
|
|
678
678
|
async resolveRouteRuntimeConfig(pattern) {
|
|
@@ -681,7 +681,7 @@ var RouteManager = class _RouteManager {
|
|
|
681
681
|
throw new Error(`Cannot resolve runtime configuration for unknown route "${pattern}"`);
|
|
682
682
|
}
|
|
683
683
|
const inherited = _chunkIUKBPBM7cjs.resolveFarmRouteRuleRuntimeConfig.call(void 0, pattern, this.config.routeRules);
|
|
684
|
-
const layouts = this.findMatchingLayouts(
|
|
684
|
+
const layouts = this.findMatchingLayouts(_chunk7U4XF76Rcjs.splitRoutePath.call(void 0, pattern), routeEntry);
|
|
685
685
|
const layoutConfigs = [];
|
|
686
686
|
for (const layout of layouts) {
|
|
687
687
|
const layoutModule = await this.loadLayoutModule(layout.modulePath);
|
|
@@ -728,9 +728,9 @@ var RouteManager = class _RouteManager {
|
|
|
728
728
|
const localeMatch = i18n ? _chunkGYJT2U7Jcjs.resolveFarmLocalePath.call(void 0, pathname, i18n) : void 0;
|
|
729
729
|
const routePathname = _optionalChain([localeMatch, 'optionalAccess', _8 => _8.pathname]) || this.toRoutePathname(pathname);
|
|
730
730
|
const normalizedPath = routePathname === "/" ? "/" : routePathname.replace(/\/$/, "");
|
|
731
|
-
const urlParts =
|
|
731
|
+
const urlParts = _chunk7U4XF76Rcjs.splitRoutePath.call(void 0, normalizedPath);
|
|
732
732
|
for (const redirectEntry of this.redirects.values()) {
|
|
733
|
-
const match =
|
|
733
|
+
const match = _chunk7U4XF76Rcjs.matchRouteParts.call(void 0, urlParts, redirectEntry.route.segments);
|
|
734
734
|
if (!match.matches) continue;
|
|
735
735
|
const statusCode = redirectEntry.definition.statusCode || (redirectEntry.definition.permanent ? 308 : 307);
|
|
736
736
|
return {
|
|
@@ -775,7 +775,7 @@ var RouteManager = class _RouteManager {
|
|
|
775
775
|
const pagePath = normalizedPath.slice(0, -suffix.fileName.length - 1) || "/";
|
|
776
776
|
for (const imageEntry of this.metadataImages.values()) {
|
|
777
777
|
if (imageEntry.kind !== suffix.kind) continue;
|
|
778
|
-
const match =
|
|
778
|
+
const match = _chunk7U4XF76Rcjs.matchRoute.call(void 0, pagePath, imageEntry.route.segments);
|
|
779
779
|
if (!match.matches) continue;
|
|
780
780
|
return {
|
|
781
781
|
image: imageEntry,
|
|
@@ -793,7 +793,7 @@ var RouteManager = class _RouteManager {
|
|
|
793
793
|
const routePath = normalizedPath.slice(0, -suffix.outputName.length - 1) || "/";
|
|
794
794
|
for (const metadata of this.metadataRoutes.values()) {
|
|
795
795
|
if (metadata.kind !== suffix.kind) continue;
|
|
796
|
-
const match =
|
|
796
|
+
const match = _chunk7U4XF76Rcjs.matchRoute.call(void 0, routePath, metadata.route.segments);
|
|
797
797
|
if (!match.matches) continue;
|
|
798
798
|
return { metadata, params: match.params, routePath };
|
|
799
799
|
}
|
|
@@ -807,7 +807,7 @@ var RouteManager = class _RouteManager {
|
|
|
807
807
|
for (const metadata of this.metadataRoutes.values()) {
|
|
808
808
|
if (metadata.kind !== kind || metadata.route.segments.length > pathSegments.length) continue;
|
|
809
809
|
const routePath = metadata.route.segments.length === 0 ? "/" : `/${pathSegments.slice(0, metadata.route.segments.length).join("/")}`;
|
|
810
|
-
const match =
|
|
810
|
+
const match = _chunk7U4XF76Rcjs.matchRoute.call(void 0, routePath, metadata.route.segments);
|
|
811
811
|
if (!match.matches) continue;
|
|
812
812
|
if (!bestMatch || metadata.route.segments.length > bestMatch.metadata.route.segments.length) {
|
|
813
813
|
bestMatch = { metadata, params: match.params, routePath };
|
|
@@ -828,7 +828,7 @@ var RouteManager = class _RouteManager {
|
|
|
828
828
|
if (imageEntry.kind !== kind) continue;
|
|
829
829
|
if (imageEntry.route.segments.length > pathSegments.length) continue;
|
|
830
830
|
const candidatePath = imageEntry.route.segments.length === 0 ? "/" : `/${pathSegments.slice(0, imageEntry.route.segments.length).join("/")}`;
|
|
831
|
-
const match =
|
|
831
|
+
const match = _chunk7U4XF76Rcjs.matchRoute.call(void 0, candidatePath, imageEntry.route.segments);
|
|
832
832
|
if (!match.matches) continue;
|
|
833
833
|
if (!bestMatch || imageEntry.route.segments.length > bestMatch.image.route.segments.length) {
|
|
834
834
|
bestMatch = {
|
|
@@ -854,11 +854,11 @@ var RouteManager = class _RouteManager {
|
|
|
854
854
|
return this.clientManifestCache.manifest;
|
|
855
855
|
}
|
|
856
856
|
const cacheFile = this.packageClientBoundaryCacheFile;
|
|
857
|
-
const compute = () =>
|
|
857
|
+
const compute = () => _chunkZVSQN7NCcjs.withFarmSourceSnapshot.call(void 0,
|
|
858
858
|
() => this.computeClientManifest(normalizedProjectRoot),
|
|
859
859
|
this.sourceSnapshot
|
|
860
860
|
);
|
|
861
|
-
return cacheFile ?
|
|
861
|
+
return cacheFile ? _chunkZVSQN7NCcjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
|
|
862
862
|
}
|
|
863
863
|
/**
|
|
864
864
|
* @internal The dev server reports every watched change (`noteSourceChange`), so a replan can
|
|
@@ -867,7 +867,7 @@ var RouteManager = class _RouteManager {
|
|
|
867
867
|
*/
|
|
868
868
|
trackSourceChanges() {
|
|
869
869
|
this.sourceChangeTracking = true;
|
|
870
|
-
_nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0,
|
|
870
|
+
_nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkZVSQN7NCcjs.FarmSourceSnapshotStore)())));
|
|
871
871
|
}
|
|
872
872
|
/**
|
|
873
873
|
* @internal A production build edits no source while it runs, so what the plan reads, parses and
|
|
@@ -876,7 +876,7 @@ var RouteManager = class _RouteManager {
|
|
|
876
876
|
*/
|
|
877
877
|
keepBuildSourceSnapshot() {
|
|
878
878
|
if (this.sourceChangeTracking) return;
|
|
879
|
-
_nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0,
|
|
879
|
+
_nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkZVSQN7NCcjs.FarmSourceSnapshotStore)(false))));
|
|
880
880
|
}
|
|
881
881
|
/**
|
|
882
882
|
* @internal Hands the snapshot keepBuildSourceSnapshot kept to the build, which clears it once
|
|
@@ -919,7 +919,7 @@ var RouteManager = class _RouteManager {
|
|
|
919
919
|
return false;
|
|
920
920
|
}
|
|
921
921
|
const previous = _optionalChain([this, 'access', _18 => _18.sourceSnapshot, 'optionalAccess', _19 => _19.peekSource, 'call', _20 => _20(path4.default.resolve(file))]);
|
|
922
|
-
return previous !== void 0 &&
|
|
922
|
+
return previous !== void 0 && _chunkZVSQN7NCcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous);
|
|
923
923
|
}
|
|
924
924
|
/**
|
|
925
925
|
* A route module's plan: the last one when it read none of `edited`, recomputed otherwise.
|
|
@@ -930,7 +930,7 @@ var RouteManager = class _RouteManager {
|
|
|
930
930
|
if (previous && edited && ![...edited].some((file) => previous.files.has(file))) {
|
|
931
931
|
return { ...previous.plan };
|
|
932
932
|
}
|
|
933
|
-
const { result, files } =
|
|
933
|
+
const { result, files } = _chunkZVSQN7NCcjs.traceFarmSourceReads.call(void 0, compute);
|
|
934
934
|
const sources = /* @__PURE__ */ new Set();
|
|
935
935
|
for (const file of files) {
|
|
936
936
|
const source = this.planSourcePath(file);
|
|
@@ -938,7 +938,7 @@ var RouteManager = class _RouteManager {
|
|
|
938
938
|
}
|
|
939
939
|
if (!this.sourceChangeTracking) {
|
|
940
940
|
for (const source of sources) {
|
|
941
|
-
if (!this.planStamps.has(source)) this.planStamps.set(source,
|
|
941
|
+
if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkZVSQN7NCcjs.getFarmSourceStamp.call(void 0, source));
|
|
942
942
|
}
|
|
943
943
|
}
|
|
944
944
|
this.ownerPlans.set(key, { plan: result, files: sources, planKey });
|
|
@@ -958,7 +958,7 @@ var RouteManager = class _RouteManager {
|
|
|
958
958
|
const isUnchanged = (file) => {
|
|
959
959
|
let result = unchanged.get(file);
|
|
960
960
|
if (result === void 0) {
|
|
961
|
-
result = this.planStamps.get(file) ===
|
|
961
|
+
result = this.planStamps.get(file) === _chunkZVSQN7NCcjs.getFarmSourceStamp.call(void 0, file);
|
|
962
962
|
unchanged.set(file, result);
|
|
963
963
|
}
|
|
964
964
|
return result;
|
|
@@ -1005,11 +1005,11 @@ var RouteManager = class _RouteManager {
|
|
|
1005
1005
|
*/
|
|
1006
1006
|
inspectPackages(operation) {
|
|
1007
1007
|
const file = this.packageClientBoundaryCacheFile;
|
|
1008
|
-
return file ?
|
|
1008
|
+
return file ? _chunkZVSQN7NCcjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
|
|
1009
1009
|
}
|
|
1010
1010
|
computeClientManifest(normalizedProjectRoot) {
|
|
1011
1011
|
const toUrlPath = (absolutePath) => {
|
|
1012
|
-
const rootRelative =
|
|
1012
|
+
const rootRelative = _chunk7U4XF76Rcjs.toRootRelativeUrlPath.call(void 0, absolutePath, normalizedProjectRoot);
|
|
1013
1013
|
if (rootRelative !== void 0) return rootRelative;
|
|
1014
1014
|
if (path4.default.isAbsolute(absolutePath)) {
|
|
1015
1015
|
const normalized = absolutePath.replace(/\\/g, "/");
|
|
@@ -1017,25 +1017,25 @@ var RouteManager = class _RouteManager {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
return absolutePath;
|
|
1019
1019
|
};
|
|
1020
|
-
const integrationProviders =
|
|
1020
|
+
const integrationProviders = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, this.config.integrations).filter(
|
|
1021
1021
|
(provider) => provider.component || provider.type === "clerk"
|
|
1022
1022
|
);
|
|
1023
1023
|
const unsupportedIntegrationProvider = integrationProviders.find(
|
|
1024
1024
|
(provider) => provider.supportsIsolatedHydration !== true
|
|
1025
1025
|
);
|
|
1026
1026
|
if (_optionalChain([this, 'access', _21 => _21.config, 'access', _22 => _22.experimental, 'optionalAccess', _23 => _23.isolatedClientHydration]) === "enabled" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _24 => _24.config, 'access', _25 => _25.experimental, 'optionalAccess', _26 => _26.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
|
|
1027
|
-
|
|
1027
|
+
_chunk7U4XF76Rcjs.logger.warn(
|
|
1028
1028
|
`[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
|
|
1029
1029
|
);
|
|
1030
1030
|
}
|
|
1031
|
-
const isolatedMode =
|
|
1031
|
+
const isolatedMode = _chunkZVSQN7NCcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
1032
1032
|
_optionalChain([this, 'access', _27 => _27.config, 'access', _28 => _28.experimental, 'optionalAccess', _29 => _29.isolatedClientHydration]),
|
|
1033
1033
|
{
|
|
1034
1034
|
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _30 => _30.config, 'access', _31 => _31.experimental, 'optionalAccess', _32 => _32.serverComponents])) === "rsc",
|
|
1035
1035
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
1036
1036
|
}
|
|
1037
1037
|
);
|
|
1038
|
-
const planOptions =
|
|
1038
|
+
const planOptions = _chunkZVSQN7NCcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
1039
1039
|
this.config.renderer,
|
|
1040
1040
|
Boolean(unsupportedIntegrationProvider)
|
|
1041
1041
|
);
|
|
@@ -1045,7 +1045,7 @@ var RouteManager = class _RouteManager {
|
|
|
1045
1045
|
if (this.sourceChangeTracking && this.editedSources && this.ownerPlans.size > 0) {
|
|
1046
1046
|
edited = /* @__PURE__ */ new Set();
|
|
1047
1047
|
for (const [file, previous] of _nullishCoalesce(changed, () => ( []))) {
|
|
1048
|
-
if (
|
|
1048
|
+
if (_chunkZVSQN7NCcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous)) continue;
|
|
1049
1049
|
const source = this.planSourcePath(file);
|
|
1050
1050
|
if (source) edited.add(source);
|
|
1051
1051
|
}
|
|
@@ -1060,13 +1060,13 @@ var RouteManager = class _RouteManager {
|
|
|
1060
1060
|
metadata: this.planRouteModule(
|
|
1061
1061
|
`layout:${entry.modulePath}`,
|
|
1062
1062
|
edited,
|
|
1063
|
-
() =>
|
|
1063
|
+
() => _chunkZVSQN7NCcjs.getClientModuleHydrationPlan.call(void 0,
|
|
1064
1064
|
entry.modulePath,
|
|
1065
1065
|
normalizedProjectRoot,
|
|
1066
1066
|
isolatedMode,
|
|
1067
1067
|
layoutPlanOptions
|
|
1068
1068
|
),
|
|
1069
|
-
|
|
1069
|
+
_chunkZVSQN7NCcjs.getClientModuleHydrationPlanKey.call(void 0,
|
|
1070
1070
|
entry.modulePath,
|
|
1071
1071
|
normalizedProjectRoot,
|
|
1072
1072
|
isolatedMode,
|
|
@@ -1074,7 +1074,7 @@ var RouteManager = class _RouteManager {
|
|
|
1074
1074
|
)
|
|
1075
1075
|
)
|
|
1076
1076
|
}));
|
|
1077
|
-
const markdownComponentsPlan =
|
|
1077
|
+
const markdownComponentsPlan = _chunkZVSQN7NCcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
1078
1078
|
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx), normalizedProjectRoot),
|
|
1079
1079
|
normalizedProjectRoot,
|
|
1080
1080
|
isolatedMode,
|
|
@@ -1087,16 +1087,16 @@ var RouteManager = class _RouteManager {
|
|
|
1087
1087
|
const pagePlanOptions = { ...planOptions, serverOwners: islandsMode };
|
|
1088
1088
|
const routeEntries = Array.from(this.routes.values()).map((entry) => ({
|
|
1089
1089
|
entry,
|
|
1090
|
-
metadata:
|
|
1090
|
+
metadata: _chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : this.planRouteModule(
|
|
1091
1091
|
`page:${entry.modulePath}`,
|
|
1092
1092
|
edited,
|
|
1093
|
-
() =>
|
|
1093
|
+
() => _chunkZVSQN7NCcjs.getClientModuleHydrationPlan.call(void 0,
|
|
1094
1094
|
entry.modulePath,
|
|
1095
1095
|
normalizedProjectRoot,
|
|
1096
1096
|
isolatedMode,
|
|
1097
1097
|
pagePlanOptions
|
|
1098
1098
|
),
|
|
1099
|
-
|
|
1099
|
+
_chunkZVSQN7NCcjs.getClientModuleHydrationPlanKey.call(void 0,
|
|
1100
1100
|
entry.modulePath,
|
|
1101
1101
|
normalizedProjectRoot,
|
|
1102
1102
|
isolatedMode,
|
|
@@ -1105,51 +1105,51 @@ var RouteManager = class _RouteManager {
|
|
|
1105
1105
|
)
|
|
1106
1106
|
}));
|
|
1107
1107
|
const markdownFallback = routeEntries.find(
|
|
1108
|
-
({ entry, metadata }) =>
|
|
1108
|
+
({ entry, metadata }) => _chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
|
|
1109
1109
|
);
|
|
1110
1110
|
if (markdownFallback) {
|
|
1111
|
-
|
|
1111
|
+
_chunk7U4XF76Rcjs.logger.warn(
|
|
1112
1112
|
`[Farm.js] client components in Markdown pages stay static: ${markdownFallback.metadata.fallbackReason}.`
|
|
1113
1113
|
);
|
|
1114
1114
|
}
|
|
1115
1115
|
const markdownStaticPackages = _optionalChain([routeEntries, 'access', _39 => _39.find, 'call', _40 => _40(
|
|
1116
|
-
({ entry, metadata }) =>
|
|
1116
|
+
({ entry, metadata }) => _chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
|
|
1117
1117
|
), 'optionalAccess', _41 => _41.metadata, 'access', _42 => _42.staticPackageBoundaries]);
|
|
1118
1118
|
if (markdownStaticPackages) {
|
|
1119
|
-
|
|
1119
|
+
_chunk7U4XF76Rcjs.logger.info(
|
|
1120
1120
|
`[Farm.js] Markdown pages render client components from ${markdownStaticPackages.join(", ")} as static HTML: package client components cannot be isolated yet.`
|
|
1121
1121
|
);
|
|
1122
1122
|
}
|
|
1123
1123
|
for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
|
|
1124
|
-
if (
|
|
1125
|
-
|
|
1124
|
+
if (_chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
|
|
1125
|
+
_chunk7U4XF76Rcjs.logger.info(
|
|
1126
1126
|
`[Farm.js] ${entry.pattern} renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
|
|
1127
1127
|
);
|
|
1128
1128
|
}
|
|
1129
|
-
|
|
1129
|
+
_chunkZVSQN7NCcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
1130
1130
|
layoutEntries.map(({ entry, metadata }) => ({
|
|
1131
1131
|
pattern: entry.pattern,
|
|
1132
|
-
depth:
|
|
1132
|
+
depth: _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
|
|
1133
1133
|
metadata
|
|
1134
1134
|
})),
|
|
1135
1135
|
routeEntries.map(({ entry, metadata }) => ({
|
|
1136
1136
|
pattern: getRouteEntryDirectory(entry),
|
|
1137
|
-
depth:
|
|
1137
|
+
depth: _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, getRouteEntryDirectory(entry)),
|
|
1138
1138
|
metadata
|
|
1139
1139
|
})),
|
|
1140
|
-
|
|
1140
|
+
_chunkUWOCYINYcjs.routeBoundaryCoversDirectory,
|
|
1141
1141
|
{ serverOwners: islandsMode }
|
|
1142
1142
|
);
|
|
1143
1143
|
for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
|
|
1144
1144
|
if (!metadata.costGuardExceeded) continue;
|
|
1145
|
-
|
|
1145
|
+
_chunk7U4XF76Rcjs.logger.warn(
|
|
1146
1146
|
`[Farm.js] isolated hydration kept route-wide for ${entry.modulePath}: ${metadata.fallbackReason}.`
|
|
1147
1147
|
);
|
|
1148
1148
|
}
|
|
1149
1149
|
if (isolatedMode === "analyze") {
|
|
1150
1150
|
for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
|
|
1151
1151
|
if (!metadata.isolatedHydrationEligible) continue;
|
|
1152
|
-
|
|
1152
|
+
_chunk7U4XF76Rcjs.logger.info(
|
|
1153
1153
|
`[Farm.js] isolated hydration analysis: ${entry.modulePath} can keep ${metadata.isolatedBoundaries.length} client ${metadata.isolatedBoundaries.length === 1 ? "boundary" : "boundaries"} while excluding its server owner from the browser graph.`
|
|
1154
1154
|
);
|
|
1155
1155
|
}
|
|
@@ -1157,7 +1157,7 @@ var RouteManager = class _RouteManager {
|
|
|
1157
1157
|
const routes = routeEntries.map(({ entry, metadata }) => {
|
|
1158
1158
|
const programmaticPage = this.programmaticPages.get(entry.modulePath);
|
|
1159
1159
|
const layoutShouldHydrate = layoutEntries.some(
|
|
1160
|
-
({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate &&
|
|
1160
|
+
({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate && _chunkUWOCYINYcjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, getRouteEntryDirectory(entry))
|
|
1161
1161
|
);
|
|
1162
1162
|
return {
|
|
1163
1163
|
pattern: entry.pattern,
|
|
@@ -1173,8 +1173,8 @@ var RouteManager = class _RouteManager {
|
|
|
1173
1173
|
modulePath: toUrlPath(boundary.modulePath)
|
|
1174
1174
|
}))
|
|
1175
1175
|
} : {},
|
|
1176
|
-
...
|
|
1177
|
-
renderPlan:
|
|
1176
|
+
..._chunkZVSQN7NCcjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
|
|
1177
|
+
renderPlan: _chunkUWOCYINYcjs.createFarmRouteRenderPlan.call(void 0, {
|
|
1178
1178
|
pageShouldHydrate: metadata.shouldHydrate,
|
|
1179
1179
|
layoutShouldHydrate,
|
|
1180
1180
|
islandStrategy: metadata.islandStrategy
|
|
@@ -1190,7 +1190,7 @@ var RouteManager = class _RouteManager {
|
|
|
1190
1190
|
}))
|
|
1191
1191
|
};
|
|
1192
1192
|
});
|
|
1193
|
-
const treeLayoutPatterns = islandsMode ?
|
|
1193
|
+
const treeLayoutPatterns = islandsMode ? _chunkUWOCYINYcjs.getFarmServerTreeLayoutPatterns.call(void 0,
|
|
1194
1194
|
layoutEntries.map(({ entry, metadata }) => ({
|
|
1195
1195
|
pattern: entry.pattern,
|
|
1196
1196
|
shouldHydrate: metadata.shouldHydrate,
|
|
@@ -1215,7 +1215,7 @@ var RouteManager = class _RouteManager {
|
|
|
1215
1215
|
...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {}
|
|
1216
1216
|
}));
|
|
1217
1217
|
const slots = Array.from(this.routeSlots.values()).map((entry) => {
|
|
1218
|
-
const metadata =
|
|
1218
|
+
const metadata = _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
|
|
1219
1219
|
return {
|
|
1220
1220
|
name: entry.name,
|
|
1221
1221
|
ownerPattern: entry.ownerPattern,
|
|
@@ -1231,7 +1231,7 @@ var RouteManager = class _RouteManager {
|
|
|
1231
1231
|
};
|
|
1232
1232
|
});
|
|
1233
1233
|
const slotPlans = islandsMode ? Array.from(this.routeSlots.values()).map((entry) => ({
|
|
1234
|
-
metadata:
|
|
1234
|
+
metadata: _chunkZVSQN7NCcjs.getClientModuleHydrationPlan.call(void 0,
|
|
1235
1235
|
entry.modulePath,
|
|
1236
1236
|
normalizedProjectRoot,
|
|
1237
1237
|
isolatedMode,
|
|
@@ -1256,7 +1256,7 @@ var RouteManager = class _RouteManager {
|
|
|
1256
1256
|
for (const error of islandsErrors) {
|
|
1257
1257
|
if (this.reportedIslandsErrors.has(error)) continue;
|
|
1258
1258
|
this.reportedIslandsErrors.add(error);
|
|
1259
|
-
|
|
1259
|
+
_chunk7U4XF76Rcjs.logger.error(`[Farm.js] islands mode cannot hydrate ${error}`);
|
|
1260
1260
|
}
|
|
1261
1261
|
const manifest = { routes, layouts, slots };
|
|
1262
1262
|
this.editedSources = this.sourceChangeTracking ? /* @__PURE__ */ new Set() : null;
|
|
@@ -1323,12 +1323,12 @@ var RouteManager = class _RouteManager {
|
|
|
1323
1323
|
const { createRouteModuleFromProgrammaticPage } = await import("./routes.cjs");
|
|
1324
1324
|
return createRouteModuleFromProgrammaticPage(programmaticPage, this.rendererRuntime);
|
|
1325
1325
|
}
|
|
1326
|
-
if (
|
|
1326
|
+
if (_chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
|
|
1327
1327
|
const mdxConfig = _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx);
|
|
1328
1328
|
const viteServer = this.viteServer;
|
|
1329
|
-
return await
|
|
1329
|
+
return await _chunkHNUBRUFQcjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
|
|
1330
1330
|
// Loaded on render: the route runtime manifest only reads metadata and rendering config.
|
|
1331
|
-
components: () =>
|
|
1331
|
+
components: () => _chunkHNUBRUFQcjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
|
|
1332
1332
|
root: this.config.root,
|
|
1333
1333
|
loadModule: viteServer ? (componentModulePath) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, viteServer, componentModulePath) : void 0
|
|
1334
1334
|
}),
|
|
@@ -1346,7 +1346,7 @@ var RouteManager = class _RouteManager {
|
|
|
1346
1346
|
return module;
|
|
1347
1347
|
}
|
|
1348
1348
|
} catch (error) {
|
|
1349
|
-
|
|
1349
|
+
_chunk7U4XF76Rcjs.logger.error(`Failed to load route module: ${modulePath}`);
|
|
1350
1350
|
throw error;
|
|
1351
1351
|
}
|
|
1352
1352
|
}
|
|
@@ -1371,7 +1371,7 @@ var RouteManager = class _RouteManager {
|
|
|
1371
1371
|
return module;
|
|
1372
1372
|
}
|
|
1373
1373
|
} catch (error) {
|
|
1374
|
-
|
|
1374
|
+
_chunk7U4XF76Rcjs.logger.error(`Failed to load layout module: ${modulePath}`);
|
|
1375
1375
|
throw error;
|
|
1376
1376
|
}
|
|
1377
1377
|
}
|
|
@@ -1380,7 +1380,7 @@ var RouteManager = class _RouteManager {
|
|
|
1380
1380
|
*/
|
|
1381
1381
|
createRoutePattern(route) {
|
|
1382
1382
|
if (route.segments.length === 0) return "/";
|
|
1383
|
-
return "/" + route.segments.map(
|
|
1383
|
+
return "/" + route.segments.map(_chunkUWOCYINYcjs.formatRouteSegment).join("/");
|
|
1384
1384
|
}
|
|
1385
1385
|
registerPageRoute(entry) {
|
|
1386
1386
|
_chunkML4TOUZPcjs.assertUniqueRouteParameters.call(void 0, entry.pattern);
|
|
@@ -1398,7 +1398,7 @@ var RouteManager = class _RouteManager {
|
|
|
1398
1398
|
this.pageRouteShapes.set(shape, entry);
|
|
1399
1399
|
}
|
|
1400
1400
|
async discoverFileRoutes(source) {
|
|
1401
|
-
const appDir =
|
|
1401
|
+
const appDir = _chunk7U4XF76Rcjs.resolveAppPath.call(void 0, source.root, source.srcDir, "app");
|
|
1402
1402
|
const componentExtensions = _chunk67MZTLTFcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer).map(
|
|
1403
1403
|
(extension) => extension.slice(1)
|
|
1404
1404
|
);
|
|
@@ -1417,8 +1417,8 @@ var RouteManager = class _RouteManager {
|
|
|
1417
1417
|
appDir
|
|
1418
1418
|
);
|
|
1419
1419
|
const canonicalPageGroups = /* @__PURE__ */ new Map();
|
|
1420
|
-
for (const file of pageFiles.filter((candidate) =>
|
|
1421
|
-
const route =
|
|
1420
|
+
for (const file of pageFiles.filter((candidate) => _chunk2BEGVSDFcjs.parseRouteSlotFile.call(void 0, candidate) === null)) {
|
|
1421
|
+
const route = _chunk7U4XF76Rcjs.parseRoutePath.call(void 0, file);
|
|
1422
1422
|
const pattern = this.createRoutePattern(route);
|
|
1423
1423
|
const group = canonicalPageGroups.get(pattern);
|
|
1424
1424
|
if (group) {
|
|
@@ -1431,8 +1431,8 @@ var RouteManager = class _RouteManager {
|
|
|
1431
1431
|
}
|
|
1432
1432
|
}
|
|
1433
1433
|
for (const [pattern, group] of canonicalPageGroups) {
|
|
1434
|
-
const componentFiles = group.files.filter((file) => !
|
|
1435
|
-
const markdownFiles = group.files.filter(
|
|
1434
|
+
const componentFiles = group.files.filter((file) => !_chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, file));
|
|
1435
|
+
const markdownFiles = group.files.filter(_chunkQ4TRGTO7cjs.isFarmMarkdownPageFile);
|
|
1436
1436
|
if (componentFiles.length > 1) {
|
|
1437
1437
|
throw new Error(
|
|
1438
1438
|
`Duplicate page route "${pattern}". Found ${componentFiles.map((file) => path4.default.join(appDir, file)).join(" and ")}.`
|
|
@@ -1472,9 +1472,9 @@ var RouteManager = class _RouteManager {
|
|
|
1472
1472
|
["error", errorFiles, this.errors]
|
|
1473
1473
|
]) {
|
|
1474
1474
|
for (const file of files) {
|
|
1475
|
-
const route =
|
|
1475
|
+
const route = _chunk7U4XF76Rcjs.parseRoutePath.call(void 0, file);
|
|
1476
1476
|
const modulePath = path4.default.join(appDir, file);
|
|
1477
|
-
const pattern =
|
|
1477
|
+
const pattern = _chunkUWOCYINYcjs.createRouteDirectoryPattern.call(void 0, route);
|
|
1478
1478
|
const existing = target.get(pattern);
|
|
1479
1479
|
if (_optionalChain([existing, 'optionalAccess', _49 => _49.sourceRoot]) === source.root) {
|
|
1480
1480
|
throw new Error(
|
|
@@ -1491,12 +1491,12 @@ var RouteManager = class _RouteManager {
|
|
|
1491
1491
|
}
|
|
1492
1492
|
}
|
|
1493
1493
|
for (const file of [...pageFiles, ...slotDefaultFiles]) {
|
|
1494
|
-
const slot =
|
|
1494
|
+
const slot = _chunk2BEGVSDFcjs.parseRouteSlotFile.call(void 0, file);
|
|
1495
1495
|
if (!slot) continue;
|
|
1496
1496
|
const modulePath = path4.default.join(appDir, file);
|
|
1497
1497
|
const pattern = this.createRoutePattern(slot.route);
|
|
1498
1498
|
const ownerPattern = this.createRoutePattern(slot.ownerRoute);
|
|
1499
|
-
const ownerDirectory =
|
|
1499
|
+
const ownerDirectory = _chunkUWOCYINYcjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
|
|
1500
1500
|
const key = `${ownerPattern}:${slot.name}:${slot.interception ? "intercept" : "slot"}:${slot.fallback ? "default" : pattern}`;
|
|
1501
1501
|
const existing = this.routeSlots.get(key);
|
|
1502
1502
|
if (_optionalChain([existing, 'optionalAccess', _50 => _50.sourceRoot]) === source.root) {
|
|
@@ -1515,14 +1515,14 @@ var RouteManager = class _RouteManager {
|
|
|
1515
1515
|
...ownerDirectory === ownerPattern ? {} : { ownerDirectory },
|
|
1516
1516
|
interception: slot.interception,
|
|
1517
1517
|
fallback: slot.fallback,
|
|
1518
|
-
containerId:
|
|
1518
|
+
containerId: _chunk2BEGVSDFcjs.createRouteSlotContainerId.call(void 0, slot.name, ownerPattern)
|
|
1519
1519
|
});
|
|
1520
1520
|
}
|
|
1521
1521
|
for (const file of metadataImageFiles) {
|
|
1522
1522
|
const fileBase = path4.default.basename(file, path4.default.extname(file));
|
|
1523
1523
|
const kind = fileBase === "twitter-image" ? "twitter" : "opengraph";
|
|
1524
1524
|
const fileName = kind === "twitter" ? "twitter-image" : "opengraph-image";
|
|
1525
|
-
const route =
|
|
1525
|
+
const route = _chunk7U4XF76Rcjs.parseRoutePath.call(void 0, file);
|
|
1526
1526
|
const modulePath = path4.default.join(appDir, file);
|
|
1527
1527
|
const pattern = this.createRoutePattern(route);
|
|
1528
1528
|
const key = `${kind}:${pattern}`;
|
|
@@ -1551,7 +1551,7 @@ var RouteManager = class _RouteManager {
|
|
|
1551
1551
|
path4.default.basename(file, path4.default.extname(file))
|
|
1552
1552
|
);
|
|
1553
1553
|
if (!descriptor) continue;
|
|
1554
|
-
const route =
|
|
1554
|
+
const route = _chunk7U4XF76Rcjs.parseRoutePath.call(void 0, file);
|
|
1555
1555
|
const modulePath = path4.default.join(appDir, file);
|
|
1556
1556
|
const pattern = this.createRoutePattern(route);
|
|
1557
1557
|
const key = `${descriptor.kind}:${pattern}`;
|
|
@@ -1573,16 +1573,16 @@ var RouteManager = class _RouteManager {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
async discoverProgrammaticRoutes(source, clientRoutes) {
|
|
1575
1575
|
if (this.viteServer) _chunkYUCU6XB4cjs.trackProgrammaticRouteSources.call(void 0, );
|
|
1576
|
-
const manifests = await
|
|
1576
|
+
const manifests = await _chunkHS4JPIGRcjs.loadProgrammaticRouteManifests.call(void 0, {
|
|
1577
1577
|
root: source.root,
|
|
1578
1578
|
srcDir: source.srcDir,
|
|
1579
1579
|
loadModule: (filePath) => this.loadProgrammaticRoutesModule(filePath)
|
|
1580
1580
|
});
|
|
1581
|
-
const graph = this.viteServer ?
|
|
1581
|
+
const graph = this.viteServer ? _chunkZVSQN7NCcjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
|
|
1582
1582
|
for (const { filePath, manifest } of manifests) {
|
|
1583
1583
|
if (graph) {
|
|
1584
1584
|
clientRoutes.push(
|
|
1585
|
-
|
|
1585
|
+
_chunkZVSQN7NCcjs.resolveProgrammaticClientRoutes.call(void 0, {
|
|
1586
1586
|
graph,
|
|
1587
1587
|
routesFile: toRealPath(filePath),
|
|
1588
1588
|
routes: manifest.routes,
|
|
@@ -1613,7 +1613,7 @@ var RouteManager = class _RouteManager {
|
|
|
1613
1613
|
}
|
|
1614
1614
|
if (definition.kind === "layout") {
|
|
1615
1615
|
const route = _chunkYUCU6XB4cjs.parseProgrammaticRoutePath.call(void 0, definition.path, "layout");
|
|
1616
|
-
const pattern =
|
|
1616
|
+
const pattern = _chunkUWOCYINYcjs.createRouteDirectoryPattern.call(void 0, route);
|
|
1617
1617
|
const existing = this.layouts.get(pattern);
|
|
1618
1618
|
if (_optionalChain([existing, 'optionalAccess', _54 => _54.sourceRoot]) === source.root) {
|
|
1619
1619
|
throw new Error(
|
|
@@ -1645,7 +1645,7 @@ var RouteManager = class _RouteManager {
|
|
|
1645
1645
|
async loadProgrammaticRoutesModule(filePath) {
|
|
1646
1646
|
if (this.viteServer) {
|
|
1647
1647
|
const viteRoot = _optionalChain([this, 'access', _55 => _55.viteServer, 'access', _56 => _56.config, 'optionalAccess', _57 => _57.root]) || this.config.root || process.cwd();
|
|
1648
|
-
return await _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, this.viteServer,
|
|
1648
|
+
return await _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, this.viteServer, _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, filePath, viteRoot));
|
|
1649
1649
|
}
|
|
1650
1650
|
return await import(
|
|
1651
1651
|
/* @vite-ignore */
|
|
@@ -1659,8 +1659,8 @@ var RouteManager = class _RouteManager {
|
|
|
1659
1659
|
findMatchingLayouts(pathnameParts, route) {
|
|
1660
1660
|
const matchingLayouts = [];
|
|
1661
1661
|
for (const { entry, groupScope } of this.orderedLayouts) {
|
|
1662
|
-
if (!
|
|
1663
|
-
if (groupScope !== null && !
|
|
1662
|
+
if (!_chunk7U4XF76Rcjs.matchRoutePrefixParts.call(void 0, pathnameParts, entry.route.segments)) continue;
|
|
1663
|
+
if (groupScope !== null && !_chunkUWOCYINYcjs.isInRouteGroupScope.call(void 0, route && getRouteEntryDirectory(route), groupScope)) {
|
|
1664
1664
|
continue;
|
|
1665
1665
|
}
|
|
1666
1666
|
matchingLayouts.push(entry);
|
|
@@ -1669,7 +1669,7 @@ var RouteManager = class _RouteManager {
|
|
|
1669
1669
|
}
|
|
1670
1670
|
matchPageRoute(pathnameParts) {
|
|
1671
1671
|
for (const routeEntry of this.routes.values()) {
|
|
1672
|
-
if (
|
|
1672
|
+
if (_chunk7U4XF76Rcjs.matchRouteParts.call(void 0, pathnameParts, routeEntry.route.segments).matches) return routeEntry;
|
|
1673
1673
|
}
|
|
1674
1674
|
return null;
|
|
1675
1675
|
}
|
|
@@ -1683,14 +1683,14 @@ var RouteManager = class _RouteManager {
|
|
|
1683
1683
|
groups.set(key, entries);
|
|
1684
1684
|
}
|
|
1685
1685
|
const normalizedFrom = interceptFrom ? this.toRoutePathname(new URL(interceptFrom, "http://farm.local").pathname) : void 0;
|
|
1686
|
-
const normalizedFromParts = normalizedFrom ?
|
|
1686
|
+
const normalizedFromParts = normalizedFrom ? _chunk7U4XF76Rcjs.splitRoutePath.call(void 0, normalizedFrom) : void 0;
|
|
1687
1687
|
const matches = [];
|
|
1688
1688
|
for (const entries of groups.values()) {
|
|
1689
1689
|
const candidates = entries.filter((entry) => !entry.fallback).filter(
|
|
1690
1690
|
(entry) => !entry.interception || normalizedFrom !== void 0 && this.matchesRoutePrefix(normalizedFrom, entry.ownerPattern, normalizedFromParts)
|
|
1691
1691
|
).map((entry) => ({
|
|
1692
1692
|
entry,
|
|
1693
|
-
match:
|
|
1693
|
+
match: _chunk7U4XF76Rcjs.matchRouteParts.call(void 0, pathnameParts, entry.route.segments)
|
|
1694
1694
|
})).filter((candidate) => candidate.match.matches).sort((left, right) => {
|
|
1695
1695
|
if (left.entry.interception !== right.entry.interception) {
|
|
1696
1696
|
return left.entry.interception ? -1 : 1;
|
|
@@ -1730,25 +1730,25 @@ var RouteManager = class _RouteManager {
|
|
|
1730
1730
|
return ownerDifference || left.name.localeCompare(right.name);
|
|
1731
1731
|
});
|
|
1732
1732
|
}
|
|
1733
|
-
matchesRoutePrefix(pathname, pattern, pathnameParts =
|
|
1733
|
+
matchesRoutePrefix(pathname, pattern, pathnameParts = _chunk7U4XF76Rcjs.splitRoutePath.call(void 0, pathname)) {
|
|
1734
1734
|
if (pattern === "/") return true;
|
|
1735
|
-
const patternSegments = _nullishCoalesce(this.routeSlotOwnerSegments.get(pattern), () => (
|
|
1736
|
-
return
|
|
1735
|
+
const patternSegments = _nullishCoalesce(this.routeSlotOwnerSegments.get(pattern), () => ( _chunk7U4XF76Rcjs.parseRoutePath.call(void 0, `${pattern}/page.tsx`).segments));
|
|
1736
|
+
return _chunk7U4XF76Rcjs.matchRoutePrefixParts.call(void 0, pathnameParts, patternSegments);
|
|
1737
1737
|
}
|
|
1738
1738
|
findNearestBoundary(pathname, boundaries, route) {
|
|
1739
1739
|
const normalizedPath = pathname === "/" ? "/" : pathname.replace(/\/$/, "");
|
|
1740
1740
|
let bestMatch = null;
|
|
1741
1741
|
let page = route;
|
|
1742
1742
|
for (const boundaryEntry of boundaries.values()) {
|
|
1743
|
-
if (!
|
|
1744
|
-
const groupScope =
|
|
1743
|
+
if (!_chunk7U4XF76Rcjs.matchRoutePrefix.call(void 0, normalizedPath, boundaryEntry.route.segments)) continue;
|
|
1744
|
+
const groupScope = _chunkUWOCYINYcjs.getRouteGroupScope.call(void 0, boundaryEntry.pattern);
|
|
1745
1745
|
if (groupScope !== null) {
|
|
1746
|
-
if (page === void 0) page = this.matchPageRoute(
|
|
1747
|
-
if (!
|
|
1746
|
+
if (page === void 0) page = this.matchPageRoute(_chunk7U4XF76Rcjs.splitRoutePath.call(void 0, normalizedPath));
|
|
1747
|
+
if (!_chunkUWOCYINYcjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
|
|
1748
1748
|
}
|
|
1749
1749
|
const depth = boundaryEntry.route.segments.length;
|
|
1750
1750
|
const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _58 => _58.route, 'access', _59 => _59.segments, 'access', _60 => _60.length]), () => ( -1));
|
|
1751
|
-
if (!bestMatch || depth > bestDepth || depth === bestDepth &&
|
|
1751
|
+
if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
|
|
1752
1752
|
bestMatch = boundaryEntry;
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
@@ -1759,13 +1759,13 @@ var RouteManager = class _RouteManager {
|
|
|
1759
1759
|
*/
|
|
1760
1760
|
logRoutes() {
|
|
1761
1761
|
if (this.routes.size > 0) {
|
|
1762
|
-
|
|
1762
|
+
_chunk7U4XF76Rcjs.logger.info("Registered routes:");
|
|
1763
1763
|
for (const [pattern, entry] of this.routes) {
|
|
1764
1764
|
console.log(` ${pattern} -> ${entry.modulePath}`);
|
|
1765
1765
|
}
|
|
1766
1766
|
}
|
|
1767
1767
|
if (this.layouts.size > 0) {
|
|
1768
|
-
|
|
1768
|
+
_chunk7U4XF76Rcjs.logger.info("Registered layouts:");
|
|
1769
1769
|
for (const [pattern, entry] of this.layouts) {
|
|
1770
1770
|
console.log(` ${pattern} -> ${entry.modulePath}`);
|
|
1771
1771
|
}
|
|
@@ -1798,7 +1798,7 @@ var RouteManager = class _RouteManager {
|
|
|
1798
1798
|
}));
|
|
1799
1799
|
const i18n = this.getI18nConfig();
|
|
1800
1800
|
const docsAdapterRoutes = this.getDocsAdapterRoutes();
|
|
1801
|
-
const result = await
|
|
1801
|
+
const result = await _chunkSDICLSQUcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
|
|
1802
1802
|
suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n),
|
|
1803
1803
|
...docsAdapterRoutes ? { docsAdapterRoutes } : {}
|
|
1804
1804
|
});
|
|
@@ -1845,7 +1845,7 @@ var RouteManager = class _RouteManager {
|
|
|
1845
1845
|
async isRouteSSG(modulePath) {
|
|
1846
1846
|
try {
|
|
1847
1847
|
const mod = await this.loadRouteModule(modulePath);
|
|
1848
|
-
const rendering = await
|
|
1848
|
+
const rendering = await _chunkSDICLSQUcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
1849
1849
|
return rendering.ssg;
|
|
1850
1850
|
} catch (e2) {
|
|
1851
1851
|
return false;
|
|
@@ -1857,7 +1857,7 @@ var RouteManager = class _RouteManager {
|
|
|
1857
1857
|
async hasRouteISR(modulePath) {
|
|
1858
1858
|
try {
|
|
1859
1859
|
const mod = await this.loadRouteModule(modulePath);
|
|
1860
|
-
const rendering = await
|
|
1860
|
+
const rendering = await _chunkSDICLSQUcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
1861
1861
|
return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
|
|
1862
1862
|
} catch (e3) {
|
|
1863
1863
|
return false;
|
|
@@ -1869,7 +1869,7 @@ var RouteManager = class _RouteManager {
|
|
|
1869
1869
|
async getRouteRevalidateInterval(modulePath) {
|
|
1870
1870
|
try {
|
|
1871
1871
|
const mod = await this.loadRouteModule(modulePath);
|
|
1872
|
-
const rendering = await
|
|
1872
|
+
const rendering = await _chunkSDICLSQUcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
1873
1873
|
return rendering.revalidate;
|
|
1874
1874
|
} catch (e4) {
|
|
1875
1875
|
return void 0;
|
|
@@ -1877,7 +1877,7 @@ var RouteManager = class _RouteManager {
|
|
|
1877
1877
|
}
|
|
1878
1878
|
};
|
|
1879
1879
|
function getPageDirectoryField(route, pattern) {
|
|
1880
|
-
const directory =
|
|
1880
|
+
const directory = _chunkUWOCYINYcjs.createRouteDirectoryPattern.call(void 0, route);
|
|
1881
1881
|
return directory === pattern ? {} : { directory };
|
|
1882
1882
|
}
|
|
1883
1883
|
function interpolateRedirectDestination(destination, params, catchAllSegments = {}) {
|
|
@@ -1956,7 +1956,7 @@ function replaceAll(input, search, replacement) {
|
|
|
1956
1956
|
}
|
|
1957
1957
|
async function safeGlobFiles(pattern, cwd) {
|
|
1958
1958
|
try {
|
|
1959
|
-
return await
|
|
1959
|
+
return await _chunk7U4XF76Rcjs.globFiles.call(void 0, pattern, cwd);
|
|
1960
1960
|
} catch (e5) {
|
|
1961
1961
|
return [];
|
|
1962
1962
|
}
|
|
@@ -2001,11 +2001,11 @@ function createFarmDevClientManifest(manifest, options) {
|
|
|
2001
2001
|
}
|
|
2002
2002
|
for (const layout of manifest.layouts) {
|
|
2003
2003
|
if (layoutPatterns && !layoutPatterns.has(layout.pattern)) continue;
|
|
2004
|
-
const groupScope =
|
|
2004
|
+
const groupScope = _chunkUWOCYINYcjs.getRouteGroupScope.call(void 0, layout.pattern);
|
|
2005
2005
|
clientManifest.layouts[layout.pattern] = {
|
|
2006
2006
|
modulePath: layout.modulePath,
|
|
2007
2007
|
pattern: layout.pattern,
|
|
2008
|
-
...groupScope ? { urlPattern:
|
|
2008
|
+
...groupScope ? { urlPattern: _chunkUWOCYINYcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
|
|
2009
2009
|
shouldHydrate: layout.shouldHydrate,
|
|
2010
2010
|
islandStrategy: layout.islandStrategy,
|
|
2011
2011
|
// Islands mode: rebuilt from its server tree, so its module is never preloaded.
|
|
@@ -2029,7 +2029,7 @@ function createFarmDevClientManifest(manifest, options) {
|
|
|
2029
2029
|
var _module = require('module');
|
|
2030
2030
|
var _url = require('url');
|
|
2031
2031
|
var FONT_IMPORTS = /* @__PURE__ */ new Set(["@farm.js/core", "@farm.js/core/font"]);
|
|
2032
|
-
var FARM_CORE_DIRECTORY = `${path4.default.dirname(typeof __filename === "string" ? __filename : _url.fileURLToPath.call(void 0,
|
|
2032
|
+
var FARM_CORE_DIRECTORY = `${path4.default.dirname(typeof __filename === "string" ? __filename : _url.fileURLToPath.call(void 0, _chunkUZM3PDKKcjs.define_import_meta_default.url)).replace(/\\/g, "/")}/`;
|
|
2033
2033
|
var FONT_FUNCTIONS = /* @__PURE__ */ new Set(["localFont", "remoteFont"]);
|
|
2034
2034
|
var FONT_CSS_PREFIX = "\0farm:font-css:";
|
|
2035
2035
|
var FONT_RUNTIME_ID = "\0farm:font-runtime";
|
|
@@ -3080,7 +3080,7 @@ function generateFarmIntegrationProviderClientCode(providers, root, rendererComp
|
|
|
3080
3080
|
let hasClerkProvider = false;
|
|
3081
3081
|
renderedProviders.forEach((provider, index) => {
|
|
3082
3082
|
let componentExpression = "null";
|
|
3083
|
-
if (
|
|
3083
|
+
if (_chunkWGWWRV2Mcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
|
|
3084
3084
|
const namespace = `FarmIntegrationProviderModule${index}`;
|
|
3085
3085
|
imports.push(
|
|
3086
3086
|
`import * as ${namespace} from ${JSON.stringify(resolveProviderModule(provider.component.module, root))};`
|
|
@@ -3137,7 +3137,7 @@ function generateFarmIntegrationProviderServerModules(providers, root, rendererC
|
|
|
3137
3137
|
const entries = [];
|
|
3138
3138
|
let needsMarkHelper = false;
|
|
3139
3139
|
providers.forEach((provider, index) => {
|
|
3140
|
-
if (!
|
|
3140
|
+
if (!_chunkWGWWRV2Mcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) return;
|
|
3141
3141
|
const namespace = `FarmServerIntegrationProviderModule${index}`;
|
|
3142
3142
|
imports.push(
|
|
3143
3143
|
`import * as ${namespace} from ${JSON.stringify(resolveProviderModule(provider.component.module, root))};`
|
|
@@ -3162,7 +3162,7 @@ function generateFarmIntegrationProviderServerModules(providers, root, rendererC
|
|
|
3162
3162
|
}
|
|
3163
3163
|
function resolveProviderModule(moduleId, root) {
|
|
3164
3164
|
if (!moduleId.startsWith(".")) return moduleId;
|
|
3165
|
-
return
|
|
3165
|
+
return _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, path4.default.resolve(root, moduleId), root);
|
|
3166
3166
|
}
|
|
3167
3167
|
|
|
3168
3168
|
// src/island-inference.ts
|
|
@@ -3205,7 +3205,7 @@ function inferFarmIslandStrategy(filePath, root) {
|
|
|
3205
3205
|
const result = _compiler.inferStrategy.call(void 0, file, code, {
|
|
3206
3206
|
parse: parseFarmIslandSource,
|
|
3207
3207
|
resolve: (specifier, importer) => {
|
|
3208
|
-
const resolved =
|
|
3208
|
+
const resolved = _chunkZVSQN7NCcjs.resolveImportedModule.call(void 0, importer, specifier, root);
|
|
3209
3209
|
return resolved.local ? resolved.path : null;
|
|
3210
3210
|
}
|
|
3211
3211
|
});
|
|
@@ -3225,7 +3225,7 @@ function inferFarmRouteRootStrategy(owners, root) {
|
|
|
3225
3225
|
if (cached && cached.stamps.every(([read2, stamp]) => modifiedAt(read2) === stamp)) {
|
|
3226
3226
|
return cached.result;
|
|
3227
3227
|
}
|
|
3228
|
-
const { result, files } =
|
|
3228
|
+
const { result, files } = _chunkZVSQN7NCcjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
|
|
3229
3229
|
const read = new Set([...files, ...result.files].filter((file) => !isInstalledPackageFile(file)));
|
|
3230
3230
|
routeRootInferences.set(key, {
|
|
3231
3231
|
stamps: [...read].map((file) => [file, modifiedAt(file)]),
|
|
@@ -3242,7 +3242,7 @@ function inferRouteRoot(owners, root) {
|
|
|
3242
3242
|
const files = [];
|
|
3243
3243
|
const modules = [];
|
|
3244
3244
|
for (const owner of owners) {
|
|
3245
|
-
const rendered =
|
|
3245
|
+
const rendered = _chunkZVSQN7NCcjs.collectFarmRenderedClientModules.call(void 0, owner, root);
|
|
3246
3246
|
if (!rendered) {
|
|
3247
3247
|
return {
|
|
3248
3248
|
strategy: null,
|
|
@@ -3258,7 +3258,7 @@ function inferRouteRoot(owners, root) {
|
|
|
3258
3258
|
source = fs2.default.readFileSync(module, "utf8");
|
|
3259
3259
|
} catch (e11) {
|
|
3260
3260
|
}
|
|
3261
|
-
if (
|
|
3261
|
+
if (_chunkZVSQN7NCcjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
|
|
3262
3262
|
}
|
|
3263
3263
|
for (const module of modules) {
|
|
3264
3264
|
const result = inferFarmIslandStrategy(module, root);
|
|
@@ -3270,7 +3270,7 @@ function inferRouteRoot(owners, root) {
|
|
|
3270
3270
|
function resolveFarmRouteRootStrategy(route, page, layouts, root, islandsMode) {
|
|
3271
3271
|
const directory = _nullishCoalesce(route.directory, () => ( route.pattern));
|
|
3272
3272
|
const onRoute = layouts.filter(
|
|
3273
|
-
(layout) =>
|
|
3273
|
+
(layout) => _chunkUWOCYINYcjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, directory)
|
|
3274
3274
|
);
|
|
3275
3275
|
const declared = [
|
|
3276
3276
|
...page.islandStrategy ? [page.islandStrategy] : [],
|
|
@@ -3341,11 +3341,11 @@ function getFarmLayoutKey(pattern, params) {
|
|
|
3341
3341
|
);
|
|
3342
3342
|
}
|
|
3343
3343
|
function countFarmKeptLayouts(layoutsHeader, layouts, params) {
|
|
3344
|
-
const chain =
|
|
3344
|
+
const chain = _chunkUWOCYINYcjs.parseFarmLayoutChainHeader.call(void 0, _nullishCoalesce(layoutsHeader, () => ( null)));
|
|
3345
3345
|
if (chain.length === 0) return 0;
|
|
3346
3346
|
const keys = layouts.map((layout) => getFarmLayoutKey(layout.pattern, params));
|
|
3347
|
-
if (chain[0] === keys[0]) return
|
|
3348
|
-
return keys.length > 1 ? 1 +
|
|
3347
|
+
if (chain[0] === keys[0]) return _chunkUWOCYINYcjs.getSharedLayoutPrefixLength.call(void 0, chain, keys);
|
|
3348
|
+
return keys.length > 1 ? 1 + _chunkUWOCYINYcjs.getSharedLayoutPrefixLength.call(void 0, chain, keys.slice(1)) : 0;
|
|
3349
3349
|
}
|
|
3350
3350
|
function createFarmFlushToken() {
|
|
3351
3351
|
const bytes = new Uint8Array(16);
|
|
@@ -3600,7 +3600,7 @@ function createDefaultErrorDiagnostics(error, root) {
|
|
|
3600
3600
|
function canBootFarmIslandsClient(config) {
|
|
3601
3601
|
const docs = config.docs;
|
|
3602
3602
|
const docsEnabled = docs === true || typeof docs === "object" && docs !== null && docs.enabled !== false;
|
|
3603
|
-
return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) === "islands" && !docsEnabled &&
|
|
3603
|
+
return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) === "islands" && !docsEnabled && _chunkZ5BANEQDcjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkZ5BANEQDcjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
|
|
3604
3604
|
}
|
|
3605
3605
|
|
|
3606
3606
|
// src/islands-kept-layouts.ts
|
|
@@ -3648,7 +3648,7 @@ var DECLARATION_STATEMENTS = /* @__PURE__ */ new Set([
|
|
|
3648
3648
|
function parse(code, file) {
|
|
3649
3649
|
const extension = path4.default.extname(file).slice(1);
|
|
3650
3650
|
const lang = extension === "ts" || extension === "mts" || extension === "cts" ? "ts" : extension === "js" || extension === "mjs" || extension === "cjs" || extension === "jsx" ? "jsx" : "tsx";
|
|
3651
|
-
return
|
|
3651
|
+
return _chunkZVSQN7NCcjs.memoizeInFarmSourceSnapshot.call(void 0, `ast:${lang}`, code, () => {
|
|
3652
3652
|
try {
|
|
3653
3653
|
return _parseAst.parseAst.call(void 0, code, { lang });
|
|
3654
3654
|
} catch (e14) {
|
|
@@ -3783,14 +3783,14 @@ function isReference(node, parent, key) {
|
|
|
3783
3783
|
}
|
|
3784
3784
|
function readSource(file) {
|
|
3785
3785
|
try {
|
|
3786
|
-
|
|
3786
|
+
_chunkZVSQN7NCcjs.noteFarmSourceRead.call(void 0, file);
|
|
3787
3787
|
return fs2.default.readFileSync(file, "utf8");
|
|
3788
3788
|
} catch (e15) {
|
|
3789
3789
|
return null;
|
|
3790
3790
|
}
|
|
3791
3791
|
}
|
|
3792
3792
|
function explainFarmKeptLayoutRender(modulePath, root) {
|
|
3793
|
-
const entry =
|
|
3793
|
+
const entry = _chunkZVSQN7NCcjs.resolveModuleSourcePath.call(void 0, modulePath, root);
|
|
3794
3794
|
if (!entry) return `${modulePath} does not resolve`;
|
|
3795
3795
|
const visited = /* @__PURE__ */ new Set();
|
|
3796
3796
|
const check = (file) => {
|
|
@@ -3800,7 +3800,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
|
|
|
3800
3800
|
if (!SCRIPT_SOURCE.test(file)) return `${path4.default.relative(root, file)} is not a script`;
|
|
3801
3801
|
const code = readSource(file);
|
|
3802
3802
|
if (code === null) return `${path4.default.relative(root, file)} cannot be read`;
|
|
3803
|
-
const { reason, imports } =
|
|
3803
|
+
const { reason, imports } = _chunkZVSQN7NCcjs.memoizeInFarmSourceSnapshot.call(void 0,
|
|
3804
3804
|
"kept-layout-module",
|
|
3805
3805
|
code,
|
|
3806
3806
|
() => findFarmRequestDecidingConstruct(code, file)
|
|
@@ -3813,7 +3813,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
|
|
|
3813
3813
|
return `${path4.default.relative(root, file)} imports ${imported.names.join(", ")} from ${imported.source}`;
|
|
3814
3814
|
}
|
|
3815
3815
|
if (ASSET_SOURCE.test(imported.source.split("?")[0])) continue;
|
|
3816
|
-
const resolved =
|
|
3816
|
+
const resolved = _chunkZVSQN7NCcjs.resolveImportedModule.call(void 0, file, imported.source, root);
|
|
3817
3817
|
if (!resolved.path || !resolved.local) {
|
|
3818
3818
|
return `${path4.default.relative(root, file)} imports ${imported.source}`;
|
|
3819
3819
|
}
|
|
@@ -3828,15 +3828,15 @@ var answers = /* @__PURE__ */ new Map();
|
|
|
3828
3828
|
function canFarmSkipKeptLayoutRender(modulePath, root) {
|
|
3829
3829
|
const key = `${root}\0${modulePath}`;
|
|
3830
3830
|
const known = answers.get(key);
|
|
3831
|
-
if (known && known.stamps.every(([file, stamp]) =>
|
|
3831
|
+
if (known && known.stamps.every(([file, stamp]) => _chunkZVSQN7NCcjs.getFarmSourceStamp.call(void 0, file) === stamp)) {
|
|
3832
3832
|
return known.skip;
|
|
3833
3833
|
}
|
|
3834
|
-
const { result, files } =
|
|
3834
|
+
const { result, files } = _chunkZVSQN7NCcjs.traceFarmSourceReads.call(void 0,
|
|
3835
3835
|
() => explainFarmKeptLayoutRender(modulePath, root) === null
|
|
3836
3836
|
);
|
|
3837
3837
|
answers.set(key, {
|
|
3838
3838
|
skip: result,
|
|
3839
|
-
stamps: files.map((file) => [file,
|
|
3839
|
+
stamps: files.map((file) => [file, _chunkZVSQN7NCcjs.getFarmSourceStamp.call(void 0, file)])
|
|
3840
3840
|
});
|
|
3841
3841
|
return result;
|
|
3842
3842
|
}
|
|
@@ -3917,7 +3917,7 @@ var warnedSuppressedAsyncHydrationModules = /* @__PURE__ */ new Set();
|
|
|
3917
3917
|
function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
|
|
3918
3918
|
if (warnedSuppressedAsyncHydrationModules.has(modulePath)) return;
|
|
3919
3919
|
warnedSuppressedAsyncHydrationModules.add(modulePath);
|
|
3920
|
-
|
|
3920
|
+
_chunk7U4XF76Rcjs.logger.warn(_chunkZVSQN7NCcjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
|
|
3921
3921
|
}
|
|
3922
3922
|
var fullDocumentRoutes = /* @__PURE__ */ new Set();
|
|
3923
3923
|
var documentLayouts = /* @__PURE__ */ new WeakMap();
|
|
@@ -3925,7 +3925,7 @@ var reportedRenderErrors = /* @__PURE__ */ new WeakMap();
|
|
|
3925
3925
|
function emitFarmRenderError(req, route, error) {
|
|
3926
3926
|
if (reportedRenderErrors.has(req) && reportedRenderErrors.get(req) === error) return;
|
|
3927
3927
|
reportedRenderErrors.set(req, error);
|
|
3928
|
-
|
|
3928
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "render.error", route, error });
|
|
3929
3929
|
}
|
|
3930
3930
|
function hasRequestHeader(req, name) {
|
|
3931
3931
|
const value = req.headers[name.toLowerCase()];
|
|
@@ -3968,7 +3968,7 @@ function appendResponseVary(res, value) {
|
|
|
3968
3968
|
function renderI18nAlternateLinks(requestPath, snapshot, options) {
|
|
3969
3969
|
if (snapshot.routing === "none") return "";
|
|
3970
3970
|
const url = new URL(requestPath, "http://farm.local");
|
|
3971
|
-
return
|
|
3971
|
+
return _chunkUWOCYINYcjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
|
|
3972
3972
|
}
|
|
3973
3973
|
var PPR_REFRESH_MAX_ATTEMPTS = 3;
|
|
3974
3974
|
function createPPRRefreshScript() {
|
|
@@ -4110,7 +4110,7 @@ var pageRequests = /* @__PURE__ */ new WeakMap();
|
|
|
4110
4110
|
var ServerRenderer = class {
|
|
4111
4111
|
constructor(config, routeManager, i18nRuntime, viteServer) {
|
|
4112
4112
|
this.ssgManifest = [];
|
|
4113
|
-
this.dataCache =
|
|
4113
|
+
this.dataCache = _chunkBIAGSYIZcjs.getFarmDataCache.call(void 0, );
|
|
4114
4114
|
this.config = config;
|
|
4115
4115
|
this.routeManager = routeManager;
|
|
4116
4116
|
this.i18nRuntime = i18nRuntime;
|
|
@@ -4357,7 +4357,7 @@ var ServerRenderer = class {
|
|
|
4357
4357
|
);
|
|
4358
4358
|
return { html: rendered.html, head: rendered.head || "" };
|
|
4359
4359
|
}
|
|
4360
|
-
const { head, body } =
|
|
4360
|
+
const { head, body } = _chunkUWOCYINYcjs.takeFarmHoistedHead.call(void 0,
|
|
4361
4361
|
await this.renderElementToCompleteHTML(element, options),
|
|
4362
4362
|
true
|
|
4363
4363
|
);
|
|
@@ -4456,7 +4456,7 @@ var ServerRenderer = class {
|
|
|
4456
4456
|
rejectLateRedirects: true
|
|
4457
4457
|
}
|
|
4458
4458
|
);
|
|
4459
|
-
return fragmentTag ?
|
|
4459
|
+
return fragmentTag ? _chunkUWOCYINYcjs.takeFarmNavigationOutlet.call(void 0, html, fragmentTag) : html;
|
|
4460
4460
|
}
|
|
4461
4461
|
/**
|
|
4462
4462
|
* A built-in docs runtime page (`docs.entry`, no adapter) under layouts that hydrate, or whose
|
|
@@ -4488,7 +4488,7 @@ var ServerRenderer = class {
|
|
|
4488
4488
|
islands: _optionalChain([entry, 'optionalAccess', _111 => _111.hasIsolatedClientBoundaries]) === true
|
|
4489
4489
|
};
|
|
4490
4490
|
});
|
|
4491
|
-
if (!
|
|
4491
|
+
if (!_chunkUWOCYINYcjs.farmDocsLayoutsWrapPage.call(void 0, layouts)) return response;
|
|
4492
4492
|
const shouldHydrateLayout = layouts.some((layout) => layout.shouldHydrate);
|
|
4493
4493
|
const hasIsolatedClientBoundaries = layouts.some(
|
|
4494
4494
|
(layout) => layout.hasIsolatedClientBoundaries
|
|
@@ -4509,8 +4509,8 @@ var ServerRenderer = class {
|
|
|
4509
4509
|
...layout,
|
|
4510
4510
|
Component: _optionalChain([modules, 'access', _112 => _112[index], 'optionalAccess', _113 => _113.default])
|
|
4511
4511
|
}));
|
|
4512
|
-
const islandStrategy =
|
|
4513
|
-
const tree = await
|
|
4512
|
+
const islandStrategy = _chunkUWOCYINYcjs.resolveFarmDocsLayoutIslandStrategy.call(void 0, treeLayouts);
|
|
4513
|
+
const tree = await _chunkUWOCYINYcjs.createFarmDocsLayoutTree.call(void 0, this.rendererRuntime, {
|
|
4514
4514
|
pageHtml: bodyMatch[2],
|
|
4515
4515
|
layouts: treeLayouts,
|
|
4516
4516
|
params: matched.params,
|
|
@@ -4531,10 +4531,10 @@ var ServerRenderer = class {
|
|
|
4531
4531
|
)
|
|
4532
4532
|
)
|
|
4533
4533
|
);
|
|
4534
|
-
const rootMarkup =
|
|
4534
|
+
const rootMarkup = _chunkUWOCYINYcjs.placeFarmDocsLayoutRoot.call(void 0, rendered.html);
|
|
4535
4535
|
const clientLayouts = layouts.map((layout) => ({
|
|
4536
4536
|
pattern: layout.pattern,
|
|
4537
|
-
modulePath:
|
|
4537
|
+
modulePath: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, layout.modulePath, root),
|
|
4538
4538
|
shouldHydrate: layout.shouldHydrate,
|
|
4539
4539
|
islandStrategy: layout.islandStrategy,
|
|
4540
4540
|
...layout.hasIsolatedClientBoundaries ? { hasIsolatedClientBoundaries: true } : {},
|
|
@@ -4567,7 +4567,7 @@ window.__FARM_ISLAND_STRATEGY__ = ${serializeInlineValue(islandStrategy)};
|
|
|
4567
4567
|
window.__FARM_PAGE_MODULE__ = "";
|
|
4568
4568
|
window.__FARM_LOADING_MODULE__ = null;
|
|
4569
4569
|
window.__FARM_MANIFEST__ = ${serializeInlineValue(clientManifest)};
|
|
4570
|
-
window.__FARM_INTEGRATION_API_MANIFEST__ = ${serializeInlineValue(
|
|
4570
|
+
window.__FARM_INTEGRATION_API_MANIFEST__ = ${serializeInlineValue(_chunkWGWWRV2Mcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
|
|
4571
4571
|
window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "null"};
|
|
4572
4572
|
</script>`;
|
|
4573
4573
|
const head = [
|
|
@@ -4617,13 +4617,13 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
4617
4617
|
);
|
|
4618
4618
|
}
|
|
4619
4619
|
this.ssgManifest = parseSSGManifest(content, manifestPath);
|
|
4620
|
-
|
|
4620
|
+
_chunk7U4XF76Rcjs.logger.info(`Loaded SSG manifest: ${this.ssgManifest.length} pages`);
|
|
4621
4621
|
}
|
|
4622
4622
|
/**
|
|
4623
4623
|
* Check if a path should be served from SSG cache
|
|
4624
4624
|
*/
|
|
4625
4625
|
async shouldServeSSG(pathname) {
|
|
4626
|
-
const ssgPage =
|
|
4626
|
+
const ssgPage = _chunkSDICLSQUcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
|
|
4627
4627
|
if (!ssgPage) return null;
|
|
4628
4628
|
const cached = await this.getCachedSSGPage(pathname);
|
|
4629
4629
|
if (cached && await this.dataCache.isStaleAsync(cached)) {
|
|
@@ -4632,10 +4632,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
4632
4632
|
return ssgPage;
|
|
4633
4633
|
}
|
|
4634
4634
|
getSSGCacheKey(urlPath) {
|
|
4635
|
-
return _chunkDXUXQP2Tcjs.createFarmCacheKey.call(void 0, ["ssg",
|
|
4635
|
+
return _chunkDXUXQP2Tcjs.createFarmCacheKey.call(void 0, ["ssg", _chunkBIAGSYIZcjs.normalizeRevalidatePath.call(void 0, urlPath)]);
|
|
4636
4636
|
}
|
|
4637
4637
|
getPPRCacheKey(pathname, search = "", locale = "", origin = "") {
|
|
4638
|
-
const key = ["ppr", locale,
|
|
4638
|
+
const key = ["ppr", locale, _chunkBIAGSYIZcjs.normalizeRevalidatePath.call(void 0, pathname), search, this.getDeploymentId()];
|
|
4639
4639
|
return _chunkDXUXQP2Tcjs.createFarmCacheKey.call(void 0, origin ? [...key, origin] : key);
|
|
4640
4640
|
}
|
|
4641
4641
|
getCachedSSGPage(urlPath) {
|
|
@@ -4677,7 +4677,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
4677
4677
|
options.origin
|
|
4678
4678
|
);
|
|
4679
4679
|
await (await _asyncNullishCoalesce(write, async () => ( await this.dataCache.pprShellCache.startWriteAsync(this.getPPRShellWriteOptions(options))))).commit(key, { html, ...cookieIndependent ? { cookieIndependent: true } : {} });
|
|
4680
|
-
|
|
4680
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
4681
4681
|
type: "ppr.shell.cached",
|
|
4682
4682
|
route: options.pathname,
|
|
4683
4683
|
key,
|
|
@@ -4803,13 +4803,13 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
4803
4803
|
{ metadata: mergedMetadata }
|
|
4804
4804
|
);
|
|
4805
4805
|
await this.cacheSSGPage(page, fullDocument, { document: true });
|
|
4806
|
-
|
|
4806
|
+
_chunk7U4XF76Rcjs.logger.info(`ISR: Regenerated ${page.urlPath}`);
|
|
4807
4807
|
} catch (error) {
|
|
4808
|
-
|
|
4808
|
+
_chunk7U4XF76Rcjs.logger.error(`ISR regeneration failed for ${page.urlPath}: ${error}`);
|
|
4809
4809
|
}
|
|
4810
4810
|
});
|
|
4811
4811
|
} catch (error) {
|
|
4812
|
-
|
|
4812
|
+
_chunk7U4XF76Rcjs.logger.error(`ISR trigger failed: ${error}`);
|
|
4813
4813
|
}
|
|
4814
4814
|
}
|
|
4815
4815
|
/**
|
|
@@ -4852,7 +4852,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
4852
4852
|
return true;
|
|
4853
4853
|
}
|
|
4854
4854
|
} catch (error) {
|
|
4855
|
-
|
|
4855
|
+
_chunk7U4XF76Rcjs.logger.error(`Failed to serve SSG page ${page.urlPath}: ${error}`);
|
|
4856
4856
|
}
|
|
4857
4857
|
return false;
|
|
4858
4858
|
}
|
|
@@ -4937,7 +4937,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
4937
4937
|
let errorBoundaryEntry = null;
|
|
4938
4938
|
let pprRefreshRoute = null;
|
|
4939
4939
|
const completeRender = (status = res.statusCode || 200, route = pathname) => {
|
|
4940
|
-
|
|
4940
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
4941
4941
|
type: "render.complete",
|
|
4942
4942
|
route,
|
|
4943
4943
|
pathname,
|
|
@@ -4949,7 +4949,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
4949
4949
|
try {
|
|
4950
4950
|
const url = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _130 => _130.config, 'access', _131 => _131.server, 'optionalAccess', _132 => _132.trustProxy]) });
|
|
4951
4951
|
pathname = url.pathname;
|
|
4952
|
-
|
|
4952
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "render.start", route: pathname, pathname });
|
|
4953
4953
|
searchParamsObject = _chunkSUCDVKUBcjs.searchParamsToObject.call(void 0, url.searchParams);
|
|
4954
4954
|
const metadataRouteMatch = this.routeManager.matchMetadataRoute(pathname);
|
|
4955
4955
|
if (metadataRouteMatch) {
|
|
@@ -5017,17 +5017,17 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5017
5017
|
layouts = match.layouts;
|
|
5018
5018
|
routeSlots = _nullishCoalesce(match.slots, () => ( []));
|
|
5019
5019
|
if (!route) {
|
|
5020
|
-
if (
|
|
5020
|
+
if (_chunkW53Z4WDIcjs.isFarmDefaultMCPPathname.call(void 0, pathname) && this.getDefaultMCPServer()) {
|
|
5021
5021
|
await this.renderDefaultMCP(req, res);
|
|
5022
5022
|
completeRender(res.statusCode || 200, pathname);
|
|
5023
5023
|
return;
|
|
5024
5024
|
}
|
|
5025
|
-
|
|
5025
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "route.notFound", pathname });
|
|
5026
5026
|
await this.render404(req, res);
|
|
5027
5027
|
completeRender(res.statusCode);
|
|
5028
5028
|
return;
|
|
5029
5029
|
}
|
|
5030
|
-
|
|
5030
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5031
5031
|
type: "route.matched",
|
|
5032
5032
|
pathname,
|
|
5033
5033
|
route: route.pattern,
|
|
@@ -5122,7 +5122,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5122
5122
|
throw error;
|
|
5123
5123
|
}
|
|
5124
5124
|
}
|
|
5125
|
-
const renderingConfig = await
|
|
5125
|
+
const renderingConfig = await _chunkSDICLSQUcjs.resolveRouteRenderingConfigFromFile.call(void 0,
|
|
5126
5126
|
routeModule,
|
|
5127
5127
|
route.modulePath,
|
|
5128
5128
|
{ experimentalPPR: _optionalChain([this, 'access', _138 => _138.config, 'access', _139 => _139.experimental, 'optionalAccess', _140 => _140.ppr]) === true }
|
|
@@ -5141,19 +5141,19 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5141
5141
|
revalidate: renderingConfig.revalidate
|
|
5142
5142
|
} : void 0;
|
|
5143
5143
|
if (renderingConfig.ppr && pprBypassReason) {
|
|
5144
|
-
|
|
5144
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5145
5145
|
type: "ppr.shell.bypass",
|
|
5146
5146
|
route: pathname,
|
|
5147
5147
|
reason: pprBypassReason
|
|
5148
5148
|
});
|
|
5149
|
-
|
|
5149
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5150
5150
|
type: "cache.bypass",
|
|
5151
5151
|
route: pathname,
|
|
5152
5152
|
reason: pprBypassReason
|
|
5153
5153
|
});
|
|
5154
5154
|
if (pprBypassReason === "refresh") {
|
|
5155
5155
|
pprRefreshRoute = pathname;
|
|
5156
|
-
|
|
5156
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "ppr.refresh.start", route: pathname });
|
|
5157
5157
|
}
|
|
5158
5158
|
}
|
|
5159
5159
|
const pprVisitorCookies = Boolean(_chunkNLBHLPEOcjs.withoutFarmDeploymentCookie.call(void 0, req.headers.cookie));
|
|
@@ -5172,10 +5172,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5172
5172
|
);
|
|
5173
5173
|
if (cachedPPRShell && pprVisitorCookies && !cachedPPRShell.value.cookieIndependent) {
|
|
5174
5174
|
pprShellOptions = void 0;
|
|
5175
|
-
|
|
5176
|
-
|
|
5175
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "ppr.shell.bypass", route: pathname, reason: "cookie" });
|
|
5176
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "cache.bypass", route: pathname, reason: "cookie" });
|
|
5177
5177
|
} else if (cachedPPRShell) {
|
|
5178
|
-
|
|
5178
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5179
5179
|
type: "ppr.shell.hit",
|
|
5180
5180
|
route: pathname,
|
|
5181
5181
|
key: pprCacheKey
|
|
@@ -5184,7 +5184,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5184
5184
|
completeRender(res.statusCode || 200, pathname);
|
|
5185
5185
|
return;
|
|
5186
5186
|
} else {
|
|
5187
|
-
|
|
5187
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5188
5188
|
type: "ppr.shell.miss",
|
|
5189
5189
|
route: pathname,
|
|
5190
5190
|
key: pprCacheKey
|
|
@@ -5221,7 +5221,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5221
5221
|
const routeManifestEntry = routeManifest.routes.find(
|
|
5222
5222
|
(entry) => entry.pattern === route.pattern
|
|
5223
5223
|
);
|
|
5224
|
-
const moduleMetadata = routeManifestEntry ||
|
|
5224
|
+
const moduleMetadata = routeManifestEntry || _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
|
|
5225
5225
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
5226
5226
|
const renderedRouteSlots = await Promise.all(
|
|
5227
5227
|
routeSlots.map(async (slot) => {
|
|
@@ -5305,7 +5305,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5305
5305
|
);
|
|
5306
5306
|
const clientLayouts = layouts.map((layout, index) => ({
|
|
5307
5307
|
pattern: layout.pattern,
|
|
5308
|
-
modulePath:
|
|
5308
|
+
modulePath: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, layout.modulePath, this.config.root),
|
|
5309
5309
|
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _145 => _145[index], 'optionalAccess', _146 => _146.shouldHydrate]) === true,
|
|
5310
5310
|
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _147 => _147[index], 'optionalAccess', _148 => _148.islandStrategy]), () => ( null)),
|
|
5311
5311
|
..._optionalChain([layoutHydrationMetadata, 'access', _149 => _149[index], 'optionalAccess', _150 => _150.hasIsolatedClientBoundaries]) === true ? { hasIsolatedClientBoundaries: true } : {},
|
|
@@ -5348,7 +5348,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5348
5348
|
req.__FARM_SHOULD_HYDRATE__ = shouldHydrate || shouldHydrateLayout || hasIsolatedClientBoundaries;
|
|
5349
5349
|
req.__FARM_ISLAND_STRATEGY__ = hydrationIslandStrategy;
|
|
5350
5350
|
req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ = hasHydratableRouteSlots;
|
|
5351
|
-
req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _162 => _162.modulePath]) ?
|
|
5351
|
+
req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _162 => _162.modulePath]) ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
|
|
5352
5352
|
req.__FARM_ROUTE_SLOTS__ = renderedRouteSlots.map((slot) => ({
|
|
5353
5353
|
name: slot.name,
|
|
5354
5354
|
ownerPattern: slot.ownerPattern,
|
|
@@ -5543,18 +5543,18 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5543
5543
|
clientRoutePattern: route.pattern,
|
|
5544
5544
|
captureStaticShell: Boolean(pprShellOptions),
|
|
5545
5545
|
observabilityRoute: pathname,
|
|
5546
|
-
onSuspenseHoleDetected: pprShellOptions ? () =>
|
|
5546
|
+
onSuspenseHoleDetected: pprShellOptions ? () => _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5547
5547
|
type: "ppr.suspense.holeDetected",
|
|
5548
5548
|
route: pathname
|
|
5549
5549
|
}) : void 0,
|
|
5550
5550
|
onComplete: pprShellOptions && req.method !== "HEAD" ? (html) => {
|
|
5551
5551
|
if (countRequestReads() !== requestReadsBeforeRender) {
|
|
5552
|
-
|
|
5552
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5553
5553
|
type: "ppr.shell.bypass",
|
|
5554
5554
|
route: pathname,
|
|
5555
5555
|
reason: "request-read"
|
|
5556
5556
|
});
|
|
5557
|
-
|
|
5557
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5558
5558
|
type: "cache.bypass",
|
|
5559
5559
|
route: pathname,
|
|
5560
5560
|
reason: "request-read"
|
|
@@ -5563,12 +5563,12 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5563
5563
|
}
|
|
5564
5564
|
const renderReadCookies = countRequestCookieReads() !== requestCookieReadsBeforeRender;
|
|
5565
5565
|
if (renderReadCookies && pprVisitorCookies) {
|
|
5566
|
-
|
|
5566
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5567
5567
|
type: "ppr.shell.bypass",
|
|
5568
5568
|
route: pathname,
|
|
5569
5569
|
reason: "cookie"
|
|
5570
5570
|
});
|
|
5571
|
-
|
|
5571
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5572
5572
|
type: "cache.bypass",
|
|
5573
5573
|
route: pathname,
|
|
5574
5574
|
reason: "cookie"
|
|
@@ -5585,7 +5585,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5585
5585
|
}
|
|
5586
5586
|
);
|
|
5587
5587
|
if (pprRefreshRoute) {
|
|
5588
|
-
|
|
5588
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5589
5589
|
type: "ppr.refresh.complete",
|
|
5590
5590
|
route: pprRefreshRoute,
|
|
5591
5591
|
durationMs: Date.now() - renderStartTime
|
|
@@ -5610,7 +5610,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5610
5610
|
const redirect = _chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error);
|
|
5611
5611
|
const snapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
5612
5612
|
const redirectUrl = snapshot && redirect.url.startsWith("/") && !redirect.url.startsWith("//") ? _chunkGYJT2U7Jcjs.localizeFarmHref.call(void 0, redirect.url, snapshot.locale, snapshot) : redirect.url;
|
|
5613
|
-
|
|
5613
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5614
5614
|
type: "route.redirect",
|
|
5615
5615
|
from: pathname,
|
|
5616
5616
|
to: redirectUrl,
|
|
@@ -5627,7 +5627,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5627
5627
|
return;
|
|
5628
5628
|
}
|
|
5629
5629
|
if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error)) {
|
|
5630
|
-
|
|
5630
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "route.notFound", pathname });
|
|
5631
5631
|
if (!res.headersSent && !res.writableEnded) {
|
|
5632
5632
|
try {
|
|
5633
5633
|
await this.render404(req, res);
|
|
@@ -5645,15 +5645,15 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5645
5645
|
}
|
|
5646
5646
|
}
|
|
5647
5647
|
emitFarmRenderError(req, pathname, error);
|
|
5648
|
-
const errorStatus =
|
|
5648
|
+
const errorStatus = _chunkUWOCYINYcjs.resolveDefaultErrorStatus.call(void 0, error);
|
|
5649
5649
|
if (pprRefreshRoute) {
|
|
5650
|
-
|
|
5650
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
5651
5651
|
type: "ppr.refresh.error",
|
|
5652
5652
|
route: pprRefreshRoute,
|
|
5653
5653
|
error
|
|
5654
5654
|
});
|
|
5655
5655
|
}
|
|
5656
|
-
|
|
5656
|
+
_chunk7U4XF76Rcjs.logger.error(`Error rendering page: ${error}`);
|
|
5657
5657
|
if (res.headersSent || res.writableEnded) {
|
|
5658
5658
|
if (!res.writableEnded) {
|
|
5659
5659
|
res.end();
|
|
@@ -5684,7 +5684,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5684
5684
|
}
|
|
5685
5685
|
}
|
|
5686
5686
|
async wrapWithIntegrationProviders(element) {
|
|
5687
|
-
const providers =
|
|
5687
|
+
const providers = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, this.config.integrations);
|
|
5688
5688
|
let wrapped = element;
|
|
5689
5689
|
for (let i = providers.length - 1; i >= 0; i--) {
|
|
5690
5690
|
const provider = providers[i];
|
|
@@ -5702,9 +5702,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5702
5702
|
}
|
|
5703
5703
|
let ProviderComponent;
|
|
5704
5704
|
let providerSourceModule;
|
|
5705
|
-
if (
|
|
5705
|
+
if (_chunkWGWWRV2Mcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
|
|
5706
5706
|
providerSourceModule = provider.component.module;
|
|
5707
|
-
const providerModuleId = provider.component.module.startsWith(".") ?
|
|
5707
|
+
const providerModuleId = provider.component.module.startsWith(".") ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0,
|
|
5708
5708
|
path10.resolve(this.config.root, provider.component.module),
|
|
5709
5709
|
this.config.root
|
|
5710
5710
|
) : provider.component.module;
|
|
@@ -5800,7 +5800,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5800
5800
|
);
|
|
5801
5801
|
metadata = _chunkY3DO7BIJcjs.addMetadataMarkdownAlternate.call(void 0,
|
|
5802
5802
|
metadata,
|
|
5803
|
-
|
|
5803
|
+
_chunk2NOHVIJ3cjs.getFarmMarkdownAlternatePath.call(void 0, _chunk2NOHVIJ3cjs.resolveMarkdownConfig.call(void 0, this.config.md), publicPathname, {
|
|
5804
5804
|
routePathname: (pathname) => this.routeManager.toRoutePathname(pathname)
|
|
5805
5805
|
})
|
|
5806
5806
|
);
|
|
@@ -5840,7 +5840,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5840
5840
|
reference.contentType = imageModule.contentType;
|
|
5841
5841
|
}
|
|
5842
5842
|
} catch (error) {
|
|
5843
|
-
|
|
5843
|
+
_chunk7U4XF76Rcjs.logger.warn(`Failed to read ${kind} image metadata for ${pathname}: ${error}`);
|
|
5844
5844
|
}
|
|
5845
5845
|
return reference;
|
|
5846
5846
|
}
|
|
@@ -5874,17 +5874,17 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5874
5874
|
path: match.routePath,
|
|
5875
5875
|
...llmsContext
|
|
5876
5876
|
}) : routeModule.default;
|
|
5877
|
-
const body = match.metadata.kind === "llms-full" && !(value instanceof Response) ? await
|
|
5877
|
+
const body = match.metadata.kind === "llms-full" && !(value instanceof Response) ? await _chunkOLKYHTLNcjs.renderFarmLlmsFullTxt.call(void 0, value, {
|
|
5878
5878
|
origin: await this.getAgentOrigin(request2),
|
|
5879
5879
|
readMarkdown: llmsContext.markdown
|
|
5880
5880
|
}) : value;
|
|
5881
|
-
const response =
|
|
5881
|
+
const response = _chunkUWOCYINYcjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
|
|
5882
5882
|
method,
|
|
5883
5883
|
request: request2
|
|
5884
5884
|
});
|
|
5885
5885
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
5886
5886
|
} catch (error) {
|
|
5887
|
-
|
|
5887
|
+
_chunk7U4XF76Rcjs.logger.error(`Metadata route render failed for ${match.metadata.modulePath}: ${error}`);
|
|
5888
5888
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
5889
5889
|
res,
|
|
5890
5890
|
new Response("Internal Server Error", {
|
|
@@ -5896,7 +5896,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5896
5896
|
}
|
|
5897
5897
|
/** `/llms.txt` and `/llms-full.txt` from `agent.llmsTxt` when no file route owns them. */
|
|
5898
5898
|
getGeneratedLlmsKind(pathname) {
|
|
5899
|
-
const config =
|
|
5899
|
+
const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _179 => _179.config, 'access', _180 => _180.agent, 'optionalAccess', _181 => _181.llmsTxt]));
|
|
5900
5900
|
if (!config.enabled) return null;
|
|
5901
5901
|
if (pathname === "/llms.txt") return "llms";
|
|
5902
5902
|
return pathname === "/llms-full.txt" && config.full ? "llms-full" : null;
|
|
@@ -5906,15 +5906,15 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5906
5906
|
const request2 = _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
5907
5907
|
trustProxy: _optionalChain([this, 'access', _182 => _182.config, 'access', _183 => _183.server, 'optionalAccess', _184 => _184.trustProxy])
|
|
5908
5908
|
});
|
|
5909
|
-
const config =
|
|
5909
|
+
const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _185 => _185.config, 'access', _186 => _186.agent, 'optionalAccess', _187 => _187.llmsTxt]));
|
|
5910
5910
|
const context = await this.createLlmsTxtContext(request2, { full: kind === "llms-full", req });
|
|
5911
|
-
const body = kind === "llms-full" ? await
|
|
5911
|
+
const body = kind === "llms-full" ? await _chunkOLKYHTLNcjs.renderFarmLlmsFullTxt.call(void 0, context.defaults, {
|
|
5912
5912
|
origin: await this.getAgentOrigin(request2),
|
|
5913
5913
|
readMarkdown: context.markdown
|
|
5914
5914
|
}) : context.defaults;
|
|
5915
5915
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
5916
5916
|
res,
|
|
5917
|
-
|
|
5917
|
+
_chunkUWOCYINYcjs.createFarmMetadataRouteResponse.call(void 0,
|
|
5918
5918
|
kind,
|
|
5919
5919
|
body,
|
|
5920
5920
|
{ revalidate: config.revalidate },
|
|
@@ -5922,7 +5922,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5922
5922
|
)
|
|
5923
5923
|
);
|
|
5924
5924
|
} catch (error) {
|
|
5925
|
-
|
|
5925
|
+
_chunk7U4XF76Rcjs.logger.error(`Generated ${kind}.txt failed: ${error}`);
|
|
5926
5926
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
5927
5927
|
res,
|
|
5928
5928
|
new Response("Internal Server Error", {
|
|
@@ -5933,7 +5933,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5933
5933
|
}
|
|
5934
5934
|
}
|
|
5935
5935
|
getAgentCrawlers() {
|
|
5936
|
-
return
|
|
5936
|
+
return _chunk4OFWG4IKcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _188 => _188.config, 'access', _189 => _189.agent, 'optionalAccess', _190 => _190.crawlers]));
|
|
5937
5937
|
}
|
|
5938
5938
|
/** `/robots.txt` from `agent.crawlers` when no robots.ts owns it. */
|
|
5939
5939
|
async renderGeneratedRobotsTxt(req, res) {
|
|
@@ -5941,7 +5941,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5941
5941
|
const sitemapPath = _optionalChain([this, 'access', _191 => _191.routeManager, 'access', _192 => _192.matchMetadataRoute, 'call', _193 => _193("/sitemap.xml"), 'optionalAccess', _194 => _194.metadata, 'access', _195 => _195.kind]) === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
|
|
5942
5942
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
5943
5943
|
const rootMetadata = sitemapPath && rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
5944
|
-
const robots =
|
|
5944
|
+
const robots = _chunk4OFWG4IKcjs.createFarmAgentRobots.call(void 0, {
|
|
5945
5945
|
crawlers: this.getAgentCrawlers(),
|
|
5946
5946
|
sitemapPath,
|
|
5947
5947
|
metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _196 => _196.metadataBase]),
|
|
@@ -5949,10 +5949,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5949
5949
|
});
|
|
5950
5950
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
5951
5951
|
res,
|
|
5952
|
-
|
|
5952
|
+
_chunkUWOCYINYcjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
|
|
5953
5953
|
);
|
|
5954
5954
|
} catch (error) {
|
|
5955
|
-
|
|
5955
|
+
_chunk7U4XF76Rcjs.logger.error(`Generated robots.txt failed: ${error}`);
|
|
5956
5956
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
5957
5957
|
res,
|
|
5958
5958
|
new Response("Internal Server Error", {
|
|
@@ -5963,7 +5963,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5963
5963
|
}
|
|
5964
5964
|
}
|
|
5965
5965
|
getAgentSitemap() {
|
|
5966
|
-
return
|
|
5966
|
+
return _chunk4OFWG4IKcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _197 => _197.config, 'access', _198 => _198.agent, 'optionalAccess', _199 => _199.sitemap]));
|
|
5967
5967
|
}
|
|
5968
5968
|
/** `/sitemap.xml` from `agent.sitemap` when no sitemap.ts owns it. */
|
|
5969
5969
|
async renderGeneratedSitemap(req, res) {
|
|
@@ -5975,7 +5975,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5975
5975
|
this.getAgentListedRoutes().map(async ([pattern, route]) => {
|
|
5976
5976
|
const [module, stat] = await Promise.all([
|
|
5977
5977
|
this.routeManager.loadRouteModule(route.modulePath).catch((error) => {
|
|
5978
|
-
|
|
5978
|
+
_chunk7U4XF76Rcjs.logger.warn(`Could not read metadata for ${pattern} in sitemap.xml: ${error}`);
|
|
5979
5979
|
return void 0;
|
|
5980
5980
|
}),
|
|
5981
5981
|
fs7.promises.stat(route.modulePath).catch(() => void 0)
|
|
@@ -5986,7 +5986,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5986
5986
|
);
|
|
5987
5987
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
5988
5988
|
const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
5989
|
-
const sitemap =
|
|
5989
|
+
const sitemap = _chunk4OFWG4IKcjs.createFarmDefaultSitemap.call(void 0,
|
|
5990
5990
|
sources.filter((source) => source !== null),
|
|
5991
5991
|
{
|
|
5992
5992
|
origin: new URL(request2.url).origin,
|
|
@@ -5999,10 +5999,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5999
5999
|
);
|
|
6000
6000
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
6001
6001
|
res,
|
|
6002
|
-
|
|
6002
|
+
_chunkUWOCYINYcjs.createFarmMetadataRouteResponse.call(void 0, "sitemap", sitemap, {}, { method: req.method })
|
|
6003
6003
|
);
|
|
6004
6004
|
} catch (error) {
|
|
6005
|
-
|
|
6005
|
+
_chunk7U4XF76Rcjs.logger.error(`Generated sitemap.xml failed: ${error}`);
|
|
6006
6006
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
6007
6007
|
res,
|
|
6008
6008
|
new Response("Internal Server Error", {
|
|
@@ -6028,7 +6028,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6028
6028
|
getAgentListedRoutes() {
|
|
6029
6029
|
const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _210 => _210.middlewareRoutes, 'optionalCall', _211 => _211()]), () => ( [])) };
|
|
6030
6030
|
return [...this.routeManager.getRoutes()].filter(
|
|
6031
|
-
([pattern]) => !pattern.includes("[") && !
|
|
6031
|
+
([pattern]) => !pattern.includes("[") && !_chunkUWOCYINYcjs.farmPathGuardCoversPage.call(void 0, guards, pattern)
|
|
6032
6032
|
);
|
|
6033
6033
|
}
|
|
6034
6034
|
/**
|
|
@@ -6044,7 +6044,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6044
6044
|
)
|
|
6045
6045
|
)
|
|
6046
6046
|
);
|
|
6047
|
-
return
|
|
6047
|
+
return _chunkOLKYHTLNcjs.isFarmPageNoIndex.call(void 0, metadata, layoutMetadata);
|
|
6048
6048
|
}
|
|
6049
6049
|
/**
|
|
6050
6050
|
* The default read-only MCP server (`agent.mcp`), or undefined when the app has an MCP
|
|
@@ -6052,20 +6052,20 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6052
6052
|
* or a registered server such as the docs engine's. Production applies the same rules.
|
|
6053
6053
|
*/
|
|
6054
6054
|
getDefaultMCPServer() {
|
|
6055
|
-
if (_optionalChain([this, 'access', _212 => _212.config, 'access', _213 => _213.agent, 'optionalAccess', _214 => _214.mcp]) !== true ||
|
|
6055
|
+
if (_optionalChain([this, 'access', _212 => _212.config, 'access', _213 => _213.agent, 'optionalAccess', _214 => _214.mcp]) !== true || _chunkW53Z4WDIcjs.farmConfigMountsMCP.call(void 0, this.config)) return void 0;
|
|
6056
6056
|
if (_optionalChain([this, 'access', _215 => _215.apiRouteExists, 'optionalCall', _216 => _216("/api/mcp")])) return void 0;
|
|
6057
|
-
if (this.routeManager.matchRoute(
|
|
6058
|
-
_nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer =
|
|
6057
|
+
if (this.routeManager.matchRoute(_chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
|
|
6058
|
+
_nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkW53Z4WDIcjs.createFarmDefaultMCPServer.call(void 0,
|
|
6059
6059
|
readAppPackageIdentity(this.config.root),
|
|
6060
|
-
|
|
6060
|
+
_chunkCCMP4JD2cjs.FARM_VERSION
|
|
6061
6061
|
))));
|
|
6062
|
-
return
|
|
6062
|
+
return _chunkW53Z4WDIcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
|
|
6063
6063
|
}
|
|
6064
6064
|
async renderDefaultMCP(req, res) {
|
|
6065
6065
|
const server = this.getDefaultMCPServer();
|
|
6066
6066
|
const request2 = _nullishCoalesce(_chunk2RSVYJT6cjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _217 => _217.config, 'access', _218 => _218.server, 'optionalAccess', _219 => _219.trustProxy]) })));
|
|
6067
6067
|
try {
|
|
6068
|
-
const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-
|
|
6068
|
+
const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-IUL6OPC3.cjs");
|
|
6069
6069
|
const origin = new URL(request2.url).origin;
|
|
6070
6070
|
const i18n = _optionalChain([this, 'access', _220 => _220.i18nRuntime, 'optionalAccess', _221 => _221.config]);
|
|
6071
6071
|
const metadataBase = await this.getRootMetadataBase();
|
|
@@ -6082,13 +6082,13 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6082
6082
|
return await this.isAgentPageNoIndex(pattern, metadata) ? null : { pattern, module };
|
|
6083
6083
|
})
|
|
6084
6084
|
);
|
|
6085
|
-
return
|
|
6085
|
+
return _chunkW53Z4WDIcjs.collectFarmDefaultMCPPages.call(void 0,
|
|
6086
6086
|
sources.filter((source) => source !== null),
|
|
6087
6087
|
{
|
|
6088
6088
|
origin,
|
|
6089
6089
|
metadataBase,
|
|
6090
6090
|
basePath: this.config.basePath,
|
|
6091
|
-
markdown:
|
|
6091
|
+
markdown: _chunk2NOHVIJ3cjs.resolveMarkdownConfig.call(void 0, this.config.md),
|
|
6092
6092
|
trailingSlash: this.config.trailingSlash,
|
|
6093
6093
|
i18n
|
|
6094
6094
|
}
|
|
@@ -6099,7 +6099,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6099
6099
|
});
|
|
6100
6100
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
6101
6101
|
} catch (error) {
|
|
6102
|
-
|
|
6102
|
+
_chunk7U4XF76Rcjs.logger.error(`Default MCP server failed: ${error}`);
|
|
6103
6103
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
6104
6104
|
res,
|
|
6105
6105
|
new Response(
|
|
@@ -6115,7 +6115,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6115
6115
|
}
|
|
6116
6116
|
/** Same inputs the production server gives llms.txt: static pages and root metadata. */
|
|
6117
6117
|
async createLlmsTxtContext(request2, options = {}) {
|
|
6118
|
-
const config =
|
|
6118
|
+
const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _222 => _222.config, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.llmsTxt]));
|
|
6119
6119
|
const origin = await this.getAgentOrigin(request2);
|
|
6120
6120
|
const sources = await Promise.all(
|
|
6121
6121
|
this.getAgentListedRoutes().map(async ([pattern, route]) => {
|
|
@@ -6125,19 +6125,19 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6125
6125
|
if (await this.isAgentPageNoIndex(pattern, module.metadata)) return null;
|
|
6126
6126
|
return { pattern, metadata: module.metadata };
|
|
6127
6127
|
} catch (error) {
|
|
6128
|
-
|
|
6128
|
+
_chunk7U4XF76Rcjs.logger.warn(`Could not read metadata for ${pattern} in llms.txt: ${error}`);
|
|
6129
6129
|
return { pattern };
|
|
6130
6130
|
}
|
|
6131
6131
|
})
|
|
6132
6132
|
);
|
|
6133
6133
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
6134
6134
|
const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
6135
|
-
const pages =
|
|
6135
|
+
const pages = _chunkOLKYHTLNcjs.collectFarmLlmsTxtPages.call(void 0,
|
|
6136
6136
|
sources.filter((source) => source !== null),
|
|
6137
6137
|
{
|
|
6138
6138
|
origin,
|
|
6139
6139
|
basePath: this.config.basePath,
|
|
6140
|
-
markdown:
|
|
6140
|
+
markdown: _chunk2NOHVIJ3cjs.resolveMarkdownConfig.call(void 0, this.config.md),
|
|
6141
6141
|
include: config.include,
|
|
6142
6142
|
exclude: config.exclude,
|
|
6143
6143
|
trailingSlash: this.config.trailingSlash,
|
|
@@ -6146,12 +6146,12 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6146
6146
|
);
|
|
6147
6147
|
return {
|
|
6148
6148
|
pages,
|
|
6149
|
-
defaults:
|
|
6149
|
+
defaults: _chunkOLKYHTLNcjs.createFarmDefaultLlmsTxt.call(void 0, {
|
|
6150
6150
|
origin,
|
|
6151
6151
|
pages,
|
|
6152
6152
|
config,
|
|
6153
6153
|
rootMetadata,
|
|
6154
|
-
mcp: _optionalChain([this, 'access', _227 => _227.config, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.aiCatalog]) === false ? [] :
|
|
6154
|
+
mcp: _optionalChain([this, 'access', _227 => _227.config, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.aiCatalog]) === false ? [] : _chunk5OAN7BG5cjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
|
|
6155
6155
|
basePath: this.config.basePath,
|
|
6156
6156
|
apiServerBasePath: _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0,
|
|
6157
6157
|
_chunkPMJSG4JScjs.normalizeFarmAPIConfig.call(void 0,
|
|
@@ -6162,7 +6162,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6162
6162
|
})
|
|
6163
6163
|
}),
|
|
6164
6164
|
...options.full ? {
|
|
6165
|
-
markdown:
|
|
6165
|
+
markdown: _chunkOLKYHTLNcjs.readFarmLlmsMarkdownFrom.call(void 0,
|
|
6166
6166
|
new URL(request2.url).origin,
|
|
6167
6167
|
origin,
|
|
6168
6168
|
this.createDevMarkdownReader(options.req)
|
|
@@ -6175,7 +6175,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6175
6175
|
* `metadataBase`, else the request's origin, as for the sitemap and the production server.
|
|
6176
6176
|
*/
|
|
6177
6177
|
async getAgentOrigin(request2) {
|
|
6178
|
-
return
|
|
6178
|
+
return _chunkOLKYHTLNcjs.resolveFarmAgentOrigin.call(void 0, await this.getRootMetadataBase(), new URL(request2.url).origin);
|
|
6179
6179
|
}
|
|
6180
6180
|
/** The root layout's `metadataBase`, which generated agent files and list_pages link to. */
|
|
6181
6181
|
async getRootMetadataBase() {
|
|
@@ -6199,11 +6199,11 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6199
6199
|
}
|
|
6200
6200
|
if (socket.encrypted) {
|
|
6201
6201
|
const address = { host: socket.localAddress, port: socket.localPort };
|
|
6202
|
-
return
|
|
6202
|
+
return _chunkOLKYHTLNcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => requestOwnHttpsServer(page, address));
|
|
6203
6203
|
}
|
|
6204
6204
|
const host = socket.localAddress.includes(":") ? `[${socket.localAddress}]` : socket.localAddress;
|
|
6205
6205
|
const localOrigin = `http://${host}:${socket.localPort}`;
|
|
6206
|
-
const read =
|
|
6206
|
+
const read = _chunkOLKYHTLNcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => fetch(page));
|
|
6207
6207
|
return (url) => {
|
|
6208
6208
|
const target = new URL(url);
|
|
6209
6209
|
return read(`${localOrigin}${target.pathname}${target.search}`);
|
|
@@ -6311,7 +6311,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6311
6311
|
});
|
|
6312
6312
|
let wrapped = errorElement;
|
|
6313
6313
|
const boundaryLayouts = options.errorPattern === void 0 ? options.layouts : options.layouts.filter(
|
|
6314
|
-
(layout) => !("pattern" in layout) ||
|
|
6314
|
+
(layout) => !("pattern" in layout) || _chunkUWOCYINYcjs.routeBoundaryCoversDirectory.call(void 0,
|
|
6315
6315
|
layout.pattern,
|
|
6316
6316
|
options.errorPattern
|
|
6317
6317
|
)
|
|
@@ -6350,14 +6350,14 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6350
6350
|
res.end();
|
|
6351
6351
|
return true;
|
|
6352
6352
|
} catch (renderError) {
|
|
6353
|
-
|
|
6353
|
+
_chunk7U4XF76Rcjs.logger.warn(`Failed to render route-level error boundary: ${renderError}`);
|
|
6354
6354
|
return false;
|
|
6355
6355
|
}
|
|
6356
6356
|
}
|
|
6357
6357
|
async renderBufferedSSR(element, req, res, clearMiddlewareData, options = {}) {
|
|
6358
6358
|
const startedAt = Date.now();
|
|
6359
6359
|
const route = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
|
|
6360
|
-
|
|
6360
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "render.stream.start", route });
|
|
6361
6361
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
6362
6362
|
for (const [key, value] of Object.entries(options.responseHeaders || {})) {
|
|
6363
6363
|
res.setHeader(key, value);
|
|
@@ -6367,7 +6367,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6367
6367
|
const routeSlots = (req.__FARM_ROUTE_SLOTS__ || []).map(
|
|
6368
6368
|
(slot) => ({
|
|
6369
6369
|
...slot,
|
|
6370
|
-
modulePath: typeof slot.modulePath === "string" ?
|
|
6370
|
+
modulePath: typeof slot.modulePath === "string" ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, slot.modulePath, this.config.root) : slot.modulePath
|
|
6371
6371
|
})
|
|
6372
6372
|
);
|
|
6373
6373
|
const deferredProps = _chunkDBYNZIIQcjs.prepareDeferredData.call(void 0, {
|
|
@@ -6375,7 +6375,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6375
6375
|
slots: routeSlots
|
|
6376
6376
|
});
|
|
6377
6377
|
const pagePath = req.__FARM_PAGE_PATH__;
|
|
6378
|
-
const relativePath = pagePath ?
|
|
6378
|
+
const relativePath = pagePath ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, pagePath, this.config.root) : "/src/app/page.tsx";
|
|
6379
6379
|
const deploymentId = this.getDeploymentId();
|
|
6380
6380
|
const farmScripts = (markup) => this.stampFarmScripts(req, markup);
|
|
6381
6381
|
const bootstrapScript = farmScripts(`<script data-farm-refresh-state>
|
|
@@ -6395,7 +6395,7 @@ window.__FARM_ISLAND_STRATEGY__ = ${JSON.stringify(req.__FARM_ISLAND_STRATEGY__
|
|
|
6395
6395
|
window.__FARM_PAGE_MODULE__ = ${JSON.stringify(relativePath)};
|
|
6396
6396
|
window.__FARM_LOADING_MODULE__ = ${JSON.stringify(req.__FARM_LOADING_MODULE_PATH__ || null)};
|
|
6397
6397
|
window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
|
|
6398
|
-
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(
|
|
6398
|
+
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkWGWWRV2Mcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
|
|
6399
6399
|
window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
|
|
6400
6400
|
</script>`);
|
|
6401
6401
|
const deferredScript = farmScripts(createDeferredHydrationScript(deferredProps.records));
|
|
@@ -6409,8 +6409,8 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6409
6409
|
const { html: content, head: rendererHead } = await this.renderElementToDocumentParts(
|
|
6410
6410
|
element,
|
|
6411
6411
|
{
|
|
6412
|
-
rejectLateNavigation:
|
|
6413
|
-
_optionalChain([req, 'access', _242 => _242.headers, 'optionalAccess', _243 => _243[
|
|
6412
|
+
rejectLateNavigation: _chunk2NOHVIJ3cjs._isFarmMarkdownPageCheck.call(void 0,
|
|
6413
|
+
_optionalChain([req, 'access', _242 => _242.headers, 'optionalAccess', _243 => _243[_chunk2NOHVIJ3cjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
|
|
6414
6414
|
)
|
|
6415
6415
|
}
|
|
6416
6416
|
);
|
|
@@ -6432,19 +6432,19 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6432
6432
|
i18nSnapshot,
|
|
6433
6433
|
this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
|
|
6434
6434
|
) : "";
|
|
6435
|
-
const themeDocument =
|
|
6435
|
+
const themeDocument = _chunkUWOCYINYcjs.createFarmThemeDocumentParts.call(void 0,
|
|
6436
6436
|
this.config.theme,
|
|
6437
6437
|
this.config.basePath,
|
|
6438
6438
|
_chunk5AMH6AFAcjs.getTheme.call(void 0, )
|
|
6439
6439
|
);
|
|
6440
6440
|
themeDocument.head = farmScripts(themeDocument.head);
|
|
6441
|
-
const fullDocument =
|
|
6441
|
+
const fullDocument = _chunkUWOCYINYcjs.extractFarmFullDocument.call(void 0, _chunkUWOCYINYcjs.markFarmDocumentLayouts.call(void 0, content));
|
|
6442
6442
|
let html;
|
|
6443
6443
|
if (fullDocument) {
|
|
6444
6444
|
const shouldReplaceLayoutTitle = hasExplicitTitle || rendererHasTitle;
|
|
6445
|
-
const documentHtml = shouldReplaceLayoutTitle ?
|
|
6446
|
-
const effectiveRendererHead = hasExplicitTitle ?
|
|
6447
|
-
html =
|
|
6445
|
+
const documentHtml = shouldReplaceLayoutTitle ? _chunkUWOCYINYcjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument;
|
|
6446
|
+
const effectiveRendererHead = hasExplicitTitle ? _chunkUWOCYINYcjs.removeFarmDocumentTitles.call(void 0, rendererHead) : rendererHead;
|
|
6447
|
+
html = _chunkUWOCYINYcjs.composeFarmFullDocument.call(void 0, documentHtml, {
|
|
6448
6448
|
fallbackIcon: !hasFavicon,
|
|
6449
6449
|
viewport: viewportTags,
|
|
6450
6450
|
htmlAttributes: `${i18nSnapshot ? ` lang="${escapeHtmlAttribute2(i18nSnapshot.locale)}" dir="${escapeHtmlAttribute2(i18nSnapshot.direction)}"` : ""}${themeDocument.attributes}`,
|
|
@@ -6493,7 +6493,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6493
6493
|
</body>
|
|
6494
6494
|
</html>`;
|
|
6495
6495
|
}
|
|
6496
|
-
|
|
6496
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
6497
6497
|
type: "render.stream.shellReady",
|
|
6498
6498
|
route,
|
|
6499
6499
|
durationMs: Date.now() - startedAt
|
|
@@ -6502,7 +6502,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6502
6502
|
if ((req.method || "GET").toUpperCase() !== "HEAD") res.write(securedHtml);
|
|
6503
6503
|
res.end();
|
|
6504
6504
|
if (!options.captureStaticShell) await _optionalChain([options, 'access', _248 => _248.onComplete, 'optionalCall', _249 => _249(securedHtml)]);
|
|
6505
|
-
|
|
6505
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
6506
6506
|
type: "render.stream.complete",
|
|
6507
6507
|
route,
|
|
6508
6508
|
durationMs: Date.now() - startedAt
|
|
@@ -6550,14 +6550,14 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6550
6550
|
const renderToPipeableStream = this.rendererRuntime.renderToPipeableStream;
|
|
6551
6551
|
const fullDocumentRouteKey = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
|
|
6552
6552
|
const streamDocument = fullDocumentRoutes.has(fullDocumentRouteKey) || await this.rootLayoutRendersDocument(req);
|
|
6553
|
-
if (!renderToPipeableStream ||
|
|
6553
|
+
if (!renderToPipeableStream || _chunk2NOHVIJ3cjs._isFarmMarkdownPageCheck.call(void 0, _optionalChain([req, 'access', _261 => _261.headers, 'optionalAccess', _262 => _262[_chunk2NOHVIJ3cjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])) || streamDocument && (options.captureStaticShell || !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer))) {
|
|
6554
6554
|
return this.renderBufferedSSR(element, req, res, clearMiddlewareData, options);
|
|
6555
6555
|
}
|
|
6556
6556
|
return new Promise((resolve3, reject) => {
|
|
6557
6557
|
const streamStartTime = Date.now();
|
|
6558
6558
|
const observabilityRoute = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
|
|
6559
6559
|
const deploymentId = this.getDeploymentId();
|
|
6560
|
-
|
|
6560
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "render.stream.start", route: observabilityRoute });
|
|
6561
6561
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
6562
6562
|
for (const [key, value] of Object.entries(options.responseHeaders || {})) {
|
|
6563
6563
|
res.setHeader(key, value);
|
|
@@ -6585,12 +6585,12 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6585
6585
|
let lateNavigationError = null;
|
|
6586
6586
|
const pagePath = req.__FARM_PAGE_PATH__;
|
|
6587
6587
|
const isClientComponent = req.__FARM_IS_CLIENT_COMPONENT__ === true;
|
|
6588
|
-
const relativePath = pagePath ?
|
|
6588
|
+
const relativePath = pagePath ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, pagePath, this.config.root) : "/src/app/page.tsx";
|
|
6589
6589
|
const clientManifest = this.createDevBootClientManifest(req, options);
|
|
6590
6590
|
const routeSlotPayload = (req.__FARM_ROUTE_SLOTS__ || []).map(
|
|
6591
6591
|
(slot) => ({
|
|
6592
6592
|
...slot,
|
|
6593
|
-
modulePath: typeof slot.modulePath === "string" ?
|
|
6593
|
+
modulePath: typeof slot.modulePath === "string" ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, slot.modulePath, this.config.root) : slot.modulePath
|
|
6594
6594
|
})
|
|
6595
6595
|
);
|
|
6596
6596
|
const deferredProps = _chunkDBYNZIIQcjs.prepareDeferredData.call(void 0, {
|
|
@@ -6620,7 +6620,7 @@ window.__FARM_LOADING_MODULE__ = ${JSON.stringify(
|
|
|
6620
6620
|
req.__FARM_LOADING_MODULE_PATH__ || null
|
|
6621
6621
|
)};
|
|
6622
6622
|
window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
|
|
6623
|
-
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(
|
|
6623
|
+
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkWGWWRV2Mcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
|
|
6624
6624
|
window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
|
|
6625
6625
|
</script>${_chunkPBJ7MEOVcjs.renderFarmFormStateScript.call(void 0, )}`;
|
|
6626
6626
|
const islandsOnlyPage = this.islandValues() && req.__FARM_PAGE_SHOULD_HYDRATE__ !== true && req.__FARM_LAYOUT_SHOULD_HYDRATE__ !== true && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true;
|
|
@@ -6645,7 +6645,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6645
6645
|
this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
|
|
6646
6646
|
) : "";
|
|
6647
6647
|
const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
|
|
6648
|
-
const themeDocument =
|
|
6648
|
+
const themeDocument = _chunkUWOCYINYcjs.createFarmThemeDocumentParts.call(void 0,
|
|
6649
6649
|
this.config.theme,
|
|
6650
6650
|
this.config.basePath,
|
|
6651
6651
|
_chunk5AMH6AFAcjs.getTheme.call(void 0, )
|
|
@@ -6673,7 +6673,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6673
6673
|
}
|
|
6674
6674
|
shellFlushed = true;
|
|
6675
6675
|
const shellReadyMs = Date.now() - streamStartTime;
|
|
6676
|
-
|
|
6676
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
6677
6677
|
type: "render.stream.shellReady",
|
|
6678
6678
|
route: observabilityRoute,
|
|
6679
6679
|
durationMs: shellReadyMs
|
|
@@ -6703,10 +6703,10 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6703
6703
|
let pendingShell = streamDocument ? "" : stampDocumentHTML(shell);
|
|
6704
6704
|
let heldHead = "";
|
|
6705
6705
|
const releaseShell = (complete) => {
|
|
6706
|
-
const split =
|
|
6706
|
+
const split = _chunkUWOCYINYcjs.takeFarmHoistedHead.call(void 0, heldHead, complete);
|
|
6707
6707
|
if (!split) return null;
|
|
6708
|
-
const shellHead = !hasExplicitTitle && /<title[\s>]/i.test(split.head) ?
|
|
6709
|
-
const opened =
|
|
6708
|
+
const shellHead = !hasExplicitTitle && /<title[\s>]/i.test(split.head) ? _chunkUWOCYINYcjs.removeFarmDocumentTitles.call(void 0, pendingShell) : pendingShell;
|
|
6709
|
+
const opened = _chunkUWOCYINYcjs.appendFarmHead.call(void 0, shellHead, split.head);
|
|
6710
6710
|
pendingShell = "";
|
|
6711
6711
|
heldHead = "";
|
|
6712
6712
|
htmlParts.push(opened);
|
|
@@ -6722,11 +6722,11 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6722
6722
|
${stampDocumentHTML(earlyClientScript)}`
|
|
6723
6723
|
)
|
|
6724
6724
|
} : document;
|
|
6725
|
-
const documentTransform = streamDocument ?
|
|
6725
|
+
const documentTransform = streamDocument ? _chunkUWOCYINYcjs.createFarmStreamedDocumentTransform.call(void 0,
|
|
6726
6726
|
(opening) => withEarlyClient(
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
hasExplicitTitle ?
|
|
6727
|
+
_chunkUWOCYINYcjs.openFarmStreamedDocument.call(void 0,
|
|
6728
|
+
_chunkUWOCYINYcjs.markFarmDocumentLayouts.call(void 0,
|
|
6729
|
+
hasExplicitTitle ? _chunkUWOCYINYcjs.removeFarmDocumentTitles.call(void 0, opening) : opening
|
|
6730
6730
|
),
|
|
6731
6731
|
{
|
|
6732
6732
|
fallbackIcon: !hasFavicon,
|
|
@@ -6766,7 +6766,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6766
6766
|
const recordRenderedChunk = (chunkText, renderedText = chunkText) => {
|
|
6767
6767
|
if (!checkedFullDocument && renderedText) {
|
|
6768
6768
|
documentPrefix += renderedText;
|
|
6769
|
-
const prefix =
|
|
6769
|
+
const prefix = _chunkUWOCYINYcjs.classifyFarmDocumentPrefix.call(void 0, documentPrefix);
|
|
6770
6770
|
if (prefix !== "pending") {
|
|
6771
6771
|
checkedFullDocument = true;
|
|
6772
6772
|
documentPrefix = "";
|
|
@@ -6853,7 +6853,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6853
6853
|
finishStream(callback);
|
|
6854
6854
|
},
|
|
6855
6855
|
(error) => {
|
|
6856
|
-
|
|
6856
|
+
_chunk7U4XF76Rcjs.logger.error(`Could not recover from a late navigation error: ${error}`);
|
|
6857
6857
|
finishStream(callback);
|
|
6858
6858
|
}
|
|
6859
6859
|
);
|
|
@@ -6903,10 +6903,10 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6903
6903
|
}
|
|
6904
6904
|
const cachedHtml = staticShellParts ? staticShellParts.join("") : htmlParts.join("");
|
|
6905
6905
|
Promise.resolve(options.onComplete(cachedHtml)).catch((error) => {
|
|
6906
|
-
|
|
6906
|
+
_chunk7U4XF76Rcjs.logger.warn(`Failed to cache PPR shell: ${error}`);
|
|
6907
6907
|
});
|
|
6908
6908
|
}
|
|
6909
|
-
|
|
6909
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
6910
6910
|
type: "render.stream.complete",
|
|
6911
6911
|
route: observabilityRoute,
|
|
6912
6912
|
durationMs: Date.now() - streamStartTime
|
|
@@ -6922,7 +6922,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6922
6922
|
onShellError(error) {
|
|
6923
6923
|
didError = true;
|
|
6924
6924
|
if (!isWebResponse(error) && !_chunk7JUIK547cjs.isFarmRedirectError.call(void 0, error) && !_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error)) {
|
|
6925
|
-
|
|
6925
|
+
_chunk7U4XF76Rcjs.logger.error(`SSR shell error: ${error}`);
|
|
6926
6926
|
emitFarmRenderError(req, observabilityRoute, error);
|
|
6927
6927
|
}
|
|
6928
6928
|
if (clearMiddlewareData) {
|
|
@@ -6938,7 +6938,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6938
6938
|
return;
|
|
6939
6939
|
}
|
|
6940
6940
|
if (!isWebResponse(error)) {
|
|
6941
|
-
|
|
6941
|
+
_chunk7U4XF76Rcjs.logger.error(`SSR streaming error: ${error}`);
|
|
6942
6942
|
emitFarmRenderError(req, observabilityRoute, error);
|
|
6943
6943
|
}
|
|
6944
6944
|
}
|
|
@@ -7016,7 +7016,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7016
7016
|
*/
|
|
7017
7017
|
async createLateNavigationRecoveryHTML(req, error) {
|
|
7018
7018
|
if (_chunk7JUIK547cjs.isFarmRedirectError.call(void 0, error)) {
|
|
7019
|
-
return
|
|
7019
|
+
return _chunkUWOCYINYcjs.createLateRedirectRecovery.call(void 0,
|
|
7020
7020
|
this.localizeRedirectUrl(_chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error).url),
|
|
7021
7021
|
this.getCspNonce(req) || ""
|
|
7022
7022
|
);
|
|
@@ -7034,10 +7034,10 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7034
7034
|
)
|
|
7035
7035
|
);
|
|
7036
7036
|
} catch (error2) {
|
|
7037
|
-
|
|
7037
|
+
_chunk7U4XF76Rcjs.logger.warn(`not-found page could not render outside its layout, using Farm's: ${error2}`);
|
|
7038
7038
|
}
|
|
7039
7039
|
}
|
|
7040
|
-
return
|
|
7040
|
+
return _chunkUWOCYINYcjs.createLateNotFoundRecovery.call(void 0, content, this.getCspNonce(req) || "");
|
|
7041
7041
|
}
|
|
7042
7042
|
async render404(req, res) {
|
|
7043
7043
|
res.statusCode = 404;
|
|
@@ -7059,11 +7059,11 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7059
7059
|
}
|
|
7060
7060
|
const acceptHeader = req.headers.accept;
|
|
7061
7061
|
const accept = Array.isArray(acceptHeader) ? acceptHeader.join(",") : acceptHeader;
|
|
7062
|
-
if (
|
|
7063
|
-
res.setHeader("Content-Type",
|
|
7062
|
+
if (_chunk2NOHVIJ3cjs.farmRequestWantsMarkdown.call(void 0, pathname, accept)) {
|
|
7063
|
+
res.setHeader("Content-Type", _chunk2NOHVIJ3cjs.FARM_MARKDOWN_CONTENT_TYPE);
|
|
7064
7064
|
res.setHeader("X-Farm-Markdown-Error", "404");
|
|
7065
7065
|
res.setHeader("Cache-Control", "no-store");
|
|
7066
|
-
res.end(
|
|
7066
|
+
res.end(_chunk2NOHVIJ3cjs.createFarmMarkdownErrorBody.call(void 0, 404, pathname, this.config.basePath || "/"));
|
|
7067
7067
|
return;
|
|
7068
7068
|
}
|
|
7069
7069
|
const appDir = path10.join(this.config.root, this.config.srcDir, "app");
|
|
@@ -7125,10 +7125,10 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7125
7125
|
trustProxy: _optionalChain([this, 'access', _287 => _287.config, 'access', _288 => _288.server, 'optionalAccess', _289 => _289.trustProxy])
|
|
7126
7126
|
});
|
|
7127
7127
|
const diagnostics = isDev ? createDefaultErrorDiagnostics(error, this.config.root || process.cwd()) : void 0;
|
|
7128
|
-
const statusText =
|
|
7128
|
+
const statusText = _chunkUWOCYINYcjs.getDefaultErrorStatusText.call(void 0, statusCode);
|
|
7129
7129
|
const content = this.stampFarmScripts(
|
|
7130
7130
|
req,
|
|
7131
|
-
|
|
7131
|
+
_chunkUWOCYINYcjs.createDefaultErrorMarkup.call(void 0, {
|
|
7132
7132
|
statusCode,
|
|
7133
7133
|
statusText,
|
|
7134
7134
|
requestPath: requestUrl.pathname,
|
|
@@ -7138,7 +7138,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7138
7138
|
stack: _optionalChain([diagnostics, 'optionalAccess', _292 => _292.stack]),
|
|
7139
7139
|
sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _293 => _293.sourceFrame]),
|
|
7140
7140
|
development: isDev,
|
|
7141
|
-
farmVersion:
|
|
7141
|
+
farmVersion: _chunkCCMP4JD2cjs.FARM_VERSION,
|
|
7142
7142
|
nodeVersion: process.version,
|
|
7143
7143
|
mode: isDev ? "development" : "production"
|
|
7144
7144
|
})
|
|
@@ -7176,7 +7176,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7176
7176
|
const viteClientScript = farmScripts(`<script type="module" src="/@vite/client"></script>`);
|
|
7177
7177
|
const integrationManifestScript = farmScripts(`<script>
|
|
7178
7178
|
window.__FARM_DEPLOYMENT_ID__ = ${serializeInlineValue(this.getDeploymentId())};
|
|
7179
|
-
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(
|
|
7179
|
+
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkWGWWRV2Mcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
|
|
7180
7180
|
${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};` : ""}
|
|
7181
7181
|
</script>`);
|
|
7182
7182
|
const alternateLinks = i18nSnapshot ? renderI18nAlternateLinks(
|
|
@@ -7185,7 +7185,7 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
|
|
|
7185
7185
|
this.getI18nAlternateOptions(alternates.req, alternates.metadata)
|
|
7186
7186
|
) : "";
|
|
7187
7187
|
const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
|
|
7188
|
-
const themeDocument =
|
|
7188
|
+
const themeDocument = _chunkUWOCYINYcjs.createFarmThemeDocumentParts.call(void 0,
|
|
7189
7189
|
this.config.theme,
|
|
7190
7190
|
this.config.basePath,
|
|
7191
7191
|
_chunk5AMH6AFAcjs.getTheme.call(void 0, )
|
|
@@ -7195,10 +7195,10 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
|
|
|
7195
7195
|
_optionalChain([this, 'access', _300 => _300.rendererRuntime, 'access', _301 => _301.generateHydrationScript, 'optionalCall', _302 => _302()]) || ""
|
|
7196
7196
|
);
|
|
7197
7197
|
const viewportTags = _chunkY3DO7BIJcjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _303 => _303.metadata, 'optionalAccess', _304 => _304.viewport]));
|
|
7198
|
-
const fullDocument =
|
|
7198
|
+
const fullDocument = _chunkUWOCYINYcjs.extractFarmFullDocument.call(void 0, _chunkUWOCYINYcjs.markFarmDocumentLayouts.call(void 0, content));
|
|
7199
7199
|
if (fullDocument) {
|
|
7200
|
-
return
|
|
7201
|
-
metadataHead ?
|
|
7200
|
+
return _chunkUWOCYINYcjs.composeFarmFullDocument.call(void 0,
|
|
7201
|
+
metadataHead ? _chunkUWOCYINYcjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument,
|
|
7202
7202
|
{
|
|
7203
7203
|
fallbackIcon: !metadataHead,
|
|
7204
7204
|
viewport: viewportTags,
|
|
@@ -7305,7 +7305,7 @@ function isResolvedDocsConfig(value) {
|
|
|
7305
7305
|
var FarmApp = class {
|
|
7306
7306
|
constructor(config = {}, viteServer) {
|
|
7307
7307
|
this.config = this.normalizeConfig(config);
|
|
7308
|
-
|
|
7308
|
+
_chunkPLJMEUANcjs.configureFarmObservability.call(void 0, this.config.observability);
|
|
7309
7309
|
_chunk5AMH6AFAcjs._setDefaultFarmThemeConfig.call(void 0, this.config.theme);
|
|
7310
7310
|
this.i18nRuntime = _chunkSXXSQVKKcjs.createFarmI18nRuntime.call(void 0, this.config.i18n);
|
|
7311
7311
|
_chunkSXXSQVKKcjs._setDefaultFarmI18nRuntime.call(void 0, this.i18nRuntime);
|
|
@@ -7320,10 +7320,10 @@ var FarmApp = class {
|
|
|
7320
7320
|
}
|
|
7321
7321
|
async initialize() {
|
|
7322
7322
|
if (process.env.FARM_VERBOSE) {
|
|
7323
|
-
|
|
7323
|
+
_chunk7U4XF76Rcjs.logger.info("Initializing Farm.js application...");
|
|
7324
7324
|
}
|
|
7325
|
-
await
|
|
7326
|
-
await
|
|
7325
|
+
await _chunkNW3DL2PMcjs.initStorage.call(void 0, this.config.storage);
|
|
7326
|
+
await _chunkBIAGSYIZcjs.configureFarmCache.call(void 0, this.config.cache);
|
|
7327
7327
|
await this.i18nRuntime.initialize();
|
|
7328
7328
|
await this.serverRenderer.initialize();
|
|
7329
7329
|
await this.verifyAppStructure();
|
|
@@ -7331,7 +7331,7 @@ var FarmApp = class {
|
|
|
7331
7331
|
if (_chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) this.assertNoPageRoutes();
|
|
7332
7332
|
this.routeManager.generateClientManifest(this.config.root);
|
|
7333
7333
|
if (process.env.FARM_VERBOSE) {
|
|
7334
|
-
|
|
7334
|
+
_chunk7U4XF76Rcjs.logger.success("Farm.js application initialized successfully!");
|
|
7335
7335
|
}
|
|
7336
7336
|
}
|
|
7337
7337
|
getRouteManager() {
|
|
@@ -7367,8 +7367,8 @@ var FarmApp = class {
|
|
|
7367
7367
|
integrations: config.integrations || {},
|
|
7368
7368
|
plugins: config.plugins || [],
|
|
7369
7369
|
migrations: config.migrations || { commands: [] },
|
|
7370
|
-
cron:
|
|
7371
|
-
workflows:
|
|
7370
|
+
cron: _chunk5ZHC6QGDcjs.resolveCronConfig.call(void 0, config.cron),
|
|
7371
|
+
workflows: _chunkGBESKA76cjs.resolveWorkflowsConfig.call(void 0, config.workflows),
|
|
7372
7372
|
api: normalizeFarmAppAPIConfig(config.api),
|
|
7373
7373
|
middleware: config.middleware || {},
|
|
7374
7374
|
routeRules: _chunkIIHZ2BEEcjs.normalizeRouteRules.call(void 0, config.routeRules),
|
|
@@ -7380,7 +7380,7 @@ var FarmApp = class {
|
|
|
7380
7380
|
config.images,
|
|
7381
7381
|
_chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
|
|
7382
7382
|
),
|
|
7383
|
-
performance:
|
|
7383
|
+
performance: _chunk4OFWG4IKcjs.resolveFarmPerformanceConfig.call(void 0, config.performance),
|
|
7384
7384
|
theme: _chunkWT6RAN2Icjs.resolveFarmThemeConfig.call(void 0, config.theme, basePath),
|
|
7385
7385
|
i18n: isResolvedI18nConfig(config.i18n) ? config.i18n : _chunkZMSVKVI3cjs.resolveFarmI18nConfig.call(void 0, config.i18n, {
|
|
7386
7386
|
root,
|
|
@@ -7392,7 +7392,7 @@ var FarmApp = class {
|
|
|
7392
7392
|
serverRuntimeConfig: config.serverRuntimeConfig || {},
|
|
7393
7393
|
publicRuntimeConfig: config.publicRuntimeConfig || {},
|
|
7394
7394
|
docs: isResolvedDocsConfig(config.docs) ? config.docs : defaultDocsConfig,
|
|
7395
|
-
md:
|
|
7395
|
+
md: _chunk2NOHVIJ3cjs.resolveMarkdownConfig.call(void 0, config.md),
|
|
7396
7396
|
mdx: _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx),
|
|
7397
7397
|
observability: _nullishCoalesce(config.observability, () => ( false)),
|
|
7398
7398
|
telemetry: config.telemetry !== false,
|
|
@@ -7432,17 +7432,17 @@ var FarmApp = class {
|
|
|
7432
7432
|
}
|
|
7433
7433
|
async verifyAppStructure() {
|
|
7434
7434
|
const appDirs = _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, this.config);
|
|
7435
|
-
const hasAppDirectory = (await Promise.all(appDirs.map((appDir) =>
|
|
7435
|
+
const hasAppDirectory = (await Promise.all(appDirs.map((appDir) => _chunk7U4XF76Rcjs.fileExists.call(void 0, appDir)))).some(
|
|
7436
7436
|
Boolean
|
|
7437
7437
|
);
|
|
7438
7438
|
if (!hasAppDirectory) {
|
|
7439
7439
|
const routeFiles = _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
|
|
7440
|
-
(source) =>
|
|
7440
|
+
(source) => _chunkHS4JPIGRcjs.findProgrammaticRouteFiles.call(void 0, source.root, source.srcDir)
|
|
7441
7441
|
);
|
|
7442
7442
|
if (routeFiles.length > 0) {
|
|
7443
7443
|
return;
|
|
7444
7444
|
}
|
|
7445
|
-
const appDir =
|
|
7445
|
+
const appDir = _chunk7U4XF76Rcjs.resolveAppPath.call(void 0, this.config.root, this.config.srcDir, "app");
|
|
7446
7446
|
throw new Error(
|
|
7447
7447
|
`App directory not found at ${appDir}. Please create a src/app directory or extend a Farm layer containing routes.`
|
|
7448
7448
|
);
|
|
@@ -7451,11 +7451,11 @@ var FarmApp = class {
|
|
|
7451
7451
|
const rootLayoutPaths = appDirs.flatMap(
|
|
7452
7452
|
(appDir) => componentExtensions.map((extension) => path4.default.join(appDir, `layout${extension}`))
|
|
7453
7453
|
);
|
|
7454
|
-
const hasRootLayout = await Promise.all(rootLayoutPaths.map((p) =>
|
|
7454
|
+
const hasRootLayout = await Promise.all(rootLayoutPaths.map((p) => _chunk7U4XF76Rcjs.fileExists.call(void 0, p))).then(
|
|
7455
7455
|
(results) => results.some(Boolean)
|
|
7456
7456
|
);
|
|
7457
7457
|
if (!hasRootLayout && !_chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
|
|
7458
|
-
|
|
7458
|
+
_chunk7U4XF76Rcjs.logger.warn(
|
|
7459
7459
|
`No root layout found. Consider creating src/app/layout${componentExtensions[0]} for consistent page structure.`
|
|
7460
7460
|
);
|
|
7461
7461
|
}
|
|
@@ -7494,7 +7494,7 @@ function resolveFarmImageProviderForRuntime(images, options) {
|
|
|
7494
7494
|
`images.provider "node" optimizes images with sharp, which is not installed. ${SHARP_INSTALL_HINT}`
|
|
7495
7495
|
);
|
|
7496
7496
|
}
|
|
7497
|
-
|
|
7497
|
+
_chunk7U4XF76Rcjs.logger.info(
|
|
7498
7498
|
`Image optimization is off because sharp is not installed; images use their original URLs. ${SHARP_INSTALL_HINT}, or set images.provider to "none".`
|
|
7499
7499
|
);
|
|
7500
7500
|
return Object.freeze({ ...images, provider: "none" });
|
|
@@ -7660,7 +7660,7 @@ function toolFromObject(object) {
|
|
|
7660
7660
|
function findFarmWebMCPTools(code, filename = "module.tsx") {
|
|
7661
7661
|
if (!code.includes(WEBMCP_CLIENT)) return [];
|
|
7662
7662
|
const lang = _nullishCoalesce(LANGS[path4.default.extname(filename).slice(1)], () => ( "tsx"));
|
|
7663
|
-
_nullishCoalesce(parseAst3, () => ( (parseAst3 = _module.createRequire.call(void 0, typeof __filename === "string" ? __filename :
|
|
7663
|
+
_nullishCoalesce(parseAst3, () => ( (parseAst3 = _module.createRequire.call(void 0, typeof __filename === "string" ? __filename : _chunkUZM3PDKKcjs.define_import_meta_default.url)(
|
|
7664
7664
|
"rolldown/parseAst"
|
|
7665
7665
|
).parseAst)));
|
|
7666
7666
|
let program;
|
|
@@ -8071,6 +8071,35 @@ async function readFarmNavigationStream(body, flushToken) {
|
|
|
8071
8071
|
cancel: function() { reader.cancel().catch(function() {}); },
|
|
8072
8072
|
};
|
|
8073
8073
|
}`;
|
|
8074
|
+
var FARM_EARLY_NAVIGATION_SOURCE = `// The request the boot script sent for a link clicked before the router ran (islands-boot.ts).
|
|
8075
|
+
// The next navigation request takes its response when it is the same request, and aborts it
|
|
8076
|
+
// otherwise. The held island values may differ: a response for fewer of them carries more values,
|
|
8077
|
+
// which fits any page. As with a prefetched page, a response sent over 30 seconds ago is not used.
|
|
8078
|
+
function takeFarmEarlyNavigation(url, headers, signal) {
|
|
8079
|
+
const early = window.__FARM_EARLY_NAVIGATION__;
|
|
8080
|
+
if (!early) return null;
|
|
8081
|
+
window.__FARM_EARLY_NAVIGATION__ = undefined;
|
|
8082
|
+
const target = new URL(url, window.location.href);
|
|
8083
|
+
const requested = new URL(early.url, window.location.href);
|
|
8084
|
+
target.hash = "";
|
|
8085
|
+
requested.hash = "";
|
|
8086
|
+
let same = target.href === requested.href && Date.now() - early.at <= 30000 && !(signal && signal.aborted);
|
|
8087
|
+
const names = new Set(Object.keys(early.headers));
|
|
8088
|
+
headers.forEach(function(value, name) { names.add(name); });
|
|
8089
|
+
names.forEach(function(name) {
|
|
8090
|
+
const sent = Object.prototype.hasOwnProperty.call(early.headers, name) ? early.headers[name] : null;
|
|
8091
|
+
// A whole page answers a request for a streamed one, as a response without flush markers is
|
|
8092
|
+
// all shell. The boot asks for it whole from under a layout that hydrates as one root.
|
|
8093
|
+
if (name === "f-values" || (name === "f-stream" && sent === null)) return;
|
|
8094
|
+
if (sent !== headers.get(name)) same = false;
|
|
8095
|
+
});
|
|
8096
|
+
if (!same) {
|
|
8097
|
+
early.controller.abort();
|
|
8098
|
+
return null;
|
|
8099
|
+
}
|
|
8100
|
+
if (signal) signal.addEventListener("abort", function() { early.controller.abort(); }, { once: true });
|
|
8101
|
+
return early.response;
|
|
8102
|
+
}`;
|
|
8074
8103
|
|
|
8075
8104
|
// src/client/refresh-fields.ts
|
|
8076
8105
|
var FARM_REFRESH_FIELDS_SOURCE = `// The server-rendered fields of a tree: islands keep their own.
|
|
@@ -8170,7 +8199,7 @@ function propertyKeyName(property2) {
|
|
|
8170
8199
|
return void 0;
|
|
8171
8200
|
}
|
|
8172
8201
|
function redactFarmDocsClientConfig(code, filename) {
|
|
8173
|
-
_nullishCoalesce(parseAst4, () => ( (parseAst4 = _module.createRequire.call(void 0, typeof __filename === "string" ? __filename :
|
|
8202
|
+
_nullishCoalesce(parseAst4, () => ( (parseAst4 = _module.createRequire.call(void 0, typeof __filename === "string" ? __filename : _chunkUZM3PDKKcjs.define_import_meta_default.url)(
|
|
8174
8203
|
"rolldown/parseAst"
|
|
8175
8204
|
).parseAst)));
|
|
8176
8205
|
const extension = path4.default.extname(filename);
|
|
@@ -8572,4 +8601,5 @@ ${FARM_DARK_VARIANT}
|
|
|
8572
8601
|
|
|
8573
8602
|
|
|
8574
8603
|
|
|
8575
|
-
|
|
8604
|
+
|
|
8605
|
+
exports.inspectStaticMetadataImage = inspectStaticMetadataImage; exports.RouteManager = RouteManager; exports.createFarmDevClientManifest = createFarmDevClientManifest; exports.farmFontImportsPlugin = farmFontImportsPlugin; exports.mergeFarmFontCss = mergeFarmFontCss; exports.resolveDevGlobalStylesheetHref = resolveDevGlobalStylesheetHref; exports.collectDevStylesheetUrls = collectDevStylesheetUrls; exports.farmDevServerStylesheetsPlugin = farmDevServerStylesheetsPlugin; exports.resolveFarmNotFoundComponentPath = resolveFarmNotFoundComponentPath; exports.DEFAULT_NOT_FOUND_STYLES = DEFAULT_NOT_FOUND_STYLES; exports.generateFarmIntegrationProviderClientCode = generateFarmIntegrationProviderClientCode; exports.generateFarmIntegrationProviderServerModules = generateFarmIntegrationProviderServerModules; exports.inferFarmIslandStrategy = inferFarmIslandStrategy; exports.invalidateFarmRouteRootInferences = invalidateFarmRouteRootInferences; exports.resolveFarmRouteRootStrategy = resolveFarmRouteRootStrategy; exports.canBootFarmIslandsClient = canBootFarmIslandsClient; exports.canFarmSkipKeptLayoutRender = canFarmSkipKeptLayoutRender; exports.ServerRenderer = ServerRenderer; exports.FarmApp = FarmApp; exports.createFarmApp = createFarmApp; exports.SHARP_INSTALL_HINT = SHARP_INSTALL_HINT; exports.resolveFarmImageProviderForRuntime = resolveFarmImageProviderForRuntime; exports.resolveFarmImageServerRuntime = resolveFarmImageServerRuntime; exports.toBakedMarkdownSourcePath = toBakedMarkdownSourcePath; exports.resolveFarmAppPackages = resolveFarmAppPackages; exports.collectFarmWebMCPTools = collectFarmWebMCPTools; exports.resolveFarmClientCacheAdapterEntry = resolveFarmClientCacheAdapterEntry; exports.generateClientCachePersistenceCode = generateClientCachePersistenceCode; exports.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE = FARM_LAYOUT_ELEMENT_CLIENT_SOURCE; exports.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE = FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE; exports.FARM_NAVIGATION_SCRIPT_SOURCE = FARM_NAVIGATION_SCRIPT_SOURCE; exports.FARM_NAVIGATION_STREAM_READER_SOURCE = FARM_NAVIGATION_STREAM_READER_SOURCE; exports.FARM_EARLY_NAVIGATION_SOURCE = FARM_EARLY_NAVIGATION_SOURCE; exports.FARM_REFRESH_FIELDS_SOURCE = FARM_REFRESH_FIELDS_SOURCE; exports.exactIdPattern = exactIdPattern; exports.fileNamePattern = fileNamePattern; exports.redactFarmDocsClientConfig = redactFarmDocsClientConfig; exports.isFarmDocsClientConfigModule = isFarmDocsClientConfigModule; exports.farmDocsClientConfigPlugin = farmDocsClientConfigPlugin; exports.FARM_VIDEO_PLAYER_HTML = FARM_VIDEO_PLAYER_HTML; exports.createFarmClientOptimizeDepsEntries = createFarmClientOptimizeDepsEntries; exports.createFarmClientOptimizeDepsConfig = createFarmClientOptimizeDepsConfig; exports.createFarmSourceAlias = createFarmSourceAlias; exports.mergeFarmViteAlias = mergeFarmViteAlias; exports.mergeFarmViteConfig = mergeFarmViteConfig; exports.mergeFarmProductionViteConfig = mergeFarmProductionViteConfig; exports.createFarmThemeCssPlugin = createFarmThemeCssPlugin;
|