@farm.js/core 0.1.72 → 0.1.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-handler-VIT4GOSR.mjs → agent-mcp-handler-HX4F4VKN.mjs} +4 -4
- package/dist/{agent-mcp-handler-KE4J3W7S.cjs → agent-mcp-handler-NRIL4JBC.cjs} +5 -5
- package/dist/{agent-mcp.d-Cwff7lcA.d.mts → agent-mcp.d-BEhDfdWc.d.mts} +1 -1
- package/dist/{agent-mcp.d-BO3rZXEM.d.ts → agent-mcp.d-CX8_oOT_.d.ts} +1 -1
- package/dist/agent-runtime.cjs +4 -4
- package/dist/agent-runtime.d.mts +5 -5
- package/dist/agent-runtime.d.ts +5 -5
- package/dist/agent-runtime.mjs +3 -3
- package/dist/{analyzer-5Q75LTIL.mjs → analyzer-2K35LIQZ.mjs} +2 -2
- package/dist/analyzer-6EOYURMV.cjs +16 -0
- package/dist/api/client.d.mts +3 -3
- package/dist/api/client.d.ts +3 -3
- package/dist/api/client.native.d.mts +4 -4
- package/dist/api/client.native.d.ts +4 -4
- package/dist/api/node.cjs +9 -8
- package/dist/api/node.d.mts +7 -7
- package/dist/api/node.d.ts +7 -7
- package/dist/api/node.mjs +8 -7
- package/dist/api/route-manager.cjs +11 -9
- package/dist/api/route-manager.d.mts +10 -8
- package/dist/api/route-manager.d.ts +10 -8
- package/dist/api/route-manager.mjs +10 -8
- package/dist/api/runtime.cjs +8 -7
- package/dist/api/runtime.d.mts +6 -6
- package/dist/api/runtime.d.ts +6 -6
- package/dist/api/runtime.mjs +7 -6
- package/dist/{api-client.d-Bp35zMqR.d.mts → api-client.d-CyVmI4Di.d.mts} +2 -2
- package/dist/{api-client.d-CFI_xL0V.d.ts → api-client.d-DrTM7BdH.d.ts} +2 -2
- package/dist/api.cjs +13 -11
- package/dist/api.d.mts +10 -10
- package/dist/api.d.ts +10 -10
- package/dist/api.mjs +12 -10
- package/dist/{app-manifest.d-USD_IbFd.d.mts → app-manifest.d-BcXt2yCx.d.mts} +10 -1
- package/dist/{app-manifest.d-DwjGkYlP.d.ts → app-manifest.d-CVEx1CFB.d.ts} +10 -1
- package/dist/app-markdown.cjs +8 -4
- package/dist/app-markdown.d.mts +7 -7
- package/dist/app-markdown.d.ts +7 -7
- package/dist/app-markdown.mjs +7 -3
- package/dist/{app.d-DAmF2MAk.d.ts → app.d-B6i8CSrx.d.ts} +36 -4
- package/dist/{app.d-fW06_h8h.d.mts → app.d-DowzSmT5.d.mts} +36 -4
- package/dist/cache.cjs +2 -2
- package/dist/cache.d.mts +8 -0
- package/dist/cache.d.ts +8 -0
- package/dist/cache.mjs +1 -1
- package/dist/chunk-2DOI6HLJ.cjs +284 -0
- package/dist/chunk-2GQBBOFH.mjs +76 -0
- package/dist/{chunk-5LOARKDP.cjs → chunk-2TZ3F6TN.cjs} +29 -17
- package/dist/{chunk-IWCYRDRQ.cjs → chunk-35GBGSQZ.cjs} +3 -3
- package/dist/{chunk-GF22VGMS.cjs → chunk-3BUJIPKE.cjs} +2 -2
- package/dist/{chunk-Y5LEPEVH.mjs → chunk-3ODLJRA6.mjs} +1 -1
- package/dist/{chunk-DMAP4RND.cjs → chunk-3OMLZLDE.cjs} +54 -16
- package/dist/{chunk-VNBDN5W2.cjs → chunk-47ZDUDN5.cjs} +64 -27
- package/dist/{chunk-2W4GNXGX.cjs → chunk-4AB62NMW.cjs} +2 -2
- package/dist/{chunk-HDPT6OYE.cjs → chunk-4M5ESTJ2.cjs} +10 -2
- package/dist/{chunk-CBLRSZQL.cjs → chunk-56HHUSR5.cjs} +502 -430
- package/dist/chunk-5XD2ULJG.mjs +114 -0
- package/dist/{chunk-JX5VOLAV.cjs → chunk-65OS2TOT.cjs} +4 -4
- package/dist/{chunk-WIJF3PBM.mjs → chunk-6JEXH7N6.mjs} +1 -1
- package/dist/{chunk-TY5KCYDE.mjs → chunk-72NTEYCX.mjs} +10 -3
- package/dist/{chunk-5R4Q5FN7.cjs → chunk-737MIVX3.cjs} +52 -41
- package/dist/{chunk-5X6OHJEE.cjs → chunk-77SVUQM5.cjs} +74 -20
- package/dist/{chunk-CKQAQFF6.mjs → chunk-7RKHXF4P.mjs} +2 -2
- package/dist/{chunk-GJEC5S4V.mjs → chunk-7VCLTNED.mjs} +1 -1
- package/dist/{chunk-E3LE6EZH.cjs → chunk-ACAEFEOH.cjs} +38 -41
- package/dist/{chunk-REP6HWJN.mjs → chunk-AL6E63FZ.mjs} +2 -2
- package/dist/{chunk-DQ2DI3Y7.mjs → chunk-AO5IRA2N.mjs} +2 -2
- package/dist/{chunk-VAWDGGW3.mjs → chunk-AU5UPNOD.mjs} +26 -15
- package/dist/{chunk-DS7JGFW5.mjs → chunk-B3XY6FMC.mjs} +71 -17
- package/dist/{chunk-U7VH3Q5E.cjs → chunk-B5WZP3T3.cjs} +15 -2
- package/dist/{chunk-3JN5M3T5.mjs → chunk-BFOMCSZ2.mjs} +476 -138
- package/dist/{chunk-I4KPA2C6.mjs → chunk-BIX46FTI.mjs} +1 -1
- package/dist/{chunk-YZLEOMMA.mjs → chunk-BNXV3PRM.mjs} +4 -4
- package/dist/{chunk-3GNVIYPO.cjs → chunk-BSJMWCWM.cjs} +7 -7
- package/dist/{chunk-WVQNXXNE.cjs → chunk-BWFBTTJ5.cjs} +2 -2
- package/dist/{chunk-FEFCISOX.cjs → chunk-CEVXKJKF.cjs} +2 -2
- package/dist/{chunk-DGNMXL2O.mjs → chunk-CF77L6RL.mjs} +33 -36
- package/dist/{chunk-OB45EAQL.mjs → chunk-CXQZQK6R.mjs} +3 -2
- package/dist/{chunk-255J7K4X.mjs → chunk-D2IAYGYA.mjs} +1 -1
- package/dist/{chunk-OSEQL34Q.cjs → chunk-D4TYE6MY.cjs} +2 -2
- package/dist/{chunk-FSSONJRV.cjs → chunk-DM2YGTRH.cjs} +24 -17
- package/dist/{chunk-ICFPTHXM.mjs → chunk-DRBXYJZ6.mjs} +7 -3
- package/dist/{chunk-E3HDJCWF.mjs → chunk-DRHHTHA3.mjs} +1 -1
- package/dist/{chunk-YXIQYWOK.cjs → chunk-DTBRSRTR.cjs} +23 -5
- package/dist/{chunk-JZQS3ZOI.mjs → chunk-E4T7WJJN.mjs} +10 -2
- package/dist/{chunk-YAEN3L2F.cjs → chunk-EF5AP4CV.cjs} +21 -2
- package/dist/{chunk-SPP3EZTJ.cjs → chunk-EHJOSIXM.cjs} +137 -67
- package/dist/{chunk-JZBU7V4D.mjs → chunk-ELJQWUAR.mjs} +125 -55
- package/dist/{chunk-DMXMIE2C.cjs → chunk-ENYBDM4U.cjs} +2 -2
- package/dist/{chunk-ZFEJ2SF2.cjs → chunk-EWIEJQP6.cjs} +28 -28
- package/dist/{chunk-ZUVAGMQ5.cjs → chunk-F244KE2D.cjs} +7 -7
- package/dist/{chunk-WW3LRNQV.mjs → chunk-FCBUNILW.mjs} +1 -1
- package/dist/{chunk-645ENY7W.mjs → chunk-FEQ72ZHD.mjs} +16 -9
- package/dist/{chunk-ME7RVELR.mjs → chunk-FGXSWRWA.mjs} +20 -1
- package/dist/{chunk-2AFW7673.cjs → chunk-FNWL5DMG.cjs} +4 -3
- package/dist/{chunk-HLMUWKAP.cjs → chunk-FYV6DTAG.cjs} +826 -531
- package/dist/{chunk-7PPLTD3P.cjs → chunk-G7S6XG6X.cjs} +6 -6
- package/dist/{chunk-AQIO3RNL.mjs → chunk-GK2GBIXD.mjs} +3 -3
- package/dist/{chunk-IHTDLCDJ.cjs → chunk-GRHSQYD4.cjs} +17 -4
- package/dist/{chunk-W44X6IC2.cjs → chunk-HBLYSWIJ.cjs} +13 -9
- package/dist/chunk-HK4VJI27.cjs +76 -0
- package/dist/{chunk-EGIY4A7V.cjs → chunk-HKZVC5GP.cjs} +2 -2
- package/dist/{chunk-EYPSKXO4.mjs → chunk-HRQV5Q3J.mjs} +1 -1
- package/dist/{chunk-S7MWSFFP.cjs → chunk-IBEHVSU4.cjs} +2 -2
- package/dist/{chunk-77VNYVVX.mjs → chunk-IG4IQMIW.mjs} +1 -1
- package/dist/{chunk-N3XO5AL5.cjs → chunk-IJFNXP3D.cjs} +2 -2
- package/dist/{chunk-RFWWXEIF.mjs → chunk-IP2R2TAE.mjs} +1 -1
- package/dist/{chunk-FETMUBIA.mjs → chunk-IZ5WOTQP.mjs} +1 -1
- package/dist/{chunk-CSLHNBPS.cjs → chunk-J42QN7OC.cjs} +6 -6
- package/dist/{chunk-NDDRTFN4.mjs → chunk-J7EUGGTY.mjs} +2 -2
- package/dist/{chunk-5XFKWHZD.mjs → chunk-JI6N4W2I.mjs} +208 -136
- package/dist/{chunk-GJ7QVFAG.mjs → chunk-JOECBGY7.mjs} +1 -1
- package/dist/{chunk-CL52PD6D.cjs → chunk-JSUVQ5HG.cjs} +8 -8
- package/dist/{chunk-DZHTNSQ5.cjs → chunk-JWHRVBCZ.cjs} +14 -14
- package/dist/{chunk-OSMUE5ST.mjs → chunk-JZ43UD6S.mjs} +7 -7
- package/dist/{chunk-RLEALQEN.mjs → chunk-KIRIFO6T.mjs} +43 -5
- package/dist/{chunk-XGTFLG73.cjs → chunk-KMYOKQPP.cjs} +18 -11
- package/dist/{chunk-WX63N6C5.mjs → chunk-KNEYWPZV.mjs} +64 -27
- package/dist/{chunk-AYVGD3PK.mjs → chunk-KUMKBBYP.mjs} +1 -1
- package/dist/{chunk-VT25ERQK.mjs → chunk-KWUZJZ23.mjs} +21 -3
- package/dist/{chunk-NV26EGMC.mjs → chunk-LHFGTR7F.mjs} +2 -2
- package/dist/{chunk-4P5634G6.cjs → chunk-LIQJYEQP.cjs} +14 -9
- package/dist/chunk-LRPPXKCX.mjs +58 -0
- package/dist/chunk-LXTYJ2HW.mjs +139 -0
- package/dist/{chunk-O32QPFVV.cjs → chunk-MKQ27TGW.cjs} +5 -5
- package/dist/{chunk-KQAB5LML.mjs → chunk-MQ5HA7H2.mjs} +2 -2
- package/dist/{chunk-Z3GPAFIA.mjs → chunk-MUITBU5Z.mjs} +1 -1
- package/dist/chunk-NDOE76QC.cjs +58 -0
- package/dist/{chunk-EXN4DTVF.cjs → chunk-NET6PBUH.cjs} +2 -2
- package/dist/{chunk-YBY34UHB.mjs → chunk-NKETXVKP.mjs} +15 -2
- package/dist/chunk-NRWEY2CM.mjs +25 -0
- package/dist/chunk-NU5XLYRN.cjs +139 -0
- package/dist/{chunk-BE7AQXJB.cjs → chunk-NXGQIXR7.cjs} +507 -169
- package/dist/{chunk-C5AM2XDN.cjs → chunk-O2A6HE76.cjs} +4 -4
- package/dist/{chunk-OAEDVXVE.mjs → chunk-O6K4G7YA.mjs} +5 -2
- package/dist/{chunk-LXEJNWF5.mjs → chunk-OSKIG4OP.mjs} +2 -2
- package/dist/{chunk-3WG7GJQL.cjs → chunk-P3EZKU6L.cjs} +18 -18
- package/dist/{chunk-C2JOS77Z.cjs → chunk-PG6ZIHKE.cjs} +250 -51
- package/dist/{chunk-ET6WW3FY.cjs → chunk-Q3MVNRAO.cjs} +1305 -848
- package/dist/{chunk-AZ6IW6SF.mjs → chunk-Q4G52OSW.mjs} +1 -1
- package/dist/{chunk-TPYAYFMF.cjs → chunk-QL3YZTGZ.cjs} +2 -2
- package/dist/{chunk-JMFTKNBA.mjs → chunk-R4BWNP73.mjs} +2 -2
- package/dist/{chunk-J5ASGNKF.mjs → chunk-R6Q6VSGU.mjs} +24 -9
- package/dist/{chunk-B6RBJJ5G.mjs → chunk-RBRIKT6B.mjs} +15 -2
- package/dist/{chunk-C6CUUBY5.cjs → chunk-RHI67C2V.cjs} +5 -5
- package/dist/chunk-RK3YYUX6.cjs +114 -0
- package/dist/{chunk-Y2LU4LE5.mjs → chunk-ROPMQNCG.mjs} +2 -2
- package/dist/{chunk-QIXEU2WV.cjs → chunk-RQ4UZJPR.cjs} +3 -3
- package/dist/{chunk-ZDZUFD67.cjs → chunk-RSL3YFJG.cjs} +1 -1
- package/dist/{chunk-JWY66PID.cjs → chunk-S3D6SL2V.cjs} +9 -6
- package/dist/{chunk-4HGLJOXZ.cjs → chunk-TPDKFRQX.cjs} +11 -11
- package/dist/{chunk-E2V7RRFL.mjs → chunk-UHAARKF3.mjs} +2 -2
- package/dist/{chunk-QSTRBKHZ.mjs → chunk-UJWRXBVP.mjs} +2 -2
- package/dist/{chunk-7QCJDYZQ.cjs → chunk-V6T3UJAH.cjs} +7 -7
- package/dist/{chunk-AUAMXI6N.mjs → chunk-VFPFXMTF.mjs} +1 -1
- package/dist/{chunk-KPJYBSHL.mjs → chunk-VKLV7GF4.mjs} +221 -22
- package/dist/{chunk-TP4RAV7Y.cjs → chunk-VKRMO3EZ.cjs} +8 -8
- package/dist/chunk-VWIW47FW.cjs +25 -0
- package/dist/{chunk-L6E4SHUB.cjs → chunk-VZKCGHWC.cjs} +39 -24
- package/dist/{chunk-JWLRBDDC.cjs → chunk-WH3PBJS7.cjs} +2 -2
- package/dist/{chunk-BSXKZPFE.mjs → chunk-WS4SLJW5.mjs} +501 -206
- package/dist/{chunk-5OFNUETM.mjs → chunk-WTTJ2YS2.mjs} +9 -1
- package/dist/{chunk-RLFGKJQ6.mjs → chunk-X2KNHD4B.mjs} +14 -2
- package/dist/{chunk-5CFHQ7HM.mjs → chunk-XXKMAHYE.mjs} +1 -1
- package/dist/{chunk-MBCRWU3P.cjs → chunk-XZPI44Q7.cjs} +4 -4
- package/dist/{chunk-ACGBXN3U.cjs → chunk-Y4FEQBKY.cjs} +17 -9
- package/dist/{chunk-MWUDEYBI.mjs → chunk-YH33PZ3K.mjs} +1 -1
- package/dist/chunk-YQWRBBAA.mjs +284 -0
- package/dist/{chunk-QUYAGU65.mjs → chunk-YWDRWG4L.mjs} +1210 -753
- package/dist/{chunk-E46NXBNJ.mjs → chunk-ZD7JUTBY.mjs} +11 -6
- package/dist/{chunk-JDO346NV.mjs → chunk-ZLRWO5GK.mjs} +1 -1
- package/dist/{chunk-NAXKOTPP.cjs → chunk-ZRCGPSUM.cjs} +21 -21
- package/dist/{chunk-YCNHUIPR.cjs → chunk-ZZGANFQH.cjs} +10 -10
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-component.d-9J7CkTWW.d.ts → client-component.d-DYOwmq0c.d.ts} +80 -3
- package/dist/{client-component.d-ciHeCxr-.d.mts → client-component.d-edV76QvU.d.mts} +80 -3
- package/dist/{client-plugins.d-CUOhfapO.d.ts → client-plugins.d-BmJYW2FY.d.ts} +20 -7
- package/dist/{client-plugins.d-JnRz5a1o.d.mts → client-plugins.d-DwvqqGsU.d.mts} +20 -7
- package/dist/client-plugins.d.mts +5 -5
- package/dist/client-plugins.d.ts +5 -5
- package/dist/client.cjs +6 -5
- package/dist/client.d.mts +12 -12
- package/dist/client.d.ts +12 -12
- package/dist/client.mjs +5 -4
- package/dist/config.d.mts +5 -5
- package/dist/config.d.ts +5 -5
- package/dist/cron.cjs +6 -2
- package/dist/cron.d.mts +11 -2
- package/dist/cron.d.ts +11 -2
- package/dist/cron.mjs +7 -3
- package/dist/desktop.d.mts +6 -6
- package/dist/desktop.d.ts +6 -6
- package/dist/{devtools-7JPQMSTQ.mjs → devtools-WPX62NG2.mjs} +10 -9
- package/dist/{devtools-IZFUYWPG.cjs → devtools-YMDS7PUA.cjs} +12 -11
- package/dist/docs.cjs +14 -13
- package/dist/docs.d.mts +6 -6
- package/dist/docs.d.ts +6 -6
- package/dist/docs.mjs +13 -12
- package/dist/{endpoint.d-BkMSCRf6.d.mts → endpoint.d-BXbBpKoh.d.mts} +42 -1
- package/dist/{endpoint.d-BgHn0lhl.d.ts → endpoint.d-Dx_1k6Du.d.ts} +42 -1
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/headers.cjs +3 -3
- package/dist/{headers.d-CqpTL_fZ.d.ts → headers.d-BIbQyAxJ.d.ts} +1 -1
- package/dist/{headers.d-rbbTKGaN.d.mts → headers.d-BtNxFc2s.d.mts} +1 -1
- package/dist/headers.mjs +2 -2
- package/dist/index.cjs +73 -60
- package/dist/{index.d-CMKvzHLW.d.ts → index.d-CQ_wUzOV.d.ts} +1 -1
- package/dist/{index.d-D_B2D9Il.d.mts → index.d-CQdDRXd1.d.mts} +1 -1
- package/dist/index.d.mts +63 -29
- package/dist/index.d.ts +63 -29
- package/dist/index.mjs +69 -56
- package/dist/integrations/orm.d.mts +5 -5
- package/dist/integrations/orm.d.ts +5 -5
- package/dist/integrations.cjs +4 -4
- package/dist/integrations.d.mts +5 -5
- package/dist/integrations.d.ts +5 -5
- package/dist/integrations.mjs +3 -3
- package/dist/internal/app-markdown-runtime.cjs +7 -3
- package/dist/internal/app-markdown-runtime.d.mts +18 -7
- package/dist/internal/app-markdown-runtime.d.ts +18 -7
- package/dist/internal/app-markdown-runtime.mjs +6 -2
- package/dist/internal/build-runtime.cjs +42 -40
- package/dist/internal/build-runtime.d.mts +7 -7
- package/dist/internal/build-runtime.d.ts +7 -7
- package/dist/internal/build-runtime.mjs +41 -39
- package/dist/internal/cli-runtime.cjs +21 -20
- package/dist/internal/cli-runtime.mjs +20 -19
- package/dist/internal/client-error-overlay.cjs +6 -6
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +6 -2
- package/dist/internal/client-runtime.d.mts +22 -10
- package/dist/internal/client-runtime.d.ts +22 -10
- package/dist/internal/client-runtime.mjs +5 -1
- package/dist/internal/compression-runtime.d.mts +5 -5
- package/dist/internal/compression-runtime.d.ts +5 -5
- package/dist/internal/config-runtime.cjs +12 -11
- package/dist/internal/config-runtime.d.mts +7 -7
- package/dist/internal/config-runtime.d.ts +7 -7
- package/dist/internal/config-runtime.mjs +11 -10
- package/dist/internal/form-actions.cjs +5 -4
- package/dist/internal/form-actions.d.mts +2 -2
- package/dist/internal/form-actions.d.ts +2 -2
- package/dist/internal/form-actions.mjs +4 -3
- package/dist/internal/infra-analytics-runtime.cjs +10 -10
- package/dist/internal/infra-analytics-runtime.mjs +8 -8
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +32 -22
- package/dist/internal/production-runtime.d.mts +65 -14
- package/dist/internal/production-runtime.d.ts +65 -14
- package/dist/internal/production-runtime.mjs +31 -21
- package/dist/internal/react-cache.cjs +3 -3
- package/dist/internal/react-cache.mjs +1 -1
- package/dist/internal/vercel-edge-middleware.cjs +4 -4
- package/dist/internal/vercel-edge-middleware.mjs +3 -3
- package/dist/{lifecycle.d-keQs5Swc.d.mts → lifecycle.d-OtGWAvJT.d.mts} +4 -0
- package/dist/{lifecycle.d-keQs5Swc.d.ts → lifecycle.d-OtGWAvJT.d.ts} +4 -0
- package/dist/{manager-JIA66YJ2.mjs → manager-RHB2P35B.mjs} +4 -1
- package/dist/{manager-JOHU6BQI.cjs → manager-S77ZARTC.cjs} +5 -2
- package/dist/markdown.cjs +2 -2
- package/dist/markdown.d.mts +5 -5
- package/dist/markdown.d.ts +5 -5
- package/dist/markdown.mjs +1 -1
- package/dist/middleware.cjs +6 -6
- package/dist/middleware.d.mts +5 -5
- package/dist/middleware.d.ts +5 -5
- package/dist/middleware.mjs +5 -5
- package/dist/{mount.d-ImEO7q8a.d.mts → mount.d-6bhpBQQB.d.mts} +1 -1
- package/dist/{mount.d-B0XMxDRh.d.ts → mount.d-C-u7rFkM.d.ts} +1 -1
- package/dist/{native-server-fn-handler-EP5AFJYE.mjs → native-server-fn-handler-I66X4E5S.mjs} +6 -5
- package/dist/{native-server-fn-handler-QRTXGZA4.cjs → native-server-fn-handler-W4FSD76W.cjs} +7 -6
- package/dist/{native-tree-L2IIEBXH.mjs → native-tree-3X23BT3N.mjs} +2 -2
- package/dist/{native-tree-GF4BH33L.cjs → native-tree-TAPKR7QJ.cjs} +3 -3
- package/dist/{navigation-delegate.d-83Q7ksf7.d.mts → navigation-delegate.d-nx6gtsY4.d.mts} +1 -1
- package/dist/{navigation-delegate.d-RRx1CSlb.d.ts → navigation-delegate.d-xsG4T1x-.d.ts} +1 -1
- package/dist/navigation.cjs +4 -4
- package/dist/navigation.d.mts +8 -8
- package/dist/navigation.d.ts +8 -8
- package/dist/navigation.mjs +3 -3
- package/dist/{nitro-2LMOMIST.cjs → nitro-SSFTPZMW.cjs} +4 -4
- package/dist/{nitro-72TFIGGO.mjs → nitro-XTQ2HKDL.mjs} +1 -1
- package/dist/{observability.d-B2363jB6.d.ts → observability.d-DdJRiaIX.d.mts} +27 -3
- package/dist/{observability.d-B2363jB6.d.mts → observability.d-DdJRiaIX.d.ts} +27 -3
- package/dist/observability.d.mts +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/plugin.cjs +36 -33
- package/dist/plugin.d.mts +8 -8
- package/dist/plugin.d.ts +8 -8
- package/dist/plugin.mjs +35 -32
- package/dist/query/client.cjs +5 -5
- package/dist/query/client.mjs +1 -1
- package/dist/{render-plan.d-wP8nTeRV.d.mts → render-plan.d-B5y3h97B.d.mts} +1 -1
- package/dist/{render-plan.d-Ds2sXJ5m.d.ts → render-plan.d-gW0fwKz2.d.ts} +1 -1
- package/dist/renderer-client.cjs +4 -4
- package/dist/renderer-client.d.mts +8 -8
- package/dist/renderer-client.d.ts +8 -8
- package/dist/renderer-client.mjs +1 -1
- package/dist/request.cjs +2 -2
- package/dist/{request.d-zpSn6pu_.d.ts → request.d-B0ugAadD.d.ts} +9 -2
- package/dist/{request.d-F3h7K37m.d.mts → request.d-DLq33nYo.d.mts} +9 -2
- package/dist/request.d.mts +6 -6
- package/dist/request.d.ts +6 -6
- package/dist/request.mjs +1 -1
- package/dist/{route-rendering.d-Mw0ZKG2e.d.mts → route-rendering.d-DSeIV7yV.d.mts} +1 -1
- package/dist/{route-rendering.d-BL0_AdKj.d.ts → route-rendering.d-ytaqDQD6.d.ts} +1 -1
- package/dist/{route.d-DrXkpvcg.d.mts → route.d-Cd4Fi6BA.d.ts} +3 -1
- package/dist/{route.d-hs-_cyHn.d.ts → route.d-ShmtqqVQ.d.mts} +3 -1
- package/dist/{router.d-BwXigemZ.d.ts → router.d-BaEAEGPg.d.ts} +1 -1
- package/dist/{router.d-NGVsU11T.d.mts → router.d-Chd5cpe3.d.mts} +1 -1
- package/dist/routes.cjs +5 -3
- package/dist/routes.d.mts +5 -5
- package/dist/routes.d.ts +5 -5
- package/dist/routes.mjs +4 -2
- package/dist/{rsc-pipeline-DHYZLWSF.mjs → rsc-pipeline-DPMYONEV.mjs} +12 -11
- package/dist/{rsc-pipeline-BNXYMG4G.cjs → rsc-pipeline-XIUUMMG5.cjs} +13 -12
- package/dist/{runtime-IWOT6ZVC.cjs → runtime-WD77S3C5.cjs} +25 -25
- package/dist/{runtime-XPYKUNL3.mjs → runtime-XIUJZTZ3.mjs} +16 -16
- package/dist/{runtime.d-BA3MzhXz.d.mts → runtime.d-DpCs0eAO.d.mts} +3 -3
- package/dist/{runtime.d-OBIZWpx1.d.ts → runtime.d-h2USyQsz.d.ts} +3 -3
- package/dist/server-action-security.cjs +5 -3
- package/dist/server-action-security.d.mts +11 -3
- package/dist/server-action-security.d.ts +11 -3
- package/dist/server-action-security.mjs +4 -2
- package/dist/server-fn-client.d.mts +3 -3
- package/dist/server-fn-client.d.ts +3 -3
- package/dist/server-fn.cjs +6 -5
- package/dist/server-fn.d.mts +1 -1
- package/dist/server-fn.d.ts +1 -1
- package/dist/server-fn.mjs +5 -4
- package/dist/server-plugins.cjs +4 -4
- package/dist/server-plugins.d.mts +54 -10
- package/dist/server-plugins.d.ts +54 -10
- package/dist/server-plugins.mjs +3 -3
- package/dist/server-query-client.d.mts +1 -1
- package/dist/server-query-client.d.ts +1 -1
- package/dist/server-query.cjs +7 -6
- package/dist/server-query.d.mts +1 -1
- package/dist/server-query.d.ts +1 -1
- package/dist/server-query.mjs +6 -5
- package/dist/server.cjs +65 -68
- package/dist/server.d.mts +15 -15
- package/dist/server.d.ts +15 -15
- package/dist/server.mjs +44 -47
- package/dist/{spa-router.d-BG2XzE5p.d.mts → spa-router.d-DCQVtEaE.d.mts} +11 -5
- package/dist/{spa-router.d-DrYT944-.d.ts → spa-router.d-DpdJHs1q.d.ts} +11 -5
- package/dist/testing.cjs +16 -14
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.mjs +12 -10
- package/dist/theme/server.cjs +3 -3
- package/dist/theme/server.mjs +2 -2
- package/dist/{utils.d-C1k9BJeD.d.mts → utils.d-DKDZtAY5.d.mts} +1 -1
- package/dist/{utils.d-DcF4wxey.d.ts → utils.d-DmicwMvS.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +38 -33
- package/dist/vite.d.mts +24 -10
- package/dist/vite.d.ts +24 -10
- package/dist/vite.mjs +37 -32
- package/package.json +1 -1
- package/dist/analyzer-UJG4MIZW.cjs +0 -16
- package/dist/chunk-6I4BFRE7.cjs +0 -51
- package/dist/chunk-EIVGPQN5.mjs +0 -51
- package/dist/chunk-V3UOEWCB.cjs +0 -46
- package/dist/chunk-VE3FWJBO.mjs +0 -46
- /package/dist/{chunk-QEJWNXRI.cjs → chunk-EMRYJG4U.cjs} +0 -0
- /package/dist/{chunk-TXE4SAMV.mjs → chunk-H2ZJ35NW.mjs} +0 -0
|
@@ -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 _chunkENYBDM4Ucjs = require('./chunk-ENYBDM4U.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 _chunkACAEFEOHcjs = require('./chunk-ACAEFEOH.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunkAXVRUDMBcjs = require('./chunk-AXVRUDMB.cjs');
|
|
@@ -41,23 +41,24 @@ var _chunkAXVRUDMBcjs = require('./chunk-AXVRUDMB.cjs');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var _chunkC5AM2XDNcjs = require('./chunk-C5AM2XDN.cjs');
|
|
45
44
|
|
|
45
|
+
var _chunkO2A6HE76cjs = require('./chunk-O2A6HE76.cjs');
|
|
46
46
|
|
|
47
|
-
var _chunkFSSONJRVcjs = require('./chunk-FSSONJRV.cjs');
|
|
48
47
|
|
|
48
|
+
var _chunkDM2YGTRHcjs = require('./chunk-DM2YGTRH.cjs');
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var _chunkTP4RAV7Ycjs = require('./chunk-TP4RAV7Y.cjs');
|
|
56
55
|
|
|
56
|
+
var _chunkVKRMO3EZcjs = require('./chunk-VKRMO3EZ.cjs');
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
|
|
61
|
+
var _chunkHBLYSWIJcjs = require('./chunk-HBLYSWIJ.cjs');
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
|
|
@@ -83,14 +84,16 @@ var _chunkXGJVRPYLcjs = require('./chunk-XGJVRPYL.cjs');
|
|
|
83
84
|
|
|
84
85
|
|
|
85
86
|
|
|
86
|
-
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
var _chunkNXGQIXR7cjs = require('./chunk-NXGQIXR7.cjs');
|
|
87
90
|
|
|
88
91
|
|
|
89
92
|
var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
|
|
90
93
|
|
|
91
94
|
|
|
92
95
|
|
|
93
|
-
var
|
|
96
|
+
var _chunkRQ4UZJPRcjs = require('./chunk-RQ4UZJPR.cjs');
|
|
94
97
|
|
|
95
98
|
|
|
96
99
|
var _chunkSM2SYWARcjs = require('./chunk-SM2SYWAR.cjs');
|
|
@@ -110,7 +113,7 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
|
|
|
110
113
|
|
|
111
114
|
|
|
112
115
|
|
|
113
|
-
var
|
|
116
|
+
var _chunkF244KE2Dcjs = require('./chunk-F244KE2D.cjs');
|
|
114
117
|
|
|
115
118
|
|
|
116
119
|
|
|
@@ -120,7 +123,7 @@ var _chunkZUVAGMQ5cjs = require('./chunk-ZUVAGMQ5.cjs');
|
|
|
120
123
|
|
|
121
124
|
|
|
122
125
|
|
|
123
|
-
var
|
|
126
|
+
var _chunkMKQ27TGWcjs = require('./chunk-MKQ27TGW.cjs');
|
|
124
127
|
|
|
125
128
|
|
|
126
129
|
|
|
@@ -154,17 +157,17 @@ var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
|
|
|
154
157
|
var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
|
|
155
158
|
|
|
156
159
|
|
|
157
|
-
var
|
|
160
|
+
var _chunkEF5AP4CVcjs = require('./chunk-EF5AP4CV.cjs');
|
|
158
161
|
|
|
159
162
|
|
|
160
|
-
var
|
|
163
|
+
var _chunkLIQJYEQPcjs = require('./chunk-LIQJYEQP.cjs');
|
|
161
164
|
|
|
162
165
|
|
|
163
166
|
|
|
164
|
-
var
|
|
167
|
+
var _chunkIJFNXP3Dcjs = require('./chunk-IJFNXP3D.cjs');
|
|
165
168
|
|
|
166
169
|
|
|
167
|
-
var
|
|
170
|
+
var _chunkVZKCGHWCcjs = require('./chunk-VZKCGHWC.cjs');
|
|
168
171
|
|
|
169
172
|
|
|
170
173
|
|
|
@@ -177,7 +180,7 @@ var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
|
|
|
177
180
|
|
|
178
181
|
|
|
179
182
|
|
|
180
|
-
var
|
|
183
|
+
var _chunkPG6ZIHKEcjs = require('./chunk-PG6ZIHKE.cjs');
|
|
181
184
|
|
|
182
185
|
|
|
183
186
|
var _chunkFSODPZRTcjs = require('./chunk-FSODPZRT.cjs');
|
|
@@ -188,7 +191,7 @@ var _chunkWT6RAN2Icjs = require('./chunk-WT6RAN2I.cjs');
|
|
|
188
191
|
|
|
189
192
|
|
|
190
193
|
|
|
191
|
-
var
|
|
194
|
+
var _chunk65OS2TOTcjs = require('./chunk-65OS2TOT.cjs');
|
|
192
195
|
|
|
193
196
|
|
|
194
197
|
var _chunkJMYXO572cjs = require('./chunk-JMYXO572.cjs');
|
|
@@ -209,7 +212,7 @@ var _chunkYDXLC4DWcjs = require('./chunk-YDXLC4DW.cjs');
|
|
|
209
212
|
|
|
210
213
|
|
|
211
214
|
|
|
212
|
-
var
|
|
215
|
+
var _chunkEMRYJG4Ucjs = require('./chunk-EMRYJG4U.cjs');
|
|
213
216
|
|
|
214
217
|
|
|
215
218
|
|
|
@@ -238,7 +241,7 @@ var _chunkIUKBPBM7cjs = require('./chunk-IUKBPBM7.cjs');
|
|
|
238
241
|
|
|
239
242
|
|
|
240
243
|
|
|
241
|
-
var
|
|
244
|
+
var _chunk3OMLZLDEcjs = require('./chunk-3OMLZLDE.cjs');
|
|
242
245
|
|
|
243
246
|
|
|
244
247
|
var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
|
|
@@ -271,6 +274,7 @@ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
|
271
274
|
|
|
272
275
|
|
|
273
276
|
|
|
277
|
+
|
|
274
278
|
var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
|
|
275
279
|
|
|
276
280
|
|
|
@@ -285,7 +289,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
|
285
289
|
var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
286
290
|
|
|
287
291
|
|
|
288
|
-
var
|
|
292
|
+
var _chunkRSL3YFJGcjs = require('./chunk-RSL3YFJG.cjs');
|
|
289
293
|
|
|
290
294
|
|
|
291
295
|
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
@@ -336,7 +340,7 @@ var _chunkPWKAX5MScjs = require('./chunk-PWKAX5MS.cjs');
|
|
|
336
340
|
|
|
337
341
|
|
|
338
342
|
|
|
339
|
-
var
|
|
343
|
+
var _chunk4M5ESTJ2cjs = require('./chunk-4M5ESTJ2.cjs');
|
|
340
344
|
|
|
341
345
|
|
|
342
346
|
|
|
@@ -469,13 +473,16 @@ var RouteManager = class _RouteManager {
|
|
|
469
473
|
this.redirects = /* @__PURE__ */ new Map();
|
|
470
474
|
this.programmaticPages = /* @__PURE__ */ new Map();
|
|
471
475
|
this.programmaticLayouts = /* @__PURE__ */ new Map();
|
|
472
|
-
this.programmaticClientRoutes =
|
|
476
|
+
this.programmaticClientRoutes = _chunkNXGQIXR7cjs.mergeProgrammaticClientRoutes.call(void 0, []);
|
|
473
477
|
this.discovery = Promise.resolve();
|
|
474
478
|
this.reportedIslandsErrors = /* @__PURE__ */ new Set();
|
|
475
479
|
// Each route module's hydration plan from the last plan, with the source files it read, so a dev
|
|
476
480
|
// replan recomputes only the modules that read an edited file. Every replan used to read and
|
|
477
481
|
// walk every route's import graph again, seconds on a large app, before an edit could update.
|
|
478
482
|
this.ownerPlans = /* @__PURE__ */ new Map();
|
|
483
|
+
// Outside the dev server: the size and mtime each source file the last plan read had when it was
|
|
484
|
+
// read, so a production build can tell whether a route module's plan still holds.
|
|
485
|
+
this.planStamps = /* @__PURE__ */ new Map();
|
|
479
486
|
this.sourceChangeTracking = false;
|
|
480
487
|
this.linkedSources = /* @__PURE__ */ new Map();
|
|
481
488
|
// Source files edited since the last plan; null when the next plan must recompute every module.
|
|
@@ -526,7 +533,7 @@ var RouteManager = class _RouteManager {
|
|
|
526
533
|
await this.discoverFileRoutes(source);
|
|
527
534
|
await this.discoverProgrammaticRoutes(source, programmaticClientRoutes);
|
|
528
535
|
}
|
|
529
|
-
this.programmaticClientRoutes =
|
|
536
|
+
this.programmaticClientRoutes = _chunkNXGQIXR7cjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
|
|
530
537
|
for (const slot of this.routeSlots.values()) {
|
|
531
538
|
if (slot.interception && !this.pageRouteShapes.has(_chunkYTVSWXEZcjs.getRoutePatternShape.call(void 0, slot.pattern))) {
|
|
532
539
|
throw new (0, _chunkYTVSWXEZcjs.AmbiguousRouteError)(
|
|
@@ -545,8 +552,8 @@ var RouteManager = class _RouteManager {
|
|
|
545
552
|
)
|
|
546
553
|
);
|
|
547
554
|
this.orderedLayouts = Array.from(this.layouts.values()).sort(
|
|
548
|
-
(left, right) =>
|
|
549
|
-
).map((entry) => ({ entry, groupScope:
|
|
555
|
+
(left, right) => _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, left.pattern) - _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, right.pattern)
|
|
556
|
+
).map((entry) => ({ entry, groupScope: _chunkO2A6HE76cjs.getRouteGroupScope.call(void 0, entry.pattern) }));
|
|
550
557
|
for (const slot of this.routeSlots.values()) {
|
|
551
558
|
if (!this.routeSlotOwnerSegments.has(slot.ownerPattern)) {
|
|
552
559
|
this.routeSlotOwnerSegments.set(
|
|
@@ -795,11 +802,11 @@ var RouteManager = class _RouteManager {
|
|
|
795
802
|
return this.clientManifestCache.manifest;
|
|
796
803
|
}
|
|
797
804
|
const cacheFile = this.packageClientBoundaryCacheFile;
|
|
798
|
-
const compute = () =>
|
|
805
|
+
const compute = () => _chunkNXGQIXR7cjs.withFarmSourceSnapshot.call(void 0,
|
|
799
806
|
() => this.computeClientManifest(normalizedProjectRoot),
|
|
800
807
|
this.sourceSnapshot
|
|
801
808
|
);
|
|
802
|
-
return cacheFile ?
|
|
809
|
+
return cacheFile ? _chunkNXGQIXR7cjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
|
|
803
810
|
}
|
|
804
811
|
/**
|
|
805
812
|
* @internal The dev server reports every watched change (`noteSourceChange`), so a replan can
|
|
@@ -808,7 +815,26 @@ var RouteManager = class _RouteManager {
|
|
|
808
815
|
*/
|
|
809
816
|
trackSourceChanges() {
|
|
810
817
|
this.sourceChangeTracking = true;
|
|
811
|
-
_nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0,
|
|
818
|
+
_nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkNXGQIXR7cjs.FarmSourceSnapshotStore)())));
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* @internal A production build edits no source while it runs, so what the plan reads, parses and
|
|
822
|
+
* resolves as the app initializes stays valid for the build's later analyses of the same modules:
|
|
823
|
+
* the route tables' plans and the bundles' package import rewrites (takeBuildSourceSnapshot).
|
|
824
|
+
*/
|
|
825
|
+
keepBuildSourceSnapshot() {
|
|
826
|
+
if (this.sourceChangeTracking) return;
|
|
827
|
+
_nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkNXGQIXR7cjs.FarmSourceSnapshotStore)(false))));
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* @internal Hands the snapshot keepBuildSourceSnapshot kept to the build, which clears it once
|
|
831
|
+
* its bundles are written; later plans start without one. Undefined on the dev server.
|
|
832
|
+
*/
|
|
833
|
+
takeBuildSourceSnapshot() {
|
|
834
|
+
if (this.sourceChangeTracking) return void 0;
|
|
835
|
+
const store = this.sourceSnapshot;
|
|
836
|
+
this.sourceSnapshot = void 0;
|
|
837
|
+
return store;
|
|
812
838
|
}
|
|
813
839
|
/**
|
|
814
840
|
* @internal A watched file changed. An edit to a script narrows the next replan to the route
|
|
@@ -840,26 +866,55 @@ var RouteManager = class _RouteManager {
|
|
|
840
866
|
return false;
|
|
841
867
|
}
|
|
842
868
|
const previous = _optionalChain([this, 'access', _12 => _12.sourceSnapshot, 'optionalAccess', _13 => _13.peekSource, 'call', _14 => _14(path3.default.resolve(file))]);
|
|
843
|
-
return previous !== void 0 &&
|
|
869
|
+
return previous !== void 0 && _chunkNXGQIXR7cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous);
|
|
844
870
|
}
|
|
845
871
|
/**
|
|
846
872
|
* A route module's plan: the last one when it read none of `edited`, recomputed otherwise.
|
|
847
873
|
* Callers get a copy, since the route budget rewrites a plan's fields in place.
|
|
848
874
|
*/
|
|
849
|
-
planRouteModule(key, edited, compute) {
|
|
875
|
+
planRouteModule(key, edited, compute, planKey) {
|
|
850
876
|
const previous = this.ownerPlans.get(key);
|
|
851
877
|
if (previous && edited && ![...edited].some((file) => previous.files.has(file))) {
|
|
852
878
|
return { ...previous.plan };
|
|
853
879
|
}
|
|
854
|
-
const { result, files } =
|
|
880
|
+
const { result, files } = _chunkNXGQIXR7cjs.traceFarmSourceReads.call(void 0, compute);
|
|
855
881
|
const sources = /* @__PURE__ */ new Set();
|
|
856
882
|
for (const file of files) {
|
|
857
883
|
const source = this.planSourcePath(file);
|
|
858
884
|
if (source) sources.add(source);
|
|
859
885
|
}
|
|
860
|
-
this.
|
|
886
|
+
if (!this.sourceChangeTracking) {
|
|
887
|
+
for (const source of sources) {
|
|
888
|
+
if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkNXGQIXR7cjs.getFarmSourceStamp.call(void 0, source));
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
this.ownerPlans.set(key, { plan: result, files: sources, planKey });
|
|
861
892
|
return { ...result };
|
|
862
893
|
}
|
|
894
|
+
/**
|
|
895
|
+
* @internal The plans of the pages and layouts the last client manifest planned, by
|
|
896
|
+
* getClientModuleHydrationPlanKey, so a production build plans each route module once. A plan
|
|
897
|
+
* that read a source file changed since then is left out, as is every plan of the dev server,
|
|
898
|
+
* which replans after edits. Installed packages are not compared: they do not change during a
|
|
899
|
+
* build.
|
|
900
|
+
*/
|
|
901
|
+
getRouteModuleHydrationPlans() {
|
|
902
|
+
const plans = /* @__PURE__ */ new Map();
|
|
903
|
+
if (this.sourceChangeTracking || !this.clientManifestCache) return plans;
|
|
904
|
+
const unchanged = /* @__PURE__ */ new Map();
|
|
905
|
+
const isUnchanged = (file) => {
|
|
906
|
+
let result = unchanged.get(file);
|
|
907
|
+
if (result === void 0) {
|
|
908
|
+
result = this.planStamps.get(file) === _chunkNXGQIXR7cjs.getFarmSourceStamp.call(void 0, file);
|
|
909
|
+
unchanged.set(file, result);
|
|
910
|
+
}
|
|
911
|
+
return result;
|
|
912
|
+
};
|
|
913
|
+
for (const { plan, files, planKey } of this.ownerPlans.values()) {
|
|
914
|
+
if (planKey && [...files].every(isUnchanged)) plans.set(planKey, plan);
|
|
915
|
+
}
|
|
916
|
+
return plans;
|
|
917
|
+
}
|
|
863
918
|
/**
|
|
864
919
|
* The path the watcher reports for a file a plan read: itself, or the real path of a workspace
|
|
865
920
|
* package's source read through its `node_modules` link. Null for an installed package's file.
|
|
@@ -892,7 +947,7 @@ var RouteManager = class _RouteManager {
|
|
|
892
947
|
*/
|
|
893
948
|
inspectPackages(operation) {
|
|
894
949
|
const file = this.packageClientBoundaryCacheFile;
|
|
895
|
-
return file ?
|
|
950
|
+
return file ? _chunkNXGQIXR7cjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
|
|
896
951
|
}
|
|
897
952
|
computeClientManifest(normalizedProjectRoot) {
|
|
898
953
|
const toUrlPath = (absolutePath) => {
|
|
@@ -904,7 +959,7 @@ var RouteManager = class _RouteManager {
|
|
|
904
959
|
}
|
|
905
960
|
return absolutePath;
|
|
906
961
|
};
|
|
907
|
-
const integrationProviders =
|
|
962
|
+
const integrationProviders = _chunk65OS2TOTcjs.getIntegrationProviders.call(void 0, this.config.integrations).filter(
|
|
908
963
|
(provider) => provider.component || provider.type === "clerk"
|
|
909
964
|
);
|
|
910
965
|
const unsupportedIntegrationProvider = integrationProviders.find(
|
|
@@ -915,14 +970,14 @@ var RouteManager = class _RouteManager {
|
|
|
915
970
|
`[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
|
|
916
971
|
);
|
|
917
972
|
}
|
|
918
|
-
const isolatedMode =
|
|
973
|
+
const isolatedMode = _chunkNXGQIXR7cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
919
974
|
_optionalChain([this, 'access', _21 => _21.config, 'access', _22 => _22.experimental, 'optionalAccess', _23 => _23.isolatedClientHydration]),
|
|
920
975
|
{
|
|
921
976
|
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _24 => _24.config, 'access', _25 => _25.experimental, 'optionalAccess', _26 => _26.serverComponents])) === "rsc",
|
|
922
977
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
923
978
|
}
|
|
924
979
|
);
|
|
925
|
-
const planOptions =
|
|
980
|
+
const planOptions = _chunkNXGQIXR7cjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
926
981
|
this.config.renderer,
|
|
927
982
|
Boolean(unsupportedIntegrationProvider)
|
|
928
983
|
);
|
|
@@ -932,26 +987,36 @@ var RouteManager = class _RouteManager {
|
|
|
932
987
|
if (this.sourceChangeTracking && this.editedSources && this.ownerPlans.size > 0) {
|
|
933
988
|
edited = /* @__PURE__ */ new Set();
|
|
934
989
|
for (const [file, previous] of _nullishCoalesce(changed, () => ( []))) {
|
|
935
|
-
if (
|
|
990
|
+
if (_chunkNXGQIXR7cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous)) continue;
|
|
936
991
|
const source = this.planSourcePath(file);
|
|
937
992
|
if (source) edited.add(source);
|
|
938
993
|
}
|
|
939
994
|
}
|
|
940
|
-
if (!edited)
|
|
995
|
+
if (!edited) {
|
|
996
|
+
this.ownerPlans.clear();
|
|
997
|
+
this.planStamps.clear();
|
|
998
|
+
}
|
|
999
|
+
const layoutPlanOptions = islandsMode ? { ...planOptions, serverTreeLayouts: true } : planOptions;
|
|
941
1000
|
const layoutEntries = Array.from(this.layouts.values()).map((entry) => ({
|
|
942
1001
|
entry,
|
|
943
1002
|
metadata: this.planRouteModule(
|
|
944
1003
|
`layout:${entry.modulePath}`,
|
|
945
1004
|
edited,
|
|
946
|
-
() =>
|
|
1005
|
+
() => _chunkNXGQIXR7cjs.getClientModuleHydrationPlan.call(void 0,
|
|
1006
|
+
entry.modulePath,
|
|
1007
|
+
normalizedProjectRoot,
|
|
1008
|
+
isolatedMode,
|
|
1009
|
+
layoutPlanOptions
|
|
1010
|
+
),
|
|
1011
|
+
_chunkNXGQIXR7cjs.getClientModuleHydrationPlanKey.call(void 0,
|
|
947
1012
|
entry.modulePath,
|
|
948
1013
|
normalizedProjectRoot,
|
|
949
1014
|
isolatedMode,
|
|
950
|
-
|
|
1015
|
+
layoutPlanOptions
|
|
951
1016
|
)
|
|
952
1017
|
)
|
|
953
1018
|
}));
|
|
954
|
-
const markdownComponentsPlan =
|
|
1019
|
+
const markdownComponentsPlan = _chunkNXGQIXR7cjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
955
1020
|
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx), normalizedProjectRoot),
|
|
956
1021
|
normalizedProjectRoot,
|
|
957
1022
|
isolatedMode,
|
|
@@ -961,51 +1026,60 @@ var RouteManager = class _RouteManager {
|
|
|
961
1026
|
const markdownPagePlan = () => ({
|
|
962
1027
|
..._nullishCoalesce(markdownPlan, () => ( (markdownPlan = this.planRouteModule("markdown", edited, markdownComponentsPlan))))
|
|
963
1028
|
});
|
|
1029
|
+
const pagePlanOptions = { ...planOptions, serverOwners: islandsMode };
|
|
964
1030
|
const routeEntries = Array.from(this.routes.values()).map((entry) => ({
|
|
965
1031
|
entry,
|
|
966
|
-
metadata:
|
|
1032
|
+
metadata: _chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : this.planRouteModule(
|
|
967
1033
|
`page:${entry.modulePath}`,
|
|
968
1034
|
edited,
|
|
969
|
-
() =>
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1035
|
+
() => _chunkNXGQIXR7cjs.getClientModuleHydrationPlan.call(void 0,
|
|
1036
|
+
entry.modulePath,
|
|
1037
|
+
normalizedProjectRoot,
|
|
1038
|
+
isolatedMode,
|
|
1039
|
+
pagePlanOptions
|
|
1040
|
+
),
|
|
1041
|
+
_chunkNXGQIXR7cjs.getClientModuleHydrationPlanKey.call(void 0,
|
|
1042
|
+
entry.modulePath,
|
|
1043
|
+
normalizedProjectRoot,
|
|
1044
|
+
isolatedMode,
|
|
1045
|
+
pagePlanOptions
|
|
1046
|
+
)
|
|
973
1047
|
)
|
|
974
1048
|
}));
|
|
975
1049
|
const markdownFallback = routeEntries.find(
|
|
976
|
-
({ entry, metadata }) =>
|
|
1050
|
+
({ entry, metadata }) => _chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
|
|
977
1051
|
);
|
|
978
1052
|
if (markdownFallback) {
|
|
979
1053
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
980
1054
|
`[Farm.js] client components in Markdown pages stay static: ${markdownFallback.metadata.fallbackReason}.`
|
|
981
1055
|
);
|
|
982
1056
|
}
|
|
983
|
-
const markdownStaticPackages = _optionalChain([routeEntries, 'access',
|
|
984
|
-
({ entry, metadata }) =>
|
|
985
|
-
), 'optionalAccess',
|
|
1057
|
+
const markdownStaticPackages = _optionalChain([routeEntries, 'access', _33 => _33.find, 'call', _34 => _34(
|
|
1058
|
+
({ entry, metadata }) => _chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
|
|
1059
|
+
), 'optionalAccess', _35 => _35.metadata, 'access', _36 => _36.staticPackageBoundaries]);
|
|
986
1060
|
if (markdownStaticPackages) {
|
|
987
1061
|
_chunkQMNWKQL4cjs.logger.info(
|
|
988
1062
|
`[Farm.js] Markdown pages render client components from ${markdownStaticPackages.join(", ")} as static HTML: package client components cannot be isolated yet.`
|
|
989
1063
|
);
|
|
990
1064
|
}
|
|
991
1065
|
for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
|
|
992
|
-
if (
|
|
1066
|
+
if (_chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
|
|
993
1067
|
_chunkQMNWKQL4cjs.logger.info(
|
|
994
1068
|
`[Farm.js] ${entry.pattern} renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
|
|
995
1069
|
);
|
|
996
1070
|
}
|
|
997
|
-
|
|
1071
|
+
_chunkNXGQIXR7cjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
998
1072
|
layoutEntries.map(({ entry, metadata }) => ({
|
|
999
1073
|
pattern: entry.pattern,
|
|
1000
|
-
depth:
|
|
1074
|
+
depth: _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
|
|
1001
1075
|
metadata
|
|
1002
1076
|
})),
|
|
1003
1077
|
routeEntries.map(({ entry, metadata }) => ({
|
|
1004
1078
|
pattern: getRouteEntryDirectory(entry),
|
|
1005
|
-
depth:
|
|
1079
|
+
depth: _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, getRouteEntryDirectory(entry)),
|
|
1006
1080
|
metadata
|
|
1007
1081
|
})),
|
|
1008
|
-
|
|
1082
|
+
_chunkO2A6HE76cjs.routeBoundaryCoversDirectory,
|
|
1009
1083
|
{ serverOwners: islandsMode }
|
|
1010
1084
|
);
|
|
1011
1085
|
for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
|
|
@@ -1025,7 +1099,7 @@ var RouteManager = class _RouteManager {
|
|
|
1025
1099
|
const routes = routeEntries.map(({ entry, metadata }) => {
|
|
1026
1100
|
const programmaticPage = this.programmaticPages.get(entry.modulePath);
|
|
1027
1101
|
const layoutShouldHydrate = layoutEntries.some(
|
|
1028
|
-
({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate &&
|
|
1102
|
+
({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate && _chunkO2A6HE76cjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, getRouteEntryDirectory(entry))
|
|
1029
1103
|
);
|
|
1030
1104
|
return {
|
|
1031
1105
|
pattern: entry.pattern,
|
|
@@ -1041,15 +1115,15 @@ var RouteManager = class _RouteManager {
|
|
|
1041
1115
|
modulePath: toUrlPath(boundary.modulePath)
|
|
1042
1116
|
}))
|
|
1043
1117
|
} : {},
|
|
1044
|
-
...
|
|
1045
|
-
renderPlan:
|
|
1118
|
+
..._chunkNXGQIXR7cjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
|
|
1119
|
+
renderPlan: _chunkO2A6HE76cjs.createFarmRouteRenderPlan.call(void 0, {
|
|
1046
1120
|
pageShouldHydrate: metadata.shouldHydrate,
|
|
1047
1121
|
layoutShouldHydrate,
|
|
1048
1122
|
islandStrategy: metadata.islandStrategy
|
|
1049
1123
|
}),
|
|
1050
1124
|
suppressedAsyncHydration: metadata.suppressedAsyncHydration,
|
|
1051
1125
|
...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {},
|
|
1052
|
-
search: _chunkE7QOEV5Zcjs.getProgrammaticRouteSearchClientOptions.call(void 0, _optionalChain([programmaticPage, 'optionalAccess',
|
|
1126
|
+
search: _chunkE7QOEV5Zcjs.getProgrammaticRouteSearchClientOptions.call(void 0, _optionalChain([programmaticPage, 'optionalAccess', _37 => _37.search])),
|
|
1053
1127
|
segments: entry.route.segments.map((seg) => ({
|
|
1054
1128
|
segment: seg.segment,
|
|
1055
1129
|
isDynamic: seg.isDynamic,
|
|
@@ -1058,7 +1132,7 @@ var RouteManager = class _RouteManager {
|
|
|
1058
1132
|
}))
|
|
1059
1133
|
};
|
|
1060
1134
|
});
|
|
1061
|
-
const treeLayoutPatterns = islandsMode ?
|
|
1135
|
+
const treeLayoutPatterns = islandsMode ? _chunkO2A6HE76cjs.getFarmServerTreeLayoutPatterns.call(void 0,
|
|
1062
1136
|
layoutEntries.map(({ entry, metadata }) => ({
|
|
1063
1137
|
pattern: entry.pattern,
|
|
1064
1138
|
shouldHydrate: metadata.shouldHydrate,
|
|
@@ -1083,7 +1157,7 @@ var RouteManager = class _RouteManager {
|
|
|
1083
1157
|
...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {}
|
|
1084
1158
|
}));
|
|
1085
1159
|
const slots = Array.from(this.routeSlots.values()).map((entry) => {
|
|
1086
|
-
const metadata =
|
|
1160
|
+
const metadata = _chunkNXGQIXR7cjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
|
|
1087
1161
|
return {
|
|
1088
1162
|
name: entry.name,
|
|
1089
1163
|
ownerPattern: entry.ownerPattern,
|
|
@@ -1099,7 +1173,7 @@ var RouteManager = class _RouteManager {
|
|
|
1099
1173
|
};
|
|
1100
1174
|
});
|
|
1101
1175
|
const slotPlans = islandsMode ? Array.from(this.routeSlots.values()).map((entry) => ({
|
|
1102
|
-
metadata:
|
|
1176
|
+
metadata: _chunkNXGQIXR7cjs.getClientModuleHydrationPlan.call(void 0,
|
|
1103
1177
|
entry.modulePath,
|
|
1104
1178
|
normalizedProjectRoot,
|
|
1105
1179
|
isolatedMode,
|
|
@@ -1164,7 +1238,7 @@ var RouteManager = class _RouteManager {
|
|
|
1164
1238
|
getIsolatedClientBoundaryModules(projectRoot = this.config.root) {
|
|
1165
1239
|
const normalizedProjectRoot = path3.default.resolve(projectRoot);
|
|
1166
1240
|
this.generateClientManifest(normalizedProjectRoot);
|
|
1167
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
1241
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _38 => _38.clientManifestCache, 'optionalAccess', _39 => _39.isolatedClientBoundaryModules]), () => ( /* @__PURE__ */ new Set()));
|
|
1168
1242
|
}
|
|
1169
1243
|
/**
|
|
1170
1244
|
* @internal Islands-mode pages with a client component that cannot become an island. Hydrating
|
|
@@ -1172,7 +1246,7 @@ var RouteManager = class _RouteManager {
|
|
|
1172
1246
|
*/
|
|
1173
1247
|
getIslandsErrors(projectRoot = this.config.root) {
|
|
1174
1248
|
this.generateClientManifest(path3.default.resolve(projectRoot));
|
|
1175
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
1249
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _40 => _40.clientManifestCache, 'optionalAccess', _41 => _41.islandsErrors]), () => ( []));
|
|
1176
1250
|
}
|
|
1177
1251
|
/**
|
|
1178
1252
|
* Invalidate build-time route metadata after a page or layout changes in dev.
|
|
@@ -1191,12 +1265,12 @@ var RouteManager = class _RouteManager {
|
|
|
1191
1265
|
const { createRouteModuleFromProgrammaticPage } = await import("./routes.cjs");
|
|
1192
1266
|
return createRouteModuleFromProgrammaticPage(programmaticPage, this.rendererRuntime);
|
|
1193
1267
|
}
|
|
1194
|
-
if (
|
|
1268
|
+
if (_chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
|
|
1195
1269
|
const mdxConfig = _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx);
|
|
1196
1270
|
const viteServer = this.viteServer;
|
|
1197
|
-
return await
|
|
1271
|
+
return await _chunkIJFNXP3Dcjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
|
|
1198
1272
|
// Loaded on render: the route runtime manifest only reads metadata and rendering config.
|
|
1199
|
-
components: () =>
|
|
1273
|
+
components: () => _chunkIJFNXP3Dcjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
|
|
1200
1274
|
root: this.config.root,
|
|
1201
1275
|
loadModule: viteServer ? (componentModulePath) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, viteServer, componentModulePath) : void 0
|
|
1202
1276
|
}),
|
|
@@ -1248,7 +1322,7 @@ var RouteManager = class _RouteManager {
|
|
|
1248
1322
|
*/
|
|
1249
1323
|
createRoutePattern(route) {
|
|
1250
1324
|
if (route.segments.length === 0) return "/";
|
|
1251
|
-
return "/" + route.segments.map(
|
|
1325
|
+
return "/" + route.segments.map(_chunkO2A6HE76cjs.formatRouteSegment).join("/");
|
|
1252
1326
|
}
|
|
1253
1327
|
registerPageRoute(entry) {
|
|
1254
1328
|
_chunkYTVSWXEZcjs.assertUniqueRouteParameters.call(void 0, entry.pattern);
|
|
@@ -1299,8 +1373,8 @@ var RouteManager = class _RouteManager {
|
|
|
1299
1373
|
}
|
|
1300
1374
|
}
|
|
1301
1375
|
for (const [pattern, group] of canonicalPageGroups) {
|
|
1302
|
-
const componentFiles = group.files.filter((file) => !
|
|
1303
|
-
const markdownFiles = group.files.filter(
|
|
1376
|
+
const componentFiles = group.files.filter((file) => !_chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, file));
|
|
1377
|
+
const markdownFiles = group.files.filter(_chunkVZKCGHWCcjs.isFarmMarkdownPageFile);
|
|
1304
1378
|
if (componentFiles.length > 1) {
|
|
1305
1379
|
throw new Error(
|
|
1306
1380
|
`Duplicate page route "${pattern}". Found ${componentFiles.map((file) => path3.default.join(appDir, file)).join(" and ")}.`
|
|
@@ -1317,7 +1391,7 @@ var RouteManager = class _RouteManager {
|
|
|
1317
1391
|
if (!primaryFile) continue;
|
|
1318
1392
|
const modulePath = path3.default.join(appDir, primaryFile);
|
|
1319
1393
|
const existing = this.routes.get(pattern);
|
|
1320
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
1394
|
+
if (_optionalChain([existing, 'optionalAccess', _42 => _42.sourceRoot]) === source.root) {
|
|
1321
1395
|
throw new Error(
|
|
1322
1396
|
`Duplicate page route "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
|
|
1323
1397
|
);
|
|
@@ -1342,9 +1416,9 @@ var RouteManager = class _RouteManager {
|
|
|
1342
1416
|
for (const file of files) {
|
|
1343
1417
|
const route = _chunkQMNWKQL4cjs.parseRoutePath.call(void 0, file);
|
|
1344
1418
|
const modulePath = path3.default.join(appDir, file);
|
|
1345
|
-
const pattern =
|
|
1419
|
+
const pattern = _chunkO2A6HE76cjs.createRouteDirectoryPattern.call(void 0, route);
|
|
1346
1420
|
const existing = target.get(pattern);
|
|
1347
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
1421
|
+
if (_optionalChain([existing, 'optionalAccess', _43 => _43.sourceRoot]) === source.root) {
|
|
1348
1422
|
throw new Error(
|
|
1349
1423
|
`Duplicate ${kind} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
|
|
1350
1424
|
);
|
|
@@ -1364,10 +1438,10 @@ var RouteManager = class _RouteManager {
|
|
|
1364
1438
|
const modulePath = path3.default.join(appDir, file);
|
|
1365
1439
|
const pattern = this.createRoutePattern(slot.route);
|
|
1366
1440
|
const ownerPattern = this.createRoutePattern(slot.ownerRoute);
|
|
1367
|
-
const ownerDirectory =
|
|
1441
|
+
const ownerDirectory = _chunkO2A6HE76cjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
|
|
1368
1442
|
const key = `${ownerPattern}:${slot.name}:${slot.interception ? "intercept" : "slot"}:${slot.fallback ? "default" : pattern}`;
|
|
1369
1443
|
const existing = this.routeSlots.get(key);
|
|
1370
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
1444
|
+
if (_optionalChain([existing, 'optionalAccess', _44 => _44.sourceRoot]) === source.root) {
|
|
1371
1445
|
throw new Error(
|
|
1372
1446
|
`Duplicate route slot "${slot.name}" for "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
|
|
1373
1447
|
);
|
|
@@ -1396,7 +1470,7 @@ var RouteManager = class _RouteManager {
|
|
|
1396
1470
|
const key = `${kind}:${pattern}`;
|
|
1397
1471
|
const existing = this.metadataImages.get(key);
|
|
1398
1472
|
const sourceType = isStaticMetadataImageFile(file) ? "static" : "module";
|
|
1399
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
1473
|
+
if (_optionalChain([existing, 'optionalAccess', _45 => _45.sourceRoot]) === source.root) {
|
|
1400
1474
|
throw new Error(
|
|
1401
1475
|
`Duplicate ${fileName} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}. Keep only one static image or module per route segment.`
|
|
1402
1476
|
);
|
|
@@ -1424,7 +1498,7 @@ var RouteManager = class _RouteManager {
|
|
|
1424
1498
|
const pattern = this.createRoutePattern(route);
|
|
1425
1499
|
const key = `${descriptor.kind}:${pattern}`;
|
|
1426
1500
|
const existing = this.metadataRoutes.get(key);
|
|
1427
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
1501
|
+
if (_optionalChain([existing, 'optionalAccess', _46 => _46.sourceRoot]) === source.root) {
|
|
1428
1502
|
throw new Error(
|
|
1429
1503
|
`Duplicate ${descriptor.fileName} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}. Keep only one .ts or .js metadata route per segment.`
|
|
1430
1504
|
);
|
|
@@ -1441,16 +1515,16 @@ var RouteManager = class _RouteManager {
|
|
|
1441
1515
|
}
|
|
1442
1516
|
async discoverProgrammaticRoutes(source, clientRoutes) {
|
|
1443
1517
|
if (this.viteServer) _chunkE7QOEV5Zcjs.trackProgrammaticRouteSources.call(void 0, );
|
|
1444
|
-
const manifests = await
|
|
1518
|
+
const manifests = await _chunkEMRYJG4Ucjs.loadProgrammaticRouteManifests.call(void 0, {
|
|
1445
1519
|
root: source.root,
|
|
1446
1520
|
srcDir: source.srcDir,
|
|
1447
1521
|
loadModule: (filePath) => this.loadProgrammaticRoutesModule(filePath)
|
|
1448
1522
|
});
|
|
1449
|
-
const graph = this.viteServer ?
|
|
1523
|
+
const graph = this.viteServer ? _chunkNXGQIXR7cjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
|
|
1450
1524
|
for (const { filePath, manifest } of manifests) {
|
|
1451
1525
|
if (graph) {
|
|
1452
1526
|
clientRoutes.push(
|
|
1453
|
-
|
|
1527
|
+
_chunkNXGQIXR7cjs.resolveProgrammaticClientRoutes.call(void 0, {
|
|
1454
1528
|
graph,
|
|
1455
1529
|
routesFile: toRealPath(filePath),
|
|
1456
1530
|
routes: manifest.routes,
|
|
@@ -1463,7 +1537,7 @@ var RouteManager = class _RouteManager {
|
|
|
1463
1537
|
const route = _chunkE7QOEV5Zcjs.parseProgrammaticRoutePath.call(void 0, definition.path, "page");
|
|
1464
1538
|
const pattern = this.createRoutePattern(route);
|
|
1465
1539
|
const existing = this.routes.get(pattern);
|
|
1466
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
1540
|
+
if (_optionalChain([existing, 'optionalAccess', _47 => _47.sourceRoot]) === source.root) {
|
|
1467
1541
|
throw new Error(
|
|
1468
1542
|
`Duplicate page route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
|
|
1469
1543
|
);
|
|
@@ -1481,9 +1555,9 @@ var RouteManager = class _RouteManager {
|
|
|
1481
1555
|
}
|
|
1482
1556
|
if (definition.kind === "layout") {
|
|
1483
1557
|
const route = _chunkE7QOEV5Zcjs.parseProgrammaticRoutePath.call(void 0, definition.path, "layout");
|
|
1484
|
-
const pattern =
|
|
1558
|
+
const pattern = _chunkO2A6HE76cjs.createRouteDirectoryPattern.call(void 0, route);
|
|
1485
1559
|
const existing = this.layouts.get(pattern);
|
|
1486
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
1560
|
+
if (_optionalChain([existing, 'optionalAccess', _48 => _48.sourceRoot]) === source.root) {
|
|
1487
1561
|
throw new Error(
|
|
1488
1562
|
`Duplicate layout route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
|
|
1489
1563
|
);
|
|
@@ -1512,7 +1586,7 @@ var RouteManager = class _RouteManager {
|
|
|
1512
1586
|
}
|
|
1513
1587
|
async loadProgrammaticRoutesModule(filePath) {
|
|
1514
1588
|
if (this.viteServer) {
|
|
1515
|
-
const viteRoot = _optionalChain([this, 'access',
|
|
1589
|
+
const viteRoot = _optionalChain([this, 'access', _49 => _49.viteServer, 'access', _50 => _50.config, 'optionalAccess', _51 => _51.root]) || this.config.root || process.cwd();
|
|
1516
1590
|
return await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, this.viteServer, _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, filePath, viteRoot));
|
|
1517
1591
|
}
|
|
1518
1592
|
return await import(
|
|
@@ -1528,7 +1602,7 @@ var RouteManager = class _RouteManager {
|
|
|
1528
1602
|
const matchingLayouts = [];
|
|
1529
1603
|
for (const { entry, groupScope } of this.orderedLayouts) {
|
|
1530
1604
|
if (!_chunkQMNWKQL4cjs.matchRoutePrefixParts.call(void 0, pathnameParts, entry.route.segments)) continue;
|
|
1531
|
-
if (groupScope !== null && !
|
|
1605
|
+
if (groupScope !== null && !_chunkO2A6HE76cjs.isInRouteGroupScope.call(void 0, route && getRouteEntryDirectory(route), groupScope)) {
|
|
1532
1606
|
continue;
|
|
1533
1607
|
}
|
|
1534
1608
|
matchingLayouts.push(entry);
|
|
@@ -1609,14 +1683,14 @@ var RouteManager = class _RouteManager {
|
|
|
1609
1683
|
let page = route;
|
|
1610
1684
|
for (const boundaryEntry of boundaries.values()) {
|
|
1611
1685
|
if (!_chunkQMNWKQL4cjs.matchRoutePrefix.call(void 0, normalizedPath, boundaryEntry.route.segments)) continue;
|
|
1612
|
-
const groupScope =
|
|
1686
|
+
const groupScope = _chunkO2A6HE76cjs.getRouteGroupScope.call(void 0, boundaryEntry.pattern);
|
|
1613
1687
|
if (groupScope !== null) {
|
|
1614
1688
|
if (page === void 0) page = this.matchPageRoute(_chunkQMNWKQL4cjs.splitRoutePath.call(void 0, normalizedPath));
|
|
1615
|
-
if (!
|
|
1689
|
+
if (!_chunkO2A6HE76cjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
|
|
1616
1690
|
}
|
|
1617
1691
|
const depth = boundaryEntry.route.segments.length;
|
|
1618
|
-
const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess',
|
|
1619
|
-
if (!bestMatch || depth > bestDepth || depth === bestDepth &&
|
|
1692
|
+
const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _52 => _52.route, 'access', _53 => _53.segments, 'access', _54 => _54.length]), () => ( -1));
|
|
1693
|
+
if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
|
|
1620
1694
|
bestMatch = boundaryEntry;
|
|
1621
1695
|
}
|
|
1622
1696
|
}
|
|
@@ -1666,7 +1740,7 @@ var RouteManager = class _RouteManager {
|
|
|
1666
1740
|
}));
|
|
1667
1741
|
const i18n = this.getI18nConfig();
|
|
1668
1742
|
const docsAdapterRoutes = this.getDocsAdapterRoutes();
|
|
1669
|
-
const result = await
|
|
1743
|
+
const result = await _chunkACAEFEOHcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
|
|
1670
1744
|
suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n),
|
|
1671
1745
|
...docsAdapterRoutes ? { docsAdapterRoutes } : {}
|
|
1672
1746
|
});
|
|
@@ -1713,7 +1787,7 @@ var RouteManager = class _RouteManager {
|
|
|
1713
1787
|
async isRouteSSG(modulePath) {
|
|
1714
1788
|
try {
|
|
1715
1789
|
const mod = await this.loadRouteModule(modulePath);
|
|
1716
|
-
const rendering = await
|
|
1790
|
+
const rendering = await _chunkACAEFEOHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
1717
1791
|
return rendering.ssg;
|
|
1718
1792
|
} catch (e2) {
|
|
1719
1793
|
return false;
|
|
@@ -1725,7 +1799,7 @@ var RouteManager = class _RouteManager {
|
|
|
1725
1799
|
async hasRouteISR(modulePath) {
|
|
1726
1800
|
try {
|
|
1727
1801
|
const mod = await this.loadRouteModule(modulePath);
|
|
1728
|
-
const rendering = await
|
|
1802
|
+
const rendering = await _chunkACAEFEOHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
1729
1803
|
return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
|
|
1730
1804
|
} catch (e3) {
|
|
1731
1805
|
return false;
|
|
@@ -1737,7 +1811,7 @@ var RouteManager = class _RouteManager {
|
|
|
1737
1811
|
async getRouteRevalidateInterval(modulePath) {
|
|
1738
1812
|
try {
|
|
1739
1813
|
const mod = await this.loadRouteModule(modulePath);
|
|
1740
|
-
const rendering = await
|
|
1814
|
+
const rendering = await _chunkACAEFEOHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
1741
1815
|
return rendering.revalidate;
|
|
1742
1816
|
} catch (e4) {
|
|
1743
1817
|
return void 0;
|
|
@@ -1745,7 +1819,7 @@ var RouteManager = class _RouteManager {
|
|
|
1745
1819
|
}
|
|
1746
1820
|
};
|
|
1747
1821
|
function getPageDirectoryField(route, pattern) {
|
|
1748
|
-
const directory =
|
|
1822
|
+
const directory = _chunkO2A6HE76cjs.createRouteDirectoryPattern.call(void 0, route);
|
|
1749
1823
|
return directory === pattern ? {} : { directory };
|
|
1750
1824
|
}
|
|
1751
1825
|
function interpolateRedirectDestination(destination, params, catchAllSegments = {}) {
|
|
@@ -1837,6 +1911,58 @@ function toRealPath(filePath) {
|
|
|
1837
1911
|
}
|
|
1838
1912
|
}
|
|
1839
1913
|
|
|
1914
|
+
// src/server/dev-client-manifest.ts
|
|
1915
|
+
var FARM_DEV_CLIENT_MANIFEST_MODULE = "/@farm/manifest";
|
|
1916
|
+
function createFarmDevClientManifest(manifest, options) {
|
|
1917
|
+
const { boot } = options;
|
|
1918
|
+
const layoutPatterns = boot ? new Set(boot.layoutPatterns) : void 0;
|
|
1919
|
+
const owners = boot ? /* @__PURE__ */ new Set([...boot.routePattern ? [boot.routePattern] : [], ...boot.layoutPatterns]) : void 0;
|
|
1920
|
+
const clientManifest = {
|
|
1921
|
+
clientEntry: "/@farm/client.js",
|
|
1922
|
+
routes: {},
|
|
1923
|
+
layouts: {},
|
|
1924
|
+
slots: [],
|
|
1925
|
+
sharedAssets: options.sharedAssets,
|
|
1926
|
+
...boot ? { module: FARM_DEV_CLIENT_MANIFEST_MODULE } : {}
|
|
1927
|
+
};
|
|
1928
|
+
for (const route of manifest.routes) {
|
|
1929
|
+
if (boot && route.pattern !== boot.routePattern && !route.search) continue;
|
|
1930
|
+
clientManifest.routes[route.pattern] = {
|
|
1931
|
+
modulePath: route.modulePath,
|
|
1932
|
+
pattern: route.pattern,
|
|
1933
|
+
...route.directory ? { directory: route.directory } : {},
|
|
1934
|
+
segments: route.segments,
|
|
1935
|
+
search: route.search,
|
|
1936
|
+
isClientComponent: route.isClientComponent,
|
|
1937
|
+
shouldHydrate: route.shouldHydrate,
|
|
1938
|
+
islandStrategy: route.islandStrategy,
|
|
1939
|
+
renderPlan: route.renderPlan,
|
|
1940
|
+
preloads: [route.modulePath],
|
|
1941
|
+
assets: []
|
|
1942
|
+
};
|
|
1943
|
+
}
|
|
1944
|
+
for (const layout of manifest.layouts) {
|
|
1945
|
+
if (layoutPatterns && !layoutPatterns.has(layout.pattern)) continue;
|
|
1946
|
+
const groupScope = _chunkO2A6HE76cjs.getRouteGroupScope.call(void 0, layout.pattern);
|
|
1947
|
+
clientManifest.layouts[layout.pattern] = {
|
|
1948
|
+
modulePath: layout.modulePath,
|
|
1949
|
+
pattern: layout.pattern,
|
|
1950
|
+
...groupScope ? { urlPattern: _chunkO2A6HE76cjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
|
|
1951
|
+
shouldHydrate: layout.shouldHydrate,
|
|
1952
|
+
islandStrategy: layout.islandStrategy,
|
|
1953
|
+
// Islands mode: rebuilt from its server tree, so its module is never preloaded.
|
|
1954
|
+
...layout.serverTree ? { serverTree: true } : {},
|
|
1955
|
+
preloads: layout.serverTree ? [] : [layout.modulePath],
|
|
1956
|
+
assets: []
|
|
1957
|
+
};
|
|
1958
|
+
}
|
|
1959
|
+
for (const slot of _nullishCoalesce(manifest.slots, () => ( []))) {
|
|
1960
|
+
if (owners && !owners.has(slot.ownerPattern)) continue;
|
|
1961
|
+
clientManifest.slots.push({ ...slot, preloads: [slot.modulePath], assets: [] });
|
|
1962
|
+
}
|
|
1963
|
+
return clientManifest;
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1840
1966
|
// src/server/dev-styles.ts
|
|
1841
1967
|
|
|
1842
1968
|
|
|
@@ -1924,7 +2050,7 @@ function farmFontImportsPlugin(options = {}) {
|
|
|
1924
2050
|
return;
|
|
1925
2051
|
}
|
|
1926
2052
|
const resource = registry.getDevResource(pathname);
|
|
1927
|
-
if (!_optionalChain([resource, 'optionalAccess',
|
|
2053
|
+
if (!_optionalChain([resource, 'optionalAccess', _55 => _55.bytes])) {
|
|
1928
2054
|
next();
|
|
1929
2055
|
return;
|
|
1930
2056
|
}
|
|
@@ -2442,7 +2568,7 @@ function readFontOptions(code, id, call) {
|
|
|
2442
2568
|
const declaration = call.ancestors.at(-2);
|
|
2443
2569
|
const statement = call.ancestors.at(-3);
|
|
2444
2570
|
const statementParent = call.ancestors.at(-4);
|
|
2445
|
-
const isModuleScope = _optionalChain([declaration, 'optionalAccess',
|
|
2571
|
+
const isModuleScope = _optionalChain([declaration, 'optionalAccess', _56 => _56.type]) === "VariableDeclaration" && (_optionalChain([statement, 'optionalAccess', _57 => _57.type]) === "Program" || _optionalChain([statement, 'optionalAccess', _58 => _58.type]) === "ExportNamedDeclaration" && _optionalChain([statementParent, 'optionalAccess', _59 => _59.type]) === "Program");
|
|
2446
2572
|
if (!isModuleScope || call.ancestors.some((ancestor) => isFunctionNode(ancestor))) {
|
|
2447
2573
|
throw fontError(id, `${call.kind}() must be declared directly at module scope`);
|
|
2448
2574
|
}
|
|
@@ -2878,7 +3004,7 @@ function generateFarmIntegrationProviderClientCode(providers, root, rendererComp
|
|
|
2878
3004
|
let hasClerkProvider = false;
|
|
2879
3005
|
renderedProviders.forEach((provider, index) => {
|
|
2880
3006
|
let componentExpression = "null";
|
|
2881
|
-
if (
|
|
3007
|
+
if (_chunk65OS2TOTcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
|
|
2882
3008
|
const namespace = `FarmIntegrationProviderModule${index}`;
|
|
2883
3009
|
imports.push(
|
|
2884
3010
|
`import * as ${namespace} from ${JSON.stringify(resolveProviderModule(provider.component.module, root))};`
|
|
@@ -2935,7 +3061,7 @@ function generateFarmIntegrationProviderServerModules(providers, root, rendererC
|
|
|
2935
3061
|
const entries = [];
|
|
2936
3062
|
let needsMarkHelper = false;
|
|
2937
3063
|
providers.forEach((provider, index) => {
|
|
2938
|
-
if (!
|
|
3064
|
+
if (!_chunk65OS2TOTcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) return;
|
|
2939
3065
|
const namespace = `FarmServerIntegrationProviderModule${index}`;
|
|
2940
3066
|
imports.push(
|
|
2941
3067
|
`import * as ${namespace} from ${JSON.stringify(resolveProviderModule(provider.component.module, root))};`
|
|
@@ -3003,7 +3129,7 @@ function inferFarmIslandStrategy(filePath, root) {
|
|
|
3003
3129
|
const result = _compiler.inferStrategy.call(void 0, file, code, {
|
|
3004
3130
|
parse: parseFarmIslandSource,
|
|
3005
3131
|
resolve: (specifier, importer) => {
|
|
3006
|
-
const resolved =
|
|
3132
|
+
const resolved = _chunkNXGQIXR7cjs.resolveImportedModule.call(void 0, importer, specifier, root);
|
|
3007
3133
|
return resolved.local ? resolved.path : null;
|
|
3008
3134
|
}
|
|
3009
3135
|
});
|
|
@@ -3023,7 +3149,7 @@ function inferFarmRouteRootStrategy(owners, root) {
|
|
|
3023
3149
|
if (cached && cached.stamps.every(([read2, stamp]) => modifiedAt(read2) === stamp)) {
|
|
3024
3150
|
return cached.result;
|
|
3025
3151
|
}
|
|
3026
|
-
const { result, files } =
|
|
3152
|
+
const { result, files } = _chunkNXGQIXR7cjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
|
|
3027
3153
|
const read = new Set([...files, ...result.files].filter((file) => !isInstalledPackageFile(file)));
|
|
3028
3154
|
routeRootInferences.set(key, {
|
|
3029
3155
|
stamps: [...read].map((file) => [file, modifiedAt(file)]),
|
|
@@ -3031,14 +3157,16 @@ function inferFarmRouteRootStrategy(owners, root) {
|
|
|
3031
3157
|
});
|
|
3032
3158
|
return result;
|
|
3033
3159
|
}
|
|
3160
|
+
var NODE_MODULES = "node_modules";
|
|
3161
|
+
var NODE_MODULES_SEGMENT2 = `${path3.default.sep}${NODE_MODULES}${path3.default.sep}`;
|
|
3034
3162
|
function isInstalledPackageFile(file) {
|
|
3035
|
-
return file.
|
|
3163
|
+
return file.includes(NODE_MODULES_SEGMENT2) || file.startsWith(`${NODE_MODULES}${path3.default.sep}`) || file.endsWith(`${path3.default.sep}${NODE_MODULES}`) || file === NODE_MODULES;
|
|
3036
3164
|
}
|
|
3037
3165
|
function inferRouteRoot(owners, root) {
|
|
3038
3166
|
const files = [];
|
|
3039
3167
|
const modules = [];
|
|
3040
3168
|
for (const owner of owners) {
|
|
3041
|
-
const rendered =
|
|
3169
|
+
const rendered = _chunkNXGQIXR7cjs.collectFarmRenderedClientModules.call(void 0, owner, root);
|
|
3042
3170
|
if (!rendered) {
|
|
3043
3171
|
return {
|
|
3044
3172
|
strategy: null,
|
|
@@ -3054,7 +3182,7 @@ function inferRouteRoot(owners, root) {
|
|
|
3054
3182
|
source = fs.default.readFileSync(module, "utf8");
|
|
3055
3183
|
} catch (e11) {
|
|
3056
3184
|
}
|
|
3057
|
-
if (
|
|
3185
|
+
if (_chunkNXGQIXR7cjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
|
|
3058
3186
|
}
|
|
3059
3187
|
for (const module of modules) {
|
|
3060
3188
|
const result = inferFarmIslandStrategy(module, root);
|
|
@@ -3066,7 +3194,7 @@ function inferRouteRoot(owners, root) {
|
|
|
3066
3194
|
function resolveFarmRouteRootStrategy(route, page, layouts, root, islandsMode) {
|
|
3067
3195
|
const directory = _nullishCoalesce(route.directory, () => ( route.pattern));
|
|
3068
3196
|
const onRoute = layouts.filter(
|
|
3069
|
-
(layout) =>
|
|
3197
|
+
(layout) => _chunkO2A6HE76cjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, directory)
|
|
3070
3198
|
);
|
|
3071
3199
|
const declared = [
|
|
3072
3200
|
...page.islandStrategy ? [page.islandStrategy] : [],
|
|
@@ -3099,7 +3227,7 @@ var _stream = require('stream');
|
|
|
3099
3227
|
|
|
3100
3228
|
function resolveFarmNotFoundComponentPath(config, appDirs) {
|
|
3101
3229
|
const extensions = _chunk67MZTLTFcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer);
|
|
3102
|
-
const configuredPath = _optionalChain([config, 'access',
|
|
3230
|
+
const configuredPath = _optionalChain([config, 'access', _60 => _60.notFound, 'optionalAccess', _61 => _61.component, 'optionalAccess', _62 => _62.trim, 'call', _63 => _63()]);
|
|
3103
3231
|
if (configuredPath) {
|
|
3104
3232
|
const componentPath = path3.default.isAbsolute(configuredPath) ? path3.default.normalize(configuredPath) : path3.default.resolve(config.root, configuredPath);
|
|
3105
3233
|
if (!extensions.some((extension) => componentPath.endsWith(extension))) {
|
|
@@ -3137,11 +3265,11 @@ function getFarmLayoutKey(pattern, params) {
|
|
|
3137
3265
|
);
|
|
3138
3266
|
}
|
|
3139
3267
|
function countFarmKeptLayouts(layoutsHeader, layouts, params) {
|
|
3140
|
-
const chain =
|
|
3268
|
+
const chain = _chunkO2A6HE76cjs.parseFarmLayoutChainHeader.call(void 0, _nullishCoalesce(layoutsHeader, () => ( null)));
|
|
3141
3269
|
if (chain.length === 0) return 0;
|
|
3142
3270
|
const keys = layouts.map((layout) => getFarmLayoutKey(layout.pattern, params));
|
|
3143
|
-
if (chain[0] === keys[0]) return
|
|
3144
|
-
return keys.length > 1 ? 1 +
|
|
3271
|
+
if (chain[0] === keys[0]) return _chunkO2A6HE76cjs.getSharedLayoutPrefixLength.call(void 0, chain, keys);
|
|
3272
|
+
return keys.length > 1 ? 1 + _chunkO2A6HE76cjs.getSharedLayoutPrefixLength.call(void 0, chain, keys.slice(1)) : 0;
|
|
3145
3273
|
}
|
|
3146
3274
|
function createFarmFlushToken() {
|
|
3147
3275
|
const bytes = new Uint8Array(16);
|
|
@@ -3396,7 +3524,7 @@ function createDefaultErrorDiagnostics(error, root) {
|
|
|
3396
3524
|
function canBootFarmIslandsClient(config) {
|
|
3397
3525
|
const docs = config.docs;
|
|
3398
3526
|
const docsEnabled = docs === true || typeof docs === "object" && docs !== null && docs.enabled !== false;
|
|
3399
|
-
return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access',
|
|
3527
|
+
return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _64 => _64.experimental, 'optionalAccess', _65 => _65.serverComponents])) === "islands" && !docsEnabled && _chunkENYBDM4Ucjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkENYBDM4Ucjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
|
|
3400
3528
|
}
|
|
3401
3529
|
|
|
3402
3530
|
// src/server/renderer.ts
|
|
@@ -3475,7 +3603,7 @@ var warnedSuppressedAsyncHydrationModules = /* @__PURE__ */ new Set();
|
|
|
3475
3603
|
function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
|
|
3476
3604
|
if (warnedSuppressedAsyncHydrationModules.has(modulePath)) return;
|
|
3477
3605
|
warnedSuppressedAsyncHydrationModules.add(modulePath);
|
|
3478
|
-
_chunkQMNWKQL4cjs.logger.warn(
|
|
3606
|
+
_chunkQMNWKQL4cjs.logger.warn(_chunkNXGQIXR7cjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
|
|
3479
3607
|
}
|
|
3480
3608
|
var fullDocumentRoutes = /* @__PURE__ */ new Set();
|
|
3481
3609
|
var documentLayouts = /* @__PURE__ */ new WeakMap();
|
|
@@ -3512,7 +3640,7 @@ function appendResponseHeader(res, name, value) {
|
|
|
3512
3640
|
}
|
|
3513
3641
|
}
|
|
3514
3642
|
function requestHeader(req, name) {
|
|
3515
|
-
const value = _optionalChain([req, 'access',
|
|
3643
|
+
const value = _optionalChain([req, 'access', _66 => _66.headers, 'optionalAccess', _67 => _67[name]]);
|
|
3516
3644
|
return Array.isArray(value) ? value[0] : value;
|
|
3517
3645
|
}
|
|
3518
3646
|
function appendResponseVary(res, value) {
|
|
@@ -3526,7 +3654,7 @@ function appendResponseVary(res, value) {
|
|
|
3526
3654
|
function renderI18nAlternateLinks(requestPath, snapshot, options) {
|
|
3527
3655
|
if (snapshot.routing === "none") return "";
|
|
3528
3656
|
const url = new URL(requestPath, "http://farm.local");
|
|
3529
|
-
return
|
|
3657
|
+
return _chunkO2A6HE76cjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
|
|
3530
3658
|
}
|
|
3531
3659
|
var PPR_REFRESH_MAX_ATTEMPTS = 3;
|
|
3532
3660
|
function createPPRRefreshScript() {
|
|
@@ -3621,12 +3749,12 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
3621
3749
|
}
|
|
3622
3750
|
const schemas = routeModule.__farmRouteSchemas;
|
|
3623
3751
|
const params = parseRouteModuleSchema(
|
|
3624
|
-
_optionalChain([schemas, 'optionalAccess',
|
|
3752
|
+
_optionalChain([schemas, 'optionalAccess', _68 => _68.params]),
|
|
3625
3753
|
input.props.params,
|
|
3626
3754
|
"params",
|
|
3627
3755
|
input.routePath
|
|
3628
3756
|
);
|
|
3629
|
-
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess',
|
|
3757
|
+
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _69 => _69.search]), input.search, "search", input.routePath);
|
|
3630
3758
|
return {
|
|
3631
3759
|
...input.props,
|
|
3632
3760
|
params,
|
|
@@ -3667,7 +3795,7 @@ function readAppPackageIdentity(root) {
|
|
|
3667
3795
|
var ServerRenderer = class {
|
|
3668
3796
|
constructor(config, routeManager, i18nRuntime, viteServer) {
|
|
3669
3797
|
this.ssgManifest = [];
|
|
3670
|
-
this.dataCache =
|
|
3798
|
+
this.dataCache = _chunk3OMLZLDEcjs.getFarmDataCache.call(void 0, );
|
|
3671
3799
|
this.config = config;
|
|
3672
3800
|
this.routeManager = routeManager;
|
|
3673
3801
|
this.i18nRuntime = i18nRuntime;
|
|
@@ -3684,7 +3812,7 @@ var ServerRenderer = class {
|
|
|
3684
3812
|
} else {
|
|
3685
3813
|
_chunkXGJVRPYLcjs.uninstallFarmIslandValues.call(void 0, );
|
|
3686
3814
|
}
|
|
3687
|
-
if (_optionalChain([this, 'access',
|
|
3815
|
+
if (_optionalChain([this, 'access', _70 => _70.config, 'access', _71 => _71.notFound, 'optionalAccess', _72 => _72.component, 'optionalAccess', _73 => _73.trim, 'call', _74 => _74()])) {
|
|
3688
3816
|
resolveFarmNotFoundComponentPath(this.config, _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, this.config));
|
|
3689
3817
|
}
|
|
3690
3818
|
const loaded = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer) ? await import("./renderer/react/server.cjs") : _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer) ? await import("./renderer/none/server.cjs") : this.viteServer ? await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, this.viteServer, this.config.renderer.server) : await import(_url.pathToFileURL.call(void 0,
|
|
@@ -3709,7 +3837,7 @@ var ServerRenderer = class {
|
|
|
3709
3837
|
"node"
|
|
3710
3838
|
);
|
|
3711
3839
|
this.rendererRuntime = islands && this.islandValues() ? withFarmIslandsRenders(runtime, islands) : runtime;
|
|
3712
|
-
_optionalChain([this, 'access',
|
|
3840
|
+
_optionalChain([this, 'access', _75 => _75.routeManager, 'access', _76 => _76.setRendererRuntime, 'optionalCall', _77 => _77(this.rendererRuntime)]);
|
|
3713
3841
|
await this.applyRendererAppSetup();
|
|
3714
3842
|
}
|
|
3715
3843
|
/**
|
|
@@ -3766,7 +3894,7 @@ var ServerRenderer = class {
|
|
|
3766
3894
|
/// Stylesheets the app imported through JS (fontsource packages, component
|
|
3767
3895
|
/// CSS) that the document must link alongside globals.css — see #658.
|
|
3768
3896
|
collectDevStyleHrefs() {
|
|
3769
|
-
const graph = _optionalChain([this, 'access',
|
|
3897
|
+
const graph = _optionalChain([this, 'access', _78 => _78.viteServer, 'optionalAccess', _79 => _79.moduleGraph]);
|
|
3770
3898
|
if (!graph) return [];
|
|
3771
3899
|
return collectDevStylesheetUrls(
|
|
3772
3900
|
graph.idToModuleMap.values(),
|
|
@@ -3779,6 +3907,32 @@ var ServerRenderer = class {
|
|
|
3779
3907
|
(href) => `<link rel="stylesheet" href="${escapeHtmlAttribute2(href)}">`
|
|
3780
3908
|
);
|
|
3781
3909
|
}
|
|
3910
|
+
/**
|
|
3911
|
+
* The client manifest a development document inlines: the entries its page reads before the
|
|
3912
|
+
* first navigation. Inlining every route made each document grow with the app (about 650 KB at
|
|
3913
|
+
* 1,000 routes); the client imports the whole manifest only when a navigation needs it.
|
|
3914
|
+
*/
|
|
3915
|
+
createDevBootClientManifest(req, options) {
|
|
3916
|
+
const layouts = req.__FARM_LAYOUTS__ || [];
|
|
3917
|
+
return createFarmDevClientManifest(
|
|
3918
|
+
_nullishCoalesce(options.routeManifest, () => ( this.routeManager.generateClientManifest(this.config.root))),
|
|
3919
|
+
{
|
|
3920
|
+
sharedAssets: [
|
|
3921
|
+
...this.devGlobalStylesheetAssets(),
|
|
3922
|
+
...this.collectDevStyleHrefs().map((href) => ({
|
|
3923
|
+
tag: "link",
|
|
3924
|
+
attrs: { rel: "stylesheet", href }
|
|
3925
|
+
}))
|
|
3926
|
+
],
|
|
3927
|
+
boot: {
|
|
3928
|
+
routePattern: options.clientRoutePattern,
|
|
3929
|
+
layoutPatterns: layouts.flatMap(
|
|
3930
|
+
(layout) => typeof layout.pattern === "string" ? [layout.pattern] : []
|
|
3931
|
+
)
|
|
3932
|
+
}
|
|
3933
|
+
}
|
|
3934
|
+
);
|
|
3935
|
+
}
|
|
3782
3936
|
/**
|
|
3783
3937
|
* A layout's boundary. Islands mode keys it (the pattern with its params, as the production
|
|
3784
3938
|
* server does), so a navigation can name the layouts the browser shows; a layout the browser
|
|
@@ -3791,7 +3945,7 @@ var ServerRenderer = class {
|
|
|
3791
3945
|
"data-farm-layout-boundary": "true",
|
|
3792
3946
|
"data-farm-layout-pattern": pattern,
|
|
3793
3947
|
...segment ? { "data-farm-layout-key": segment.key } : {},
|
|
3794
|
-
..._optionalChain([segment, 'optionalAccess',
|
|
3948
|
+
..._optionalChain([segment, 'optionalAccess', _80 => _80.kept]) ? { "data-farm-layout-kept": "true" } : {},
|
|
3795
3949
|
style: { display: "contents" }
|
|
3796
3950
|
},
|
|
3797
3951
|
layoutElement
|
|
@@ -3843,7 +3997,7 @@ var ServerRenderer = class {
|
|
|
3843
3997
|
writable.once("error", reject);
|
|
3844
3998
|
const stream = renderToPipeableStream(element, {
|
|
3845
3999
|
nonce: _chunk3BIASUGRcjs._resolveCurrentCspNonce.call(void 0, ),
|
|
3846
|
-
formState:
|
|
4000
|
+
formState: _chunkHBLYSWIJcjs.getFarmFormState.call(void 0, ),
|
|
3847
4001
|
...inlineBoundaries ? {
|
|
3848
4002
|
progressiveChunkSize: Number.MAX_SAFE_INTEGER,
|
|
3849
4003
|
onAllReady() {
|
|
@@ -3887,7 +4041,7 @@ var ServerRenderer = class {
|
|
|
3887
4041
|
);
|
|
3888
4042
|
return { html: rendered.html, head: rendered.head || "" };
|
|
3889
4043
|
}
|
|
3890
|
-
const { head, body } =
|
|
4044
|
+
const { head, body } = _chunkO2A6HE76cjs.takeFarmHoistedHead.call(void 0,
|
|
3891
4045
|
await this.renderElementToCompleteHTML(element, options),
|
|
3892
4046
|
true
|
|
3893
4047
|
);
|
|
@@ -3895,7 +4049,7 @@ var ServerRenderer = class {
|
|
|
3895
4049
|
}
|
|
3896
4050
|
/** Islands mode sends large prop values once, keyed by content (RFC 0003). */
|
|
3897
4051
|
islandValues() {
|
|
3898
|
-
return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access',
|
|
4052
|
+
return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _81 => _81.config, 'access', _82 => _82.experimental, 'optionalAccess', _83 => _83.serverComponents])) === "islands";
|
|
3899
4053
|
}
|
|
3900
4054
|
/**
|
|
3901
4055
|
* Render the route tree used by client navigation without producing a second
|
|
@@ -3970,9 +4124,9 @@ var ServerRenderer = class {
|
|
|
3970
4124
|
});
|
|
3971
4125
|
}
|
|
3972
4126
|
async runWithRequestContext(request2, fn) {
|
|
3973
|
-
return
|
|
4127
|
+
return _chunk4M5ESTJ2cjs._runWithCurrentRequest.call(void 0,
|
|
3974
4128
|
request2,
|
|
3975
|
-
() => _optionalChain([this, 'access',
|
|
4129
|
+
() => _optionalChain([this, 'access', _84 => _84.i18nRuntime, 'optionalAccess', _85 => _85.config, 'access', _86 => _86.enabled]) ? _chunkNLBK37HIcjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
|
|
3976
4130
|
redirect: false
|
|
3977
4131
|
}) : fn()
|
|
3978
4132
|
);
|
|
@@ -4003,7 +4157,7 @@ var ServerRenderer = class {
|
|
|
4003
4157
|
* Check if a path should be served from SSG cache
|
|
4004
4158
|
*/
|
|
4005
4159
|
async shouldServeSSG(pathname) {
|
|
4006
|
-
const ssgPage =
|
|
4160
|
+
const ssgPage = _chunkACAEFEOHcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
|
|
4007
4161
|
if (!ssgPage) return null;
|
|
4008
4162
|
const cached = await this.getCachedSSGPage(pathname);
|
|
4009
4163
|
if (cached && await this.dataCache.isStaleAsync(cached)) {
|
|
@@ -4012,10 +4166,10 @@ var ServerRenderer = class {
|
|
|
4012
4166
|
return ssgPage;
|
|
4013
4167
|
}
|
|
4014
4168
|
getSSGCacheKey(urlPath) {
|
|
4015
|
-
return _chunkDXUXQP2Tcjs.createFarmCacheKey.call(void 0, ["ssg",
|
|
4169
|
+
return _chunkDXUXQP2Tcjs.createFarmCacheKey.call(void 0, ["ssg", _chunk3OMLZLDEcjs.normalizeRevalidatePath.call(void 0, urlPath)]);
|
|
4016
4170
|
}
|
|
4017
4171
|
getPPRCacheKey(pathname, search = "", locale = "", origin = "") {
|
|
4018
|
-
const key = ["ppr", locale,
|
|
4172
|
+
const key = ["ppr", locale, _chunk3OMLZLDEcjs.normalizeRevalidatePath.call(void 0, pathname), search, this.getDeploymentId()];
|
|
4019
4173
|
return _chunkDXUXQP2Tcjs.createFarmCacheKey.call(void 0, origin ? [...key, origin] : key);
|
|
4020
4174
|
}
|
|
4021
4175
|
getCachedSSGPage(urlPath) {
|
|
@@ -4124,7 +4278,7 @@ var ServerRenderer = class {
|
|
|
4124
4278
|
setImmediate(async () => {
|
|
4125
4279
|
try {
|
|
4126
4280
|
const mod = await this.routeManager.loadRouteModule(page.filePath);
|
|
4127
|
-
if (!_optionalChain([mod, 'optionalAccess',
|
|
4281
|
+
if (!_optionalChain([mod, 'optionalAccess', _87 => _87.default])) return;
|
|
4128
4282
|
const { route, layouts } = this.routeManager.matchRoute(page.urlPath);
|
|
4129
4283
|
const layoutModules = await Promise.all(
|
|
4130
4284
|
layouts.map((l) => this.routeManager.loadLayoutModule(l.modulePath))
|
|
@@ -4138,7 +4292,7 @@ var ServerRenderer = class {
|
|
|
4138
4292
|
};
|
|
4139
4293
|
let pageElement = this.rendererRuntime.createElement(PageComponent, pageProps);
|
|
4140
4294
|
const pageMetadata = _nullishCoalesce(routeManifest.routes.find(
|
|
4141
|
-
(entry) => entry.pattern === _optionalChain([route, 'optionalAccess',
|
|
4295
|
+
(entry) => entry.pattern === _optionalChain([route, 'optionalAccess', _88 => _88.pattern])
|
|
4142
4296
|
), () => ( {
|
|
4143
4297
|
shouldHydrate: false,
|
|
4144
4298
|
islandStrategy: null
|
|
@@ -4247,11 +4401,9 @@ var ServerRenderer = class {
|
|
|
4247
4401
|
const header = _chunk6JHZPB52cjs.getFarmSecurityHeader.call(void 0, this.security, cspNonce);
|
|
4248
4402
|
res.setHeader(header.key, header.value);
|
|
4249
4403
|
}
|
|
4250
|
-
const request2 =
|
|
4251
|
-
trustProxy: _optionalChain([this, 'access', _92 => _92.config, 'access', _93 => _93.server, 'optionalAccess', _94 => _94.trustProxy])
|
|
4252
|
-
});
|
|
4404
|
+
const request2 = this.createPageRequest(req, res);
|
|
4253
4405
|
const runtime = this.i18nRuntime;
|
|
4254
|
-
if (_optionalChain([runtime, 'optionalAccess',
|
|
4406
|
+
if (_optionalChain([runtime, 'optionalAccess', _89 => _89.config, 'access', _90 => _90.enabled])) {
|
|
4255
4407
|
const resolution = runtime.resolveRequest(request2);
|
|
4256
4408
|
const varyHeaders = _chunkGPICBTDVcjs.getFarmLocaleVaryHeaders.call(void 0, runtime.config, resolution);
|
|
4257
4409
|
for (const header of varyHeaders) appendResponseVary(res, header);
|
|
@@ -4270,11 +4422,26 @@ var ServerRenderer = class {
|
|
|
4270
4422
|
return;
|
|
4271
4423
|
}
|
|
4272
4424
|
}
|
|
4273
|
-
return
|
|
4425
|
+
return _chunk4M5ESTJ2cjs._runWithFarmCspNonce.call(void 0,
|
|
4274
4426
|
cspNonce,
|
|
4275
4427
|
() => this.runWithRequestContext(request2, () => this.renderPageInContext(req, res))
|
|
4276
4428
|
);
|
|
4277
4429
|
}
|
|
4430
|
+
/**
|
|
4431
|
+
* The Request a page, its layouts, and its server functions read. Its signal aborts when the
|
|
4432
|
+
* client goes away before the response finishes, as in production, so rendering that observes
|
|
4433
|
+
* it can stop.
|
|
4434
|
+
*/
|
|
4435
|
+
createPageRequest(req, res) {
|
|
4436
|
+
const observable = typeof req.once === "function" && typeof res.once === "function";
|
|
4437
|
+
return _chunk4M5ESTJ2cjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
4438
|
+
trustProxy: _optionalChain([this, 'access', _91 => _91.config, 'access', _92 => _92.server, 'optionalAccess', _93 => _93.trustProxy]),
|
|
4439
|
+
signal: observable ? _chunkCFG4QERRcjs.createFarmNodeRequestAbortSignal.call(void 0,
|
|
4440
|
+
req,
|
|
4441
|
+
res
|
|
4442
|
+
) : void 0
|
|
4443
|
+
});
|
|
4444
|
+
}
|
|
4278
4445
|
async renderPageInContext(req, res) {
|
|
4279
4446
|
const renderStartTime = Date.now();
|
|
4280
4447
|
let pathname = "/";
|
|
@@ -4297,7 +4464,7 @@ var ServerRenderer = class {
|
|
|
4297
4464
|
});
|
|
4298
4465
|
};
|
|
4299
4466
|
try {
|
|
4300
|
-
const url =
|
|
4467
|
+
const url = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _94 => _94.config, 'access', _95 => _95.server, 'optionalAccess', _96 => _96.trustProxy]) });
|
|
4301
4468
|
pathname = url.pathname;
|
|
4302
4469
|
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, { type: "render.start", route: pathname, pathname });
|
|
4303
4470
|
searchParamsObject = _chunkSUCDVKUBcjs.searchParamsToObject.call(void 0, url.searchParams);
|
|
@@ -4367,7 +4534,7 @@ var ServerRenderer = class {
|
|
|
4367
4534
|
layouts = match.layouts;
|
|
4368
4535
|
routeSlots = _nullishCoalesce(match.slots, () => ( []));
|
|
4369
4536
|
if (!route) {
|
|
4370
|
-
if (
|
|
4537
|
+
if (_chunkVKRMO3EZcjs.isFarmDefaultMCPPathname.call(void 0, pathname) && this.getDefaultMCPServer()) {
|
|
4371
4538
|
await this.renderDefaultMCP(req, res);
|
|
4372
4539
|
completeRender(res.statusCode || 200, pathname);
|
|
4373
4540
|
return;
|
|
@@ -4384,22 +4551,20 @@ var ServerRenderer = class {
|
|
|
4384
4551
|
params
|
|
4385
4552
|
});
|
|
4386
4553
|
let actionRequest;
|
|
4387
|
-
if (req.method === "POST" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access',
|
|
4554
|
+
if (req.method === "POST" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _97 => _97.config, 'access', _98 => _98.experimental, 'optionalAccess', _99 => _99.serverComponents])) === "islands") {
|
|
4388
4555
|
await Promise.all([
|
|
4389
4556
|
this.routeManager.loadRouteModule(route.modulePath),
|
|
4390
4557
|
...layouts.map((layout) => this.routeManager.loadLayoutModule(layout.modulePath))
|
|
4391
4558
|
]);
|
|
4392
|
-
actionRequest =
|
|
4393
|
-
trustProxy: _optionalChain([this, 'access', _103 => _103.config, 'access', _104 => _104.server, 'optionalAccess', _105 => _105.trustProxy])
|
|
4394
|
-
});
|
|
4559
|
+
actionRequest = this.createPageRequest(req, res);
|
|
4395
4560
|
const formActionRequest = actionRequest;
|
|
4396
4561
|
const actionResponse = await _chunkYDXLC4DWcjs._runWithMiddlewareData.call(void 0,
|
|
4397
4562
|
toMiddlewareMap(req.__FARM_MIDDLEWARE_DATA__),
|
|
4398
4563
|
() => _chunkYDXLC4DWcjs._runWithMiddlewareContext.call(void 0,
|
|
4399
4564
|
toMiddlewareMap(req.__FARM_MIDDLEWARE_CONTEXT__),
|
|
4400
|
-
() =>
|
|
4565
|
+
() => _chunkHBLYSWIJcjs.handleFarmFormActionRequest.call(void 0,
|
|
4401
4566
|
formActionRequest,
|
|
4402
|
-
|
|
4567
|
+
_chunkLIQJYEQPcjs.resolveServerActionsConfig.call(void 0, this.config.serverActions),
|
|
4403
4568
|
// Before a rewrite, the URL the browser posted to.
|
|
4404
4569
|
new URL(
|
|
4405
4570
|
_nullishCoalesce(_nullishCoalesce(req.originalUrl, () => ( req.url)), () => ( "/")),
|
|
@@ -4421,9 +4586,7 @@ var ServerRenderer = class {
|
|
|
4421
4586
|
pluginExposedContext = _chunkJYT7AN37cjs.getRequestContextSnapshot.call(void 0, req, {
|
|
4422
4587
|
exposedOnly: true
|
|
4423
4588
|
});
|
|
4424
|
-
const currentRequest = _nullishCoalesce(actionRequest, () => (
|
|
4425
|
-
trustProxy: _optionalChain([this, 'access', _106 => _106.config, 'access', _107 => _107.server, 'optionalAccess', _108 => _108.trustProxy])
|
|
4426
|
-
})));
|
|
4589
|
+
const currentRequest = _nullishCoalesce(actionRequest, () => ( this.createPageRequest(req, res)));
|
|
4427
4590
|
const routeContext = await this.resolveRouteContext({
|
|
4428
4591
|
request: currentRequest,
|
|
4429
4592
|
rawRequest: req,
|
|
@@ -4464,11 +4627,11 @@ var ServerRenderer = class {
|
|
|
4464
4627
|
searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, searchParamsObject),
|
|
4465
4628
|
error
|
|
4466
4629
|
};
|
|
4467
|
-
if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess',
|
|
4630
|
+
if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess', _100 => _100.notFound])) {
|
|
4468
4631
|
res.statusCode = 404;
|
|
4469
4632
|
PageComponent = programmaticRouteComponents.notFound;
|
|
4470
4633
|
pageProps = routeStateProps;
|
|
4471
|
-
} else if (_optionalChain([programmaticRouteComponents, 'optionalAccess',
|
|
4634
|
+
} else if (_optionalChain([programmaticRouteComponents, 'optionalAccess', _101 => _101.error])) {
|
|
4472
4635
|
res.statusCode = 500;
|
|
4473
4636
|
PageComponent = programmaticRouteComponents.error;
|
|
4474
4637
|
pageProps = routeStateProps;
|
|
@@ -4476,10 +4639,10 @@ var ServerRenderer = class {
|
|
|
4476
4639
|
throw error;
|
|
4477
4640
|
}
|
|
4478
4641
|
}
|
|
4479
|
-
const renderingConfig = await
|
|
4642
|
+
const renderingConfig = await _chunkACAEFEOHcjs.resolveRouteRenderingConfigFromFile.call(void 0,
|
|
4480
4643
|
routeModule,
|
|
4481
4644
|
route.modulePath,
|
|
4482
|
-
{ experimentalPPR: _optionalChain([this, 'access',
|
|
4645
|
+
{ experimentalPPR: _optionalChain([this, 'access', _102 => _102.config, 'access', _103 => _103.experimental, 'optionalAccess', _104 => _104.ppr]) === true }
|
|
4483
4646
|
);
|
|
4484
4647
|
const pprBypassReason = renderingConfig.ppr ? this.getPPRShellBypassReason(req, middlewareMap, middlewareContext, pluginExposedContext) : void 0;
|
|
4485
4648
|
const islandsNavigationRequest = Boolean(
|
|
@@ -4490,7 +4653,7 @@ var ServerRenderer = class {
|
|
|
4490
4653
|
const pprShellOptions = canCachePPRShell ? {
|
|
4491
4654
|
pathname,
|
|
4492
4655
|
search: url.search,
|
|
4493
|
-
locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess',
|
|
4656
|
+
locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess', _105 => _105.locale]), () => ( "")),
|
|
4494
4657
|
origin: pprI18nSnapshot && pprI18nSnapshot.routing !== "none" ? url.origin : "",
|
|
4495
4658
|
revalidate: renderingConfig.revalidate
|
|
4496
4659
|
} : void 0;
|
|
@@ -4540,7 +4703,7 @@ var ServerRenderer = class {
|
|
|
4540
4703
|
});
|
|
4541
4704
|
}
|
|
4542
4705
|
const outerRequest = _chunk3BIASUGRcjs._peekCurrentRequest.call(void 0, );
|
|
4543
|
-
const countRequestReads = () => (outerRequest ?
|
|
4706
|
+
const countRequestReads = () => (outerRequest ? _chunk4M5ESTJ2cjs._getRequestReadCount.call(void 0, outerRequest) : 0) + _chunk4M5ESTJ2cjs._getRequestReadCount.call(void 0, currentRequest);
|
|
4544
4707
|
const requestReadsBeforeRender = countRequestReads();
|
|
4545
4708
|
let LoadingFallbackComponent = null;
|
|
4546
4709
|
if (loadingBoundaryEntry) {
|
|
@@ -4562,7 +4725,7 @@ var ServerRenderer = class {
|
|
|
4562
4725
|
const routeManifestEntry = routeManifest.routes.find(
|
|
4563
4726
|
(entry) => entry.pattern === route.pattern
|
|
4564
4727
|
);
|
|
4565
|
-
const moduleMetadata = routeManifestEntry ||
|
|
4728
|
+
const moduleMetadata = routeManifestEntry || _chunkNXGQIXR7cjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
|
|
4566
4729
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4567
4730
|
const renderedRouteSlots = await Promise.all(
|
|
4568
4731
|
routeSlots.map(async (slot) => {
|
|
@@ -4613,20 +4776,20 @@ var ServerRenderer = class {
|
|
|
4613
4776
|
if (moduleMetadata.suppressedAsyncHydration) {
|
|
4614
4777
|
warnSuppressedAsyncHydrationOnce(
|
|
4615
4778
|
route.modulePath,
|
|
4616
|
-
_optionalChain([routeManifestEntry, 'optionalAccess',
|
|
4779
|
+
_optionalChain([routeManifestEntry, 'optionalAccess', _106 => _106.suppressedAsyncHydrationReason])
|
|
4617
4780
|
);
|
|
4618
4781
|
}
|
|
4619
4782
|
const layoutHydrationMetadata = layouts.map((layout) => {
|
|
4620
4783
|
const manifestEntry = routeManifest.layouts.find(
|
|
4621
4784
|
(entry) => entry.pattern === layout.pattern
|
|
4622
4785
|
);
|
|
4623
|
-
if (_optionalChain([manifestEntry, 'optionalAccess',
|
|
4786
|
+
if (_optionalChain([manifestEntry, 'optionalAccess', _107 => _107.suppressedAsyncHydration])) {
|
|
4624
4787
|
warnSuppressedAsyncHydrationOnce(
|
|
4625
4788
|
layout.modulePath,
|
|
4626
4789
|
manifestEntry.suppressedAsyncHydrationReason
|
|
4627
4790
|
);
|
|
4628
4791
|
}
|
|
4629
|
-
if (typeof _optionalChain([manifestEntry, 'optionalAccess',
|
|
4792
|
+
if (typeof _optionalChain([manifestEntry, 'optionalAccess', _108 => _108.shouldHydrate]) === "boolean") {
|
|
4630
4793
|
return {
|
|
4631
4794
|
isClientComponent: manifestEntry.isClientComponent === true,
|
|
4632
4795
|
shouldHydrate: manifestEntry.shouldHydrate,
|
|
@@ -4647,11 +4810,11 @@ var ServerRenderer = class {
|
|
|
4647
4810
|
const clientLayouts = layouts.map((layout, index) => ({
|
|
4648
4811
|
pattern: layout.pattern,
|
|
4649
4812
|
modulePath: _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, layout.modulePath, this.config.root),
|
|
4650
|
-
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4651
|
-
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access',
|
|
4652
|
-
..._optionalChain([layoutHydrationMetadata, 'access',
|
|
4813
|
+
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _109 => _109[index], 'optionalAccess', _110 => _110.shouldHydrate]) === true,
|
|
4814
|
+
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _111 => _111[index], 'optionalAccess', _112 => _112.islandStrategy]), () => ( null)),
|
|
4815
|
+
..._optionalChain([layoutHydrationMetadata, 'access', _113 => _113[index], 'optionalAccess', _114 => _114.hasIsolatedClientBoundaries]) === true ? { hasIsolatedClientBoundaries: true } : {},
|
|
4653
4816
|
// Islands mode: the browser rebuilds this layout from its tree, not its module.
|
|
4654
|
-
...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access',
|
|
4817
|
+
...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _115 => _115[index], 'optionalAccess', _116 => _116.serverTree]) === true ? { serverTree: true } : {}
|
|
4655
4818
|
}));
|
|
4656
4819
|
const hydrationStrategies = [
|
|
4657
4820
|
...shouldHydrate && moduleMetadata.islandStrategy ? [moduleMetadata.islandStrategy] : [],
|
|
@@ -4665,9 +4828,9 @@ var ServerRenderer = class {
|
|
|
4665
4828
|
layouts.map((layout, index) => ({
|
|
4666
4829
|
pattern: layout.pattern,
|
|
4667
4830
|
modulePath: layout.modulePath,
|
|
4668
|
-
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4669
|
-
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4670
|
-
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access',
|
|
4831
|
+
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _117 => _117[index], 'optionalAccess', _118 => _118.shouldHydrate]) === true,
|
|
4832
|
+
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _119 => _119[index], 'optionalAccess', _120 => _120.hasIsolatedClientBoundaries]) === true,
|
|
4833
|
+
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _121 => _121[index], 'optionalAccess', _122 => _122.islandStrategy]), () => ( null))
|
|
4671
4834
|
})),
|
|
4672
4835
|
this.config.root || process.cwd(),
|
|
4673
4836
|
true
|
|
@@ -4675,7 +4838,7 @@ var ServerRenderer = class {
|
|
|
4675
4838
|
const hasHydratableRouteSlots = renderedRouteSlots.some(
|
|
4676
4839
|
(slot) => slot.isClientComponent || slot.shouldHydrate
|
|
4677
4840
|
);
|
|
4678
|
-
const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess',
|
|
4841
|
+
const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess', _123 => _123.hasIsolatedClientBoundaries]) === true || layoutHydrationMetadata.some((metadata) => metadata.hasIsolatedClientBoundaries === true);
|
|
4679
4842
|
req.__FARM_PAGE_PATH__ = route.modulePath;
|
|
4680
4843
|
req.__FARM_ROUTE__ = pathname;
|
|
4681
4844
|
req.__FARM_IS_CLIENT_COMPONENT__ = isClientComponent;
|
|
@@ -4688,7 +4851,7 @@ var ServerRenderer = class {
|
|
|
4688
4851
|
req.__FARM_SHOULD_HYDRATE__ = shouldHydrate || shouldHydrateLayout || hasIsolatedClientBoundaries;
|
|
4689
4852
|
req.__FARM_ISLAND_STRATEGY__ = hydrationIslandStrategy;
|
|
4690
4853
|
req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ = hasHydratableRouteSlots;
|
|
4691
|
-
req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess',
|
|
4854
|
+
req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _124 => _124.modulePath]) ? _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
|
|
4692
4855
|
req.__FARM_ROUTE_SLOTS__ = renderedRouteSlots.map((slot) => ({
|
|
4693
4856
|
name: slot.name,
|
|
4694
4857
|
ownerPattern: slot.ownerPattern,
|
|
@@ -4737,7 +4900,7 @@ var ServerRenderer = class {
|
|
|
4737
4900
|
const middlewareDataForContext = middlewareMap;
|
|
4738
4901
|
await _chunkYDXLC4DWcjs._runWithMiddlewareData.call(void 0, middlewareDataForContext, async () => {
|
|
4739
4902
|
await _chunkYDXLC4DWcjs._runWithMiddlewareContext.call(void 0, middlewareContext, async () => {
|
|
4740
|
-
await
|
|
4903
|
+
await _chunk4M5ESTJ2cjs._runWithCurrentRequest.call(void 0, currentRequest, async () => {
|
|
4741
4904
|
let pageElement = this.rendererRuntime.createElement(PageComponent, pageProps);
|
|
4742
4905
|
if (LoadingFallbackComponent && !islandsNavigationRequest) {
|
|
4743
4906
|
const loadingFallback = this.rendererRuntime.createElement(LoadingFallbackComponent, {
|
|
@@ -4760,7 +4923,7 @@ var ServerRenderer = class {
|
|
|
4760
4923
|
} else if (shouldHydrateLayout && !(isClientComponent || shouldHydrate) && this.rendererRuntime.isolateServerPageGraph) {
|
|
4761
4924
|
pageElement = await this.isolateServerPage(
|
|
4762
4925
|
pageElement,
|
|
4763
|
-
_optionalChain([routeManifestEntry, 'optionalAccess',
|
|
4926
|
+
_optionalChain([routeManifestEntry, 'optionalAccess', _125 => _125.serverTree]) === true
|
|
4764
4927
|
);
|
|
4765
4928
|
}
|
|
4766
4929
|
pageElement = this.createPageBoundary(pageElement, {
|
|
@@ -4774,7 +4937,7 @@ var ServerRenderer = class {
|
|
|
4774
4937
|
if (keptLayouts > 0) {
|
|
4775
4938
|
let keptElement = null;
|
|
4776
4939
|
for (let i = keptLayouts - 1; i >= 0; i--) {
|
|
4777
|
-
const KeptLayout = _optionalChain([layoutModules, 'access',
|
|
4940
|
+
const KeptLayout = _optionalChain([layoutModules, 'access', _126 => _126[i], 'optionalAccess', _127 => _127.default]);
|
|
4778
4941
|
if (KeptLayout) {
|
|
4779
4942
|
keptElement = this.rendererRuntime.createElement(KeptLayout, {
|
|
4780
4943
|
children: keptElement,
|
|
@@ -4784,7 +4947,7 @@ var ServerRenderer = class {
|
|
|
4784
4947
|
}
|
|
4785
4948
|
try {
|
|
4786
4949
|
await this.renderElementToCompleteHTML(
|
|
4787
|
-
await this.wrapWithIntegrationProviders(keptElement),
|
|
4950
|
+
await this.wrapWithIntegrationProviders(this.wrapClientGraph(keptElement)),
|
|
4788
4951
|
{ rejectLateErrors: true }
|
|
4789
4952
|
);
|
|
4790
4953
|
} catch (e15) {
|
|
@@ -4823,7 +4986,7 @@ var ServerRenderer = class {
|
|
|
4823
4986
|
);
|
|
4824
4987
|
slotProps[slot.name] = slotElement;
|
|
4825
4988
|
}
|
|
4826
|
-
wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access',
|
|
4989
|
+
wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _128 => _128[i], 'optionalAccess', _129 => _129.serverTree]) === true && islands && this.islandValues() ? await islands.renderFarmServerTreeLayout(
|
|
4827
4990
|
LayoutComponent,
|
|
4828
4991
|
{ params },
|
|
4829
4992
|
{ children: wrappedElement, ...slotProps },
|
|
@@ -4873,6 +5036,7 @@ var ServerRenderer = class {
|
|
|
4873
5036
|
{
|
|
4874
5037
|
responseHeaders: pprHeaders,
|
|
4875
5038
|
routeManifest,
|
|
5039
|
+
clientRoutePattern: route.pattern,
|
|
4876
5040
|
captureStaticShell: Boolean(pprShellOptions),
|
|
4877
5041
|
observabilityRoute: pathname,
|
|
4878
5042
|
onSuspenseHoleDetected: pprShellOptions ? () => _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
@@ -4958,7 +5122,7 @@ var ServerRenderer = class {
|
|
|
4958
5122
|
}
|
|
4959
5123
|
}
|
|
4960
5124
|
emitFarmRenderError(req, pathname, error);
|
|
4961
|
-
const errorStatus =
|
|
5125
|
+
const errorStatus = _chunkO2A6HE76cjs.resolveDefaultErrorStatus.call(void 0, error);
|
|
4962
5126
|
if (pprRefreshRoute) {
|
|
4963
5127
|
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
4964
5128
|
type: "ppr.refresh.error",
|
|
@@ -4994,7 +5158,7 @@ var ServerRenderer = class {
|
|
|
4994
5158
|
}
|
|
4995
5159
|
}
|
|
4996
5160
|
async wrapWithIntegrationProviders(element) {
|
|
4997
|
-
const providers =
|
|
5161
|
+
const providers = _chunk65OS2TOTcjs.getIntegrationProviders.call(void 0, this.config.integrations);
|
|
4998
5162
|
let wrapped = element;
|
|
4999
5163
|
for (let i = providers.length - 1; i >= 0; i--) {
|
|
5000
5164
|
const provider = providers[i];
|
|
@@ -5002,7 +5166,7 @@ var ServerRenderer = class {
|
|
|
5002
5166
|
const rendererCapabilities = _chunk67MZTLTFcjs.getFarmRendererCapabilities.call(void 0, this.config.renderer);
|
|
5003
5167
|
if (!rendererCapabilities.functionComponents) {
|
|
5004
5168
|
throw new Error(
|
|
5005
|
-
`Integration provider \`${provider.name}\` requires a renderer that can host function components; \`${_nullishCoalesce(_optionalChain([this, 'access',
|
|
5169
|
+
`Integration provider \`${provider.name}\` requires a renderer that can host function components; \`${_nullishCoalesce(_optionalChain([this, 'access', _130 => _130.config, 'access', _131 => _131.renderer, 'optionalAccess', _132 => _132.name]), () => ( "the configured renderer"))}\` cannot.`
|
|
5006
5170
|
);
|
|
5007
5171
|
}
|
|
5008
5172
|
if (provider.type === "clerk" && !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer)) {
|
|
@@ -5012,7 +5176,7 @@ var ServerRenderer = class {
|
|
|
5012
5176
|
}
|
|
5013
5177
|
let ProviderComponent;
|
|
5014
5178
|
let providerSourceModule;
|
|
5015
|
-
if (
|
|
5179
|
+
if (_chunk65OS2TOTcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
|
|
5016
5180
|
providerSourceModule = provider.component.module;
|
|
5017
5181
|
const providerModuleId = provider.component.module.startsWith(".") ? _chunkQMNWKQL4cjs.toViteModuleId.call(void 0,
|
|
5018
5182
|
path9.resolve(this.config.root, provider.component.module),
|
|
@@ -5041,7 +5205,7 @@ var ServerRenderer = class {
|
|
|
5041
5205
|
}
|
|
5042
5206
|
if (provider.type !== "clerk" && typeof this.rendererRuntime.markFunctionComponent === "function" && !isRendererCompiledComponent(
|
|
5043
5207
|
_nullishCoalesce(providerSourceModule, () => ( "")),
|
|
5044
|
-
_chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access',
|
|
5208
|
+
_chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access', _133 => _133.config, 'access', _134 => _134.renderer, 'optionalAccess', _135 => _135.componentExtensions]))
|
|
5045
5209
|
)) {
|
|
5046
5210
|
ProviderComponent = this.rendererRuntime.markFunctionComponent(ProviderComponent);
|
|
5047
5211
|
}
|
|
@@ -5110,7 +5274,7 @@ var ServerRenderer = class {
|
|
|
5110
5274
|
);
|
|
5111
5275
|
metadata = _chunk6IOZPJ3Icjs.addMetadataMarkdownAlternate.call(void 0,
|
|
5112
5276
|
metadata,
|
|
5113
|
-
|
|
5277
|
+
_chunkPG6ZIHKEcjs.getFarmMarkdownAlternatePath.call(void 0, _chunkPG6ZIHKEcjs.resolveMarkdownConfig.call(void 0, this.config.md), publicPathname, {
|
|
5114
5278
|
routePathname: (pathname) => this.routeManager.toRoutePathname(pathname)
|
|
5115
5279
|
})
|
|
5116
5280
|
);
|
|
@@ -5169,8 +5333,8 @@ var ServerRenderer = class {
|
|
|
5169
5333
|
`Metadata route module ${match.metadata.modulePath} does not export a default value or handler`
|
|
5170
5334
|
);
|
|
5171
5335
|
}
|
|
5172
|
-
const request2 =
|
|
5173
|
-
trustProxy: _optionalChain([this, 'access',
|
|
5336
|
+
const request2 = _chunk4M5ESTJ2cjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
5337
|
+
trustProxy: _optionalChain([this, 'access', _136 => _136.config, 'access', _137 => _137.server, 'optionalAccess', _138 => _138.trustProxy])
|
|
5174
5338
|
});
|
|
5175
5339
|
const url = new URL(request2.url);
|
|
5176
5340
|
const llmsContext = match.metadata.kind === "llms" || match.metadata.kind === "llms-full" ? await this.createLlmsTxtContext(request2, {
|
|
@@ -5184,11 +5348,11 @@ var ServerRenderer = class {
|
|
|
5184
5348
|
path: match.routePath,
|
|
5185
5349
|
...llmsContext
|
|
5186
5350
|
}) : routeModule.default;
|
|
5187
|
-
const body = match.metadata.kind === "llms-full" && !(value instanceof Response) ? await
|
|
5351
|
+
const body = match.metadata.kind === "llms-full" && !(value instanceof Response) ? await _chunkMKQ27TGWcjs.renderFarmLlmsFullTxt.call(void 0, value, {
|
|
5188
5352
|
origin: await this.getAgentOrigin(request2),
|
|
5189
5353
|
readMarkdown: llmsContext.markdown
|
|
5190
5354
|
}) : value;
|
|
5191
|
-
const response =
|
|
5355
|
+
const response = _chunkO2A6HE76cjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
|
|
5192
5356
|
method,
|
|
5193
5357
|
request: request2
|
|
5194
5358
|
});
|
|
@@ -5206,25 +5370,25 @@ var ServerRenderer = class {
|
|
|
5206
5370
|
}
|
|
5207
5371
|
/** `/llms.txt` and `/llms-full.txt` from `agent.llmsTxt` when no file route owns them. */
|
|
5208
5372
|
getGeneratedLlmsKind(pathname) {
|
|
5209
|
-
const config =
|
|
5373
|
+
const config = _chunkMKQ27TGWcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _139 => _139.config, 'access', _140 => _140.agent, 'optionalAccess', _141 => _141.llmsTxt]));
|
|
5210
5374
|
if (!config.enabled) return null;
|
|
5211
5375
|
if (pathname === "/llms.txt") return "llms";
|
|
5212
5376
|
return pathname === "/llms-full.txt" && config.full ? "llms-full" : null;
|
|
5213
5377
|
}
|
|
5214
5378
|
async renderGeneratedLlmsTxt(req, res, kind) {
|
|
5215
5379
|
try {
|
|
5216
|
-
const request2 =
|
|
5217
|
-
trustProxy: _optionalChain([this, 'access',
|
|
5380
|
+
const request2 = _chunk4M5ESTJ2cjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
5381
|
+
trustProxy: _optionalChain([this, 'access', _142 => _142.config, 'access', _143 => _143.server, 'optionalAccess', _144 => _144.trustProxy])
|
|
5218
5382
|
});
|
|
5219
|
-
const config =
|
|
5383
|
+
const config = _chunkMKQ27TGWcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _145 => _145.config, 'access', _146 => _146.agent, 'optionalAccess', _147 => _147.llmsTxt]));
|
|
5220
5384
|
const context = await this.createLlmsTxtContext(request2, { full: kind === "llms-full", req });
|
|
5221
|
-
const body = kind === "llms-full" ? await
|
|
5385
|
+
const body = kind === "llms-full" ? await _chunkMKQ27TGWcjs.renderFarmLlmsFullTxt.call(void 0, context.defaults, {
|
|
5222
5386
|
origin: await this.getAgentOrigin(request2),
|
|
5223
5387
|
readMarkdown: context.markdown
|
|
5224
5388
|
}) : context.defaults;
|
|
5225
5389
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
5226
5390
|
res,
|
|
5227
|
-
|
|
5391
|
+
_chunkO2A6HE76cjs.createFarmMetadataRouteResponse.call(void 0,
|
|
5228
5392
|
kind,
|
|
5229
5393
|
body,
|
|
5230
5394
|
{ revalidate: config.revalidate },
|
|
@@ -5243,23 +5407,23 @@ var ServerRenderer = class {
|
|
|
5243
5407
|
}
|
|
5244
5408
|
}
|
|
5245
5409
|
getAgentCrawlers() {
|
|
5246
|
-
return
|
|
5410
|
+
return _chunkF244KE2Dcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _148 => _148.config, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.crawlers]));
|
|
5247
5411
|
}
|
|
5248
5412
|
/** `/robots.txt` from `agent.crawlers` when no robots.ts owns it. */
|
|
5249
5413
|
async renderGeneratedRobotsTxt(req, res) {
|
|
5250
5414
|
try {
|
|
5251
|
-
const sitemapPath = _optionalChain([this, 'access',
|
|
5415
|
+
const sitemapPath = _optionalChain([this, 'access', _151 => _151.routeManager, 'access', _152 => _152.matchMetadataRoute, 'call', _153 => _153("/sitemap.xml"), 'optionalAccess', _154 => _154.metadata, 'access', _155 => _155.kind]) === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
|
|
5252
5416
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
5253
5417
|
const rootMetadata = sitemapPath && rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
5254
|
-
const robots =
|
|
5418
|
+
const robots = _chunkF244KE2Dcjs.createFarmAgentRobots.call(void 0, {
|
|
5255
5419
|
crawlers: this.getAgentCrawlers(),
|
|
5256
5420
|
sitemapPath,
|
|
5257
|
-
metadataBase: _optionalChain([rootMetadata, 'optionalAccess',
|
|
5421
|
+
metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _156 => _156.metadataBase]),
|
|
5258
5422
|
basePath: this.config.basePath
|
|
5259
5423
|
});
|
|
5260
5424
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
5261
5425
|
res,
|
|
5262
|
-
|
|
5426
|
+
_chunkO2A6HE76cjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
|
|
5263
5427
|
);
|
|
5264
5428
|
} catch (error) {
|
|
5265
5429
|
_chunkQMNWKQL4cjs.logger.error(`Generated robots.txt failed: ${error}`);
|
|
@@ -5273,13 +5437,13 @@ var ServerRenderer = class {
|
|
|
5273
5437
|
}
|
|
5274
5438
|
}
|
|
5275
5439
|
getAgentSitemap() {
|
|
5276
|
-
return
|
|
5440
|
+
return _chunkF244KE2Dcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _157 => _157.config, 'access', _158 => _158.agent, 'optionalAccess', _159 => _159.sitemap]));
|
|
5277
5441
|
}
|
|
5278
5442
|
/** `/sitemap.xml` from `agent.sitemap` when no sitemap.ts owns it. */
|
|
5279
5443
|
async renderGeneratedSitemap(req, res) {
|
|
5280
5444
|
try {
|
|
5281
|
-
const request2 =
|
|
5282
|
-
trustProxy: _optionalChain([this, 'access',
|
|
5445
|
+
const request2 = _chunk4M5ESTJ2cjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
5446
|
+
trustProxy: _optionalChain([this, 'access', _160 => _160.config, 'access', _161 => _161.server, 'optionalAccess', _162 => _162.trustProxy])
|
|
5283
5447
|
});
|
|
5284
5448
|
const sources = await Promise.all(
|
|
5285
5449
|
this.getAgentListedRoutes().map(async ([pattern, route]) => {
|
|
@@ -5290,26 +5454,26 @@ var ServerRenderer = class {
|
|
|
5290
5454
|
}),
|
|
5291
5455
|
fs5.promises.stat(route.modulePath).catch(() => void 0)
|
|
5292
5456
|
]);
|
|
5293
|
-
if (await this.isAgentPageNoIndex(pattern, _optionalChain([module, 'optionalAccess',
|
|
5294
|
-
return { pattern, module, lastModified: _optionalChain([stat, 'optionalAccess',
|
|
5457
|
+
if (await this.isAgentPageNoIndex(pattern, _optionalChain([module, 'optionalAccess', _163 => _163.metadata]))) return null;
|
|
5458
|
+
return { pattern, module, lastModified: _optionalChain([stat, 'optionalAccess', _164 => _164.mtime, 'access', _165 => _165.toISOString, 'call', _166 => _166()]) };
|
|
5295
5459
|
})
|
|
5296
5460
|
);
|
|
5297
5461
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
5298
5462
|
const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
5299
|
-
const sitemap =
|
|
5463
|
+
const sitemap = _chunkF244KE2Dcjs.createFarmDefaultSitemap.call(void 0,
|
|
5300
5464
|
sources.filter((source) => source !== null),
|
|
5301
5465
|
{
|
|
5302
5466
|
origin: new URL(request2.url).origin,
|
|
5303
5467
|
config: this.getAgentSitemap(),
|
|
5304
|
-
metadataBase: _optionalChain([rootMetadata, 'optionalAccess',
|
|
5468
|
+
metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _167 => _167.metadataBase]),
|
|
5305
5469
|
basePath: this.config.basePath,
|
|
5306
5470
|
trailingSlash: this.config.trailingSlash,
|
|
5307
|
-
i18n: _optionalChain([this, 'access',
|
|
5471
|
+
i18n: _optionalChain([this, 'access', _168 => _168.i18nRuntime, 'optionalAccess', _169 => _169.config])
|
|
5308
5472
|
}
|
|
5309
5473
|
);
|
|
5310
5474
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
5311
5475
|
res,
|
|
5312
|
-
|
|
5476
|
+
_chunkO2A6HE76cjs.createFarmMetadataRouteResponse.call(void 0, "sitemap", sitemap, {}, { method: req.method })
|
|
5313
5477
|
);
|
|
5314
5478
|
} catch (error) {
|
|
5315
5479
|
_chunkQMNWKQL4cjs.logger.error(`Generated sitemap.xml failed: ${error}`);
|
|
@@ -5336,9 +5500,9 @@ var ServerRenderer = class {
|
|
|
5336
5500
|
* matcher) covers, as the production build decides.
|
|
5337
5501
|
*/
|
|
5338
5502
|
getAgentListedRoutes() {
|
|
5339
|
-
const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access',
|
|
5503
|
+
const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _170 => _170.middlewareRoutes, 'optionalCall', _171 => _171()]), () => ( [])) };
|
|
5340
5504
|
return [...this.routeManager.getRoutes()].filter(
|
|
5341
|
-
([pattern]) => !pattern.includes("[") && !
|
|
5505
|
+
([pattern]) => !pattern.includes("[") && !_chunkO2A6HE76cjs.farmPathGuardCoversPage.call(void 0, guards, pattern)
|
|
5342
5506
|
);
|
|
5343
5507
|
}
|
|
5344
5508
|
/**
|
|
@@ -5354,7 +5518,7 @@ var ServerRenderer = class {
|
|
|
5354
5518
|
)
|
|
5355
5519
|
)
|
|
5356
5520
|
);
|
|
5357
|
-
return
|
|
5521
|
+
return _chunkMKQ27TGWcjs.isFarmPageNoIndex.call(void 0, metadata, layoutMetadata);
|
|
5358
5522
|
}
|
|
5359
5523
|
/**
|
|
5360
5524
|
* The default read-only MCP server (`agent.mcp`), or undefined when the app has an MCP
|
|
@@ -5362,22 +5526,22 @@ var ServerRenderer = class {
|
|
|
5362
5526
|
* or a registered server such as the docs engine's. Production applies the same rules.
|
|
5363
5527
|
*/
|
|
5364
5528
|
getDefaultMCPServer() {
|
|
5365
|
-
if (_optionalChain([this, 'access',
|
|
5366
|
-
if (_optionalChain([this, 'access',
|
|
5367
|
-
if (this.routeManager.matchRoute(
|
|
5368
|
-
_nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer =
|
|
5529
|
+
if (_optionalChain([this, 'access', _172 => _172.config, 'access', _173 => _173.agent, 'optionalAccess', _174 => _174.mcp]) !== true || _chunkVKRMO3EZcjs.farmConfigMountsMCP.call(void 0, this.config)) return void 0;
|
|
5530
|
+
if (_optionalChain([this, 'access', _175 => _175.apiRouteExists, 'optionalCall', _176 => _176("/api/mcp")])) return void 0;
|
|
5531
|
+
if (this.routeManager.matchRoute(_chunkVKRMO3EZcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
|
|
5532
|
+
_nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkVKRMO3EZcjs.createFarmDefaultMCPServer.call(void 0,
|
|
5369
5533
|
readAppPackageIdentity(this.config.root),
|
|
5370
|
-
|
|
5534
|
+
_chunkRSL3YFJGcjs.FARM_VERSION
|
|
5371
5535
|
))));
|
|
5372
|
-
return
|
|
5536
|
+
return _chunkVKRMO3EZcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
|
|
5373
5537
|
}
|
|
5374
5538
|
async renderDefaultMCP(req, res) {
|
|
5375
5539
|
const server = this.getDefaultMCPServer();
|
|
5376
|
-
const request2 = _nullishCoalesce(
|
|
5540
|
+
const request2 = _nullishCoalesce(_chunk4M5ESTJ2cjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunk4M5ESTJ2cjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _177 => _177.config, 'access', _178 => _178.server, 'optionalAccess', _179 => _179.trustProxy]) })));
|
|
5377
5541
|
try {
|
|
5378
|
-
const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-
|
|
5542
|
+
const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-NRIL4JBC.cjs");
|
|
5379
5543
|
const origin = new URL(request2.url).origin;
|
|
5380
|
-
const i18n = _optionalChain([this, 'access',
|
|
5544
|
+
const i18n = _optionalChain([this, 'access', _180 => _180.i18nRuntime, 'optionalAccess', _181 => _181.config]);
|
|
5381
5545
|
const metadataBase = await this.getRootMetadataBase();
|
|
5382
5546
|
const response = await handleFarmDefaultMCPRequest(request2, {
|
|
5383
5547
|
server,
|
|
@@ -5392,13 +5556,13 @@ var ServerRenderer = class {
|
|
|
5392
5556
|
return await this.isAgentPageNoIndex(pattern, metadata) ? null : { pattern, module };
|
|
5393
5557
|
})
|
|
5394
5558
|
);
|
|
5395
|
-
return
|
|
5559
|
+
return _chunkVKRMO3EZcjs.collectFarmDefaultMCPPages.call(void 0,
|
|
5396
5560
|
sources.filter((source) => source !== null),
|
|
5397
5561
|
{
|
|
5398
5562
|
origin,
|
|
5399
5563
|
metadataBase,
|
|
5400
5564
|
basePath: this.config.basePath,
|
|
5401
|
-
markdown:
|
|
5565
|
+
markdown: _chunkPG6ZIHKEcjs.resolveMarkdownConfig.call(void 0, this.config.md),
|
|
5402
5566
|
trailingSlash: this.config.trailingSlash,
|
|
5403
5567
|
i18n
|
|
5404
5568
|
}
|
|
@@ -5425,7 +5589,7 @@ var ServerRenderer = class {
|
|
|
5425
5589
|
}
|
|
5426
5590
|
/** Same inputs the production server gives llms.txt: static pages and root metadata. */
|
|
5427
5591
|
async createLlmsTxtContext(request2, options = {}) {
|
|
5428
|
-
const config =
|
|
5592
|
+
const config = _chunkMKQ27TGWcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _182 => _182.config, 'access', _183 => _183.agent, 'optionalAccess', _184 => _184.llmsTxt]));
|
|
5429
5593
|
const origin = await this.getAgentOrigin(request2);
|
|
5430
5594
|
const sources = await Promise.all(
|
|
5431
5595
|
this.getAgentListedRoutes().map(async ([pattern, route]) => {
|
|
@@ -5442,26 +5606,26 @@ var ServerRenderer = class {
|
|
|
5442
5606
|
);
|
|
5443
5607
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
5444
5608
|
const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
5445
|
-
const pages =
|
|
5609
|
+
const pages = _chunkMKQ27TGWcjs.collectFarmLlmsTxtPages.call(void 0,
|
|
5446
5610
|
sources.filter((source) => source !== null),
|
|
5447
5611
|
{
|
|
5448
5612
|
origin,
|
|
5449
5613
|
basePath: this.config.basePath,
|
|
5450
|
-
markdown:
|
|
5614
|
+
markdown: _chunkPG6ZIHKEcjs.resolveMarkdownConfig.call(void 0, this.config.md),
|
|
5451
5615
|
include: config.include,
|
|
5452
5616
|
exclude: config.exclude,
|
|
5453
5617
|
trailingSlash: this.config.trailingSlash,
|
|
5454
|
-
i18n: _optionalChain([this, 'access',
|
|
5618
|
+
i18n: _optionalChain([this, 'access', _185 => _185.i18nRuntime, 'optionalAccess', _186 => _186.config])
|
|
5455
5619
|
}
|
|
5456
5620
|
);
|
|
5457
5621
|
return {
|
|
5458
5622
|
pages,
|
|
5459
|
-
defaults:
|
|
5623
|
+
defaults: _chunkMKQ27TGWcjs.createFarmDefaultLlmsTxt.call(void 0, {
|
|
5460
5624
|
origin,
|
|
5461
5625
|
pages,
|
|
5462
5626
|
config,
|
|
5463
5627
|
rootMetadata,
|
|
5464
|
-
mcp: _optionalChain([this, 'access',
|
|
5628
|
+
mcp: _optionalChain([this, 'access', _187 => _187.config, 'access', _188 => _188.agent, 'optionalAccess', _189 => _189.aiCatalog]) === false ? [] : _chunkDM2YGTRHcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
|
|
5465
5629
|
basePath: this.config.basePath,
|
|
5466
5630
|
apiServerBasePath: _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0,
|
|
5467
5631
|
_chunkPMJSG4JScjs.normalizeFarmAPIConfig.call(void 0,
|
|
@@ -5472,7 +5636,7 @@ var ServerRenderer = class {
|
|
|
5472
5636
|
})
|
|
5473
5637
|
}),
|
|
5474
5638
|
...options.full ? {
|
|
5475
|
-
markdown:
|
|
5639
|
+
markdown: _chunkMKQ27TGWcjs.readFarmLlmsMarkdownFrom.call(void 0,
|
|
5476
5640
|
new URL(request2.url).origin,
|
|
5477
5641
|
origin,
|
|
5478
5642
|
this.createDevMarkdownReader(options.req)
|
|
@@ -5485,13 +5649,13 @@ var ServerRenderer = class {
|
|
|
5485
5649
|
* `metadataBase`, else the request's origin, as for the sitemap and the production server.
|
|
5486
5650
|
*/
|
|
5487
5651
|
async getAgentOrigin(request2) {
|
|
5488
|
-
return
|
|
5652
|
+
return _chunkMKQ27TGWcjs.resolveFarmAgentOrigin.call(void 0, await this.getRootMetadataBase(), new URL(request2.url).origin);
|
|
5489
5653
|
}
|
|
5490
5654
|
/** The root layout's `metadataBase`, which generated agent files and list_pages link to. */
|
|
5491
5655
|
async getRootMetadataBase() {
|
|
5492
5656
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
5493
5657
|
const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
5494
|
-
return _optionalChain([rootMetadata, 'optionalAccess',
|
|
5658
|
+
return _optionalChain([rootMetadata, 'optionalAccess', _190 => _190.metadataBase]);
|
|
5495
5659
|
}
|
|
5496
5660
|
/**
|
|
5497
5661
|
* Reads page mirrors back through this dev server, the way its .md handler
|
|
@@ -5503,17 +5667,17 @@ var ServerRenderer = class {
|
|
|
5503
5667
|
* body is discarded.
|
|
5504
5668
|
*/
|
|
5505
5669
|
createDevMarkdownReader(req) {
|
|
5506
|
-
const socket = _optionalChain([req, 'optionalAccess',
|
|
5507
|
-
if (_optionalChain([req, 'optionalAccess',
|
|
5670
|
+
const socket = _optionalChain([req, 'optionalAccess', _191 => _191.socket]);
|
|
5671
|
+
if (_optionalChain([req, 'optionalAccess', _192 => _192.method, 'optionalAccess', _193 => _193.toUpperCase, 'call', _194 => _194()]) === "HEAD" || !_optionalChain([socket, 'optionalAccess', _195 => _195.localAddress]) || !socket.localPort) {
|
|
5508
5672
|
return async () => null;
|
|
5509
5673
|
}
|
|
5510
5674
|
if (socket.encrypted) {
|
|
5511
5675
|
const address = { host: socket.localAddress, port: socket.localPort };
|
|
5512
|
-
return
|
|
5676
|
+
return _chunkMKQ27TGWcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => requestOwnHttpsServer(page, address));
|
|
5513
5677
|
}
|
|
5514
5678
|
const host = socket.localAddress.includes(":") ? `[${socket.localAddress}]` : socket.localAddress;
|
|
5515
5679
|
const localOrigin = `http://${host}:${socket.localPort}`;
|
|
5516
|
-
const read =
|
|
5680
|
+
const read = _chunkMKQ27TGWcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => fetch(page));
|
|
5517
5681
|
return (url) => {
|
|
5518
5682
|
const target = new URL(url);
|
|
5519
5683
|
return read(`${localOrigin}${target.pathname}${target.search}`);
|
|
@@ -5569,8 +5733,8 @@ var ServerRenderer = class {
|
|
|
5569
5733
|
return;
|
|
5570
5734
|
}
|
|
5571
5735
|
const etag = `"${image.staticInfo.hash}"`;
|
|
5572
|
-
const requestUrl =
|
|
5573
|
-
trustProxy: _optionalChain([this, 'access',
|
|
5736
|
+
const requestUrl = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, {
|
|
5737
|
+
trustProxy: _optionalChain([this, 'access', _196 => _196.config, 'access', _197 => _197.server, 'optionalAccess', _198 => _198.trustProxy])
|
|
5574
5738
|
});
|
|
5575
5739
|
const isVersioned = requestUrl.searchParams.get("v") === image.staticInfo.hash;
|
|
5576
5740
|
res.setHeader("Content-Type", image.staticInfo.contentType);
|
|
@@ -5667,53 +5831,7 @@ var ServerRenderer = class {
|
|
|
5667
5831
|
res.setHeader(key, value);
|
|
5668
5832
|
}
|
|
5669
5833
|
try {
|
|
5670
|
-
const
|
|
5671
|
-
const clientManifest = {
|
|
5672
|
-
clientEntry: "/@farm/client.js",
|
|
5673
|
-
routes: {},
|
|
5674
|
-
layouts: {},
|
|
5675
|
-
slots: [],
|
|
5676
|
-
sharedAssets: [
|
|
5677
|
-
...this.devGlobalStylesheetAssets(),
|
|
5678
|
-
...this.collectDevStyleHrefs().map((href) => ({
|
|
5679
|
-
tag: "link",
|
|
5680
|
-
attrs: { rel: "stylesheet", href }
|
|
5681
|
-
}))
|
|
5682
|
-
]
|
|
5683
|
-
};
|
|
5684
|
-
for (const routeEntry of manifest.routes) {
|
|
5685
|
-
clientManifest.routes[routeEntry.pattern] = {
|
|
5686
|
-
modulePath: routeEntry.modulePath,
|
|
5687
|
-
pattern: routeEntry.pattern,
|
|
5688
|
-
segments: routeEntry.segments,
|
|
5689
|
-
search: routeEntry.search,
|
|
5690
|
-
isClientComponent: routeEntry.isClientComponent,
|
|
5691
|
-
shouldHydrate: routeEntry.shouldHydrate,
|
|
5692
|
-
islandStrategy: routeEntry.islandStrategy,
|
|
5693
|
-
renderPlan: routeEntry.renderPlan,
|
|
5694
|
-
preloads: [routeEntry.modulePath],
|
|
5695
|
-
assets: []
|
|
5696
|
-
};
|
|
5697
|
-
}
|
|
5698
|
-
for (const layoutEntry of manifest.layouts) {
|
|
5699
|
-
clientManifest.layouts[layoutEntry.pattern] = {
|
|
5700
|
-
modulePath: layoutEntry.modulePath,
|
|
5701
|
-
pattern: layoutEntry.pattern,
|
|
5702
|
-
shouldHydrate: layoutEntry.shouldHydrate,
|
|
5703
|
-
islandStrategy: layoutEntry.islandStrategy,
|
|
5704
|
-
// Islands mode: rebuilt from its server tree, so its module is never preloaded.
|
|
5705
|
-
...layoutEntry.serverTree ? { serverTree: true } : {},
|
|
5706
|
-
preloads: layoutEntry.serverTree ? [] : [layoutEntry.modulePath],
|
|
5707
|
-
assets: []
|
|
5708
|
-
};
|
|
5709
|
-
}
|
|
5710
|
-
for (const slotEntry of _nullishCoalesce(manifest.slots, () => ( []))) {
|
|
5711
|
-
clientManifest.slots.push({
|
|
5712
|
-
...slotEntry,
|
|
5713
|
-
preloads: [slotEntry.modulePath],
|
|
5714
|
-
assets: []
|
|
5715
|
-
});
|
|
5716
|
-
}
|
|
5834
|
+
const clientManifest = this.createDevBootClientManifest(req, options);
|
|
5717
5835
|
const routeSlots = (req.__FARM_ROUTE_SLOTS__ || []).map(
|
|
5718
5836
|
(slot) => ({
|
|
5719
5837
|
...slot,
|
|
@@ -5745,12 +5863,12 @@ window.__FARM_ISLAND_STRATEGY__ = ${JSON.stringify(req.__FARM_ISLAND_STRATEGY__
|
|
|
5745
5863
|
window.__FARM_PAGE_MODULE__ = ${JSON.stringify(relativePath)};
|
|
5746
5864
|
window.__FARM_LOADING_MODULE__ = ${JSON.stringify(req.__FARM_LOADING_MODULE_PATH__ || null)};
|
|
5747
5865
|
window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
|
|
5748
|
-
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(
|
|
5866
|
+
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunk65OS2TOTcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
|
|
5749
5867
|
window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
|
|
5750
5868
|
</script>`);
|
|
5751
5869
|
const deferredScript = farmScripts(createDeferredHydrationScript(deferredProps.records));
|
|
5752
5870
|
const rendererHydrationScript = farmScripts(
|
|
5753
|
-
_optionalChain([this, 'access',
|
|
5871
|
+
_optionalChain([this, 'access', _199 => _199.rendererRuntime, 'access', _200 => _200.generateHydrationScript, 'optionalCall', _201 => _201()]) || ""
|
|
5754
5872
|
);
|
|
5755
5873
|
const viteClientScript = farmScripts(`<script type="module" src="/@vite/client"></script>`);
|
|
5756
5874
|
const farmClientScript = farmScripts(
|
|
@@ -5759,8 +5877,8 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
5759
5877
|
const { html: content, head: rendererHead } = await this.renderElementToDocumentParts(
|
|
5760
5878
|
element,
|
|
5761
5879
|
{
|
|
5762
|
-
rejectLateNavigation:
|
|
5763
|
-
_optionalChain([req, 'access',
|
|
5880
|
+
rejectLateNavigation: _chunkPG6ZIHKEcjs._isFarmMarkdownPageCheck.call(void 0,
|
|
5881
|
+
_optionalChain([req, 'access', _202 => _202.headers, 'optionalAccess', _203 => _203[_chunkPG6ZIHKEcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
|
|
5764
5882
|
)
|
|
5765
5883
|
}
|
|
5766
5884
|
);
|
|
@@ -5772,7 +5890,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
5772
5890
|
viewport: viewportTags
|
|
5773
5891
|
} = _chunk6IOZPJ3Icjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
|
|
5774
5892
|
pathname: getFarmMetadataPathname(req),
|
|
5775
|
-
jsonLd: _optionalChain([this, 'access',
|
|
5893
|
+
jsonLd: _optionalChain([this, 'access', _204 => _204.config, 'access', _205 => _205.agent, 'optionalAccess', _206 => _206.jsonLd])
|
|
5776
5894
|
});
|
|
5777
5895
|
const documentTitleTag = !hasExplicitTitle && /<title[\s>]/i.test(rendererHead) ? "" : `<title>${title}</title>`;
|
|
5778
5896
|
const rendererHasTitle = /<title[\s>]/i.test(rendererHead);
|
|
@@ -5782,19 +5900,19 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
5782
5900
|
i18nSnapshot,
|
|
5783
5901
|
this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
|
|
5784
5902
|
) : "";
|
|
5785
|
-
const themeDocument =
|
|
5903
|
+
const themeDocument = _chunkO2A6HE76cjs.createFarmThemeDocumentParts.call(void 0,
|
|
5786
5904
|
this.config.theme,
|
|
5787
5905
|
this.config.basePath,
|
|
5788
|
-
|
|
5906
|
+
_chunkRQ4UZJPRcjs.getTheme.call(void 0, )
|
|
5789
5907
|
);
|
|
5790
5908
|
themeDocument.head = farmScripts(themeDocument.head);
|
|
5791
|
-
const fullDocument =
|
|
5909
|
+
const fullDocument = _chunkO2A6HE76cjs.extractFarmFullDocument.call(void 0, content);
|
|
5792
5910
|
let html;
|
|
5793
5911
|
if (fullDocument) {
|
|
5794
5912
|
const shouldReplaceLayoutTitle = hasExplicitTitle || rendererHasTitle;
|
|
5795
|
-
const documentHtml = shouldReplaceLayoutTitle ?
|
|
5796
|
-
const effectiveRendererHead = hasExplicitTitle ?
|
|
5797
|
-
html =
|
|
5913
|
+
const documentHtml = shouldReplaceLayoutTitle ? _chunkO2A6HE76cjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument;
|
|
5914
|
+
const effectiveRendererHead = hasExplicitTitle ? _chunkO2A6HE76cjs.removeFarmDocumentTitles.call(void 0, rendererHead) : rendererHead;
|
|
5915
|
+
html = _chunkO2A6HE76cjs.composeFarmFullDocument.call(void 0, documentHtml, {
|
|
5798
5916
|
fallbackIcon: !hasFavicon,
|
|
5799
5917
|
viewport: viewportTags,
|
|
5800
5918
|
htmlAttributes: `${i18nSnapshot ? ` lang="${escapeHtmlAttribute2(i18nSnapshot.locale)}" dir="${escapeHtmlAttribute2(i18nSnapshot.direction)}"` : ""}${themeDocument.attributes}`,
|
|
@@ -5820,7 +5938,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
5820
5938
|
});
|
|
5821
5939
|
} else {
|
|
5822
5940
|
html = `<!DOCTYPE html>
|
|
5823
|
-
<html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
5941
|
+
<html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _207 => _207.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
|
|
5824
5942
|
<head>
|
|
5825
5943
|
${themeDocument.head}
|
|
5826
5944
|
<meta charset="utf-8">
|
|
@@ -5851,7 +5969,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
5851
5969
|
const securedHtml = this.secureDocumentHTML(req, html);
|
|
5852
5970
|
if ((req.method || "GET").toUpperCase() !== "HEAD") res.write(securedHtml);
|
|
5853
5971
|
res.end();
|
|
5854
|
-
if (!options.captureStaticShell) await _optionalChain([options, 'access',
|
|
5972
|
+
if (!options.captureStaticShell) await _optionalChain([options, 'access', _208 => _208.onComplete, 'optionalCall', _209 => _209(securedHtml)]);
|
|
5855
5973
|
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
5856
5974
|
type: "render.stream.complete",
|
|
5857
5975
|
route,
|
|
@@ -5861,7 +5979,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
5861
5979
|
emitFarmRenderError(req, route, error);
|
|
5862
5980
|
throw error;
|
|
5863
5981
|
} finally {
|
|
5864
|
-
_optionalChain([clearMiddlewareData, 'optionalCall',
|
|
5982
|
+
_optionalChain([clearMiddlewareData, 'optionalCall', _210 => _210()]);
|
|
5865
5983
|
}
|
|
5866
5984
|
}
|
|
5867
5985
|
/**
|
|
@@ -5876,7 +5994,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
5876
5994
|
if (!rootLayout) return false;
|
|
5877
5995
|
try {
|
|
5878
5996
|
const Layout = (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).default;
|
|
5879
|
-
if (typeof Layout !== "function" || _optionalChain([Layout, 'access',
|
|
5997
|
+
if (typeof Layout !== "function" || _optionalChain([Layout, 'access', _211 => _211.prototype, 'optionalAccess', _212 => _212.isReactComponent]) || _optionalChain([Layout, 'access', _213 => _213.constructor, 'optionalAccess', _214 => _214.name]) === "AsyncFunction") {
|
|
5880
5998
|
return false;
|
|
5881
5999
|
}
|
|
5882
6000
|
const cached = documentLayouts.get(Layout);
|
|
@@ -5901,7 +6019,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
5901
6019
|
const renderToPipeableStream = this.rendererRuntime.renderToPipeableStream;
|
|
5902
6020
|
const fullDocumentRouteKey = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
|
|
5903
6021
|
const streamDocument = fullDocumentRoutes.has(fullDocumentRouteKey) || await this.rootLayoutRendersDocument();
|
|
5904
|
-
if (!renderToPipeableStream ||
|
|
6022
|
+
if (!renderToPipeableStream || _chunkPG6ZIHKEcjs._isFarmMarkdownPageCheck.call(void 0, _optionalChain([req, 'access', _215 => _215.headers, 'optionalAccess', _216 => _216[_chunkPG6ZIHKEcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])) || streamDocument && (options.captureStaticShell || !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer))) {
|
|
5905
6023
|
return this.renderBufferedSSR(element, req, res, clearMiddlewareData, options);
|
|
5906
6024
|
}
|
|
5907
6025
|
return new Promise((resolve3, reject) => {
|
|
@@ -5937,53 +6055,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
5937
6055
|
const pagePath = req.__FARM_PAGE_PATH__;
|
|
5938
6056
|
const isClientComponent = req.__FARM_IS_CLIENT_COMPONENT__ === true;
|
|
5939
6057
|
const relativePath = pagePath ? _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, pagePath, this.config.root) : "/src/app/page.tsx";
|
|
5940
|
-
const
|
|
5941
|
-
const clientManifest = {
|
|
5942
|
-
clientEntry: "/@farm/client.js",
|
|
5943
|
-
routes: {},
|
|
5944
|
-
layouts: {},
|
|
5945
|
-
slots: [],
|
|
5946
|
-
sharedAssets: [
|
|
5947
|
-
...this.devGlobalStylesheetAssets(),
|
|
5948
|
-
...this.collectDevStyleHrefs().map((href) => ({
|
|
5949
|
-
tag: "link",
|
|
5950
|
-
attrs: { rel: "stylesheet", href }
|
|
5951
|
-
}))
|
|
5952
|
-
]
|
|
5953
|
-
};
|
|
5954
|
-
for (const routeEntry of manifest.routes) {
|
|
5955
|
-
clientManifest.routes[routeEntry.pattern] = {
|
|
5956
|
-
modulePath: routeEntry.modulePath,
|
|
5957
|
-
pattern: routeEntry.pattern,
|
|
5958
|
-
segments: routeEntry.segments,
|
|
5959
|
-
search: routeEntry.search,
|
|
5960
|
-
isClientComponent: routeEntry.isClientComponent,
|
|
5961
|
-
shouldHydrate: routeEntry.shouldHydrate,
|
|
5962
|
-
islandStrategy: routeEntry.islandStrategy,
|
|
5963
|
-
renderPlan: routeEntry.renderPlan,
|
|
5964
|
-
preloads: [routeEntry.modulePath],
|
|
5965
|
-
assets: []
|
|
5966
|
-
};
|
|
5967
|
-
}
|
|
5968
|
-
for (const layoutEntry of manifest.layouts) {
|
|
5969
|
-
clientManifest.layouts[layoutEntry.pattern] = {
|
|
5970
|
-
modulePath: layoutEntry.modulePath,
|
|
5971
|
-
pattern: layoutEntry.pattern,
|
|
5972
|
-
shouldHydrate: layoutEntry.shouldHydrate,
|
|
5973
|
-
islandStrategy: layoutEntry.islandStrategy,
|
|
5974
|
-
// Islands mode: rebuilt from its server tree, so its module is never preloaded.
|
|
5975
|
-
...layoutEntry.serverTree ? { serverTree: true } : {},
|
|
5976
|
-
preloads: layoutEntry.serverTree ? [] : [layoutEntry.modulePath],
|
|
5977
|
-
assets: []
|
|
5978
|
-
};
|
|
5979
|
-
}
|
|
5980
|
-
for (const slotEntry of _nullishCoalesce(manifest.slots, () => ( []))) {
|
|
5981
|
-
clientManifest.slots.push({
|
|
5982
|
-
...slotEntry,
|
|
5983
|
-
preloads: [slotEntry.modulePath],
|
|
5984
|
-
assets: []
|
|
5985
|
-
});
|
|
5986
|
-
}
|
|
6058
|
+
const clientManifest = this.createDevBootClientManifest(req, options);
|
|
5987
6059
|
const routeSlotPayload = (req.__FARM_ROUTE_SLOTS__ || []).map(
|
|
5988
6060
|
(slot) => ({
|
|
5989
6061
|
...slot,
|
|
@@ -6017,9 +6089,9 @@ window.__FARM_LOADING_MODULE__ = ${JSON.stringify(
|
|
|
6017
6089
|
req.__FARM_LOADING_MODULE_PATH__ || null
|
|
6018
6090
|
)};
|
|
6019
6091
|
window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
|
|
6020
|
-
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(
|
|
6092
|
+
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunk65OS2TOTcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
|
|
6021
6093
|
window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
|
|
6022
|
-
</script>${
|
|
6094
|
+
</script>${_chunkHBLYSWIJcjs.renderFarmFormStateScript.call(void 0, )}`;
|
|
6023
6095
|
const islandsOnlyPage = this.islandValues() && req.__FARM_PAGE_SHOULD_HYDRATE__ !== true && req.__FARM_LAYOUT_SHOULD_HYDRATE__ !== true && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true;
|
|
6024
6096
|
const rootStrategy = req.__FARM_ISLAND_STRATEGY__;
|
|
6025
6097
|
const waitingRoot = this.islandValues() && !islandsOnlyPage && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true && rootStrategy !== void 0 && rootStrategy !== "load" ? req.__FARM_LAYOUT_SHOULD_HYDRATE__ === true ? "root" : "__farm_page__" : null;
|
|
@@ -6033,7 +6105,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6033
6105
|
viewport: viewportTags
|
|
6034
6106
|
} = _chunk6IOZPJ3Icjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
|
|
6035
6107
|
pathname: getFarmMetadataPathname(req),
|
|
6036
|
-
jsonLd: _optionalChain([this, 'access',
|
|
6108
|
+
jsonLd: _optionalChain([this, 'access', _217 => _217.config, 'access', _218 => _218.agent, 'optionalAccess', _219 => _219.jsonLd])
|
|
6037
6109
|
});
|
|
6038
6110
|
const i18nSnapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
6039
6111
|
const i18nAlternateTags = i18nSnapshot ? renderI18nAlternateLinks(
|
|
@@ -6042,10 +6114,10 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6042
6114
|
this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
|
|
6043
6115
|
) : "";
|
|
6044
6116
|
const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
|
|
6045
|
-
const themeDocument =
|
|
6117
|
+
const themeDocument = _chunkO2A6HE76cjs.createFarmThemeDocumentParts.call(void 0,
|
|
6046
6118
|
this.config.theme,
|
|
6047
6119
|
this.config.basePath,
|
|
6048
|
-
|
|
6120
|
+
_chunkRQ4UZJPRcjs.getTheme.call(void 0, )
|
|
6049
6121
|
);
|
|
6050
6122
|
const streamRoot = req.__FARM_LAYOUT_SHOULD_HYDRATE__ === true ? element : this.rendererRuntime.createElement("div", { style: { display: "contents" } }, element);
|
|
6051
6123
|
const devStyleLinks = this.collectDevStyleLinks();
|
|
@@ -6058,10 +6130,10 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6058
6130
|
const earlyClientScript = bootClient ? createFarmDevBootScript(waitingRoot, rootStrategy) : FARM_DEV_EARLY_CLIENT_SCRIPT;
|
|
6059
6131
|
const { pipe, abort } = renderToPipeableStream(streamRoot, {
|
|
6060
6132
|
nonce: cspNonce,
|
|
6061
|
-
formState:
|
|
6133
|
+
formState: _chunkHBLYSWIJcjs.getFarmFormState.call(void 0, ),
|
|
6062
6134
|
onShellReady() {
|
|
6063
6135
|
if (pendingNavigationError) {
|
|
6064
|
-
_optionalChain([abort, 'optionalCall',
|
|
6136
|
+
_optionalChain([abort, 'optionalCall', _220 => _220(pendingNavigationError)]);
|
|
6065
6137
|
if (clearMiddlewareData) {
|
|
6066
6138
|
clearMiddlewareData();
|
|
6067
6139
|
}
|
|
@@ -6079,7 +6151,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6079
6151
|
console.log(`[FARM STREAM] onShellReady at ${shellReadyMs}ms`);
|
|
6080
6152
|
}
|
|
6081
6153
|
const shell = `<!DOCTYPE html>
|
|
6082
|
-
<html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
6154
|
+
<html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _221 => _221.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
|
|
6083
6155
|
<head>
|
|
6084
6156
|
${themeDocument.head}
|
|
6085
6157
|
<meta charset="utf-8">
|
|
@@ -6100,14 +6172,14 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6100
6172
|
let pendingShell = streamDocument ? "" : stampDocumentHTML(shell);
|
|
6101
6173
|
let heldHead = "";
|
|
6102
6174
|
const releaseShell = (complete) => {
|
|
6103
|
-
const split =
|
|
6175
|
+
const split = _chunkO2A6HE76cjs.takeFarmHoistedHead.call(void 0, heldHead, complete);
|
|
6104
6176
|
if (!split) return null;
|
|
6105
|
-
const shellHead = !hasExplicitTitle && /<title[\s>]/i.test(split.head) ?
|
|
6106
|
-
const opened =
|
|
6177
|
+
const shellHead = !hasExplicitTitle && /<title[\s>]/i.test(split.head) ? _chunkO2A6HE76cjs.removeFarmDocumentTitles.call(void 0, pendingShell) : pendingShell;
|
|
6178
|
+
const opened = _chunkO2A6HE76cjs.appendFarmHead.call(void 0, shellHead, split.head);
|
|
6107
6179
|
pendingShell = "";
|
|
6108
6180
|
heldHead = "";
|
|
6109
6181
|
htmlParts.push(opened);
|
|
6110
|
-
_optionalChain([staticShellParts, 'optionalAccess',
|
|
6182
|
+
_optionalChain([staticShellParts, 'optionalAccess', _222 => _222.push, 'call', _223 => _223(opened)]);
|
|
6111
6183
|
res.write(opened);
|
|
6112
6184
|
return split.body;
|
|
6113
6185
|
};
|
|
@@ -6119,10 +6191,10 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6119
6191
|
${stampDocumentHTML(earlyClientScript)}`
|
|
6120
6192
|
)
|
|
6121
6193
|
} : document;
|
|
6122
|
-
const documentTransform = streamDocument ?
|
|
6194
|
+
const documentTransform = streamDocument ? _chunkO2A6HE76cjs.createFarmStreamedDocumentTransform.call(void 0,
|
|
6123
6195
|
(opening) => withEarlyClient(
|
|
6124
|
-
|
|
6125
|
-
hasExplicitTitle ?
|
|
6196
|
+
_chunkO2A6HE76cjs.openFarmStreamedDocument.call(void 0,
|
|
6197
|
+
hasExplicitTitle ? _chunkO2A6HE76cjs.removeFarmDocumentTitles.call(void 0, opening) : opening,
|
|
6126
6198
|
{
|
|
6127
6199
|
fallbackIcon: !hasFavicon,
|
|
6128
6200
|
viewport: viewportTags,
|
|
@@ -6161,7 +6233,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6161
6233
|
const recordRenderedChunk = (chunkText, renderedText = chunkText) => {
|
|
6162
6234
|
if (!checkedFullDocument && renderedText) {
|
|
6163
6235
|
documentPrefix += renderedText;
|
|
6164
|
-
const prefix =
|
|
6236
|
+
const prefix = _chunkO2A6HE76cjs.classifyFarmDocumentPrefix.call(void 0, documentPrefix);
|
|
6165
6237
|
if (prefix !== "pending") {
|
|
6166
6238
|
checkedFullDocument = true;
|
|
6167
6239
|
documentPrefix = "";
|
|
@@ -6180,7 +6252,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6180
6252
|
staticShellClosed = true;
|
|
6181
6253
|
if (!suspenseHoleEmitted) {
|
|
6182
6254
|
suspenseHoleEmitted = true;
|
|
6183
|
-
_optionalChain([options, 'access',
|
|
6255
|
+
_optionalChain([options, 'access', _224 => _224.onSuspenseHoleDetected, 'optionalCall', _225 => _225()]);
|
|
6184
6256
|
}
|
|
6185
6257
|
} else {
|
|
6186
6258
|
staticShellParts.push(chunkText);
|
|
@@ -6232,7 +6304,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6232
6304
|
const body = releaseShell(true);
|
|
6233
6305
|
if (body) {
|
|
6234
6306
|
htmlParts.push(body);
|
|
6235
|
-
_optionalChain([staticShellParts, 'optionalAccess',
|
|
6307
|
+
_optionalChain([staticShellParts, 'optionalAccess', _226 => _226.push, 'call', _227 => _227(body)]);
|
|
6236
6308
|
res.write(body);
|
|
6237
6309
|
}
|
|
6238
6310
|
}
|
|
@@ -6264,8 +6336,8 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6264
6336
|
recordRenderedChunk(tail, rewritten);
|
|
6265
6337
|
if (tail) res.write(tail);
|
|
6266
6338
|
}
|
|
6267
|
-
const documentEnd = _optionalChain([documentTransform, 'optionalAccess',
|
|
6268
|
-
if (_optionalChain([documentEnd, 'optionalAccess',
|
|
6339
|
+
const documentEnd = _optionalChain([documentTransform, 'optionalAccess', _228 => _228.end, 'call', _229 => _229()]);
|
|
6340
|
+
if (_optionalChain([documentEnd, 'optionalAccess', _230 => _230.text])) {
|
|
6269
6341
|
recordRenderedChunk(documentEnd.text, "");
|
|
6270
6342
|
res.write(documentEnd.text);
|
|
6271
6343
|
}
|
|
@@ -6276,7 +6348,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6276
6348
|
deferredHydrationScript: createDeferredHydrationScript(deferredProps.records),
|
|
6277
6349
|
earlyClient,
|
|
6278
6350
|
// A full document: Farm's #root closes only where Farm opened it.
|
|
6279
|
-
..._optionalChain([documentEnd, 'optionalAccess',
|
|
6351
|
+
..._optionalChain([documentEnd, 'optionalAccess', _231 => _231.document]) ? { closeRoot: documentEnd.rootOpened } : {}
|
|
6280
6352
|
})
|
|
6281
6353
|
);
|
|
6282
6354
|
htmlParts.push(footer);
|
|
@@ -6388,7 +6460,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6388
6460
|
return await this.routeManager.loadRouteModule(notFoundPath);
|
|
6389
6461
|
}
|
|
6390
6462
|
async loadNotFoundComponent() {
|
|
6391
|
-
return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async
|
|
6463
|
+
return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async _232 => _232.default]), async () => ( null));
|
|
6392
6464
|
}
|
|
6393
6465
|
/** The not-found document's head: layout and not-found metadata, as production renders it. */
|
|
6394
6466
|
async notFoundMetadataHead(layoutModule, notFoundModule) {
|
|
@@ -6411,13 +6483,13 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6411
6483
|
*/
|
|
6412
6484
|
async createLateNavigationRecoveryHTML(req, error) {
|
|
6413
6485
|
if (_chunk7JUIK547cjs.isFarmRedirectError.call(void 0, error)) {
|
|
6414
|
-
return
|
|
6486
|
+
return _chunkO2A6HE76cjs.createLateRedirectRecovery.call(void 0,
|
|
6415
6487
|
this.localizeRedirectUrl(_chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error).url),
|
|
6416
6488
|
this.getCspNonce(req) || ""
|
|
6417
6489
|
);
|
|
6418
6490
|
}
|
|
6419
|
-
const pathname =
|
|
6420
|
-
trustProxy: _optionalChain([this, 'access',
|
|
6491
|
+
const pathname = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, {
|
|
6492
|
+
trustProxy: _optionalChain([this, 'access', _233 => _233.config, 'access', _234 => _234.server, 'optionalAccess', _235 => _235.trustProxy])
|
|
6421
6493
|
}).pathname;
|
|
6422
6494
|
let content = this.defaultNotFoundContent();
|
|
6423
6495
|
const NotFoundComponent = await this.loadNotFoundComponent();
|
|
@@ -6432,12 +6504,12 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6432
6504
|
_chunkQMNWKQL4cjs.logger.warn(`not-found page could not render outside its layout, using Farm's: ${error2}`);
|
|
6433
6505
|
}
|
|
6434
6506
|
}
|
|
6435
|
-
return
|
|
6507
|
+
return _chunkO2A6HE76cjs.createLateNotFoundRecovery.call(void 0, content, this.getCspNonce(req) || "");
|
|
6436
6508
|
}
|
|
6437
6509
|
async render404(req, res) {
|
|
6438
6510
|
res.statusCode = 404;
|
|
6439
|
-
const pathname =
|
|
6440
|
-
trustProxy: _optionalChain([this, 'access',
|
|
6511
|
+
const pathname = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, {
|
|
6512
|
+
trustProxy: _optionalChain([this, 'access', _236 => _236.config, 'access', _237 => _237.server, 'optionalAccess', _238 => _238.trustProxy])
|
|
6441
6513
|
}).pathname;
|
|
6442
6514
|
if (_chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
|
|
6443
6515
|
res.setHeader("Content-Type", "application/json");
|
|
@@ -6454,11 +6526,11 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6454
6526
|
}
|
|
6455
6527
|
const acceptHeader = req.headers.accept;
|
|
6456
6528
|
const accept = Array.isArray(acceptHeader) ? acceptHeader.join(",") : acceptHeader;
|
|
6457
|
-
if (
|
|
6458
|
-
res.setHeader("Content-Type",
|
|
6529
|
+
if (_chunkPG6ZIHKEcjs.farmRequestWantsMarkdown.call(void 0, pathname, accept)) {
|
|
6530
|
+
res.setHeader("Content-Type", _chunkPG6ZIHKEcjs.FARM_MARKDOWN_CONTENT_TYPE);
|
|
6459
6531
|
res.setHeader("X-Farm-Markdown-Error", "404");
|
|
6460
6532
|
res.setHeader("Cache-Control", "no-store");
|
|
6461
|
-
res.end(
|
|
6533
|
+
res.end(_chunkPG6ZIHKEcjs.createFarmMarkdownErrorBody.call(void 0, 404, pathname, this.config.basePath || "/"));
|
|
6462
6534
|
return;
|
|
6463
6535
|
}
|
|
6464
6536
|
const appDir = path9.join(this.config.root, this.config.srcDir, "app");
|
|
@@ -6478,9 +6550,9 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6478
6550
|
);
|
|
6479
6551
|
if (notFoundPath) {
|
|
6480
6552
|
const notFoundModule = await this.loadNotFoundModule();
|
|
6481
|
-
const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess',
|
|
6553
|
+
const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess', _239 => _239.default]), () => ( null));
|
|
6482
6554
|
if (NotFoundComponent) {
|
|
6483
|
-
const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess',
|
|
6555
|
+
const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess', _240 => _240.default]), () => ( null));
|
|
6484
6556
|
let element = this.rendererRuntime.createElement(NotFoundComponent, { pathname });
|
|
6485
6557
|
if (LayoutComponent) {
|
|
6486
6558
|
element = this.rendererRuntime.createElement(LayoutComponent, {
|
|
@@ -6516,24 +6588,24 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6516
6588
|
}
|
|
6517
6589
|
res.statusCode = statusCode;
|
|
6518
6590
|
const isDev = process.env.NODE_ENV === "development";
|
|
6519
|
-
const requestUrl =
|
|
6520
|
-
trustProxy: _optionalChain([this, 'access',
|
|
6591
|
+
const requestUrl = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, {
|
|
6592
|
+
trustProxy: _optionalChain([this, 'access', _241 => _241.config, 'access', _242 => _242.server, 'optionalAccess', _243 => _243.trustProxy])
|
|
6521
6593
|
});
|
|
6522
6594
|
const diagnostics = isDev ? createDefaultErrorDiagnostics(error, this.config.root || process.cwd()) : void 0;
|
|
6523
|
-
const statusText =
|
|
6595
|
+
const statusText = _chunkO2A6HE76cjs.getDefaultErrorStatusText.call(void 0, statusCode);
|
|
6524
6596
|
const content = this.stampFarmScripts(
|
|
6525
6597
|
req,
|
|
6526
|
-
|
|
6598
|
+
_chunkO2A6HE76cjs.createDefaultErrorMarkup.call(void 0, {
|
|
6527
6599
|
statusCode,
|
|
6528
6600
|
statusText,
|
|
6529
6601
|
requestPath: requestUrl.pathname,
|
|
6530
6602
|
method: req.method || "GET",
|
|
6531
|
-
message: _optionalChain([diagnostics, 'optionalAccess',
|
|
6532
|
-
errorName: _optionalChain([diagnostics, 'optionalAccess',
|
|
6533
|
-
stack: _optionalChain([diagnostics, 'optionalAccess',
|
|
6534
|
-
sourceFrame: _optionalChain([diagnostics, 'optionalAccess',
|
|
6603
|
+
message: _optionalChain([diagnostics, 'optionalAccess', _244 => _244.message]),
|
|
6604
|
+
errorName: _optionalChain([diagnostics, 'optionalAccess', _245 => _245.name]),
|
|
6605
|
+
stack: _optionalChain([diagnostics, 'optionalAccess', _246 => _246.stack]),
|
|
6606
|
+
sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _247 => _247.sourceFrame]),
|
|
6535
6607
|
development: isDev,
|
|
6536
|
-
farmVersion:
|
|
6608
|
+
farmVersion: _chunkRSL3YFJGcjs.FARM_VERSION,
|
|
6537
6609
|
nodeVersion: process.version,
|
|
6538
6610
|
mode: isDev ? "development" : "production"
|
|
6539
6611
|
})
|
|
@@ -6559,8 +6631,8 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6559
6631
|
*/
|
|
6560
6632
|
getI18nAlternateOptions(req, metadata) {
|
|
6561
6633
|
return {
|
|
6562
|
-
metadataBase: _optionalChain([metadata, 'optionalAccess',
|
|
6563
|
-
origin: req ?
|
|
6634
|
+
metadataBase: _optionalChain([metadata, 'optionalAccess', _248 => _248.metadataBase]),
|
|
6635
|
+
origin: req ? _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _249 => _249.config, 'access', _250 => _250.server, 'optionalAccess', _251 => _251.trustProxy]) }).origin : void 0
|
|
6564
6636
|
};
|
|
6565
6637
|
}
|
|
6566
6638
|
createFullHTML(content, isClientComponent = false, requestPath = "/", metadataHead, alternates = {}) {
|
|
@@ -6570,7 +6642,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6570
6642
|
const viteClientScript = farmScripts(`<script type="module" src="/@vite/client"></script>`);
|
|
6571
6643
|
const integrationManifestScript = farmScripts(`<script>
|
|
6572
6644
|
window.__FARM_DEPLOYMENT_ID__ = ${serializeInlineValue(this.getDeploymentId())};
|
|
6573
|
-
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(
|
|
6645
|
+
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunk65OS2TOTcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
|
|
6574
6646
|
${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};` : ""}
|
|
6575
6647
|
</script>`);
|
|
6576
6648
|
const alternateLinks = i18nSnapshot ? renderI18nAlternateLinks(
|
|
@@ -6579,20 +6651,20 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
|
|
|
6579
6651
|
this.getI18nAlternateOptions(alternates.req, alternates.metadata)
|
|
6580
6652
|
) : "";
|
|
6581
6653
|
const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
|
|
6582
|
-
const themeDocument =
|
|
6654
|
+
const themeDocument = _chunkO2A6HE76cjs.createFarmThemeDocumentParts.call(void 0,
|
|
6583
6655
|
this.config.theme,
|
|
6584
6656
|
this.config.basePath,
|
|
6585
|
-
|
|
6657
|
+
_chunkRQ4UZJPRcjs.getTheme.call(void 0, )
|
|
6586
6658
|
);
|
|
6587
6659
|
themeDocument.head = farmScripts(themeDocument.head);
|
|
6588
6660
|
const rendererHydrationScript = farmScripts(
|
|
6589
|
-
_optionalChain([this, 'access',
|
|
6661
|
+
_optionalChain([this, 'access', _252 => _252.rendererRuntime, 'access', _253 => _253.generateHydrationScript, 'optionalCall', _254 => _254()]) || ""
|
|
6590
6662
|
);
|
|
6591
|
-
const viewportTags = _chunk6IOZPJ3Icjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access',
|
|
6592
|
-
const fullDocument =
|
|
6663
|
+
const viewportTags = _chunk6IOZPJ3Icjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _255 => _255.metadata, 'optionalAccess', _256 => _256.viewport]));
|
|
6664
|
+
const fullDocument = _chunkO2A6HE76cjs.extractFarmFullDocument.call(void 0, content);
|
|
6593
6665
|
if (fullDocument) {
|
|
6594
|
-
return
|
|
6595
|
-
metadataHead ?
|
|
6666
|
+
return _chunkO2A6HE76cjs.composeFarmFullDocument.call(void 0,
|
|
6667
|
+
metadataHead ? _chunkO2A6HE76cjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument,
|
|
6596
6668
|
{
|
|
6597
6669
|
fallbackIcon: !metadataHead,
|
|
6598
6670
|
viewport: viewportTags,
|
|
@@ -6618,7 +6690,7 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
|
|
|
6618
6690
|
);
|
|
6619
6691
|
}
|
|
6620
6692
|
return `<!DOCTYPE html>
|
|
6621
|
-
<html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
6693
|
+
<html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _257 => _257.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
|
|
6622
6694
|
<head>
|
|
6623
6695
|
${themeDocument.head}
|
|
6624
6696
|
<meta charset="utf-8">
|
|
@@ -6659,8 +6731,7 @@ ${clientScript}
|
|
|
6659
6731
|
const deploymentId = this.getDeploymentId();
|
|
6660
6732
|
res.setHeader(_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER, deploymentId);
|
|
6661
6733
|
if ((req.method || "GET").toUpperCase() !== "GET") return;
|
|
6662
|
-
const
|
|
6663
|
-
const isSecure = _optionalChain([(Array.isArray(forwardedProto) ? forwardedProto[0] : forwardedProto), 'optionalAccess', _267 => _267.split, 'call', _268 => _268(","), 'access', _269 => _269[0], 'optionalAccess', _270 => _270.trim, 'call', _271 => _271()]) === "https" || Boolean(_optionalChain([req, 'access', _272 => _272.socket, 'optionalAccess', _273 => _273.encrypted]));
|
|
6734
|
+
const isSecure = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _258 => _258.config, 'access', _259 => _259.server, 'optionalAccess', _260 => _260.trustProxy]) }).protocol === "https:";
|
|
6664
6735
|
const cookie = _chunkNLBHLPEOcjs.createFarmDeploymentCookie.call(void 0, deploymentId, this.config.basePath || "/", isSecure);
|
|
6665
6736
|
const existing = res.getHeader("Set-Cookie");
|
|
6666
6737
|
if (Array.isArray(existing)) {
|
|
@@ -6701,7 +6772,7 @@ var FarmApp = class {
|
|
|
6701
6772
|
constructor(config = {}, viteServer) {
|
|
6702
6773
|
this.config = this.normalizeConfig(config);
|
|
6703
6774
|
_chunkEVIWKPJVcjs.configureFarmObservability.call(void 0, this.config.observability);
|
|
6704
|
-
|
|
6775
|
+
_chunkRQ4UZJPRcjs._setDefaultFarmThemeConfig.call(void 0, this.config.theme);
|
|
6705
6776
|
this.i18nRuntime = _chunkNLBK37HIcjs.createFarmI18nRuntime.call(void 0, this.config.i18n);
|
|
6706
6777
|
_chunkNLBK37HIcjs._setDefaultFarmI18nRuntime.call(void 0, this.i18nRuntime);
|
|
6707
6778
|
this.viteServer = viteServer;
|
|
@@ -6718,7 +6789,7 @@ var FarmApp = class {
|
|
|
6718
6789
|
_chunkQMNWKQL4cjs.logger.info("Initializing Farm.js application...");
|
|
6719
6790
|
}
|
|
6720
6791
|
await _chunkJMYXO572cjs.initStorage.call(void 0, this.config.storage);
|
|
6721
|
-
await
|
|
6792
|
+
await _chunk3OMLZLDEcjs.configureFarmCache.call(void 0, this.config.cache);
|
|
6722
6793
|
await this.i18nRuntime.initialize();
|
|
6723
6794
|
await this.serverRenderer.initialize();
|
|
6724
6795
|
await this.verifyAppStructure();
|
|
@@ -6762,20 +6833,20 @@ var FarmApp = class {
|
|
|
6762
6833
|
integrations: config.integrations || {},
|
|
6763
6834
|
plugins: config.plugins || [],
|
|
6764
6835
|
migrations: config.migrations || { commands: [] },
|
|
6765
|
-
cron:
|
|
6836
|
+
cron: _chunkEF5AP4CVcjs.resolveCronConfig.call(void 0, config.cron),
|
|
6766
6837
|
workflows: _chunkFSODPZRTcjs.resolveWorkflowsConfig.call(void 0, config.workflows),
|
|
6767
6838
|
api: normalizeFarmAppAPIConfig(config.api),
|
|
6768
6839
|
middleware: config.middleware || {},
|
|
6769
6840
|
routeRules: _chunkMQ4DYVFScjs.normalizeRouteRules.call(void 0, config.routeRules),
|
|
6770
6841
|
context: config.context || (() => void 0),
|
|
6771
6842
|
server: _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, config.server),
|
|
6772
|
-
serverActions:
|
|
6843
|
+
serverActions: _chunkLIQJYEQPcjs.resolveServerActionsConfig.call(void 0, config.serverActions),
|
|
6773
6844
|
security: _chunk6JHZPB52cjs.resolveFarmSecurityConfig.call(void 0, config.security),
|
|
6774
6845
|
images: _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
|
|
6775
6846
|
config.images,
|
|
6776
6847
|
_chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
|
|
6777
6848
|
),
|
|
6778
|
-
performance:
|
|
6849
|
+
performance: _chunkF244KE2Dcjs.resolveFarmPerformanceConfig.call(void 0, config.performance),
|
|
6779
6850
|
theme: _chunkWT6RAN2Icjs.resolveFarmThemeConfig.call(void 0, config.theme, basePath),
|
|
6780
6851
|
i18n: isResolvedI18nConfig(config.i18n) ? config.i18n : _chunkZMSVKVI3cjs.resolveFarmI18nConfig.call(void 0, config.i18n, {
|
|
6781
6852
|
root,
|
|
@@ -6787,7 +6858,7 @@ var FarmApp = class {
|
|
|
6787
6858
|
serverRuntimeConfig: config.serverRuntimeConfig || {},
|
|
6788
6859
|
publicRuntimeConfig: config.publicRuntimeConfig || {},
|
|
6789
6860
|
docs: isResolvedDocsConfig(config.docs) ? config.docs : defaultDocsConfig,
|
|
6790
|
-
md:
|
|
6861
|
+
md: _chunkPG6ZIHKEcjs.resolveMarkdownConfig.call(void 0, config.md),
|
|
6791
6862
|
mdx: _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx),
|
|
6792
6863
|
observability: _nullishCoalesce(config.observability, () => ( false)),
|
|
6793
6864
|
telemetry: config.telemetry !== false,
|
|
@@ -6803,10 +6874,10 @@ var FarmApp = class {
|
|
|
6803
6874
|
env: config.env || { server: {}, public: {} },
|
|
6804
6875
|
suppressLintOnLink: _nullishCoalesce(config.suppressLintOnLink, () => ( false)),
|
|
6805
6876
|
experimental: {
|
|
6806
|
-
serverComponents: _nullishCoalesce(_optionalChain([config, 'access',
|
|
6807
|
-
serverActions: _nullishCoalesce(_optionalChain([config, 'access',
|
|
6808
|
-
isolatedClientHydration: _nullishCoalesce(_optionalChain([config, 'access',
|
|
6809
|
-
ppr: _nullishCoalesce(_optionalChain([config, 'access',
|
|
6877
|
+
serverComponents: _nullishCoalesce(_optionalChain([config, 'access', _261 => _261.experimental, 'optionalAccess', _262 => _262.serverComponents]), () => ( false)),
|
|
6878
|
+
serverActions: _nullishCoalesce(_optionalChain([config, 'access', _263 => _263.experimental, 'optionalAccess', _264 => _264.serverActions]), () => ( false)),
|
|
6879
|
+
isolatedClientHydration: _nullishCoalesce(_optionalChain([config, 'access', _265 => _265.experimental, 'optionalAccess', _266 => _266.isolatedClientHydration]), () => ( "off")),
|
|
6880
|
+
ppr: _nullishCoalesce(_optionalChain([config, 'access', _267 => _267.experimental, 'optionalAccess', _268 => _268.ppr]), () => ( false)),
|
|
6810
6881
|
...config.experimental
|
|
6811
6882
|
},
|
|
6812
6883
|
agent: _nullishCoalesce(config.agent, () => ( {})),
|
|
@@ -6832,7 +6903,7 @@ var FarmApp = class {
|
|
|
6832
6903
|
);
|
|
6833
6904
|
if (!hasAppDirectory) {
|
|
6834
6905
|
const routeFiles = _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
|
|
6835
|
-
(source) =>
|
|
6906
|
+
(source) => _chunkEMRYJG4Ucjs.findProgrammaticRouteFiles.call(void 0, source.root, source.srcDir)
|
|
6836
6907
|
);
|
|
6837
6908
|
if (routeFiles.length > 0) {
|
|
6838
6909
|
return;
|
|
@@ -6865,7 +6936,7 @@ function isResolvedAuthConfig(value) {
|
|
|
6865
6936
|
);
|
|
6866
6937
|
}
|
|
6867
6938
|
function normalizeFarmAppAPIConfig(config) {
|
|
6868
|
-
if (typeof _optionalChain([config, 'optionalAccess',
|
|
6939
|
+
if (typeof _optionalChain([config, 'optionalAccess', _269 => _269.baseURL]) === "function" || typeof _optionalChain([config, 'optionalAccess', _270 => _270.basePath]) === "function") {
|
|
6869
6940
|
throw new Error(
|
|
6870
6941
|
"Farm API config resolver functions must be processed with resolveConfig() before creating a FarmApp."
|
|
6871
6942
|
);
|
|
@@ -6880,7 +6951,7 @@ function createFarmApp(config, viteServer) {
|
|
|
6880
6951
|
var SHARP_INSTALL_HINT = _chunkKORZ6PREcjs.formatOptionalPeerInstallHint.call(void 0, "sharp", "optimize images");
|
|
6881
6952
|
var CLOUDFLARE_IMAGE_PRESETS = /* @__PURE__ */ new Set(["cloudflare", "cloudflare-pages", "cloudflare-module"]);
|
|
6882
6953
|
function resolveFarmImageProviderForRuntime(images, options) {
|
|
6883
|
-
const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess',
|
|
6954
|
+
const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _271 => _271.provider]), () => ( "auto"));
|
|
6884
6955
|
if (provider === "none") return images;
|
|
6885
6956
|
const usesSharp = options.dev ? true : provider === "node" || provider === "auto" && !CLOUDFLARE_IMAGE_PRESETS.has(options.preset || "");
|
|
6886
6957
|
if (!usesSharp || _chunkKORZ6PREcjs.isOptionalPeerInstalled.call(void 0, options.root, "sharp")) return images;
|
|
@@ -7009,9 +7080,9 @@ function staticValue(node) {
|
|
|
7009
7080
|
}
|
|
7010
7081
|
}
|
|
7011
7082
|
function property(object, name) {
|
|
7012
|
-
return _optionalChain([object, 'access',
|
|
7083
|
+
return _optionalChain([object, 'access', _272 => _272.properties, 'access', _273 => _273.find, 'call', _274 => _274(
|
|
7013
7084
|
(entry) => entry.type === "Property" && !entry.computed && (entry.key.name === name || entry.key.value === name)
|
|
7014
|
-
), 'optionalAccess',
|
|
7085
|
+
), 'optionalAccess', _275 => _275.value]);
|
|
7015
7086
|
}
|
|
7016
7087
|
function toolFromObject(object) {
|
|
7017
7088
|
const name = staticValue(property(object, "name"));
|
|
@@ -7057,7 +7128,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
|
|
|
7057
7128
|
if (statement.type !== "ImportDeclaration" || statement.source.value !== WEBMCP_CLIENT)
|
|
7058
7129
|
continue;
|
|
7059
7130
|
for (const specifier of statement.specifiers) {
|
|
7060
|
-
const imported = _nullishCoalesce(_optionalChain([specifier, 'access',
|
|
7131
|
+
const imported = _nullishCoalesce(_optionalChain([specifier, 'access', _276 => _276.imported, 'optionalAccess', _277 => _277.name]), () => ( _optionalChain([specifier, 'access', _278 => _278.imported, 'optionalAccess', _279 => _279.value])));
|
|
7061
7132
|
if (specifier.type === "ImportSpecifier" && DEFINERS.has(imported))
|
|
7062
7133
|
locals.set(specifier.local.name, imported);
|
|
7063
7134
|
}
|
|
@@ -7073,7 +7144,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
|
|
|
7073
7144
|
const [argument] = current.arguments;
|
|
7074
7145
|
if (definer && argument) {
|
|
7075
7146
|
const objects = definer === "registerWebMCPTools" ? argument.type === "ArrayExpression" ? argument.elements.filter(
|
|
7076
|
-
(element) => _optionalChain([element, 'optionalAccess',
|
|
7147
|
+
(element) => _optionalChain([element, 'optionalAccess', _280 => _280.type]) === "ObjectExpression"
|
|
7077
7148
|
) : [] : argument.type === "ObjectExpression" ? [argument] : [];
|
|
7078
7149
|
for (const object of objects) {
|
|
7079
7150
|
const tool = toolFromObject(object);
|
|
@@ -7134,8 +7205,8 @@ function collectFarmWebMCPTools(root, srcDir = "src") {
|
|
|
7134
7205
|
|
|
7135
7206
|
var ADAPTER_EXTENSIONS = ["ts", "tsx", "js", "jsx", "mts", "mjs"];
|
|
7136
7207
|
function resolveFarmClientCacheAdapterEntry(root, cache2) {
|
|
7137
|
-
const client = _optionalChain([cache2, 'optionalAccess',
|
|
7138
|
-
const adapter = _optionalChain([client, 'optionalAccess',
|
|
7208
|
+
const client = _optionalChain([cache2, 'optionalAccess', _281 => _281.client]);
|
|
7209
|
+
const adapter = _optionalChain([client, 'optionalAccess', _282 => _282.adapter]);
|
|
7139
7210
|
if (adapter === void 0) return void 0;
|
|
7140
7211
|
if (typeof adapter !== "string" || adapter.trim().length === 0) {
|
|
7141
7212
|
throw new Error(
|
|
@@ -7150,8 +7221,8 @@ function resolveFarmClientCacheAdapterEntry(root, cache2) {
|
|
|
7150
7221
|
);
|
|
7151
7222
|
}
|
|
7152
7223
|
const options = {};
|
|
7153
|
-
if (_optionalChain([client, 'optionalAccess',
|
|
7154
|
-
if (_optionalChain([client, 'optionalAccess',
|
|
7224
|
+
if (_optionalChain([client, 'optionalAccess', _283 => _283.version]) !== void 0) options.version = client.version;
|
|
7225
|
+
if (_optionalChain([client, 'optionalAccess', _284 => _284.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
|
|
7155
7226
|
return { importPath: found.replace(/\\/g, "/"), options };
|
|
7156
7227
|
}
|
|
7157
7228
|
function resolveAdapterFile(resolved) {
|
|
@@ -7557,7 +7628,7 @@ function redactFarmDocsClientConfig(code, filename) {
|
|
|
7557
7628
|
const current = node;
|
|
7558
7629
|
if (current.type === "Property") {
|
|
7559
7630
|
const name = propertyKeyName(current);
|
|
7560
|
-
const valueType = _optionalChain([current, 'access',
|
|
7631
|
+
const valueType = _optionalChain([current, 'access', _285 => _285.value, 'optionalAccess', _286 => _286.type]);
|
|
7561
7632
|
const credential = name !== void 0 && (name.toLowerCase() === "headers" || _chunkSM2SYWARcjs.isSecretDocsConfigKey.call(void 0, name) && valueType !== "ObjectExpression" && valueType !== "ArrayExpression");
|
|
7562
7633
|
if (name && credential) {
|
|
7563
7634
|
edits.push(
|
|
@@ -7600,7 +7671,7 @@ function farmDocsClientConfigPlugin(configModule) {
|
|
|
7600
7671
|
// Never matches without a docs config module, so the bundler never calls the handler.
|
|
7601
7672
|
filter: { id: configModule ? fileNamePattern([configModule]) : /(?!)/ },
|
|
7602
7673
|
handler(code, id, options) {
|
|
7603
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7674
|
+
if (_optionalChain([options, 'optionalAccess', _287 => _287.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
|
|
7604
7675
|
const redacted = redactFarmDocsClientConfig(code, id.split("?")[0]);
|
|
7605
7676
|
return redacted === null ? null : { code: redacted, map: null };
|
|
7606
7677
|
}
|
|
@@ -7632,7 +7703,7 @@ var FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE = [
|
|
|
7632
7703
|
];
|
|
7633
7704
|
function getFarmClientOptimizeDepsInclude(renderer) {
|
|
7634
7705
|
return Array.from(
|
|
7635
|
-
/* @__PURE__ */ new Set([...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE, ..._optionalChain([renderer, 'optionalAccess',
|
|
7706
|
+
/* @__PURE__ */ new Set([...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE, ..._optionalChain([renderer, 'optionalAccess', _288 => _288.optimizeDeps]) || []])
|
|
7636
7707
|
);
|
|
7637
7708
|
}
|
|
7638
7709
|
function createFarmClientOptimizeDepsEntries(projectRoot, appDirectories) {
|
|
@@ -7656,7 +7727,7 @@ function createFarmClientOptimizeDepsConfig(entries, renderer) {
|
|
|
7656
7727
|
// Farm's HTML boots through a virtual module and imports route UI lazily.
|
|
7657
7728
|
// Explicit entries let Vite finish that crawl before a navigation can
|
|
7658
7729
|
// rotate the optimizer hash underneath a hydrated React runtime.
|
|
7659
|
-
..._optionalChain([entries, 'optionalAccess',
|
|
7730
|
+
..._optionalChain([entries, 'optionalAccess', _289 => _289.length]) ? { entries: [...entries] } : {}
|
|
7660
7731
|
};
|
|
7661
7732
|
}
|
|
7662
7733
|
function createFarmSourceAlias(projectRoot, srcDir = "src") {
|
|
@@ -7688,8 +7759,8 @@ function mergeFarmViteAlias(farmValue, userValue) {
|
|
|
7688
7759
|
return [...userEntries, ...normalize(farmValue).filter((entry) => !userNames.has(entry.find))];
|
|
7689
7760
|
}
|
|
7690
7761
|
function mergeFarmViteConfig(farmConfig, userConfig = {}) {
|
|
7691
|
-
const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access',
|
|
7692
|
-
const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access',
|
|
7762
|
+
const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _290 => _290.optimizeDeps, 'optionalAccess', _291 => _291.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _292 => _292.optimizeDeps, 'optionalAccess', _293 => _293.noDiscovery])));
|
|
7763
|
+
const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _294 => _294.optimizeDeps, 'optionalAccess', _295 => _295.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _296 => _296.optimizeDeps, 'optionalAccess', _297 => _297.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _298 => _298.optimizeDeps, 'optionalAccess', _299 => _299.holdUntilCrawlEnd]))));
|
|
7693
7764
|
return {
|
|
7694
7765
|
...farmConfig,
|
|
7695
7766
|
...userConfig,
|
|
@@ -7701,9 +7772,9 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
|
|
|
7701
7772
|
resolve: {
|
|
7702
7773
|
...farmConfig.resolve,
|
|
7703
7774
|
...userConfig.resolve,
|
|
7704
|
-
alias: mergeFarmViteAlias(_optionalChain([farmConfig, 'access',
|
|
7775
|
+
alias: mergeFarmViteAlias(_optionalChain([farmConfig, 'access', _300 => _300.resolve, 'optionalAccess', _301 => _301.alias]), _optionalChain([userConfig, 'access', _302 => _302.resolve, 'optionalAccess', _303 => _303.alias])),
|
|
7705
7776
|
dedupe: Array.from(
|
|
7706
|
-
/* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access',
|
|
7777
|
+
/* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _304 => _304.resolve, 'optionalAccess', _305 => _305.dedupe]) || [], ..._optionalChain([userConfig, 'access', _306 => _306.resolve, 'optionalAccess', _307 => _307.dedupe]) || []])
|
|
7707
7778
|
)
|
|
7708
7779
|
},
|
|
7709
7780
|
optimizeDeps: {
|
|
@@ -7713,21 +7784,21 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
|
|
|
7713
7784
|
holdUntilCrawlEnd,
|
|
7714
7785
|
include: Array.from(
|
|
7715
7786
|
/* @__PURE__ */ new Set([
|
|
7716
|
-
..._optionalChain([farmConfig, 'access',
|
|
7717
|
-
..._optionalChain([userConfig, 'access',
|
|
7787
|
+
..._optionalChain([farmConfig, 'access', _308 => _308.optimizeDeps, 'optionalAccess', _309 => _309.include]) || [],
|
|
7788
|
+
..._optionalChain([userConfig, 'access', _310 => _310.optimizeDeps, 'optionalAccess', _311 => _311.include]) || []
|
|
7718
7789
|
])
|
|
7719
7790
|
),
|
|
7720
7791
|
exclude: Array.from(
|
|
7721
7792
|
/* @__PURE__ */ new Set([
|
|
7722
|
-
..._optionalChain([farmConfig, 'access',
|
|
7723
|
-
..._optionalChain([userConfig, 'access',
|
|
7793
|
+
..._optionalChain([farmConfig, 'access', _312 => _312.optimizeDeps, 'optionalAccess', _313 => _313.exclude]) || [],
|
|
7794
|
+
..._optionalChain([userConfig, 'access', _314 => _314.optimizeDeps, 'optionalAccess', _315 => _315.exclude]) || []
|
|
7724
7795
|
])
|
|
7725
7796
|
)
|
|
7726
7797
|
},
|
|
7727
7798
|
ssr: {
|
|
7728
7799
|
...farmConfig.ssr,
|
|
7729
7800
|
...userConfig.ssr,
|
|
7730
|
-
noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access',
|
|
7801
|
+
noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _316 => _316.ssr, 'optionalAccess', _317 => _317.noExternal]), _optionalChain([userConfig, 'access', _318 => _318.ssr, 'optionalAccess', _319 => _319.noExternal]))
|
|
7731
7802
|
}
|
|
7732
7803
|
};
|
|
7733
7804
|
}
|
|
@@ -7798,8 +7869,8 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}, options = {}
|
|
|
7798
7869
|
...userRolldownOptions
|
|
7799
7870
|
};
|
|
7800
7871
|
const merged = mergeFarmViteConfig(farmConfig, shared);
|
|
7801
|
-
const farmBundlerOptions = _optionalChain([farmConfig, 'access',
|
|
7802
|
-
const output = options.clientOutput ? mergeFarmClientOutputOptions(_optionalChain([farmBundlerOptions, 'optionalAccess',
|
|
7872
|
+
const farmBundlerOptions = _optionalChain([farmConfig, 'access', _320 => _320.build, 'optionalAccess', _321 => _321.rollupOptions]);
|
|
7873
|
+
const output = options.clientOutput ? mergeFarmClientOutputOptions(_optionalChain([farmBundlerOptions, 'optionalAccess', _322 => _322.output]), userOutput) : _optionalChain([farmBundlerOptions, 'optionalAccess', _323 => _323.output]);
|
|
7803
7874
|
return {
|
|
7804
7875
|
...merged,
|
|
7805
7876
|
build: {
|
|
@@ -7816,7 +7887,7 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}, options = {}
|
|
|
7816
7887
|
esbuild: typeof userEsbuild === "object" && farmConfig.esbuild !== false ? { ...userEsbuild, ...farmConfig.esbuild } : _nullishCoalesce(farmConfig.esbuild, () => ( userEsbuild)),
|
|
7817
7888
|
ssr: {
|
|
7818
7889
|
...merged.ssr,
|
|
7819
|
-
external: mergeExternal(_optionalChain([farmConfig, 'access',
|
|
7890
|
+
external: mergeExternal(_optionalChain([farmConfig, 'access', _324 => _324.ssr, 'optionalAccess', _325 => _325.external]), _optionalChain([userConfig, 'access', _326 => _326.ssr, 'optionalAccess', _327 => _327.external]))
|
|
7820
7891
|
}
|
|
7821
7892
|
};
|
|
7822
7893
|
}
|
|
@@ -7888,4 +7959,5 @@ ${FARM_DARK_VARIANT}
|
|
|
7888
7959
|
|
|
7889
7960
|
|
|
7890
7961
|
|
|
7891
|
-
|
|
7962
|
+
|
|
7963
|
+
exports.inspectStaticMetadataImage = inspectStaticMetadataImage; exports.RouteManager = RouteManager; exports.createFarmDevClientManifest = createFarmDevClientManifest; exports.resolveDevGlobalStylesheetHref = resolveDevGlobalStylesheetHref; exports.collectDevStylesheetUrls = collectDevStylesheetUrls; exports.resolveFarmNotFoundComponentPath = resolveFarmNotFoundComponentPath; exports.farmFontImportsPlugin = farmFontImportsPlugin; exports.mergeFarmFontCss = mergeFarmFontCss; 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.ServerRenderer = ServerRenderer; exports.FarmApp = FarmApp; exports.createFarmApp = createFarmApp; exports.SHARP_INSTALL_HINT = SHARP_INSTALL_HINT; exports.resolveFarmImageProviderForRuntime = resolveFarmImageProviderForRuntime; exports.resolveFarmImageServerRuntime = resolveFarmImageServerRuntime; 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_REFRESH_FIELDS_SOURCE = FARM_REFRESH_FIELDS_SOURCE; exports.exactIdPattern = exactIdPattern; exports.fileNamePattern = fileNamePattern; exports.redactFarmDocsClientConfig = redactFarmDocsClientConfig; exports.isFarmDocsClientConfigModule = isFarmDocsClientConfigModule; exports.farmDocsClientConfigPlugin = farmDocsClientConfigPlugin; exports.createFarmClientOptimizeDepsEntries = createFarmClientOptimizeDepsEntries; exports.createFarmClientOptimizeDepsConfig = createFarmClientOptimizeDepsConfig; exports.createFarmSourceAlias = createFarmSourceAlias; exports.mergeFarmViteAlias = mergeFarmViteAlias; exports.mergeFarmViteConfig = mergeFarmViteConfig; exports.mergeFarmProductionViteConfig = mergeFarmProductionViteConfig; exports.createFarmThemeCssPlugin = createFarmThemeCssPlugin;
|