@farm.js/core 0.1.72 → 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} +4 -4
- package/dist/{agent-mcp-handler-KE4J3W7S.cjs → agent-mcp-handler-VBCA3WZ6.cjs} +5 -5
- package/dist/{agent-mcp.d-BO3rZXEM.d.ts → agent-mcp.d-D_gHjCAE.d.ts} +1 -1
- package/dist/{agent-mcp.d-Cwff7lcA.d.mts → agent-mcp.d-PvEf-1mi.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +2 -2
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/{analyzer-5Q75LTIL.mjs → analyzer-MFYCJT75.mjs} +2 -2
- package/dist/analyzer-V5ZMRIIY.cjs +16 -0
- package/dist/api/node.d.mts +4 -4
- package/dist/api/node.d.ts +4 -4
- package/dist/api/route-manager.d.mts +4 -4
- package/dist/api/route-manager.d.ts +4 -4
- package/dist/api/runtime.d.mts +3 -3
- package/dist/api/runtime.d.ts +3 -3
- package/dist/api.d.mts +5 -5
- package/dist/api.d.ts +5 -5
- package/dist/{app-manifest.d-DwjGkYlP.d.ts → app-manifest.d-BpVTg43i.d.ts} +1 -1
- package/dist/{app-manifest.d-USD_IbFd.d.mts → app-manifest.d-CN7cEWHX.d.mts} +1 -1
- package/dist/app-markdown.cjs +4 -4
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +3 -3
- package/dist/{app.d-fW06_h8h.d.mts → app.d-BFWzAdTe.d.mts} +10 -4
- package/dist/{app.d-DAmF2MAk.d.ts → app.d-DO4PTCWm.d.ts} +10 -4
- package/dist/{chunk-OSMUE5ST.mjs → chunk-462MUII7.mjs} +3 -3
- package/dist/{chunk-MWUDEYBI.mjs → chunk-4CTCSKAF.mjs} +1 -1
- package/dist/{chunk-FSSONJRV.cjs → chunk-4YHGQDTT.cjs} +12 -12
- package/dist/{chunk-YCNHUIPR.cjs → chunk-4Z3YLMSW.cjs} +10 -10
- package/dist/{chunk-O32QPFVV.cjs → chunk-5PDMBWAF.cjs} +5 -5
- package/dist/{chunk-E2V7RRFL.mjs → chunk-6O6PAZZR.mjs} +1 -1
- package/dist/{chunk-LXEJNWF5.mjs → chunk-73K53YPP.mjs} +2 -2
- package/dist/{chunk-WIJF3PBM.mjs → chunk-7GMBETHM.mjs} +1 -1
- package/dist/{chunk-DGNMXL2O.mjs → chunk-B67CW2LM.mjs} +1 -1
- package/dist/{chunk-E3LE6EZH.cjs → chunk-CLEWORVY.cjs} +2 -2
- package/dist/{chunk-KPJYBSHL.mjs → chunk-CPMME66W.mjs} +149 -22
- package/dist/{chunk-VAWDGGW3.mjs → chunk-CYRIIVD4.mjs} +26 -15
- package/dist/{chunk-RFWWXEIF.mjs → chunk-FRO4BB2T.mjs} +1 -1
- package/dist/{chunk-N3XO5AL5.cjs → chunk-GPO3LJDJ.cjs} +2 -2
- package/dist/{chunk-645ENY7W.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-BE7AQXJB.cjs → chunk-HTXKSREF.cjs} +255 -89
- package/dist/{chunk-Z3GPAFIA.mjs → chunk-HY6IVQ54.mjs} +1 -1
- package/dist/{chunk-3JN5M3T5.mjs → chunk-IBVN7SW5.mjs} +247 -81
- package/dist/{chunk-OSEQL34Q.cjs → chunk-ILQ5DKYF.cjs} +2 -2
- package/dist/{chunk-AUAMXI6N.mjs → chunk-IXZSBO76.mjs} +1 -1
- package/dist/{chunk-77VNYVVX.mjs → chunk-JMOCMXTQ.mjs} +1 -1
- package/dist/{chunk-5R4Q5FN7.cjs → chunk-KDOZORJD.cjs} +52 -41
- package/dist/{chunk-7QCJDYZQ.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-5XFKWHZD.mjs → chunk-MJEKMT6B.mjs} +95 -106
- package/dist/chunk-NDOE76QC.cjs +58 -0
- 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-3WG7GJQL.cjs → chunk-OXNZUCHN.cjs} +9 -9
- package/dist/{chunk-C5AM2XDN.cjs → chunk-PXAHSCR6.cjs} +4 -4
- package/dist/{chunk-BSXKZPFE.mjs → chunk-QGCSUC5O.mjs} +112 -70
- package/dist/{chunk-EXN4DTVF.cjs → chunk-QKEZLYON.cjs} +2 -2
- package/dist/{chunk-QUYAGU65.mjs → chunk-REK6HZSU.mjs} +267 -231
- package/dist/{chunk-5X6OHJEE.cjs → chunk-ROCF6UQD.cjs} +5 -8
- package/dist/{chunk-KQAB5LML.mjs → chunk-SUQACHER.mjs} +2 -2
- package/dist/{chunk-NV26EGMC.mjs → chunk-SVQX5HYW.mjs} +2 -2
- package/dist/{chunk-CBLRSZQL.cjs → chunk-TAU3OF5B.cjs} +223 -234
- package/dist/{chunk-IWCYRDRQ.cjs → chunk-TDCP3Z4T.cjs} +3 -3
- package/dist/{chunk-TP4RAV7Y.cjs → chunk-TU6VAH4V.cjs} +8 -8
- package/dist/{chunk-ZDZUFD67.cjs → chunk-UVQRMUAR.cjs} +1 -1
- package/dist/{chunk-JMFTKNBA.mjs → chunk-UVZMSRHF.mjs} +2 -2
- package/dist/{chunk-GF22VGMS.cjs → chunk-VPETSSWN.cjs} +2 -2
- package/dist/{chunk-AYVGD3PK.mjs → chunk-XI3OXOMK.mjs} +1 -1
- package/dist/{chunk-HLMUWKAP.cjs → chunk-XUSJVHHD.cjs} +408 -366
- package/dist/{chunk-ET6WW3FY.cjs → chunk-YZK64PZT.cjs} +433 -397
- package/dist/{chunk-DS7JGFW5.mjs → chunk-Z3IN6GEX.mjs} +4 -7
- package/dist/{client-component.d-ciHeCxr-.d.mts → client-component.d-C71rMuHF.d.mts} +2 -2
- package/dist/{client-component.d-9J7CkTWW.d.ts → client-component.d-sF-Znk0j.d.ts} +2 -2
- package/dist/{client-plugins.d-JnRz5a1o.d.mts → client-plugins.d-B-Gd9mWR.d.mts} +1 -1
- package/dist/{client-plugins.d-CUOhfapO.d.ts → client-plugins.d-MFibjgBg.d.ts} +1 -1
- package/dist/client-plugins.d.mts +2 -2
- package/dist/client-plugins.d.ts +2 -2
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/config.d.mts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/desktop.d.mts +3 -3
- package/dist/desktop.d.ts +3 -3
- package/dist/{devtools-IZFUYWPG.cjs → devtools-6K4QXFRL.cjs} +5 -5
- package/dist/{devtools-7JPQMSTQ.mjs → devtools-TDIJ6HVC.mjs} +4 -4
- package/dist/docs.cjs +8 -8
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +7 -7
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/{headers.d-rbbTKGaN.d.mts → headers.d-BUxGJTsj.d.mts} +1 -1
- package/dist/{headers.d-CqpTL_fZ.d.ts → headers.d-uQ6BR59u.d.ts} +1 -1
- package/dist/index.cjs +24 -22
- package/dist/{index.d-CMKvzHLW.d.ts → index.d-BCGfxCXY.d.ts} +1 -1
- package/dist/{index.d-D_B2D9Il.d.mts → index.d-CuWOJ-un.d.mts} +1 -1
- package/dist/index.d.mts +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.mjs +23 -21
- package/dist/integrations/orm.d.mts +2 -2
- package/dist/integrations/orm.d.ts +2 -2
- package/dist/integrations.d.mts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.cjs +3 -3
- package/dist/internal/app-markdown-runtime.d.mts +3 -3
- package/dist/internal/app-markdown-runtime.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +23 -23
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +22 -22
- package/dist/internal/cli-runtime.cjs +9 -9
- package/dist/internal/cli-runtime.mjs +8 -8
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/compression-runtime.d.mts +2 -2
- package/dist/internal/compression-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.cjs +6 -6
- package/dist/internal/config-runtime.d.mts +4 -4
- package/dist/internal/config-runtime.d.ts +4 -4
- package/dist/internal/config-runtime.mjs +5 -5
- package/dist/internal/infra-analytics-runtime.cjs +9 -9
- package/dist/internal/infra-analytics-runtime.mjs +7 -7
- 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 +11 -11
- package/dist/internal/production-runtime.d.mts +10 -10
- package/dist/internal/production-runtime.d.ts +10 -10
- package/dist/internal/production-runtime.mjs +10 -10
- package/dist/markdown.cjs +2 -2
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.mjs +1 -1
- package/dist/middleware.d.mts +2 -2
- package/dist/middleware.d.ts +2 -2
- package/dist/{mount.d-ImEO7q8a.d.mts → mount.d-BIYmcGGg.d.mts} +1 -1
- package/dist/{mount.d-B0XMxDRh.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-RRx1CSlb.d.ts → navigation-delegate.d-Btfs6Uoa.d.ts} +1 -1
- package/dist/{navigation-delegate.d-83Q7ksf7.d.mts → navigation-delegate.d-CYBUupsv.d.mts} +1 -1
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- 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 +15 -15
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +14 -14
- package/dist/{render-plan.d-Ds2sXJ5m.d.ts → render-plan.d-0FHusf1D.d.ts} +1 -1
- package/dist/{render-plan.d-wP8nTeRV.d.mts → render-plan.d-BlyxqKMu.d.mts} +1 -1
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/{request.d-zpSn6pu_.d.ts → request.d-CPdVjssg.d.ts} +1 -1
- package/dist/{request.d-F3h7K37m.d.mts → request.d-CX-gks1l.d.mts} +1 -1
- package/dist/request.d.mts +3 -3
- package/dist/request.d.ts +3 -3
- package/dist/{route-rendering.d-Mw0ZKG2e.d.mts → route-rendering.d-CcvZ_4N2.d.mts} +1 -1
- package/dist/{route-rendering.d-BL0_AdKj.d.ts → route-rendering.d-DcOoSNoG.d.ts} +1 -1
- package/dist/{router.d-NGVsU11T.d.mts → router.d-C8RHma4A.d.mts} +1 -1
- package/dist/{router.d-BwXigemZ.d.ts → router.d-D2QnK8cM.d.ts} +1 -1
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-DHYZLWSF.mjs → rsc-pipeline-LC2FBZAR.mjs} +5 -5
- package/dist/{rsc-pipeline-BNXYMG4G.cjs → rsc-pipeline-NTAM65NT.cjs} +6 -6
- package/dist/{runtime-XPYKUNL3.mjs → runtime-MWAC7NWR.mjs} +5 -5
- package/dist/{runtime-IWOT6ZVC.cjs → runtime-U4PAMTVH.cjs} +7 -7
- package/dist/{runtime.d-OBIZWpx1.d.ts → runtime.d-1l_1bLrL.d.ts} +1 -1
- package/dist/{runtime.d-BA3MzhXz.d.mts → runtime.d-BQUHHq8M.d.mts} +1 -1
- package/dist/server-plugins.d.mts +4 -4
- package/dist/server-plugins.d.ts +4 -4
- package/dist/server.cjs +37 -35
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +20 -18
- package/dist/{spa-router.d-DrYT944-.d.ts → spa-router.d-BJtXNeqo.d.ts} +2 -2
- package/dist/{spa-router.d-BG2XzE5p.d.mts → spa-router.d-BzPdi48R.d.mts} +2 -2
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/{utils.d-C1k9BJeD.d.mts → utils.d-B4ZW-6z6.d.mts} +1 -1
- package/dist/{utils.d-DcF4wxey.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 +17 -15
- package/dist/vite.d.mts +16 -7
- package/dist/vite.d.ts +16 -7
- package/dist/vite.mjs +16 -14
- package/package.json +1 -1
- package/dist/analyzer-UJG4MIZW.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 _chunk5R4Q5FN7cjs = require('./chunk-5R4Q5FN7.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 _chunkE3LE6EZHcjs = require('./chunk-E3LE6EZH.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');
|
|
@@ -283,7 +284,7 @@ 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
290
|
|
|
@@ -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",
|
|
@@ -1347,7 +1350,7 @@ function farmStripPlatformConfigPlugin(configFiles) {
|
|
|
1347
1350
|
// removed block used (`readFileSync` for a version, say).
|
|
1348
1351
|
enforce: "pre",
|
|
1349
1352
|
transform: {
|
|
1350
|
-
filter: { id:
|
|
1353
|
+
filter: { id: _chunkTAU3OF5Bcjs.fileNamePattern.call(void 0, configFiles) },
|
|
1351
1354
|
async handler(code, id) {
|
|
1352
1355
|
const file = id.split("?", 1)[0];
|
|
1353
1356
|
if (!files.has(_path2.default.resolve(file)) && !files.has(realPath(file))) return null;
|
|
@@ -1574,7 +1577,7 @@ async function writeFarmVercelEdgeMiddlewareFunction(options) {
|
|
|
1574
1577
|
logLevel: "silent",
|
|
1575
1578
|
plugins: [edgeNodeModulesPlugin(coreDir, unsupported)],
|
|
1576
1579
|
resolve: {
|
|
1577
|
-
alias:
|
|
1580
|
+
alias: _chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
1578
1581
|
conditionNames: ["edge-light", "worker", "browser", "import", "module", "default"]
|
|
1579
1582
|
},
|
|
1580
1583
|
transform: {
|
|
@@ -1963,7 +1966,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
|
|
|
1963
1966
|
return {
|
|
1964
1967
|
name: "farm-omitted-metadata-image-runtime",
|
|
1965
1968
|
resolveId: {
|
|
1966
|
-
filter: { id:
|
|
1969
|
+
filter: { id: _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, ["@vercel/og"]) },
|
|
1967
1970
|
handler(source, importer) {
|
|
1968
1971
|
if (source !== "@vercel/og") return null;
|
|
1969
1972
|
const fromCoreRuntime = importer !== void 0 && isFarmCoreModule(importer) && !/^og\.[cm]?[jt]sx?$/.test(_path2.default.basename(importer.split("?", 1)[0]));
|
|
@@ -1972,7 +1975,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
|
|
|
1972
1975
|
}
|
|
1973
1976
|
},
|
|
1974
1977
|
load: {
|
|
1975
|
-
filter: { id:
|
|
1978
|
+
filter: { id: _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID]) },
|
|
1976
1979
|
handler(id) {
|
|
1977
1980
|
if (id !== FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID) return null;
|
|
1978
1981
|
return `
|
|
@@ -2375,7 +2378,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
|
|
|
2375
2378
|
const routeRuntimeManifestResultPromise = Promise.allSettled([routeRuntimeManifestPromise]);
|
|
2376
2379
|
const pageRoutes = [];
|
|
2377
2380
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|
|
2378
|
-
const markdownSourcePath = entry.markdownSourcePath || (
|
|
2381
|
+
const markdownSourcePath = entry.markdownSourcePath || (_chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? entry.modulePath : void 0);
|
|
2379
2382
|
pageRoutes.push({
|
|
2380
2383
|
pattern,
|
|
2381
2384
|
...entry.directory ? { directory: entry.directory } : {},
|
|
@@ -2644,7 +2647,7 @@ async function mergeBuiltFontCss(outputDir, fontCssSource) {
|
|
|
2644
2647
|
}
|
|
2645
2648
|
const normalizedFontCss = typeof fontCss === "string" ? fontCss : Buffer.from(fontCss).toString("utf8");
|
|
2646
2649
|
await fs4.writeFile(fontCssPath, normalizedFontCss);
|
|
2647
|
-
await fs4.writeFile(clientCssPath,
|
|
2650
|
+
await fs4.writeFile(clientCssPath, _chunkTAU3OF5Bcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
|
|
2648
2651
|
}
|
|
2649
2652
|
function importsFarmClientBlockedPackage(id, packageName) {
|
|
2650
2653
|
return id === packageName || id.startsWith(`${packageName}/`);
|
|
@@ -2697,7 +2700,7 @@ function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, optio
|
|
|
2697
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)}`;
|
|
2698
2701
|
let plan = cache.get(key);
|
|
2699
2702
|
if (!plan) {
|
|
2700
|
-
plan =
|
|
2703
|
+
plan = _chunkHTXKSREFcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
|
|
2701
2704
|
cache.set(key, plan);
|
|
2702
2705
|
}
|
|
2703
2706
|
return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
|
|
@@ -2705,7 +2708,7 @@ function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, optio
|
|
|
2705
2708
|
async function buildClient(productionVite, config, root, srcDir, outputDir, pageRoutes, layoutRoutes = [], routeSlots = [], isolatedClientBoundaryModules = /* @__PURE__ */ new Set(), hydrationPlanCache = /* @__PURE__ */ new Map(), rendererBuildLifetime, programmaticClientRoutes, mobile = false) {
|
|
2706
2709
|
if (!mobile) await _chunkE5UN4OWXcjs.removeFarmMobileClientManifest.call(void 0, _path2.default.dirname(outputDir));
|
|
2707
2710
|
const viteBuild = productionVite.build;
|
|
2708
|
-
const { farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
|
|
2711
|
+
const { farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
|
|
2709
2712
|
const { PluginManager: PluginManager2 } = await import("./plugin-5PIQQVRP.cjs");
|
|
2710
2713
|
const fs4 = await import("fs/promises");
|
|
2711
2714
|
const pluginManager = new PluginManager2({
|
|
@@ -2726,14 +2729,14 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2726
2729
|
`[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
|
|
2727
2730
|
);
|
|
2728
2731
|
}
|
|
2729
|
-
const isolatedMode =
|
|
2732
|
+
const isolatedMode = _chunkHTXKSREFcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
2730
2733
|
_optionalChain([config, 'access', _86 => _86.experimental, 'optionalAccess', _87 => _87.isolatedClientHydration]),
|
|
2731
2734
|
{
|
|
2732
2735
|
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _88 => _88.experimental, 'optionalAccess', _89 => _89.serverComponents])) === "rsc",
|
|
2733
2736
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
2734
2737
|
}
|
|
2735
2738
|
);
|
|
2736
|
-
const planOptions =
|
|
2739
|
+
const planOptions = _chunkHTXKSREFcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
2737
2740
|
config.renderer,
|
|
2738
2741
|
Boolean(unsupportedIntegrationProvider)
|
|
2739
2742
|
);
|
|
@@ -2745,58 +2748,13 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2745
2748
|
...planOptions,
|
|
2746
2749
|
serverTreeLayouts: pagePlanOptions.serverOwners
|
|
2747
2750
|
};
|
|
2748
|
-
const
|
|
2749
|
-
try {
|
|
2750
|
-
const metadata = getCachedClientModuleHydrationPlan(
|
|
2751
|
-
layout.modulePath,
|
|
2752
|
-
root,
|
|
2753
|
-
isolatedMode,
|
|
2754
|
-
hydrationPlanCache,
|
|
2755
|
-
layoutPlanOptions
|
|
2756
|
-
);
|
|
2757
|
-
return {
|
|
2758
|
-
...layout,
|
|
2759
|
-
shouldHydrate: metadata.shouldHydrate,
|
|
2760
|
-
islandStrategy: metadata.islandStrategy,
|
|
2761
|
-
legacyShouldHydrate: metadata.legacyShouldHydrate,
|
|
2762
|
-
legacyIslandStrategy: metadata.legacyIslandStrategy,
|
|
2763
|
-
mode: metadata.mode,
|
|
2764
|
-
estimatedIsolatedRootCount: metadata.estimatedIsolatedRootCount,
|
|
2765
|
-
hasIsolatedClientBoundaries: metadata.hasIsolatedClientBoundaries,
|
|
2766
|
-
isolatedHydrationEligible: metadata.isolatedHydrationEligible,
|
|
2767
|
-
isolatedBoundaries: metadata.isolatedBoundaries,
|
|
2768
|
-
asyncOwnerIslands: metadata.asyncOwnerIslands,
|
|
2769
|
-
suppressedAsyncHydration: metadata.suppressedAsyncHydration,
|
|
2770
|
-
fallbackReason: metadata.fallbackReason,
|
|
2771
|
-
serverTreeLayout: metadata.serverTreeLayout
|
|
2772
|
-
};
|
|
2773
|
-
} catch (error) {
|
|
2774
|
-
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F Could not inspect layout file ${layout.modulePath}: ${error}`);
|
|
2775
|
-
return {
|
|
2776
|
-
...layout,
|
|
2777
|
-
shouldHydrate: false,
|
|
2778
|
-
islandStrategy: null,
|
|
2779
|
-
legacyShouldHydrate: false,
|
|
2780
|
-
legacyIslandStrategy: null,
|
|
2781
|
-
mode: isolatedMode,
|
|
2782
|
-
estimatedIsolatedRootCount: 0,
|
|
2783
|
-
hasIsolatedClientBoundaries: false,
|
|
2784
|
-
isolatedHydrationEligible: false,
|
|
2785
|
-
isolatedBoundaries: [],
|
|
2786
|
-
asyncOwnerIslands: void 0,
|
|
2787
|
-
suppressedAsyncHydration: void 0,
|
|
2788
|
-
fallbackReason: void 0,
|
|
2789
|
-
serverTreeLayout: void 0
|
|
2790
|
-
};
|
|
2791
|
-
}
|
|
2792
|
-
});
|
|
2793
|
-
const layoutAppliesToRoute = _chunkC5AM2XDNcjs.routeBoundaryCoversDirectory;
|
|
2751
|
+
const layoutAppliesToRoute = _chunkPXAHSCR6cjs.routeBoundaryCoversDirectory;
|
|
2794
2752
|
const routeDirectory = (route) => _nullishCoalesce(route.directory, () => ( route.pattern));
|
|
2795
2753
|
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _92 => _92.experimental, 'optionalAccess', _93 => _93.serverComponents])) === "islands";
|
|
2796
2754
|
const adapterOwnsDocsRuntime = Boolean(
|
|
2797
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
|
|
2798
2756
|
);
|
|
2799
|
-
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(
|
|
2800
2758
|
(docsRoot) => `/${docsRoot.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/"
|
|
2801
2759
|
) : [];
|
|
2802
2760
|
const adapterDocsEntry = _nullishCoalesce(docsEntries[0], () => ( null));
|
|
@@ -2805,159 +2763,209 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2805
2763
|
);
|
|
2806
2764
|
const syntheticDocsEntry = _optionalChain([config, 'access', _101 => _101.docs, 'optionalAccess', _102 => _102.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
|
|
2807
2765
|
const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
|
|
2808
|
-
const
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
depth: pattern.split("/").filter(Boolean).length,
|
|
2839
|
-
metadata: {
|
|
2840
|
-
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,
|
|
2841
2796
|
shouldHydrate: false,
|
|
2842
2797
|
islandStrategy: null,
|
|
2843
2798
|
legacyShouldHydrate: false,
|
|
2844
2799
|
legacyIslandStrategy: null,
|
|
2800
|
+
mode: isolatedMode,
|
|
2845
2801
|
estimatedIsolatedRootCount: 0,
|
|
2846
2802
|
hasIsolatedClientBoundaries: false,
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
for (const layout of clientLayouts) {
|
|
2855
|
-
const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
|
|
2856
|
-
if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
|
|
2857
|
-
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F ${_chunkBE7AQXJBcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`);
|
|
2858
|
-
}
|
|
2859
|
-
}
|
|
2860
|
-
if (isolatedMode === "analyze") {
|
|
2861
|
-
for (const { entry, metadata } of [
|
|
2862
|
-
...clientLayouts.map((layout) => ({ entry: layout, metadata: layout })),
|
|
2863
|
-
...routePlans.map(({ route, metadata: metadata2 }) => ({ entry: route, metadata: metadata2 }))
|
|
2864
|
-
]) {
|
|
2865
|
-
if (!("isolatedHydrationEligible" in metadata) || !metadata.isolatedHydrationEligible) {
|
|
2866
|
-
continue;
|
|
2803
|
+
isolatedHydrationEligible: false,
|
|
2804
|
+
isolatedBoundaries: [],
|
|
2805
|
+
asyncOwnerIslands: void 0,
|
|
2806
|
+
suppressedAsyncHydration: void 0,
|
|
2807
|
+
fallbackReason: void 0,
|
|
2808
|
+
serverTreeLayout: void 0
|
|
2809
|
+
};
|
|
2867
2810
|
}
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
)
|
|
2871
|
-
}
|
|
2872
|
-
}
|
|
2873
|
-
const serverSlotPlans = islandsMode ? routeSlots.flatMap((slot) => {
|
|
2874
|
-
const plan = getCachedClientModuleHydrationPlan(
|
|
2875
|
-
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),
|
|
2876
2814
|
root,
|
|
2877
2815
|
isolatedMode,
|
|
2878
|
-
|
|
2879
|
-
{ ...pagePlanOptions, serverOwners: true }
|
|
2816
|
+
{ ...planOptions, packageReferences: pagePlanOptions.serverOwners }
|
|
2880
2817
|
);
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
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) {
|
|
2890
2861
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
2891
|
-
`\u26A0\uFE0F ${
|
|
2862
|
+
`\u26A0\uFE0F ${_chunkHTXKSREFcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`
|
|
2892
2863
|
);
|
|
2893
2864
|
}
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
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"}.`
|
|
2905
2876
|
);
|
|
2906
|
-
clientPages.push({
|
|
2907
|
-
...route,
|
|
2908
|
-
relativePath,
|
|
2909
|
-
pageShouldHydrate: metadata.shouldHydrate,
|
|
2910
|
-
islandStrategy,
|
|
2911
|
-
hasIsolatedClientBoundaries: metadata.hasIsolatedClientBoundaries || applicableClientLayouts.some((layout) => layout.hasIsolatedClientBoundaries) || slotBoundaries.length > 0,
|
|
2912
|
-
isolatedBoundaries: [
|
|
2913
|
-
...metadata.hasIsolatedClientBoundaries ? metadata.isolatedBoundaries : [],
|
|
2914
|
-
...slotBoundaries,
|
|
2915
|
-
...applicableClientLayouts.filter((layout) => layout.hasIsolatedClientBoundaries || layout.serverTreeLayout).flatMap((layout) => layout.isolatedBoundaries)
|
|
2916
|
-
],
|
|
2917
|
-
// The server renders a server tree only below a hydrating layout.
|
|
2918
|
-
..._chunkBE7AQXJBcjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
|
|
2919
|
-
});
|
|
2920
|
-
_chunkQMNWKQL4cjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
|
|
2921
2877
|
}
|
|
2922
|
-
} catch (error) {
|
|
2923
|
-
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F Could not inspect route file ${route.modulePath}: ${error}`);
|
|
2924
2878
|
}
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
const hydrationStrategies = applicableClientLayouts.flatMap(
|
|
2933
|
-
(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 }
|
|
2934
2886
|
);
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
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
|
+
}
|
|
2951
2931
|
}
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
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
|
+
}
|
|
2960
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 };
|
|
2961
2969
|
});
|
|
2962
2970
|
_chunkQMNWKQL4cjs.logger.info(
|
|
2963
2971
|
`\u{1F4F1} Total hydratable routes detected: ${clientPages.length} pages, ${clientLayouts.filter((layout) => layout.shouldHydrate || layout.hasIsolatedClientBoundaries).length} layouts, and ${clientRouteSlots.length} slots`
|
|
@@ -2975,7 +2983,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2975
2983
|
srcDir,
|
|
2976
2984
|
adapterOwnsDocsRuntime ? false : _chunkDZZHTMWMcjs.isFarmDocsSearchEnabled.call(void 0, config.docs),
|
|
2977
2985
|
adapterOwnsDocsRuntime ? void 0 : _chunkDZZHTMWMcjs.resolveFarmDocsSearchClientModule.call(void 0, root),
|
|
2978
|
-
_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,
|
|
2979
2987
|
adapterOwnsDocsRuntime ? _optionalChain([config, 'access', _105 => _105.docs, 'access', _106 => _106.adapter, 'optionalAccess', _107 => _107.react]) : void 0,
|
|
2980
2988
|
config.i18n,
|
|
2981
2989
|
config.plugins,
|
|
@@ -2984,11 +2992,11 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2984
2992
|
config.trailingSlash,
|
|
2985
2993
|
_chunkJX5VOLAVcjs.getIntegrationProviders.call(void 0, config.integrations),
|
|
2986
2994
|
config.basePath,
|
|
2987
|
-
|
|
2995
|
+
_chunkTAU3OF5Bcjs.generateClientCachePersistenceCode.call(void 0, _chunkTAU3OF5Bcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
|
|
2988
2996
|
adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0,
|
|
2989
2997
|
_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _108 => _108.experimental, 'optionalAccess', _109 => _109.serverComponents])) === "islands",
|
|
2990
2998
|
platform,
|
|
2991
|
-
islandsMode ?
|
|
2999
|
+
islandsMode ? _chunkHTXKSREFcjs.collectFarmServerStylesheets.call(void 0,
|
|
2992
3000
|
[
|
|
2993
3001
|
...layoutRoutes.map((layout) => layout.modulePath),
|
|
2994
3002
|
...pageRoutes.filter((route) => !isAdapterDocsRoute(route.pattern)).map((route) => route.modulePath)
|
|
@@ -3003,7 +3011,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3003
3011
|
await fs4.writeFile(_path2.default.join(clientEntryDir, "farm-client-router.tsx"), clientEntry.router);
|
|
3004
3012
|
}
|
|
3005
3013
|
const clientInput = { [entryName]: clientEntryPath };
|
|
3006
|
-
if (platform === "web" &&
|
|
3014
|
+
if (platform === "web" && _chunkTAU3OF5Bcjs.canBootFarmIslandsClient.call(void 0, config)) {
|
|
3007
3015
|
const clientBootPath = _path2.default.join(clientEntryDir, "farm-client-boot.tsx");
|
|
3008
3016
|
await fs4.writeFile(
|
|
3009
3017
|
clientBootPath,
|
|
@@ -3075,7 +3083,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3075
3083
|
}
|
|
3076
3084
|
},
|
|
3077
3085
|
plugins: [
|
|
3078
|
-
|
|
3086
|
+
_chunkTAU3OF5Bcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
3079
3087
|
createFarmPrivateClientSourcemapsPlugin({
|
|
3080
3088
|
outDir: _path2.default.join(
|
|
3081
3089
|
_path2.default.dirname(outputDir),
|
|
@@ -3107,7 +3115,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3107
3115
|
...rendererVitePlugins,
|
|
3108
3116
|
...config.vite.plugins || [],
|
|
3109
3117
|
farmServerOnlyEntriesPlugin({ platform }),
|
|
3110
|
-
|
|
3118
|
+
_chunkTAU3OF5Bcjs.farmDocsClientConfigPlugin.call(void 0,
|
|
3111
3119
|
adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
|
|
3112
3120
|
),
|
|
3113
3121
|
// Plugin to redirect @farm.js/core imports to client-only exports
|
|
@@ -3140,7 +3148,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3140
3148
|
},
|
|
3141
3149
|
load: {
|
|
3142
3150
|
filter: {
|
|
3143
|
-
id:
|
|
3151
|
+
id: _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [
|
|
3144
3152
|
"\0empty-module",
|
|
3145
3153
|
"\0empty-api-route",
|
|
3146
3154
|
"\0farm-i18n-client-bridge",
|
|
@@ -3173,11 +3181,12 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3173
3181
|
}
|
|
3174
3182
|
}
|
|
3175
3183
|
},
|
|
3184
|
+
farmIslandContainersPlugin(config),
|
|
3176
3185
|
farmPlugin(
|
|
3177
3186
|
{ ...config, isolatedClientBoundaryModules, programmaticClientRoutes },
|
|
3178
3187
|
pluginManager
|
|
3179
3188
|
),
|
|
3180
|
-
|
|
3189
|
+
_chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
3181
3190
|
],
|
|
3182
3191
|
mode: "production",
|
|
3183
3192
|
css: postcssSearchPath ? {
|
|
@@ -3185,7 +3194,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3185
3194
|
} : void 0,
|
|
3186
3195
|
// Ensure React is bundled for client
|
|
3187
3196
|
resolve: {
|
|
3188
|
-
alias:
|
|
3197
|
+
alias: _chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
3189
3198
|
dedupe: [...config.renderer.dedupe || []]
|
|
3190
3199
|
},
|
|
3191
3200
|
// Optimize dependencies - exclude server-side code from client bundle
|
|
@@ -3199,7 +3208,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3199
3208
|
}
|
|
3200
3209
|
};
|
|
3201
3210
|
await viteBuild(
|
|
3202
|
-
|
|
3211
|
+
_chunkTAU3OF5Bcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite, { clientOutput: true })
|
|
3203
3212
|
);
|
|
3204
3213
|
if (platform === "mobile") {
|
|
3205
3214
|
await fs4.rm(_path2.default.join(outputDir, `${entryName}.css`), { force: true });
|
|
@@ -3300,7 +3309,7 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
|
|
|
3300
3309
|
return response;
|
|
3301
3310
|
}
|
|
3302
3311
|
|
|
3303
|
-
${streamNavigations ?
|
|
3312
|
+
${streamNavigations ? _chunkTAU3OF5Bcjs.FARM_NAVIGATION_STREAM_READER_SOURCE : ""}
|
|
3304
3313
|
|
|
3305
3314
|
function clearFarmPrefetchCacheOnDeploymentMismatch(router, error) {
|
|
3306
3315
|
if (error?.name === "FarmDeploymentMismatchError") {
|
|
@@ -4269,7 +4278,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
|
|
|
4269
4278
|
import { createRoot, hydrateRoot } from "react-dom/client";` : appSetupPath ? `import React, { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
|
|
4270
4279
|
import __farmAppSetup from ${JSON.stringify(_chunkQMNWKQL4cjs.toPosixPath.call(void 0, appSetupPath))};
|
|
4271
4280
|
__farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};`;
|
|
4272
|
-
const providerClientCode =
|
|
4281
|
+
const providerClientCode = _chunkTAU3OF5Bcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
4273
4282
|
integrationProviders,
|
|
4274
4283
|
root,
|
|
4275
4284
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -4292,18 +4301,18 @@ __farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot
|
|
|
4292
4301
|
const layoutImportStatements = [];
|
|
4293
4302
|
const layoutRegistrations = [];
|
|
4294
4303
|
const hydratingLayoutPatterns = layoutRoutes.filter((layout) => layout.shouldHydrate).map((layout) => layout.pattern);
|
|
4295
|
-
const treeLayoutPatterns = islandValues ?
|
|
4304
|
+
const treeLayoutPatterns = islandValues ? _chunkPXAHSCR6cjs.getFarmServerTreeLayoutPatterns.call(void 0, layoutRoutes) : /* @__PURE__ */ new Set();
|
|
4296
4305
|
layoutRoutes.forEach((layout, index) => {
|
|
4297
4306
|
const relativePath = toImportPath(layout.modulePath);
|
|
4298
4307
|
const treeLayout = treeLayoutPatterns.has(layout.pattern);
|
|
4299
4308
|
const rendersOnClient = treeLayout || !layout.hasIsolatedClientBoundaries && hydratingLayoutPatterns.some(
|
|
4300
|
-
(pattern) =>
|
|
4309
|
+
(pattern) => _chunkPXAHSCR6cjs.layoutsCanCoverSamePage.call(void 0, layout.pattern, pattern)
|
|
4301
4310
|
);
|
|
4302
4311
|
if (rendersOnClient && !treeLayout) {
|
|
4303
4312
|
layoutImportStatements.push(`import Layout${index} from "${relativePath}";`);
|
|
4304
4313
|
}
|
|
4305
|
-
const groupScope =
|
|
4306
|
-
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)}` : "";
|
|
4307
4316
|
layoutRegistrations.push(
|
|
4308
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" : ""} }`
|
|
4309
4318
|
);
|
|
@@ -4390,7 +4399,7 @@ mountFarmDocsSearch();
|
|
|
4390
4399
|
|
|
4391
4400
|
${generateUniversalRouterStateRuntime()}
|
|
4392
4401
|
|
|
4393
|
-
${
|
|
4402
|
+
${_chunkTAU3OF5Bcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
4394
4403
|
|
|
4395
4404
|
// SPA Router for server-rendered pages (HTML swap)
|
|
4396
4405
|
const spaRouter = {
|
|
@@ -4828,7 +4837,7 @@ function hasHydratableLayout(pathname) {
|
|
|
4828
4837
|
});
|
|
4829
4838
|
}
|
|
4830
4839
|
|
|
4831
|
-
${
|
|
4840
|
+
${_chunkTAU3OF5Bcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
4832
4841
|
// Wrap a page element with applicable layouts
|
|
4833
4842
|
function wrapWithLayouts(pageElement, pathname, params) {
|
|
4834
4843
|
const layouts = getApplicableLayouts(pathname);
|
|
@@ -4863,7 +4872,7 @@ function createLayoutPageBoundary(route, pageElement, serverHtml) {
|
|
|
4863
4872
|
return React.createElement("div", props, pageElement);
|
|
4864
4873
|
}
|
|
4865
4874
|
let farmLastRouteState = null;
|
|
4866
|
-
${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${
|
|
4875
|
+
${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkTAU3OF5Bcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
4867
4876
|
function farmTreeLayoutsOf(pathname) {
|
|
4868
4877
|
return getApplicableLayouts(pathname).filter(function(layout) {
|
|
4869
4878
|
return layout.serverTree === true;
|
|
@@ -5427,7 +5436,7 @@ function fitsSegmentResponse(currentRoot, nextRoot) {
|
|
|
5427
5436
|
return true;
|
|
5428
5437
|
}` : ""}
|
|
5429
5438
|
|
|
5430
|
-
${
|
|
5439
|
+
${_chunkTAU3OF5Bcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
5431
5440
|
|
|
5432
5441
|
function activateNavigationScripts(root) {
|
|
5433
5442
|
for (const script of Array.from(root?.querySelectorAll?.("script") || [])) {
|
|
@@ -5530,7 +5539,7 @@ function getLayoutShell(root, patterns, index) {
|
|
|
5530
5539
|
return shell.innerHTML;
|
|
5531
5540
|
}
|
|
5532
5541
|
|
|
5533
|
-
${islandValues ?
|
|
5542
|
+
${islandValues ? _chunkTAU3OF5Bcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceSharedLayoutBoundary(currentRoot, nextRoot, refresh = false) {
|
|
5534
5543
|
// A refresh keeps the islands still on the page: the ones in streamed Suspense content too.
|
|
5535
5544
|
if (refresh) revealFarmStreamedContent(nextRoot);
|
|
5536
5545
|
const currentPatterns = getLayoutPatterns(currentRoot);
|
|
@@ -6112,7 +6121,7 @@ void hydrate();
|
|
|
6112
6121
|
}
|
|
6113
6122
|
async function buildSSRInMemory(productionVite, config, root, routeManager, apiRouteManager, serverRenderer, preset, collectedPageRoutes, collectedLayoutRoutes, collectedRouteSlots, isolatedClientBoundaryModules, hydrationPlanCache, rendererBuildLifetime) {
|
|
6114
6123
|
const viteBuild = productionVite.build;
|
|
6115
|
-
const { farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
|
|
6124
|
+
const { farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
|
|
6116
6125
|
const { PluginManager: PluginManager2 } = await import("./plugin-5PIQQVRP.cjs");
|
|
6117
6126
|
const fs4 = await import("fs/promises");
|
|
6118
6127
|
const pluginManager = new PluginManager2({
|
|
@@ -6240,7 +6249,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6240
6249
|
}))
|
|
6241
6250
|
);
|
|
6242
6251
|
const instrumentationPath = _chunk3GNHJ3RNcjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
|
|
6243
|
-
const notFoundPath =
|
|
6252
|
+
const notFoundPath = _chunkTAU3OF5Bcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
|
|
6244
6253
|
if (notFoundPath) _chunkQMNWKQL4cjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
|
|
6245
6254
|
layoutRoutes.sort((a, b) => {
|
|
6246
6255
|
const depthA = a.pattern.split("/").filter(Boolean).length;
|
|
@@ -6262,8 +6271,8 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6262
6271
|
);
|
|
6263
6272
|
const hasObservabilityHandler = !!config.observability && typeof config.observability === "object" && "onEvent" in config.observability;
|
|
6264
6273
|
const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _119 => _119.mdx, 'optionalAccess', _120 => _120.components]));
|
|
6265
|
-
const hasMiddlewareConfig =
|
|
6266
|
-
const hasRouteContextConfig =
|
|
6274
|
+
const hasMiddlewareConfig = _chunkPXAHSCR6cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
|
|
6275
|
+
const hasRouteContextConfig = _chunkOXNZUCHNcjs.hasCustomFarmRouteContext.call(void 0, config);
|
|
6267
6276
|
const hasServerRuntimePlugins = _chunkDMXMIE2Ccjs.hasFarmServerRuntimePlugins.call(void 0, config.plugins);
|
|
6268
6277
|
const hasPluginRoutes = hasFarmPluginRoutes(config);
|
|
6269
6278
|
const hasServerCacheConfig = hasFarmServerCacheConfig(config.cache);
|
|
@@ -6273,9 +6282,9 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6273
6282
|
const hasConfiguredRuntimePlugins = Boolean(
|
|
6274
6283
|
hasRuntimeConfigModule && (config.plugins || []).length > 0
|
|
6275
6284
|
);
|
|
6276
|
-
if (
|
|
6285
|
+
if (_chunkKDOZORJDcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
6277
6286
|
const adapterGuardedPaths = new Set(getFarmDocsGuardedPaths(config, middlewareRoutes));
|
|
6278
|
-
|
|
6287
|
+
_chunkKDOZORJDcjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
|
|
6279
6288
|
config.docs,
|
|
6280
6289
|
{ root, srcDir: config.srcDir },
|
|
6281
6290
|
(pathname) => adapterGuardedPaths.has(pathname),
|
|
@@ -6285,7 +6294,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6285
6294
|
const farmDocsCspNonceMarker = _chunk6JHZPB52cjs.createFarmCspNonce.call(void 0, config.security);
|
|
6286
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,
|
|
6287
6296
|
farmDocsCspNonceMarker,
|
|
6288
|
-
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, {
|
|
6289
6298
|
root,
|
|
6290
6299
|
srcDir: config.srcDir,
|
|
6291
6300
|
clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
|
|
@@ -6452,7 +6461,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6452
6461
|
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _131 => _131.env, 'optionalAccess', _132 => _132.public]) || {})
|
|
6453
6462
|
},
|
|
6454
6463
|
plugins: [
|
|
6455
|
-
|
|
6464
|
+
_chunkTAU3OF5Bcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
6456
6465
|
...tailwindVitePlugin ? [tailwindVitePlugin] : [],
|
|
6457
6466
|
...rendererVitePlugins,
|
|
6458
6467
|
...config.vite.plugins || [],
|
|
@@ -6474,8 +6483,9 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6474
6483
|
] : [],
|
|
6475
6484
|
{ ..._chunkNG2EZ6QScjs.createReactProductionModePlugin.call(void 0, ), enforce: "pre" },
|
|
6476
6485
|
farmServerOnlyEntriesPlugin(),
|
|
6486
|
+
farmIslandContainersPlugin(config),
|
|
6477
6487
|
farmPlugin({ ...config, isolatedClientBoundaryModules }, pluginManager),
|
|
6478
|
-
|
|
6488
|
+
_chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
6479
6489
|
...hasRuntimeConfigModule ? [
|
|
6480
6490
|
farmStripPlatformConfigPlugin(
|
|
6481
6491
|
[
|
|
@@ -6487,7 +6497,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6487
6497
|
{
|
|
6488
6498
|
name: "farm-virtual-ssr-entry",
|
|
6489
6499
|
resolveId: {
|
|
6490
|
-
filter: { id:
|
|
6500
|
+
filter: { id: _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [virtualEntryId, "\0virtual:farm-ssr-entry"]) },
|
|
6491
6501
|
handler(id) {
|
|
6492
6502
|
if (id === virtualEntryId || id === "\0virtual:farm-ssr-entry") {
|
|
6493
6503
|
return virtualEntryId;
|
|
@@ -6496,7 +6506,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6496
6506
|
}
|
|
6497
6507
|
},
|
|
6498
6508
|
load: {
|
|
6499
|
-
filter: { id:
|
|
6509
|
+
filter: { id: _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [virtualEntryId]) },
|
|
6500
6510
|
handler(id) {
|
|
6501
6511
|
if (id === virtualEntryId) {
|
|
6502
6512
|
return virtualEntryCode;
|
|
@@ -6528,7 +6538,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6528
6538
|
resolve: {
|
|
6529
6539
|
alias: [
|
|
6530
6540
|
...shouldAliasReactServerToWebBuild(config.renderer, preset) ? [createFarmReactWebServerAlias(hasReactDomEdgeServerBuild(root))] : [],
|
|
6531
|
-
...Object.entries(
|
|
6541
|
+
...Object.entries(_chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
|
|
6532
6542
|
([find, replacement]) => ({ find, replacement })
|
|
6533
6543
|
)
|
|
6534
6544
|
],
|
|
@@ -6536,7 +6546,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
6536
6546
|
dedupe: [...config.renderer.dedupe || []]
|
|
6537
6547
|
}
|
|
6538
6548
|
};
|
|
6539
|
-
await viteBuild(
|
|
6549
|
+
await viteBuild(_chunkTAU3OF5Bcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
|
|
6540
6550
|
} finally {
|
|
6541
6551
|
if (postcssConfigDir) {
|
|
6542
6552
|
try {
|
|
@@ -6578,9 +6588,9 @@ function getFarmDocsGuardedPaths(config, middlewareRoutes) {
|
|
|
6578
6588
|
config: { middleware: config.middleware, integrations: config.integrations },
|
|
6579
6589
|
middlewareRoutes
|
|
6580
6590
|
};
|
|
6581
|
-
return
|
|
6582
|
-
(docsRoot) =>
|
|
6583
|
-
).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));
|
|
6584
6594
|
}
|
|
6585
6595
|
function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
|
|
6586
6596
|
const llmsTxt = _optionalChain([agent, 'optionalAccess', _135 => _135.llmsTxt]);
|
|
@@ -6977,7 +6987,7 @@ ReactDOMServer.configureApp(__farmAppSetup);`;
|
|
|
6977
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 = []) {
|
|
6978
6988
|
const farmRendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, config.renderer);
|
|
6979
6989
|
const farmIslandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _149 => _149.experimental, 'optionalAccess', _150 => _150.serverComponents])) === "islands";
|
|
6980
|
-
const farmClientBoot =
|
|
6990
|
+
const farmClientBoot = _chunkTAU3OF5Bcjs.canBootFarmIslandsClient.call(void 0, config);
|
|
6981
6991
|
const farmMobileClient = shouldBuildFarmMobileClient(config);
|
|
6982
6992
|
const farmMobileShells = farmMobileClient && config.mobileShells ? config.mobileShells : null;
|
|
6983
6993
|
const hasCompressionRuntime = config.compress && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
|
|
@@ -6987,7 +6997,7 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
|
|
|
6987
6997
|
const servesAgentSitemap = Boolean(_optionalChain([config, 'access', _154 => _154.agent, 'optionalAccess', _155 => _155.sitemap, 'optionalAccess', _156 => _156.enabled])) && !applicationMetadataRoutes.some(
|
|
6988
6998
|
(metadata) => metadata.kind === "sitemap" && metadata.pattern === "/"
|
|
6989
6999
|
);
|
|
6990
|
-
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");
|
|
6991
7001
|
const servesAiCatalog = _optionalChain([config, 'access', _159 => _159.agent, 'optionalAccess', _160 => _160.aiCatalog]) !== false;
|
|
6992
7002
|
const hasPluginRuntime = hasRuntimeIntegrationConfig || hasServerRuntimePlugins;
|
|
6993
7003
|
const hasInfraAnalyticsRuntime = config.analytics !== false && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
|
|
@@ -7045,7 +7055,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7045
7055
|
(image) => image.sourceType === "module"
|
|
7046
7056
|
);
|
|
7047
7057
|
const edgeMiddlewareFilePaths = farmTargetRunsEdgeMiddleware(preset) ? middlewareRoutes.filter(isFarmEdgeMiddlewareRoute).map((route) => route.filePath) : [];
|
|
7048
|
-
const hasMiddlewareRuntime = middlewareRoutes.length > 0 ||
|
|
7058
|
+
const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunkPXAHSCR6cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
|
|
7049
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)) : [];
|
|
7050
7060
|
const integrationProviders = _chunkJX5VOLAVcjs.getIntegrationProviders.call(void 0, config.integrations);
|
|
7051
7061
|
const renderedIntegrationProviders = integrationProviders.filter(
|
|
@@ -7056,7 +7066,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7056
7066
|
`Integration provider components are not supported by the "${config.renderer.name}" renderer.`
|
|
7057
7067
|
);
|
|
7058
7068
|
}
|
|
7059
|
-
const providerServerModules =
|
|
7069
|
+
const providerServerModules = _chunkTAU3OF5Bcjs.generateFarmIntegrationProviderServerModules.call(void 0,
|
|
7060
7070
|
renderedIntegrationProviders,
|
|
7061
7071
|
config.root,
|
|
7062
7072
|
_nullishCoalesce(config.renderer.componentExtensions, () => ( []))
|
|
@@ -7076,14 +7086,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7076
7086
|
const unsupportedIntegrationProvider = renderedIntegrationProviders.find(
|
|
7077
7087
|
(provider) => provider.supportsIsolatedHydration !== true
|
|
7078
7088
|
);
|
|
7079
|
-
const isolatedHydrationMode =
|
|
7089
|
+
const isolatedHydrationMode = _chunkHTXKSREFcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
7080
7090
|
_optionalChain([config, 'access', _175 => _175.experimental, 'optionalAccess', _176 => _176.isolatedClientHydration]),
|
|
7081
7091
|
{
|
|
7082
7092
|
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _177 => _177.experimental, 'optionalAccess', _178 => _178.serverComponents])) === "rsc",
|
|
7083
7093
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
7084
7094
|
}
|
|
7085
7095
|
);
|
|
7086
|
-
const hydrationPlanOptions =
|
|
7096
|
+
const hydrationPlanOptions = _chunkHTXKSREFcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
7087
7097
|
config.renderer,
|
|
7088
7098
|
Boolean(unsupportedIntegrationProvider)
|
|
7089
7099
|
);
|
|
@@ -7091,35 +7101,38 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7091
7101
|
...hydrationPlanOptions,
|
|
7092
7102
|
serverOwners: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _179 => _179.experimental, 'optionalAccess', _180 => _180.serverComponents])) === "islands"
|
|
7093
7103
|
};
|
|
7094
|
-
const layoutHydrationPlans =
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
isolatedHydrationMode,
|
|
7100
|
-
hydrationPlanCache,
|
|
7101
|
-
{ ...hydrationPlanOptions, serverTreeLayouts: pageHydrationPlanOptions.serverOwners }
|
|
7102
|
-
)
|
|
7103
|
-
}));
|
|
7104
|
-
const markdownPagePlan = _chunkBE7AQXJBcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
7105
|
-
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
|
|
7106
|
-
config.root,
|
|
7107
|
-
isolatedHydrationMode,
|
|
7108
|
-
{ ...hydrationPlanOptions, packageReferences: pageHydrationPlanOptions.serverOwners }
|
|
7109
|
-
);
|
|
7110
|
-
const pageHydrationPlans = new Map(
|
|
7111
|
-
pageRoutes.map((route) => [
|
|
7112
|
-
route.modulePath,
|
|
7113
|
-
_chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
|
|
7114
|
-
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,
|
|
7115
7109
|
config.root,
|
|
7116
7110
|
isolatedHydrationMode,
|
|
7117
7111
|
hydrationPlanCache,
|
|
7118
|
-
pageHydrationPlanOptions
|
|
7112
|
+
{ ...hydrationPlanOptions, serverTreeLayouts: pageHydrationPlanOptions.serverOwners }
|
|
7119
7113
|
)
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
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,
|
|
7123
7136
|
layoutHydrationPlans.map((layout) => ({
|
|
7124
7137
|
pattern: layout.pattern,
|
|
7125
7138
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -7128,10 +7141,10 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7128
7141
|
pageRoutes.map((route) => ({
|
|
7129
7142
|
// Compared by directory so a grouped layout applies only inside its group.
|
|
7130
7143
|
pattern: _nullishCoalesce(route.directory, () => ( route.pattern)),
|
|
7131
|
-
depth:
|
|
7144
|
+
depth: _chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, _nullishCoalesce(route.directory, () => ( route.pattern))),
|
|
7132
7145
|
metadata: pageHydrationPlans.get(route.modulePath)
|
|
7133
7146
|
})),
|
|
7134
|
-
|
|
7147
|
+
_chunkPXAHSCR6cjs.routeBoundaryCoversDirectory,
|
|
7135
7148
|
{ serverOwners: pageHydrationPlanOptions.serverOwners }
|
|
7136
7149
|
);
|
|
7137
7150
|
const providerServerImports = [
|
|
@@ -7162,9 +7175,9 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7162
7175
|
}).map(({ route }) => route);
|
|
7163
7176
|
orderedPageRoutes.forEach((route, index) => {
|
|
7164
7177
|
const varName = `pageRoute${index}`;
|
|
7165
|
-
if (
|
|
7166
|
-
const renderingDirective2 =
|
|
7167
|
-
const markdownServerTree = pageHydrationPlanOptions.serverOwners &&
|
|
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));
|
|
7168
7181
|
pageRegistrations.push(`
|
|
7169
7182
|
{
|
|
7170
7183
|
pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
|
|
@@ -7189,7 +7202,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7189
7202
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(route.modulePath)};`
|
|
7190
7203
|
);
|
|
7191
7204
|
const clientMetadata = pageHydrationPlans.get(route.modulePath);
|
|
7192
|
-
const renderingDirective =
|
|
7205
|
+
const renderingDirective = _chunkCLEWORVYcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
|
|
7193
7206
|
pageRegistrations.push(`
|
|
7194
7207
|
{
|
|
7195
7208
|
pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
|
|
@@ -7197,8 +7210,8 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7197
7210
|
module: ${varName},
|
|
7198
7211
|
shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},${clientMetadata.shouldHydrate ? `
|
|
7199
7212
|
clientModule: ${JSON.stringify(_chunkQMNWKQL4cjs.toViteModuleId.call(void 0, route.modulePath, config.root))},` : ""}
|
|
7200
|
-
islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${
|
|
7201
|
-
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,
|
|
7202
7215
|
route,
|
|
7203
7216
|
clientMetadata,
|
|
7204
7217
|
layoutHydrationPlans.map((layout) => ({ ...layout, ...layout.hydration })),
|
|
@@ -7217,7 +7230,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7217
7230
|
});
|
|
7218
7231
|
const layoutImports = [];
|
|
7219
7232
|
const layoutRegistrations = [];
|
|
7220
|
-
const treeLayoutPatterns = farmIslandsMode ?
|
|
7233
|
+
const treeLayoutPatterns = farmIslandsMode ? _chunkPXAHSCR6cjs.getFarmServerTreeLayoutPatterns.call(void 0,
|
|
7221
7234
|
layoutHydrationPlans.map((layout) => ({
|
|
7222
7235
|
pattern: layout.pattern,
|
|
7223
7236
|
shouldHydrate: layout.hydration.shouldHydrate,
|
|
@@ -7261,7 +7274,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7261
7274
|
containerId: ${JSON.stringify(slot.containerId)},
|
|
7262
7275
|
interception: ${JSON.stringify(slot.interception)},
|
|
7263
7276
|
fallback: ${JSON.stringify(slot.fallback)},
|
|
7264
|
-
hydrates: ${!farmIslandsMode ||
|
|
7277
|
+
hydrates: ${!farmIslandsMode || _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, slot.modulePath, config.root).isClientComponent},
|
|
7265
7278
|
module: ${varName},
|
|
7266
7279
|
}`);
|
|
7267
7280
|
});
|
|
@@ -7272,12 +7285,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7272
7285
|
errorImports.push(
|
|
7273
7286
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(errorRoute.modulePath)};`
|
|
7274
7287
|
);
|
|
7275
|
-
const groupScope =
|
|
7288
|
+
const groupScope = _chunkPXAHSCR6cjs.getRouteGroupScope.call(void 0, errorRoute.pattern);
|
|
7276
7289
|
errorRegistrations.push(`
|
|
7277
7290
|
{
|
|
7278
|
-
pattern: ${JSON.stringify(
|
|
7291
|
+
pattern: ${JSON.stringify(_chunkPXAHSCR6cjs.stripRouteGroups.call(void 0, errorRoute.pattern))},${groupScope ? `
|
|
7279
7292
|
groupScope: ${JSON.stringify(groupScope)},
|
|
7280
|
-
directoryDepth: ${
|
|
7293
|
+
directoryDepth: ${_chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, errorRoute.pattern)},` : ""}
|
|
7281
7294
|
module: ${varName},
|
|
7282
7295
|
}`);
|
|
7283
7296
|
});
|
|
@@ -7289,12 +7302,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
7289
7302
|
loadingImports.push(
|
|
7290
7303
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(loadingRoute.modulePath)};`
|
|
7291
7304
|
);
|
|
7292
|
-
const groupScope =
|
|
7305
|
+
const groupScope = _chunkPXAHSCR6cjs.getRouteGroupScope.call(void 0, loadingRoute.pattern);
|
|
7293
7306
|
loadingRegistrations.push(`
|
|
7294
7307
|
{
|
|
7295
|
-
pattern: ${JSON.stringify(
|
|
7308
|
+
pattern: ${JSON.stringify(_chunkPXAHSCR6cjs.stripRouteGroups.call(void 0, loadingRoute.pattern))},${groupScope ? `
|
|
7296
7309
|
groupScope: ${JSON.stringify(groupScope)},
|
|
7297
|
-
directoryDepth: ${
|
|
7310
|
+
directoryDepth: ${_chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, loadingRoute.pattern)},` : ""}
|
|
7298
7311
|
module: ${varName},
|
|
7299
7312
|
}`);
|
|
7300
7313
|
});
|
|
@@ -7568,10 +7581,10 @@ import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
|
|
|
7568
7581
|
);
|
|
7569
7582
|
const nativeServerFns = (config.plugins || []).some(
|
|
7570
7583
|
(plugin) => _optionalChain([plugin, 'optionalAccess', _201 => _201.name]) === _chunk4EBC7EMWcjs.FARM_NATIVE_SERVER_FN_PLUGIN
|
|
7571
|
-
) ?
|
|
7584
|
+
) ? _chunkTDCP3Z4Tcjs.collectFarmNativeServerFns.call(void 0, {
|
|
7572
7585
|
root: config.root,
|
|
7573
7586
|
srcDir: config.srcDir,
|
|
7574
|
-
entries:
|
|
7587
|
+
entries: _chunkTDCP3Z4Tcjs.findFarmNativeScreenFiles.call(void 0, _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, config))
|
|
7575
7588
|
}) : void 0;
|
|
7576
7589
|
const integrationImports = `
|
|
7577
7590
|
${configModulePath ? `import * as FarmUserConfigModule from ${toVirtualEntryImportSpecifier(configModulePath)};` : ""}
|
|
@@ -7586,7 +7599,7 @@ ${nativeServerFns ? `const __farmNativeServerFnRegistry = Object.assign(Object.c
|
|
|
7586
7599
|
${nativeServerFns.flatMap((module, index) => module.exports.map((entry) => ` ${JSON.stringify(entry.id)}: __farmNativeServerFns${index}[${JSON.stringify(entry.name)}],`)).join("\n")}
|
|
7587
7600
|
});` : ""}
|
|
7588
7601
|
`;
|
|
7589
|
-
const imageRuntime =
|
|
7602
|
+
const imageRuntime = _chunkTAU3OF5Bcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
7590
7603
|
const imageRuntimeImport = imageRuntime === "none" ? "" : `import { _withFarmImageSourceClientAddress, createCloudflareImageTransformer, createFarmImageHandler } from "@farm.js/core/image/server";`;
|
|
7591
7604
|
const imageNodeRuntimeImport = imageRuntime === "node" ? `import { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } from "@farm.js/core/image/sharp";` : "";
|
|
7592
7605
|
const apiHandlerCode = apiRoutes.length > 0 ? `
|
|
@@ -7768,7 +7781,7 @@ const farmResolvedRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs);
|
|
|
7768
7781
|
|
|
7769
7782
|
function FarmDefault404Page() {
|
|
7770
7783
|
return React.createElement(React.Fragment, null,
|
|
7771
|
-
React.createElement("style", null, ${JSON.stringify(
|
|
7784
|
+
React.createElement("style", null, ${JSON.stringify(_chunkTAU3OF5Bcjs.DEFAULT_NOT_FOUND_STYLES)}),
|
|
7772
7785
|
React.createElement("main", {
|
|
7773
7786
|
className: "farm-default-not-found",
|
|
7774
7787
|
"aria-labelledby": "farm-default-not-found-title",
|
|
@@ -7922,7 +7935,7 @@ ${_optionalChain([config, 'access', _211 => _211.agent, 'optionalAccess', _212 =
|
|
|
7922
7935
|
// to the build.
|
|
7923
7936
|
const farmNoindexPreview = resolveFarmPreviewDeployment(
|
|
7924
7937
|
globalThis.process?.env,
|
|
7925
|
-
${JSON.stringify(
|
|
7938
|
+
${JSON.stringify(_chunkILQ5DKYFcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env))},
|
|
7926
7939
|
);` : ""}
|
|
7927
7940
|
const farmMdxComponents = ${mdxComponentsPath ? `(FarmMdxComponentsModule.components || Reflect.get(FarmMdxComponentsModule, "default") || {})` : `(configuredFarmMdxComponents && typeof configuredFarmMdxComponents === "object" ? configuredFarmMdxComponents : {})`};
|
|
7928
7941
|
const farmObservabilityConfig = farmUserConfig?.observability ?? ${JSON.stringify(
|
|
@@ -8053,7 +8066,7 @@ const farmDocsHandler = ${_optionalChain([config, 'access', _220 => _220.docs, '
|
|
|
8053
8066
|
registerMCPServer: registerFarmMCPServer,
|
|
8054
8067
|
// A page built with this keeps its HTML string, so the preload budget and the response
|
|
8055
8068
|
// writer use it instead of reading and re-encoding the body. Older adapters ignore it.
|
|
8056
|
-
createHtmlResponse: farmOwnedHtmlResponse,${
|
|
8069
|
+
createHtmlResponse: farmOwnedHtmlResponse,${_chunkKDOZORJDcjs.farmDocsAdapterServesGuardedPages.call(void 0, config.docs) ? `
|
|
8057
8070
|
// The adapter keeps pages a path guard covers off search, llms.txt, the sitemap and MCP. It
|
|
8058
8071
|
// asks about any path its own content lists, so the guards decide here, not a page list.
|
|
8059
8072
|
isPathGuarded: (pathname) =>
|
|
@@ -8111,12 +8124,12 @@ const farmDeploymentCookiePath = ${JSON.stringify(config.basePath || "/")};
|
|
|
8111
8124
|
// runtime request.
|
|
8112
8125
|
const farmRuntimeErrorSlot = Symbol("farm.runtime.error.slot");
|
|
8113
8126
|
const farmOpenAPIReference = ${JSON.stringify(openAPIReference)};
|
|
8114
|
-
${_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))};
|
|
8115
8128
|
` : ""}${_optionalChain([config, 'access', _226 => _226.agent, 'optionalAccess', _227 => _227.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
|
|
8116
|
-
|
|
8129
|
+
_chunk4YHGQDTTcjs.resolveFarmAppManifestInput.call(void 0, config, {
|
|
8117
8130
|
build: config.deploymentId,
|
|
8118
|
-
packages:
|
|
8119
|
-
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) : []
|
|
8120
8133
|
})
|
|
8121
8134
|
)};
|
|
8122
8135
|
${servesDefaultMCP ? "farmAppManifestInput.defaultMCP = getFarmDefaultMCPServer;\n" : ""}// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -8869,7 +8882,7 @@ function peelFarmDocumentPrefix(markup) {
|
|
|
8869
8882
|
let inner = markup.replace(/^\\s+/, "");
|
|
8870
8883
|
let hoisted = "";
|
|
8871
8884
|
const wrapper = /^<div\\b[^>]*style=["']display\\s*:\\s*contents;?\\s*["'][^>]*>/i;
|
|
8872
|
-
const hoistable = /${
|
|
8885
|
+
const hoistable = /${_chunkPXAHSCR6cjs.HOISTED_HEAD_ELEMENT.source}/i;
|
|
8873
8886
|
let match;
|
|
8874
8887
|
while ((match = wrapper.exec(inner) || hoistable.exec(inner))) {
|
|
8875
8888
|
if (!/^<div/i.test(match[0])) hoisted += match[0];
|
|
@@ -8898,7 +8911,7 @@ function opensFarmFullDocument(markup) {
|
|
|
8898
8911
|
// them: its own head takes them. Matches the dev renderer's takeFarmHoistedHead.
|
|
8899
8912
|
function takeFarmHoistedHead(markup) {
|
|
8900
8913
|
if (opensFarmFullDocument(markup)) return { head: "", body: markup };
|
|
8901
|
-
const hoistable = /${
|
|
8914
|
+
const hoistable = /${_chunkPXAHSCR6cjs.HOISTED_HEAD_ELEMENT.source}/i;
|
|
8902
8915
|
let head = "";
|
|
8903
8916
|
let body = markup;
|
|
8904
8917
|
let match;
|
|
@@ -9422,7 +9435,7 @@ function createFarmAgentRobotsResponse(request) {
|
|
|
9422
9435
|
// its nearest layout's.
|
|
9423
9436
|
const farmAgentGuardedPages = new Set(${JSON.stringify(
|
|
9424
9437
|
pageRoutes.map((route) => route.pattern).filter(
|
|
9425
|
-
(pattern) => !pattern.includes("[") &&
|
|
9438
|
+
(pattern) => !pattern.includes("[") && _chunkPXAHSCR6cjs.farmPathGuardCoversPage.call(void 0,
|
|
9426
9439
|
{
|
|
9427
9440
|
config: { middleware: config.middleware, integrations: config.integrations },
|
|
9428
9441
|
middlewareRoutes
|
|
@@ -9477,12 +9490,12 @@ ${servesDefaultMCP ? `// agent.mcp: the default read-only MCP server at /mcp, as
|
|
|
9477
9490
|
// aside for a page route that answers /mcp and for any MCP server published or
|
|
9478
9491
|
// registered at runtime, such as the docs engine's.
|
|
9479
9492
|
const farmDefaultMCPServer = ${JSON.stringify(
|
|
9480
|
-
|
|
9493
|
+
_chunkTU6VAH4Vcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkUVQRMUARcjs.FARM_VERSION)
|
|
9481
9494
|
)};
|
|
9482
9495
|
let farmDefaultMCPRouteFree;
|
|
9483
9496
|
function getFarmDefaultMCPServer() {
|
|
9484
9497
|
if (farmDefaultMCPRouteFree === undefined) {
|
|
9485
|
-
farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(
|
|
9498
|
+
farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(_chunkTU6VAH4Vcjs.FARM_DEFAULT_MCP_PATH)});
|
|
9486
9499
|
}
|
|
9487
9500
|
return farmDefaultMCPRouteFree ? resolveFarmDefaultMCPServer(farmDefaultMCPServer) : undefined;
|
|
9488
9501
|
}
|
|
@@ -9671,7 +9684,7 @@ ${edgeMiddlewareFilePaths.length > 0 ? `
|
|
|
9671
9684
|
// middleware guards is never prerendered. Read once: Nitro's prerender worker sets the variable.
|
|
9672
9685
|
const farmEdgeMiddlewareFiles = new Set(${JSON.stringify(edgeMiddlewareFilePaths)});
|
|
9673
9686
|
const farmPrerendering =
|
|
9674
|
-
typeof process !== "undefined" && process.env?.${
|
|
9687
|
+
typeof process !== "undefined" && process.env?.${_chunkROCF6UQDcjs.FARM_PRERENDER_ENV} === "1";
|
|
9675
9688
|
` : ""}
|
|
9676
9689
|
const farmMiddlewareRunner = ${hasMiddlewareRuntime ? `createProductionMiddlewareRunner({
|
|
9677
9690
|
config: farmMiddlewareConfig,
|
|
@@ -9927,7 +9940,7 @@ ${hasInfraAnalyticsRuntime ? `
|
|
|
9927
9940
|
// endpoints, Markdown mirrors, and docs pages have no app route pattern, so they are
|
|
9928
9941
|
// labeled here; route.pattern keeps meaning the matched app route for plugins.
|
|
9929
9942
|
const farmBuiltInRoutePaths = new Set(${JSON.stringify(
|
|
9930
|
-
|
|
9943
|
+
_chunk4YHGQDTTcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
9931
9944
|
agent: {
|
|
9932
9945
|
...config.agent,
|
|
9933
9946
|
aiCatalog: servesAiCatalog,
|
|
@@ -10696,7 +10709,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
10696
10709
|
// agent.manifest: /.well-known/farmjs.json (and 0.1.34's /.well-known/farmjs), the app's
|
|
10697
10710
|
// public manifest, the same document for every request.
|
|
10698
10711
|
if (
|
|
10699
|
-
[${JSON.stringify(
|
|
10712
|
+
[${JSON.stringify(_chunk4YHGQDTTcjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunk4YHGQDTTcjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
|
|
10700
10713
|
normalizeRuntimePath(routePathname),
|
|
10701
10714
|
)
|
|
10702
10715
|
) {
|
|
@@ -10708,7 +10721,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
10708
10721
|
` : ""}
|
|
10709
10722
|
${_optionalChain([config, 'access', _256 => _256.agent, 'optionalAccess', _257 => _257.apiCatalog]) ? `
|
|
10710
10723
|
// agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
|
|
10711
|
-
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
10724
|
+
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunk4YHGQDTTcjs.FARM_API_CATALOG_PATH)}) {
|
|
10712
10725
|
return applyProductionMiddlewareHeaders(
|
|
10713
10726
|
createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
|
|
10714
10727
|
middlewareHeaders,
|
|
@@ -11830,7 +11843,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
11830
11843
|
${servesDefaultMCP ? `
|
|
11831
11844
|
// agent.mcp: no app route answered /mcp, so the default read-only server may.
|
|
11832
11845
|
if (
|
|
11833
|
-
normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
11846
|
+
normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkTU6VAH4Vcjs.FARM_DEFAULT_MCP_PATH)} &&
|
|
11834
11847
|
getFarmDefaultMCPServer()
|
|
11835
11848
|
) {
|
|
11836
11849
|
return applyProductionMiddlewareHeaders(
|
|
@@ -12357,17 +12370,22 @@ function escapeRoutePattern(value) {
|
|
|
12357
12370
|
return value.replace(/[|\\{}()[\]^$+?.*]/g, "\\$&");
|
|
12358
12371
|
}
|
|
12359
12372
|
function middlewarePatternMatches(pattern, pathname) {
|
|
12373
|
+
return createMiddlewarePatternMatcher(pattern)(pathname);
|
|
12374
|
+
}
|
|
12375
|
+
function createMiddlewarePatternMatcher(pattern) {
|
|
12360
12376
|
if (pattern instanceof RegExp) {
|
|
12361
|
-
|
|
12362
|
-
|
|
12377
|
+
return (pathname) => {
|
|
12378
|
+
pattern.lastIndex = 0;
|
|
12379
|
+
return pattern.test(pathname);
|
|
12380
|
+
};
|
|
12363
12381
|
}
|
|
12364
|
-
if (pattern === "*" || pattern === "/(.*)") return true;
|
|
12382
|
+
if (pattern === "*" || pattern === "/(.*)") return () => true;
|
|
12365
12383
|
if (pattern.endsWith("(.*)")) {
|
|
12366
12384
|
const prefix = pattern.slice(0, -4);
|
|
12367
|
-
return pathname === prefix || pathname.startsWith(`${prefix}/`);
|
|
12385
|
+
return (pathname) => pathname === prefix || pathname.startsWith(`${prefix}/`);
|
|
12368
12386
|
}
|
|
12369
12387
|
const segments = pattern.split("/").filter(Boolean);
|
|
12370
|
-
if (segments.length === 0) return pathname === "/";
|
|
12388
|
+
if (segments.length === 0) return (pathname) => pathname === "/";
|
|
12371
12389
|
const expression = segments.map((segment) => {
|
|
12372
12390
|
if (segment === "**") return "(?:/.*)?";
|
|
12373
12391
|
if (segment === "*") return "/[^/]+";
|
|
@@ -12379,7 +12397,8 @@ function middlewarePatternMatches(pattern, pathname) {
|
|
|
12379
12397
|
if (segment.startsWith(":") || /^\[.+\]$/.test(segment)) return "/[^/]+";
|
|
12380
12398
|
return `/${escapeRoutePattern(segment).replace(/\\\*/g, "[^/]*")}`;
|
|
12381
12399
|
}).join("");
|
|
12382
|
-
|
|
12400
|
+
const regex = new RegExp(`^${expression}/?$`);
|
|
12401
|
+
return (pathname) => regex.test(pathname);
|
|
12383
12402
|
}
|
|
12384
12403
|
function routePatternSpecificity(pattern) {
|
|
12385
12404
|
return pattern.split("/").filter(Boolean).reduce((score, segment) => {
|
|
@@ -12394,8 +12413,18 @@ function routePatternSpecificity(pattern) {
|
|
|
12394
12413
|
function getEffectiveRouteRule(config, pathname) {
|
|
12395
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), {});
|
|
12396
12415
|
}
|
|
12416
|
+
var manifestPageMatchers = /* @__PURE__ */ new WeakMap();
|
|
12397
12417
|
function getManifestPageEntry(manifest, pathname) {
|
|
12398
|
-
|
|
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]);
|
|
12399
12428
|
}
|
|
12400
12429
|
function withFarmEdgeGuardedPrerenderHeaders(headers, edgeGuarded) {
|
|
12401
12430
|
if (!edgeGuarded) return headers;
|
|
@@ -12432,13 +12461,13 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
12432
12461
|
if (rewriteSources.some((source) => middlewarePatternMatches(source, pathname))) {
|
|
12433
12462
|
return "rewrite";
|
|
12434
12463
|
}
|
|
12435
|
-
if (
|
|
12436
|
-
if (
|
|
12437
|
-
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";
|
|
12438
12467
|
if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
|
|
12439
12468
|
const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
|
|
12440
|
-
if (_optionalChain([manifestEntry, 'optionalAccess',
|
|
12441
|
-
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)) {
|
|
12442
12471
|
return "route runtime controls";
|
|
12443
12472
|
}
|
|
12444
12473
|
const routeRule = getEffectiveRouteRule(config, pathname);
|
|
@@ -12451,15 +12480,15 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
12451
12480
|
return void 0;
|
|
12452
12481
|
}
|
|
12453
12482
|
async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
12454
|
-
if (!_optionalChain([config, 'access',
|
|
12483
|
+
if (!_optionalChain([config, 'access', _280 => _280.docs, 'optionalAccess', _281 => _281.enabled]) || !config.docs.prerender) return [];
|
|
12455
12484
|
if (_chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge") {
|
|
12456
12485
|
_chunkQMNWKQL4cjs.logger.info(
|
|
12457
12486
|
`\u21AA Keeping docs pages in the edge docs snapshot: docs.prerender writes static files on Node and serverless targets, not "${preset}".`
|
|
12458
12487
|
);
|
|
12459
12488
|
return [];
|
|
12460
12489
|
}
|
|
12461
|
-
if (!
|
|
12462
|
-
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, {
|
|
12463
12492
|
root,
|
|
12464
12493
|
srcDir: config.srcDir
|
|
12465
12494
|
});
|
|
@@ -12476,7 +12505,7 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
|
12476
12505
|
);
|
|
12477
12506
|
return [];
|
|
12478
12507
|
}
|
|
12479
|
-
const pages = await
|
|
12508
|
+
const pages = await _chunkKDOZORJDcjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
|
|
12480
12509
|
if (!pages) {
|
|
12481
12510
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
12482
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.`
|
|
@@ -12486,14 +12515,14 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
|
12486
12515
|
return pages;
|
|
12487
12516
|
}
|
|
12488
12517
|
async function listFarmDocsAnalyticsPages(config, root, preset) {
|
|
12489
|
-
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") {
|
|
12490
12519
|
return [];
|
|
12491
12520
|
}
|
|
12492
12521
|
try {
|
|
12493
|
-
return await
|
|
12522
|
+
return await _chunkKDOZORJDcjs.listFarmDocsPagePaths.call(void 0, config.docs, {
|
|
12494
12523
|
root,
|
|
12495
12524
|
srcDir: config.srcDir,
|
|
12496
|
-
adapter: _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) &&
|
|
12525
|
+
adapter: _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) && _chunkKDOZORJDcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)
|
|
12497
12526
|
});
|
|
12498
12527
|
} catch (error) {
|
|
12499
12528
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
@@ -12504,9 +12533,9 @@ async function listFarmDocsAnalyticsPages(config, root, preset) {
|
|
|
12504
12533
|
}
|
|
12505
12534
|
function hasFarmNitroCacheRouteRule(routeRules) {
|
|
12506
12535
|
return Object.values(routeRules || {}).some((rule) => {
|
|
12507
|
-
const swr = _optionalChain([rule, 'optionalAccess',
|
|
12508
|
-
const cache = _optionalChain([rule, 'optionalAccess',
|
|
12509
|
-
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]);
|
|
12510
12539
|
return swr !== void 0 && swr !== false || cache !== void 0 && cache !== false || !!headers && typeof headers === "object" && Object.keys(headers).length > 0;
|
|
12511
12540
|
});
|
|
12512
12541
|
}
|
|
@@ -12519,10 +12548,10 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
12519
12548
|
const nitroBuilder = nitroBuilderResult.value;
|
|
12520
12549
|
const isVercel = preset === "vercel";
|
|
12521
12550
|
const isCloudflareWorker = preset === "cloudflare-module";
|
|
12522
|
-
const outputDir =
|
|
12551
|
+
const outputDir = _chunkOXNZUCHNcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
12523
12552
|
const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
|
|
12524
12553
|
const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
|
|
12525
|
-
const imageRuntime =
|
|
12554
|
+
const imageRuntime = _chunkTAU3OF5Bcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
12526
12555
|
const hasGeneratedMetadataImages = Array.from(routeManager.getMetadataImages().values()).some(
|
|
12527
12556
|
(image) => image.sourceType === "module"
|
|
12528
12557
|
);
|
|
@@ -12578,7 +12607,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
12578
12607
|
const edgeGuardedPrerenderRoutes = [];
|
|
12579
12608
|
const addPrerenderRoute = (pathname) => {
|
|
12580
12609
|
prerenderRoutes.push(pathname);
|
|
12581
|
-
if (
|
|
12610
|
+
if (_chunkPXAHSCR6cjs.appMiddlewareMayHandlePath.call(void 0, edgeMiddlewareRoutes, pathname)) {
|
|
12582
12611
|
edgeGuardedPrerenderRoutes.push(pathname);
|
|
12583
12612
|
}
|
|
12584
12613
|
};
|
|
@@ -12656,7 +12685,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
12656
12685
|
webEntry: clientJsSrc,
|
|
12657
12686
|
webBoot: clientBootSrc,
|
|
12658
12687
|
stylesheet: clientCssHref,
|
|
12659
|
-
webFiles: _nullishCoalesce(_optionalChain([clientModulePreloads, 'optionalAccess',
|
|
12688
|
+
webFiles: _nullishCoalesce(_optionalChain([clientModulePreloads, 'optionalAccess', _287 => _287.files]), () => ( []))
|
|
12660
12689
|
})
|
|
12661
12690
|
) : null;
|
|
12662
12691
|
for (const output of Object.values(ssrBundle)) {
|
|
@@ -12976,7 +13005,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
12976
13005
|
varyFarmNitroCacheRules(_chunkMQ4DYVFScjs.routeRulesToNitroRouteRules.call(void 0, config.routeRules), [
|
|
12977
13006
|
...config.md.enabled ? ["accept"] : [],
|
|
12978
13007
|
...shouldBuildFarmMobileClient(config) ? ["x-farm-shell"] : [],
|
|
12979
|
-
..._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"] : []
|
|
12980
13009
|
]),
|
|
12981
13010
|
config.basePath,
|
|
12982
13011
|
_chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
|
|
@@ -13132,23 +13161,23 @@ function toFarmNodeResponse(request, response) {
|
|
|
13132
13161
|
snapshotSSRRebundleOptions(nitroConfig)
|
|
13133
13162
|
);
|
|
13134
13163
|
const requestedBuilder = _nullishCoalesce(nitroConfig.builder, () => ( process.env.NITRO_BUILDER));
|
|
13135
|
-
const nitroBuildIsFarms = (requestedBuilder === void 0 || requestedBuilder === "rollup" || requestedBuilder === "rolldown") && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig && !hasUnsupportedSSRRebundleOverrides && _optionalChain([nitroConfig, 'access',
|
|
13136
|
-
_optionalChain([nitroConfig, 'access',
|
|
13137
|
-
(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
|
|
13138
13167
|
)])
|
|
13139
13168
|
);
|
|
13140
|
-
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);
|
|
13141
13170
|
const prerenderReusesPrebuiltSSR = prerenderRoutes.length > 0 && ssrExternalsArePackaged && nitroBuildIsFarms;
|
|
13142
13171
|
const selectRolldownBuilder = canReusePrebuiltSSR && requestedBuilder === void 0 && await canUseRolldownBuilder();
|
|
13143
13172
|
if (selectRolldownBuilder) nitroConfig.builder = "rolldown";
|
|
13144
13173
|
const useRolldownBuilder = canReusePrebuiltSSR && (_nullishCoalesce(nitroConfig.builder, () => ( process.env.NITRO_BUILDER))) === "rolldown";
|
|
13145
13174
|
const shouldMinify = nitroConfig.minify !== false;
|
|
13146
|
-
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]));
|
|
13147
13176
|
const useFarmServerMinifier = shouldMinify && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig;
|
|
13148
13177
|
const serverChunkMinifier = useFarmServerMinifier ? createServerChunkMinifyPlugin({ keepNames: keepServerNames, target: "esnext" }) : null;
|
|
13149
13178
|
const ssrRollupPlugin = canReusePrebuiltSSR ? prebuiltSSRPlugin : createServerReadSSRAssetsPlugin(ssrBundle, ssrOutputDir);
|
|
13150
13179
|
if (ssrRollupPlugin) {
|
|
13151
|
-
const configuredRollupPlugins = _optionalChain([nitroConfig, 'access',
|
|
13180
|
+
const configuredRollupPlugins = _optionalChain([nitroConfig, 'access', _305 => _305.rollupConfig, 'optionalAccess', _306 => _306.plugins]);
|
|
13152
13181
|
nitroConfig.rollupConfig = {
|
|
13153
13182
|
...nitroConfig.rollupConfig,
|
|
13154
13183
|
plugins: [
|
|
@@ -13175,10 +13204,10 @@ function toFarmNodeResponse(request, response) {
|
|
|
13175
13204
|
const orderOf = (route) => _nullishCoalesce(prerenderOrder.get(route), () => ( Number.MAX_SAFE_INTEGER));
|
|
13176
13205
|
prerenderedRoutes.sort((a, b) => orderOf(a.route) - orderOf(b.route));
|
|
13177
13206
|
});
|
|
13178
|
-
if (_optionalChain([config, 'access',
|
|
13207
|
+
if (_optionalChain([config, 'access', _307 => _307.md, 'optionalAccess', _308 => _308.enabled])) {
|
|
13179
13208
|
nitroInstance.hooks.hook("prerender:generate", (route) => {
|
|
13180
|
-
if (!route.contents || !_optionalChain([route, 'access',
|
|
13181
|
-
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, {
|
|
13182
13211
|
routePathname: (pathname) => routeManager.toRoutePathname(pathname)
|
|
13183
13212
|
});
|
|
13184
13213
|
if (!alternatePath) return;
|
|
@@ -13200,7 +13229,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
13200
13229
|
}
|
|
13201
13230
|
if (config.security.csp && config.security.csp.nonce) {
|
|
13202
13231
|
nitroInstance.hooks.hook("prerender:generate", async (route) => {
|
|
13203
|
-
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;
|
|
13204
13233
|
const staticCsp = await _chunk6JHZPB52cjs.applyFarmCspHashesToHtml.call(void 0, route.contents, config.security);
|
|
13205
13234
|
if (!staticCsp) return;
|
|
13206
13235
|
route.contents = staticCsp.html;
|
|
@@ -13235,7 +13264,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
13235
13264
|
await nitroBuilder.copyPublicAssets(nitroInstance);
|
|
13236
13265
|
if (prerenderReusesPrebuiltSSR && !canReusePrebuiltSSR) {
|
|
13237
13266
|
nitroInstance.hooks.hook("prerender:config", (prerendererConfig) => {
|
|
13238
|
-
const configuredPlugins = _optionalChain([prerendererConfig, 'access',
|
|
13267
|
+
const configuredPlugins = _optionalChain([prerendererConfig, 'access', _319 => _319.rollupConfig, 'optionalAccess', _320 => _320.plugins]);
|
|
13239
13268
|
const plugins = Array.isArray(configuredPlugins) ? configuredPlugins : configuredPlugins ? [configuredPlugins] : [];
|
|
13240
13269
|
prerendererConfig.rollupConfig = {
|
|
13241
13270
|
...prerendererConfig.rollupConfig,
|
|
@@ -13292,13 +13321,13 @@ function toFarmNodeResponse(request, response) {
|
|
|
13292
13321
|
}
|
|
13293
13322
|
if (prerenderRoutes.length > 0) {
|
|
13294
13323
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
|
|
13295
|
-
const previousPrerender = process.env[
|
|
13296
|
-
process.env[
|
|
13324
|
+
const previousPrerender = process.env[_chunkROCF6UQDcjs.FARM_PRERENDER_ENV];
|
|
13325
|
+
process.env[_chunkROCF6UQDcjs.FARM_PRERENDER_ENV] = "1";
|
|
13297
13326
|
try {
|
|
13298
13327
|
await nitroBuilder.prerender(nitroInstance);
|
|
13299
13328
|
} finally {
|
|
13300
|
-
if (previousPrerender === void 0) delete process.env[
|
|
13301
|
-
else process.env[
|
|
13329
|
+
if (previousPrerender === void 0) delete process.env[_chunkROCF6UQDcjs.FARM_PRERENDER_ENV];
|
|
13330
|
+
else process.env[_chunkROCF6UQDcjs.FARM_PRERENDER_ENV] = previousPrerender;
|
|
13302
13331
|
}
|
|
13303
13332
|
}
|
|
13304
13333
|
const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs4, preset) : Promise.resolve(null);
|
|
@@ -13474,7 +13503,7 @@ async function moveVercelOutputPath(src, dest, fs4) {
|
|
|
13474
13503
|
await fs4.rename(src, dest);
|
|
13475
13504
|
return;
|
|
13476
13505
|
} catch (error) {
|
|
13477
|
-
const code = _optionalChain([error, 'optionalAccess',
|
|
13506
|
+
const code = _optionalChain([error, 'optionalAccess', _321 => _321.code]);
|
|
13478
13507
|
if (code !== "EPERM" && code !== "EACCES" && code !== "EXDEV" && code !== "ENOTEMPTY") {
|
|
13479
13508
|
throw error;
|
|
13480
13509
|
}
|
|
@@ -13500,7 +13529,7 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
13500
13529
|
try {
|
|
13501
13530
|
await moveVercelOutputPath(publicDir, staticDir, fs4);
|
|
13502
13531
|
} catch (error) {
|
|
13503
|
-
if (_optionalChain([error, 'optionalAccess',
|
|
13532
|
+
if (_optionalChain([error, 'optionalAccess', _322 => _322.code]) !== "ENOENT") throw error;
|
|
13504
13533
|
}
|
|
13505
13534
|
await copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4);
|
|
13506
13535
|
await copyPrismaClientForVercel(root, nitroFuncDir, fs4);
|
|
@@ -13514,7 +13543,7 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
13514
13543
|
config.basePath
|
|
13515
13544
|
);
|
|
13516
13545
|
const edgeMiddlewareRoutes = edgeMiddleware.middlewareRoutes.filter(
|
|
13517
|
-
(route) => edgeMiddleware.guardedPages.some((pathname) =>
|
|
13546
|
+
(route) => edgeMiddleware.guardedPages.some((pathname) => _chunkPXAHSCR6cjs.appMiddlewareMayHandlePath.call(void 0, [route], pathname))
|
|
13518
13547
|
);
|
|
13519
13548
|
if (edgeMiddlewareRoutes.length > 0) {
|
|
13520
13549
|
await writeFarmVercelEdgeMiddlewareFunction({
|
|
@@ -13542,8 +13571,8 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
13542
13571
|
_chunkQMNWKQL4cjs.logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
|
|
13543
13572
|
}
|
|
13544
13573
|
async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
|
|
13545
|
-
if (!_optionalChain([config, 'access',
|
|
13546
|
-
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);
|
|
13547
13576
|
await copyFarmDocsRootContent(
|
|
13548
13577
|
mainRoot,
|
|
13549
13578
|
root,
|
|
@@ -13564,10 +13593,10 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
|
|
|
13564
13593
|
async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs4) {
|
|
13565
13594
|
const docsContentDir = resolveBuildDocsContentDir(docs, root, srcDir);
|
|
13566
13595
|
if (!docsContentDir) return;
|
|
13567
|
-
const lastModifiedManifest =
|
|
13596
|
+
const lastModifiedManifest = _chunkHFUOLILAcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
|
|
13568
13597
|
fallback: "now"
|
|
13569
13598
|
});
|
|
13570
|
-
const undatedPages = _nullishCoalesce(_optionalChain([lastModifiedManifest, 'access',
|
|
13599
|
+
const undatedPages = _nullishCoalesce(_optionalChain([lastModifiedManifest, 'access', _325 => _325.unknown, 'optionalAccess', _326 => _326.length]), () => ( 0));
|
|
13571
13600
|
if (undatedPages > 0) {
|
|
13572
13601
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
13573
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.`
|
|
@@ -13581,7 +13610,7 @@ async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs
|
|
|
13581
13610
|
dereference: true
|
|
13582
13611
|
});
|
|
13583
13612
|
await fs4.writeFile(
|
|
13584
|
-
_path2.default.join(bundledContentDir,
|
|
13613
|
+
_path2.default.join(bundledContentDir, _chunkHFUOLILAcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
|
|
13585
13614
|
`${JSON.stringify(lastModifiedManifest, null, 2)}
|
|
13586
13615
|
`
|
|
13587
13616
|
);
|
|
@@ -13652,7 +13681,7 @@ async function stageSharpRuntime(config, root, distDir, fs4, preset) {
|
|
|
13652
13681
|
try {
|
|
13653
13682
|
await copyPackage("sharp", sharpRequire);
|
|
13654
13683
|
if (!copiedPackages.has("sharp")) {
|
|
13655
|
-
throw new Error(`Farm image optimization requires sharp. ${
|
|
13684
|
+
throw new Error(`Farm image optimization requires sharp. ${_chunkTAU3OF5Bcjs.SHARP_INSTALL_HINT}`);
|
|
13656
13685
|
}
|
|
13657
13686
|
} catch (error) {
|
|
13658
13687
|
await fs4.rm(stageDir, { recursive: true, force: true });
|
|
@@ -13882,7 +13911,7 @@ async function createFarmProjectModuleSsrEnvironment() {
|
|
|
13882
13911
|
// src/build/index.ts
|
|
13883
13912
|
async function build(config, options = {}) {
|
|
13884
13913
|
return _chunkNG2EZ6QScjs.withProductionNodeEnv.call(void 0,
|
|
13885
|
-
() =>
|
|
13914
|
+
() => _chunkHTXKSREFcjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
|
|
13886
13915
|
);
|
|
13887
13916
|
}
|
|
13888
13917
|
function createBuildTargetBaseline(config) {
|
|
@@ -13893,7 +13922,7 @@ function createBuildTargetBaseline(config) {
|
|
|
13893
13922
|
preset,
|
|
13894
13923
|
distDir,
|
|
13895
13924
|
outputDir,
|
|
13896
|
-
outputWasDerived: outputDir ===
|
|
13925
|
+
outputWasDerived: outputDir === _chunkOXNZUCHNcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
|
|
13897
13926
|
};
|
|
13898
13927
|
}
|
|
13899
13928
|
function resolveBuildTargets(config, options, baseline) {
|
|
@@ -13902,8 +13931,8 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
13902
13931
|
const distDir = config.distDir || ".farm";
|
|
13903
13932
|
const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
|
|
13904
13933
|
const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
|
|
13905
|
-
const deployTarget = preset === config.deploy.preset ? config.deploy.target :
|
|
13906
|
-
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;
|
|
13907
13936
|
return {
|
|
13908
13937
|
root,
|
|
13909
13938
|
preset,
|
|
@@ -13911,7 +13940,7 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
13911
13940
|
distDir,
|
|
13912
13941
|
deployTarget,
|
|
13913
13942
|
outputDir,
|
|
13914
|
-
deployOutputDir:
|
|
13943
|
+
deployOutputDir: _chunkOXNZUCHNcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
|
|
13915
13944
|
};
|
|
13916
13945
|
}
|
|
13917
13946
|
async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
@@ -13948,15 +13977,15 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
13948
13977
|
};
|
|
13949
13978
|
config = {
|
|
13950
13979
|
...config,
|
|
13951
|
-
images:
|
|
13980
|
+
images: _chunkTAU3OF5Bcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
|
|
13952
13981
|
root: targets.root,
|
|
13953
13982
|
preset: targets.preset
|
|
13954
13983
|
})
|
|
13955
13984
|
};
|
|
13956
|
-
if (_optionalChain([config, 'access',
|
|
13985
|
+
if (_optionalChain([config, 'access', _327 => _327.docs, 'optionalAccess', _328 => _328.enabled])) await _chunkNDOE76QCcjs.loadFarmDocsEngine.call(void 0, );
|
|
13957
13986
|
pluginManager.updateContext({ config });
|
|
13958
13987
|
const { root, preset, srcDir, distDir, deployOutputDir } = targets;
|
|
13959
|
-
|
|
13988
|
+
_chunkHTXKSREFcjs.usePackageClientBoundaryCacheFile.call(void 0, _chunkHTXKSREFcjs.resolvePackageClientBoundaryCacheFile.call(void 0, root, distDir));
|
|
13960
13989
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
|
|
13961
13990
|
await pluginManager.setupPlugins();
|
|
13962
13991
|
await pluginManager.runHookParallel("beforeBundle", {
|
|
@@ -13968,8 +13997,8 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
13968
13997
|
});
|
|
13969
13998
|
_chunkQMNWKQL4cjs.logger.info("\u{1F50D} Discovering routes and API endpoints...");
|
|
13970
13999
|
const productionViteResult = productionViteResultPromise ? (await productionViteResultPromise)[0] : void 0;
|
|
13971
|
-
if (_optionalChain([productionViteResult, 'optionalAccess',
|
|
13972
|
-
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]);
|
|
13973
14002
|
const createViteServer = productionVite ? productionVite.createServer : (await import("vite")).createServer;
|
|
13974
14003
|
projectModuleServer = await createProjectModuleServer(
|
|
13975
14004
|
createViteServer,
|
|
@@ -13977,18 +14006,18 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
13977
14006
|
root,
|
|
13978
14007
|
rendererBuild.signal
|
|
13979
14008
|
);
|
|
13980
|
-
const farmApp =
|
|
14009
|
+
const farmApp = _chunkTAU3OF5Bcjs.createFarmApp.call(void 0, config, projectModuleServer);
|
|
13981
14010
|
await farmApp.initialize();
|
|
13982
14011
|
const routeManager = farmApp.getRouteManager();
|
|
13983
14012
|
const serverRenderer = farmApp.getServerRenderer();
|
|
13984
|
-
const typeArtifacts =
|
|
14013
|
+
const typeArtifacts = _chunkCLEWORVYcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
13985
14014
|
root,
|
|
13986
14015
|
srcDir,
|
|
13987
14016
|
layers: config.layers,
|
|
13988
14017
|
plugins: config.plugins,
|
|
13989
14018
|
extraRoutes: [
|
|
13990
|
-
..._optionalChain([config, 'access',
|
|
13991
|
-
...
|
|
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)
|
|
13992
14021
|
],
|
|
13993
14022
|
suppressLintOnLink: config.suppressLintOnLink,
|
|
13994
14023
|
componentExtensions: config.renderer.componentExtensions,
|
|
@@ -14072,7 +14101,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
14072
14101
|
throw error;
|
|
14073
14102
|
} finally {
|
|
14074
14103
|
try {
|
|
14075
|
-
await _optionalChain([projectModuleServer, 'optionalAccess',
|
|
14104
|
+
await _optionalChain([projectModuleServer, 'optionalAccess', _333 => _333.close, 'call', _334 => _334()]);
|
|
14076
14105
|
} finally {
|
|
14077
14106
|
rendererBuild.abort();
|
|
14078
14107
|
}
|
|
@@ -14084,7 +14113,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
14084
14113
|
ssr: true,
|
|
14085
14114
|
buildLifetime
|
|
14086
14115
|
});
|
|
14087
|
-
const viteConfig =
|
|
14116
|
+
const viteConfig = _chunkTAU3OF5Bcjs.mergeFarmViteConfig.call(void 0,
|
|
14088
14117
|
{
|
|
14089
14118
|
root,
|
|
14090
14119
|
appType: "custom",
|
|
@@ -14096,12 +14125,12 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
14096
14125
|
},
|
|
14097
14126
|
plugins: [
|
|
14098
14127
|
...rendererVitePlugins,
|
|
14099
|
-
|
|
14128
|
+
_chunkTAU3OF5Bcjs.farmFontImportsPlugin.call(void 0, {
|
|
14100
14129
|
root,
|
|
14101
14130
|
basePath: config.basePath,
|
|
14102
14131
|
publicDir: config.publicDir
|
|
14103
14132
|
}),
|
|
14104
|
-
|
|
14133
|
+
_chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, ),
|
|
14105
14134
|
// Route modules load here at build time (rendering config, prerendering): `server-only`
|
|
14106
14135
|
// resolves as it does in the server build. Module-entry packages load pre-bundled, as in
|
|
14107
14136
|
// `farm dev`: unbundled, lucide-react alone is ~1,750 modules through the module runner,
|
|
@@ -14113,7 +14142,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
14113
14142
|
hmr: false
|
|
14114
14143
|
},
|
|
14115
14144
|
resolve: {
|
|
14116
|
-
alias:
|
|
14145
|
+
alias: _chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
14117
14146
|
dedupe: [...config.renderer.dedupe || []]
|
|
14118
14147
|
},
|
|
14119
14148
|
optimizeDeps: {
|
|
@@ -14152,17 +14181,22 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
14152
14181
|
noDiscovery: true
|
|
14153
14182
|
},
|
|
14154
14183
|
// An app or plugin that brings its own SSR environment keeps it.
|
|
14155
|
-
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 : {
|
|
14156
14185
|
...viteConfig.environments,
|
|
14157
14186
|
ssr: {
|
|
14158
|
-
..._optionalChain([viteConfig, 'access',
|
|
14187
|
+
..._optionalChain([viteConfig, 'access', _339 => _339.environments, 'optionalAccess', _340 => _340.ssr]),
|
|
14159
14188
|
...await createFarmProjectModuleSsrEnvironment()
|
|
14160
14189
|
}
|
|
14161
14190
|
}
|
|
14162
14191
|
});
|
|
14163
14192
|
}
|
|
14164
14193
|
async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
14165
|
-
const {
|
|
14194
|
+
const {
|
|
14195
|
+
farmI18nClientBridgePlugin,
|
|
14196
|
+
farmIslandContainersPlugin,
|
|
14197
|
+
farmPlugin,
|
|
14198
|
+
farmServerOnlyEntriesPlugin
|
|
14199
|
+
} = await import("./vite.cjs");
|
|
14166
14200
|
const { PluginManager: PluginManager2 } = await import("./plugin-5PIQQVRP.cjs");
|
|
14167
14201
|
const pluginManager = new PluginManager2({
|
|
14168
14202
|
config,
|
|
@@ -14182,14 +14216,15 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
|
14182
14216
|
plugins: [
|
|
14183
14217
|
farmI18nClientBridgePlugin(),
|
|
14184
14218
|
farmServerOnlyEntriesPlugin(),
|
|
14219
|
+
farmIslandContainersPlugin(config),
|
|
14185
14220
|
farmPlugin(config, pluginManager),
|
|
14186
|
-
|
|
14221
|
+
_chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
14187
14222
|
],
|
|
14188
14223
|
mode: "production"
|
|
14189
14224
|
});
|
|
14190
14225
|
}
|
|
14191
14226
|
async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
14192
|
-
const { farmI18nClientBridgePlugin, farmPlugin } = await import("./vite.cjs");
|
|
14227
|
+
const { farmI18nClientBridgePlugin, farmIslandContainersPlugin, farmPlugin } = await import("./vite.cjs");
|
|
14193
14228
|
const { PluginManager: PluginManager2 } = await import("./plugin-5PIQQVRP.cjs");
|
|
14194
14229
|
const pluginManager = new PluginManager2({
|
|
14195
14230
|
config,
|
|
@@ -14211,12 +14246,13 @@ async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
|
14211
14246
|
define: {
|
|
14212
14247
|
__FARM_API_BASE_URL__: JSON.stringify(config.api.baseURL),
|
|
14213
14248
|
__FARM_ENV__: JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, config.env)),
|
|
14214
|
-
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access',
|
|
14249
|
+
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _341 => _341.env, 'optionalAccess', _342 => _342.public]) || {})
|
|
14215
14250
|
},
|
|
14216
14251
|
plugins: [
|
|
14217
14252
|
farmI18nClientBridgePlugin(),
|
|
14253
|
+
farmIslandContainersPlugin(config),
|
|
14218
14254
|
farmPlugin(config, pluginManager),
|
|
14219
|
-
|
|
14255
|
+
_chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
14220
14256
|
],
|
|
14221
14257
|
mode: "production"
|
|
14222
14258
|
});
|
|
@@ -14244,7 +14280,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
14244
14280
|
if (pluginManager) {
|
|
14245
14281
|
nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
|
|
14246
14282
|
}
|
|
14247
|
-
const outputDir =
|
|
14283
|
+
const outputDir = _chunkOXNZUCHNcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
14248
14284
|
const serverOutputDir = _path2.default.join(outputDir, "server");
|
|
14249
14285
|
const publicOutputDir = _path2.default.join(outputDir, "public");
|
|
14250
14286
|
const { mkdir, cp } = await import("fs/promises");
|
|
@@ -14315,7 +14351,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
14315
14351
|
root,
|
|
14316
14352
|
preset,
|
|
14317
14353
|
distDir,
|
|
14318
|
-
outputDir:
|
|
14354
|
+
outputDir: _chunkOXNZUCHNcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
|
|
14319
14355
|
});
|
|
14320
14356
|
}
|
|
14321
14357
|
}
|