@farm.js/core 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp.d-xPua9Zdz.d.ts → agent-mcp.d-DuZjglYX.d.ts} +1 -1
- package/dist/{agent-mcp.d-DhZf5-v0.d.mts → agent-mcp.d-gI3ahrF6.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +4 -4
- package/dist/agent-runtime.d.ts +4 -4
- package/dist/analyzer-ENHO4SA5.cjs +17 -0
- package/dist/{analyzer-LQ4LVDCW.mjs → analyzer-UXWYUTBK.mjs} +2 -2
- 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-D6l1Wkn6.d.ts → app-manifest.d-B3h89j6a.d.ts} +1 -1
- package/dist/{app-manifest.d-Bq9VWtpk.d.mts → app-manifest.d-bHK9EGPI.d.mts} +1 -1
- package/dist/app-markdown.d.mts +5 -5
- package/dist/app-markdown.d.ts +5 -5
- package/dist/{app.d-gnTrW72o.d.ts → app.d-C3uyET_L.d.ts} +4 -4
- package/dist/{app.d-Bn1bqBkf.d.mts → app.d-Cr7fXGvJ.d.mts} +4 -4
- package/dist/{chunk-MUQP2APN.cjs → chunk-2T4GGCQT.cjs} +2 -2
- package/dist/{chunk-VFZQXADS.cjs → chunk-56F4CDKE.cjs} +139 -137
- package/dist/{chunk-O47IT4CS.cjs → chunk-5AOARZJT.cjs} +4 -4
- package/dist/{chunk-YQXLBYY2.cjs → chunk-5B2Y4EVS.cjs} +32 -8
- package/dist/{chunk-JKNQMGZE.cjs → chunk-5CG2UD6B.cjs} +12 -12
- package/dist/{chunk-QCVP22KW.cjs → chunk-5RYBQKBY.cjs} +3 -3
- package/dist/{chunk-MEIZIRMK.mjs → chunk-6VMBLDWY.mjs} +1 -1
- package/dist/{chunk-DVL3UVYT.mjs → chunk-6XABTMXR.mjs} +2 -2
- package/dist/chunk-7QGA6UX6.cjs +26 -0
- package/dist/{chunk-Z7YIQ7AJ.cjs → chunk-A4AYTO2E.cjs} +1 -1
- package/dist/{chunk-V36K4TSU.mjs → chunk-ADKPJZPP.mjs} +1 -1
- package/dist/{chunk-ZVEKOMZS.mjs → chunk-ALGAGXWB.mjs} +1 -1
- package/dist/{chunk-2LHO4HTP.cjs → chunk-B7CZ7T2I.cjs} +2 -2
- package/dist/{chunk-VWPGK6UV.cjs → chunk-BEAQVRMQ.cjs} +58 -58
- package/dist/{chunk-WOPQQCP3.mjs → chunk-CPL7WIMP.mjs} +1 -1
- package/dist/{chunk-RMLXUVR5.cjs → chunk-CS6GXE42.cjs} +91 -21
- package/dist/{chunk-MLMDOIBY.mjs → chunk-CZMMU3FP.mjs} +2 -2
- package/dist/{chunk-ZTNU4XCC.cjs → chunk-D2VLHRBN.cjs} +3 -3
- package/dist/{chunk-4ER5KYSC.cjs → chunk-FDS6U2NT.cjs} +3 -3
- package/dist/{chunk-54INSSWI.mjs → chunk-FEWGKBMM.mjs} +32 -19
- package/dist/chunk-G7LNCHTS.mjs +21 -0
- package/dist/{chunk-FFROR7QD.mjs → chunk-GKDOKES3.mjs} +1 -1
- package/dist/{chunk-T4VF6BYV.cjs → chunk-GL4SPJTE.cjs} +2 -2
- package/dist/{chunk-ZF7N222A.mjs → chunk-IEXZMDF4.mjs} +2 -2
- package/dist/{chunk-SIHHYNX4.mjs → chunk-JCERO6YF.mjs} +1 -1
- package/dist/{chunk-LGL5QKUJ.cjs → chunk-JM5VSEYC.cjs} +2 -2
- package/dist/{chunk-MZG5M4JS.cjs → chunk-L7Z6OAE2.cjs} +4 -4
- package/dist/{chunk-RDT2LJES.mjs → chunk-MEXGQE4T.mjs} +6 -6
- package/dist/{chunk-KKXGBQ2K.mjs → chunk-MYJPW4XN.mjs} +2 -2
- package/dist/{chunk-GK2RCRT2.mjs → chunk-NPR6SCEV.mjs} +1 -1
- package/dist/chunk-O77EKGAS.mjs +36 -0
- package/dist/{chunk-GAD63TH7.mjs → chunk-Q4CPBKPT.mjs} +4 -4
- package/dist/{chunk-DNERKYN4.cjs → chunk-Q4FHYBFT.cjs} +11 -11
- package/dist/{chunk-ZCT6B5PQ.cjs → chunk-SJQ24IB5.cjs} +6 -6
- package/dist/{chunk-HYYOVRED.mjs → chunk-SPVXL37B.mjs} +1 -1
- package/dist/{chunk-D7KBMJ7L.mjs → chunk-ST3U7XVO.mjs} +1 -1
- package/dist/{chunk-MX4G24YS.mjs → chunk-TK2JJCP5.mjs} +17 -15
- package/dist/{chunk-LO5BNR6Y.mjs → chunk-W5T3ZAFU.mjs} +25 -1
- package/dist/{chunk-ADCVSTFV.cjs → chunk-WAQIO2VD.cjs} +2 -2
- package/dist/{chunk-KJW6KEOZ.mjs → chunk-WRT775N6.mjs} +92 -22
- package/dist/{chunk-MNBFSAWF.cjs → chunk-YCGOQKVC.cjs} +20 -1
- package/dist/{chunk-J6JAUJPC.cjs → chunk-ZND5D4IC.cjs} +163 -150
- package/dist/{chunk-PATIHHC7.cjs → chunk-ZQOHL6TX.cjs} +2 -2
- package/dist/{chunk-RP55BUJM.mjs → chunk-ZVT2F3JU.mjs} +1 -1
- package/dist/{client-component.d-DT5OKBZu.d.ts → client-component.d-BavTzqsn.d.ts} +1 -1
- package/dist/{client-component.d-34DDMZcl.d.mts → client-component.d-X3j9FOZ2.d.mts} +1 -1
- package/dist/{client-plugins.d-D9CnUvZ5.d.ts → client-plugins.d-CqTr5IrQ.d.ts} +64 -4
- package/dist/{client-plugins.d-D7k9t9Ge.d.mts → client-plugins.d-DnnAopKG.d.mts} +64 -4
- 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.cjs +5 -1
- package/dist/desktop.d.mts +11 -7
- package/dist/desktop.d.ts +11 -7
- package/dist/desktop.mjs +4 -0
- package/dist/{dev-guard-M3ZCDWCK.cjs → dev-guard-5NUIX6IZ.cjs} +4 -3
- package/dist/{dev-guard-TFVWJNIB.mjs → dev-guard-L42ZZRCZ.mjs} +2 -1
- package/dist/{devtools-IUU4SWQL.cjs → devtools-4LMM3DDJ.cjs} +2 -2
- package/dist/{devtools-R77KAJA4.mjs → devtools-RFVGDHXH.mjs} +1 -1
- package/dist/docs.cjs +3 -3
- package/dist/docs.d.mts +6 -6
- package/dist/docs.d.ts +6 -6
- package/dist/docs.mjs +2 -2
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/environment/vite.mjs +2 -2
- 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-fxTjv3Nn.d.mts → handler.d-BSlpYCDB.d.mts} +2 -2
- package/dist/{handler.d-DbZvbwNi.d.ts → handler.d-DgX7gPO6.d.ts} +2 -2
- package/dist/{headers.d-OBHpGTF_.d.mts → headers.d-Cf8l5LMo.d.mts} +1 -1
- package/dist/{headers.d-oeWybIk8.d.ts → headers.d-CmxW42R2.d.ts} +1 -1
- package/dist/index.cjs +25 -24
- package/dist/{index.d-CRrPQwlO.d.mts → index.d-7xoJqKRZ.d.mts} +1 -1
- package/dist/{index.d-BM-dKdzH.d.ts → index.d-BZZt7kxO.d.ts} +1 -1
- package/dist/index.d.mts +27 -27
- package/dist/index.d.ts +27 -27
- package/dist/index.mjs +20 -19
- 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 +21 -20
- package/dist/internal/build-runtime.d.mts +7 -7
- package/dist/internal/build-runtime.d.ts +7 -7
- package/dist/internal/build-runtime.mjs +20 -19
- package/dist/internal/cli-runtime.cjs +8 -5
- package/dist/internal/cli-runtime.d.mts +20 -12
- package/dist/internal/cli-runtime.d.ts +20 -12
- package/dist/internal/cli-runtime.mjs +7 -4
- 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 +5 -4
- package/dist/internal/config-runtime.d.mts +8 -8
- package/dist/internal/config-runtime.d.ts +8 -8
- package/dist/internal/config-runtime.mjs +4 -3
- 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.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-STAB5TVZ.cjs → manager-YRIENS63.cjs} +4 -4
- package/dist/{manager-EFPBRS3U.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-TnD-Mebk.d.ts → mount.d-CD-xVBu7.d.ts} +1 -1
- package/dist/{mount.d-B7RiwjiO.d.mts → mount.d-Dd0xeRMl.d.mts} +1 -1
- package/dist/{navigation-delegate.d-VBCF0EeN.d.ts → navigation-delegate.d-Bses_F-y.d.ts} +1 -1
- package/dist/{navigation-delegate.d-Boz2511c.d.mts → navigation-delegate.d-dBNg976E.d.mts} +1 -1
- package/dist/navigation.d.mts +7 -7
- package/dist/navigation.d.ts +7 -7
- package/dist/plugin.cjs +16 -15
- package/dist/plugin.d.mts +8 -8
- package/dist/plugin.d.ts +8 -8
- package/dist/plugin.mjs +15 -14
- package/dist/{render-plan.d-BrumV_ZE.d.ts → render-plan.d-DaIwnRK2.d.ts} +1 -1
- package/dist/{render-plan.d-BwnmyfNk.d.mts → render-plan.d-vOdZHHLI.d.mts} +1 -1
- package/dist/renderer-client.d.mts +8 -8
- package/dist/renderer-client.d.ts +8 -8
- package/dist/{request.d-Dd5nRTO5.d.mts → request.d-B8U4pVFP.d.mts} +1 -1
- package/dist/{request.d-NUi01-5e.d.ts → request.d-CgXp3EEc.d.ts} +1 -1
- package/dist/request.d.mts +5 -5
- package/dist/request.d.ts +5 -5
- package/dist/{route-rendering.d-BK0Pf7_k.d.mts → route-rendering.d-BQvNYQqu.d.mts} +1 -1
- package/dist/{route-rendering.d-CJR5BPXV.d.ts → route-rendering.d-Di0AxFix.d.ts} +1 -1
- package/dist/{router.d-C-JSFCPU.d.ts → router.d-BJVGhSAJ.d.ts} +1 -1
- package/dist/{router.d-CNUS3x1j.d.mts → router.d-hNedVdoB.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-UBWVU3NF.cjs → rsc-pipeline-HT4G3QGT.cjs} +7 -6
- package/dist/{rsc-pipeline-DHISDFT7.mjs → rsc-pipeline-NCJ3NIE5.mjs} +6 -5
- package/dist/{runtime-XKRQW3YT.cjs → runtime-6UF5XKUP.cjs} +4 -4
- package/dist/{runtime-VUKMY44G.mjs → runtime-VHXIEXL7.mjs} +2 -2
- package/dist/{runtime.d-B2T4bM5_.d.ts → runtime.d-0R8nHCM6.d.ts} +1 -1
- package/dist/{runtime.d-CsOpO6yQ.d.mts → runtime.d-DpeuF_T-.d.mts} +1 -1
- package/dist/{cli-runtime.d-LwIb0swO.d.mts → schema-dependencies.d-_Wyey4Wv.d.mts} +21 -13
- package/dist/{cli-runtime.d-Vvxf-Z8a.d.ts → schema-dependencies.d-tkUHREqz.d.ts} +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-DOYt4E_Q.d.ts → server-components-status.d-B2Z5WvO5.d.ts} +2 -2
- package/dist/{server-components-status.d-Cc5rir0l.d.mts → server-components-status.d-sN7ju-ie.d.mts} +2 -2
- package/dist/server-plugins.d.mts +6 -6
- package/dist/server-plugins.d.ts +6 -6
- package/dist/server.cjs +43 -42
- package/dist/server.d.mts +14 -14
- package/dist/server.d.ts +14 -14
- package/dist/server.mjs +17 -16
- package/dist/{spa-router.d-Cq5UFJvq.d.mts → spa-router.d-D3AtR2Bc.d.mts} +2 -2
- package/dist/{spa-router.d-C7FcpLxU.d.ts → spa-router.d-MjT6sGb9.d.ts} +2 -2
- package/dist/{ssg.d-BzNZemk7.d.mts → ssg.d-B32Cp_XW.d.mts} +3 -3
- package/dist/{ssg.d-DUhacIxj.d.ts → ssg.d-C1SNuPz5.d.ts} +3 -3
- package/dist/storage.d.mts +2 -2
- package/dist/storage.d.ts +2 -2
- package/dist/{store-core.d-BX3yXrxA.d.ts → store-core.d-BZ3YXs70.d.ts} +2 -2
- package/dist/{store-core.d-DbUAtSBK.d.mts → store-core.d-BbVdaoA0.d.mts} +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-BhJJEXzo.d.ts → utils.d-Bjbm44fP.d.ts} +1 -1
- package/dist/{utils.d-NOMkLFpC.d.mts → utils.d-CoLozp7-.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +16 -15
- package/dist/vite.d.mts +9 -9
- package/dist/vite.d.ts +9 -9
- package/dist/vite.mjs +15 -14
- package/package.json +1 -1
- package/dist/analyzer-ZFC2L6NZ.cjs +0 -17
- package/dist/chunk-OZAVCLXY.mjs +0 -17
- /package/dist/{chunk-OAAVIFOJ.cjs → chunk-COXMHCIV.cjs} +0 -0
- /package/dist/{chunk-ZRTBDHO2.mjs → chunk-JL2HNLMC.mjs} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk5RYBQKBYcjs = require('./chunk-5RYBQKBY.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -44,25 +44,25 @@ var _chunk6QWCFVGLcjs = require('./chunk-6QWCFVGL.cjs');
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkBEAQVRMQcjs = require('./chunk-BEAQVRMQ.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
var
|
|
52
|
+
var _chunkWAQIO2VDcjs = require('./chunk-WAQIO2VD.cjs');
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
var _chunkIGA3OTFYcjs = require('./chunk-IGA3OTFY.cjs');
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunk5B2Y4EVScjs = require('./chunk-5B2Y4EVS.cjs');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkGL4SPJTEcjs = require('./chunk-GL4SPJTE.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
var
|
|
65
|
+
var _chunk5AOARZJTcjs = require('./chunk-5AOARZJT.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 _chunkL7Z6OAE2cjs = require('./chunk-L7Z6OAE2.cjs');
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
98
|
+
var _chunk2T4GGCQTcjs = require('./chunk-2T4GGCQT.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 _chunkSJQ24IB5cjs = require('./chunk-SJQ24IB5.cjs');
|
|
152
152
|
|
|
153
153
|
|
|
154
154
|
|
|
@@ -253,11 +253,12 @@ var _chunkIVEV44O2cjs = require('./chunk-IVEV44O2.cjs');
|
|
|
253
253
|
var _chunkKSRWTQ6Jcjs = require('./chunk-KSRWTQ6J.cjs');
|
|
254
254
|
|
|
255
255
|
|
|
256
|
-
var
|
|
256
|
+
var _chunkD2VLHRBNcjs = require('./chunk-D2VLHRBN.cjs');
|
|
257
257
|
|
|
258
258
|
|
|
259
259
|
|
|
260
|
-
|
|
260
|
+
|
|
261
|
+
var _chunkYCGOQKVCcjs = require('./chunk-YCGOQKVC.cjs');
|
|
261
262
|
|
|
262
263
|
|
|
263
264
|
var _chunkYCIFGYBYcjs = require('./chunk-YCIFGYBY.cjs');
|
|
@@ -320,7 +321,7 @@ var _chunkK6LZMZNBcjs = require('./chunk-K6LZMZNB.cjs');
|
|
|
320
321
|
var _chunkRFKPIAOFcjs = require('./chunk-RFKPIAOF.cjs');
|
|
321
322
|
|
|
322
323
|
|
|
323
|
-
var
|
|
324
|
+
var _chunkA4AYTO2Ecjs = require('./chunk-A4AYTO2E.cjs');
|
|
324
325
|
|
|
325
326
|
|
|
326
327
|
var _chunkG5KGLMPNcjs = require('./chunk-G5KGLMPN.cjs');
|
|
@@ -737,7 +738,7 @@ function findClientServerFnViolation(code, id) {
|
|
|
737
738
|
return null;
|
|
738
739
|
}
|
|
739
740
|
function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
740
|
-
return
|
|
741
|
+
return _chunkSJQ24IB5cjs.createFarmDiagnostic.call(void 0,
|
|
741
742
|
"CLIENT_SERVER_FUNCTION",
|
|
742
743
|
id,
|
|
743
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.`,
|
|
@@ -997,21 +998,21 @@ function readPropertyKey(property) {
|
|
|
997
998
|
function createClientBoundaryDiagnostic(file, finding, location) {
|
|
998
999
|
switch (finding.kind) {
|
|
999
1000
|
case "server-env":
|
|
1000
|
-
return
|
|
1001
|
+
return _chunkSJQ24IB5cjs.createFarmDiagnostic.call(void 0,
|
|
1001
1002
|
"CLIENT_SERVER_ENV",
|
|
1002
1003
|
file,
|
|
1003
1004
|
`process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
|
|
1004
1005
|
location
|
|
1005
1006
|
);
|
|
1006
1007
|
case "public-env":
|
|
1007
|
-
return
|
|
1008
|
+
return _chunkSJQ24IB5cjs.createFarmDiagnostic.call(void 0,
|
|
1008
1009
|
"CLIENT_PROCESS_ENV_PUBLIC",
|
|
1009
1010
|
file,
|
|
1010
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.`,
|
|
1011
1012
|
location
|
|
1012
1013
|
);
|
|
1013
1014
|
case "builtin":
|
|
1014
|
-
return
|
|
1015
|
+
return _chunkSJQ24IB5cjs.createFarmDiagnostic.call(void 0,
|
|
1015
1016
|
"CLIENT_NODE_BUILTIN",
|
|
1016
1017
|
file,
|
|
1017
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.`,
|
|
@@ -1312,13 +1313,13 @@ function loadFarmDocsSearchDevRuntime() {
|
|
|
1312
1313
|
return import("./search-client-Z7KDVD4C.cjs");
|
|
1313
1314
|
}
|
|
1314
1315
|
function loadFarmOpenAPIDevRuntime() {
|
|
1315
|
-
return import("./manager-
|
|
1316
|
+
return import("./manager-YRIENS63.cjs");
|
|
1316
1317
|
}
|
|
1317
1318
|
function loadFarmWorkflowsDevRuntime() {
|
|
1318
1319
|
return import("./workflows.cjs");
|
|
1319
1320
|
}
|
|
1320
1321
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1321
|
-
return import("./devtools-
|
|
1322
|
+
return import("./devtools-4LMM3DDJ.cjs");
|
|
1322
1323
|
}
|
|
1323
1324
|
function loadFarmDevtoolsUIRuntime() {
|
|
1324
1325
|
return import("./devtools-ui-TPBPQEEB.cjs");
|
|
@@ -1368,16 +1369,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1368
1369
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1369
1370
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1370
1371
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1371
|
-
|
|
1372
|
-
new RegExp(`^${
|
|
1372
|
+
_chunkBEAQVRMQcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1373
|
+
new RegExp(`^${_chunkSJQ24IB5cjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1373
1374
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1374
1375
|
// included.
|
|
1375
1376
|
/^node:/,
|
|
1376
|
-
|
|
1377
|
+
_chunkBEAQVRMQcjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1377
1378
|
];
|
|
1378
1379
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1379
|
-
|
|
1380
|
-
new RegExp(`^${
|
|
1380
|
+
_chunkBEAQVRMQcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1381
|
+
new RegExp(`^${_chunkSJQ24IB5cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1381
1382
|
];
|
|
1382
1383
|
function createFarmPlatformClientModule(platform) {
|
|
1383
1384
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1413,7 +1414,7 @@ function farmIslandContainersPlugin(config) {
|
|
|
1413
1414
|
// without calling into JavaScript.
|
|
1414
1415
|
filter: {
|
|
1415
1416
|
id: { include: /\.[jt]sx(?:$|\?)/, exclude: /\/node_modules\// },
|
|
1416
|
-
code:
|
|
1417
|
+
code: _chunkSJQ24IB5cjs.FARM_ISLAND_CONTAINER_TAG
|
|
1417
1418
|
},
|
|
1418
1419
|
handler(code, id) {
|
|
1419
1420
|
if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) !== "islands") {
|
|
@@ -1422,20 +1423,20 @@ function farmIslandContainersPlugin(config) {
|
|
|
1422
1423
|
if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
|
|
1423
1424
|
return null;
|
|
1424
1425
|
}
|
|
1425
|
-
if (
|
|
1426
|
-
if (!
|
|
1426
|
+
if (_chunkSJQ24IB5cjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1427
|
+
if (!_chunkSJQ24IB5cjs.FARM_ISLAND_CONTAINER_TAG.test(code)) return null;
|
|
1427
1428
|
const file = id.split("?", 1)[0];
|
|
1428
|
-
const inspect = () =>
|
|
1429
|
+
const inspect = () => _chunkSJQ24IB5cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1429
1430
|
const bindings = farmApi ? farmApi.inspectPackages(inspect) : inspect();
|
|
1430
1431
|
if (bindings.length === 0) return null;
|
|
1431
|
-
const grown =
|
|
1432
|
+
const grown = _chunkSJQ24IB5cjs.wrapFarmIslandContainers.call(void 0, {
|
|
1432
1433
|
code,
|
|
1433
1434
|
file,
|
|
1434
1435
|
bindings,
|
|
1435
|
-
reference:
|
|
1436
|
+
reference: _chunkSJQ24IB5cjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1436
1437
|
});
|
|
1437
1438
|
if (grown === null) return null;
|
|
1438
|
-
|
|
1439
|
+
_chunkSJQ24IB5cjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1439
1440
|
return { code: grown, map: null };
|
|
1440
1441
|
}
|
|
1441
1442
|
}
|
|
@@ -1450,18 +1451,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1450
1451
|
config(config) {
|
|
1451
1452
|
const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
|
|
1452
1453
|
if (options.distDir) {
|
|
1453
|
-
|
|
1454
|
+
_chunkSJQ24IB5cjs.usePackageScanCacheFile.call(void 0,
|
|
1454
1455
|
path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
|
|
1455
1456
|
);
|
|
1456
1457
|
}
|
|
1457
|
-
const bundledPackages =
|
|
1458
|
+
const bundledPackages = _chunkSJQ24IB5cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
|
|
1458
1459
|
const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
|
|
1459
|
-
|
|
1460
|
+
_chunkSJQ24IB5cjs.persistPackageScanCache.call(void 0, );
|
|
1460
1461
|
return {
|
|
1461
1462
|
optimizeDeps: {
|
|
1462
1463
|
// A package that defines fonts is served unbundled, so Farm's font compiler sees it.
|
|
1463
1464
|
exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
|
|
1464
|
-
rolldownOptions: { plugins: [
|
|
1465
|
+
rolldownOptions: { plugins: [_chunkSJQ24IB5cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
|
|
1465
1466
|
},
|
|
1466
1467
|
ssr: {
|
|
1467
1468
|
noExternal: [
|
|
@@ -1487,8 +1488,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1487
1488
|
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1488
1489
|
}
|
|
1489
1490
|
this.error(
|
|
1490
|
-
|
|
1491
|
-
|
|
1491
|
+
_chunkSJQ24IB5cjs.formatFarmDiagnostic.call(void 0,
|
|
1492
|
+
_chunkSJQ24IB5cjs.createFarmDiagnostic.call(void 0,
|
|
1492
1493
|
"CLIENT_SERVER_ONLY_IMPORT",
|
|
1493
1494
|
_nullishCoalesce(importer, () => ( "<unknown module>")),
|
|
1494
1495
|
`${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
|
|
@@ -1498,9 +1499,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1498
1499
|
);
|
|
1499
1500
|
}
|
|
1500
1501
|
if (!_optionalChain([options2, 'optionalAccess', _77 => _77.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1501
|
-
return
|
|
1502
|
+
return _chunkSJQ24IB5cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1502
1503
|
}
|
|
1503
|
-
const resolveFrom = importer ?
|
|
1504
|
+
const resolveFrom = importer ? _chunkSJQ24IB5cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1504
1505
|
if (resolveFrom) {
|
|
1505
1506
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1506
1507
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1517,8 +1518,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1517
1518
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1518
1519
|
if (!_optionalChain([options2, 'optionalAccess', _78 => _78.ssr])) {
|
|
1519
1520
|
this.error(
|
|
1520
|
-
|
|
1521
|
-
|
|
1521
|
+
_chunkSJQ24IB5cjs.formatFarmDiagnostic.call(void 0,
|
|
1522
|
+
_chunkSJQ24IB5cjs.createFarmDiagnostic.call(void 0,
|
|
1522
1523
|
"CLIENT_SERVER_ONLY_ENTRY",
|
|
1523
1524
|
_nullishCoalesce(importer, () => ( id)),
|
|
1524
1525
|
`${id} is server-only and cannot be imported into client code.`
|
|
@@ -1541,9 +1542,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1541
1542
|
handler(id) {
|
|
1542
1543
|
if (id === FARM_SERVER_ONLY_PACKAGE_ID) return "export {};";
|
|
1543
1544
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1544
|
-
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => (
|
|
1545
|
+
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunk5B2Y4EVScjs.resolveFarmPlatform.call(void 0, ))));
|
|
1545
1546
|
}
|
|
1546
|
-
return _nullishCoalesce(
|
|
1547
|
+
return _nullishCoalesce(_chunkSJQ24IB5cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1547
1548
|
}
|
|
1548
1549
|
}
|
|
1549
1550
|
};
|
|
@@ -1649,7 +1650,7 @@ function sendFarmDevRuntimeHookError(res, json) {
|
|
|
1649
1650
|
res.end(json ? _chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
|
|
1650
1651
|
}
|
|
1651
1652
|
function opensFarmDevRuntimeSession(pm) {
|
|
1652
|
-
return pm.hasRuntimeRequestHooks() ||
|
|
1653
|
+
return pm.hasRuntimeRequestHooks() || _chunkWAQIO2VDcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
|
|
1653
1654
|
}
|
|
1654
1655
|
var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
|
|
1655
1656
|
_chunkQBMMQS25cjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
@@ -2047,7 +2048,9 @@ function isResolvedEnvScope(value) {
|
|
|
2047
2048
|
);
|
|
2048
2049
|
}
|
|
2049
2050
|
function isPotentialProgrammaticRouteSourceFile(normalizedFile, srcDirSlug) {
|
|
2050
|
-
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");
|
|
2051
2054
|
}
|
|
2052
2055
|
function fileContainsProgrammaticPageRoute(file) {
|
|
2053
2056
|
if (!fs2.existsSync(file)) {
|
|
@@ -2157,7 +2160,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2157
2160
|
return null;
|
|
2158
2161
|
}
|
|
2159
2162
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
2160
|
-
const everyExportIsComponent = options.code.includes(
|
|
2163
|
+
const everyExportIsComponent = options.code.includes(_chunkSJQ24IB5cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkSJQ24IB5cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
2161
2164
|
const replacements = [];
|
|
2162
2165
|
const wrapperStatements = [];
|
|
2163
2166
|
const originalEntries = [];
|
|
@@ -2312,16 +2315,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
2312
2315
|
for (const finding of analyzeClientBoundary(program, publicKeys)) {
|
|
2313
2316
|
if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
|
|
2314
2317
|
const resolved = await context.resolve(finding.name, id).catch(() => null);
|
|
2315
|
-
if (!_optionalChain([resolved, 'optionalAccess', _105 => _105.id, 'access', _106 => _106.startsWith, 'call', _107 => _107(
|
|
2318
|
+
if (!_optionalChain([resolved, 'optionalAccess', _105 => _105.id, 'access', _106 => _106.startsWith, 'call', _107 => _107(_chunkSJQ24IB5cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
|
|
2316
2319
|
}
|
|
2317
2320
|
findings.push(finding);
|
|
2318
2321
|
}
|
|
2319
2322
|
if (findings.length === 0) return;
|
|
2320
2323
|
warnedClientBoundaryIds.add(id);
|
|
2321
|
-
const locate =
|
|
2324
|
+
const locate = _chunkSJQ24IB5cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
|
|
2322
2325
|
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2323
2326
|
findings.map(
|
|
2324
|
-
(finding) =>
|
|
2327
|
+
(finding) => _chunkSJQ24IB5cjs.formatFarmDiagnostic.call(void 0,
|
|
2325
2328
|
createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
|
|
2326
2329
|
config.root
|
|
2327
2330
|
)
|
|
@@ -2363,6 +2366,11 @@ function toFarmRuntimeModuleId(specifier) {
|
|
|
2363
2366
|
function getFarmCoreFile() {
|
|
2364
2367
|
return typeof __filename === "string" ? __filename : _url.fileURLToPath.call(void 0, _chunkUGL4BDNBcjs.define_import_meta_default.url);
|
|
2365
2368
|
}
|
|
2369
|
+
var farmCoreModuleDirectory;
|
|
2370
|
+
function isFarmCoreModule(id) {
|
|
2371
|
+
_nullishCoalesce(farmCoreModuleDirectory, () => ( (farmCoreModuleDirectory = `${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, path6.dirname(getFarmCoreFile()))}/`)));
|
|
2372
|
+
return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, id.split("?", 1)[0]).startsWith(farmCoreModuleDirectory);
|
|
2373
|
+
}
|
|
2366
2374
|
var FARM_SOURCE_ALIAS_PROBES = [
|
|
2367
2375
|
"@/x",
|
|
2368
2376
|
"@/index.ts",
|
|
@@ -2387,12 +2395,12 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2387
2395
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2388
2396
|
const rendererDisabled = _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2389
2397
|
const imageImports = farmImageImportsPlugin();
|
|
2390
|
-
const fontImports =
|
|
2398
|
+
const fontImports = _chunkBEAQVRMQcjs.farmFontImportsPlugin.call(void 0, {
|
|
2391
2399
|
root: options.root,
|
|
2392
2400
|
basePath: options.basePath,
|
|
2393
2401
|
publicDir: options.publicDir,
|
|
2394
2402
|
// A production build never starts the app, so it reads the directories from these options.
|
|
2395
|
-
isLayoutModule: (id) =>
|
|
2403
|
+
isLayoutModule: (id) => _chunkBEAQVRMQcjs.isFarmLayoutModule.call(void 0, id, _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111()]), () => ( options))))
|
|
2396
2404
|
});
|
|
2397
2405
|
let farmApp;
|
|
2398
2406
|
const isFarmGeneratedOutput = (file) => {
|
|
@@ -2423,8 +2431,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2423
2431
|
if (mdxComponents) files.add(mdxComponents);
|
|
2424
2432
|
return files;
|
|
2425
2433
|
};
|
|
2426
|
-
const islxActionsMode = () =>
|
|
2427
|
-
const islandsServerFns = () =>
|
|
2434
|
+
const islxActionsMode = () => _chunkBEAQVRMQcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _117 => _117.getConfig, 'call', _118 => _118()]), () => ( options)));
|
|
2435
|
+
const islandsServerFns = () => _chunkBEAQVRMQcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)));
|
|
2428
2436
|
let reactRefreshActive = false;
|
|
2429
2437
|
let server;
|
|
2430
2438
|
let deferredGates;
|
|
@@ -2454,7 +2462,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2454
2462
|
console.log(log);
|
|
2455
2463
|
};
|
|
2456
2464
|
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _121 => _121.getRouteManager, 'call', _122 => _122(), 'access', _123 => _123.getProgrammaticClientRoutes, 'call', _124 => _124()])));
|
|
2457
|
-
const inBuildPackageCache =
|
|
2465
|
+
const inBuildPackageCache = _chunkSJQ24IB5cjs.bindPackageClientBoundaryCache.call(void 0, );
|
|
2458
2466
|
const inspectPackages = (operation) => {
|
|
2459
2467
|
const routeManager = _optionalChain([farmApp, 'optionalAccess', _125 => _125.getRouteManager, 'call', _126 => _126()]);
|
|
2460
2468
|
return inBuildPackageCache(
|
|
@@ -2477,11 +2485,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2477
2485
|
isBuild = configEnv.command === "build";
|
|
2478
2486
|
const farmAliases = {
|
|
2479
2487
|
..._chunkPFVNPOKNcjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2480
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _132 => _132.resolve, 'optionalAccess', _133 => _133.alias])) ? {} :
|
|
2488
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _132 => _132.resolve, 'optionalAccess', _133 => _133.alias])) ? {} : _chunkBEAQVRMQcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2481
2489
|
};
|
|
2482
2490
|
if (Object.keys(farmAliases).length > 0) {
|
|
2483
2491
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2484
|
-
userConfig.resolve.alias =
|
|
2492
|
+
userConfig.resolve.alias = _chunkBEAQVRMQcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2485
2493
|
}
|
|
2486
2494
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2487
2495
|
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _134 => _134.server, 'optionalAccess', _135 => _135.cors]) === void 0;
|
|
@@ -2521,7 +2529,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2521
2529
|
serverFnTransformActive = config.plugins.some(
|
|
2522
2530
|
(plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
|
|
2523
2531
|
);
|
|
2524
|
-
reactRefreshActive =
|
|
2532
|
+
reactRefreshActive = _chunk5RYBQKBYcjs.isFarmReactRefreshActive.call(void 0, config);
|
|
2525
2533
|
if (_optionalChain([options, 'access', _141 => _141.experimental, 'optionalAccess', _142 => _142.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
|
|
2526
2534
|
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2527
2535
|
"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."
|
|
@@ -2555,7 +2563,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2555
2563
|
} catch (e21) {
|
|
2556
2564
|
}
|
|
2557
2565
|
};
|
|
2558
|
-
farmApp = new (0,
|
|
2566
|
+
farmApp = new (0, _chunkBEAQVRMQcjs.FarmApp)(
|
|
2559
2567
|
{
|
|
2560
2568
|
...options,
|
|
2561
2569
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2563,7 +2571,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2563
2571
|
server
|
|
2564
2572
|
);
|
|
2565
2573
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2566
|
-
|
|
2574
|
+
_chunkSJQ24IB5cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2567
2575
|
farmApp.getConfig().root,
|
|
2568
2576
|
options.distDir || ".farm"
|
|
2569
2577
|
)
|
|
@@ -2574,7 +2582,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2574
2582
|
let farmAppPackages;
|
|
2575
2583
|
if (_optionalChain([farmConfig, 'access', _157 => _157.agent, 'optionalAccess', _158 => _158.noindexPreviews])) {
|
|
2576
2584
|
farmMiddlewares.use((_req, res, next) => {
|
|
2577
|
-
if (
|
|
2585
|
+
if (_chunk2T4GGCQTcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2578
2586
|
res.setHeader("X-Robots-Tag", _chunkERSLQ4C7cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2579
2587
|
}
|
|
2580
2588
|
next();
|
|
@@ -2582,7 +2590,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2582
2590
|
}
|
|
2583
2591
|
const apiServerBasePath = _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2584
2592
|
const devBuiltInRoutePaths = new Set(
|
|
2585
|
-
|
|
2593
|
+
_chunkL7Z6OAE2cjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2586
2594
|
agent: {
|
|
2587
2595
|
apiCatalog: true,
|
|
2588
2596
|
mcp: true,
|
|
@@ -2630,9 +2638,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2630
2638
|
const appDirSlugs = sourceRoots.map(
|
|
2631
2639
|
(source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
|
|
2632
2640
|
);
|
|
2641
|
+
const polyroute = _chunkYCGOQKVCcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
|
|
2633
2642
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2634
2643
|
try {
|
|
2635
|
-
const result = await
|
|
2644
|
+
const result = await _chunkGL4SPJTEcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2636
2645
|
root: farmConfig.root,
|
|
2637
2646
|
srcDir: farmConfig.srcDir,
|
|
2638
2647
|
layers: farmConfig.layers,
|
|
@@ -2643,6 +2652,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2643
2652
|
componentExtensions: farmConfig.renderer.componentExtensions,
|
|
2644
2653
|
renderer: farmConfig.renderer,
|
|
2645
2654
|
i18nConfig: farmConfig.i18n,
|
|
2655
|
+
polyroute,
|
|
2646
2656
|
...selection
|
|
2647
2657
|
});
|
|
2648
2658
|
if (log) {
|
|
@@ -2686,10 +2696,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2686
2696
|
const match = /\/(?:page|layout|loading|error)(\.[^./]+)$/.exec(normalized);
|
|
2687
2697
|
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && !!match && routeModuleExtensions.has(match[1].toLowerCase());
|
|
2688
2698
|
};
|
|
2689
|
-
const polyroute = _chunkMNBFSAWFcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
|
|
2690
2699
|
const isApiRouteFile = (file) => {
|
|
2691
2700
|
const normalized = file.replace(/\\/g, "/");
|
|
2692
|
-
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) &&
|
|
2701
|
+
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkYCGOQKVCcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
|
|
2702
|
+
};
|
|
2703
|
+
const isApiRouteDeclarationFile = (file) => {
|
|
2704
|
+
const normalized = file.replace(/\\/g, "/");
|
|
2705
|
+
return polyroute && appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkYCGOQKVCcjs.isPolyrouteRouteDeclarationFileName.call(void 0, path6.posix.basename(normalized));
|
|
2693
2706
|
};
|
|
2694
2707
|
const isProgrammaticRouteFile = (file) => {
|
|
2695
2708
|
const normalized = file.replace(/\\/g, "/");
|
|
@@ -2740,7 +2753,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2740
2753
|
const programmaticRouteChanged = isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file));
|
|
2741
2754
|
const typeArtifacts = configChanged ? ALL_TYPE_ARTIFACTS : {
|
|
2742
2755
|
routes: ev !== "change" && (isRouteModuleFile(file) || isRendererRouteFile(file)) || programmaticRouteChanged,
|
|
2743
|
-
api: isApiRouteFile(file) || programmaticRouteChanged,
|
|
2756
|
+
api: isApiRouteFile(file) || isApiRouteDeclarationFile(file) || programmaticRouteChanged,
|
|
2744
2757
|
env: false,
|
|
2745
2758
|
images: false,
|
|
2746
2759
|
i18n: isI18nCatalogFile(file)
|
|
@@ -2818,7 +2831,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2818
2831
|
}
|
|
2819
2832
|
})]);
|
|
2820
2833
|
}
|
|
2821
|
-
apiRouteManager = new (0,
|
|
2834
|
+
apiRouteManager = new (0, _chunkD2VLHRBNcjs.APIRouteManager)(appDirs, server, {
|
|
2822
2835
|
plugins: farmConfig.plugins,
|
|
2823
2836
|
i18n: farmApp.getI18nRuntime(),
|
|
2824
2837
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -2934,7 +2947,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2934
2947
|
rendererServer: farmConfig.renderer.server,
|
|
2935
2948
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2936
2949
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2937
|
-
globalStylesheetHref:
|
|
2950
|
+
globalStylesheetHref: _chunkBEAQVRMQcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2938
2951
|
farmConfig.root,
|
|
2939
2952
|
farmConfig.srcDir
|
|
2940
2953
|
),
|
|
@@ -2965,7 +2978,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2965
2978
|
fontAssets: _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2966
2979
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2967
2980
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2968
|
-
globalStylesheetHref:
|
|
2981
|
+
globalStylesheetHref: _chunkBEAQVRMQcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2969
2982
|
farmConfig.root,
|
|
2970
2983
|
farmConfig.srcDir
|
|
2971
2984
|
),
|
|
@@ -3002,9 +3015,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3002
3015
|
}
|
|
3003
3016
|
const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _200 => _200.getPlugins, 'call', _201 => _201(), 'access', _202 => _202.find, 'call', _203 => _203((plugin2) => plugin2.name === "farm:infra-analytics")]);
|
|
3004
3017
|
if (farmInfraAnalyticsPlugin) {
|
|
3005
|
-
|
|
3018
|
+
_chunk5AOARZJTcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
|
|
3006
3019
|
if (farmDocsDevRuntime) {
|
|
3007
|
-
const label =
|
|
3020
|
+
const label = _chunkL7Z6OAE2cjs.resolveFarmDocsRouteLabel.call(void 0,
|
|
3008
3021
|
_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
|
|
3009
3022
|
{
|
|
3010
3023
|
path: _optionalChain([farmConfig, 'access', _204 => _204.docs, 'optionalAccess', _205 => _205.entry]) || "/docs",
|
|
@@ -3012,7 +3025,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3012
3025
|
pages: await getFarmDocsPagePaths()
|
|
3013
3026
|
}
|
|
3014
3027
|
);
|
|
3015
|
-
if (label) return
|
|
3028
|
+
if (label) return _chunkL7Z6OAE2cjs.setFarmRouteLabel.call(void 0, { pathname }, label);
|
|
3016
3029
|
}
|
|
3017
3030
|
const match = farmApp.getRouteManager().matchRoute(pathname);
|
|
3018
3031
|
return { pathname, pattern: _optionalChain([match, 'access', _210 => _210.route, 'optionalAccess', _211 => _211.pattern]) || null };
|
|
@@ -3176,7 +3189,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3176
3189
|
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkO7B6LJWEcjs.FARM_VIDEO_PLAYER_PATH) {
|
|
3177
3190
|
res.statusCode = 200;
|
|
3178
3191
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
3179
|
-
res.end(requestMethod === "HEAD" ? void 0 :
|
|
3192
|
+
res.end(requestMethod === "HEAD" ? void 0 : _chunkBEAQVRMQcjs.FARM_VIDEO_PLAYER_HTML);
|
|
3180
3193
|
return;
|
|
3181
3194
|
}
|
|
3182
3195
|
const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
|
|
@@ -3456,9 +3469,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3456
3469
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3457
3470
|
try {
|
|
3458
3471
|
const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3459
|
-
const route =
|
|
3472
|
+
const route = _chunkL7Z6OAE2cjs.setFarmRouteLabel.call(void 0,
|
|
3460
3473
|
{ pathname: requestPathname },
|
|
3461
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3474
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkL7Z6OAE2cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3462
3475
|
);
|
|
3463
3476
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3464
3477
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -3547,7 +3560,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3547
3560
|
);
|
|
3548
3561
|
return;
|
|
3549
3562
|
}
|
|
3550
|
-
if (_optionalChain([options, 'access', _246 => _246.agent, 'optionalAccess', _247 => _247.manifest]) !== false &&
|
|
3563
|
+
if (_optionalChain([options, 'access', _246 => _246.agent, 'optionalAccess', _247 => _247.manifest]) !== false && _chunkL7Z6OAE2cjs.isFarmAppManifestPath.call(void 0, _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3551
3564
|
const manifestGuardCoversPath = (path7) => _chunkIGBQSUT5cjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3552
3565
|
{
|
|
3553
3566
|
config: farmConfig,
|
|
@@ -3557,18 +3570,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3557
3570
|
apiServerBasePath
|
|
3558
3571
|
);
|
|
3559
3572
|
await serveBuiltInRoute(async () => {
|
|
3560
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3561
|
-
const manifest = await
|
|
3573
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkBEAQVRMQcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3574
|
+
const manifest = await _chunkL7Z6OAE2cjs.createFarmAppManifestResponse.call(void 0,
|
|
3562
3575
|
new Request(parsedRequestUrl, {
|
|
3563
3576
|
method: requestMethod,
|
|
3564
3577
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3565
3578
|
}),
|
|
3566
3579
|
{
|
|
3567
|
-
...
|
|
3580
|
+
..._chunkL7Z6OAE2cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3568
3581
|
build: "development",
|
|
3569
3582
|
packages: farmAppPackages,
|
|
3570
3583
|
// Read again on each request; unchanged files come from a cache.
|
|
3571
|
-
webmcpTools: _optionalChain([farmConfig, 'access', _248 => _248.plugins, 'optionalAccess', _249 => _249.some, 'call', _250 => _250(({ name }) => name === "farm:webmcp")]) ?
|
|
3584
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _248 => _248.plugins, 'optionalAccess', _249 => _249.some, 'call', _250 => _250(({ name }) => name === "farm:webmcp")]) ? _chunkBEAQVRMQcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3572
3585
|
}),
|
|
3573
3586
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3574
3587
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -3586,11 +3599,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3586
3599
|
});
|
|
3587
3600
|
return;
|
|
3588
3601
|
}
|
|
3589
|
-
if (_optionalChain([options, 'access', _251 => _251.agent, 'optionalAccess', _252 => _252.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) ===
|
|
3602
|
+
if (_optionalChain([options, 'access', _251 => _251.agent, 'optionalAccess', _252 => _252.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkL7Z6OAE2cjs.FARM_API_CATALOG_PATH) {
|
|
3590
3603
|
await serveBuiltInRoute(
|
|
3591
|
-
() =>
|
|
3604
|
+
() => _chunkL7Z6OAE2cjs.createFarmApiCatalogResponse.call(void 0,
|
|
3592
3605
|
requestMethod,
|
|
3593
|
-
|
|
3606
|
+
_chunkL7Z6OAE2cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3594
3607
|
new Request(parsedRequestUrl, {
|
|
3595
3608
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3596
3609
|
})
|
|
@@ -3599,7 +3612,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3599
3612
|
return;
|
|
3600
3613
|
}
|
|
3601
3614
|
if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.aiCatalog]) !== false) {
|
|
3602
|
-
const aiCatalog =
|
|
3615
|
+
const aiCatalog = _chunkL7Z6OAE2cjs.createFarmAiCatalogResponse.call(void 0,
|
|
3603
3616
|
new Request(parsedRequestUrl, {
|
|
3604
3617
|
method: requestMethod,
|
|
3605
3618
|
headers: {
|
|
@@ -3686,7 +3699,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3686
3699
|
{
|
|
3687
3700
|
kind: "docs",
|
|
3688
3701
|
computed: docsResponse,
|
|
3689
|
-
label:
|
|
3702
|
+
label: _chunkL7Z6OAE2cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3690
3703
|
_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3691
3704
|
{
|
|
3692
3705
|
path: _optionalChain([farmConfig, 'access', _265 => _265.docs, 'optionalAccess', _266 => _266.entry]) || "/docs",
|
|
@@ -3723,7 +3736,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3723
3736
|
}
|
|
3724
3737
|
const markdownRouteLabel = () => (
|
|
3725
3738
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3726
|
-
|
|
3739
|
+
_chunkL7Z6OAE2cjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3727
3740
|
toRoutePathname(requestPathname),
|
|
3728
3741
|
(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])
|
|
3729
3742
|
)
|
|
@@ -3744,7 +3757,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3744
3757
|
return {
|
|
3745
3758
|
source: await fs2.promises.readFile(sourcePath, "utf8"),
|
|
3746
3759
|
// Project-relative, as production sends it: never the machine's path.
|
|
3747
|
-
filePath:
|
|
3760
|
+
filePath: _chunkBEAQVRMQcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
|
|
3748
3761
|
};
|
|
3749
3762
|
},
|
|
3750
3763
|
// The anonymous check goes through this server, so its guards and
|
|
@@ -4087,9 +4100,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4087
4100
|
);
|
|
4088
4101
|
const docsRuntimeOptions = () => ({
|
|
4089
4102
|
kind: "docs",
|
|
4090
|
-
route:
|
|
4103
|
+
route: _chunkL7Z6OAE2cjs.setFarmRouteLabel.call(void 0,
|
|
4091
4104
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
4092
|
-
|
|
4105
|
+
_chunkL7Z6OAE2cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
4093
4106
|
path: _optionalChain([farmConfig, 'access', _298 => _298.docs, 'optionalAccess', _299 => _299.entry]) || "/docs",
|
|
4094
4107
|
roots: _optionalChain([farmConfig, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.roots, 'optionalAccess', _302 => _302.map, 'call', _303 => _303((root) => root.entry)])
|
|
4095
4108
|
})
|
|
@@ -4443,7 +4456,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4443
4456
|
);
|
|
4444
4457
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
4445
4458
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
4446
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4459
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkSJQ24IB5cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
4447
4460
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4448
4461
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
4449
4462
|
let mergedMetadata = {};
|
|
@@ -4454,7 +4467,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4454
4467
|
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4455
4468
|
(entry) => entry.pattern === layout.pattern
|
|
4456
4469
|
), () => ( {
|
|
4457
|
-
...
|
|
4470
|
+
..._chunkSJQ24IB5cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
|
|
4458
4471
|
serverTree: false
|
|
4459
4472
|
}))
|
|
4460
4473
|
);
|
|
@@ -4469,7 +4482,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4469
4482
|
];
|
|
4470
4483
|
const hydrationIslandStrategy = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4471
4484
|
_chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _326 => _326.getConfig, 'call', _327 => _327()]), () => ( options)))
|
|
4472
|
-
) === "islands" ?
|
|
4485
|
+
) === "islands" ? _chunkBEAQVRMQcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4473
4486
|
route,
|
|
4474
4487
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4475
4488
|
layouts.map((layout, index) => ({
|
|
@@ -4535,7 +4548,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4535
4548
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4536
4549
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4537
4550
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4538
|
-
), () => (
|
|
4551
|
+
), () => ( _chunkSJQ24IB5cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4539
4552
|
const slotContext = await _chunkYZMSJRM5cjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4540
4553
|
request: targetRequest,
|
|
4541
4554
|
params: slot.params,
|
|
@@ -4585,7 +4598,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4585
4598
|
pageShouldHydrate: shouldHydrate,
|
|
4586
4599
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4587
4600
|
islandStrategy: hydrationIslandStrategy,
|
|
4588
|
-
rendering:
|
|
4601
|
+
rendering: _chunkGL4SPJTEcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4589
4602
|
});
|
|
4590
4603
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4591
4604
|
const layoutStartIndex = _chunkIGBQSUT5cjs.getSharedLayoutPrefixLength.call(void 0,
|
|
@@ -4720,7 +4733,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4720
4733
|
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _345 => _345.hasRuntimeHook, 'call', _346 => _346("after")]), () => ( false));
|
|
4721
4734
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4722
4735
|
const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4723
|
-
const mcpLabel =
|
|
4736
|
+
const mcpLabel = _chunkL7Z6OAE2cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4724
4737
|
if (mcpLabel) return mcpLabel;
|
|
4725
4738
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4726
4739
|
return routePathname === _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
@@ -4729,7 +4742,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4729
4742
|
const match = routeManager2.matchRoute(pathname2);
|
|
4730
4743
|
return {
|
|
4731
4744
|
kind: "page",
|
|
4732
|
-
route:
|
|
4745
|
+
route: _chunkL7Z6OAE2cjs.setFarmRouteLabel.call(void 0,
|
|
4733
4746
|
{
|
|
4734
4747
|
pathname: pathname2,
|
|
4735
4748
|
pattern: _optionalChain([match, 'optionalAccess', _347 => _347.route, 'optionalAccess', _348 => _348.pattern]) || null,
|
|
@@ -4993,7 +5006,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4993
5006
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4994
5007
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkVZ2P6GRCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4995
5008
|
const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, integrations);
|
|
4996
|
-
const isolatedHydrationMode =
|
|
5009
|
+
const isolatedHydrationMode = _chunkSJQ24IB5cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
4997
5010
|
_optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.isolatedClientHydration]),
|
|
4998
5011
|
{
|
|
4999
5012
|
serverComponents: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "rsc",
|
|
@@ -5018,8 +5031,8 @@ ${generatedDevIndicatorsClientRuntime}`,
|
|
|
5018
5031
|
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,
|
|
5019
5032
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _404 => _404.trailingSlash]), () => ( false)),
|
|
5020
5033
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _405 => _405.basePath]), () => ( "/")),
|
|
5021
|
-
|
|
5022
|
-
|
|
5034
|
+
_chunkBEAQVRMQcjs.generateClientCachePersistenceCode.call(void 0,
|
|
5035
|
+
_chunkBEAQVRMQcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _406 => _406.cache]))
|
|
5023
5036
|
),
|
|
5024
5037
|
adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
5025
5038
|
_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "islands"
|
|
@@ -5041,11 +5054,11 @@ export const getManifest = () => ({
|
|
|
5041
5054
|
});
|
|
5042
5055
|
`;
|
|
5043
5056
|
}
|
|
5044
|
-
const globalStylesheetHref =
|
|
5057
|
+
const globalStylesheetHref = _chunkBEAQVRMQcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
5045
5058
|
server.config.root,
|
|
5046
5059
|
_optionalChain([farmApp, 'optionalAccess', _409 => _409.getConfig, 'call', _410 => _410(), 'access', _411 => _411.srcDir])
|
|
5047
5060
|
);
|
|
5048
|
-
const fullManifest =
|
|
5061
|
+
const fullManifest = _chunkBEAQVRMQcjs.createFarmDevClientManifest.call(void 0,
|
|
5049
5062
|
routeManager.generateClientManifest(server.config.root),
|
|
5050
5063
|
{
|
|
5051
5064
|
sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
|
|
@@ -5067,45 +5080,45 @@ export { manifest };
|
|
|
5067
5080
|
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _413 => _413.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
5068
5081
|
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _414 => _414.getConfig, 'call', _415 => _415()]), () => ( options));
|
|
5069
5082
|
let rewrotePackageImports = false;
|
|
5070
|
-
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) && !
|
|
5083
|
+
if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, actionConfig)) === "islands" && (!id.includes("/node_modules/") && !isFarmCoreModule(id) || _optionalChain([transformOptions, 'optionalAccess', _416 => _416.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkSJQ24IB5cjs.hasUseClientDirective.call(void 0, code)) {
|
|
5071
5084
|
const file = id.split("?", 1)[0];
|
|
5072
5085
|
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
|
|
5073
5086
|
const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
|
|
5074
5087
|
const rewrite = () => {
|
|
5075
5088
|
if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
|
|
5076
5089
|
if (farmReactServerFiles.has(file)) {
|
|
5077
|
-
for (const child of
|
|
5090
|
+
for (const child of _chunkSJQ24IB5cjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
5078
5091
|
farmReactServerFiles.add(child);
|
|
5079
5092
|
}
|
|
5080
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
5093
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkSJQ24IB5cjs.getFarmClientReachableModules.call(void 0,
|
|
5081
5094
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
5082
5095
|
projectRoot
|
|
5083
5096
|
).has(path6.resolve(file));
|
|
5084
|
-
const reactServer = !serverModule ? null :
|
|
5097
|
+
const reactServer = !serverModule ? null : _chunkSJQ24IB5cjs.rewriteFarmReactServerImports.call(void 0, {
|
|
5085
5098
|
code,
|
|
5086
5099
|
file,
|
|
5087
|
-
reference: (specifier, exportName) =>
|
|
5100
|
+
reference: (specifier, exportName) => _chunkSJQ24IB5cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
5088
5101
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
5089
5102
|
});
|
|
5090
5103
|
if (reactServer !== null) {
|
|
5091
5104
|
code = reactServer;
|
|
5092
5105
|
rewrotePackageImports = true;
|
|
5093
5106
|
}
|
|
5094
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
5107
|
+
const internal = farmReactServerFiles.has(file) ? _chunkSJQ24IB5cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
5095
5108
|
code,
|
|
5096
5109
|
file,
|
|
5097
|
-
reference: (clientFile) =>
|
|
5110
|
+
reference: (clientFile) => _chunkSJQ24IB5cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
5098
5111
|
}) : null;
|
|
5099
5112
|
if (internal !== null) {
|
|
5100
5113
|
code = internal;
|
|
5101
5114
|
rewrotePackageImports = true;
|
|
5102
5115
|
}
|
|
5103
5116
|
}
|
|
5104
|
-
const rewritePackageImports = (source2) =>
|
|
5117
|
+
const rewritePackageImports = (source2) => _chunkSJQ24IB5cjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
5105
5118
|
code: source2,
|
|
5106
5119
|
file,
|
|
5107
5120
|
root: projectRoot,
|
|
5108
|
-
isClientPackage: (specifier) =>
|
|
5121
|
+
isClientPackage: (specifier) => _chunkSJQ24IB5cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
5109
5122
|
});
|
|
5110
5123
|
const source = code;
|
|
5111
5124
|
const referenced = inspectPackages(() => rewritePackageImports(source));
|
|
@@ -5125,7 +5138,7 @@ export { manifest };
|
|
|
5125
5138
|
}
|
|
5126
5139
|
}
|
|
5127
5140
|
};
|
|
5128
|
-
if (buildSnapshot)
|
|
5141
|
+
if (buildSnapshot) _chunkSJQ24IB5cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
|
|
5129
5142
|
else rewrite();
|
|
5130
5143
|
}
|
|
5131
5144
|
if (islandsServerFns() && !_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
@@ -5154,8 +5167,8 @@ export { manifest };
|
|
|
5154
5167
|
}
|
|
5155
5168
|
if (!_optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr])) {
|
|
5156
5169
|
const docsConfigModule = _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _427 => _427.getConfig, 'call', _428 => _428(), 'optionalAccess', _429 => _429.docs]));
|
|
5157
|
-
if (
|
|
5158
|
-
const redacted =
|
|
5170
|
+
if (_chunkBEAQVRMQcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
5171
|
+
const redacted = _chunkBEAQVRMQcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
5159
5172
|
if (redacted !== null) return { code: redacted, map: null };
|
|
5160
5173
|
}
|
|
5161
5174
|
}
|
|
@@ -5164,9 +5177,9 @@ export { manifest };
|
|
|
5164
5177
|
if ((_optionalChain([currentConfig, 'access', _433 => _433.experimental, 'optionalAccess', _434 => _434.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
5165
5178
|
const violation = findClientServerFnViolation(code, id);
|
|
5166
5179
|
if (violation) {
|
|
5167
|
-
const locate =
|
|
5180
|
+
const locate = _chunkSJQ24IB5cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
|
|
5168
5181
|
this.error(
|
|
5169
|
-
|
|
5182
|
+
_chunkSJQ24IB5cjs.formatFarmDiagnostic.call(void 0,
|
|
5170
5183
|
createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
|
|
5171
5184
|
currentConfig.root
|
|
5172
5185
|
)
|
|
@@ -5208,13 +5221,13 @@ export { manifest };
|
|
|
5208
5221
|
transformed = true;
|
|
5209
5222
|
}
|
|
5210
5223
|
}
|
|
5211
|
-
if (
|
|
5224
|
+
if (_chunkSJQ24IB5cjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
5212
5225
|
const clientBoundarySource = transformedCode;
|
|
5213
5226
|
const moduleInfo = this.getModuleInfo(id);
|
|
5214
5227
|
if (moduleInfo) {
|
|
5215
5228
|
moduleInfo.isClientComponent = true;
|
|
5216
5229
|
}
|
|
5217
|
-
transformedCode =
|
|
5230
|
+
transformedCode = _chunkSJQ24IB5cjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
5218
5231
|
transformed = true;
|
|
5219
5232
|
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _442 => _442.getConfig, 'call', _443 => _443()]), () => ( options));
|
|
5220
5233
|
let isolatedModuleReference = null;
|
|
@@ -5223,12 +5236,12 @@ export { manifest };
|
|
|
5223
5236
|
const cleanId = id.split("?", 1)[0];
|
|
5224
5237
|
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _446 => _446.getRouteManager, 'call', _447 => _447(), 'access', _448 => _448.getIsolatedClientBoundaryModules, 'call', _449 => _449(root)])));
|
|
5225
5238
|
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _450 => _450.has, 'call', _451 => _451(path6.resolve(cleanId))]) === true;
|
|
5226
|
-
if (_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (
|
|
5227
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
5239
|
+
if (_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkSJQ24IB5cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
5240
|
+
cleanId.replace(/\\/g, "/").includes(_chunkSJQ24IB5cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5228
5241
|
isolatedModuleReference = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
5229
5242
|
const islandsMode = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, currentConfig)) === "islands";
|
|
5230
|
-
const explicitStrategy =
|
|
5231
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
5243
|
+
const explicitStrategy = _chunkSJQ24IB5cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
5244
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkBEAQVRMQcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
5232
5245
|
if (inference) {
|
|
5233
5246
|
for (const file of inference.files) {
|
|
5234
5247
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -5251,14 +5264,14 @@ export { manifest };
|
|
|
5251
5264
|
);
|
|
5252
5265
|
}
|
|
5253
5266
|
transformedCode = transformedBoundary;
|
|
5254
|
-
} else if (selectedForIsolatedHydration && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (
|
|
5267
|
+
} else if (selectedForIsolatedHydration && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkSJQ24IB5cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkSJQ24IB5cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5255
5268
|
rendererIslandModule = true;
|
|
5256
5269
|
if (_optionalChain([transformOptions, 'optionalAccess', _454 => _454.ssr]) === true) {
|
|
5257
5270
|
const renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
|
|
5258
5271
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
5259
5272
|
code: transformedCode,
|
|
5260
5273
|
moduleReference: _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root),
|
|
5261
|
-
islandStrategy: _nullishCoalesce(
|
|
5274
|
+
islandStrategy: _nullishCoalesce(_chunkSJQ24IB5cjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
|
|
5262
5275
|
parse: (source) => this.parse(source),
|
|
5263
5276
|
withIsland: renderer.server
|
|
5264
5277
|
});
|
|
@@ -5442,10 +5455,10 @@ if (import.meta.hot) {
|
|
|
5442
5455
|
const watched = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, id);
|
|
5443
5456
|
const appSource = !watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched);
|
|
5444
5457
|
if (appSource) _optionalChain([farmApp, 'optionalAccess', _461 => _461.getRouteManager, 'call', _462 => _462(), 'access', _463 => _463.noteSourceChange, 'call', _464 => _464(id, change.event)]);
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5458
|
+
_chunkSJQ24IB5cjs.noteFarmClientReachableModuleChange.call(void 0, id, change.event, { appSource });
|
|
5459
|
+
_chunkSJQ24IB5cjs.invalidateFarmClientOnlyScan.call(void 0, id, change.event);
|
|
5460
|
+
_chunkBEAQVRMQcjs.invalidateFarmRouteRootInferences.call(void 0, id, change.event);
|
|
5461
|
+
_chunkSJQ24IB5cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5449
5462
|
},
|
|
5450
5463
|
async handleHotUpdate(ctx) {
|
|
5451
5464
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5478,16 +5491,16 @@ if (import.meta.hot) {
|
|
|
5478
5491
|
}
|
|
5479
5492
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5480
5493
|
};
|
|
5481
|
-
if (normalizedFile.includes(
|
|
5494
|
+
if (normalizedFile.includes(_chunkSJQ24IB5cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
|
|
5482
5495
|
path6.posix.join(
|
|
5483
5496
|
_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _467 => _467.root]) || options.root || server2.config.root),
|
|
5484
|
-
|
|
5497
|
+
_chunkSJQ24IB5cjs.FARM_CLIENT_REFERENCE_DIRECTORY
|
|
5485
5498
|
)
|
|
5486
5499
|
))
|
|
5487
5500
|
return modules;
|
|
5488
|
-
if (currentFarmConfig &&
|
|
5501
|
+
if (currentFarmConfig && _chunkYCGOQKVCcjs.isFarmAPIRouteFileName.call(void 0,
|
|
5489
5502
|
path6.posix.basename(normalizedFile),
|
|
5490
|
-
|
|
5503
|
+
_chunkYCGOQKVCcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
|
|
5491
5504
|
) && _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
5492
5505
|
(appDir) => normalizedFile.startsWith(`${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
5493
5506
|
)) {
|
|
@@ -5789,12 +5802,12 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5789
5802
|
const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5790
5803
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5791
5804
|
watchFile(routesFile);
|
|
5792
|
-
return
|
|
5805
|
+
return _chunkSJQ24IB5cjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5793
5806
|
kind: parsed.kind,
|
|
5794
5807
|
routePath: parsed.routePath,
|
|
5795
5808
|
routesFile,
|
|
5796
5809
|
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _506 => _506.routes, 'access', _507 => _507.get, 'call', _508 => _508(
|
|
5797
|
-
|
|
5810
|
+
_chunkSJQ24IB5cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5798
5811
|
)]),
|
|
5799
5812
|
// React's client module exports no createElement; the main client entry imports React too.
|
|
5800
5813
|
rendererClient: _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
|
|
@@ -5802,7 +5815,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5802
5815
|
});
|
|
5803
5816
|
}
|
|
5804
5817
|
function resolveRealModuleFile(filePath, root) {
|
|
5805
|
-
const resolved = _nullishCoalesce(
|
|
5818
|
+
const resolved = _nullishCoalesce(_chunkSJQ24IB5cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5806
5819
|
try {
|
|
5807
5820
|
return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5808
5821
|
} catch (e29) {
|
|
@@ -6141,12 +6154,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
6141
6154
|
}
|
|
6142
6155
|
}
|
|
6143
6156
|
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) {
|
|
6144
|
-
const providerClientCode =
|
|
6157
|
+
const providerClientCode = _chunkBEAQVRMQcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
6145
6158
|
integrationProviders,
|
|
6146
6159
|
root,
|
|
6147
6160
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
6148
6161
|
);
|
|
6149
|
-
const clientPluginEntry =
|
|
6162
|
+
const clientPluginEntry = _chunkWAQIO2VDcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
6150
6163
|
plugins,
|
|
6151
6164
|
root,
|
|
6152
6165
|
srcDir,
|
|
@@ -6239,7 +6252,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
6239
6252
|
return null;
|
|
6240
6253
|
}
|
|
6241
6254
|
}
|
|
6242
|
-
${islandValues ? `${
|
|
6255
|
+
${islandValues ? `${_chunkBEAQVRMQcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
6243
6256
|
let farmLastRouteState = null;
|
|
6244
6257
|
|
|
6245
6258
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -7080,7 +7093,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
7080
7093
|
return loadedLayouts;
|
|
7081
7094
|
}
|
|
7082
7095
|
|
|
7083
|
-
${
|
|
7096
|
+
${_chunkBEAQVRMQcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
7084
7097
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
7085
7098
|
let wrapped = element;
|
|
7086
7099
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -7380,7 +7393,7 @@ function readActiveLayoutPatterns() {
|
|
|
7380
7393
|
);
|
|
7381
7394
|
}
|
|
7382
7395
|
|
|
7383
|
-
${
|
|
7396
|
+
${_chunkBEAQVRMQcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
7384
7397
|
|
|
7385
7398
|
function activateFragmentScripts(root) {
|
|
7386
7399
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -7439,7 +7452,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
7439
7452
|
return shell.innerHTML;
|
|
7440
7453
|
}
|
|
7441
7454
|
|
|
7442
|
-
${islandValues ?
|
|
7455
|
+
${islandValues ? _chunkBEAQVRMQcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
7443
7456
|
container,
|
|
7444
7457
|
fragment,
|
|
7445
7458
|
currentPatterns,
|
|
@@ -7514,9 +7527,9 @@ ${islandValues ? `
|
|
|
7514
7527
|
return nextTarget;
|
|
7515
7528
|
}
|
|
7516
7529
|
|
|
7517
|
-
${islandValues ? `${
|
|
7530
|
+
${islandValues ? `${_chunkBEAQVRMQcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
7518
7531
|
|
|
7519
|
-
${
|
|
7532
|
+
${_chunkBEAQVRMQcjs.FARM_EARLY_NAVIGATION_SOURCE}
|
|
7520
7533
|
|
|
7521
7534
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
7522
7535
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -8220,7 +8233,7 @@ function generateClientManifest(bundle) {
|
|
|
8220
8233
|
return manifest;
|
|
8221
8234
|
}
|
|
8222
8235
|
async function defineConfig(config = {}) {
|
|
8223
|
-
const tailwindVitePlugin = await
|
|
8236
|
+
const tailwindVitePlugin = await _chunkWAQIO2VDcjs.loadTailwindVitePlugin.call(void 0, );
|
|
8224
8237
|
const appRoot = path6.resolve(config.root || process.cwd());
|
|
8225
8238
|
if (_optionalChain([config, 'access', _511 => _511.extends, 'optionalAccess', _512 => _512.length])) {
|
|
8226
8239
|
const { config: layeredConfig } = await import("./layers-6R55QDT5.cjs").then(
|
|
@@ -8232,11 +8245,11 @@ async function defineConfig(config = {}) {
|
|
|
8232
8245
|
config = layeredConfig;
|
|
8233
8246
|
}
|
|
8234
8247
|
config.renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
8235
|
-
config.images =
|
|
8248
|
+
config.images = _chunkBEAQVRMQcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
8236
8249
|
const rendererVitePlugins = await _chunkLEZJZX4Ccjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
8237
8250
|
ssr: true
|
|
8238
8251
|
});
|
|
8239
|
-
const reactRefreshPlugins = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? await
|
|
8252
|
+
const reactRefreshPlugins = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? await _chunk5RYBQKBYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
|
|
8240
8253
|
const nodeBuiltinStubs = {
|
|
8241
8254
|
"node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
|
|
8242
8255
|
"node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
|
|
@@ -8330,7 +8343,7 @@ async function defineConfig(config = {}) {
|
|
|
8330
8343
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
8331
8344
|
console.log("");
|
|
8332
8345
|
console.log(
|
|
8333
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
8346
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkA4AYTO2Ecjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
8334
8347
|
);
|
|
8335
8348
|
console.log("");
|
|
8336
8349
|
console.log(
|
|
@@ -8363,8 +8376,8 @@ async function defineConfig(config = {}) {
|
|
|
8363
8376
|
return {
|
|
8364
8377
|
plugins: [
|
|
8365
8378
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
8366
|
-
|
|
8367
|
-
|
|
8379
|
+
_chunk5RYBQKBYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
8380
|
+
_chunkBEAQVRMQcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
8368
8381
|
tailwindVitePlugin,
|
|
8369
8382
|
...rendererVitePlugins,
|
|
8370
8383
|
...reactRefreshPlugins,
|
|
@@ -8374,14 +8387,14 @@ async function defineConfig(config = {}) {
|
|
|
8374
8387
|
farmNavigationPlugin(config.renderer),
|
|
8375
8388
|
farmIslandContainersPlugin(config),
|
|
8376
8389
|
farmPlugin(config),
|
|
8377
|
-
|
|
8390
|
+
_chunkSJQ24IB5cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
8378
8391
|
farmBrandingPlugin
|
|
8379
8392
|
],
|
|
8380
8393
|
customLogger: farmLogger,
|
|
8381
8394
|
clearScreen: false,
|
|
8382
8395
|
optimizeDeps: {
|
|
8383
|
-
...
|
|
8384
|
-
|
|
8396
|
+
..._chunkBEAQVRMQcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
8397
|
+
_chunkBEAQVRMQcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
8385
8398
|
appRoot,
|
|
8386
8399
|
_chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
8387
8400
|
),
|
|
@@ -8425,7 +8438,7 @@ async function defineConfig(config = {}) {
|
|
|
8425
8438
|
// Stub out problematic server-only modules during dev mode
|
|
8426
8439
|
alias: {
|
|
8427
8440
|
..._chunkPFVNPOKNcjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
8428
|
-
...
|
|
8441
|
+
..._chunkBEAQVRMQcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
8429
8442
|
// Nitro internals that should not be resolved in browser
|
|
8430
8443
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
8431
8444
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|