@farm.js/core 0.1.35 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{metadata-WGpBYcGn.d.mts → agent-mcp-BVExL8rZ.d.mts} +45 -2
- package/dist/agent-mcp-handler-LPJ2CADR.mjs +19 -0
- package/dist/agent-mcp-handler-SJAHFSPI.cjs +19 -0
- package/dist/{metadata-BnLDsUOS.d.ts → agent-mcp-luzfXK-P.d.ts} +45 -2
- package/dist/agent-runtime.cjs +5 -3
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +4 -2
- package/dist/api/route-manager.cjs +6 -6
- package/dist/api/route-manager.d.mts +10 -4
- package/dist/api/route-manager.d.ts +10 -4
- package/dist/api/route-manager.mjs +5 -5
- package/dist/api/runtime.cjs +4 -4
- package/dist/api/runtime.d.mts +4 -62
- package/dist/api/runtime.d.ts +4 -62
- package/dist/api/runtime.mjs +3 -3
- package/dist/api.cjs +8 -8
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.mjs +7 -7
- package/dist/{app-D_j9AAVL.d.mts → app-BukwkFIu.d.mts} +17 -3
- package/dist/{app-BXB3JZYc.d.ts → app-Yfa2dsFy.d.ts} +17 -3
- package/dist/app-markdown.cjs +4 -4
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/app-markdown.mjs +3 -3
- package/dist/{chunk-4KU5Q7C2.mjs → chunk-276VJSM6.mjs} +221 -48
- package/dist/{chunk-PFQKNERH.cjs → chunk-2YTDKNH3.cjs} +364 -197
- package/dist/{chunk-UAORZ7QA.mjs → chunk-35GKZR22.mjs} +2 -2
- package/dist/{chunk-QAU5JD57.mjs → chunk-35WV46VL.mjs} +203 -36
- package/dist/{chunk-EFCQPQMG.cjs → chunk-42NHY7HW.cjs} +54 -4
- package/dist/{chunk-SOMHP6GF.mjs → chunk-4E5AEDKY.mjs} +2 -2
- package/dist/{chunk-UJD4PHYB.mjs → chunk-4E5WBPEG.mjs} +72 -354
- package/dist/{chunk-2G2NNLE2.mjs → chunk-4GLOOWKE.mjs} +4 -4
- package/dist/{chunk-62XKI4Z3.cjs → chunk-4NU4GGTC.cjs} +2 -2
- package/dist/{chunk-4JHOT46A.mjs → chunk-4WCZJQUO.mjs} +54 -4
- package/dist/chunk-4WQ6PGSJ.cjs +367 -0
- package/dist/{chunk-SMHH4VDG.mjs → chunk-4WVJLURN.mjs} +1 -1
- package/dist/chunk-6SJ2KJTA.mjs +314 -0
- package/dist/{chunk-IPXLADVO.cjs → chunk-ADEA7PN3.cjs} +122 -61
- package/dist/{chunk-CP6X4AEU.mjs → chunk-AJQTP4OO.mjs} +1 -1
- package/dist/{chunk-4MMGO7YW.cjs → chunk-AO6RYU5N.cjs} +31 -28
- package/dist/{chunk-GFHLGIYC.cjs → chunk-BO36SELV.cjs} +6 -6
- package/dist/{chunk-6TJOML4E.mjs → chunk-BPOF5U4N.mjs} +4 -4
- package/dist/{chunk-JHWOVJ3M.mjs → chunk-BUGNQIHC.mjs} +5 -0
- package/dist/{chunk-FTFYRMQQ.cjs → chunk-CBJJH36A.cjs} +50 -25
- package/dist/{chunk-7GLPRTTF.cjs → chunk-CGBDNNSM.cjs} +2 -2
- package/dist/chunk-CI6E3UOH.cjs +314 -0
- package/dist/{chunk-X6W5FFH6.cjs → chunk-D2BB47NB.cjs} +8 -8
- package/dist/chunk-DTSROJ5J.mjs +367 -0
- package/dist/{chunk-YC6V7PWE.cjs → chunk-DZ5ZVB2K.cjs} +1 -1
- package/dist/{chunk-DBNKI4NF.cjs → chunk-ECKF2BAM.cjs} +6 -2
- package/dist/{chunk-Q3VLETLE.mjs → chunk-EWET4D2Y.mjs} +1 -1
- package/dist/{chunk-HUMR6LSU.mjs → chunk-F5QO4FNE.mjs} +1 -1
- package/dist/{chunk-XBML5KMG.cjs → chunk-FO427P6I.cjs} +22 -12
- package/dist/{chunk-SAZVVAJH.mjs → chunk-GQRWBCWK.mjs} +8 -5
- package/dist/{chunk-F6Z3Y5KL.mjs → chunk-HOXTWRGB.mjs} +1 -1
- package/dist/{chunk-3BHT4WMP.cjs → chunk-JNUWCDTF.cjs} +6 -6
- package/dist/{chunk-73MC7ZL6.cjs → chunk-JZVADIOD.cjs} +2 -2
- package/dist/{chunk-OMVAU7NT.cjs → chunk-KIIMAWOJ.cjs} +11 -1
- package/dist/{chunk-43FMW62B.mjs → chunk-KMTGADN3.mjs} +28 -0
- package/dist/{chunk-6ETPZTJI.mjs → chunk-LSZAVSGY.mjs} +116 -55
- package/dist/{chunk-HMIJDL7S.mjs → chunk-MKYBIIAQ.mjs} +30 -5
- package/dist/{chunk-RU3M2FIK.cjs → chunk-MRMI32SN.cjs} +87 -369
- package/dist/{chunk-7L5V3KQO.cjs → chunk-N2NAS2AM.cjs} +2 -2
- package/dist/{chunk-ICUQICNC.cjs → chunk-NMHWYWDR.cjs} +654 -481
- package/dist/{chunk-G5RT7EXW.mjs → chunk-O6I6VWKK.mjs} +20 -5
- package/dist/{chunk-PDOCJ6RY.mjs → chunk-O6WAEAX3.mjs} +1 -1
- package/dist/{chunk-6DU6UFUE.mjs → chunk-OHLSEQ57.mjs} +16 -8
- package/dist/{chunk-3PXS2MHU.mjs → chunk-OO7GXVSR.mjs} +1 -1
- package/dist/chunk-PTZ2TVNE.cjs +178 -0
- package/dist/{chunk-6WCPV6G2.mjs → chunk-Q2KB32T4.mjs} +1 -1
- package/dist/{chunk-XCACDAZZ.cjs → chunk-S6VYG6XU.cjs} +23 -8
- package/dist/{chunk-VFQT3LAO.cjs → chunk-SDOTRX3V.cjs} +5 -5
- package/dist/{chunk-BMWDEBXO.cjs → chunk-SHLXACIO.cjs} +31 -3
- package/dist/{chunk-22LTEMGQ.mjs → chunk-T4OGRVNS.mjs} +13 -3
- package/dist/{chunk-ZXGAFZDO.cjs → chunk-T5OJPTVN.cjs} +2 -2
- package/dist/{chunk-VZJR7UTG.cjs → chunk-TE2G5ION.cjs} +2 -2
- package/dist/chunk-UH6QN5NL.mjs +178 -0
- package/dist/{chunk-F7JZENPF.cjs → chunk-UVW64BCB.cjs} +38 -30
- package/dist/{chunk-OKZUAXHF.mjs → chunk-VILIPRS6.mjs} +1 -1
- package/dist/{chunk-3UH7MRCP.cjs → chunk-VQLJWDVW.cjs} +13 -13
- package/dist/{chunk-VPTDD5XF.cjs → chunk-WBKEZXWE.cjs} +5 -0
- package/dist/{chunk-EJQT6KZN.cjs → chunk-WC5UV2HQ.cjs} +2 -2
- package/dist/{chunk-YULD7ICZ.mjs → chunk-WZ77PUAM.mjs} +1 -1
- package/dist/{chunk-C35ZBVRD.mjs → chunk-YWMZUGIS.mjs} +6 -2
- package/dist/{chunk-Y7RKTKYI.mjs → chunk-ZMMBIVQM.mjs} +10 -0
- package/dist/{chunk-ULAWS2PA.cjs → chunk-ZWM5KGAA.cjs} +6 -6
- package/dist/{client-plugins-CvIslxWi.d.mts → client-plugins-C3mK9Pol.d.mts} +98 -5
- package/dist/{client-plugins-HIyulDym.d.ts → client-plugins-r1mOtSC1.d.ts} +98 -5
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.d.mts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{devtools-EE5RIBTH.mjs → devtools-ERIKFEXX.mjs} +9 -8
- package/dist/{devtools-EAUY43BS.cjs → devtools-JZJJY5CK.cjs} +10 -9
- package/dist/docs.cjs +12 -11
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +11 -10
- package/dist/image/server.cjs +3 -3
- package/dist/image/server.mjs +2 -2
- package/dist/image/sharp.cjs +10 -10
- package/dist/image/sharp.mjs +2 -2
- package/dist/index.cjs +39 -35
- package/dist/index.d.mts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.mjs +38 -34
- package/dist/integrations.cjs +7 -3
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +6 -2
- package/dist/internal/app-markdown-runtime.cjs +3 -3
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +27 -25
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +26 -24
- package/dist/internal/cli-runtime.cjs +14 -13
- package/dist/internal/cli-runtime.mjs +13 -12
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -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 +10 -9
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +9 -8
- package/dist/internal/isolated-boundary.cjs +2 -2
- package/dist/internal/isolated-boundary.d.mts +0 -1
- package/dist/internal/isolated-boundary.d.ts +0 -1
- package/dist/internal/isolated-boundary.mjs +1 -1
- package/dist/internal/metadata-image-runtime.cjs +3 -3
- package/dist/internal/metadata-image-runtime.mjs +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +23 -9
- package/dist/internal/production-runtime.d.mts +67 -27
- package/dist/internal/production-runtime.d.ts +67 -27
- package/dist/internal/production-runtime.mjs +26 -12
- package/dist/{layers-BRQF5ETU.mjs → layers-UTB43B7A.mjs} +1 -1
- package/dist/layers-VUWIOFEO.cjs +18 -0
- package/dist/markdown.cjs +1 -1
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.mjs +1 -1
- package/dist/middleware.cjs +6 -6
- package/dist/middleware.d.mts +3 -3
- package/dist/middleware.d.ts +3 -3
- package/dist/middleware.mjs +5 -5
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/{nitro-OVPLKPE2.cjs → nitro-7F65EZZS.cjs} +3 -3
- package/dist/{nitro-MXRDCXWZ.mjs → nitro-MPZJGPXK.mjs} +2 -2
- package/dist/plugin.cjs +23 -21
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.mjs +22 -20
- package/dist/{production-runtime-0sRnuYc-.d.mts → production-runtime-CCeVZXst.d.mts} +1 -1
- package/dist/{production-runtime-Crq6CJ-2.d.ts → production-runtime-DPnsggY3.d.ts} +1 -1
- package/dist/{render-plan-gs9GGPzw.d.mts → render-plan-BuGaPFe6.d.mts} +1 -1
- package/dist/{render-plan-8ozZh2Qv.d.ts → render-plan-Cw4f5E_R.d.ts} +1 -1
- package/dist/renderer/react/server.cjs +3 -3
- package/dist/renderer/react/server.mjs +1 -1
- package/dist/renderer-client.d.mts +3 -3
- package/dist/renderer-client.d.ts +3 -3
- package/dist/{request-B5G8rLBH.d.ts → request-Bkg-hERy.d.ts} +1 -1
- package/dist/{request-fkhiynXe.d.mts → request-CsGARcAw.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering-lS5nUMua.d.ts → route-rendering-BUZMH_64.d.ts} +1 -1
- package/dist/{route-rendering-CLnS7AZj.d.mts → route-rendering-f11yh5dp.d.mts} +1 -1
- package/dist/{router-4iuiYnOW.d.ts → router-B8CR9GbD.d.ts} +1 -1
- package/dist/{router-ifU8Dui1.d.mts → router-Cp6yRE8A.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/runtime-CAEv36S_.d.mts +69 -0
- package/dist/runtime-CQVsT330.d.ts +69 -0
- package/dist/server-action-security.cjs +3 -3
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn.cjs +4 -4
- package/dist/server-fn.mjs +3 -3
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server-query.cjs +5 -5
- package/dist/server-query.mjs +4 -4
- package/dist/server.cjs +42 -40
- package/dist/server.d.mts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.mjs +25 -23
- package/dist/{spa-router-DaJk5Re4.d.ts → spa-router-BuciWGCZ.d.ts} +2 -2
- package/dist/{spa-router-Bq7VCOwx.d.mts → spa-router-DwbqGkGj.d.mts} +2 -2
- package/dist/testing.cjs +8 -8
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +6 -6
- package/dist/{utils-XJn0c9bj.d.mts → utils-B9V0S_yL.d.mts} +1 -1
- package/dist/{utils-BXLmFsVR.d.ts → utils-CaoWKtYM.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +23 -21
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.mjs +22 -20
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- package/package.json +1 -1
- package/dist/layers-4PNE2HOY.cjs +0 -18
- package/dist/{chunk-2F2ER724.cjs → chunk-BPMATOP2.cjs} +2 -2
- package/dist/{chunk-IHNMMXHV.mjs → chunk-OTC5BDGO.mjs} +3 -3
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
matchSSGPage,
|
|
5
5
|
resolveRouteRenderingConfig,
|
|
6
6
|
resolveRouteRenderingConfigFromFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4GLOOWKE.mjs";
|
|
8
8
|
import {
|
|
9
9
|
collectSchemaExtensions,
|
|
10
10
|
declareSchemaTables,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-ZMSZZXOR.mjs";
|
|
16
16
|
import {
|
|
17
17
|
FARM_API_CATALOG_PATH,
|
|
18
|
-
|
|
18
|
+
FARM_INFRA_SIGNATURE_HEADER,
|
|
19
19
|
classifyFarmDocumentPrefix,
|
|
20
20
|
composeFarmFullDocument,
|
|
21
21
|
createDefaultErrorMarkup,
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
getDefaultErrorStatusText,
|
|
33
33
|
getRouteDirectoryDepth,
|
|
34
34
|
getRouteGroupScope,
|
|
35
|
+
isFarmAppManifestPath,
|
|
35
36
|
isInRouteGroupScope,
|
|
36
37
|
listFarmMCPLlmsTxtLinks,
|
|
37
38
|
removeFarmDocumentTitles,
|
|
@@ -41,16 +42,24 @@ import {
|
|
|
41
42
|
resolveFarmAppManifestInput,
|
|
42
43
|
routeBoundaryCoversDirectory,
|
|
43
44
|
stripRouteGroups
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-LSZAVSGY.mjs";
|
|
46
|
+
import {
|
|
47
|
+
FARM_DEFAULT_MCP_PATH,
|
|
48
|
+
collectFarmDefaultMCPPages,
|
|
49
|
+
createFarmDefaultMCPServer,
|
|
50
|
+
farmConfigMountsMCP,
|
|
51
|
+
isFarmDefaultMCPPathname,
|
|
52
|
+
resolveFarmDefaultMCPServer
|
|
53
|
+
} from "./chunk-UH6QN5NL.mjs";
|
|
45
54
|
import {
|
|
46
55
|
isFarmPreviewDeploymentEnvironment
|
|
47
56
|
} from "./chunk-BOYNDCZL.mjs";
|
|
48
57
|
import {
|
|
49
58
|
createFarmMetadataImageResponse
|
|
50
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-AJQTP4OO.mjs";
|
|
51
60
|
import {
|
|
52
61
|
createFarmImageHandler
|
|
53
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-F5QO4FNE.mjs";
|
|
54
63
|
import {
|
|
55
64
|
FARM_ISLAND_REPLAYABLE_SELECTOR,
|
|
56
65
|
isFarmIslandStrategy
|
|
@@ -93,7 +102,7 @@ import {
|
|
|
93
102
|
getFarmAppDirectories,
|
|
94
103
|
getFarmLayerAliases,
|
|
95
104
|
getFarmSourceRoots
|
|
96
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-BUGNQIHC.mjs";
|
|
97
106
|
import {
|
|
98
107
|
REACT_RENDERER,
|
|
99
108
|
assertFarmRendererStreamingRuntime,
|
|
@@ -111,19 +120,23 @@ import {
|
|
|
111
120
|
import {
|
|
112
121
|
FARM_PREVIEW_ROBOTS_TAG,
|
|
113
122
|
addFarmCspNonceToScriptTags,
|
|
114
|
-
collectFarmLlmsTxtPages,
|
|
115
123
|
createFarmAgentRobots,
|
|
116
124
|
createFarmCspNonce,
|
|
117
125
|
createFarmCspNonceRewriter,
|
|
118
|
-
|
|
119
|
-
createFarmLlmsMarkdownReader,
|
|
126
|
+
createFarmDefaultSitemap,
|
|
120
127
|
getFarmSecurityHeader,
|
|
121
|
-
renderFarmLlmsFullTxt,
|
|
122
128
|
resolveFarmAgentCrawlers,
|
|
123
|
-
|
|
129
|
+
resolveFarmAgentSitemap,
|
|
124
130
|
resolveFarmPerformanceConfig,
|
|
125
131
|
resolveFarmSecurityConfig
|
|
126
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-4E5WBPEG.mjs";
|
|
133
|
+
import {
|
|
134
|
+
collectFarmLlmsTxtPages,
|
|
135
|
+
createFarmDefaultLlmsTxt,
|
|
136
|
+
createFarmLlmsMarkdownReader,
|
|
137
|
+
renderFarmLlmsFullTxt,
|
|
138
|
+
resolveFarmLlmsTxtConfig
|
|
139
|
+
} from "./chunk-DTSROJ5J.mjs";
|
|
127
140
|
import {
|
|
128
141
|
getPublicFarmImageConfig,
|
|
129
142
|
resolveFarmImageConfig
|
|
@@ -133,7 +146,7 @@ import {
|
|
|
133
146
|
} from "./chunk-YHOCRI4H.mjs";
|
|
134
147
|
import {
|
|
135
148
|
resolveServerActionsConfig
|
|
136
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-4WVJLURN.mjs";
|
|
137
150
|
import {
|
|
138
151
|
createBundledEnv,
|
|
139
152
|
getResolvedEnv
|
|
@@ -141,12 +154,12 @@ import {
|
|
|
141
154
|
import {
|
|
142
155
|
createFarmMarkdownRouteModuleFromFile,
|
|
143
156
|
loadFarmMdxComponents
|
|
144
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-WZ77PUAM.mjs";
|
|
145
158
|
import {
|
|
146
159
|
createFarmMarkdownSourceResponse,
|
|
147
160
|
isFarmMarkdownPageFile,
|
|
148
161
|
normalizeFarmMarkdownRoutePath
|
|
149
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-4WCZJQUO.mjs";
|
|
150
163
|
import {
|
|
151
164
|
resolveFarmMdxComponentsModulePath,
|
|
152
165
|
resolveMdxConfig
|
|
@@ -163,7 +176,7 @@ import {
|
|
|
163
176
|
} from "./chunk-WWIKMBRN.mjs";
|
|
164
177
|
import {
|
|
165
178
|
resolveWorkflowsConfig
|
|
166
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-Q2KB32T4.mjs";
|
|
167
180
|
import {
|
|
168
181
|
initStorage
|
|
169
182
|
} from "./chunk-UWPLULNK.mjs";
|
|
@@ -183,10 +196,10 @@ import {
|
|
|
183
196
|
getRegisteredIntegrationAPIManifest,
|
|
184
197
|
isFarmIntegrationProviderComponentReference,
|
|
185
198
|
matchIntegrationRoute
|
|
186
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-MKYBIIAQ.mjs";
|
|
187
200
|
import {
|
|
188
201
|
MiddlewareManager
|
|
189
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-BPOF5U4N.mjs";
|
|
190
203
|
import {
|
|
191
204
|
createRouteSlotContainerId,
|
|
192
205
|
parseRouteSlotFile
|
|
@@ -205,7 +218,7 @@ import {
|
|
|
205
218
|
} from "./chunk-IOEH4VWN.mjs";
|
|
206
219
|
import {
|
|
207
220
|
APIRouteManager
|
|
208
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-T4OGRVNS.mjs";
|
|
209
222
|
import {
|
|
210
223
|
findProgrammaticRouteFiles,
|
|
211
224
|
loadProgrammaticRouteManifests
|
|
@@ -224,7 +237,7 @@ import {
|
|
|
224
237
|
} from "./chunk-YOZYCI6Z.mjs";
|
|
225
238
|
import {
|
|
226
239
|
isFarmAPIPathname
|
|
227
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-O6I6VWKK.mjs";
|
|
228
241
|
import {
|
|
229
242
|
registerFarmMCPServer
|
|
230
243
|
} from "./chunk-ZLAT2CWY.mjs";
|
|
@@ -262,15 +275,16 @@ import {
|
|
|
262
275
|
readNodeRequestBody,
|
|
263
276
|
resolveFarmServerConfig,
|
|
264
277
|
setRequestContext
|
|
265
|
-
} from "./chunk-
|
|
278
|
+
} from "./chunk-ZMMBIVQM.mjs";
|
|
266
279
|
import {
|
|
267
280
|
createCliColors
|
|
268
281
|
} from "./chunk-I2BHUNBU.mjs";
|
|
269
282
|
import {
|
|
270
283
|
invalidateFailedFarmDevModules,
|
|
284
|
+
invalidateFarmDevDependents,
|
|
271
285
|
loadFarmDevModule,
|
|
272
286
|
toFileModuleUrl
|
|
273
|
-
} from "./chunk-
|
|
287
|
+
} from "./chunk-KMTGADN3.mjs";
|
|
274
288
|
import {
|
|
275
289
|
isFarmI18nCatalogFile,
|
|
276
290
|
resolveFarmI18nConfig,
|
|
@@ -294,9 +308,6 @@ import {
|
|
|
294
308
|
import {
|
|
295
309
|
searchParamsToObject
|
|
296
310
|
} from "./chunk-QVKYGNVM.mjs";
|
|
297
|
-
import {
|
|
298
|
-
resolveFarmAPIServerBasePath
|
|
299
|
-
} from "./chunk-BTHHUD7Q.mjs";
|
|
300
311
|
import {
|
|
301
312
|
configureFarmObservability,
|
|
302
313
|
emitFarmEvent,
|
|
@@ -306,9 +317,12 @@ import {
|
|
|
306
317
|
applyWebResponseHeaders,
|
|
307
318
|
sendWebResponse
|
|
308
319
|
} from "./chunk-Z2RZJZIZ.mjs";
|
|
320
|
+
import {
|
|
321
|
+
resolveFarmAPIServerBasePath
|
|
322
|
+
} from "./chunk-BTHHUD7Q.mjs";
|
|
309
323
|
import {
|
|
310
324
|
FARM_VERSION
|
|
311
|
-
} from "./chunk-
|
|
325
|
+
} from "./chunk-OO7GXVSR.mjs";
|
|
312
326
|
import {
|
|
313
327
|
resolveFarmTrailingSlashRedirect,
|
|
314
328
|
setFarmTrailingSlashPreference
|
|
@@ -359,6 +373,7 @@ import {
|
|
|
359
373
|
_getRequestReadCount,
|
|
360
374
|
_runWithCurrentRequest,
|
|
361
375
|
createWebRequestFromFarmRequest,
|
|
376
|
+
getCurrentRequestOrNull,
|
|
362
377
|
resolveFarmRequestURL
|
|
363
378
|
} from "./chunk-FDR64H6B.mjs";
|
|
364
379
|
import {
|
|
@@ -825,6 +840,7 @@ function getClientModuleHydrationPlan(modulePath, root, mode = "off", options =
|
|
|
825
840
|
}
|
|
826
841
|
const inspection = collectIsolatedClientBoundaries(resolvedPath, root, {
|
|
827
842
|
allowDynamicCardinality: asyncOwner,
|
|
843
|
+
allowElementProps: asyncOwner,
|
|
828
844
|
staticPackageBoundaries: asyncOwner
|
|
829
845
|
});
|
|
830
846
|
if (inspection.boundaries.length === 0) {
|
|
@@ -1322,7 +1338,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
|
|
|
1322
1338
|
fallbackReason = `the client boundary imported from ${specifier} renders inside <${container}>, where the HTML parser relocates its hydration marker`;
|
|
1323
1339
|
return 0;
|
|
1324
1340
|
}
|
|
1325
|
-
if (passesElementValuedProps(content, localBindings)) {
|
|
1341
|
+
if (!options.allowElementProps && passesElementValuedProps(content, localBindings)) {
|
|
1326
1342
|
fallbackReason = `the client boundary imported from ${specifier} receives React elements, which cannot cross the boundary as serialized props`;
|
|
1327
1343
|
return 0;
|
|
1328
1344
|
}
|
|
@@ -1371,10 +1387,12 @@ function inspectClientModuleMetadata(resolvedPath, root, visited, inspectIslandE
|
|
|
1371
1387
|
};
|
|
1372
1388
|
}
|
|
1373
1389
|
let importsClientBoundary = false;
|
|
1390
|
+
let importsAsyncOwner = false;
|
|
1374
1391
|
let importedIslandStrategy = null;
|
|
1375
1392
|
for (const specifier of getImportSpecifiers(content)) {
|
|
1376
1393
|
const imported = resolveImportedModule(resolvedPath, specifier, root);
|
|
1377
1394
|
const importedMetadata = imported.local ? inspectClientModuleMetadata(imported.path, root, visited, false) : inspectPackageClientBoundary(imported.path, root, visited);
|
|
1395
|
+
if (importedMetadata.suppressedAsyncHydration) importsAsyncOwner = true;
|
|
1378
1396
|
if (importedMetadata.isClientComponent || importedMetadata.shouldHydrate) {
|
|
1379
1397
|
importsClientBoundary = true;
|
|
1380
1398
|
if (importedIslandStrategy === null) {
|
|
@@ -1385,7 +1403,7 @@ function inspectClientModuleMetadata(resolvedPath, root, visited, inspectIslandE
|
|
|
1385
1403
|
}
|
|
1386
1404
|
}
|
|
1387
1405
|
const shouldHydrate = parsed.hasHydrateExport || importsClientBoundary;
|
|
1388
|
-
if (shouldHydrate && hasAsyncDefaultExport(content)) {
|
|
1406
|
+
if (shouldHydrate && hasAsyncDefaultExport(content) || importsAsyncOwner) {
|
|
1389
1407
|
return {
|
|
1390
1408
|
isClientComponent: false,
|
|
1391
1409
|
shouldHydrate: false,
|
|
@@ -4804,6 +4822,16 @@ function createRouteStateProps(input) {
|
|
|
4804
4822
|
};
|
|
4805
4823
|
}
|
|
4806
4824
|
__name(createRouteStateProps, "createRouteStateProps");
|
|
4825
|
+
function readAppPackageIdentity(root) {
|
|
4826
|
+
try {
|
|
4827
|
+
return JSON.parse(
|
|
4828
|
+
fs5.readFileSync(path9.join(root || process.cwd(), "package.json"), "utf8")
|
|
4829
|
+
);
|
|
4830
|
+
} catch {
|
|
4831
|
+
return {};
|
|
4832
|
+
}
|
|
4833
|
+
}
|
|
4834
|
+
__name(readAppPackageIdentity, "readAppPackageIdentity");
|
|
4807
4835
|
var _ServerRenderer = class _ServerRenderer {
|
|
4808
4836
|
constructor(config, routeManager, i18nRuntime, viteServer) {
|
|
4809
4837
|
this.ssgManifest = [];
|
|
@@ -5387,6 +5415,11 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5387
5415
|
completeRender(res.statusCode || 200, pathname);
|
|
5388
5416
|
return;
|
|
5389
5417
|
}
|
|
5418
|
+
if (pathname === "/sitemap.xml" && this.getAgentSitemap().enabled) {
|
|
5419
|
+
await this.renderGeneratedSitemap(req, res);
|
|
5420
|
+
completeRender(res.statusCode || 200, pathname);
|
|
5421
|
+
return;
|
|
5422
|
+
}
|
|
5390
5423
|
const metadataImageMatch = this.routeManager.matchMetadataImage(pathname);
|
|
5391
5424
|
if (metadataImageMatch) {
|
|
5392
5425
|
await this.renderMetadataImage(req, res, {
|
|
@@ -5424,6 +5457,11 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5424
5457
|
layouts = match.layouts;
|
|
5425
5458
|
routeSlots = match.slots ?? [];
|
|
5426
5459
|
if (!route) {
|
|
5460
|
+
if (isFarmDefaultMCPPathname(pathname) && this.getDefaultMCPServer()) {
|
|
5461
|
+
await this.renderDefaultMCP(req, res);
|
|
5462
|
+
completeRender(res.statusCode || 200, pathname);
|
|
5463
|
+
return;
|
|
5464
|
+
}
|
|
5427
5465
|
emitFarmEvent({ type: "route.notFound", pathname });
|
|
5428
5466
|
await this.render404(req, res);
|
|
5429
5467
|
completeRender(404);
|
|
@@ -6208,7 +6246,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6208
6246
|
/** `/robots.txt` from `agent.crawlers` when no robots.ts owns it. */
|
|
6209
6247
|
async renderGeneratedRobotsTxt(req, res) {
|
|
6210
6248
|
try {
|
|
6211
|
-
const sitemapPath = this.routeManager.matchMetadataRoute("/sitemap.xml")?.metadata.kind === "sitemap" ? "/sitemap.xml" : void 0;
|
|
6249
|
+
const sitemapPath = this.routeManager.matchMetadataRoute("/sitemap.xml")?.metadata.kind === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
|
|
6212
6250
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
6213
6251
|
const rootMetadata = sitemapPath && rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
6214
6252
|
const robots = createFarmAgentRobots({
|
|
@@ -6232,6 +6270,112 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6232
6270
|
);
|
|
6233
6271
|
}
|
|
6234
6272
|
}
|
|
6273
|
+
getAgentSitemap() {
|
|
6274
|
+
return resolveFarmAgentSitemap(this.config.agent?.sitemap);
|
|
6275
|
+
}
|
|
6276
|
+
/** `/sitemap.xml` from `agent.sitemap` when no sitemap.ts owns it. */
|
|
6277
|
+
async renderGeneratedSitemap(req, res) {
|
|
6278
|
+
try {
|
|
6279
|
+
const request2 = createWebRequestFromFarmRequest(req, {
|
|
6280
|
+
trustProxy: this.config.server?.trustProxy
|
|
6281
|
+
});
|
|
6282
|
+
const sources = await Promise.all(
|
|
6283
|
+
[...this.routeManager.getRoutes()].filter(([pattern]) => !pattern.includes("[")).map(async ([pattern, route]) => {
|
|
6284
|
+
const [module, stat] = await Promise.all([
|
|
6285
|
+
this.routeManager.loadRouteModule(route.modulePath).catch((error) => {
|
|
6286
|
+
logger.warn(`Could not read metadata for ${pattern} in sitemap.xml: ${error}`);
|
|
6287
|
+
return void 0;
|
|
6288
|
+
}),
|
|
6289
|
+
fs5.promises.stat(route.modulePath).catch(() => void 0)
|
|
6290
|
+
]);
|
|
6291
|
+
return { pattern, module, lastModified: stat?.mtime.toISOString() };
|
|
6292
|
+
})
|
|
6293
|
+
);
|
|
6294
|
+
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
6295
|
+
const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
6296
|
+
const sitemap = createFarmDefaultSitemap(sources, {
|
|
6297
|
+
origin: new URL(request2.url).origin,
|
|
6298
|
+
config: this.getAgentSitemap(),
|
|
6299
|
+
metadataBase: rootMetadata?.metadataBase,
|
|
6300
|
+
basePath: this.config.basePath
|
|
6301
|
+
});
|
|
6302
|
+
await sendWebResponse(
|
|
6303
|
+
res,
|
|
6304
|
+
createFarmMetadataRouteResponse("sitemap", sitemap, {}, { method: req.method })
|
|
6305
|
+
);
|
|
6306
|
+
} catch (error) {
|
|
6307
|
+
logger.error(`Generated sitemap.xml failed: ${error}`);
|
|
6308
|
+
await sendWebResponse(
|
|
6309
|
+
res,
|
|
6310
|
+
new Response("Internal Server Error", {
|
|
6311
|
+
status: 500,
|
|
6312
|
+
headers: { "Content-Type": "text/plain; charset=utf-8" }
|
|
6313
|
+
})
|
|
6314
|
+
);
|
|
6315
|
+
}
|
|
6316
|
+
}
|
|
6317
|
+
/** Lets the default MCP server see the app's API routes, which the dev server owns. */
|
|
6318
|
+
setAPIRouteLookup(exists) {
|
|
6319
|
+
this.apiRouteExists = exists;
|
|
6320
|
+
}
|
|
6321
|
+
/**
|
|
6322
|
+
* The default read-only MCP server (`agent.mcp`), or undefined when the app has an MCP
|
|
6323
|
+
* server of its own: a route that answers /mcp, an API route at /api/mcp, `@farm.js/mcp`,
|
|
6324
|
+
* or a registered server such as the docs engine's. Production applies the same rules.
|
|
6325
|
+
*/
|
|
6326
|
+
getDefaultMCPServer() {
|
|
6327
|
+
if (this.config.agent?.mcp !== true || farmConfigMountsMCP(this.config)) return void 0;
|
|
6328
|
+
if (this.apiRouteExists?.("/api/mcp")) return void 0;
|
|
6329
|
+
if (this.routeManager.matchRoute(FARM_DEFAULT_MCP_PATH).route) return void 0;
|
|
6330
|
+
this.defaultMCPServer ?? (this.defaultMCPServer = createFarmDefaultMCPServer(
|
|
6331
|
+
readAppPackageIdentity(this.config.root),
|
|
6332
|
+
FARM_VERSION
|
|
6333
|
+
));
|
|
6334
|
+
return resolveFarmDefaultMCPServer(this.defaultMCPServer);
|
|
6335
|
+
}
|
|
6336
|
+
async renderDefaultMCP(req, res) {
|
|
6337
|
+
const server = this.getDefaultMCPServer();
|
|
6338
|
+
const request2 = getCurrentRequestOrNull() ?? createWebRequestFromFarmRequest(req, { trustProxy: this.config.server?.trustProxy });
|
|
6339
|
+
try {
|
|
6340
|
+
const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-LPJ2CADR.mjs");
|
|
6341
|
+
const origin = new URL(request2.url).origin;
|
|
6342
|
+
const response = await handleFarmDefaultMCPRequest(request2, {
|
|
6343
|
+
server,
|
|
6344
|
+
basePath: this.config.basePath,
|
|
6345
|
+
listPages: /* @__PURE__ */ __name(async () => {
|
|
6346
|
+
const sources = await Promise.all(
|
|
6347
|
+
[...this.routeManager.getRoutes()].filter(([pattern]) => !pattern.includes("[")).map(async ([pattern, route]) => ({
|
|
6348
|
+
pattern,
|
|
6349
|
+
// The page itself surfaces a load error. Without its module a guard cannot
|
|
6350
|
+
// be ruled out, so the page is left out.
|
|
6351
|
+
module: await this.routeManager.loadRouteModule(route.modulePath).catch(() => ({ __farmRouteGuard: true }))
|
|
6352
|
+
}))
|
|
6353
|
+
);
|
|
6354
|
+
return collectFarmDefaultMCPPages(sources, {
|
|
6355
|
+
origin,
|
|
6356
|
+
basePath: this.config.basePath,
|
|
6357
|
+
markdown: resolveMarkdownConfig(this.config.md)
|
|
6358
|
+
});
|
|
6359
|
+
}, "listPages"),
|
|
6360
|
+
// Pages are read through this server's own socket, with no cookies, as llms-full.txt does.
|
|
6361
|
+
readMarkdown: this.createDevMarkdownReader(req)
|
|
6362
|
+
});
|
|
6363
|
+
await sendWebResponse(res, response);
|
|
6364
|
+
} catch (error) {
|
|
6365
|
+
logger.error(`Default MCP server failed: ${error}`);
|
|
6366
|
+
await sendWebResponse(
|
|
6367
|
+
res,
|
|
6368
|
+
new Response(
|
|
6369
|
+
JSON.stringify({
|
|
6370
|
+
jsonrpc: "2.0",
|
|
6371
|
+
id: null,
|
|
6372
|
+
error: { code: -32603, message: "Internal error." }
|
|
6373
|
+
}),
|
|
6374
|
+
{ status: 500, headers: { "Content-Type": "application/json" } }
|
|
6375
|
+
)
|
|
6376
|
+
);
|
|
6377
|
+
}
|
|
6378
|
+
}
|
|
6235
6379
|
/** Same inputs the production server gives llms.txt: static pages and root metadata. */
|
|
6236
6380
|
async createLlmsTxtContext(request2, options = {}) {
|
|
6237
6381
|
const config = resolveFarmLlmsTxtConfig(this.config.agent?.llmsTxt);
|
|
@@ -6272,7 +6416,8 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6272
6416
|
normalizeFarmAPIConfig(
|
|
6273
6417
|
this.config.api
|
|
6274
6418
|
)
|
|
6275
|
-
)
|
|
6419
|
+
),
|
|
6420
|
+
defaultMCP: /* @__PURE__ */ __name(() => this.getDefaultMCPServer(), "defaultMCP")
|
|
6276
6421
|
})
|
|
6277
6422
|
}),
|
|
6278
6423
|
...options.full ? { markdown: this.createDevMarkdownReader(options.req) } : {}
|
|
@@ -9268,7 +9413,7 @@ var SOURCE_QUERY_FLAGS = ["raw", "inline", "url"];
|
|
|
9268
9413
|
var MODULE_EXTENSION = /\.(?:[cm]?[jt]sx?|vue|svelte|astro|mdx?|css|scss|sass|less|styl|stylus|pcss|postcss|sss)$/i;
|
|
9269
9414
|
var ASSET_EXTENSION = /\.(?:apng|bmp|png|jpe?g|jfif|pjpeg|pjp|gif|svg|ico|webp|avif|cur|jxl|mp4|webm|ogg|mp3|wav|flac|aac|opus|mov|m4a|vtt|woff2?|eot|ttf|otf|webmanifest|pdf|txt|wasm)$/i;
|
|
9270
9415
|
var INTERNAL_PREFIXES = ["/@vite/", "/@farm/", "/@react-refresh", "/__vite_ping"];
|
|
9271
|
-
var DEVELOPER_ONLY_PREFIXES = ["/__farm/devtools", "/__open-in-editor"];
|
|
9416
|
+
var DEVELOPER_ONLY_PREFIXES = ["/__farm/devtools", "/__open-in-editor", "/__mf_runner__"];
|
|
9272
9417
|
function createFarmDevPreviewGuard(server, options) {
|
|
9273
9418
|
return /* @__PURE__ */ __name(async function farmDevPreviewGuard(req, res, next) {
|
|
9274
9419
|
if (!isFarmPreviewTunnelRequest(req.headers)) return next();
|
|
@@ -9966,7 +10111,12 @@ function farmLlmsTxtGeneratedPaths(config) {
|
|
|
9966
10111
|
__name(farmLlmsTxtGeneratedPaths, "farmLlmsTxtGeneratedPaths");
|
|
9967
10112
|
function farmAgentGeneratedPaths(config) {
|
|
9968
10113
|
const crawlers = resolveFarmAgentCrawlers(config.agent?.crawlers);
|
|
9969
|
-
|
|
10114
|
+
const sitemap = resolveFarmAgentSitemap(config.agent?.sitemap);
|
|
10115
|
+
return [
|
|
10116
|
+
...farmLlmsTxtGeneratedPaths(config),
|
|
10117
|
+
...sitemap.enabled ? ["/sitemap.xml"] : [],
|
|
10118
|
+
...crawlers.enabled ? ["/robots.txt"] : []
|
|
10119
|
+
];
|
|
9970
10120
|
}
|
|
9971
10121
|
__name(farmAgentGeneratedPaths, "farmAgentGeneratedPaths");
|
|
9972
10122
|
var ALL_TYPE_ARTIFACTS = {
|
|
@@ -10011,7 +10161,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
10011
10161
|
}
|
|
10012
10162
|
__name(loadFarmWorkflowsDevRuntime, "loadFarmWorkflowsDevRuntime");
|
|
10013
10163
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
10014
|
-
return import("./devtools-
|
|
10164
|
+
return import("./devtools-ERIKFEXX.mjs");
|
|
10015
10165
|
}
|
|
10016
10166
|
__name(loadFarmDevtoolsSnapshotRuntime, "loadFarmDevtoolsSnapshotRuntime");
|
|
10017
10167
|
function loadFarmDevtoolsUIRuntime() {
|
|
@@ -10923,9 +11073,17 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
10923
11073
|
plugins: farmConfig.plugins,
|
|
10924
11074
|
i18n: farmApp.getI18nRuntime(),
|
|
10925
11075
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
10926
|
-
basePath: apiServerBasePath
|
|
11076
|
+
basePath: apiServerBasePath,
|
|
11077
|
+
// A plugin calling an app endpoint (an MCP tool, say) goes back through this server,
|
|
11078
|
+
// so the endpoint's middleware and integration guards run for it, as in production.
|
|
11079
|
+
dispatch: /* @__PURE__ */ __name((request2) => {
|
|
11080
|
+
const url = new URL(request2.url);
|
|
11081
|
+
url.pathname = applyFarmBasePath(url.pathname, farmConfig.basePath);
|
|
11082
|
+
return fetch(new Request(url, request2), { redirect: "manual" });
|
|
11083
|
+
}, "dispatch")
|
|
10927
11084
|
});
|
|
10928
11085
|
await apiRouteManager.discoverRoutes();
|
|
11086
|
+
farmApp.getServerRenderer().setAPIRouteLookup((routePath) => apiRouteManager.getRoutes().has(routePath));
|
|
10929
11087
|
let discoveredWorkflows = [];
|
|
10930
11088
|
const hasWorkflowDirectory = workflowConfig.enabled && workflowConfig.dirs.some(
|
|
10931
11089
|
(dir) => fs11.existsSync(path21.isAbsolute(dir) ? dir : path21.join(farmConfig.root, dir))
|
|
@@ -11328,22 +11486,30 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11328
11486
|
const docsHandler = openAPIManager.getDocsRouteHandler(parsedRequestUrl.origin);
|
|
11329
11487
|
return docsHandler(req, res);
|
|
11330
11488
|
}
|
|
11331
|
-
if (stripFarmBasePath(requestPathname, farmConfig.basePath)
|
|
11489
|
+
if (options.agent?.manifest !== false && isFarmAppManifestPath(stripFarmBasePath(requestPathname, farmConfig.basePath))) {
|
|
11490
|
+
if (await runAppMiddlewareForContentRoute()) return;
|
|
11332
11491
|
farmAppPackages ?? (farmAppPackages = resolveFarmAppPackages(farmConfig.root ?? process.cwd()));
|
|
11492
|
+
const header = /* @__PURE__ */ __name((name) => String(req.headers[name] ?? ""), "header");
|
|
11333
11493
|
const manifest = await createFarmAppManifestResponse(
|
|
11334
|
-
new Request(parsedRequestUrl, {
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11494
|
+
new Request(parsedRequestUrl, {
|
|
11495
|
+
method: requestMethod,
|
|
11496
|
+
headers: {
|
|
11497
|
+
"if-none-match": header("if-none-match"),
|
|
11498
|
+
[FARM_INFRA_SIGNATURE_HEADER]: header(FARM_INFRA_SIGNATURE_HEADER)
|
|
11499
|
+
}
|
|
11340
11500
|
}),
|
|
11341
|
-
{
|
|
11501
|
+
{
|
|
11502
|
+
...resolveFarmAppManifestInput(farmConfig, {
|
|
11503
|
+
build: "development",
|
|
11504
|
+
packages: farmAppPackages,
|
|
11505
|
+
// Read again on each request; unchanged files come from a cache.
|
|
11506
|
+
webmcpTools: farmConfig.plugins?.some(({ name }) => name === "farm:webmcp") ? collectFarmWebMCPTools(farmConfig.root ?? process.cwd(), farmConfig.srcDir) : []
|
|
11507
|
+
}),
|
|
11508
|
+
defaultMCP: /* @__PURE__ */ __name(() => farmApp.getServerRenderer().getDefaultMCPServer(), "defaultMCP")
|
|
11509
|
+
}
|
|
11342
11510
|
);
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
return;
|
|
11346
|
-
}
|
|
11511
|
+
await sendWebResponse(res, manifest);
|
|
11512
|
+
return;
|
|
11347
11513
|
}
|
|
11348
11514
|
if (options.agent?.apiCatalog && stripFarmBasePath(requestPathname, farmConfig.basePath) === FARM_API_CATALOG_PATH) {
|
|
11349
11515
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
@@ -11368,7 +11534,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11368
11534
|
"if-none-match": String(req.headers["if-none-match"] ?? "")
|
|
11369
11535
|
}
|
|
11370
11536
|
}),
|
|
11371
|
-
{
|
|
11537
|
+
{
|
|
11538
|
+
basePath: farmConfig.basePath,
|
|
11539
|
+
apiServerBasePath,
|
|
11540
|
+
defaultMCP: /* @__PURE__ */ __name(() => farmApp.getServerRenderer().getDefaultMCPServer(), "defaultMCP")
|
|
11541
|
+
}
|
|
11372
11542
|
);
|
|
11373
11543
|
if (aiCatalog) {
|
|
11374
11544
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
@@ -12755,6 +12925,9 @@ if (import.meta.hot) {
|
|
|
12755
12925
|
});
|
|
12756
12926
|
return [];
|
|
12757
12927
|
}
|
|
12928
|
+
if (apiRouteManager && invalidateFarmDevDependents(server2, file, apiRouteManager.getSourceFiles()).length > 0) {
|
|
12929
|
+
await refreshRouteDiscovery?.(`updated ${file}`);
|
|
12930
|
+
}
|
|
12758
12931
|
const isolatedHydrationMode = currentFarmConfig?.experimental?.isolatedClientHydration;
|
|
12759
12932
|
const planRouteManager = farmApp?.getRouteManager();
|
|
12760
12933
|
const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
|
|
@@ -14854,7 +15027,7 @@ async function defineConfig(config = {}) {
|
|
|
14854
15027
|
const tailwindVitePlugin = await loadTailwindVitePlugin();
|
|
14855
15028
|
const appRoot = path21.resolve(config.root || process.cwd());
|
|
14856
15029
|
if (config.extends?.length) {
|
|
14857
|
-
const { config: layeredConfig } = await import("./layers-
|
|
15030
|
+
const { config: layeredConfig } = await import("./layers-UTB43B7A.mjs").then(
|
|
14858
15031
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
14859
15032
|
root: appRoot,
|
|
14860
15033
|
mode: process.env.NODE_ENV === "production" ? "production" : "development"
|