@farm.js/core 0.1.71 → 0.1.72
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-KE4J3W7S.cjs +1 -1
- package/dist/agent-mcp-handler-VIT4GOSR.mjs +1 -1
- package/dist/{agent-mcp.d-BzNw6JI8.d.ts → agent-mcp.d-BO3rZXEM.d.ts} +2 -2
- package/dist/{agent-mcp.d-CgFen3EH.d.mts → agent-mcp.d-Cwff7lcA.d.mts} +2 -2
- package/dist/agent-runtime.d.mts +3 -3
- package/dist/agent-runtime.d.ts +3 -3
- package/dist/{analyzer-VK3BAOFI.mjs → analyzer-5Q75LTIL.mjs} +2 -2
- package/dist/analyzer-UJG4MIZW.cjs +16 -0
- package/dist/api/node.d.mts +5 -5
- package/dist/api/node.d.ts +5 -5
- package/dist/api/route-manager.cjs +7 -6
- package/dist/api/route-manager.d.mts +7 -7
- package/dist/api/route-manager.d.ts +7 -7
- package/dist/api/route-manager.mjs +6 -5
- package/dist/api/runtime.d.mts +4 -4
- package/dist/api/runtime.d.ts +4 -4
- package/dist/api.cjs +8 -7
- package/dist/api.d.mts +8 -8
- package/dist/api.d.ts +8 -8
- package/dist/api.mjs +7 -6
- package/dist/{app-manifest.d-DY4JfJxi.d.ts → app-manifest.d-DwjGkYlP.d.ts} +1 -1
- package/dist/{app-manifest.d-DpDK_B1k.d.mts → app-manifest.d-USD_IbFd.d.mts} +1 -1
- package/dist/app-markdown.d.mts +4 -4
- package/dist/app-markdown.d.ts +4 -4
- package/dist/{app.d-BeK6bb1c.d.ts → app.d-DAmF2MAk.d.ts} +48 -6
- package/dist/{app.d-D-5UNrFd.d.mts → app.d-fW06_h8h.d.mts} +48 -6
- package/dist/{chunk-7A3URI2F.mjs → chunk-2EVESLP3.mjs} +8 -1
- package/dist/{chunk-X7LGLF33.mjs → chunk-3JN5M3T5.mjs} +259 -61
- package/dist/{chunk-KEB7AGS6.cjs → chunk-3WG7GJQL.cjs} +7 -2
- package/dist/{chunk-K66JILV3.cjs → chunk-5LOARKDP.cjs} +2 -2
- package/dist/{chunk-UISZLYKY.cjs → chunk-5R4Q5FN7.cjs} +2 -2
- package/dist/{chunk-3BQ7QHUH.cjs → chunk-5X6OHJEE.cjs} +15 -3
- package/dist/{chunk-GUU3IZSM.mjs → chunk-5XFKWHZD.mjs} +234 -47
- package/dist/{chunk-MITIAOUQ.mjs → chunk-645ENY7W.mjs} +2 -2
- package/dist/{chunk-RJUCNO7R.mjs → chunk-77VNYVVX.mjs} +1 -1
- package/dist/{chunk-PLXD2MJV.cjs → chunk-7QCJDYZQ.cjs} +2 -2
- package/dist/{chunk-V25GSH43.mjs → chunk-AUAMXI6N.mjs} +1 -1
- package/dist/{chunk-2IFT2CSA.cjs → chunk-BE7AQXJB.cjs} +346 -148
- package/dist/{chunk-7BUE2GM6.mjs → chunk-BSXKZPFE.mjs} +70 -19
- package/dist/{chunk-2MR4MABG.cjs → chunk-C5AM2XDN.cjs} +54 -4
- package/dist/{chunk-KWST2O22.cjs → chunk-CBLRSZQL.cjs} +488 -301
- package/dist/{chunk-BBPDJGCU.cjs → chunk-CYOTNHDF.cjs} +2 -2
- package/dist/{chunk-W2T6NDNP.mjs → chunk-DGNMXL2O.mjs} +1 -1
- package/dist/{chunk-QUFENL7Q.mjs → chunk-DS7JGFW5.mjs} +13 -1
- package/dist/{chunk-IGXS54GC.mjs → chunk-E2V7RRFL.mjs} +1 -1
- package/dist/{chunk-CSQPMV3Q.cjs → chunk-E3LE6EZH.cjs} +4 -4
- package/dist/{chunk-JVA4PIYN.cjs → chunk-ET6WW3FY.cjs} +338 -171
- package/dist/{chunk-VXB5CMNC.cjs → chunk-EXN4DTVF.cjs} +2 -2
- package/dist/{chunk-SXMWVP2L.cjs → chunk-FSSONJRV.cjs} +4 -4
- package/dist/{chunk-Y2SZVIVH.cjs → chunk-GPICBTDV.cjs} +8 -1
- package/dist/{chunk-7OHJWFLB.cjs → chunk-HLMUWKAP.cjs} +333 -282
- package/dist/{chunk-ZPUAOKHV.cjs → chunk-IWCYRDRQ.cjs} +3 -3
- package/dist/{chunk-2AM26UGI.cjs → chunk-NLBK37HI.cjs} +5 -4
- package/dist/{chunk-NA77GEIU.mjs → chunk-NV26EGMC.mjs} +51 -1
- package/dist/{chunk-DPYBVVL3.cjs → chunk-OSEQL34Q.cjs} +2 -2
- package/dist/{chunk-IYDJNCR7.mjs → chunk-OSMUE5ST.mjs} +7 -2
- package/dist/{chunk-UQUOSNRN.mjs → chunk-QUYAGU65.mjs} +214 -47
- package/dist/{chunk-DPIGYXSV.mjs → chunk-RFWWXEIF.mjs} +1 -1
- package/dist/{chunk-E77IA5IF.mjs → chunk-RLFGKJQ6.mjs} +1 -1
- package/dist/{chunk-3AUINHFG.mjs → chunk-TNYC3TYP.mjs} +3 -2
- package/dist/{chunk-4OD2LXF2.mjs → chunk-VAWDGGW3.mjs} +1 -1
- package/dist/{chunk-MU5V7XHL.mjs → chunk-VJSXPN3W.mjs} +3 -0
- package/dist/{chunk-DU4VHHPJ.mjs → chunk-VO55MMBX.mjs} +1 -1
- package/dist/{chunk-LDVJIBGN.mjs → chunk-VT25ERQK.mjs} +1 -1
- package/dist/{chunk-2CQC5CMD.mjs → chunk-WIJF3PBM.mjs} +1 -1
- package/dist/{chunk-FILXOEWD.cjs → chunk-YXIQYWOK.cjs} +2 -2
- package/dist/{chunk-THG2TVDH.mjs → chunk-YZLEOMMA.mjs} +3 -3
- package/dist/{chunk-MEJCP2LX.cjs → chunk-ZDZUFD67.cjs} +1 -1
- package/dist/{chunk-Q5HMVGR5.cjs → chunk-ZFEJ2SF2.cjs} +13 -13
- package/dist/{chunk-LNVGXUL3.cjs → chunk-ZMSVKVI3.cjs} +3 -0
- package/dist/{client-component.d-fYupugbZ.d.ts → client-component.d-9J7CkTWW.d.ts} +2 -2
- package/dist/{client-component.d-DwpH251K.d.mts → client-component.d-ciHeCxr-.d.mts} +2 -2
- package/dist/{client-plugins.d-BxqFfHpM.d.ts → client-plugins.d-CUOhfapO.d.ts} +4 -3
- package/dist/{client-plugins.d-k3bOT5gz.d.mts → client-plugins.d-JnRz5a1o.d.mts} +4 -3
- package/dist/client-plugins.d.mts +3 -3
- package/dist/client-plugins.d.ts +3 -3
- package/dist/client.cjs +1 -1
- package/dist/client.d.mts +8 -8
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +1 -1
- package/dist/config.d.mts +3 -3
- package/dist/config.d.ts +3 -3
- package/dist/desktop.d.mts +4 -4
- package/dist/desktop.d.ts +4 -4
- package/dist/{devtools-6MXPFPNJ.mjs → devtools-7JPQMSTQ.mjs} +3 -3
- package/dist/{devtools-O5625KCK.cjs → devtools-IZFUYWPG.cjs} +4 -4
- package/dist/docs.cjs +5 -5
- package/dist/docs.d.mts +4 -4
- package/dist/docs.d.ts +4 -4
- package/dist/docs.mjs +4 -4
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/{headers.d-DalIGbVO.d.ts → headers.d-CqpTL_fZ.d.ts} +2 -2
- package/dist/{headers.d-sNT7ZQiU.d.mts → headers.d-rbbTKGaN.d.mts} +2 -2
- package/dist/i18n/client.cjs +3 -2
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/client.mjs +2 -1
- package/dist/i18n/index.cjs +3 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.mjs +2 -1
- package/dist/i18n/server.cjs +6 -5
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/i18n/server.mjs +5 -4
- package/dist/index.cjs +22 -22
- package/dist/{index.d-BcA-secm.d.ts → index.d-CMKvzHLW.d.ts} +1 -1
- package/dist/{index.d-DDHHAv7j.d.mts → index.d-D_B2D9Il.d.mts} +1 -1
- package/dist/index.d.mts +23 -23
- package/dist/index.d.ts +23 -23
- package/dist/index.mjs +21 -21
- package/dist/integrations/orm.d.mts +3 -3
- package/dist/integrations/orm.d.ts +3 -3
- package/dist/integrations.d.mts +3 -3
- package/dist/integrations.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.d.mts +4 -4
- package/dist/internal/app-markdown-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.cjs +21 -21
- package/dist/internal/build-runtime.d.mts +5 -5
- package/dist/internal/build-runtime.d.ts +5 -5
- package/dist/internal/build-runtime.mjs +20 -20
- package/dist/internal/cli-runtime.cjs +6 -6
- package/dist/internal/cli-runtime.mjs +5 -5
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +2 -2
- package/dist/internal/client-runtime.d.mts +6 -6
- package/dist/internal/client-runtime.d.ts +6 -6
- package/dist/internal/client-runtime.mjs +3 -3
- package/dist/internal/compression-runtime.d.mts +3 -3
- package/dist/internal/compression-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.cjs +5 -5
- package/dist/internal/config-runtime.d.mts +6 -6
- package/dist/internal/config-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.mjs +4 -4
- package/dist/internal/infra-analytics-runtime.cjs +7 -7
- package/dist/internal/infra-analytics-runtime.mjs +5 -5
- 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 +13 -13
- package/dist/internal/production-runtime.d.mts +36 -24
- package/dist/internal/production-runtime.d.ts +36 -24
- package/dist/internal/production-runtime.mjs +12 -12
- package/dist/internal/vercel-edge-middleware.d.mts +2 -2
- package/dist/internal/vercel-edge-middleware.d.ts +2 -2
- package/dist/markdown.d.mts +3 -3
- package/dist/markdown.d.ts +3 -3
- package/dist/middleware.cjs +3 -3
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/middleware.mjs +2 -2
- package/dist/mobile.d.mts +3 -3
- package/dist/mobile.d.ts +3 -3
- package/dist/{mount.d-D3JOux2V.d.ts → mount.d-B0XMxDRh.d.ts} +1 -1
- package/dist/{mount.d-C1PONsEe.d.mts → mount.d-ImEO7q8a.d.mts} +1 -1
- package/dist/{navigation-delegate.d-CJQQHboA.d.mts → navigation-delegate.d-83Q7ksf7.d.mts} +1 -1
- package/dist/{navigation-delegate.d-CQQPbdkE.d.ts → navigation-delegate.d-RRx1CSlb.d.ts} +1 -1
- package/dist/navigation.d.mts +6 -6
- package/dist/navigation.d.ts +6 -6
- package/dist/plugin.cjs +15 -15
- package/dist/plugin.d.mts +6 -6
- package/dist/plugin.d.ts +6 -6
- package/dist/plugin.mjs +14 -14
- package/dist/{production-runtime.d-B0IeWWyO.d.mts → production-runtime.d-Bcu37SCo.d.mts} +1 -1
- package/dist/{production-runtime.d-q3aHIv5Y.d.ts → production-runtime.d-qPj3XRET.d.ts} +1 -1
- package/dist/{render-plan.d-DHuJMJRP.d.ts → render-plan.d-Ds2sXJ5m.d.ts} +1 -1
- package/dist/{render-plan.d-CiUj0rq5.d.mts → render-plan.d-wP8nTeRV.d.mts} +1 -1
- package/dist/renderer-client.cjs +3 -2
- package/dist/renderer-client.d.mts +6 -6
- package/dist/renderer-client.d.ts +6 -6
- package/dist/renderer-client.mjs +2 -1
- package/dist/{request.d-D-F7o7tb.d.mts → request.d-F3h7K37m.d.mts} +1 -1
- package/dist/{request.d-DRUbOmYD.d.ts → request.d-zpSn6pu_.d.ts} +1 -1
- package/dist/request.d.mts +4 -4
- package/dist/request.d.ts +4 -4
- package/dist/{resolver.d-9iKC79CU.d.mts → resolver.d-DJgzbdsp.d.mts} +1 -1
- package/dist/{resolver.d-CY6mEa_F.d.ts → resolver.d-yaHcGCCG.d.ts} +1 -1
- package/dist/{route-rendering.d-KwqM_mlK.d.ts → route-rendering.d-BL0_AdKj.d.ts} +1 -1
- package/dist/{route-rendering.d-6smgwT2t.d.mts → route-rendering.d-Mw0ZKG2e.d.mts} +1 -1
- package/dist/{router.d-B6sesMRD.d.ts → router.d-BwXigemZ.d.ts} +1 -1
- package/dist/{router.d-BYmDeDlp.d.mts → router.d-NGVsU11T.d.mts} +1 -1
- package/dist/{routes.d-D3aJw1H5.d.mts → routes.d-CCccJRrp.d.mts} +1 -1
- package/dist/{routes.d-K-Qg79AA.d.ts → routes.d-b7khoRoU.d.ts} +1 -1
- package/dist/routes.d.mts +3 -3
- package/dist/routes.d.ts +3 -3
- package/dist/{routing.d-DwSUVZbF.d.mts → routing.d-BhPgtN_S.d.ts} +2 -1
- package/dist/{routing.d-BxOZ2YWc.d.ts → routing.d-D67HQmnv.d.mts} +2 -1
- package/dist/{rsc-pipeline-P4PCWDO2.cjs → rsc-pipeline-BNXYMG4G.cjs} +5 -5
- package/dist/{rsc-pipeline-R2GOKIMU.mjs → rsc-pipeline-DHYZLWSF.mjs} +4 -4
- package/dist/{runtime-WA2Q4SLG.cjs → runtime-IWOT6ZVC.cjs} +6 -6
- package/dist/{runtime-DP5DYGW5.mjs → runtime-XPYKUNL3.mjs} +4 -4
- package/dist/{runtime.d-BFSJf-ww.d.mts → runtime.d-BA3MzhXz.d.mts} +1 -1
- package/dist/{runtime.d-nUz0HAL4.d.mts → runtime.d-CTAXWZby.d.mts} +2 -2
- package/dist/{runtime.d-CbdMI0Oy.d.ts → runtime.d-OBIZWpx1.d.ts} +1 -1
- package/dist/{runtime.d-B_uPfMjA.d.ts → runtime.d-PUA5qBnd.d.ts} +2 -2
- package/dist/server-plugins.d.mts +5 -5
- package/dist/server-plugins.d.ts +5 -5
- package/dist/server.cjs +33 -33
- package/dist/server.d.mts +14 -14
- package/dist/server.d.ts +14 -14
- package/dist/server.mjs +17 -17
- package/dist/{spa-router.d-D4EDwR20.d.mts → spa-router.d-BG2XzE5p.d.mts} +3 -3
- package/dist/{spa-router.d-mC1D5cTN.d.ts → spa-router.d-DrYT944-.d.ts} +3 -3
- package/dist/testing.cjs +6 -5
- package/dist/testing.d.mts +3 -3
- package/dist/testing.d.ts +3 -3
- package/dist/testing.mjs +6 -5
- package/dist/{types.d-wVRlLtBf.d.ts → types.d-euATAbE4.d.mts} +4 -0
- package/dist/{types.d-wVRlLtBf.d.mts → types.d-euATAbE4.d.ts} +4 -0
- package/dist/{utils.d-DxMzteqE.d.mts → utils.d-C1k9BJeD.d.mts} +1 -1
- package/dist/{utils.d-A2X3a6z_.d.ts → utils.d-DcF4wxey.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +15 -15
- package/dist/vite.d.mts +7 -7
- package/dist/vite.d.ts +7 -7
- package/dist/vite.mjs +14 -14
- package/package.json +1 -1
- package/dist/analyzer-LPIVRSTJ.cjs +0 -16
|
@@ -31,7 +31,8 @@ var _chunkO47W53D3cjs = require('./chunk-O47W53D3.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
|
|
35
|
+
var _chunkCBLRSZQLcjs = require('./chunk-CBLRSZQL.cjs');
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
|
|
@@ -46,7 +47,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
|
|
49
|
-
var
|
|
50
|
+
var _chunkE3LE6EZHcjs = require('./chunk-E3LE6EZH.cjs');
|
|
50
51
|
|
|
51
52
|
|
|
52
53
|
|
|
@@ -62,7 +63,7 @@ var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
|
|
|
62
63
|
|
|
63
64
|
|
|
64
65
|
|
|
65
|
-
var
|
|
66
|
+
var _chunkC5AM2XDNcjs = require('./chunk-C5AM2XDN.cjs');
|
|
66
67
|
|
|
67
68
|
|
|
68
69
|
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
@@ -80,13 +81,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
|
80
81
|
|
|
81
82
|
|
|
82
83
|
|
|
83
|
-
var
|
|
84
|
+
var _chunkFSSONJRVcjs = require('./chunk-FSSONJRV.cjs');
|
|
84
85
|
|
|
85
86
|
|
|
86
87
|
var _chunkTP4RAV7Ycjs = require('./chunk-TP4RAV7Y.cjs');
|
|
87
88
|
|
|
88
89
|
|
|
89
|
-
var
|
|
90
|
+
var _chunkOSEQL34Qcjs = require('./chunk-OSEQL34Q.cjs');
|
|
90
91
|
|
|
91
92
|
|
|
92
93
|
var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
|
|
@@ -121,7 +122,8 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
|
|
|
121
122
|
|
|
122
123
|
|
|
123
124
|
|
|
124
|
-
|
|
125
|
+
|
|
126
|
+
var _chunkBE7AQXJBcjs = require('./chunk-BE7AQXJB.cjs');
|
|
125
127
|
|
|
126
128
|
|
|
127
129
|
|
|
@@ -182,6 +184,10 @@ var _chunkL6E4SHUBcjs = require('./chunk-L6E4SHUB.cjs');
|
|
|
182
184
|
|
|
183
185
|
|
|
184
186
|
|
|
187
|
+
var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
185
191
|
|
|
186
192
|
|
|
187
193
|
|
|
@@ -216,10 +222,10 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
|
216
222
|
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
217
223
|
|
|
218
224
|
|
|
219
|
-
var
|
|
225
|
+
var _chunk5LOARKDPcjs = require('./chunk-5LOARKDP.cjs');
|
|
220
226
|
|
|
221
227
|
|
|
222
|
-
var
|
|
228
|
+
var _chunkNLBK37HIcjs = require('./chunk-NLBK37HI.cjs');
|
|
223
229
|
|
|
224
230
|
|
|
225
231
|
|
|
@@ -253,7 +259,7 @@ var _chunkJYNNIGQOcjs = require('./chunk-JYNNIGQO.cjs');
|
|
|
253
259
|
|
|
254
260
|
|
|
255
261
|
|
|
256
|
-
var
|
|
262
|
+
var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
|
|
257
263
|
|
|
258
264
|
|
|
259
265
|
|
|
@@ -279,10 +285,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
|
279
285
|
var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
280
286
|
|
|
281
287
|
|
|
282
|
-
var
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
|
|
288
|
+
var _chunkZDZUFD67cjs = require('./chunk-ZDZUFD67.cjs');
|
|
286
289
|
|
|
287
290
|
|
|
288
291
|
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
@@ -306,6 +309,9 @@ var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
|
|
|
306
309
|
var _chunkNLBHLPEOcjs = require('./chunk-NLBHLPEO.cjs');
|
|
307
310
|
|
|
308
311
|
|
|
312
|
+
var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
|
|
313
|
+
|
|
314
|
+
|
|
309
315
|
|
|
310
316
|
|
|
311
317
|
|
|
@@ -1074,7 +1080,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
1074
1080
|
return import("./workflows.cjs");
|
|
1075
1081
|
}
|
|
1076
1082
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1077
|
-
return import("./devtools-
|
|
1083
|
+
return import("./devtools-IZFUYWPG.cjs");
|
|
1078
1084
|
}
|
|
1079
1085
|
function loadFarmDevtoolsUIRuntime() {
|
|
1080
1086
|
return import("./devtools-ui-SYRUXUA7.cjs");
|
|
@@ -1105,16 +1111,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1105
1111
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1106
1112
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1107
1113
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1108
|
-
|
|
1109
|
-
new RegExp(`^${
|
|
1114
|
+
_chunkCBLRSZQLcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1115
|
+
new RegExp(`^${_chunkBE7AQXJBcjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1110
1116
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1111
1117
|
// included.
|
|
1112
1118
|
/^node:/,
|
|
1113
|
-
|
|
1119
|
+
_chunkCBLRSZQLcjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1114
1120
|
];
|
|
1115
1121
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1116
|
-
|
|
1117
|
-
new RegExp(`^${
|
|
1122
|
+
_chunkCBLRSZQLcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1123
|
+
new RegExp(`^${_chunkBE7AQXJBcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1118
1124
|
];
|
|
1119
1125
|
function createFarmPlatformClientModule(platform) {
|
|
1120
1126
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1142,11 +1148,11 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1142
1148
|
name: "farm:server-only-entries",
|
|
1143
1149
|
enforce: "pre",
|
|
1144
1150
|
config(config) {
|
|
1145
|
-
const bundledPackages =
|
|
1151
|
+
const bundledPackages = _chunkBE7AQXJBcjs.collectFarmServerBundledPackageInfo.call(void 0,
|
|
1146
1152
|
path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())))
|
|
1147
1153
|
);
|
|
1148
1154
|
return {
|
|
1149
|
-
optimizeDeps: { rolldownOptions: { plugins: [
|
|
1155
|
+
optimizeDeps: { rolldownOptions: { plugins: [_chunkBE7AQXJBcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
|
|
1150
1156
|
ssr: {
|
|
1151
1157
|
noExternal: [
|
|
1152
1158
|
// Resolve `server-only` here rather than in Node, which would load its throwing build.
|
|
@@ -1174,9 +1180,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1174
1180
|
);
|
|
1175
1181
|
}
|
|
1176
1182
|
if (!_optionalChain([options2, 'optionalAccess', _67 => _67.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1177
|
-
return
|
|
1183
|
+
return _chunkBE7AQXJBcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1178
1184
|
}
|
|
1179
|
-
const resolveFrom = importer ?
|
|
1185
|
+
const resolveFrom = importer ? _chunkBE7AQXJBcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1180
1186
|
if (resolveFrom) {
|
|
1181
1187
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1182
1188
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1212,7 +1218,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1212
1218
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1213
1219
|
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
|
|
1214
1220
|
}
|
|
1215
|
-
return _nullishCoalesce(
|
|
1221
|
+
return _nullishCoalesce(_chunkBE7AQXJBcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1216
1222
|
}
|
|
1217
1223
|
}
|
|
1218
1224
|
};
|
|
@@ -1245,7 +1251,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
1245
1251
|
if (!snapshot) return "";
|
|
1246
1252
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
1247
1253
|
if (snapshot.routing === "none") return runtime;
|
|
1248
|
-
return `${
|
|
1254
|
+
return `${_chunkC5AM2XDNcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
1249
1255
|
}
|
|
1250
1256
|
function getPublicEnvDefine(config) {
|
|
1251
1257
|
const publicEnv = _optionalChain([config, 'access', _69 => _69.env, 'optionalAccess', _70 => _70.public]);
|
|
@@ -1826,7 +1832,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
1826
1832
|
return null;
|
|
1827
1833
|
}
|
|
1828
1834
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
1829
|
-
const everyExportIsComponent = options.code.includes(
|
|
1835
|
+
const everyExportIsComponent = options.code.includes(_chunkBE7AQXJBcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkBE7AQXJBcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
1830
1836
|
const replacements = [];
|
|
1831
1837
|
const wrapperStatements = [];
|
|
1832
1838
|
const originalEntries = [];
|
|
@@ -2014,16 +2020,43 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2014
2020
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2015
2021
|
const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2016
2022
|
const imageImports = farmImageImportsPlugin();
|
|
2017
|
-
const fontImports =
|
|
2023
|
+
const fontImports = _chunkCBLRSZQLcjs.farmFontImportsPlugin.call(void 0, {
|
|
2018
2024
|
root: options.root,
|
|
2019
2025
|
basePath: options.basePath,
|
|
2020
2026
|
publicDir: options.publicDir
|
|
2021
2027
|
});
|
|
2022
2028
|
let farmApp;
|
|
2029
|
+
const isFarmGeneratedOutput = (file) => {
|
|
2030
|
+
const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _95 => _95.getConfig, 'call', _96 => _96(), 'access', _97 => _97.root]), () => ( options.root));
|
|
2031
|
+
if (!root) return file.includes("/.farm/");
|
|
2032
|
+
const output = _chunkQMNWKQL4cjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
|
|
2033
|
+
return file === output || file.startsWith(`${output}/`);
|
|
2034
|
+
};
|
|
2023
2035
|
let serverFnTransformActive = false;
|
|
2036
|
+
const getFarmRenderedServerModules = () => {
|
|
2037
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _98 => _98.getRouteManager, 'call', _99 => _99()]);
|
|
2038
|
+
if (!routeManager) return /* @__PURE__ */ new Set();
|
|
2039
|
+
const files = /* @__PURE__ */ new Set();
|
|
2040
|
+
for (const entries of [
|
|
2041
|
+
routeManager.getRoutes(),
|
|
2042
|
+
routeManager.getLayouts(),
|
|
2043
|
+
routeManager.getLoadings(),
|
|
2044
|
+
routeManager.getErrors(),
|
|
2045
|
+
routeManager.getRouteSlots()
|
|
2046
|
+
]) {
|
|
2047
|
+
for (const entry of entries.values()) files.add(entry.modulePath);
|
|
2048
|
+
}
|
|
2049
|
+
const config = farmApp.getConfig();
|
|
2050
|
+
const mdxComponents = _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0,
|
|
2051
|
+
_chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx),
|
|
2052
|
+
config.root
|
|
2053
|
+
);
|
|
2054
|
+
if (mdxComponents) files.add(mdxComponents);
|
|
2055
|
+
return files;
|
|
2056
|
+
};
|
|
2024
2057
|
const islandsServerFns = () => {
|
|
2025
|
-
const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
2026
|
-
return _optionalChain([config, 'access',
|
|
2058
|
+
const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _100 => _100.getConfig, 'call', _101 => _101()]), () => ( options));
|
|
2059
|
+
return _optionalChain([config, 'access', _102 => _102.experimental, 'optionalAccess', _103 => _103.serverActions]) === true && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _104 => _104.experimental, 'optionalAccess', _105 => _105.serverComponents])) === "islands";
|
|
2027
2060
|
};
|
|
2028
2061
|
let reactRefreshActive = false;
|
|
2029
2062
|
let server;
|
|
@@ -2052,9 +2085,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2052
2085
|
].join(" ");
|
|
2053
2086
|
console.log(log);
|
|
2054
2087
|
};
|
|
2055
|
-
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
2088
|
+
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _106 => _106.getRouteManager, 'call', _107 => _107(), 'access', _108 => _108.getProgrammaticClientRoutes, 'call', _109 => _109()])));
|
|
2056
2089
|
const isOutsideAppRoot = (file) => {
|
|
2057
|
-
const root = _optionalChain([farmApp, 'optionalAccess',
|
|
2090
|
+
const root = _optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111(), 'access', _112 => _112.root]) || _optionalChain([server, 'optionalAccess', _113 => _113.config, 'access', _114 => _114.root]) || options.root;
|
|
2058
2091
|
if (!root) return false;
|
|
2059
2092
|
const relative4 = path6.relative(root, file.split("?", 1)[0]);
|
|
2060
2093
|
return relative4.startsWith("..") || path6.isAbsolute(relative4);
|
|
@@ -2066,14 +2099,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2066
2099
|
isBuild = configEnv.command === "build";
|
|
2067
2100
|
const farmAliases = {
|
|
2068
2101
|
..._chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2069
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access',
|
|
2102
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _115 => _115.resolve, 'optionalAccess', _116 => _116.alias])) ? {} : _chunkCBLRSZQLcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2070
2103
|
};
|
|
2071
2104
|
if (Object.keys(farmAliases).length > 0) {
|
|
2072
2105
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2073
|
-
userConfig.resolve.alias =
|
|
2106
|
+
userConfig.resolve.alias = _chunkCBLRSZQLcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2074
2107
|
}
|
|
2075
2108
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2076
|
-
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access',
|
|
2109
|
+
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _117 => _117.server, 'optionalAccess', _118 => _118.cors]) === void 0;
|
|
2077
2110
|
return {
|
|
2078
2111
|
// Honor Farm's publicDir so the dev server serves the same static
|
|
2079
2112
|
// directory the production client build emits.
|
|
@@ -2086,7 +2119,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2086
2119
|
...farmOwnsDevCors ? { cors: false } : {},
|
|
2087
2120
|
fs: {
|
|
2088
2121
|
...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
|
|
2089
|
-
deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access',
|
|
2122
|
+
deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _119 => _119.server, 'optionalAccess', _120 => _120.fs, 'optionalAccess', _121 => _121.deny]), options)
|
|
2090
2123
|
}
|
|
2091
2124
|
}
|
|
2092
2125
|
};
|
|
@@ -2099,7 +2132,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2099
2132
|
(plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
|
|
2100
2133
|
);
|
|
2101
2134
|
reactRefreshActive = _chunk3QM74STYcjs.isFarmReactRefreshActive.call(void 0, config);
|
|
2102
|
-
if (_optionalChain([options, 'access',
|
|
2135
|
+
if (_optionalChain([options, 'access', _122 => _122.experimental, 'optionalAccess', _123 => _123.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
|
|
2103
2136
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
2104
2137
|
"experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
|
|
2105
2138
|
);
|
|
@@ -2108,20 +2141,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2108
2141
|
async configureServer(viteServer) {
|
|
2109
2142
|
viteServer.middlewares.use(
|
|
2110
2143
|
createFarmDevPreviewGuard(viteServer, {
|
|
2111
|
-
getSourceRoots: () => _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
2144
|
+
getSourceRoots: () => _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _124 => _124.getConfig, 'call', _125 => _125()]), () => ( options)))
|
|
2112
2145
|
})
|
|
2113
2146
|
);
|
|
2114
2147
|
if (typeof fontImports.configureServer === "function") {
|
|
2115
2148
|
await fontImports.configureServer.call(this, viteServer);
|
|
2116
2149
|
}
|
|
2117
2150
|
server = viteServer;
|
|
2118
|
-
const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess',
|
|
2119
|
-
const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess',
|
|
2151
|
+
const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _126 => _126.pre, 'access', _127 => _127.target]), () => ( viteServer.middlewares));
|
|
2152
|
+
const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _128 => _128.post, 'access', _129 => _129.target]), () => ( viteServer.middlewares));
|
|
2120
2153
|
const pm = initialPluginManager;
|
|
2121
2154
|
const configRoutePlugins = new Set(
|
|
2122
|
-
_optionalChain([pm, 'optionalAccess',
|
|
2155
|
+
_optionalChain([pm, 'optionalAccess', _130 => _130.getPlugins, 'call', _131 => _131(), 'access', _132 => _132.filter, 'call', _133 => _133(isFarmConfigRoutePlugin), 'access', _134 => _134.map, 'call', _135 => _135((plugin2) => plugin2.name)])
|
|
2123
2156
|
);
|
|
2124
|
-
const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
2157
|
+
const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _136 => _136.getPlugins, 'call', _137 => _137()]), () => ( []))).flatMap((plugin2) => {
|
|
2125
2158
|
const matcher = _chunkMBCRWU3Pcjs.getConfigRedirectMatcher.call(void 0, plugin2);
|
|
2126
2159
|
return matcher ? [matcher] : [];
|
|
2127
2160
|
});
|
|
@@ -2132,7 +2165,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2132
2165
|
} catch (e21) {
|
|
2133
2166
|
}
|
|
2134
2167
|
};
|
|
2135
|
-
farmApp = new (0,
|
|
2168
|
+
farmApp = new (0, _chunkCBLRSZQLcjs.FarmApp)(
|
|
2136
2169
|
{
|
|
2137
2170
|
...options,
|
|
2138
2171
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2140,17 +2173,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2140
2173
|
server
|
|
2141
2174
|
);
|
|
2142
2175
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2143
|
-
|
|
2176
|
+
_chunkBE7AQXJBcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2144
2177
|
farmApp.getConfig().root,
|
|
2145
2178
|
options.distDir || ".farm"
|
|
2146
2179
|
)
|
|
2147
2180
|
);
|
|
2181
|
+
farmApp.getRouteManager().trackSourceChanges();
|
|
2148
2182
|
await farmApp.initialize();
|
|
2149
2183
|
const farmConfig = farmApp.getConfig();
|
|
2150
2184
|
let farmAppPackages;
|
|
2151
|
-
if (_optionalChain([farmConfig, 'access',
|
|
2185
|
+
if (_optionalChain([farmConfig, 'access', _138 => _138.agent, 'optionalAccess', _139 => _139.noindexPreviews])) {
|
|
2152
2186
|
farmMiddlewares.use((_req, res, next) => {
|
|
2153
|
-
if (
|
|
2187
|
+
if (_chunkOSEQL34Qcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2154
2188
|
res.setHeader("X-Robots-Tag", _chunkZUVAGMQ5cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2155
2189
|
}
|
|
2156
2190
|
next();
|
|
@@ -2158,7 +2192,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2158
2192
|
}
|
|
2159
2193
|
const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2160
2194
|
const devBuiltInRoutePaths = new Set(
|
|
2161
|
-
|
|
2195
|
+
_chunkFSSONJRVcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2162
2196
|
agent: {
|
|
2163
2197
|
apiCatalog: true,
|
|
2164
2198
|
mcp: true,
|
|
@@ -2180,7 +2214,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2180
2214
|
validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
|
|
2181
2215
|
// Vite owns this address. Unlike request.url, it cannot be replaced by
|
|
2182
2216
|
// a caller-controlled Host header.
|
|
2183
|
-
trustedLocalOrigin: () => _optionalChain([server, 'access',
|
|
2217
|
+
trustedLocalOrigin: () => _optionalChain([server, 'access', _140 => _140.resolvedUrls, 'optionalAccess', _141 => _141.local, 'access', _142 => _142[0]]),
|
|
2184
2218
|
onError(error) {
|
|
2185
2219
|
_chunkQMNWKQL4cjs.logger.error(
|
|
2186
2220
|
`Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -2193,22 +2227,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2193
2227
|
if (farmConfig.i18n.enabled) {
|
|
2194
2228
|
server.watcher.add(
|
|
2195
2229
|
farmConfig.i18n.locales.map(
|
|
2196
|
-
(locale) =>
|
|
2230
|
+
(locale) => _chunkZMSVKVI3cjs.resolveFarmI18nMessagePath.call(void 0, farmConfig.i18n, locale)
|
|
2197
2231
|
)
|
|
2198
2232
|
);
|
|
2199
2233
|
}
|
|
2200
2234
|
const workflowConfig = farmConfig.workflows;
|
|
2201
2235
|
const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
|
|
2202
2236
|
const getExtraRouteTypes = () => [
|
|
2203
|
-
..._optionalChain([options, 'access',
|
|
2204
|
-
..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
2237
|
+
..._optionalChain([options, 'access', _143 => _143.openapi, 'optionalAccess', _144 => _144.enabled]) && options.openapi.route ? [options.openapi.route] : [],
|
|
2238
|
+
..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _145 => _145.getFarmDocsRouteTypeEntries, 'call', _146 => _146(farmConfig.docs)]), () => ( []))
|
|
2205
2239
|
];
|
|
2206
2240
|
const appDirSlugs = sourceRoots.map(
|
|
2207
2241
|
(source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
|
|
2208
2242
|
);
|
|
2209
2243
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2210
2244
|
try {
|
|
2211
|
-
const result = await
|
|
2245
|
+
const result = await _chunkE3LE6EZHcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2212
2246
|
root: farmConfig.root,
|
|
2213
2247
|
srcDir: farmConfig.srcDir,
|
|
2214
2248
|
layers: farmConfig.layers,
|
|
@@ -2248,7 +2282,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2248
2282
|
(source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
|
|
2249
2283
|
);
|
|
2250
2284
|
const layerConfigFiles = new Set(
|
|
2251
|
-
farmConfig.layers.map((layer) => _optionalChain([layer, 'access',
|
|
2285
|
+
farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _147 => _147.configFile, 'optionalAccess', _148 => _148.replace, 'call', _149 => _149(/\\/g, "/")])).filter((file) => Boolean(file))
|
|
2252
2286
|
);
|
|
2253
2287
|
const routeModuleExtensions = /* @__PURE__ */ new Set([
|
|
2254
2288
|
..._chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
|
|
@@ -2283,7 +2317,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2283
2317
|
const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
|
|
2284
2318
|
file.replace(/\\/g, "/")
|
|
2285
2319
|
);
|
|
2286
|
-
const isI18nCatalogFile = (file) =>
|
|
2320
|
+
const isI18nCatalogFile = (file) => _chunkZMSVKVI3cjs.isFarmI18nCatalogFile.call(void 0, farmConfig.i18n, file);
|
|
2287
2321
|
let typeArtifactGenScheduled = null;
|
|
2288
2322
|
let pendingTypeArtifacts = createEmptyTypeArtifactSelection();
|
|
2289
2323
|
let pendingTypeArtifactReason = "";
|
|
@@ -2327,7 +2361,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2327
2361
|
scheduleTypeArtifactGen(file, ev, typeArtifacts);
|
|
2328
2362
|
}
|
|
2329
2363
|
if (isI18nCatalogFile(file)) {
|
|
2330
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
2364
|
+
_optionalChain([farmApp, 'optionalAccess', _150 => _150.getI18nRuntime, 'call', _151 => _151(), 'access', _152 => _152.reload, 'call', _153 => _153(), 'access', _154 => _154.then, 'call', _155 => _155(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _156 => _156.catch, 'call', _157 => _157((error) => _chunkQMNWKQL4cjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
|
|
2331
2365
|
}
|
|
2332
2366
|
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
2333
2367
|
if (isRouteRefreshEvent) {
|
|
@@ -2340,8 +2374,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2340
2374
|
const reloadsMiddleware = pendingRouteRefreshIncludesMiddleware;
|
|
2341
2375
|
pendingRouteRefreshIncludesMiddleware = false;
|
|
2342
2376
|
Promise.all([
|
|
2343
|
-
_optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
2344
|
-
reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess',
|
|
2377
|
+
_optionalChain([refreshRouteDiscovery, 'optionalCall', _158 => _158(`${ev} ${file}`)]),
|
|
2378
|
+
reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _159 => _159.reload, 'call', _160 => _160()]) : void 0
|
|
2345
2379
|
]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkQMNWKQL4cjs.logger.warn(`Route refresh failed: ${error.message}`));
|
|
2346
2380
|
}, 50);
|
|
2347
2381
|
}
|
|
@@ -2380,14 +2414,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2380
2414
|
const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
|
|
2381
2415
|
const load = (file) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, file);
|
|
2382
2416
|
globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
|
|
2383
|
-
_optionalChain([server, 'access',
|
|
2417
|
+
_optionalChain([server, 'access', _161 => _161.httpServer, 'optionalAccess', _162 => _162.once, 'call', _163 => _163("close", () => {
|
|
2384
2418
|
const globals = globalThis;
|
|
2385
2419
|
if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
|
|
2386
2420
|
delete globals[FARM_DEV_SERVER_MODULE_LOADER];
|
|
2387
2421
|
}
|
|
2388
2422
|
})]);
|
|
2389
2423
|
}
|
|
2390
|
-
apiRouteManager = new (0,
|
|
2424
|
+
apiRouteManager = new (0, _chunk5LOARKDPcjs.APIRouteManager)(appDirs, server, {
|
|
2391
2425
|
plugins: farmConfig.plugins,
|
|
2392
2426
|
i18n: farmApp.getI18nRuntime(),
|
|
2393
2427
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -2454,11 +2488,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2454
2488
|
});
|
|
2455
2489
|
}
|
|
2456
2490
|
}
|
|
2457
|
-
if (_optionalChain([options, 'access',
|
|
2491
|
+
if (_optionalChain([options, 'access', _164 => _164.openapi, 'optionalAccess', _165 => _165.enabled])) {
|
|
2458
2492
|
const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
|
|
2459
2493
|
openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
|
|
2460
2494
|
mode: "development",
|
|
2461
|
-
apiBaseURL: typeof _optionalChain([options, 'access',
|
|
2495
|
+
apiBaseURL: typeof _optionalChain([options, 'access', _166 => _166.api, 'optionalAccess', _167 => _167.baseURL]) === "string" ? options.api.baseURL : void 0,
|
|
2462
2496
|
loadModule: (filePath) => apiRouteManager.loadModule(filePath)
|
|
2463
2497
|
});
|
|
2464
2498
|
const spec = await openAPIManager.generateSpec();
|
|
@@ -2488,7 +2522,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2488
2522
|
return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
|
|
2489
2523
|
};
|
|
2490
2524
|
releaseDocsMCPServers();
|
|
2491
|
-
const isFarmDocsPathGuarded = (href) =>
|
|
2525
|
+
const isFarmDocsPathGuarded = (href) => _chunkC5AM2XDNcjs.farmPathGuardCoversPage.call(void 0,
|
|
2492
2526
|
{
|
|
2493
2527
|
config: farmConfig,
|
|
2494
2528
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -2501,20 +2535,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2501
2535
|
clientEntry: "/@farm/client.js",
|
|
2502
2536
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2503
2537
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2504
|
-
globalStylesheetHref:
|
|
2538
|
+
globalStylesheetHref: _chunkCBLRSZQLcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2505
2539
|
farmConfig.root,
|
|
2506
2540
|
farmConfig.srcDir
|
|
2507
2541
|
),
|
|
2508
2542
|
loadModule: async (specifier) => {
|
|
2509
2543
|
const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
|
|
2510
|
-
if (specifier === _optionalChain([farmConfig, 'access',
|
|
2544
|
+
if (specifier === _optionalChain([farmConfig, 'access', _168 => _168.docs, 'access', _169 => _169.adapter, 'optionalAccess', _170 => _170.server]) && _optionalChain([resolved, 'optionalAccess', _171 => _171.id])) {
|
|
2511
2545
|
const file = resolved.id.split("?", 1)[0];
|
|
2512
2546
|
return import(
|
|
2513
2547
|
/* @vite-ignore */
|
|
2514
2548
|
_url.pathToFileURL.call(void 0, file).href
|
|
2515
2549
|
);
|
|
2516
2550
|
}
|
|
2517
|
-
return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
2551
|
+
return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _172 => _172.id]), () => ( specifier)));
|
|
2518
2552
|
},
|
|
2519
2553
|
registerMCPServer: (mcpServer) => {
|
|
2520
2554
|
const dispose = _chunkLRB5OVRTcjs.registerFarmMCPServer.call(void 0, mcpServer);
|
|
@@ -2532,7 +2566,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2532
2566
|
fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2533
2567
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2534
2568
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2535
|
-
globalStylesheetHref:
|
|
2569
|
+
globalStylesheetHref: _chunkCBLRSZQLcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2536
2570
|
farmConfig.root,
|
|
2537
2571
|
farmConfig.srcDir
|
|
2538
2572
|
),
|
|
@@ -2540,7 +2574,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2540
2574
|
basePath: farmConfig.basePath
|
|
2541
2575
|
}) : null;
|
|
2542
2576
|
const farmDocsListsPages = Boolean(
|
|
2543
|
-
farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess',
|
|
2577
|
+
farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _173 => _173.getPlugins, 'call', _174 => _174(), 'access', _175 => _175.some, 'call', _176 => _176((plugin2) => plugin2.name === "farm:infra-analytics")])
|
|
2544
2578
|
);
|
|
2545
2579
|
let farmDocsPagePaths;
|
|
2546
2580
|
const getFarmDocsPagePaths = () => {
|
|
@@ -2568,14 +2602,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2568
2602
|
}
|
|
2569
2603
|
}
|
|
2570
2604
|
const wrapFarmDocsResponseWithLayouts = async (request, response) => {
|
|
2571
|
-
if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access',
|
|
2605
|
+
if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _177 => _177.headers, 'access', _178 => _178.get, 'call', _179 => _179("content-type"), 'optionalAccess', _180 => _180.toLowerCase, 'call', _181 => _181(), 'access', _182 => _182.includes, 'call', _183 => _183("text/html")])) {
|
|
2572
2606
|
return response;
|
|
2573
2607
|
}
|
|
2574
2608
|
const pathname = new URL(request.url).pathname;
|
|
2575
2609
|
const matchedRoute = routeManager.matchRoute(pathname);
|
|
2576
2610
|
const layoutEntries = matchedRoute.layouts.map((layout) => ({
|
|
2577
2611
|
...layout,
|
|
2578
|
-
metadata:
|
|
2612
|
+
metadata: _chunkBE7AQXJBcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
|
|
2579
2613
|
}));
|
|
2580
2614
|
if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
|
|
2581
2615
|
return response;
|
|
@@ -2589,7 +2623,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2589
2623
|
headers: response.headers
|
|
2590
2624
|
});
|
|
2591
2625
|
}
|
|
2592
|
-
const docsRenderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
2626
|
+
const docsRenderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _184 => _184.getConfig, 'call', _185 => _185()]), () => ( options))).renderer);
|
|
2593
2627
|
const [rendererRuntime, layoutModules] = await Promise.all([
|
|
2594
2628
|
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, docsRenderer) ? import("./renderer/react/server.cjs") : _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, docsRenderer.server),
|
|
2595
2629
|
Promise.all(
|
|
@@ -2618,7 +2652,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2618
2652
|
])
|
|
2619
2653
|
);
|
|
2620
2654
|
const inlineValue = (value) => JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e");
|
|
2621
|
-
const pageModulePath = _optionalChain([matchedRoute, 'access',
|
|
2655
|
+
const pageModulePath = _optionalChain([matchedRoute, 'access', _186 => _186.route, 'optionalAccess', _187 => _187.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
|
|
2622
2656
|
const bootstrapScript = `<script>
|
|
2623
2657
|
window.__FARM_PROPS__ = ${inlineValue({ params })};
|
|
2624
2658
|
window.__FARM_ROUTE_SLOTS__ = [];
|
|
@@ -2715,7 +2749,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2715
2749
|
}
|
|
2716
2750
|
},
|
|
2717
2751
|
(request) => {
|
|
2718
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
2752
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _188 => _188.getConfig, 'call', _189 => _189()]), () => ( options));
|
|
2719
2753
|
const currentServerConfig = _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
2720
2754
|
return _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, request, {
|
|
2721
2755
|
trustProxy: currentServerConfig.trustProxy
|
|
@@ -2731,7 +2765,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2731
2765
|
withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
|
|
2732
2766
|
const requestUrl = req.url || "/";
|
|
2733
2767
|
const requestMethod = req.method || "GET";
|
|
2734
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
2768
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _190 => _190.getConfig, 'call', _191 => _191()]), () => ( options));
|
|
2735
2769
|
const currentServerConfig = _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
2736
2770
|
const parsedRequestUrl = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
2737
2771
|
trustProxy: currentServerConfig.trustProxy
|
|
@@ -2825,7 +2859,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2825
2859
|
openapi: options.openapi
|
|
2826
2860
|
},
|
|
2827
2861
|
workflows: discoveredWorkflows,
|
|
2828
|
-
plugins: _optionalChain([pm, 'optionalAccess',
|
|
2862
|
+
plugins: _optionalChain([pm, 'optionalAccess', _192 => _192.getSortedPlugins, 'call', _193 => _193()])
|
|
2829
2863
|
});
|
|
2830
2864
|
res.statusCode = 200;
|
|
2831
2865
|
res.setHeader(
|
|
@@ -2860,10 +2894,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2860
2894
|
render: {
|
|
2861
2895
|
pathname: pathname2,
|
|
2862
2896
|
method: requestMethod,
|
|
2863
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
2864
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
2897
|
+
routePattern: _optionalChain([match, 'optionalAccess', _194 => _194.route, 'optionalAccess', _195 => _195.pattern]) || null,
|
|
2898
|
+
params: _optionalChain([match, 'optionalAccess', _196 => _196.params]) || {}
|
|
2865
2899
|
},
|
|
2866
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
2900
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _197 => _197.layouts]) || []).map((layout) => layout.pattern)
|
|
2867
2901
|
};
|
|
2868
2902
|
return pageHookRouteMatch;
|
|
2869
2903
|
};
|
|
@@ -2951,7 +2985,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2951
2985
|
}
|
|
2952
2986
|
}
|
|
2953
2987
|
const runAppMiddlewareForContentRoute = async () => {
|
|
2954
|
-
if (!_optionalChain([middlewareManager, 'optionalAccess',
|
|
2988
|
+
if (!_optionalChain([middlewareManager, 'optionalAccess', _198 => _198.hasMiddleware, 'call', _199 => _199()])) return false;
|
|
2955
2989
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
2956
2990
|
return runFarmMiddlewareWithNavigation(
|
|
2957
2991
|
farmApp.getServerRenderer(),
|
|
@@ -2989,7 +3023,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2989
3023
|
return response.status;
|
|
2990
3024
|
};
|
|
2991
3025
|
const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
|
|
2992
|
-
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess',
|
|
3026
|
+
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _200 => _200.hasRuntimeHook, 'call', _201 => _201("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _202 => _202.hasMiddleware, 'call', _203 => _203()]) ? interceptFarmDevPageResponse({
|
|
2993
3027
|
req,
|
|
2994
3028
|
res,
|
|
2995
3029
|
pm,
|
|
@@ -3002,7 +3036,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3002
3036
|
urlPath: requestUrl,
|
|
3003
3037
|
pathname: requestPathname,
|
|
3004
3038
|
startTime: Date.now(),
|
|
3005
|
-
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall',
|
|
3039
|
+
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _204 => _204(status)]),
|
|
3006
3040
|
// The runtime reports a runtime.after failure itself.
|
|
3007
3041
|
emitError: async () => {
|
|
3008
3042
|
},
|
|
@@ -3013,7 +3047,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3013
3047
|
handled = await runAppMiddlewareForContentRoute();
|
|
3014
3048
|
} catch (error) {
|
|
3015
3049
|
if (runtimeHookErrorAnswersJSON || res.headersSent) {
|
|
3016
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
3050
|
+
_optionalChain([interceptor, 'optionalAccess', _205 => _205.release, 'call', _206 => _206()]);
|
|
3017
3051
|
throw error;
|
|
3018
3052
|
}
|
|
3019
3053
|
if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
|
|
@@ -3021,10 +3055,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3021
3055
|
return true;
|
|
3022
3056
|
}
|
|
3023
3057
|
if (!handled) {
|
|
3024
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
3058
|
+
_optionalChain([interceptor, 'optionalAccess', _207 => _207.release, 'call', _208 => _208()]);
|
|
3025
3059
|
return false;
|
|
3026
3060
|
}
|
|
3027
|
-
if (!_optionalChain([interceptor, 'optionalAccess',
|
|
3061
|
+
if (!_optionalChain([interceptor, 'optionalAccess', _209 => _209.isEnded, 'call', _210 => _210()])) _optionalChain([logResponse2, 'optionalCall', _211 => _211(res.statusCode || 200)]);
|
|
3028
3062
|
return true;
|
|
3029
3063
|
};
|
|
3030
3064
|
const serveBuiltInRoute = async (respond, {
|
|
@@ -3033,7 +3067,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3033
3067
|
label
|
|
3034
3068
|
} = {}) => {
|
|
3035
3069
|
const discard = async () => {
|
|
3036
|
-
await _optionalChain([computed, 'optionalAccess',
|
|
3070
|
+
await _optionalChain([computed, 'optionalAccess', _212 => _212.body, 'optionalAccess', _213 => _213.cancel, 'call', _214 => _214(), 'access', _215 => _215.catch, 'call', _216 => _216(() => {
|
|
3037
3071
|
})]);
|
|
3038
3072
|
};
|
|
3039
3073
|
const sendRuntimeResponse = async (runtimeSession3, response2) => {
|
|
@@ -3050,9 +3084,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3050
3084
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3051
3085
|
try {
|
|
3052
3086
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3053
|
-
const route =
|
|
3087
|
+
const route = _chunkFSSONJRVcjs.setFarmRouteLabel.call(void 0,
|
|
3054
3088
|
{ pathname: requestPathname },
|
|
3055
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3089
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkFSSONJRVcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3056
3090
|
);
|
|
3057
3091
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3058
3092
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -3090,7 +3124,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3090
3124
|
}
|
|
3091
3125
|
responding = true;
|
|
3092
3126
|
response = await respond(
|
|
3093
|
-
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess',
|
|
3127
|
+
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _217 => _217.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
|
|
3094
3128
|
);
|
|
3095
3129
|
} catch (error) {
|
|
3096
3130
|
if (!responding && !res.headersSent) {
|
|
@@ -3110,7 +3144,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3110
3144
|
else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
3111
3145
|
};
|
|
3112
3146
|
const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
|
|
3113
|
-
if (openAPIManager && _optionalChain([options, 'access',
|
|
3147
|
+
if (openAPIManager && _optionalChain([options, 'access', _218 => _218.openapi, 'optionalAccess', _219 => _219.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
|
|
3114
3148
|
const specManager = openAPIManager;
|
|
3115
3149
|
await serveBuiltInRoute(async () => {
|
|
3116
3150
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
@@ -3130,7 +3164,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3130
3164
|
});
|
|
3131
3165
|
return;
|
|
3132
3166
|
}
|
|
3133
|
-
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access',
|
|
3167
|
+
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _220 => _220.openapi, 'optionalAccess', _221 => _221.route])) {
|
|
3134
3168
|
const docsManager = openAPIManager;
|
|
3135
3169
|
await serveBuiltInRoute(
|
|
3136
3170
|
async () => {
|
|
@@ -3141,24 +3175,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3141
3175
|
);
|
|
3142
3176
|
return;
|
|
3143
3177
|
}
|
|
3144
|
-
if (_optionalChain([options, 'access',
|
|
3178
|
+
if (_optionalChain([options, 'access', _222 => _222.agent, 'optionalAccess', _223 => _223.manifest]) !== false && _chunkFSSONJRVcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3145
3179
|
await serveBuiltInRoute(async () => {
|
|
3146
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3147
|
-
const manifest = await
|
|
3180
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkCBLRSZQLcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3181
|
+
const manifest = await _chunkFSSONJRVcjs.createFarmAppManifestResponse.call(void 0,
|
|
3148
3182
|
new Request(parsedRequestUrl, {
|
|
3149
3183
|
method: requestMethod,
|
|
3150
3184
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3151
3185
|
}),
|
|
3152
3186
|
{
|
|
3153
|
-
...
|
|
3187
|
+
..._chunkFSSONJRVcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3154
3188
|
build: "development",
|
|
3155
3189
|
packages: farmAppPackages,
|
|
3156
3190
|
// Read again on each request; unchanged files come from a cache.
|
|
3157
|
-
webmcpTools: _optionalChain([farmConfig, 'access',
|
|
3191
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _224 => _224.plugins, 'optionalAccess', _225 => _225.some, 'call', _226 => _226(({ name }) => name === "farm:webmcp")]) ? _chunkCBLRSZQLcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3158
3192
|
}),
|
|
3159
3193
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3160
3194
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
3161
|
-
guardCoversPath: (path7) =>
|
|
3195
|
+
guardCoversPath: (path7) => _chunkC5AM2XDNcjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3162
3196
|
{
|
|
3163
3197
|
config: farmConfig,
|
|
3164
3198
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -3172,11 +3206,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3172
3206
|
});
|
|
3173
3207
|
return;
|
|
3174
3208
|
}
|
|
3175
|
-
if (_optionalChain([options, 'access',
|
|
3209
|
+
if (_optionalChain([options, 'access', _227 => _227.agent, 'optionalAccess', _228 => _228.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkFSSONJRVcjs.FARM_API_CATALOG_PATH) {
|
|
3176
3210
|
await serveBuiltInRoute(
|
|
3177
|
-
() =>
|
|
3211
|
+
() => _chunkFSSONJRVcjs.createFarmApiCatalogResponse.call(void 0,
|
|
3178
3212
|
requestMethod,
|
|
3179
|
-
|
|
3213
|
+
_chunkFSSONJRVcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3180
3214
|
new Request(parsedRequestUrl, {
|
|
3181
3215
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3182
3216
|
})
|
|
@@ -3184,8 +3218,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3184
3218
|
);
|
|
3185
3219
|
return;
|
|
3186
3220
|
}
|
|
3187
|
-
if (_optionalChain([options, 'access',
|
|
3188
|
-
const aiCatalog =
|
|
3221
|
+
if (_optionalChain([options, 'access', _229 => _229.agent, 'optionalAccess', _230 => _230.aiCatalog]) !== false) {
|
|
3222
|
+
const aiCatalog = _chunkFSSONJRVcjs.createFarmAiCatalogResponse.call(void 0,
|
|
3189
3223
|
new Request(parsedRequestUrl, {
|
|
3190
3224
|
method: requestMethod,
|
|
3191
3225
|
headers: {
|
|
@@ -3228,7 +3262,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3228
3262
|
const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: _chunkCFG4QERRcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" };
|
|
3229
3263
|
const docsResponse = await farmDocsHandler(new Request(docsRequest, docsBodyInit));
|
|
3230
3264
|
if (docsResponse) {
|
|
3231
|
-
const docsPage = _optionalChain([docsResponse, 'access',
|
|
3265
|
+
const docsPage = _optionalChain([docsResponse, 'access', _231 => _231.headers, 'access', _232 => _232.get, 'call', _233 => _233("content-type"), 'optionalAccess', _234 => _234.toLowerCase, 'call', _235 => _235(), 'access', _236 => _236.includes, 'call', _237 => _237("text/html")]);
|
|
3232
3266
|
await serveBuiltInRoute(
|
|
3233
3267
|
async (request) => {
|
|
3234
3268
|
if (!docsPage) return wrapFarmDocsResponseWithLayouts(docsRequest, docsResponse);
|
|
@@ -3237,7 +3271,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3237
3271
|
farmConfig.deploymentId
|
|
3238
3272
|
);
|
|
3239
3273
|
if (deploymentMismatch) {
|
|
3240
|
-
await _optionalChain([docsResponse, 'access',
|
|
3274
|
+
await _optionalChain([docsResponse, 'access', _238 => _238.body, 'optionalAccess', _239 => _239.cancel, 'call', _240 => _240()]);
|
|
3241
3275
|
return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
|
|
3242
3276
|
}
|
|
3243
3277
|
return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
|
|
@@ -3253,11 +3287,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3253
3287
|
{
|
|
3254
3288
|
kind: "docs",
|
|
3255
3289
|
computed: docsResponse,
|
|
3256
|
-
label:
|
|
3290
|
+
label: _chunkFSSONJRVcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3257
3291
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3258
3292
|
{
|
|
3259
|
-
path: _optionalChain([farmConfig, 'access',
|
|
3260
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
3293
|
+
path: _optionalChain([farmConfig, 'access', _241 => _241.docs, 'optionalAccess', _242 => _242.entry]) || "/docs",
|
|
3294
|
+
roots: _optionalChain([farmConfig, 'access', _243 => _243.docs, 'optionalAccess', _244 => _244.roots, 'optionalAccess', _245 => _245.map, 'call', _246 => _246((root) => root.entry)]),
|
|
3261
3295
|
pages: await getFarmDocsPagePaths()
|
|
3262
3296
|
}
|
|
3263
3297
|
)
|
|
@@ -3266,7 +3300,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3266
3300
|
return;
|
|
3267
3301
|
}
|
|
3268
3302
|
}
|
|
3269
|
-
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access',
|
|
3303
|
+
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _247 => _247.headers, 'access', _248 => _248.accept, 'optionalAccess', _249 => _249.includes, 'call', _250 => _250(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
|
|
3270
3304
|
const { createFarmNativeTreeResponse } = await import("./native-tree-GF4BH33L.cjs");
|
|
3271
3305
|
const treeBodyInit = requestMethod === "POST" ? { body: _chunkCFG4QERRcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
|
|
3272
3306
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
@@ -3284,15 +3318,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3284
3318
|
});
|
|
3285
3319
|
await serveBuiltInRoute(() => treeResponse, {
|
|
3286
3320
|
computed: treeResponse,
|
|
3287
|
-
label: _nullishCoalesce(_optionalChain([farmApp, 'access',
|
|
3321
|
+
label: _nullishCoalesce(_optionalChain([farmApp, 'access', _251 => _251.getRouteManager, 'call', _252 => _252(), 'access', _253 => _253.matchRoute, 'call', _254 => _254(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _255 => _255.route, 'optionalAccess', _256 => _256.pattern]), () => ( null))
|
|
3288
3322
|
});
|
|
3289
3323
|
return;
|
|
3290
3324
|
}
|
|
3291
3325
|
const markdownRouteLabel = () => (
|
|
3292
3326
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3293
|
-
|
|
3327
|
+
_chunkFSSONJRVcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3294
3328
|
toRoutePathname(requestPathname),
|
|
3295
|
-
(page) => _optionalChain([farmApp, 'access',
|
|
3329
|
+
(page) => _optionalChain([farmApp, 'access', _257 => _257.getRouteManager, 'call', _258 => _258(), 'access', _259 => _259.matchRoute, 'call', _260 => _260(page), 'access', _261 => _261.route, 'optionalAccess', _262 => _262.pattern])
|
|
3296
3330
|
)
|
|
3297
3331
|
);
|
|
3298
3332
|
const markdownSourceResponse = viteModuleRequest ? null : await _chunkL6E4SHUBcjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
@@ -3304,7 +3338,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3304
3338
|
routePathname: toRoutePathname,
|
|
3305
3339
|
resolveSource: async (pathname2) => {
|
|
3306
3340
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
3307
|
-
const sourcePath = _optionalChain([match, 'access',
|
|
3341
|
+
const sourcePath = _optionalChain([match, 'access', _263 => _263.route, 'optionalAccess', _264 => _264.markdownSourcePath]) || (match.route && _chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
3308
3342
|
if (!sourcePath) {
|
|
3309
3343
|
return null;
|
|
3310
3344
|
}
|
|
@@ -3460,7 +3494,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3460
3494
|
"beforeRequest",
|
|
3461
3495
|
(plugin2) => {
|
|
3462
3496
|
const owner = _chunkJX5VOLAVcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
|
|
3463
|
-
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess',
|
|
3497
|
+
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _265 => _265.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
3464
3498
|
},
|
|
3465
3499
|
req,
|
|
3466
3500
|
res
|
|
@@ -3497,7 +3531,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3497
3531
|
isProd: false
|
|
3498
3532
|
},
|
|
3499
3533
|
request,
|
|
3500
|
-
{ clientAddress: _optionalChain([req, 'access',
|
|
3534
|
+
{ clientAddress: _optionalChain([req, 'access', _266 => _266.socket, 'optionalAccess', _267 => _267.remoteAddress]) }
|
|
3501
3535
|
);
|
|
3502
3536
|
if (!result) {
|
|
3503
3537
|
throw new Error(`Matched integration route did not return a response`);
|
|
@@ -3505,7 +3539,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3505
3539
|
return result;
|
|
3506
3540
|
} catch (error) {
|
|
3507
3541
|
_chunkQMNWKQL4cjs.logger.error(`Integration route error: ${error}`);
|
|
3508
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
3542
|
+
await _optionalChain([runtime, 'optionalAccess', _268 => _268.reportError, 'call', _269 => _269(error)]);
|
|
3509
3543
|
return _chunkXGTFLG73cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
3510
3544
|
}
|
|
3511
3545
|
};
|
|
@@ -3559,7 +3593,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3559
3593
|
_chunkJX5VOLAVcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3560
3594
|
pathname: requestPathname,
|
|
3561
3595
|
method: requestMethod
|
|
3562
|
-
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
3596
|
+
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _270 => _270.isFarmDocsAPIRequest, 'call', _271 => _271(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
|
|
3563
3597
|
);
|
|
3564
3598
|
};
|
|
3565
3599
|
try {
|
|
@@ -3644,15 +3678,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3644
3678
|
});
|
|
3645
3679
|
};
|
|
3646
3680
|
const isDocsAPIRequest = Boolean(
|
|
3647
|
-
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
3681
|
+
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _272 => _272.isFarmDocsAPIRequest, 'call', _273 => _273(pathname2)])
|
|
3648
3682
|
);
|
|
3649
3683
|
const docsRuntimeOptions = () => ({
|
|
3650
3684
|
kind: "docs",
|
|
3651
|
-
route:
|
|
3685
|
+
route: _chunkFSSONJRVcjs.setFarmRouteLabel.call(void 0,
|
|
3652
3686
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
3653
|
-
|
|
3654
|
-
path: _optionalChain([farmConfig, 'access',
|
|
3655
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
3687
|
+
_chunkFSSONJRVcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
3688
|
+
path: _optionalChain([farmConfig, 'access', _274 => _274.docs, 'optionalAccess', _275 => _275.entry]) || "/docs",
|
|
3689
|
+
roots: _optionalChain([farmConfig, 'access', _276 => _276.docs, 'optionalAccess', _277 => _277.roots, 'optionalAccess', _278 => _278.map, 'call', _279 => _279((root) => root.entry)])
|
|
3656
3690
|
})
|
|
3657
3691
|
)
|
|
3658
3692
|
});
|
|
@@ -3734,7 +3768,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3734
3768
|
const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
|
|
3735
3769
|
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
3736
3770
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
3737
|
-
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess',
|
|
3771
|
+
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _280 => _280.route, 'access', _281 => _281.path]) || urlPath2;
|
|
3738
3772
|
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
3739
3773
|
type: "route.matched",
|
|
3740
3774
|
pathname: pathname2,
|
|
@@ -3784,7 +3818,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3784
3818
|
error
|
|
3785
3819
|
});
|
|
3786
3820
|
_chunkQMNWKQL4cjs.logger.error(`API route error: ${error}`);
|
|
3787
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
3821
|
+
await _optionalChain([runtime, 'optionalAccess', _282 => _282.reportError, 'call', _283 => _283(error)]);
|
|
3788
3822
|
response = _chunkXGTFLG73cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
3789
3823
|
}
|
|
3790
3824
|
return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
|
|
@@ -3889,12 +3923,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3889
3923
|
}
|
|
3890
3924
|
return;
|
|
3891
3925
|
}
|
|
3892
|
-
if (_optionalChain([req, 'access',
|
|
3926
|
+
if (_optionalChain([req, 'access', _284 => _284.url, 'optionalAccess', _285 => _285.startsWith, 'call', _286 => _286("/@")]) || _optionalChain([req, 'access', _287 => _287.url, 'optionalAccess', _288 => _288.startsWith, 'call', _289 => _289("/node_modules")])) {
|
|
3893
3927
|
return next();
|
|
3894
3928
|
}
|
|
3895
3929
|
if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
|
|
3896
3930
|
requestPathname,
|
|
3897
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
3931
|
+
_optionalChain([farmApp, 'optionalAccess', _290 => _290.getRouteManager, 'call', _291 => _291()]),
|
|
3898
3932
|
[server.config.publicDir, server.config.root],
|
|
3899
3933
|
farmAgentGeneratedPaths(farmConfig),
|
|
3900
3934
|
requestMethod
|
|
@@ -3902,7 +3936,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3902
3936
|
if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
|
|
3903
3937
|
return next();
|
|
3904
3938
|
}
|
|
3905
|
-
if (_optionalChain([req, 'access',
|
|
3939
|
+
if (_optionalChain([req, 'access', _292 => _292.url, 'optionalAccess', _293 => _293.startsWith, 'call', _294 => _294("/__farm/page-data")])) {
|
|
3906
3940
|
const urlObj = parsedRequestUrl;
|
|
3907
3941
|
const targetPath = urlObj.searchParams.get("path") || "/";
|
|
3908
3942
|
let renderedRequest;
|
|
@@ -3932,7 +3966,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3932
3966
|
renderedRequest = targetRequest;
|
|
3933
3967
|
let middlewareMap = /* @__PURE__ */ new Map();
|
|
3934
3968
|
let middlewareContext = /* @__PURE__ */ new Map();
|
|
3935
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
3969
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _295 => _295.hasMiddleware, 'call', _296 => _296()])) {
|
|
3936
3970
|
const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
|
|
3937
3971
|
const targetNodeResponse = createPageDataMiddlewareResponse(res);
|
|
3938
3972
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
@@ -3966,10 +4000,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3966
4000
|
if (pm) {
|
|
3967
4001
|
await pm.runHookParallel("afterRouteMatch", {
|
|
3968
4002
|
pathname: targetPath,
|
|
3969
|
-
matched: !!_optionalChain([match, 'optionalAccess',
|
|
3970
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
3971
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
3972
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
4003
|
+
matched: !!_optionalChain([match, 'optionalAccess', _297 => _297.route]),
|
|
4004
|
+
routePattern: _optionalChain([match, 'optionalAccess', _298 => _298.route, 'optionalAccess', _299 => _299.pattern]) || null,
|
|
4005
|
+
params: _optionalChain([match, 'optionalAccess', _300 => _300.params]) || {},
|
|
4006
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _301 => _301.layouts]) || []).map((l) => l.pattern)
|
|
3973
4007
|
});
|
|
3974
4008
|
}
|
|
3975
4009
|
if (!match) {
|
|
@@ -3992,7 +4026,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3992
4026
|
);
|
|
3993
4027
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
3994
4028
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
3995
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4029
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkBE7AQXJBcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
3996
4030
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
3997
4031
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
3998
4032
|
let mergedMetadata = {};
|
|
@@ -4000,7 +4034,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4000
4034
|
layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
|
|
4001
4035
|
);
|
|
4002
4036
|
const layoutHydrationMetadata = layouts.map(
|
|
4003
|
-
(layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => (
|
|
4037
|
+
(layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkBE7AQXJBcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
|
|
4004
4038
|
);
|
|
4005
4039
|
const shouldHydrateLayout = layoutHydrationMetadata.some(
|
|
4006
4040
|
(metadata) => metadata.shouldHydrate
|
|
@@ -4012,17 +4046,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4012
4046
|
)
|
|
4013
4047
|
];
|
|
4014
4048
|
const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4015
|
-
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4016
|
-
) === "islands" ?
|
|
4049
|
+
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _302 => _302.getConfig, 'call', _303 => _303()]), () => ( options))), 'access', _304 => _304.experimental, 'optionalAccess', _305 => _305.serverComponents])
|
|
4050
|
+
) === "islands" ? _chunkCBLRSZQLcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4017
4051
|
route,
|
|
4018
4052
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4019
4053
|
layouts.map((layout, index) => ({
|
|
4020
4054
|
pattern: layout.pattern,
|
|
4021
4055
|
modulePath: layout.modulePath,
|
|
4022
|
-
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4056
|
+
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _306 => _306[index], 'optionalAccess', _307 => _307.shouldHydrate]) === true,
|
|
4023
4057
|
// Manifest entries carry it; metadata read from source does not.
|
|
4024
|
-
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4025
|
-
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access',
|
|
4058
|
+
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _308 => _308[index], 'optionalAccess', _309 => _309.hasIsolatedClientBoundaries]) === true,
|
|
4059
|
+
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _310 => _310[index], 'optionalAccess', _311 => _311.islandStrategy]), () => ( null))
|
|
4026
4060
|
})),
|
|
4027
4061
|
server.config.root,
|
|
4028
4062
|
true
|
|
@@ -4079,7 +4113,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4079
4113
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4080
4114
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4081
4115
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4082
|
-
), () => (
|
|
4116
|
+
), () => ( _chunkBE7AQXJBcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4083
4117
|
const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4084
4118
|
request: targetRequest,
|
|
4085
4119
|
params: slot.params,
|
|
@@ -4125,15 +4159,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4125
4159
|
);
|
|
4126
4160
|
const projectRoot = server.config.root;
|
|
4127
4161
|
const toUrlPath = (absolutePath) => _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
|
|
4128
|
-
const renderPlan =
|
|
4162
|
+
const renderPlan = _chunkC5AM2XDNcjs.createFarmRouteRenderPlan.call(void 0, {
|
|
4129
4163
|
pageShouldHydrate: shouldHydrate,
|
|
4130
4164
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4131
4165
|
islandStrategy: hydrationIslandStrategy,
|
|
4132
|
-
rendering:
|
|
4166
|
+
rendering: _chunkE3LE6EZHcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4133
4167
|
});
|
|
4134
4168
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4135
|
-
const layoutStartIndex =
|
|
4136
|
-
|
|
4169
|
+
const layoutStartIndex = _chunkC5AM2XDNcjs.getSharedLayoutPrefixLength.call(void 0,
|
|
4170
|
+
_chunkC5AM2XDNcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
|
|
4137
4171
|
destinationLayoutPatterns
|
|
4138
4172
|
);
|
|
4139
4173
|
const renderer = farmApp.getServerRenderer();
|
|
@@ -4143,7 +4177,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4143
4177
|
middlewareContext,
|
|
4144
4178
|
() => renderer.renderNavigationFragment({
|
|
4145
4179
|
PageComponent: routeModule.default,
|
|
4146
|
-
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess',
|
|
4180
|
+
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _312 => _312.default]),
|
|
4147
4181
|
pageProps: routeProps,
|
|
4148
4182
|
params,
|
|
4149
4183
|
layouts: layouts.map((layout, index) => ({
|
|
@@ -4205,7 +4239,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4205
4239
|
from: interceptFromHeader,
|
|
4206
4240
|
slots: routeSlots.filter((slot) => slot.interception).map((slot) => slot.name)
|
|
4207
4241
|
} : void 0,
|
|
4208
|
-
i18n:
|
|
4242
|
+
i18n: _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, )
|
|
4209
4243
|
};
|
|
4210
4244
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
4211
4245
|
res,
|
|
@@ -4214,7 +4248,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4214
4248
|
{
|
|
4215
4249
|
status: 200,
|
|
4216
4250
|
headers: {
|
|
4217
|
-
"Cache-Control":
|
|
4251
|
+
"Cache-Control": _chunkC5AM2XDNcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
|
|
4218
4252
|
"X-Farm-Navigation": "html-fragment",
|
|
4219
4253
|
Vary: "X-Farm-Layout-Chain",
|
|
4220
4254
|
[_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
|
|
@@ -4256,14 +4290,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4256
4290
|
trustProxy: currentServerConfig.trustProxy
|
|
4257
4291
|
}).pathname;
|
|
4258
4292
|
const routeManager2 = farmApp.getRouteManager();
|
|
4259
|
-
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4260
|
-
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4261
|
-
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4293
|
+
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _313 => _313.hasHook, 'call', _314 => _314("beforeRequest")]), () => ( false));
|
|
4294
|
+
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _315 => _315.hasHook, 'call', _316 => _316("afterResponse")]), () => ( false));
|
|
4295
|
+
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _317 => _317.hasHook, 'call', _318 => _318("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _319 => _319.hasHook, 'call', _320 => _320("afterRender")]), () => ( false)));
|
|
4262
4296
|
const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
|
|
4263
|
-
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4297
|
+
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _321 => _321.hasRuntimeHook, 'call', _322 => _322("after")]), () => ( false));
|
|
4264
4298
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4265
4299
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4266
|
-
const mcpLabel =
|
|
4300
|
+
const mcpLabel = _chunkFSSONJRVcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4267
4301
|
if (mcpLabel) return mcpLabel;
|
|
4268
4302
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4269
4303
|
return routePathname === _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PATH : null;
|
|
@@ -4272,13 +4306,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4272
4306
|
const match = routeManager2.matchRoute(pathname2);
|
|
4273
4307
|
return {
|
|
4274
4308
|
kind: "page",
|
|
4275
|
-
route:
|
|
4309
|
+
route: _chunkFSSONJRVcjs.setFarmRouteLabel.call(void 0,
|
|
4276
4310
|
{
|
|
4277
4311
|
pathname: pathname2,
|
|
4278
|
-
pattern: _optionalChain([match, 'optionalAccess',
|
|
4279
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
4312
|
+
pattern: _optionalChain([match, 'optionalAccess', _323 => _323.route, 'optionalAccess', _324 => _324.pattern]) || null,
|
|
4313
|
+
params: _optionalChain([match, 'optionalAccess', _325 => _325.params]) || {}
|
|
4280
4314
|
},
|
|
4281
|
-
_optionalChain([match, 'optionalAccess',
|
|
4315
|
+
_optionalChain([match, 'optionalAccess', _326 => _326.route]) ? null : pageBuiltInRouteLabel(pathname2)
|
|
4282
4316
|
)
|
|
4283
4317
|
};
|
|
4284
4318
|
};
|
|
@@ -4358,7 +4392,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4358
4392
|
}) : void 0;
|
|
4359
4393
|
let middlewareFailed = false;
|
|
4360
4394
|
try {
|
|
4361
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
4395
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _327 => _327.hasMiddleware, 'call', _328 => _328()])) {
|
|
4362
4396
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
4363
4397
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
4364
4398
|
farmApp.getServerRenderer(),
|
|
@@ -4371,7 +4405,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4371
4405
|
throw error;
|
|
4372
4406
|
});
|
|
4373
4407
|
if (handled) {
|
|
4374
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4408
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _329 => _329.isEnded, 'call', _330 => _330()])) {
|
|
4375
4409
|
const duration = Date.now() - startTime;
|
|
4376
4410
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4377
4411
|
}
|
|
@@ -4386,8 +4420,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4386
4420
|
res
|
|
4387
4421
|
);
|
|
4388
4422
|
}
|
|
4389
|
-
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess',
|
|
4390
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4423
|
+
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _331 => _331.isEnded, 'call', _332 => _332()])) {
|
|
4424
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _333 => _333.isEnded, 'call', _334 => _334()])) {
|
|
4391
4425
|
const duration = Date.now() - startTime;
|
|
4392
4426
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4393
4427
|
}
|
|
@@ -4406,8 +4440,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4406
4440
|
await pm.reportRuntimeRequestError(runtimeSession, error);
|
|
4407
4441
|
} else {
|
|
4408
4442
|
await pm.failRuntimeRequest(runtimeSession, error);
|
|
4409
|
-
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4410
|
-
_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4443
|
+
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _335 => _335.isEnded, 'call', _336 => _336()])) {
|
|
4444
|
+
_optionalChain([responseInterceptor, 'optionalAccess', _337 => _337.release, 'call', _338 => _338()]);
|
|
4411
4445
|
console.error("[FARM] Page error:", error);
|
|
4412
4446
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
4413
4447
|
return;
|
|
@@ -4424,7 +4458,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4424
4458
|
}
|
|
4425
4459
|
})
|
|
4426
4460
|
);
|
|
4427
|
-
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access',
|
|
4461
|
+
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _339 => _339.stack, 'access', _340 => _340.at, 'call', _341 => _341(-1), 'optionalAccess', _342 => _342.handle]);
|
|
4428
4462
|
if (farmOwnsDevCors && viteServer.config.server.cors === false) {
|
|
4429
4463
|
farmMiddlewares.use(createFarmDevViteCorsMiddleware());
|
|
4430
4464
|
}
|
|
@@ -4453,7 +4487,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4453
4487
|
});
|
|
4454
4488
|
}
|
|
4455
4489
|
if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
|
|
4456
|
-
const root = _optionalChain([farmApp, 'optionalAccess',
|
|
4490
|
+
const root = _optionalChain([farmApp, 'optionalAccess', _343 => _343.getConfig, 'call', _344 => _344(), 'access', _345 => _345.root]) || _optionalChain([server, 'optionalAccess', _346 => _346.config, 'access', _347 => _347.root]) || options.root;
|
|
4457
4491
|
return this.resolve(id, path6.join(root, "package.json"), {
|
|
4458
4492
|
...resolveOptions,
|
|
4459
4493
|
skipSelf: true
|
|
@@ -4481,7 +4515,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4481
4515
|
}
|
|
4482
4516
|
},
|
|
4483
4517
|
async load(id, loadOptions) {
|
|
4484
|
-
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess',
|
|
4518
|
+
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _348 => _348.ssr]) && !farmSetupContext.getStore()) {
|
|
4485
4519
|
await pendingClientSetup;
|
|
4486
4520
|
}
|
|
4487
4521
|
if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
|
|
@@ -4499,8 +4533,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4499
4533
|
if (imageModule) return imageModule;
|
|
4500
4534
|
}
|
|
4501
4535
|
if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4502
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess',
|
|
4503
|
-
const root = _optionalChain([server, 'optionalAccess',
|
|
4536
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _349 => _349.getConfig, 'call', _350 => _350(), 'access', _351 => _351.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4537
|
+
const root = _optionalChain([server, 'optionalAccess', _352 => _352.config, 'access', _353 => _353.root]) || options.root;
|
|
4504
4538
|
if (isClientEnvironment(this, loadOptions)) {
|
|
4505
4539
|
return generateProgrammaticClientRouteModuleForId(
|
|
4506
4540
|
id,
|
|
@@ -4516,21 +4550,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4516
4550
|
return FARM_DEV_CLIENT_BOOT_MODULE;
|
|
4517
4551
|
}
|
|
4518
4552
|
if (isFarmClientVirtualId(id)) {
|
|
4519
|
-
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
4520
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4521
|
-
const integrations = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4522
|
-
const root = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4523
|
-
const docs = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4553
|
+
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _354 => _354.getConfig, 'call', _355 => _355()]);
|
|
4554
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _356 => _356.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4555
|
+
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _357 => _357.integrations]) || options.integrations;
|
|
4556
|
+
const root = _optionalChain([resolvedConfig, 'optionalAccess', _358 => _358.root]) || _optionalChain([server, 'optionalAccess', _359 => _359.config, 'access', _360 => _360.root]) || process.cwd();
|
|
4557
|
+
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _361 => _361.docs]);
|
|
4524
4558
|
const adapterOwnsDocsRuntime = Boolean(
|
|
4525
|
-
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess',
|
|
4559
|
+
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _362 => _362.adapter, 'optionalAccess', _363 => _363.server]) && docs.adapter.react
|
|
4526
4560
|
);
|
|
4527
|
-
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4561
|
+
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _364 => _364.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
4528
4562
|
const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
|
|
4529
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4530
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4563
|
+
_optionalChain([docs, 'optionalAccess', _365 => _365.enabled]) ? loadFarmDocsDevRuntime() : null,
|
|
4564
|
+
_optionalChain([docs, 'optionalAccess', _366 => _366.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
|
|
4531
4565
|
devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
|
|
4532
4566
|
]);
|
|
4533
|
-
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess',
|
|
4567
|
+
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _367 => _367.isFarmDocsSearchEnabled, 'call', _368 => _368(docs)]), () => ( false));
|
|
4534
4568
|
const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
|
|
4535
4569
|
docsSearchEnabled,
|
|
4536
4570
|
docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
|
|
@@ -4538,10 +4572,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4538
4572
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4539
4573
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4540
4574
|
const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkJX5VOLAVcjs.getIntegrationProviders.call(void 0, integrations) : [];
|
|
4541
|
-
const isolatedHydrationMode =
|
|
4542
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4575
|
+
const isolatedHydrationMode = _chunkBE7AQXJBcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
4576
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _369 => _369.experimental, 'optionalAccess', _370 => _370.isolatedClientHydration]),
|
|
4543
4577
|
{
|
|
4544
|
-
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4578
|
+
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _371 => _371.experimental, 'optionalAccess', _372 => _372.serverComponents])) === "rsc",
|
|
4545
4579
|
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
|
|
4546
4580
|
}
|
|
4547
4581
|
);
|
|
@@ -4549,32 +4583,32 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4549
4583
|
integrationProviders,
|
|
4550
4584
|
[
|
|
4551
4585
|
..._chunkJX5VOLAVcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
4552
|
-
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess',
|
|
4586
|
+
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _373 => _373.getFarmDocsDocumentNavigationMatchers, 'call', _374 => _374(docs)]), () => ( []))
|
|
4553
4587
|
],
|
|
4554
4588
|
generatedDocsSearchRuntime,
|
|
4555
4589
|
`${generatedDevtoolsClientRuntime}
|
|
4556
4590
|
${generatedDevIndicatorsClientRuntime}`,
|
|
4557
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4591
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.plugins]) || [],
|
|
4558
4592
|
root,
|
|
4559
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4560
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4561
|
-
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess',
|
|
4593
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _376 => _376.srcDir]) || options.srcDir || "src",
|
|
4594
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _377 => _377.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
4595
|
+
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _378 => _378.adapter, 'optionalAccess', _379 => _379.react]) : void 0,
|
|
4562
4596
|
renderer,
|
|
4563
|
-
isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
4564
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4565
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4566
|
-
|
|
4567
|
-
|
|
4597
|
+
isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _380 => _380.getRouteManager, 'call', _381 => _381(), 'access', _382 => _382.getIsolatedClientBoundaryModules, 'call', _383 => _383(root)])))), 'optionalAccess', _384 => _384.size]) > 0,
|
|
4598
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.trailingSlash]), () => ( false)),
|
|
4599
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _386 => _386.basePath]), () => ( "/")),
|
|
4600
|
+
_chunkCBLRSZQLcjs.generateClientCachePersistenceCode.call(void 0,
|
|
4601
|
+
_chunkCBLRSZQLcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.cache]))
|
|
4568
4602
|
),
|
|
4569
4603
|
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
4570
|
-
_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4604
|
+
_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.experimental, 'optionalAccess', _389 => _389.serverComponents])) === "islands"
|
|
4571
4605
|
);
|
|
4572
4606
|
}
|
|
4573
4607
|
if (id === "/@farm/server") {
|
|
4574
4608
|
return generateServerCode();
|
|
4575
4609
|
}
|
|
4576
4610
|
if (id === "/@farm/manifest") {
|
|
4577
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
4611
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _390 => _390.getRouteManager, 'call', _391 => _391()]);
|
|
4578
4612
|
if (!routeManager) {
|
|
4579
4613
|
return `
|
|
4580
4614
|
export const getManifest = () => ({
|
|
@@ -4587,9 +4621,9 @@ export const getManifest = () => ({
|
|
|
4587
4621
|
`;
|
|
4588
4622
|
}
|
|
4589
4623
|
const manifest = routeManager.generateClientManifest(server.config.root);
|
|
4590
|
-
const globalStylesheetHref =
|
|
4624
|
+
const globalStylesheetHref = _chunkCBLRSZQLcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
4591
4625
|
server.config.root,
|
|
4592
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
4626
|
+
_optionalChain([farmApp, 'optionalAccess', _392 => _392.getConfig, 'call', _393 => _393(), 'access', _394 => _394.srcDir])
|
|
4593
4627
|
);
|
|
4594
4628
|
const fullManifest = {
|
|
4595
4629
|
clientEntry: "/@farm/client.js",
|
|
@@ -4615,11 +4649,11 @@ export const getManifest = () => ({
|
|
|
4615
4649
|
};
|
|
4616
4650
|
}
|
|
4617
4651
|
for (const layout of manifest.layouts) {
|
|
4618
|
-
const groupScope =
|
|
4652
|
+
const groupScope = _chunkC5AM2XDNcjs.getRouteGroupScope.call(void 0, layout.pattern);
|
|
4619
4653
|
fullManifest.layouts[layout.pattern] = {
|
|
4620
4654
|
modulePath: layout.modulePath,
|
|
4621
4655
|
pattern: layout.pattern,
|
|
4622
|
-
...groupScope ? { urlPattern:
|
|
4656
|
+
...groupScope ? { urlPattern: _chunkC5AM2XDNcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
|
|
4623
4657
|
shouldHydrate: layout.shouldHydrate,
|
|
4624
4658
|
islandStrategy: layout.islandStrategy,
|
|
4625
4659
|
// Islands mode: rebuilt from its server tree, so its module is never preloaded.
|
|
@@ -4645,59 +4679,62 @@ export const manifest = getManifest();
|
|
|
4645
4679
|
}
|
|
4646
4680
|
},
|
|
4647
4681
|
async transform(code, id, transformOptions) {
|
|
4648
|
-
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess',
|
|
4682
|
+
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _395 => _395.ssr]) && !farmSetupContext.getStore()) {
|
|
4649
4683
|
await pendingClientSetup;
|
|
4650
4684
|
}
|
|
4651
|
-
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess',
|
|
4652
|
-
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4685
|
+
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _396 => _396.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
4686
|
+
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _397 => _397.getConfig, 'call', _398 => _398()]), () => ( options));
|
|
4653
4687
|
let rewrotePackageImports = false;
|
|
4654
|
-
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access',
|
|
4688
|
+
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _399 => _399.experimental, 'optionalAccess', _400 => _400.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _401 => _401.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkBE7AQXJBcjs.hasUseClientDirective.call(void 0, code)) {
|
|
4655
4689
|
const file = id.split("?", 1)[0];
|
|
4656
|
-
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
4657
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
4690
|
+
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _402 => _402.config, 'access', _403 => _403.root]) || process.cwd();
|
|
4691
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _404 => _404.ssr]) === true) {
|
|
4658
4692
|
if (farmReactServerFiles.has(file)) {
|
|
4659
|
-
for (const child of
|
|
4693
|
+
for (const child of _chunkBE7AQXJBcjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
4660
4694
|
farmReactServerFiles.add(child);
|
|
4661
4695
|
}
|
|
4662
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
4696
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkBE7AQXJBcjs.getFarmClientReachableModules.call(void 0,
|
|
4663
4697
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
4664
4698
|
projectRoot
|
|
4665
4699
|
).has(path6.resolve(file));
|
|
4666
|
-
const reactServer = !serverModule ? null :
|
|
4700
|
+
const reactServer = !serverModule ? null : _chunkBE7AQXJBcjs.rewriteFarmReactServerImports.call(void 0, {
|
|
4667
4701
|
code,
|
|
4668
4702
|
file,
|
|
4669
|
-
reference: (specifier, exportName) =>
|
|
4703
|
+
reference: (specifier, exportName) => _chunkBE7AQXJBcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
4670
4704
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
4671
4705
|
});
|
|
4672
4706
|
if (reactServer !== null) {
|
|
4673
4707
|
code = reactServer;
|
|
4674
4708
|
rewrotePackageImports = true;
|
|
4675
4709
|
}
|
|
4676
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
4710
|
+
const internal = farmReactServerFiles.has(file) ? _chunkBE7AQXJBcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
4677
4711
|
code,
|
|
4678
4712
|
file,
|
|
4679
|
-
reference: (clientFile) =>
|
|
4713
|
+
reference: (clientFile) => _chunkBE7AQXJBcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
4680
4714
|
}) : null;
|
|
4681
4715
|
if (internal !== null) {
|
|
4682
4716
|
code = internal;
|
|
4683
4717
|
rewrotePackageImports = true;
|
|
4684
4718
|
}
|
|
4685
4719
|
}
|
|
4686
|
-
const
|
|
4687
|
-
code,
|
|
4720
|
+
const rewritePackageImports = (source2) => _chunkBE7AQXJBcjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
4721
|
+
code: source2,
|
|
4688
4722
|
file,
|
|
4689
4723
|
root: projectRoot,
|
|
4690
|
-
isClientPackage: (specifier) =>
|
|
4724
|
+
isClientPackage: (specifier) => _chunkBE7AQXJBcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
4691
4725
|
});
|
|
4726
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _405 => _405.getRouteManager, 'call', _406 => _406()]);
|
|
4727
|
+
const source = code;
|
|
4728
|
+
const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
|
|
4692
4729
|
if (referenced !== null) {
|
|
4693
4730
|
code = referenced;
|
|
4694
4731
|
rewrotePackageImports = true;
|
|
4695
4732
|
}
|
|
4696
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
4733
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _407 => _407.ssr]) === true) {
|
|
4697
4734
|
const cached = rewriteFarmReactCacheImport(
|
|
4698
4735
|
code,
|
|
4699
4736
|
file,
|
|
4700
|
-
_optionalChain([runtimeModule, 'optionalCall',
|
|
4737
|
+
_optionalChain([runtimeModule, 'optionalCall', _408 => _408(FARM_REACT_CACHE_MODULE)])
|
|
4701
4738
|
);
|
|
4702
4739
|
if (cached !== null) {
|
|
4703
4740
|
code = cached;
|
|
@@ -4707,44 +4744,44 @@ export const manifest = getManifest();
|
|
|
4707
4744
|
}
|
|
4708
4745
|
if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
4709
4746
|
const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
|
|
4710
|
-
environment: _optionalChain([transformOptions, 'optionalAccess',
|
|
4747
|
+
environment: _optionalChain([transformOptions, 'optionalAccess', _409 => _409.ssr]) === true ? "rsc" : "client"
|
|
4711
4748
|
});
|
|
4712
4749
|
if (serverFns) {
|
|
4713
4750
|
if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
|
|
4714
4751
|
code = serverFns.code;
|
|
4715
4752
|
}
|
|
4716
4753
|
}
|
|
4717
|
-
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access',
|
|
4754
|
+
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _410 => _410.experimental, 'optionalAccess', _411 => _411.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
4718
4755
|
const file = id.split("?", 1)[0];
|
|
4719
4756
|
const actionModule = transformFarmFormActionModule({
|
|
4720
4757
|
code,
|
|
4721
4758
|
id,
|
|
4722
|
-
root: actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
4723
|
-
ssr: _optionalChain([transformOptions, 'optionalAccess',
|
|
4759
|
+
root: actionConfig.root || _optionalChain([server, 'optionalAccess', _412 => _412.config, 'access', _413 => _413.root]) || process.cwd(),
|
|
4760
|
+
ssr: _optionalChain([transformOptions, 'optionalAccess', _414 => _414.ssr]) === true,
|
|
4724
4761
|
// Parsed by file type: page components are TSX.
|
|
4725
4762
|
parse: (source) => _vite.parseSync.call(void 0, file, source).program,
|
|
4726
4763
|
runtimeModule
|
|
4727
4764
|
});
|
|
4728
4765
|
if (actionModule) return { code: actionModule, map: null };
|
|
4729
4766
|
}
|
|
4730
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
4731
|
-
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess',
|
|
4732
|
-
if (
|
|
4733
|
-
const redacted =
|
|
4767
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr])) {
|
|
4768
|
+
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417(), 'optionalAccess', _418 => _418.docs]));
|
|
4769
|
+
if (_chunkCBLRSZQLcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
4770
|
+
const redacted = _chunkCBLRSZQLcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
4734
4771
|
if (redacted !== null) return { code: redacted, map: null };
|
|
4735
4772
|
}
|
|
4736
4773
|
}
|
|
4737
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
4738
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4739
|
-
if ((_optionalChain([currentConfig, 'access',
|
|
4774
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr])) {
|
|
4775
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _420 => _420.getConfig, 'call', _421 => _421()]), () => ( options));
|
|
4776
|
+
if ((_optionalChain([currentConfig, 'access', _422 => _422.experimental, 'optionalAccess', _423 => _423.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
4740
4777
|
const violation = findClientServerFnViolation(code, id);
|
|
4741
4778
|
if (violation) {
|
|
4742
4779
|
this.error(formatServerFnBoundaryError(violation, id));
|
|
4743
4780
|
}
|
|
4744
4781
|
}
|
|
4745
4782
|
}
|
|
4746
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
4747
|
-
warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4783
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _424 => _424.ssr]) && shouldInspectClientBoundary(id, code)) {
|
|
4784
|
+
warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _425 => _425.getConfig, 'call', _426 => _426()]), () => ( options)));
|
|
4748
4785
|
}
|
|
4749
4786
|
if (typeof imageImports.transform === "function") {
|
|
4750
4787
|
const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
|
|
@@ -4759,13 +4796,13 @@ export const manifest = getManifest();
|
|
|
4759
4796
|
id,
|
|
4760
4797
|
transformOptions
|
|
4761
4798
|
);
|
|
4762
|
-
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess',
|
|
4799
|
+
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _427 => _427.code, 'optionalAccess', _428 => _428.toString, 'call', _429 => _429()]);
|
|
4763
4800
|
if (fontCode) {
|
|
4764
4801
|
transformedCode = fontCode;
|
|
4765
4802
|
transformed = true;
|
|
4766
4803
|
}
|
|
4767
4804
|
}
|
|
4768
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
4805
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr]) && server) {
|
|
4769
4806
|
const rewrittenImports = rewriteEarlySsrRelativeImports({
|
|
4770
4807
|
code: transformedCode,
|
|
4771
4808
|
id,
|
|
@@ -4777,26 +4814,26 @@ export const manifest = getManifest();
|
|
|
4777
4814
|
transformed = true;
|
|
4778
4815
|
}
|
|
4779
4816
|
}
|
|
4780
|
-
if (
|
|
4817
|
+
if (_chunkBE7AQXJBcjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
4781
4818
|
const clientBoundarySource = transformedCode;
|
|
4782
4819
|
const moduleInfo = this.getModuleInfo(id);
|
|
4783
4820
|
if (moduleInfo) {
|
|
4784
4821
|
moduleInfo.isClientComponent = true;
|
|
4785
4822
|
}
|
|
4786
|
-
transformedCode =
|
|
4823
|
+
transformedCode = _chunkBE7AQXJBcjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
4787
4824
|
transformed = true;
|
|
4788
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4825
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _431 => _431.getConfig, 'call', _432 => _432()]), () => ( options));
|
|
4789
4826
|
let isolatedModuleReference = null;
|
|
4790
|
-
const root = currentConfig.root || _optionalChain([server, 'optionalAccess',
|
|
4827
|
+
const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _433 => _433.config, 'access', _434 => _434.root]) || process.cwd();
|
|
4791
4828
|
const cleanId = id.split("?", 1)[0];
|
|
4792
|
-
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
4793
|
-
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess',
|
|
4794
|
-
if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (
|
|
4795
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
4829
|
+
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _435 => _435.getRouteManager, 'call', _436 => _436(), 'access', _437 => _437.getIsolatedClientBoundaryModules, 'call', _438 => _438(root)])));
|
|
4830
|
+
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _439 => _439.has, 'call', _440 => _440(path6.resolve(cleanId))]) === true;
|
|
4831
|
+
if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkBE7AQXJBcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
4832
|
+
cleanId.replace(/\\/g, "/").includes(_chunkBE7AQXJBcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
4796
4833
|
isolatedModuleReference = _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, cleanId, root);
|
|
4797
|
-
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access',
|
|
4798
|
-
const explicitStrategy =
|
|
4799
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
4834
|
+
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _441 => _441.experimental, 'optionalAccess', _442 => _442.serverComponents])) === "islands";
|
|
4835
|
+
const explicitStrategy = _chunkBE7AQXJBcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
4836
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkCBLRSZQLcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
4800
4837
|
if (inference) {
|
|
4801
4838
|
for (const file of inference.files) {
|
|
4802
4839
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -4809,8 +4846,8 @@ export const manifest = getManifest();
|
|
|
4809
4846
|
islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
|
|
4810
4847
|
parse: (source) => this.parse(source),
|
|
4811
4848
|
slots: islandsMode,
|
|
4812
|
-
browser: _optionalChain([transformOptions, 'optionalAccess',
|
|
4813
|
-
inferredInteraction: _optionalChain([inference, 'optionalAccess',
|
|
4849
|
+
browser: _optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) !== true,
|
|
4850
|
+
inferredInteraction: _optionalChain([inference, 'optionalAccess', _444 => _444.strategy]) === "interaction",
|
|
4814
4851
|
runtimeModule
|
|
4815
4852
|
});
|
|
4816
4853
|
if (!transformedBoundary) {
|
|
@@ -4841,7 +4878,7 @@ export const manifest = getManifest();
|
|
|
4841
4878
|
);
|
|
4842
4879
|
return;
|
|
4843
4880
|
}` : "";
|
|
4844
|
-
const hmrCode = _optionalChain([transformOptions, 'optionalAccess',
|
|
4881
|
+
const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _445 => _445.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
|
|
4845
4882
|
if (import.meta.hot) {
|
|
4846
4883
|
import.meta.hot.accept((newModule) => {
|
|
4847
4884
|
${isolatedHmrUpdate}
|
|
@@ -4897,14 +4934,14 @@ if (import.meta.hot) {
|
|
|
4897
4934
|
}
|
|
4898
4935
|
_chunkQMNWKQL4cjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
|
|
4899
4936
|
_chunkQMNWKQL4cjs.logger.info("Pre-rendering SSG pages...");
|
|
4900
|
-
const outDir = path6.join(_optionalChain([server, 'optionalAccess',
|
|
4937
|
+
const outDir = path6.join(_optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd(), options.outDir || "dist");
|
|
4901
4938
|
const clientDir = path6.join(outDir, "client");
|
|
4902
4939
|
for (const page of ssgPages) {
|
|
4903
4940
|
try {
|
|
4904
4941
|
const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
|
|
4905
4942
|
await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
|
|
4906
4943
|
const mod = await routeManager.loadRouteModule(page.filePath);
|
|
4907
|
-
if (!_optionalChain([mod, 'optionalAccess',
|
|
4944
|
+
if (!_optionalChain([mod, 'optionalAccess', _448 => _448.default])) return;
|
|
4908
4945
|
const { layouts } = routeManager.matchRoute(page.urlPath);
|
|
4909
4946
|
const layoutModules = await Promise.all(
|
|
4910
4947
|
layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
|
|
@@ -4933,10 +4970,10 @@ if (import.meta.hot) {
|
|
|
4933
4970
|
);
|
|
4934
4971
|
}
|
|
4935
4972
|
const html = renderToString(pageElement);
|
|
4936
|
-
const i18nSnapshot =
|
|
4973
|
+
const i18nSnapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
4937
4974
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
4938
4975
|
const fullHtml = `<!DOCTYPE html>
|
|
4939
|
-
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
4976
|
+
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _449 => _449.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
4940
4977
|
<head>
|
|
4941
4978
|
<meta charset="utf-8">
|
|
4942
4979
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -4978,9 +5015,15 @@ if (import.meta.hot) {
|
|
|
4978
5015
|
_chunkQMNWKQL4cjs.logger.error(`SSG build failed: ${error}`);
|
|
4979
5016
|
}
|
|
4980
5017
|
},
|
|
4981
|
-
watchChange() {
|
|
4982
|
-
|
|
4983
|
-
|
|
5018
|
+
watchChange(id, change) {
|
|
5019
|
+
const watched = _chunkQMNWKQL4cjs.toPosixPath.call(void 0, id);
|
|
5020
|
+
if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
|
|
5021
|
+
_optionalChain([farmApp, 'optionalAccess', _450 => _450.getRouteManager, 'call', _451 => _451(), 'access', _452 => _452.noteSourceChange, 'call', _453 => _453(id, change.event)]);
|
|
5022
|
+
}
|
|
5023
|
+
_chunkBE7AQXJBcjs.invalidateFarmClientReachableModules.call(void 0, );
|
|
5024
|
+
_chunkBE7AQXJBcjs.invalidateFarmClientOnlyScan.call(void 0, );
|
|
5025
|
+
_chunkCBLRSZQLcjs.invalidateFarmRouteRootInferences.call(void 0, );
|
|
5026
|
+
_chunkBE7AQXJBcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
4984
5027
|
},
|
|
4985
5028
|
async handleHotUpdate(ctx) {
|
|
4986
5029
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5005,13 +5048,13 @@ if (import.meta.hot) {
|
|
|
5005
5048
|
server2.moduleGraph.invalidateModule(mod);
|
|
5006
5049
|
}
|
|
5007
5050
|
}
|
|
5008
|
-
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
5051
|
+
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _454 => _454.getConfig, 'call', _455 => _455()]);
|
|
5009
5052
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
5010
5053
|
if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
5011
5054
|
(appDir) => normalizedFile.startsWith(`${_chunkQMNWKQL4cjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
5012
5055
|
)) {
|
|
5013
5056
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
5014
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5057
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _456 => _456(`updated ${file}`)]);
|
|
5015
5058
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5016
5059
|
return [];
|
|
5017
5060
|
}
|
|
@@ -5021,7 +5064,7 @@ if (import.meta.hot) {
|
|
|
5021
5064
|
for (const mod of modules) {
|
|
5022
5065
|
server2.moduleGraph.invalidateModule(mod);
|
|
5023
5066
|
}
|
|
5024
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5067
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _457 => _457(`updated ${file}`)]);
|
|
5025
5068
|
server2.ws.send({
|
|
5026
5069
|
type: "full-reload",
|
|
5027
5070
|
path: "*"
|
|
@@ -5034,7 +5077,7 @@ if (import.meta.hot) {
|
|
|
5034
5077
|
for (const mod of modules) {
|
|
5035
5078
|
server2.moduleGraph.invalidateModule(mod);
|
|
5036
5079
|
}
|
|
5037
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5080
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _458 => _458(`updated ${file}`)]);
|
|
5038
5081
|
server2.ws.send({
|
|
5039
5082
|
type: "full-reload",
|
|
5040
5083
|
path: "*"
|
|
@@ -5042,16 +5085,19 @@ if (import.meta.hot) {
|
|
|
5042
5085
|
return [];
|
|
5043
5086
|
}
|
|
5044
5087
|
if (apiRouteManager && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
|
|
5045
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5088
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _459 => _459(`updated ${file}`)]);
|
|
5046
5089
|
}
|
|
5047
|
-
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5048
|
-
const planRouteManager = _optionalChain([farmApp, 'optionalAccess',
|
|
5049
|
-
const isHydrationPlanSource =
|
|
5050
|
-
const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5090
|
+
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _460 => _460.experimental, 'optionalAccess', _461 => _461.isolatedClientHydration]);
|
|
5091
|
+
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _462 => _462.getRouteManager, 'call', _463 => _463()]);
|
|
5092
|
+
const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
|
|
5093
|
+
const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _464 => _464.renderer])) && planRouteManager !== void 0;
|
|
5051
5094
|
let clientPlanCurrent = false;
|
|
5052
5095
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
5053
5096
|
const routeManager = planRouteManager;
|
|
5054
|
-
if (routeManager) {
|
|
5097
|
+
if (_optionalChain([routeManager, 'optionalAccess', _465 => _465.isEditPlanNeutral, 'call', _466 => _466(file)])) {
|
|
5098
|
+
clientPlanCurrent = true;
|
|
5099
|
+
} else if (routeManager) {
|
|
5100
|
+
routeManager.noteSourceChange(file, "update");
|
|
5055
5101
|
try {
|
|
5056
5102
|
const previousPlan = JSON.stringify(
|
|
5057
5103
|
routeManager.generateClientManifest(currentFarmConfig.root)
|
|
@@ -5109,7 +5155,7 @@ if (import.meta.hot) {
|
|
|
5109
5155
|
}
|
|
5110
5156
|
return [];
|
|
5111
5157
|
}
|
|
5112
|
-
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess',
|
|
5158
|
+
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _467 => _467.getRouteManager, 'call', _468 => _468(), 'access', _469 => _469.invalidateClientManifest, 'call', _470 => _470()]);
|
|
5113
5159
|
const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
|
|
5114
5160
|
if (manifestModule) {
|
|
5115
5161
|
server2.moduleGraph.invalidateModule(manifestModule);
|
|
@@ -5127,6 +5173,11 @@ if (import.meta.hot) {
|
|
|
5127
5173
|
return [];
|
|
5128
5174
|
}
|
|
5129
5175
|
}
|
|
5176
|
+
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _471 => _471.environments, 'access', _472 => _472.client, 'optionalAccess', _473 => _473.moduleGraph, 'access', _474 => _474.getModulesByFile, 'call', _475 => _475(normalizedFile), 'optionalAccess', _476 => _476.size]) && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
|
|
5177
|
+
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5178
|
+
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5179
|
+
return [];
|
|
5180
|
+
}
|
|
5130
5181
|
return modules;
|
|
5131
5182
|
}
|
|
5132
5183
|
};
|
|
@@ -5220,7 +5271,7 @@ function createPageDataMiddlewareResponse(res) {
|
|
|
5220
5271
|
return (...args) => {
|
|
5221
5272
|
if (captures(target.statusCode, target.getHeader("location"))) {
|
|
5222
5273
|
const callback = args.find((arg) => typeof arg === "function");
|
|
5223
|
-
_optionalChain([callback, 'optionalCall',
|
|
5274
|
+
_optionalChain([callback, 'optionalCall', _477 => _477()]);
|
|
5224
5275
|
return property === "write" ? true : response;
|
|
5225
5276
|
}
|
|
5226
5277
|
return target[property](...args);
|
|
@@ -5284,12 +5335,12 @@ function isFarmClientVirtualId(id) {
|
|
|
5284
5335
|
}
|
|
5285
5336
|
function isClientEnvironment(context, loadOptions) {
|
|
5286
5337
|
const environment = context.environment;
|
|
5287
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5288
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5289
|
-
return _optionalChain([loadOptions, 'optionalAccess',
|
|
5338
|
+
if (_optionalChain([environment, 'optionalAccess', _478 => _478.config, 'optionalAccess', _479 => _479.consumer])) return environment.config.consumer === "client";
|
|
5339
|
+
if (_optionalChain([environment, 'optionalAccess', _480 => _480.name])) return environment.name === "client";
|
|
5340
|
+
return _optionalChain([loadOptions, 'optionalAccess', _481 => _481.ssr]) !== true;
|
|
5290
5341
|
}
|
|
5291
5342
|
function invalidateProgrammaticClientRouteModules(server) {
|
|
5292
|
-
const graph = _optionalChain([server, 'access',
|
|
5343
|
+
const graph = _optionalChain([server, 'access', _482 => _482.environments, 'optionalAccess', _483 => _483.client, 'optionalAccess', _484 => _484.moduleGraph]);
|
|
5293
5344
|
if (!graph) return;
|
|
5294
5345
|
for (const [id, module] of graph.idToModuleMap) {
|
|
5295
5346
|
if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
|
|
@@ -5299,19 +5350,19 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5299
5350
|
const parsed = _chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5300
5351
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5301
5352
|
watchFile(routesFile);
|
|
5302
|
-
return
|
|
5353
|
+
return _chunkBE7AQXJBcjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5303
5354
|
kind: parsed.kind,
|
|
5304
5355
|
routePath: parsed.routePath,
|
|
5305
5356
|
routesFile,
|
|
5306
|
-
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess',
|
|
5307
|
-
|
|
5357
|
+
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _485 => _485.routes, 'access', _486 => _486.get, 'call', _487 => _487(
|
|
5358
|
+
_chunkBE7AQXJBcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5308
5359
|
)]),
|
|
5309
5360
|
rendererServer: renderer.server,
|
|
5310
5361
|
toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
|
|
5311
5362
|
});
|
|
5312
5363
|
}
|
|
5313
5364
|
function resolveRealModuleFile(filePath, root) {
|
|
5314
|
-
const resolved = _nullishCoalesce(
|
|
5365
|
+
const resolved = _nullishCoalesce(_chunkBE7AQXJBcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5315
5366
|
try {
|
|
5316
5367
|
return _chunkQMNWKQL4cjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5317
5368
|
} catch (e28) {
|
|
@@ -5625,12 +5676,12 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
5625
5676
|
}
|
|
5626
5677
|
const schemas = routeModule.__farmRouteSchemas;
|
|
5627
5678
|
const params = parseRouteModuleSchema(
|
|
5628
|
-
_optionalChain([schemas, 'optionalAccess',
|
|
5679
|
+
_optionalChain([schemas, 'optionalAccess', _488 => _488.params]),
|
|
5629
5680
|
input.props.params,
|
|
5630
5681
|
"params",
|
|
5631
5682
|
input.routePath
|
|
5632
5683
|
);
|
|
5633
|
-
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess',
|
|
5684
|
+
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _489 => _489.search]), input.search, "search", input.routePath);
|
|
5634
5685
|
return {
|
|
5635
5686
|
...input.props,
|
|
5636
5687
|
params,
|
|
@@ -5650,7 +5701,7 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
5650
5701
|
}
|
|
5651
5702
|
}
|
|
5652
5703
|
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunk67MZTLTFcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
5653
|
-
const providerClientCode =
|
|
5704
|
+
const providerClientCode = _chunkCBLRSZQLcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
5654
5705
|
integrationProviders,
|
|
5655
5706
|
root,
|
|
5656
5707
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -5704,7 +5755,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
5704
5755
|
return null;
|
|
5705
5756
|
}
|
|
5706
5757
|
}
|
|
5707
|
-
${islandValues ? `${
|
|
5758
|
+
${islandValues ? `${_chunkCBLRSZQLcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
5708
5759
|
let farmLastRouteState = null;
|
|
5709
5760
|
|
|
5710
5761
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -6515,7 +6566,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
6515
6566
|
return loadedLayouts;
|
|
6516
6567
|
}
|
|
6517
6568
|
|
|
6518
|
-
${
|
|
6569
|
+
${_chunkCBLRSZQLcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
6519
6570
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
6520
6571
|
let wrapped = element;
|
|
6521
6572
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -6800,7 +6851,7 @@ function readActiveLayoutPatterns() {
|
|
|
6800
6851
|
.filter(Boolean);
|
|
6801
6852
|
}
|
|
6802
6853
|
|
|
6803
|
-
${
|
|
6854
|
+
${_chunkCBLRSZQLcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
6804
6855
|
|
|
6805
6856
|
function activateFragmentScripts(root) {
|
|
6806
6857
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -6859,7 +6910,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
6859
6910
|
return shell.innerHTML;
|
|
6860
6911
|
}
|
|
6861
6912
|
|
|
6862
|
-
${islandValues ?
|
|
6913
|
+
${islandValues ? _chunkCBLRSZQLcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
6863
6914
|
container,
|
|
6864
6915
|
fragment,
|
|
6865
6916
|
currentPatterns,
|
|
@@ -6932,7 +6983,7 @@ ${islandValues ? `
|
|
|
6932
6983
|
return nextTarget;
|
|
6933
6984
|
}
|
|
6934
6985
|
|
|
6935
|
-
${islandValues ? `${
|
|
6986
|
+
${islandValues ? `${_chunkCBLRSZQLcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
6936
6987
|
|
|
6937
6988
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
6938
6989
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -7629,7 +7680,7 @@ function generateClientManifest(bundle) {
|
|
|
7629
7680
|
async function defineConfig(config = {}) {
|
|
7630
7681
|
const tailwindVitePlugin = await _chunkDMXMIE2Ccjs.loadTailwindVitePlugin.call(void 0, );
|
|
7631
7682
|
const appRoot = path6.resolve(config.root || process.cwd());
|
|
7632
|
-
if (_optionalChain([config, 'access',
|
|
7683
|
+
if (_optionalChain([config, 'access', _490 => _490.extends, 'optionalAccess', _491 => _491.length])) {
|
|
7633
7684
|
const { config: layeredConfig } = await import("./layers-7P4RLKVX.cjs").then(
|
|
7634
7685
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
7635
7686
|
root: appRoot,
|
|
@@ -7639,7 +7690,7 @@ async function defineConfig(config = {}) {
|
|
|
7639
7690
|
config = layeredConfig;
|
|
7640
7691
|
}
|
|
7641
7692
|
config.renderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
7642
|
-
config.images =
|
|
7693
|
+
config.images = _chunkCBLRSZQLcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
7643
7694
|
const rendererVitePlugins = await _chunk67MZTLTFcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
7644
7695
|
ssr: true
|
|
7645
7696
|
});
|
|
@@ -7731,13 +7782,13 @@ async function defineConfig(config = {}) {
|
|
|
7731
7782
|
if (!serverStarted) {
|
|
7732
7783
|
serverStarted = true;
|
|
7733
7784
|
const elapsed = Date.now() - startTime;
|
|
7734
|
-
const address = _optionalChain([server, 'access',
|
|
7785
|
+
const address = _optionalChain([server, 'access', _492 => _492.httpServer, 'optionalAccess', _493 => _493.address, 'call', _494 => _494()]);
|
|
7735
7786
|
const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
|
|
7736
7787
|
const hostConfig = server.config.server.host;
|
|
7737
7788
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
7738
7789
|
console.log("");
|
|
7739
7790
|
console.log(
|
|
7740
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
7791
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkZDZUFD67cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
7741
7792
|
);
|
|
7742
7793
|
console.log("");
|
|
7743
7794
|
console.log(
|
|
@@ -7771,7 +7822,7 @@ async function defineConfig(config = {}) {
|
|
|
7771
7822
|
plugins: [
|
|
7772
7823
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
7773
7824
|
_chunk3QM74STYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
7774
|
-
|
|
7825
|
+
_chunkCBLRSZQLcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
7775
7826
|
tailwindVitePlugin,
|
|
7776
7827
|
...rendererVitePlugins,
|
|
7777
7828
|
...reactRefreshPlugins,
|
|
@@ -7779,14 +7830,14 @@ async function defineConfig(config = {}) {
|
|
|
7779
7830
|
farmI18nClientBridgePlugin(),
|
|
7780
7831
|
farmServerOnlyEntriesPlugin(),
|
|
7781
7832
|
farmPlugin(config),
|
|
7782
|
-
|
|
7833
|
+
_chunkBE7AQXJBcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
7783
7834
|
farmBrandingPlugin
|
|
7784
7835
|
],
|
|
7785
7836
|
customLogger: farmLogger,
|
|
7786
7837
|
clearScreen: false,
|
|
7787
7838
|
optimizeDeps: {
|
|
7788
|
-
...
|
|
7789
|
-
|
|
7839
|
+
..._chunkCBLRSZQLcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
7840
|
+
_chunkCBLRSZQLcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
7790
7841
|
appRoot,
|
|
7791
7842
|
_chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
7792
7843
|
),
|
|
@@ -7829,7 +7880,7 @@ async function defineConfig(config = {}) {
|
|
|
7829
7880
|
// Stub out problematic server-only modules during dev mode
|
|
7830
7881
|
alias: {
|
|
7831
7882
|
..._chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
7832
|
-
...
|
|
7883
|
+
..._chunkCBLRSZQLcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
7833
7884
|
// Nitro internals that should not be resolved in browser
|
|
7834
7885
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
7835
7886
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|