@farm.js/core 0.1.25 → 0.1.26

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.
Files changed (133) hide show
  1. package/dist/agent-runtime.d.mts +2 -2
  2. package/dist/agent-runtime.d.ts +2 -2
  3. package/dist/api/route-manager.d.mts +2 -2
  4. package/dist/api/route-manager.d.ts +2 -2
  5. package/dist/api.d.mts +3 -3
  6. package/dist/api.d.ts +3 -3
  7. package/dist/{app-ZuWrAMc_.d.mts → app-29vG5tmY.d.mts} +3 -3
  8. package/dist/{app-BF-ctoxh.d.ts → app-Cx71s_PT.d.ts} +3 -3
  9. package/dist/app-markdown.cjs +6 -4
  10. package/dist/app-markdown.d.mts +3 -3
  11. package/dist/app-markdown.d.ts +3 -3
  12. package/dist/app-markdown.mjs +5 -3
  13. package/dist/{chunk-E3RDL2DA.cjs → chunk-2CT6XUNO.cjs} +61 -31
  14. package/dist/{chunk-R7LCG3BT.cjs → chunk-3TQG7CGC.cjs} +84 -77
  15. package/dist/{chunk-AXYTGLF3.cjs → chunk-3WSWXPYM.cjs} +4 -4
  16. package/dist/{chunk-2BIJGZR3.mjs → chunk-74RZNRY6.mjs} +1 -1
  17. package/dist/{chunk-TTVHACQV.cjs → chunk-ALIFMS4A.cjs} +1 -1
  18. package/dist/{chunk-T2OPSH6S.mjs → chunk-ARXCHQLX.mjs} +9 -2
  19. package/dist/{chunk-2KI3CL3N.mjs → chunk-DU2CASV6.mjs} +1 -1
  20. package/dist/chunk-J63ZH5OQ.cjs +62 -0
  21. package/dist/{chunk-XM4ZDVD7.mjs → chunk-JM5GQL4H.mjs} +1 -1
  22. package/dist/{chunk-6VEHUKZ2.mjs → chunk-MM5D6VLP.mjs} +4 -20
  23. package/dist/chunk-MVL2RAJW.mjs +62 -0
  24. package/dist/{chunk-YA6LLTIJ.cjs → chunk-ND224OE2.cjs} +4 -20
  25. package/dist/{chunk-XME4TCLB.mjs → chunk-OFKG57MZ.mjs} +2 -2
  26. package/dist/{chunk-U4MP7XTD.mjs → chunk-OOIL3BWR.mjs} +168 -16
  27. package/dist/{chunk-WOI2HOGA.mjs → chunk-PPIW3MH6.mjs} +1 -1
  28. package/dist/{chunk-2ITKVAIF.cjs → chunk-QIH2HD6H.cjs} +191 -39
  29. package/dist/{chunk-65P6OGYN.cjs → chunk-QJ4D3UKJ.cjs} +10 -3
  30. package/dist/{chunk-RYDW7GPR.cjs → chunk-QLXEYIAW.cjs} +13 -13
  31. package/dist/{chunk-WJYCI56T.mjs → chunk-QPPQHB6X.mjs} +43 -30
  32. package/dist/{chunk-RR6UGYUT.mjs → chunk-RAI7NULA.mjs} +39 -9
  33. package/dist/{chunk-6K4SPQWL.cjs → chunk-RCYINC4A.cjs} +3 -3
  34. package/dist/{chunk-QYMRIVG6.cjs → chunk-SZ4LYNUX.cjs} +110 -97
  35. package/dist/{chunk-N2Z4ZFDE.mjs → chunk-UXQXGB5A.mjs} +19 -12
  36. package/dist/{chunk-CFNOGDUS.cjs → chunk-W2HZKYES.cjs} +2 -2
  37. package/dist/{chunk-O5DVPF3R.cjs → chunk-WFPRVVF2.cjs} +10 -10
  38. package/dist/{chunk-5YYJ6Q2L.mjs → chunk-YMUH2BLR.mjs} +2 -2
  39. package/dist/{client-plugins-DPG0NeZN.d.mts → client-plugins-B8RPJnot.d.mts} +90 -3
  40. package/dist/{client-plugins-Fgni-_25.d.ts → client-plugins-bPBf4haK.d.ts} +90 -3
  41. package/dist/client-plugins.d.mts +2 -2
  42. package/dist/client-plugins.d.ts +2 -2
  43. package/dist/client.d.mts +6 -6
  44. package/dist/client.d.ts +6 -6
  45. package/dist/config.d.mts +2 -2
  46. package/dist/config.d.ts +2 -2
  47. package/dist/{devtools-I7TBFOKD.mjs → devtools-5D4ZDRPR.mjs} +5 -3
  48. package/dist/{devtools-6OA7FEF6.cjs → devtools-QZJEUOJW.cjs} +6 -4
  49. package/dist/docs.cjs +8 -6
  50. package/dist/docs.mjs +7 -5
  51. package/dist/index.cjs +17 -13
  52. package/dist/index.d.mts +13 -13
  53. package/dist/index.d.ts +13 -13
  54. package/dist/index.mjs +16 -12
  55. package/dist/integrations.d.mts +2 -2
  56. package/dist/integrations.d.ts +2 -2
  57. package/dist/internal/app-markdown-runtime.cjs +5 -3
  58. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  59. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  60. package/dist/internal/app-markdown-runtime.mjs +4 -2
  61. package/dist/internal/build-runtime.cjs +14 -13
  62. package/dist/internal/build-runtime.d.mts +4 -4
  63. package/dist/internal/build-runtime.d.ts +4 -4
  64. package/dist/internal/build-runtime.mjs +13 -12
  65. package/dist/internal/cli-runtime.cjs +6 -5
  66. package/dist/internal/cli-runtime.mjs +5 -4
  67. package/dist/internal/client-error-overlay.cjs +4 -4
  68. package/dist/internal/client-error-overlay.mjs +1 -1
  69. package/dist/internal/compression-runtime.d.mts +2 -2
  70. package/dist/internal/compression-runtime.d.ts +2 -2
  71. package/dist/internal/config-runtime.cjs +6 -4
  72. package/dist/internal/config-runtime.d.mts +3 -3
  73. package/dist/internal/config-runtime.d.ts +3 -3
  74. package/dist/internal/config-runtime.mjs +5 -3
  75. package/dist/internal/infra-analytics-runtime.cjs +4 -3
  76. package/dist/internal/infra-analytics-runtime.mjs +2 -1
  77. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  78. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  79. package/dist/internal/production-runtime.cjs +5 -4
  80. package/dist/internal/production-runtime.d.mts +11 -9
  81. package/dist/internal/production-runtime.d.ts +11 -9
  82. package/dist/internal/production-runtime.mjs +4 -3
  83. package/dist/markdown.cjs +4 -2
  84. package/dist/markdown.mjs +3 -1
  85. package/dist/{metadata-D0EF7esB.d.mts → metadata-C3na4CBj.d.mts} +1 -1
  86. package/dist/{metadata-CDnRHKVq.d.ts → metadata-CzBP4Mfp.d.ts} +1 -1
  87. package/dist/middleware.d.mts +4 -4
  88. package/dist/middleware.d.ts +4 -4
  89. package/dist/navigation.d.mts +5 -5
  90. package/dist/navigation.d.ts +5 -5
  91. package/dist/observability-BupkiN0m.d.mts +447 -0
  92. package/dist/observability-BupkiN0m.d.ts +447 -0
  93. package/dist/observability.d.mts +2 -417
  94. package/dist/observability.d.ts +2 -417
  95. package/dist/plugin.cjs +9 -8
  96. package/dist/plugin.d.mts +2 -2
  97. package/dist/plugin.d.ts +2 -2
  98. package/dist/plugin.mjs +8 -7
  99. package/dist/{production-runtime-DpCt0opU.d.ts → production-runtime-CYg4wM4E.d.ts} +1 -1
  100. package/dist/{production-runtime-x3W4wVqx.d.mts → production-runtime-DP94hPGe.d.mts} +1 -1
  101. package/dist/{render-plan-D5oFRVBV.d.ts → render-plan-Bl6Fzg5z.d.ts} +1 -1
  102. package/dist/{render-plan-tazUJalK.d.mts → render-plan-CKAJg0jC.d.mts} +1 -1
  103. package/dist/renderer-client.d.mts +4 -4
  104. package/dist/renderer-client.d.ts +4 -4
  105. package/dist/{request-CzZX0Aew.d.ts → request-CR-Bp1Px.d.ts} +1 -1
  106. package/dist/{request-CXmQy5ks.d.mts → request-CrBCcPZZ.d.mts} +1 -1
  107. package/dist/request.d.mts +3 -3
  108. package/dist/request.d.ts +3 -3
  109. package/dist/{route-rendering-B-qpe32B.d.mts → route-rendering-C1NAHo-C.d.mts} +1 -1
  110. package/dist/{route-rendering-Dw3C362T.d.ts → route-rendering-CZH5FegB.d.ts} +1 -1
  111. package/dist/{router-CafM2jlw.d.mts → router-B57eDJ3u.d.mts} +1 -1
  112. package/dist/{router-CLl3xHwl.d.ts → router-Cg_kD3Bd.d.ts} +1 -1
  113. package/dist/routes.d.mts +2 -2
  114. package/dist/routes.d.ts +2 -2
  115. package/dist/server-plugins.d.mts +3 -3
  116. package/dist/server-plugins.d.ts +3 -3
  117. package/dist/server.cjs +159 -102
  118. package/dist/server.d.mts +8 -8
  119. package/dist/server.d.ts +8 -8
  120. package/dist/server.mjs +140 -83
  121. package/dist/{spa-router-DePr2aZ6.d.ts → spa-router-BstQUO6Q.d.ts} +2 -2
  122. package/dist/{spa-router-6sJfsMlQ.d.mts → spa-router-DTdbuinx.d.mts} +2 -2
  123. package/dist/testing.d.mts +2 -2
  124. package/dist/testing.d.ts +2 -2
  125. package/dist/{utils-BPHr-1mP.d.mts → utils-CS3ZLnEJ.d.mts} +1 -1
  126. package/dist/{utils-BBKC3cf3.d.ts → utils-D3rdsIvM.d.ts} +1 -1
  127. package/dist/version.cjs +2 -2
  128. package/dist/version.mjs +1 -1
  129. package/dist/vite.cjs +9 -8
  130. package/dist/vite.d.mts +2 -2
  131. package/dist/vite.d.ts +2 -2
  132. package/dist/vite.mjs +8 -7
  133. package/package.json +1 -1
