@farm.js/core 0.1.75 → 0.1.77
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.d-Djvao5eV.d.ts → agent-mcp.d-B1h3RznZ.d.ts} +1 -1
- package/dist/{agent-mcp.d-wA13pwmS.d.mts → agent-mcp.d-WFQotg8M.d.mts} +1 -1
- package/dist/agent-runtime.cjs +2 -2
- package/dist/agent-runtime.d.mts +7 -5
- package/dist/agent-runtime.d.ts +7 -5
- package/dist/agent-runtime.mjs +1 -1
- package/dist/{analyzer-LJHMFCDW.mjs → analyzer-64YS2OXQ.mjs} +2 -2
- package/dist/analyzer-HTNXLX6N.cjs +16 -0
- package/dist/api/node.d.mts +9 -7
- package/dist/api/node.d.ts +9 -7
- package/dist/api/route-manager.d.mts +9 -7
- package/dist/api/route-manager.d.ts +9 -7
- package/dist/api/runtime.d.mts +8 -6
- package/dist/api/runtime.d.ts +8 -6
- package/dist/api.d.mts +10 -8
- package/dist/api.d.ts +10 -8
- package/dist/{app-manifest.d-DIuqSi9k.d.mts → app-manifest.d-EZEYG-tD.d.mts} +1 -1
- package/dist/{app-manifest.d-BukcP_EV.d.ts → app-manifest.d-Ktsqsuk9.d.ts} +1 -1
- package/dist/app-markdown.d.mts +8 -6
- package/dist/app-markdown.d.ts +8 -6
- package/dist/{app.d-BQqmM6Gy.d.ts → app.d-CSh3y8w8.d.ts} +5 -4
- package/dist/{app.d-YVuFb10p.d.mts → app.d-DTkqYcIr.d.mts} +5 -4
- package/dist/{chunk-CL2ONP73.cjs → chunk-2PE5STAR.cjs} +36 -27
- package/dist/{chunk-HV2WZFUW.mjs → chunk-2QPTZMGK.mjs} +1 -1
- package/dist/{chunk-E7VF3LQ5.mjs → chunk-4STJ6LGR.mjs} +13 -1
- package/dist/{chunk-LQBV2Y37.mjs → chunk-65XXHTVJ.mjs} +38 -2
- package/dist/{chunk-XGDI4OUB.cjs → chunk-6ZFGWB75.cjs} +13 -1
- package/dist/{chunk-IDOUCM2X.mjs → chunk-7EXFAJST.mjs} +57 -44
- package/dist/{chunk-HVJ7IACB.cjs → chunk-7SAGHWWU.cjs} +2 -2
- package/dist/{chunk-GNY7BO7R.mjs → chunk-BTHNOAOF.mjs} +2 -2
- package/dist/{chunk-TJVUTGED.mjs → chunk-D2RLADWN.mjs} +285 -93
- package/dist/chunk-DS2KZ5BT.mjs +16 -0
- package/dist/{chunk-WHCNJVYU.cjs → chunk-DSRWQ4SJ.cjs} +3 -3
- package/dist/{chunk-ZPCZWEU3.cjs → chunk-FCHEO3LG.cjs} +2 -2
- package/dist/{chunk-75XSZIRE.mjs → chunk-FD6BMUA3.mjs} +35 -26
- package/dist/{chunk-4T2RB4JA.mjs → chunk-FNVGK72M.mjs} +5 -5
- package/dist/{chunk-TFEODQLG.mjs → chunk-FPGSIOWS.mjs} +2 -2
- package/dist/{chunk-4BS3HSY7.cjs → chunk-FTQUNBRN.cjs} +2 -2
- package/dist/{chunk-ZV76IQG7.cjs → chunk-FVVGEGQ2.cjs} +2 -2
- package/dist/{chunk-7564NP5Z.cjs → chunk-GC2BSXQS.cjs} +39 -3
- package/dist/{chunk-HT2SZKXG.mjs → chunk-H76C5AOU.mjs} +12 -0
- package/dist/{chunk-OFIFRB62.mjs → chunk-IHMSLS2O.mjs} +36 -20
- package/dist/{chunk-BUC3FDYC.cjs → chunk-IIVZTGGP.cjs} +2 -2
- package/dist/{chunk-6MATGOEF.mjs → chunk-IXC6WDMT.mjs} +1 -1
- package/dist/{chunk-KPYQ32BA.cjs → chunk-JD42G6BN.cjs} +2 -2
- package/dist/{chunk-WJ5CCQBM.cjs → chunk-LTDMJD2F.cjs} +4 -4
- package/dist/{chunk-XX6ZA2IO.cjs → chunk-MQW4LHJR.cjs} +1 -1
- package/dist/{chunk-BNTRXJL4.cjs → chunk-NQZWLIPT.cjs} +3 -3
- package/dist/{chunk-QGYHE6VJ.mjs → chunk-NTHAZLVS.mjs} +28 -27
- package/dist/{chunk-OCLCA3X3.mjs → chunk-OCKQ3YOH.mjs} +1 -1
- package/dist/{chunk-PBQGIA27.cjs → chunk-OQZF6H6G.cjs} +4 -4
- package/dist/{chunk-YSTKSZD2.mjs → chunk-ORWXJDUN.mjs} +1 -1
- package/dist/{chunk-JNZDTE75.cjs → chunk-PMKUTZGR.cjs} +8 -8
- package/dist/{chunk-4ZSZI6XL.cjs → chunk-PUEPDMWY.cjs} +16 -16
- package/dist/{chunk-MTBDJ326.cjs → chunk-QMR2TUVZ.cjs} +13 -1
- package/dist/{chunk-A5F55ZFA.mjs → chunk-QODXWUGQ.mjs} +2 -2
- package/dist/chunk-RFXEQYPH.cjs +723 -0
- package/dist/{chunk-IK33N2AN.cjs → chunk-SIYELCIX.cjs} +158 -142
- package/dist/{chunk-MFU7SXAB.mjs → chunk-SL2BSPDJ.mjs} +1 -1
- package/dist/{chunk-H7QY7ZE4.mjs → chunk-SMYDCZBW.mjs} +1 -1
- package/dist/{chunk-GLF44JKY.mjs → chunk-TQOYIPMQ.mjs} +1 -1
- package/dist/{chunk-IVBDRAOR.cjs → chunk-UYACD4SH.cjs} +1 -1
- package/dist/{chunk-B4CWYGCG.mjs → chunk-WHNNDFCJ.mjs} +1 -1
- package/dist/{chunk-4MU4QCX4.mjs → chunk-WXMR3OHY.mjs} +1 -1
- package/dist/{chunk-YL7BKHYE.cjs → chunk-WZVESREI.cjs} +291 -278
- package/dist/chunk-XRRHPBG2.cjs +16 -0
- package/dist/{chunk-NPGXX7HN.cjs → chunk-YROK6CJC.cjs} +7 -7
- package/dist/{chunk-OZARLCYQ.cjs → chunk-YRQ44JTF.cjs} +179 -178
- package/dist/{chunk-2NQ3S2SJ.mjs → chunk-YTGNMKRA.mjs} +1 -1
- package/dist/{chunk-YCNKS6SD.mjs → chunk-ZBE5EHVJ.mjs} +4 -4
- package/dist/cli-runtime.d-DljFfr8T.d.ts +537 -0
- package/dist/cli-runtime.d-HSkdfvoq.d.mts +537 -0
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-component.d-BeqVuqy2.d.mts → client-component.d-B-1dIlsw.d.mts} +2 -137
- package/dist/{client-component.d-CZ1NpHAY.d.ts → client-component.d-_otXB__v.d.ts} +2 -137
- package/dist/{client-plugins.d-ChceYO9t.d.mts → client-plugins.d-BmBzvfSP.d.mts} +4 -4
- package/dist/{client-plugins.d-D9kWC0QB.d.ts → client-plugins.d-MjxlvbCK.d.ts} +4 -4
- package/dist/client-plugins.d.mts +7 -5
- package/dist/client-plugins.d.ts +7 -5
- package/dist/client.d.mts +12 -10
- package/dist/client.d.ts +12 -10
- package/dist/config.d.mts +7 -5
- package/dist/config.d.ts +7 -5
- package/dist/desktop.d.mts +8 -6
- package/dist/desktop.d.ts +8 -6
- package/dist/{devtools-B3W3DLPG.mjs → devtools-7LHXG2VS.mjs} +4 -3
- package/dist/{devtools-T5I2WHRX.cjs → devtools-NNQN66EZ.cjs} +5 -4
- package/dist/docs.cjs +6 -5
- package/dist/docs.d.mts +10 -65
- package/dist/docs.d.ts +10 -65
- package/dist/docs.mjs +5 -4
- package/dist/environment/vite.cjs +5 -4
- package/dist/environment/vite.mjs +4 -3
- package/dist/handler.d-C53zFDmp.d.ts +62 -0
- package/dist/handler.d-CaYopqaD.d.mts +62 -0
- package/dist/{headers.d-Aux4JVnm.d.ts → headers.d-BvtpC90T.d.ts} +1 -1
- package/dist/{headers.d-BawakaPv.d.mts → headers.d-MBkD9ZLf.d.mts} +1 -1
- package/dist/index.cjs +31 -24
- package/dist/index.d-2hQpPZ-P.d.ts +16 -0
- package/dist/index.d-Mikf-tdP.d.mts +16 -0
- package/dist/index.d.mts +39 -556
- package/dist/index.d.ts +39 -556
- package/dist/index.mjs +30 -23
- package/dist/integrations/orm.cjs +4 -3
- package/dist/integrations/orm.d.mts +6 -4
- package/dist/integrations/orm.d.ts +6 -4
- package/dist/integrations/orm.mjs +3 -2
- package/dist/integrations.cjs +2 -2
- package/dist/integrations.d.mts +7 -5
- package/dist/integrations.d.ts +7 -5
- package/dist/integrations.mjs +1 -1
- package/dist/internal/app-markdown-runtime.d.mts +8 -6
- package/dist/internal/app-markdown-runtime.d.ts +8 -6
- package/dist/internal/build-runtime.cjs +23 -22
- package/dist/internal/build-runtime.d.mts +10 -7
- package/dist/internal/build-runtime.d.ts +10 -7
- package/dist/internal/build-runtime.mjs +22 -21
- package/dist/internal/cli-runtime.cjs +17 -9
- package/dist/internal/cli-runtime.d.mts +46 -0
- package/dist/internal/cli-runtime.d.ts +46 -0
- package/dist/internal/cli-runtime.mjs +16 -8
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +11 -9
- package/dist/internal/client-runtime.d.ts +11 -9
- package/dist/internal/compression-runtime.cjs +2 -2
- package/dist/internal/compression-runtime.d.mts +11 -6
- package/dist/internal/compression-runtime.d.ts +11 -6
- package/dist/internal/compression-runtime.mjs +1 -1
- package/dist/internal/config-runtime.cjs +6 -5
- package/dist/internal/config-runtime.d.mts +9 -7
- package/dist/internal/config-runtime.d.ts +9 -7
- package/dist/internal/config-runtime.mjs +5 -4
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- 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 +8 -7
- package/dist/internal/production-runtime.d.mts +16 -14
- package/dist/internal/production-runtime.d.ts +16 -14
- package/dist/internal/production-runtime.mjs +7 -6
- package/dist/internal/start-manifest.d.mts +7 -5
- package/dist/internal/start-manifest.d.ts +7 -5
- package/dist/{layers-XQ7VFMWO.mjs → layers-I7VE5Q2Y.mjs} +2 -1
- package/dist/layers-WP5K5F7W.cjs +21 -0
- package/dist/{lifecycle.d-OtGWAvJT.d.ts → lifecycle.d-VzcXyEyn.d.mts} +1 -1
- package/dist/{lifecycle.d-OtGWAvJT.d.mts → lifecycle.d-VzcXyEyn.d.ts} +1 -1
- package/dist/markdown.d.mts +7 -5
- package/dist/markdown.d.ts +7 -5
- package/dist/middleware.d.mts +7 -5
- package/dist/middleware.d.ts +7 -5
- package/dist/{mount.d-BomEt2kV.d.mts → mount.d-DsP46XCy.d.mts} +1 -1
- package/dist/{mount.d-Ca8eb9GB.d.ts → mount.d-GU-tNxbE.d.ts} +1 -1
- package/dist/{navigation-delegate.d-B1ujRkYo.d.mts → navigation-delegate.d-CUtNOYLi.d.mts} +1 -1
- package/dist/{navigation-delegate.d-DJCC2jXF.d.ts → navigation-delegate.d-DsxNPrLT.d.ts} +1 -1
- package/dist/navigation.d.mts +10 -8
- package/dist/navigation.d.ts +10 -8
- package/dist/{plugin-FD4S2QEJ.mjs → plugin-2KWR2X4B.mjs} +1 -1
- package/dist/{plugin-5BNPYCER.cjs → plugin-MW7IDV76.cjs} +2 -2
- package/dist/plugin.cjs +15 -14
- package/dist/plugin.d.mts +11 -8
- package/dist/plugin.d.ts +11 -8
- package/dist/plugin.mjs +14 -13
- package/dist/{render-plan.d-BxRbaxYA.d.ts → render-plan.d-8K6S0h0L.d.ts} +1 -1
- package/dist/{render-plan.d-CFod_Zf-.d.mts → render-plan.d-B7Xp-PPW.d.mts} +1 -1
- package/dist/renderer-client.d.mts +10 -8
- package/dist/renderer-client.d.ts +10 -8
- package/dist/{request.d-DRQgaXGG.d.ts → request.d-CuQxmOqX.d.ts} +1 -1
- package/dist/{request.d-DG4TeXMM.d.mts → request.d-nhqciCAz.d.mts} +1 -1
- package/dist/request.d.mts +8 -6
- package/dist/request.d.ts +8 -6
- package/dist/{route-rendering.d-Db07UNVG.d.ts → route-rendering.d-BSsdDYC1.d.ts} +1 -1
- package/dist/{route-rendering.d-BXtZKgqu.d.mts → route-rendering.d-CeF1FOnl.d.mts} +1 -1
- package/dist/{router.d-BC3hyjf0.d.ts → router.d-C7yGlhDL.d.ts} +1 -1
- package/dist/{router.d-B61kXqxJ.d.mts → router.d-D462OX24.d.mts} +1 -1
- package/dist/routes.d.mts +7 -5
- package/dist/routes.d.ts +7 -5
- package/dist/{rsc-pipeline-VENBFYXW.cjs → rsc-pipeline-7PV6ARDS.cjs} +8 -7
- package/dist/{rsc-pipeline-LJ7YCGY6.mjs → rsc-pipeline-EZU4W4RL.mjs} +7 -6
- package/dist/{runtime-UNDTYGQS.cjs → runtime-QOE3NRXF.cjs} +8 -7
- package/dist/{runtime-4DWUXZHS.mjs → runtime-RWLFEPS3.mjs} +5 -4
- package/dist/{runtime.d-Cl6EBGmC.d.mts → runtime.d-C-BHQMy5.d.mts} +1 -1
- package/dist/{runtime.d-SC95yDzr.d.ts → runtime.d-CORDJQMy.d.ts} +1 -1
- package/dist/{schema.d-Dny9pnrm.d.mts → schema.d-BM-uVGpx.d.mts} +1 -1
- package/dist/{schema.d-Dny9pnrm.d.ts → schema.d-BM-uVGpx.d.ts} +1 -1
- package/dist/schema.d.mts +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/{index.d-r1MLpgeE.d.ts → server-components-status.d-BJ6huueH.d.mts} +2 -15
- package/dist/{index.d-Ccq42CPU.d.mts → server-components-status.d-BbADqqjq.d.ts} +2 -15
- package/dist/server-plugins.cjs +2 -2
- package/dist/server-plugins.d.mts +9 -7
- package/dist/server-plugins.d.ts +9 -7
- package/dist/server-plugins.mjs +1 -1
- package/dist/server.cjs +46 -39
- package/dist/server.d.mts +17 -14
- package/dist/server.d.ts +17 -14
- package/dist/server.mjs +24 -17
- package/dist/session-OU7M4CIF.cjs +24 -0
- package/dist/{session-QZXZOPR2.mjs → session-WPAT6H76.mjs} +3 -2
- package/dist/{spa-router.d-DrlXgDqY.d.mts → spa-router.d-DfjafHyX.d.mts} +4 -4
- package/dist/{spa-router.d-DwM02Mwd.d.ts → spa-router.d-DyGJLQc_.d.ts} +4 -4
- package/dist/ssg.d-D11lz_wr.d.ts +138 -0
- package/dist/ssg.d-iiLTyLAO.d.mts +138 -0
- package/dist/storage.cjs +9 -2
- package/dist/storage.d.mts +266 -34
- package/dist/storage.d.ts +266 -34
- package/dist/storage.mjs +8 -1
- package/dist/testing.d.mts +7 -5
- package/dist/testing.d.ts +7 -5
- package/dist/types.d-DC97bnjj.d.mts +131 -0
- package/dist/types.d-DC97bnjj.d.ts +131 -0
- package/dist/{utils.d-C6KXz3uB.d.ts → utils.d-D-GQeEfa.d.ts} +1 -1
- package/dist/{utils.d-CHzxAshz.d.mts → utils.d-fW-95yEh.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +15 -14
- package/dist/vite.d.mts +12 -9
- package/dist/vite.d.ts +12 -9
- package/dist/vite.mjs +14 -13
- package/package.json +11 -4
- package/dist/analyzer-23GCBYFI.cjs +0 -16
- package/dist/chunk-JMYXO572.cjs +0 -531
- package/dist/layers-7P4RLKVX.cjs +0 -20
- package/dist/session-2Q72D4QV.cjs +0 -23
- package/dist/types.d-BnIqOn9w.d.mts +0 -73
- package/dist/types.d-BnIqOn9w.d.ts +0 -73
- /package/dist/{chunk-6DBBMQWT.cjs → chunk-AF3PNVVF.cjs} +0 -0
- /package/dist/{chunk-5O3SK3ZC.mjs → chunk-BEXH6BGH.mjs} +0 -0
- /package/dist/{chunk-PMU4U2W2.cjs → chunk-PC5OZ4YR.cjs} +0 -0
- /package/dist/{chunk-Z5ZZAGIH.mjs → chunk-RL47VZ6J.mjs} +0 -0
|
@@ -40,22 +40,22 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkSIYELCIXcjs = require('./chunk-SIYELCIX.cjs');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
var
|
|
48
|
+
var _chunk7SAGHWWUcjs = require('./chunk-7SAGHWWU.cjs');
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunkPC5OZ4YRcjs = require('./chunk-PC5OZ4YR.cjs');
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkGC2BSXQScjs = require('./chunk-GC2BSXQS.cjs');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
@@ -64,7 +64,7 @@ var _chunk7564NP5Zcjs = require('./chunk-7564NP5Z.cjs');
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var _chunk6ZFGWB75cjs = require('./chunk-6ZFGWB75.cjs');
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
@@ -82,13 +82,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
var
|
|
85
|
+
var _chunkLTDMJD2Fcjs = require('./chunk-LTDMJD2F.cjs');
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
var _chunkYRXPDKMMcjs = require('./chunk-YRXPDKMM.cjs');
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
var
|
|
91
|
+
var _chunkJD42G6BNcjs = require('./chunk-JD42G6BN.cjs');
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
|
|
@@ -139,7 +139,7 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
|
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
|
|
142
|
-
var
|
|
142
|
+
var _chunkPMKUTZGRcjs = require('./chunk-PMKUTZGR.cjs');
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
|
|
@@ -174,7 +174,7 @@ var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
|
|
|
174
174
|
|
|
175
175
|
|
|
176
176
|
|
|
177
|
-
var
|
|
177
|
+
var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
|
|
178
178
|
|
|
179
179
|
|
|
180
180
|
|
|
@@ -215,7 +215,7 @@ var _chunk2YJ4DHTDcjs = require('./chunk-2YJ4DHTD.cjs');
|
|
|
215
215
|
|
|
216
216
|
|
|
217
217
|
|
|
218
|
-
var
|
|
218
|
+
var _chunkAF3PNVVFcjs = require('./chunk-AF3PNVVF.cjs');
|
|
219
219
|
|
|
220
220
|
|
|
221
221
|
|
|
@@ -301,7 +301,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
|
301
301
|
var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
302
302
|
|
|
303
303
|
|
|
304
|
-
var
|
|
304
|
+
var _chunkUYACD4SHcjs = require('./chunk-UYACD4SH.cjs');
|
|
305
305
|
|
|
306
306
|
|
|
307
307
|
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
@@ -700,7 +700,7 @@ function findClientServerFnViolation(code, id) {
|
|
|
700
700
|
return null;
|
|
701
701
|
}
|
|
702
702
|
function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
703
|
-
return
|
|
703
|
+
return _chunkPMKUTZGRcjs.createFarmDiagnostic.call(void 0,
|
|
704
704
|
"CLIENT_SERVER_FUNCTION",
|
|
705
705
|
id,
|
|
706
706
|
`${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
|
|
@@ -959,21 +959,21 @@ function readPropertyKey(property) {
|
|
|
959
959
|
function createClientBoundaryDiagnostic(file, finding, location) {
|
|
960
960
|
switch (finding.kind) {
|
|
961
961
|
case "server-env":
|
|
962
|
-
return
|
|
962
|
+
return _chunkPMKUTZGRcjs.createFarmDiagnostic.call(void 0,
|
|
963
963
|
"CLIENT_SERVER_ENV",
|
|
964
964
|
file,
|
|
965
965
|
`process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
|
|
966
966
|
location
|
|
967
967
|
);
|
|
968
968
|
case "public-env":
|
|
969
|
-
return
|
|
969
|
+
return _chunkPMKUTZGRcjs.createFarmDiagnostic.call(void 0,
|
|
970
970
|
"CLIENT_PROCESS_ENV_PUBLIC",
|
|
971
971
|
file,
|
|
972
972
|
`process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
|
|
973
973
|
location
|
|
974
974
|
);
|
|
975
975
|
case "builtin":
|
|
976
|
-
return
|
|
976
|
+
return _chunkPMKUTZGRcjs.createFarmDiagnostic.call(void 0,
|
|
977
977
|
"CLIENT_NODE_BUILTIN",
|
|
978
978
|
file,
|
|
979
979
|
`"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
|
|
@@ -1274,7 +1274,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
1274
1274
|
return import("./workflows.cjs");
|
|
1275
1275
|
}
|
|
1276
1276
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1277
|
-
return import("./devtools-
|
|
1277
|
+
return import("./devtools-NNQN66EZ.cjs");
|
|
1278
1278
|
}
|
|
1279
1279
|
function loadFarmDevtoolsUIRuntime() {
|
|
1280
1280
|
return import("./devtools-ui-SYRUXUA7.cjs");
|
|
@@ -1305,16 +1305,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1305
1305
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1306
1306
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1307
1307
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1308
|
-
|
|
1309
|
-
new RegExp(`^${
|
|
1308
|
+
_chunkSIYELCIXcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1309
|
+
new RegExp(`^${_chunkPMKUTZGRcjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1310
1310
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1311
1311
|
// included.
|
|
1312
1312
|
/^node:/,
|
|
1313
|
-
|
|
1313
|
+
_chunkSIYELCIXcjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1314
1314
|
];
|
|
1315
1315
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1316
|
-
|
|
1317
|
-
new RegExp(`^${
|
|
1316
|
+
_chunkSIYELCIXcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1317
|
+
new RegExp(`^${_chunkPMKUTZGRcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1318
1318
|
];
|
|
1319
1319
|
function createFarmPlatformClientModule(platform) {
|
|
1320
1320
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1350,18 +1350,18 @@ function farmIslandContainersPlugin(config) {
|
|
|
1350
1350
|
if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
|
|
1351
1351
|
return null;
|
|
1352
1352
|
}
|
|
1353
|
-
if (
|
|
1353
|
+
if (_chunkPMKUTZGRcjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1354
1354
|
const file = id.split("?", 1)[0];
|
|
1355
|
-
const bindings =
|
|
1355
|
+
const bindings = _chunkPMKUTZGRcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1356
1356
|
if (bindings.length === 0) return null;
|
|
1357
|
-
const grown =
|
|
1357
|
+
const grown = _chunkPMKUTZGRcjs.wrapFarmIslandContainers.call(void 0, {
|
|
1358
1358
|
code,
|
|
1359
1359
|
file,
|
|
1360
1360
|
bindings,
|
|
1361
|
-
reference:
|
|
1361
|
+
reference: _chunkPMKUTZGRcjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1362
1362
|
});
|
|
1363
1363
|
if (grown === null) return null;
|
|
1364
|
-
|
|
1364
|
+
_chunkPMKUTZGRcjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1365
1365
|
return { code: grown, map: null };
|
|
1366
1366
|
}
|
|
1367
1367
|
};
|
|
@@ -1375,15 +1375,15 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1375
1375
|
config(config) {
|
|
1376
1376
|
const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
|
|
1377
1377
|
if (options.distDir) {
|
|
1378
|
-
|
|
1378
|
+
_chunkPMKUTZGRcjs.usePackageScanCacheFile.call(void 0,
|
|
1379
1379
|
path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
|
|
1380
1380
|
);
|
|
1381
1381
|
}
|
|
1382
|
-
const bundledPackages =
|
|
1382
|
+
const bundledPackages = _chunkPMKUTZGRcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
|
|
1383
1383
|
const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
|
|
1384
|
-
|
|
1384
|
+
_chunkPMKUTZGRcjs.persistPackageScanCache.call(void 0, );
|
|
1385
1385
|
return {
|
|
1386
|
-
optimizeDeps: { rolldownOptions: { plugins: [
|
|
1386
|
+
optimizeDeps: { rolldownOptions: { plugins: [_chunkPMKUTZGRcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
|
|
1387
1387
|
ssr: {
|
|
1388
1388
|
noExternal: [
|
|
1389
1389
|
// Resolve `server-only` here rather than in Node, which would load its throwing build.
|
|
@@ -1407,8 +1407,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1407
1407
|
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1408
1408
|
}
|
|
1409
1409
|
this.error(
|
|
1410
|
-
|
|
1411
|
-
|
|
1410
|
+
_chunkPMKUTZGRcjs.formatFarmDiagnostic.call(void 0,
|
|
1411
|
+
_chunkPMKUTZGRcjs.createFarmDiagnostic.call(void 0,
|
|
1412
1412
|
"CLIENT_SERVER_ONLY_IMPORT",
|
|
1413
1413
|
_nullishCoalesce(importer, () => ( "<unknown module>")),
|
|
1414
1414
|
`${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
|
|
@@ -1418,9 +1418,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1418
1418
|
);
|
|
1419
1419
|
}
|
|
1420
1420
|
if (!_optionalChain([options2, 'optionalAccess', _74 => _74.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1421
|
-
return
|
|
1421
|
+
return _chunkPMKUTZGRcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1422
1422
|
}
|
|
1423
|
-
const resolveFrom = importer ?
|
|
1423
|
+
const resolveFrom = importer ? _chunkPMKUTZGRcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1424
1424
|
if (resolveFrom) {
|
|
1425
1425
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1426
1426
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1437,8 +1437,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1437
1437
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1438
1438
|
if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr])) {
|
|
1439
1439
|
this.error(
|
|
1440
|
-
|
|
1441
|
-
|
|
1440
|
+
_chunkPMKUTZGRcjs.formatFarmDiagnostic.call(void 0,
|
|
1441
|
+
_chunkPMKUTZGRcjs.createFarmDiagnostic.call(void 0,
|
|
1442
1442
|
"CLIENT_SERVER_ONLY_ENTRY",
|
|
1443
1443
|
_nullishCoalesce(importer, () => ( id)),
|
|
1444
1444
|
`${id} is server-only and cannot be imported into client code.`
|
|
@@ -1463,7 +1463,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1463
1463
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1464
1464
|
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
|
|
1465
1465
|
}
|
|
1466
|
-
return _nullishCoalesce(
|
|
1466
|
+
return _nullishCoalesce(_chunkPMKUTZGRcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
1469
1469
|
};
|
|
@@ -1496,7 +1496,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
1496
1496
|
if (!snapshot) return "";
|
|
1497
1497
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
1498
1498
|
if (snapshot.routing === "none") return runtime;
|
|
1499
|
-
return `${
|
|
1499
|
+
return `${_chunk6ZFGWB75cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
1500
1500
|
}
|
|
1501
1501
|
function getPublicEnvDefine(config) {
|
|
1502
1502
|
const publicEnv = _optionalChain([config, 'access', _76 => _76.env, 'optionalAccess', _77 => _77.public]);
|
|
@@ -1569,7 +1569,7 @@ function sendFarmDevRuntimeHookError(res, json) {
|
|
|
1569
1569
|
res.end(json ? _chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
|
|
1570
1570
|
}
|
|
1571
1571
|
function opensFarmDevRuntimeSession(pm) {
|
|
1572
|
-
return pm.hasRuntimeRequestHooks() ||
|
|
1572
|
+
return pm.hasRuntimeRequestHooks() || _chunk7SAGHWWUcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
|
|
1573
1573
|
}
|
|
1574
1574
|
var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
|
|
1575
1575
|
_chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
@@ -1682,7 +1682,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1682
1682
|
res.end = originalEnd;
|
|
1683
1683
|
res.writeHead = originalWriteHead;
|
|
1684
1684
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1685
|
-
delete res[
|
|
1685
|
+
delete res[_chunkPC5OZ4YRcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1686
1686
|
};
|
|
1687
1687
|
let runtimeHookFailed = false;
|
|
1688
1688
|
const endRuntimeRequest = (response) => pm.endRuntimeRequest(runtimeSession, response).catch((error) => {
|
|
@@ -1806,7 +1806,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1806
1806
|
});
|
|
1807
1807
|
res.end = ((...args) => {
|
|
1808
1808
|
interceptedEnd = true;
|
|
1809
|
-
res[
|
|
1809
|
+
res[_chunkPC5OZ4YRcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
|
|
1810
1810
|
if (afterResponseCalled) return res;
|
|
1811
1811
|
afterResponseCalled = true;
|
|
1812
1812
|
options.logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
|
|
@@ -1889,7 +1889,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1889
1889
|
res.end = originalEnd;
|
|
1890
1890
|
res.writeHead = originalWriteHead;
|
|
1891
1891
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1892
|
-
delete res[
|
|
1892
|
+
delete res[_chunkPC5OZ4YRcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1893
1893
|
originalEnd(...originalEndArgs);
|
|
1894
1894
|
}).catch((error) => {
|
|
1895
1895
|
reportFailure(error);
|
|
@@ -1906,14 +1906,14 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1906
1906
|
res.end = originalEnd;
|
|
1907
1907
|
res.writeHead = originalWriteHead;
|
|
1908
1908
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1909
|
-
delete res[
|
|
1909
|
+
delete res[_chunkPC5OZ4YRcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1910
1910
|
originalEnd(body, callback);
|
|
1911
1911
|
} else {
|
|
1912
1912
|
res.write = originalWrite;
|
|
1913
1913
|
res.end = originalEnd;
|
|
1914
1914
|
res.writeHead = originalWriteHead;
|
|
1915
1915
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1916
|
-
delete res[
|
|
1916
|
+
delete res[_chunkPC5OZ4YRcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1917
1917
|
originalEnd(...originalEndArgs);
|
|
1918
1918
|
}
|
|
1919
1919
|
});
|
|
@@ -2077,7 +2077,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2077
2077
|
return null;
|
|
2078
2078
|
}
|
|
2079
2079
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
2080
|
-
const everyExportIsComponent = options.code.includes(
|
|
2080
|
+
const everyExportIsComponent = options.code.includes(_chunkPMKUTZGRcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkPMKUTZGRcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
2081
2081
|
const replacements = [];
|
|
2082
2082
|
const wrapperStatements = [];
|
|
2083
2083
|
const originalEntries = [];
|
|
@@ -2228,16 +2228,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
2228
2228
|
for (const finding of analyzeClientBoundary(program, publicKeys)) {
|
|
2229
2229
|
if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
|
|
2230
2230
|
const resolved = await context.resolve(finding.name, id).catch(() => null);
|
|
2231
|
-
if (!_optionalChain([resolved, 'optionalAccess', _102 => _102.id, 'access', _103 => _103.startsWith, 'call', _104 => _104(
|
|
2231
|
+
if (!_optionalChain([resolved, 'optionalAccess', _102 => _102.id, 'access', _103 => _103.startsWith, 'call', _104 => _104(_chunkPMKUTZGRcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
|
|
2232
2232
|
}
|
|
2233
2233
|
findings.push(finding);
|
|
2234
2234
|
}
|
|
2235
2235
|
if (findings.length === 0) return;
|
|
2236
2236
|
warnedClientBoundaryIds.add(id);
|
|
2237
|
-
const locate =
|
|
2237
|
+
const locate = _chunkPMKUTZGRcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
|
|
2238
2238
|
_chunkGC5ROI3Acjs.logger.warn(
|
|
2239
2239
|
findings.map(
|
|
2240
|
-
(finding) =>
|
|
2240
|
+
(finding) => _chunkPMKUTZGRcjs.formatFarmDiagnostic.call(void 0,
|
|
2241
2241
|
createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
|
|
2242
2242
|
config.root
|
|
2243
2243
|
)
|
|
@@ -2278,7 +2278,7 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2278
2278
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2279
2279
|
const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2280
2280
|
const imageImports = farmImageImportsPlugin();
|
|
2281
|
-
const fontImports =
|
|
2281
|
+
const fontImports = _chunkSIYELCIXcjs.farmFontImportsPlugin.call(void 0, {
|
|
2282
2282
|
root: options.root,
|
|
2283
2283
|
basePath: options.basePath,
|
|
2284
2284
|
publicDir: options.publicDir
|
|
@@ -2325,6 +2325,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2325
2325
|
let openAPIManager = null;
|
|
2326
2326
|
let middlewareManager;
|
|
2327
2327
|
let refreshRouteDiscovery = null;
|
|
2328
|
+
const pendingRouteReloads = /* @__PURE__ */ new Set();
|
|
2328
2329
|
let workflowHandler = null;
|
|
2329
2330
|
let isBuild = false;
|
|
2330
2331
|
let farmOwnsDevCors = false;
|
|
@@ -2356,12 +2357,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2356
2357
|
config(userConfig, configEnv) {
|
|
2357
2358
|
isBuild = configEnv.command === "build";
|
|
2358
2359
|
const farmAliases = {
|
|
2359
|
-
...
|
|
2360
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _125 => _125.resolve, 'optionalAccess', _126 => _126.alias])) ? {} :
|
|
2360
|
+
..._chunkQMR2TUVZcjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2361
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _125 => _125.resolve, 'optionalAccess', _126 => _126.alias])) ? {} : _chunkSIYELCIXcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2361
2362
|
};
|
|
2362
2363
|
if (Object.keys(farmAliases).length > 0) {
|
|
2363
2364
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2364
|
-
userConfig.resolve.alias =
|
|
2365
|
+
userConfig.resolve.alias = _chunkSIYELCIXcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2365
2366
|
}
|
|
2366
2367
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2367
2368
|
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _127 => _127.server, 'optionalAccess', _128 => _128.cors]) === void 0;
|
|
@@ -2411,7 +2412,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2411
2412
|
async configureServer(viteServer) {
|
|
2412
2413
|
viteServer.middlewares.use(
|
|
2413
2414
|
createFarmDevPreviewGuard(viteServer, {
|
|
2414
|
-
getSourceRoots: () =>
|
|
2415
|
+
getSourceRoots: () => _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _136 => _136.getConfig, 'call', _137 => _137()]), () => ( options)))
|
|
2415
2416
|
})
|
|
2416
2417
|
);
|
|
2417
2418
|
if (typeof fontImports.configureServer === "function") {
|
|
@@ -2435,7 +2436,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2435
2436
|
} catch (e21) {
|
|
2436
2437
|
}
|
|
2437
2438
|
};
|
|
2438
|
-
farmApp = new (0,
|
|
2439
|
+
farmApp = new (0, _chunkSIYELCIXcjs.FarmApp)(
|
|
2439
2440
|
{
|
|
2440
2441
|
...options,
|
|
2441
2442
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2443,7 +2444,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2443
2444
|
server
|
|
2444
2445
|
);
|
|
2445
2446
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2446
|
-
|
|
2447
|
+
_chunkPMKUTZGRcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2447
2448
|
farmApp.getConfig().root,
|
|
2448
2449
|
options.distDir || ".farm"
|
|
2449
2450
|
)
|
|
@@ -2454,7 +2455,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2454
2455
|
let farmAppPackages;
|
|
2455
2456
|
if (_optionalChain([farmConfig, 'access', _150 => _150.agent, 'optionalAccess', _151 => _151.noindexPreviews])) {
|
|
2456
2457
|
farmMiddlewares.use((_req, res, next) => {
|
|
2457
|
-
if (
|
|
2458
|
+
if (_chunkJD42G6BNcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2458
2459
|
res.setHeader("X-Robots-Tag", _chunkF4ID7BGOcjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2459
2460
|
}
|
|
2460
2461
|
next();
|
|
@@ -2462,7 +2463,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2462
2463
|
}
|
|
2463
2464
|
const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2464
2465
|
const devBuiltInRoutePaths = new Set(
|
|
2465
|
-
|
|
2466
|
+
_chunkLTDMJD2Fcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2466
2467
|
agent: {
|
|
2467
2468
|
apiCatalog: true,
|
|
2468
2469
|
mcp: true,
|
|
@@ -2492,7 +2493,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2492
2493
|
}
|
|
2493
2494
|
});
|
|
2494
2495
|
}
|
|
2495
|
-
const sourceRoots =
|
|
2496
|
+
const sourceRoots = _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, farmConfig);
|
|
2496
2497
|
server.watcher.add(sourceRoots.map((source) => path6.join(source.root, source.srcDir)));
|
|
2497
2498
|
if (farmConfig.i18n.enabled) {
|
|
2498
2499
|
server.watcher.add(
|
|
@@ -2512,10 +2513,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2512
2513
|
);
|
|
2513
2514
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2514
2515
|
try {
|
|
2515
|
-
const result = await
|
|
2516
|
+
const result = await _chunkGC2BSXQScjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2516
2517
|
root: farmConfig.root,
|
|
2517
2518
|
srcDir: farmConfig.srcDir,
|
|
2518
2519
|
layers: farmConfig.layers,
|
|
2520
|
+
storage: farmConfig.storage,
|
|
2519
2521
|
plugins: farmConfig.plugins,
|
|
2520
2522
|
extraRoutes: getExtraRouteTypes(),
|
|
2521
2523
|
suppressLintOnLink: farmConfig.suppressLintOnLink,
|
|
@@ -2591,8 +2593,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2591
2593
|
let typeArtifactGenScheduled = null;
|
|
2592
2594
|
let pendingTypeArtifacts = createEmptyTypeArtifactSelection();
|
|
2593
2595
|
let pendingTypeArtifactReason = "";
|
|
2594
|
-
let
|
|
2595
|
-
let pendingRouteRefreshIncludesMiddleware = false;
|
|
2596
|
+
let queuedRouteFiles;
|
|
2596
2597
|
const scheduleTypeArtifactGen = (file, event, selection) => {
|
|
2597
2598
|
const normalizedFile = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, file);
|
|
2598
2599
|
for (const [artifact, enabled] of Object.entries(selection)) {
|
|
@@ -2635,24 +2636,33 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2635
2636
|
}
|
|
2636
2637
|
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
2637
2638
|
if (isRouteRefreshEvent) {
|
|
2638
|
-
if (
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2639
|
+
if (!queuedRouteFiles) {
|
|
2640
|
+
const files = /* @__PURE__ */ new Set();
|
|
2641
|
+
queuedRouteFiles = files;
|
|
2642
|
+
pendingRouteReloads.add(files);
|
|
2643
|
+
setTimeout(async () => {
|
|
2644
|
+
queuedRouteFiles = void 0;
|
|
2645
|
+
try {
|
|
2646
|
+
await Promise.all([
|
|
2647
|
+
_optionalChain([refreshRouteDiscovery, 'optionalCall', _170 => _170(`${ev} ${file}`)]),
|
|
2648
|
+
[...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _171 => _171.reload, 'call', _172 => _172()]) : void 0
|
|
2649
|
+
]);
|
|
2650
|
+
if (pendingRouteReloads.size === 1)
|
|
2651
|
+
server.ws.send({ type: "full-reload", path: "*" });
|
|
2652
|
+
} catch (error) {
|
|
2653
|
+
_chunkGC5ROI3Acjs.logger.warn(
|
|
2654
|
+
`Route refresh failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2655
|
+
);
|
|
2656
|
+
} finally {
|
|
2657
|
+
pendingRouteReloads.delete(files);
|
|
2658
|
+
}
|
|
2650
2659
|
}, 50);
|
|
2651
2660
|
}
|
|
2661
|
+
queuedRouteFiles.add(normalizedFile);
|
|
2652
2662
|
}
|
|
2653
2663
|
});
|
|
2654
2664
|
});
|
|
2655
|
-
const appDirs =
|
|
2665
|
+
const appDirs = _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, farmConfig);
|
|
2656
2666
|
const routeManager = farmApp.getRouteManager();
|
|
2657
2667
|
const discoveredRoutes = [];
|
|
2658
2668
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|
|
@@ -2793,7 +2803,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2793
2803
|
return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
|
|
2794
2804
|
};
|
|
2795
2805
|
releaseDocsMCPServers();
|
|
2796
|
-
const isFarmDocsPathGuarded = (href) =>
|
|
2806
|
+
const isFarmDocsPathGuarded = (href) => _chunk6ZFGWB75cjs.farmPathGuardCoversPage.call(void 0,
|
|
2797
2807
|
{
|
|
2798
2808
|
config: farmConfig,
|
|
2799
2809
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -2806,7 +2816,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2806
2816
|
clientEntry: "/@farm/client.js",
|
|
2807
2817
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2808
2818
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2809
|
-
globalStylesheetHref:
|
|
2819
|
+
globalStylesheetHref: _chunkSIYELCIXcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2810
2820
|
farmConfig.root,
|
|
2811
2821
|
farmConfig.srcDir
|
|
2812
2822
|
),
|
|
@@ -2837,7 +2847,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2837
2847
|
fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2838
2848
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2839
2849
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2840
|
-
globalStylesheetHref:
|
|
2850
|
+
globalStylesheetHref: _chunkSIYELCIXcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2841
2851
|
farmConfig.root,
|
|
2842
2852
|
farmConfig.srcDir
|
|
2843
2853
|
),
|
|
@@ -3005,7 +3015,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3005
3015
|
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
|
|
3006
3016
|
res.statusCode = 200;
|
|
3007
3017
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
3008
|
-
res.end(requestMethod === "HEAD" ? void 0 :
|
|
3018
|
+
res.end(requestMethod === "HEAD" ? void 0 : _chunkSIYELCIXcjs.FARM_VIDEO_PLAYER_HTML);
|
|
3009
3019
|
return;
|
|
3010
3020
|
}
|
|
3011
3021
|
const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
|
|
@@ -3285,9 +3295,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3285
3295
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3286
3296
|
try {
|
|
3287
3297
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3288
|
-
const route =
|
|
3298
|
+
const route = _chunkLTDMJD2Fcjs.setFarmRouteLabel.call(void 0,
|
|
3289
3299
|
{ pathname: requestPathname },
|
|
3290
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3300
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkLTDMJD2Fcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3291
3301
|
);
|
|
3292
3302
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3293
3303
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -3376,8 +3386,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3376
3386
|
);
|
|
3377
3387
|
return;
|
|
3378
3388
|
}
|
|
3379
|
-
if (_optionalChain([options, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.manifest]) !== false &&
|
|
3380
|
-
const manifestGuardCoversPath = (path7) =>
|
|
3389
|
+
if (_optionalChain([options, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.manifest]) !== false && _chunkLTDMJD2Fcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3390
|
+
const manifestGuardCoversPath = (path7) => _chunk6ZFGWB75cjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3381
3391
|
{
|
|
3382
3392
|
config: farmConfig,
|
|
3383
3393
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -3386,18 +3396,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3386
3396
|
apiServerBasePath
|
|
3387
3397
|
);
|
|
3388
3398
|
await serveBuiltInRoute(async () => {
|
|
3389
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3390
|
-
const manifest = await
|
|
3399
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkSIYELCIXcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3400
|
+
const manifest = await _chunkLTDMJD2Fcjs.createFarmAppManifestResponse.call(void 0,
|
|
3391
3401
|
new Request(parsedRequestUrl, {
|
|
3392
3402
|
method: requestMethod,
|
|
3393
3403
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3394
3404
|
}),
|
|
3395
3405
|
{
|
|
3396
|
-
...
|
|
3406
|
+
..._chunkLTDMJD2Fcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3397
3407
|
build: "development",
|
|
3398
3408
|
packages: farmAppPackages,
|
|
3399
3409
|
// Read again on each request; unchanged files come from a cache.
|
|
3400
|
-
webmcpTools: _optionalChain([farmConfig, 'access', _225 => _225.plugins, 'optionalAccess', _226 => _226.some, 'call', _227 => _227(({ name }) => name === "farm:webmcp")]) ?
|
|
3410
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _225 => _225.plugins, 'optionalAccess', _226 => _226.some, 'call', _227 => _227(({ name }) => name === "farm:webmcp")]) ? _chunkSIYELCIXcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3401
3411
|
}),
|
|
3402
3412
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3403
3413
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -3415,11 +3425,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3415
3425
|
});
|
|
3416
3426
|
return;
|
|
3417
3427
|
}
|
|
3418
|
-
if (_optionalChain([options, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) ===
|
|
3428
|
+
if (_optionalChain([options, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkLTDMJD2Fcjs.FARM_API_CATALOG_PATH) {
|
|
3419
3429
|
await serveBuiltInRoute(
|
|
3420
|
-
() =>
|
|
3430
|
+
() => _chunkLTDMJD2Fcjs.createFarmApiCatalogResponse.call(void 0,
|
|
3421
3431
|
requestMethod,
|
|
3422
|
-
|
|
3432
|
+
_chunkLTDMJD2Fcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3423
3433
|
new Request(parsedRequestUrl, {
|
|
3424
3434
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3425
3435
|
})
|
|
@@ -3428,7 +3438,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3428
3438
|
return;
|
|
3429
3439
|
}
|
|
3430
3440
|
if (_optionalChain([options, 'access', _230 => _230.agent, 'optionalAccess', _231 => _231.aiCatalog]) !== false) {
|
|
3431
|
-
const aiCatalog =
|
|
3441
|
+
const aiCatalog = _chunkLTDMJD2Fcjs.createFarmAiCatalogResponse.call(void 0,
|
|
3432
3442
|
new Request(parsedRequestUrl, {
|
|
3433
3443
|
method: requestMethod,
|
|
3434
3444
|
headers: {
|
|
@@ -3510,7 +3520,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3510
3520
|
{
|
|
3511
3521
|
kind: "docs",
|
|
3512
3522
|
computed: docsResponse,
|
|
3513
|
-
label:
|
|
3523
|
+
label: _chunkLTDMJD2Fcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3514
3524
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3515
3525
|
{
|
|
3516
3526
|
path: _optionalChain([farmConfig, 'access', _242 => _242.docs, 'optionalAccess', _243 => _243.entry]) || "/docs",
|
|
@@ -3547,7 +3557,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3547
3557
|
}
|
|
3548
3558
|
const markdownRouteLabel = () => (
|
|
3549
3559
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3550
|
-
|
|
3560
|
+
_chunkLTDMJD2Fcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3551
3561
|
toRoutePathname(requestPathname),
|
|
3552
3562
|
(page) => _optionalChain([farmApp, 'access', _258 => _258.getRouteManager, 'call', _259 => _259(), 'access', _260 => _260.matchRoute, 'call', _261 => _261(page), 'access', _262 => _262.route, 'optionalAccess', _263 => _263.pattern])
|
|
3553
3563
|
)
|
|
@@ -3568,7 +3578,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3568
3578
|
return {
|
|
3569
3579
|
source: await fs2.promises.readFile(sourcePath, "utf8"),
|
|
3570
3580
|
// Project-relative, as production sends it: never the machine's path.
|
|
3571
|
-
filePath:
|
|
3581
|
+
filePath: _chunkSIYELCIXcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
|
|
3572
3582
|
};
|
|
3573
3583
|
},
|
|
3574
3584
|
// The anonymous check goes through this server, so its guards and
|
|
@@ -3703,7 +3713,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3703
3713
|
}
|
|
3704
3714
|
const configuredIntegrations = currentConfig.integrations;
|
|
3705
3715
|
const tryConfiguredIntegrationRoute = async () => {
|
|
3706
|
-
const matchedRoute =
|
|
3716
|
+
const matchedRoute = _chunkAF3PNVVFcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3707
3717
|
pathname: requestPathname,
|
|
3708
3718
|
method: requestMethod
|
|
3709
3719
|
});
|
|
@@ -3717,7 +3727,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3717
3727
|
await pm.runHookParallelFiltered(
|
|
3718
3728
|
"beforeRequest",
|
|
3719
3729
|
(plugin2) => {
|
|
3720
|
-
const owner =
|
|
3730
|
+
const owner = _chunkAF3PNVVFcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
|
|
3721
3731
|
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _266 => _266.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
3722
3732
|
},
|
|
3723
3733
|
req,
|
|
@@ -3747,7 +3757,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3747
3757
|
});
|
|
3748
3758
|
const dispatchIntegration = async (request, runtime) => {
|
|
3749
3759
|
try {
|
|
3750
|
-
const result = await
|
|
3760
|
+
const result = await _chunkAF3PNVVFcjs.dispatchIntegrationRequest.call(void 0,
|
|
3751
3761
|
{
|
|
3752
3762
|
integration: matchedRoute.integration,
|
|
3753
3763
|
config: currentConfig,
|
|
@@ -3814,7 +3824,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3814
3824
|
const hasLocalDevRoute = () => {
|
|
3815
3825
|
const routeManager3 = farmApp.getRouteManager();
|
|
3816
3826
|
return Boolean(
|
|
3817
|
-
|
|
3827
|
+
_chunkAF3PNVVFcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3818
3828
|
pathname: requestPathname,
|
|
3819
3829
|
method: requestMethod
|
|
3820
3830
|
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _271 => _271.isFarmDocsAPIRequest, 'call', _272 => _272(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
|
|
@@ -3911,9 +3921,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3911
3921
|
);
|
|
3912
3922
|
const docsRuntimeOptions = () => ({
|
|
3913
3923
|
kind: "docs",
|
|
3914
|
-
route:
|
|
3924
|
+
route: _chunkLTDMJD2Fcjs.setFarmRouteLabel.call(void 0,
|
|
3915
3925
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
3916
|
-
|
|
3926
|
+
_chunkLTDMJD2Fcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
3917
3927
|
path: _optionalChain([farmConfig, 'access', _275 => _275.docs, 'optionalAccess', _276 => _276.entry]) || "/docs",
|
|
3918
3928
|
roots: _optionalChain([farmConfig, 'access', _277 => _277.docs, 'optionalAccess', _278 => _278.roots, 'optionalAccess', _279 => _279.map, 'call', _280 => _280((root) => root.entry)])
|
|
3919
3929
|
})
|
|
@@ -4267,7 +4277,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4267
4277
|
);
|
|
4268
4278
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
4269
4279
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
4270
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4280
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkPMKUTZGRcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
4271
4281
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4272
4282
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
4273
4283
|
let mergedMetadata = {};
|
|
@@ -4275,7 +4285,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4275
4285
|
layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
|
|
4276
4286
|
);
|
|
4277
4287
|
const layoutHydrationMetadata = layouts.map(
|
|
4278
|
-
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4288
|
+
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4289
|
+
(entry) => entry.pattern === layout.pattern
|
|
4290
|
+
), () => ( {
|
|
4291
|
+
..._chunkPMKUTZGRcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
|
|
4292
|
+
serverTree: false
|
|
4293
|
+
}))
|
|
4279
4294
|
);
|
|
4280
4295
|
const shouldHydrateLayout = layoutHydrationMetadata.some(
|
|
4281
4296
|
(metadata) => metadata.shouldHydrate
|
|
@@ -4288,7 +4303,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4288
4303
|
];
|
|
4289
4304
|
const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4290
4305
|
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _303 => _303.getConfig, 'call', _304 => _304()]), () => ( options))), 'access', _305 => _305.experimental, 'optionalAccess', _306 => _306.serverComponents])
|
|
4291
|
-
) === "islands" ?
|
|
4306
|
+
) === "islands" ? _chunkSIYELCIXcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4292
4307
|
route,
|
|
4293
4308
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4294
4309
|
layouts.map((layout, index) => ({
|
|
@@ -4354,7 +4369,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4354
4369
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4355
4370
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4356
4371
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4357
|
-
), () => (
|
|
4372
|
+
), () => ( _chunkPMKUTZGRcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4358
4373
|
const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4359
4374
|
request: targetRequest,
|
|
4360
4375
|
params: slot.params,
|
|
@@ -4400,15 +4415,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4400
4415
|
);
|
|
4401
4416
|
const projectRoot = server.config.root;
|
|
4402
4417
|
const toUrlPath = (absolutePath) => _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
|
|
4403
|
-
const renderPlan =
|
|
4418
|
+
const renderPlan = _chunk6ZFGWB75cjs.createFarmRouteRenderPlan.call(void 0, {
|
|
4404
4419
|
pageShouldHydrate: shouldHydrate,
|
|
4405
4420
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4406
4421
|
islandStrategy: hydrationIslandStrategy,
|
|
4407
|
-
rendering:
|
|
4422
|
+
rendering: _chunkGC2BSXQScjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4408
4423
|
});
|
|
4409
4424
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4410
|
-
const layoutStartIndex =
|
|
4411
|
-
|
|
4425
|
+
const layoutStartIndex = _chunk6ZFGWB75cjs.getSharedLayoutPrefixLength.call(void 0,
|
|
4426
|
+
_chunk6ZFGWB75cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
|
|
4412
4427
|
destinationLayoutPatterns
|
|
4413
4428
|
);
|
|
4414
4429
|
const renderer = farmApp.getServerRenderer();
|
|
@@ -4423,7 +4438,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4423
4438
|
params,
|
|
4424
4439
|
layouts: layouts.map((layout, index) => ({
|
|
4425
4440
|
pattern: layout.pattern,
|
|
4426
|
-
module: layoutModules[index]
|
|
4441
|
+
module: layoutModules[index],
|
|
4442
|
+
serverTree: _optionalChain([layoutHydrationMetadata, 'access', _314 => _314[index], 'optionalAccess', _315 => _315.serverTree])
|
|
4427
4443
|
})),
|
|
4428
4444
|
layoutStartIndex,
|
|
4429
4445
|
slots: routeSlots.map((slot) => ({
|
|
@@ -4489,7 +4505,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4489
4505
|
{
|
|
4490
4506
|
status: 200,
|
|
4491
4507
|
headers: {
|
|
4492
|
-
"Cache-Control":
|
|
4508
|
+
"Cache-Control": _chunk6ZFGWB75cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
|
|
4493
4509
|
"X-Farm-Navigation": "html-fragment",
|
|
4494
4510
|
Vary: "X-Farm-Layout-Chain",
|
|
4495
4511
|
[_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
|
|
@@ -4531,14 +4547,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4531
4547
|
trustProxy: currentServerConfig.trustProxy
|
|
4532
4548
|
}).pathname;
|
|
4533
4549
|
const routeManager2 = farmApp.getRouteManager();
|
|
4534
|
-
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4535
|
-
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4536
|
-
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4550
|
+
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _316 => _316.hasHook, 'call', _317 => _317("beforeRequest")]), () => ( false));
|
|
4551
|
+
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _318 => _318.hasHook, 'call', _319 => _319("afterResponse")]), () => ( false));
|
|
4552
|
+
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _320 => _320.hasHook, 'call', _321 => _321("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _322 => _322.hasHook, 'call', _323 => _323("afterRender")]), () => ( false)));
|
|
4537
4553
|
const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
|
|
4538
|
-
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4554
|
+
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _324 => _324.hasRuntimeHook, 'call', _325 => _325("after")]), () => ( false));
|
|
4539
4555
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4540
4556
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4541
|
-
const mcpLabel =
|
|
4557
|
+
const mcpLabel = _chunkLTDMJD2Fcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4542
4558
|
if (mcpLabel) return mcpLabel;
|
|
4543
4559
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4544
4560
|
return routePathname === _chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
@@ -4547,13 +4563,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4547
4563
|
const match = routeManager2.matchRoute(pathname2);
|
|
4548
4564
|
return {
|
|
4549
4565
|
kind: "page",
|
|
4550
|
-
route:
|
|
4566
|
+
route: _chunkLTDMJD2Fcjs.setFarmRouteLabel.call(void 0,
|
|
4551
4567
|
{
|
|
4552
4568
|
pathname: pathname2,
|
|
4553
|
-
pattern: _optionalChain([match, 'optionalAccess',
|
|
4554
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
4569
|
+
pattern: _optionalChain([match, 'optionalAccess', _326 => _326.route, 'optionalAccess', _327 => _327.pattern]) || null,
|
|
4570
|
+
params: _optionalChain([match, 'optionalAccess', _328 => _328.params]) || {}
|
|
4555
4571
|
},
|
|
4556
|
-
_optionalChain([match, 'optionalAccess',
|
|
4572
|
+
_optionalChain([match, 'optionalAccess', _329 => _329.route]) ? null : pageBuiltInRouteLabel(pathname2)
|
|
4557
4573
|
)
|
|
4558
4574
|
};
|
|
4559
4575
|
};
|
|
@@ -4633,7 +4649,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4633
4649
|
}) : void 0;
|
|
4634
4650
|
let middlewareFailed = false;
|
|
4635
4651
|
try {
|
|
4636
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
4652
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _330 => _330.hasMiddleware, 'call', _331 => _331()])) {
|
|
4637
4653
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
4638
4654
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
4639
4655
|
farmApp.getServerRenderer(),
|
|
@@ -4646,7 +4662,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4646
4662
|
throw error;
|
|
4647
4663
|
});
|
|
4648
4664
|
if (handled) {
|
|
4649
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4665
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _332 => _332.isEnded, 'call', _333 => _333()])) {
|
|
4650
4666
|
const duration = Date.now() - startTime;
|
|
4651
4667
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4652
4668
|
}
|
|
@@ -4661,8 +4677,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4661
4677
|
res
|
|
4662
4678
|
);
|
|
4663
4679
|
}
|
|
4664
|
-
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess',
|
|
4665
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4680
|
+
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _334 => _334.isEnded, 'call', _335 => _335()])) {
|
|
4681
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _336 => _336.isEnded, 'call', _337 => _337()])) {
|
|
4666
4682
|
const duration = Date.now() - startTime;
|
|
4667
4683
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4668
4684
|
}
|
|
@@ -4681,8 +4697,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4681
4697
|
await pm.reportRuntimeRequestError(runtimeSession, error);
|
|
4682
4698
|
} else {
|
|
4683
4699
|
await pm.failRuntimeRequest(runtimeSession, error);
|
|
4684
|
-
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4685
|
-
_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4700
|
+
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _338 => _338.isEnded, 'call', _339 => _339()])) {
|
|
4701
|
+
_optionalChain([responseInterceptor, 'optionalAccess', _340 => _340.release, 'call', _341 => _341()]);
|
|
4686
4702
|
console.error("[FARM] Page error:", error);
|
|
4687
4703
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
4688
4704
|
return;
|
|
@@ -4699,7 +4715,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4699
4715
|
}
|
|
4700
4716
|
})
|
|
4701
4717
|
);
|
|
4702
|
-
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access',
|
|
4718
|
+
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _342 => _342.stack, 'access', _343 => _343.at, 'call', _344 => _344(-1), 'optionalAccess', _345 => _345.handle]);
|
|
4703
4719
|
if (farmOwnsDevCors && viteServer.config.server.cors === false) {
|
|
4704
4720
|
farmMiddlewares.use(createFarmDevViteCorsMiddleware());
|
|
4705
4721
|
}
|
|
@@ -4728,7 +4744,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4728
4744
|
});
|
|
4729
4745
|
}
|
|
4730
4746
|
if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
|
|
4731
|
-
const root = _optionalChain([farmApp, 'optionalAccess',
|
|
4747
|
+
const root = _optionalChain([farmApp, 'optionalAccess', _346 => _346.getConfig, 'call', _347 => _347(), 'access', _348 => _348.root]) || _optionalChain([server, 'optionalAccess', _349 => _349.config, 'access', _350 => _350.root]) || options.root;
|
|
4732
4748
|
return this.resolve(id, path6.join(root, "package.json"), {
|
|
4733
4749
|
...resolveOptions,
|
|
4734
4750
|
skipSelf: true
|
|
@@ -4756,7 +4772,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4756
4772
|
}
|
|
4757
4773
|
},
|
|
4758
4774
|
async load(id, loadOptions) {
|
|
4759
|
-
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess',
|
|
4775
|
+
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _351 => _351.ssr]) && !farmSetupContext.getStore()) {
|
|
4760
4776
|
await pendingClientSetup;
|
|
4761
4777
|
}
|
|
4762
4778
|
if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
|
|
@@ -4774,8 +4790,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4774
4790
|
if (imageModule) return imageModule;
|
|
4775
4791
|
}
|
|
4776
4792
|
if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4777
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess',
|
|
4778
|
-
const root = _optionalChain([server, 'optionalAccess',
|
|
4793
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _352 => _352.getConfig, 'call', _353 => _353(), 'access', _354 => _354.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4794
|
+
const root = _optionalChain([server, 'optionalAccess', _355 => _355.config, 'access', _356 => _356.root]) || options.root;
|
|
4779
4795
|
if (isClientEnvironment(this, loadOptions)) {
|
|
4780
4796
|
return generateProgrammaticClientRouteModuleForId(
|
|
4781
4797
|
id,
|
|
@@ -4791,65 +4807,65 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4791
4807
|
return FARM_DEV_CLIENT_BOOT_MODULE;
|
|
4792
4808
|
}
|
|
4793
4809
|
if (isFarmClientVirtualId(id)) {
|
|
4794
|
-
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
4795
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4796
|
-
const integrations = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4797
|
-
const root = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4798
|
-
const docs = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4810
|
+
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _357 => _357.getConfig, 'call', _358 => _358()]);
|
|
4811
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _359 => _359.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4812
|
+
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _360 => _360.integrations]) || options.integrations;
|
|
4813
|
+
const root = _optionalChain([resolvedConfig, 'optionalAccess', _361 => _361.root]) || _optionalChain([server, 'optionalAccess', _362 => _362.config, 'access', _363 => _363.root]) || process.cwd();
|
|
4814
|
+
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _364 => _364.docs]);
|
|
4799
4815
|
const adapterOwnsDocsRuntime = Boolean(
|
|
4800
|
-
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess',
|
|
4816
|
+
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _365 => _365.adapter, 'optionalAccess', _366 => _366.server]) && docs.adapter.react
|
|
4801
4817
|
);
|
|
4802
|
-
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4818
|
+
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _367 => _367.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
4803
4819
|
const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
|
|
4804
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4805
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4820
|
+
_optionalChain([docs, 'optionalAccess', _368 => _368.enabled]) ? loadFarmDocsDevRuntime() : null,
|
|
4821
|
+
_optionalChain([docs, 'optionalAccess', _369 => _369.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
|
|
4806
4822
|
devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
|
|
4807
4823
|
]);
|
|
4808
|
-
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess',
|
|
4824
|
+
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _370 => _370.isFarmDocsSearchEnabled, 'call', _371 => _371(docs)]), () => ( false));
|
|
4809
4825
|
const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
|
|
4810
4826
|
docsSearchEnabled,
|
|
4811
4827
|
docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
|
|
4812
4828
|
) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
|
|
4813
4829
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4814
4830
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4815
|
-
const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ?
|
|
4816
|
-
const isolatedHydrationMode =
|
|
4817
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4831
|
+
const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkAF3PNVVFcjs.getIntegrationProviders.call(void 0, integrations) : [];
|
|
4832
|
+
const isolatedHydrationMode = _chunkPMKUTZGRcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
4833
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.experimental, 'optionalAccess', _373 => _373.isolatedClientHydration]),
|
|
4818
4834
|
{
|
|
4819
|
-
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4835
|
+
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.experimental, 'optionalAccess', _375 => _375.serverComponents])) === "rsc",
|
|
4820
4836
|
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
|
|
4821
4837
|
}
|
|
4822
4838
|
);
|
|
4823
4839
|
return generateClientCode(
|
|
4824
4840
|
integrationProviders,
|
|
4825
4841
|
[
|
|
4826
|
-
...
|
|
4827
|
-
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess',
|
|
4842
|
+
..._chunkAF3PNVVFcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
4843
|
+
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _376 => _376.getFarmDocsDocumentNavigationMatchers, 'call', _377 => _377(docs)]), () => ( []))
|
|
4828
4844
|
],
|
|
4829
4845
|
generatedDocsSearchRuntime,
|
|
4830
4846
|
`${generatedDevtoolsClientRuntime}
|
|
4831
4847
|
${generatedDevIndicatorsClientRuntime}`,
|
|
4832
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4848
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.plugins]) || [],
|
|
4833
4849
|
root,
|
|
4834
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4835
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4836
|
-
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess',
|
|
4850
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.srcDir]) || options.srcDir || "src",
|
|
4851
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
4852
|
+
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _381 => _381.adapter, 'optionalAccess', _382 => _382.react]) : void 0,
|
|
4837
4853
|
renderer,
|
|
4838
|
-
isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
4839
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4840
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4841
|
-
|
|
4842
|
-
|
|
4854
|
+
isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _383 => _383.getRouteManager, 'call', _384 => _384(), 'access', _385 => _385.getIsolatedClientBoundaryModules, 'call', _386 => _386(root)])))), 'optionalAccess', _387 => _387.size]) > 0,
|
|
4855
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.trailingSlash]), () => ( false)),
|
|
4856
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.basePath]), () => ( "/")),
|
|
4857
|
+
_chunkSIYELCIXcjs.generateClientCachePersistenceCode.call(void 0,
|
|
4858
|
+
_chunkSIYELCIXcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.cache]))
|
|
4843
4859
|
),
|
|
4844
4860
|
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
4845
|
-
_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4861
|
+
_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.serverComponents])) === "islands"
|
|
4846
4862
|
);
|
|
4847
4863
|
}
|
|
4848
4864
|
if (id === "/@farm/server") {
|
|
4849
4865
|
return generateServerCode();
|
|
4850
4866
|
}
|
|
4851
4867
|
if (id === "/@farm/manifest") {
|
|
4852
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
4868
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _393 => _393.getRouteManager, 'call', _394 => _394()]);
|
|
4853
4869
|
if (!routeManager) {
|
|
4854
4870
|
return `
|
|
4855
4871
|
export const getManifest = () => ({
|
|
@@ -4861,11 +4877,11 @@ export const getManifest = () => ({
|
|
|
4861
4877
|
});
|
|
4862
4878
|
`;
|
|
4863
4879
|
}
|
|
4864
|
-
const globalStylesheetHref =
|
|
4880
|
+
const globalStylesheetHref = _chunkSIYELCIXcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
4865
4881
|
server.config.root,
|
|
4866
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
4882
|
+
_optionalChain([farmApp, 'optionalAccess', _395 => _395.getConfig, 'call', _396 => _396(), 'access', _397 => _397.srcDir])
|
|
4867
4883
|
);
|
|
4868
|
-
const fullManifest =
|
|
4884
|
+
const fullManifest = _chunkSIYELCIXcjs.createFarmDevClientManifest.call(void 0,
|
|
4869
4885
|
routeManager.generateClientManifest(server.config.root),
|
|
4870
4886
|
{
|
|
4871
4887
|
sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
|
|
@@ -4881,64 +4897,64 @@ export { manifest };
|
|
|
4881
4897
|
}
|
|
4882
4898
|
},
|
|
4883
4899
|
async transform(code, id, transformOptions) {
|
|
4884
|
-
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess',
|
|
4900
|
+
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _398 => _398.ssr]) && !farmSetupContext.getStore()) {
|
|
4885
4901
|
await pendingClientSetup;
|
|
4886
4902
|
}
|
|
4887
|
-
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess',
|
|
4888
|
-
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4903
|
+
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _399 => _399.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
4904
|
+
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _400 => _400.getConfig, 'call', _401 => _401()]), () => ( options));
|
|
4889
4905
|
let rewrotePackageImports = false;
|
|
4890
|
-
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access',
|
|
4906
|
+
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _402 => _402.experimental, 'optionalAccess', _403 => _403.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _404 => _404.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkPMKUTZGRcjs.hasUseClientDirective.call(void 0, code)) {
|
|
4891
4907
|
const file = id.split("?", 1)[0];
|
|
4892
|
-
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
4908
|
+
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _405 => _405.config, 'access', _406 => _406.root]) || process.cwd();
|
|
4893
4909
|
const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
|
|
4894
4910
|
const rewrite = () => {
|
|
4895
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
4911
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _407 => _407.ssr]) === true) {
|
|
4896
4912
|
if (farmReactServerFiles.has(file)) {
|
|
4897
|
-
for (const child of
|
|
4913
|
+
for (const child of _chunkPMKUTZGRcjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
4898
4914
|
farmReactServerFiles.add(child);
|
|
4899
4915
|
}
|
|
4900
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
4916
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkPMKUTZGRcjs.getFarmClientReachableModules.call(void 0,
|
|
4901
4917
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
4902
4918
|
projectRoot
|
|
4903
4919
|
).has(path6.resolve(file));
|
|
4904
|
-
const reactServer = !serverModule ? null :
|
|
4920
|
+
const reactServer = !serverModule ? null : _chunkPMKUTZGRcjs.rewriteFarmReactServerImports.call(void 0, {
|
|
4905
4921
|
code,
|
|
4906
4922
|
file,
|
|
4907
|
-
reference: (specifier, exportName) =>
|
|
4923
|
+
reference: (specifier, exportName) => _chunkPMKUTZGRcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
4908
4924
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
4909
4925
|
});
|
|
4910
4926
|
if (reactServer !== null) {
|
|
4911
4927
|
code = reactServer;
|
|
4912
4928
|
rewrotePackageImports = true;
|
|
4913
4929
|
}
|
|
4914
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
4930
|
+
const internal = farmReactServerFiles.has(file) ? _chunkPMKUTZGRcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
4915
4931
|
code,
|
|
4916
4932
|
file,
|
|
4917
|
-
reference: (clientFile) =>
|
|
4933
|
+
reference: (clientFile) => _chunkPMKUTZGRcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
4918
4934
|
}) : null;
|
|
4919
4935
|
if (internal !== null) {
|
|
4920
4936
|
code = internal;
|
|
4921
4937
|
rewrotePackageImports = true;
|
|
4922
4938
|
}
|
|
4923
4939
|
}
|
|
4924
|
-
const rewritePackageImports = (source2) =>
|
|
4940
|
+
const rewritePackageImports = (source2) => _chunkPMKUTZGRcjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
4925
4941
|
code: source2,
|
|
4926
4942
|
file,
|
|
4927
4943
|
root: projectRoot,
|
|
4928
|
-
isClientPackage: (specifier) =>
|
|
4944
|
+
isClientPackage: (specifier) => _chunkPMKUTZGRcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
4929
4945
|
});
|
|
4930
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
4946
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _408 => _408.getRouteManager, 'call', _409 => _409()]);
|
|
4931
4947
|
const source = code;
|
|
4932
4948
|
const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
|
|
4933
4949
|
if (referenced !== null) {
|
|
4934
4950
|
code = referenced;
|
|
4935
4951
|
rewrotePackageImports = true;
|
|
4936
4952
|
}
|
|
4937
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
4953
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) === true) {
|
|
4938
4954
|
const cached = rewriteFarmReactCacheImport(
|
|
4939
4955
|
code,
|
|
4940
4956
|
file,
|
|
4941
|
-
_optionalChain([runtimeModule, 'optionalCall',
|
|
4957
|
+
_optionalChain([runtimeModule, 'optionalCall', _411 => _411(FARM_REACT_CACHE_MODULE)])
|
|
4942
4958
|
);
|
|
4943
4959
|
if (cached !== null) {
|
|
4944
4960
|
code = cached;
|
|
@@ -4946,46 +4962,46 @@ export { manifest };
|
|
|
4946
4962
|
}
|
|
4947
4963
|
}
|
|
4948
4964
|
};
|
|
4949
|
-
if (buildSnapshot)
|
|
4965
|
+
if (buildSnapshot) _chunkPMKUTZGRcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
|
|
4950
4966
|
else rewrite();
|
|
4951
4967
|
}
|
|
4952
4968
|
if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
4953
4969
|
const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
|
|
4954
|
-
environment: _optionalChain([transformOptions, 'optionalAccess',
|
|
4970
|
+
environment: _optionalChain([transformOptions, 'optionalAccess', _412 => _412.ssr]) === true ? "rsc" : "client"
|
|
4955
4971
|
});
|
|
4956
4972
|
if (serverFns) {
|
|
4957
4973
|
if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
|
|
4958
4974
|
code = serverFns.code;
|
|
4959
4975
|
}
|
|
4960
4976
|
}
|
|
4961
|
-
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access',
|
|
4977
|
+
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
4962
4978
|
const file = id.split("?", 1)[0];
|
|
4963
4979
|
const actionModule = transformFarmFormActionModule({
|
|
4964
4980
|
code,
|
|
4965
4981
|
id,
|
|
4966
|
-
root: actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
4967
|
-
ssr: _optionalChain([transformOptions, 'optionalAccess',
|
|
4982
|
+
root: actionConfig.root || _optionalChain([server, 'optionalAccess', _415 => _415.config, 'access', _416 => _416.root]) || process.cwd(),
|
|
4983
|
+
ssr: _optionalChain([transformOptions, 'optionalAccess', _417 => _417.ssr]) === true,
|
|
4968
4984
|
// Parsed by file type: page components are TSX.
|
|
4969
4985
|
parse: (source) => _vite.parseSync.call(void 0, file, source).program,
|
|
4970
4986
|
runtimeModule
|
|
4971
4987
|
});
|
|
4972
4988
|
if (actionModule) return { code: actionModule, map: null };
|
|
4973
4989
|
}
|
|
4974
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
4975
|
-
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess',
|
|
4976
|
-
if (
|
|
4977
|
-
const redacted =
|
|
4990
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr])) {
|
|
4991
|
+
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _419 => _419.getConfig, 'call', _420 => _420(), 'optionalAccess', _421 => _421.docs]));
|
|
4992
|
+
if (_chunkSIYELCIXcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
4993
|
+
const redacted = _chunkSIYELCIXcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
4978
4994
|
if (redacted !== null) return { code: redacted, map: null };
|
|
4979
4995
|
}
|
|
4980
4996
|
}
|
|
4981
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
4982
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4983
|
-
if ((_optionalChain([currentConfig, 'access',
|
|
4997
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr])) {
|
|
4998
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _423 => _423.getConfig, 'call', _424 => _424()]), () => ( options));
|
|
4999
|
+
if ((_optionalChain([currentConfig, 'access', _425 => _425.experimental, 'optionalAccess', _426 => _426.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
4984
5000
|
const violation = findClientServerFnViolation(code, id);
|
|
4985
5001
|
if (violation) {
|
|
4986
|
-
const locate =
|
|
5002
|
+
const locate = _chunkPMKUTZGRcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
|
|
4987
5003
|
this.error(
|
|
4988
|
-
|
|
5004
|
+
_chunkPMKUTZGRcjs.formatFarmDiagnostic.call(void 0,
|
|
4989
5005
|
createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
|
|
4990
5006
|
currentConfig.root
|
|
4991
5007
|
)
|
|
@@ -4993,8 +5009,8 @@ export { manifest };
|
|
|
4993
5009
|
}
|
|
4994
5010
|
}
|
|
4995
5011
|
}
|
|
4996
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
4997
|
-
await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5012
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) && shouldInspectClientBoundary(id, code)) {
|
|
5013
|
+
await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _428 => _428.getConfig, 'call', _429 => _429()]), () => ( options)));
|
|
4998
5014
|
}
|
|
4999
5015
|
if (typeof imageImports.transform === "function") {
|
|
5000
5016
|
const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
|
|
@@ -5009,13 +5025,13 @@ export { manifest };
|
|
|
5009
5025
|
id,
|
|
5010
5026
|
transformOptions
|
|
5011
5027
|
);
|
|
5012
|
-
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess',
|
|
5028
|
+
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _430 => _430.code, 'optionalAccess', _431 => _431.toString, 'call', _432 => _432()]);
|
|
5013
5029
|
if (fontCode) {
|
|
5014
5030
|
transformedCode = fontCode;
|
|
5015
5031
|
transformed = true;
|
|
5016
5032
|
}
|
|
5017
5033
|
}
|
|
5018
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5034
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _433 => _433.ssr]) && server) {
|
|
5019
5035
|
const rewrittenImports = rewriteEarlySsrRelativeImports({
|
|
5020
5036
|
code: transformedCode,
|
|
5021
5037
|
id,
|
|
@@ -5027,26 +5043,26 @@ export { manifest };
|
|
|
5027
5043
|
transformed = true;
|
|
5028
5044
|
}
|
|
5029
5045
|
}
|
|
5030
|
-
if (
|
|
5046
|
+
if (_chunkPMKUTZGRcjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
5031
5047
|
const clientBoundarySource = transformedCode;
|
|
5032
5048
|
const moduleInfo = this.getModuleInfo(id);
|
|
5033
5049
|
if (moduleInfo) {
|
|
5034
5050
|
moduleInfo.isClientComponent = true;
|
|
5035
5051
|
}
|
|
5036
|
-
transformedCode =
|
|
5052
|
+
transformedCode = _chunkPMKUTZGRcjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
5037
5053
|
transformed = true;
|
|
5038
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5054
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _434 => _434.getConfig, 'call', _435 => _435()]), () => ( options));
|
|
5039
5055
|
let isolatedModuleReference = null;
|
|
5040
|
-
const root = currentConfig.root || _optionalChain([server, 'optionalAccess',
|
|
5056
|
+
const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _436 => _436.config, 'access', _437 => _437.root]) || process.cwd();
|
|
5041
5057
|
const cleanId = id.split("?", 1)[0];
|
|
5042
|
-
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
5043
|
-
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess',
|
|
5044
|
-
if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (
|
|
5045
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
5058
|
+
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _438 => _438.getRouteManager, 'call', _439 => _439(), 'access', _440 => _440.getIsolatedClientBoundaryModules, 'call', _441 => _441(root)])));
|
|
5059
|
+
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _442 => _442.has, 'call', _443 => _443(path6.resolve(cleanId))]) === true;
|
|
5060
|
+
if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkPMKUTZGRcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
5061
|
+
cleanId.replace(/\\/g, "/").includes(_chunkPMKUTZGRcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5046
5062
|
isolatedModuleReference = _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, cleanId, root);
|
|
5047
|
-
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access',
|
|
5048
|
-
const explicitStrategy =
|
|
5049
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
5063
|
+
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _444 => _444.experimental, 'optionalAccess', _445 => _445.serverComponents])) === "islands";
|
|
5064
|
+
const explicitStrategy = _chunkPMKUTZGRcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
5065
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkSIYELCIXcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
5050
5066
|
if (inference) {
|
|
5051
5067
|
for (const file of inference.files) {
|
|
5052
5068
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -5059,8 +5075,8 @@ export { manifest };
|
|
|
5059
5075
|
islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
|
|
5060
5076
|
parse: (source) => this.parse(source),
|
|
5061
5077
|
slots: islandsMode,
|
|
5062
|
-
browser: _optionalChain([transformOptions, 'optionalAccess',
|
|
5063
|
-
inferredInteraction: _optionalChain([inference, 'optionalAccess',
|
|
5078
|
+
browser: _optionalChain([transformOptions, 'optionalAccess', _446 => _446.ssr]) !== true,
|
|
5079
|
+
inferredInteraction: _optionalChain([inference, 'optionalAccess', _447 => _447.strategy]) === "interaction",
|
|
5064
5080
|
runtimeModule
|
|
5065
5081
|
});
|
|
5066
5082
|
if (!transformedBoundary) {
|
|
@@ -5091,7 +5107,7 @@ export { manifest };
|
|
|
5091
5107
|
);
|
|
5092
5108
|
return;
|
|
5093
5109
|
}` : "";
|
|
5094
|
-
const hmrCode = _optionalChain([transformOptions, 'optionalAccess',
|
|
5110
|
+
const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _448 => _448.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
|
|
5095
5111
|
if (import.meta.hot) {
|
|
5096
5112
|
import.meta.hot.accept((newModule) => {
|
|
5097
5113
|
${isolatedHmrUpdate}
|
|
@@ -5147,14 +5163,14 @@ if (import.meta.hot) {
|
|
|
5147
5163
|
}
|
|
5148
5164
|
_chunkGC5ROI3Acjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
|
|
5149
5165
|
_chunkGC5ROI3Acjs.logger.info("Pre-rendering SSG pages...");
|
|
5150
|
-
const outDir = path6.join(_optionalChain([server, 'optionalAccess',
|
|
5166
|
+
const outDir = path6.join(_optionalChain([server, 'optionalAccess', _449 => _449.config, 'access', _450 => _450.root]) || process.cwd(), options.outDir || "dist");
|
|
5151
5167
|
const clientDir = path6.join(outDir, "client");
|
|
5152
5168
|
for (const page of ssgPages) {
|
|
5153
5169
|
try {
|
|
5154
5170
|
const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
|
|
5155
5171
|
await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
|
|
5156
5172
|
const mod = await routeManager.loadRouteModule(page.filePath);
|
|
5157
|
-
if (!_optionalChain([mod, 'optionalAccess',
|
|
5173
|
+
if (!_optionalChain([mod, 'optionalAccess', _451 => _451.default])) return;
|
|
5158
5174
|
const { layouts } = routeManager.matchRoute(page.urlPath);
|
|
5159
5175
|
const layoutModules = await Promise.all(
|
|
5160
5176
|
layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
|
|
@@ -5186,7 +5202,7 @@ if (import.meta.hot) {
|
|
|
5186
5202
|
const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
5187
5203
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
5188
5204
|
const fullHtml = `<!DOCTYPE html>
|
|
5189
|
-
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
5205
|
+
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _452 => _452.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
5190
5206
|
<head>
|
|
5191
5207
|
<meta charset="utf-8">
|
|
5192
5208
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -5231,12 +5247,12 @@ if (import.meta.hot) {
|
|
|
5231
5247
|
watchChange(id, change) {
|
|
5232
5248
|
const watched = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, id);
|
|
5233
5249
|
if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
|
|
5234
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
5250
|
+
_optionalChain([farmApp, 'optionalAccess', _453 => _453.getRouteManager, 'call', _454 => _454(), 'access', _455 => _455.noteSourceChange, 'call', _456 => _456(id, change.event)]);
|
|
5235
5251
|
}
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5252
|
+
_chunkPMKUTZGRcjs.invalidateFarmClientReachableModules.call(void 0, );
|
|
5253
|
+
_chunkPMKUTZGRcjs.invalidateFarmClientOnlyScan.call(void 0, );
|
|
5254
|
+
_chunkSIYELCIXcjs.invalidateFarmRouteRootInferences.call(void 0, );
|
|
5255
|
+
_chunkPMKUTZGRcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5240
5256
|
},
|
|
5241
5257
|
async handleHotUpdate(ctx) {
|
|
5242
5258
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5261,34 +5277,37 @@ if (import.meta.hot) {
|
|
|
5261
5277
|
server2.moduleGraph.invalidateModule(mod);
|
|
5262
5278
|
}
|
|
5263
5279
|
}
|
|
5264
|
-
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
5280
|
+
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _457 => _457.getConfig, 'call', _458 => _458()]);
|
|
5265
5281
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
5266
|
-
|
|
5282
|
+
const reloadAfterEdit = () => {
|
|
5283
|
+
for (const files of pendingRouteReloads) {
|
|
5284
|
+
if (files.has(normalizedFile)) return;
|
|
5285
|
+
}
|
|
5286
|
+
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5287
|
+
};
|
|
5288
|
+
if (normalizedFile.includes(_chunkPMKUTZGRcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
|
|
5267
5289
|
path6.posix.join(
|
|
5268
|
-
_chunkGC5ROI3Acjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5269
|
-
|
|
5290
|
+
_chunkGC5ROI3Acjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _459 => _459.root]) || options.root || server2.config.root),
|
|
5291
|
+
_chunkPMKUTZGRcjs.FARM_CLIENT_REFERENCE_DIRECTORY
|
|
5270
5292
|
)
|
|
5271
5293
|
))
|
|
5272
5294
|
return modules;
|
|
5273
|
-
if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) &&
|
|
5295
|
+
if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
5274
5296
|
(appDir) => normalizedFile.startsWith(`${_chunkGC5ROI3Acjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
5275
5297
|
)) {
|
|
5276
5298
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
5277
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5278
|
-
|
|
5299
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
|
|
5300
|
+
reloadAfterEdit();
|
|
5279
5301
|
return [];
|
|
5280
5302
|
}
|
|
5281
|
-
const currentSrcRoot = currentFarmConfig ?
|
|
5303
|
+
const currentSrcRoot = currentFarmConfig ? _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
|
|
5282
5304
|
if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkYUCU6XB4cjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
|
|
5283
5305
|
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5284
5306
|
for (const mod of modules) {
|
|
5285
5307
|
server2.moduleGraph.invalidateModule(mod);
|
|
5286
5308
|
}
|
|
5287
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5288
|
-
|
|
5289
|
-
type: "full-reload",
|
|
5290
|
-
path: "*"
|
|
5291
|
-
});
|
|
5309
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _461 => _461(`updated ${file}`)]);
|
|
5310
|
+
reloadAfterEdit();
|
|
5292
5311
|
return [];
|
|
5293
5312
|
}
|
|
5294
5313
|
if (currentSrcRoot && isPotentialProgrammaticRouteSourceFile(normalizedFile, currentSrcRoot) && fileContainsProgrammaticPageRoute(file)) {
|
|
@@ -5297,24 +5316,21 @@ if (import.meta.hot) {
|
|
|
5297
5316
|
for (const mod of modules) {
|
|
5298
5317
|
server2.moduleGraph.invalidateModule(mod);
|
|
5299
5318
|
}
|
|
5300
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5301
|
-
|
|
5302
|
-
type: "full-reload",
|
|
5303
|
-
path: "*"
|
|
5304
|
-
});
|
|
5319
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _462 => _462(`updated ${file}`)]);
|
|
5320
|
+
reloadAfterEdit();
|
|
5305
5321
|
return [];
|
|
5306
5322
|
}
|
|
5307
5323
|
if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
|
|
5308
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5324
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _463 => _463(`updated ${file}`)]);
|
|
5309
5325
|
}
|
|
5310
|
-
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5311
|
-
const planRouteManager = _optionalChain([farmApp, 'optionalAccess',
|
|
5326
|
+
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _464 => _464.experimental, 'optionalAccess', _465 => _465.isolatedClientHydration]);
|
|
5327
|
+
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _466 => _466.getRouteManager, 'call', _467 => _467()]);
|
|
5312
5328
|
const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
|
|
5313
|
-
const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5329
|
+
const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _468 => _468.renderer])) && planRouteManager !== void 0;
|
|
5314
5330
|
let clientPlanCurrent = false;
|
|
5315
5331
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
5316
5332
|
const routeManager = planRouteManager;
|
|
5317
|
-
if (_optionalChain([routeManager, 'optionalAccess',
|
|
5333
|
+
if (_optionalChain([routeManager, 'optionalAccess', _469 => _469.isEditPlanNeutral, 'call', _470 => _470(file)])) {
|
|
5318
5334
|
clientPlanCurrent = true;
|
|
5319
5335
|
} else if (routeManager) {
|
|
5320
5336
|
routeManager.noteSourceChange(file, "update");
|
|
@@ -5346,7 +5362,7 @@ if (import.meta.hot) {
|
|
|
5346
5362
|
const clientModule = server2.moduleGraph.getModuleById(clientId);
|
|
5347
5363
|
if (clientModule) server2.moduleGraph.invalidateModule(clientModule);
|
|
5348
5364
|
}
|
|
5349
|
-
|
|
5365
|
+
reloadAfterEdit();
|
|
5350
5366
|
return [];
|
|
5351
5367
|
}
|
|
5352
5368
|
clientPlanCurrent = true;
|
|
@@ -5375,7 +5391,7 @@ if (import.meta.hot) {
|
|
|
5375
5391
|
}
|
|
5376
5392
|
return [];
|
|
5377
5393
|
}
|
|
5378
|
-
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess',
|
|
5394
|
+
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _471 => _471.getRouteManager, 'call', _472 => _472(), 'access', _473 => _473.invalidateClientManifest, 'call', _474 => _474()]);
|
|
5379
5395
|
const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
|
|
5380
5396
|
if (manifestModule) {
|
|
5381
5397
|
server2.moduleGraph.invalidateModule(manifestModule);
|
|
@@ -5386,16 +5402,13 @@ if (import.meta.hot) {
|
|
|
5386
5402
|
for (const mod of modules) {
|
|
5387
5403
|
server2.moduleGraph.invalidateModule(mod);
|
|
5388
5404
|
}
|
|
5389
|
-
|
|
5390
|
-
type: "full-reload",
|
|
5391
|
-
path: "*"
|
|
5392
|
-
});
|
|
5405
|
+
reloadAfterEdit();
|
|
5393
5406
|
return [];
|
|
5394
5407
|
}
|
|
5395
5408
|
}
|
|
5396
|
-
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access',
|
|
5409
|
+
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _475 => _475.environments, 'access', _476 => _476.client, 'optionalAccess', _477 => _477.moduleGraph, 'access', _478 => _478.getModulesByFile, 'call', _479 => _479(normalizedFile), 'optionalAccess', _480 => _480.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
|
|
5397
5410
|
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5398
|
-
|
|
5411
|
+
reloadAfterEdit();
|
|
5399
5412
|
return [];
|
|
5400
5413
|
}
|
|
5401
5414
|
return modules;
|
|
@@ -5491,7 +5504,7 @@ function createPageDataMiddlewareResponse(res) {
|
|
|
5491
5504
|
return (...args) => {
|
|
5492
5505
|
if (captures(target.statusCode, target.getHeader("location"))) {
|
|
5493
5506
|
const callback = args.find((arg) => typeof arg === "function");
|
|
5494
|
-
_optionalChain([callback, 'optionalCall',
|
|
5507
|
+
_optionalChain([callback, 'optionalCall', _481 => _481()]);
|
|
5495
5508
|
return property === "write" ? true : response;
|
|
5496
5509
|
}
|
|
5497
5510
|
return target[property](...args);
|
|
@@ -5555,12 +5568,12 @@ function isFarmClientVirtualId(id) {
|
|
|
5555
5568
|
}
|
|
5556
5569
|
function isClientEnvironment(context, loadOptions) {
|
|
5557
5570
|
const environment = context.environment;
|
|
5558
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5559
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5560
|
-
return _optionalChain([loadOptions, 'optionalAccess',
|
|
5571
|
+
if (_optionalChain([environment, 'optionalAccess', _482 => _482.config, 'optionalAccess', _483 => _483.consumer])) return environment.config.consumer === "client";
|
|
5572
|
+
if (_optionalChain([environment, 'optionalAccess', _484 => _484.name])) return environment.name === "client";
|
|
5573
|
+
return _optionalChain([loadOptions, 'optionalAccess', _485 => _485.ssr]) !== true;
|
|
5561
5574
|
}
|
|
5562
5575
|
function invalidateProgrammaticClientRouteModules(server) {
|
|
5563
|
-
const graph = _optionalChain([server, 'access',
|
|
5576
|
+
const graph = _optionalChain([server, 'access', _486 => _486.environments, 'optionalAccess', _487 => _487.client, 'optionalAccess', _488 => _488.moduleGraph]);
|
|
5564
5577
|
if (!graph) return;
|
|
5565
5578
|
for (const [id, module] of graph.idToModuleMap) {
|
|
5566
5579
|
if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
|
|
@@ -5570,19 +5583,19 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5570
5583
|
const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5571
5584
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5572
5585
|
watchFile(routesFile);
|
|
5573
|
-
return
|
|
5586
|
+
return _chunkPMKUTZGRcjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5574
5587
|
kind: parsed.kind,
|
|
5575
5588
|
routePath: parsed.routePath,
|
|
5576
5589
|
routesFile,
|
|
5577
|
-
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess',
|
|
5578
|
-
|
|
5590
|
+
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _489 => _489.routes, 'access', _490 => _490.get, 'call', _491 => _491(
|
|
5591
|
+
_chunkPMKUTZGRcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5579
5592
|
)]),
|
|
5580
5593
|
rendererServer: renderer.server,
|
|
5581
5594
|
toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
|
|
5582
5595
|
});
|
|
5583
5596
|
}
|
|
5584
5597
|
function resolveRealModuleFile(filePath, root) {
|
|
5585
|
-
const resolved = _nullishCoalesce(
|
|
5598
|
+
const resolved = _nullishCoalesce(_chunkPMKUTZGRcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5586
5599
|
try {
|
|
5587
5600
|
return _chunkGC5ROI3Acjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5588
5601
|
} catch (e28) {
|
|
@@ -5896,12 +5909,12 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
5896
5909
|
}
|
|
5897
5910
|
const schemas = routeModule.__farmRouteSchemas;
|
|
5898
5911
|
const params = parseRouteModuleSchema(
|
|
5899
|
-
_optionalChain([schemas, 'optionalAccess',
|
|
5912
|
+
_optionalChain([schemas, 'optionalAccess', _492 => _492.params]),
|
|
5900
5913
|
input.props.params,
|
|
5901
5914
|
"params",
|
|
5902
5915
|
input.routePath
|
|
5903
5916
|
);
|
|
5904
|
-
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess',
|
|
5917
|
+
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _493 => _493.search]), input.search, "search", input.routePath);
|
|
5905
5918
|
return {
|
|
5906
5919
|
...input.props,
|
|
5907
5920
|
params,
|
|
@@ -5921,12 +5934,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
5921
5934
|
}
|
|
5922
5935
|
}
|
|
5923
5936
|
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) {
|
|
5924
|
-
const providerClientCode =
|
|
5937
|
+
const providerClientCode = _chunkSIYELCIXcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
5925
5938
|
integrationProviders,
|
|
5926
5939
|
root,
|
|
5927
5940
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
5928
5941
|
);
|
|
5929
|
-
const clientPluginEntry =
|
|
5942
|
+
const clientPluginEntry = _chunk7SAGHWWUcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
5930
5943
|
plugins,
|
|
5931
5944
|
root,
|
|
5932
5945
|
srcDir,
|
|
@@ -5976,7 +5989,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
5976
5989
|
return null;
|
|
5977
5990
|
}
|
|
5978
5991
|
}
|
|
5979
|
-
${islandValues ? `${
|
|
5992
|
+
${islandValues ? `${_chunkSIYELCIXcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
5980
5993
|
let farmLastRouteState = null;
|
|
5981
5994
|
|
|
5982
5995
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -6816,7 +6829,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
6816
6829
|
return loadedLayouts;
|
|
6817
6830
|
}
|
|
6818
6831
|
|
|
6819
|
-
${
|
|
6832
|
+
${_chunkSIYELCIXcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
6820
6833
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
6821
6834
|
let wrapped = element;
|
|
6822
6835
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -7114,7 +7127,7 @@ function readActiveLayoutPatterns() {
|
|
|
7114
7127
|
);
|
|
7115
7128
|
}
|
|
7116
7129
|
|
|
7117
|
-
${
|
|
7130
|
+
${_chunkSIYELCIXcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
7118
7131
|
|
|
7119
7132
|
function activateFragmentScripts(root) {
|
|
7120
7133
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -7173,7 +7186,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
7173
7186
|
return shell.innerHTML;
|
|
7174
7187
|
}
|
|
7175
7188
|
|
|
7176
|
-
${islandValues ?
|
|
7189
|
+
${islandValues ? _chunkSIYELCIXcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
7177
7190
|
container,
|
|
7178
7191
|
fragment,
|
|
7179
7192
|
currentPatterns,
|
|
@@ -7246,7 +7259,7 @@ ${islandValues ? `
|
|
|
7246
7259
|
return nextTarget;
|
|
7247
7260
|
}
|
|
7248
7261
|
|
|
7249
|
-
${islandValues ? `${
|
|
7262
|
+
${islandValues ? `${_chunkSIYELCIXcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
7250
7263
|
|
|
7251
7264
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
7252
7265
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -7943,10 +7956,10 @@ function generateClientManifest(bundle) {
|
|
|
7943
7956
|
return manifest;
|
|
7944
7957
|
}
|
|
7945
7958
|
async function defineConfig(config = {}) {
|
|
7946
|
-
const tailwindVitePlugin = await
|
|
7959
|
+
const tailwindVitePlugin = await _chunk7SAGHWWUcjs.loadTailwindVitePlugin.call(void 0, );
|
|
7947
7960
|
const appRoot = path6.resolve(config.root || process.cwd());
|
|
7948
|
-
if (_optionalChain([config, 'access',
|
|
7949
|
-
const { config: layeredConfig } = await import("./layers-
|
|
7961
|
+
if (_optionalChain([config, 'access', _494 => _494.extends, 'optionalAccess', _495 => _495.length])) {
|
|
7962
|
+
const { config: layeredConfig } = await import("./layers-WP5K5F7W.cjs").then(
|
|
7950
7963
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
7951
7964
|
root: appRoot,
|
|
7952
7965
|
mode: process.env.NODE_ENV === "production" ? "production" : "development"
|
|
@@ -7955,7 +7968,7 @@ async function defineConfig(config = {}) {
|
|
|
7955
7968
|
config = layeredConfig;
|
|
7956
7969
|
}
|
|
7957
7970
|
config.renderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
7958
|
-
config.images =
|
|
7971
|
+
config.images = _chunkSIYELCIXcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
7959
7972
|
const rendererVitePlugins = await _chunk67MZTLTFcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
7960
7973
|
ssr: true
|
|
7961
7974
|
});
|
|
@@ -8047,13 +8060,13 @@ async function defineConfig(config = {}) {
|
|
|
8047
8060
|
if (!serverStarted) {
|
|
8048
8061
|
serverStarted = true;
|
|
8049
8062
|
const elapsed = Date.now() - startTime;
|
|
8050
|
-
const address = _optionalChain([server, 'access',
|
|
8063
|
+
const address = _optionalChain([server, 'access', _496 => _496.httpServer, 'optionalAccess', _497 => _497.address, 'call', _498 => _498()]);
|
|
8051
8064
|
const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
|
|
8052
8065
|
const hostConfig = server.config.server.host;
|
|
8053
8066
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
8054
8067
|
console.log("");
|
|
8055
8068
|
console.log(
|
|
8056
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
8069
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkUYACD4SHcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
8057
8070
|
);
|
|
8058
8071
|
console.log("");
|
|
8059
8072
|
console.log(
|
|
@@ -8087,7 +8100,7 @@ async function defineConfig(config = {}) {
|
|
|
8087
8100
|
plugins: [
|
|
8088
8101
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
8089
8102
|
_chunk3QM74STYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
8090
|
-
|
|
8103
|
+
_chunkSIYELCIXcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
8091
8104
|
tailwindVitePlugin,
|
|
8092
8105
|
...rendererVitePlugins,
|
|
8093
8106
|
...reactRefreshPlugins,
|
|
@@ -8096,16 +8109,16 @@ async function defineConfig(config = {}) {
|
|
|
8096
8109
|
farmServerOnlyEntriesPlugin({ distDir: config.distDir || ".farm" }),
|
|
8097
8110
|
farmIslandContainersPlugin(config),
|
|
8098
8111
|
farmPlugin(config),
|
|
8099
|
-
|
|
8112
|
+
_chunkPMKUTZGRcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
8100
8113
|
farmBrandingPlugin
|
|
8101
8114
|
],
|
|
8102
8115
|
customLogger: farmLogger,
|
|
8103
8116
|
clearScreen: false,
|
|
8104
8117
|
optimizeDeps: {
|
|
8105
|
-
...
|
|
8106
|
-
|
|
8118
|
+
..._chunkSIYELCIXcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
8119
|
+
_chunkSIYELCIXcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
8107
8120
|
appRoot,
|
|
8108
|
-
|
|
8121
|
+
_chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
8109
8122
|
),
|
|
8110
8123
|
config.renderer
|
|
8111
8124
|
),
|
|
@@ -8145,8 +8158,8 @@ async function defineConfig(config = {}) {
|
|
|
8145
8158
|
dedupe: [...config.renderer.dedupe || []],
|
|
8146
8159
|
// Stub out problematic server-only modules during dev mode
|
|
8147
8160
|
alias: {
|
|
8148
|
-
...
|
|
8149
|
-
...
|
|
8161
|
+
..._chunkQMR2TUVZcjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
8162
|
+
..._chunkSIYELCIXcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
8150
8163
|
// Nitro internals that should not be resolved in browser
|
|
8151
8164
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
8152
8165
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|