@farm.js/core 0.1.71 → 0.1.73
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-RK7LDYEL.mjs} +5 -5
- package/dist/{agent-mcp-handler-KE4J3W7S.cjs → agent-mcp-handler-VBCA3WZ6.cjs} +6 -6
- package/dist/{agent-mcp.d-BzNw6JI8.d.ts → agent-mcp.d-D_gHjCAE.d.ts} +2 -2
- package/dist/{agent-mcp.d-CgFen3EH.d.mts → agent-mcp.d-PvEf-1mi.d.mts} +2 -2
- package/dist/agent-runtime.d.mts +4 -4
- package/dist/agent-runtime.d.ts +4 -4
- package/dist/{analyzer-VK3BAOFI.mjs → analyzer-MFYCJT75.mjs} +2 -2
- package/dist/analyzer-V5ZMRIIY.cjs +16 -0
- package/dist/api/node.d.mts +6 -6
- package/dist/api/node.d.ts +6 -6
- package/dist/api/route-manager.cjs +7 -6
- package/dist/api/route-manager.d.mts +8 -8
- package/dist/api/route-manager.d.ts +8 -8
- package/dist/api/route-manager.mjs +6 -5
- package/dist/api/runtime.d.mts +5 -5
- package/dist/api/runtime.d.ts +5 -5
- package/dist/api.cjs +8 -7
- package/dist/api.d.mts +9 -9
- package/dist/api.d.ts +9 -9
- package/dist/api.mjs +7 -6
- package/dist/{app-manifest.d-DY4JfJxi.d.ts → app-manifest.d-BpVTg43i.d.ts} +1 -1
- package/dist/{app-manifest.d-DpDK_B1k.d.mts → app-manifest.d-CN7cEWHX.d.mts} +1 -1
- package/dist/app-markdown.cjs +4 -4
- package/dist/app-markdown.d.mts +5 -5
- package/dist/app-markdown.d.ts +5 -5
- package/dist/app-markdown.mjs +3 -3
- package/dist/{app.d-D-5UNrFd.d.mts → app.d-BFWzAdTe.d.mts} +54 -6
- package/dist/{app.d-BeK6bb1c.d.ts → app.d-DO4PTCWm.d.ts} +54 -6
- package/dist/{chunk-7A3URI2F.mjs → chunk-2EVESLP3.mjs} +8 -1
- package/dist/{chunk-IYDJNCR7.mjs → chunk-462MUII7.mjs} +10 -5
- package/dist/{chunk-MWUDEYBI.mjs → chunk-4CTCSKAF.mjs} +1 -1
- package/dist/{chunk-SXMWVP2L.cjs → chunk-4YHGQDTT.cjs} +12 -12
- package/dist/{chunk-YCNHUIPR.cjs → chunk-4Z3YLMSW.cjs} +10 -10
- package/dist/{chunk-K66JILV3.cjs → chunk-5LOARKDP.cjs} +2 -2
- package/dist/{chunk-O32QPFVV.cjs → chunk-5PDMBWAF.cjs} +5 -5
- package/dist/{chunk-IGXS54GC.mjs → chunk-6O6PAZZR.mjs} +1 -1
- package/dist/{chunk-LXEJNWF5.mjs → chunk-73K53YPP.mjs} +2 -2
- package/dist/{chunk-2CQC5CMD.mjs → chunk-7GMBETHM.mjs} +1 -1
- package/dist/{chunk-W2T6NDNP.mjs → chunk-B67CW2LM.mjs} +2 -2
- package/dist/{chunk-CSQPMV3Q.cjs → chunk-CLEWORVY.cjs} +6 -6
- package/dist/{chunk-KPJYBSHL.mjs → chunk-CPMME66W.mjs} +149 -22
- package/dist/{chunk-BBPDJGCU.cjs → chunk-CYOTNHDF.cjs} +2 -2
- package/dist/{chunk-4OD2LXF2.mjs → chunk-CYRIIVD4.mjs} +26 -15
- package/dist/{chunk-DPIGYXSV.mjs → chunk-FRO4BB2T.mjs} +1 -1
- package/dist/{chunk-Y2SZVIVH.cjs → chunk-GPICBTDV.cjs} +8 -1
- package/dist/{chunk-N3XO5AL5.cjs → chunk-GPO3LJDJ.cjs} +2 -2
- package/dist/{chunk-MITIAOUQ.mjs → chunk-GZOKWJIW.mjs} +4 -4
- package/dist/{chunk-NAXKOTPP.cjs → chunk-HFUOLILA.cjs} +21 -21
- package/dist/{chunk-C2JOS77Z.cjs → chunk-HGB4PM2C.cjs} +178 -51
- package/dist/{chunk-2IFT2CSA.cjs → chunk-HTXKSREF.cjs} +515 -151
- package/dist/{chunk-Z3GPAFIA.mjs → chunk-HY6IVQ54.mjs} +1 -1
- package/dist/{chunk-X7LGLF33.mjs → chunk-IBVN7SW5.mjs} +480 -116
- package/dist/{chunk-DPYBVVL3.cjs → chunk-ILQ5DKYF.cjs} +2 -2
- package/dist/{chunk-V25GSH43.mjs → chunk-IXZSBO76.mjs} +1 -1
- package/dist/{chunk-RJUCNO7R.mjs → chunk-JMOCMXTQ.mjs} +1 -1
- package/dist/{chunk-UISZLYKY.cjs → chunk-KDOZORJD.cjs} +52 -41
- package/dist/{chunk-PLXD2MJV.cjs → chunk-KTDG4THT.cjs} +2 -2
- package/dist/{chunk-L6E4SHUB.cjs → chunk-LGR7565L.cjs} +6 -6
- package/dist/chunk-LRPPXKCX.mjs +58 -0
- package/dist/{chunk-GUU3IZSM.mjs → chunk-MJEKMT6B.mjs} +324 -148
- package/dist/chunk-NDOE76QC.cjs +58 -0
- package/dist/{chunk-2AM26UGI.cjs → chunk-NLBK37HI.cjs} +5 -4
- package/dist/{chunk-REP6HWJN.mjs → chunk-OBYM5S5G.mjs} +2 -2
- package/dist/{chunk-ZUVAGMQ5.cjs → chunk-ODBM54RT.cjs} +7 -7
- package/dist/{chunk-J5ASGNKF.mjs → chunk-OIP62QEL.mjs} +1 -1
- package/dist/{chunk-KEB7AGS6.cjs → chunk-OXNZUCHN.cjs} +16 -11
- package/dist/{chunk-2MR4MABG.cjs → chunk-PXAHSCR6.cjs} +58 -8
- package/dist/{chunk-7BUE2GM6.mjs → chunk-QGCSUC5O.mjs} +174 -81
- package/dist/{chunk-VXB5CMNC.cjs → chunk-QKEZLYON.cjs} +2 -2
- package/dist/{chunk-UQUOSNRN.mjs → chunk-REK6HZSU.mjs} +470 -267
- package/dist/{chunk-E77IA5IF.mjs → chunk-RLFGKJQ6.mjs} +1 -1
- package/dist/{chunk-3BQ7QHUH.cjs → chunk-ROCF6UQD.cjs} +17 -8
- package/dist/{chunk-KQAB5LML.mjs → chunk-SUQACHER.mjs} +2 -2
- package/dist/{chunk-NA77GEIU.mjs → chunk-SVQX5HYW.mjs} +53 -3
- package/dist/{chunk-KWST2O22.cjs → chunk-TAU3OF5B.cjs} +611 -435
- package/dist/{chunk-ZPUAOKHV.cjs → chunk-TDCP3Z4T.cjs} +3 -3
- package/dist/{chunk-3AUINHFG.mjs → chunk-TNYC3TYP.mjs} +3 -2
- package/dist/{chunk-TP4RAV7Y.cjs → chunk-TU6VAH4V.cjs} +8 -8
- package/dist/{chunk-MEJCP2LX.cjs → chunk-UVQRMUAR.cjs} +1 -1
- package/dist/{chunk-JMFTKNBA.mjs → chunk-UVZMSRHF.mjs} +2 -2
- package/dist/{chunk-MU5V7XHL.mjs → chunk-VJSXPN3W.mjs} +3 -0
- package/dist/{chunk-DU4VHHPJ.mjs → chunk-VO55MMBX.mjs} +1 -1
- package/dist/{chunk-GF22VGMS.cjs → chunk-VPETSSWN.cjs} +2 -2
- package/dist/{chunk-LDVJIBGN.mjs → chunk-VT25ERQK.mjs} +1 -1
- package/dist/{chunk-AYVGD3PK.mjs → chunk-XI3OXOMK.mjs} +1 -1
- package/dist/{chunk-7OHJWFLB.cjs → chunk-XUSJVHHD.cjs} +466 -373
- package/dist/{chunk-FILXOEWD.cjs → chunk-YXIQYWOK.cjs} +2 -2
- package/dist/{chunk-JVA4PIYN.cjs → chunk-YZK64PZT.cjs} +635 -432
- package/dist/{chunk-THG2TVDH.mjs → chunk-YZLEOMMA.mjs} +3 -3
- package/dist/{chunk-QUFENL7Q.mjs → chunk-Z3IN6GEX.mjs} +16 -7
- package/dist/{chunk-Q5HMVGR5.cjs → chunk-ZFEJ2SF2.cjs} +13 -13
- package/dist/{chunk-LNVGXUL3.cjs → chunk-ZMSVKVI3.cjs} +3 -0
- package/dist/{client-component.d-DwpH251K.d.mts → client-component.d-C71rMuHF.d.mts} +2 -2
- package/dist/{client-component.d-fYupugbZ.d.ts → client-component.d-sF-Znk0j.d.ts} +2 -2
- package/dist/{client-plugins.d-k3bOT5gz.d.mts → client-plugins.d-B-Gd9mWR.d.mts} +5 -4
- package/dist/{client-plugins.d-BxqFfHpM.d.ts → client-plugins.d-MFibjgBg.d.ts} +5 -4
- package/dist/client-plugins.d.mts +4 -4
- package/dist/client-plugins.d.ts +4 -4
- package/dist/client.cjs +1 -1
- package/dist/client.d.mts +9 -9
- package/dist/client.d.ts +9 -9
- package/dist/client.mjs +1 -1
- package/dist/config.d.mts +4 -4
- package/dist/config.d.ts +4 -4
- package/dist/desktop.d.mts +5 -5
- package/dist/desktop.d.ts +5 -5
- package/dist/{devtools-O5625KCK.cjs → devtools-6K4QXFRL.cjs} +7 -7
- package/dist/{devtools-6MXPFPNJ.mjs → devtools-TDIJ6HVC.mjs} +6 -6
- package/dist/docs.cjs +10 -10
- package/dist/docs.d.mts +5 -5
- package/dist/docs.d.ts +5 -5
- package/dist/docs.mjs +9 -9
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/{headers.d-sNT7ZQiU.d.mts → headers.d-BUxGJTsj.d.mts} +2 -2
- package/dist/{headers.d-DalIGbVO.d.ts → headers.d-uQ6BR59u.d.ts} +2 -2
- package/dist/i18n/client.cjs +3 -2
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/client.mjs +2 -1
- package/dist/i18n/index.cjs +3 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.mjs +2 -1
- package/dist/i18n/server.cjs +6 -5
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/i18n/server.mjs +5 -4
- package/dist/index.cjs +32 -30
- package/dist/{index.d-BcA-secm.d.ts → index.d-BCGfxCXY.d.ts} +1 -1
- package/dist/{index.d-DDHHAv7j.d.mts → index.d-CuWOJ-un.d.mts} +1 -1
- package/dist/index.d.mts +24 -24
- package/dist/index.d.ts +24 -24
- package/dist/index.mjs +31 -29
- package/dist/integrations/orm.d.mts +4 -4
- package/dist/integrations/orm.d.ts +4 -4
- package/dist/integrations.d.mts +4 -4
- package/dist/integrations.d.ts +4 -4
- package/dist/internal/app-markdown-runtime.cjs +3 -3
- package/dist/internal/app-markdown-runtime.d.mts +5 -5
- package/dist/internal/app-markdown-runtime.d.ts +5 -5
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +29 -29
- package/dist/internal/build-runtime.d.mts +6 -6
- package/dist/internal/build-runtime.d.ts +6 -6
- package/dist/internal/build-runtime.mjs +28 -28
- package/dist/internal/cli-runtime.cjs +12 -12
- package/dist/internal/cli-runtime.mjs +11 -11
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +2 -2
- package/dist/internal/client-runtime.d.mts +7 -7
- package/dist/internal/client-runtime.d.ts +7 -7
- package/dist/internal/client-runtime.mjs +3 -3
- package/dist/internal/compression-runtime.d.mts +4 -4
- package/dist/internal/compression-runtime.d.ts +4 -4
- package/dist/internal/config-runtime.cjs +8 -8
- package/dist/internal/config-runtime.d.mts +7 -7
- package/dist/internal/config-runtime.d.ts +7 -7
- package/dist/internal/config-runtime.mjs +7 -7
- 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 +19 -19
- package/dist/internal/production-runtime.d.mts +37 -25
- package/dist/internal/production-runtime.d.ts +37 -25
- package/dist/internal/production-runtime.mjs +18 -18
- package/dist/internal/vercel-edge-middleware.d.mts +2 -2
- package/dist/internal/vercel-edge-middleware.d.ts +2 -2
- package/dist/markdown.cjs +2 -2
- package/dist/markdown.d.mts +4 -4
- package/dist/markdown.d.ts +4 -4
- package/dist/markdown.mjs +1 -1
- package/dist/middleware.cjs +3 -3
- package/dist/middleware.d.mts +5 -5
- package/dist/middleware.d.ts +5 -5
- package/dist/middleware.mjs +2 -2
- package/dist/mobile.d.mts +3 -3
- package/dist/mobile.d.ts +3 -3
- package/dist/{mount.d-C1PONsEe.d.mts → mount.d-BIYmcGGg.d.mts} +1 -1
- package/dist/{mount.d-D3JOux2V.d.ts → mount.d-q8k0cJV0.d.ts} +1 -1
- package/dist/{native-tree-L2IIEBXH.mjs → native-tree-OYGKP2NZ.mjs} +2 -2
- package/dist/{native-tree-GF4BH33L.cjs → native-tree-R6CQMDTI.cjs} +3 -3
- package/dist/{navigation-delegate.d-CQQPbdkE.d.ts → navigation-delegate.d-Btfs6Uoa.d.ts} +1 -1
- package/dist/{navigation-delegate.d-CJQQHboA.d.mts → navigation-delegate.d-CYBUupsv.d.mts} +1 -1
- package/dist/navigation.d.mts +7 -7
- package/dist/navigation.d.ts +7 -7
- package/dist/{observability.d-B2363jB6.d.mts → observability.d-DdJRiaIX.d.mts} +27 -3
- package/dist/{observability.d-B2363jB6.d.ts → 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 +21 -21
- package/dist/plugin.d.mts +7 -7
- package/dist/plugin.d.ts +7 -7
- package/dist/plugin.mjs +20 -20
- package/dist/{production-runtime.d-B0IeWWyO.d.mts → production-runtime.d-Bcu37SCo.d.mts} +1 -1
- package/dist/{production-runtime.d-q3aHIv5Y.d.ts → production-runtime.d-qPj3XRET.d.ts} +1 -1
- package/dist/{render-plan.d-DHuJMJRP.d.ts → render-plan.d-0FHusf1D.d.ts} +1 -1
- package/dist/{render-plan.d-CiUj0rq5.d.mts → render-plan.d-BlyxqKMu.d.mts} +1 -1
- package/dist/renderer-client.cjs +3 -2
- package/dist/renderer-client.d.mts +7 -7
- package/dist/renderer-client.d.ts +7 -7
- package/dist/renderer-client.mjs +2 -1
- package/dist/{request.d-DRUbOmYD.d.ts → request.d-CPdVjssg.d.ts} +1 -1
- package/dist/{request.d-D-F7o7tb.d.mts → request.d-CX-gks1l.d.mts} +1 -1
- package/dist/request.d.mts +5 -5
- package/dist/request.d.ts +5 -5
- package/dist/{resolver.d-9iKC79CU.d.mts → resolver.d-DJgzbdsp.d.mts} +1 -1
- package/dist/{resolver.d-CY6mEa_F.d.ts → resolver.d-yaHcGCCG.d.ts} +1 -1
- package/dist/{route-rendering.d-6smgwT2t.d.mts → route-rendering.d-CcvZ_4N2.d.mts} +1 -1
- package/dist/{route-rendering.d-KwqM_mlK.d.ts → route-rendering.d-DcOoSNoG.d.ts} +1 -1
- package/dist/{router.d-BYmDeDlp.d.mts → router.d-C8RHma4A.d.mts} +1 -1
- package/dist/{router.d-B6sesMRD.d.ts → router.d-D2QnK8cM.d.ts} +1 -1
- package/dist/{routes.d-D3aJw1H5.d.mts → routes.d-CCccJRrp.d.mts} +1 -1
- package/dist/{routes.d-K-Qg79AA.d.ts → routes.d-b7khoRoU.d.ts} +1 -1
- package/dist/routes.d.mts +4 -4
- package/dist/routes.d.ts +4 -4
- package/dist/{routing.d-DwSUVZbF.d.mts → routing.d-BhPgtN_S.d.ts} +2 -1
- package/dist/{routing.d-BxOZ2YWc.d.ts → routing.d-D67HQmnv.d.mts} +2 -1
- package/dist/{rsc-pipeline-R2GOKIMU.mjs → rsc-pipeline-LC2FBZAR.mjs} +7 -7
- package/dist/{rsc-pipeline-P4PCWDO2.cjs → rsc-pipeline-NTAM65NT.cjs} +8 -8
- package/dist/{runtime-DP5DYGW5.mjs → runtime-MWAC7NWR.mjs} +7 -7
- package/dist/{runtime-WA2Q4SLG.cjs → runtime-U4PAMTVH.cjs} +9 -9
- package/dist/{runtime.d-CbdMI0Oy.d.ts → runtime.d-1l_1bLrL.d.ts} +1 -1
- package/dist/{runtime.d-BFSJf-ww.d.mts → runtime.d-BQUHHq8M.d.mts} +1 -1
- package/dist/{runtime.d-nUz0HAL4.d.mts → runtime.d-CTAXWZby.d.mts} +2 -2
- package/dist/{runtime.d-B_uPfMjA.d.ts → runtime.d-PUA5qBnd.d.ts} +2 -2
- package/dist/server-plugins.d.mts +6 -6
- package/dist/server-plugins.d.ts +6 -6
- package/dist/server.cjs +43 -41
- package/dist/server.d.mts +15 -15
- package/dist/server.d.ts +15 -15
- package/dist/server.mjs +26 -24
- package/dist/{spa-router.d-mC1D5cTN.d.ts → spa-router.d-BJtXNeqo.d.ts} +3 -3
- package/dist/{spa-router.d-D4EDwR20.d.mts → spa-router.d-BzPdi48R.d.mts} +3 -3
- package/dist/testing.cjs +6 -5
- package/dist/testing.d.mts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.mjs +6 -5
- package/dist/{types.d-wVRlLtBf.d.ts → types.d-euATAbE4.d.mts} +4 -0
- package/dist/{types.d-wVRlLtBf.d.mts → types.d-euATAbE4.d.ts} +4 -0
- package/dist/{utils.d-DxMzteqE.d.mts → utils.d-B4ZW-6z6.d.mts} +1 -1
- package/dist/{utils.d-A2X3a6z_.d.ts → utils.d-DquC6qxy.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +23 -21
- package/dist/vite.d.mts +18 -9
- package/dist/vite.d.ts +18 -9
- package/dist/vite.mjs +22 -20
- package/package.json +1 -1
- package/dist/analyzer-LPIVRSTJ.cjs +0 -16
- package/dist/chunk-V3UOEWCB.cjs +0 -46
- package/dist/chunk-VE3FWJBO.mjs +0 -46
|
@@ -26,7 +26,7 @@ var _chunkNG2EZ6QScjs = require('./chunk-NG2EZ6QS.cjs');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkTDCP3Z4Tcjs = require('./chunk-TDCP3Z4T.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
var _chunkVM57CK74cjs = require('./chunk-VM57CK74.cjs');
|
|
@@ -41,7 +41,7 @@ var _chunk4BS3HSY7cjs = require('./chunk-4BS3HSY7.cjs');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _chunkKDOZORJDcjs = require('./chunk-KDOZORJD.cjs');
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
@@ -54,7 +54,7 @@ var _chunkUISZLYKYcjs = require('./chunk-UISZLYKY.cjs');
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
var
|
|
57
|
+
var _chunkHFUOLILAcjs = require('./chunk-HFUOLILA.cjs');
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
@@ -65,16 +65,16 @@ var _chunkDZZHTMWMcjs = require('./chunk-DZZHTMWM.cjs');
|
|
|
65
65
|
var _chunkJWY66PIDcjs = require('./chunk-JWY66PID.cjs');
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
var
|
|
68
|
+
var _chunkROCF6UQDcjs = require('./chunk-ROCF6UQD.cjs');
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
var
|
|
71
|
+
var _chunkNDOE76QCcjs = require('./chunk-NDOE76QC.cjs');
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
var
|
|
77
|
+
var _chunkOXNZUCHNcjs = require('./chunk-OXNZUCHN.cjs');
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
var _chunk3GNHJ3RNcjs = require('./chunk-3GNHJ3RN.cjs');
|
|
@@ -110,7 +110,7 @@ var _chunkOCS3PSYRcjs = require('./chunk-OCS3PSYR.cjs');
|
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
|
|
113
|
-
var
|
|
113
|
+
var _chunkTAU3OF5Bcjs = require('./chunk-TAU3OF5B.cjs');
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
|
|
@@ -123,7 +123,7 @@ var _chunkPMU4U2W2cjs = require('./chunk-PMU4U2W2.cjs');
|
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
var
|
|
126
|
+
var _chunkCLEWORVYcjs = require('./chunk-CLEWORVY.cjs');
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
|
|
@@ -136,7 +136,7 @@ var _chunkCSQPMV3Qcjs = require('./chunk-CSQPMV3Q.cjs');
|
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
|
|
139
|
-
var
|
|
139
|
+
var _chunkPXAHSCR6cjs = require('./chunk-PXAHSCR6.cjs');
|
|
140
140
|
|
|
141
141
|
|
|
142
142
|
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
@@ -150,15 +150,15 @@ var _chunk47JV57DAcjs = require('./chunk-47JV57DA.cjs');
|
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
|
|
153
|
-
var
|
|
153
|
+
var _chunk4YHGQDTTcjs = require('./chunk-4YHGQDTT.cjs');
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
|
|
157
157
|
|
|
158
|
-
var
|
|
158
|
+
var _chunkTU6VAH4Vcjs = require('./chunk-TU6VAH4V.cjs');
|
|
159
159
|
|
|
160
160
|
|
|
161
|
-
var
|
|
161
|
+
var _chunkILQ5DKYFcjs = require('./chunk-ILQ5DKYF.cjs');
|
|
162
162
|
|
|
163
163
|
|
|
164
164
|
var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
|
|
@@ -176,7 +176,8 @@ var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
|
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
|
|
179
|
-
|
|
179
|
+
|
|
180
|
+
var _chunkHTXKSREFcjs = require('./chunk-HTXKSREF.cjs');
|
|
180
181
|
|
|
181
182
|
|
|
182
183
|
|
|
@@ -223,14 +224,14 @@ var _chunk4P5634G6cjs = require('./chunk-4P5634G6.cjs');
|
|
|
223
224
|
var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
|
|
224
225
|
|
|
225
226
|
|
|
226
|
-
var
|
|
227
|
+
var _chunkLGR7565Lcjs = require('./chunk-LGR7565L.cjs');
|
|
227
228
|
|
|
228
229
|
|
|
229
230
|
|
|
230
231
|
var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
|
|
231
232
|
|
|
232
233
|
|
|
233
|
-
var
|
|
234
|
+
var _chunkHGB4PM2Ccjs = require('./chunk-HGB4PM2C.cjs');
|
|
234
235
|
|
|
235
236
|
|
|
236
237
|
var _chunkASYOWPSRcjs = require('./chunk-ASYOWPSR.cjs');
|
|
@@ -255,10 +256,10 @@ var _chunkJMYXO572cjs = require('./chunk-JMYXO572.cjs');
|
|
|
255
256
|
var _chunkMHLNWRCJcjs = require('./chunk-MHLNWRCJ.cjs');
|
|
256
257
|
|
|
257
258
|
|
|
258
|
-
var
|
|
259
|
+
var _chunk5LOARKDPcjs = require('./chunk-5LOARKDP.cjs');
|
|
259
260
|
|
|
260
261
|
|
|
261
|
-
var
|
|
262
|
+
var _chunkCYOTNHDFcjs = require('./chunk-CYOTNHDF.cjs');
|
|
262
263
|
|
|
263
264
|
|
|
264
265
|
var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
@@ -283,14 +284,14 @@ var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
|
283
284
|
var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
284
285
|
|
|
285
286
|
|
|
286
|
-
var
|
|
287
|
+
var _chunkUVQRMUARcjs = require('./chunk-UVQRMUAR.cjs');
|
|
287
288
|
|
|
288
289
|
|
|
289
|
-
var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
|
|
290
290
|
|
|
291
|
+
var _chunkNLBHLPEOcjs = require('./chunk-NLBHLPEO.cjs');
|
|
291
292
|
|
|
292
293
|
|
|
293
|
-
var
|
|
294
|
+
var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
|
|
294
295
|
|
|
295
296
|
|
|
296
297
|
var _chunkHDPT6OYEcjs = require('./chunk-HDPT6OYE.cjs');
|
|
@@ -301,6 +302,8 @@ var _chunkHDPT6OYEcjs = require('./chunk-HDPT6OYE.cjs');
|
|
|
301
302
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
302
303
|
|
|
303
304
|
|
|
305
|
+
|
|
306
|
+
|
|
304
307
|
var _chunkYTVSWXEZcjs = require('./chunk-YTVSWXEZ.cjs');
|
|
305
308
|
|
|
306
309
|
|
|
@@ -420,7 +423,7 @@ function getDocsTitle(docs) {
|
|
|
420
423
|
return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
|
|
421
424
|
}
|
|
422
425
|
function loadPages(contentDir, docs) {
|
|
423
|
-
return
|
|
426
|
+
return _chunkHFUOLILAcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunkHFUOLILAcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
|
|
424
427
|
}
|
|
425
428
|
function findSocialImagePath(html, basePath) {
|
|
426
429
|
const match = /<meta\s+property=["']og:image["']\s+content=["']([^"']+)["']/i.exec(html) || /<meta\s+content=["']([^"']+)["']\s+property=["']og:image["']/i.exec(html);
|
|
@@ -438,7 +441,7 @@ async function addHandlerRoute(routes, pathname, handler, absolutePaths) {
|
|
|
438
441
|
return response;
|
|
439
442
|
}
|
|
440
443
|
async function compileFarmDocsManifest(docs, options) {
|
|
441
|
-
const contentDir =
|
|
444
|
+
const contentDir = _chunkHFUOLILAcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
|
|
442
445
|
const pages = loadPages(contentDir, docs);
|
|
443
446
|
const basePath = _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, options.basePath);
|
|
444
447
|
const absolutePaths = [
|
|
@@ -446,7 +449,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
446
449
|
_path2.default.resolve(contentDir),
|
|
447
450
|
docs.configPath || ""
|
|
448
451
|
];
|
|
449
|
-
const handler =
|
|
452
|
+
const handler = _chunkHFUOLILAcjs.createFarmDocsHandler.call(void 0, docs, {
|
|
450
453
|
root: options.root,
|
|
451
454
|
srcDir: options.srcDir,
|
|
452
455
|
clientEntry: options.clientEntry,
|
|
@@ -456,7 +459,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
456
459
|
isPathGuarded: options.isPathGuarded,
|
|
457
460
|
basePath
|
|
458
461
|
});
|
|
459
|
-
const apiHandler =
|
|
462
|
+
const apiHandler = _chunkKDOZORJDcjs.createFarmDocsAPIHandler.call(void 0, {
|
|
460
463
|
rootDir: options.root,
|
|
461
464
|
srcDir: options.srcDir,
|
|
462
465
|
docs,
|
|
@@ -468,7 +471,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
468
471
|
const apiMarkdown = {};
|
|
469
472
|
for (const page of pages) {
|
|
470
473
|
const htmlResponse = await addHandlerRoute(routes, page.href, handler, absolutePaths);
|
|
471
|
-
const markdownPath =
|
|
474
|
+
const markdownPath = _chunkHFUOLILAcjs.getFarmDocsMarkdownPath.call(void 0, page.href);
|
|
472
475
|
await addHandlerRoute(routes, markdownPath, handler, absolutePaths);
|
|
473
476
|
if (htmlResponse) {
|
|
474
477
|
const socialImagePath = findSocialImagePath(await htmlResponse.text(), basePath);
|
|
@@ -553,7 +556,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
553
556
|
post: await compileResponse(postResponse, absolutePaths),
|
|
554
557
|
search: {
|
|
555
558
|
pages: publicPages.map((page) => ({
|
|
556
|
-
...
|
|
559
|
+
..._chunkHFUOLILAcjs.toFarmDocsMarkdownPage.call(void 0, page, basePath),
|
|
557
560
|
sourcePath: `farm-docs:${page.slug || "index"}`
|
|
558
561
|
})),
|
|
559
562
|
search: _nullishCoalesce(searchConfig, () => ( true)),
|
|
@@ -734,7 +737,7 @@ async function createFarmRouteRuntimeManifest(options) {
|
|
|
734
737
|
const routes = [];
|
|
735
738
|
for (const [pattern, entry] of options.routeManager.getRoutes()) {
|
|
736
739
|
const routeModule = await options.routeManager.loadRouteModule(entry.modulePath);
|
|
737
|
-
const rendering = await
|
|
740
|
+
const rendering = await _chunkCLEWORVYcjs.resolveRouteRenderingConfigFromFile.call(void 0, routeModule, entry.modulePath);
|
|
738
741
|
const runtimeConfig = await options.routeManager.resolveRouteRuntimeConfig(pattern);
|
|
739
742
|
routes.push({
|
|
740
743
|
kind: "page",
|
|
@@ -1044,14 +1047,40 @@ function buildFarmVercelRoutes(options) {
|
|
|
1044
1047
|
function escapeRegExp2(value) {
|
|
1045
1048
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1046
1049
|
}
|
|
1050
|
+
var FARM_VERCEL_ROUTE_SOURCE_MAX_LENGTH = 4096;
|
|
1051
|
+
function groupFarmVercelRouteAlternatives(items, alternative) {
|
|
1052
|
+
const groups = [];
|
|
1053
|
+
let current = null;
|
|
1054
|
+
const frame = 6;
|
|
1055
|
+
for (const item of items) {
|
|
1056
|
+
const part = alternative(item);
|
|
1057
|
+
if (part.length + frame > FARM_VERCEL_ROUTE_SOURCE_MAX_LENGTH) {
|
|
1058
|
+
throw new Error(
|
|
1059
|
+
`Farm cannot route ${JSON.stringify(part.slice(0, 80))}\u2026 on Vercel: its pattern is longer than Vercel's ${FARM_VERCEL_ROUTE_SOURCE_MAX_LENGTH}-character limit for a route. Shorten the page's path.`
|
|
1060
|
+
);
|
|
1061
|
+
}
|
|
1062
|
+
if (current && current.length + 1 + part.length > FARM_VERCEL_ROUTE_SOURCE_MAX_LENGTH) {
|
|
1063
|
+
groups.push({ src: `^(?:${current.parts.join("|")})$`, items: current.items });
|
|
1064
|
+
current = null;
|
|
1065
|
+
}
|
|
1066
|
+
if (!current) current = { parts: [], items: [], length: frame - 1 };
|
|
1067
|
+
current.parts.push(part);
|
|
1068
|
+
current.items.push(item);
|
|
1069
|
+
current.length += 1 + part.length;
|
|
1070
|
+
}
|
|
1071
|
+
if (current) groups.push({ src: `^(?:${current.parts.join("|")})$`, items: current.items });
|
|
1072
|
+
return groups;
|
|
1073
|
+
}
|
|
1047
1074
|
function createFarmVercelCanonicalSlashRoutes(publicPaths) {
|
|
1048
1075
|
const otherSpellings = [
|
|
1049
1076
|
...new Set(
|
|
1050
1077
|
publicPaths.filter((pathname) => pathname !== "/").map((pathname) => pathname.endsWith("/") ? pathname.replace(/\/+$/, "") : `${pathname}/`).filter((pathname) => pathname !== "")
|
|
1051
1078
|
)
|
|
1052
1079
|
];
|
|
1053
|
-
|
|
1054
|
-
|
|
1080
|
+
return groupFarmVercelRouteAlternatives(otherSpellings, escapeRegExp2).map((group) => ({
|
|
1081
|
+
src: group.src,
|
|
1082
|
+
dest: "/__nitro"
|
|
1083
|
+
}));
|
|
1055
1084
|
}
|
|
1056
1085
|
|
|
1057
1086
|
// src/nitro/ssr-public-assets.ts
|
|
@@ -1321,7 +1350,7 @@ function farmStripPlatformConfigPlugin(configFiles) {
|
|
|
1321
1350
|
// removed block used (`readFileSync` for a version, say).
|
|
1322
1351
|
enforce: "pre",
|
|
1323
1352
|
transform: {
|
|
1324
|
-
filter: { id:
|
|
1353
|
+
filter: { id: _chunkTAU3OF5Bcjs.fileNamePattern.call(void 0, configFiles) },
|
|
1325
1354
|
async handler(code, id) {
|
|
1326
1355
|
const file = id.split("?", 1)[0];
|
|
1327
1356
|
if (!files.has(_path2.default.resolve(file)) && !files.has(realPath(file))) return null;
|
|
@@ -1462,18 +1491,17 @@ function toFarmVercelEdgeGuardedUrls(pathnames, basePath) {
|
|
|
1462
1491
|
...new Set(pathnames.flatMap((pathname) => [pathname, _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, pathname, basePath)]))
|
|
1463
1492
|
];
|
|
1464
1493
|
}
|
|
1465
|
-
function
|
|
1494
|
+
function createFarmVercelEdgeMiddlewareRoutes(pathnames, basePath = "/") {
|
|
1466
1495
|
const publicPaths = toFarmVercelEdgeGuardedUrls(pathnames, basePath);
|
|
1467
|
-
|
|
1496
|
+
return groupFarmVercelRouteAlternatives(publicPaths, (pathname) => {
|
|
1468
1497
|
const trimmed = pathname.replace(/\/+$/, "");
|
|
1469
1498
|
return trimmed ? `${escapeRegExp3(trimmed)}(?:/|/index\\.html|\\.html)?` : "/(?:index\\.html)?";
|
|
1470
|
-
})
|
|
1471
|
-
|
|
1472
|
-
src: `^(?:${alternatives.join("|")})$`,
|
|
1499
|
+
}).map((group) => ({
|
|
1500
|
+
src: group.src,
|
|
1473
1501
|
middlewarePath: FARM_VERCEL_EDGE_MIDDLEWARE_FUNCTION,
|
|
1474
|
-
middlewareRawSrc:
|
|
1502
|
+
middlewareRawSrc: group.items,
|
|
1475
1503
|
continue: true
|
|
1476
|
-
};
|
|
1504
|
+
}));
|
|
1477
1505
|
}
|
|
1478
1506
|
function generateFarmVercelEdgeMiddlewareEntry(routes, config, guardedPages) {
|
|
1479
1507
|
const imports = routes.map(
|
|
@@ -1549,7 +1577,7 @@ async function writeFarmVercelEdgeMiddlewareFunction(options) {
|
|
|
1549
1577
|
logLevel: "silent",
|
|
1550
1578
|
plugins: [edgeNodeModulesPlugin(coreDir, unsupported)],
|
|
1551
1579
|
resolve: {
|
|
1552
|
-
alias:
|
|
1580
|
+
alias: _chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
1553
1581
|
conditionNames: ["edge-light", "worker", "browser", "import", "module", "default"]
|
|
1554
1582
|
},
|
|
1555
1583
|
transform: {
|
|
@@ -1938,7 +1966,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
|
|
|
1938
1966
|
return {
|
|
1939
1967
|
name: "farm-omitted-metadata-image-runtime",
|
|
1940
1968
|
resolveId: {
|
|
1941
|
-
filter: { id:
|
|
1969
|
+
filter: { id: _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, ["@vercel/og"]) },
|
|
1942
1970
|
handler(source, importer) {
|
|
1943
1971
|
if (source !== "@vercel/og") return null;
|
|
1944
1972
|
const fromCoreRuntime = importer !== void 0 && isFarmCoreModule(importer) && !/^og\.[cm]?[jt]sx?$/.test(_path2.default.basename(importer.split("?", 1)[0]));
|
|
@@ -1947,7 +1975,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
|
|
|
1947
1975
|
}
|
|
1948
1976
|
},
|
|
1949
1977
|
load: {
|
|
1950
|
-
filter: { id:
|
|
1978
|
+
filter: { id: _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID]) },
|
|
1951
1979
|
handler(id) {
|
|
1952
1980
|
if (id !== FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID) return null;
|
|
1953
1981
|
return `
|
|
@@ -2350,7 +2378,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
|
|
|
2350
2378
|
const routeRuntimeManifestResultPromise = Promise.allSettled([routeRuntimeManifestPromise]);
|
|
2351
2379
|
const pageRoutes = [];
|
|
2352
2380
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|
|
2353
|
-
const markdownSourcePath = entry.markdownSourcePath || (
|
|
2381
|
+
const markdownSourcePath = entry.markdownSourcePath || (_chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? entry.modulePath : void 0);
|
|
2354
2382
|
pageRoutes.push({
|
|
2355
2383
|
pattern,
|
|
2356
2384
|
...entry.directory ? { directory: entry.directory } : {},
|
|
@@ -2619,7 +2647,7 @@ async function mergeBuiltFontCss(outputDir, fontCssSource) {
|
|
|
2619
2647
|
}
|
|
2620
2648
|
const normalizedFontCss = typeof fontCss === "string" ? fontCss : Buffer.from(fontCss).toString("utf8");
|
|
2621
2649
|
await fs4.writeFile(fontCssPath, normalizedFontCss);
|
|
2622
|
-
await fs4.writeFile(clientCssPath,
|
|
2650
|
+
await fs4.writeFile(clientCssPath, _chunkTAU3OF5Bcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
|
|
2623
2651
|
}
|
|
2624
2652
|
function importsFarmClientBlockedPackage(id, packageName) {
|
|
2625
2653
|
return id === packageName || id.startsWith(`${packageName}/`);
|
|
@@ -2672,7 +2700,7 @@ function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, optio
|
|
|
2672
2700
|
const key = `${_path2.default.resolve(root)}\0${mode}\0${options.asyncOwnerIslands === true}\0${options.serverOwners === true}\0${options.serverTreeLayouts === true}\0${_path2.default.resolve(modulePath)}`;
|
|
2673
2701
|
let plan = cache.get(key);
|
|
2674
2702
|
if (!plan) {
|
|
2675
|
-
plan =
|
|
2703
|
+
plan = _chunkHTXKSREFcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
|
|
2676
2704
|
cache.set(key, plan);
|
|
2677
2705
|
}
|
|
2678
2706
|
return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
|
|
@@ -2680,7 +2708,7 @@ function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, optio
|
|
|
2680
2708
|
async function buildClient(productionVite, config, root, srcDir, outputDir, pageRoutes, layoutRoutes = [], routeSlots = [], isolatedClientBoundaryModules = /* @__PURE__ */ new Set(), hydrationPlanCache = /* @__PURE__ */ new Map(), rendererBuildLifetime, programmaticClientRoutes, mobile = false) {
|
|
2681
2709
|
if (!mobile) await _chunkE5UN4OWXcjs.removeFarmMobileClientManifest.call(void 0, _path2.default.dirname(outputDir));
|
|
2682
2710
|
const viteBuild = productionVite.build;
|
|
2683
|
-
const { farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
|
|
2711
|
+
const { farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
|
|
2684
2712
|
const { PluginManager: PluginManager2 } = await import("./plugin-5PIQQVRP.cjs");
|
|
2685
2713
|
const fs4 = await import("fs/promises");
|
|
2686
2714
|
const pluginManager = new PluginManager2({
|
|
@@ -2701,14 +2729,14 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2701
2729
|
`[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
|
|
2702
2730
|
);
|
|
2703
2731
|
}
|
|
2704
|
-
const isolatedMode =
|
|
2732
|
+
const isolatedMode = _chunkHTXKSREFcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
2705
2733
|
_optionalChain([config, 'access', _86 => _86.experimental, 'optionalAccess', _87 => _87.isolatedClientHydration]),
|
|
2706
2734
|
{
|
|
2707
2735
|
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _88 => _88.experimental, 'optionalAccess', _89 => _89.serverComponents])) === "rsc",
|
|
2708
2736
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
2709
2737
|
}
|
|
2710
2738
|
);
|
|
2711
|
-
const planOptions =
|
|
2739
|
+
const planOptions = _chunkHTXKSREFcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
2712
2740
|
config.renderer,
|
|
2713
2741
|
Boolean(unsupportedIntegrationProvider)
|
|
2714
2742
|
);
|
|
@@ -2720,58 +2748,13 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2720
2748
|
...planOptions,
|
|
2721
2749
|
serverTreeLayouts: pagePlanOptions.serverOwners
|
|
2722
2750
|
};
|
|
2723
|
-
const
|
|
2724
|
-
try {
|
|
2725
|
-
const metadata = getCachedClientModuleHydrationPlan(
|
|
2726
|
-
layout.modulePath,
|
|
2727
|
-
root,
|
|
2728
|
-
isolatedMode,
|
|
2729
|
-
hydrationPlanCache,
|
|
2730
|
-
layoutPlanOptions
|
|
2731
|
-
);
|
|
2732
|
-
return {
|
|
2733
|
-
...layout,
|
|
2734
|
-
shouldHydrate: metadata.shouldHydrate,
|
|
2735
|
-
islandStrategy: metadata.islandStrategy,
|
|
2736
|
-
legacyShouldHydrate: metadata.legacyShouldHydrate,
|
|
2737
|
-
legacyIslandStrategy: metadata.legacyIslandStrategy,
|
|
2738
|
-
mode: metadata.mode,
|
|
2739
|
-
estimatedIsolatedRootCount: metadata.estimatedIsolatedRootCount,
|
|
2740
|
-
hasIsolatedClientBoundaries: metadata.hasIsolatedClientBoundaries,
|
|
2741
|
-
isolatedHydrationEligible: metadata.isolatedHydrationEligible,
|
|
2742
|
-
isolatedBoundaries: metadata.isolatedBoundaries,
|
|
2743
|
-
asyncOwnerIslands: metadata.asyncOwnerIslands,
|
|
2744
|
-
suppressedAsyncHydration: metadata.suppressedAsyncHydration,
|
|
2745
|
-
fallbackReason: metadata.fallbackReason,
|
|
2746
|
-
serverTreeLayout: metadata.serverTreeLayout
|
|
2747
|
-
};
|
|
2748
|
-
} catch (error) {
|
|
2749
|
-
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F Could not inspect layout file ${layout.modulePath}: ${error}`);
|
|
2750
|
-
return {
|
|
2751
|
-
...layout,
|
|
2752
|
-
shouldHydrate: false,
|
|
2753
|
-
islandStrategy: null,
|
|
2754
|
-
legacyShouldHydrate: false,
|
|
2755
|
-
legacyIslandStrategy: null,
|
|
2756
|
-
mode: isolatedMode,
|
|
2757
|
-
estimatedIsolatedRootCount: 0,
|
|
2758
|
-
hasIsolatedClientBoundaries: false,
|
|
2759
|
-
isolatedHydrationEligible: false,
|
|
2760
|
-
isolatedBoundaries: [],
|
|
2761
|
-
asyncOwnerIslands: void 0,
|
|
2762
|
-
suppressedAsyncHydration: void 0,
|
|
2763
|
-
fallbackReason: void 0,
|
|
2764
|
-
serverTreeLayout: void 0
|
|
2765
|
-
};
|
|
2766
|
-
}
|
|
2767
|
-
});
|
|
2768
|
-
const layoutAppliesToRoute = _chunk2MR4MABGcjs.routeBoundaryCoversDirectory;
|
|
2751
|
+
const layoutAppliesToRoute = _chunkPXAHSCR6cjs.routeBoundaryCoversDirectory;
|
|
2769
2752
|
const routeDirectory = (route) => _nullishCoalesce(route.directory, () => ( route.pattern));
|
|
2770
2753
|
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _92 => _92.experimental, 'optionalAccess', _93 => _93.serverComponents])) === "islands";
|
|
2771
2754
|
const adapterOwnsDocsRuntime = Boolean(
|
|
2772
2755
|
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _94 => _94.docs, 'optionalAccess', _95 => _95.enabled]) && _optionalChain([config, 'access', _96 => _96.docs, 'access', _97 => _97.adapter, 'optionalAccess', _98 => _98.server]) && config.docs.adapter.react
|
|
2773
2756
|
);
|
|
2774
|
-
const docsEntries = _optionalChain([config, 'access', _99 => _99.docs, 'optionalAccess', _100 => _100.enabled]) ?
|
|
2757
|
+
const docsEntries = _optionalChain([config, 'access', _99 => _99.docs, 'optionalAccess', _100 => _100.enabled]) ? _chunkHFUOLILAcjs.getFarmDocsRoots.call(void 0, config.docs).map(
|
|
2775
2758
|
(docsRoot) => `/${docsRoot.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/"
|
|
2776
2759
|
) : [];
|
|
2777
2760
|
const adapterDocsEntry = _nullishCoalesce(docsEntries[0], () => ( null));
|
|
@@ -2780,159 +2763,209 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2780
2763
|
);
|
|
2781
2764
|
const syntheticDocsEntry = _optionalChain([config, 'access', _101 => _101.docs, 'optionalAccess', _102 => _102.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
|
|
2782
2765
|
const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
|
|
2783
|
-
const
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
depth: pattern.split("/").filter(Boolean).length,
|
|
2814
|
-
metadata: {
|
|
2815
|
-
mode: isolatedMode,
|
|
2766
|
+
const { clientLayouts, clientRouteSlots } = _chunkHTXKSREFcjs.withFarmSourceSnapshot.call(void 0, () => {
|
|
2767
|
+
const clientLayouts2 = layoutRoutes.map((layout) => {
|
|
2768
|
+
try {
|
|
2769
|
+
const metadata = getCachedClientModuleHydrationPlan(
|
|
2770
|
+
layout.modulePath,
|
|
2771
|
+
root,
|
|
2772
|
+
isolatedMode,
|
|
2773
|
+
hydrationPlanCache,
|
|
2774
|
+
layoutPlanOptions
|
|
2775
|
+
);
|
|
2776
|
+
return {
|
|
2777
|
+
...layout,
|
|
2778
|
+
shouldHydrate: metadata.shouldHydrate,
|
|
2779
|
+
islandStrategy: metadata.islandStrategy,
|
|
2780
|
+
legacyShouldHydrate: metadata.legacyShouldHydrate,
|
|
2781
|
+
legacyIslandStrategy: metadata.legacyIslandStrategy,
|
|
2782
|
+
mode: metadata.mode,
|
|
2783
|
+
estimatedIsolatedRootCount: metadata.estimatedIsolatedRootCount,
|
|
2784
|
+
hasIsolatedClientBoundaries: metadata.hasIsolatedClientBoundaries,
|
|
2785
|
+
isolatedHydrationEligible: metadata.isolatedHydrationEligible,
|
|
2786
|
+
isolatedBoundaries: metadata.isolatedBoundaries,
|
|
2787
|
+
asyncOwnerIslands: metadata.asyncOwnerIslands,
|
|
2788
|
+
suppressedAsyncHydration: metadata.suppressedAsyncHydration,
|
|
2789
|
+
fallbackReason: metadata.fallbackReason,
|
|
2790
|
+
serverTreeLayout: metadata.serverTreeLayout
|
|
2791
|
+
};
|
|
2792
|
+
} catch (error) {
|
|
2793
|
+
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F Could not inspect layout file ${layout.modulePath}: ${error}`);
|
|
2794
|
+
return {
|
|
2795
|
+
...layout,
|
|
2816
2796
|
shouldHydrate: false,
|
|
2817
2797
|
islandStrategy: null,
|
|
2818
2798
|
legacyShouldHydrate: false,
|
|
2819
2799
|
legacyIslandStrategy: null,
|
|
2800
|
+
mode: isolatedMode,
|
|
2820
2801
|
estimatedIsolatedRootCount: 0,
|
|
2821
2802
|
hasIsolatedClientBoundaries: false,
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
for (const layout of clientLayouts) {
|
|
2830
|
-
const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
|
|
2831
|
-
if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
|
|
2832
|
-
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F ${_chunk2IFT2CSAcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`);
|
|
2833
|
-
}
|
|
2834
|
-
}
|
|
2835
|
-
if (isolatedMode === "analyze") {
|
|
2836
|
-
for (const { entry, metadata } of [
|
|
2837
|
-
...clientLayouts.map((layout) => ({ entry: layout, metadata: layout })),
|
|
2838
|
-
...routePlans.map(({ route, metadata: metadata2 }) => ({ entry: route, metadata: metadata2 }))
|
|
2839
|
-
]) {
|
|
2840
|
-
if (!("isolatedHydrationEligible" in metadata) || !metadata.isolatedHydrationEligible) {
|
|
2841
|
-
continue;
|
|
2803
|
+
isolatedHydrationEligible: false,
|
|
2804
|
+
isolatedBoundaries: [],
|
|
2805
|
+
asyncOwnerIslands: void 0,
|
|
2806
|
+
suppressedAsyncHydration: void 0,
|
|
2807
|
+
fallbackReason: void 0,
|
|
2808
|
+
serverTreeLayout: void 0
|
|
2809
|
+
};
|
|
2842
2810
|
}
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
)
|
|
2846
|
-
}
|
|
2847
|
-
}
|
|
2848
|
-
const serverSlotPlans = islandsMode ? routeSlots.flatMap((slot) => {
|
|
2849
|
-
const plan = getCachedClientModuleHydrationPlan(
|
|
2850
|
-
slot.modulePath,
|
|
2811
|
+
});
|
|
2812
|
+
const markdownPagePlan = _chunkHTXKSREFcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
2813
|
+
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), root),
|
|
2851
2814
|
root,
|
|
2852
2815
|
isolatedMode,
|
|
2853
|
-
|
|
2854
|
-
{ ...pagePlanOptions, serverOwners: true }
|
|
2816
|
+
{ ...planOptions, packageReferences: pagePlanOptions.serverOwners }
|
|
2855
2817
|
);
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2818
|
+
const routePlans = pageRoutes.map((route) => ({
|
|
2819
|
+
route,
|
|
2820
|
+
metadata: _chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
|
|
2821
|
+
route.modulePath,
|
|
2822
|
+
root,
|
|
2823
|
+
isolatedMode,
|
|
2824
|
+
hydrationPlanCache,
|
|
2825
|
+
pagePlanOptions
|
|
2826
|
+
)
|
|
2827
|
+
}));
|
|
2828
|
+
_chunkHTXKSREFcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
2829
|
+
clientLayouts2.map((layout) => ({
|
|
2830
|
+
pattern: layout.pattern,
|
|
2831
|
+
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
2832
|
+
metadata: layout
|
|
2833
|
+
})),
|
|
2834
|
+
[
|
|
2835
|
+
...routePlans.map(({ route, metadata }) => ({
|
|
2836
|
+
pattern: routeDirectory(route),
|
|
2837
|
+
depth: _chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, routeDirectory(route)),
|
|
2838
|
+
metadata
|
|
2839
|
+
})),
|
|
2840
|
+
...syntheticDocsPatterns.map((pattern) => ({
|
|
2841
|
+
pattern,
|
|
2842
|
+
depth: pattern.split("/").filter(Boolean).length,
|
|
2843
|
+
metadata: {
|
|
2844
|
+
mode: isolatedMode,
|
|
2845
|
+
shouldHydrate: false,
|
|
2846
|
+
islandStrategy: null,
|
|
2847
|
+
legacyShouldHydrate: false,
|
|
2848
|
+
legacyIslandStrategy: null,
|
|
2849
|
+
estimatedIsolatedRootCount: 0,
|
|
2850
|
+
hasIsolatedClientBoundaries: false,
|
|
2851
|
+
isolatedBoundaries: []
|
|
2852
|
+
}
|
|
2853
|
+
}))
|
|
2854
|
+
],
|
|
2855
|
+
layoutAppliesToRoute,
|
|
2856
|
+
{ serverOwners: islandsMode }
|
|
2857
|
+
);
|
|
2858
|
+
for (const layout of clientLayouts2) {
|
|
2859
|
+
const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
|
|
2860
|
+
if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
|
|
2865
2861
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
2866
|
-
`\u26A0\uFE0F ${
|
|
2862
|
+
`\u26A0\uFE0F ${_chunkHTXKSREFcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`
|
|
2867
2863
|
);
|
|
2868
2864
|
}
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2865
|
+
}
|
|
2866
|
+
if (isolatedMode === "analyze") {
|
|
2867
|
+
for (const { entry, metadata } of [
|
|
2868
|
+
...clientLayouts2.map((layout) => ({ entry: layout, metadata: layout })),
|
|
2869
|
+
...routePlans.map(({ route, metadata: metadata2 }) => ({ entry: route, metadata: metadata2 }))
|
|
2870
|
+
]) {
|
|
2871
|
+
if (!("isolatedHydrationEligible" in metadata) || !metadata.isolatedHydrationEligible) {
|
|
2872
|
+
continue;
|
|
2873
|
+
}
|
|
2874
|
+
_chunkQMNWKQL4cjs.logger.info(
|
|
2875
|
+
`\u{1F4CA} Isolated hydration analysis: ${entry.modulePath} can exclude its server owner and hydrate ${metadata.isolatedBoundaries.length} client ${metadata.isolatedBoundaries.length === 1 ? "boundary" : "boundaries"}.`
|
|
2880
2876
|
);
|
|
2881
|
-
clientPages.push({
|
|
2882
|
-
...route,
|
|
2883
|
-
relativePath,
|
|
2884
|
-
pageShouldHydrate: metadata.shouldHydrate,
|
|
2885
|
-
islandStrategy,
|
|
2886
|
-
hasIsolatedClientBoundaries: metadata.hasIsolatedClientBoundaries || applicableClientLayouts.some((layout) => layout.hasIsolatedClientBoundaries) || slotBoundaries.length > 0,
|
|
2887
|
-
isolatedBoundaries: [
|
|
2888
|
-
...metadata.hasIsolatedClientBoundaries ? metadata.isolatedBoundaries : [],
|
|
2889
|
-
...slotBoundaries,
|
|
2890
|
-
...applicableClientLayouts.filter((layout) => layout.hasIsolatedClientBoundaries || layout.serverTreeLayout).flatMap((layout) => layout.isolatedBoundaries)
|
|
2891
|
-
],
|
|
2892
|
-
// The server renders a server tree only below a hydrating layout.
|
|
2893
|
-
..._chunk2IFT2CSAcjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
|
|
2894
|
-
});
|
|
2895
|
-
_chunkQMNWKQL4cjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
|
|
2896
2877
|
}
|
|
2897
|
-
} catch (error) {
|
|
2898
|
-
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F Could not inspect route file ${route.modulePath}: ${error}`);
|
|
2899
2878
|
}
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
const hydrationStrategies = applicableClientLayouts.flatMap(
|
|
2908
|
-
(layout) => layout.islandStrategy ? [layout.islandStrategy] : []
|
|
2879
|
+
const serverSlotPlans = islandsMode ? routeSlots.flatMap((slot) => {
|
|
2880
|
+
const plan = getCachedClientModuleHydrationPlan(
|
|
2881
|
+
slot.modulePath,
|
|
2882
|
+
root,
|
|
2883
|
+
isolatedMode,
|
|
2884
|
+
hydrationPlanCache,
|
|
2885
|
+
{ ...pagePlanOptions, serverOwners: true }
|
|
2909
2886
|
);
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2887
|
+
return plan.isClientComponent ? [] : [{ slot, plan }];
|
|
2888
|
+
}) : [];
|
|
2889
|
+
for (const { route, metadata } of routePlans) {
|
|
2890
|
+
if (isAdapterDocsRoute(route.pattern)) continue;
|
|
2891
|
+
try {
|
|
2892
|
+
const applicableClientLayouts = clientLayouts2.filter(
|
|
2893
|
+
(layout) => (layout.shouldHydrate || layout.hasIsolatedClientBoundaries) && layoutAppliesToRoute(layout.pattern, routeDirectory(route))
|
|
2894
|
+
);
|
|
2895
|
+
if (metadata.suppressedAsyncHydration) {
|
|
2896
|
+
_chunkQMNWKQL4cjs.logger.warn(
|
|
2897
|
+
`\u26A0\uFE0F ${_chunkHTXKSREFcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
|
|
2898
|
+
);
|
|
2899
|
+
}
|
|
2900
|
+
const slotBoundaries = serverSlotPlans.filter(
|
|
2901
|
+
({ slot }) => layoutAppliesToRoute(_nullishCoalesce(slot.ownerDirectory, () => ( slot.ownerPattern)), routeDirectory(route))
|
|
2902
|
+
).flatMap(({ plan }) => plan.isolatedBoundaries);
|
|
2903
|
+
if (metadata.shouldHydrate || metadata.hasIsolatedClientBoundaries || applicableClientLayouts.length > 0 || slotBoundaries.length > 0) {
|
|
2904
|
+
const relativePath = route.modulePath.replace(root, "").replace(/^\//, "");
|
|
2905
|
+
const islandStrategy = _chunkTAU3OF5Bcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
2906
|
+
route,
|
|
2907
|
+
metadata,
|
|
2908
|
+
clientLayouts2,
|
|
2909
|
+
root,
|
|
2910
|
+
islandsMode
|
|
2911
|
+
);
|
|
2912
|
+
clientPages.push({
|
|
2913
|
+
...route,
|
|
2914
|
+
relativePath,
|
|
2915
|
+
pageShouldHydrate: metadata.shouldHydrate,
|
|
2916
|
+
islandStrategy,
|
|
2917
|
+
hasIsolatedClientBoundaries: metadata.hasIsolatedClientBoundaries || applicableClientLayouts.some((layout) => layout.hasIsolatedClientBoundaries) || slotBoundaries.length > 0,
|
|
2918
|
+
isolatedBoundaries: [
|
|
2919
|
+
...metadata.hasIsolatedClientBoundaries ? metadata.isolatedBoundaries : [],
|
|
2920
|
+
...slotBoundaries,
|
|
2921
|
+
...applicableClientLayouts.filter((layout) => layout.hasIsolatedClientBoundaries || layout.serverTreeLayout).flatMap((layout) => layout.isolatedBoundaries)
|
|
2922
|
+
],
|
|
2923
|
+
// The server renders a server tree only below a hydrating layout.
|
|
2924
|
+
..._chunkHTXKSREFcjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
|
|
2925
|
+
});
|
|
2926
|
+
_chunkQMNWKQL4cjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
|
|
2927
|
+
}
|
|
2928
|
+
} catch (error) {
|
|
2929
|
+
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F Could not inspect route file ${route.modulePath}: ${error}`);
|
|
2930
|
+
}
|
|
2926
2931
|
}
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2932
|
+
if (syntheticDocsEntry) {
|
|
2933
|
+
const docsEntry = syntheticDocsEntry;
|
|
2934
|
+
const applicableClientLayouts = clientLayouts2.filter(
|
|
2935
|
+
(layout) => (layout.shouldHydrate || layout.hasIsolatedClientBoundaries) && layoutAppliesToRoute(layout.pattern, docsEntry)
|
|
2936
|
+
);
|
|
2937
|
+
if (applicableClientLayouts.length > 0) {
|
|
2938
|
+
const hydrationStrategies = applicableClientLayouts.flatMap(
|
|
2939
|
+
(layout) => layout.islandStrategy ? [layout.islandStrategy] : []
|
|
2940
|
+
);
|
|
2941
|
+
const islandStrategy = hydrationStrategies.every(
|
|
2942
|
+
(strategy) => strategy === hydrationStrategies[0]
|
|
2943
|
+
) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
|
|
2944
|
+
const docsClientRoutes = syntheticDocsPatterns.map((pattern) => ({
|
|
2945
|
+
pattern,
|
|
2946
|
+
docs: true,
|
|
2947
|
+
modulePath: "",
|
|
2948
|
+
relativePath: "",
|
|
2949
|
+
pageShouldHydrate: false,
|
|
2950
|
+
islandStrategy,
|
|
2951
|
+
hasIsolatedClientBoundaries: applicableClientLayouts.some(
|
|
2952
|
+
(layout) => layout.hasIsolatedClientBoundaries
|
|
2953
|
+
),
|
|
2954
|
+
isolatedBoundaries: applicableClientLayouts.filter((layout) => layout.hasIsolatedClientBoundaries || layout.serverTreeLayout).flatMap((layout) => layout.isolatedBoundaries)
|
|
2955
|
+
}));
|
|
2956
|
+
clientPages.unshift(...docsClientRoutes);
|
|
2957
|
+
}
|
|
2935
2958
|
}
|
|
2959
|
+
const clientRouteSlots2 = routeSlots.filter((slot) => {
|
|
2960
|
+
try {
|
|
2961
|
+
const metadata = _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root);
|
|
2962
|
+
return metadata.shouldHydrate && (!islandsMode || metadata.isClientComponent);
|
|
2963
|
+
} catch (error) {
|
|
2964
|
+
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
|
|
2965
|
+
return false;
|
|
2966
|
+
}
|
|
2967
|
+
});
|
|
2968
|
+
return { clientLayouts: clientLayouts2, clientRouteSlots: clientRouteSlots2 };
|
|
2936
2969
|
});
|
|
2937
2970
|
_chunkQMNWKQL4cjs.logger.info(
|
|
2938
2971
|
`\u{1F4F1} Total hydratable routes detected: ${clientPages.length} pages, ${clientLayouts.filter((layout) => layout.shouldHydrate || layout.hasIsolatedClientBoundaries).length} layouts, and ${clientRouteSlots.length} slots`
|
|
@@ -2950,7 +2983,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2950
2983
|
srcDir,
|
|
2951
2984
|
adapterOwnsDocsRuntime ? false : _chunkDZZHTMWMcjs.isFarmDocsSearchEnabled.call(void 0, config.docs),
|
|
2952
2985
|
adapterOwnsDocsRuntime ? void 0 : _chunkDZZHTMWMcjs.resolveFarmDocsSearchClientModule.call(void 0, root),
|
|
2953
|
-
_optionalChain([config, 'access', _103 => _103.docs, 'optionalAccess', _104 => _104.enabled]) ?
|
|
2986
|
+
_optionalChain([config, 'access', _103 => _103.docs, 'optionalAccess', _104 => _104.enabled]) ? _chunkHFUOLILAcjs.getFarmDocsRoots.call(void 0, config.docs).map((docsRoot) => docsRoot.entry) : void 0,
|
|
2954
2987
|
adapterOwnsDocsRuntime ? _optionalChain([config, 'access', _105 => _105.docs, 'access', _106 => _106.adapter, 'optionalAccess', _107 => _107.react]) : void 0,
|
|
2955
2988
|
config.i18n,
|
|
2956
2989
|
config.plugins,
|
|
@@ -2959,11 +2992,11 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2959
2992
|
config.trailingSlash,
|
|
2960
2993
|
_chunkJX5VOLAVcjs.getIntegrationProviders.call(void 0, config.integrations),
|
|
2961
2994
|
config.basePath,
|
|
2962
|
-
|
|
2995
|
+
_chunkTAU3OF5Bcjs.generateClientCachePersistenceCode.call(void 0, _chunkTAU3OF5Bcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
|
|
2963
2996
|
adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0,
|
|
2964
2997
|
_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _108 => _108.experimental, 'optionalAccess', _109 => _109.serverComponents])) === "islands",
|
|
2965
2998
|
platform,
|
|
2966
|
-
islandsMode ?
|
|
2999
|
+
islandsMode ? _chunkHTXKSREFcjs.collectFarmServerStylesheets.call(void 0,
|
|
2967
3000
|
[
|
|
2968
3001
|
...layoutRoutes.map((layout) => layout.modulePath),
|
|
2969
3002
|
...pageRoutes.filter((route) => !isAdapterDocsRoute(route.pattern)).map((route) => route.modulePath)
|
|
@@ -2978,7 +3011,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2978
3011
|
await fs4.writeFile(_path2.default.join(clientEntryDir, "farm-client-router.tsx"), clientEntry.router);
|
|
2979
3012
|
}
|
|
2980
3013
|
const clientInput = { [entryName]: clientEntryPath };
|
|
2981
|
-
if (platform === "web" &&
|
|
3014
|
+
if (platform === "web" && _chunkTAU3OF5Bcjs.canBootFarmIslandsClient.call(void 0, config)) {
|
|
2982
3015
|
const clientBootPath = _path2.default.join(clientEntryDir, "farm-client-boot.tsx");
|
|
2983
3016
|
await fs4.writeFile(
|
|
2984
3017
|
clientBootPath,
|
|
@@ -3050,7 +3083,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3050
3083
|
}
|
|
3051
3084
|
},
|
|
3052
3085
|
plugins: [
|
|
3053
|
-
|
|
3086
|
+
_chunkTAU3OF5Bcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
3054
3087
|
createFarmPrivateClientSourcemapsPlugin({
|
|
3055
3088
|
outDir: _path2.default.join(
|
|
3056
3089
|
_path2.default.dirname(outputDir),
|
|
@@ -3082,7 +3115,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3082
3115
|
...rendererVitePlugins,
|
|
3083
3116
|
...config.vite.plugins || [],
|
|
3084
3117
|
farmServerOnlyEntriesPlugin({ platform }),
|
|
3085
|
-
|
|
3118
|
+
_chunkTAU3OF5Bcjs.farmDocsClientConfigPlugin.call(void 0,
|
|
3086
3119
|
adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
|
|
3087
3120
|
),
|
|
3088
3121
|
// Plugin to redirect @farm.js/core imports to client-only exports
|
|
@@ -3115,7 +3148,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3115
3148
|
},
|
|
3116
3149
|
load: {
|
|
3117
3150
|
filter: {
|
|
3118
|
-
id:
|
|
3151
|
+
id: _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [
|
|
3119
3152
|
"\0empty-module",
|
|
3120
3153
|
"\0empty-api-route",
|
|
3121
3154
|
"\0farm-i18n-client-bridge",
|
|
@@ -3148,11 +3181,12 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3148
3181
|
}
|
|
3149
3182
|
}
|
|
3150
3183
|
},
|
|
3184
|
+
farmIslandContainersPlugin(config),
|
|
3151
3185
|
farmPlugin(
|
|
3152
3186
|
{ ...config, isolatedClientBoundaryModules, programmaticClientRoutes },
|
|
3153
3187
|
pluginManager
|
|
3154
3188
|
),
|
|
3155
|
-
|
|
3189
|
+
_chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
3156
3190
|
],
|
|
3157
3191
|
mode: "production",
|
|
3158
3192
|
css: postcssSearchPath ? {
|
|
@@ -3160,7 +3194,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3160
3194
|
} : void 0,
|
|
3161
3195
|
// Ensure React is bundled for client
|
|
3162
3196
|
resolve: {
|
|
3163
|
-
alias:
|
|
3197
|
+
alias: _chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
3164
3198
|
dedupe: [...config.renderer.dedupe || []]
|
|
3165
3199
|
},
|
|
3166
3200
|
// Optimize dependencies - exclude server-side code from client bundle
|
|
@@ -3174,7 +3208,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3174
3208
|
}
|
|
3175
3209
|
};
|
|
3176
3210
|
await viteBuild(
|
|
3177
|
-
|
|
3211
|
+
_chunkTAU3OF5Bcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite, { clientOutput: true })
|
|
3178
3212
|
);
|
|
3179
3213
|
if (platform === "mobile") {
|
|
3180
3214
|
await fs4.rm(_path2.default.join(outputDir, `${entryName}.css`), { force: true });
|
|
@@ -3275,7 +3309,7 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
|
|
|
3275
3309
|
return response;
|
|
3276
3310
|
}
|
|
3277
3311
|
|
|
3278
|
-
${streamNavigations ?
|
|
3312
|
+
${streamNavigations ? _chunkTAU3OF5Bcjs.FARM_NAVIGATION_STREAM_READER_SOURCE : ""}
|
|
3279
3313
|
|
|
3280
3314
|
function clearFarmPrefetchCacheOnDeploymentMismatch(router, error) {
|
|
3281
3315
|
if (error?.name === "FarmDeploymentMismatchError") {
|
|
@@ -4244,7 +4278,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
|
|
|
4244
4278
|
import { createRoot, hydrateRoot } from "react-dom/client";` : appSetupPath ? `import React, { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
|
|
4245
4279
|
import __farmAppSetup from ${JSON.stringify(_chunkQMNWKQL4cjs.toPosixPath.call(void 0, appSetupPath))};
|
|
4246
4280
|
__farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};`;
|
|
4247
|
-
const providerClientCode =
|
|
4281
|
+
const providerClientCode = _chunkTAU3OF5Bcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
4248
4282
|
integrationProviders,
|
|
4249
4283
|
root,
|
|
4250
4284
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -4267,18 +4301,18 @@ __farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot
|
|
|
4267
4301
|
const layoutImportStatements = [];
|
|
4268
4302
|
const layoutRegistrations = [];
|
|
4269
4303
|
const hydratingLayoutPatterns = layoutRoutes.filter((layout) => layout.shouldHydrate).map((layout) => layout.pattern);
|
|
4270
|
-
const treeLayoutPatterns = islandValues ?
|
|
4304
|
+
const treeLayoutPatterns = islandValues ? _chunkPXAHSCR6cjs.getFarmServerTreeLayoutPatterns.call(void 0, layoutRoutes) : /* @__PURE__ */ new Set();
|
|
4271
4305
|
layoutRoutes.forEach((layout, index) => {
|
|
4272
4306
|
const relativePath = toImportPath(layout.modulePath);
|
|
4273
4307
|
const treeLayout = treeLayoutPatterns.has(layout.pattern);
|
|
4274
4308
|
const rendersOnClient = treeLayout || !layout.hasIsolatedClientBoundaries && hydratingLayoutPatterns.some(
|
|
4275
|
-
(pattern) =>
|
|
4309
|
+
(pattern) => _chunkPXAHSCR6cjs.layoutsCanCoverSamePage.call(void 0, layout.pattern, pattern)
|
|
4276
4310
|
);
|
|
4277
4311
|
if (rendersOnClient && !treeLayout) {
|
|
4278
4312
|
layoutImportStatements.push(`import Layout${index} from "${relativePath}";`);
|
|
4279
4313
|
}
|
|
4280
|
-
const groupScope =
|
|
4281
|
-
const groupFields = groupScope ? `, urlPattern: ${JSON.stringify(
|
|
4314
|
+
const groupScope = _chunkPXAHSCR6cjs.getRouteGroupScope.call(void 0, layout.pattern);
|
|
4315
|
+
const groupFields = groupScope ? `, urlPattern: ${JSON.stringify(_chunkPXAHSCR6cjs.stripRouteGroups.call(void 0, layout.pattern))}, groupScope: ${JSON.stringify(groupScope)}` : "";
|
|
4282
4316
|
layoutRegistrations.push(
|
|
4283
4317
|
` { pattern: ${JSON.stringify(layout.pattern)}${groupFields}, Component: ${rendersOnClient ? treeLayout ? `getFarmTreeLayoutComponent(${JSON.stringify(layout.pattern)})` : `Layout${index}` : "null"}, shouldHydrate: ${JSON.stringify(layout.shouldHydrate)}, islandStrategy: ${JSON.stringify(layout.islandStrategy)}${treeLayout ? ", serverTree: true" : ""} }`
|
|
4284
4318
|
);
|
|
@@ -4365,7 +4399,7 @@ mountFarmDocsSearch();
|
|
|
4365
4399
|
|
|
4366
4400
|
${generateUniversalRouterStateRuntime()}
|
|
4367
4401
|
|
|
4368
|
-
${
|
|
4402
|
+
${_chunkTAU3OF5Bcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
4369
4403
|
|
|
4370
4404
|
// SPA Router for server-rendered pages (HTML swap)
|
|
4371
4405
|
const spaRouter = {
|
|
@@ -4429,7 +4463,8 @@ ${generateUniversalRouterStateProperties()}
|
|
|
4429
4463
|
this.currentHistoryState = options.popState;
|
|
4430
4464
|
}
|
|
4431
4465
|
|
|
4432
|
-
|
|
4466
|
+
// Save under the page still on screen: on Back/Forward the URL already names the destination.
|
|
4467
|
+
this.saveScrollPosition(from);
|
|
4433
4468
|
const navigation = this.startNavigation(from, url, action);
|
|
4434
4469
|
let clientNavigation;
|
|
4435
4470
|
try {
|
|
@@ -4802,7 +4837,7 @@ function hasHydratableLayout(pathname) {
|
|
|
4802
4837
|
});
|
|
4803
4838
|
}
|
|
4804
4839
|
|
|
4805
|
-
${
|
|
4840
|
+
${_chunkTAU3OF5Bcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
4806
4841
|
// Wrap a page element with applicable layouts
|
|
4807
4842
|
function wrapWithLayouts(pageElement, pathname, params) {
|
|
4808
4843
|
const layouts = getApplicableLayouts(pathname);
|
|
@@ -4837,7 +4872,7 @@ function createLayoutPageBoundary(route, pageElement, serverHtml) {
|
|
|
4837
4872
|
return React.createElement("div", props, pageElement);
|
|
4838
4873
|
}
|
|
4839
4874
|
let farmLastRouteState = null;
|
|
4840
|
-
${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${
|
|
4875
|
+
${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkTAU3OF5Bcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
4841
4876
|
function farmTreeLayoutsOf(pathname) {
|
|
4842
4877
|
return getApplicableLayouts(pathname).filter(function(layout) {
|
|
4843
4878
|
return layout.serverTree === true;
|
|
@@ -5401,7 +5436,7 @@ function fitsSegmentResponse(currentRoot, nextRoot) {
|
|
|
5401
5436
|
return true;
|
|
5402
5437
|
}` : ""}
|
|
5403
5438
|
|
|
5404
|
-
${
|
|
5439
|
+
${_chunkTAU3OF5Bcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
5405
5440
|
|
|
5406
5441
|
function activateNavigationScripts(root) {
|
|
5407
5442
|
for (const script of Array.from(root?.querySelectorAll?.("script") || [])) {
|
|
@@ -5504,7 +5539,7 @@ function getLayoutShell(root, patterns, index) {
|
|
|
5504
5539
|
return shell.innerHTML;
|
|
5505
5540
|
}
|
|
5506
5541
|
|
|
5507
|
-
${islandValues ?
|
|
5542
|
+
${islandValues ? _chunkTAU3OF5Bcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceSharedLayoutBoundary(currentRoot, nextRoot, refresh = false) {
|
|
5508
5543
|
// A refresh keeps the islands still on the page: the ones in streamed Suspense content too.
|
|
5509
5544
|
if (refresh) revealFarmStreamedContent(nextRoot);
|
|
5510
5545
|
const currentPatterns = getLayoutPatterns(currentRoot);
|
|
@@ -5639,7 +5674,8 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
|
|
|
5639
5674
|
// A route transition invalidates any trigger waiting on the previous DOM boundary.
|
|
5640
5675
|
cancelPendingPageHydration();
|
|
5641
5676
|
this.stopNavigationStream();
|
|
5642
|
-
|
|
5677
|
+
// Save under the page still on screen: on Back/Forward the URL already names the destination.
|
|
5678
|
+
this.saveScrollPosition(from);
|
|
5643
5679
|
const navigation = this.startNavigation(from, url, action);
|
|
5644
5680
|
// A refresh keeps the islands still on the page (islands mode).
|
|
5645
5681
|
navigation.refresh = options.refresh === true;
|
|
@@ -6085,7 +6121,7 @@ void hydrate();
|
|
|
6085
6121
|
}
|
|
6086
6122
|
async function buildSSRInMemory(productionVite, config, root, routeManager, apiRouteManager, serverRenderer, preset, collectedPageRoutes, collectedLayoutRoutes, collectedRouteSlots, isolatedClientBoundaryModules, hydrationPlanCache, rendererBuildLifetime) {
|
|
6087
6123
|
const viteBuild = productionVite.build;
|
|
6088
|
-
const { farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
|
|
6124
|
+
const { farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
|
|
6089
6125
|
const { PluginManager: PluginManager2 } = await import("./plugin-5PIQQVRP.cjs");
|
|
6090
6126
|
const fs4 = await import("fs/promises");
|
|
6091
6127
|
const pluginManager = new PluginManager2({
|
|
@@ -6185,7 +6221,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6185
6221
|
pattern: entry.pattern,
|
|
6186
6222
|
modulePath: entry.modulePath
|
|
6187
6223
|
})) : [];
|
|
6188
|
-
const i18nCatalogs = config.i18n.enabled ? (await
|
|
6224
|
+
const i18nCatalogs = config.i18n.enabled ? (await _chunkCYOTNHDFcjs.readFarmI18nCatalogs.call(void 0, config.i18n)).catalogs : {};
|
|
6189
6225
|
const appDirs = _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, config);
|
|
6190
6226
|
let openAPIReference = null;
|
|
6191
6227
|
if (config.openapi.enabled && config.openapi.route) {
|
|
@@ -6206,15 +6242,14 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6206
6242
|
specRoute: config.openapi.specRoute || null
|
|
6207
6243
|
};
|
|
6208
6244
|
}
|
|
6209
|
-
const
|
|
6210
|
-
|
|
6211
|
-
discoveredMiddlewareRoutes.map(async (route) => ({
|
|
6245
|
+
const middlewareRoutes = await Promise.all(
|
|
6246
|
+
(await discoverMiddlewareRoutes(appDirs)).map(async (route) => ({
|
|
6212
6247
|
...route,
|
|
6213
6248
|
config: await readMiddlewareFileConfig(route.filePath)
|
|
6214
6249
|
}))
|
|
6215
|
-
)
|
|
6250
|
+
);
|
|
6216
6251
|
const instrumentationPath = _chunk3GNHJ3RNcjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
|
|
6217
|
-
const notFoundPath =
|
|
6252
|
+
const notFoundPath = _chunkTAU3OF5Bcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
|
|
6218
6253
|
if (notFoundPath) _chunkQMNWKQL4cjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
|
|
6219
6254
|
layoutRoutes.sort((a, b) => {
|
|
6220
6255
|
const depthA = a.pattern.split("/").filter(Boolean).length;
|
|
@@ -6236,8 +6271,8 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6236
6271
|
);
|
|
6237
6272
|
const hasObservabilityHandler = !!config.observability && typeof config.observability === "object" && "onEvent" in config.observability;
|
|
6238
6273
|
const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _119 => _119.mdx, 'optionalAccess', _120 => _120.components]));
|
|
6239
|
-
const hasMiddlewareConfig =
|
|
6240
|
-
const hasRouteContextConfig =
|
|
6274
|
+
const hasMiddlewareConfig = _chunkPXAHSCR6cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
|
|
6275
|
+
const hasRouteContextConfig = _chunkOXNZUCHNcjs.hasCustomFarmRouteContext.call(void 0, config);
|
|
6241
6276
|
const hasServerRuntimePlugins = _chunkDMXMIE2Ccjs.hasFarmServerRuntimePlugins.call(void 0, config.plugins);
|
|
6242
6277
|
const hasPluginRoutes = hasFarmPluginRoutes(config);
|
|
6243
6278
|
const hasServerCacheConfig = hasFarmServerCacheConfig(config.cache);
|
|
@@ -6247,9 +6282,9 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6247
6282
|
const hasConfiguredRuntimePlugins = Boolean(
|
|
6248
6283
|
hasRuntimeConfigModule && (config.plugins || []).length > 0
|
|
6249
6284
|
);
|
|
6250
|
-
if (
|
|
6285
|
+
if (_chunkKDOZORJDcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
6251
6286
|
const adapterGuardedPaths = new Set(getFarmDocsGuardedPaths(config, middlewareRoutes));
|
|
6252
|
-
|
|
6287
|
+
_chunkKDOZORJDcjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
|
|
6253
6288
|
config.docs,
|
|
6254
6289
|
{ root, srcDir: config.srcDir },
|
|
6255
6290
|
(pathname) => adapterGuardedPaths.has(pathname),
|
|
@@ -6259,7 +6294,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6259
6294
|
const farmDocsCspNonceMarker = _chunk6JHZPB52cjs.createFarmCspNonce.call(void 0, config.security);
|
|
6260
6295
|
const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _121 => _121.docs, 'optionalAccess', _122 => _122.enabled]) && _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? await _chunkHDPT6OYEcjs._runWithFarmCspNonce.call(void 0,
|
|
6261
6296
|
farmDocsCspNonceMarker,
|
|
6262
|
-
async () => _optionalChain([config, 'access', _123 => _123.docs, 'access', _124 => _124.adapter, 'optionalAccess', _125 => _125.server]) ? await
|
|
6297
|
+
async () => _optionalChain([config, 'access', _123 => _123.docs, 'access', _124 => _124.adapter, 'optionalAccess', _125 => _125.server]) ? await _chunkKDOZORJDcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
|
|
6263
6298
|
root,
|
|
6264
6299
|
srcDir: config.srcDir,
|
|
6265
6300
|
clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
|
|
@@ -6426,7 +6461,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6426
6461
|
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _131 => _131.env, 'optionalAccess', _132 => _132.public]) || {})
|
|
6427
6462
|
},
|
|
6428
6463
|
plugins: [
|
|
6429
|
-
|
|
6464
|
+
_chunkTAU3OF5Bcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
6430
6465
|
...tailwindVitePlugin ? [tailwindVitePlugin] : [],
|
|
6431
6466
|
...rendererVitePlugins,
|
|
6432
6467
|
...config.vite.plugins || [],
|
|
@@ -6448,8 +6483,9 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6448
6483
|
] : [],
|
|
6449
6484
|
{ ..._chunkNG2EZ6QScjs.createReactProductionModePlugin.call(void 0, ), enforce: "pre" },
|
|
6450
6485
|
farmServerOnlyEntriesPlugin(),
|
|
6486
|
+
farmIslandContainersPlugin(config),
|
|
6451
6487
|
farmPlugin({ ...config, isolatedClientBoundaryModules }, pluginManager),
|
|
6452
|
-
|
|
6488
|
+
_chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
6453
6489
|
...hasRuntimeConfigModule ? [
|
|
6454
6490
|
farmStripPlatformConfigPlugin(
|
|
6455
6491
|
[
|
|
@@ -6461,7 +6497,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6461
6497
|
{
|
|
6462
6498
|
name: "farm-virtual-ssr-entry",
|
|
6463
6499
|
resolveId: {
|
|
6464
|
-
filter: { id:
|
|
6500
|
+
filter: { id: _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [virtualEntryId, "\0virtual:farm-ssr-entry"]) },
|
|
6465
6501
|
handler(id) {
|
|
6466
6502
|
if (id === virtualEntryId || id === "\0virtual:farm-ssr-entry") {
|
|
6467
6503
|
return virtualEntryId;
|
|
@@ -6470,7 +6506,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6470
6506
|
}
|
|
6471
6507
|
},
|
|
6472
6508
|
load: {
|
|
6473
|
-
filter: { id:
|
|
6509
|
+
filter: { id: _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [virtualEntryId]) },
|
|
6474
6510
|
handler(id) {
|
|
6475
6511
|
if (id === virtualEntryId) {
|
|
6476
6512
|
return virtualEntryCode;
|
|
@@ -6502,7 +6538,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6502
6538
|
resolve: {
|
|
6503
6539
|
alias: [
|
|
6504
6540
|
...shouldAliasReactServerToWebBuild(config.renderer, preset) ? [createFarmReactWebServerAlias(hasReactDomEdgeServerBuild(root))] : [],
|
|
6505
|
-
...Object.entries(
|
|
6541
|
+
...Object.entries(_chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
|
|
6506
6542
|
([find, replacement]) => ({ find, replacement })
|
|
6507
6543
|
)
|
|
6508
6544
|
],
|
|
@@ -6510,7 +6546,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6510
6546
|
dedupe: [...config.renderer.dedupe || []]
|
|
6511
6547
|
}
|
|
6512
6548
|
};
|
|
6513
|
-
await viteBuild(
|
|
6549
|
+
await viteBuild(_chunkTAU3OF5Bcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
|
|
6514
6550
|
} finally {
|
|
6515
6551
|
if (postcssConfigDir) {
|
|
6516
6552
|
try {
|
|
@@ -6552,9 +6588,9 @@ function getFarmDocsGuardedPaths(config, middlewareRoutes) {
|
|
|
6552
6588
|
config: { middleware: config.middleware, integrations: config.integrations },
|
|
6553
6589
|
middlewareRoutes
|
|
6554
6590
|
};
|
|
6555
|
-
return
|
|
6556
|
-
(docsRoot) =>
|
|
6557
|
-
).flatMap((page) => [page.href,
|
|
6591
|
+
return _chunkHFUOLILAcjs.getFarmDocsRoots.call(void 0, config.docs).flatMap(
|
|
6592
|
+
(docsRoot) => _chunkHFUOLILAcjs.discoverFarmDocsPages.call(void 0, _chunkHFUOLILAcjs.resolveFarmDocsContentDir.call(void 0, docsRoot, options), docsRoot)
|
|
6593
|
+
).flatMap((page) => [page.href, _chunkHFUOLILAcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunkPXAHSCR6cjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
|
|
6558
6594
|
}
|
|
6559
6595
|
function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
|
|
6560
6596
|
const llmsTxt = _optionalChain([agent, 'optionalAccess', _135 => _135.llmsTxt]);
|
|
@@ -6951,7 +6987,7 @@ ReactDOMServer.configureApp(__farmAppSetup);`;
|
|
|
6951
6987
|
function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlots, errorRoutes, metadataImageRoutes, applicationMetadataRoutes, middlewareRoutes, redirectRoutes, configuredRewriteRoutes, configuredHeaderRoutes, openAPIReference, notFoundPath, instrumentationPath, config, farmDocsPrecompiledManifest, configModulePath, hasServerRuntimeIntegrations, hasRuntimeIntegrationConfig, hasConfiguredRuntimePlugins, hasServerRuntimePlugins, preset, i18nCatalogs, isolatedClientBoundaryModules, hydrationPlanCache, mobileShellLoadingRoutes = [], farmDocsAnalyticsPages = []) {
|
|
6952
6988
|
const farmRendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, config.renderer);
|
|
6953
6989
|
const farmIslandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _149 => _149.experimental, 'optionalAccess', _150 => _150.serverComponents])) === "islands";
|
|
6954
|
-
const farmClientBoot =
|
|
6990
|
+
const farmClientBoot = _chunkTAU3OF5Bcjs.canBootFarmIslandsClient.call(void 0, config);
|
|
6955
6991
|
const farmMobileClient = shouldBuildFarmMobileClient(config);
|
|
6956
6992
|
const farmMobileShells = farmMobileClient && config.mobileShells ? config.mobileShells : null;
|
|
6957
6993
|
const hasCompressionRuntime = config.compress && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
|
|
@@ -6961,7 +6997,7 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
|
|
|
6961
6997
|
const servesAgentSitemap = Boolean(_optionalChain([config, 'access', _154 => _154.agent, 'optionalAccess', _155 => _155.sitemap, 'optionalAccess', _156 => _156.enabled])) && !applicationMetadataRoutes.some(
|
|
6962
6998
|
(metadata) => metadata.kind === "sitemap" && metadata.pattern === "/"
|
|
6963
6999
|
);
|
|
6964
|
-
const servesDefaultMCP = _optionalChain([config, 'access', _157 => _157.agent, 'optionalAccess', _158 => _158.mcp]) === true && !
|
|
7000
|
+
const servesDefaultMCP = _optionalChain([config, 'access', _157 => _157.agent, 'optionalAccess', _158 => _158.mcp]) === true && !_chunkTU6VAH4Vcjs.farmConfigMountsMCP.call(void 0, config) && !apiRoutes.some((route) => route.path === "/api/mcp");
|
|
6965
7001
|
const servesAiCatalog = _optionalChain([config, 'access', _159 => _159.agent, 'optionalAccess', _160 => _160.aiCatalog]) !== false;
|
|
6966
7002
|
const hasPluginRuntime = hasRuntimeIntegrationConfig || hasServerRuntimePlugins;
|
|
6967
7003
|
const hasInfraAnalyticsRuntime = config.analytics !== false && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
|
|
@@ -7019,7 +7055,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7019
7055
|
(image) => image.sourceType === "module"
|
|
7020
7056
|
);
|
|
7021
7057
|
const edgeMiddlewareFilePaths = farmTargetRunsEdgeMiddleware(preset) ? middlewareRoutes.filter(isFarmEdgeMiddlewareRoute).map((route) => route.filePath) : [];
|
|
7022
|
-
const hasMiddlewareRuntime = middlewareRoutes.length > 0 ||
|
|
7058
|
+
const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunkPXAHSCR6cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
|
|
7023
7059
|
const farmDocsFontAssets = _optionalChain([config, 'access', _171 => _171.docs, 'optionalAccess', _172 => _172.enabled]) ? _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, config.root)) : [];
|
|
7024
7060
|
const integrationProviders = _chunkJX5VOLAVcjs.getIntegrationProviders.call(void 0, config.integrations);
|
|
7025
7061
|
const renderedIntegrationProviders = integrationProviders.filter(
|
|
@@ -7030,7 +7066,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7030
7066
|
`Integration provider components are not supported by the "${config.renderer.name}" renderer.`
|
|
7031
7067
|
);
|
|
7032
7068
|
}
|
|
7033
|
-
const providerServerModules =
|
|
7069
|
+
const providerServerModules = _chunkTAU3OF5Bcjs.generateFarmIntegrationProviderServerModules.call(void 0,
|
|
7034
7070
|
renderedIntegrationProviders,
|
|
7035
7071
|
config.root,
|
|
7036
7072
|
_nullishCoalesce(config.renderer.componentExtensions, () => ( []))
|
|
@@ -7050,14 +7086,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7050
7086
|
const unsupportedIntegrationProvider = renderedIntegrationProviders.find(
|
|
7051
7087
|
(provider) => provider.supportsIsolatedHydration !== true
|
|
7052
7088
|
);
|
|
7053
|
-
const isolatedHydrationMode =
|
|
7089
|
+
const isolatedHydrationMode = _chunkHTXKSREFcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
7054
7090
|
_optionalChain([config, 'access', _175 => _175.experimental, 'optionalAccess', _176 => _176.isolatedClientHydration]),
|
|
7055
7091
|
{
|
|
7056
7092
|
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _177 => _177.experimental, 'optionalAccess', _178 => _178.serverComponents])) === "rsc",
|
|
7057
7093
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
7058
7094
|
}
|
|
7059
7095
|
);
|
|
7060
|
-
const hydrationPlanOptions =
|
|
7096
|
+
const hydrationPlanOptions = _chunkHTXKSREFcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
7061
7097
|
config.renderer,
|
|
7062
7098
|
Boolean(unsupportedIntegrationProvider)
|
|
7063
7099
|
);
|
|
@@ -7065,35 +7101,38 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7065
7101
|
...hydrationPlanOptions,
|
|
7066
7102
|
serverOwners: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _179 => _179.experimental, 'optionalAccess', _180 => _180.serverComponents])) === "islands"
|
|
7067
7103
|
};
|
|
7068
|
-
const layoutHydrationPlans =
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
isolatedHydrationMode,
|
|
7074
|
-
hydrationPlanCache,
|
|
7075
|
-
{ ...hydrationPlanOptions, serverTreeLayouts: pageHydrationPlanOptions.serverOwners }
|
|
7076
|
-
)
|
|
7077
|
-
}));
|
|
7078
|
-
const markdownPagePlan = _chunk2IFT2CSAcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
7079
|
-
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
|
|
7080
|
-
config.root,
|
|
7081
|
-
isolatedHydrationMode,
|
|
7082
|
-
{ ...hydrationPlanOptions, packageReferences: pageHydrationPlanOptions.serverOwners }
|
|
7083
|
-
);
|
|
7084
|
-
const pageHydrationPlans = new Map(
|
|
7085
|
-
pageRoutes.map((route) => [
|
|
7086
|
-
route.modulePath,
|
|
7087
|
-
_chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
|
|
7088
|
-
route.modulePath,
|
|
7104
|
+
const { layoutHydrationPlans, pageHydrationPlans } = _chunkHTXKSREFcjs.withFarmSourceSnapshot.call(void 0, () => {
|
|
7105
|
+
const layoutHydrationPlans2 = layoutRoutes.map((layout) => ({
|
|
7106
|
+
...layout,
|
|
7107
|
+
hydration: getCachedClientModuleHydrationPlan(
|
|
7108
|
+
layout.modulePath,
|
|
7089
7109
|
config.root,
|
|
7090
7110
|
isolatedHydrationMode,
|
|
7091
7111
|
hydrationPlanCache,
|
|
7092
|
-
pageHydrationPlanOptions
|
|
7112
|
+
{ ...hydrationPlanOptions, serverTreeLayouts: pageHydrationPlanOptions.serverOwners }
|
|
7093
7113
|
)
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7114
|
+
}));
|
|
7115
|
+
const markdownPagePlan = _chunkHTXKSREFcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
7116
|
+
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
|
|
7117
|
+
config.root,
|
|
7118
|
+
isolatedHydrationMode,
|
|
7119
|
+
{ ...hydrationPlanOptions, packageReferences: pageHydrationPlanOptions.serverOwners }
|
|
7120
|
+
);
|
|
7121
|
+
const pageHydrationPlans2 = new Map(
|
|
7122
|
+
pageRoutes.map((route) => [
|
|
7123
|
+
route.modulePath,
|
|
7124
|
+
_chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
|
|
7125
|
+
route.modulePath,
|
|
7126
|
+
config.root,
|
|
7127
|
+
isolatedHydrationMode,
|
|
7128
|
+
hydrationPlanCache,
|
|
7129
|
+
pageHydrationPlanOptions
|
|
7130
|
+
)
|
|
7131
|
+
])
|
|
7132
|
+
);
|
|
7133
|
+
return { layoutHydrationPlans: layoutHydrationPlans2, pageHydrationPlans: pageHydrationPlans2 };
|
|
7134
|
+
});
|
|
7135
|
+
_chunkHTXKSREFcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
7097
7136
|
layoutHydrationPlans.map((layout) => ({
|
|
7098
7137
|
pattern: layout.pattern,
|
|
7099
7138
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -7102,10 +7141,10 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7102
7141
|
pageRoutes.map((route) => ({
|
|
7103
7142
|
// Compared by directory so a grouped layout applies only inside its group.
|
|
7104
7143
|
pattern: _nullishCoalesce(route.directory, () => ( route.pattern)),
|
|
7105
|
-
depth:
|
|
7144
|
+
depth: _chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, _nullishCoalesce(route.directory, () => ( route.pattern))),
|
|
7106
7145
|
metadata: pageHydrationPlans.get(route.modulePath)
|
|
7107
7146
|
})),
|
|
7108
|
-
|
|
7147
|
+
_chunkPXAHSCR6cjs.routeBoundaryCoversDirectory,
|
|
7109
7148
|
{ serverOwners: pageHydrationPlanOptions.serverOwners }
|
|
7110
7149
|
);
|
|
7111
7150
|
const providerServerImports = [
|
|
@@ -7136,13 +7175,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7136
7175
|
}).map(({ route }) => route);
|
|
7137
7176
|
orderedPageRoutes.forEach((route, index) => {
|
|
7138
7177
|
const varName = `pageRoute${index}`;
|
|
7139
|
-
if (
|
|
7140
|
-
const renderingDirective2 =
|
|
7178
|
+
if (_chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) {
|
|
7179
|
+
const renderingDirective2 = _chunkCLEWORVYcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
|
|
7180
|
+
const markdownServerTree = pageHydrationPlanOptions.serverOwners && _chunkHTXKSREFcjs.usesFarmServerTree.call(void 0, pageHydrationPlans.get(route.modulePath));
|
|
7141
7181
|
pageRegistrations.push(`
|
|
7142
7182
|
{
|
|
7143
7183
|
pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
|
|
7144
7184
|
directory: ${JSON.stringify(route.directory)},` : ""}${renderingDirective2 ? `
|
|
7145
|
-
rendering: ${JSON.stringify(renderingDirective2)},` : ""}
|
|
7185
|
+
rendering: ${JSON.stringify(renderingDirective2)},` : ""}${markdownServerTree ? "\n serverTree: true," : ""}
|
|
7146
7186
|
module: createFarmMarkdownRouteModule({
|
|
7147
7187
|
source: ${JSON.stringify(_nullishCoalesce(route.source, () => ( "")))},
|
|
7148
7188
|
filePath: ${JSON.stringify(toBakedMarkdownSourcePath(config.root, route.modulePath))},
|
|
@@ -7162,7 +7202,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7162
7202
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(route.modulePath)};`
|
|
7163
7203
|
);
|
|
7164
7204
|
const clientMetadata = pageHydrationPlans.get(route.modulePath);
|
|
7165
|
-
const renderingDirective =
|
|
7205
|
+
const renderingDirective = _chunkCLEWORVYcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
|
|
7166
7206
|
pageRegistrations.push(`
|
|
7167
7207
|
{
|
|
7168
7208
|
pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
|
|
@@ -7170,8 +7210,8 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7170
7210
|
module: ${varName},
|
|
7171
7211
|
shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},${clientMetadata.shouldHydrate ? `
|
|
7172
7212
|
clientModule: ${JSON.stringify(_chunkQMNWKQL4cjs.toViteModuleId.call(void 0, route.modulePath, config.root))},` : ""}
|
|
7173
|
-
islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${
|
|
7174
|
-
const rootStrategy =
|
|
7213
|
+
islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunkHTXKSREFcjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
|
|
7214
|
+
const rootStrategy = _chunkTAU3OF5Bcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
7175
7215
|
route,
|
|
7176
7216
|
clientMetadata,
|
|
7177
7217
|
layoutHydrationPlans.map((layout) => ({ ...layout, ...layout.hydration })),
|
|
@@ -7190,7 +7230,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7190
7230
|
});
|
|
7191
7231
|
const layoutImports = [];
|
|
7192
7232
|
const layoutRegistrations = [];
|
|
7193
|
-
const treeLayoutPatterns = farmIslandsMode ?
|
|
7233
|
+
const treeLayoutPatterns = farmIslandsMode ? _chunkPXAHSCR6cjs.getFarmServerTreeLayoutPatterns.call(void 0,
|
|
7194
7234
|
layoutHydrationPlans.map((layout) => ({
|
|
7195
7235
|
pattern: layout.pattern,
|
|
7196
7236
|
shouldHydrate: layout.hydration.shouldHydrate,
|
|
@@ -7234,7 +7274,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7234
7274
|
containerId: ${JSON.stringify(slot.containerId)},
|
|
7235
7275
|
interception: ${JSON.stringify(slot.interception)},
|
|
7236
7276
|
fallback: ${JSON.stringify(slot.fallback)},
|
|
7237
|
-
hydrates: ${!farmIslandsMode ||
|
|
7277
|
+
hydrates: ${!farmIslandsMode || _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, slot.modulePath, config.root).isClientComponent},
|
|
7238
7278
|
module: ${varName},
|
|
7239
7279
|
}`);
|
|
7240
7280
|
});
|
|
@@ -7245,12 +7285,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7245
7285
|
errorImports.push(
|
|
7246
7286
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(errorRoute.modulePath)};`
|
|
7247
7287
|
);
|
|
7248
|
-
const groupScope =
|
|
7288
|
+
const groupScope = _chunkPXAHSCR6cjs.getRouteGroupScope.call(void 0, errorRoute.pattern);
|
|
7249
7289
|
errorRegistrations.push(`
|
|
7250
7290
|
{
|
|
7251
|
-
pattern: ${JSON.stringify(
|
|
7291
|
+
pattern: ${JSON.stringify(_chunkPXAHSCR6cjs.stripRouteGroups.call(void 0, errorRoute.pattern))},${groupScope ? `
|
|
7252
7292
|
groupScope: ${JSON.stringify(groupScope)},
|
|
7253
|
-
directoryDepth: ${
|
|
7293
|
+
directoryDepth: ${_chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, errorRoute.pattern)},` : ""}
|
|
7254
7294
|
module: ${varName},
|
|
7255
7295
|
}`);
|
|
7256
7296
|
});
|
|
@@ -7262,12 +7302,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7262
7302
|
loadingImports.push(
|
|
7263
7303
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(loadingRoute.modulePath)};`
|
|
7264
7304
|
);
|
|
7265
|
-
const groupScope =
|
|
7305
|
+
const groupScope = _chunkPXAHSCR6cjs.getRouteGroupScope.call(void 0, loadingRoute.pattern);
|
|
7266
7306
|
loadingRegistrations.push(`
|
|
7267
7307
|
{
|
|
7268
|
-
pattern: ${JSON.stringify(
|
|
7308
|
+
pattern: ${JSON.stringify(_chunkPXAHSCR6cjs.stripRouteGroups.call(void 0, loadingRoute.pattern))},${groupScope ? `
|
|
7269
7309
|
groupScope: ${JSON.stringify(groupScope)},
|
|
7270
|
-
directoryDepth: ${
|
|
7310
|
+
directoryDepth: ${_chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, loadingRoute.pattern)},` : ""}
|
|
7271
7311
|
module: ${varName},
|
|
7272
7312
|
}`);
|
|
7273
7313
|
});
|
|
@@ -7541,10 +7581,10 @@ import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
|
|
|
7541
7581
|
);
|
|
7542
7582
|
const nativeServerFns = (config.plugins || []).some(
|
|
7543
7583
|
(plugin) => _optionalChain([plugin, 'optionalAccess', _201 => _201.name]) === _chunk4EBC7EMWcjs.FARM_NATIVE_SERVER_FN_PLUGIN
|
|
7544
|
-
) ?
|
|
7584
|
+
) ? _chunkTDCP3Z4Tcjs.collectFarmNativeServerFns.call(void 0, {
|
|
7545
7585
|
root: config.root,
|
|
7546
7586
|
srcDir: config.srcDir,
|
|
7547
|
-
entries:
|
|
7587
|
+
entries: _chunkTDCP3Z4Tcjs.findFarmNativeScreenFiles.call(void 0, _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, config))
|
|
7548
7588
|
}) : void 0;
|
|
7549
7589
|
const integrationImports = `
|
|
7550
7590
|
${configModulePath ? `import * as FarmUserConfigModule from ${toVirtualEntryImportSpecifier(configModulePath)};` : ""}
|
|
@@ -7559,7 +7599,7 @@ ${nativeServerFns ? `const __farmNativeServerFnRegistry = Object.assign(Object.c
|
|
|
7559
7599
|
${nativeServerFns.flatMap((module, index) => module.exports.map((entry) => ` ${JSON.stringify(entry.id)}: __farmNativeServerFns${index}[${JSON.stringify(entry.name)}],`)).join("\n")}
|
|
7560
7600
|
});` : ""}
|
|
7561
7601
|
`;
|
|
7562
|
-
const imageRuntime =
|
|
7602
|
+
const imageRuntime = _chunkTAU3OF5Bcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
7563
7603
|
const imageRuntimeImport = imageRuntime === "none" ? "" : `import { _withFarmImageSourceClientAddress, createCloudflareImageTransformer, createFarmImageHandler } from "@farm.js/core/image/server";`;
|
|
7564
7604
|
const imageNodeRuntimeImport = imageRuntime === "node" ? `import { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } from "@farm.js/core/image/sharp";` : "";
|
|
7565
7605
|
const apiHandlerCode = apiRoutes.length > 0 ? `
|
|
@@ -7741,7 +7781,7 @@ const farmResolvedRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs);
|
|
|
7741
7781
|
|
|
7742
7782
|
function FarmDefault404Page() {
|
|
7743
7783
|
return React.createElement(React.Fragment, null,
|
|
7744
|
-
React.createElement("style", null, ${JSON.stringify(
|
|
7784
|
+
React.createElement("style", null, ${JSON.stringify(_chunkTAU3OF5Bcjs.DEFAULT_NOT_FOUND_STYLES)}),
|
|
7745
7785
|
React.createElement("main", {
|
|
7746
7786
|
className: "farm-default-not-found",
|
|
7747
7787
|
"aria-labelledby": "farm-default-not-found-title",
|
|
@@ -7895,7 +7935,7 @@ ${_optionalChain([config, 'access', _211 => _211.agent, 'optionalAccess', _212 =
|
|
|
7895
7935
|
// to the build.
|
|
7896
7936
|
const farmNoindexPreview = resolveFarmPreviewDeployment(
|
|
7897
7937
|
globalThis.process?.env,
|
|
7898
|
-
${JSON.stringify(
|
|
7938
|
+
${JSON.stringify(_chunkILQ5DKYFcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env))},
|
|
7899
7939
|
);` : ""}
|
|
7900
7940
|
const farmMdxComponents = ${mdxComponentsPath ? `(FarmMdxComponentsModule.components || Reflect.get(FarmMdxComponentsModule, "default") || {})` : `(configuredFarmMdxComponents && typeof configuredFarmMdxComponents === "object" ? configuredFarmMdxComponents : {})`};
|
|
7901
7941
|
const farmObservabilityConfig = farmUserConfig?.observability ?? ${JSON.stringify(
|
|
@@ -8026,7 +8066,7 @@ const farmDocsHandler = ${_optionalChain([config, 'access', _220 => _220.docs, '
|
|
|
8026
8066
|
registerMCPServer: registerFarmMCPServer,
|
|
8027
8067
|
// A page built with this keeps its HTML string, so the preload budget and the response
|
|
8028
8068
|
// writer use it instead of reading and re-encoding the body. Older adapters ignore it.
|
|
8029
|
-
createHtmlResponse: farmOwnedHtmlResponse,${
|
|
8069
|
+
createHtmlResponse: farmOwnedHtmlResponse,${_chunkKDOZORJDcjs.farmDocsAdapterServesGuardedPages.call(void 0, config.docs) ? `
|
|
8030
8070
|
// The adapter keeps pages a path guard covers off search, llms.txt, the sitemap and MCP. It
|
|
8031
8071
|
// asks about any path its own content lists, so the guards decide here, not a page list.
|
|
8032
8072
|
isPathGuarded: (pathname) =>
|
|
@@ -8084,12 +8124,12 @@ const farmDeploymentCookiePath = ${JSON.stringify(config.basePath || "/")};
|
|
|
8084
8124
|
// runtime request.
|
|
8085
8125
|
const farmRuntimeErrorSlot = Symbol("farm.runtime.error.slot");
|
|
8086
8126
|
const farmOpenAPIReference = ${JSON.stringify(openAPIReference)};
|
|
8087
|
-
${_optionalChain([config, 'access', _224 => _224.agent, 'optionalAccess', _225 => _225.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(
|
|
8127
|
+
${_optionalChain([config, 'access', _224 => _224.agent, 'optionalAccess', _225 => _225.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunk4YHGQDTTcjs.resolveFarmApiCatalogInput.call(void 0, config))};
|
|
8088
8128
|
` : ""}${_optionalChain([config, 'access', _226 => _226.agent, 'optionalAccess', _227 => _227.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
|
|
8089
|
-
|
|
8129
|
+
_chunk4YHGQDTTcjs.resolveFarmAppManifestInput.call(void 0, config, {
|
|
8090
8130
|
build: config.deploymentId,
|
|
8091
|
-
packages:
|
|
8092
|
-
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ?
|
|
8131
|
+
packages: _chunkTAU3OF5Bcjs.resolveFarmAppPackages.call(void 0, config.root),
|
|
8132
|
+
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkTAU3OF5Bcjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
|
|
8093
8133
|
})
|
|
8094
8134
|
)};
|
|
8095
8135
|
${servesDefaultMCP ? "farmAppManifestInput.defaultMCP = getFarmDefaultMCPServer;\n" : ""}// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -8593,12 +8633,98 @@ async function renderFarmElement(ReactDOMServer, element, routeKey, flushToken =
|
|
|
8593
8633
|
return { html, head: "", shellHtml: html, streamErrors };
|
|
8594
8634
|
}
|
|
8595
8635
|
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
|
|
8601
|
-
|
|
8636
|
+
// The not-found and error documents go out whole, with their status, so they never stream.
|
|
8637
|
+
// renderToString renders a tree that does not suspend in one synchronous pass, but throws "A
|
|
8638
|
+
// component suspended while responding to synchronous input" when a lazy component or a use()
|
|
8639
|
+
// read suspends outside a Suspense boundary, and leaves a boundary that suspends inside one to
|
|
8640
|
+
// the client (<!--$!-->). Such a document renders with the streaming renderer instead, which
|
|
8641
|
+
// sends nothing until every boundary is done, so the output is the resolved markup without
|
|
8642
|
+
// fallbacks or reveal scripts. A document that suspended once keeps that renderer for the rest
|
|
8643
|
+
// of this server process, as a page route that suspends keeps streaming. As for pages, a
|
|
8644
|
+
// response with a CSP nonce or a posted form state renders with the stream, which takes them.
|
|
8645
|
+
// Renderers other than React wait for their own async content in renderToString.
|
|
8646
|
+
const farmSuspendingDocuments = new Set();
|
|
8647
|
+
|
|
8648
|
+
async function renderFarmCompleteDocument(ReactDOMServer, element, documentKey) {
|
|
8649
|
+
if (!farmReactSyncRender || !canRenderFarmElementWhenAllReady(ReactDOMServer)) {
|
|
8650
|
+
return await ReactDOMServer.renderToString(element, getFarmRendererRenderOptions());
|
|
8651
|
+
}
|
|
8652
|
+
if (!farmSuspendingDocuments.has(documentKey) &&
|
|
8653
|
+
!_resolveCurrentCspNonce() &&
|
|
8654
|
+
farmFormState() === undefined) {
|
|
8655
|
+
let html;
|
|
8656
|
+
try {
|
|
8657
|
+
html = ReactDOMServer.renderToString(element, getFarmRendererRenderOptions());
|
|
8658
|
+
} catch {
|
|
8659
|
+
// A real render error fails the streaming render the same way.
|
|
8660
|
+
}
|
|
8661
|
+
if (typeof html === "string" && !html.includes("<!--$!-->")) return html;
|
|
8662
|
+
farmSuspendingDocuments.add(documentKey);
|
|
8663
|
+
}
|
|
8664
|
+
return await renderFarmElementWhenAllReady(ReactDOMServer, element);
|
|
8665
|
+
}
|
|
8666
|
+
|
|
8667
|
+
function canRenderFarmElementWhenAllReady(ReactDOMServer) {
|
|
8668
|
+
return (farmRendererStreamingCapabilities.web &&
|
|
8669
|
+
typeof ReactDOMServer.renderToReadableStream === "function") ||
|
|
8670
|
+
(farmRendererStreamingCapabilities.node &&
|
|
8671
|
+
typeof ReactDOMServer.renderToPipeableStream === "function");
|
|
8672
|
+
}
|
|
8673
|
+
|
|
8674
|
+
async function renderFarmElementWhenAllReady(ReactDOMServer, element) {
|
|
8675
|
+
const onError = function(error) {
|
|
8676
|
+
// After the shell, a failed boundary is rendered by the client, as on a page.
|
|
8677
|
+
if (isFarmRedirectError(error) || isFarmNotFoundError(error)) return;
|
|
8678
|
+
console.error("[Farm SSR stream]", error);
|
|
8679
|
+
};
|
|
8680
|
+
// Completed boundaries larger than this would stream behind their fallback: keep them inline.
|
|
8681
|
+
const progressiveChunkSize = Number.MAX_SAFE_INTEGER;
|
|
8682
|
+
if (farmRendererStreamingCapabilities.web &&
|
|
8683
|
+
typeof ReactDOMServer.renderToReadableStream === "function") {
|
|
8684
|
+
const stream = await ReactDOMServer.renderToReadableStream(element, {
|
|
8685
|
+
nonce: _resolveCurrentCspNonce(),
|
|
8686
|
+
formState: farmFormState(),
|
|
8687
|
+
progressiveChunkSize,
|
|
8688
|
+
onError,
|
|
8689
|
+
});
|
|
8690
|
+
await stream.allReady;
|
|
8691
|
+
return await new Response(stream).text();
|
|
8692
|
+
}
|
|
8693
|
+
return await new Promise(function(resolve, reject) {
|
|
8694
|
+
const chunks = [];
|
|
8695
|
+
const decoder = new TextDecoder();
|
|
8696
|
+
const destination = {
|
|
8697
|
+
write(chunk) {
|
|
8698
|
+
chunks.push(typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true }));
|
|
8699
|
+
return true;
|
|
8700
|
+
},
|
|
8701
|
+
flush() {},
|
|
8702
|
+
end() {
|
|
8703
|
+
chunks.push(decoder.decode());
|
|
8704
|
+
resolve(chunks.join(""));
|
|
8705
|
+
},
|
|
8706
|
+
on() {
|
|
8707
|
+
return destination;
|
|
8708
|
+
},
|
|
8709
|
+
destroy(error) {
|
|
8710
|
+
reject(error || new Error("React server render stream was destroyed"));
|
|
8711
|
+
},
|
|
8712
|
+
};
|
|
8713
|
+
const pipeableStream = ReactDOMServer.renderToPipeableStream(element, {
|
|
8714
|
+
nonce: _resolveCurrentCspNonce(),
|
|
8715
|
+
formState: farmFormState(),
|
|
8716
|
+
progressiveChunkSize,
|
|
8717
|
+
onAllReady() {
|
|
8718
|
+
try {
|
|
8719
|
+
pipeableStream.pipe(destination);
|
|
8720
|
+
} catch (error) {
|
|
8721
|
+
reject(error);
|
|
8722
|
+
}
|
|
8723
|
+
},
|
|
8724
|
+
onShellError: reject,
|
|
8725
|
+
onError,
|
|
8726
|
+
});
|
|
8727
|
+
});
|
|
8602
8728
|
}
|
|
8603
8729
|
|
|
8604
8730
|
// Most pages render without suspending. React's renderToString renders them in
|
|
@@ -8756,7 +8882,7 @@ function peelFarmDocumentPrefix(markup) {
|
|
|
8756
8882
|
let inner = markup.replace(/^\\s+/, "");
|
|
8757
8883
|
let hoisted = "";
|
|
8758
8884
|
const wrapper = /^<div\\b[^>]*style=["']display\\s*:\\s*contents;?\\s*["'][^>]*>/i;
|
|
8759
|
-
const hoistable = /${
|
|
8885
|
+
const hoistable = /${_chunkPXAHSCR6cjs.HOISTED_HEAD_ELEMENT.source}/i;
|
|
8760
8886
|
let match;
|
|
8761
8887
|
while ((match = wrapper.exec(inner) || hoistable.exec(inner))) {
|
|
8762
8888
|
if (!/^<div/i.test(match[0])) hoisted += match[0];
|
|
@@ -8780,6 +8906,50 @@ function opensFarmFullDocument(markup) {
|
|
|
8780
8906
|
return /^<!doctype/i.test(inner) || /^<html[\\s>]/i.test(inner);
|
|
8781
8907
|
}
|
|
8782
8908
|
|
|
8909
|
+
// The head elements a component renders (<meta>, <title>, preloads), which React writes ahead of
|
|
8910
|
+
// a render whose root is not <html>, split off for the document's head. A full document keeps
|
|
8911
|
+
// them: its own head takes them. Matches the dev renderer's takeFarmHoistedHead.
|
|
8912
|
+
function takeFarmHoistedHead(markup) {
|
|
8913
|
+
if (opensFarmFullDocument(markup)) return { head: "", body: markup };
|
|
8914
|
+
const hoistable = /${_chunkPXAHSCR6cjs.HOISTED_HEAD_ELEMENT.source}/i;
|
|
8915
|
+
let head = "";
|
|
8916
|
+
let body = markup;
|
|
8917
|
+
let match;
|
|
8918
|
+
while ((match = hoistable.exec(body.replace(/^\\s+/, "")))) {
|
|
8919
|
+
head += match[0];
|
|
8920
|
+
body = body.replace(/^\\s+/, "").slice(match[0].length);
|
|
8921
|
+
}
|
|
8922
|
+
return { head: head, body: body };
|
|
8923
|
+
}
|
|
8924
|
+
|
|
8925
|
+
// A rendered page with the head elements React wrote first moved to its head field, for Farm's shell to
|
|
8926
|
+
// put in the document's head. A streamed page's first chunk is its shellHtml: those bytes are
|
|
8927
|
+
// dropped from the stream.
|
|
8928
|
+
function takeFarmRenderedHead(rendered) {
|
|
8929
|
+
if (rendered.head) return rendered;
|
|
8930
|
+
if (rendered.html !== undefined) {
|
|
8931
|
+
const split = takeFarmHoistedHead(rendered.html);
|
|
8932
|
+
if (!split.head) return rendered;
|
|
8933
|
+
return Object.assign({}, rendered, { html: split.body, shellHtml: split.body, head: split.head });
|
|
8934
|
+
}
|
|
8935
|
+
const shell = rendered.shellHtml || "";
|
|
8936
|
+
const split = takeFarmHoistedHead(shell);
|
|
8937
|
+
if (!split.head) return rendered;
|
|
8938
|
+
let left = new TextEncoder().encode(shell.slice(0, shell.length - split.body.length)).byteLength;
|
|
8939
|
+
const stream = rendered.stream.pipeThrough(new TransformStream({
|
|
8940
|
+
transform(chunk, controller) {
|
|
8941
|
+
if (left > 0) {
|
|
8942
|
+
const dropped = Math.min(left, chunk.byteLength);
|
|
8943
|
+
left -= dropped;
|
|
8944
|
+
chunk = chunk.subarray(dropped);
|
|
8945
|
+
if (chunk.byteLength === 0) return;
|
|
8946
|
+
}
|
|
8947
|
+
controller.enqueue(chunk);
|
|
8948
|
+
},
|
|
8949
|
+
}));
|
|
8950
|
+
return Object.assign({}, rendered, { stream: stream, shellHtml: split.body, head: split.head });
|
|
8951
|
+
}
|
|
8952
|
+
|
|
8783
8953
|
function extractFarmFullDocument(markup) {
|
|
8784
8954
|
if (!opensFarmFullDocument(markup)) return null;
|
|
8785
8955
|
const hoisted = peelFarmDocumentPrefix(markup).hoisted;
|
|
@@ -9265,7 +9435,7 @@ function createFarmAgentRobotsResponse(request) {
|
|
|
9265
9435
|
// its nearest layout's.
|
|
9266
9436
|
const farmAgentGuardedPages = new Set(${JSON.stringify(
|
|
9267
9437
|
pageRoutes.map((route) => route.pattern).filter(
|
|
9268
|
-
(pattern) => !pattern.includes("[") &&
|
|
9438
|
+
(pattern) => !pattern.includes("[") && _chunkPXAHSCR6cjs.farmPathGuardCoversPage.call(void 0,
|
|
9269
9439
|
{
|
|
9270
9440
|
config: { middleware: config.middleware, integrations: config.integrations },
|
|
9271
9441
|
middlewareRoutes
|
|
@@ -9320,12 +9490,12 @@ ${servesDefaultMCP ? `// agent.mcp: the default read-only MCP server at /mcp, as
|
|
|
9320
9490
|
// aside for a page route that answers /mcp and for any MCP server published or
|
|
9321
9491
|
// registered at runtime, such as the docs engine's.
|
|
9322
9492
|
const farmDefaultMCPServer = ${JSON.stringify(
|
|
9323
|
-
|
|
9493
|
+
_chunkTU6VAH4Vcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkUVQRMUARcjs.FARM_VERSION)
|
|
9324
9494
|
)};
|
|
9325
9495
|
let farmDefaultMCPRouteFree;
|
|
9326
9496
|
function getFarmDefaultMCPServer() {
|
|
9327
9497
|
if (farmDefaultMCPRouteFree === undefined) {
|
|
9328
|
-
farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(
|
|
9498
|
+
farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(_chunkTU6VAH4Vcjs.FARM_DEFAULT_MCP_PATH)});
|
|
9329
9499
|
}
|
|
9330
9500
|
return farmDefaultMCPRouteFree ? resolveFarmDefaultMCPServer(farmDefaultMCPServer) : undefined;
|
|
9331
9501
|
}
|
|
@@ -9514,7 +9684,7 @@ ${edgeMiddlewareFilePaths.length > 0 ? `
|
|
|
9514
9684
|
// middleware guards is never prerendered. Read once: Nitro's prerender worker sets the variable.
|
|
9515
9685
|
const farmEdgeMiddlewareFiles = new Set(${JSON.stringify(edgeMiddlewareFilePaths)});
|
|
9516
9686
|
const farmPrerendering =
|
|
9517
|
-
typeof process !== "undefined" && process.env?.${
|
|
9687
|
+
typeof process !== "undefined" && process.env?.${_chunkROCF6UQDcjs.FARM_PRERENDER_ENV} === "1";
|
|
9518
9688
|
` : ""}
|
|
9519
9689
|
const farmMiddlewareRunner = ${hasMiddlewareRuntime ? `createProductionMiddlewareRunner({
|
|
9520
9690
|
config: farmMiddlewareConfig,
|
|
@@ -9770,7 +9940,7 @@ ${hasInfraAnalyticsRuntime ? `
|
|
|
9770
9940
|
// endpoints, Markdown mirrors, and docs pages have no app route pattern, so they are
|
|
9771
9941
|
// labeled here; route.pattern keeps meaning the matched app route for plugins.
|
|
9772
9942
|
const farmBuiltInRoutePaths = new Set(${JSON.stringify(
|
|
9773
|
-
|
|
9943
|
+
_chunk4YHGQDTTcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
9774
9944
|
agent: {
|
|
9775
9945
|
...config.agent,
|
|
9776
9946
|
aiCatalog: servesAiCatalog,
|
|
@@ -10539,7 +10709,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
10539
10709
|
// agent.manifest: /.well-known/farmjs.json (and 0.1.34's /.well-known/farmjs), the app's
|
|
10540
10710
|
// public manifest, the same document for every request.
|
|
10541
10711
|
if (
|
|
10542
|
-
[${JSON.stringify(
|
|
10712
|
+
[${JSON.stringify(_chunk4YHGQDTTcjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunk4YHGQDTTcjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
|
|
10543
10713
|
normalizeRuntimePath(routePathname),
|
|
10544
10714
|
)
|
|
10545
10715
|
) {
|
|
@@ -10551,7 +10721,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
10551
10721
|
` : ""}
|
|
10552
10722
|
${_optionalChain([config, 'access', _256 => _256.agent, 'optionalAccess', _257 => _257.apiCatalog]) ? `
|
|
10553
10723
|
// agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
|
|
10554
|
-
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
10724
|
+
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunk4YHGQDTTcjs.FARM_API_CATALOG_PATH)}) {
|
|
10555
10725
|
return applyProductionMiddlewareHeaders(
|
|
10556
10726
|
createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
|
|
10557
10727
|
middlewareHeaders,
|
|
@@ -11155,9 +11325,10 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
11155
11325
|
wrappedElement = wrapWithFarmIntegrationProviders(wrappedElement);
|
|
11156
11326
|
return renderFarmElement(ReactDOMServer, wrappedElement, route.pattern, farmFlushToken);
|
|
11157
11327
|
};
|
|
11158
|
-
|
|
11328
|
+
// The head elements a component rendered go to the document's head (takeFarmRenderedHead).
|
|
11329
|
+
const renderedPage = takeFarmRenderedHead(${hasMiddlewareRuntime ? `await _runWithMiddlewareData(middlewareData, () =>
|
|
11159
11330
|
_runWithMiddlewareContext(middlewareContext, renderPageElement)
|
|
11160
|
-
)` : "await renderPageElement()"};
|
|
11331
|
+
)` : "await renderPageElement()"});
|
|
11161
11332
|
|
|
11162
11333
|
// A completed document is not a reusable PPR shell: it already contains
|
|
11163
11334
|
// the request's resolved Suspense content. Until the production runtime
|
|
@@ -11397,7 +11568,8 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
11397
11568
|
' <meta charset="utf-8">\\n' +
|
|
11398
11569
|
' ' + viewportTags + '\\n' +
|
|
11399
11570
|
(hasFavicon ? '' : ' <link rel="icon" href="data:,">\\n') +
|
|
11400
|
-
' <title>' + title + '</title>' + metaTags +
|
|
11571
|
+
(suppressDefaultTitle ? '' : ' <title>' + title + '</title>') + metaTags +
|
|
11572
|
+
(rendererHead ? '\\n ' + rendererHead : '') + '\\n' +
|
|
11401
11573
|
' <link rel="stylesheet" href="/__farm_client_css_href__">\\n' +
|
|
11402
11574
|
' <link rel="modulepreload" href="/__farm_client_js_src__">' + renderFarmClientModulePreloads(null, route.clientModule) + '\\n' +
|
|
11403
11575
|
renderFarmRendererHydrationScript() + '\\n' +
|
|
@@ -11424,9 +11596,10 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
11424
11596
|
}
|
|
11425
11597
|
try {
|
|
11426
11598
|
return createLateNotFoundRecovery(
|
|
11427
|
-
await
|
|
11599
|
+
await renderFarmCompleteDocument(
|
|
11600
|
+
ReactDOMServer,
|
|
11428
11601
|
wrapWithFarmIntegrationProviders(createFarmNotFoundElement(pathname)),
|
|
11429
|
-
|
|
11602
|
+
"not-found-recovery"
|
|
11430
11603
|
)
|
|
11431
11604
|
);
|
|
11432
11605
|
} catch (error) {
|
|
@@ -11584,7 +11757,9 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
11584
11757
|
pprCacheKey,
|
|
11585
11758
|
{ html: fullHtml },
|
|
11586
11759
|
{
|
|
11587
|
-
|
|
11760
|
+
// revalidatePath() takes the route path ("/pricing"), as the docs show, while the
|
|
11761
|
+
// shell answers the public one ("/console/fr/pricing"): either clears it.
|
|
11762
|
+
paths: [...new Set([pathname, getFarmRoutePathname(pathname)])],
|
|
11588
11763
|
tags: ["ppr"],
|
|
11589
11764
|
revalidate: pprConfig.revalidate ?? false,
|
|
11590
11765
|
}
|
|
@@ -11668,7 +11843,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
11668
11843
|
${servesDefaultMCP ? `
|
|
11669
11844
|
// agent.mcp: no app route answered /mcp, so the default read-only server may.
|
|
11670
11845
|
if (
|
|
11671
|
-
normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
11846
|
+
normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkTU6VAH4Vcjs.FARM_DEFAULT_MCP_PATH)} &&
|
|
11672
11847
|
getFarmDefaultMCPServer()
|
|
11673
11848
|
) {
|
|
11674
11849
|
return applyProductionMiddlewareHeaders(
|
|
@@ -11715,7 +11890,12 @@ ${servesDefaultMCP ? `
|
|
|
11715
11890
|
errorElement = wrapWithFarmIntegrationProviders(errorElement);
|
|
11716
11891
|
|
|
11717
11892
|
const renderErrorElement = () =>
|
|
11718
|
-
|
|
11893
|
+
renderFarmCompleteDocument(
|
|
11894
|
+
ReactDOMServer,
|
|
11895
|
+
// Islands mode: the error document writes its islands' values, as a page does.
|
|
11896
|
+
typeof farmIslandsRender === "function" ? farmIslandsRender(errorElement) : errorElement,
|
|
11897
|
+
"error:" + errorBoundaryMatch.route.pattern
|
|
11898
|
+
);
|
|
11719
11899
|
const errorHtml = ${hasMiddlewareRuntime ? `await _runWithMiddlewareData(middlewareData, () =>
|
|
11720
11900
|
_runWithMiddlewareContext(middlewareContext, renderErrorElement)
|
|
11721
11901
|
)` : "await renderErrorElement()"};
|
|
@@ -11856,7 +12036,7 @@ ${farmRendererDisabled ? `
|
|
|
11856
12036
|
}
|
|
11857
12037
|
notFoundElement = wrapWithFarmIntegrationProviders(notFoundElement);
|
|
11858
12038
|
|
|
11859
|
-
const html = await ReactDOMServer
|
|
12039
|
+
const html = await renderFarmCompleteDocument(ReactDOMServer, notFoundElement, "not-found");
|
|
11860
12040
|
// The layouts' and the not-found page's metadata, as the development renderer uses it.
|
|
11861
12041
|
const notFoundMetadata = renderMetadataHead(
|
|
11862
12042
|
await resolveFarmNotFoundMetadata(
|
|
@@ -12190,17 +12370,22 @@ function escapeRoutePattern(value) {
|
|
|
12190
12370
|
return value.replace(/[|\\{}()[\]^$+?.*]/g, "\\$&");
|
|
12191
12371
|
}
|
|
12192
12372
|
function middlewarePatternMatches(pattern, pathname) {
|
|
12373
|
+
return createMiddlewarePatternMatcher(pattern)(pathname);
|
|
12374
|
+
}
|
|
12375
|
+
function createMiddlewarePatternMatcher(pattern) {
|
|
12193
12376
|
if (pattern instanceof RegExp) {
|
|
12194
|
-
|
|
12195
|
-
|
|
12377
|
+
return (pathname) => {
|
|
12378
|
+
pattern.lastIndex = 0;
|
|
12379
|
+
return pattern.test(pathname);
|
|
12380
|
+
};
|
|
12196
12381
|
}
|
|
12197
|
-
if (pattern === "*" || pattern === "/(.*)") return true;
|
|
12382
|
+
if (pattern === "*" || pattern === "/(.*)") return () => true;
|
|
12198
12383
|
if (pattern.endsWith("(.*)")) {
|
|
12199
12384
|
const prefix = pattern.slice(0, -4);
|
|
12200
|
-
return pathname === prefix || pathname.startsWith(`${prefix}/`);
|
|
12385
|
+
return (pathname) => pathname === prefix || pathname.startsWith(`${prefix}/`);
|
|
12201
12386
|
}
|
|
12202
12387
|
const segments = pattern.split("/").filter(Boolean);
|
|
12203
|
-
if (segments.length === 0) return pathname === "/";
|
|
12388
|
+
if (segments.length === 0) return (pathname) => pathname === "/";
|
|
12204
12389
|
const expression = segments.map((segment) => {
|
|
12205
12390
|
if (segment === "**") return "(?:/.*)?";
|
|
12206
12391
|
if (segment === "*") return "/[^/]+";
|
|
@@ -12212,7 +12397,8 @@ function middlewarePatternMatches(pattern, pathname) {
|
|
|
12212
12397
|
if (segment.startsWith(":") || /^\[.+\]$/.test(segment)) return "/[^/]+";
|
|
12213
12398
|
return `/${escapeRoutePattern(segment).replace(/\\\*/g, "[^/]*")}`;
|
|
12214
12399
|
}).join("");
|
|
12215
|
-
|
|
12400
|
+
const regex = new RegExp(`^${expression}/?$`);
|
|
12401
|
+
return (pathname) => regex.test(pathname);
|
|
12216
12402
|
}
|
|
12217
12403
|
function routePatternSpecificity(pattern) {
|
|
12218
12404
|
return pattern.split("/").filter(Boolean).reduce((score, segment) => {
|
|
@@ -12227,8 +12413,18 @@ function routePatternSpecificity(pattern) {
|
|
|
12227
12413
|
function getEffectiveRouteRule(config, pathname) {
|
|
12228
12414
|
return Object.entries(config.routeRules).filter(([pattern]) => middlewarePatternMatches(pattern, pathname)).sort(([left], [right]) => routePatternSpecificity(left) - routePatternSpecificity(right)).reduce((resolved, [, rule]) => Object.assign(resolved, rule), {});
|
|
12229
12415
|
}
|
|
12416
|
+
var manifestPageMatchers = /* @__PURE__ */ new WeakMap();
|
|
12230
12417
|
function getManifestPageEntry(manifest, pathname) {
|
|
12231
|
-
|
|
12418
|
+
let pages = manifestPageMatchers.get(manifest.routes);
|
|
12419
|
+
if (!pages) {
|
|
12420
|
+
pages = manifest.routes.filter((entry) => entry.kind === "page").map((entry) => ({
|
|
12421
|
+
entry,
|
|
12422
|
+
matches: createMiddlewarePatternMatcher(entry.pattern),
|
|
12423
|
+
specificity: _chunkYTVSWXEZcjs.getRoutePatternSpecificity.call(void 0, entry.pattern)
|
|
12424
|
+
})).sort((left, right) => _chunkYTVSWXEZcjs.compareRouteSpecificity.call(void 0, left.specificity, right.specificity)).map(({ entry, matches }) => ({ entry, matches }));
|
|
12425
|
+
manifestPageMatchers.set(manifest.routes, pages);
|
|
12426
|
+
}
|
|
12427
|
+
return _optionalChain([pages, 'access', _274 => _274.find, 'call', _275 => _275((page) => page.matches(pathname)), 'optionalAccess', _276 => _276.entry]);
|
|
12232
12428
|
}
|
|
12233
12429
|
function withFarmEdgeGuardedPrerenderHeaders(headers, edgeGuarded) {
|
|
12234
12430
|
if (!edgeGuarded) return headers;
|
|
@@ -12265,13 +12461,13 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
12265
12461
|
if (rewriteSources.some((source) => middlewarePatternMatches(source, pathname))) {
|
|
12266
12462
|
return "rewrite";
|
|
12267
12463
|
}
|
|
12268
|
-
if (
|
|
12269
|
-
if (
|
|
12270
|
-
if (
|
|
12464
|
+
if (_chunkPXAHSCR6cjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
|
|
12465
|
+
if (_chunkPXAHSCR6cjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
|
|
12466
|
+
if (_chunkOXNZUCHNcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
|
|
12271
12467
|
if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
|
|
12272
12468
|
const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
|
|
12273
|
-
if (_optionalChain([manifestEntry, 'optionalAccess',
|
|
12274
|
-
if (manifestEntry && (manifestEntry.runtime !== "auto" || Boolean(_optionalChain([manifestEntry, 'access',
|
|
12469
|
+
if (_optionalChain([manifestEntry, 'optionalAccess', _277 => _277.rendering]) === "dynamic") return "dynamic runtime manifest";
|
|
12470
|
+
if (manifestEntry && (manifestEntry.runtime !== "auto" || Boolean(_optionalChain([manifestEntry, 'access', _278 => _278.regions, 'optionalAccess', _279 => _279.length])) || manifestEntry.maxDuration !== void 0)) {
|
|
12275
12471
|
return "route runtime controls";
|
|
12276
12472
|
}
|
|
12277
12473
|
const routeRule = getEffectiveRouteRule(config, pathname);
|
|
@@ -12284,15 +12480,15 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
12284
12480
|
return void 0;
|
|
12285
12481
|
}
|
|
12286
12482
|
async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
12287
|
-
if (!_optionalChain([config, 'access',
|
|
12483
|
+
if (!_optionalChain([config, 'access', _280 => _280.docs, 'optionalAccess', _281 => _281.enabled]) || !config.docs.prerender) return [];
|
|
12288
12484
|
if (_chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge") {
|
|
12289
12485
|
_chunkQMNWKQL4cjs.logger.info(
|
|
12290
12486
|
`\u21AA Keeping docs pages in the edge docs snapshot: docs.prerender writes static files on Node and serverless targets, not "${preset}".`
|
|
12291
12487
|
);
|
|
12292
12488
|
return [];
|
|
12293
12489
|
}
|
|
12294
|
-
if (!
|
|
12295
|
-
const { pages: pages2, originDependent } =
|
|
12490
|
+
if (!_chunkKDOZORJDcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
12491
|
+
const { pages: pages2, originDependent } = _chunkHFUOLILAcjs.listFarmDocsBuiltInPrerenderPages.call(void 0, config.docs, {
|
|
12296
12492
|
root,
|
|
12297
12493
|
srcDir: config.srcDir
|
|
12298
12494
|
});
|
|
@@ -12309,7 +12505,7 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
|
12309
12505
|
);
|
|
12310
12506
|
return [];
|
|
12311
12507
|
}
|
|
12312
|
-
const pages = await
|
|
12508
|
+
const pages = await _chunkKDOZORJDcjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
|
|
12313
12509
|
if (!pages) {
|
|
12314
12510
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
12315
12511
|
`The docs adapter ${JSON.stringify(config.docs.adapter.id)} does not list its pages for prerendering; upgrade it to prerender docs pages. They render on request until then.`
|
|
@@ -12319,14 +12515,14 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
|
12319
12515
|
return pages;
|
|
12320
12516
|
}
|
|
12321
12517
|
async function listFarmDocsAnalyticsPages(config, root, preset) {
|
|
12322
|
-
if (!_optionalChain([config, 'access',
|
|
12518
|
+
if (!_optionalChain([config, 'access', _282 => _282.docs, 'optionalAccess', _283 => _283.enabled]) || config.analytics === false || _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) !== "nodejs") {
|
|
12323
12519
|
return [];
|
|
12324
12520
|
}
|
|
12325
12521
|
try {
|
|
12326
|
-
return await
|
|
12522
|
+
return await _chunkKDOZORJDcjs.listFarmDocsPagePaths.call(void 0, config.docs, {
|
|
12327
12523
|
root,
|
|
12328
12524
|
srcDir: config.srcDir,
|
|
12329
|
-
adapter: _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) &&
|
|
12525
|
+
adapter: _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) && _chunkKDOZORJDcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)
|
|
12330
12526
|
});
|
|
12331
12527
|
} catch (error) {
|
|
12332
12528
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
@@ -12337,9 +12533,9 @@ async function listFarmDocsAnalyticsPages(config, root, preset) {
|
|
|
12337
12533
|
}
|
|
12338
12534
|
function hasFarmNitroCacheRouteRule(routeRules) {
|
|
12339
12535
|
return Object.values(routeRules || {}).some((rule) => {
|
|
12340
|
-
const swr = _optionalChain([rule, 'optionalAccess',
|
|
12341
|
-
const cache = _optionalChain([rule, 'optionalAccess',
|
|
12342
|
-
const headers = _optionalChain([rule, 'optionalAccess',
|
|
12536
|
+
const swr = _optionalChain([rule, 'optionalAccess', _284 => _284.swr]);
|
|
12537
|
+
const cache = _optionalChain([rule, 'optionalAccess', _285 => _285.cache]);
|
|
12538
|
+
const headers = _optionalChain([rule, 'optionalAccess', _286 => _286.headers]);
|
|
12343
12539
|
return swr !== void 0 && swr !== false || cache !== void 0 && cache !== false || !!headers && typeof headers === "object" && Object.keys(headers).length > 0;
|
|
12344
12540
|
});
|
|
12345
12541
|
}
|
|
@@ -12352,10 +12548,10 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
12352
12548
|
const nitroBuilder = nitroBuilderResult.value;
|
|
12353
12549
|
const isVercel = preset === "vercel";
|
|
12354
12550
|
const isCloudflareWorker = preset === "cloudflare-module";
|
|
12355
|
-
const outputDir =
|
|
12551
|
+
const outputDir = _chunkOXNZUCHNcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
12356
12552
|
const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
|
|
12357
12553
|
const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
|
|
12358
|
-
const imageRuntime =
|
|
12554
|
+
const imageRuntime = _chunkTAU3OF5Bcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
12359
12555
|
const hasGeneratedMetadataImages = Array.from(routeManager.getMetadataImages().values()).some(
|
|
12360
12556
|
(image) => image.sourceType === "module"
|
|
12361
12557
|
);
|
|
@@ -12411,7 +12607,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
12411
12607
|
const edgeGuardedPrerenderRoutes = [];
|
|
12412
12608
|
const addPrerenderRoute = (pathname) => {
|
|
12413
12609
|
prerenderRoutes.push(pathname);
|
|
12414
|
-
if (
|
|
12610
|
+
if (_chunkPXAHSCR6cjs.appMiddlewareMayHandlePath.call(void 0, edgeMiddlewareRoutes, pathname)) {
|
|
12415
12611
|
edgeGuardedPrerenderRoutes.push(pathname);
|
|
12416
12612
|
}
|
|
12417
12613
|
};
|
|
@@ -12489,7 +12685,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
12489
12685
|
webEntry: clientJsSrc,
|
|
12490
12686
|
webBoot: clientBootSrc,
|
|
12491
12687
|
stylesheet: clientCssHref,
|
|
12492
|
-
webFiles: _nullishCoalesce(_optionalChain([clientModulePreloads, 'optionalAccess',
|
|
12688
|
+
webFiles: _nullishCoalesce(_optionalChain([clientModulePreloads, 'optionalAccess', _287 => _287.files]), () => ( []))
|
|
12493
12689
|
})
|
|
12494
12690
|
) : null;
|
|
12495
12691
|
for (const output of Object.values(ssrBundle)) {
|
|
@@ -12809,7 +13005,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
12809
13005
|
varyFarmNitroCacheRules(_chunkMQ4DYVFScjs.routeRulesToNitroRouteRules.call(void 0, config.routeRules), [
|
|
12810
13006
|
...config.md.enabled ? ["accept"] : [],
|
|
12811
13007
|
...shouldBuildFarmMobileClient(config) ? ["x-farm-shell"] : [],
|
|
12812
|
-
..._chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access',
|
|
13008
|
+
..._chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _288 => _288.experimental, 'optionalAccess', _289 => _289.serverComponents])) === "islands" ? ["f-layouts"] : []
|
|
12813
13009
|
]),
|
|
12814
13010
|
config.basePath,
|
|
12815
13011
|
_chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
|
|
@@ -12965,23 +13161,23 @@ function toFarmNodeResponse(request, response) {
|
|
|
12965
13161
|
snapshotSSRRebundleOptions(nitroConfig)
|
|
12966
13162
|
);
|
|
12967
13163
|
const requestedBuilder = _nullishCoalesce(nitroConfig.builder, () => ( process.env.NITRO_BUILDER));
|
|
12968
|
-
const nitroBuildIsFarms = (requestedBuilder === void 0 || requestedBuilder === "rollup" || requestedBuilder === "rolldown") && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig && !hasUnsupportedSSRRebundleOverrides && _optionalChain([nitroConfig, 'access',
|
|
12969
|
-
_optionalChain([nitroConfig, 'access',
|
|
12970
|
-
(handler) => _path2.default.resolve(_optionalChain([handler, 'optionalAccess',
|
|
13164
|
+
const nitroBuildIsFarms = (requestedBuilder === void 0 || requestedBuilder === "rollup" || requestedBuilder === "rolldown") && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig && !hasUnsupportedSSRRebundleOverrides && _optionalChain([nitroConfig, 'access', _290 => _290.rollupConfig, 'optionalAccess', _291 => _291.external]) === nitroRollupExternal && !hasRollupPlugins(_optionalChain([nitroConfig, 'access', _292 => _292.rollupConfig, 'optionalAccess', _293 => _293.plugins])) && customRollupKeys.length === 0 && Boolean(
|
|
13165
|
+
_optionalChain([nitroConfig, 'access', _294 => _294.handlers, 'optionalAccess', _295 => _295.some, 'call', _296 => _296(
|
|
13166
|
+
(handler) => _path2.default.resolve(_optionalChain([handler, 'optionalAccess', _297 => _297.handler]) || "") === nitroEntryPath
|
|
12971
13167
|
)])
|
|
12972
13168
|
);
|
|
12973
|
-
const canReusePrebuiltSSR = isPrebuiltSSRCandidate && nitroConfig.preset === "node-server" && nitroBuildIsFarms && _path2.default.resolve(_optionalChain([nitroConfig, 'access',
|
|
13169
|
+
const canReusePrebuiltSSR = isPrebuiltSSRCandidate && nitroConfig.preset === "node-server" && nitroBuildIsFarms && _path2.default.resolve(_optionalChain([nitroConfig, 'access', _298 => _298.output, 'optionalAccess', _299 => _299.serverDir]) || "") === _path2.default.resolve(expectedServerDir);
|
|
12974
13170
|
const prerenderReusesPrebuiltSSR = prerenderRoutes.length > 0 && ssrExternalsArePackaged && nitroBuildIsFarms;
|
|
12975
13171
|
const selectRolldownBuilder = canReusePrebuiltSSR && requestedBuilder === void 0 && await canUseRolldownBuilder();
|
|
12976
13172
|
if (selectRolldownBuilder) nitroConfig.builder = "rolldown";
|
|
12977
13173
|
const useRolldownBuilder = canReusePrebuiltSSR && (_nullishCoalesce(nitroConfig.builder, () => ( process.env.NITRO_BUILDER))) === "rolldown";
|
|
12978
13174
|
const shouldMinify = nitroConfig.minify !== false;
|
|
12979
|
-
const keepServerNames = !(_optionalChain([config, 'access',
|
|
13175
|
+
const keepServerNames = !(_optionalChain([config, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.enabled]) && _optionalChain([config, 'access', _302 => _302.docs, 'access', _303 => _303.adapter, 'optionalAccess', _304 => _304.server]));
|
|
12980
13176
|
const useFarmServerMinifier = shouldMinify && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig;
|
|
12981
13177
|
const serverChunkMinifier = useFarmServerMinifier ? createServerChunkMinifyPlugin({ keepNames: keepServerNames, target: "esnext" }) : null;
|
|
12982
13178
|
const ssrRollupPlugin = canReusePrebuiltSSR ? prebuiltSSRPlugin : createServerReadSSRAssetsPlugin(ssrBundle, ssrOutputDir);
|
|
12983
13179
|
if (ssrRollupPlugin) {
|
|
12984
|
-
const configuredRollupPlugins = _optionalChain([nitroConfig, 'access',
|
|
13180
|
+
const configuredRollupPlugins = _optionalChain([nitroConfig, 'access', _305 => _305.rollupConfig, 'optionalAccess', _306 => _306.plugins]);
|
|
12985
13181
|
nitroConfig.rollupConfig = {
|
|
12986
13182
|
...nitroConfig.rollupConfig,
|
|
12987
13183
|
plugins: [
|
|
@@ -13008,10 +13204,10 @@ function toFarmNodeResponse(request, response) {
|
|
|
13008
13204
|
const orderOf = (route) => _nullishCoalesce(prerenderOrder.get(route), () => ( Number.MAX_SAFE_INTEGER));
|
|
13009
13205
|
prerenderedRoutes.sort((a, b) => orderOf(a.route) - orderOf(b.route));
|
|
13010
13206
|
});
|
|
13011
|
-
if (_optionalChain([config, 'access',
|
|
13207
|
+
if (_optionalChain([config, 'access', _307 => _307.md, 'optionalAccess', _308 => _308.enabled])) {
|
|
13012
13208
|
nitroInstance.hooks.hook("prerender:generate", (route) => {
|
|
13013
|
-
if (!route.contents || !_optionalChain([route, 'access',
|
|
13014
|
-
const alternatePath =
|
|
13209
|
+
if (!route.contents || !_optionalChain([route, 'access', _309 => _309.contentType, 'optionalAccess', _310 => _310.toLowerCase, 'call', _311 => _311(), 'access', _312 => _312.includes, 'call', _313 => _313("html")])) return;
|
|
13210
|
+
const alternatePath = _chunkHGB4PM2Ccjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route, {
|
|
13015
13211
|
routePathname: (pathname) => routeManager.toRoutePathname(pathname)
|
|
13016
13212
|
});
|
|
13017
13213
|
if (!alternatePath) return;
|
|
@@ -13033,7 +13229,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
13033
13229
|
}
|
|
13034
13230
|
if (config.security.csp && config.security.csp.nonce) {
|
|
13035
13231
|
nitroInstance.hooks.hook("prerender:generate", async (route) => {
|
|
13036
|
-
if (!route.contents || !_optionalChain([route, 'access',
|
|
13232
|
+
if (!route.contents || !_optionalChain([route, 'access', _314 => _314.contentType, 'optionalAccess', _315 => _315.toLowerCase, 'call', _316 => _316(), 'access', _317 => _317.includes, 'call', _318 => _318("html")])) return;
|
|
13037
13233
|
const staticCsp = await _chunk6JHZPB52cjs.applyFarmCspHashesToHtml.call(void 0, route.contents, config.security);
|
|
13038
13234
|
if (!staticCsp) return;
|
|
13039
13235
|
route.contents = staticCsp.html;
|
|
@@ -13068,7 +13264,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
13068
13264
|
await nitroBuilder.copyPublicAssets(nitroInstance);
|
|
13069
13265
|
if (prerenderReusesPrebuiltSSR && !canReusePrebuiltSSR) {
|
|
13070
13266
|
nitroInstance.hooks.hook("prerender:config", (prerendererConfig) => {
|
|
13071
|
-
const configuredPlugins = _optionalChain([prerendererConfig, 'access',
|
|
13267
|
+
const configuredPlugins = _optionalChain([prerendererConfig, 'access', _319 => _319.rollupConfig, 'optionalAccess', _320 => _320.plugins]);
|
|
13072
13268
|
const plugins = Array.isArray(configuredPlugins) ? configuredPlugins : configuredPlugins ? [configuredPlugins] : [];
|
|
13073
13269
|
prerendererConfig.rollupConfig = {
|
|
13074
13270
|
...prerendererConfig.rollupConfig,
|
|
@@ -13125,13 +13321,13 @@ function toFarmNodeResponse(request, response) {
|
|
|
13125
13321
|
}
|
|
13126
13322
|
if (prerenderRoutes.length > 0) {
|
|
13127
13323
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
|
|
13128
|
-
const previousPrerender = process.env[
|
|
13129
|
-
process.env[
|
|
13324
|
+
const previousPrerender = process.env[_chunkROCF6UQDcjs.FARM_PRERENDER_ENV];
|
|
13325
|
+
process.env[_chunkROCF6UQDcjs.FARM_PRERENDER_ENV] = "1";
|
|
13130
13326
|
try {
|
|
13131
13327
|
await nitroBuilder.prerender(nitroInstance);
|
|
13132
13328
|
} finally {
|
|
13133
|
-
if (previousPrerender === void 0) delete process.env[
|
|
13134
|
-
else process.env[
|
|
13329
|
+
if (previousPrerender === void 0) delete process.env[_chunkROCF6UQDcjs.FARM_PRERENDER_ENV];
|
|
13330
|
+
else process.env[_chunkROCF6UQDcjs.FARM_PRERENDER_ENV] = previousPrerender;
|
|
13135
13331
|
}
|
|
13136
13332
|
}
|
|
13137
13333
|
const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs4, preset) : Promise.resolve(null);
|
|
@@ -13307,7 +13503,7 @@ async function moveVercelOutputPath(src, dest, fs4) {
|
|
|
13307
13503
|
await fs4.rename(src, dest);
|
|
13308
13504
|
return;
|
|
13309
13505
|
} catch (error) {
|
|
13310
|
-
const code = _optionalChain([error, 'optionalAccess',
|
|
13506
|
+
const code = _optionalChain([error, 'optionalAccess', _321 => _321.code]);
|
|
13311
13507
|
if (code !== "EPERM" && code !== "EACCES" && code !== "EXDEV" && code !== "ENOTEMPTY") {
|
|
13312
13508
|
throw error;
|
|
13313
13509
|
}
|
|
@@ -13333,7 +13529,7 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
13333
13529
|
try {
|
|
13334
13530
|
await moveVercelOutputPath(publicDir, staticDir, fs4);
|
|
13335
13531
|
} catch (error) {
|
|
13336
|
-
if (_optionalChain([error, 'optionalAccess',
|
|
13532
|
+
if (_optionalChain([error, 'optionalAccess', _322 => _322.code]) !== "ENOENT") throw error;
|
|
13337
13533
|
}
|
|
13338
13534
|
await copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4);
|
|
13339
13535
|
await copyPrismaClientForVercel(root, nitroFuncDir, fs4);
|
|
@@ -13347,7 +13543,7 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
13347
13543
|
config.basePath
|
|
13348
13544
|
);
|
|
13349
13545
|
const edgeMiddlewareRoutes = edgeMiddleware.middlewareRoutes.filter(
|
|
13350
|
-
(route) => edgeMiddleware.guardedPages.some((pathname) =>
|
|
13546
|
+
(route) => edgeMiddleware.guardedPages.some((pathname) => _chunkPXAHSCR6cjs.appMiddlewareMayHandlePath.call(void 0, [route], pathname))
|
|
13351
13547
|
);
|
|
13352
13548
|
if (edgeMiddlewareRoutes.length > 0) {
|
|
13353
13549
|
await writeFarmVercelEdgeMiddlewareFunction({
|
|
@@ -13363,7 +13559,7 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
13363
13559
|
vercelConfig.routes = buildFarmVercelRoutes({
|
|
13364
13560
|
presetRoutes: Array.isArray(vercelConfig.routes) ? vercelConfig.routes : [],
|
|
13365
13561
|
runtimeRoutes,
|
|
13366
|
-
middlewareRoutes: edgeMiddlewareRoutes.length > 0 ?
|
|
13562
|
+
middlewareRoutes: edgeMiddlewareRoutes.length > 0 ? createFarmVercelEdgeMiddlewareRoutes(edgeMiddleware.guardedPages, config.basePath) : [],
|
|
13367
13563
|
canonicalSlashRoutes: createFarmVercelCanonicalSlashRoutes(prerenderedPages)
|
|
13368
13564
|
});
|
|
13369
13565
|
const vercelConfigWithWorkflowCrons = _chunkFSODPZRTcjs.applyFarmWorkflowVercelCrons.call(void 0,
|
|
@@ -13375,8 +13571,8 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
13375
13571
|
_chunkQMNWKQL4cjs.logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
|
|
13376
13572
|
}
|
|
13377
13573
|
async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
|
|
13378
|
-
if (!_optionalChain([config, 'access',
|
|
13379
|
-
const [mainRoot, ...extraRoots] =
|
|
13574
|
+
if (!_optionalChain([config, 'access', _323 => _323.docs, 'optionalAccess', _324 => _324.enabled])) return;
|
|
13575
|
+
const [mainRoot, ...extraRoots] = _chunkHFUOLILAcjs.getFarmDocsRoots.call(void 0, config.docs);
|
|
13380
13576
|
await copyFarmDocsRootContent(
|
|
13381
13577
|
mainRoot,
|
|
13382
13578
|
root,
|
|
@@ -13397,10 +13593,10 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
|
|
|
13397
13593
|
async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs4) {
|
|
13398
13594
|
const docsContentDir = resolveBuildDocsContentDir(docs, root, srcDir);
|
|
13399
13595
|
if (!docsContentDir) return;
|
|
13400
|
-
const lastModifiedManifest =
|
|
13596
|
+
const lastModifiedManifest = _chunkHFUOLILAcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
|
|
13401
13597
|
fallback: "now"
|
|
13402
13598
|
});
|
|
13403
|
-
const undatedPages = _nullishCoalesce(_optionalChain([lastModifiedManifest, 'access',
|
|
13599
|
+
const undatedPages = _nullishCoalesce(_optionalChain([lastModifiedManifest, 'access', _325 => _325.unknown, 'optionalAccess', _326 => _326.length]), () => ( 0));
|
|
13404
13600
|
if (undatedPages > 0) {
|
|
13405
13601
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
13406
13602
|
`${undatedPages} docs page(s) were last changed before this shallow clone's Git history, so they show no "Last updated" date. Build from a full clone (git fetch --unshallow) or set lastModified in the page's frontmatter.`
|
|
@@ -13414,7 +13610,7 @@ async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs
|
|
|
13414
13610
|
dereference: true
|
|
13415
13611
|
});
|
|
13416
13612
|
await fs4.writeFile(
|
|
13417
|
-
_path2.default.join(bundledContentDir,
|
|
13613
|
+
_path2.default.join(bundledContentDir, _chunkHFUOLILAcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
|
|
13418
13614
|
`${JSON.stringify(lastModifiedManifest, null, 2)}
|
|
13419
13615
|
`
|
|
13420
13616
|
);
|
|
@@ -13485,7 +13681,7 @@ async function stageSharpRuntime(config, root, distDir, fs4, preset) {
|
|
|
13485
13681
|
try {
|
|
13486
13682
|
await copyPackage("sharp", sharpRequire);
|
|
13487
13683
|
if (!copiedPackages.has("sharp")) {
|
|
13488
|
-
throw new Error(`Farm image optimization requires sharp. ${
|
|
13684
|
+
throw new Error(`Farm image optimization requires sharp. ${_chunkTAU3OF5Bcjs.SHARP_INSTALL_HINT}`);
|
|
13489
13685
|
}
|
|
13490
13686
|
} catch (error) {
|
|
13491
13687
|
await fs4.rm(stageDir, { recursive: true, force: true });
|
|
@@ -13715,7 +13911,7 @@ async function createFarmProjectModuleSsrEnvironment() {
|
|
|
13715
13911
|
// src/build/index.ts
|
|
13716
13912
|
async function build(config, options = {}) {
|
|
13717
13913
|
return _chunkNG2EZ6QScjs.withProductionNodeEnv.call(void 0,
|
|
13718
|
-
() =>
|
|
13914
|
+
() => _chunkHTXKSREFcjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
|
|
13719
13915
|
);
|
|
13720
13916
|
}
|
|
13721
13917
|
function createBuildTargetBaseline(config) {
|
|
@@ -13726,7 +13922,7 @@ function createBuildTargetBaseline(config) {
|
|
|
13726
13922
|
preset,
|
|
13727
13923
|
distDir,
|
|
13728
13924
|
outputDir,
|
|
13729
|
-
outputWasDerived: outputDir ===
|
|
13925
|
+
outputWasDerived: outputDir === _chunkOXNZUCHNcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
|
|
13730
13926
|
};
|
|
13731
13927
|
}
|
|
13732
13928
|
function resolveBuildTargets(config, options, baseline) {
|
|
@@ -13735,8 +13931,8 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
13735
13931
|
const distDir = config.distDir || ".farm";
|
|
13736
13932
|
const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
|
|
13737
13933
|
const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
|
|
13738
|
-
const deployTarget = preset === config.deploy.preset ? config.deploy.target :
|
|
13739
|
-
const outputDir = shouldRefreshDerivedOutput ?
|
|
13934
|
+
const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkOXNZUCHNcjs.getDeployTargetForPreset.call(void 0, preset);
|
|
13935
|
+
const outputDir = shouldRefreshDerivedOutput ? _chunkOXNZUCHNcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
|
|
13740
13936
|
return {
|
|
13741
13937
|
root,
|
|
13742
13938
|
preset,
|
|
@@ -13744,7 +13940,7 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
13744
13940
|
distDir,
|
|
13745
13941
|
deployTarget,
|
|
13746
13942
|
outputDir,
|
|
13747
|
-
deployOutputDir:
|
|
13943
|
+
deployOutputDir: _chunkOXNZUCHNcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
|
|
13748
13944
|
};
|
|
13749
13945
|
}
|
|
13750
13946
|
async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
@@ -13781,15 +13977,15 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
13781
13977
|
};
|
|
13782
13978
|
config = {
|
|
13783
13979
|
...config,
|
|
13784
|
-
images:
|
|
13980
|
+
images: _chunkTAU3OF5Bcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
|
|
13785
13981
|
root: targets.root,
|
|
13786
13982
|
preset: targets.preset
|
|
13787
13983
|
})
|
|
13788
13984
|
};
|
|
13789
|
-
if (_optionalChain([config, 'access',
|
|
13985
|
+
if (_optionalChain([config, 'access', _327 => _327.docs, 'optionalAccess', _328 => _328.enabled])) await _chunkNDOE76QCcjs.loadFarmDocsEngine.call(void 0, );
|
|
13790
13986
|
pluginManager.updateContext({ config });
|
|
13791
13987
|
const { root, preset, srcDir, distDir, deployOutputDir } = targets;
|
|
13792
|
-
|
|
13988
|
+
_chunkHTXKSREFcjs.usePackageClientBoundaryCacheFile.call(void 0, _chunkHTXKSREFcjs.resolvePackageClientBoundaryCacheFile.call(void 0, root, distDir));
|
|
13793
13989
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
|
|
13794
13990
|
await pluginManager.setupPlugins();
|
|
13795
13991
|
await pluginManager.runHookParallel("beforeBundle", {
|
|
@@ -13801,8 +13997,8 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
13801
13997
|
});
|
|
13802
13998
|
_chunkQMNWKQL4cjs.logger.info("\u{1F50D} Discovering routes and API endpoints...");
|
|
13803
13999
|
const productionViteResult = productionViteResultPromise ? (await productionViteResultPromise)[0] : void 0;
|
|
13804
|
-
if (_optionalChain([productionViteResult, 'optionalAccess',
|
|
13805
|
-
const productionVite = _optionalChain([productionViteResult, 'optionalAccess',
|
|
14000
|
+
if (_optionalChain([productionViteResult, 'optionalAccess', _329 => _329.status]) === "rejected") throw productionViteResult.reason;
|
|
14001
|
+
const productionVite = _optionalChain([productionViteResult, 'optionalAccess', _330 => _330.value]);
|
|
13806
14002
|
const createViteServer = productionVite ? productionVite.createServer : (await import("vite")).createServer;
|
|
13807
14003
|
projectModuleServer = await createProjectModuleServer(
|
|
13808
14004
|
createViteServer,
|
|
@@ -13810,18 +14006,18 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
13810
14006
|
root,
|
|
13811
14007
|
rendererBuild.signal
|
|
13812
14008
|
);
|
|
13813
|
-
const farmApp =
|
|
14009
|
+
const farmApp = _chunkTAU3OF5Bcjs.createFarmApp.call(void 0, config, projectModuleServer);
|
|
13814
14010
|
await farmApp.initialize();
|
|
13815
14011
|
const routeManager = farmApp.getRouteManager();
|
|
13816
14012
|
const serverRenderer = farmApp.getServerRenderer();
|
|
13817
|
-
const typeArtifacts =
|
|
14013
|
+
const typeArtifacts = _chunkCLEWORVYcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
13818
14014
|
root,
|
|
13819
14015
|
srcDir,
|
|
13820
14016
|
layers: config.layers,
|
|
13821
14017
|
plugins: config.plugins,
|
|
13822
14018
|
extraRoutes: [
|
|
13823
|
-
..._optionalChain([config, 'access',
|
|
13824
|
-
...
|
|
14019
|
+
..._optionalChain([config, 'access', _331 => _331.openapi, 'optionalAccess', _332 => _332.enabled]) && config.openapi.route ? [config.openapi.route] : [],
|
|
14020
|
+
..._chunkHFUOLILAcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
|
|
13825
14021
|
],
|
|
13826
14022
|
suppressLintOnLink: config.suppressLintOnLink,
|
|
13827
14023
|
componentExtensions: config.renderer.componentExtensions,
|
|
@@ -13830,7 +14026,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
13830
14026
|
const message = error instanceof Error ? error.message : String(error);
|
|
13831
14027
|
_chunkQMNWKQL4cjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
|
|
13832
14028
|
});
|
|
13833
|
-
const apiRouteManager = new (0,
|
|
14029
|
+
const apiRouteManager = new (0, _chunk5LOARKDPcjs.APIRouteManager)(
|
|
13834
14030
|
_chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, config),
|
|
13835
14031
|
projectModuleServer,
|
|
13836
14032
|
{
|
|
@@ -13905,7 +14101,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
13905
14101
|
throw error;
|
|
13906
14102
|
} finally {
|
|
13907
14103
|
try {
|
|
13908
|
-
await _optionalChain([projectModuleServer, 'optionalAccess',
|
|
14104
|
+
await _optionalChain([projectModuleServer, 'optionalAccess', _333 => _333.close, 'call', _334 => _334()]);
|
|
13909
14105
|
} finally {
|
|
13910
14106
|
rendererBuild.abort();
|
|
13911
14107
|
}
|
|
@@ -13917,7 +14113,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
13917
14113
|
ssr: true,
|
|
13918
14114
|
buildLifetime
|
|
13919
14115
|
});
|
|
13920
|
-
const viteConfig =
|
|
14116
|
+
const viteConfig = _chunkTAU3OF5Bcjs.mergeFarmViteConfig.call(void 0,
|
|
13921
14117
|
{
|
|
13922
14118
|
root,
|
|
13923
14119
|
appType: "custom",
|
|
@@ -13929,12 +14125,12 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
13929
14125
|
},
|
|
13930
14126
|
plugins: [
|
|
13931
14127
|
...rendererVitePlugins,
|
|
13932
|
-
|
|
14128
|
+
_chunkTAU3OF5Bcjs.farmFontImportsPlugin.call(void 0, {
|
|
13933
14129
|
root,
|
|
13934
14130
|
basePath: config.basePath,
|
|
13935
14131
|
publicDir: config.publicDir
|
|
13936
14132
|
}),
|
|
13937
|
-
|
|
14133
|
+
_chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, ),
|
|
13938
14134
|
// Route modules load here at build time (rendering config, prerendering): `server-only`
|
|
13939
14135
|
// resolves as it does in the server build. Module-entry packages load pre-bundled, as in
|
|
13940
14136
|
// `farm dev`: unbundled, lucide-react alone is ~1,750 modules through the module runner,
|
|
@@ -13946,7 +14142,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
13946
14142
|
hmr: false
|
|
13947
14143
|
},
|
|
13948
14144
|
resolve: {
|
|
13949
|
-
alias:
|
|
14145
|
+
alias: _chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
13950
14146
|
dedupe: [...config.renderer.dedupe || []]
|
|
13951
14147
|
},
|
|
13952
14148
|
optimizeDeps: {
|
|
@@ -13985,17 +14181,22 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
13985
14181
|
noDiscovery: true
|
|
13986
14182
|
},
|
|
13987
14183
|
// An app or plugin that brings its own SSR environment keeps it.
|
|
13988
|
-
environments: _optionalChain([viteConfig, 'access',
|
|
14184
|
+
environments: _optionalChain([viteConfig, 'access', _335 => _335.environments, 'optionalAccess', _336 => _336.ssr, 'optionalAccess', _337 => _337.dev, 'optionalAccess', _338 => _338.createEnvironment]) ? viteConfig.environments : {
|
|
13989
14185
|
...viteConfig.environments,
|
|
13990
14186
|
ssr: {
|
|
13991
|
-
..._optionalChain([viteConfig, 'access',
|
|
14187
|
+
..._optionalChain([viteConfig, 'access', _339 => _339.environments, 'optionalAccess', _340 => _340.ssr]),
|
|
13992
14188
|
...await createFarmProjectModuleSsrEnvironment()
|
|
13993
14189
|
}
|
|
13994
14190
|
}
|
|
13995
14191
|
});
|
|
13996
14192
|
}
|
|
13997
14193
|
async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
13998
|
-
const {
|
|
14194
|
+
const {
|
|
14195
|
+
farmI18nClientBridgePlugin,
|
|
14196
|
+
farmIslandContainersPlugin,
|
|
14197
|
+
farmPlugin,
|
|
14198
|
+
farmServerOnlyEntriesPlugin
|
|
14199
|
+
} = await import("./vite.cjs");
|
|
13999
14200
|
const { PluginManager: PluginManager2 } = await import("./plugin-5PIQQVRP.cjs");
|
|
14000
14201
|
const pluginManager = new PluginManager2({
|
|
14001
14202
|
config,
|
|
@@ -14015,14 +14216,15 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
|
14015
14216
|
plugins: [
|
|
14016
14217
|
farmI18nClientBridgePlugin(),
|
|
14017
14218
|
farmServerOnlyEntriesPlugin(),
|
|
14219
|
+
farmIslandContainersPlugin(config),
|
|
14018
14220
|
farmPlugin(config, pluginManager),
|
|
14019
|
-
|
|
14221
|
+
_chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
14020
14222
|
],
|
|
14021
14223
|
mode: "production"
|
|
14022
14224
|
});
|
|
14023
14225
|
}
|
|
14024
14226
|
async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
14025
|
-
const { farmI18nClientBridgePlugin, farmPlugin } = await import("./vite.cjs");
|
|
14227
|
+
const { farmI18nClientBridgePlugin, farmIslandContainersPlugin, farmPlugin } = await import("./vite.cjs");
|
|
14026
14228
|
const { PluginManager: PluginManager2 } = await import("./plugin-5PIQQVRP.cjs");
|
|
14027
14229
|
const pluginManager = new PluginManager2({
|
|
14028
14230
|
config,
|
|
@@ -14044,12 +14246,13 @@ async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
|
14044
14246
|
define: {
|
|
14045
14247
|
__FARM_API_BASE_URL__: JSON.stringify(config.api.baseURL),
|
|
14046
14248
|
__FARM_ENV__: JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, config.env)),
|
|
14047
|
-
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access',
|
|
14249
|
+
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _341 => _341.env, 'optionalAccess', _342 => _342.public]) || {})
|
|
14048
14250
|
},
|
|
14049
14251
|
plugins: [
|
|
14050
14252
|
farmI18nClientBridgePlugin(),
|
|
14253
|
+
farmIslandContainersPlugin(config),
|
|
14051
14254
|
farmPlugin(config, pluginManager),
|
|
14052
|
-
|
|
14255
|
+
_chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
14053
14256
|
],
|
|
14054
14257
|
mode: "production"
|
|
14055
14258
|
});
|
|
@@ -14077,7 +14280,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
14077
14280
|
if (pluginManager) {
|
|
14078
14281
|
nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
|
|
14079
14282
|
}
|
|
14080
|
-
const outputDir =
|
|
14283
|
+
const outputDir = _chunkOXNZUCHNcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
14081
14284
|
const serverOutputDir = _path2.default.join(outputDir, "server");
|
|
14082
14285
|
const publicOutputDir = _path2.default.join(outputDir, "public");
|
|
14083
14286
|
const { mkdir, cp } = await import("fs/promises");
|
|
@@ -14148,7 +14351,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
14148
14351
|
root,
|
|
14149
14352
|
preset,
|
|
14150
14353
|
distDir,
|
|
14151
|
-
outputDir:
|
|
14354
|
+
outputDir: _chunkOXNZUCHNcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
|
|
14152
14355
|
});
|
|
14153
14356
|
}
|
|
14154
14357
|
}
|