@@ -7,7 +7,7 @@ var _chunkMT763TDWcjs = require('./chunk-MT763TDW.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkRYDW7GPRcjs = require('./chunk-RYDW7GPR.cjs');
10
+ var _chunkQLXEYIAWcjs = require('./chunk-QLXEYIAW.cjs');
11
11
 
12
12
 
13
13
 
@@ -17,7 +17,7 @@ var _chunkRYDW7GPRcjs = require('./chunk-RYDW7GPR.cjs');
17
17
 
18
18
 
19
19
 
20
- var _chunkAXYTGLF3cjs = require('./chunk-AXYTGLF3.cjs');
20
+ var _chunk3WSWXPYMcjs = require('./chunk-3WSWXPYM.cjs');
21
21
 
22
22
 
23
23
 
@@ -25,7 +25,7 @@ var _chunkAXYTGLF3cjs = require('./chunk-AXYTGLF3.cjs');
25
25
  var _chunkMWWVKDW3cjs = require('./chunk-MWWVKDW3.cjs');
26
26
 
27
27
 
28
- var _chunkYA6LLTIJcjs = require('./chunk-YA6LLTIJ.cjs');
28
+ var _chunkND224OE2cjs = require('./chunk-ND224OE2.cjs');
29
29
 
30
30
 
31
31
  var _chunkIK6LVLKCcjs = require('./chunk-IK6LVLKC.cjs');
@@ -34,7 +34,7 @@ var _chunkIK6LVLKCcjs = require('./chunk-IK6LVLKC.cjs');
34
34
 
35
35
 
36
36
 
37
- var _chunkO5DVPF3Rcjs = require('./chunk-O5DVPF3R.cjs');
37
+ var _chunkWFPRVVF2cjs = require('./chunk-WFPRVVF2.cjs');
38
38
 
39
39
 
40
40
  var _chunkKCMTCM6Icjs = require('./chunk-KCMTCM6I.cjs');
@@ -69,7 +69,8 @@ var _chunk2SJ4RQ6Pcjs = require('./chunk-2SJ4RQ6P.cjs');
69
69
 
70
70
 
71
71
 
72
- var _chunkR7LCG3BTcjs = require('./chunk-R7LCG3BT.cjs');
72
+
73
+ var _chunk3TQG7CGCcjs = require('./chunk-3TQG7CGC.cjs');
73
74
 
74
75
 
75
76
 
@@ -79,7 +80,7 @@ var _chunkDW34V5SMcjs = require('./chunk-DW34V5SM.cjs');
79
80
 
80
81
 
81
82
 
82
- var _chunk65P6OGYNcjs = require('./chunk-65P6OGYN.cjs');
83
+ var _chunkQJ4D3UKJcjs = require('./chunk-QJ4D3UKJ.cjs');
83
84
 
84
85
 
85
86
  var _chunkCXP5U3RWcjs = require('./chunk-CXP5U3RW.cjs');
@@ -111,7 +112,7 @@ var _chunkVPTDD5XFcjs = require('./chunk-VPTDD5XF.cjs');
111
112
  var _chunkPSV6XKPOcjs = require('./chunk-PSV6XKPO.cjs');
112
113
 
113
114
 
114
- var _chunkE3RDL2DAcjs = require('./chunk-E3RDL2DA.cjs');
115
+ var _chunk2CT6XUNOcjs = require('./chunk-2CT6XUNO.cjs');
115
116
 
116
117
 
117
118
 
@@ -123,14 +124,14 @@ var _chunk6EXBPJ24cjs = require('./chunk-6EXBPJ24.cjs');
123
124
  var _chunkVEKFLAQMcjs = require('./chunk-VEKFLAQM.cjs');
124
125
 
125
126
 
126
- var _chunk6K4SPQWLcjs = require('./chunk-6K4SPQWL.cjs');
127
+ var _chunkRCYINC4Acjs = require('./chunk-RCYINC4A.cjs');
127
128
 
128
129
 
129
130
 
130
131
  var _chunkOHY2ZWUGcjs = require('./chunk-OHY2ZWUG.cjs');
131
132
 
132
133
 
133
- var _chunk2ITKVAIFcjs = require('./chunk-2ITKVAIF.cjs');
134
+ var _chunkQIH2HD6Hcjs = require('./chunk-QIH2HD6H.cjs');
134
135
 
135
136
 
136
137
 
@@ -278,7 +279,7 @@ function getDocsTitle(docs) {
278
279
  }
279
280
  _chunkS3JO3N4Hcjs.__name.call(void 0, getDocsTitle, "getDocsTitle");
280
281
  function loadPages(contentDir, docs) {
281
- return _chunkAXYTGLF3cjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunkAXYTGLF3cjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
282
+ return _chunk3WSWXPYMcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunk3WSWXPYMcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
282
283
  }
283
284
  _chunkS3JO3N4Hcjs.__name.call(void 0, loadPages, "loadPages");
284
285
  function findSocialImagePath(html) {
@@ -299,14 +300,14 @@ async function addHandlerRoute(routes, pathname, handler, absolutePaths) {
299
300
  }
300
301
  _chunkS3JO3N4Hcjs.__name.call(void 0, addHandlerRoute, "addHandlerRoute");
301
302
  async function compileFarmDocsManifest(docs, options) {
302
- const contentDir = _chunkAXYTGLF3cjs.resolveFarmDocsContentDir.call(void 0, docs, options);
303
+ const contentDir = _chunk3WSWXPYMcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
303
304
  const pages = loadPages(contentDir, docs);
304
305
  const absolutePaths = [
305
306
  _path2.default.resolve(options.root),
306
307
  _path2.default.resolve(contentDir),
307
308
  docs.configPath || ""
308
309
  ];
309
- const handler = _chunkAXYTGLF3cjs.createFarmDocsHandler.call(void 0, docs, {
310
+ const handler = _chunk3WSWXPYMcjs.createFarmDocsHandler.call(void 0, docs, {
310
311
  root: options.root,
311
312
  srcDir: options.srcDir,
312
313
  clientEntry: options.clientEntry,
@@ -314,7 +315,7 @@ async function compileFarmDocsManifest(docs, options) {
314
315
  fontStylesheetHref: options.fontStylesheetHref,
315
316
  globalStylesheetHref: options.globalStylesheetHref
316
317
  });
317
- const apiHandler = _chunkRYDW7GPRcjs.createFarmDocsAPIHandler.call(void 0, {
318
+ const apiHandler = _chunkQLXEYIAWcjs.createFarmDocsAPIHandler.call(void 0, {
318
319
  rootDir: options.root,
319
320
  srcDir: options.srcDir,
320
321
  docs
@@ -406,7 +407,7 @@ async function compileFarmDocsManifest(docs, options) {
406
407
  post: await compileResponse(postResponse, absolutePaths),
407
408
  search: {
408
409
  pages: pages.map((page) => ({
409
- ..._chunkAXYTGLF3cjs.toFarmDocsMarkdownPage.call(void 0, page),
410
+ ..._chunk3WSWXPYMcjs.toFarmDocsMarkdownPage.call(void 0, page),
410
411
  sourcePath: `farm-docs:${page.slug || "index"}`
411
412
  })),
412
413
  search: _nullishCoalesce(searchConfig, () => ( true)),
@@ -1486,7 +1487,7 @@ function hasFarmPluginRoutes(config) {
1486
1487
  _chunkS3JO3N4Hcjs.__name.call(void 0, hasFarmPluginRoutes, "hasFarmPluginRoutes");
1487
1488
  function farmServerRuntimePluginsMayHandlePath(config, pathname) {
1488
1489
  return (config.plugins || []).some(
1489
- (plugin) => _chunkZ5HIWVDPcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && _chunkR7LCG3BTcjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
1490
+ (plugin) => _chunkZ5HIWVDPcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && _chunk3TQG7CGCcjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
1490
1491
  );
1491
1492
  }
1492
1493
  _chunkS3JO3N4Hcjs.__name.call(void 0, farmServerRuntimePluginsMayHandlePath, "farmServerRuntimePluginsMayHandlePath");
@@ -1548,7 +1549,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
1548
1549
  assertFarmDocsRuntimeSupported(config, preset);
1549
1550
  const srcDir = config.srcDir || "src";
1550
1551
  const distDir = config.distDir || ".farm";
1551
- const deployOutputDir = _chunkO5DVPF3Rcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
1552
+ const deployOutputDir = _chunkWFPRVVF2cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
1552
1553
  const lifecyclePluginManager = options.pluginManager;
1553
1554
  const productionViteResultPromise = Promise.allSettled([
1554
1555
  Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkA6WIQH5Zcjs.loadFarmProductionVite.call(void 0, ))))
@@ -1567,7 +1568,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
1567
1568
  const routeRuntimeManifestResultPromise = Promise.allSettled([routeRuntimeManifestPromise]);
1568
1569
  const pageRoutes = [];
1569
1570
  for (const [pattern, entry] of routeManager.getRoutes()) {
1570
- const markdownSourcePath = entry.markdownSourcePath || (_chunk6K4SPQWLcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? entry.modulePath : void 0);
1571
+ const markdownSourcePath = entry.markdownSourcePath || (_chunkRCYINC4Acjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? entry.modulePath : void 0);
1571
1572
  pageRoutes.push({
1572
1573
  pattern,
1573
1574
  modulePath: entry.modulePath,
@@ -1796,7 +1797,7 @@ async function mergeBuiltFontCss(outputDir, fontCssSource) {
1796
1797
  }
1797
1798
  const normalizedFontCss = typeof fontCss === "string" ? fontCss : Buffer.from(fontCss).toString("utf8");
1798
1799
  await fs.writeFile(fontCssPath, normalizedFontCss);
1799
- await fs.writeFile(clientCssPath, _chunkR7LCG3BTcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
1800
+ await fs.writeFile(clientCssPath, _chunk3TQG7CGCcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
1800
1801
  }
1801
1802
  _chunkS3JO3N4Hcjs.__name.call(void 0, mergeBuiltFontCss, "mergeBuiltFontCss");
1802
1803
  var _IncompleteClientBuildOutputError = class _IncompleteClientBuildOutputError extends Error {
@@ -1846,7 +1847,7 @@ function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, optio
1846
1847
  const key = `${_path2.default.resolve(root)}\0${mode}\0${options.asyncOwnerIslands === true}\0${_path2.default.resolve(modulePath)}`;
1847
1848
  let plan = cache.get(key);
1848
1849
  if (!plan) {
1849
- plan = _chunkR7LCG3BTcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
1850
+ plan = _chunk3TQG7CGCcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
1850
1851
  cache.set(key, plan);
1851
1852
  }
1852
1853
  return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
@@ -1875,14 +1876,14 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
1875
1876
  `[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
1876
1877
  );
1877
1878
  }
1878
- const isolatedMode = _chunkR7LCG3BTcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
1879
+ const isolatedMode = _chunk3TQG7CGCcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
1879
1880
  _optionalChain([config, 'access', _35 => _35.experimental, 'optionalAccess', _36 => _36.isolatedClientHydration]),
1880
1881
  {
1881
1882
  serverComponents: _optionalChain([config, 'access', _37 => _37.experimental, 'optionalAccess', _38 => _38.serverComponents]) === true,
1882
1883
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
1883
1884
  }
1884
1885
  );
1885
- const planOptions = _chunkR7LCG3BTcjs.getFarmClientHydrationPlanOptions.call(void 0,
1886
+ const planOptions = _chunk3TQG7CGCcjs.getFarmClientHydrationPlanOptions.call(void 0,
1886
1887
  config.renderer,
1887
1888
  Boolean(unsupportedIntegrationProvider)
1888
1889
  );
@@ -1939,7 +1940,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
1939
1940
  ), "isAdapterDocsRoute");
1940
1941
  const syntheticDocsEntry = _optionalChain([config, 'access', _46 => _46.docs, 'optionalAccess', _47 => _47.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
1941
1942
  const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
1942
- const markdownPagePlan = _chunkR7LCG3BTcjs.createMarkdownPageHydrationPlanner.call(void 0,
1943
+ const markdownPagePlan = _chunk3TQG7CGCcjs.createMarkdownPageHydrationPlanner.call(void 0,
1943
1944
  _chunkOHY2ZWUGcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunkOHY2ZWUGcjs.resolveMdxConfig.call(void 0, config.mdx), root),
1944
1945
  root,
1945
1946
  isolatedMode,
@@ -1947,7 +1948,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
1947
1948
  );
1948
1949
  const routePlans = pageRoutes.map((route) => ({
1949
1950
  route,
1950
- metadata: _chunk6K4SPQWLcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
1951
+ metadata: _chunkRCYINC4Acjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
1951
1952
  route.modulePath,
1952
1953
  root,
1953
1954
  isolatedMode,
@@ -1955,7 +1956,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
1955
1956
  planOptions
1956
1957
  )
1957
1958
  }));
1958
- _chunkR7LCG3BTcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
1959
+ _chunk3TQG7CGCcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
1959
1960
  clientLayouts.map((layout) => ({
1960
1961
  pattern: layout.pattern,
1961
1962
  depth: layout.pattern.split("/").filter(Boolean).length,
@@ -1987,7 +1988,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
1987
1988
  for (const layout of clientLayouts) {
1988
1989
  const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, route.pattern)) || Boolean(adapterDocsEntry && layoutAppliesToRoute(layout.pattern, adapterDocsEntry));
1989
1990
  if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
1990
- _chunk5QIKR7RRcjs.logger.warn(`\u26A0\uFE0F ${_chunkR7LCG3BTcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`);
1991
+ _chunk5QIKR7RRcjs.logger.warn(`\u26A0\uFE0F ${_chunk3TQG7CGCcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`);
1991
1992
  }
1992
1993
  }
1993
1994
  if (isolatedMode === "analyze") {
@@ -2011,7 +2012,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2011
2012
  );
2012
2013
  if (metadata.suppressedAsyncHydration) {
2013
2014
  _chunk5QIKR7RRcjs.logger.warn(
2014
- `\u26A0\uFE0F ${_chunkR7LCG3BTcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
2015
+ `\u26A0\uFE0F ${_chunk3TQG7CGCcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
2015
2016
  );
2016
2017
  }
2017
2018
  if (metadata.shouldHydrate || metadata.hasIsolatedClientBoundaries || applicableClientLayouts.length > 0) {
@@ -2070,7 +2071,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2070
2071
  }
2071
2072
  const clientRouteSlots = routeSlots.filter((slot) => {
2072
2073
  try {
2073
- return _chunkR7LCG3BTcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root).shouldHydrate;
2074
+ return _chunk3TQG7CGCcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root).shouldHydrate;
2074
2075
  } catch (error) {
2075
2076
  _chunk5QIKR7RRcjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
2076
2077
  return false;
@@ -2100,7 +2101,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2100
2101
  config.trailingSlash,
2101
2102
  _chunkZ5HIWVDPcjs.getIntegrationProviders.call(void 0, config.integrations),
2102
2103
  config.basePath,
2103
- _chunkR7LCG3BTcjs.generateClientCachePersistenceCode.call(void 0, _chunkR7LCG3BTcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
2104
+ _chunk3TQG7CGCcjs.generateClientCachePersistenceCode.call(void 0, _chunk3TQG7CGCcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
2104
2105
  adapterOwnsDocsRuntime ? _chunk75WGQVQAcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
2105
2106
  );
2106
2107
  await fs.writeFile(clientEntryPath, clientHydrationCode);
@@ -2117,7 +2118,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2117
2118
  const postcssConfigPath = _path2.default.join(clientEntryDir, "postcss.config.cjs");
2118
2119
  await fs.writeFile(postcssConfigPath, "module.exports = { plugins: [] };\n");
2119
2120
  postcssSearchPath = clientEntryDir;
2120
- tailwindVitePlugin = await _chunkR7LCG3BTcjs.loadTailwindVitePlugin.call(void 0, {
2121
+ tailwindVitePlugin = await _chunk3TQG7CGCcjs.loadTailwindVitePlugin.call(void 0, {
2121
2122
  builder: productionVite.builder,
2122
2123
  announce: true
2123
2124
  });
@@ -2186,7 +2187,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2186
2187
  }
2187
2188
  },
2188
2189
  plugins: [
2189
- _chunkR7LCG3BTcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
2190
+ _chunk3TQG7CGCcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
2190
2191
  ...tailwindVitePlugin ? [tailwindVitePlugin] : [],
2191
2192
  ...rendererVitePlugins,
2192
2193
  ...config.vite.plugins || [],
@@ -2247,7 +2248,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2247
2248
  } : void 0,
2248
2249
  // Ensure React is bundled for client
2249
2250
  resolve: {
2250
- alias: _chunkR7LCG3BTcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
2251
+ alias: _chunk3TQG7CGCcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
2251
2252
  dedupe: [...config.renderer.dedupe || []]
2252
2253
  },
2253
2254
  // Optimize dependencies - exclude server-side code from client bundle
@@ -2260,7 +2261,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2260
2261
  ]
2261
2262
  }
2262
2263
  };
2263
- await viteBuild(_chunkR7LCG3BTcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite));
2264
+ await viteBuild(_chunk3TQG7CGCcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite));
2264
2265
  await mergeBuiltFontCss(outputDir);
2265
2266
  await validateClientBuildOutput(root, srcDir, outputDir);
2266
2267
  } finally {
@@ -3019,7 +3020,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
3019
3020
  direction: {}
3020
3021
  }, plugins = [], renderer = _chunkPSV6XKPOcjs.REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule) {
3021
3022
  const toImportPath = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (targetPath) => targetPath.replace(/\\/g, "/"), "toImportPath");
3022
- const clientPluginEntry = _chunkR7LCG3BTcjs.generateFarmClientPluginEntryCode.call(void 0,
3023
+ const clientPluginEntry = _chunk3TQG7CGCcjs.generateFarmClientPluginEntryCode.call(void 0,
3023
3024
  plugins,
3024
3025
  root,
3025
3026
  srcDir,
@@ -3030,7 +3031,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
3030
3031
  import { createRoot, hydrateRoot } from "react-dom/client";` : appSetupPath ? `import React, { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
3031
3032
  import __farmAppSetup from ${JSON.stringify(_chunk5QIKR7RRcjs.toPosixPath.call(void 0, appSetupPath))};
3032
3033
  __farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};`;
3033
- const providerClientCode = _chunkR7LCG3BTcjs.generateFarmIntegrationProviderClientCode.call(void 0,
3034
+ const providerClientCode = _chunk3TQG7CGCcjs.generateFarmIntegrationProviderClientCode.call(void 0,
3034
3035
  integrationProviders,
3035
3036
  root,
3036
3037
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -3515,7 +3516,7 @@ function hasHydratableLayout(pathname) {
3515
3516
  });
3516
3517
  }
3517
3518
 
3518
- ${_chunkR7LCG3BTcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
3519
+ ${_chunk3TQG7CGCcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
3519
3520
  // Wrap a page element with applicable layouts
3520
3521
  function wrapWithLayouts(pageElement, pathname, params) {
3521
3522
  const layouts = getApplicableLayouts(pathname);
@@ -4430,7 +4431,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
4430
4431
  _path2.default.join(postcssConfigDir, "postcss.config.cjs"),
4431
4432
  "module.exports = { plugins: [] };\n"
4432
4433
  );
4433
- tailwindVitePlugin = await _chunkR7LCG3BTcjs.loadTailwindVitePlugin.call(void 0, {
4434
+ tailwindVitePlugin = await _chunk3TQG7CGCcjs.loadTailwindVitePlugin.call(void 0, {
4434
4435
  builder: productionVite.builder,
4435
4436
  label: "for SSR"
4436
4437
  });
@@ -4526,7 +4527,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
4526
4527
  }
4527
4528
  const middlewareRoutes = await discoverMiddlewareRoutes(appDirs);
4528
4529
  const instrumentationPath = _chunkKCMTCM6Icjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
4529
- const notFoundPath = _chunkR7LCG3BTcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
4530
+ const notFoundPath = _chunk3TQG7CGCcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
4530
4531
  if (notFoundPath) _chunk5QIKR7RRcjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
4531
4532
  layoutRoutes.sort((a, b) => {
4532
4533
  const depthA = a.pattern.split("/").filter(Boolean).length;
@@ -4549,7 +4550,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
4549
4550
  const hasObservabilityHandler = !!config.observability && typeof config.observability === "object" && "onEvent" in config.observability;
4550
4551
  const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _56 => _56.mdx, 'optionalAccess', _57 => _57.components]));
4551
4552
  const hasMiddlewareConfig = hasFarmMiddlewareConfig(config.middleware);
4552
- const hasRouteContextConfig = _chunkO5DVPF3Rcjs.hasCustomFarmRouteContext.call(void 0, config);
4553
+ const hasRouteContextConfig = _chunkWFPRVVF2cjs.hasCustomFarmRouteContext.call(void 0, config);
4553
4554
  const hasServerRuntimePlugins = hasFarmServerRuntimePlugins(config);
4554
4555
  const hasPluginRoutes = hasFarmPluginRoutes(config);
4555
4556
  const configModulePath = hasServerRuntimeIntegrations || hasObservabilityHandler || hasMdxComponentConfig || hasMiddlewareConfig || hasRouteContextConfig || hasServerRuntimePlugins || hasPluginRoutes || hasIntegrationProviders ? await findFarmConfigPath(root) : null;
@@ -4558,7 +4559,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
4558
4559
  const hasConfiguredRuntimePlugins = Boolean(
4559
4560
  hasRuntimeConfigModule && (config.plugins || []).length > 0
4560
4561
  );
4561
- const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _58 => _58.docs, 'optionalAccess', _59 => _59.enabled]) && _chunkC5GUTBZKcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? _optionalChain([config, 'access', _60 => _60.docs, 'access', _61 => _61.adapter, 'optionalAccess', _62 => _62.server]) ? await _chunkRYDW7GPRcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
4562
+ const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _58 => _58.docs, 'optionalAccess', _59 => _59.enabled]) && _chunkC5GUTBZKcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? _optionalChain([config, 'access', _60 => _60.docs, 'access', _61 => _61.adapter, 'optionalAccess', _62 => _62.server]) ? await _chunkQLXEYIAWcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
4562
4563
  root,
4563
4564
  srcDir: config.srcDir,
4564
4565
  clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
@@ -4708,7 +4709,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
4708
4709
  __FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _68 => _68.env, 'optionalAccess', _69 => _69.public]) || {})
4709
4710
  },
4710
4711
  plugins: [
4711
- _chunkR7LCG3BTcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
4712
+ _chunk3TQG7CGCcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
4712
4713
  ...tailwindVitePlugin ? [tailwindVitePlugin] : [],
4713
4714
  ...rendererVitePlugins,
4714
4715
  ...config.vite.plugins || [],
@@ -4768,7 +4769,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
4768
4769
  resolve: {
4769
4770
  alias: [
4770
4771
  ...shouldAliasReactServerToWebBuild(config.renderer, preset) ? [createFarmReactWebServerAlias(hasReactDomEdgeServerBuild(root))] : [],
4771
- ...Object.entries(_chunkR7LCG3BTcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
4772
+ ...Object.entries(_chunk3TQG7CGCcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
4772
4773
  ([find, replacement]) => ({ find, replacement })
4773
4774
  )
4774
4775
  ],
@@ -4776,7 +4777,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
4776
4777
  dedupe: [...config.renderer.dedupe || []]
4777
4778
  }
4778
4779
  };
4779
- await viteBuild(_chunkR7LCG3BTcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
4780
+ await viteBuild(_chunk3TQG7CGCcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
4780
4781
  } finally {
4781
4782
  if (postcssConfigDir) {
4782
4783
  try {
@@ -5153,7 +5154,7 @@ function isolateFarmRouteServerPage(element) { return element; }`;
5153
5154
  `Integration provider components are not supported by the "${config.renderer.name}" renderer.`
5154
5155
  );
5155
5156
  }
5156
- const providerServerModules = _chunkR7LCG3BTcjs.generateFarmIntegrationProviderServerModules.call(void 0,
5157
+ const providerServerModules = _chunk3TQG7CGCcjs.generateFarmIntegrationProviderServerModules.call(void 0,
5157
5158
  renderedIntegrationProviders,
5158
5159
  config.root,
5159
5160
  _nullishCoalesce(config.renderer.componentExtensions, () => ( []))
@@ -5173,14 +5174,14 @@ function isolateFarmRouteServerPage(element) { return element; }`;
5173
5174
  const unsupportedIntegrationProvider = renderedIntegrationProviders.find(
5174
5175
  (provider) => provider.supportsIsolatedHydration !== true
5175
5176
  );
5176
- const isolatedHydrationMode = _chunkR7LCG3BTcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
5177
+ const isolatedHydrationMode = _chunk3TQG7CGCcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
5177
5178
  _optionalChain([config, 'access', _89 => _89.experimental, 'optionalAccess', _90 => _90.isolatedClientHydration]),
5178
5179
  {
5179
5180
  serverComponents: _optionalChain([config, 'access', _91 => _91.experimental, 'optionalAccess', _92 => _92.serverComponents]) === true,
5180
5181
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
5181
5182
  }
5182
5183
  );
5183
- const hydrationPlanOptions = _chunkR7LCG3BTcjs.getFarmClientHydrationPlanOptions.call(void 0,
5184
+ const hydrationPlanOptions = _chunk3TQG7CGCcjs.getFarmClientHydrationPlanOptions.call(void 0,
5184
5185
  config.renderer,
5185
5186
  Boolean(unsupportedIntegrationProvider)
5186
5187
  );
@@ -5195,7 +5196,7 @@ function isolateFarmRouteServerPage(element) { return element; }`;
5195
5196
  hydrationPlanOptions
5196
5197
  )
5197
5198
  }));
5198
- const markdownPagePlan = _chunkR7LCG3BTcjs.createMarkdownPageHydrationPlanner.call(void 0,
5199
+ const markdownPagePlan = _chunk3TQG7CGCcjs.createMarkdownPageHydrationPlanner.call(void 0,
5199
5200
  _chunkOHY2ZWUGcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunkOHY2ZWUGcjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
5200
5201
  config.root,
5201
5202
  isolatedHydrationMode,
@@ -5204,7 +5205,7 @@ function isolateFarmRouteServerPage(element) { return element; }`;
5204
5205
  const pageHydrationPlans = new Map(
5205
5206
  pageRoutes.map((route) => [
5206
5207
  route.modulePath,
5207
- _chunk6K4SPQWLcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
5208
+ _chunkRCYINC4Acjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
5208
5209
  route.modulePath,
5209
5210
  config.root,
5210
5211
  isolatedHydrationMode,
@@ -5213,7 +5214,7 @@ function isolateFarmRouteServerPage(element) { return element; }`;
5213
5214
  )
5214
5215
  ])
5215
5216
  );
5216
- _chunkR7LCG3BTcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
5217
+ _chunk3TQG7CGCcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
5217
5218
  layoutHydrationPlans.map((layout) => ({
5218
5219
  pattern: layout.pattern,
5219
5220
  depth: layout.pattern.split("/").filter(Boolean).length,
@@ -5254,7 +5255,7 @@ function isolateFarmRouteServerPage(element) { return element; }`;
5254
5255
  }).map(({ route }) => route);
5255
5256
  orderedPageRoutes.forEach((route, index) => {
5256
5257
  const varName = `pageRoute${index}`;
5257
- if (_chunk6K4SPQWLcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) {
5258
+ if (_chunkRCYINC4Acjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) {
5258
5259
  pageRegistrations.push(`
5259
5260
  {
5260
5261
  pattern: ${JSON.stringify(route.pattern)},
@@ -5696,7 +5697,7 @@ const farmResolvedRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs);
5696
5697
 
5697
5698
  function FarmDefault404Page() {
5698
5699
  return React.createElement(React.Fragment, null,
5699
- React.createElement("style", null, ${JSON.stringify(_chunkR7LCG3BTcjs.DEFAULT_NOT_FOUND_STYLES)}),
5700
+ React.createElement("style", null, ${JSON.stringify(_chunk3TQG7CGCcjs.DEFAULT_NOT_FOUND_STYLES)}),
5700
5701
  React.createElement("main", {
5701
5702
  className: "farm-default-not-found",
5702
5703
  "aria-labelledby": "farm-default-not-found-title",
@@ -5935,7 +5936,7 @@ const apiRoutes = ${apiRoutes.length > 0 ? "mergePluginAPIRoutes(" : ""}[${apiRe
5935
5936
  ]${apiRoutes.length > 0 ? `, configuredPlugins, ${JSON.stringify(apiRoutes.map(({ path: path7, methods }) => ({ path: path7, methods })))}, { bodySizeLimit: ${JSON.stringify(config.server.bodySizeLimit)} })` : ""};
5936
5937
  const farmLocalAPIBasePath = ${JSON.stringify(_chunkWPYFSQKKcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))};
5937
5938
  const farmOpenAPIReference = ${JSON.stringify(openAPIReference)};
5938
- ${_optionalChain([config, 'access', _122 => _122.agent, 'optionalAccess', _123 => _123.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunk65P6OGYNcjs.resolveFarmApiCatalogInput.call(void 0, config))};
5939
+ ${_optionalChain([config, 'access', _122 => _122.agent, 'optionalAccess', _123 => _123.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunkQJ4D3UKJcjs.resolveFarmApiCatalogInput.call(void 0, config))};
5939
5940
  ` : ""}
5940
5941
  function isFarmLocalAPIPathname(pathname) {
5941
5942
  return farmLocalAPIBasePath !== "/" &&
@@ -6326,12 +6327,13 @@ function stripFarmDocumentWrappers(markup) {
6326
6327
  }
6327
6328
 
6328
6329
  // Farm's display:contents wrappers, and the head elements React 19 hoists in front of them
6329
- // (charset, viewport, preloads, titles) when the layout's <html> is not the render root.
6330
+ // (charset, viewport, preloads, titles, async scripts, precedence styles) when the layout's
6331
+ // <html> is not the render root. The hoistable pattern is shared with the dev renderer.
6330
6332
  function peelFarmDocumentPrefix(markup) {
6331
6333
  let inner = markup.replace(/^\\s+/, "");
6332
6334
  let hoisted = "";
6333
6335
  const wrapper = /^<div\\b[^>]*style=["']display\\s*:\\s*contents["'][^>]*>/i;
6334
- const hoistable = /^(?:<(?:meta|link|base)\\b[^>]*>|<title\\b[^>]*>[\\s\\S]*?<\\/title>)/i;
6336
+ const hoistable = /${_chunk3TQG7CGCcjs.HOISTED_HEAD_ELEMENT.source}/i;
6335
6337
  let match;
6336
6338
  while ((match = wrapper.exec(inner) || hoistable.exec(inner))) {
6337
6339
  if (!/^<div/i.test(match[0])) hoisted += match[0];
@@ -6843,7 +6845,7 @@ async function handleApplicationMetadataRouteRequest(request, routePathname) {
6843
6845
  const body = isLlmsFull && !(value instanceof Response)
6844
6846
  ? await renderFarmLlmsFullTxt(value, { origin: url.origin, readMarkdown: llmsContext.markdown })
6845
6847
  : value;
6846
- return createFarmMetadataRouteResponse(match.metadata.kind, body, routeModule, { method });
6848
+ return createFarmMetadataRouteResponse(match.metadata.kind, body, routeModule, { method, request });
6847
6849
  } catch (error) {
6848
6850
  console.error("Metadata route render failed:", error);
6849
6851
  return new Response("Internal Server Error", {
@@ -7646,9 +7648,9 @@ async function handleFarmRequestInContext(
7646
7648
  ` : ""}
7647
7649
  ${_optionalChain([config, 'access', _138 => _138.agent, 'optionalAccess', _139 => _139.apiCatalog]) ? `
7648
7650
  // agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
7649
- if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunk65P6OGYNcjs.FARM_API_CATALOG_PATH)}) {
7651
+ if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkQJ4D3UKJcjs.FARM_API_CATALOG_PATH)}) {
7650
7652
  return applyProductionMiddlewareHeaders(
7651
- createFarmApiCatalogResponse(request.method, farmApiCatalogInput),
7653
+ createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
7652
7654
  middlewareHeaders,
7653
7655
  );
7654
7656
  }
@@ -7670,26 +7672,34 @@ async function handleFarmRequestInContext(
7670
7672
  if (farmGeneratedLlmsKind) {
7671
7673
  const llmsContext = createFarmLlmsTxtContext(request, farmGeneratedLlmsKind === "llms-full");
7672
7674
  const llmsOrigin = new URL(request.url).origin;
7673
- const renderLlmsFull = () =>
7675
+ // A page that times out is left out, the shared render is not reused, and
7676
+ // the partial response is not cacheable.
7677
+ let llmsComplete = true;
7678
+ const renderLlmsFull = (shared) =>
7674
7679
  renderFarmLlmsFullTxt(llmsContext.defaults, {
7675
7680
  origin: llmsOrigin,
7676
7681
  readMarkdown: llmsContext.markdown,
7682
+ onIncomplete: () => {
7683
+ llmsComplete = false;
7684
+ if (shared) shared.incomplete();
7685
+ },
7677
7686
  });
7678
7687
  // HEAD reads no pages, so it neither waits for nor fills the shared render.
7679
7688
  const llmsBody = farmGeneratedLlmsKind !== "llms-full"
7680
7689
  ? llmsContext.defaults
7681
7690
  : request.method.toUpperCase() === "HEAD"
7682
7691
  ? await renderLlmsFull()
7683
- : await farmLlmsFullRenderer(llmsOrigin, renderLlmsFull);
7684
- return applyProductionMiddlewareHeaders(
7685
- createFarmMetadataRouteResponse(
7686
- farmGeneratedLlmsKind,
7687
- llmsBody,
7688
- { revalidate: farmLlmsTxtConfig.revalidate },
7689
- { method: request.method },
7690
- ),
7691
- middlewareHeaders,
7692
+ : await farmLlmsFullRenderer(llmsOrigin, renderLlmsFull, (complete) => {
7693
+ llmsComplete = complete;
7694
+ });
7695
+ const llmsResponse = createFarmMetadataRouteResponse(
7696
+ farmGeneratedLlmsKind,
7697
+ llmsBody,
7698
+ { revalidate: llmsComplete ? farmLlmsTxtConfig.revalidate : 0 },
7699
+ { method: request.method, request },
7692
7700
  );
7701
+ if (!llmsComplete) llmsResponse.headers.set("cache-control", "no-store");
7702
+ return applyProductionMiddlewareHeaders(llmsResponse, middlewareHeaders);
7693
7703
  }
7694
7704
  ` : ""}
7695
7705
 
@@ -8954,7 +8964,7 @@ function getPhysicalPrerenderBypassReason(options) {
8954
8964
  }
8955
8965
  if (appMiddlewareMayHandlePath(middlewareRoutes, pathname)) return "app middleware";
8956
8966
  if (configMiddlewareMayHandlePath(config.middleware, pathname)) return "configured middleware";
8957
- if (_chunkO5DVPF3Rcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
8967
+ if (_chunkWFPRVVF2cjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
8958
8968
  if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
8959
8969
  const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
8960
8970
  if (_optionalChain([manifestEntry, 'optionalAccess', _159 => _159.rendering]) === "dynamic") return "dynamic runtime manifest";
@@ -8980,7 +8990,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
8980
8990
  const nitroBuilder = nitroBuilderResult.value;
8981
8991
  const isVercel = preset === "vercel" || preset === "vercel-edge";
8982
8992
  const isCloudflareWorker = preset === "cloudflare-module";
8983
- const outputDir = _chunkO5DVPF3Rcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
8993
+ const outputDir = _chunkWFPRVVF2cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
8984
8994
  const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
8985
8995
  const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
8986
8996
  const imageRuntime = resolveImageRuntime(config, preset);
@@ -9338,16 +9348,19 @@ export default async function farmNitroEventHandler(event) {
9338
9348
  if (_optionalChain([config, 'access', _179 => _179.md, 'optionalAccess', _180 => _180.enabled])) {
9339
9349
  nitroInstance.hooks.hook("prerender:generate", (route) => {
9340
9350
  if (!route.contents || !_optionalChain([route, 'access', _181 => _181.contentType, 'optionalAccess', _182 => _182.toLowerCase, 'call', _183 => _183(), 'access', _184 => _184.includes, 'call', _185 => _185("html")])) return;
9341
- const alternatePath = _chunk2ITKVAIFcjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route);
9351
+ const alternatePath = _chunkQIH2HD6Hcjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route);
9342
9352
  if (!alternatePath) return;
9343
9353
  const routeRule = nitroInstance.options.routeRules[route.route] || {};
9344
- nitroInstance.options.routeRules[route.route] = {
9345
- ...routeRule,
9346
- headers: {
9347
- ...routeRule.headers,
9348
- Link: `<${alternatePath}>; rel="alternate"; type="text/markdown"`
9349
- }
9350
- };
9354
+ const alternate = `<${alternatePath}>; rel="alternate"; type="text/markdown"`;
9355
+ const headers = { ...routeRule.headers };
9356
+ let link;
9357
+ for (const key of Object.keys(headers)) {
9358
+ if (key.toLowerCase() !== "link") continue;
9359
+ link = link ? `${link}, ${headers[key]}` : headers[key];
9360
+ delete headers[key];
9361
+ }
9362
+ headers.Link = !link ? alternate : link.includes(alternate) ? link : `${link}, ${alternate}`;
9363
+ nitroInstance.options.routeRules[route.route] = { ...routeRule, headers };
9351
9364
  });
9352
9365
  nitroInstance.hooks.hook("prerender:done", () => {
9353
9366
  nitroInstance.routing.sync();
@@ -9356,7 +9369,7 @@ export default async function farmNitroEventHandler(event) {
9356
9369
  if (config.security.csp && config.security.csp.nonce) {
9357
9370
  nitroInstance.hooks.hook("prerender:generate", async (route) => {
9358
9371
  if (!route.contents || !_optionalChain([route, 'access', _186 => _186.contentType, 'optionalAccess', _187 => _187.toLowerCase, 'call', _188 => _188(), 'access', _189 => _189.includes, 'call', _190 => _190("html")])) return;
9359
- const staticCsp = await _chunkE3RDL2DAcjs.applyFarmCspHashesToHtml.call(void 0, route.contents, config.security);
9372
+ const staticCsp = await _chunk2CT6XUNOcjs.applyFarmCspHashesToHtml.call(void 0, route.contents, config.security);
9360
9373
  if (!staticCsp) return;
9361
9374
  route.contents = staticCsp.html;
9362
9375
  const routeRule = nitroInstance.options.routeRules[route.route] || {};
@@ -9426,13 +9439,13 @@ export default async function farmNitroEventHandler(event) {
9426
9439
  }
9427
9440
  if (prerenderRoutes.length > 0) {
9428
9441
  _chunk5QIKR7RRcjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
9429
- const previousPrerender = process.env[_chunkYA6LLTIJcjs.FARM_PRERENDER_ENV];
9430
- process.env[_chunkYA6LLTIJcjs.FARM_PRERENDER_ENV] = "1";
9442
+ const previousPrerender = process.env[_chunkND224OE2cjs.FARM_PRERENDER_ENV];
9443
+ process.env[_chunkND224OE2cjs.FARM_PRERENDER_ENV] = "1";
9431
9444
  try {
9432
9445
  await nitroBuilder.prerender(nitroInstance);
9433
9446
  } finally {
9434
- if (previousPrerender === void 0) delete process.env[_chunkYA6LLTIJcjs.FARM_PRERENDER_ENV];
9435
- else process.env[_chunkYA6LLTIJcjs.FARM_PRERENDER_ENV] = previousPrerender;
9447
+ if (previousPrerender === void 0) delete process.env[_chunkND224OE2cjs.FARM_PRERENDER_ENV];
9448
+ else process.env[_chunkND224OE2cjs.FARM_PRERENDER_ENV] = previousPrerender;
9436
9449
  }
9437
9450
  }
9438
9451
  const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs, preset) : Promise.resolve(null);
@@ -9623,7 +9636,7 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs) {
9623
9636
  const docsContentDir = resolveBuildDocsContentDir(config, root);
9624
9637
  if (!docsContentDir) return;
9625
9638
  const bundledContentDir = _path2.default.join(nitroFuncDir, "farm-docs-content");
9626
- const lastModifiedManifest = _chunkAXYTGLF3cjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
9639
+ const lastModifiedManifest = _chunk3WSWXPYMcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
9627
9640
  fallback: "now"
9628
9641
  });
9629
9642
  await fs.rm(bundledContentDir, { recursive: true, force: true });
@@ -9633,7 +9646,7 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs) {
9633
9646
  force: true
9634
9647
  });
9635
9648
  await fs.writeFile(
9636
- _path2.default.join(bundledContentDir, _chunkAXYTGLF3cjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
9649
+ _path2.default.join(bundledContentDir, _chunk3WSWXPYMcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
9637
9650
  `${JSON.stringify(lastModifiedManifest, null, 2)}
9638
9651
  `
9639
9652
  );
@@ -9710,7 +9723,7 @@ async function stageSharpRuntime(config, root, distDir, fs, preset) {
9710
9723
  try {
9711
9724
  await copyPackage("sharp", sharpRequire);
9712
9725
  if (!copiedPackages.has("sharp")) {
9713
- throw new Error(`Farm image optimization requires sharp. ${_chunkR7LCG3BTcjs.SHARP_INSTALL_HINT}`);
9726
+ throw new Error(`Farm image optimization requires sharp. ${_chunk3TQG7CGCcjs.SHARP_INSTALL_HINT}`);
9714
9727
  }
9715
9728
  } catch (error) {
9716
9729
  await fs.rm(stageDir, { recursive: true, force: true });
@@ -9924,7 +9937,7 @@ function createBuildTargetBaseline(config) {
9924
9937
  preset,
9925
9938
  distDir,
9926
9939
  outputDir,
9927
- outputWasDerived: outputDir === _chunkO5DVPF3Rcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
9940
+ outputWasDerived: outputDir === _chunkWFPRVVF2cjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
9928
9941
  };
9929
9942
  }
9930
9943
  _chunkS3JO3N4Hcjs.__name.call(void 0, createBuildTargetBaseline, "createBuildTargetBaseline");
@@ -9934,8 +9947,8 @@ function resolveBuildTargets(config, options, baseline) {
9934
9947
  const distDir = config.distDir || ".farm";
9935
9948
  const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
9936
9949
  const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
9937
- const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkO5DVPF3Rcjs.getDeployTargetForPreset.call(void 0, preset);
9938
- const outputDir = shouldRefreshDerivedOutput ? _chunkO5DVPF3Rcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
9950
+ const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkWFPRVVF2cjs.getDeployTargetForPreset.call(void 0, preset);
9951
+ const outputDir = shouldRefreshDerivedOutput ? _chunkWFPRVVF2cjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
9939
9952
  return {
9940
9953
  root,
9941
9954
  preset,
@@ -9943,7 +9956,7 @@ function resolveBuildTargets(config, options, baseline) {
9943
9956
  distDir,
9944
9957
  deployTarget,
9945
9958
  outputDir,
9946
- deployOutputDir: _chunkO5DVPF3Rcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
9959
+ deployOutputDir: _chunkWFPRVVF2cjs.resolveDeployOutputPath.call(void 0, root, outputDir)
9947
9960
  };
9948
9961
  }
9949
9962
  _chunkS3JO3N4Hcjs.__name.call(void 0, resolveBuildTargets, "resolveBuildTargets");
@@ -9952,7 +9965,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
9952
9965
  const targetBaseline = createBuildTargetBaseline(config);
9953
9966
  let targets;
9954
9967
  const productionViteResultPromise = options.universal === false ? void 0 : Promise.allSettled([Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkA6WIQH5Zcjs.loadFarmProductionVite.call(void 0, ))))]);
9955
- const pluginManager = new (0, _chunkR7LCG3BTcjs.PluginManager)({
9968
+ const pluginManager = new (0, _chunk3TQG7CGCcjs.PluginManager)({
9956
9969
  config,
9957
9970
  isDev: false,
9958
9971
  isProd: true
@@ -9981,7 +9994,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
9981
9994
  };
9982
9995
  config = {
9983
9996
  ...config,
9984
- images: _chunkR7LCG3BTcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
9997
+ images: _chunk3TQG7CGCcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
9985
9998
  root: targets.root,
9986
9999
  preset: targets.preset
9987
10000
  })
@@ -10009,7 +10022,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
10009
10022
  root,
10010
10023
  rendererBuild.signal
10011
10024
  );
10012
- const farmApp = _chunkR7LCG3BTcjs.createFarmApp.call(void 0, config, projectModuleServer);
10025
+ const farmApp = _chunk3TQG7CGCcjs.createFarmApp.call(void 0, config, projectModuleServer);
10013
10026
  await farmApp.initialize();
10014
10027
  const routeManager = farmApp.getRouteManager();
10015
10028
  const serverRenderer = farmApp.getServerRenderer();
@@ -10020,7 +10033,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
10020
10033
  plugins: config.plugins,
10021
10034
  extraRoutes: [
10022
10035
  ..._optionalChain([config, 'access', _197 => _197.openapi, 'optionalAccess', _198 => _198.enabled]) && config.openapi.route ? [config.openapi.route] : [],
10023
- ..._chunkAXYTGLF3cjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
10036
+ ..._chunk3WSWXPYMcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
10024
10037
  ],
10025
10038
  suppressLintOnLink: config.suppressLintOnLink,
10026
10039
  componentExtensions: config.renderer.componentExtensions,
@@ -10116,7 +10129,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
10116
10129
  ssr: true,
10117
10130
  buildLifetime
10118
10131
  });
10119
- const viteConfig = _chunkR7LCG3BTcjs.mergeFarmViteConfig.call(void 0,
10132
+ const viteConfig = _chunk3TQG7CGCcjs.mergeFarmViteConfig.call(void 0,
10120
10133
  {
10121
10134
  root,
10122
10135
  appType: "custom",
@@ -10128,7 +10141,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
10128
10141
  },
10129
10142
  plugins: [
10130
10143
  ...rendererVitePlugins,
10131
- _chunkR7LCG3BTcjs.farmFontImportsPlugin.call(void 0, {
10144
+ _chunk3TQG7CGCcjs.farmFontImportsPlugin.call(void 0, {
10132
10145
  root,
10133
10146
  basePath: config.basePath,
10134
10147
  publicDir: config.publicDir
@@ -10140,7 +10153,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
10140
10153
  hmr: false
10141
10154
  },
10142
10155
  resolve: {
10143
- alias: _chunkR7LCG3BTcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
10156
+ alias: _chunk3TQG7CGCcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
10144
10157
  dedupe: [...config.renderer.dedupe || []]
10145
10158
  },
10146
10159
  optimizeDeps: {
@@ -10261,7 +10274,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
10261
10274
  if (pluginManager) {
10262
10275
  nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
10263
10276
  }
10264
- const outputDir = _chunkO5DVPF3Rcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
10277
+ const outputDir = _chunkWFPRVVF2cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
10265
10278
  const serverOutputDir = _path2.default.join(outputDir, "server");
10266
10279
  const publicOutputDir = _path2.default.join(outputDir, "public");
10267
10280
  const { mkdir, cp } = await import("fs/promises");
@@ -10332,7 +10345,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
10332
10345
  root,
10333
10346
  preset,
10334
10347
  distDir,
10335
- outputDir: _chunkO5DVPF3Rcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
10348
+ outputDir: _chunkWFPRVVF2cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
10336
10349
  });
10337
10350
  }
10338
10351
  }