@farm.js/core 0.1.50 → 0.1.51-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +163 -3
- package/dist/{agent-mcp-9BMbRgg_.d.ts → agent-mcp-BBMfNpsC.d.ts} +1 -1
- package/dist/{agent-mcp-CIMH324y.d.mts → agent-mcp-D44ip11f.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/{analyzer-DDW34OMC.mjs → analyzer-HOUCQR3K.mjs} +1 -1
- package/dist/{analyzer-CN7C74WX.cjs → analyzer-VKUDHNDF.cjs} +2 -2
- package/dist/api/route-manager.cjs +5 -5
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +4 -4
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.cjs +6 -6
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.mjs +5 -5
- package/dist/{app-BWibTHVT.d.ts → app-CourU3rQ.d.ts} +4 -4
- package/dist/{app-DVJ13FPA.d.mts → app-aeD4s_mg.d.mts} +4 -4
- package/dist/{app-manifest-CQDJOKL2.d.mts → app-manifest-BC6mFn5A.d.mts} +1 -1
- package/dist/{app-manifest-D0kaXdwu.d.ts → app-manifest-LzjoNPeq.d.ts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/base-path-BOUV5ozD.d.mts +10 -0
- package/dist/base-path-BOUV5ozD.d.ts +10 -0
- package/dist/{chunk-RWT2BTJT.cjs → chunk-2IAPKPEB.cjs} +6 -6
- package/dist/{chunk-2G63BIRL.mjs → chunk-2KVDHNQS.mjs} +8 -11
- package/dist/{chunk-76R5GJER.mjs → chunk-3HA7PP72.mjs} +2 -2
- package/dist/{chunk-NJVFPJ2Y.cjs → chunk-3OWVWZ6R.cjs} +28 -2
- package/dist/{chunk-KO2NWUKN.mjs → chunk-4GJJ65RB.mjs} +9 -1
- package/dist/{chunk-GERUXONA.cjs → chunk-5A77OEIG.cjs} +4 -1
- package/dist/{chunk-4HBKBHVP.mjs → chunk-5ENW27SL.mjs} +1 -1
- package/dist/{chunk-MTB57GOK.mjs → chunk-724WT3NI.mjs} +4 -2
- package/dist/{chunk-VCKGOXFI.cjs → chunk-76GHW3WI.cjs} +7 -1
- package/dist/{chunk-ZIBIE7AH.mjs → chunk-7UPCJDB5.mjs} +7 -1
- package/dist/{chunk-CPXDDWGL.mjs → chunk-AER5I65K.mjs} +1 -1
- package/dist/{chunk-WB6XES4V.mjs → chunk-ALEUMLJN.mjs} +34 -5
- package/dist/{chunk-WVBUXNBX.mjs → chunk-AMRK3P6W.mjs} +123 -47
- package/dist/{chunk-L6QDME5Z.cjs → chunk-B3GZAQSC.cjs} +3 -3
- package/dist/chunk-CKPTIEDX.cjs +12 -0
- package/dist/{chunk-B5S2JS6M.cjs → chunk-DWW3AMJX.cjs} +288 -255
- package/dist/{chunk-EQMTJBB7.cjs → chunk-DZZHTMWM.cjs} +35 -6
- package/dist/{chunk-3ATXWZPH.cjs → chunk-E36C43IX.cjs} +13 -16
- package/dist/{chunk-J2ZEVDEK.cjs → chunk-EHB77D5U.cjs} +3 -3
- package/dist/{chunk-WQGRD5BJ.cjs → chunk-EX6ZSN5P.cjs} +1 -16
- package/dist/{chunk-474FO3UE.cjs → chunk-F42U3R4F.cjs} +170 -163
- package/dist/{chunk-6QA2SXVH.cjs → chunk-FK25QSVC.cjs} +2 -1
- package/dist/{chunk-BW6SCVYX.mjs → chunk-FSQMN2MQ.mjs} +1 -0
- package/dist/{chunk-2H3FJYY6.mjs → chunk-FSXSQQTV.mjs} +3 -2
- package/dist/chunk-GNZIAJGB.mjs +358 -0
- package/dist/{chunk-TXK4D46O.mjs → chunk-H3ASZDT7.mjs} +21 -1
- package/dist/{chunk-B6PREBN6.cjs → chunk-HASX6DC7.cjs} +8 -8
- package/dist/{chunk-ZLOQQ2UF.mjs → chunk-I2ZA5SXS.mjs} +60 -27
- package/dist/{chunk-X2EL3BLH.cjs → chunk-IOUOGRDX.cjs} +11 -3
- package/dist/{chunk-CBJKDB6F.mjs → chunk-IRSS4HS4.mjs} +1 -1
- package/dist/{chunk-GOOK2J2W.cjs → chunk-J22JD5YJ.cjs} +2 -2
- package/dist/{chunk-2DEPNLXK.mjs → chunk-JF5CNHHF.mjs} +4 -4
- package/dist/{chunk-VOZ5DI7D.mjs → chunk-JWI5PUO2.mjs} +6 -2
- package/dist/{chunk-YAXOEAND.cjs → chunk-KHXAJ2KA.cjs} +6 -6
- package/dist/{chunk-WXHDVXJE.mjs → chunk-KY32FWK7.mjs} +2 -2
- package/dist/{chunk-EQWWOQTK.cjs → chunk-LEIXUFJN.cjs} +6 -2
- package/dist/{chunk-2GLQSIZD.mjs → chunk-LMFJCXDD.mjs} +1 -1
- package/dist/{chunk-IXSMFKZ2.cjs → chunk-LNM57D3H.cjs} +4 -4
- package/dist/{chunk-5V4KZOZO.mjs → chunk-LZ4SB57H.mjs} +2 -2
- package/dist/{chunk-E2BMCNMJ.cjs → chunk-MMEEXMUQ.cjs} +2 -2
- package/dist/chunk-N4AQNEXR.cjs +17 -0
- package/dist/{chunk-JZMZKABS.cjs → chunk-NWUHS6GV.cjs} +3 -2
- package/dist/{chunk-LYWAGXXW.cjs → chunk-O3MMJPC2.cjs} +12 -12
- package/dist/{chunk-FACTMUPI.cjs → chunk-PDJSL7PL.cjs} +30 -19
- package/dist/{chunk-XLLVWLWO.mjs → chunk-PIHKO25G.mjs} +1 -1
- package/dist/chunk-PIUTGRDI.cjs +358 -0
- package/dist/{chunk-KGP76FSV.mjs → chunk-PPDHCRTC.mjs} +1 -1
- package/dist/{chunk-C73RIAEF.mjs → chunk-QI5AQMEE.mjs} +17 -6
- package/dist/{chunk-F5LERVY3.cjs → chunk-QK3HBOTG.cjs} +10 -10
- package/dist/{chunk-Q3UU2KXC.mjs → chunk-QMDU6QHN.mjs} +4 -1
- package/dist/{chunk-JJOWY3XD.mjs → chunk-R5P4KFPM.mjs} +1 -1
- package/dist/{chunk-IWJKJDNW.mjs → chunk-S5ZA2T2W.mjs} +35 -28
- package/dist/{chunk-PXEXOQ5R.mjs → chunk-SHS6KXOZ.mjs} +1 -1
- package/dist/{chunk-ETF5C6HR.cjs → chunk-SJ23LJ3N.cjs} +3 -3
- package/dist/{chunk-KZH6YLND.cjs → chunk-SO3T6T4I.cjs} +427 -351
- package/dist/{chunk-JHXJBNLY.cjs → chunk-SUCDVKUB.cjs} +21 -1
- package/dist/{chunk-7ONZDKVY.mjs → chunk-T4EW7AAD.mjs} +2 -2
- package/dist/{chunk-UY6HS5PF.cjs → chunk-USL2ANCB.cjs} +8 -8
- package/dist/{chunk-4T25YCZ5.cjs → chunk-VIFPE5RG.cjs} +14 -14
- package/dist/{chunk-HYN3LLG7.cjs → chunk-VO6NLTV4.cjs} +3 -3
- package/dist/{chunk-XN2MB4QZ.cjs → chunk-VQJYGZNX.cjs} +4 -4
- package/dist/{chunk-5PKDHKQP.cjs → chunk-WFVSAT7Y.cjs} +6 -4
- package/dist/{chunk-X3HOVNHI.mjs → chunk-WSY2JD7O.mjs} +6 -6
- package/dist/{chunk-SHJJM6OG.mjs → chunk-WVX3BUNJ.mjs} +1 -1
- package/dist/chunk-X3EFRVXY.mjs +12 -0
- package/dist/{chunk-UCQ52TJY.mjs → chunk-X3JNB2TB.mjs} +1 -1
- package/dist/{chunk-RHOR2J6V.cjs → chunk-X5BCMLGP.cjs} +1 -1
- package/dist/{chunk-IQXGHGZF.cjs → chunk-XB24LZWI.cjs} +5 -5
- package/dist/{chunk-BNMHXVLL.mjs → chunk-XMHERKSE.mjs} +0 -15
- package/dist/{chunk-CGCJ2TJU.cjs → chunk-XPMC4E2G.cjs} +3 -3
- package/dist/{chunk-HWCHIBJZ.mjs → chunk-XWC5NAHV.mjs} +4 -4
- package/dist/{chunk-C7425KDG.cjs → chunk-XYL4HSVC.cjs} +2 -2
- package/dist/{chunk-2SVJGOAX.mjs → chunk-Y3N5BFRJ.mjs} +3 -3
- package/dist/{chunk-IUBDMDZZ.cjs → chunk-Y7TLL65B.cjs} +4 -4
- package/dist/{chunk-M7LKA632.mjs → chunk-YLNBWUVS.mjs} +1 -1
- package/dist/chunk-Z5A6CNV2.mjs +60 -0
- package/dist/chunk-Z64V4WZI.mjs +17 -0
- package/dist/{chunk-2VCC3GVC.mjs → chunk-ZF3GX4O7.mjs} +1 -1
- package/dist/{client-plugins-BPfltM5m.d.ts → client-plugins-CFBEfVPO.d.ts} +20 -3
- package/dist/{client-plugins-D4RO59f0.d.mts → client-plugins-cqy_dQd0.d.mts} +20 -3
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +5 -4
- package/dist/client.d.mts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.mjs +4 -3
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/cron.cjs +4 -4
- package/dist/cron.mjs +3 -3
- package/dist/desktop.d.mts +2 -2
- package/dist/desktop.d.ts +2 -2
- package/dist/{devtools-STG7HPRV.mjs → devtools-4MLL3RAL.mjs} +6 -6
- package/dist/{devtools-N5XTOECL.cjs → devtools-4ZLMD454.cjs} +8 -8
- package/dist/docs.cjs +10 -10
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +9 -9
- package/dist/{index-k8o8eUOd.d.mts → index-BYkNbeQV.d.mts} +1 -1
- package/dist/{index-C-N3Pwg-.d.ts → index-BxjN_UDZ.d.ts} +1 -1
- package/dist/index.cjs +42 -40
- package/dist/index.d.mts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.mjs +41 -39
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/build-runtime.cjs +32 -31
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +31 -30
- package/dist/internal/cli-runtime.cjs +15 -15
- package/dist/internal/cli-runtime.mjs +14 -14
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +4 -2
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/client-runtime.mjs +3 -1
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +8 -8
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +7 -7
- package/dist/internal/form-actions.cjs +4 -3
- package/dist/internal/form-actions.mjs +3 -2
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/islands-runtime.cjs +56 -0
- package/dist/internal/islands-runtime.mjs +57 -1
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +11 -8
- package/dist/internal/production-runtime.d.mts +24 -11
- package/dist/internal/production-runtime.d.ts +24 -11
- package/dist/internal/production-runtime.mjs +10 -7
- package/dist/internal/server-fn-transform.cjs +13 -0
- package/dist/internal/server-fn-transform.d.mts +24 -0
- package/dist/internal/server-fn-transform.d.ts +24 -0
- package/dist/internal/server-fn-transform.mjs +13 -0
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.cjs +7 -7
- package/dist/middleware.d.mts +3 -3
- package/dist/middleware.d.ts +3 -3
- package/dist/middleware.mjs +6 -6
- package/dist/mobile.d.mts +30 -3
- package/dist/mobile.d.ts +30 -3
- package/dist/{navigation-delegate-8xg3Zvp4.d.ts → navigation-delegate-BU4xqdnw.d.ts} +1 -1
- package/dist/{navigation-delegate-ji6elCKy.d.mts → navigation-delegate-DLhbfEN4.d.mts} +1 -1
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/{nitro-YPSZBYDK.cjs → nitro-CK7M4RMY.cjs} +11 -11
- package/dist/{nitro-2Q5NVY7L.mjs → nitro-R444AF3O.mjs} +7 -7
- package/dist/plugin.cjs +25 -23
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +24 -22
- package/dist/{production-runtime-TdKaYRj0.d.ts → production-runtime-C78A8YgK.d.ts} +1 -1
- package/dist/{production-runtime-DXnQQkQf.d.mts → production-runtime-DLA4J5WG.d.mts} +1 -1
- package/dist/{programmatic-routes-client-BwiTndEC.d.ts → programmatic-routes-client-CBqkNhBy.d.ts} +2 -2
- package/dist/{programmatic-routes-client-Dh1SDLSM.d.mts → programmatic-routes-client-NpqGBn-i.d.mts} +2 -2
- package/dist/{render-plan-BvCGXF6K.d.mts → render-plan-C9sWvDTv.d.mts} +1 -1
- package/dist/{render-plan-BPbwRbuN.d.ts → render-plan-CrqcBbnV.d.ts} +1 -1
- package/dist/renderer-client.cjs +8 -6
- package/dist/renderer-client.d.mts +4 -4
- package/dist/renderer-client.d.ts +4 -4
- package/dist/renderer-client.mjs +4 -2
- package/dist/{request-B8PGTZNR.d.ts → request-BizeuqD7.d.ts} +1 -1
- package/dist/{request-C_xTkJib.d.mts → request-WwB1-Uim.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering-RNtcj607.d.ts → route-rendering-BGhJN64l.d.ts} +1 -1
- package/dist/{route-rendering-DlddURL1.d.mts → route-rendering-S6NFjnx4.d.mts} +1 -1
- package/dist/{router-B97eB0Mq.d.mts → router-BIheIy9G.d.mts} +1 -1
- package/dist/{router-qUVaoEN8.d.ts → router-BUD_j2EL.d.ts} +1 -1
- package/dist/routes.cjs +3 -2
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/routes.mjs +2 -1
- package/dist/{rsc-pipeline-L4XOZ2TE.cjs → rsc-pipeline-JRGUZBYM.cjs} +11 -11
- package/dist/{rsc-pipeline-T3775JUA.mjs → rsc-pipeline-OLAVIKI3.mjs} +10 -10
- package/dist/{runtime-C8GUnNeP.d.ts → runtime-CWP-21hP.d.ts} +1 -1
- package/dist/{runtime-CaDswfWi.d.mts → runtime-CgJwe6H_.d.mts} +1 -1
- package/dist/{runtime-BIBGJO7V.cjs → runtime-G23RSLEK.cjs} +14 -14
- package/dist/{runtime-HRSFC4ZC.mjs → runtime-OGCHDACZ.mjs} +12 -12
- package/dist/{schema-dev-notice-LZ5NXGLN.mjs → schema-dev-notice-F6QYSOAI.mjs} +2 -2
- package/dist/{schema-dev-notice-XV7GZ3QJ.cjs → schema-dev-notice-UU7DMZEU.cjs} +3 -3
- package/dist/{search-client-BTXL5XWD.mjs → search-client-OXH6GBNO.mjs} +5 -3
- package/dist/search-client-ZZLKVO5R.cjs +15 -0
- package/dist/server-action-security.cjs +2 -2
- package/dist/server-action-security.mjs +1 -1
- package/dist/server-fn.cjs +3 -3
- package/dist/server-fn.mjs +2 -2
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server-query-client.cjs +4 -3
- package/dist/server-query-client.mjs +3 -2
- package/dist/server-query.cjs +4 -4
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +57 -55
- package/dist/server.d.mts +9 -9
- package/dist/server.d.ts +9 -9
- package/dist/server.mjs +34 -32
- package/dist/{spa-router-Dlv5ofg0.d.mts → spa-router-CVOL0Vrq.d.mts} +2 -2
- package/dist/{spa-router-qapSboKz.d.ts → spa-router-Kytv4jSB.d.ts} +2 -2
- package/dist/testing.cjs +12 -11
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +9 -8
- package/dist/{utils-A-cYF81u.d.ts → utils-DbyXlzaj.d.ts} +1 -1
- package/dist/{utils-DyvlSxFk.d.mts → utils-Dsa1HZ7X.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +25 -23
- package/dist/vite.d.mts +4 -4
- package/dist/vite.d.ts +4 -4
- package/dist/vite.mjs +24 -22
- package/dist/workflows.cjs +4 -4
- package/dist/workflows.mjs +3 -3
- package/package.json +8 -3
- package/dist/base-path-leyrqXbX.d.mts +0 -19
- package/dist/base-path-leyrqXbX.d.ts +0 -19
- package/dist/chunk-OTOOJIUB.mjs +0 -34
- package/dist/search-client-QCYAL6AY.cjs +0 -13
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
var _chunkDGOLAZLVcjs = require('./chunk-DGOLAZLV.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
8
13
|
var _chunkA5BJKSZEcjs = require('./chunk-A5BJKSZE.cjs');
|
|
9
14
|
|
|
10
15
|
|
|
@@ -32,20 +37,20 @@ var _chunkA5BJKSZEcjs = require('./chunk-A5BJKSZE.cjs');
|
|
|
32
37
|
|
|
33
38
|
|
|
34
39
|
|
|
35
|
-
var
|
|
40
|
+
var _chunkF42U3R4Fcjs = require('./chunk-F42U3R4F.cjs');
|
|
36
41
|
|
|
37
42
|
|
|
38
|
-
var
|
|
43
|
+
var _chunkLNM57D3Hcjs = require('./chunk-LNM57D3H.cjs');
|
|
39
44
|
|
|
40
45
|
|
|
41
46
|
var _chunk3EEET2Q5cjs = require('./chunk-3EEET2Q5.cjs');
|
|
42
47
|
|
|
43
48
|
|
|
49
|
+
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
44
50
|
|
|
45
|
-
var _chunkIUBDMDZZcjs = require('./chunk-IUBDMDZZ.cjs');
|
|
46
51
|
|
|
47
52
|
|
|
48
|
-
var
|
|
53
|
+
var _chunkY7TLL65Bcjs = require('./chunk-Y7TLL65B.cjs');
|
|
49
54
|
|
|
50
55
|
|
|
51
56
|
|
|
@@ -56,7 +61,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
|
56
61
|
|
|
57
62
|
|
|
58
63
|
|
|
59
|
-
var
|
|
64
|
+
var _chunk76GHW3WIcjs = require('./chunk-76GHW3WI.cjs');
|
|
60
65
|
|
|
61
66
|
|
|
62
67
|
var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
|
|
@@ -74,7 +79,7 @@ var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
|
|
|
74
79
|
|
|
75
80
|
|
|
76
81
|
|
|
77
|
-
var
|
|
82
|
+
var _chunkJ22JD5YJcjs = require('./chunk-J22JD5YJ.cjs');
|
|
78
83
|
|
|
79
84
|
|
|
80
85
|
var _chunkSBABQKPTcjs = require('./chunk-SBABQKPT.cjs');
|
|
@@ -159,7 +164,7 @@ var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
|
|
|
159
164
|
var _chunkWAPQWAE6cjs = require('./chunk-WAPQWAE6.cjs');
|
|
160
165
|
|
|
161
166
|
|
|
162
|
-
var
|
|
167
|
+
var _chunkUSL2ANCBcjs = require('./chunk-USL2ANCB.cjs');
|
|
163
168
|
|
|
164
169
|
|
|
165
170
|
|
|
@@ -175,7 +180,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
|
175
180
|
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
176
181
|
|
|
177
182
|
|
|
178
|
-
var
|
|
183
|
+
var _chunkKHXAJ2KAcjs = require('./chunk-KHXAJ2KA.cjs');
|
|
179
184
|
|
|
180
185
|
|
|
181
186
|
var _chunkRVGLYMJMcjs = require('./chunk-RVGLYMJM.cjs');
|
|
@@ -210,10 +215,11 @@ var _chunkLNVGXUL3cjs = require('./chunk-LNVGXUL3.cjs');
|
|
|
210
215
|
|
|
211
216
|
|
|
212
217
|
|
|
213
|
-
var
|
|
218
|
+
var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
|
|
214
219
|
|
|
215
220
|
|
|
216
|
-
|
|
221
|
+
|
|
222
|
+
var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
217
223
|
|
|
218
224
|
|
|
219
225
|
|
|
@@ -234,7 +240,7 @@ var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
|
234
240
|
var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
|
|
235
241
|
|
|
236
242
|
|
|
237
|
-
var
|
|
243
|
+
var _chunkX5BCMLGPcjs = require('./chunk-X5BCMLGP.cjs');
|
|
238
244
|
|
|
239
245
|
|
|
240
246
|
var _chunkIWFV5ZEDcjs = require('./chunk-IWFV5ZED.cjs');
|
|
@@ -692,7 +698,7 @@ function resolveFarmPageDataFailure(error) {
|
|
|
692
698
|
}
|
|
693
699
|
|
|
694
700
|
// src/openapi/dev-status.ts
|
|
695
|
-
function reportOpenAPIDevGenerationResult(spec, output =
|
|
701
|
+
function reportOpenAPIDevGenerationResult(spec, output = _chunkVQJYGZNXcjs.logger) {
|
|
696
702
|
if (spec) {
|
|
697
703
|
output.success("\u2705 OpenAPI documentation enabled");
|
|
698
704
|
return;
|
|
@@ -745,7 +751,7 @@ function loadFarmDocsDevRuntime() {
|
|
|
745
751
|
return import("./docs.cjs");
|
|
746
752
|
}
|
|
747
753
|
function loadFarmDocsSearchDevRuntime() {
|
|
748
|
-
return import("./search-client-
|
|
754
|
+
return import("./search-client-ZZLKVO5R.cjs");
|
|
749
755
|
}
|
|
750
756
|
function loadFarmOpenAPIDevRuntime() {
|
|
751
757
|
return import("./manager-2LUKNX2N.cjs");
|
|
@@ -754,7 +760,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
754
760
|
return import("./workflows.cjs");
|
|
755
761
|
}
|
|
756
762
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
757
|
-
return import("./devtools-
|
|
763
|
+
return import("./devtools-4ZLMD454.cjs");
|
|
758
764
|
}
|
|
759
765
|
function loadFarmDevtoolsUIRuntime() {
|
|
760
766
|
return import("./devtools-ui-SYRUXUA7.cjs");
|
|
@@ -847,7 +853,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
847
853
|
if (!snapshot) return "";
|
|
848
854
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
849
855
|
if (snapshot.routing === "none") return runtime;
|
|
850
|
-
return `${
|
|
856
|
+
return `${_chunk76GHW3WIcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
851
857
|
}
|
|
852
858
|
function getPublicEnvDefine(config) {
|
|
853
859
|
const publicEnv = _optionalChain([config, 'access', _48 => _48.env, 'optionalAccess', _49 => _49.public]);
|
|
@@ -1190,7 +1196,7 @@ function rewriteEarlySsrRelativeImports(options) {
|
|
|
1190
1196
|
replacements.push({
|
|
1191
1197
|
start: source.start,
|
|
1192
1198
|
end: source.end,
|
|
1193
|
-
code: JSON.stringify(`${
|
|
1199
|
+
code: JSON.stringify(`${_chunkVQJYGZNXcjs.toViteModuleId.call(void 0, resolvedPath, options.root)}${suffix}`)
|
|
1194
1200
|
});
|
|
1195
1201
|
});
|
|
1196
1202
|
if (replacements.length === 0) return null;
|
|
@@ -1354,7 +1360,7 @@ function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
1354
1360
|
return;
|
|
1355
1361
|
}
|
|
1356
1362
|
warnedClientBoundaryIds.add(id);
|
|
1357
|
-
|
|
1363
|
+
_chunkVQJYGZNXcjs.logger.warn(formatClientBoundaryWarning(id, findings));
|
|
1358
1364
|
}
|
|
1359
1365
|
function shouldEmitFarmClientRootHmr(renderer) {
|
|
1360
1366
|
return _chunkRD623KW4cjs.getFarmRendererCapabilities.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
|
|
@@ -1368,13 +1374,17 @@ function hasViteAlias(alias, find) {
|
|
|
1368
1374
|
}
|
|
1369
1375
|
function farmPlugin(options = {}, initialPluginManager) {
|
|
1370
1376
|
const imageImports = farmImageImportsPlugin();
|
|
1371
|
-
const fontImports =
|
|
1377
|
+
const fontImports = _chunkF42U3R4Fcjs.farmFontImportsPlugin.call(void 0, {
|
|
1372
1378
|
root: options.root,
|
|
1373
1379
|
basePath: options.basePath,
|
|
1374
1380
|
publicDir: options.publicDir
|
|
1375
1381
|
});
|
|
1376
1382
|
let farmApp;
|
|
1377
1383
|
let serverFnTransformActive = false;
|
|
1384
|
+
const islandsServerFns = () => {
|
|
1385
|
+
const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _72 => _72.getConfig, 'call', _73 => _73()]), () => ( options));
|
|
1386
|
+
return _optionalChain([config, 'access', _74 => _74.experimental, 'optionalAccess', _75 => _75.serverActions]) === true && _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _76 => _76.experimental, 'optionalAccess', _77 => _77.serverComponents])) === "islands";
|
|
1387
|
+
};
|
|
1378
1388
|
let reactRefreshActive = false;
|
|
1379
1389
|
let server;
|
|
1380
1390
|
let apiRouteManager;
|
|
@@ -1398,14 +1408,14 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1398
1408
|
].join(" ");
|
|
1399
1409
|
console.log(log);
|
|
1400
1410
|
};
|
|
1401
|
-
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
1411
|
+
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _78 => _78.getRouteManager, 'call', _79 => _79(), 'access', _80 => _80.getProgrammaticClientRoutes, 'call', _81 => _81()])));
|
|
1402
1412
|
return {
|
|
1403
1413
|
name: "farm",
|
|
1404
1414
|
api: { getProgrammaticClientRoutes },
|
|
1405
1415
|
config(userConfig, configEnv) {
|
|
1406
1416
|
isBuild = configEnv.command === "build";
|
|
1407
1417
|
const layerAliases = _chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, options.layers);
|
|
1408
|
-
const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access',
|
|
1418
|
+
const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _82 => _82.resolve, 'optionalAccess', _83 => _83.alias]), "@") ? {} : _chunkF42U3R4Fcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
|
|
1409
1419
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
1410
1420
|
return {
|
|
1411
1421
|
// Honor Farm's publicDir so the dev server serves the same static
|
|
@@ -1421,7 +1431,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1421
1431
|
server: {
|
|
1422
1432
|
fs: {
|
|
1423
1433
|
...layerRoots.length ? { allow: [path5.resolve(options.root || process.cwd()), ...layerRoots] } : {},
|
|
1424
|
-
deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access',
|
|
1434
|
+
deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _84 => _84.server, 'optionalAccess', _85 => _85.fs, 'optionalAccess', _86 => _86.deny]), options)
|
|
1425
1435
|
}
|
|
1426
1436
|
}
|
|
1427
1437
|
};
|
|
@@ -1434,8 +1444,8 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1434
1444
|
(plugin) => plugin.name === SERVER_FN_TRANSFORM_PLUGIN
|
|
1435
1445
|
);
|
|
1436
1446
|
reactRefreshActive = _chunkDGOLAZLVcjs.isFarmReactRefreshActive.call(void 0, config);
|
|
1437
|
-
if (_optionalChain([options, 'access',
|
|
1438
|
-
|
|
1447
|
+
if (_optionalChain([options, 'access', _87 => _87.experimental, 'optionalAccess', _88 => _88.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
|
|
1448
|
+
_chunkVQJYGZNXcjs.logger.warn(
|
|
1439
1449
|
"experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
|
|
1440
1450
|
);
|
|
1441
1451
|
}
|
|
@@ -1443,7 +1453,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1443
1453
|
async configureServer(viteServer) {
|
|
1444
1454
|
viteServer.middlewares.use(
|
|
1445
1455
|
createFarmDevPreviewGuard(viteServer, {
|
|
1446
|
-
getSourceRoots: () => _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
1456
|
+
getSourceRoots: () => _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _89 => _89.getConfig, 'call', _90 => _90()]), () => ( options)))
|
|
1447
1457
|
})
|
|
1448
1458
|
);
|
|
1449
1459
|
if (typeof fontImports.configureServer === "function") {
|
|
@@ -1458,7 +1468,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1458
1468
|
} catch (e12) {
|
|
1459
1469
|
}
|
|
1460
1470
|
};
|
|
1461
|
-
farmApp = new (0,
|
|
1471
|
+
farmApp = new (0, _chunkF42U3R4Fcjs.FarmApp)(
|
|
1462
1472
|
{
|
|
1463
1473
|
...options,
|
|
1464
1474
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -1468,7 +1478,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1468
1478
|
await farmApp.initialize();
|
|
1469
1479
|
const farmConfig = farmApp.getConfig();
|
|
1470
1480
|
let farmAppPackages;
|
|
1471
|
-
if (_optionalChain([farmConfig, 'access',
|
|
1481
|
+
if (_optionalChain([farmConfig, 'access', _91 => _91.agent, 'optionalAccess', _92 => _92.noindexPreviews])) {
|
|
1472
1482
|
server.middlewares.use((_req, res, next) => {
|
|
1473
1483
|
if (_chunkSGBNF56Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
1474
1484
|
res.setHeader("X-Robots-Tag", _chunkNYQSC4DXcjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
@@ -1478,7 +1488,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1478
1488
|
}
|
|
1479
1489
|
const apiServerBasePath = _chunkB5BBTPJQcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
1480
1490
|
const devBuiltInRoutePaths = new Set(
|
|
1481
|
-
|
|
1491
|
+
_chunkJ22JD5YJcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
1482
1492
|
agent: {
|
|
1483
1493
|
apiCatalog: true,
|
|
1484
1494
|
mcp: true,
|
|
@@ -1500,9 +1510,9 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1500
1510
|
validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
|
|
1501
1511
|
// Vite owns this address. Unlike request.url, it cannot be replaced by
|
|
1502
1512
|
// a caller-controlled Host header.
|
|
1503
|
-
trustedLocalOrigin: () => _optionalChain([server, 'access',
|
|
1513
|
+
trustedLocalOrigin: () => _optionalChain([server, 'access', _93 => _93.resolvedUrls, 'optionalAccess', _94 => _94.local, 'access', _95 => _95[0]]),
|
|
1504
1514
|
onError(error) {
|
|
1505
|
-
|
|
1515
|
+
_chunkVQJYGZNXcjs.logger.error(
|
|
1506
1516
|
`Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
|
|
1507
1517
|
);
|
|
1508
1518
|
}
|
|
@@ -1520,15 +1530,15 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1520
1530
|
const workflowConfig = farmConfig.workflows;
|
|
1521
1531
|
const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
|
|
1522
1532
|
const getExtraRouteTypes = () => [
|
|
1523
|
-
..._optionalChain([options, 'access',
|
|
1524
|
-
..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
1533
|
+
..._optionalChain([options, 'access', _96 => _96.openapi, 'optionalAccess', _97 => _97.enabled]) && options.openapi.route ? [options.openapi.route] : [],
|
|
1534
|
+
..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _98 => _98.getFarmDocsRouteTypeEntries, 'call', _99 => _99(farmConfig.docs)]), () => ( []))
|
|
1525
1535
|
];
|
|
1526
1536
|
const appDirSlugs = sourceRoots.map(
|
|
1527
1537
|
(source) => path5.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
|
|
1528
1538
|
);
|
|
1529
1539
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
1530
1540
|
try {
|
|
1531
|
-
const result = await
|
|
1541
|
+
const result = await _chunkY7TLL65Bcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
1532
1542
|
root: farmConfig.root,
|
|
1533
1543
|
srcDir: farmConfig.srcDir,
|
|
1534
1544
|
layers: farmConfig.layers,
|
|
@@ -1557,7 +1567,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1557
1567
|
}
|
|
1558
1568
|
} catch (e) {
|
|
1559
1569
|
const message = e instanceof Error ? e.message : String(e);
|
|
1560
|
-
|
|
1570
|
+
_chunkVQJYGZNXcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
|
|
1561
1571
|
if (pm) {
|
|
1562
1572
|
await emitPluginError("type-artifact-generation", e, { reason });
|
|
1563
1573
|
}
|
|
@@ -1568,7 +1578,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1568
1578
|
(source) => path5.join(source.root, source.srcDir).replace(/\\/g, "/")
|
|
1569
1579
|
);
|
|
1570
1580
|
const layerConfigFiles = new Set(
|
|
1571
|
-
farmConfig.layers.map((layer) => _optionalChain([layer, 'access',
|
|
1581
|
+
farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _100 => _100.configFile, 'optionalAccess', _101 => _101.replace, 'call', _102 => _102(/\\/g, "/")])).filter((file) => Boolean(file))
|
|
1572
1582
|
);
|
|
1573
1583
|
const routeModuleExtensions = /* @__PURE__ */ new Set([
|
|
1574
1584
|
..._chunkRD623KW4cjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
|
|
@@ -1610,7 +1620,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1610
1620
|
let routeRefreshScheduled = null;
|
|
1611
1621
|
let pendingRouteRefreshIncludesMiddleware = false;
|
|
1612
1622
|
const scheduleTypeArtifactGen = (file, event, selection) => {
|
|
1613
|
-
const normalizedFile =
|
|
1623
|
+
const normalizedFile = _chunkVQJYGZNXcjs.toPosixPath.call(void 0, file);
|
|
1614
1624
|
for (const [artifact, enabled] of Object.entries(selection)) {
|
|
1615
1625
|
if (enabled) {
|
|
1616
1626
|
pendingTypeArtifacts[artifact] = true;
|
|
@@ -1647,7 +1657,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1647
1657
|
scheduleTypeArtifactGen(file, ev, typeArtifacts);
|
|
1648
1658
|
}
|
|
1649
1659
|
if (isI18nCatalogFile(file)) {
|
|
1650
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
1660
|
+
_optionalChain([farmApp, 'optionalAccess', _103 => _103.getI18nRuntime, 'call', _104 => _104(), 'access', _105 => _105.reload, 'call', _106 => _106(), 'access', _107 => _107.then, 'call', _108 => _108(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _109 => _109.catch, 'call', _110 => _110((error) => _chunkVQJYGZNXcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
|
|
1651
1661
|
}
|
|
1652
1662
|
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
1653
1663
|
if (isRouteRefreshEvent) {
|
|
@@ -1660,9 +1670,9 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1660
1670
|
const reloadsMiddleware = pendingRouteRefreshIncludesMiddleware;
|
|
1661
1671
|
pendingRouteRefreshIncludesMiddleware = false;
|
|
1662
1672
|
Promise.all([
|
|
1663
|
-
_optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
1664
|
-
reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess',
|
|
1665
|
-
]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) =>
|
|
1673
|
+
_optionalChain([refreshRouteDiscovery, 'optionalCall', _111 => _111(`${ev} ${file}`)]),
|
|
1674
|
+
reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _112 => _112.reload, 'call', _113 => _113()]) : void 0
|
|
1675
|
+
]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkVQJYGZNXcjs.logger.warn(`Route refresh failed: ${error.message}`));
|
|
1666
1676
|
}, 50);
|
|
1667
1677
|
}
|
|
1668
1678
|
}
|
|
@@ -1696,7 +1706,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1696
1706
|
});
|
|
1697
1707
|
}
|
|
1698
1708
|
const dispatchToDevServer = _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server);
|
|
1699
|
-
apiRouteManager = new (0,
|
|
1709
|
+
apiRouteManager = new (0, _chunkKHXAJ2KAcjs.APIRouteManager)(appDirs, server, {
|
|
1700
1710
|
plugins: farmConfig.plugins,
|
|
1701
1711
|
i18n: farmApp.getI18nRuntime(),
|
|
1702
1712
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -1730,7 +1740,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1730
1740
|
loadModule: async (workflow) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
|
|
1731
1741
|
server: farmConfig.server
|
|
1732
1742
|
});
|
|
1733
|
-
|
|
1743
|
+
_chunkVQJYGZNXcjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
|
|
1734
1744
|
}
|
|
1735
1745
|
}
|
|
1736
1746
|
if (pm) {
|
|
@@ -1742,7 +1752,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1742
1752
|
});
|
|
1743
1753
|
}
|
|
1744
1754
|
}
|
|
1745
|
-
middlewareManager = new (0,
|
|
1755
|
+
middlewareManager = new (0, _chunkUSL2ANCBcjs.MiddlewareManager)(
|
|
1746
1756
|
appDirs,
|
|
1747
1757
|
server,
|
|
1748
1758
|
farmConfig.middleware,
|
|
@@ -1763,11 +1773,11 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1763
1773
|
});
|
|
1764
1774
|
}
|
|
1765
1775
|
}
|
|
1766
|
-
if (_optionalChain([options, 'access',
|
|
1776
|
+
if (_optionalChain([options, 'access', _114 => _114.openapi, 'optionalAccess', _115 => _115.enabled])) {
|
|
1767
1777
|
const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
|
|
1768
1778
|
openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
|
|
1769
1779
|
mode: "development",
|
|
1770
|
-
apiBaseURL: typeof _optionalChain([options, 'access',
|
|
1780
|
+
apiBaseURL: typeof _optionalChain([options, 'access', _116 => _116.api, 'optionalAccess', _117 => _117.baseURL]) === "string" ? options.api.baseURL : void 0
|
|
1771
1781
|
});
|
|
1772
1782
|
const spec = await openAPIManager.generateSpec();
|
|
1773
1783
|
reportOpenAPIDevGenerationResult(spec);
|
|
@@ -1784,7 +1794,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1784
1794
|
await openAPIManager.invalidateCache();
|
|
1785
1795
|
}
|
|
1786
1796
|
if (process.env.FARM_VERBOSE) {
|
|
1787
|
-
|
|
1797
|
+
_chunkVQJYGZNXcjs.logger.info(`Refreshed routes: ${reason}`);
|
|
1788
1798
|
}
|
|
1789
1799
|
};
|
|
1790
1800
|
const farmDocsFontAssetList = farmDocsDevRuntime ? _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, farmConfig.root) : [];
|
|
@@ -1796,7 +1806,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1796
1806
|
return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
|
|
1797
1807
|
};
|
|
1798
1808
|
releaseDocsMCPServers();
|
|
1799
|
-
const isFarmDocsPathGuarded = (href) =>
|
|
1809
|
+
const isFarmDocsPathGuarded = (href) => _chunk76GHW3WIcjs.farmPathGuardCoversPage.call(void 0,
|
|
1800
1810
|
{
|
|
1801
1811
|
config: farmConfig,
|
|
1802
1812
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -1809,19 +1819,19 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1809
1819
|
clientEntry: "/@farm/client.js",
|
|
1810
1820
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
1811
1821
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
1812
|
-
globalStylesheetHref:
|
|
1822
|
+
globalStylesheetHref: _chunkF42U3R4Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
1813
1823
|
farmConfig.root,
|
|
1814
1824
|
farmConfig.srcDir
|
|
1815
1825
|
),
|
|
1816
1826
|
loadModule: async (specifier) => {
|
|
1817
1827
|
const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
|
|
1818
|
-
if (specifier === _optionalChain([farmConfig, 'access',
|
|
1828
|
+
if (specifier === _optionalChain([farmConfig, 'access', _118 => _118.docs, 'access', _119 => _119.adapter, 'optionalAccess', _120 => _120.server]) && _optionalChain([resolved, 'optionalAccess', _121 => _121.id])) {
|
|
1819
1829
|
return import(
|
|
1820
1830
|
/* @vite-ignore */
|
|
1821
1831
|
_url.pathToFileURL.call(void 0, resolved.id).href
|
|
1822
1832
|
);
|
|
1823
1833
|
}
|
|
1824
|
-
return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
1834
|
+
return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _122 => _122.id]), () => ( specifier)));
|
|
1825
1835
|
},
|
|
1826
1836
|
registerMCPServer: (mcpServer) => {
|
|
1827
1837
|
const dispose = _chunk6ONBZGVHcjs.registerFarmMCPServer.call(void 0, mcpServer);
|
|
@@ -1839,21 +1849,21 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1839
1849
|
fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
1840
1850
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
1841
1851
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
1842
|
-
globalStylesheetHref:
|
|
1852
|
+
globalStylesheetHref: _chunkF42U3R4Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
1843
1853
|
farmConfig.root,
|
|
1844
1854
|
farmConfig.srcDir
|
|
1845
1855
|
),
|
|
1846
1856
|
isPathGuarded: isFarmDocsPathGuarded
|
|
1847
1857
|
}) : null;
|
|
1848
1858
|
const wrapFarmDocsResponseWithLayouts = async (request, response) => {
|
|
1849
|
-
if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access',
|
|
1859
|
+
if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _123 => _123.headers, 'access', _124 => _124.get, 'call', _125 => _125("content-type"), 'optionalAccess', _126 => _126.toLowerCase, 'call', _127 => _127(), 'access', _128 => _128.includes, 'call', _129 => _129("text/html")])) {
|
|
1850
1860
|
return response;
|
|
1851
1861
|
}
|
|
1852
1862
|
const pathname = new URL(request.url).pathname;
|
|
1853
1863
|
const matchedRoute = routeManager.matchRoute(pathname);
|
|
1854
1864
|
const layoutEntries = matchedRoute.layouts.map((layout) => ({
|
|
1855
1865
|
...layout,
|
|
1856
|
-
metadata:
|
|
1866
|
+
metadata: _chunkF42U3R4Fcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
|
|
1857
1867
|
}));
|
|
1858
1868
|
if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
|
|
1859
1869
|
return response;
|
|
@@ -1867,7 +1877,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1867
1877
|
headers: response.headers
|
|
1868
1878
|
});
|
|
1869
1879
|
}
|
|
1870
|
-
const docsRenderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
1880
|
+
const docsRenderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _130 => _130.getConfig, 'call', _131 => _131()]), () => ( options))).renderer);
|
|
1871
1881
|
const [rendererRuntime, layoutModules] = await Promise.all([
|
|
1872
1882
|
_chunkRD623KW4cjs.isReactRenderer.call(void 0, docsRenderer) ? import("./renderer/react/server.cjs") : _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, docsRenderer.server),
|
|
1873
1883
|
Promise.all(
|
|
@@ -1881,7 +1891,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1881
1891
|
(strategy) => strategy === hydrationStrategies[0]
|
|
1882
1892
|
) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
|
|
1883
1893
|
const params = matchedRoute.params || {};
|
|
1884
|
-
const toUrlPath = (absolutePath) =>
|
|
1894
|
+
const toUrlPath = (absolutePath) => _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, absolutePath, farmConfig.root);
|
|
1885
1895
|
const clientLayouts = Object.fromEntries(
|
|
1886
1896
|
layoutEntries.map((layout) => [
|
|
1887
1897
|
layout.pattern,
|
|
@@ -1896,7 +1906,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1896
1906
|
])
|
|
1897
1907
|
);
|
|
1898
1908
|
const inlineValue = (value) => JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e");
|
|
1899
|
-
const pageModulePath = _optionalChain([matchedRoute, 'access',
|
|
1909
|
+
const pageModulePath = _optionalChain([matchedRoute, 'access', _132 => _132.route, 'optionalAccess', _133 => _133.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
|
|
1900
1910
|
const bootstrapScript = `<script>
|
|
1901
1911
|
window.__FARM_PROPS__ = ${inlineValue({ params })};
|
|
1902
1912
|
window.__FARM_ROUTE_SLOTS__ = [];
|
|
@@ -1992,7 +2002,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
1992
2002
|
}
|
|
1993
2003
|
},
|
|
1994
2004
|
(request) => {
|
|
1995
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
2005
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _134 => _134.getConfig, 'call', _135 => _135()]), () => ( options));
|
|
1996
2006
|
const currentServerConfig = _chunkLIFUPCXWcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
1997
2007
|
return _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, request, {
|
|
1998
2008
|
trustProxy: currentServerConfig.trustProxy
|
|
@@ -2003,7 +2013,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2003
2013
|
withAPIRequestTracing(async (req, res, next) => {
|
|
2004
2014
|
const requestUrl = req.url || "/";
|
|
2005
2015
|
const requestMethod = req.method || "GET";
|
|
2006
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
2016
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _136 => _136.getConfig, 'call', _137 => _137()]), () => ( options));
|
|
2007
2017
|
const currentServerConfig = _chunkLIFUPCXWcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
2008
2018
|
const parsedRequestUrl = _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
2009
2019
|
trustProxy: currentServerConfig.trustProxy
|
|
@@ -2071,7 +2081,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2071
2081
|
openapi: options.openapi
|
|
2072
2082
|
},
|
|
2073
2083
|
workflows: discoveredWorkflows,
|
|
2074
|
-
plugins: _optionalChain([pm, 'optionalAccess',
|
|
2084
|
+
plugins: _optionalChain([pm, 'optionalAccess', _138 => _138.getSortedPlugins, 'call', _139 => _139()])
|
|
2075
2085
|
});
|
|
2076
2086
|
res.statusCode = 200;
|
|
2077
2087
|
res.setHeader(
|
|
@@ -2084,7 +2094,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2084
2094
|
} else {
|
|
2085
2095
|
if (!warnedDeprecatedDevtoolsDashboard) {
|
|
2086
2096
|
warnedDeprecatedDevtoolsDashboard = true;
|
|
2087
|
-
|
|
2097
|
+
_chunkVQJYGZNXcjs.logger.warn(
|
|
2088
2098
|
"The built-in DevTools dashboard is deprecated. Install @farm.js/devtools and add devtools() to plugins in farm.config.ts."
|
|
2089
2099
|
);
|
|
2090
2100
|
}
|
|
@@ -2094,7 +2104,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2094
2104
|
return;
|
|
2095
2105
|
}
|
|
2096
2106
|
const runAppMiddlewareForContentRoute = async () => {
|
|
2097
|
-
if (!_optionalChain([middlewareManager, 'optionalAccess',
|
|
2107
|
+
if (!_optionalChain([middlewareManager, 'optionalAccess', _140 => _140.hasMiddleware, 'call', _141 => _141()])) return false;
|
|
2098
2108
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
2099
2109
|
return runFarmMiddlewareWithNavigation(
|
|
2100
2110
|
farmApp.getServerRenderer(),
|
|
@@ -2110,16 +2120,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2110
2120
|
label
|
|
2111
2121
|
} = {}) => {
|
|
2112
2122
|
const discard = async () => {
|
|
2113
|
-
await _optionalChain([computed, 'optionalAccess',
|
|
2123
|
+
await _optionalChain([computed, 'optionalAccess', _142 => _142.body, 'optionalAccess', _143 => _143.cancel, 'call', _144 => _144(), 'access', _145 => _145.catch, 'call', _146 => _146(() => {
|
|
2114
2124
|
})]);
|
|
2115
2125
|
};
|
|
2116
2126
|
let runtimeSession2;
|
|
2117
|
-
if (_optionalChain([pm, 'optionalAccess',
|
|
2127
|
+
if (_optionalChain([pm, 'optionalAccess', _147 => _147.hasRuntimeRequestHooks, 'call', _148 => _148()])) {
|
|
2118
2128
|
try {
|
|
2119
2129
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
2120
|
-
const route =
|
|
2130
|
+
const route = _chunkJ22JD5YJcjs.setFarmRouteLabel.call(void 0,
|
|
2121
2131
|
{ pathname: requestPathname },
|
|
2122
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
2132
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkJ22JD5YJcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
2123
2133
|
);
|
|
2124
2134
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
2125
2135
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -2151,7 +2161,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2151
2161
|
let response;
|
|
2152
2162
|
try {
|
|
2153
2163
|
response = await respond(
|
|
2154
|
-
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess',
|
|
2164
|
+
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _149 => _149.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
|
|
2155
2165
|
);
|
|
2156
2166
|
} catch (error) {
|
|
2157
2167
|
if (runtimeSession2) await pm.failRuntimeRequest(runtimeSession2, error);
|
|
@@ -2164,7 +2174,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2164
2174
|
);
|
|
2165
2175
|
};
|
|
2166
2176
|
const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
|
|
2167
|
-
if (openAPIManager && _optionalChain([options, 'access',
|
|
2177
|
+
if (openAPIManager && _optionalChain([options, 'access', _150 => _150.openapi, 'optionalAccess', _151 => _151.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
|
|
2168
2178
|
const specManager = openAPIManager;
|
|
2169
2179
|
await serveBuiltInRoute(async () => {
|
|
2170
2180
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
@@ -2184,7 +2194,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2184
2194
|
});
|
|
2185
2195
|
return;
|
|
2186
2196
|
}
|
|
2187
|
-
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access',
|
|
2197
|
+
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _152 => _152.openapi, 'optionalAccess', _153 => _153.route])) {
|
|
2188
2198
|
const docsManager = openAPIManager;
|
|
2189
2199
|
await serveBuiltInRoute(
|
|
2190
2200
|
async () => {
|
|
@@ -2195,24 +2205,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2195
2205
|
);
|
|
2196
2206
|
return;
|
|
2197
2207
|
}
|
|
2198
|
-
if (_optionalChain([options, 'access',
|
|
2208
|
+
if (_optionalChain([options, 'access', _154 => _154.agent, 'optionalAccess', _155 => _155.manifest]) !== false && _chunkJ22JD5YJcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
2199
2209
|
await serveBuiltInRoute(async () => {
|
|
2200
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
2201
|
-
const manifest = await
|
|
2210
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkF42U3R4Fcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
2211
|
+
const manifest = await _chunkJ22JD5YJcjs.createFarmAppManifestResponse.call(void 0,
|
|
2202
2212
|
new Request(parsedRequestUrl, {
|
|
2203
2213
|
method: requestMethod,
|
|
2204
2214
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
2205
2215
|
}),
|
|
2206
2216
|
{
|
|
2207
|
-
...
|
|
2217
|
+
..._chunkJ22JD5YJcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
2208
2218
|
build: "development",
|
|
2209
2219
|
packages: farmAppPackages,
|
|
2210
2220
|
// Read again on each request; unchanged files come from a cache.
|
|
2211
|
-
webmcpTools: _optionalChain([farmConfig, 'access',
|
|
2221
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _156 => _156.plugins, 'optionalAccess', _157 => _157.some, 'call', _158 => _158(({ name }) => name === "farm:webmcp")]) ? _chunkF42U3R4Fcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
2212
2222
|
}),
|
|
2213
2223
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
2214
2224
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
2215
|
-
guardCoversPath: (path6) =>
|
|
2225
|
+
guardCoversPath: (path6) => _chunk76GHW3WIcjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
2216
2226
|
{
|
|
2217
2227
|
config: farmConfig,
|
|
2218
2228
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -2226,11 +2236,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2226
2236
|
});
|
|
2227
2237
|
return;
|
|
2228
2238
|
}
|
|
2229
|
-
if (_optionalChain([options, 'access',
|
|
2239
|
+
if (_optionalChain([options, 'access', _159 => _159.agent, 'optionalAccess', _160 => _160.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkJ22JD5YJcjs.FARM_API_CATALOG_PATH) {
|
|
2230
2240
|
await serveBuiltInRoute(
|
|
2231
|
-
() =>
|
|
2241
|
+
() => _chunkJ22JD5YJcjs.createFarmApiCatalogResponse.call(void 0,
|
|
2232
2242
|
requestMethod,
|
|
2233
|
-
|
|
2243
|
+
_chunkJ22JD5YJcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
2234
2244
|
new Request(parsedRequestUrl, {
|
|
2235
2245
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
2236
2246
|
})
|
|
@@ -2238,8 +2248,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2238
2248
|
);
|
|
2239
2249
|
return;
|
|
2240
2250
|
}
|
|
2241
|
-
if (_optionalChain([options, 'access',
|
|
2242
|
-
const aiCatalog =
|
|
2251
|
+
if (_optionalChain([options, 'access', _161 => _161.agent, 'optionalAccess', _162 => _162.aiCatalog]) !== false) {
|
|
2252
|
+
const aiCatalog = _chunkJ22JD5YJcjs.createFarmAiCatalogResponse.call(void 0,
|
|
2243
2253
|
new Request(parsedRequestUrl, {
|
|
2244
2254
|
method: requestMethod,
|
|
2245
2255
|
headers: {
|
|
@@ -2283,18 +2293,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2283
2293
|
{
|
|
2284
2294
|
kind: "docs",
|
|
2285
2295
|
computed: docsResponse,
|
|
2286
|
-
label:
|
|
2296
|
+
label: _chunkJ22JD5YJcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
2287
2297
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
2288
|
-
{ path: _optionalChain([farmConfig, 'access',
|
|
2298
|
+
{ path: _optionalChain([farmConfig, 'access', _163 => _163.docs, 'optionalAccess', _164 => _164.entry]) || "/docs" }
|
|
2289
2299
|
)
|
|
2290
2300
|
}
|
|
2291
2301
|
);
|
|
2292
2302
|
return;
|
|
2293
2303
|
}
|
|
2294
2304
|
}
|
|
2295
|
-
const markdownRouteLabel = () =>
|
|
2305
|
+
const markdownRouteLabel = () => _chunkJ22JD5YJcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
2296
2306
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
2297
|
-
(page) => _optionalChain([farmApp, 'access',
|
|
2307
|
+
(page) => _optionalChain([farmApp, 'access', _165 => _165.getRouteManager, 'call', _166 => _166(), 'access', _167 => _167.matchRoute, 'call', _168 => _168(page), 'access', _169 => _169.route, 'optionalAccess', _170 => _170.pattern])
|
|
2298
2308
|
);
|
|
2299
2309
|
const markdownSourceResponse = viteModuleRequest ? null : await _chunkJATTVAHAcjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
2300
2310
|
request: new Request(fullUrl, {
|
|
@@ -2304,7 +2314,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2304
2314
|
config: farmApp.getConfig().mdx,
|
|
2305
2315
|
resolveSource: async (pathname2) => {
|
|
2306
2316
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
2307
|
-
const sourcePath = _optionalChain([match, 'access',
|
|
2317
|
+
const sourcePath = _optionalChain([match, 'access', _171 => _171.route, 'optionalAccess', _172 => _172.markdownSourcePath]) || (match.route && _chunkJATTVAHAcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
2308
2318
|
if (!sourcePath) {
|
|
2309
2319
|
return null;
|
|
2310
2320
|
}
|
|
@@ -2444,7 +2454,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2444
2454
|
"beforeRequest",
|
|
2445
2455
|
(plugin) => {
|
|
2446
2456
|
const owner = _chunkWAPQWAE6cjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
|
|
2447
|
-
return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess',
|
|
2457
|
+
return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _173 => _173.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
2448
2458
|
},
|
|
2449
2459
|
req,
|
|
2450
2460
|
res
|
|
@@ -2480,7 +2490,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2480
2490
|
isProd: false
|
|
2481
2491
|
},
|
|
2482
2492
|
request,
|
|
2483
|
-
{ clientAddress: _optionalChain([req, 'access',
|
|
2493
|
+
{ clientAddress: _optionalChain([req, 'access', _174 => _174.socket, 'optionalAccess', _175 => _175.remoteAddress]) }
|
|
2484
2494
|
);
|
|
2485
2495
|
if (!result) {
|
|
2486
2496
|
throw new Error(`Matched integration route did not return a response`);
|
|
@@ -2515,7 +2525,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2515
2525
|
method: requestMethod,
|
|
2516
2526
|
integration: matchedRoute.key
|
|
2517
2527
|
});
|
|
2518
|
-
|
|
2528
|
+
_chunkVQJYGZNXcjs.logger.error(`Integration route error: ${error}`);
|
|
2519
2529
|
if (!res.writableEnded) {
|
|
2520
2530
|
res.statusCode = 500;
|
|
2521
2531
|
res.setHeader("Content-Type", "application/json");
|
|
@@ -2543,9 +2553,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2543
2553
|
const pathname2 = _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
2544
2554
|
trustProxy: currentServerConfig.trustProxy
|
|
2545
2555
|
}).pathname;
|
|
2556
|
+
const servesLocalApiRoute = hasMatchedApiRoute || Boolean(
|
|
2557
|
+
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _176 => _176.isFarmDocsAPIRequest, 'call', _177 => _177(requestPathname)])
|
|
2558
|
+
);
|
|
2546
2559
|
try {
|
|
2547
2560
|
if (pm) {
|
|
2548
|
-
if (
|
|
2561
|
+
if (servesLocalApiRoute) {
|
|
2549
2562
|
await pm.runHookParallelFiltered(
|
|
2550
2563
|
"beforeRequest",
|
|
2551
2564
|
(plugin) => plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
@@ -2566,7 +2579,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2566
2579
|
urlPath: urlPath2,
|
|
2567
2580
|
method: method2
|
|
2568
2581
|
});
|
|
2569
|
-
|
|
2582
|
+
_chunkVQJYGZNXcjs.logger.error(`Request hook error: ${error}`);
|
|
2570
2583
|
res.statusCode = 500;
|
|
2571
2584
|
res.setHeader("Content-Type", "application/json");
|
|
2572
2585
|
res.end(JSON.stringify({ error: "Internal server error" }));
|
|
@@ -2578,9 +2591,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2578
2591
|
return;
|
|
2579
2592
|
}
|
|
2580
2593
|
const apiHandler = apiRouteManager.getHandler({ throwOnError: true });
|
|
2581
|
-
const
|
|
2594
|
+
const routedPathname = _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
2595
|
+
trustProxy: currentServerConfig.trustProxy
|
|
2596
|
+
}).pathname;
|
|
2597
|
+
const rewritten = routedPathname !== pathname2;
|
|
2598
|
+
const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
|
|
2599
|
+
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
2582
2600
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
2583
|
-
const apiRoutePattern = _optionalChain([
|
|
2601
|
+
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _178 => _178.route, 'access', _179 => _179.path]) || urlPath2;
|
|
2584
2602
|
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
2585
2603
|
type: "route.matched",
|
|
2586
2604
|
pathname: pathname2,
|
|
@@ -2663,14 +2681,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2663
2681
|
urlPath: urlPath2,
|
|
2664
2682
|
method: method2
|
|
2665
2683
|
});
|
|
2666
|
-
|
|
2684
|
+
_chunkVQJYGZNXcjs.logger.error(`API route error: ${error}`);
|
|
2667
2685
|
res.statusCode = 500;
|
|
2668
2686
|
res.setHeader("Content-Type", "application/json");
|
|
2669
2687
|
res.end(JSON.stringify({ error: "Internal server error" }));
|
|
2670
2688
|
return;
|
|
2671
2689
|
}
|
|
2672
2690
|
}
|
|
2673
|
-
if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
2691
|
+
if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _180 => _180.isFarmDocsAPIRequest, 'call', _181 => _181(pathname2)])) {
|
|
2674
2692
|
try {
|
|
2675
2693
|
const url = `http://${req.headers.host || "localhost:3000"}${req.url}`;
|
|
2676
2694
|
const headers = new Headers();
|
|
@@ -2708,10 +2726,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2708
2726
|
};
|
|
2709
2727
|
const docsResponse = pm ? await pm.runRuntimeRequest(request, invokeDocsAPIHandler, {
|
|
2710
2728
|
kind: "docs",
|
|
2711
|
-
route:
|
|
2729
|
+
route: _chunkJ22JD5YJcjs.setFarmRouteLabel.call(void 0,
|
|
2712
2730
|
{ pathname: pathname2, pattern: apiLifecyclePayload.routePath },
|
|
2713
|
-
|
|
2714
|
-
path: _optionalChain([farmConfig, 'access',
|
|
2731
|
+
_chunkJ22JD5YJcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
2732
|
+
path: _optionalChain([farmConfig, 'access', _182 => _182.docs, 'optionalAccess', _183 => _183.entry]) || "/docs"
|
|
2715
2733
|
})
|
|
2716
2734
|
)
|
|
2717
2735
|
}) : await invokeDocsAPIHandler(request);
|
|
@@ -2731,7 +2749,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2731
2749
|
urlPath: urlPath2,
|
|
2732
2750
|
method: method2
|
|
2733
2751
|
});
|
|
2734
|
-
|
|
2752
|
+
_chunkVQJYGZNXcjs.logger.error(`Docs API route error: ${error}`);
|
|
2735
2753
|
res.statusCode = 500;
|
|
2736
2754
|
res.setHeader("Content-Type", "application/json");
|
|
2737
2755
|
res.end(JSON.stringify({ error: "Internal server error" }));
|
|
@@ -2745,18 +2763,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2745
2763
|
res.end(JSON.stringify({ error: "API route not found", pathname: pathname2 }));
|
|
2746
2764
|
return;
|
|
2747
2765
|
}
|
|
2748
|
-
if (_optionalChain([req, 'access',
|
|
2766
|
+
if (_optionalChain([req, 'access', _184 => _184.url, 'optionalAccess', _185 => _185.startsWith, 'call', _186 => _186("/@")]) || _optionalChain([req, 'access', _187 => _187.url, 'optionalAccess', _188 => _188.startsWith, 'call', _189 => _189("/node_modules")])) {
|
|
2749
2767
|
return next();
|
|
2750
2768
|
}
|
|
2751
2769
|
if (shouldBypassFarmRouterForDottedPath(
|
|
2752
2770
|
requestPathname,
|
|
2753
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
2771
|
+
_optionalChain([farmApp, 'optionalAccess', _190 => _190.getRouteManager, 'call', _191 => _191()]),
|
|
2754
2772
|
[server.config.publicDir, server.config.root],
|
|
2755
2773
|
farmAgentGeneratedPaths(farmConfig)
|
|
2756
2774
|
)) {
|
|
2757
2775
|
return next();
|
|
2758
2776
|
}
|
|
2759
|
-
if (_optionalChain([req, 'access',
|
|
2777
|
+
if (_optionalChain([req, 'access', _192 => _192.url, 'optionalAccess', _193 => _193.startsWith, 'call', _194 => _194("/__farm/page-data")])) {
|
|
2760
2778
|
const urlObj = parsedRequestUrl;
|
|
2761
2779
|
const targetPath = urlObj.searchParams.get("path") || "/";
|
|
2762
2780
|
try {
|
|
@@ -2784,7 +2802,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2784
2802
|
});
|
|
2785
2803
|
let middlewareMap = /* @__PURE__ */ new Map();
|
|
2786
2804
|
let middlewareContext = /* @__PURE__ */ new Map();
|
|
2787
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
2805
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _195 => _195.hasMiddleware, 'call', _196 => _196()])) {
|
|
2788
2806
|
const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
|
|
2789
2807
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
2790
2808
|
farmApp.getServerRenderer(),
|
|
@@ -2812,10 +2830,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2812
2830
|
if (pm) {
|
|
2813
2831
|
await pm.runHookParallel("afterRouteMatch", {
|
|
2814
2832
|
pathname: targetPath,
|
|
2815
|
-
matched: !!_optionalChain([match, 'optionalAccess',
|
|
2816
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
2817
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
2818
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
2833
|
+
matched: !!_optionalChain([match, 'optionalAccess', _197 => _197.route]),
|
|
2834
|
+
routePattern: _optionalChain([match, 'optionalAccess', _198 => _198.route, 'optionalAccess', _199 => _199.pattern]) || null,
|
|
2835
|
+
params: _optionalChain([match, 'optionalAccess', _200 => _200.params]) || {},
|
|
2836
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _201 => _201.layouts]) || []).map((l) => l.pattern)
|
|
2819
2837
|
});
|
|
2820
2838
|
}
|
|
2821
2839
|
if (!match) {
|
|
@@ -2838,7 +2856,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2838
2856
|
);
|
|
2839
2857
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
2840
2858
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
2841
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
2859
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkF42U3R4Fcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
2842
2860
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
2843
2861
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
2844
2862
|
let mergedMetadata = {};
|
|
@@ -2846,7 +2864,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2846
2864
|
layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
|
|
2847
2865
|
);
|
|
2848
2866
|
const layoutHydrationMetadata = layouts.map(
|
|
2849
|
-
(layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => (
|
|
2867
|
+
(layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkF42U3R4Fcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
|
|
2850
2868
|
);
|
|
2851
2869
|
const shouldHydrateLayout = layoutHydrationMetadata.some(
|
|
2852
2870
|
(metadata) => metadata.shouldHydrate
|
|
@@ -2861,7 +2879,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2861
2879
|
(strategy) => strategy === hydrationStrategies[0]
|
|
2862
2880
|
) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
|
|
2863
2881
|
const targetUrl = new URL(targetPath, "http://localhost");
|
|
2864
|
-
const searchParams =
|
|
2882
|
+
const searchParams = _chunkSUCDVKUBcjs.searchParamsToObject.call(void 0, targetUrl.searchParams);
|
|
2865
2883
|
const routeContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
2866
2884
|
request: targetRequest,
|
|
2867
2885
|
params,
|
|
@@ -2872,7 +2890,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2872
2890
|
props: _chunkX333W5KVcjs.withFarmRouteContext.call(void 0,
|
|
2873
2891
|
{
|
|
2874
2892
|
params,
|
|
2875
|
-
searchParams:
|
|
2893
|
+
searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, searchParams),
|
|
2876
2894
|
path: targetUrl.pathname,
|
|
2877
2895
|
middleware: middlewareMap.size > 0 ? { data: middlewareMap } : void 0
|
|
2878
2896
|
},
|
|
@@ -2910,7 +2928,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2910
2928
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
2911
2929
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
2912
2930
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
2913
|
-
), () => (
|
|
2931
|
+
), () => ( _chunkF42U3R4Fcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
2914
2932
|
const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
2915
2933
|
request: targetRequest,
|
|
2916
2934
|
params: slot.params,
|
|
@@ -2921,7 +2939,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2921
2939
|
props: _chunkX333W5KVcjs.withFarmRouteContext.call(void 0,
|
|
2922
2940
|
{
|
|
2923
2941
|
params: slot.params,
|
|
2924
|
-
searchParams:
|
|
2942
|
+
searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, searchParams),
|
|
2925
2943
|
path: targetUrl.pathname
|
|
2926
2944
|
},
|
|
2927
2945
|
slotContext
|
|
@@ -2955,16 +2973,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2955
2973
|
})
|
|
2956
2974
|
);
|
|
2957
2975
|
const projectRoot = server.config.root;
|
|
2958
|
-
const toUrlPath = (absolutePath) =>
|
|
2959
|
-
const renderPlan =
|
|
2976
|
+
const toUrlPath = (absolutePath) => _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
|
|
2977
|
+
const renderPlan = _chunk76GHW3WIcjs.createFarmRouteRenderPlan.call(void 0, {
|
|
2960
2978
|
pageShouldHydrate: shouldHydrate,
|
|
2961
2979
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
2962
2980
|
islandStrategy: hydrationIslandStrategy,
|
|
2963
|
-
rendering:
|
|
2981
|
+
rendering: _chunkY7TLL65Bcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
2964
2982
|
});
|
|
2965
2983
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
2966
|
-
const layoutStartIndex =
|
|
2967
|
-
|
|
2984
|
+
const layoutStartIndex = _chunk76GHW3WIcjs.getSharedLayoutPrefixLength.call(void 0,
|
|
2985
|
+
_chunk76GHW3WIcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
|
|
2968
2986
|
destinationLayoutPatterns
|
|
2969
2987
|
);
|
|
2970
2988
|
const renderer = farmApp.getServerRenderer();
|
|
@@ -2974,7 +2992,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2974
2992
|
middlewareContext,
|
|
2975
2993
|
() => renderer.renderNavigationFragment({
|
|
2976
2994
|
PageComponent: routeModule.default,
|
|
2977
|
-
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess',
|
|
2995
|
+
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _202 => _202.default]),
|
|
2978
2996
|
pageProps: routeProps,
|
|
2979
2997
|
params,
|
|
2980
2998
|
layouts: layouts.map((layout, index) => ({
|
|
@@ -3045,7 +3063,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3045
3063
|
{
|
|
3046
3064
|
status: 200,
|
|
3047
3065
|
headers: {
|
|
3048
|
-
"Cache-Control":
|
|
3066
|
+
"Cache-Control": _chunk76GHW3WIcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
|
|
3049
3067
|
"X-Farm-Navigation": "html-fragment",
|
|
3050
3068
|
Vary: "X-Farm-Layout-Chain",
|
|
3051
3069
|
[_chunkE552H232cjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
|
|
@@ -3053,7 +3071,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3053
3071
|
},
|
|
3054
3072
|
{
|
|
3055
3073
|
onError(error, id) {
|
|
3056
|
-
|
|
3074
|
+
_chunkVQJYGZNXcjs.logger.error(`Deferred route data ${id} failed: ${error}`);
|
|
3057
3075
|
}
|
|
3058
3076
|
}
|
|
3059
3077
|
)
|
|
@@ -3082,18 +3100,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3082
3100
|
trustProxy: currentServerConfig.trustProxy
|
|
3083
3101
|
}).pathname;
|
|
3084
3102
|
const routeManager2 = farmApp.getRouteManager();
|
|
3085
|
-
const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3086
|
-
const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3087
|
-
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3088
|
-
const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3089
|
-
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3090
|
-
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3091
|
-
const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3092
|
-
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3103
|
+
const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _203 => _203.hasHook, 'call', _204 => _204("beforeRouteMatch")]), () => ( false));
|
|
3104
|
+
const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _205 => _205.hasHook, 'call', _206 => _206("afterRouteMatch")]), () => ( false));
|
|
3105
|
+
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _207 => _207.hasHook, 'call', _208 => _208("beforeRequest")]), () => ( false));
|
|
3106
|
+
const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _209 => _209.hasHook, 'call', _210 => _210("beforeRender")]), () => ( false));
|
|
3107
|
+
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _211 => _211.hasHook, 'call', _212 => _212("afterResponse")]), () => ( false));
|
|
3108
|
+
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _213 => _213.hasHook, 'call', _214 => _214("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _215 => _215.hasHook, 'call', _216 => _216("afterRender")]), () => ( false)));
|
|
3109
|
+
const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _217 => _217.hasRuntimeRequestHooks, 'call', _218 => _218()]), () => ( false));
|
|
3110
|
+
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _219 => _219.hasRuntimeHook, 'call', _220 => _220("after")]), () => ( false));
|
|
3093
3111
|
const requestedMatch = routeManager2.matchRoute(requestedPathname);
|
|
3094
3112
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
3095
3113
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
3096
|
-
const mcpLabel =
|
|
3114
|
+
const mcpLabel = _chunkJ22JD5YJcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
3097
3115
|
if (mcpLabel) return mcpLabel;
|
|
3098
3116
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
3099
3117
|
return routePathname === _chunkSBABQKPTcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkSBABQKPTcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
@@ -3105,13 +3123,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3105
3123
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
3106
3124
|
{
|
|
3107
3125
|
kind: "page",
|
|
3108
|
-
route:
|
|
3126
|
+
route: _chunkJ22JD5YJcjs.setFarmRouteLabel.call(void 0,
|
|
3109
3127
|
{
|
|
3110
3128
|
pathname: requestedPathname,
|
|
3111
|
-
pattern: _optionalChain([requestedMatch, 'optionalAccess',
|
|
3112
|
-
params: _optionalChain([requestedMatch, 'optionalAccess',
|
|
3129
|
+
pattern: _optionalChain([requestedMatch, 'optionalAccess', _221 => _221.route, 'optionalAccess', _222 => _222.pattern]) || null,
|
|
3130
|
+
params: _optionalChain([requestedMatch, 'optionalAccess', _223 => _223.params]) || {}
|
|
3113
3131
|
},
|
|
3114
|
-
_optionalChain([requestedMatch, 'optionalAccess',
|
|
3132
|
+
_optionalChain([requestedMatch, 'optionalAccess', _224 => _224.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
|
|
3115
3133
|
)
|
|
3116
3134
|
}
|
|
3117
3135
|
);
|
|
@@ -3144,17 +3162,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3144
3162
|
if (pm && hasAfterRouteMatchHook) {
|
|
3145
3163
|
await pm.runHookParallel("afterRouteMatch", {
|
|
3146
3164
|
pathname,
|
|
3147
|
-
matched: !!_optionalChain([routeMatch, 'optionalAccess',
|
|
3148
|
-
routePattern: _optionalChain([routeMatch, 'optionalAccess',
|
|
3149
|
-
params: _optionalChain([routeMatch, 'optionalAccess',
|
|
3150
|
-
layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess',
|
|
3165
|
+
matched: !!_optionalChain([routeMatch, 'optionalAccess', _225 => _225.route]),
|
|
3166
|
+
routePattern: _optionalChain([routeMatch, 'optionalAccess', _226 => _226.route, 'optionalAccess', _227 => _227.pattern]) || null,
|
|
3167
|
+
params: _optionalChain([routeMatch, 'optionalAccess', _228 => _228.params]) || {},
|
|
3168
|
+
layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _229 => _229.layouts]) || []).map((l) => l.pattern)
|
|
3151
3169
|
});
|
|
3152
3170
|
}
|
|
3153
3171
|
const renderPayload = {
|
|
3154
3172
|
pathname,
|
|
3155
3173
|
method,
|
|
3156
|
-
routePattern: _optionalChain([routeMatch, 'optionalAccess',
|
|
3157
|
-
params: _optionalChain([routeMatch, 'optionalAccess',
|
|
3174
|
+
routePattern: _optionalChain([routeMatch, 'optionalAccess', _230 => _230.route, 'optionalAccess', _231 => _231.pattern]) || null,
|
|
3175
|
+
params: _optionalChain([routeMatch, 'optionalAccess', _232 => _232.params]) || {}
|
|
3158
3176
|
};
|
|
3159
3177
|
const shouldInterceptResponse = Boolean(
|
|
3160
3178
|
pm && (hasAfterResponseHook || hasHTMLTransformHook || runtimeSession && hasRuntimeAfterHook)
|
|
@@ -3176,7 +3194,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3176
3194
|
emitError: (error) => emitPluginError("response-end", error, { pathname })
|
|
3177
3195
|
}) : void 0;
|
|
3178
3196
|
try {
|
|
3179
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
3197
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _233 => _233.hasMiddleware, 'call', _234 => _234()])) {
|
|
3180
3198
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
3181
3199
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
3182
3200
|
farmApp.getServerRenderer(),
|
|
@@ -3186,7 +3204,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3186
3204
|
() => middlewareManager.execute(req, res)
|
|
3187
3205
|
);
|
|
3188
3206
|
if (handled) {
|
|
3189
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
3207
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _235 => _235.isEnded, 'call', _236 => _236()])) {
|
|
3190
3208
|
const duration = Date.now() - startTime;
|
|
3191
3209
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
3192
3210
|
}
|
|
@@ -3199,14 +3217,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3199
3217
|
req.url || "/",
|
|
3200
3218
|
`http://${req.headers.host || "localhost:3000"}`
|
|
3201
3219
|
).pathname;
|
|
3202
|
-
const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access',
|
|
3220
|
+
const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _237 => _237.matchRoute, 'call', _238 => _238(currentPathname), 'optionalAccess', _239 => _239.route]));
|
|
3203
3221
|
await pm.runHookParallelFiltered(
|
|
3204
3222
|
"beforeRequest",
|
|
3205
3223
|
(plugin) => !hasLocalPageRoute || plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
3206
3224
|
req,
|
|
3207
3225
|
res
|
|
3208
3226
|
);
|
|
3209
|
-
if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access',
|
|
3227
|
+
if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access', _240 => _240.url, 'optionalAccess', _241 => _241.startsWith, 'call', _242 => _242("/")]) && !res.writableEnded) {
|
|
3210
3228
|
const destinationUrl = new URL(req.url, fullUrl);
|
|
3211
3229
|
const destinationMatch = routeManager2.matchRoute(destinationUrl.pathname);
|
|
3212
3230
|
const guarded = await pm.runRuntimeBeforeForRewrite(
|
|
@@ -3216,8 +3234,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3216
3234
|
kind: "page",
|
|
3217
3235
|
route: {
|
|
3218
3236
|
pathname: destinationUrl.pathname,
|
|
3219
|
-
pattern: _optionalChain([destinationMatch, 'optionalAccess',
|
|
3220
|
-
params: _optionalChain([destinationMatch, 'optionalAccess',
|
|
3237
|
+
pattern: _optionalChain([destinationMatch, 'optionalAccess', _243 => _243.route, 'optionalAccess', _244 => _244.pattern]) || null,
|
|
3238
|
+
params: _optionalChain([destinationMatch, 'optionalAccess', _245 => _245.params]) || {}
|
|
3221
3239
|
}
|
|
3222
3240
|
}
|
|
3223
3241
|
);
|
|
@@ -3229,8 +3247,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3229
3247
|
}
|
|
3230
3248
|
}
|
|
3231
3249
|
}
|
|
3232
|
-
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess',
|
|
3233
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
3250
|
+
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _246 => _246.isEnded, 'call', _247 => _247()])) {
|
|
3251
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _248 => _248.isEnded, 'call', _249 => _249()])) {
|
|
3234
3252
|
const duration = Date.now() - startTime;
|
|
3235
3253
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
3236
3254
|
}
|
|
@@ -3279,6 +3297,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3279
3297
|
}
|
|
3280
3298
|
},
|
|
3281
3299
|
async load(id, loadOptions) {
|
|
3300
|
+
if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
|
|
3301
|
+
const file = id.split("?", 1)[0];
|
|
3302
|
+
this.addWatchFile(file);
|
|
3303
|
+
const source = await fs2.promises.readFile(file, "utf8");
|
|
3304
|
+
return _nullishCoalesce(_chunkPIUTGRDIcjs.createFarmServerFnBoundaryModule.call(void 0, source, file), () => ( "export {};\n"));
|
|
3305
|
+
}
|
|
3282
3306
|
if (typeof fontImports.load === "function") {
|
|
3283
3307
|
const fontModule = await fontImports.load.call(this, id);
|
|
3284
3308
|
if (fontModule) return fontModule;
|
|
@@ -3288,8 +3312,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3288
3312
|
if (imageModule) return imageModule;
|
|
3289
3313
|
}
|
|
3290
3314
|
if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
3291
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess',
|
|
3292
|
-
const root = _optionalChain([server, 'optionalAccess',
|
|
3315
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _250 => _250.getConfig, 'call', _251 => _251(), 'access', _252 => _252.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
3316
|
+
const root = _optionalChain([server, 'optionalAccess', _253 => _253.config, 'access', _254 => _254.root]) || options.root;
|
|
3293
3317
|
if (isClientEnvironment(this, loadOptions)) {
|
|
3294
3318
|
return generateProgrammaticClientRouteModuleForId(
|
|
3295
3319
|
id,
|
|
@@ -3302,21 +3326,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3302
3326
|
return generateProgrammaticRouteModule(id, root, renderer);
|
|
3303
3327
|
}
|
|
3304
3328
|
if (isFarmClientVirtualId(id)) {
|
|
3305
|
-
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
3306
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3307
|
-
const integrations = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3308
|
-
const root = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3309
|
-
const docs = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3329
|
+
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _255 => _255.getConfig, 'call', _256 => _256()]);
|
|
3330
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _257 => _257.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
3331
|
+
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _258 => _258.integrations]) || options.integrations;
|
|
3332
|
+
const root = _optionalChain([resolvedConfig, 'optionalAccess', _259 => _259.root]) || _optionalChain([server, 'optionalAccess', _260 => _260.config, 'access', _261 => _261.root]) || process.cwd();
|
|
3333
|
+
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _262 => _262.docs]);
|
|
3310
3334
|
const adapterOwnsDocsRuntime = Boolean(
|
|
3311
|
-
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess',
|
|
3335
|
+
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _263 => _263.adapter, 'optionalAccess', _264 => _264.server]) && docs.adapter.react
|
|
3312
3336
|
);
|
|
3313
|
-
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3337
|
+
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _265 => _265.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
3314
3338
|
const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
|
|
3315
|
-
_optionalChain([docs, 'optionalAccess',
|
|
3316
|
-
_optionalChain([docs, 'optionalAccess',
|
|
3339
|
+
_optionalChain([docs, 'optionalAccess', _266 => _266.enabled]) ? loadFarmDocsDevRuntime() : null,
|
|
3340
|
+
_optionalChain([docs, 'optionalAccess', _267 => _267.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
|
|
3317
3341
|
devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
|
|
3318
3342
|
]);
|
|
3319
|
-
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess',
|
|
3343
|
+
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _268 => _268.isFarmDocsSearchEnabled, 'call', _269 => _269(docs)]), () => ( false));
|
|
3320
3344
|
const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
|
|
3321
3345
|
docsSearchEnabled,
|
|
3322
3346
|
docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
|
|
@@ -3324,10 +3348,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3324
3348
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
3325
3349
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkBPNOYILCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
3326
3350
|
const integrationProviders = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkWAPQWAE6cjs.getIntegrationProviders.call(void 0, integrations) : [];
|
|
3327
|
-
const isolatedHydrationMode =
|
|
3328
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3351
|
+
const isolatedHydrationMode = _chunkF42U3R4Fcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
3352
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _270 => _270.experimental, 'optionalAccess', _271 => _271.isolatedClientHydration]),
|
|
3329
3353
|
{
|
|
3330
|
-
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3354
|
+
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _272 => _272.experimental, 'optionalAccess', _273 => _273.serverComponents])) === "rsc",
|
|
3331
3355
|
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
|
|
3332
3356
|
}
|
|
3333
3357
|
);
|
|
@@ -3335,32 +3359,32 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3335
3359
|
integrationProviders,
|
|
3336
3360
|
[
|
|
3337
3361
|
..._chunkWAPQWAE6cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
3338
|
-
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess',
|
|
3362
|
+
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _274 => _274.getFarmDocsDocumentNavigationMatchers, 'call', _275 => _275(docs)]), () => ( []))
|
|
3339
3363
|
],
|
|
3340
3364
|
generatedDocsSearchRuntime,
|
|
3341
3365
|
`${generatedDevtoolsClientRuntime}
|
|
3342
3366
|
${generatedDevIndicatorsClientRuntime}`,
|
|
3343
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3367
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _276 => _276.plugins]) || [],
|
|
3344
3368
|
root,
|
|
3345
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3346
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3347
|
-
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess',
|
|
3369
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _277 => _277.srcDir]) || options.srcDir || "src",
|
|
3370
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _278 => _278.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
3371
|
+
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _279 => _279.adapter, 'optionalAccess', _280 => _280.react]) : void 0,
|
|
3348
3372
|
renderer,
|
|
3349
|
-
isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
3350
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3351
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3352
|
-
|
|
3353
|
-
|
|
3373
|
+
isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _281 => _281.getRouteManager, 'call', _282 => _282(), 'access', _283 => _283.getIsolatedClientBoundaryModules, 'call', _284 => _284(root)])))), 'optionalAccess', _285 => _285.size]) > 0,
|
|
3374
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _286 => _286.trailingSlash]), () => ( false)),
|
|
3375
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _287 => _287.basePath]), () => ( "/")),
|
|
3376
|
+
_chunkF42U3R4Fcjs.generateClientCachePersistenceCode.call(void 0,
|
|
3377
|
+
_chunkF42U3R4Fcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _288 => _288.cache]))
|
|
3354
3378
|
),
|
|
3355
3379
|
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
3356
|
-
_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3380
|
+
_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _289 => _289.experimental, 'optionalAccess', _290 => _290.serverComponents])) === "islands"
|
|
3357
3381
|
);
|
|
3358
3382
|
}
|
|
3359
3383
|
if (id === "/@farm/server") {
|
|
3360
3384
|
return generateServerCode();
|
|
3361
3385
|
}
|
|
3362
3386
|
if (id === "/@farm/manifest") {
|
|
3363
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
3387
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _291 => _291.getRouteManager, 'call', _292 => _292()]);
|
|
3364
3388
|
if (!routeManager) {
|
|
3365
3389
|
return `
|
|
3366
3390
|
export const getManifest = () => ({
|
|
@@ -3373,9 +3397,9 @@ export const getManifest = () => ({
|
|
|
3373
3397
|
`;
|
|
3374
3398
|
}
|
|
3375
3399
|
const manifest = routeManager.generateClientManifest(server.config.root);
|
|
3376
|
-
const globalStylesheetHref =
|
|
3400
|
+
const globalStylesheetHref = _chunkF42U3R4Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
3377
3401
|
server.config.root,
|
|
3378
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
3402
|
+
_optionalChain([farmApp, 'optionalAccess', _293 => _293.getConfig, 'call', _294 => _294(), 'access', _295 => _295.srcDir])
|
|
3379
3403
|
);
|
|
3380
3404
|
const fullManifest = {
|
|
3381
3405
|
clientEntry: "/@farm/client.js",
|
|
@@ -3401,11 +3425,11 @@ export const getManifest = () => ({
|
|
|
3401
3425
|
};
|
|
3402
3426
|
}
|
|
3403
3427
|
for (const layout of manifest.layouts) {
|
|
3404
|
-
const groupScope =
|
|
3428
|
+
const groupScope = _chunk76GHW3WIcjs.getRouteGroupScope.call(void 0, layout.pattern);
|
|
3405
3429
|
fullManifest.layouts[layout.pattern] = {
|
|
3406
3430
|
modulePath: layout.modulePath,
|
|
3407
3431
|
pattern: layout.pattern,
|
|
3408
|
-
...groupScope ? { urlPattern:
|
|
3432
|
+
...groupScope ? { urlPattern: _chunk76GHW3WIcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
|
|
3409
3433
|
shouldHydrate: layout.shouldHydrate,
|
|
3410
3434
|
islandStrategy: layout.islandStrategy,
|
|
3411
3435
|
// Islands mode: rebuilt from its server tree, so its module is never preloaded.
|
|
@@ -3431,37 +3455,46 @@ export const manifest = getManifest();
|
|
|
3431
3455
|
}
|
|
3432
3456
|
},
|
|
3433
3457
|
async transform(code, id, transformOptions) {
|
|
3434
|
-
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3435
|
-
if (
|
|
3458
|
+
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _296 => _296.getConfig, 'call', _297 => _297()]), () => ( options));
|
|
3459
|
+
if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
3460
|
+
const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
|
|
3461
|
+
environment: _optionalChain([transformOptions, 'optionalAccess', _298 => _298.ssr]) === true ? "rsc" : "client"
|
|
3462
|
+
});
|
|
3463
|
+
if (serverFns) {
|
|
3464
|
+
if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
|
|
3465
|
+
code = serverFns.code;
|
|
3466
|
+
}
|
|
3467
|
+
}
|
|
3468
|
+
if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _299 => _299.experimental, 'optionalAccess', _300 => _300.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
3436
3469
|
const file = id.split("?", 1)[0];
|
|
3437
3470
|
const actionModule = transformFarmFormActionModule({
|
|
3438
3471
|
code,
|
|
3439
3472
|
id,
|
|
3440
|
-
root: actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
3441
|
-
ssr: _optionalChain([transformOptions, 'optionalAccess',
|
|
3473
|
+
root: actionConfig.root || _optionalChain([server, 'optionalAccess', _301 => _301.config, 'access', _302 => _302.root]) || process.cwd(),
|
|
3474
|
+
ssr: _optionalChain([transformOptions, 'optionalAccess', _303 => _303.ssr]) === true,
|
|
3442
3475
|
// Parsed by file type: page components are TSX.
|
|
3443
3476
|
parse: (source) => _vite.parseSync.call(void 0, file, source).program
|
|
3444
3477
|
});
|
|
3445
3478
|
if (actionModule) return { code: actionModule, map: null };
|
|
3446
3479
|
}
|
|
3447
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
3448
|
-
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess',
|
|
3449
|
-
if (
|
|
3450
|
-
const redacted =
|
|
3480
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _304 => _304.ssr])) {
|
|
3481
|
+
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _305 => _305.getConfig, 'call', _306 => _306(), 'optionalAccess', _307 => _307.docs]));
|
|
3482
|
+
if (_chunkF42U3R4Fcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
3483
|
+
const redacted = _chunkF42U3R4Fcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
3451
3484
|
if (redacted !== null) return { code: redacted, map: null };
|
|
3452
3485
|
}
|
|
3453
3486
|
}
|
|
3454
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
3455
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3456
|
-
if (_optionalChain([currentConfig, 'access',
|
|
3487
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _308 => _308.ssr])) {
|
|
3488
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _309 => _309.getConfig, 'call', _310 => _310()]), () => ( options));
|
|
3489
|
+
if ((_optionalChain([currentConfig, 'access', _311 => _311.experimental, 'optionalAccess', _312 => _312.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
3457
3490
|
const violation = findClientServerFnViolation(code, id);
|
|
3458
3491
|
if (violation) {
|
|
3459
3492
|
this.error(formatServerFnBoundaryError(violation, id));
|
|
3460
3493
|
}
|
|
3461
3494
|
}
|
|
3462
3495
|
}
|
|
3463
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
3464
|
-
warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3496
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _313 => _313.ssr]) && shouldInspectClientBoundary(id, code)) {
|
|
3497
|
+
warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _314 => _314.getConfig, 'call', _315 => _315()]), () => ( options)));
|
|
3465
3498
|
}
|
|
3466
3499
|
if (typeof imageImports.transform === "function") {
|
|
3467
3500
|
const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
|
|
@@ -3476,13 +3509,13 @@ export const manifest = getManifest();
|
|
|
3476
3509
|
id,
|
|
3477
3510
|
transformOptions
|
|
3478
3511
|
);
|
|
3479
|
-
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess',
|
|
3512
|
+
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _316 => _316.code, 'optionalAccess', _317 => _317.toString, 'call', _318 => _318()]);
|
|
3480
3513
|
if (fontCode) {
|
|
3481
3514
|
transformedCode = fontCode;
|
|
3482
3515
|
transformed = true;
|
|
3483
3516
|
}
|
|
3484
3517
|
}
|
|
3485
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
3518
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _319 => _319.ssr]) && server) {
|
|
3486
3519
|
const rewrittenImports = rewriteEarlySsrRelativeImports({
|
|
3487
3520
|
code: transformedCode,
|
|
3488
3521
|
id,
|
|
@@ -3494,28 +3527,28 @@ export const manifest = getManifest();
|
|
|
3494
3527
|
transformed = true;
|
|
3495
3528
|
}
|
|
3496
3529
|
}
|
|
3497
|
-
if (
|
|
3530
|
+
if (_chunkF42U3R4Fcjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
3498
3531
|
const clientBoundarySource = transformedCode;
|
|
3499
3532
|
const moduleInfo = this.getModuleInfo(id);
|
|
3500
3533
|
if (moduleInfo) {
|
|
3501
3534
|
moduleInfo.isClientComponent = true;
|
|
3502
3535
|
}
|
|
3503
|
-
transformedCode =
|
|
3536
|
+
transformedCode = _chunkF42U3R4Fcjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
3504
3537
|
transformed = true;
|
|
3505
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3538
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _320 => _320.getConfig, 'call', _321 => _321()]), () => ( options));
|
|
3506
3539
|
let isolatedModuleReference = null;
|
|
3507
|
-
const root = currentConfig.root || _optionalChain([server, 'optionalAccess',
|
|
3540
|
+
const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _322 => _322.config, 'access', _323 => _323.root]) || process.cwd();
|
|
3508
3541
|
const cleanId = id.split("?", 1)[0];
|
|
3509
|
-
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
3510
|
-
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess',
|
|
3511
|
-
if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration &&
|
|
3512
|
-
isolatedModuleReference =
|
|
3542
|
+
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _324 => _324.getRouteManager, 'call', _325 => _325(), 'access', _326 => _326.getIsolatedClientBoundaryModules, 'call', _327 => _327(root)])));
|
|
3543
|
+
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _328 => _328.has, 'call', _329 => _329(path5.resolve(cleanId))]) === true;
|
|
3544
|
+
if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && _chunkF42U3R4Fcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource)) {
|
|
3545
|
+
isolatedModuleReference = _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
3513
3546
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
3514
3547
|
code: transformedCode,
|
|
3515
3548
|
moduleReference: isolatedModuleReference,
|
|
3516
|
-
islandStrategy: _nullishCoalesce(
|
|
3549
|
+
islandStrategy: _nullishCoalesce(_chunkF42U3R4Fcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
|
|
3517
3550
|
parse: (source) => this.parse(source),
|
|
3518
|
-
slots: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access',
|
|
3551
|
+
slots: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverComponents])) === "islands"
|
|
3519
3552
|
});
|
|
3520
3553
|
if (!transformedBoundary) {
|
|
3521
3554
|
this.error(
|
|
@@ -3545,7 +3578,7 @@ export const manifest = getManifest();
|
|
|
3545
3578
|
);
|
|
3546
3579
|
return;
|
|
3547
3580
|
}` : "";
|
|
3548
|
-
const hmrCode = _optionalChain([transformOptions, 'optionalAccess',
|
|
3581
|
+
const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _332 => _332.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
|
|
3549
3582
|
if (import.meta.hot) {
|
|
3550
3583
|
import.meta.hot.accept((newModule) => {
|
|
3551
3584
|
${isolatedHmrUpdate}
|
|
@@ -3595,19 +3628,19 @@ if (import.meta.hot) {
|
|
|
3595
3628
|
if (!routeManager) return;
|
|
3596
3629
|
const { ssg: ssgPages, ssr: ssrRoutes } = await routeManager.collectSSGPages();
|
|
3597
3630
|
if (ssgPages.length === 0) {
|
|
3598
|
-
|
|
3631
|
+
_chunkVQJYGZNXcjs.logger.info("No SSG pages found - all pages will use SSR");
|
|
3599
3632
|
return;
|
|
3600
3633
|
}
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
const outDir = path5.join(_optionalChain([server, 'optionalAccess',
|
|
3634
|
+
_chunkVQJYGZNXcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
|
|
3635
|
+
_chunkVQJYGZNXcjs.logger.info("Pre-rendering SSG pages...");
|
|
3636
|
+
const outDir = path5.join(_optionalChain([server, 'optionalAccess', _333 => _333.config, 'access', _334 => _334.root]) || process.cwd(), options.outDir || "dist");
|
|
3604
3637
|
const clientDir = path5.join(outDir, "client");
|
|
3605
3638
|
for (const page of ssgPages) {
|
|
3606
3639
|
try {
|
|
3607
3640
|
const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
|
|
3608
3641
|
await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
|
|
3609
3642
|
const mod = await routeManager.loadRouteModule(page.filePath);
|
|
3610
|
-
if (!_optionalChain([mod, 'optionalAccess',
|
|
3643
|
+
if (!_optionalChain([mod, 'optionalAccess', _335 => _335.default])) return;
|
|
3611
3644
|
const { layouts } = routeManager.matchRoute(page.urlPath);
|
|
3612
3645
|
const layoutModules = await Promise.all(
|
|
3613
3646
|
layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
|
|
@@ -3617,7 +3650,7 @@ if (import.meta.hot) {
|
|
|
3617
3650
|
const PageComponent = mod.default;
|
|
3618
3651
|
const pageProps = {
|
|
3619
3652
|
params: page.params,
|
|
3620
|
-
searchParams:
|
|
3653
|
+
searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, {}),
|
|
3621
3654
|
path: page.urlPath
|
|
3622
3655
|
};
|
|
3623
3656
|
let pageElement = React.createElement(
|
|
@@ -3639,7 +3672,7 @@ if (import.meta.hot) {
|
|
|
3639
3672
|
const i18nSnapshot = _chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
3640
3673
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
3641
3674
|
const fullHtml = `<!DOCTYPE html>
|
|
3642
|
-
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
3675
|
+
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _336 => _336.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
3643
3676
|
<head>
|
|
3644
3677
|
<meta charset="utf-8">
|
|
3645
3678
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -3657,10 +3690,10 @@ if (import.meta.hot) {
|
|
|
3657
3690
|
fs2.mkdirSync(path5.dirname(outputPath), { recursive: true });
|
|
3658
3691
|
fs2.writeFileSync(outputPath, fullHtml);
|
|
3659
3692
|
const revalidateInfo = page.revalidate ? ` (revalidate: ${page.revalidate}s)` : "";
|
|
3660
|
-
|
|
3693
|
+
_chunkVQJYGZNXcjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
|
|
3661
3694
|
});
|
|
3662
3695
|
} catch (error) {
|
|
3663
|
-
|
|
3696
|
+
_chunkVQJYGZNXcjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
|
|
3664
3697
|
}
|
|
3665
3698
|
}
|
|
3666
3699
|
const manifestPath = path5.join(outDir, "__ssg_manifest.json");
|
|
@@ -3676,9 +3709,9 @@ if (import.meta.hot) {
|
|
|
3676
3709
|
2
|
|
3677
3710
|
)
|
|
3678
3711
|
);
|
|
3679
|
-
|
|
3712
|
+
_chunkVQJYGZNXcjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
|
|
3680
3713
|
} catch (error) {
|
|
3681
|
-
|
|
3714
|
+
_chunkVQJYGZNXcjs.logger.error(`SSG build failed: ${error}`);
|
|
3682
3715
|
}
|
|
3683
3716
|
},
|
|
3684
3717
|
async handleHotUpdate(ctx) {
|
|
@@ -3697,13 +3730,13 @@ if (import.meta.hot) {
|
|
|
3697
3730
|
});
|
|
3698
3731
|
}
|
|
3699
3732
|
}
|
|
3700
|
-
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
3733
|
+
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _337 => _337.getConfig, 'call', _338 => _338()]);
|
|
3701
3734
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
3702
3735
|
if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
3703
|
-
(appDir) => normalizedFile.startsWith(`${
|
|
3736
|
+
(appDir) => normalizedFile.startsWith(`${_chunkVQJYGZNXcjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
3704
3737
|
)) {
|
|
3705
3738
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
3706
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3739
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _339 => _339(`updated ${file}`)]);
|
|
3707
3740
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
3708
3741
|
return [];
|
|
3709
3742
|
}
|
|
@@ -3713,7 +3746,7 @@ if (import.meta.hot) {
|
|
|
3713
3746
|
for (const mod of modules) {
|
|
3714
3747
|
server2.moduleGraph.invalidateModule(mod);
|
|
3715
3748
|
}
|
|
3716
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3749
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _340 => _340(`updated ${file}`)]);
|
|
3717
3750
|
server2.ws.send({
|
|
3718
3751
|
type: "full-reload",
|
|
3719
3752
|
path: "*"
|
|
@@ -3726,7 +3759,7 @@ if (import.meta.hot) {
|
|
|
3726
3759
|
for (const mod of modules) {
|
|
3727
3760
|
server2.moduleGraph.invalidateModule(mod);
|
|
3728
3761
|
}
|
|
3729
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3762
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _341 => _341(`updated ${file}`)]);
|
|
3730
3763
|
server2.ws.send({
|
|
3731
3764
|
type: "full-reload",
|
|
3732
3765
|
path: "*"
|
|
@@ -3734,12 +3767,12 @@ if (import.meta.hot) {
|
|
|
3734
3767
|
return [];
|
|
3735
3768
|
}
|
|
3736
3769
|
if (apiRouteManager && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
|
|
3737
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3770
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _342 => _342(`updated ${file}`)]);
|
|
3738
3771
|
}
|
|
3739
|
-
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
3740
|
-
const planRouteManager = _optionalChain([farmApp, 'optionalAccess',
|
|
3772
|
+
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _343 => _343.experimental, 'optionalAccess', _344 => _344.isolatedClientHydration]);
|
|
3773
|
+
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _345 => _345.getRouteManager, 'call', _346 => _346()]);
|
|
3741
3774
|
const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
|
|
3742
|
-
const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
3775
|
+
const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _347 => _347.renderer])) && planRouteManager !== void 0;
|
|
3743
3776
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
3744
3777
|
const routeManager = planRouteManager;
|
|
3745
3778
|
if (routeManager) {
|
|
@@ -3763,7 +3796,7 @@ if (import.meta.hot) {
|
|
|
3763
3796
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
3764
3797
|
for (const boundary of /* @__PURE__ */ new Set([...previousBoundaries, ...nextBoundaries])) {
|
|
3765
3798
|
if (previousBoundaries.has(boundary) === nextBoundaries.has(boundary)) continue;
|
|
3766
|
-
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(
|
|
3799
|
+
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkVQJYGZNXcjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
|
|
3767
3800
|
server2.moduleGraph.invalidateModule(mod);
|
|
3768
3801
|
}
|
|
3769
3802
|
}
|
|
@@ -3775,7 +3808,7 @@ if (import.meta.hot) {
|
|
|
3775
3808
|
return [];
|
|
3776
3809
|
}
|
|
3777
3810
|
} catch (error) {
|
|
3778
|
-
|
|
3811
|
+
_chunkVQJYGZNXcjs.logger.warn(
|
|
3779
3812
|
`[Farm.js] Could not refresh the client hydration plan after ${file}: ${error instanceof Error ? error.message : String(error)}`
|
|
3780
3813
|
);
|
|
3781
3814
|
return modules;
|
|
@@ -3786,7 +3819,7 @@ if (import.meta.hot) {
|
|
|
3786
3819
|
if (normalizedFile.includes("middleware.")) {
|
|
3787
3820
|
if (middlewareManager) {
|
|
3788
3821
|
await middlewareManager.reload();
|
|
3789
|
-
|
|
3822
|
+
_chunkVQJYGZNXcjs.logger.success("\u2705 Middleware reloaded!");
|
|
3790
3823
|
if (initialPluginManager) {
|
|
3791
3824
|
for (const middleware of middlewareManager.getMiddlewares()) {
|
|
3792
3825
|
await initialPluginManager.runHookParallel("middlewareDiscovered", {
|
|
@@ -3799,7 +3832,7 @@ if (import.meta.hot) {
|
|
|
3799
3832
|
}
|
|
3800
3833
|
return [];
|
|
3801
3834
|
}
|
|
3802
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
3835
|
+
_optionalChain([farmApp, 'optionalAccess', _348 => _348.getRouteManager, 'call', _349 => _349(), 'access', _350 => _350.invalidateClientManifest, 'call', _351 => _351()]);
|
|
3803
3836
|
const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
|
|
3804
3837
|
if (manifestModule) {
|
|
3805
3838
|
server2.moduleGraph.invalidateModule(manifestModule);
|
|
@@ -3855,12 +3888,12 @@ function isFarmClientVirtualId(id) {
|
|
|
3855
3888
|
}
|
|
3856
3889
|
function isClientEnvironment(context, loadOptions) {
|
|
3857
3890
|
const environment = context.environment;
|
|
3858
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
3859
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
3860
|
-
return _optionalChain([loadOptions, 'optionalAccess',
|
|
3891
|
+
if (_optionalChain([environment, 'optionalAccess', _352 => _352.config, 'optionalAccess', _353 => _353.consumer])) return environment.config.consumer === "client";
|
|
3892
|
+
if (_optionalChain([environment, 'optionalAccess', _354 => _354.name])) return environment.name === "client";
|
|
3893
|
+
return _optionalChain([loadOptions, 'optionalAccess', _355 => _355.ssr]) !== true;
|
|
3861
3894
|
}
|
|
3862
3895
|
function invalidateProgrammaticClientRouteModules(server) {
|
|
3863
|
-
const graph = _optionalChain([server, 'access',
|
|
3896
|
+
const graph = _optionalChain([server, 'access', _356 => _356.environments, 'optionalAccess', _357 => _357.client, 'optionalAccess', _358 => _358.moduleGraph]);
|
|
3864
3897
|
if (!graph) return;
|
|
3865
3898
|
for (const [id, module] of graph.idToModuleMap) {
|
|
3866
3899
|
if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
|
|
@@ -3874,7 +3907,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
3874
3907
|
kind: parsed.kind,
|
|
3875
3908
|
routePath: parsed.routePath,
|
|
3876
3909
|
routesFile,
|
|
3877
|
-
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess',
|
|
3910
|
+
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _359 => _359.routes, 'access', _360 => _360.get, 'call', _361 => _361(
|
|
3878
3911
|
_chunkJ37KTQIAcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
3879
3912
|
)]),
|
|
3880
3913
|
rendererServer: renderer.server,
|
|
@@ -3882,11 +3915,11 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
3882
3915
|
});
|
|
3883
3916
|
}
|
|
3884
3917
|
function resolveRealModuleFile(filePath, root) {
|
|
3885
|
-
const resolved = _nullishCoalesce(
|
|
3918
|
+
const resolved = _nullishCoalesce(_chunkF42U3R4Fcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
3886
3919
|
try {
|
|
3887
|
-
return
|
|
3920
|
+
return _chunkVQJYGZNXcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
3888
3921
|
} catch (e15) {
|
|
3889
|
-
return
|
|
3922
|
+
return _chunkVQJYGZNXcjs.toPosixPath.call(void 0, resolved);
|
|
3890
3923
|
}
|
|
3891
3924
|
}
|
|
3892
3925
|
function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkRD623KW4cjs.REACT_RENDERER) {
|
|
@@ -4182,7 +4215,7 @@ export const OPTIONS = __farmRoute.methods.OPTIONS;
|
|
|
4182
4215
|
`.trim();
|
|
4183
4216
|
}
|
|
4184
4217
|
function toProgrammaticRouteImportSpecifier(filePath, root) {
|
|
4185
|
-
return root ?
|
|
4218
|
+
return root ? _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, filePath, root) : filePath;
|
|
4186
4219
|
}
|
|
4187
4220
|
async function parseRouteModuleProps(routeModule, input) {
|
|
4188
4221
|
if (typeof routeModule.__farmResolveRouteProps === "function") {
|
|
@@ -4196,17 +4229,17 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
4196
4229
|
}
|
|
4197
4230
|
const schemas = routeModule.__farmRouteSchemas;
|
|
4198
4231
|
const params = parseRouteModuleSchema(
|
|
4199
|
-
_optionalChain([schemas, 'optionalAccess',
|
|
4232
|
+
_optionalChain([schemas, 'optionalAccess', _362 => _362.params]),
|
|
4200
4233
|
input.props.params,
|
|
4201
4234
|
"params",
|
|
4202
4235
|
input.routePath
|
|
4203
4236
|
);
|
|
4204
|
-
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess',
|
|
4237
|
+
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _363 => _363.search]), input.search, "search", input.routePath);
|
|
4205
4238
|
return {
|
|
4206
4239
|
...input.props,
|
|
4207
4240
|
params,
|
|
4208
4241
|
search,
|
|
4209
|
-
searchParams:
|
|
4242
|
+
searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, search)
|
|
4210
4243
|
};
|
|
4211
4244
|
}
|
|
4212
4245
|
function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
@@ -4221,12 +4254,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
4221
4254
|
}
|
|
4222
4255
|
}
|
|
4223
4256
|
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkRD623KW4cjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
4224
|
-
const providerClientCode =
|
|
4257
|
+
const providerClientCode = _chunkF42U3R4Fcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
4225
4258
|
integrationProviders,
|
|
4226
4259
|
root,
|
|
4227
4260
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
4228
4261
|
);
|
|
4229
|
-
const clientPluginEntry =
|
|
4262
|
+
const clientPluginEntry = _chunkF42U3R4Fcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
4230
4263
|
plugins,
|
|
4231
4264
|
root,
|
|
4232
4265
|
srcDir,
|
|
@@ -4235,7 +4268,7 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
|
|
|
4235
4268
|
const appSetupPath = _chunkRD623KW4cjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
|
|
4236
4269
|
const rendererClientImports = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
|
|
4237
4270
|
import { hydrateRoot, createRoot } from 'react-dom/client'` : appSetupPath ? `import React, { hydrateRoot, createRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)}
|
|
4238
|
-
import __farmAppSetup from ${JSON.stringify(
|
|
4271
|
+
import __farmAppSetup from ${JSON.stringify(_chunkVQJYGZNXcjs.toViteModuleId.call(void 0, appSetupPath, root))}
|
|
4239
4272
|
__farmConfigureApp(__farmAppSetup)` : `import React, { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}`;
|
|
4240
4273
|
const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
|
|
4241
4274
|
const docsAdapterImportBlock = _chunkSM2SYWARcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
|
|
@@ -4274,7 +4307,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
4274
4307
|
return null;
|
|
4275
4308
|
}
|
|
4276
4309
|
}
|
|
4277
|
-
${islandValues ? `${
|
|
4310
|
+
${islandValues ? `${_chunkF42U3R4Fcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
4278
4311
|
let farmLastRouteState = null;
|
|
4279
4312
|
|
|
4280
4313
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -4294,7 +4327,7 @@ ${isolatedHydrationImport}
|
|
|
4294
4327
|
import { installChunkErrorRecovery, SPARouter } from '@farm.js/core/client'
|
|
4295
4328
|
import { createClientPluginManager } from '@farm.js/core/plugin/client'
|
|
4296
4329
|
import { isFarmRouteActive } from '@farm.js/core/router'
|
|
4297
|
-
import { isFarmBlockedNavigationURL, replayFarmQueuedInteraction, scheduleFarmIslandHydration, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
|
|
4330
|
+
import { isFarmBlockedNavigationURL, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
|
|
4298
4331
|
import { reviveDeferredData } from '@farm.js/core/deferred'
|
|
4299
4332
|
import {
|
|
4300
4333
|
createFarmDeploymentMismatchError,
|
|
@@ -5083,7 +5116,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
5083
5116
|
return loadedLayouts;
|
|
5084
5117
|
}
|
|
5085
5118
|
|
|
5086
|
-
${
|
|
5119
|
+
${_chunkF42U3R4Fcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
5087
5120
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
5088
5121
|
let wrapped = element;
|
|
5089
5122
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -5119,7 +5152,7 @@ async function buildRouteComponentProps(pageModule, params, searchParams, path,
|
|
|
5119
5152
|
window.__FARM_PROPS__ = revivedProps;
|
|
5120
5153
|
return {
|
|
5121
5154
|
...revivedProps,
|
|
5122
|
-
searchParams:
|
|
5155
|
+
searchParams: createFarmSearchParams(revivedProps.search ?? revivedProps.searchParams ?? {}),
|
|
5123
5156
|
path: revivedProps.path || path,
|
|
5124
5157
|
};
|
|
5125
5158
|
}
|
|
@@ -5128,7 +5161,7 @@ async function buildRouteComponentProps(pageModule, params, searchParams, path,
|
|
|
5128
5161
|
const rawProps = {
|
|
5129
5162
|
...(existingProps || {}),
|
|
5130
5163
|
params,
|
|
5131
|
-
searchParams:
|
|
5164
|
+
searchParams: createFarmSearchParams(searchParams),
|
|
5132
5165
|
path,
|
|
5133
5166
|
};
|
|
5134
5167
|
// Keep top-level route errors inside the router's navigation transaction.
|
|
@@ -5934,9 +5967,9 @@ function generateClientManifest(bundle) {
|
|
|
5934
5967
|
return manifest;
|
|
5935
5968
|
}
|
|
5936
5969
|
async function defineConfig(config = {}) {
|
|
5937
|
-
const tailwindVitePlugin = await
|
|
5970
|
+
const tailwindVitePlugin = await _chunkLNM57D3Hcjs.loadTailwindVitePlugin.call(void 0, );
|
|
5938
5971
|
const appRoot = path5.resolve(config.root || process.cwd());
|
|
5939
|
-
if (_optionalChain([config, 'access',
|
|
5972
|
+
if (_optionalChain([config, 'access', _364 => _364.extends, 'optionalAccess', _365 => _365.length])) {
|
|
5940
5973
|
const { config: layeredConfig } = await import("./layers-DMRXRL7F.cjs").then(
|
|
5941
5974
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
5942
5975
|
root: appRoot,
|
|
@@ -5946,7 +5979,7 @@ async function defineConfig(config = {}) {
|
|
|
5946
5979
|
config = layeredConfig;
|
|
5947
5980
|
}
|
|
5948
5981
|
config.renderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
5949
|
-
config.images =
|
|
5982
|
+
config.images = _chunkF42U3R4Fcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
5950
5983
|
const rendererVitePlugins = await _chunkRD623KW4cjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
5951
5984
|
ssr: true
|
|
5952
5985
|
});
|
|
@@ -6038,13 +6071,13 @@ async function defineConfig(config = {}) {
|
|
|
6038
6071
|
if (!serverStarted) {
|
|
6039
6072
|
serverStarted = true;
|
|
6040
6073
|
const elapsed = Date.now() - startTime;
|
|
6041
|
-
const address = _optionalChain([server, 'access',
|
|
6074
|
+
const address = _optionalChain([server, 'access', _366 => _366.httpServer, 'optionalAccess', _367 => _367.address, 'call', _368 => _368()]);
|
|
6042
6075
|
const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
|
|
6043
6076
|
const hostConfig = server.config.server.host;
|
|
6044
6077
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
6045
6078
|
console.log("");
|
|
6046
6079
|
console.log(
|
|
6047
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
6080
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkX5BCMLGPcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
6048
6081
|
);
|
|
6049
6082
|
console.log("");
|
|
6050
6083
|
console.log(
|
|
@@ -6078,7 +6111,7 @@ async function defineConfig(config = {}) {
|
|
|
6078
6111
|
plugins: [
|
|
6079
6112
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
6080
6113
|
_chunkDGOLAZLVcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
6081
|
-
|
|
6114
|
+
_chunkF42U3R4Fcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
6082
6115
|
tailwindVitePlugin,
|
|
6083
6116
|
...rendererVitePlugins,
|
|
6084
6117
|
...reactRefreshPlugins,
|
|
@@ -6092,8 +6125,8 @@ async function defineConfig(config = {}) {
|
|
|
6092
6125
|
customLogger: farmLogger,
|
|
6093
6126
|
clearScreen: false,
|
|
6094
6127
|
optimizeDeps: {
|
|
6095
|
-
...
|
|
6096
|
-
|
|
6128
|
+
..._chunkF42U3R4Fcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
6129
|
+
_chunkF42U3R4Fcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
6097
6130
|
appRoot,
|
|
6098
6131
|
_chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
6099
6132
|
),
|
|
@@ -6136,7 +6169,7 @@ async function defineConfig(config = {}) {
|
|
|
6136
6169
|
// Stub out problematic server-only modules during dev mode
|
|
6137
6170
|
alias: {
|
|
6138
6171
|
..._chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
6139
|
-
...
|
|
6172
|
+
..._chunkF42U3R4Fcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
6140
6173
|
// Nitro internals that should not be resolved in browser
|
|
6141
6174
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
6142
6175
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|