@farm.js/core 0.2.0-beta.4 → 0.2.1
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/README.md +1 -3
- package/dist/{agent-mcp.d-CAwDC9y4.d.ts → agent-mcp.d--uQgDp_Q.d.ts} +1 -1
- package/dist/{agent-mcp.d-BdFnjlAT.d.mts → agent-mcp.d-DpthRhqr.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +4 -4
- package/dist/agent-runtime.d.ts +4 -4
- package/dist/{analyzer-K3S4YRAH.mjs → analyzer-GLFRODYV.mjs} +2 -2
- package/dist/analyzer-KBVOHASA.cjs +17 -0
- package/dist/api/node.d.mts +6 -6
- package/dist/api/node.d.ts +6 -6
- package/dist/api/route-manager.cjs +3 -3
- package/dist/api/route-manager.d.mts +6 -6
- package/dist/api/route-manager.d.ts +6 -6
- package/dist/api/route-manager.mjs +2 -2
- package/dist/api/runtime.d.mts +5 -5
- package/dist/api/runtime.d.ts +5 -5
- package/dist/api.cjs +4 -4
- package/dist/api.d.mts +7 -7
- package/dist/api.d.ts +7 -7
- package/dist/api.mjs +3 -3
- package/dist/{app-manifest.d-Dczk-fwt.d.ts → app-manifest.d-DMgcFuXQ.d.ts} +1 -1
- package/dist/{app-manifest.d-COs1wBGz.d.mts → app-manifest.d-DXAvPjMw.d.mts} +1 -1
- package/dist/app-markdown.d.mts +5 -5
- package/dist/app-markdown.d.ts +5 -5
- package/dist/{app.d-LepnxO-5.d.mts → app.d-DG_-nN5y.d.mts} +4 -4
- package/dist/{app.d-DREl_yXh.d.ts → app.d-htfGqq-d.d.ts} +4 -4
- package/dist/{chunk-X2SMVPLH.mjs → chunk-2FBFJO2Z.mjs} +8 -5
- package/dist/{chunk-Z3RM3VA2.mjs → chunk-5VXVRMXK.mjs} +11 -1
- package/dist/{chunk-LWQ6IESX.mjs → chunk-BOHBFBRA.mjs} +1 -1
- package/dist/{chunk-V5F6HN7E.mjs → chunk-CPL7WIMP.mjs} +1 -1
- package/dist/{chunk-APKULXZV.cjs → chunk-CS6GXE42.cjs} +91 -21
- package/dist/chunk-CYUTK4JP.cjs +52 -0
- package/dist/{chunk-T4NOMZTS.mjs → chunk-CZMMU3FP.mjs} +4 -4
- package/dist/{chunk-PSALMEHJ.cjs → chunk-D2OU4CX2.cjs} +23 -20
- package/dist/{chunk-5BZ7PR3T.cjs → chunk-D2VLHRBN.cjs} +3 -3
- package/dist/{chunk-D5OY5OKA.mjs → chunk-D5GFVHBV.mjs} +23 -17
- package/dist/{chunk-VGX75645.mjs → chunk-E7ISZK3R.mjs} +8 -5
- package/dist/{chunk-F5T55PYX.cjs → chunk-EIAA4W3M.cjs} +26 -21
- package/dist/{chunk-2PSN2PUJ.cjs → chunk-EWPH5IOC.cjs} +19 -16
- package/dist/{chunk-QBCR2EHA.cjs → chunk-GEZ76JXD.cjs} +3 -3
- package/dist/{chunk-KM7ZRKCH.cjs → chunk-GL4SPJTE.cjs} +10 -10
- package/dist/{chunk-IU4YTFFQ.cjs → chunk-GUYGMTWA.cjs} +12 -9
- package/dist/{chunk-MRDI6MTL.mjs → chunk-H6MYRZ2U.mjs} +15 -10
- package/dist/{chunk-P67RLOMO.mjs → chunk-HBZQIRRM.mjs} +1 -1
- package/dist/{chunk-NNHIV3O2.cjs → chunk-HENYWY5J.cjs} +2 -2
- package/dist/{chunk-HV6CYSMF.mjs → chunk-HHZURH4U.mjs} +1 -17
- package/dist/{chunk-E5AC7E25.cjs → chunk-JJ22OI7J.cjs} +2 -2
- package/dist/{chunk-XPVS4HKU.cjs → chunk-JZAGIXMB.cjs} +1 -1
- package/dist/{chunk-TQCDN4DV.mjs → chunk-KQXYBJES.mjs} +14 -11
- package/dist/{chunk-5UMPMVNF.mjs → chunk-L2KGQXFU.mjs} +1 -1
- package/dist/{chunk-HP7QYVST.cjs → chunk-LEZJZX4C.cjs} +1 -18
- package/dist/{chunk-C4DZAEVT.cjs → chunk-MR64FNW6.cjs} +4 -4
- package/dist/{chunk-LOQVWATF.mjs → chunk-MYJPW4XN.mjs} +2 -2
- package/dist/chunk-O77EKGAS.mjs +36 -0
- package/dist/{chunk-VS4ABIJJ.mjs → chunk-OKZHPPBX.mjs} +1 -1
- package/dist/{chunk-WLOIUPV2.mjs → chunk-P2THJDLH.mjs} +37 -26
- package/dist/{chunk-KBURN62Z.cjs → chunk-PFVNPOKN.cjs} +11 -1
- package/dist/{chunk-IASZIYNM.cjs → chunk-PGU4SCIU.cjs} +302 -297
- package/dist/chunk-PTG5BEMG.mjs +47 -0
- package/dist/{chunk-UBH2OARS.cjs → chunk-PVB5UYJT.cjs} +280 -274
- package/dist/{chunk-EBVKVDQA.mjs → chunk-PZ5ZJAAO.mjs} +1 -1
- package/dist/{chunk-FYVSAWJP.cjs → chunk-Q4FHYBFT.cjs} +11 -11
- package/dist/{chunk-AGT633OM.cjs → chunk-QI3UYN3P.cjs} +11 -11
- package/dist/{chunk-HFOME6I2.mjs → chunk-QJKGRUBR.mjs} +5 -5
- package/dist/{chunk-DFLCEMQ3.mjs → chunk-RCJAOQWW.mjs} +1 -1
- package/dist/{chunk-AGEBFYHF.mjs → chunk-SIJ3DREB.mjs} +1 -1
- package/dist/{chunk-II4ENBE4.mjs → chunk-SPVXL37B.mjs} +1 -1
- package/dist/{chunk-VVIO7QGN.mjs → chunk-TI4BJFYX.mjs} +32 -27
- package/dist/{chunk-MBDDLYT5.cjs → chunk-V6ACETKR.cjs} +4 -4
- package/dist/{chunk-VMIR4SUL.cjs → chunk-W34OS5CK.cjs} +383 -372
- package/dist/{chunk-ANKMAGFJ.mjs → chunk-WRT775N6.mjs} +92 -22
- package/dist/{chunk-DVXT7RLV.cjs → chunk-WXPY5FRF.cjs} +6 -6
- package/dist/{chunk-VQYGXWCS.cjs → chunk-XSE4XJKY.cjs} +2 -2
- package/dist/{chunk-2ORWY3SE.mjs → chunk-XYCB3CXM.mjs} +2 -2
- package/dist/{chunk-XJEOHDPN.cjs → chunk-YCGOQKVC.cjs} +21 -2
- package/dist/{chunk-2UV765GT.cjs → chunk-ZQOHL6TX.cjs} +2 -2
- package/dist/{client-component.d-BA6kXI5L.d.mts → client-component.d-D5JVDeQf.d.mts} +1 -1
- package/dist/{client-component.d-LSEmRhuI.d.ts → client-component.d-DDbDw2yP.d.ts} +1 -1
- package/dist/{client-plugins.d-CVUMc2ai.d.mts → client-plugins.d-9jr2yWR3.d.mts} +21 -16
- package/dist/{client-plugins.d-CQ6AGHP0.d.ts → client-plugins.d-BHqfH3DQ.d.ts} +21 -16
- package/dist/client-plugins.d.mts +4 -4
- package/dist/client-plugins.d.ts +4 -4
- package/dist/client.d.mts +10 -10
- package/dist/client.d.ts +10 -10
- package/dist/config.d.mts +4 -4
- package/dist/config.d.ts +4 -4
- package/dist/desktop.d.mts +5 -5
- package/dist/desktop.d.ts +5 -5
- package/dist/{devtools-OBQY3XOY.cjs → devtools-F6Z436WU.cjs} +12 -9
- package/dist/{devtools-RYTO2V7G.mjs → devtools-ZDBCJI44.mjs} +8 -5
- package/dist/docs.cjs +7 -6
- package/dist/docs.d.mts +6 -6
- package/dist/docs.d.ts +6 -6
- package/dist/docs.mjs +6 -5
- package/dist/environment/vite.cjs +6 -5
- package/dist/environment/vite.d.mts +2 -1
- package/dist/environment/vite.d.ts +2 -1
- package/dist/environment/vite.mjs +5 -4
- package/dist/{generate-route-types.d-BFOMM8Ef.d.mts → generate-route-types.d-CAiRw4N0.d.mts} +1 -1
- package/dist/{generate-route-types.d-C2m8myHb.d.ts → generate-route-types.d-Dz8MOQ3u.d.ts} +1 -1
- package/dist/{handler.d-nkrNn_0M.d.ts → handler.d-Dq_bSEKC.d.ts} +2 -2
- package/dist/{handler.d-DLKZDAYR.d.mts → handler.d-EtTSPkeO.d.mts} +2 -2
- package/dist/{headers.d-C3k520Fc.d.mts → headers.d-BKwGD_uC.d.mts} +1 -1
- package/dist/{headers.d-DVBrYnqP.d.ts → headers.d-CpIHLCEk.d.ts} +1 -1
- package/dist/index.cjs +28 -27
- package/dist/{index.d-e5WhoB07.d.ts → index.d-CoRZKiHA.d.ts} +1 -1
- package/dist/{index.d-5PDB032w.d.mts → index.d-DXtaU9OU.d.mts} +1 -1
- package/dist/index.d.mts +27 -27
- package/dist/index.d.ts +27 -27
- package/dist/index.mjs +23 -22
- package/dist/integrations/orm.d.mts +4 -4
- package/dist/integrations/orm.d.ts +4 -4
- package/dist/integrations.d.mts +4 -4
- package/dist/integrations.d.ts +4 -4
- package/dist/internal/app-markdown-runtime.d.mts +5 -5
- package/dist/internal/app-markdown-runtime.d.ts +5 -5
- package/dist/internal/build-runtime.cjs +23 -22
- package/dist/internal/build-runtime.d.mts +8 -8
- package/dist/internal/build-runtime.d.ts +8 -8
- package/dist/internal/build-runtime.mjs +22 -21
- package/dist/internal/cli-runtime.cjs +14 -10
- package/dist/internal/cli-runtime.d.mts +20 -12
- package/dist/internal/cli-runtime.d.ts +20 -12
- package/dist/internal/cli-runtime.mjs +13 -9
- 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 +8 -8
- package/dist/internal/client-runtime.d.ts +8 -8
- package/dist/internal/compression-runtime.d.mts +4 -4
- package/dist/internal/compression-runtime.d.ts +4 -4
- package/dist/internal/config-runtime.cjs +7 -6
- package/dist/internal/config-runtime.d.mts +8 -8
- package/dist/internal/config-runtime.d.ts +8 -8
- package/dist/internal/config-runtime.mjs +6 -5
- 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 +4 -4
- package/dist/internal/production-runtime.d.mts +13 -13
- package/dist/internal/production-runtime.d.ts +13 -13
- package/dist/internal/production-runtime.mjs +3 -3
- package/dist/internal/spa-router.d.mts +6 -6
- package/dist/internal/spa-router.d.ts +6 -6
- package/dist/internal/start-manifest.d.mts +4 -4
- package/dist/internal/start-manifest.d.ts +4 -4
- package/dist/layers-6R55QDT5.cjs +26 -0
- package/dist/{layers-IMRXNZRB.mjs → layers-O6GUR6LT.mjs} +6 -1
- package/dist/{layers.d-CH0bC4QL.d.ts → layers.d-dNBkiNE9.d.mts} +1 -1
- package/dist/{layers.d-CH0bC4QL.d.mts → layers.d-dNBkiNE9.d.ts} +1 -1
- package/dist/{manager-3DFQDKJ6.cjs → manager-YRIENS63.cjs} +4 -4
- package/dist/{manager-GZUTAN5Q.mjs → manager-YTJOAHII.mjs} +3 -3
- package/dist/markdown.d.mts +4 -4
- package/dist/markdown.d.ts +4 -4
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/mobile.d.mts +4 -4
- package/dist/mobile.d.ts +4 -4
- package/dist/{mount.d-Cbz8vsSZ.d.ts → mount.d-BzK2Z1pR.d.ts} +1 -1
- package/dist/{mount.d-COIrFH0i.d.mts → mount.d-D-ynBlxU.d.mts} +1 -1
- package/dist/{navigation-delegate.d-dlnYTX-Y.d.ts → navigation-delegate.d-DtsnFnNF.d.ts} +1 -1
- package/dist/{navigation-delegate.d-yulG9Dp5.d.mts → navigation-delegate.d-aJh3ZmTY.d.mts} +1 -1
- package/dist/navigation.d.mts +7 -7
- package/dist/navigation.d.ts +7 -7
- package/dist/plugin.cjs +18 -17
- package/dist/plugin.d.mts +8 -8
- package/dist/plugin.d.ts +8 -8
- package/dist/plugin.mjs +17 -16
- package/dist/{render-plan.d-BW56oxMP.d.mts → render-plan.d-C6nUIU2m.d.mts} +1 -1
- package/dist/{render-plan.d-Cz7bQmcf.d.ts → render-plan.d-h8bkOQyh.d.ts} +1 -1
- package/dist/renderer-client.d.mts +8 -8
- package/dist/renderer-client.d.ts +8 -8
- package/dist/renderer.cjs +4 -3
- package/dist/renderer.d.mts +1 -1
- package/dist/renderer.d.ts +1 -1
- package/dist/renderer.mjs +3 -2
- package/dist/{request.d-BwgX-7Wi.d.mts → request.d-CBEdJD5R.d.mts} +1 -1
- package/dist/{request.d-BaFROByP.d.ts → request.d-CrriEvxy.d.ts} +1 -1
- package/dist/request.d.mts +5 -5
- package/dist/request.d.ts +5 -5
- package/dist/{route-rendering.d-D4kUuncg.d.ts → route-rendering.d-C-ivf31T.d.ts} +1 -1
- package/dist/{route-rendering.d-BzeFPYGc.d.mts → route-rendering.d-DgXpNk_c.d.mts} +1 -1
- package/dist/{router.d-B9qJdgjt.d.ts → router.d-BRRPd5dE.d.ts} +1 -1
- package/dist/{router.d-D-p8WElf.d.mts → router.d-O5LrW9mZ.d.mts} +1 -1
- package/dist/{routes.d-D7RWvfqL.d.ts → routes.d-CYe98R_8.d.ts} +1 -1
- package/dist/{routes.d-BWvpUoYu.d.mts → routes.d-DBGnKaUQ.d.mts} +1 -1
- package/dist/routes.d.mts +4 -4
- package/dist/routes.d.ts +4 -4
- package/dist/{rsc-pipeline-YHVEHWTU.cjs → rsc-pipeline-2DNM7UDA.cjs} +8 -7
- package/dist/{rsc-pipeline-Y6D6KBES.mjs → rsc-pipeline-HYINQPMW.mjs} +7 -6
- package/dist/{runtime-62ZIEV6U.mjs → runtime-JP7L5KI7.mjs} +11 -8
- package/dist/{runtime-LKEMFXHW.cjs → runtime-M6GLD4CR.cjs} +15 -12
- package/dist/{runtime.d-BUtDIrRJ.d.mts → runtime.d-DP8Sk9PM.d.mts} +1 -1
- package/dist/{runtime.d-Du64AX3R.d.ts → runtime.d-DW_1avVi.d.ts} +1 -1
- package/dist/{cli-runtime.d-Bvfxt4uo.d.ts → schema-dependencies.d-C__RyTvW.d.ts} +21 -13
- package/dist/{cli-runtime.d-BGaFPum1.d.mts → schema-dependencies.d-Cedd7QUf.d.mts} +21 -13
- package/dist/{schema.d-BM-uVGpx.d.mts → schema.d-HlGSe1on.d.mts} +1 -1
- package/dist/{schema.d-BM-uVGpx.d.ts → schema.d-HlGSe1on.d.ts} +1 -1
- package/dist/schema.d.mts +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/{server-components-status.d-CvFhb6-t.d.ts → server-components-status.d-CdsEQbeM.d.ts} +3 -3
- package/dist/{server-components-status.d-B0YP-m9A.d.mts → server-components-status.d-DN98yOT4.d.mts} +3 -3
- package/dist/server-plugins.d.mts +6 -6
- package/dist/server-plugins.d.ts +6 -6
- package/dist/server.cjs +56 -53
- package/dist/server.d.mts +15 -15
- package/dist/server.d.ts +15 -15
- package/dist/server.mjs +23 -20
- package/dist/{spa-router.d-D4ye2WFk.d.ts → spa-router.d-BJWZAdrV.d.ts} +2 -2
- package/dist/{spa-router.d-CkR14oGH.d.mts → spa-router.d-FcDbBCrK.d.mts} +2 -2
- package/dist/{ssg.d-DFs97VTY.d.mts → ssg.d--uut8Gya.d.mts} +3 -3
- package/dist/{ssg.d-BCJB_f7B.d.ts → ssg.d-Cf9mC1rZ.d.ts} +3 -3
- package/dist/storage.d.mts +2 -2
- package/dist/storage.d.ts +2 -2
- package/dist/{store-core.d-Vk5UDKeC.d.mts → store-core.d-DgYlAo-e.d.mts} +2 -2
- package/dist/{store-core.d-0W2YScl8.d.ts → store-core.d-h7o6V2kH.d.ts} +2 -2
- package/dist/testing.cjs +2 -2
- package/dist/testing.d.mts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.mjs +2 -2
- package/dist/{types.d-C5hlNbHa.d.mts → types.d-CRiwa0jj.d.mts} +1 -1
- package/dist/{types.d-C5hlNbHa.d.ts → types.d-CRiwa0jj.d.ts} +1 -1
- package/dist/{utils.d-Ba3N28fk.d.ts → utils.d-2lGEnyBc.d.ts} +1 -1
- package/dist/{utils.d-Cloiko8d.d.mts → utils.d-DjFApBfE.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +18 -17
- package/dist/vite.d.mts +9 -9
- package/dist/vite.d.ts +9 -9
- package/dist/vite.mjs +17 -16
- package/package.json +1 -1
- package/dist/analyzer-3AMJK27J.cjs +0 -17
- package/dist/chunk-GTHBWZUK.mjs +0 -17
- package/dist/layers-GP57TBE2.cjs +0 -21
|
@@ -44,7 +44,7 @@ var _chunk6QWCFVGLcjs = require('./chunk-6QWCFVGL.cjs');
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkPVB5UYJTcjs = require('./chunk-PVB5UYJT.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
@@ -59,10 +59,10 @@ var _chunkYQXLBYY2cjs = require('./chunk-YQXLBYY2.cjs');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkGL4SPJTEcjs = require('./chunk-GL4SPJTE.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
var
|
|
65
|
+
var _chunkV6ACETKRcjs = require('./chunk-V6ACETKR.cjs');
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
@@ -89,13 +89,13 @@ var _chunkXVD5Y6S4cjs = require('./chunk-XVD5Y6S4.cjs');
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
var
|
|
92
|
+
var _chunkMR64FNW6cjs = require('./chunk-MR64FNW6.cjs');
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
98
|
+
var _chunkHENYWY5Jcjs = require('./chunk-HENYWY5J.cjs');
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
|
|
@@ -148,7 +148,7 @@ var _chunkSIQPXYBBcjs = require('./chunk-SIQPXYBB.cjs');
|
|
|
148
148
|
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
var
|
|
151
|
+
var _chunkD2OU4CX2cjs = require('./chunk-D2OU4CX2.cjs');
|
|
152
152
|
|
|
153
153
|
|
|
154
154
|
|
|
@@ -172,7 +172,7 @@ var _chunkQZRFEHMScjs = require('./chunk-QZRFEHMS.cjs');
|
|
|
172
172
|
var _chunkRQSPBWXJcjs = require('./chunk-RQSPBWXJ.cjs');
|
|
173
173
|
|
|
174
174
|
|
|
175
|
-
var
|
|
175
|
+
var _chunkGUYGMTWAcjs = require('./chunk-GUYGMTWA.cjs');
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
|
|
@@ -185,7 +185,7 @@ var _chunk25CHWAZYcjs = require('./chunk-25CHWAZY.cjs');
|
|
|
185
185
|
|
|
186
186
|
|
|
187
187
|
|
|
188
|
-
var
|
|
188
|
+
var _chunkPFVNPOKNcjs = require('./chunk-PFVNPOKN.cjs');
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
|
|
@@ -195,8 +195,11 @@ var _chunkKBURN62Zcjs = require('./chunk-KBURN62Z.cjs');
|
|
|
195
195
|
|
|
196
196
|
|
|
197
197
|
|
|
198
|
+
var _chunkLEZJZX4Ccjs = require('./chunk-LEZJZX4C.cjs');
|
|
198
199
|
|
|
199
|
-
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
var _chunkCYUTK4JPcjs = require('./chunk-CYUTK4JP.cjs');
|
|
200
203
|
|
|
201
204
|
|
|
202
205
|
var _chunkXH4GQ7MTcjs = require('./chunk-XH4GQ7MT.cjs');
|
|
@@ -250,11 +253,12 @@ var _chunkIVEV44O2cjs = require('./chunk-IVEV44O2.cjs');
|
|
|
250
253
|
var _chunkKSRWTQ6Jcjs = require('./chunk-KSRWTQ6J.cjs');
|
|
251
254
|
|
|
252
255
|
|
|
253
|
-
var
|
|
256
|
+
var _chunkD2VLHRBNcjs = require('./chunk-D2VLHRBN.cjs');
|
|
254
257
|
|
|
255
258
|
|
|
256
259
|
|
|
257
|
-
|
|
260
|
+
|
|
261
|
+
var _chunkYCGOQKVCcjs = require('./chunk-YCGOQKVC.cjs');
|
|
258
262
|
|
|
259
263
|
|
|
260
264
|
var _chunkYCIFGYBYcjs = require('./chunk-YCIFGYBY.cjs');
|
|
@@ -317,7 +321,7 @@ var _chunkK6LZMZNBcjs = require('./chunk-K6LZMZNB.cjs');
|
|
|
317
321
|
var _chunkRFKPIAOFcjs = require('./chunk-RFKPIAOF.cjs');
|
|
318
322
|
|
|
319
323
|
|
|
320
|
-
var
|
|
324
|
+
var _chunkJZAGIXMBcjs = require('./chunk-JZAGIXMB.cjs');
|
|
321
325
|
|
|
322
326
|
|
|
323
327
|
var _chunkG5KGLMPNcjs = require('./chunk-G5KGLMPN.cjs');
|
|
@@ -734,7 +738,7 @@ function findClientServerFnViolation(code, id) {
|
|
|
734
738
|
return null;
|
|
735
739
|
}
|
|
736
740
|
function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
737
|
-
return
|
|
741
|
+
return _chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
|
|
738
742
|
"CLIENT_SERVER_FUNCTION",
|
|
739
743
|
id,
|
|
740
744
|
`${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.`,
|
|
@@ -994,21 +998,21 @@ function readPropertyKey(property) {
|
|
|
994
998
|
function createClientBoundaryDiagnostic(file, finding, location) {
|
|
995
999
|
switch (finding.kind) {
|
|
996
1000
|
case "server-env":
|
|
997
|
-
return
|
|
1001
|
+
return _chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
|
|
998
1002
|
"CLIENT_SERVER_ENV",
|
|
999
1003
|
file,
|
|
1000
1004
|
`process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
|
|
1001
1005
|
location
|
|
1002
1006
|
);
|
|
1003
1007
|
case "public-env":
|
|
1004
|
-
return
|
|
1008
|
+
return _chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
|
|
1005
1009
|
"CLIENT_PROCESS_ENV_PUBLIC",
|
|
1006
1010
|
file,
|
|
1007
1011
|
`process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
|
|
1008
1012
|
location
|
|
1009
1013
|
);
|
|
1010
1014
|
case "builtin":
|
|
1011
|
-
return
|
|
1015
|
+
return _chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
|
|
1012
1016
|
"CLIENT_NODE_BUILTIN",
|
|
1013
1017
|
file,
|
|
1014
1018
|
`"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
|
|
@@ -1309,13 +1313,13 @@ function loadFarmDocsSearchDevRuntime() {
|
|
|
1309
1313
|
return import("./search-client-Z7KDVD4C.cjs");
|
|
1310
1314
|
}
|
|
1311
1315
|
function loadFarmOpenAPIDevRuntime() {
|
|
1312
|
-
return import("./manager-
|
|
1316
|
+
return import("./manager-YRIENS63.cjs");
|
|
1313
1317
|
}
|
|
1314
1318
|
function loadFarmWorkflowsDevRuntime() {
|
|
1315
1319
|
return import("./workflows.cjs");
|
|
1316
1320
|
}
|
|
1317
1321
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1318
|
-
return import("./devtools-
|
|
1322
|
+
return import("./devtools-F6Z436WU.cjs");
|
|
1319
1323
|
}
|
|
1320
1324
|
function loadFarmDevtoolsUIRuntime() {
|
|
1321
1325
|
return import("./devtools-ui-TPBPQEEB.cjs");
|
|
@@ -1340,7 +1344,7 @@ function farmI18nClientBridgePlugin() {
|
|
|
1340
1344
|
};
|
|
1341
1345
|
}
|
|
1342
1346
|
function farmNavigationPlugin(renderer) {
|
|
1343
|
-
const otherRenderer = !
|
|
1347
|
+
const otherRenderer = !_chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
|
|
1344
1348
|
return {
|
|
1345
1349
|
name: "farm:navigation",
|
|
1346
1350
|
config() {
|
|
@@ -1365,16 +1369,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1365
1369
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1366
1370
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1367
1371
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1368
|
-
|
|
1369
|
-
new RegExp(`^${
|
|
1372
|
+
_chunkPVB5UYJTcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1373
|
+
new RegExp(`^${_chunkD2OU4CX2cjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1370
1374
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1371
1375
|
// included.
|
|
1372
1376
|
/^node:/,
|
|
1373
|
-
|
|
1377
|
+
_chunkPVB5UYJTcjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1374
1378
|
];
|
|
1375
1379
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1376
|
-
|
|
1377
|
-
new RegExp(`^${
|
|
1380
|
+
_chunkPVB5UYJTcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1381
|
+
new RegExp(`^${_chunkD2OU4CX2cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1378
1382
|
];
|
|
1379
1383
|
function createFarmPlatformClientModule(platform) {
|
|
1380
1384
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1410,29 +1414,29 @@ function farmIslandContainersPlugin(config) {
|
|
|
1410
1414
|
// without calling into JavaScript.
|
|
1411
1415
|
filter: {
|
|
1412
1416
|
id: { include: /\.[jt]sx(?:$|\?)/, exclude: /\/node_modules\// },
|
|
1413
|
-
code:
|
|
1417
|
+
code: _chunkD2OU4CX2cjs.FARM_ISLAND_CONTAINER_TAG
|
|
1414
1418
|
},
|
|
1415
1419
|
handler(code, id) {
|
|
1416
|
-
if (
|
|
1420
|
+
if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) !== "islands") {
|
|
1417
1421
|
return null;
|
|
1418
1422
|
}
|
|
1419
1423
|
if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
|
|
1420
1424
|
return null;
|
|
1421
1425
|
}
|
|
1422
|
-
if (
|
|
1423
|
-
if (!
|
|
1426
|
+
if (_chunkD2OU4CX2cjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1427
|
+
if (!_chunkD2OU4CX2cjs.FARM_ISLAND_CONTAINER_TAG.test(code)) return null;
|
|
1424
1428
|
const file = id.split("?", 1)[0];
|
|
1425
|
-
const inspect = () =>
|
|
1429
|
+
const inspect = () => _chunkD2OU4CX2cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1426
1430
|
const bindings = farmApi ? farmApi.inspectPackages(inspect) : inspect();
|
|
1427
1431
|
if (bindings.length === 0) return null;
|
|
1428
|
-
const grown =
|
|
1432
|
+
const grown = _chunkD2OU4CX2cjs.wrapFarmIslandContainers.call(void 0, {
|
|
1429
1433
|
code,
|
|
1430
1434
|
file,
|
|
1431
1435
|
bindings,
|
|
1432
|
-
reference:
|
|
1436
|
+
reference: _chunkD2OU4CX2cjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1433
1437
|
});
|
|
1434
1438
|
if (grown === null) return null;
|
|
1435
|
-
|
|
1439
|
+
_chunkD2OU4CX2cjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1436
1440
|
return { code: grown, map: null };
|
|
1437
1441
|
}
|
|
1438
1442
|
}
|
|
@@ -1447,18 +1451,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1447
1451
|
config(config) {
|
|
1448
1452
|
const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
|
|
1449
1453
|
if (options.distDir) {
|
|
1450
|
-
|
|
1454
|
+
_chunkD2OU4CX2cjs.usePackageScanCacheFile.call(void 0,
|
|
1451
1455
|
path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
|
|
1452
1456
|
);
|
|
1453
1457
|
}
|
|
1454
|
-
const bundledPackages =
|
|
1458
|
+
const bundledPackages = _chunkD2OU4CX2cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
|
|
1455
1459
|
const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
|
|
1456
|
-
|
|
1460
|
+
_chunkD2OU4CX2cjs.persistPackageScanCache.call(void 0, );
|
|
1457
1461
|
return {
|
|
1458
1462
|
optimizeDeps: {
|
|
1459
1463
|
// A package that defines fonts is served unbundled, so Farm's font compiler sees it.
|
|
1460
1464
|
exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
|
|
1461
|
-
rolldownOptions: { plugins: [
|
|
1465
|
+
rolldownOptions: { plugins: [_chunkD2OU4CX2cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
|
|
1462
1466
|
},
|
|
1463
1467
|
ssr: {
|
|
1464
1468
|
noExternal: [
|
|
@@ -1478,14 +1482,14 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1478
1482
|
resolveId: {
|
|
1479
1483
|
filter: { id: FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER },
|
|
1480
1484
|
handler(id, importer, options2) {
|
|
1481
|
-
if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess',
|
|
1485
|
+
if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _74 => _74.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
|
|
1482
1486
|
if (id === SERVER_ONLY_PACKAGE) {
|
|
1483
|
-
if (_optionalChain([options2, 'optionalAccess',
|
|
1487
|
+
if (_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) || _optionalChain([options2, 'optionalAccess', _76 => _76.scan])) {
|
|
1484
1488
|
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1485
1489
|
}
|
|
1486
1490
|
this.error(
|
|
1487
|
-
|
|
1488
|
-
|
|
1491
|
+
_chunkD2OU4CX2cjs.formatFarmDiagnostic.call(void 0,
|
|
1492
|
+
_chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
|
|
1489
1493
|
"CLIENT_SERVER_ONLY_IMPORT",
|
|
1490
1494
|
_nullishCoalesce(importer, () => ( "<unknown module>")),
|
|
1491
1495
|
`${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
|
|
@@ -1494,10 +1498,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1494
1498
|
)
|
|
1495
1499
|
);
|
|
1496
1500
|
}
|
|
1497
|
-
if (!_optionalChain([options2, 'optionalAccess',
|
|
1498
|
-
return
|
|
1501
|
+
if (!_optionalChain([options2, 'optionalAccess', _77 => _77.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1502
|
+
return _chunkD2OU4CX2cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1499
1503
|
}
|
|
1500
|
-
const resolveFrom = importer ?
|
|
1504
|
+
const resolveFrom = importer ? _chunkD2OU4CX2cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1501
1505
|
if (resolveFrom) {
|
|
1502
1506
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1503
1507
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1512,10 +1516,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1512
1516
|
}
|
|
1513
1517
|
if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
|
|
1514
1518
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1515
|
-
if (!_optionalChain([options2, 'optionalAccess',
|
|
1519
|
+
if (!_optionalChain([options2, 'optionalAccess', _78 => _78.ssr])) {
|
|
1516
1520
|
this.error(
|
|
1517
|
-
|
|
1518
|
-
|
|
1521
|
+
_chunkD2OU4CX2cjs.formatFarmDiagnostic.call(void 0,
|
|
1522
|
+
_chunkD2OU4CX2cjs.createFarmDiagnostic.call(void 0,
|
|
1519
1523
|
"CLIENT_SERVER_ONLY_ENTRY",
|
|
1520
1524
|
_nullishCoalesce(importer, () => ( id)),
|
|
1521
1525
|
`${id} is server-only and cannot be imported into client code.`
|
|
@@ -1540,7 +1544,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1540
1544
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1541
1545
|
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkYQXLBYY2cjs.resolveFarmPlatform.call(void 0, ))));
|
|
1542
1546
|
}
|
|
1543
|
-
return _nullishCoalesce(
|
|
1547
|
+
return _nullishCoalesce(_chunkD2OU4CX2cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1544
1548
|
}
|
|
1545
1549
|
}
|
|
1546
1550
|
};
|
|
@@ -1576,7 +1580,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
1576
1580
|
return `${_chunkIGBQSUT5cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
1577
1581
|
}
|
|
1578
1582
|
function getPublicEnvDefine(config) {
|
|
1579
|
-
const publicEnv = _optionalChain([config, 'access',
|
|
1583
|
+
const publicEnv = _optionalChain([config, 'access', _79 => _79.env, 'optionalAccess', _80 => _80.public]);
|
|
1580
1584
|
if (!isResolvedEnvScope(publicEnv)) {
|
|
1581
1585
|
return {};
|
|
1582
1586
|
}
|
|
@@ -1615,7 +1619,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
|
|
|
1615
1619
|
return;
|
|
1616
1620
|
}
|
|
1617
1621
|
if (res.headersSent) {
|
|
1618
|
-
_optionalChain([res, 'access',
|
|
1622
|
+
_optionalChain([res, 'access', _81 => _81.destroy, 'optionalCall', _82 => _82(error instanceof Error ? error : new Error(String(error)))]);
|
|
1619
1623
|
return;
|
|
1620
1624
|
}
|
|
1621
1625
|
res.statusCode = 500;
|
|
@@ -1751,7 +1755,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1751
1755
|
const originalWrite = res.write.bind(res);
|
|
1752
1756
|
const originalEnd = res.end.bind(res);
|
|
1753
1757
|
const originalWriteHead = res.writeHead.bind(res);
|
|
1754
|
-
const originalFlushHeaders = _optionalChain([res, 'access',
|
|
1758
|
+
const originalFlushHeaders = _optionalChain([res, 'access', _83 => _83.flushHeaders, 'optionalAccess', _84 => _84.bind, 'call', _85 => _85(res)]);
|
|
1755
1759
|
let afterResponseCalled = false;
|
|
1756
1760
|
let interceptedEnd = false;
|
|
1757
1761
|
const restore = () => {
|
|
@@ -1813,7 +1817,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1813
1817
|
).then(async (runtimeResponse) => {
|
|
1814
1818
|
applyWebResponseToNodeResponse(runtimeResponse, res);
|
|
1815
1819
|
if (!res.headersSent) originalWriteHead(res.statusCode);
|
|
1816
|
-
_optionalChain([originalFlushHeaders, 'optionalCall',
|
|
1820
|
+
_optionalChain([originalFlushHeaders, 'optionalCall', _86 => _86()]);
|
|
1817
1821
|
if (!runtimeResponse.body) return;
|
|
1818
1822
|
const reader = runtimeResponse.body.getReader();
|
|
1819
1823
|
for (; ; ) {
|
|
@@ -1862,7 +1866,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1862
1866
|
if (streamsThroughRuntime()) {
|
|
1863
1867
|
streamRuntimeChunk(bufferChunk);
|
|
1864
1868
|
const callback = args.find((arg) => typeof arg === "function");
|
|
1865
|
-
_optionalChain([callback, 'optionalCall',
|
|
1869
|
+
_optionalChain([callback, 'optionalCall', _87 => _87()]);
|
|
1866
1870
|
return true;
|
|
1867
1871
|
}
|
|
1868
1872
|
if (isHtmlResponse && bufferChunk) {
|
|
@@ -1874,7 +1878,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1874
1878
|
const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
|
|
1875
1879
|
if (shouldBufferResponse) {
|
|
1876
1880
|
const callback = args.find((arg) => typeof arg === "function");
|
|
1877
|
-
_optionalChain([callback, 'optionalCall',
|
|
1881
|
+
_optionalChain([callback, 'optionalCall', _88 => _88()]);
|
|
1878
1882
|
return true;
|
|
1879
1883
|
}
|
|
1880
1884
|
const writeResult = originalWrite(chunk, ...args);
|
|
@@ -2021,18 +2025,18 @@ function getEnvDefines(config, configEnv) {
|
|
|
2021
2025
|
_chunkJ2JMESBJcjs.getPublicFarmImageConfig.call(void 0,
|
|
2022
2026
|
_chunkJ2JMESBJcjs.resolveFarmImageConfig.call(void 0,
|
|
2023
2027
|
config.images,
|
|
2024
|
-
|
|
2028
|
+
_chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
|
|
2025
2029
|
)
|
|
2026
2030
|
)
|
|
2027
2031
|
)
|
|
2028
2032
|
};
|
|
2029
|
-
if (_optionalChain([configEnv, 'optionalAccess',
|
|
2033
|
+
if (_optionalChain([configEnv, 'optionalAccess', _89 => _89.isSsrBuild])) {
|
|
2030
2034
|
defines.__FARM_ENV__ = JSON.stringify(_chunkTP7JAC3Tcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
|
|
2031
2035
|
}
|
|
2032
2036
|
return defines;
|
|
2033
2037
|
}
|
|
2034
2038
|
function getFarmAPIBaseURLDefine(config) {
|
|
2035
|
-
const baseURL = _optionalChain([config, 'access',
|
|
2039
|
+
const baseURL = _optionalChain([config, 'access', _90 => _90.api, 'optionalAccess', _91 => _91.baseURL]);
|
|
2036
2040
|
return typeof baseURL === "string" && baseURL ? baseURL : _chunkG5KGLMPNcjs.DEFAULT_FARM_API_BASE_PATH;
|
|
2037
2041
|
}
|
|
2038
2042
|
function isResolvedEnvScope(value) {
|
|
@@ -2044,7 +2048,9 @@ function isResolvedEnvScope(value) {
|
|
|
2044
2048
|
);
|
|
2045
2049
|
}
|
|
2046
2050
|
function isPotentialProgrammaticRouteSourceFile(normalizedFile, srcDirSlug) {
|
|
2047
|
-
return normalizedFile.startsWith(`${srcDirSlug}/`) && /\.(ts|tsx|js|jsx)$/.test(normalizedFile) &&
|
|
2051
|
+
return normalizedFile.startsWith(`${srcDirSlug}/`) && /\.(ts|tsx|js|jsx)$/.test(normalizedFile) && // A declaration file, including TypeScript's `.d.<ext>.ts` form such as a
|
|
2052
|
+
// Polyroute `route.d.rs.ts`, has no runtime code to register a route.
|
|
2053
|
+
!/\.d(\.[^./]+)?\.ts$/.test(normalizedFile) && !normalizedFile.endsWith("/farm-routes.d.ts") && !normalizedFile.endsWith("/farm-env.d.ts") && !normalizedFile.endsWith("/lib/api.generated.ts");
|
|
2048
2054
|
}
|
|
2049
2055
|
function fileContainsProgrammaticPageRoute(file) {
|
|
2050
2056
|
if (!fs2.existsSync(file)) {
|
|
@@ -2154,7 +2160,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2154
2160
|
return null;
|
|
2155
2161
|
}
|
|
2156
2162
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
2157
|
-
const everyExportIsComponent = options.code.includes(
|
|
2163
|
+
const everyExportIsComponent = options.code.includes(_chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
2158
2164
|
const replacements = [];
|
|
2159
2165
|
const wrapperStatements = [];
|
|
2160
2166
|
const originalEntries = [];
|
|
@@ -2173,9 +2179,9 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2173
2179
|
transformedExports++;
|
|
2174
2180
|
};
|
|
2175
2181
|
for (const node of body) {
|
|
2176
|
-
if (_optionalChain([node, 'optionalAccess',
|
|
2182
|
+
if (_optionalChain([node, 'optionalAccess', _92 => _92.type]) === "ExportDefaultDeclaration" && node.declaration) {
|
|
2177
2183
|
const declaration2 = node.declaration;
|
|
2178
|
-
if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access',
|
|
2184
|
+
if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _93 => _93.id, 'optionalAccess', _94 => _94.name])) {
|
|
2179
2185
|
replacements.push({
|
|
2180
2186
|
start: node.start,
|
|
2181
2187
|
end: node.end,
|
|
@@ -2193,11 +2199,11 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2193
2199
|
}
|
|
2194
2200
|
continue;
|
|
2195
2201
|
}
|
|
2196
|
-
if (_optionalChain([node, 'optionalAccess',
|
|
2202
|
+
if (_optionalChain([node, 'optionalAccess', _95 => _95.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
|
|
2197
2203
|
const specifiers = (node.specifiers || []).filter(
|
|
2198
2204
|
(specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind !== "type"
|
|
2199
2205
|
);
|
|
2200
|
-
const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess',
|
|
2206
|
+
const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _96 => _96.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _97 => _97.value]), () => ( "")))));
|
|
2201
2207
|
const isComponentExport = (specifier) => {
|
|
2202
2208
|
const exported = specifierName(specifier.exported);
|
|
2203
2209
|
return everyExportIsComponent || exported === "default" || /^[A-Z]/.test(exported);
|
|
@@ -2224,14 +2230,14 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2224
2230
|
if (kept.length > 0) wrapperStatements.push(`export { ${kept.join(", ")} };`);
|
|
2225
2231
|
continue;
|
|
2226
2232
|
}
|
|
2227
|
-
if (_optionalChain([node, 'optionalAccess',
|
|
2233
|
+
if (_optionalChain([node, 'optionalAccess', _98 => _98.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
|
|
2228
2234
|
const declaration = node.declaration;
|
|
2229
2235
|
const declaredNames = [];
|
|
2230
|
-
if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access',
|
|
2236
|
+
if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _99 => _99.id, 'optionalAccess', _100 => _100.name])) {
|
|
2231
2237
|
declaredNames.push(declaration.id.name);
|
|
2232
2238
|
} else if (declaration.type === "VariableDeclaration") {
|
|
2233
2239
|
for (const declarator of declaration.declarations || []) {
|
|
2234
|
-
if (_optionalChain([declarator, 'access',
|
|
2240
|
+
if (_optionalChain([declarator, 'access', _101 => _101.id, 'optionalAccess', _102 => _102.type]) === "Identifier") declaredNames.push(declarator.id.name);
|
|
2235
2241
|
}
|
|
2236
2242
|
}
|
|
2237
2243
|
const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
|
|
@@ -2304,21 +2310,21 @@ async function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
2304
2310
|
} catch (e20) {
|
|
2305
2311
|
return;
|
|
2306
2312
|
}
|
|
2307
|
-
const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access',
|
|
2313
|
+
const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _103 => _103.env, 'optionalAccess', _104 => _104.public]), () => ( {}))));
|
|
2308
2314
|
const findings = [];
|
|
2309
2315
|
for (const finding of analyzeClientBoundary(program, publicKeys)) {
|
|
2310
2316
|
if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
|
|
2311
2317
|
const resolved = await context.resolve(finding.name, id).catch(() => null);
|
|
2312
|
-
if (!_optionalChain([resolved, 'optionalAccess',
|
|
2318
|
+
if (!_optionalChain([resolved, 'optionalAccess', _105 => _105.id, 'access', _106 => _106.startsWith, 'call', _107 => _107(_chunkD2OU4CX2cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
|
|
2313
2319
|
}
|
|
2314
2320
|
findings.push(finding);
|
|
2315
2321
|
}
|
|
2316
2322
|
if (findings.length === 0) return;
|
|
2317
2323
|
warnedClientBoundaryIds.add(id);
|
|
2318
|
-
const locate =
|
|
2324
|
+
const locate = _chunkD2OU4CX2cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
|
|
2319
2325
|
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2320
2326
|
findings.map(
|
|
2321
|
-
(finding) =>
|
|
2327
|
+
(finding) => _chunkD2OU4CX2cjs.formatFarmDiagnostic.call(void 0,
|
|
2322
2328
|
createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
|
|
2323
2329
|
config.root
|
|
2324
2330
|
)
|
|
@@ -2335,10 +2341,10 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
|
|
|
2335
2341
|
);
|
|
2336
2342
|
}
|
|
2337
2343
|
function shouldEmitFarmClientRootHmr(renderer) {
|
|
2338
|
-
return
|
|
2344
|
+
return _chunkLEZJZX4Ccjs.getFarmRendererCapabilities.call(void 0, _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
|
|
2339
2345
|
}
|
|
2340
2346
|
function reachesSharedFarmRendererIsland(graph, file, islandModules) {
|
|
2341
|
-
const queue = Array.from(_nullishCoalesce(_optionalChain([graph, 'optionalAccess',
|
|
2347
|
+
const queue = Array.from(_nullishCoalesce(_optionalChain([graph, 'optionalAccess', _108 => _108.getModulesByFile, 'call', _109 => _109(file)]), () => ( [])));
|
|
2342
2348
|
const seen = new Set(queue);
|
|
2343
2349
|
for (const node of queue) {
|
|
2344
2350
|
if (node.file && islandModules.has(path6.resolve(node.file))) {
|
|
@@ -2382,25 +2388,25 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2382
2388
|
);
|
|
2383
2389
|
}
|
|
2384
2390
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2385
|
-
const rendererDisabled =
|
|
2391
|
+
const rendererDisabled = _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2386
2392
|
const imageImports = farmImageImportsPlugin();
|
|
2387
|
-
const fontImports =
|
|
2393
|
+
const fontImports = _chunkPVB5UYJTcjs.farmFontImportsPlugin.call(void 0, {
|
|
2388
2394
|
root: options.root,
|
|
2389
2395
|
basePath: options.basePath,
|
|
2390
2396
|
publicDir: options.publicDir,
|
|
2391
2397
|
// A production build never starts the app, so it reads the directories from these options.
|
|
2392
|
-
isLayoutModule: (id) =>
|
|
2398
|
+
isLayoutModule: (id) => _chunkPVB5UYJTcjs.isFarmLayoutModule.call(void 0, id, _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111()]), () => ( options))))
|
|
2393
2399
|
});
|
|
2394
2400
|
let farmApp;
|
|
2395
2401
|
const isFarmGeneratedOutput = (file) => {
|
|
2396
|
-
const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
2402
|
+
const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _112 => _112.getConfig, 'call', _113 => _113(), 'access', _114 => _114.root]), () => ( options.root));
|
|
2397
2403
|
if (!root) return file.includes("/.farm/");
|
|
2398
2404
|
const output = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
|
|
2399
2405
|
return file === output || file.startsWith(`${output}/`);
|
|
2400
2406
|
};
|
|
2401
2407
|
let serverFnTransformActive = false;
|
|
2402
2408
|
const getFarmRenderedServerModules = () => {
|
|
2403
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
2409
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _115 => _115.getRouteManager, 'call', _116 => _116()]);
|
|
2404
2410
|
if (!routeManager) return /* @__PURE__ */ new Set();
|
|
2405
2411
|
const files = /* @__PURE__ */ new Set();
|
|
2406
2412
|
for (const entries of [
|
|
@@ -2420,8 +2426,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2420
2426
|
if (mdxComponents) files.add(mdxComponents);
|
|
2421
2427
|
return files;
|
|
2422
2428
|
};
|
|
2423
|
-
const islxActionsMode = () =>
|
|
2424
|
-
const islandsServerFns = () =>
|
|
2429
|
+
const islxActionsMode = () => _chunkPVB5UYJTcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _117 => _117.getConfig, 'call', _118 => _118()]), () => ( options)));
|
|
2430
|
+
const islandsServerFns = () => _chunkPVB5UYJTcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)));
|
|
2425
2431
|
let reactRefreshActive = false;
|
|
2426
2432
|
let server;
|
|
2427
2433
|
let deferredGates;
|
|
@@ -2450,16 +2456,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2450
2456
|
].join(" ");
|
|
2451
2457
|
console.log(log);
|
|
2452
2458
|
};
|
|
2453
|
-
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
2454
|
-
const inBuildPackageCache =
|
|
2459
|
+
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _121 => _121.getRouteManager, 'call', _122 => _122(), 'access', _123 => _123.getProgrammaticClientRoutes, 'call', _124 => _124()])));
|
|
2460
|
+
const inBuildPackageCache = _chunkD2OU4CX2cjs.bindPackageClientBoundaryCache.call(void 0, );
|
|
2455
2461
|
const inspectPackages = (operation) => {
|
|
2456
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
2462
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _125 => _125.getRouteManager, 'call', _126 => _126()]);
|
|
2457
2463
|
return inBuildPackageCache(
|
|
2458
2464
|
() => routeManager ? routeManager.inspectPackages(operation) : operation()
|
|
2459
2465
|
);
|
|
2460
2466
|
};
|
|
2461
2467
|
const isOutsideAppRoot = (file) => {
|
|
2462
|
-
const root = _optionalChain([farmApp, 'optionalAccess',
|
|
2468
|
+
const root = _optionalChain([farmApp, 'optionalAccess', _127 => _127.getConfig, 'call', _128 => _128(), 'access', _129 => _129.root]) || _optionalChain([server, 'optionalAccess', _130 => _130.config, 'access', _131 => _131.root]) || options.root;
|
|
2463
2469
|
if (!root) return false;
|
|
2464
2470
|
const relative4 = path6.relative(root, file.split("?", 1)[0]);
|
|
2465
2471
|
return relative4.startsWith("..") || path6.isAbsolute(relative4);
|
|
@@ -2473,15 +2479,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2473
2479
|
config(userConfig, configEnv) {
|
|
2474
2480
|
isBuild = configEnv.command === "build";
|
|
2475
2481
|
const farmAliases = {
|
|
2476
|
-
...
|
|
2477
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access',
|
|
2482
|
+
..._chunkPFVNPOKNcjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2483
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _132 => _132.resolve, 'optionalAccess', _133 => _133.alias])) ? {} : _chunkPVB5UYJTcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2478
2484
|
};
|
|
2479
2485
|
if (Object.keys(farmAliases).length > 0) {
|
|
2480
2486
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2481
|
-
userConfig.resolve.alias =
|
|
2487
|
+
userConfig.resolve.alias = _chunkPVB5UYJTcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2482
2488
|
}
|
|
2483
2489
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2484
|
-
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access',
|
|
2490
|
+
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _134 => _134.server, 'optionalAccess', _135 => _135.cors]) === void 0;
|
|
2485
2491
|
return {
|
|
2486
2492
|
// Honor Farm's publicDir so the dev server serves the same static
|
|
2487
2493
|
// directory the production client build emits.
|
|
@@ -2494,13 +2500,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2494
2500
|
...farmOwnsDevCors ? { cors: false } : {},
|
|
2495
2501
|
fs: {
|
|
2496
2502
|
...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
|
|
2497
|
-
deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access',
|
|
2503
|
+
deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _136 => _136.server, 'optionalAccess', _137 => _137.fs, 'optionalAccess', _138 => _138.deny]), options)
|
|
2498
2504
|
}
|
|
2499
2505
|
}
|
|
2500
2506
|
};
|
|
2501
2507
|
},
|
|
2502
2508
|
configEnvironment(name, environmentConfig, env) {
|
|
2503
|
-
if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access',
|
|
2509
|
+
if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _139 => _139.dev, 'optionalAccess', _140 => _140.createEnvironment])) {
|
|
2504
2510
|
return;
|
|
2505
2511
|
}
|
|
2506
2512
|
return {
|
|
@@ -2519,7 +2525,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2519
2525
|
(plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
|
|
2520
2526
|
);
|
|
2521
2527
|
reactRefreshActive = _chunkQCVP22KWcjs.isFarmReactRefreshActive.call(void 0, config);
|
|
2522
|
-
if (_optionalChain([options, 'access',
|
|
2528
|
+
if (_optionalChain([options, 'access', _141 => _141.experimental, 'optionalAccess', _142 => _142.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
|
|
2523
2529
|
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2524
2530
|
"experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
|
|
2525
2531
|
);
|
|
@@ -2528,20 +2534,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2528
2534
|
async configureServer(viteServer) {
|
|
2529
2535
|
viteServer.middlewares.use(
|
|
2530
2536
|
createFarmDevPreviewGuard(viteServer, {
|
|
2531
|
-
getSourceRoots: () =>
|
|
2537
|
+
getSourceRoots: () => _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _143 => _143.getConfig, 'call', _144 => _144()]), () => ( options)))
|
|
2532
2538
|
})
|
|
2533
2539
|
);
|
|
2534
2540
|
if (typeof fontImports.configureServer === "function") {
|
|
2535
2541
|
await fontImports.configureServer.call(this, viteServer);
|
|
2536
2542
|
}
|
|
2537
2543
|
server = viteServer;
|
|
2538
|
-
const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess',
|
|
2539
|
-
const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess',
|
|
2544
|
+
const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _145 => _145.pre, 'access', _146 => _146.target]), () => ( viteServer.middlewares));
|
|
2545
|
+
const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _147 => _147.post, 'access', _148 => _148.target]), () => ( viteServer.middlewares));
|
|
2540
2546
|
const pm = initialPluginManager;
|
|
2541
2547
|
const configRoutePlugins = new Set(
|
|
2542
|
-
_optionalChain([pm, 'optionalAccess',
|
|
2548
|
+
_optionalChain([pm, 'optionalAccess', _149 => _149.getPlugins, 'call', _150 => _150(), 'access', _151 => _151.filter, 'call', _152 => _152(isFarmConfigRoutePlugin), 'access', _153 => _153.map, 'call', _154 => _154((plugin2) => plugin2.name)])
|
|
2543
2549
|
);
|
|
2544
|
-
const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
2550
|
+
const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _155 => _155.getPlugins, 'call', _156 => _156()]), () => ( []))).flatMap((plugin2) => {
|
|
2545
2551
|
const matcher = _chunkQBMMQS25cjs.getConfigRedirectMatcher.call(void 0, plugin2);
|
|
2546
2552
|
return matcher ? [matcher] : [];
|
|
2547
2553
|
});
|
|
@@ -2552,7 +2558,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2552
2558
|
} catch (e21) {
|
|
2553
2559
|
}
|
|
2554
2560
|
};
|
|
2555
|
-
farmApp = new (0,
|
|
2561
|
+
farmApp = new (0, _chunkPVB5UYJTcjs.FarmApp)(
|
|
2556
2562
|
{
|
|
2557
2563
|
...options,
|
|
2558
2564
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2560,7 +2566,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2560
2566
|
server
|
|
2561
2567
|
);
|
|
2562
2568
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2563
|
-
|
|
2569
|
+
_chunkD2OU4CX2cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2564
2570
|
farmApp.getConfig().root,
|
|
2565
2571
|
options.distDir || ".farm"
|
|
2566
2572
|
)
|
|
@@ -2569,9 +2575,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2569
2575
|
await farmApp.initialize();
|
|
2570
2576
|
const farmConfig = farmApp.getConfig();
|
|
2571
2577
|
let farmAppPackages;
|
|
2572
|
-
if (_optionalChain([farmConfig, 'access',
|
|
2578
|
+
if (_optionalChain([farmConfig, 'access', _157 => _157.agent, 'optionalAccess', _158 => _158.noindexPreviews])) {
|
|
2573
2579
|
farmMiddlewares.use((_req, res, next) => {
|
|
2574
|
-
if (
|
|
2580
|
+
if (_chunkHENYWY5Jcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2575
2581
|
res.setHeader("X-Robots-Tag", _chunkERSLQ4C7cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2576
2582
|
}
|
|
2577
2583
|
next();
|
|
@@ -2579,7 +2585,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2579
2585
|
}
|
|
2580
2586
|
const apiServerBasePath = _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2581
2587
|
const devBuiltInRoutePaths = new Set(
|
|
2582
|
-
|
|
2588
|
+
_chunkMR64FNW6cjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2583
2589
|
agent: {
|
|
2584
2590
|
apiCatalog: true,
|
|
2585
2591
|
mcp: true,
|
|
@@ -2601,7 +2607,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2601
2607
|
validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
|
|
2602
2608
|
// Vite owns this address. Unlike request.url, it cannot be replaced by
|
|
2603
2609
|
// a caller-controlled Host header.
|
|
2604
|
-
trustedLocalOrigin: () => _optionalChain([server, 'access',
|
|
2610
|
+
trustedLocalOrigin: () => _optionalChain([server, 'access', _159 => _159.resolvedUrls, 'optionalAccess', _160 => _160.local, 'access', _161 => _161[0]]),
|
|
2605
2611
|
onError(error) {
|
|
2606
2612
|
_chunk7ZDLE77Pcjs.logger.error(
|
|
2607
2613
|
`Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -2609,7 +2615,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2609
2615
|
}
|
|
2610
2616
|
});
|
|
2611
2617
|
}
|
|
2612
|
-
const sourceRoots =
|
|
2618
|
+
const sourceRoots = _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, farmConfig);
|
|
2613
2619
|
server.watcher.add(sourceRoots.map((source) => path6.join(source.root, source.srcDir)));
|
|
2614
2620
|
if (farmConfig.i18n.enabled) {
|
|
2615
2621
|
server.watcher.add(
|
|
@@ -2621,15 +2627,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2621
2627
|
const workflowConfig = farmConfig.workflows;
|
|
2622
2628
|
const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
|
|
2623
2629
|
const getExtraRouteTypes = () => [
|
|
2624
|
-
..._optionalChain([options, 'access',
|
|
2625
|
-
..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
2630
|
+
..._optionalChain([options, 'access', _162 => _162.openapi, 'optionalAccess', _163 => _163.enabled]) && options.openapi.route ? [options.openapi.route] : [],
|
|
2631
|
+
..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _164 => _164.getFarmDocsRouteTypeEntries, 'call', _165 => _165(farmConfig.docs)]), () => ( []))
|
|
2626
2632
|
];
|
|
2627
2633
|
const appDirSlugs = sourceRoots.map(
|
|
2628
2634
|
(source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
|
|
2629
2635
|
);
|
|
2636
|
+
const polyroute = _chunkYCGOQKVCcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
|
|
2630
2637
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2631
2638
|
try {
|
|
2632
|
-
const result = await
|
|
2639
|
+
const result = await _chunkGL4SPJTEcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2633
2640
|
root: farmConfig.root,
|
|
2634
2641
|
srcDir: farmConfig.srcDir,
|
|
2635
2642
|
layers: farmConfig.layers,
|
|
@@ -2640,6 +2647,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2640
2647
|
componentExtensions: farmConfig.renderer.componentExtensions,
|
|
2641
2648
|
renderer: farmConfig.renderer,
|
|
2642
2649
|
i18nConfig: farmConfig.i18n,
|
|
2650
|
+
polyroute,
|
|
2643
2651
|
...selection
|
|
2644
2652
|
});
|
|
2645
2653
|
if (log) {
|
|
@@ -2671,10 +2679,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2671
2679
|
(source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
|
|
2672
2680
|
);
|
|
2673
2681
|
const layerConfigFiles = new Set(
|
|
2674
|
-
farmConfig.layers.map((layer) => _optionalChain([layer, 'access',
|
|
2682
|
+
farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _166 => _166.configFile, 'optionalAccess', _167 => _167.replace, 'call', _168 => _168(/\\/g, "/")])).filter((file) => Boolean(file))
|
|
2675
2683
|
);
|
|
2676
2684
|
const routeModuleExtensions = /* @__PURE__ */ new Set([
|
|
2677
|
-
...
|
|
2685
|
+
..._chunkLEZJZX4Ccjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
|
|
2678
2686
|
".md",
|
|
2679
2687
|
".mdx"
|
|
2680
2688
|
]);
|
|
@@ -2683,10 +2691,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2683
2691
|
const match = /\/(?:page|layout|loading|error)(\.[^./]+)$/.exec(normalized);
|
|
2684
2692
|
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && !!match && routeModuleExtensions.has(match[1].toLowerCase());
|
|
2685
2693
|
};
|
|
2686
|
-
const polyroute = _chunkXJEOHDPNcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
|
|
2687
2694
|
const isApiRouteFile = (file) => {
|
|
2688
2695
|
const normalized = file.replace(/\\/g, "/");
|
|
2689
|
-
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) &&
|
|
2696
|
+
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkYCGOQKVCcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
|
|
2697
|
+
};
|
|
2698
|
+
const isApiRouteDeclarationFile = (file) => {
|
|
2699
|
+
const normalized = file.replace(/\\/g, "/");
|
|
2700
|
+
return polyroute && appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkYCGOQKVCcjs.isPolyrouteRouteDeclarationFileName.call(void 0, path6.posix.basename(normalized));
|
|
2690
2701
|
};
|
|
2691
2702
|
const isProgrammaticRouteFile = (file) => {
|
|
2692
2703
|
const normalized = file.replace(/\\/g, "/");
|
|
@@ -2699,7 +2710,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2699
2710
|
);
|
|
2700
2711
|
};
|
|
2701
2712
|
const isAppRuntimeFile = (file) => isFarmAppRuntimeFile(file, appDirSlugs, routeModuleExtensions);
|
|
2702
|
-
const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess',
|
|
2713
|
+
const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess', _169 => _169.getRouteManager, 'call', _170 => _170(), 'access', _171 => _171.isRendererRouteFile, 'call', _172 => _172(file)]) === true;
|
|
2703
2714
|
const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
|
|
2704
2715
|
file.replace(/\\/g, "/")
|
|
2705
2716
|
);
|
|
@@ -2737,7 +2748,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2737
2748
|
const programmaticRouteChanged = isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file));
|
|
2738
2749
|
const typeArtifacts = configChanged ? ALL_TYPE_ARTIFACTS : {
|
|
2739
2750
|
routes: ev !== "change" && (isRouteModuleFile(file) || isRendererRouteFile(file)) || programmaticRouteChanged,
|
|
2740
|
-
api: isApiRouteFile(file) || programmaticRouteChanged,
|
|
2751
|
+
api: isApiRouteFile(file) || isApiRouteDeclarationFile(file) || programmaticRouteChanged,
|
|
2741
2752
|
env: false,
|
|
2742
2753
|
images: false,
|
|
2743
2754
|
i18n: isI18nCatalogFile(file)
|
|
@@ -2746,7 +2757,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2746
2757
|
scheduleTypeArtifactGen(file, ev, typeArtifacts);
|
|
2747
2758
|
}
|
|
2748
2759
|
if (isI18nCatalogFile(file)) {
|
|
2749
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
2760
|
+
_optionalChain([farmApp, 'optionalAccess', _173 => _173.getI18nRuntime, 'call', _174 => _174(), 'access', _175 => _175.reload, 'call', _176 => _176(), 'access', _177 => _177.then, 'call', _178 => _178(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _179 => _179.catch, 'call', _180 => _180((error) => _chunk7ZDLE77Pcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
|
|
2750
2761
|
}
|
|
2751
2762
|
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || polyroute && isApiRouteFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
2752
2763
|
if (isRouteRefreshEvent) {
|
|
@@ -2758,8 +2769,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2758
2769
|
queuedRouteFiles = void 0;
|
|
2759
2770
|
try {
|
|
2760
2771
|
await Promise.all([
|
|
2761
|
-
_optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
2762
|
-
[...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess',
|
|
2772
|
+
_optionalChain([refreshRouteDiscovery, 'optionalCall', _181 => _181(`${ev} ${file}`)]),
|
|
2773
|
+
[...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _182 => _182.reload, 'call', _183 => _183()]) : void 0
|
|
2763
2774
|
]);
|
|
2764
2775
|
if (pendingRouteReloads.size === 1)
|
|
2765
2776
|
server.ws.send({ type: "full-reload", path: "*" });
|
|
@@ -2776,7 +2787,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2776
2787
|
}
|
|
2777
2788
|
});
|
|
2778
2789
|
});
|
|
2779
|
-
const appDirs =
|
|
2790
|
+
const appDirs = _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, farmConfig);
|
|
2780
2791
|
const routeManager = farmApp.getRouteManager();
|
|
2781
2792
|
const discoveredRoutes = [];
|
|
2782
2793
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|
|
@@ -2808,14 +2819,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2808
2819
|
const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
|
|
2809
2820
|
const load = (file) => _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, file);
|
|
2810
2821
|
globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
|
|
2811
|
-
_optionalChain([server, 'access',
|
|
2822
|
+
_optionalChain([server, 'access', _184 => _184.httpServer, 'optionalAccess', _185 => _185.once, 'call', _186 => _186("close", () => {
|
|
2812
2823
|
const globals = globalThis;
|
|
2813
2824
|
if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
|
|
2814
2825
|
delete globals[FARM_DEV_SERVER_MODULE_LOADER];
|
|
2815
2826
|
}
|
|
2816
2827
|
})]);
|
|
2817
2828
|
}
|
|
2818
|
-
apiRouteManager = new (0,
|
|
2829
|
+
apiRouteManager = new (0, _chunkD2VLHRBNcjs.APIRouteManager)(appDirs, server, {
|
|
2819
2830
|
plugins: farmConfig.plugins,
|
|
2820
2831
|
i18n: farmApp.getI18nRuntime(),
|
|
2821
2832
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -2882,11 +2893,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2882
2893
|
});
|
|
2883
2894
|
}
|
|
2884
2895
|
}
|
|
2885
|
-
if (_optionalChain([options, 'access',
|
|
2896
|
+
if (_optionalChain([options, 'access', _187 => _187.openapi, 'optionalAccess', _188 => _188.enabled])) {
|
|
2886
2897
|
const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
|
|
2887
2898
|
openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
|
|
2888
2899
|
mode: "development",
|
|
2889
|
-
apiBaseURL: typeof _optionalChain([options, 'access',
|
|
2900
|
+
apiBaseURL: typeof _optionalChain([options, 'access', _189 => _189.api, 'optionalAccess', _190 => _190.baseURL]) === "string" ? options.api.baseURL : void 0,
|
|
2890
2901
|
routes: () => apiRouteManager.getRoutes().values(),
|
|
2891
2902
|
loadModule: (filePath) => apiRouteManager.loadModule(filePath)
|
|
2892
2903
|
});
|
|
@@ -2931,20 +2942,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2931
2942
|
rendererServer: farmConfig.renderer.server,
|
|
2932
2943
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2933
2944
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2934
|
-
globalStylesheetHref:
|
|
2945
|
+
globalStylesheetHref: _chunkPVB5UYJTcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2935
2946
|
farmConfig.root,
|
|
2936
2947
|
farmConfig.srcDir
|
|
2937
2948
|
),
|
|
2938
2949
|
loadModule: async (specifier) => {
|
|
2939
2950
|
const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
|
|
2940
|
-
if (specifier === _optionalChain([farmConfig, 'access',
|
|
2951
|
+
if (specifier === _optionalChain([farmConfig, 'access', _191 => _191.docs, 'access', _192 => _192.adapter, 'optionalAccess', _193 => _193.server]) && _optionalChain([resolved, 'optionalAccess', _194 => _194.id])) {
|
|
2941
2952
|
const file = resolved.id.split("?", 1)[0];
|
|
2942
2953
|
return import(
|
|
2943
2954
|
/* @vite-ignore */
|
|
2944
2955
|
_url.pathToFileURL.call(void 0, file).href
|
|
2945
2956
|
);
|
|
2946
2957
|
}
|
|
2947
|
-
return _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
2958
|
+
return _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _195 => _195.id]), () => ( specifier)));
|
|
2948
2959
|
},
|
|
2949
2960
|
registerMCPServer: (mcpServer) => {
|
|
2950
2961
|
const dispose = _chunk3ACTVXZGcjs.registerFarmMCPServer.call(void 0, mcpServer);
|
|
@@ -2962,7 +2973,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2962
2973
|
fontAssets: _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2963
2974
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2964
2975
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2965
|
-
globalStylesheetHref:
|
|
2976
|
+
globalStylesheetHref: _chunkPVB5UYJTcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2966
2977
|
farmConfig.root,
|
|
2967
2978
|
farmConfig.srcDir
|
|
2968
2979
|
),
|
|
@@ -2970,7 +2981,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2970
2981
|
basePath: farmConfig.basePath
|
|
2971
2982
|
}) : null;
|
|
2972
2983
|
const farmDocsListsPages = Boolean(
|
|
2973
|
-
farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess',
|
|
2984
|
+
farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _196 => _196.getPlugins, 'call', _197 => _197(), 'access', _198 => _198.some, 'call', _199 => _199((plugin2) => plugin2.name === "farm:infra-analytics")])
|
|
2974
2985
|
);
|
|
2975
2986
|
let farmDocsPagePaths;
|
|
2976
2987
|
const getFarmDocsPagePaths = () => {
|
|
@@ -2997,22 +3008,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2997
3008
|
});
|
|
2998
3009
|
}
|
|
2999
3010
|
}
|
|
3000
|
-
const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess',
|
|
3011
|
+
const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _200 => _200.getPlugins, 'call', _201 => _201(), 'access', _202 => _202.find, 'call', _203 => _203((plugin2) => plugin2.name === "farm:infra-analytics")]);
|
|
3001
3012
|
if (farmInfraAnalyticsPlugin) {
|
|
3002
|
-
|
|
3013
|
+
_chunkV6ACETKRcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
|
|
3003
3014
|
if (farmDocsDevRuntime) {
|
|
3004
|
-
const label =
|
|
3015
|
+
const label = _chunkMR64FNW6cjs.resolveFarmDocsRouteLabel.call(void 0,
|
|
3005
3016
|
_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
|
|
3006
3017
|
{
|
|
3007
|
-
path: _optionalChain([farmConfig, 'access',
|
|
3008
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
3018
|
+
path: _optionalChain([farmConfig, 'access', _204 => _204.docs, 'optionalAccess', _205 => _205.entry]) || "/docs",
|
|
3019
|
+
roots: _optionalChain([farmConfig, 'access', _206 => _206.docs, 'optionalAccess', _207 => _207.roots, 'optionalAccess', _208 => _208.map, 'call', _209 => _209((root) => root.entry)]),
|
|
3009
3020
|
pages: await getFarmDocsPagePaths()
|
|
3010
3021
|
}
|
|
3011
3022
|
);
|
|
3012
|
-
if (label) return
|
|
3023
|
+
if (label) return _chunkMR64FNW6cjs.setFarmRouteLabel.call(void 0, { pathname }, label);
|
|
3013
3024
|
}
|
|
3014
3025
|
const match = farmApp.getRouteManager().matchRoute(pathname);
|
|
3015
|
-
return { pathname, pattern: _optionalChain([match, 'access',
|
|
3026
|
+
return { pathname, pattern: _optionalChain([match, 'access', _210 => _210.route, 'optionalAccess', _211 => _211.pattern]) || null };
|
|
3016
3027
|
});
|
|
3017
3028
|
}
|
|
3018
3029
|
if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
|
|
@@ -3087,7 +3098,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3087
3098
|
}
|
|
3088
3099
|
},
|
|
3089
3100
|
(request) => {
|
|
3090
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3101
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _212 => _212.getConfig, 'call', _213 => _213()]), () => ( options));
|
|
3091
3102
|
const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
3092
3103
|
return _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, request, {
|
|
3093
3104
|
trustProxy: currentServerConfig.trustProxy
|
|
@@ -3103,7 +3114,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3103
3114
|
withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
|
|
3104
3115
|
const requestUrl = req.url || "/";
|
|
3105
3116
|
const requestMethod = req.method || "GET";
|
|
3106
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3117
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _214 => _214.getConfig, 'call', _215 => _215()]), () => ( options));
|
|
3107
3118
|
const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
3108
3119
|
const parsedRequestUrl = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
3109
3120
|
trustProxy: currentServerConfig.trustProxy
|
|
@@ -3173,7 +3184,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3173
3184
|
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkO7B6LJWEcjs.FARM_VIDEO_PLAYER_PATH) {
|
|
3174
3185
|
res.statusCode = 200;
|
|
3175
3186
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
3176
|
-
res.end(requestMethod === "HEAD" ? void 0 :
|
|
3187
|
+
res.end(requestMethod === "HEAD" ? void 0 : _chunkPVB5UYJTcjs.FARM_VIDEO_PLAYER_HTML);
|
|
3177
3188
|
return;
|
|
3178
3189
|
}
|
|
3179
3190
|
const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
|
|
@@ -3228,7 +3239,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3228
3239
|
openapi: options.openapi
|
|
3229
3240
|
},
|
|
3230
3241
|
workflows: discoveredWorkflows,
|
|
3231
|
-
plugins: _optionalChain([pm, 'optionalAccess',
|
|
3242
|
+
plugins: _optionalChain([pm, 'optionalAccess', _216 => _216.getSortedPlugins, 'call', _217 => _217()])
|
|
3232
3243
|
});
|
|
3233
3244
|
res.statusCode = 200;
|
|
3234
3245
|
res.setHeader(
|
|
@@ -3263,10 +3274,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3263
3274
|
render: {
|
|
3264
3275
|
pathname: pathname2,
|
|
3265
3276
|
method: requestMethod,
|
|
3266
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
3267
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
3277
|
+
routePattern: _optionalChain([match, 'optionalAccess', _218 => _218.route, 'optionalAccess', _219 => _219.pattern]) || null,
|
|
3278
|
+
params: _optionalChain([match, 'optionalAccess', _220 => _220.params]) || {}
|
|
3268
3279
|
},
|
|
3269
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
3280
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _221 => _221.layouts]) || []).map((layout) => layout.pattern)
|
|
3270
3281
|
};
|
|
3271
3282
|
return pageHookRouteMatch;
|
|
3272
3283
|
};
|
|
@@ -3354,7 +3365,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3354
3365
|
}
|
|
3355
3366
|
}
|
|
3356
3367
|
const runAppMiddlewareForContentRoute = async () => {
|
|
3357
|
-
if (!_optionalChain([middlewareManager, 'optionalAccess',
|
|
3368
|
+
if (!_optionalChain([middlewareManager, 'optionalAccess', _222 => _222.hasMiddleware, 'call', _223 => _223()])) return false;
|
|
3358
3369
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
3359
3370
|
return runFarmMiddlewareWithNavigation(
|
|
3360
3371
|
farmApp.getServerRenderer(),
|
|
@@ -3392,7 +3403,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3392
3403
|
return response.status;
|
|
3393
3404
|
};
|
|
3394
3405
|
const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
|
|
3395
|
-
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess',
|
|
3406
|
+
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _224 => _224.hasRuntimeHook, 'call', _225 => _225("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _226 => _226.hasMiddleware, 'call', _227 => _227()]) ? interceptFarmDevPageResponse({
|
|
3396
3407
|
req,
|
|
3397
3408
|
res,
|
|
3398
3409
|
pm,
|
|
@@ -3405,7 +3416,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3405
3416
|
urlPath: requestUrl,
|
|
3406
3417
|
pathname: requestPathname,
|
|
3407
3418
|
startTime: Date.now(),
|
|
3408
|
-
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall',
|
|
3419
|
+
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _228 => _228(status)]),
|
|
3409
3420
|
// The runtime reports a runtime.after failure itself.
|
|
3410
3421
|
emitError: async () => {
|
|
3411
3422
|
},
|
|
@@ -3416,7 +3427,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3416
3427
|
handled = await runAppMiddlewareForContentRoute();
|
|
3417
3428
|
} catch (error) {
|
|
3418
3429
|
if (runtimeHookErrorAnswersJSON || res.headersSent) {
|
|
3419
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
3430
|
+
_optionalChain([interceptor, 'optionalAccess', _229 => _229.release, 'call', _230 => _230()]);
|
|
3420
3431
|
throw error;
|
|
3421
3432
|
}
|
|
3422
3433
|
if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
|
|
@@ -3424,10 +3435,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3424
3435
|
return true;
|
|
3425
3436
|
}
|
|
3426
3437
|
if (!handled) {
|
|
3427
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
3438
|
+
_optionalChain([interceptor, 'optionalAccess', _231 => _231.release, 'call', _232 => _232()]);
|
|
3428
3439
|
return false;
|
|
3429
3440
|
}
|
|
3430
|
-
if (!_optionalChain([interceptor, 'optionalAccess',
|
|
3441
|
+
if (!_optionalChain([interceptor, 'optionalAccess', _233 => _233.isEnded, 'call', _234 => _234()])) _optionalChain([logResponse2, 'optionalCall', _235 => _235(res.statusCode || 200)]);
|
|
3431
3442
|
return true;
|
|
3432
3443
|
};
|
|
3433
3444
|
const serveBuiltInRoute = async (respond, {
|
|
@@ -3436,7 +3447,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3436
3447
|
label
|
|
3437
3448
|
} = {}) => {
|
|
3438
3449
|
const discard = async () => {
|
|
3439
|
-
await _optionalChain([computed, 'optionalAccess',
|
|
3450
|
+
await _optionalChain([computed, 'optionalAccess', _236 => _236.body, 'optionalAccess', _237 => _237.cancel, 'call', _238 => _238(), 'access', _239 => _239.catch, 'call', _240 => _240(() => {
|
|
3440
3451
|
})]);
|
|
3441
3452
|
};
|
|
3442
3453
|
const sendRuntimeResponse = async (runtimeSession3, response2) => {
|
|
@@ -3453,9 +3464,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3453
3464
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3454
3465
|
try {
|
|
3455
3466
|
const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3456
|
-
const route =
|
|
3467
|
+
const route = _chunkMR64FNW6cjs.setFarmRouteLabel.call(void 0,
|
|
3457
3468
|
{ pathname: requestPathname },
|
|
3458
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3469
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkMR64FNW6cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3459
3470
|
);
|
|
3460
3471
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3461
3472
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -3493,7 +3504,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3493
3504
|
}
|
|
3494
3505
|
responding = true;
|
|
3495
3506
|
response = await respond(
|
|
3496
|
-
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess',
|
|
3507
|
+
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _241 => _241.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
|
|
3497
3508
|
);
|
|
3498
3509
|
} catch (error) {
|
|
3499
3510
|
if (!responding && !res.headersSent) {
|
|
@@ -3513,7 +3524,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3513
3524
|
else await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3514
3525
|
};
|
|
3515
3526
|
const openAPIRequestPathname = openAPIManager ? _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
|
|
3516
|
-
if (openAPIManager && _optionalChain([options, 'access',
|
|
3527
|
+
if (openAPIManager && _optionalChain([options, 'access', _242 => _242.openapi, 'optionalAccess', _243 => _243.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
|
|
3517
3528
|
const specManager = openAPIManager;
|
|
3518
3529
|
await serveBuiltInRoute(async () => {
|
|
3519
3530
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
@@ -3533,7 +3544,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3533
3544
|
});
|
|
3534
3545
|
return;
|
|
3535
3546
|
}
|
|
3536
|
-
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access',
|
|
3547
|
+
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _244 => _244.openapi, 'optionalAccess', _245 => _245.route])) {
|
|
3537
3548
|
const docsManager = openAPIManager;
|
|
3538
3549
|
await serveBuiltInRoute(
|
|
3539
3550
|
async () => {
|
|
@@ -3544,7 +3555,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3544
3555
|
);
|
|
3545
3556
|
return;
|
|
3546
3557
|
}
|
|
3547
|
-
if (_optionalChain([options, 'access',
|
|
3558
|
+
if (_optionalChain([options, 'access', _246 => _246.agent, 'optionalAccess', _247 => _247.manifest]) !== false && _chunkMR64FNW6cjs.isFarmAppManifestPath.call(void 0, _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3548
3559
|
const manifestGuardCoversPath = (path7) => _chunkIGBQSUT5cjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3549
3560
|
{
|
|
3550
3561
|
config: farmConfig,
|
|
@@ -3554,18 +3565,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3554
3565
|
apiServerBasePath
|
|
3555
3566
|
);
|
|
3556
3567
|
await serveBuiltInRoute(async () => {
|
|
3557
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3558
|
-
const manifest = await
|
|
3568
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkPVB5UYJTcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3569
|
+
const manifest = await _chunkMR64FNW6cjs.createFarmAppManifestResponse.call(void 0,
|
|
3559
3570
|
new Request(parsedRequestUrl, {
|
|
3560
3571
|
method: requestMethod,
|
|
3561
3572
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3562
3573
|
}),
|
|
3563
3574
|
{
|
|
3564
|
-
...
|
|
3575
|
+
..._chunkMR64FNW6cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3565
3576
|
build: "development",
|
|
3566
3577
|
packages: farmAppPackages,
|
|
3567
3578
|
// Read again on each request; unchanged files come from a cache.
|
|
3568
|
-
webmcpTools: _optionalChain([farmConfig, 'access',
|
|
3579
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _248 => _248.plugins, 'optionalAccess', _249 => _249.some, 'call', _250 => _250(({ name }) => name === "farm:webmcp")]) ? _chunkPVB5UYJTcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3569
3580
|
}),
|
|
3570
3581
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3571
3582
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -3583,11 +3594,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3583
3594
|
});
|
|
3584
3595
|
return;
|
|
3585
3596
|
}
|
|
3586
|
-
if (_optionalChain([options, 'access',
|
|
3597
|
+
if (_optionalChain([options, 'access', _251 => _251.agent, 'optionalAccess', _252 => _252.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkMR64FNW6cjs.FARM_API_CATALOG_PATH) {
|
|
3587
3598
|
await serveBuiltInRoute(
|
|
3588
|
-
() =>
|
|
3599
|
+
() => _chunkMR64FNW6cjs.createFarmApiCatalogResponse.call(void 0,
|
|
3589
3600
|
requestMethod,
|
|
3590
|
-
|
|
3601
|
+
_chunkMR64FNW6cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3591
3602
|
new Request(parsedRequestUrl, {
|
|
3592
3603
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3593
3604
|
})
|
|
@@ -3595,8 +3606,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3595
3606
|
);
|
|
3596
3607
|
return;
|
|
3597
3608
|
}
|
|
3598
|
-
if (_optionalChain([options, 'access',
|
|
3599
|
-
const aiCatalog =
|
|
3609
|
+
if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.aiCatalog]) !== false) {
|
|
3610
|
+
const aiCatalog = _chunkMR64FNW6cjs.createFarmAiCatalogResponse.call(void 0,
|
|
3600
3611
|
new Request(parsedRequestUrl, {
|
|
3601
3612
|
method: requestMethod,
|
|
3602
3613
|
headers: {
|
|
@@ -3644,7 +3655,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3644
3655
|
);
|
|
3645
3656
|
const docsResponse = await farmDocsHandler(docsHandlerRequest);
|
|
3646
3657
|
if (docsResponse) {
|
|
3647
|
-
const docsPage = _optionalChain([docsResponse, 'access',
|
|
3658
|
+
const docsPage = _optionalChain([docsResponse, 'access', _255 => _255.headers, 'access', _256 => _256.get, 'call', _257 => _257("content-type"), 'optionalAccess', _258 => _258.toLowerCase, 'call', _259 => _259(), 'access', _260 => _260.includes, 'call', _261 => _261("text/html")]);
|
|
3648
3659
|
await serveBuiltInRoute(
|
|
3649
3660
|
async (request) => {
|
|
3650
3661
|
if (!docsPage) {
|
|
@@ -3662,7 +3673,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3662
3673
|
farmConfig.deploymentId
|
|
3663
3674
|
);
|
|
3664
3675
|
if (deploymentMismatch) {
|
|
3665
|
-
await _optionalChain([docsResponse, 'access',
|
|
3676
|
+
await _optionalChain([docsResponse, 'access', _262 => _262.body, 'optionalAccess', _263 => _263.cancel, 'call', _264 => _264()]);
|
|
3666
3677
|
return _chunkVIDUNAQEcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
|
|
3667
3678
|
}
|
|
3668
3679
|
const page = _chunkSWOJU7LIcjs._withFarmResponseHeaders.call(void 0,
|
|
@@ -3683,11 +3694,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3683
3694
|
{
|
|
3684
3695
|
kind: "docs",
|
|
3685
3696
|
computed: docsResponse,
|
|
3686
|
-
label:
|
|
3697
|
+
label: _chunkMR64FNW6cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3687
3698
|
_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3688
3699
|
{
|
|
3689
|
-
path: _optionalChain([farmConfig, 'access',
|
|
3690
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
3700
|
+
path: _optionalChain([farmConfig, 'access', _265 => _265.docs, 'optionalAccess', _266 => _266.entry]) || "/docs",
|
|
3701
|
+
roots: _optionalChain([farmConfig, 'access', _267 => _267.docs, 'optionalAccess', _268 => _268.roots, 'optionalAccess', _269 => _269.map, 'call', _270 => _270((root) => root.entry)]),
|
|
3691
3702
|
pages: await getFarmDocsPagePaths()
|
|
3692
3703
|
}
|
|
3693
3704
|
)
|
|
@@ -3696,7 +3707,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3696
3707
|
return;
|
|
3697
3708
|
}
|
|
3698
3709
|
}
|
|
3699
|
-
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access',
|
|
3710
|
+
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _271 => _271.headers, 'access', _272 => _272.accept, 'optionalAccess', _273 => _273.includes, 'call', _274 => _274(_chunkXVD5Y6S4cjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
|
|
3700
3711
|
const { createFarmNativeTreeResponse } = await import("./native-tree-PHCV43W4.cjs");
|
|
3701
3712
|
const treeBodyInit = requestMethod === "POST" ? { body: _chunk7GKZDRY2cjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
|
|
3702
3713
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
@@ -3714,15 +3725,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3714
3725
|
});
|
|
3715
3726
|
await serveBuiltInRoute(() => treeResponse, {
|
|
3716
3727
|
computed: treeResponse,
|
|
3717
|
-
label: _nullishCoalesce(_optionalChain([farmApp, 'access',
|
|
3728
|
+
label: _nullishCoalesce(_optionalChain([farmApp, 'access', _275 => _275.getRouteManager, 'call', _276 => _276(), 'access', _277 => _277.matchRoute, 'call', _278 => _278(_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _279 => _279.route, 'optionalAccess', _280 => _280.pattern]), () => ( null))
|
|
3718
3729
|
});
|
|
3719
3730
|
return;
|
|
3720
3731
|
}
|
|
3721
3732
|
const markdownRouteLabel = () => (
|
|
3722
3733
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3723
|
-
|
|
3734
|
+
_chunkMR64FNW6cjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3724
3735
|
toRoutePathname(requestPathname),
|
|
3725
|
-
(page) => _optionalChain([farmApp, 'access',
|
|
3736
|
+
(page) => _optionalChain([farmApp, 'access', _281 => _281.getRouteManager, 'call', _282 => _282(), 'access', _283 => _283.matchRoute, 'call', _284 => _284(page), 'access', _285 => _285.route, 'optionalAccess', _286 => _286.pattern])
|
|
3726
3737
|
)
|
|
3727
3738
|
);
|
|
3728
3739
|
const markdownSourceResponse = viteModuleRequest ? null : await _chunk27IPPPCVcjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
@@ -3734,14 +3745,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3734
3745
|
routePathname: toRoutePathname,
|
|
3735
3746
|
resolveSource: async (pathname2) => {
|
|
3736
3747
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
3737
|
-
const sourcePath = _optionalChain([match, 'access',
|
|
3748
|
+
const sourcePath = _optionalChain([match, 'access', _287 => _287.route, 'optionalAccess', _288 => _288.markdownSourcePath]) || (match.route && _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
3738
3749
|
if (!sourcePath) {
|
|
3739
3750
|
return null;
|
|
3740
3751
|
}
|
|
3741
3752
|
return {
|
|
3742
3753
|
source: await fs2.promises.readFile(sourcePath, "utf8"),
|
|
3743
3754
|
// Project-relative, as production sends it: never the machine's path.
|
|
3744
|
-
filePath:
|
|
3755
|
+
filePath: _chunkPVB5UYJTcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
|
|
3745
3756
|
};
|
|
3746
3757
|
},
|
|
3747
3758
|
// The anonymous check goes through this server, so its guards and
|
|
@@ -3891,7 +3902,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3891
3902
|
"beforeRequest",
|
|
3892
3903
|
(plugin2) => {
|
|
3893
3904
|
const owner = _chunkN4AM7Q34cjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
|
|
3894
|
-
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess',
|
|
3905
|
+
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _289 => _289.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
3895
3906
|
},
|
|
3896
3907
|
req,
|
|
3897
3908
|
res
|
|
@@ -3928,7 +3939,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3928
3939
|
isProd: false
|
|
3929
3940
|
},
|
|
3930
3941
|
request,
|
|
3931
|
-
{ clientAddress: _optionalChain([req, 'access',
|
|
3942
|
+
{ clientAddress: _optionalChain([req, 'access', _290 => _290.socket, 'optionalAccess', _291 => _291.remoteAddress]) }
|
|
3932
3943
|
);
|
|
3933
3944
|
if (!result) {
|
|
3934
3945
|
throw new Error(`Matched integration route did not return a response`);
|
|
@@ -3936,7 +3947,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3936
3947
|
return result;
|
|
3937
3948
|
} catch (error) {
|
|
3938
3949
|
_chunk7ZDLE77Pcjs.logger.error(`Integration route error: ${error}`);
|
|
3939
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
3950
|
+
await _optionalChain([runtime, 'optionalAccess', _292 => _292.reportError, 'call', _293 => _293(error)]);
|
|
3940
3951
|
return _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
3941
3952
|
}
|
|
3942
3953
|
};
|
|
@@ -3990,7 +4001,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3990
4001
|
_chunkN4AM7Q34cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3991
4002
|
pathname: requestPathname,
|
|
3992
4003
|
method: requestMethod
|
|
3993
|
-
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
4004
|
+
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _294 => _294.isFarmDocsAPIRequest, 'call', _295 => _295(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
|
|
3994
4005
|
);
|
|
3995
4006
|
};
|
|
3996
4007
|
try {
|
|
@@ -4080,15 +4091,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4080
4091
|
);
|
|
4081
4092
|
};
|
|
4082
4093
|
const isDocsAPIRequest = Boolean(
|
|
4083
|
-
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
4094
|
+
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _296 => _296.isFarmDocsAPIRequest, 'call', _297 => _297(pathname2)])
|
|
4084
4095
|
);
|
|
4085
4096
|
const docsRuntimeOptions = () => ({
|
|
4086
4097
|
kind: "docs",
|
|
4087
|
-
route:
|
|
4098
|
+
route: _chunkMR64FNW6cjs.setFarmRouteLabel.call(void 0,
|
|
4088
4099
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
4089
|
-
|
|
4090
|
-
path: _optionalChain([farmConfig, 'access',
|
|
4091
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
4100
|
+
_chunkMR64FNW6cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
4101
|
+
path: _optionalChain([farmConfig, 'access', _298 => _298.docs, 'optionalAccess', _299 => _299.entry]) || "/docs",
|
|
4102
|
+
roots: _optionalChain([farmConfig, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.roots, 'optionalAccess', _302 => _302.map, 'call', _303 => _303((root) => root.entry)])
|
|
4092
4103
|
})
|
|
4093
4104
|
)
|
|
4094
4105
|
});
|
|
@@ -4170,7 +4181,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4170
4181
|
const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
|
|
4171
4182
|
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
4172
4183
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
4173
|
-
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess',
|
|
4184
|
+
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _304 => _304.route, 'access', _305 => _305.path]) || urlPath2;
|
|
4174
4185
|
_chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
|
|
4175
4186
|
type: "route.matched",
|
|
4176
4187
|
pathname: pathname2,
|
|
@@ -4220,7 +4231,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4220
4231
|
error
|
|
4221
4232
|
});
|
|
4222
4233
|
_chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
|
|
4223
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
4234
|
+
await _optionalChain([runtime, 'optionalAccess', _306 => _306.reportError, 'call', _307 => _307(error)]);
|
|
4224
4235
|
response = _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
4225
4236
|
}
|
|
4226
4237
|
return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
|
|
@@ -4325,12 +4336,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4325
4336
|
}
|
|
4326
4337
|
return;
|
|
4327
4338
|
}
|
|
4328
|
-
if (_optionalChain([req, 'access',
|
|
4339
|
+
if (_optionalChain([req, 'access', _308 => _308.url, 'optionalAccess', _309 => _309.startsWith, 'call', _310 => _310("/@")]) || _optionalChain([req, 'access', _311 => _311.url, 'optionalAccess', _312 => _312.startsWith, 'call', _313 => _313("/node_modules")])) {
|
|
4329
4340
|
return next();
|
|
4330
4341
|
}
|
|
4331
4342
|
if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
|
|
4332
4343
|
requestPathname,
|
|
4333
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
4344
|
+
_optionalChain([farmApp, 'optionalAccess', _314 => _314.getRouteManager, 'call', _315 => _315()]),
|
|
4334
4345
|
[server.config.publicDir, server.config.root],
|
|
4335
4346
|
farmAgentGeneratedPaths(farmConfig),
|
|
4336
4347
|
requestMethod
|
|
@@ -4338,7 +4349,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4338
4349
|
if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
|
|
4339
4350
|
return next();
|
|
4340
4351
|
}
|
|
4341
|
-
if (_optionalChain([req, 'access',
|
|
4352
|
+
if (_optionalChain([req, 'access', _316 => _316.url, 'optionalAccess', _317 => _317.startsWith, 'call', _318 => _318("/__farm/page-data")])) {
|
|
4342
4353
|
const urlObj = parsedRequestUrl;
|
|
4343
4354
|
const targetPath = urlObj.searchParams.get("path") || "/";
|
|
4344
4355
|
let renderedRequest;
|
|
@@ -4368,7 +4379,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4368
4379
|
renderedRequest = targetRequest;
|
|
4369
4380
|
let middlewareMap = /* @__PURE__ */ new Map();
|
|
4370
4381
|
let middlewareContext = /* @__PURE__ */ new Map();
|
|
4371
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
4382
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _319 => _319.hasMiddleware, 'call', _320 => _320()])) {
|
|
4372
4383
|
const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
|
|
4373
4384
|
const targetNodeResponse = createPageDataMiddlewareResponse(res);
|
|
4374
4385
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
@@ -4402,10 +4413,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4402
4413
|
if (pm) {
|
|
4403
4414
|
await pm.runHookParallel("afterRouteMatch", {
|
|
4404
4415
|
pathname: targetPath,
|
|
4405
|
-
matched: !!_optionalChain([match, 'optionalAccess',
|
|
4406
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
4407
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
4408
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
4416
|
+
matched: !!_optionalChain([match, 'optionalAccess', _321 => _321.route]),
|
|
4417
|
+
routePattern: _optionalChain([match, 'optionalAccess', _322 => _322.route, 'optionalAccess', _323 => _323.pattern]) || null,
|
|
4418
|
+
params: _optionalChain([match, 'optionalAccess', _324 => _324.params]) || {},
|
|
4419
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _325 => _325.layouts]) || []).map((l) => l.pattern)
|
|
4409
4420
|
});
|
|
4410
4421
|
}
|
|
4411
4422
|
if (!match) {
|
|
@@ -4440,7 +4451,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4440
4451
|
);
|
|
4441
4452
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
4442
4453
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
4443
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4454
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkD2OU4CX2cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
4444
4455
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4445
4456
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
4446
4457
|
let mergedMetadata = {};
|
|
@@ -4451,7 +4462,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4451
4462
|
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4452
4463
|
(entry) => entry.pattern === layout.pattern
|
|
4453
4464
|
), () => ( {
|
|
4454
|
-
...
|
|
4465
|
+
..._chunkD2OU4CX2cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
|
|
4455
4466
|
serverTree: false
|
|
4456
4467
|
}))
|
|
4457
4468
|
);
|
|
@@ -4464,18 +4475,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4464
4475
|
(metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
|
|
4465
4476
|
)
|
|
4466
4477
|
];
|
|
4467
|
-
const hydrationIslandStrategy =
|
|
4468
|
-
|
|
4469
|
-
) === "islands" ?
|
|
4478
|
+
const hydrationIslandStrategy = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4479
|
+
_chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _326 => _326.getConfig, 'call', _327 => _327()]), () => ( options)))
|
|
4480
|
+
) === "islands" ? _chunkPVB5UYJTcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4470
4481
|
route,
|
|
4471
4482
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4472
4483
|
layouts.map((layout, index) => ({
|
|
4473
4484
|
pattern: layout.pattern,
|
|
4474
4485
|
modulePath: layout.modulePath,
|
|
4475
|
-
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4486
|
+
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _328 => _328[index], 'optionalAccess', _329 => _329.shouldHydrate]) === true,
|
|
4476
4487
|
// Manifest entries carry it; metadata read from source does not.
|
|
4477
|
-
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4478
|
-
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access',
|
|
4488
|
+
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _330 => _330[index], 'optionalAccess', _331 => _331.hasIsolatedClientBoundaries]) === true,
|
|
4489
|
+
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _332 => _332[index], 'optionalAccess', _333 => _333.islandStrategy]), () => ( null))
|
|
4479
4490
|
})),
|
|
4480
4491
|
server.config.root,
|
|
4481
4492
|
true
|
|
@@ -4532,7 +4543,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4532
4543
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4533
4544
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4534
4545
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4535
|
-
), () => (
|
|
4546
|
+
), () => ( _chunkD2OU4CX2cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4536
4547
|
const slotContext = await _chunkYZMSJRM5cjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4537
4548
|
request: targetRequest,
|
|
4538
4549
|
params: slot.params,
|
|
@@ -4582,7 +4593,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4582
4593
|
pageShouldHydrate: shouldHydrate,
|
|
4583
4594
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4584
4595
|
islandStrategy: hydrationIslandStrategy,
|
|
4585
|
-
rendering:
|
|
4596
|
+
rendering: _chunkGL4SPJTEcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4586
4597
|
});
|
|
4587
4598
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4588
4599
|
const layoutStartIndex = _chunkIGBQSUT5cjs.getSharedLayoutPrefixLength.call(void 0,
|
|
@@ -4596,13 +4607,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4596
4607
|
middlewareContext,
|
|
4597
4608
|
() => renderer.renderNavigationFragment({
|
|
4598
4609
|
PageComponent: routeModule.default,
|
|
4599
|
-
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess',
|
|
4610
|
+
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _334 => _334.default]),
|
|
4600
4611
|
pageProps: routeProps,
|
|
4601
4612
|
params,
|
|
4602
4613
|
layouts: layouts.map((layout, index) => ({
|
|
4603
4614
|
pattern: layout.pattern,
|
|
4604
4615
|
module: layoutModules[index],
|
|
4605
|
-
serverTree: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4616
|
+
serverTree: _optionalChain([layoutHydrationMetadata, 'access', _335 => _335[index], 'optionalAccess', _336 => _336.serverTree])
|
|
4606
4617
|
})),
|
|
4607
4618
|
layoutStartIndex,
|
|
4608
4619
|
slots: routeSlots.map((slot) => ({
|
|
@@ -4710,14 +4721,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4710
4721
|
trustProxy: currentServerConfig.trustProxy
|
|
4711
4722
|
}).pathname;
|
|
4712
4723
|
const routeManager2 = farmApp.getRouteManager();
|
|
4713
|
-
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4714
|
-
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4715
|
-
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4724
|
+
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _337 => _337.hasHook, 'call', _338 => _338("beforeRequest")]), () => ( false));
|
|
4725
|
+
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasHook, 'call', _340 => _340("afterResponse")]), () => ( false));
|
|
4726
|
+
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _341 => _341.hasHook, 'call', _342 => _342("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasHook, 'call', _344 => _344("afterRender")]), () => ( false)));
|
|
4716
4727
|
const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
|
|
4717
|
-
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4728
|
+
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _345 => _345.hasRuntimeHook, 'call', _346 => _346("after")]), () => ( false));
|
|
4718
4729
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4719
4730
|
const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4720
|
-
const mcpLabel =
|
|
4731
|
+
const mcpLabel = _chunkMR64FNW6cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4721
4732
|
if (mcpLabel) return mcpLabel;
|
|
4722
4733
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4723
4734
|
return routePathname === _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
@@ -4726,13 +4737,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4726
4737
|
const match = routeManager2.matchRoute(pathname2);
|
|
4727
4738
|
return {
|
|
4728
4739
|
kind: "page",
|
|
4729
|
-
route:
|
|
4740
|
+
route: _chunkMR64FNW6cjs.setFarmRouteLabel.call(void 0,
|
|
4730
4741
|
{
|
|
4731
4742
|
pathname: pathname2,
|
|
4732
|
-
pattern: _optionalChain([match, 'optionalAccess',
|
|
4733
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
4743
|
+
pattern: _optionalChain([match, 'optionalAccess', _347 => _347.route, 'optionalAccess', _348 => _348.pattern]) || null,
|
|
4744
|
+
params: _optionalChain([match, 'optionalAccess', _349 => _349.params]) || {}
|
|
4734
4745
|
},
|
|
4735
|
-
_optionalChain([match, 'optionalAccess',
|
|
4746
|
+
_optionalChain([match, 'optionalAccess', _350 => _350.route]) ? null : pageBuiltInRouteLabel(pathname2)
|
|
4736
4747
|
)
|
|
4737
4748
|
};
|
|
4738
4749
|
};
|
|
@@ -4812,7 +4823,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4812
4823
|
}) : void 0;
|
|
4813
4824
|
let middlewareFailed = false;
|
|
4814
4825
|
try {
|
|
4815
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
4826
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _351 => _351.hasMiddleware, 'call', _352 => _352()])) {
|
|
4816
4827
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
4817
4828
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
4818
4829
|
farmApp.getServerRenderer(),
|
|
@@ -4825,7 +4836,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4825
4836
|
throw error;
|
|
4826
4837
|
});
|
|
4827
4838
|
if (handled) {
|
|
4828
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4839
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _353 => _353.isEnded, 'call', _354 => _354()])) {
|
|
4829
4840
|
const duration = Date.now() - startTime;
|
|
4830
4841
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4831
4842
|
}
|
|
@@ -4840,8 +4851,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4840
4851
|
res
|
|
4841
4852
|
);
|
|
4842
4853
|
}
|
|
4843
|
-
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess',
|
|
4844
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4854
|
+
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.isEnded, 'call', _356 => _356()])) {
|
|
4855
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _357 => _357.isEnded, 'call', _358 => _358()])) {
|
|
4845
4856
|
const duration = Date.now() - startTime;
|
|
4846
4857
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4847
4858
|
}
|
|
@@ -4860,8 +4871,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4860
4871
|
await pm.reportRuntimeRequestError(runtimeSession, error);
|
|
4861
4872
|
} else {
|
|
4862
4873
|
await pm.failRuntimeRequest(runtimeSession, error);
|
|
4863
|
-
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4864
|
-
_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4874
|
+
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _359 => _359.isEnded, 'call', _360 => _360()])) {
|
|
4875
|
+
_optionalChain([responseInterceptor, 'optionalAccess', _361 => _361.release, 'call', _362 => _362()]);
|
|
4865
4876
|
console.error("[FARM] Page error:", error);
|
|
4866
4877
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
4867
4878
|
return;
|
|
@@ -4878,7 +4889,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4878
4889
|
}
|
|
4879
4890
|
})
|
|
4880
4891
|
);
|
|
4881
|
-
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access',
|
|
4892
|
+
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _363 => _363.stack, 'access', _364 => _364.at, 'call', _365 => _365(-1), 'optionalAccess', _366 => _366.handle]);
|
|
4882
4893
|
if (farmOwnsDevCors && viteServer.config.server.cors === false) {
|
|
4883
4894
|
farmMiddlewares.use(createFarmDevViteCorsMiddleware());
|
|
4884
4895
|
}
|
|
@@ -4907,7 +4918,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4907
4918
|
});
|
|
4908
4919
|
}
|
|
4909
4920
|
if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
|
|
4910
|
-
const root = _optionalChain([farmApp, 'optionalAccess',
|
|
4921
|
+
const root = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.root]) || _optionalChain([server, 'optionalAccess', _370 => _370.config, 'access', _371 => _371.root]) || options.root;
|
|
4911
4922
|
return this.resolve(id, path6.join(root, "package.json"), {
|
|
4912
4923
|
...resolveOptions,
|
|
4913
4924
|
skipSelf: true
|
|
@@ -4935,7 +4946,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4935
4946
|
}
|
|
4936
4947
|
},
|
|
4937
4948
|
async load(id, loadOptions) {
|
|
4938
|
-
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess',
|
|
4949
|
+
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _372 => _372.ssr]) && !farmSetupContext.getStore()) {
|
|
4939
4950
|
await pendingClientSetup;
|
|
4940
4951
|
}
|
|
4941
4952
|
if (_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
|
|
@@ -4953,8 +4964,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4953
4964
|
if (imageModule) return imageModule;
|
|
4954
4965
|
}
|
|
4955
4966
|
if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4956
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess',
|
|
4957
|
-
const root = _optionalChain([server, 'optionalAccess',
|
|
4967
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _373 => _373.getConfig, 'call', _374 => _374(), 'access', _375 => _375.renderer]) || _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4968
|
+
const root = _optionalChain([server, 'optionalAccess', _376 => _376.config, 'access', _377 => _377.root]) || options.root;
|
|
4958
4969
|
if (isClientEnvironment(this, loadOptions)) {
|
|
4959
4970
|
return generateProgrammaticClientRouteModuleForId(
|
|
4960
4971
|
id,
|
|
@@ -4970,19 +4981,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4970
4981
|
return FARM_DEV_CLIENT_BOOT_MODULE;
|
|
4971
4982
|
}
|
|
4972
4983
|
if (isFarmClientVirtualId(id)) {
|
|
4973
|
-
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
4974
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4975
|
-
const integrations = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4976
|
-
const root = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4977
|
-
const docs = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4984
|
+
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _378 => _378.getConfig, 'call', _379 => _379()]);
|
|
4985
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.renderer]) || _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4986
|
+
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _381 => _381.integrations]) || options.integrations;
|
|
4987
|
+
const root = _optionalChain([resolvedConfig, 'optionalAccess', _382 => _382.root]) || _optionalChain([server, 'optionalAccess', _383 => _383.config, 'access', _384 => _384.root]) || process.cwd();
|
|
4988
|
+
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.docs]);
|
|
4978
4989
|
const adapterOwnsDocsRuntime = _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, docs);
|
|
4979
|
-
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4990
|
+
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _386 => _386.devtools]), () => ( _chunkRQSPBWXJcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
4980
4991
|
const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
|
|
4981
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4982
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4992
|
+
_optionalChain([docs, 'optionalAccess', _387 => _387.enabled]) ? loadFarmDocsDevRuntime() : null,
|
|
4993
|
+
_optionalChain([docs, 'optionalAccess', _388 => _388.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
|
|
4983
4994
|
devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
|
|
4984
4995
|
]);
|
|
4985
|
-
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess',
|
|
4996
|
+
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _389 => _389.isFarmDocsSearchEnabled, 'call', _390 => _390(docs)]), () => ( false));
|
|
4986
4997
|
const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
|
|
4987
4998
|
docsSearchEnabled,
|
|
4988
4999
|
docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
|
|
@@ -4990,10 +5001,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4990
5001
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4991
5002
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkVZ2P6GRCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4992
5003
|
const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, integrations);
|
|
4993
|
-
const isolatedHydrationMode =
|
|
4994
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
5004
|
+
const isolatedHydrationMode = _chunkD2OU4CX2cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
5005
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.isolatedClientHydration]),
|
|
4995
5006
|
{
|
|
4996
|
-
serverComponents:
|
|
5007
|
+
serverComponents: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "rsc",
|
|
4997
5008
|
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => !_chunkN4AM7Q34cjs.providerSupportsIslands.call(void 0, provider))
|
|
4998
5009
|
}
|
|
4999
5010
|
);
|
|
@@ -5001,32 +5012,32 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
5001
5012
|
integrationProviders,
|
|
5002
5013
|
[
|
|
5003
5014
|
..._chunkN4AM7Q34cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
5004
|
-
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess',
|
|
5015
|
+
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _393 => _393.getFarmDocsDocumentNavigationMatchers, 'call', _394 => _394(docs)]), () => ( []))
|
|
5005
5016
|
],
|
|
5006
5017
|
generatedDocsSearchRuntime,
|
|
5007
5018
|
`${generatedDevtoolsClientRuntime}
|
|
5008
5019
|
${generatedDevIndicatorsClientRuntime}`,
|
|
5009
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
5020
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _395 => _395.plugins]) || [],
|
|
5010
5021
|
root,
|
|
5011
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
5012
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
5013
|
-
adapterOwnsDocsRuntime ? _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess',
|
|
5022
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _396 => _396.srcDir]) || options.srcDir || "src",
|
|
5023
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _397 => _397.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
5024
|
+
adapterOwnsDocsRuntime ? _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _398 => _398.adapter])) : void 0,
|
|
5014
5025
|
renderer,
|
|
5015
|
-
isolatedHydrationMode === "enabled" ||
|
|
5016
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
5017
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
5018
|
-
|
|
5019
|
-
|
|
5026
|
+
isolatedHydrationMode === "enabled" || _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _399 => _399.getRouteManager, 'call', _400 => _400(), 'access', _401 => _401.getIsolatedClientBoundaryModules, 'call', _402 => _402(root)])))), 'optionalAccess', _403 => _403.size]) > 0,
|
|
5027
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _404 => _404.trailingSlash]), () => ( false)),
|
|
5028
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _405 => _405.basePath]), () => ( "/")),
|
|
5029
|
+
_chunkPVB5UYJTcjs.generateClientCachePersistenceCode.call(void 0,
|
|
5030
|
+
_chunkPVB5UYJTcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _406 => _406.cache]))
|
|
5020
5031
|
),
|
|
5021
5032
|
adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
5022
|
-
|
|
5033
|
+
_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "islands"
|
|
5023
5034
|
);
|
|
5024
5035
|
}
|
|
5025
5036
|
if (id === "/@farm/server") {
|
|
5026
5037
|
return generateServerCode();
|
|
5027
5038
|
}
|
|
5028
5039
|
if (id === "/@farm/manifest") {
|
|
5029
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
5040
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _407 => _407.getRouteManager, 'call', _408 => _408()]);
|
|
5030
5041
|
if (!routeManager) {
|
|
5031
5042
|
return `
|
|
5032
5043
|
export const getManifest = () => ({
|
|
@@ -5038,11 +5049,11 @@ export const getManifest = () => ({
|
|
|
5038
5049
|
});
|
|
5039
5050
|
`;
|
|
5040
5051
|
}
|
|
5041
|
-
const globalStylesheetHref =
|
|
5052
|
+
const globalStylesheetHref = _chunkPVB5UYJTcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
5042
5053
|
server.config.root,
|
|
5043
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
5054
|
+
_optionalChain([farmApp, 'optionalAccess', _409 => _409.getConfig, 'call', _410 => _410(), 'access', _411 => _411.srcDir])
|
|
5044
5055
|
);
|
|
5045
|
-
const fullManifest =
|
|
5056
|
+
const fullManifest = _chunkPVB5UYJTcjs.createFarmDevClientManifest.call(void 0,
|
|
5046
5057
|
routeManager.generateClientManifest(server.config.root),
|
|
5047
5058
|
{
|
|
5048
5059
|
sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
|
|
@@ -5058,51 +5069,51 @@ export { manifest };
|
|
|
5058
5069
|
}
|
|
5059
5070
|
},
|
|
5060
5071
|
async transform(code, id, transformOptions) {
|
|
5061
|
-
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess',
|
|
5072
|
+
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _412 => _412.ssr]) && !farmSetupContext.getStore()) {
|
|
5062
5073
|
await pendingClientSetup;
|
|
5063
5074
|
}
|
|
5064
|
-
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess',
|
|
5065
|
-
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5075
|
+
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _413 => _413.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
5076
|
+
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _414 => _414.getConfig, 'call', _415 => _415()]), () => ( options));
|
|
5066
5077
|
let rewrotePackageImports = false;
|
|
5067
|
-
if (
|
|
5078
|
+
if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, actionConfig)) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _416 => _416.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkD2OU4CX2cjs.hasUseClientDirective.call(void 0, code)) {
|
|
5068
5079
|
const file = id.split("?", 1)[0];
|
|
5069
|
-
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
5080
|
+
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
|
|
5070
5081
|
const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
|
|
5071
5082
|
const rewrite = () => {
|
|
5072
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5083
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
|
|
5073
5084
|
if (farmReactServerFiles.has(file)) {
|
|
5074
|
-
for (const child of
|
|
5085
|
+
for (const child of _chunkD2OU4CX2cjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
5075
5086
|
farmReactServerFiles.add(child);
|
|
5076
5087
|
}
|
|
5077
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
5088
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkD2OU4CX2cjs.getFarmClientReachableModules.call(void 0,
|
|
5078
5089
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
5079
5090
|
projectRoot
|
|
5080
5091
|
).has(path6.resolve(file));
|
|
5081
|
-
const reactServer = !serverModule ? null :
|
|
5092
|
+
const reactServer = !serverModule ? null : _chunkD2OU4CX2cjs.rewriteFarmReactServerImports.call(void 0, {
|
|
5082
5093
|
code,
|
|
5083
5094
|
file,
|
|
5084
|
-
reference: (specifier, exportName) =>
|
|
5095
|
+
reference: (specifier, exportName) => _chunkD2OU4CX2cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
5085
5096
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
5086
5097
|
});
|
|
5087
5098
|
if (reactServer !== null) {
|
|
5088
5099
|
code = reactServer;
|
|
5089
5100
|
rewrotePackageImports = true;
|
|
5090
5101
|
}
|
|
5091
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
5102
|
+
const internal = farmReactServerFiles.has(file) ? _chunkD2OU4CX2cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
5092
5103
|
code,
|
|
5093
5104
|
file,
|
|
5094
|
-
reference: (clientFile) =>
|
|
5105
|
+
reference: (clientFile) => _chunkD2OU4CX2cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
5095
5106
|
}) : null;
|
|
5096
5107
|
if (internal !== null) {
|
|
5097
5108
|
code = internal;
|
|
5098
5109
|
rewrotePackageImports = true;
|
|
5099
5110
|
}
|
|
5100
5111
|
}
|
|
5101
|
-
const rewritePackageImports = (source2) =>
|
|
5112
|
+
const rewritePackageImports = (source2) => _chunkD2OU4CX2cjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
5102
5113
|
code: source2,
|
|
5103
5114
|
file,
|
|
5104
5115
|
root: projectRoot,
|
|
5105
|
-
isClientPackage: (specifier) =>
|
|
5116
|
+
isClientPackage: (specifier) => _chunkD2OU4CX2cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
5106
5117
|
});
|
|
5107
5118
|
const source = code;
|
|
5108
5119
|
const referenced = inspectPackages(() => rewritePackageImports(source));
|
|
@@ -5110,11 +5121,11 @@ export { manifest };
|
|
|
5110
5121
|
code = referenced;
|
|
5111
5122
|
rewrotePackageImports = true;
|
|
5112
5123
|
}
|
|
5113
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5124
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr]) === true) {
|
|
5114
5125
|
const cached = rewriteFarmReactCacheImport(
|
|
5115
5126
|
code,
|
|
5116
5127
|
file,
|
|
5117
|
-
_optionalChain([runtimeModule, 'optionalCall',
|
|
5128
|
+
_optionalChain([runtimeModule, 'optionalCall', _421 => _421(FARM_REACT_CACHE_MODULE)])
|
|
5118
5129
|
);
|
|
5119
5130
|
if (cached !== null) {
|
|
5120
5131
|
code = cached;
|
|
@@ -5122,12 +5133,12 @@ export { manifest };
|
|
|
5122
5133
|
}
|
|
5123
5134
|
}
|
|
5124
5135
|
};
|
|
5125
|
-
if (buildSnapshot)
|
|
5136
|
+
if (buildSnapshot) _chunkD2OU4CX2cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
|
|
5126
5137
|
else rewrite();
|
|
5127
5138
|
}
|
|
5128
5139
|
if (islandsServerFns() && !_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
5129
5140
|
const serverFns = _chunk7O3YJ6NPcjs.transformFarmServerFns.call(void 0, code, id, {
|
|
5130
|
-
environment: _optionalChain([transformOptions, 'optionalAccess',
|
|
5141
|
+
environment: _optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr]) === true ? "rsc" : "client"
|
|
5131
5142
|
});
|
|
5132
5143
|
if (serverFns) {
|
|
5133
5144
|
if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
|
|
@@ -5140,8 +5151,8 @@ export { manifest };
|
|
|
5140
5151
|
const actionModule = transformFarmFormActionModule({
|
|
5141
5152
|
code,
|
|
5142
5153
|
id,
|
|
5143
|
-
root: actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
5144
|
-
ssr: _optionalChain([transformOptions, 'optionalAccess',
|
|
5154
|
+
root: actionConfig.root || _optionalChain([server, 'optionalAccess', _423 => _423.config, 'access', _424 => _424.root]) || process.cwd(),
|
|
5155
|
+
ssr: _optionalChain([transformOptions, 'optionalAccess', _425 => _425.ssr]) === true,
|
|
5145
5156
|
// Parsed by file type: page components are TSX.
|
|
5146
5157
|
parse: (source) => _vite.parseSync.call(void 0, file, source).program,
|
|
5147
5158
|
runtimeModule,
|
|
@@ -5149,21 +5160,21 @@ export { manifest };
|
|
|
5149
5160
|
});
|
|
5150
5161
|
if (actionModule) return { code: actionModule, map: null };
|
|
5151
5162
|
}
|
|
5152
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5153
|
-
const docsConfigModule = _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess',
|
|
5154
|
-
if (
|
|
5155
|
-
const redacted =
|
|
5163
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr])) {
|
|
5164
|
+
const docsConfigModule = _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _427 => _427.getConfig, 'call', _428 => _428(), 'optionalAccess', _429 => _429.docs]));
|
|
5165
|
+
if (_chunkPVB5UYJTcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
5166
|
+
const redacted = _chunkPVB5UYJTcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
5156
5167
|
if (redacted !== null) return { code: redacted, map: null };
|
|
5157
5168
|
}
|
|
5158
5169
|
}
|
|
5159
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5160
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5161
|
-
if ((_optionalChain([currentConfig, 'access',
|
|
5170
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr])) {
|
|
5171
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _431 => _431.getConfig, 'call', _432 => _432()]), () => ( options));
|
|
5172
|
+
if ((_optionalChain([currentConfig, 'access', _433 => _433.experimental, 'optionalAccess', _434 => _434.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
5162
5173
|
const violation = findClientServerFnViolation(code, id);
|
|
5163
5174
|
if (violation) {
|
|
5164
|
-
const locate =
|
|
5175
|
+
const locate = _chunkD2OU4CX2cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
|
|
5165
5176
|
this.error(
|
|
5166
|
-
|
|
5177
|
+
_chunkD2OU4CX2cjs.formatFarmDiagnostic.call(void 0,
|
|
5167
5178
|
createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
|
|
5168
5179
|
currentConfig.root
|
|
5169
5180
|
)
|
|
@@ -5171,8 +5182,8 @@ export { manifest };
|
|
|
5171
5182
|
}
|
|
5172
5183
|
}
|
|
5173
5184
|
}
|
|
5174
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5175
|
-
await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5185
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _435 => _435.ssr]) && shouldInspectClientBoundary(id, code)) {
|
|
5186
|
+
await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _436 => _436.getConfig, 'call', _437 => _437()]), () => ( options)));
|
|
5176
5187
|
}
|
|
5177
5188
|
if (typeof imageImports.transform === "function") {
|
|
5178
5189
|
const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
|
|
@@ -5187,13 +5198,13 @@ export { manifest };
|
|
|
5187
5198
|
id,
|
|
5188
5199
|
transformOptions
|
|
5189
5200
|
);
|
|
5190
|
-
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess',
|
|
5201
|
+
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _438 => _438.code, 'optionalAccess', _439 => _439.toString, 'call', _440 => _440()]);
|
|
5191
5202
|
if (fontCode) {
|
|
5192
5203
|
transformedCode = fontCode;
|
|
5193
5204
|
transformed = true;
|
|
5194
5205
|
}
|
|
5195
5206
|
}
|
|
5196
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5207
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _441 => _441.ssr]) && server) {
|
|
5197
5208
|
const rewrittenImports = rewriteEarlySsrRelativeImports({
|
|
5198
5209
|
code: transformedCode,
|
|
5199
5210
|
id,
|
|
@@ -5205,27 +5216,27 @@ export { manifest };
|
|
|
5205
5216
|
transformed = true;
|
|
5206
5217
|
}
|
|
5207
5218
|
}
|
|
5208
|
-
if (
|
|
5219
|
+
if (_chunkD2OU4CX2cjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
5209
5220
|
const clientBoundarySource = transformedCode;
|
|
5210
5221
|
const moduleInfo = this.getModuleInfo(id);
|
|
5211
5222
|
if (moduleInfo) {
|
|
5212
5223
|
moduleInfo.isClientComponent = true;
|
|
5213
5224
|
}
|
|
5214
|
-
transformedCode =
|
|
5225
|
+
transformedCode = _chunkD2OU4CX2cjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
5215
5226
|
transformed = true;
|
|
5216
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5227
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _442 => _442.getConfig, 'call', _443 => _443()]), () => ( options));
|
|
5217
5228
|
let isolatedModuleReference = null;
|
|
5218
5229
|
let rendererIslandModule = false;
|
|
5219
|
-
const root = currentConfig.root || _optionalChain([server, 'optionalAccess',
|
|
5230
|
+
const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _444 => _444.config, 'access', _445 => _445.root]) || process.cwd();
|
|
5220
5231
|
const cleanId = id.split("?", 1)[0];
|
|
5221
|
-
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
5222
|
-
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess',
|
|
5223
|
-
if (
|
|
5224
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
5232
|
+
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _446 => _446.getRouteManager, 'call', _447 => _447(), 'access', _448 => _448.getIsolatedClientBoundaryModules, 'call', _449 => _449(root)])));
|
|
5233
|
+
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _450 => _450.has, 'call', _451 => _451(path6.resolve(cleanId))]) === true;
|
|
5234
|
+
if (_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkD2OU4CX2cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
5235
|
+
cleanId.replace(/\\/g, "/").includes(_chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5225
5236
|
isolatedModuleReference = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
5226
|
-
const islandsMode =
|
|
5227
|
-
const explicitStrategy =
|
|
5228
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
5237
|
+
const islandsMode = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, currentConfig)) === "islands";
|
|
5238
|
+
const explicitStrategy = _chunkD2OU4CX2cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
5239
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkPVB5UYJTcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
5229
5240
|
if (inference) {
|
|
5230
5241
|
for (const file of inference.files) {
|
|
5231
5242
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -5238,8 +5249,8 @@ export { manifest };
|
|
|
5238
5249
|
islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
|
|
5239
5250
|
parse: (source) => this.parse(source),
|
|
5240
5251
|
slots: islandsMode,
|
|
5241
|
-
browser: _optionalChain([transformOptions, 'optionalAccess',
|
|
5242
|
-
inferredInteraction: _optionalChain([inference, 'optionalAccess',
|
|
5252
|
+
browser: _optionalChain([transformOptions, 'optionalAccess', _452 => _452.ssr]) !== true,
|
|
5253
|
+
inferredInteraction: _optionalChain([inference, 'optionalAccess', _453 => _453.strategy]) === "interaction",
|
|
5243
5254
|
runtimeModule
|
|
5244
5255
|
});
|
|
5245
5256
|
if (!transformedBoundary) {
|
|
@@ -5248,14 +5259,14 @@ export { manifest };
|
|
|
5248
5259
|
);
|
|
5249
5260
|
}
|
|
5250
5261
|
transformedCode = transformedBoundary;
|
|
5251
|
-
} else if (selectedForIsolatedHydration &&
|
|
5262
|
+
} else if (selectedForIsolatedHydration && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkD2OU4CX2cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5252
5263
|
rendererIslandModule = true;
|
|
5253
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5254
|
-
const renderer =
|
|
5264
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _454 => _454.ssr]) === true) {
|
|
5265
|
+
const renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
|
|
5255
5266
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
5256
5267
|
code: transformedCode,
|
|
5257
5268
|
moduleReference: _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root),
|
|
5258
|
-
islandStrategy: _nullishCoalesce(
|
|
5269
|
+
islandStrategy: _nullishCoalesce(_chunkD2OU4CX2cjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
|
|
5259
5270
|
parse: (source) => this.parse(source),
|
|
5260
5271
|
withIsland: renderer.server
|
|
5261
5272
|
});
|
|
@@ -5288,7 +5299,7 @@ export { manifest };
|
|
|
5288
5299
|
);
|
|
5289
5300
|
return;
|
|
5290
5301
|
}` : "";
|
|
5291
|
-
const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess',
|
|
5302
|
+
const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess', _455 => _455.ssr]) && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
|
|
5292
5303
|
const hmrCode = rendererIslandHmr ? `
|
|
5293
5304
|
if (import.meta.hot) {
|
|
5294
5305
|
import.meta.hot.accept((newModule) => {
|
|
@@ -5298,7 +5309,7 @@ if (import.meta.hot) {
|
|
|
5298
5309
|
}
|
|
5299
5310
|
});
|
|
5300
5311
|
}
|
|
5301
|
-
` : _optionalChain([transformOptions, 'optionalAccess',
|
|
5312
|
+
` : _optionalChain([transformOptions, 'optionalAccess', _456 => _456.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
|
|
5302
5313
|
if (import.meta.hot) {
|
|
5303
5314
|
import.meta.hot.accept((newModule) => {
|
|
5304
5315
|
${isolatedHmrUpdate}
|
|
@@ -5354,14 +5365,14 @@ if (import.meta.hot) {
|
|
|
5354
5365
|
}
|
|
5355
5366
|
_chunk7ZDLE77Pcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
|
|
5356
5367
|
_chunk7ZDLE77Pcjs.logger.info("Pre-rendering SSG pages...");
|
|
5357
|
-
const outDir = path6.join(_optionalChain([server, 'optionalAccess',
|
|
5368
|
+
const outDir = path6.join(_optionalChain([server, 'optionalAccess', _457 => _457.config, 'access', _458 => _458.root]) || process.cwd(), options.outDir || "dist");
|
|
5358
5369
|
const clientDir = path6.join(outDir, "client");
|
|
5359
5370
|
for (const page of ssgPages) {
|
|
5360
5371
|
try {
|
|
5361
5372
|
const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
|
|
5362
5373
|
await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
|
|
5363
5374
|
const mod = await routeManager.loadRouteModule(page.filePath);
|
|
5364
|
-
if (!_optionalChain([mod, 'optionalAccess',
|
|
5375
|
+
if (!_optionalChain([mod, 'optionalAccess', _459 => _459.default])) return;
|
|
5365
5376
|
const { layouts } = routeManager.matchRoute(page.urlPath);
|
|
5366
5377
|
const layoutModules = await Promise.all(
|
|
5367
5378
|
layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
|
|
@@ -5393,7 +5404,7 @@ if (import.meta.hot) {
|
|
|
5393
5404
|
const i18nSnapshot = _chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
5394
5405
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
5395
5406
|
const fullHtml = `<!DOCTYPE html>
|
|
5396
|
-
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
5407
|
+
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _460 => _460.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
5397
5408
|
<head>
|
|
5398
5409
|
<meta charset="utf-8">
|
|
5399
5410
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -5438,11 +5449,11 @@ if (import.meta.hot) {
|
|
|
5438
5449
|
watchChange(id, change) {
|
|
5439
5450
|
const watched = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, id);
|
|
5440
5451
|
const appSource = !watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched);
|
|
5441
|
-
if (appSource) _optionalChain([farmApp, 'optionalAccess',
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5452
|
+
if (appSource) _optionalChain([farmApp, 'optionalAccess', _461 => _461.getRouteManager, 'call', _462 => _462(), 'access', _463 => _463.noteSourceChange, 'call', _464 => _464(id, change.event)]);
|
|
5453
|
+
_chunkD2OU4CX2cjs.noteFarmClientReachableModuleChange.call(void 0, id, change.event, { appSource });
|
|
5454
|
+
_chunkD2OU4CX2cjs.invalidateFarmClientOnlyScan.call(void 0, id, change.event);
|
|
5455
|
+
_chunkPVB5UYJTcjs.invalidateFarmRouteRootInferences.call(void 0, id, change.event);
|
|
5456
|
+
_chunkD2OU4CX2cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5446
5457
|
},
|
|
5447
5458
|
async handleHotUpdate(ctx) {
|
|
5448
5459
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5467,7 +5478,7 @@ if (import.meta.hot) {
|
|
|
5467
5478
|
server2.moduleGraph.invalidateModule(mod);
|
|
5468
5479
|
}
|
|
5469
5480
|
}
|
|
5470
|
-
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
5481
|
+
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _465 => _465.getConfig, 'call', _466 => _466()]);
|
|
5471
5482
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
5472
5483
|
const reloadAfterEdit = () => {
|
|
5473
5484
|
for (const files of pendingRouteReloads) {
|
|
@@ -5475,31 +5486,31 @@ if (import.meta.hot) {
|
|
|
5475
5486
|
}
|
|
5476
5487
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5477
5488
|
};
|
|
5478
|
-
if (normalizedFile.includes(
|
|
5489
|
+
if (normalizedFile.includes(_chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
|
|
5479
5490
|
path6.posix.join(
|
|
5480
|
-
_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5481
|
-
|
|
5491
|
+
_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _467 => _467.root]) || options.root || server2.config.root),
|
|
5492
|
+
_chunkD2OU4CX2cjs.FARM_CLIENT_REFERENCE_DIRECTORY
|
|
5482
5493
|
)
|
|
5483
5494
|
))
|
|
5484
5495
|
return modules;
|
|
5485
|
-
if (currentFarmConfig &&
|
|
5496
|
+
if (currentFarmConfig && _chunkYCGOQKVCcjs.isFarmAPIRouteFileName.call(void 0,
|
|
5486
5497
|
path6.posix.basename(normalizedFile),
|
|
5487
|
-
|
|
5488
|
-
) &&
|
|
5498
|
+
_chunkYCGOQKVCcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
|
|
5499
|
+
) && _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
5489
5500
|
(appDir) => normalizedFile.startsWith(`${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
5490
5501
|
)) {
|
|
5491
5502
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
5492
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5503
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _468 => _468(`updated ${file}`)]);
|
|
5493
5504
|
reloadAfterEdit();
|
|
5494
5505
|
return [];
|
|
5495
5506
|
}
|
|
5496
|
-
const currentSrcRoot = currentFarmConfig ?
|
|
5507
|
+
const currentSrcRoot = currentFarmConfig ? _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
|
|
5497
5508
|
if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkPYPHM7AScjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
|
|
5498
5509
|
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5499
5510
|
for (const mod of modules) {
|
|
5500
5511
|
server2.moduleGraph.invalidateModule(mod);
|
|
5501
5512
|
}
|
|
5502
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5513
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _469 => _469(`updated ${file}`)]);
|
|
5503
5514
|
reloadAfterEdit();
|
|
5504
5515
|
return [];
|
|
5505
5516
|
}
|
|
@@ -5509,22 +5520,22 @@ if (import.meta.hot) {
|
|
|
5509
5520
|
for (const mod of modules) {
|
|
5510
5521
|
server2.moduleGraph.invalidateModule(mod);
|
|
5511
5522
|
}
|
|
5512
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5523
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
|
|
5513
5524
|
reloadAfterEdit();
|
|
5514
5525
|
return [];
|
|
5515
5526
|
}
|
|
5516
5527
|
if (apiRouteManager && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
|
|
5517
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5528
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
|
|
5518
5529
|
}
|
|
5519
|
-
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5520
|
-
const planRouteManager = _optionalChain([farmApp, 'optionalAccess',
|
|
5530
|
+
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _472 => _472.experimental, 'optionalAccess', _473 => _473.isolatedClientHydration]);
|
|
5531
|
+
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _474 => _474.getRouteManager, 'call', _475 => _475()]);
|
|
5521
5532
|
const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
|
|
5522
|
-
const tracksAsyncOwnerIslands =
|
|
5533
|
+
const tracksAsyncOwnerIslands = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _476 => _476.renderer])) && planRouteManager !== void 0;
|
|
5523
5534
|
let clientPlanCurrent = false;
|
|
5524
5535
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
5525
5536
|
const routeManager = planRouteManager;
|
|
5526
|
-
await _optionalChain([ctx, 'access',
|
|
5527
|
-
if (_optionalChain([routeManager, 'optionalAccess',
|
|
5537
|
+
await _optionalChain([ctx, 'access', _477 => _477.read, 'optionalCall', _478 => _478()]);
|
|
5538
|
+
if (_optionalChain([routeManager, 'optionalAccess', _479 => _479.isEditPlanNeutral, 'call', _480 => _480(file)])) {
|
|
5528
5539
|
clientPlanCurrent = true;
|
|
5529
5540
|
} else if (routeManager) {
|
|
5530
5541
|
routeManager.noteSourceChange(file, "update");
|
|
@@ -5568,7 +5579,7 @@ if (import.meta.hot) {
|
|
|
5568
5579
|
}
|
|
5569
5580
|
}
|
|
5570
5581
|
}
|
|
5571
|
-
const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess',
|
|
5582
|
+
const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _481 => _481.getRouteManager, 'call', _482 => _482(), 'access', _483 => _483.isRendererRouteModule, 'call', _484 => _484(normalizedFile)]) === true;
|
|
5572
5583
|
if (normalizedFile.includes("/app/") || rendererRouteFile) {
|
|
5573
5584
|
if (normalizedFile.includes("middleware.")) {
|
|
5574
5585
|
if (middlewareManager) {
|
|
@@ -5586,7 +5597,7 @@ if (import.meta.hot) {
|
|
|
5586
5597
|
}
|
|
5587
5598
|
return [];
|
|
5588
5599
|
}
|
|
5589
|
-
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess',
|
|
5600
|
+
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _485 => _485.getRouteManager, 'call', _486 => _486(), 'access', _487 => _487.invalidateClientManifest, 'call', _488 => _488()]);
|
|
5590
5601
|
const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
|
|
5591
5602
|
if (manifestModule) {
|
|
5592
5603
|
server2.moduleGraph.invalidateModule(manifestModule);
|
|
@@ -5601,15 +5612,15 @@ if (import.meta.hot) {
|
|
|
5601
5612
|
return [];
|
|
5602
5613
|
}
|
|
5603
5614
|
}
|
|
5604
|
-
if (currentFarmConfig && planRouteManager &&
|
|
5605
|
-
_optionalChain([server2, 'access',
|
|
5615
|
+
if (currentFarmConfig && planRouteManager && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentFarmConfig) && shouldEmitFarmClientRootHmr(currentFarmConfig.renderer) && reachesSharedFarmRendererIsland(
|
|
5616
|
+
_optionalChain([server2, 'access', _489 => _489.environments, 'access', _490 => _490.client, 'optionalAccess', _491 => _491.moduleGraph]),
|
|
5606
5617
|
normalizedFile,
|
|
5607
5618
|
planRouteManager.getIsolatedClientBoundaryModules(currentFarmConfig.root)
|
|
5608
5619
|
)) {
|
|
5609
5620
|
reloadAfterEdit();
|
|
5610
5621
|
return [];
|
|
5611
5622
|
}
|
|
5612
|
-
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access',
|
|
5623
|
+
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _492 => _492.environments, 'access', _493 => _493.client, 'optionalAccess', _494 => _494.moduleGraph, 'access', _495 => _495.getModulesByFile, 'call', _496 => _496(normalizedFile), 'optionalAccess', _497 => _497.size]) && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
|
|
5613
5624
|
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5614
5625
|
reloadAfterEdit();
|
|
5615
5626
|
return [];
|
|
@@ -5707,7 +5718,7 @@ function createPageDataMiddlewareResponse(res) {
|
|
|
5707
5718
|
return (...args) => {
|
|
5708
5719
|
if (captures(target.statusCode, target.getHeader("location"))) {
|
|
5709
5720
|
const callback = args.find((arg) => typeof arg === "function");
|
|
5710
|
-
_optionalChain([callback, 'optionalCall',
|
|
5721
|
+
_optionalChain([callback, 'optionalCall', _498 => _498()]);
|
|
5711
5722
|
return property === "write" ? true : response;
|
|
5712
5723
|
}
|
|
5713
5724
|
return target[property](...args);
|
|
@@ -5771,12 +5782,12 @@ function isFarmClientVirtualId(id) {
|
|
|
5771
5782
|
}
|
|
5772
5783
|
function isClientEnvironment(context, loadOptions) {
|
|
5773
5784
|
const environment = context.environment;
|
|
5774
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5775
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5776
|
-
return _optionalChain([loadOptions, 'optionalAccess',
|
|
5785
|
+
if (_optionalChain([environment, 'optionalAccess', _499 => _499.config, 'optionalAccess', _500 => _500.consumer])) return environment.config.consumer === "client";
|
|
5786
|
+
if (_optionalChain([environment, 'optionalAccess', _501 => _501.name])) return environment.name === "client";
|
|
5787
|
+
return _optionalChain([loadOptions, 'optionalAccess', _502 => _502.ssr]) !== true;
|
|
5777
5788
|
}
|
|
5778
5789
|
function invalidateProgrammaticClientRouteModules(server) {
|
|
5779
|
-
const graph = _optionalChain([server, 'access',
|
|
5790
|
+
const graph = _optionalChain([server, 'access', _503 => _503.environments, 'optionalAccess', _504 => _504.client, 'optionalAccess', _505 => _505.moduleGraph]);
|
|
5780
5791
|
if (!graph) return;
|
|
5781
5792
|
for (const [id, module] of graph.idToModuleMap) {
|
|
5782
5793
|
if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
|
|
@@ -5786,27 +5797,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5786
5797
|
const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5787
5798
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5788
5799
|
watchFile(routesFile);
|
|
5789
|
-
return
|
|
5800
|
+
return _chunkD2OU4CX2cjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5790
5801
|
kind: parsed.kind,
|
|
5791
5802
|
routePath: parsed.routePath,
|
|
5792
5803
|
routesFile,
|
|
5793
|
-
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess',
|
|
5794
|
-
|
|
5804
|
+
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _506 => _506.routes, 'access', _507 => _507.get, 'call', _508 => _508(
|
|
5805
|
+
_chunkD2OU4CX2cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5795
5806
|
)]),
|
|
5796
5807
|
// React's client module exports no createElement; the main client entry imports React too.
|
|
5797
|
-
rendererClient:
|
|
5808
|
+
rendererClient: _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
|
|
5798
5809
|
toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
|
|
5799
5810
|
});
|
|
5800
5811
|
}
|
|
5801
5812
|
function resolveRealModuleFile(filePath, root) {
|
|
5802
|
-
const resolved = _nullishCoalesce(
|
|
5813
|
+
const resolved = _nullishCoalesce(_chunkD2OU4CX2cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5803
5814
|
try {
|
|
5804
5815
|
return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5805
5816
|
} catch (e29) {
|
|
5806
5817
|
return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, resolved);
|
|
5807
5818
|
}
|
|
5808
5819
|
}
|
|
5809
|
-
function generateProgrammaticRouteModule(moduleId, root, renderer =
|
|
5820
|
+
function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkLEZJZX4Ccjs.REACT_RENDERER) {
|
|
5810
5821
|
const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5811
5822
|
if (!parsed) {
|
|
5812
5823
|
return "";
|
|
@@ -6113,12 +6124,12 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
6113
6124
|
}
|
|
6114
6125
|
const schemas = routeModule.__farmRouteSchemas;
|
|
6115
6126
|
const params = parseRouteModuleSchema(
|
|
6116
|
-
_optionalChain([schemas, 'optionalAccess',
|
|
6127
|
+
_optionalChain([schemas, 'optionalAccess', _509 => _509.params]),
|
|
6117
6128
|
input.props.params,
|
|
6118
6129
|
"params",
|
|
6119
6130
|
input.routePath
|
|
6120
6131
|
);
|
|
6121
|
-
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess',
|
|
6132
|
+
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _510 => _510.search]), input.search, "search", input.routePath);
|
|
6122
6133
|
return {
|
|
6123
6134
|
...input.props,
|
|
6124
6135
|
params,
|
|
@@ -6137,8 +6148,8 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
6137
6148
|
throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
|
|
6138
6149
|
}
|
|
6139
6150
|
}
|
|
6140
|
-
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer =
|
|
6141
|
-
const providerClientCode =
|
|
6151
|
+
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkLEZJZX4Ccjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
6152
|
+
const providerClientCode = _chunkPVB5UYJTcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
6142
6153
|
integrationProviders,
|
|
6143
6154
|
root,
|
|
6144
6155
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -6149,8 +6160,8 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
|
|
|
6149
6160
|
srcDir,
|
|
6150
6161
|
publicRuntimeConfig
|
|
6151
6162
|
);
|
|
6152
|
-
const appSetupPath =
|
|
6153
|
-
const rendererClientImports =
|
|
6163
|
+
const appSetupPath = _chunkLEZJZX4Ccjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
|
|
6164
|
+
const rendererClientImports = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
|
|
6154
6165
|
import { hydrateRoot, createRoot } from 'react-dom/client'
|
|
6155
6166
|
import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
|
|
6156
6167
|
// Named exports only: a renderer's client module needs no default export. `React` is a
|
|
@@ -6164,13 +6175,13 @@ __farmConfigureApp(__farmAppSetup)` : `import * as __farmRendererClient from ${J
|
|
|
6164
6175
|
import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
|
|
6165
6176
|
const React = { ...__farmRendererClient }`
|
|
6166
6177
|
);
|
|
6167
|
-
const rendererIslands = isolatedHydrationEnabled && !islandValues && !
|
|
6178
|
+
const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _chunkLEZJZX4Ccjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
|
|
6168
6179
|
const isolatedHydrationImport = rendererIslands ? "import { createFarmRendererIslandRuntime } from '@farm.js/core/internal/renderer-islands'" : isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
|
|
6169
6180
|
const docsAdapterImportBlock = _chunkP4ZLFUNBcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
|
|
6170
6181
|
docsAdapterUI,
|
|
6171
6182
|
docsConfigModule,
|
|
6172
6183
|
// Config resolution keeps an adapter to its UI's renderer, so this is the UI's renderer too.
|
|
6173
|
-
|
|
6184
|
+
_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
|
|
6174
6185
|
);
|
|
6175
6186
|
const isolatedHydrationRuntime = rendererIslands ? `const farmIsolatedHydrationRuntime = createFarmRendererIslandRuntime({
|
|
6176
6187
|
renderer: React,
|
|
@@ -6236,7 +6247,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
6236
6247
|
return null;
|
|
6237
6248
|
}
|
|
6238
6249
|
}
|
|
6239
|
-
${islandValues ? `${
|
|
6250
|
+
${islandValues ? `${_chunkPVB5UYJTcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
6240
6251
|
let farmLastRouteState = null;
|
|
6241
6252
|
|
|
6242
6253
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -7077,7 +7088,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
7077
7088
|
return loadedLayouts;
|
|
7078
7089
|
}
|
|
7079
7090
|
|
|
7080
|
-
${
|
|
7091
|
+
${_chunkPVB5UYJTcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
7081
7092
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
7082
7093
|
let wrapped = element;
|
|
7083
7094
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -7156,7 +7167,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
|
|
|
7156
7167
|
|
|
7157
7168
|
function hydrateFarmRoute(container, route) {
|
|
7158
7169
|
farmLastRouteState = route;
|
|
7159
|
-
${
|
|
7170
|
+
${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
|
|
7160
7171
|
}
|
|
7161
7172
|
|
|
7162
7173
|
function renderFarmRoute(root, route) {
|
|
@@ -7300,7 +7311,7 @@ async function tryHydrateImportedPage(
|
|
|
7300
7311
|
wrap: wrapFarmClientRouteGraph,
|
|
7301
7312
|
};
|
|
7302
7313
|
} else if (useHydrate && container?.id === '__farm_page__') {
|
|
7303
|
-
wrappedElement = wrapFarmClientRouteGraph(${
|
|
7314
|
+
wrappedElement = wrapFarmClientRouteGraph(${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
|
|
7304
7315
|
} else {
|
|
7305
7316
|
wrappedElement = await buildWrappedHydrationElement(
|
|
7306
7317
|
currentPageComponent,
|
|
@@ -7377,7 +7388,7 @@ function readActiveLayoutPatterns() {
|
|
|
7377
7388
|
);
|
|
7378
7389
|
}
|
|
7379
7390
|
|
|
7380
|
-
${
|
|
7391
|
+
${_chunkPVB5UYJTcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
7381
7392
|
|
|
7382
7393
|
function activateFragmentScripts(root) {
|
|
7383
7394
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -7436,7 +7447,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
7436
7447
|
return shell.innerHTML;
|
|
7437
7448
|
}
|
|
7438
7449
|
|
|
7439
|
-
${islandValues ?
|
|
7450
|
+
${islandValues ? _chunkPVB5UYJTcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
7440
7451
|
container,
|
|
7441
7452
|
fragment,
|
|
7442
7453
|
currentPatterns,
|
|
@@ -7511,9 +7522,9 @@ ${islandValues ? `
|
|
|
7511
7522
|
return nextTarget;
|
|
7512
7523
|
}
|
|
7513
7524
|
|
|
7514
|
-
${islandValues ? `${
|
|
7525
|
+
${islandValues ? `${_chunkPVB5UYJTcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
7515
7526
|
|
|
7516
|
-
${
|
|
7527
|
+
${_chunkPVB5UYJTcjs.FARM_EARLY_NAVIGATION_SOURCE}
|
|
7517
7528
|
|
|
7518
7529
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
7519
7530
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -8219,8 +8230,8 @@ function generateClientManifest(bundle) {
|
|
|
8219
8230
|
async function defineConfig(config = {}) {
|
|
8220
8231
|
const tailwindVitePlugin = await _chunkADCVSTFVcjs.loadTailwindVitePlugin.call(void 0, );
|
|
8221
8232
|
const appRoot = path6.resolve(config.root || process.cwd());
|
|
8222
|
-
if (_optionalChain([config, 'access',
|
|
8223
|
-
const { config: layeredConfig } = await import("./layers-
|
|
8233
|
+
if (_optionalChain([config, 'access', _511 => _511.extends, 'optionalAccess', _512 => _512.length])) {
|
|
8234
|
+
const { config: layeredConfig } = await import("./layers-6R55QDT5.cjs").then(
|
|
8224
8235
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
8225
8236
|
root: appRoot,
|
|
8226
8237
|
mode: process.env.NODE_ENV === "production" ? "production" : "development"
|
|
@@ -8228,12 +8239,12 @@ async function defineConfig(config = {}) {
|
|
|
8228
8239
|
);
|
|
8229
8240
|
config = layeredConfig;
|
|
8230
8241
|
}
|
|
8231
|
-
config.renderer =
|
|
8232
|
-
config.images =
|
|
8233
|
-
const rendererVitePlugins = await
|
|
8242
|
+
config.renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
8243
|
+
config.images = _chunkPVB5UYJTcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
8244
|
+
const rendererVitePlugins = await _chunkLEZJZX4Ccjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
8234
8245
|
ssr: true
|
|
8235
8246
|
});
|
|
8236
|
-
const reactRefreshPlugins =
|
|
8247
|
+
const reactRefreshPlugins = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkQCVP22KWcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
|
|
8237
8248
|
const nodeBuiltinStubs = {
|
|
8238
8249
|
"node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
|
|
8239
8250
|
"node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
|
|
@@ -8321,13 +8332,13 @@ async function defineConfig(config = {}) {
|
|
|
8321
8332
|
if (!serverStarted) {
|
|
8322
8333
|
serverStarted = true;
|
|
8323
8334
|
const elapsed = Date.now() - startTime;
|
|
8324
|
-
const address = _optionalChain([server, 'access',
|
|
8335
|
+
const address = _optionalChain([server, 'access', _513 => _513.httpServer, 'optionalAccess', _514 => _514.address, 'call', _515 => _515()]);
|
|
8325
8336
|
const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
|
|
8326
8337
|
const hostConfig = server.config.server.host;
|
|
8327
8338
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
8328
8339
|
console.log("");
|
|
8329
8340
|
console.log(
|
|
8330
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
8341
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkJZAGIXMBcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
8331
8342
|
);
|
|
8332
8343
|
console.log("");
|
|
8333
8344
|
console.log(
|
|
@@ -8361,7 +8372,7 @@ async function defineConfig(config = {}) {
|
|
|
8361
8372
|
plugins: [
|
|
8362
8373
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
8363
8374
|
_chunkQCVP22KWcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
8364
|
-
|
|
8375
|
+
_chunkPVB5UYJTcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
8365
8376
|
tailwindVitePlugin,
|
|
8366
8377
|
...rendererVitePlugins,
|
|
8367
8378
|
...reactRefreshPlugins,
|
|
@@ -8371,16 +8382,16 @@ async function defineConfig(config = {}) {
|
|
|
8371
8382
|
farmNavigationPlugin(config.renderer),
|
|
8372
8383
|
farmIslandContainersPlugin(config),
|
|
8373
8384
|
farmPlugin(config),
|
|
8374
|
-
|
|
8385
|
+
_chunkD2OU4CX2cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
8375
8386
|
farmBrandingPlugin
|
|
8376
8387
|
],
|
|
8377
8388
|
customLogger: farmLogger,
|
|
8378
8389
|
clearScreen: false,
|
|
8379
8390
|
optimizeDeps: {
|
|
8380
|
-
...
|
|
8381
|
-
|
|
8391
|
+
..._chunkPVB5UYJTcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
8392
|
+
_chunkPVB5UYJTcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
8382
8393
|
appRoot,
|
|
8383
|
-
|
|
8394
|
+
_chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
8384
8395
|
),
|
|
8385
8396
|
config.renderer,
|
|
8386
8397
|
appRoot
|
|
@@ -8421,8 +8432,8 @@ async function defineConfig(config = {}) {
|
|
|
8421
8432
|
dedupe: [...config.renderer.dedupe || []],
|
|
8422
8433
|
// Stub out problematic server-only modules during dev mode
|
|
8423
8434
|
alias: {
|
|
8424
|
-
...
|
|
8425
|
-
...
|
|
8435
|
+
..._chunkPFVNPOKNcjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
8436
|
+
..._chunkPVB5UYJTcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
8426
8437
|
// Nitro internals that should not be resolved in browser
|
|
8427
8438
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
8428
8439
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|