@farm.js/core 0.1.60 → 0.1.62
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-C-2S9bnP.d.mts → agent-mcp.d-BKZ3UNbt.d.mts} +1 -1
- package/dist/{agent-mcp.d-SIoCUP1I.d.ts → agent-mcp.d-C1zr_nGS.d.ts} +1 -1
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +2 -2
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/agent-runtime.mjs +2 -2
- package/dist/analyzer-2AHWJJR7.cjs +15 -0
- package/dist/analyzer-YESYU3GK.mjs +15 -0
- package/dist/api/route-manager.cjs +4 -4
- package/dist/api/route-manager.d.mts +4 -4
- package/dist/api/route-manager.d.ts +4 -4
- package/dist/api/route-manager.mjs +3 -3
- package/dist/api/runtime.cjs +3 -3
- package/dist/api/runtime.d.mts +3 -3
- package/dist/api/runtime.d.ts +3 -3
- package/dist/api/runtime.mjs +2 -2
- package/dist/api.cjs +5 -5
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/api.mjs +4 -4
- package/dist/{app-manifest.d-DrSAHskY.d.mts → app-manifest.d-BpvhfKRH.d.mts} +1 -1
- package/dist/{app-manifest.d-Tb3CJpL4.d.ts → app-manifest.d-ntch_bvA.d.ts} +1 -1
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/{app.d-CmWlYpZJ.d.ts → app.d-AE8_v3Db.d.ts} +4 -10
- package/dist/{app.d-D6QQM_kk.d.mts → app.d-CysWA_8v.d.mts} +4 -10
- package/dist/{chunk-FORSVMEJ.mjs → chunk-2CNKQC3G.mjs} +1 -1
- package/dist/{chunk-ZFUKPWFC.mjs → chunk-2JYBLE63.mjs} +416 -208
- package/dist/{chunk-QRX4JRBO.cjs → chunk-3CCAICF7.cjs} +5 -5
- package/dist/{chunk-ANHZ6SUL.mjs → chunk-3TXKFRSO.mjs} +1 -1
- package/dist/{chunk-BHJAYPYU.mjs → chunk-3UZVPO72.mjs} +1 -1
- package/dist/{chunk-6UUH4N4J.mjs → chunk-43V3ANPQ.mjs} +1 -1
- package/dist/chunk-4EBC7EMW.cjs +8 -0
- package/dist/{chunk-VZY7MAVS.cjs → chunk-4IHMHFQB.cjs} +27 -1
- package/dist/{chunk-FK25QSVC.cjs → chunk-4P5634G6.cjs} +2 -2
- package/dist/{chunk-4JTQPOKO.cjs → chunk-53ZCZ46B.cjs} +2 -2
- package/dist/{chunk-NQJDO7K7.cjs → chunk-545WJ5UG.cjs} +321 -37
- package/dist/{chunk-VU3MYZPO.mjs → chunk-5FE5YT2N.mjs} +26 -0
- package/dist/{chunk-A5BJKSZE.cjs → chunk-5IQ2ERQA.cjs} +2 -2
- package/dist/{chunk-SJRCWF4Z.mjs → chunk-5Y22WNTO.mjs} +2 -2
- package/dist/{chunk-U4BJKNIR.cjs → chunk-752XUZIM.cjs} +11 -6
- package/dist/{chunk-JBK7UJOI.cjs → chunk-AJB3DHN6.cjs} +2 -2
- package/dist/{chunk-YB44NKC2.cjs → chunk-AXVRUDMB.cjs} +2 -2
- package/dist/{chunk-LJVNMGE3.mjs → chunk-BM2LH2JM.mjs} +8 -3
- package/dist/{chunk-YI6FKTTN.cjs → chunk-BT4SEFLC.cjs} +261 -38
- package/dist/{chunk-LIFUPCXW.cjs → chunk-CFG4QERR.cjs} +13 -2
- package/dist/{chunk-3OWVWZ6R.cjs → chunk-CLFEQGET.cjs} +6 -6
- package/dist/{chunk-OZK2DS44.mjs → chunk-CROAFCMW.mjs} +1 -1
- package/dist/{chunk-2KTYMMWT.mjs → chunk-DPE53XWL.mjs} +1 -1
- package/dist/{chunk-3PX4AIXO.mjs → chunk-DQF3QLOH.mjs} +258 -35
- package/dist/{chunk-FSQMN2MQ.mjs → chunk-E46NXBNJ.mjs} +1 -1
- package/dist/{chunk-EGVC4LIG.mjs → chunk-E4RDMG3K.mjs} +1 -1
- package/dist/{chunk-X2CZTWQA.mjs → chunk-ECKQFEX2.mjs} +1 -1
- package/dist/{chunk-MTWXOEI4.cjs → chunk-EXXFSZOC.cjs} +246 -193
- package/dist/{chunk-UYSTTPYJ.cjs → chunk-GGNJAGGE.cjs} +643 -435
- package/dist/{chunk-XTG73QZA.cjs → chunk-GVOMPU3Y.cjs} +12 -8
- package/dist/{chunk-ZP32GNJQ.cjs → chunk-I32V5CZL.cjs} +14 -13
- package/dist/{chunk-37PYUEK5.mjs → chunk-IOF4KXMP.mjs} +7 -3
- package/dist/{chunk-ILMTRGBG.mjs → chunk-IQIKPKFP.mjs} +157 -45
- package/dist/{chunk-5JNUYGNF.cjs → chunk-IWRLV46X.cjs} +2 -2
- package/dist/{chunk-KPOMS5RO.cjs → chunk-J3GFOQOL.cjs} +3 -3
- package/dist/{chunk-NHD7BAKD.mjs → chunk-JCEFKP5M.mjs} +41 -25
- package/dist/{analyzer-LCSI3NSH.cjs → chunk-JEJQGZI7.cjs} +16 -13
- package/dist/{chunk-LB3DPQP6.cjs → chunk-JLDNXURZ.cjs} +23 -23
- package/dist/{chunk-VGG74PSU.cjs → chunk-L2JG337G.cjs} +2 -2
- package/dist/chunk-L4RTTTVE.mjs +8 -0
- package/dist/chunk-LEJDW34D.cjs +115 -0
- package/dist/{analyzer-22BEYV7S.mjs → chunk-LVWGURLD.mjs} +6 -3
- package/dist/{chunk-Z5A6CNV2.mjs → chunk-MK5E44WP.mjs} +1 -1
- package/dist/{chunk-T4EW7AAD.mjs → chunk-NKRZLQUK.mjs} +2 -2
- package/dist/{chunk-HPWB57PZ.mjs → chunk-NT3QDN2E.mjs} +1 -1
- package/dist/{chunk-T7I62A4C.mjs → chunk-OUWRNHTV.mjs} +81 -28
- package/dist/{chunk-GFT5AHAT.mjs → chunk-QDWMCFTH.mjs} +12 -1
- package/dist/{chunk-AER5I65K.mjs → chunk-QTD6EMN2.mjs} +1 -1
- package/dist/{chunk-UDJY2ZGY.cjs → chunk-RMUD75WT.cjs} +413 -301
- package/dist/chunk-RZNCMRD3.mjs +141 -0
- package/dist/{chunk-D7LTCK3U.mjs → chunk-SA7MLSP4.mjs} +11 -6
- package/dist/{chunk-2FRLSDBT.cjs → chunk-SM25ZC4S.cjs} +1 -1
- package/dist/{chunk-3YMLUNL2.cjs → chunk-SVXOCTQ2.cjs} +1 -1
- package/dist/{chunk-W2RZ73IU.cjs → chunk-SYXPWJ7N.cjs} +8 -8
- package/dist/{chunk-F6Y7ZAPQ.mjs → chunk-T46NNU4D.mjs} +6 -3
- package/dist/{chunk-IFHPDLIS.mjs → chunk-TGULJSHD.mjs} +5 -4
- package/dist/{chunk-JPIUGDK4.mjs → chunk-TZVUF5JJ.mjs} +1 -1
- package/dist/chunk-UWI3SJAK.cjs +141 -0
- package/dist/{chunk-JI5D7MXY.mjs → chunk-UYRI6U3P.mjs} +1 -1
- package/dist/{chunk-D2X5MUF5.cjs → chunk-V727H3RI.cjs} +47 -31
- package/dist/{chunk-ZMHAFH4R.mjs → chunk-VM7X5CKC.mjs} +2 -2
- package/dist/{chunk-VPTWKOCY.mjs → chunk-VWW4Q3BJ.mjs} +287 -6
- package/dist/{chunk-4P23B7DU.cjs → chunk-WKJQ2FJA.cjs} +3 -3
- package/dist/{chunk-HASX6DC7.cjs → chunk-WKPBIT5Q.cjs} +8 -8
- package/dist/{chunk-RAWWCDCT.cjs → chunk-WYAXRIYP.cjs} +3 -3
- package/dist/{chunk-3TL3AH25.cjs → chunk-X4K7TYN6.cjs} +12 -7
- package/dist/chunk-XCXHQBMM.mjs +115 -0
- package/dist/{chunk-DPJ66FSI.cjs → chunk-XX32BOMM.cjs} +7 -7
- package/dist/{chunk-2IAPKPEB.cjs → chunk-YN6BHOYY.cjs} +6 -6
- package/dist/{chunk-CBKRS3M4.cjs → chunk-Z7P2BTZ3.cjs} +7 -6
- package/dist/{chunk-SX7EECTS.mjs → chunk-ZBUAOGMY.mjs} +1 -1
- package/dist/{chunk-RPUJHJHE.mjs → chunk-ZFWYCVKS.mjs} +4 -3
- package/dist/{chunk-IFXSBJPN.cjs → chunk-ZVIEFTUA.cjs} +20 -17
- package/dist/{chunk-EXUONJYV.mjs → chunk-ZZI56IUY.mjs} +3 -3
- package/dist/{programmatic-routes-client.d-CLG2N1yH.d.ts → client-component.d-Bgt3x5Fu.d.ts} +18 -3
- package/dist/{programmatic-routes-client.d-CPbNqtIi.d.mts → client-component.d-BoqC2MLC.d.mts} +18 -3
- package/dist/{client-plugins.d-vXrbcfJ1.d.ts → client-plugins.d-BcqIy4au.d.ts} +1 -1
- package/dist/{client-plugins.d-CgQQ-EAv.d.mts → client-plugins.d-CWyYBxXf.d.mts} +1 -1
- package/dist/client-plugins.d.mts +2 -2
- package/dist/client-plugins.d.ts +2 -2
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/{config.d-DqZkLwef.d.ts → config.d-qt-mE8O5.d.mts} +6 -2
- package/dist/{config.d-DqZkLwef.d.mts → config.d-qt-mE8O5.d.ts} +6 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/cron.cjs +12 -2
- package/dist/cron.d.mts +101 -3
- package/dist/cron.d.ts +101 -3
- package/dist/cron.mjs +11 -1
- package/dist/desktop.d.mts +3 -3
- package/dist/desktop.d.ts +3 -3
- package/dist/{devtools-KQZ6SRCJ.mjs → devtools-NUVXYG7I.mjs} +6 -6
- package/dist/{devtools-UF6JYHUN.cjs → devtools-SVRSGPNC.cjs} +8 -8
- package/dist/docs.cjs +9 -9
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +8 -8
- package/dist/image/server.cjs +3 -3
- package/dist/image/server.mjs +2 -2
- package/dist/image/sharp.cjs +10 -10
- package/dist/image/sharp.mjs +2 -2
- package/dist/index.cjs +42 -27
- package/dist/{index.d-Dmfb7Kb_.d.mts → index.d-BDaiu2i5.d.mts} +1 -1
- package/dist/{index.d-DlCELfhf.d.ts → index.d-nAncqTXz.d.ts} +1 -1
- package/dist/index.d.mts +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.mjs +42 -27
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +3 -3
- package/dist/internal/app-markdown-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.cjs +27 -22
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +26 -21
- package/dist/internal/cli-runtime.cjs +12 -11
- package/dist/internal/cli-runtime.mjs +11 -10
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/compression-runtime.d.mts +2 -2
- package/dist/internal/compression-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.cjs +8 -8
- package/dist/internal/config-runtime.d.mts +5 -5
- package/dist/internal/config-runtime.d.ts +5 -5
- package/dist/internal/config-runtime.mjs +7 -7
- package/dist/internal/form-actions.cjs +4 -4
- package/dist/internal/form-actions.mjs +3 -3
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/metadata-image-runtime.cjs +3 -3
- package/dist/internal/metadata-image-runtime.mjs +2 -2
- package/dist/internal/native-server-fns.cjs +25 -0
- package/dist/internal/native-server-fns.d.mts +42 -0
- package/dist/internal/native-server-fns.d.ts +42 -0
- package/dist/internal/native-server-fns.mjs +25 -0
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-node-env.cjs +2 -2
- package/dist/internal/production-node-env.mjs +1 -1
- package/dist/internal/production-runtime.cjs +16 -10
- package/dist/internal/production-runtime.d.mts +39 -12
- package/dist/internal/production-runtime.d.ts +39 -12
- package/dist/internal/production-runtime.mjs +15 -9
- package/dist/internal/react-cache.cjs +51 -0
- package/dist/internal/react-cache.d.mts +3 -0
- package/dist/internal/react-cache.d.ts +3 -0
- package/dist/internal/react-cache.mjs +51 -0
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/middleware.cjs +3 -3
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/middleware.mjs +2 -2
- package/dist/mobile.d.mts +10 -4
- package/dist/mobile.d.ts +10 -4
- package/dist/{modules-VHD7BELU.mjs → modules-KOKD4XS6.mjs} +2 -2
- package/dist/modules-QTP7WJPD.cjs +13 -0
- package/dist/native-server-fn-handler-GLRHAYWV.mjs +28 -0
- package/dist/native-server-fn-handler-J5MYRXN6.cjs +28 -0
- package/dist/native-specs-5OLED4MM.cjs +15 -0
- package/dist/{native-specs-BD7HOTMJ.mjs → native-specs-LDV6IZ4N.mjs} +1 -1
- package/dist/{native-tree-VWNW2MQ2.mjs → native-tree-AS5L3ID3.mjs} +2 -2
- package/dist/{native-tree-6G5O53O3.cjs → native-tree-Z2WYUJEV.cjs} +3 -3
- package/dist/native.cjs +1 -1
- package/dist/native.d.mts +5 -5
- package/dist/native.d.ts +5 -5
- package/dist/native.mjs +1 -1
- package/dist/{navigation-delegate.d-JXx40JzR.d.ts → navigation-delegate.d-BbUHRXxG.d.ts} +1 -1
- package/dist/{navigation-delegate.d-CnOTWOyi.d.mts → navigation-delegate.d-CSCm8ZxL.d.mts} +1 -1
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- package/dist/{nitro-FLN6DRGJ.mjs → nitro-DD4QCA66.mjs} +5 -5
- package/dist/{nitro-HXAZZQKY.cjs → nitro-VRDX2H4M.cjs} +8 -8
- package/dist/plugin.cjs +19 -18
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +18 -17
- package/dist/{port-WOOQ3V56.mjs → port-UFUZL6RI.mjs} +2 -2
- package/dist/{port-C6GBH4C6.cjs → port-VTLHPZOI.cjs} +10 -10
- package/dist/{production-runtime.d-CP5s6RuY.d.mts → production-runtime.d-CcQiDko5.d.mts} +1 -1
- package/dist/{production-runtime.d-N-cE3pmy.d.ts → production-runtime.d-DgT24A0f.d.ts} +1 -1
- package/dist/{render-plan.d-DZ-qjjdG.d.mts → render-plan.d-BH9WF-JZ.d.mts} +1 -1
- package/dist/{render-plan.d-B9lAP3uX.d.ts → render-plan.d-CyrX6MDs.d.ts} +1 -1
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/{request.d-BiicaNxb.d.ts → request.d-BB8M8bcD.d.ts} +1 -1
- package/dist/{request.d-DV0oeUit.d.mts → request.d-CUrPnCW7.d.mts} +1 -1
- package/dist/request.d.mts +3 -3
- package/dist/request.d.ts +3 -3
- package/dist/{route-rendering.d-BrIKA51A.d.mts → route-rendering.d-CYxlzaFm.d.mts} +1 -1
- package/dist/{route-rendering.d-Iss0C7GR.d.ts → route-rendering.d-DYqZMIf4.d.ts} +1 -1
- package/dist/{router.d-mNTbOGV_.d.mts → router.d-7o24CD8u.d.mts} +1 -1
- package/dist/{router.d-DjGn_al7.d.ts → router.d-DaKo507j.d.ts} +1 -1
- package/dist/{routes.d-BKSjHuH9.d.ts → routes.d-BknKQcTu.d.ts} +7 -1
- package/dist/{routes.d-qd8Qf4LG.d.mts → routes.d-D1IrO9KK.d.mts} +7 -1
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-SVLBTY7H.cjs → rsc-pipeline-OF2I7PCX.cjs} +8 -8
- package/dist/{rsc-pipeline-WBLBDQXA.mjs → rsc-pipeline-RFLHDAKD.mjs} +7 -7
- package/dist/{runtime-DGUOWSMF.cjs → runtime-LBTK62AD.cjs} +70 -47
- package/dist/{runtime-HFZTVNFF.mjs → runtime-M6UJCSLA.mjs} +38 -15
- package/dist/{runtime.d-Bm_4hP5T.d.ts → runtime.d-CN73a-IL.d.ts} +1 -1
- package/dist/{runtime.d-BNVbojF1.d.mts → runtime.d-CcNuzhX6.d.mts} +1 -1
- package/dist/server-action-security.cjs +3 -3
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn.cjs +4 -4
- package/dist/server-fn.mjs +3 -3
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server-query.cjs +5 -5
- package/dist/server-query.mjs +4 -4
- package/dist/server.cjs +38 -37
- package/dist/server.d.mts +10 -10
- package/dist/server.d.ts +10 -10
- package/dist/server.mjs +23 -22
- package/dist/{spa-router.d-DHDoXxDE.d.mts → spa-router.d-CNi77LZm.d.mts} +2 -2
- package/dist/{spa-router.d-DAtnNoBe.d.ts → spa-router.d-Cvgf5QP4.d.ts} +2 -2
- package/dist/testing.cjs +6 -6
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.mjs +4 -4
- package/dist/{utils.d-DwZ-KLSB.d.ts → utils.d-C3H-14_Y.d.ts} +1 -1
- package/dist/{utils.d-uKZcKJk4.d.mts → utils.d-D8VfzZYn.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +21 -18
- package/dist/vite.d.mts +5 -5
- package/dist/vite.d.ts +5 -5
- package/dist/vite.mjs +20 -17
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- package/package.json +12 -2
- package/dist/modules-WT5D3AWY.cjs +0 -13
- package/dist/native-specs-IQQRJOOW.cjs +0 -15
|
@@ -18,7 +18,10 @@ var _chunkMF3IA2AWcjs = require('./chunk-MF3IA2AW.cjs');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
var _chunk4IHMHFQBcjs = require('./chunk-4IHMHFQB.cjs');
|
|
22
25
|
|
|
23
26
|
|
|
24
27
|
var _chunkVM57CK74cjs = require('./chunk-VM57CK74.cjs');
|
|
@@ -28,11 +31,14 @@ var _chunk4BS3HSY7cjs = require('./chunk-4BS3HSY7.cjs');
|
|
|
28
31
|
|
|
29
32
|
|
|
30
33
|
|
|
34
|
+
var _chunkUWI3SJAKcjs = require('./chunk-UWI3SJAK.cjs');
|
|
35
|
+
|
|
36
|
+
|
|
31
37
|
|
|
32
38
|
|
|
33
39
|
|
|
34
|
-
var _chunkIFXSBJPNcjs = require('./chunk-IFXSBJPN.cjs');
|
|
35
40
|
|
|
41
|
+
var _chunkZVIEFTUAcjs = require('./chunk-ZVIEFTUA.cjs');
|
|
36
42
|
|
|
37
43
|
|
|
38
44
|
|
|
@@ -43,7 +49,8 @@ var _chunkIFXSBJPNcjs = require('./chunk-IFXSBJPN.cjs');
|
|
|
43
49
|
|
|
44
50
|
|
|
45
51
|
|
|
46
|
-
|
|
52
|
+
|
|
53
|
+
var _chunkIWRLV46Xcjs = require('./chunk-IWRLV46X.cjs');
|
|
47
54
|
|
|
48
55
|
|
|
49
56
|
|
|
@@ -51,7 +58,7 @@ var _chunk5JNUYGNFcjs = require('./chunk-5JNUYGNF.cjs');
|
|
|
51
58
|
var _chunkDZZHTMWMcjs = require('./chunk-DZZHTMWM.cjs');
|
|
52
59
|
|
|
53
60
|
|
|
54
|
-
var
|
|
61
|
+
var _chunkWKJQ2FJAcjs = require('./chunk-WKJQ2FJA.cjs');
|
|
55
62
|
|
|
56
63
|
|
|
57
64
|
var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
|
|
@@ -60,7 +67,7 @@ var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
|
|
|
60
67
|
|
|
61
68
|
|
|
62
69
|
|
|
63
|
-
var
|
|
70
|
+
var _chunk545WJ5UGcjs = require('./chunk-545WJ5UG.cjs');
|
|
64
71
|
|
|
65
72
|
|
|
66
73
|
var _chunkBRWIVOV4cjs = require('./chunk-BRWIVOV4.cjs');
|
|
@@ -104,7 +111,7 @@ var _chunkOCS3PSYRcjs = require('./chunk-OCS3PSYR.cjs');
|
|
|
104
111
|
|
|
105
112
|
|
|
106
113
|
|
|
107
|
-
var
|
|
114
|
+
var _chunkGGNJAGGEcjs = require('./chunk-GGNJAGGE.cjs');
|
|
108
115
|
|
|
109
116
|
|
|
110
117
|
var _chunkR53QDV6Tcjs = require('./chunk-R53QDV6T.cjs');
|
|
@@ -115,7 +122,7 @@ var _chunk3EEET2Q5cjs = require('./chunk-3EEET2Q5.cjs');
|
|
|
115
122
|
|
|
116
123
|
|
|
117
124
|
|
|
118
|
-
var
|
|
125
|
+
var _chunkX4K7TYN6cjs = require('./chunk-X4K7TYN6.cjs');
|
|
119
126
|
|
|
120
127
|
|
|
121
128
|
|
|
@@ -145,7 +152,7 @@ var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
|
|
|
145
152
|
|
|
146
153
|
|
|
147
154
|
|
|
148
|
-
var
|
|
155
|
+
var _chunkXX32BOMMcjs = require('./chunk-XX32BOMM.cjs');
|
|
149
156
|
|
|
150
157
|
|
|
151
158
|
|
|
@@ -153,6 +160,9 @@ var _chunkDPJ66FSIcjs = require('./chunk-DPJ66FSI.cjs');
|
|
|
153
160
|
var _chunkQAS7KE7Jcjs = require('./chunk-QAS7KE7J.cjs');
|
|
154
161
|
|
|
155
162
|
|
|
163
|
+
var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
|
|
164
|
+
|
|
165
|
+
|
|
156
166
|
var _chunkNK2VWS7Pcjs = require('./chunk-NK2VWS7P.cjs');
|
|
157
167
|
|
|
158
168
|
|
|
@@ -200,23 +210,23 @@ var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
|
|
|
200
210
|
|
|
201
211
|
|
|
202
212
|
|
|
203
|
-
var
|
|
213
|
+
var _chunk3CCAICF7cjs = require('./chunk-3CCAICF7.cjs');
|
|
204
214
|
|
|
205
215
|
|
|
206
216
|
|
|
207
217
|
|
|
208
218
|
|
|
209
|
-
var
|
|
219
|
+
var _chunkBT4SEFLCcjs = require('./chunk-BT4SEFLC.cjs');
|
|
210
220
|
|
|
211
221
|
|
|
212
|
-
var
|
|
222
|
+
var _chunk4P5634G6cjs = require('./chunk-4P5634G6.cjs');
|
|
213
223
|
|
|
214
224
|
|
|
215
225
|
var _chunkJMYXO572cjs = require('./chunk-JMYXO572.cjs');
|
|
216
226
|
|
|
217
227
|
|
|
218
228
|
|
|
219
|
-
var
|
|
229
|
+
var _chunkI32V5CZLcjs = require('./chunk-I32V5CZL.cjs');
|
|
220
230
|
|
|
221
231
|
|
|
222
232
|
var _chunkZOYKJBP5cjs = require('./chunk-ZOYKJBP5.cjs');
|
|
@@ -227,7 +237,7 @@ var _chunkZOYKJBP5cjs = require('./chunk-ZOYKJBP5.cjs');
|
|
|
227
237
|
var _chunkMHLNWRCJcjs = require('./chunk-MHLNWRCJ.cjs');
|
|
228
238
|
|
|
229
239
|
|
|
230
|
-
var
|
|
240
|
+
var _chunkSYXPWJ7Ncjs = require('./chunk-SYXPWJ7N.cjs');
|
|
231
241
|
|
|
232
242
|
|
|
233
243
|
var _chunkBBPDJGCUcjs = require('./chunk-BBPDJGCU.cjs');
|
|
@@ -254,7 +264,7 @@ var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
|
254
264
|
var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
255
265
|
|
|
256
266
|
|
|
257
|
-
var
|
|
267
|
+
var _chunkSM25ZC4Scjs = require('./chunk-SM25ZC4S.cjs');
|
|
258
268
|
|
|
259
269
|
|
|
260
270
|
var _chunkE552H232cjs = require('./chunk-E552H232.cjs');
|
|
@@ -372,7 +382,7 @@ function getDocsTitle(docs) {
|
|
|
372
382
|
return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
|
|
373
383
|
}
|
|
374
384
|
function loadPages(contentDir, docs) {
|
|
375
|
-
return
|
|
385
|
+
return _chunkIWRLV46Xcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunkIWRLV46Xcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
|
|
376
386
|
}
|
|
377
387
|
function findSocialImagePath(html) {
|
|
378
388
|
const match = /<meta\s+property=["']og:image["']\s+content=["']([^"']+)["']/i.exec(html) || /<meta\s+content=["']([^"']+)["']\s+property=["']og:image["']/i.exec(html);
|
|
@@ -390,14 +400,14 @@ async function addHandlerRoute(routes, pathname, handler, absolutePaths) {
|
|
|
390
400
|
return response;
|
|
391
401
|
}
|
|
392
402
|
async function compileFarmDocsManifest(docs, options) {
|
|
393
|
-
const contentDir =
|
|
403
|
+
const contentDir = _chunkIWRLV46Xcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
|
|
394
404
|
const pages = loadPages(contentDir, docs);
|
|
395
405
|
const absolutePaths = [
|
|
396
406
|
_path2.default.resolve(options.root),
|
|
397
407
|
_path2.default.resolve(contentDir),
|
|
398
408
|
docs.configPath || ""
|
|
399
409
|
];
|
|
400
|
-
const handler =
|
|
410
|
+
const handler = _chunkIWRLV46Xcjs.createFarmDocsHandler.call(void 0, docs, {
|
|
401
411
|
root: options.root,
|
|
402
412
|
srcDir: options.srcDir,
|
|
403
413
|
clientEntry: options.clientEntry,
|
|
@@ -406,7 +416,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
406
416
|
globalStylesheetHref: options.globalStylesheetHref,
|
|
407
417
|
isPathGuarded: options.isPathGuarded
|
|
408
418
|
});
|
|
409
|
-
const apiHandler =
|
|
419
|
+
const apiHandler = _chunkZVIEFTUAcjs.createFarmDocsAPIHandler.call(void 0, {
|
|
410
420
|
rootDir: options.root,
|
|
411
421
|
srcDir: options.srcDir,
|
|
412
422
|
docs,
|
|
@@ -417,7 +427,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
417
427
|
const apiMarkdown = {};
|
|
418
428
|
for (const page of pages) {
|
|
419
429
|
const htmlResponse = await addHandlerRoute(routes, page.href, handler, absolutePaths);
|
|
420
|
-
const markdownPath =
|
|
430
|
+
const markdownPath = _chunkIWRLV46Xcjs.getFarmDocsMarkdownPath.call(void 0, page.href);
|
|
421
431
|
await addHandlerRoute(routes, markdownPath, handler, absolutePaths);
|
|
422
432
|
if (htmlResponse) {
|
|
423
433
|
const socialImagePath = findSocialImagePath(await htmlResponse.text());
|
|
@@ -501,7 +511,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
501
511
|
post: await compileResponse(postResponse, absolutePaths),
|
|
502
512
|
search: {
|
|
503
513
|
pages: publicPages.map((page) => ({
|
|
504
|
-
...
|
|
514
|
+
..._chunkIWRLV46Xcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
505
515
|
sourcePath: `farm-docs:${page.slug || "index"}`
|
|
506
516
|
})),
|
|
507
517
|
search: _nullishCoalesce(searchConfig, () => ( true)),
|
|
@@ -679,7 +689,7 @@ async function createFarmRouteRuntimeManifest(options) {
|
|
|
679
689
|
const routes = [];
|
|
680
690
|
for (const [pattern, entry] of options.routeManager.getRoutes()) {
|
|
681
691
|
const routeModule = await options.routeManager.loadRouteModule(entry.modulePath);
|
|
682
|
-
const rendering = await
|
|
692
|
+
const rendering = await _chunkX4K7TYN6cjs.resolveRouteRenderingConfigFromFile.call(void 0, routeModule, entry.modulePath);
|
|
683
693
|
const runtimeConfig = await options.routeManager.resolveRouteRuntimeConfig(pattern);
|
|
684
694
|
routes.push({
|
|
685
695
|
kind: "page",
|
|
@@ -1793,7 +1803,7 @@ async function findFarmConfigPath(root) {
|
|
|
1793
1803
|
}
|
|
1794
1804
|
function hasFarmServerRuntimePlugins(config) {
|
|
1795
1805
|
return (config.plugins || []).some((plugin) => {
|
|
1796
|
-
if (
|
|
1806
|
+
if (_chunkI32V5CZLcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) return false;
|
|
1797
1807
|
return Boolean(
|
|
1798
1808
|
plugin.setup || plugin.init || plugin.ready || plugin.shutdown || plugin.runtime || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML
|
|
1799
1809
|
);
|
|
@@ -1804,7 +1814,7 @@ function hasFarmPluginRoutes(config) {
|
|
|
1804
1814
|
}
|
|
1805
1815
|
function farmServerRuntimePluginsMayHandlePath(config, pathname) {
|
|
1806
1816
|
return (config.plugins || []).some(
|
|
1807
|
-
(plugin) =>
|
|
1817
|
+
(plugin) => _chunkI32V5CZLcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && // Mobile session tokens change only bearer requests and cookie-clearing responses, which a
|
|
1808
1818
|
// prerendered file never answers or sends; its endpoints live under /__farm/.
|
|
1809
1819
|
plugin.name !== _chunk4BS3HSY7cjs.FARM_MOBILE_SESSION_PLUGIN && _chunk47JV57DAcjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
|
|
1810
1820
|
);
|
|
@@ -1865,7 +1875,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
|
|
|
1865
1875
|
assertFarmDocsRuntimeSupported(config, preset);
|
|
1866
1876
|
const srcDir = config.srcDir || "src";
|
|
1867
1877
|
const distDir = config.distDir || ".farm";
|
|
1868
|
-
const deployOutputDir =
|
|
1878
|
+
const deployOutputDir = _chunk545WJ5UGcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
1869
1879
|
const lifecyclePluginManager = options.pluginManager;
|
|
1870
1880
|
const productionViteResultPromise = Promise.allSettled([
|
|
1871
1881
|
Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkMF3IA2AWcjs.loadFarmProductionVite.call(void 0, ))))
|
|
@@ -2138,7 +2148,7 @@ async function mergeBuiltFontCss(outputDir, fontCssSource) {
|
|
|
2138
2148
|
}
|
|
2139
2149
|
const normalizedFontCss = typeof fontCss === "string" ? fontCss : Buffer.from(fontCss).toString("utf8");
|
|
2140
2150
|
await fs4.writeFile(fontCssPath, normalizedFontCss);
|
|
2141
|
-
await fs4.writeFile(clientCssPath,
|
|
2151
|
+
await fs4.writeFile(clientCssPath, _chunkGGNJAGGEcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
|
|
2142
2152
|
}
|
|
2143
2153
|
var IncompleteClientBuildOutputError = class extends Error {
|
|
2144
2154
|
constructor(detail) {
|
|
@@ -2184,7 +2194,7 @@ function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, optio
|
|
|
2184
2194
|
const key = `${_path2.default.resolve(root)}\0${mode}\0${options.asyncOwnerIslands === true}\0${options.serverOwners === true}\0${options.serverTreeLayouts === true}\0${_path2.default.resolve(modulePath)}`;
|
|
2185
2195
|
let plan = cache.get(key);
|
|
2186
2196
|
if (!plan) {
|
|
2187
|
-
plan =
|
|
2197
|
+
plan = _chunkGGNJAGGEcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
|
|
2188
2198
|
cache.set(key, plan);
|
|
2189
2199
|
}
|
|
2190
2200
|
return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
|
|
@@ -2202,7 +2212,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2202
2212
|
});
|
|
2203
2213
|
pluginManager.addPlugins(config.plugins || []);
|
|
2204
2214
|
const clientPages = [];
|
|
2205
|
-
const integrationProviders =
|
|
2215
|
+
const integrationProviders = _chunkI32V5CZLcjs.getIntegrationProviders.call(void 0, config.integrations).filter(
|
|
2206
2216
|
(provider) => provider.component || provider.type === "clerk"
|
|
2207
2217
|
);
|
|
2208
2218
|
const unsupportedIntegrationProvider = integrationProviders.find(
|
|
@@ -2213,14 +2223,14 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2213
2223
|
`[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
|
|
2214
2224
|
);
|
|
2215
2225
|
}
|
|
2216
|
-
const isolatedMode =
|
|
2226
|
+
const isolatedMode = _chunkGGNJAGGEcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
2217
2227
|
_optionalChain([config, 'access', _61 => _61.experimental, 'optionalAccess', _62 => _62.isolatedClientHydration]),
|
|
2218
2228
|
{
|
|
2219
2229
|
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _63 => _63.experimental, 'optionalAccess', _64 => _64.serverComponents])) === "rsc",
|
|
2220
2230
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
2221
2231
|
}
|
|
2222
2232
|
);
|
|
2223
|
-
const planOptions =
|
|
2233
|
+
const planOptions = _chunkGGNJAGGEcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
2224
2234
|
config.renderer,
|
|
2225
2235
|
Boolean(unsupportedIntegrationProvider)
|
|
2226
2236
|
);
|
|
@@ -2283,7 +2293,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2283
2293
|
const adapterOwnsDocsRuntime = Boolean(
|
|
2284
2294
|
_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _69 => _69.docs, 'optionalAccess', _70 => _70.enabled]) && _optionalChain([config, 'access', _71 => _71.docs, 'access', _72 => _72.adapter, 'optionalAccess', _73 => _73.server]) && config.docs.adapter.react
|
|
2285
2295
|
);
|
|
2286
|
-
const docsEntries = _optionalChain([config, 'access', _74 => _74.docs, 'optionalAccess', _75 => _75.enabled]) ?
|
|
2296
|
+
const docsEntries = _optionalChain([config, 'access', _74 => _74.docs, 'optionalAccess', _75 => _75.enabled]) ? _chunkIWRLV46Xcjs.getFarmDocsRoots.call(void 0, config.docs).map(
|
|
2287
2297
|
(docsRoot) => `/${docsRoot.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/"
|
|
2288
2298
|
) : [];
|
|
2289
2299
|
const adapterDocsEntry = _nullishCoalesce(docsEntries[0], () => ( null));
|
|
@@ -2292,11 +2302,11 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2292
2302
|
);
|
|
2293
2303
|
const syntheticDocsEntry = _optionalChain([config, 'access', _76 => _76.docs, 'optionalAccess', _77 => _77.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
|
|
2294
2304
|
const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
|
|
2295
|
-
const markdownPagePlan =
|
|
2305
|
+
const markdownPagePlan = _chunkGGNJAGGEcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
2296
2306
|
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), root),
|
|
2297
2307
|
root,
|
|
2298
2308
|
isolatedMode,
|
|
2299
|
-
planOptions
|
|
2309
|
+
{ ...planOptions, packageReferences: pagePlanOptions.serverOwners }
|
|
2300
2310
|
);
|
|
2301
2311
|
const routePlans = pageRoutes.map((route) => ({
|
|
2302
2312
|
route,
|
|
@@ -2308,7 +2318,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2308
2318
|
pagePlanOptions
|
|
2309
2319
|
)
|
|
2310
2320
|
}));
|
|
2311
|
-
|
|
2321
|
+
_chunkGGNJAGGEcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
2312
2322
|
clientLayouts.map((layout) => ({
|
|
2313
2323
|
pattern: layout.pattern,
|
|
2314
2324
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -2341,7 +2351,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2341
2351
|
for (const layout of clientLayouts) {
|
|
2342
2352
|
const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
|
|
2343
2353
|
if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
|
|
2344
|
-
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F ${
|
|
2354
|
+
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F ${_chunkGGNJAGGEcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`);
|
|
2345
2355
|
}
|
|
2346
2356
|
}
|
|
2347
2357
|
if (isolatedMode === "analyze") {
|
|
@@ -2365,12 +2375,12 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2365
2375
|
);
|
|
2366
2376
|
if (metadata.suppressedAsyncHydration) {
|
|
2367
2377
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
2368
|
-
`\u26A0\uFE0F ${
|
|
2378
|
+
`\u26A0\uFE0F ${_chunkGGNJAGGEcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
|
|
2369
2379
|
);
|
|
2370
2380
|
}
|
|
2371
2381
|
if (metadata.shouldHydrate || metadata.hasIsolatedClientBoundaries || applicableClientLayouts.length > 0) {
|
|
2372
2382
|
const relativePath = route.modulePath.replace(root, "").replace(/^\//, "");
|
|
2373
|
-
const islandStrategy =
|
|
2383
|
+
const islandStrategy = _chunkGGNJAGGEcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
2374
2384
|
route,
|
|
2375
2385
|
metadata,
|
|
2376
2386
|
clientLayouts,
|
|
@@ -2388,7 +2398,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2388
2398
|
...applicableClientLayouts.filter((layout) => layout.hasIsolatedClientBoundaries || layout.serverTreeLayout).flatMap((layout) => layout.isolatedBoundaries)
|
|
2389
2399
|
],
|
|
2390
2400
|
// The server renders a server tree only below a hydrating layout.
|
|
2391
|
-
...
|
|
2401
|
+
..._chunkGGNJAGGEcjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
|
|
2392
2402
|
});
|
|
2393
2403
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
|
|
2394
2404
|
}
|
|
@@ -2424,7 +2434,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2424
2434
|
}
|
|
2425
2435
|
const clientRouteSlots = routeSlots.filter((slot) => {
|
|
2426
2436
|
try {
|
|
2427
|
-
return
|
|
2437
|
+
return _chunkGGNJAGGEcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root).shouldHydrate;
|
|
2428
2438
|
} catch (error) {
|
|
2429
2439
|
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
|
|
2430
2440
|
return false;
|
|
@@ -2446,20 +2456,20 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2446
2456
|
srcDir,
|
|
2447
2457
|
adapterOwnsDocsRuntime ? false : _chunkDZZHTMWMcjs.isFarmDocsSearchEnabled.call(void 0, config.docs),
|
|
2448
2458
|
adapterOwnsDocsRuntime ? void 0 : _chunkDZZHTMWMcjs.resolveFarmDocsSearchClientModule.call(void 0, root),
|
|
2449
|
-
_optionalChain([config, 'access', _78 => _78.docs, 'optionalAccess', _79 => _79.enabled]) ?
|
|
2459
|
+
_optionalChain([config, 'access', _78 => _78.docs, 'optionalAccess', _79 => _79.enabled]) ? _chunkIWRLV46Xcjs.getFarmDocsRoots.call(void 0, config.docs).map((docsRoot) => docsRoot.entry) : void 0,
|
|
2450
2460
|
adapterOwnsDocsRuntime ? _optionalChain([config, 'access', _80 => _80.docs, 'access', _81 => _81.adapter, 'optionalAccess', _82 => _82.react]) : void 0,
|
|
2451
2461
|
config.i18n,
|
|
2452
2462
|
config.plugins,
|
|
2453
2463
|
config.renderer,
|
|
2454
2464
|
config.publicRuntimeConfig,
|
|
2455
2465
|
config.trailingSlash,
|
|
2456
|
-
|
|
2466
|
+
_chunkI32V5CZLcjs.getIntegrationProviders.call(void 0, config.integrations),
|
|
2457
2467
|
config.basePath,
|
|
2458
|
-
|
|
2468
|
+
_chunkGGNJAGGEcjs.generateClientCachePersistenceCode.call(void 0, _chunkGGNJAGGEcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
|
|
2459
2469
|
adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0,
|
|
2460
2470
|
_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _83 => _83.experimental, 'optionalAccess', _84 => _84.serverComponents])) === "islands",
|
|
2461
2471
|
platform,
|
|
2462
|
-
islandsMode ?
|
|
2472
|
+
islandsMode ? _chunkGGNJAGGEcjs.collectFarmServerStylesheets.call(void 0,
|
|
2463
2473
|
[
|
|
2464
2474
|
...layoutRoutes.map((layout) => layout.modulePath),
|
|
2465
2475
|
...pageRoutes.filter((route) => !isAdapterDocsRoute(route.pattern)).map((route) => route.modulePath)
|
|
@@ -2470,7 +2480,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2470
2480
|
const entryName = platform === "mobile" ? _chunkEFZGB7JCcjs.FARM_MOBILE_CLIENT_ENTRY_NAME : "farm-client";
|
|
2471
2481
|
await fs4.writeFile(clientEntryPath, clientHydrationCode);
|
|
2472
2482
|
const clientInput = { [entryName]: clientEntryPath };
|
|
2473
|
-
if (platform === "web" &&
|
|
2483
|
+
if (platform === "web" && _chunkGGNJAGGEcjs.canBootFarmIslandsClient.call(void 0, config)) {
|
|
2474
2484
|
const clientBootPath = _path2.default.join(clientEntryDir, "farm-client-boot.tsx");
|
|
2475
2485
|
await fs4.writeFile(
|
|
2476
2486
|
clientBootPath,
|
|
@@ -2542,7 +2552,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2542
2552
|
}
|
|
2543
2553
|
},
|
|
2544
2554
|
plugins: [
|
|
2545
|
-
|
|
2555
|
+
_chunkGGNJAGGEcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
2546
2556
|
createFarmPrivateClientSourcemapsPlugin({
|
|
2547
2557
|
outDir: _path2.default.join(
|
|
2548
2558
|
_path2.default.dirname(outputDir),
|
|
@@ -2574,7 +2584,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2574
2584
|
...rendererVitePlugins,
|
|
2575
2585
|
...config.vite.plugins || [],
|
|
2576
2586
|
farmServerOnlyEntriesPlugin({ platform }),
|
|
2577
|
-
|
|
2587
|
+
_chunkGGNJAGGEcjs.farmDocsClientConfigPlugin.call(void 0,
|
|
2578
2588
|
adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
|
|
2579
2589
|
),
|
|
2580
2590
|
// Plugin to redirect @farm.js/core imports to client-only exports
|
|
@@ -2636,7 +2646,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2636
2646
|
} : void 0,
|
|
2637
2647
|
// Ensure React is bundled for client
|
|
2638
2648
|
resolve: {
|
|
2639
|
-
alias:
|
|
2649
|
+
alias: _chunkGGNJAGGEcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
2640
2650
|
dedupe: [...config.renderer.dedupe || []]
|
|
2641
2651
|
},
|
|
2642
2652
|
// Optimize dependencies - exclude server-side code from client bundle
|
|
@@ -2649,7 +2659,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2649
2659
|
]
|
|
2650
2660
|
}
|
|
2651
2661
|
};
|
|
2652
|
-
await viteBuild(
|
|
2662
|
+
await viteBuild(_chunkGGNJAGGEcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite));
|
|
2653
2663
|
if (platform === "mobile") {
|
|
2654
2664
|
await fs4.rm(_path2.default.join(outputDir, `${entryName}.css`), { force: true });
|
|
2655
2665
|
if (!await _chunkEFZGB7JCcjs.hasFarmMobileClientEntry.call(void 0, _path2.default.dirname(outputDir), outputDir)) {
|
|
@@ -2748,7 +2758,7 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
|
|
|
2748
2758
|
return response;
|
|
2749
2759
|
}
|
|
2750
2760
|
|
|
2751
|
-
${streamNavigations ?
|
|
2761
|
+
${streamNavigations ? _chunkGGNJAGGEcjs.FARM_NAVIGATION_STREAM_READER_SOURCE : ""}
|
|
2752
2762
|
|
|
2753
2763
|
function clearFarmPrefetchCacheOnDeploymentMismatch(router, error) {
|
|
2754
2764
|
if (error?.name === "FarmDeploymentMismatchError") {
|
|
@@ -3506,7 +3516,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
|
|
|
3506
3516
|
direction: {}
|
|
3507
3517
|
}, plugins = [], renderer = _chunkRD623KW4cjs.REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false, platform, serverStylesheets = []) {
|
|
3508
3518
|
const toImportPath = (targetPath) => targetPath.replace(/\\/g, "/");
|
|
3509
|
-
const clientPluginEntry =
|
|
3519
|
+
const clientPluginEntry = _chunkGGNJAGGEcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
3510
3520
|
plugins,
|
|
3511
3521
|
root,
|
|
3512
3522
|
srcDir,
|
|
@@ -3518,7 +3528,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
|
|
|
3518
3528
|
import { createRoot, hydrateRoot } from "react-dom/client";` : appSetupPath ? `import React, { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
|
|
3519
3529
|
import __farmAppSetup from ${JSON.stringify(_chunkQMNWKQL4cjs.toPosixPath.call(void 0, appSetupPath))};
|
|
3520
3530
|
__farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};`;
|
|
3521
|
-
const providerClientCode =
|
|
3531
|
+
const providerClientCode = _chunkGGNJAGGEcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
3522
3532
|
integrationProviders,
|
|
3523
3533
|
root,
|
|
3524
3534
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -4075,7 +4085,7 @@ function hasHydratableLayout(pathname) {
|
|
|
4075
4085
|
});
|
|
4076
4086
|
}
|
|
4077
4087
|
|
|
4078
|
-
${
|
|
4088
|
+
${_chunkGGNJAGGEcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
4079
4089
|
// Wrap a page element with applicable layouts
|
|
4080
4090
|
function wrapWithLayouts(pageElement, pathname, params) {
|
|
4081
4091
|
const layouts = getApplicableLayouts(pathname);
|
|
@@ -4110,7 +4120,7 @@ function createLayoutPageBoundary(route, pageElement, serverHtml) {
|
|
|
4110
4120
|
return React.createElement("div", props, pageElement);
|
|
4111
4121
|
}
|
|
4112
4122
|
let farmLastRouteState = null;
|
|
4113
|
-
${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${
|
|
4123
|
+
${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkGGNJAGGEcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
4114
4124
|
function farmTreeLayoutsOf(pathname) {
|
|
4115
4125
|
return getApplicableLayouts(pathname).filter(function(layout) {
|
|
4116
4126
|
return layout.serverTree === true;
|
|
@@ -5340,7 +5350,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5340
5350
|
}
|
|
5341
5351
|
const middlewareRoutes = await discoverMiddlewareRoutes(appDirs);
|
|
5342
5352
|
const instrumentationPath = _chunkBRWIVOV4cjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
|
|
5343
|
-
const notFoundPath =
|
|
5353
|
+
const notFoundPath = _chunkGGNJAGGEcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
|
|
5344
5354
|
if (notFoundPath) _chunkQMNWKQL4cjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
|
|
5345
5355
|
layoutRoutes.sort((a, b) => {
|
|
5346
5356
|
const depthA = a.pattern.split("/").filter(Boolean).length;
|
|
@@ -5357,13 +5367,13 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5357
5367
|
const hasServerRuntimeIntegrations = configuredIntegrationValues.some(
|
|
5358
5368
|
(integration) => typeof integration === "object" && integration !== null && (!("serverRuntime" in integration) || integration.serverRuntime !== false)
|
|
5359
5369
|
);
|
|
5360
|
-
const hasIntegrationProviders =
|
|
5370
|
+
const hasIntegrationProviders = _chunkI32V5CZLcjs.getIntegrationProviders.call(void 0, config.integrations).some(
|
|
5361
5371
|
(provider) => provider.component || provider.type === "clerk"
|
|
5362
5372
|
);
|
|
5363
5373
|
const hasObservabilityHandler = !!config.observability && typeof config.observability === "object" && "onEvent" in config.observability;
|
|
5364
5374
|
const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _91 => _91.mdx, 'optionalAccess', _92 => _92.components]));
|
|
5365
5375
|
const hasMiddlewareConfig = _chunkO27PLNQZcjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
|
|
5366
|
-
const hasRouteContextConfig =
|
|
5376
|
+
const hasRouteContextConfig = _chunk545WJ5UGcjs.hasCustomFarmRouteContext.call(void 0, config);
|
|
5367
5377
|
const hasServerRuntimePlugins = hasFarmServerRuntimePlugins(config);
|
|
5368
5378
|
const hasPluginRoutes = hasFarmPluginRoutes(config);
|
|
5369
5379
|
const hasServerCacheConfig = hasFarmServerCacheConfig(config.cache);
|
|
@@ -5373,9 +5383,9 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5373
5383
|
const hasConfiguredRuntimePlugins = Boolean(
|
|
5374
5384
|
hasRuntimeConfigModule && (config.plugins || []).length > 0
|
|
5375
5385
|
);
|
|
5376
|
-
if (
|
|
5386
|
+
if (_chunkZVIEFTUAcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
5377
5387
|
const adapterGuardedPaths = new Set(getFarmDocsGuardedPaths(config, middlewareRoutes));
|
|
5378
|
-
|
|
5388
|
+
_chunkZVIEFTUAcjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
|
|
5379
5389
|
config.docs,
|
|
5380
5390
|
{ root, srcDir: config.srcDir },
|
|
5381
5391
|
(pathname) => adapterGuardedPaths.has(pathname)
|
|
@@ -5384,7 +5394,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5384
5394
|
const farmDocsCspNonceMarker = _chunk6JHZPB52cjs.createFarmCspNonce.call(void 0, config.security);
|
|
5385
5395
|
const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _93 => _93.docs, 'optionalAccess', _94 => _94.enabled]) && _chunkE552H232cjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? await _chunkHNAISJFDcjs._runWithFarmCspNonce.call(void 0,
|
|
5386
5396
|
farmDocsCspNonceMarker,
|
|
5387
|
-
async () => _optionalChain([config, 'access', _95 => _95.docs, 'access', _96 => _96.adapter, 'optionalAccess', _97 => _97.server]) ? await
|
|
5397
|
+
async () => _optionalChain([config, 'access', _95 => _95.docs, 'access', _96 => _96.adapter, 'optionalAccess', _97 => _97.server]) ? await _chunkZVIEFTUAcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
|
|
5388
5398
|
root,
|
|
5389
5399
|
srcDir: config.srcDir,
|
|
5390
5400
|
clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
|
|
@@ -5547,7 +5557,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5547
5557
|
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _103 => _103.env, 'optionalAccess', _104 => _104.public]) || {})
|
|
5548
5558
|
},
|
|
5549
5559
|
plugins: [
|
|
5550
|
-
|
|
5560
|
+
_chunkGGNJAGGEcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
5551
5561
|
...tailwindVitePlugin ? [tailwindVitePlugin] : [],
|
|
5552
5562
|
...rendererVitePlugins,
|
|
5553
5563
|
...config.vite.plugins || [],
|
|
@@ -5608,7 +5618,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5608
5618
|
resolve: {
|
|
5609
5619
|
alias: [
|
|
5610
5620
|
...shouldAliasReactServerToWebBuild(config.renderer, preset) ? [createFarmReactWebServerAlias(hasReactDomEdgeServerBuild(root))] : [],
|
|
5611
|
-
...Object.entries(
|
|
5621
|
+
...Object.entries(_chunkGGNJAGGEcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
|
|
5612
5622
|
([find, replacement]) => ({ find, replacement })
|
|
5613
5623
|
)
|
|
5614
5624
|
],
|
|
@@ -5616,7 +5626,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5616
5626
|
dedupe: [...config.renderer.dedupe || []]
|
|
5617
5627
|
}
|
|
5618
5628
|
};
|
|
5619
|
-
await viteBuild(
|
|
5629
|
+
await viteBuild(_chunkGGNJAGGEcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
|
|
5620
5630
|
} finally {
|
|
5621
5631
|
if (postcssConfigDir) {
|
|
5622
5632
|
try {
|
|
@@ -5658,9 +5668,9 @@ function getFarmDocsGuardedPaths(config, middlewareRoutes) {
|
|
|
5658
5668
|
config: { middleware: config.middleware, integrations: config.integrations },
|
|
5659
5669
|
middlewareRoutes
|
|
5660
5670
|
};
|
|
5661
|
-
return
|
|
5662
|
-
(docsRoot) =>
|
|
5663
|
-
).flatMap((page) => [page.href,
|
|
5671
|
+
return _chunkIWRLV46Xcjs.getFarmDocsRoots.call(void 0, config.docs).flatMap(
|
|
5672
|
+
(docsRoot) => _chunkIWRLV46Xcjs.discoverFarmDocsPages.call(void 0, _chunkIWRLV46Xcjs.resolveFarmDocsContentDir.call(void 0, docsRoot, options), docsRoot)
|
|
5673
|
+
).flatMap((page) => [page.href, _chunkIWRLV46Xcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunkO27PLNQZcjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
|
|
5664
5674
|
}
|
|
5665
5675
|
function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
|
|
5666
5676
|
const llmsTxt = _optionalChain([agent, 'optionalAccess', _107 => _107.llmsTxt]);
|
|
@@ -6040,7 +6050,7 @@ ReactDOMServer.configureApp(__farmAppSetup);`;
|
|
|
6040
6050
|
}
|
|
6041
6051
|
function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlots, errorRoutes, metadataImageRoutes, applicationMetadataRoutes, middlewareRoutes, redirectRoutes, configuredRewriteRoutes, configuredHeaderRoutes, openAPIReference, notFoundPath, instrumentationPath, config, farmDocsPrecompiledManifest, configModulePath, hasServerRuntimeIntegrations, hasRuntimeIntegrationConfig, hasConfiguredRuntimePlugins, hasServerRuntimePlugins, preset, i18nCatalogs, isolatedClientBoundaryModules, hydrationPlanCache, mobileShellLoadingRoutes = []) {
|
|
6042
6052
|
const farmIslandsMode = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _121 => _121.experimental, 'optionalAccess', _122 => _122.serverComponents])) === "islands";
|
|
6043
|
-
const farmClientBoot =
|
|
6053
|
+
const farmClientBoot = _chunkGGNJAGGEcjs.canBootFarmIslandsClient.call(void 0, config);
|
|
6044
6054
|
const farmMobileClient = shouldBuildFarmMobileClient(config);
|
|
6045
6055
|
const farmMobileShells = farmMobileClient && config.mobileShells ? config.mobileShells : null;
|
|
6046
6056
|
const hasCompressionRuntime = config.compress && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
|
|
@@ -6109,7 +6119,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6109
6119
|
);
|
|
6110
6120
|
const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunkO27PLNQZcjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
|
|
6111
6121
|
const farmDocsFontAssets = _optionalChain([config, 'access', _143 => _143.docs, 'optionalAccess', _144 => _144.enabled]) ? _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, config.root)) : [];
|
|
6112
|
-
const integrationProviders =
|
|
6122
|
+
const integrationProviders = _chunkI32V5CZLcjs.getIntegrationProviders.call(void 0, config.integrations);
|
|
6113
6123
|
const renderedIntegrationProviders = integrationProviders.filter(
|
|
6114
6124
|
(provider) => provider.component || provider.type === "clerk"
|
|
6115
6125
|
);
|
|
@@ -6118,7 +6128,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6118
6128
|
`Integration provider components are not supported by the "${config.renderer.name}" renderer.`
|
|
6119
6129
|
);
|
|
6120
6130
|
}
|
|
6121
|
-
const providerServerModules =
|
|
6131
|
+
const providerServerModules = _chunkGGNJAGGEcjs.generateFarmIntegrationProviderServerModules.call(void 0,
|
|
6122
6132
|
renderedIntegrationProviders,
|
|
6123
6133
|
config.root,
|
|
6124
6134
|
_nullishCoalesce(config.renderer.componentExtensions, () => ( []))
|
|
@@ -6138,14 +6148,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6138
6148
|
const unsupportedIntegrationProvider = renderedIntegrationProviders.find(
|
|
6139
6149
|
(provider) => provider.supportsIsolatedHydration !== true
|
|
6140
6150
|
);
|
|
6141
|
-
const isolatedHydrationMode =
|
|
6151
|
+
const isolatedHydrationMode = _chunkGGNJAGGEcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
6142
6152
|
_optionalChain([config, 'access', _147 => _147.experimental, 'optionalAccess', _148 => _148.isolatedClientHydration]),
|
|
6143
6153
|
{
|
|
6144
6154
|
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _149 => _149.experimental, 'optionalAccess', _150 => _150.serverComponents])) === "rsc",
|
|
6145
6155
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
6146
6156
|
}
|
|
6147
6157
|
);
|
|
6148
|
-
const hydrationPlanOptions =
|
|
6158
|
+
const hydrationPlanOptions = _chunkGGNJAGGEcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
6149
6159
|
config.renderer,
|
|
6150
6160
|
Boolean(unsupportedIntegrationProvider)
|
|
6151
6161
|
);
|
|
@@ -6163,11 +6173,11 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6163
6173
|
{ ...hydrationPlanOptions, serverTreeLayouts: pageHydrationPlanOptions.serverOwners }
|
|
6164
6174
|
)
|
|
6165
6175
|
}));
|
|
6166
|
-
const markdownPagePlan =
|
|
6176
|
+
const markdownPagePlan = _chunkGGNJAGGEcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
6167
6177
|
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
|
|
6168
6178
|
config.root,
|
|
6169
6179
|
isolatedHydrationMode,
|
|
6170
|
-
hydrationPlanOptions
|
|
6180
|
+
{ ...hydrationPlanOptions, packageReferences: pageHydrationPlanOptions.serverOwners }
|
|
6171
6181
|
);
|
|
6172
6182
|
const pageHydrationPlans = new Map(
|
|
6173
6183
|
pageRoutes.map((route) => [
|
|
@@ -6181,7 +6191,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6181
6191
|
)
|
|
6182
6192
|
])
|
|
6183
6193
|
);
|
|
6184
|
-
|
|
6194
|
+
_chunkGGNJAGGEcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
6185
6195
|
layoutHydrationPlans.map((layout) => ({
|
|
6186
6196
|
pattern: layout.pattern,
|
|
6187
6197
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -6248,7 +6258,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6248
6258
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(route.modulePath)};`
|
|
6249
6259
|
);
|
|
6250
6260
|
const clientMetadata = pageHydrationPlans.get(route.modulePath);
|
|
6251
|
-
const renderingDirective =
|
|
6261
|
+
const renderingDirective = _chunkX4K7TYN6cjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
|
|
6252
6262
|
pageRegistrations.push(`
|
|
6253
6263
|
{
|
|
6254
6264
|
pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
|
|
@@ -6256,8 +6266,8 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6256
6266
|
module: ${varName},
|
|
6257
6267
|
shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},${clientMetadata.shouldHydrate ? `
|
|
6258
6268
|
clientModule: ${JSON.stringify(_chunkQMNWKQL4cjs.toViteModuleId.call(void 0, route.modulePath, config.root))},` : ""}
|
|
6259
|
-
islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${
|
|
6260
|
-
const rootStrategy =
|
|
6269
|
+
islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunkGGNJAGGEcjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
|
|
6270
|
+
const rootStrategy = _chunkGGNJAGGEcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
6261
6271
|
route,
|
|
6262
6272
|
clientMetadata,
|
|
6263
6273
|
layoutHydrationPlans.map((layout) => ({ ...layout, ...layout.hydration })),
|
|
@@ -6557,7 +6567,7 @@ function resolveFarmMobileShellRender(request, route, routePathname) {
|
|
|
6557
6567
|
import { getSharedLayoutPrefixLength, handleFarmFormActionRequest, ignoreFarmHeldValues, installFarmIslandValues, parseFarmLayoutChainHeader } from "@farm.js/core/internal/production-runtime";
|
|
6558
6568
|
import { installFarmIslandsServer } from "@farm.js/core/internal/islands-server";
|
|
6559
6569
|
installFarmIslandsServer();
|
|
6560
|
-
const farmFormActionsConfig = ${JSON.stringify(
|
|
6570
|
+
const farmFormActionsConfig = ${JSON.stringify(_chunk4P5634G6cjs.resolveServerActionsConfig.call(void 0, config.serverActions))};
|
|
6561
6571
|
installFarmIslandValues();
|
|
6562
6572
|
${islandsActionKeyCode()}
|
|
6563
6573
|
${FARM_SEGMENT_NAVIGATION_SERVER_RUNTIME}` : ""}`;
|
|
@@ -6607,6 +6617,13 @@ import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
|
|
|
6607
6617
|
const mobileSession = (config.plugins || []).some(
|
|
6608
6618
|
(plugin) => _optionalChain([plugin, 'optionalAccess', _170 => _170.name]) === _chunk4BS3HSY7cjs.FARM_MOBILE_SESSION_PLUGIN
|
|
6609
6619
|
);
|
|
6620
|
+
const nativeServerFns = (config.plugins || []).some(
|
|
6621
|
+
(plugin) => _optionalChain([plugin, 'optionalAccess', _171 => _171.name]) === _chunk4EBC7EMWcjs.FARM_NATIVE_SERVER_FN_PLUGIN
|
|
6622
|
+
) ? _chunkUWI3SJAKcjs.collectFarmNativeServerFns.call(void 0, {
|
|
6623
|
+
root: config.root,
|
|
6624
|
+
srcDir: config.srcDir,
|
|
6625
|
+
entries: _chunkUWI3SJAKcjs.findFarmNativeScreenFiles.call(void 0, _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, config))
|
|
6626
|
+
}) : void 0;
|
|
6610
6627
|
const integrationImports = `
|
|
6611
6628
|
${configModulePath ? `import * as FarmUserConfigModule from ${toVirtualEntryImportSpecifier(configModulePath)};` : ""}
|
|
6612
6629
|
${layerConfigImports}
|
|
@@ -6614,8 +6631,13 @@ ${integrationRuntimeImport}
|
|
|
6614
6631
|
${nativeAuth.importSource}
|
|
6615
6632
|
${nativeMCP.importSource}
|
|
6616
6633
|
${mobileSession ? `import { createFarmMobileSessionPlugin as __farmCreateMobileSessionPlugin } from "@farm.js/core/internal/production-runtime";` : ""}
|
|
6634
|
+
${nativeServerFns ? `import { createFarmNativeServerFnPlugin as __farmCreateNativeServerFnPlugin } from "@farm.js/core/internal/production-runtime";` : ""}
|
|
6635
|
+
${(_nullishCoalesce(nativeServerFns, () => ( []))).map((module, index) => `import * as __farmNativeServerFns${index} from ${toVirtualEntryImportSpecifier(module.file)};`).join("\n")}
|
|
6636
|
+
${nativeServerFns ? `const __farmNativeServerFnRegistry = Object.assign(Object.create(null), {
|
|
6637
|
+
${nativeServerFns.flatMap((module, index) => module.exports.map((entry) => ` ${JSON.stringify(entry.id)}: __farmNativeServerFns${index}[${JSON.stringify(entry.name)}],`)).join("\n")}
|
|
6638
|
+
});` : ""}
|
|
6617
6639
|
`;
|
|
6618
|
-
const imageRuntime =
|
|
6640
|
+
const imageRuntime = _chunkGGNJAGGEcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
6619
6641
|
const imageRuntimeImport = imageRuntime === "none" ? "" : `import { _withFarmImageSourceClientAddress, createCloudflareImageTransformer, createFarmImageHandler } from "@farm.js/core/image/server";`;
|
|
6620
6642
|
const imageNodeRuntimeImport = imageRuntime === "node" ? `import { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } from "@farm.js/core/image/sharp";` : "";
|
|
6621
6643
|
const apiHandlerCode = apiRoutes.length > 0 ? `
|
|
@@ -6795,7 +6817,7 @@ const farmResolvedRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs);
|
|
|
6795
6817
|
|
|
6796
6818
|
function FarmDefault404Page() {
|
|
6797
6819
|
return React.createElement(React.Fragment, null,
|
|
6798
|
-
React.createElement("style", null, ${JSON.stringify(
|
|
6820
|
+
React.createElement("style", null, ${JSON.stringify(_chunkGGNJAGGEcjs.DEFAULT_NOT_FOUND_STYLES)}),
|
|
6799
6821
|
React.createElement("main", {
|
|
6800
6822
|
className: "farm-default-not-found",
|
|
6801
6823
|
"aria-labelledby": "farm-default-not-found-title",
|
|
@@ -6899,6 +6921,7 @@ const configuredPlugins = [
|
|
|
6899
6921
|
basePath: ${JSON.stringify(config.basePath)},
|
|
6900
6922
|
integrations: () => serverRuntimeIntegrations,
|
|
6901
6923
|
}),` : ""}
|
|
6924
|
+
${nativeServerFns ? `__farmCreateNativeServerFnPlugin({ resolve: (id) => __farmNativeServerFnRegistry[id] }),` : ""}
|
|
6902
6925
|
${hasConfiguredRuntimePlugins ? `...farmRuntimeConfigs.flatMap((runtimeConfig) =>
|
|
6903
6926
|
Array.isArray(runtimeConfig.plugins) ? runtimeConfig.plugins : [],
|
|
6904
6927
|
),` : ""}
|
|
@@ -6932,14 +6955,14 @@ const farmImageHandler = ${imageRuntime === "none" ? "null" : imageRuntime === "
|
|
|
6932
6955
|
onError(error) { console.error("[Farm Image]", error); },
|
|
6933
6956
|
})`};
|
|
6934
6957
|
const farmMarkdownConfig = ${JSON.stringify(config.md)};
|
|
6935
|
-
const farmLlmsTxtConfig = ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access',
|
|
6936
|
-
${_optionalChain([config, 'access',
|
|
6958
|
+
const farmLlmsTxtConfig = ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access', _172 => _172.agent, 'optionalAccess', _173 => _173.llmsTxt]), () => ( { enabled: false, include: [], exclude: [] })))};
|
|
6959
|
+
${_optionalChain([config, 'access', _174 => _174.agent, 'optionalAccess', _175 => _175.llmsTxt, 'optionalAccess', _176 => _176.enabled]) ? "const farmLlmsFullRenderer = createFarmLlmsFullRenderer({ revalidate: farmLlmsTxtConfig.revalidate });\n" : ""}${servesAgentRobotsTxt ? `const farmAgentCrawlers = ${JSON.stringify(config.agent.crawlers)};` : ""}
|
|
6937
6960
|
const farmMdxConfig = ${JSON.stringify({
|
|
6938
6961
|
...config.mdx,
|
|
6939
|
-
components: typeof _optionalChain([config, 'access',
|
|
6962
|
+
components: typeof _optionalChain([config, 'access', _177 => _177.mdx, 'optionalAccess', _178 => _178.components]) === "string" ? config.mdx.components : void 0
|
|
6940
6963
|
})};
|
|
6941
6964
|
const configuredFarmMdxComponents = farmUserConfig?.mdx?.components;
|
|
6942
|
-
${_optionalChain([config, 'access',
|
|
6965
|
+
${_optionalChain([config, 'access', _179 => _179.agent, 'optionalAccess', _180 => _180.noindexPreviews]) ? `// agent.noindexPreviews: the runtime environment decides, falling back to the
|
|
6943
6966
|
// environment this was built in, since Netlify exposes its deploy context only
|
|
6944
6967
|
// to the build.
|
|
6945
6968
|
const farmNoindexPreview = resolveFarmPreviewDeployment(
|
|
@@ -6990,7 +7013,7 @@ export const farmProductionLifecycle = createFarmProductionLifecycle({
|
|
|
6990
7013
|
});
|
|
6991
7014
|
const farmI18nRuntime = ${config.i18n.enabled ? `createFarmI18nRuntime(farmI18nConfig, ${JSON.stringify(i18nCatalogs)})` : "null"};
|
|
6992
7015
|
${config.i18n.enabled ? "_setDefaultFarmI18nRuntime(farmI18nRuntime);" : ""}
|
|
6993
|
-
const farmDocsBundledContentDir = ${_optionalChain([config, 'access',
|
|
7016
|
+
const farmDocsBundledContentDir = ${_optionalChain([config, 'access', _181 => _181.docs, 'optionalAccess', _182 => _182.enabled]) && !hasPrecompiledDocs ? `(() => {
|
|
6994
7017
|
try {
|
|
6995
7018
|
const currentDir = farmDocsDirname(farmDocsFileURLToPath(import.meta.url));
|
|
6996
7019
|
const candidates = [
|
|
@@ -7002,7 +7025,7 @@ const farmDocsBundledContentDir = ${_optionalChain([config, 'access', _180 => _1
|
|
|
7002
7025
|
} catch {
|
|
7003
7026
|
return null;
|
|
7004
7027
|
}
|
|
7005
|
-
})()` : "null"};${_optionalChain([config, 'access',
|
|
7028
|
+
})()` : "null"};${_optionalChain([config, 'access', _183 => _183.docs, 'optionalAccess', _184 => _184.enabled]) && !hasPrecompiledDocs && _optionalChain([config, 'access', _185 => _185.docs, 'access', _186 => _186.roots, 'optionalAccess', _187 => _187.length]) ? `
|
|
7006
7029
|
const farmDocsBundledRootsDir = (() => {
|
|
7007
7030
|
try {
|
|
7008
7031
|
const currentDir = farmDocsDirname(farmDocsFileURLToPath(import.meta.url));
|
|
@@ -7053,7 +7076,7 @@ const farmDocsModulePreloadPaths = farmDocsModulePreloads
|
|
|
7053
7076
|
),
|
|
7054
7077
|
}
|
|
7055
7078
|
: undefined;
|
|
7056
|
-
const farmDocsHandler = ${_optionalChain([config, 'access',
|
|
7079
|
+
const farmDocsHandler = ${_optionalChain([config, 'access', _188 => _188.docs, 'optionalAccess', _189 => _189.enabled]) ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleDocsRequest" : adapterOwnsDocsRuntime ? `${adapterHandler.factory}(${adapterHandler.config}, {
|
|
7057
7080
|
rootDir: farmDocsRuntimeRoot,
|
|
7058
7081
|
// A production build's content cannot change, so the adapter reads its
|
|
7059
7082
|
// navigation once instead of scanning the content directory per request.
|
|
@@ -7086,7 +7109,7 @@ const farmDocsHandler = ${_optionalChain([config, 'access', _187 => _187.docs, '
|
|
|
7086
7109
|
globalStylesheetHref: ${JSON.stringify(FARM_CLIENT_CSS_HREF_PLACEHOLDER)},
|
|
7087
7110
|
isPathGuarded: isFarmDocsPathGuarded,
|
|
7088
7111
|
})` : "null"};
|
|
7089
|
-
const farmDocsAPIHandler = ${_optionalChain([config, 'access',
|
|
7112
|
+
const farmDocsAPIHandler = ${_optionalChain([config, 'access', _190 => _190.docs, 'optionalAccess', _191 => _191.enabled]) ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleAPIRequest" : adapterOwnsDocsRuntime ? "null" : `createFarmDocsAPIHandler({ rootDir: farmDocsRuntimeRoot, srcDir: ${JSON.stringify(config.srcDir)}, docs: farmDocsResolvedConfig, isPathGuarded: isFarmDocsPathGuarded })` : "null"};
|
|
7090
7113
|
|
|
7091
7114
|
// API routes bundled at build time
|
|
7092
7115
|
const apiRoutes = ${apiRoutes.length > 0 ? "mergePluginAPIRoutes(" : ""}[${apiRegistrations.join(",")}
|
|
@@ -7111,12 +7134,12 @@ function fetchFarmInnerRequest(request, context) {
|
|
|
7111
7134
|
}
|
|
7112
7135
|
const farmLocalAPIBasePath = ${JSON.stringify(_chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))};
|
|
7113
7136
|
const farmOpenAPIReference = ${JSON.stringify(openAPIReference)};
|
|
7114
|
-
${_optionalChain([config, 'access',
|
|
7115
|
-
` : ""}${_optionalChain([config, 'access',
|
|
7116
|
-
|
|
7137
|
+
${_optionalChain([config, 'access', _192 => _192.agent, 'optionalAccess', _193 => _193.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunkXX32BOMMcjs.resolveFarmApiCatalogInput.call(void 0, config))};
|
|
7138
|
+
` : ""}${_optionalChain([config, 'access', _194 => _194.agent, 'optionalAccess', _195 => _195.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
|
|
7139
|
+
_chunkXX32BOMMcjs.resolveFarmAppManifestInput.call(void 0, config, {
|
|
7117
7140
|
build: config.deploymentId,
|
|
7118
|
-
packages:
|
|
7119
|
-
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ?
|
|
7141
|
+
packages: _chunkGGNJAGGEcjs.resolveFarmAppPackages.call(void 0, config.root),
|
|
7142
|
+
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkGGNJAGGEcjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
|
|
7120
7143
|
})
|
|
7121
7144
|
)};
|
|
7122
7145
|
${servesDefaultMCP ? "farmAppManifestInput.defaultMCP = getFarmDefaultMCPServer;\n" : ""}// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -8321,7 +8344,7 @@ ${servesDefaultMCP ? `// agent.mcp: the default read-only MCP server at /mcp, as
|
|
|
8321
8344
|
// aside for a page route that answers /mcp and for any MCP server published or
|
|
8322
8345
|
// registered at runtime, such as the docs engine's.
|
|
8323
8346
|
const farmDefaultMCPServer = ${JSON.stringify(
|
|
8324
|
-
_chunkQAS7KE7Jcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root),
|
|
8347
|
+
_chunkQAS7KE7Jcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkSM25ZC4Scjs.FARM_VERSION)
|
|
8325
8348
|
)};
|
|
8326
8349
|
let farmDefaultMCPRouteFree;
|
|
8327
8350
|
function getFarmDefaultMCPServer() {
|
|
@@ -8621,7 +8644,7 @@ function hasLocalRequestRoute(request, routePathname) {
|
|
|
8621
8644
|
if (${imageRuntime === "none" ? "false" : `pathname === ${JSON.stringify(config.images.path)}`}) {
|
|
8622
8645
|
return true;
|
|
8623
8646
|
}
|
|
8624
|
-
${_optionalChain([config, 'access',
|
|
8647
|
+
${_optionalChain([config, 'access', _196 => _196.docs, 'optionalAccess', _197 => _197.enabled]) ? `const docsPath = normalizeRuntimePath(farmDocsResolvedConfig?.entry || "/docs");
|
|
8625
8648
|
if (
|
|
8626
8649
|
isFarmDocsAPIRequest(pathname) ||
|
|
8627
8650
|
docsPath === "/" ||
|
|
@@ -8647,7 +8670,7 @@ function getFarmPluginRequestOptions(request) {
|
|
|
8647
8670
|
route: { ...route, pattern: normalizeRuntimePath(farmOpenAPIReference.route) },
|
|
8648
8671
|
};
|
|
8649
8672
|
}
|
|
8650
|
-
const isDocsAPIRequest = ${_optionalChain([config, 'access',
|
|
8673
|
+
const isDocsAPIRequest = ${_optionalChain([config, 'access', _198 => _198.docs, 'optionalAccess', _199 => _199.enabled]) ? "isFarmDocsAPIRequest(pathname)" : "false"};
|
|
8651
8674
|
const integrationMatch = ${hasServerRuntimeIntegrations ? `matchIntegrationRoute(serverRuntimeIntegrations, {
|
|
8652
8675
|
pathname,
|
|
8653
8676
|
method: request.method,
|
|
@@ -8731,7 +8754,7 @@ ${hasInfraAnalyticsRuntime ? `
|
|
|
8731
8754
|
// endpoints, Markdown mirrors, and docs pages have no app route pattern, so they are
|
|
8732
8755
|
// labeled here; route.pattern keeps meaning the matched app route for plugins.
|
|
8733
8756
|
const farmBuiltInRoutePaths = new Set(${JSON.stringify(
|
|
8734
|
-
|
|
8757
|
+
_chunkXX32BOMMcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
8735
8758
|
agent: {
|
|
8736
8759
|
...config.agent,
|
|
8737
8760
|
aiCatalog: servesAiCatalog,
|
|
@@ -8742,9 +8765,9 @@ const farmBuiltInRoutePaths = new Set(${JSON.stringify(
|
|
|
8742
8765
|
openapi: openAPIReference
|
|
8743
8766
|
})
|
|
8744
8767
|
)});
|
|
8745
|
-
${_optionalChain([config, 'access',
|
|
8768
|
+
${_optionalChain([config, 'access', _200 => _200.docs, 'optionalAccess', _201 => _201.enabled]) ? `const farmDocsRouteLabelInput = {
|
|
8746
8769
|
path: normalizeRuntimePath(farmDocsResolvedConfig?.entry || "/docs"),
|
|
8747
|
-
apiPath: ${JSON.stringify(_optionalChain([farmDocsPrecompiledManifest, 'optionalAccess',
|
|
8770
|
+
apiPath: ${JSON.stringify(_optionalChain([farmDocsPrecompiledManifest, 'optionalAccess', _202 => _202.apiPath]) || "/api/docs")},${_optionalChain([config, 'access', _203 => _203.docs, 'access', _204 => _204.roots, 'optionalAccess', _205 => _205.length]) ? "\n roots: farmDocsResolvedConfig.roots.map((farmDocsRoot) => farmDocsRoot.entry)," : ""}
|
|
8748
8771
|
};
|
|
8749
8772
|
` : ""}// The request's route payload, for a handler that learns what answered while it handles.
|
|
8750
8773
|
const farmRouteLabelSlot = Symbol("farm.route.label.slot");
|
|
@@ -8759,11 +8782,11 @@ function labelFarmRequestOptions(options) {
|
|
|
8759
8782
|
setFarmRouteLabel(options.route, mcpLabel);
|
|
8760
8783
|
return options;
|
|
8761
8784
|
}
|
|
8762
|
-
${_optionalChain([config, 'access',
|
|
8785
|
+
${_optionalChain([config, 'access', _206 => _206.docs, 'optionalAccess', _207 => _207.enabled]) ? `if (options.kind === "docs") {
|
|
8763
8786
|
setFarmRouteLabel(options.route, resolveFarmDocsRouteLabel(routePathname, farmDocsRouteLabelInput));
|
|
8764
8787
|
return options;
|
|
8765
8788
|
}` : ""}
|
|
8766
|
-
${_optionalChain([config, 'access',
|
|
8789
|
+
${_optionalChain([config, 'access', _208 => _208.md, 'optionalAccess', _209 => _209.enabled]) || hasMarkdownPages ? `const markdownLabel = resolveFarmMarkdownRouteLabel(
|
|
8767
8790
|
routePathname,
|
|
8768
8791
|
(page) => matchPageRoute(page)?.route.pattern,
|
|
8769
8792
|
);
|
|
@@ -8798,7 +8821,7 @@ function getApplicableLayouts(pathname, directory) {
|
|
|
8798
8821
|
return applicable;
|
|
8799
8822
|
}
|
|
8800
8823
|
|
|
8801
|
-
${_optionalChain([config, 'access',
|
|
8824
|
+
${_optionalChain([config, 'access', _210 => _210.docs, 'optionalAccess', _211 => _211.enabled]) ? `async function wrapFarmDocsResponseWithLayouts(request, response) {
|
|
8802
8825
|
if (request.method === "HEAD") return response;
|
|
8803
8826
|
if (response.headers.get("x-farm-docs-adapter")) return response;
|
|
8804
8827
|
|
|
@@ -8906,7 +8929,7 @@ ${_optionalChain([config, 'access', _209 => _209.docs, 'optionalAccess', _210 =>
|
|
|
8906
8929
|
|
|
8907
8930
|
// Shells keep their own LRU so query-string variants never evict app cache entries.
|
|
8908
8931
|
const pprShellCache = getFarmDataCache().pprShellCache;
|
|
8909
|
-
const experimentalPPREnabled = ${JSON.stringify(_optionalChain([config, 'access',
|
|
8932
|
+
const experimentalPPREnabled = ${JSON.stringify(_optionalChain([config, 'access', _212 => _212.experimental, 'optionalAccess', _213 => _213.ppr]) === true)};
|
|
8910
8933
|
|
|
8911
8934
|
function resolveRouteRenderingView(route) {
|
|
8912
8935
|
// The same merge development uses: baked directive config under the
|
|
@@ -9038,7 +9061,7 @@ async function handleFarmRequest(request, adapterContext) {
|
|
|
9038
9061
|
},
|
|
9039
9062
|
{ redirect: !isFarmLocalAPIPathname(requestUrl.pathname) }
|
|
9040
9063
|
)` : "handleFarmRequestInContext(request, null, false, Date.now(), adapterContext, requestUrl)"};
|
|
9041
|
-
${_optionalChain([config, 'access',
|
|
9064
|
+
${_optionalChain([config, 'access', _214 => _214.md, 'optionalAccess', _215 => _215.enabled]) ? `const pathname = getFarmRoutePathname(requestUrl.pathname);
|
|
9042
9065
|
if (matchPageRoute(pathname)) {
|
|
9043
9066
|
// The Link header advertises the public .md URL, like the head alternate.
|
|
9044
9067
|
return applyMarkdownNegotiationHeaders(response, {
|
|
@@ -9248,7 +9271,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9248
9271
|
}
|
|
9249
9272
|
` : ""}
|
|
9250
9273
|
|
|
9251
|
-
${_optionalChain([config, 'access',
|
|
9274
|
+
${_optionalChain([config, 'access', _216 => _216.docs, 'optionalAccess', _217 => _217.enabled]) ? `
|
|
9252
9275
|
// Docs responses are served after app middleware so route guards and
|
|
9253
9276
|
// middleware headers apply to the docs engine like any other page content.
|
|
9254
9277
|
// An app's own llms.txt, llms-full.txt, sitemap.xml, and robots.txt take
|
|
@@ -9334,7 +9357,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9334
9357
|
}
|
|
9335
9358
|
` : ""}
|
|
9336
9359
|
|
|
9337
|
-
${_optionalChain([config, 'access',
|
|
9360
|
+
${_optionalChain([config, 'access', _218 => _218.md, 'optionalAccess', _219 => _219.enabled]) ? `
|
|
9338
9361
|
if (farmMarkdownConfig?.enabled) {
|
|
9339
9362
|
const markdownResponse = await createMarkdownMirrorResponse({
|
|
9340
9363
|
// The mirror helper only reads metadata and creates its own GET request.
|
|
@@ -9433,11 +9456,11 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9433
9456
|
return applyProductionMiddlewareHeaders(applicationMetadataResponse, middlewareHeaders);
|
|
9434
9457
|
}
|
|
9435
9458
|
` : ""}
|
|
9436
|
-
${_optionalChain([config, 'access',
|
|
9459
|
+
${_optionalChain([config, 'access', _220 => _220.agent, 'optionalAccess', _221 => _221.manifest]) !== false ? `
|
|
9437
9460
|
// agent.manifest: /.well-known/farmjs.json (and 0.1.34's /.well-known/farmjs), the app's
|
|
9438
9461
|
// public manifest, the same document for every request.
|
|
9439
9462
|
if (
|
|
9440
|
-
[${JSON.stringify(
|
|
9463
|
+
[${JSON.stringify(_chunkXX32BOMMcjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunkXX32BOMMcjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
|
|
9441
9464
|
normalizeRuntimePath(routePathname),
|
|
9442
9465
|
)
|
|
9443
9466
|
) {
|
|
@@ -9447,9 +9470,9 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9447
9470
|
);
|
|
9448
9471
|
}
|
|
9449
9472
|
` : ""}
|
|
9450
|
-
${_optionalChain([config, 'access',
|
|
9473
|
+
${_optionalChain([config, 'access', _222 => _222.agent, 'optionalAccess', _223 => _223.apiCatalog]) ? `
|
|
9451
9474
|
// agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
|
|
9452
|
-
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
9475
|
+
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkXX32BOMMcjs.FARM_API_CATALOG_PATH)}) {
|
|
9453
9476
|
return applyProductionMiddlewareHeaders(
|
|
9454
9477
|
createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
|
|
9455
9478
|
middlewareHeaders,
|
|
@@ -9474,11 +9497,11 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9474
9497
|
);
|
|
9475
9498
|
}
|
|
9476
9499
|
` : ""}
|
|
9477
|
-
${_optionalChain([config, 'access',
|
|
9500
|
+
${_optionalChain([config, 'access', _224 => _224.agent, 'optionalAccess', _225 => _225.llmsTxt, 'optionalAccess', _226 => _226.enabled]) ? `
|
|
9478
9501
|
// agent.llmsTxt with no llms.ts or llms-full.ts: serve the generated files.
|
|
9479
9502
|
const farmGeneratedLlmsKind = normalizeRuntimePath(routePathname) === "/llms.txt"
|
|
9480
9503
|
? "llms"
|
|
9481
|
-
: ${_optionalChain([config, 'access',
|
|
9504
|
+
: ${_optionalChain([config, 'access', _227 => _227.agent, 'optionalAccess', _228 => _228.llmsTxt, 'optionalAccess', _229 => _229.full]) ? `normalizeRuntimePath(routePathname) === "/llms-full.txt" ? "llms-full" : ` : ""}null;
|
|
9482
9505
|
if (farmGeneratedLlmsKind) {
|
|
9483
9506
|
const llmsContext = createFarmLlmsTxtContext(request, farmGeneratedLlmsKind === "llms-full");
|
|
9484
9507
|
const llmsOrigin = new URL(request.url).origin;
|
|
@@ -9513,7 +9536,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9513
9536
|
}
|
|
9514
9537
|
` : ""}
|
|
9515
9538
|
|
|
9516
|
-
${_optionalChain([config, 'access',
|
|
9539
|
+
${_optionalChain([config, 'access', _230 => _230.docs, 'optionalAccess', _231 => _231.enabled]) ? `if (farmDocsAPIHandler && isFarmDocsAPIRequest(pathname)) {
|
|
9517
9540
|
const docsAPIResponse = await farmDocsAPIHandler(cloneFarmRequestWithContext(request));
|
|
9518
9541
|
if (docsAPIResponse) {
|
|
9519
9542
|
return applyProductionMiddlewareHeaders(
|
|
@@ -10072,7 +10095,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
10072
10095
|
);
|
|
10073
10096
|
}
|
|
10074
10097
|
}
|
|
10075
|
-
${_optionalChain([config, 'access',
|
|
10098
|
+
${_optionalChain([config, 'access', _232 => _232.md, 'optionalAccess', _233 => _233.enabled]) ? `
|
|
10076
10099
|
// Advertise the Markdown mirror in the head as well as the Link header,
|
|
10077
10100
|
// using the public path the .md request will be resolved against.
|
|
10078
10101
|
mergedMetadata = addMetadataMarkdownAlternate(
|
|
@@ -10091,7 +10114,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
10091
10114
|
emitFarmEvent({ type: "cache.bypass", route: pathname, reason: "request-read" });
|
|
10092
10115
|
}
|
|
10093
10116
|
|
|
10094
|
-
const renderedMetadata = renderMetadataHead(mergedMetadata, { pathname, jsonLd: ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access',
|
|
10117
|
+
const renderedMetadata = renderMetadataHead(mergedMetadata, { pathname, jsonLd: ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access', _234 => _234.agent, 'optionalAccess', _235 => _235.jsonLd]), () => ( false)))} });
|
|
10095
10118
|
const title = renderedMetadata.title;
|
|
10096
10119
|
const metaTags = renderedMetadata.tags;
|
|
10097
10120
|
const hasFavicon = renderedMetadata.hasFavicon;
|
|
@@ -10801,11 +10824,11 @@ ${generatePreloadResponseRuntimeSource()}
|
|
|
10801
10824
|
export async function fetch(request, context) {${imageRuntime === "none" ? "" : `
|
|
10802
10825
|
// The image optimizer's fetch of a local source is not a loopback visitor.
|
|
10803
10826
|
context = _withFarmImageSourceClientAddress(request, context);`}
|
|
10804
|
-
${_optionalChain([config, 'access',
|
|
10827
|
+
${_optionalChain([config, 'access', _236 => _236.agent, 'optionalAccess', _237 => _237.noindexPreviews]) ? "const response = await" : "return"} _runWithAPIRequestRuntime({
|
|
10805
10828
|
basePath: farmLocalAPIBasePath,
|
|
10806
10829
|
dispatch: async (localRequest) =>
|
|
10807
10830
|
(await handleAPIRequest(localRequest)) ?? Response.json({ error: "Not Found" }, { status: 404 }),
|
|
10808
|
-
}, () => handleFarmFetch(request, context));${_optionalChain([config, 'access',
|
|
10831
|
+
}, () => handleFarmFetch(request, context));${_optionalChain([config, 'access', _238 => _238.agent, 'optionalAccess', _239 => _239.noindexPreviews]) ? `
|
|
10809
10832
|
// Keep every response of a preview deployment out of search indexes.
|
|
10810
10833
|
return farmNoindexPreview ? applyFarmPreviewRobotsTag(response) : response;` : ""}
|
|
10811
10834
|
}
|
|
@@ -10999,11 +11022,11 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
10999
11022
|
}
|
|
11000
11023
|
if (_chunkO27PLNQZcjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
|
|
11001
11024
|
if (_chunkO27PLNQZcjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
|
|
11002
|
-
if (
|
|
11025
|
+
if (_chunk545WJ5UGcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
|
|
11003
11026
|
if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
|
|
11004
11027
|
const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
|
|
11005
|
-
if (_optionalChain([manifestEntry, 'optionalAccess',
|
|
11006
|
-
if (manifestEntry && (manifestEntry.runtime !== "auto" || Boolean(_optionalChain([manifestEntry, 'access',
|
|
11028
|
+
if (_optionalChain([manifestEntry, 'optionalAccess', _240 => _240.rendering]) === "dynamic") return "dynamic runtime manifest";
|
|
11029
|
+
if (manifestEntry && (manifestEntry.runtime !== "auto" || Boolean(_optionalChain([manifestEntry, 'access', _241 => _241.regions, 'optionalAccess', _242 => _242.length])) || manifestEntry.maxDuration !== void 0)) {
|
|
11007
11030
|
return "route runtime controls";
|
|
11008
11031
|
}
|
|
11009
11032
|
const routeRule = getEffectiveRouteRule(config, pathname);
|
|
@@ -11016,8 +11039,8 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
11016
11039
|
return void 0;
|
|
11017
11040
|
}
|
|
11018
11041
|
async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
11019
|
-
if (!_optionalChain([config, 'access',
|
|
11020
|
-
if (!_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) || !
|
|
11042
|
+
if (!_optionalChain([config, 'access', _243 => _243.docs, 'optionalAccess', _244 => _244.enabled]) || !config.docs.prerender) return [];
|
|
11043
|
+
if (!_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) || !_chunkZVIEFTUAcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
11021
11044
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
11022
11045
|
"docs.prerender needs a docs adapter such as @farming-labs/farmjs; Farm's built-in docs renderer keeps rendering docs pages on request."
|
|
11023
11046
|
);
|
|
@@ -11029,7 +11052,7 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
|
11029
11052
|
);
|
|
11030
11053
|
return [];
|
|
11031
11054
|
}
|
|
11032
|
-
const pages = await
|
|
11055
|
+
const pages = await _chunkZVIEFTUAcjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
|
|
11033
11056
|
if (!pages) {
|
|
11034
11057
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
11035
11058
|
`The docs adapter ${JSON.stringify(config.docs.adapter.id)} does not list its pages for prerendering; upgrade it to prerender docs pages. They render on request until then.`
|
|
@@ -11040,9 +11063,9 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
|
11040
11063
|
}
|
|
11041
11064
|
function hasFarmNitroCacheRouteRule(routeRules) {
|
|
11042
11065
|
return Object.values(routeRules || {}).some((rule) => {
|
|
11043
|
-
const swr = _optionalChain([rule, 'optionalAccess',
|
|
11044
|
-
const cache = _optionalChain([rule, 'optionalAccess',
|
|
11045
|
-
const headers = _optionalChain([rule, 'optionalAccess',
|
|
11066
|
+
const swr = _optionalChain([rule, 'optionalAccess', _245 => _245.swr]);
|
|
11067
|
+
const cache = _optionalChain([rule, 'optionalAccess', _246 => _246.cache]);
|
|
11068
|
+
const headers = _optionalChain([rule, 'optionalAccess', _247 => _247.headers]);
|
|
11046
11069
|
return swr !== void 0 && swr !== false || cache !== void 0 && cache !== false || !!headers && typeof headers === "object" && Object.keys(headers).length > 0;
|
|
11047
11070
|
});
|
|
11048
11071
|
}
|
|
@@ -11055,10 +11078,10 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
11055
11078
|
const nitroBuilder = nitroBuilderResult.value;
|
|
11056
11079
|
const isVercel = preset === "vercel" || preset === "vercel-edge";
|
|
11057
11080
|
const isCloudflareWorker = preset === "cloudflare-module";
|
|
11058
|
-
const outputDir =
|
|
11081
|
+
const outputDir = _chunk545WJ5UGcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
11059
11082
|
const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
|
|
11060
11083
|
const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
|
|
11061
|
-
const imageRuntime =
|
|
11084
|
+
const imageRuntime = _chunkGGNJAGGEcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
11062
11085
|
const hasGeneratedMetadataImages = Array.from(routeManager.getMetadataImages().values()).some(
|
|
11063
11086
|
(image) => image.sourceType === "module"
|
|
11064
11087
|
);
|
|
@@ -11080,8 +11103,8 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
11080
11103
|
const middlewareRoutesPromise = discoverMiddlewareRoutes(_chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, config));
|
|
11081
11104
|
const configuredResponseRoutesPromise = Promise.all([config.redirects(), config.rewrites()]);
|
|
11082
11105
|
const docsPrerenderPagesPromise = getFarmDocsPrerenderPages(config, root, preset);
|
|
11083
|
-
const farmWorkflows = await
|
|
11084
|
-
const farmCron = await
|
|
11106
|
+
const farmWorkflows = await _chunk3CCAICF7cjs.prepareFarmWorkflowsForNitro.call(void 0, config);
|
|
11107
|
+
const farmCron = await _chunkBT4SEFLCcjs.prepareFarmCronForNitro.call(void 0, config);
|
|
11085
11108
|
const [
|
|
11086
11109
|
{ ssg: ssgPages },
|
|
11087
11110
|
middlewareRoutes,
|
|
@@ -11149,16 +11172,20 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
11149
11172
|
if (farmWorkflows.workflows.length > 0) {
|
|
11150
11173
|
_chunkQMNWKQL4cjs.logger.info(`\u23F1\uFE0F Found ${farmWorkflows.workflows.length} Farm workflow task(s)`);
|
|
11151
11174
|
}
|
|
11152
|
-
if (farmCron.jobs.length > 0) {
|
|
11175
|
+
if (farmCron.jobs.length > 0 && farmCron.provider === "farmjs") {
|
|
11176
|
+
_chunkQMNWKQL4cjs.logger.info(
|
|
11177
|
+
`\u23F1\uFE0F ${farmCron.jobs.length} Farm cron job(s) for Infra; run farm cron sync after deployment`
|
|
11178
|
+
);
|
|
11179
|
+
} else if (farmCron.jobs.length > 0) {
|
|
11153
11180
|
_chunkQMNWKQL4cjs.logger.info(`\u23F1\uFE0F Configured ${farmCron.jobs.length} Farm cron route(s)`);
|
|
11154
11181
|
}
|
|
11155
|
-
if (preset === "cloudflare-pages" && farmCron.jobs.length > 0) {
|
|
11182
|
+
if (preset === "cloudflare-pages" && farmCron.jobs.length > 0 && farmCron.provider === "host") {
|
|
11156
11183
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
11157
11184
|
"Cloudflare Pages does not install Cron Triggers. Use the cloudflare-module preset or an external scheduler with .farm/cron-manifest.json."
|
|
11158
11185
|
);
|
|
11159
11186
|
}
|
|
11160
|
-
const scheduledTasks =
|
|
11161
|
-
const cloudflareCronConfig =
|
|
11187
|
+
const scheduledTasks = _chunkBT4SEFLCcjs.mergeScheduledTasks.call(void 0, farmWorkflows.scheduledTasks, farmCron.scheduledTasks);
|
|
11188
|
+
const cloudflareCronConfig = farmCron.provider === "host" ? _chunkBT4SEFLCcjs.createFarmCronCloudflareConfig.call(void 0, farmCron.jobs) : void 0;
|
|
11162
11189
|
const [clientCssHref, clientJsSrc, clientBootSrc, docsModulePreloads, clientModulePreloads] = await Promise.all([
|
|
11163
11190
|
resolveHashedClientCssHref(clientOutputDir),
|
|
11164
11191
|
resolveHashedClientJsSrc(clientOutputDir),
|
|
@@ -11175,7 +11202,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
11175
11202
|
clientOutputDir,
|
|
11176
11203
|
webEntry: clientJsSrc,
|
|
11177
11204
|
stylesheet: clientCssHref,
|
|
11178
|
-
webFiles: _nullishCoalesce(_optionalChain([clientModulePreloads, 'optionalAccess',
|
|
11205
|
+
webFiles: _nullishCoalesce(_optionalChain([clientModulePreloads, 'optionalAccess', _248 => _248.files]), () => ( []))
|
|
11179
11206
|
})
|
|
11180
11207
|
) : null;
|
|
11181
11208
|
for (const output of Object.values(ssrBundle)) {
|
|
@@ -11422,19 +11449,19 @@ function toFarmNodeResponse(request, response) {
|
|
|
11422
11449
|
);
|
|
11423
11450
|
}
|
|
11424
11451
|
await fs4.writeFile(
|
|
11425
|
-
_path2.default.join(ssrOutputDir,
|
|
11426
|
-
|
|
11452
|
+
_path2.default.join(ssrOutputDir, _chunk4IHMHFQBcjs.FARM_DESKTOP_ENV_MODULE_FILE),
|
|
11453
|
+
_chunk4IHMHFQBcjs.FARM_DESKTOP_ENV_MODULE_SOURCE
|
|
11427
11454
|
);
|
|
11428
11455
|
}
|
|
11429
11456
|
const farmNodeServerEntryPath = preset === "node-server" ? _path2.default.join(ssrOutputDir, "farm-node-server-entry.mjs") : null;
|
|
11430
11457
|
if (farmNodeServerEntryPath && nodeAdapterModule) {
|
|
11431
11458
|
await fs4.writeFile(
|
|
11432
|
-
_path2.default.join(ssrOutputDir,
|
|
11433
|
-
|
|
11459
|
+
_path2.default.join(ssrOutputDir, _chunk4IHMHFQBcjs.FARM_NODE_ENV_MODULE_FILE),
|
|
11460
|
+
_chunk4IHMHFQBcjs.FARM_NODE_ENV_MODULE_SOURCE
|
|
11434
11461
|
);
|
|
11435
11462
|
await fs4.writeFile(
|
|
11436
11463
|
farmNodeServerEntryPath,
|
|
11437
|
-
|
|
11464
|
+
_chunk4IHMHFQBcjs.createFarmNodeServerEntry.call(void 0, {
|
|
11438
11465
|
nitroEntryFile: _path2.default.basename(nitroEntryPath),
|
|
11439
11466
|
nodeAdapterModule,
|
|
11440
11467
|
server: config.server,
|
|
@@ -11447,7 +11474,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
11447
11474
|
if (farmBunServerEntryPath) {
|
|
11448
11475
|
await fs4.writeFile(
|
|
11449
11476
|
farmBunServerEntryPath,
|
|
11450
|
-
|
|
11477
|
+
_chunk4IHMHFQBcjs.createFarmBunServerEntry.call(void 0, {
|
|
11451
11478
|
nitroEntryFile: _path2.default.basename(nitroEntryPath),
|
|
11452
11479
|
bunAdapterModule: resolveNitroRuntimeDependency(root, "srvx/bun"),
|
|
11453
11480
|
server: config.server,
|
|
@@ -11533,7 +11560,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
11533
11560
|
}
|
|
11534
11561
|
} : {},
|
|
11535
11562
|
experimental: {
|
|
11536
|
-
tasks: farmWorkflows.workflows.length > 0 || farmCron.
|
|
11563
|
+
tasks: farmWorkflows.workflows.length > 0 || Object.keys(farmCron.tasks).length > 0
|
|
11537
11564
|
},
|
|
11538
11565
|
tasks: {
|
|
11539
11566
|
...farmWorkflows.tasks,
|
|
@@ -11602,20 +11629,20 @@ function toFarmNodeResponse(request, response) {
|
|
|
11602
11629
|
snapshotSSRRebundleOptions(nitroConfig)
|
|
11603
11630
|
);
|
|
11604
11631
|
const requestedBuilder = _nullishCoalesce(nitroConfig.builder, () => ( process.env.NITRO_BUILDER));
|
|
11605
|
-
const canReusePrebuiltSSR = isPrebuiltSSRCandidate && nitroConfig.preset === "node-server" && (requestedBuilder === void 0 || requestedBuilder === "rollup" || requestedBuilder === "rolldown") && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig && !hasUnsupportedSSRRebundleOverrides && _optionalChain([nitroConfig, 'access',
|
|
11606
|
-
_optionalChain([nitroConfig, 'access',
|
|
11607
|
-
(handler) => _path2.default.resolve(_optionalChain([handler, 'optionalAccess',
|
|
11632
|
+
const canReusePrebuiltSSR = isPrebuiltSSRCandidate && nitroConfig.preset === "node-server" && (requestedBuilder === void 0 || requestedBuilder === "rollup" || requestedBuilder === "rolldown") && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig && !hasUnsupportedSSRRebundleOverrides && _optionalChain([nitroConfig, 'access', _249 => _249.rollupConfig, 'optionalAccess', _250 => _250.external]) === nitroRollupExternal && !hasRollupPlugins(_optionalChain([nitroConfig, 'access', _251 => _251.rollupConfig, 'optionalAccess', _252 => _252.plugins])) && customRollupKeys.length === 0 && _path2.default.resolve(_optionalChain([nitroConfig, 'access', _253 => _253.output, 'optionalAccess', _254 => _254.serverDir]) || "") === _path2.default.resolve(expectedServerDir) && Boolean(
|
|
11633
|
+
_optionalChain([nitroConfig, 'access', _255 => _255.handlers, 'optionalAccess', _256 => _256.some, 'call', _257 => _257(
|
|
11634
|
+
(handler) => _path2.default.resolve(_optionalChain([handler, 'optionalAccess', _258 => _258.handler]) || "") === nitroEntryPath
|
|
11608
11635
|
)])
|
|
11609
11636
|
);
|
|
11610
11637
|
const selectRolldownBuilder = canReusePrebuiltSSR && requestedBuilder === void 0 && await canUseRolldownBuilder();
|
|
11611
11638
|
if (selectRolldownBuilder) nitroConfig.builder = "rolldown";
|
|
11612
11639
|
const useRolldownBuilder = canReusePrebuiltSSR && (_nullishCoalesce(nitroConfig.builder, () => ( process.env.NITRO_BUILDER))) === "rolldown";
|
|
11613
11640
|
const shouldMinify = nitroConfig.minify !== false;
|
|
11614
|
-
const keepServerNames = !(_optionalChain([config, 'access',
|
|
11641
|
+
const keepServerNames = !(_optionalChain([config, 'access', _259 => _259.docs, 'optionalAccess', _260 => _260.enabled]) && _optionalChain([config, 'access', _261 => _261.docs, 'access', _262 => _262.adapter, 'optionalAccess', _263 => _263.server]));
|
|
11615
11642
|
const useFarmServerMinifier = shouldMinify && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig;
|
|
11616
11643
|
const serverChunkMinifier = useFarmServerMinifier ? createServerChunkMinifyPlugin({ keepNames: keepServerNames, target: "esnext" }) : null;
|
|
11617
11644
|
if (canReusePrebuiltSSR) {
|
|
11618
|
-
const configuredRollupPlugins = _optionalChain([nitroConfig, 'access',
|
|
11645
|
+
const configuredRollupPlugins = _optionalChain([nitroConfig, 'access', _264 => _264.rollupConfig, 'optionalAccess', _265 => _265.plugins]);
|
|
11619
11646
|
nitroConfig.rollupConfig = {
|
|
11620
11647
|
...nitroConfig.rollupConfig,
|
|
11621
11648
|
plugins: [
|
|
@@ -11642,9 +11669,9 @@ function toFarmNodeResponse(request, response) {
|
|
|
11642
11669
|
const orderOf = (route) => _nullishCoalesce(prerenderOrder.get(route), () => ( Number.MAX_SAFE_INTEGER));
|
|
11643
11670
|
prerenderedRoutes.sort((a, b) => orderOf(a.route) - orderOf(b.route));
|
|
11644
11671
|
});
|
|
11645
|
-
if (_optionalChain([config, 'access',
|
|
11672
|
+
if (_optionalChain([config, 'access', _266 => _266.md, 'optionalAccess', _267 => _267.enabled])) {
|
|
11646
11673
|
nitroInstance.hooks.hook("prerender:generate", (route) => {
|
|
11647
|
-
if (!route.contents || !_optionalChain([route, 'access',
|
|
11674
|
+
if (!route.contents || !_optionalChain([route, 'access', _268 => _268.contentType, 'optionalAccess', _269 => _269.toLowerCase, 'call', _270 => _270(), 'access', _271 => _271.includes, 'call', _272 => _272("html")])) return;
|
|
11648
11675
|
const alternatePath = _chunkLT4VAF5Zcjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route);
|
|
11649
11676
|
if (!alternatePath) return;
|
|
11650
11677
|
const routeRule = nitroInstance.options.routeRules[route.route] || {};
|
|
@@ -11665,7 +11692,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
11665
11692
|
}
|
|
11666
11693
|
if (config.security.csp && config.security.csp.nonce) {
|
|
11667
11694
|
nitroInstance.hooks.hook("prerender:generate", async (route) => {
|
|
11668
|
-
if (!route.contents || !_optionalChain([route, 'access',
|
|
11695
|
+
if (!route.contents || !_optionalChain([route, 'access', _273 => _273.contentType, 'optionalAccess', _274 => _274.toLowerCase, 'call', _275 => _275(), 'access', _276 => _276.includes, 'call', _277 => _277("html")])) return;
|
|
11669
11696
|
const staticCsp = await _chunk6JHZPB52cjs.applyFarmCspHashesToHtml.call(void 0, route.contents, config.security);
|
|
11670
11697
|
if (!staticCsp) return;
|
|
11671
11698
|
route.contents = staticCsp.html;
|
|
@@ -11740,13 +11767,13 @@ function toFarmNodeResponse(request, response) {
|
|
|
11740
11767
|
}
|
|
11741
11768
|
if (prerenderRoutes.length > 0) {
|
|
11742
11769
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
|
|
11743
|
-
const previousPrerender = process.env[
|
|
11744
|
-
process.env[
|
|
11770
|
+
const previousPrerender = process.env[_chunkWKJQ2FJAcjs.FARM_PRERENDER_ENV];
|
|
11771
|
+
process.env[_chunkWKJQ2FJAcjs.FARM_PRERENDER_ENV] = "1";
|
|
11745
11772
|
try {
|
|
11746
11773
|
await nitroBuilder.prerender(nitroInstance);
|
|
11747
11774
|
} finally {
|
|
11748
|
-
if (previousPrerender === void 0) delete process.env[
|
|
11749
|
-
else process.env[
|
|
11775
|
+
if (previousPrerender === void 0) delete process.env[_chunkWKJQ2FJAcjs.FARM_PRERENDER_ENV];
|
|
11776
|
+
else process.env[_chunkWKJQ2FJAcjs.FARM_PRERENDER_ENV] = previousPrerender;
|
|
11750
11777
|
}
|
|
11751
11778
|
}
|
|
11752
11779
|
const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs4, preset) : Promise.resolve(null);
|
|
@@ -11803,6 +11830,9 @@ function toFarmNodeResponse(request, response) {
|
|
|
11803
11830
|
if (useRolldownBuilder) {
|
|
11804
11831
|
_chunkQMNWKQL4cjs.logger.info("\u26A1 Built the Node adapter with Rolldown");
|
|
11805
11832
|
}
|
|
11833
|
+
if (preset === "node-server" && !desktopServerEntry) {
|
|
11834
|
+
await installFarmCompileCacheLauncher(_path2.default.join(outputDir, "server"), fs4);
|
|
11835
|
+
}
|
|
11806
11836
|
if (pluginManager) {
|
|
11807
11837
|
await pluginManager.runHookParallel("afterNitroBuild", {
|
|
11808
11838
|
root,
|
|
@@ -11812,7 +11842,15 @@ function toFarmNodeResponse(request, response) {
|
|
|
11812
11842
|
});
|
|
11813
11843
|
}
|
|
11814
11844
|
if (isVercel) {
|
|
11815
|
-
await postProcessVercelOutput(
|
|
11845
|
+
await postProcessVercelOutput(
|
|
11846
|
+
root,
|
|
11847
|
+
outputDir,
|
|
11848
|
+
fs4,
|
|
11849
|
+
config,
|
|
11850
|
+
farmWorkflows,
|
|
11851
|
+
routeRuntimeManifest,
|
|
11852
|
+
farmCron.provider === "host" ? farmCron.jobs : []
|
|
11853
|
+
);
|
|
11816
11854
|
}
|
|
11817
11855
|
_chunkQMNWKQL4cjs.logger.success(`\u2705 Nitro build completed with preset: ${preset}`);
|
|
11818
11856
|
}
|
|
@@ -11850,6 +11888,20 @@ async function writeSSRBundleFiles(files, targetDir, fs4) {
|
|
|
11850
11888
|
async function copyPrebuiltSSRBundle(ssrBundle, targetDir, minifyOptions, fs4) {
|
|
11851
11889
|
await writeSSRBundleFiles(await prepareSSRBundleFiles(ssrBundle, minifyOptions), targetDir, fs4);
|
|
11852
11890
|
}
|
|
11891
|
+
async function installFarmCompileCacheLauncher(serverDir, fs4) {
|
|
11892
|
+
const entryPath = _path2.default.join(serverDir, "index.mjs");
|
|
11893
|
+
const serverPath = _path2.default.join(serverDir, _chunk4IHMHFQBcjs.FARM_SERVER_MODULE_FILE);
|
|
11894
|
+
const entry = await fs4.readFile(entryPath, "utf8").catch((error) => {
|
|
11895
|
+
if (error.code === "ENOENT") return null;
|
|
11896
|
+
throw error;
|
|
11897
|
+
});
|
|
11898
|
+
if (entry === null) return false;
|
|
11899
|
+
if (entry.includes(`./${_chunk4IHMHFQBcjs.FARM_SERVER_MODULE_FILE}`)) return false;
|
|
11900
|
+
await fs4.rename(entryPath, serverPath);
|
|
11901
|
+
await fs4.writeFile(entryPath, _chunk4IHMHFQBcjs.createFarmCompileCacheLauncher.call(void 0, _chunk4IHMHFQBcjs.FARM_SERVER_MODULE_FILE));
|
|
11902
|
+
await fs4.rm(_path2.default.join(serverDir, _chunk4IHMHFQBcjs.FARM_COMPILE_CACHE_DIR), { recursive: true, force: true });
|
|
11903
|
+
return true;
|
|
11904
|
+
}
|
|
11853
11905
|
async function registerPrebuiltSSRPackageImport(serverDir, ssrEntryFile, fs4) {
|
|
11854
11906
|
const packagePath = _path2.default.join(serverDir, "package.json");
|
|
11855
11907
|
const packageJSON = await fs4.readFile(packagePath, "utf8").then((contents) => JSON.parse(contents)).catch((error) => {
|
|
@@ -11871,7 +11923,7 @@ async function moveVercelOutputPath(src, dest, fs4) {
|
|
|
11871
11923
|
await fs4.rename(src, dest);
|
|
11872
11924
|
return;
|
|
11873
11925
|
} catch (error) {
|
|
11874
|
-
const code = _optionalChain([error, 'optionalAccess',
|
|
11926
|
+
const code = _optionalChain([error, 'optionalAccess', _278 => _278.code]);
|
|
11875
11927
|
if (code !== "EPERM" && code !== "EACCES" && code !== "EXDEV" && code !== "ENOTEMPTY") {
|
|
11876
11928
|
throw error;
|
|
11877
11929
|
}
|
|
@@ -11879,7 +11931,7 @@ async function moveVercelOutputPath(src, dest, fs4) {
|
|
|
11879
11931
|
await fs4.cp(src, dest, { recursive: true, force: true });
|
|
11880
11932
|
await fs4.rm(src, { recursive: true, force: true });
|
|
11881
11933
|
}
|
|
11882
|
-
async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflows, routeRuntimeManifest) {
|
|
11934
|
+
async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflows, routeRuntimeManifest, cronJobs) {
|
|
11883
11935
|
const serverDir = _path2.default.join(outputDir, "server");
|
|
11884
11936
|
const functionsDir = _path2.default.join(outputDir, "functions");
|
|
11885
11937
|
const nitroFuncDir = _path2.default.join(functionsDir, "__nitro.func");
|
|
@@ -11897,7 +11949,7 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
11897
11949
|
try {
|
|
11898
11950
|
await moveVercelOutputPath(publicDir, staticDir, fs4);
|
|
11899
11951
|
} catch (error) {
|
|
11900
|
-
if (_optionalChain([error, 'optionalAccess',
|
|
11952
|
+
if (_optionalChain([error, 'optionalAccess', _279 => _279.code]) !== "ENOENT") throw error;
|
|
11901
11953
|
}
|
|
11902
11954
|
await copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4);
|
|
11903
11955
|
await copyPrismaClientForVercel(root, nitroFuncDir, fs4);
|
|
@@ -11914,20 +11966,17 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
11914
11966
|
presetRoutes: Array.isArray(vercelConfig.routes) ? vercelConfig.routes : [],
|
|
11915
11967
|
runtimeRoutes
|
|
11916
11968
|
});
|
|
11917
|
-
const vercelConfigWithWorkflowCrons =
|
|
11969
|
+
const vercelConfigWithWorkflowCrons = _chunk3CCAICF7cjs.applyFarmWorkflowVercelCrons.call(void 0,
|
|
11918
11970
|
vercelConfig,
|
|
11919
11971
|
farmWorkflows.workflows
|
|
11920
11972
|
);
|
|
11921
|
-
const vercelConfigWithCrons =
|
|
11922
|
-
vercelConfigWithWorkflowCrons,
|
|
11923
|
-
config.cron.jobs
|
|
11924
|
-
);
|
|
11973
|
+
const vercelConfigWithCrons = _chunkBT4SEFLCcjs.applyFarmCronVercelCrons.call(void 0, vercelConfigWithWorkflowCrons, cronJobs);
|
|
11925
11974
|
await fs4.writeFile(configPath, JSON.stringify(vercelConfigWithCrons, null, 2));
|
|
11926
11975
|
_chunkQMNWKQL4cjs.logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
|
|
11927
11976
|
}
|
|
11928
11977
|
async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
|
|
11929
|
-
if (!_optionalChain([config, 'access',
|
|
11930
|
-
const [mainRoot, ...extraRoots] =
|
|
11978
|
+
if (!_optionalChain([config, 'access', _280 => _280.docs, 'optionalAccess', _281 => _281.enabled])) return;
|
|
11979
|
+
const [mainRoot, ...extraRoots] = _chunkIWRLV46Xcjs.getFarmDocsRoots.call(void 0, config.docs);
|
|
11931
11980
|
await copyFarmDocsRootContent(
|
|
11932
11981
|
mainRoot,
|
|
11933
11982
|
root,
|
|
@@ -11948,7 +11997,7 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
|
|
|
11948
11997
|
async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs4) {
|
|
11949
11998
|
const docsContentDir = resolveBuildDocsContentDir(docs, root, srcDir);
|
|
11950
11999
|
if (!docsContentDir) return;
|
|
11951
|
-
const lastModifiedManifest =
|
|
12000
|
+
const lastModifiedManifest = _chunkIWRLV46Xcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
|
|
11952
12001
|
fallback: "now"
|
|
11953
12002
|
});
|
|
11954
12003
|
await fs4.rm(bundledContentDir, { recursive: true, force: true });
|
|
@@ -11958,7 +12007,7 @@ async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs
|
|
|
11958
12007
|
force: true
|
|
11959
12008
|
});
|
|
11960
12009
|
await fs4.writeFile(
|
|
11961
|
-
_path2.default.join(bundledContentDir,
|
|
12010
|
+
_path2.default.join(bundledContentDir, _chunkIWRLV46Xcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
|
|
11962
12011
|
`${JSON.stringify(lastModifiedManifest, null, 2)}
|
|
11963
12012
|
`
|
|
11964
12013
|
);
|
|
@@ -12029,7 +12078,7 @@ async function stageSharpRuntime(config, root, distDir, fs4, preset) {
|
|
|
12029
12078
|
try {
|
|
12030
12079
|
await copyPackage("sharp", sharpRequire);
|
|
12031
12080
|
if (!copiedPackages.has("sharp")) {
|
|
12032
|
-
throw new Error(`Farm image optimization requires sharp. ${
|
|
12081
|
+
throw new Error(`Farm image optimization requires sharp. ${_chunkGGNJAGGEcjs.SHARP_INSTALL_HINT}`);
|
|
12033
12082
|
}
|
|
12034
12083
|
} catch (error) {
|
|
12035
12084
|
await fs4.rm(stageDir, { recursive: true, force: true });
|
|
@@ -12249,8 +12298,8 @@ async function createFarmProjectModuleSsrEnvironment() {
|
|
|
12249
12298
|
|
|
12250
12299
|
// src/build/index.ts
|
|
12251
12300
|
async function build(config, options = {}) {
|
|
12252
|
-
return
|
|
12253
|
-
() =>
|
|
12301
|
+
return _chunk4IHMHFQBcjs.withProductionNodeEnv.call(void 0,
|
|
12302
|
+
() => _chunkGGNJAGGEcjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
|
|
12254
12303
|
);
|
|
12255
12304
|
}
|
|
12256
12305
|
function createBuildTargetBaseline(config) {
|
|
@@ -12261,7 +12310,7 @@ function createBuildTargetBaseline(config) {
|
|
|
12261
12310
|
preset,
|
|
12262
12311
|
distDir,
|
|
12263
12312
|
outputDir,
|
|
12264
|
-
outputWasDerived: outputDir ===
|
|
12313
|
+
outputWasDerived: outputDir === _chunk545WJ5UGcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
|
|
12265
12314
|
};
|
|
12266
12315
|
}
|
|
12267
12316
|
function resolveBuildTargets(config, options, baseline) {
|
|
@@ -12270,8 +12319,8 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
12270
12319
|
const distDir = config.distDir || ".farm";
|
|
12271
12320
|
const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
|
|
12272
12321
|
const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
|
|
12273
|
-
const deployTarget = preset === config.deploy.preset ? config.deploy.target :
|
|
12274
|
-
const outputDir = shouldRefreshDerivedOutput ?
|
|
12322
|
+
const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunk545WJ5UGcjs.getDeployTargetForPreset.call(void 0, preset);
|
|
12323
|
+
const outputDir = shouldRefreshDerivedOutput ? _chunk545WJ5UGcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
|
|
12275
12324
|
return {
|
|
12276
12325
|
root,
|
|
12277
12326
|
preset,
|
|
@@ -12279,7 +12328,7 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
12279
12328
|
distDir,
|
|
12280
12329
|
deployTarget,
|
|
12281
12330
|
outputDir,
|
|
12282
|
-
deployOutputDir:
|
|
12331
|
+
deployOutputDir: _chunk545WJ5UGcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
|
|
12283
12332
|
};
|
|
12284
12333
|
}
|
|
12285
12334
|
async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
@@ -12316,15 +12365,15 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12316
12365
|
};
|
|
12317
12366
|
config = {
|
|
12318
12367
|
...config,
|
|
12319
|
-
images:
|
|
12368
|
+
images: _chunkGGNJAGGEcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
|
|
12320
12369
|
root: targets.root,
|
|
12321
12370
|
preset: targets.preset
|
|
12322
12371
|
})
|
|
12323
12372
|
};
|
|
12324
|
-
if (_optionalChain([config, 'access',
|
|
12373
|
+
if (_optionalChain([config, 'access', _282 => _282.docs, 'optionalAccess', _283 => _283.enabled])) await _chunkV3UOEWCBcjs.loadFarmDocsEngine.call(void 0, );
|
|
12325
12374
|
pluginManager.updateContext({ config });
|
|
12326
12375
|
const { root, preset, srcDir, distDir, deployOutputDir } = targets;
|
|
12327
|
-
|
|
12376
|
+
_chunkGGNJAGGEcjs.usePackageClientBoundaryCacheFile.call(void 0,
|
|
12328
12377
|
_path2.default.resolve(root, distDir, "cache", "client-boundaries.json")
|
|
12329
12378
|
);
|
|
12330
12379
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
|
|
@@ -12338,8 +12387,8 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12338
12387
|
});
|
|
12339
12388
|
_chunkQMNWKQL4cjs.logger.info("\u{1F50D} Discovering routes and API endpoints...");
|
|
12340
12389
|
const productionViteResult = productionViteResultPromise ? (await productionViteResultPromise)[0] : void 0;
|
|
12341
|
-
if (_optionalChain([productionViteResult, 'optionalAccess',
|
|
12342
|
-
const productionVite = _optionalChain([productionViteResult, 'optionalAccess',
|
|
12390
|
+
if (_optionalChain([productionViteResult, 'optionalAccess', _284 => _284.status]) === "rejected") throw productionViteResult.reason;
|
|
12391
|
+
const productionVite = _optionalChain([productionViteResult, 'optionalAccess', _285 => _285.value]);
|
|
12343
12392
|
const createViteServer = productionVite ? productionVite.createServer : (await import("vite")).createServer;
|
|
12344
12393
|
projectModuleServer = await createProjectModuleServer(
|
|
12345
12394
|
createViteServer,
|
|
@@ -12347,18 +12396,18 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12347
12396
|
root,
|
|
12348
12397
|
rendererBuild.signal
|
|
12349
12398
|
);
|
|
12350
|
-
const farmApp =
|
|
12399
|
+
const farmApp = _chunkGGNJAGGEcjs.createFarmApp.call(void 0, config, projectModuleServer);
|
|
12351
12400
|
await farmApp.initialize();
|
|
12352
12401
|
const routeManager = farmApp.getRouteManager();
|
|
12353
12402
|
const serverRenderer = farmApp.getServerRenderer();
|
|
12354
|
-
const typeArtifacts =
|
|
12403
|
+
const typeArtifacts = _chunkX4K7TYN6cjs.generateFarmTypeArtifacts.call(void 0, {
|
|
12355
12404
|
root,
|
|
12356
12405
|
srcDir,
|
|
12357
12406
|
layers: config.layers,
|
|
12358
12407
|
plugins: config.plugins,
|
|
12359
12408
|
extraRoutes: [
|
|
12360
|
-
..._optionalChain([config, 'access',
|
|
12361
|
-
...
|
|
12409
|
+
..._optionalChain([config, 'access', _286 => _286.openapi, 'optionalAccess', _287 => _287.enabled]) && config.openapi.route ? [config.openapi.route] : [],
|
|
12410
|
+
..._chunkIWRLV46Xcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
|
|
12362
12411
|
],
|
|
12363
12412
|
suppressLintOnLink: config.suppressLintOnLink,
|
|
12364
12413
|
componentExtensions: config.renderer.componentExtensions,
|
|
@@ -12367,7 +12416,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12367
12416
|
const message = error instanceof Error ? error.message : String(error);
|
|
12368
12417
|
_chunkQMNWKQL4cjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
|
|
12369
12418
|
});
|
|
12370
|
-
const apiRouteManager = new (0,
|
|
12419
|
+
const apiRouteManager = new (0, _chunkSYXPWJ7Ncjs.APIRouteManager)(
|
|
12371
12420
|
_chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, config),
|
|
12372
12421
|
projectModuleServer,
|
|
12373
12422
|
{
|
|
@@ -12442,18 +12491,19 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12442
12491
|
throw error;
|
|
12443
12492
|
} finally {
|
|
12444
12493
|
try {
|
|
12445
|
-
await _optionalChain([projectModuleServer, 'optionalAccess',
|
|
12494
|
+
await _optionalChain([projectModuleServer, 'optionalAccess', _288 => _288.close, 'call', _289 => _289()]);
|
|
12446
12495
|
} finally {
|
|
12447
12496
|
rendererBuild.abort();
|
|
12448
12497
|
}
|
|
12449
12498
|
}
|
|
12450
12499
|
}
|
|
12451
12500
|
async function createProjectModuleServer(createViteServer, config, root, buildLifetime) {
|
|
12501
|
+
const { farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
|
|
12452
12502
|
const rendererVitePlugins = await _chunkRD623KW4cjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
|
|
12453
12503
|
ssr: true,
|
|
12454
12504
|
buildLifetime
|
|
12455
12505
|
});
|
|
12456
|
-
const viteConfig =
|
|
12506
|
+
const viteConfig = _chunkGGNJAGGEcjs.mergeFarmViteConfig.call(void 0,
|
|
12457
12507
|
{
|
|
12458
12508
|
root,
|
|
12459
12509
|
appType: "custom",
|
|
@@ -12465,19 +12515,22 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
12465
12515
|
},
|
|
12466
12516
|
plugins: [
|
|
12467
12517
|
...rendererVitePlugins,
|
|
12468
|
-
|
|
12518
|
+
_chunkGGNJAGGEcjs.farmFontImportsPlugin.call(void 0, {
|
|
12469
12519
|
root,
|
|
12470
12520
|
basePath: config.basePath,
|
|
12471
12521
|
publicDir: config.publicDir
|
|
12472
12522
|
}),
|
|
12473
|
-
_chunkNK2VWS7Pcjs.farmEnvironmentFunctionsPlugin.call(void 0, )
|
|
12523
|
+
_chunkNK2VWS7Pcjs.farmEnvironmentFunctionsPlugin.call(void 0, ),
|
|
12524
|
+
// Route modules load here at build time (rendering config, prerendering): `server-only`
|
|
12525
|
+
// resolves as it does in the server build.
|
|
12526
|
+
farmServerOnlyEntriesPlugin()
|
|
12474
12527
|
],
|
|
12475
12528
|
server: {
|
|
12476
12529
|
middlewareMode: true,
|
|
12477
12530
|
hmr: false
|
|
12478
12531
|
},
|
|
12479
12532
|
resolve: {
|
|
12480
|
-
alias:
|
|
12533
|
+
alias: _chunkGGNJAGGEcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
12481
12534
|
dedupe: [...config.renderer.dedupe || []]
|
|
12482
12535
|
},
|
|
12483
12536
|
optimizeDeps: {
|
|
@@ -12510,10 +12563,10 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
12510
12563
|
noDiscovery: true
|
|
12511
12564
|
},
|
|
12512
12565
|
// An app or plugin that brings its own SSR environment keeps it.
|
|
12513
|
-
environments: _optionalChain([viteConfig, 'access',
|
|
12566
|
+
environments: _optionalChain([viteConfig, 'access', _290 => _290.environments, 'optionalAccess', _291 => _291.ssr, 'optionalAccess', _292 => _292.dev, 'optionalAccess', _293 => _293.createEnvironment]) ? viteConfig.environments : {
|
|
12514
12567
|
...viteConfig.environments,
|
|
12515
12568
|
ssr: {
|
|
12516
|
-
..._optionalChain([viteConfig, 'access',
|
|
12569
|
+
..._optionalChain([viteConfig, 'access', _294 => _294.environments, 'optionalAccess', _295 => _295.ssr]),
|
|
12517
12570
|
...await createFarmProjectModuleSsrEnvironment()
|
|
12518
12571
|
}
|
|
12519
12572
|
}
|
|
@@ -12569,7 +12622,7 @@ async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
|
12569
12622
|
define: {
|
|
12570
12623
|
__FARM_API_BASE_URL__: JSON.stringify(config.api.baseURL),
|
|
12571
12624
|
__FARM_ENV__: JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, config.env)),
|
|
12572
|
-
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access',
|
|
12625
|
+
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _296 => _296.env, 'optionalAccess', _297 => _297.public]) || {})
|
|
12573
12626
|
},
|
|
12574
12627
|
plugins: [
|
|
12575
12628
|
farmI18nClientBridgePlugin(),
|
|
@@ -12589,7 +12642,7 @@ function resolveLegacyPageEntry(config, root, srcDir) {
|
|
|
12589
12642
|
}
|
|
12590
12643
|
async function buildNitro(config, routeManager, apiRouteManager, serverRenderer, preset, root, distDir, pluginManager) {
|
|
12591
12644
|
const [{ createNitroConfig }, { createNitro, build: nitroBuild }] = await Promise.all([
|
|
12592
|
-
import("./nitro-
|
|
12645
|
+
import("./nitro-VRDX2H4M.cjs"),
|
|
12593
12646
|
import("nitro/builder")
|
|
12594
12647
|
]);
|
|
12595
12648
|
let nitroConfig = await createNitroConfig(
|
|
@@ -12602,7 +12655,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
12602
12655
|
if (pluginManager) {
|
|
12603
12656
|
nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
|
|
12604
12657
|
}
|
|
12605
|
-
const outputDir =
|
|
12658
|
+
const outputDir = _chunk545WJ5UGcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
12606
12659
|
const serverOutputDir = _path2.default.join(outputDir, "server");
|
|
12607
12660
|
const publicOutputDir = _path2.default.join(outputDir, "public");
|
|
12608
12661
|
const { mkdir, cp } = await import("fs/promises");
|
|
@@ -12673,7 +12726,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
12673
12726
|
root,
|
|
12674
12727
|
preset,
|
|
12675
12728
|
distDir,
|
|
12676
|
-
outputDir:
|
|
12729
|
+
outputDir: _chunk545WJ5UGcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
|
|
12677
12730
|
});
|
|
12678
12731
|
}
|
|
12679
12732
|
}
|