@farm.js/core 0.1.22 → 0.1.23

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 (150) hide show
  1. package/dist/agent-runtime.d.mts +3 -2
  2. package/dist/agent-runtime.d.ts +3 -2
  3. package/dist/api/route-manager.cjs +3 -2
  4. package/dist/api/route-manager.d.mts +3 -2
  5. package/dist/api/route-manager.d.ts +3 -2
  6. package/dist/api/route-manager.mjs +2 -1
  7. package/dist/api.cjs +4 -3
  8. package/dist/api.d.mts +4 -3
  9. package/dist/api.d.ts +4 -3
  10. package/dist/api.mjs +3 -2
  11. package/dist/{app-B7qKw8Ny.d.ts → app-BV-7wV5q.d.ts} +3 -3
  12. package/dist/{app-0e-oTC_R.d.mts → app-BZDWwwFa.d.mts} +3 -3
  13. package/dist/app-markdown.d.mts +4 -3
  14. package/dist/app-markdown.d.ts +4 -3
  15. package/dist/chunk-2VQKKQ6D.mjs +51 -0
  16. package/dist/{chunk-EGJDUF4Q.mjs → chunk-3ATMYLLJ.mjs} +6 -12
  17. package/dist/{chunk-HSDL2AUR.mjs → chunk-47H7VENP.mjs} +20 -32
  18. package/dist/{chunk-EXUMQVY3.cjs → chunk-4DKZ6JR3.cjs} +258 -256
  19. package/dist/{chunk-PUCUVI7K.mjs → chunk-72VJRKJD.mjs} +1 -1
  20. package/dist/{chunk-PC33YKTC.mjs → chunk-7LU4IOXQ.mjs} +128 -126
  21. package/dist/{chunk-SPSQFO3Z.mjs → chunk-BDJNP7AQ.mjs} +9 -13
  22. package/dist/{chunk-GXXONIAR.cjs → chunk-DNLQMFER.cjs} +12 -16
  23. package/dist/{chunk-SO7CRMP6.cjs → chunk-DW34V5SM.cjs} +5 -5
  24. package/dist/{chunk-X2ZUD4GI.mjs → chunk-EHUZ2MKO.mjs} +1 -1
  25. package/dist/{chunk-3NM6SRI6.mjs → chunk-F3VB7ONA.mjs} +10 -8
  26. package/dist/{chunk-P5HSJCXI.cjs → chunk-III667SJ.cjs} +291 -260
  27. package/dist/chunk-IK6LVLKC.cjs +51 -0
  28. package/dist/{chunk-B3WK4DTX.cjs → chunk-IMBMOEWT.cjs} +5 -1
  29. package/dist/{chunk-IILNZK5G.mjs → chunk-JHWOVJ3M.mjs} +46 -62
  30. package/dist/{chunk-TKNSDBBN.cjs → chunk-K3F2E6GS.cjs} +20 -1
  31. package/dist/{chunk-RTHIVJ2G.cjs → chunk-KCMTCM6I.cjs} +7 -8
  32. package/dist/{chunk-Q3PX2TGL.cjs → chunk-LQIRVSBY.cjs} +30 -40
  33. package/dist/chunk-LYLEZIG3.cjs +73 -0
  34. package/dist/{chunk-NBAHDVOJ.cjs → chunk-LYM7HY34.cjs} +20 -32
  35. package/dist/{chunk-K6FNHVDR.cjs → chunk-MPEYMSCF.cjs} +6 -12
  36. package/dist/{chunk-BHJUZ64B.cjs → chunk-QTBEAKCJ.cjs} +7 -7
  37. package/dist/{chunk-J6JRB2ER.mjs → chunk-S67OYZU7.mjs} +1 -1
  38. package/dist/chunk-SFGWNC43.mjs +97 -0
  39. package/dist/{chunk-AYJR42WX.cjs → chunk-UFDV5N3C.cjs} +2 -2
  40. package/dist/chunk-UYIHRDE4.cjs +97 -0
  41. package/dist/{chunk-Y4YMF2NQ.cjs → chunk-VPTDD5XF.cjs} +46 -62
  42. package/dist/{chunk-AAWTJW2G.mjs → chunk-VPY755R2.mjs} +58 -27
  43. package/dist/{chunk-GKT4ONKN.mjs → chunk-VVJCWBIE.mjs} +2 -2
  44. package/dist/{chunk-2HCEC2YO.cjs → chunk-VXCA7RZP.cjs} +1 -1
  45. package/dist/{chunk-CQHFU55R.mjs → chunk-WNUBR4CA.mjs} +5 -1
  46. package/dist/{chunk-CIAGU2X4.cjs → chunk-XSIRSMAS.cjs} +10 -8
  47. package/dist/{chunk-ONMW3EVV.mjs → chunk-YGMK6ESJ.mjs} +20 -30
  48. package/dist/chunk-YOZYCI6Z.mjs +73 -0
  49. package/dist/{chunk-HLCDYJY7.mjs → chunk-YQVSHTMR.mjs} +20 -1
  50. package/dist/{chunk-F5D4XEAS.mjs → chunk-ZZSRYEYU.mjs} +7 -8
  51. package/dist/{client-plugins-CWrhb1ir.d.mts → client-plugins-B_XzCegf.d.mts} +11 -9
  52. package/dist/{client-plugins-DPf0qZey.d.ts → client-plugins-CKsXQfXY.d.ts} +11 -9
  53. package/dist/client-plugins.d.mts +3 -2
  54. package/dist/client-plugins.d.ts +3 -2
  55. package/dist/client.d.mts +7 -6
  56. package/dist/client.d.ts +7 -6
  57. package/dist/config.d.mts +3 -2
  58. package/dist/config.d.ts +3 -2
  59. package/dist/{devtools-EZ5ORGAK.mjs → devtools-OY4SNU3P.mjs} +4 -3
  60. package/dist/{devtools-6DQHO7EK.cjs → devtools-UHRSZ7VA.cjs} +5 -4
  61. package/dist/docs.cjs +9 -6
  62. package/dist/docs.mjs +8 -5
  63. package/dist/index.cjs +23 -20
  64. package/dist/index.d.mts +14 -13
  65. package/dist/index.d.ts +14 -13
  66. package/dist/index.mjs +18 -15
  67. package/dist/instrumentation.cjs +3 -2
  68. package/dist/instrumentation.mjs +2 -1
  69. package/dist/integrations.d.mts +3 -2
  70. package/dist/integrations.d.ts +3 -2
  71. package/dist/internal/app-markdown-runtime.d.mts +3 -2
  72. package/dist/internal/app-markdown-runtime.d.ts +3 -2
  73. package/dist/internal/build-runtime.cjs +17 -14
  74. package/dist/internal/build-runtime.d.mts +5 -4
  75. package/dist/internal/build-runtime.d.ts +5 -4
  76. package/dist/internal/build-runtime.mjs +16 -13
  77. package/dist/internal/cli-runtime.cjs +10 -7
  78. package/dist/internal/cli-runtime.mjs +9 -6
  79. package/dist/internal/client-error-overlay.cjs +4 -4
  80. package/dist/internal/client-error-overlay.mjs +1 -1
  81. package/dist/internal/compression-runtime.d.mts +3 -2
  82. package/dist/internal/compression-runtime.d.ts +3 -2
  83. package/dist/internal/config-runtime.cjs +5 -4
  84. package/dist/internal/config-runtime.d.mts +4 -3
  85. package/dist/internal/config-runtime.d.ts +4 -3
  86. package/dist/internal/config-runtime.mjs +4 -3
  87. package/dist/internal/metadata-image-runtime.cjs +3 -2
  88. package/dist/internal/metadata-image-runtime.mjs +2 -1
  89. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  90. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  91. package/dist/internal/production-runtime.d.mts +9 -8
  92. package/dist/internal/production-runtime.d.ts +9 -8
  93. package/dist/layers-4PNE2HOY.cjs +18 -0
  94. package/dist/{layers-CJKSJGLN.mjs → layers-BRQF5ETU.mjs} +2 -1
  95. package/dist/{manager-NPG43N46.mjs → manager-RT733VRK.mjs} +2 -2
  96. package/dist/{manager-G4B2IPYE.cjs → manager-XZ5TX7AO.cjs} +3 -3
  97. package/dist/{metadata-CO9fRyyJ.d.mts → metadata-B08w4EYV.d.mts} +1 -1
  98. package/dist/{metadata-zY9wltwH.d.ts → metadata-IQEblkZp.d.ts} +1 -1
  99. package/dist/middleware.d.mts +5 -4
  100. package/dist/middleware.d.ts +5 -4
  101. package/dist/navigation.d.mts +6 -5
  102. package/dist/navigation.d.ts +6 -5
  103. package/dist/{nitro-TSGDUJMN.cjs → nitro-KQDU7CFE.cjs} +2 -2
  104. package/dist/{nitro-4LFVTT24.mjs → nitro-ZKLGOTVY.mjs} +1 -1
  105. package/dist/node-module-bundle-L5L7JCZ4.mjs +11 -0
  106. package/dist/node-module-bundle-VAFZOXMJ.cjs +11 -0
  107. package/dist/plugin.cjs +11 -9
  108. package/dist/plugin.d.mts +3 -2
  109. package/dist/plugin.d.ts +3 -2
  110. package/dist/plugin.mjs +10 -8
  111. package/dist/{production-runtime-CywsHwnG.d.mts → production-runtime-C3bGFEaM.d.mts} +1 -1
  112. package/dist/{production-runtime-lkfwujwK.d.ts → production-runtime-DRSOkc-d.d.ts} +1 -1
  113. package/dist/{render-plan-LVy6sGQe.d.mts → render-plan-B6CKNl4e.d.mts} +1 -1
  114. package/dist/{render-plan-DHF0GeWo.d.ts → render-plan-CCFuMLNS.d.ts} +1 -1
  115. package/dist/renderer-client.d.mts +5 -4
  116. package/dist/renderer-client.d.ts +5 -4
  117. package/dist/{request-6AkmhEYE.d.mts → request-DgD1XsTx.d.mts} +1 -1
  118. package/dist/{request-BYxlRqA9.d.ts → request-Dn6VURbE.d.ts} +1 -1
  119. package/dist/request.d.mts +4 -3
  120. package/dist/request.d.ts +4 -3
  121. package/dist/{route-rendering-Dd8Jmml7.d.mts → route-rendering-76A5I_kE.d.mts} +1 -1
  122. package/dist/{route-rendering-CWaKiUbS.d.ts → route-rendering-LAmQEdyG.d.ts} +1 -1
  123. package/dist/{router-B2m4fvve.d.ts → router-BSOOGya2.d.ts} +1 -1
  124. package/dist/{router-xwEE112q.d.mts → router-CnrRSa9d.d.mts} +1 -1
  125. package/dist/routes.d.mts +3 -2
  126. package/dist/routes.d.ts +3 -2
  127. package/dist/server-plugins.d.mts +4 -3
  128. package/dist/server-plugins.d.ts +4 -3
  129. package/dist/server.cjs +39 -26
  130. package/dist/server.d.mts +9 -8
  131. package/dist/server.d.ts +9 -8
  132. package/dist/server.mjs +24 -11
  133. package/dist/{spa-router-Y8rrXTVK.d.ts → spa-router-BMrSsG5b.d.ts} +2 -2
  134. package/dist/{spa-router-DVEHQnWo.d.mts → spa-router-DnYhWCvI.d.mts} +2 -2
  135. package/dist/testing.cjs +2 -1
  136. package/dist/testing.d.mts +3 -2
  137. package/dist/testing.d.ts +3 -2
  138. package/dist/testing.mjs +2 -1
  139. package/dist/{utils-DSPx34-A.d.mts → utils-ABkktwku.d.mts} +1 -1
  140. package/dist/{utils-Dvuny_08.d.ts → utils-C3GguS-Q.d.ts} +1 -1
  141. package/dist/version.cjs +2 -2
  142. package/dist/version.mjs +1 -1
  143. package/dist/vite.cjs +11 -9
  144. package/dist/vite.d.mts +3 -2
  145. package/dist/vite.d.ts +3 -2
  146. package/dist/vite.mjs +10 -8
  147. package/dist/workflows.cjs +2 -2
  148. package/dist/workflows.mjs +1 -1
  149. package/package.json +21 -11
  150. package/dist/layers-E4WPJNY5.cjs +0 -17
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkSO7CRMP6cjs = require('./chunk-SO7CRMP6.cjs');
9
+ var _chunkDW34V5SMcjs = require('./chunk-DW34V5SM.cjs');
10
10
 
11
11
 
12
12
 
@@ -30,7 +30,7 @@ var _chunkOYDRPBBVcjs = require('./chunk-OYDRPBBV.cjs');
30
30
  var _chunkCXP5U3RWcjs = require('./chunk-CXP5U3RW.cjs');
31
31
 
32
32
 
33
- var _chunkTKNSDBBNcjs = require('./chunk-TKNSDBBN.cjs');
33
+ var _chunkK3F2E6GScjs = require('./chunk-K3F2E6GS.cjs');
34
34
 
35
35
 
36
36
  var _chunkFXUUWYAXcjs = require('./chunk-FXUUWYAX.cjs');
@@ -74,7 +74,7 @@ var _chunkQ5B3KJBPcjs = require('./chunk-Q5B3KJBP.cjs');
74
74
 
75
75
 
76
76
 
77
- var _chunkY4YMF2NQcjs = require('./chunk-Y4YMF2NQ.cjs');
77
+ var _chunkVPTDD5XFcjs = require('./chunk-VPTDD5XF.cjs');
78
78
 
79
79
 
80
80
 
@@ -144,7 +144,7 @@ var _chunkOHY2ZWUGcjs = require('./chunk-OHY2ZWUG.cjs');
144
144
  var _chunkBBVSJVBZcjs = require('./chunk-BBVSJVBZ.cjs');
145
145
 
146
146
 
147
- var _chunkK6FNHVDRcjs = require('./chunk-K6FNHVDR.cjs');
147
+ var _chunkMPEYMSCFcjs = require('./chunk-MPEYMSCF.cjs');
148
148
 
149
149
 
150
150
  var _chunk4ZFL5GFNcjs = require('./chunk-4ZFL5GFN.cjs');
@@ -182,7 +182,7 @@ var _chunk4PPEPOZZcjs = require('./chunk-4PPEPOZZ.cjs');
182
182
  var _chunkMQ3H6LT5cjs = require('./chunk-MQ3H6LT5.cjs');
183
183
 
184
184
 
185
- var _chunkB3WK4DTXcjs = require('./chunk-B3WK4DTX.cjs');
185
+ var _chunkIMBMOEWTcjs = require('./chunk-IMBMOEWT.cjs');
186
186
 
187
187
 
188
188
 
@@ -195,6 +195,12 @@ var _chunkN4RLRSWWcjs = require('./chunk-N4RLRSWW.cjs');
195
195
  var _chunkUJ2C4ICScjs = require('./chunk-UJ2C4ICS.cjs');
196
196
 
197
197
 
198
+
199
+
200
+
201
+ var _chunkLYLEZIG3cjs = require('./chunk-LYLEZIG3.cjs');
202
+
203
+
198
204
  var _chunk4PNUXIVUcjs = require('./chunk-4PNUXIVU.cjs');
199
205
 
200
206
 
@@ -265,7 +271,7 @@ var _chunkQNPEUFHQcjs = require('./chunk-QNPEUFHQ.cjs');
265
271
  var _chunkUQZ4AYTHcjs = require('./chunk-UQZ4AYTH.cjs');
266
272
 
267
273
 
268
- var _chunk2HCEC2YOcjs = require('./chunk-2HCEC2YO.cjs');
274
+ var _chunkVXCA7RZPcjs = require('./chunk-VXCA7RZP.cjs');
269
275
 
270
276
 
271
277
 
@@ -1927,7 +1933,7 @@ var _RouteManager = class _RouteManager {
1927
1933
  this.redirects.clear();
1928
1934
  this.programmaticPages.clear();
1929
1935
  this.programmaticLayouts.clear();
1930
- for (const source of _chunkY4YMF2NQcjs.getFarmSourceRoots.call(void 0, this.config)) {
1936
+ for (const source of _chunkVPTDD5XFcjs.getFarmSourceRoots.call(void 0, this.config)) {
1931
1937
  await this.discoverFileRoutes(source);
1932
1938
  await this.discoverProgrammaticRoutes(source);
1933
1939
  }
@@ -2503,7 +2509,7 @@ var _RouteManager = class _RouteManager {
2503
2509
  appDir
2504
2510
  );
2505
2511
  const canonicalPageGroups = /* @__PURE__ */ new Map();
2506
- for (const file of pageFiles.filter((candidate) => _chunkSO7CRMP6cjs.parseRouteSlotFile.call(void 0, candidate) === null)) {
2512
+ for (const file of pageFiles.filter((candidate) => _chunkDW34V5SMcjs.parseRouteSlotFile.call(void 0, candidate) === null)) {
2507
2513
  const route = _chunk5QIKR7RRcjs.parseRoutePath.call(void 0, file);
2508
2514
  const pattern = this.createRoutePattern(route);
2509
2515
  const group = canonicalPageGroups.get(pattern);
@@ -2576,7 +2582,7 @@ var _RouteManager = class _RouteManager {
2576
2582
  }
2577
2583
  }
2578
2584
  for (const file of [...pageFiles, ...slotDefaultFiles]) {
2579
- const slot = _chunkSO7CRMP6cjs.parseRouteSlotFile.call(void 0, file);
2585
+ const slot = _chunkDW34V5SMcjs.parseRouteSlotFile.call(void 0, file);
2580
2586
  if (!slot) continue;
2581
2587
  const modulePath = path9.default.join(appDir, file);
2582
2588
  const pattern = this.createRoutePattern(slot.route);
@@ -2598,7 +2604,7 @@ var _RouteManager = class _RouteManager {
2598
2604
  ownerPattern,
2599
2605
  interception: slot.interception,
2600
2606
  fallback: slot.fallback,
2601
- containerId: _chunkSO7CRMP6cjs.createRouteSlotContainerId.call(void 0, slot.name, ownerPattern)
2607
+ containerId: _chunkDW34V5SMcjs.createRouteSlotContainerId.call(void 0, slot.name, ownerPattern)
2602
2608
  });
2603
2609
  }
2604
2610
  for (const file of metadataImageFiles) {
@@ -2836,7 +2842,7 @@ var _RouteManager = class _RouteManager {
2836
2842
  pattern: entry.pattern
2837
2843
  }));
2838
2844
  const i18n = this.getI18nConfig();
2839
- const result = await _chunkSO7CRMP6cjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
2845
+ const result = await _chunkDW34V5SMcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
2840
2846
  suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n)
2841
2847
  });
2842
2848
  if (!i18n) {
@@ -2881,7 +2887,7 @@ var _RouteManager = class _RouteManager {
2881
2887
  async isRouteSSG(modulePath) {
2882
2888
  try {
2883
2889
  const mod = await this.loadRouteModule(modulePath);
2884
- const rendering = await _chunkSO7CRMP6cjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2890
+ const rendering = await _chunkDW34V5SMcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2885
2891
  return rendering.ssg;
2886
2892
  } catch (e10) {
2887
2893
  return false;
@@ -2893,7 +2899,7 @@ var _RouteManager = class _RouteManager {
2893
2899
  async hasRouteISR(modulePath) {
2894
2900
  try {
2895
2901
  const mod = await this.loadRouteModule(modulePath);
2896
- const rendering = await _chunkSO7CRMP6cjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2902
+ const rendering = await _chunkDW34V5SMcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2897
2903
  return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
2898
2904
  } catch (e11) {
2899
2905
  return false;
@@ -2905,7 +2911,7 @@ var _RouteManager = class _RouteManager {
2905
2911
  async getRouteRevalidateInterval(modulePath) {
2906
2912
  try {
2907
2913
  const mod = await this.loadRouteModule(modulePath);
2908
- const rendering = await _chunkSO7CRMP6cjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2914
+ const rendering = await _chunkDW34V5SMcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2909
2915
  return rendering.revalidate;
2910
2916
  } catch (e12) {
2911
2917
  return void 0;
@@ -4822,7 +4828,7 @@ var _ServerRenderer = class _ServerRenderer {
4822
4828
  async initialize() {
4823
4829
  if (this.rendererRuntime) return;
4824
4830
  if (_optionalChain([this, 'access', _148 => _148.config, 'access', _149 => _149.notFound, 'optionalAccess', _150 => _150.component, 'optionalAccess', _151 => _151.trim, 'call', _152 => _152()])) {
4825
- resolveFarmNotFoundComponentPath(this.config, _chunkY4YMF2NQcjs.getFarmAppDirectories.call(void 0, this.config));
4831
+ resolveFarmNotFoundComponentPath(this.config, _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, this.config));
4826
4832
  }
4827
4833
  const loaded = _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, this.config.renderer) ? await import("./renderer/react/server.cjs") : this.viteServer ? await _chunkBMWDEBXOcjs.loadFarmDevModule.call(void 0, this.viteServer, this.config.renderer.server) : await import(_url.pathToFileURL.call(void 0,
4828
4834
  _chunkPSV6XKPOcjs.resolveFarmRendererModule.call(void 0,
@@ -5081,7 +5087,7 @@ var _ServerRenderer = class _ServerRenderer {
5081
5087
  * Check if a path should be served from SSG cache
5082
5088
  */
5083
5089
  async shouldServeSSG(pathname) {
5084
- const ssgPage = _chunkSO7CRMP6cjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
5090
+ const ssgPage = _chunkDW34V5SMcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
5085
5091
  if (!ssgPage) return null;
5086
5092
  const cached = await this.getCachedSSGPage(pathname);
5087
5093
  if (cached && await this.dataCache.isStaleAsync(cached)) {
@@ -5497,7 +5503,7 @@ var _ServerRenderer = class _ServerRenderer {
5497
5503
  throw error;
5498
5504
  }
5499
5505
  }
5500
- const renderingConfig = await _chunkSO7CRMP6cjs.resolveRouteRenderingConfigFromFile.call(void 0,
5506
+ const renderingConfig = await _chunkDW34V5SMcjs.resolveRouteRenderingConfigFromFile.call(void 0,
5501
5507
  routeModule,
5502
5508
  route.modulePath,
5503
5509
  { experimentalPPR: _optionalChain([this, 'access', _176 => _176.config, 'access', _177 => _177.experimental, 'optionalAccess', _178 => _178.ppr]) === true }
@@ -6297,7 +6303,7 @@ var _ServerRenderer = class _ServerRenderer {
6297
6303
  }
6298
6304
  async writeMetadataImageResponse(req, res, value, imageModule) {
6299
6305
  const ifNoneMatch = req.headers["if-none-match"];
6300
- const response = await _chunkTKNSDBBNcjs.createFarmMetadataImageResponse.call(void 0, value, imageModule, {
6306
+ const response = await _chunkK3F2E6GScjs.createFarmMetadataImageResponse.call(void 0, value, imageModule, {
6301
6307
  method: req.method,
6302
6308
  ifNoneMatch: Array.isArray(ifNoneMatch) ? ifNoneMatch[0] : ifNoneMatch
6303
6309
  });
@@ -6975,7 +6981,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
6975
6981
  async loadNotFoundModule() {
6976
6982
  const notFoundPath = resolveFarmNotFoundComponentPath(
6977
6983
  this.config,
6978
- _chunkY4YMF2NQcjs.getFarmAppDirectories.call(void 0, this.config)
6984
+ _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, this.config)
6979
6985
  );
6980
6986
  if (!notFoundPath) return null;
6981
6987
  return await this.routeManager.loadRouteModule(notFoundPath);
@@ -7051,7 +7057,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
7051
7057
  }
7052
7058
  const notFoundPath = resolveFarmNotFoundComponentPath(
7053
7059
  this.config,
7054
- _chunkY4YMF2NQcjs.getFarmAppDirectories.call(void 0, this.config)
7060
+ _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, this.config)
7055
7061
  );
7056
7062
  if (notFoundPath) {
7057
7063
  const notFoundModule = await this.loadNotFoundModule();
@@ -7108,7 +7114,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
7108
7114
  stack: _optionalChain([diagnostics, 'optionalAccess', _266 => _266.stack]),
7109
7115
  sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _267 => _267.sourceFrame]),
7110
7116
  development: isDev,
7111
- farmVersion: _chunk2HCEC2YOcjs.FARM_VERSION,
7117
+ farmVersion: _chunkVXCA7RZPcjs.FARM_VERSION,
7112
7118
  nodeVersion: process.version,
7113
7119
  mode: isDev ? "development" : "production"
7114
7120
  });
@@ -7312,7 +7318,7 @@ var _FarmApp = class _FarmApp {
7312
7318
  plugins: config.plugins || [],
7313
7319
  migrations: config.migrations || { commands: [] },
7314
7320
  cron: _chunk6EXBPJ24cjs.resolveCronConfig.call(void 0, config.cron),
7315
- workflows: _chunkK6FNHVDRcjs.resolveWorkflowsConfig.call(void 0, config.workflows),
7321
+ workflows: _chunkMPEYMSCFcjs.resolveWorkflowsConfig.call(void 0, config.workflows),
7316
7322
  api: normalizeFarmAppAPIConfig(config.api),
7317
7323
  middleware: config.middleware || {},
7318
7324
  routeRules: _chunkQ5B3KJBPcjs.normalizeRouteRules.call(void 0, config.routeRules),
@@ -7360,12 +7366,12 @@ var _FarmApp = class _FarmApp {
7360
7366
  };
7361
7367
  }
7362
7368
  async verifyAppStructure() {
7363
- const appDirs = _chunkY4YMF2NQcjs.getFarmAppDirectories.call(void 0, this.config);
7369
+ const appDirs = _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, this.config);
7364
7370
  const hasAppDirectory = (await Promise.all(appDirs.map((appDir) => _chunk5QIKR7RRcjs.fileExists.call(void 0, appDir)))).some(
7365
7371
  Boolean
7366
7372
  );
7367
7373
  if (!hasAppDirectory) {
7368
- const routeFiles = _chunkY4YMF2NQcjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
7374
+ const routeFiles = _chunkVPTDD5XFcjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
7369
7375
  (source) => _chunkN4RLRSWWcjs.findProgrammaticRouteFiles.call(void 0, source.root, source.srcDir)
7370
7376
  );
7371
7377
  if (routeFiles.length > 0) {
@@ -7419,20 +7425,6 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmApp, "createFarmApp");
7419
7425
  // src/build/tailwind.ts
7420
7426
 
7421
7427
 
7422
- // src/optional-peer.ts
7423
- function isMissingPackageError(error, packageName) {
7424
- if (!error || typeof error !== "object") return false;
7425
- const { code, message } = error;
7426
- if (code !== "ERR_MODULE_NOT_FOUND" && code !== "MODULE_NOT_FOUND") return false;
7427
- if (typeof message !== "string") return false;
7428
- return message.includes(`'${packageName}'`) || message.includes(`"${packageName}"`);
7429
- }
7430
- _chunkS3JO3N4Hcjs.__name.call(void 0, isMissingPackageError, "isMissingPackageError");
7431
- function formatOptionalPeerInstallHint(packageName, purpose, options = {}) {
7432
- return `Install "${packageName}" to ${purpose}: pnpm add ${options.dev ? "-D " : ""}${packageName}`;
7433
- }
7434
- _chunkS3JO3N4Hcjs.__name.call(void 0, formatOptionalPeerInstallHint, "formatOptionalPeerInstallHint");
7435
-
7436
7428
  // src/build/vite-plugin-compat.ts
7437
7429
  function adaptTailwindVitePlugin(pluginOption, builder) {
7438
7430
  if (builder !== "rolldown") return pluginOption;
@@ -7481,7 +7473,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, withVite5TransformContext, "withVite5Trans
7481
7473
 
7482
7474
  // src/build/tailwind.ts
7483
7475
  var TAILWIND_CSS_IMPORT = /@import\s+["']tailwindcss["']/;
7484
- var TAILWIND_VITE_INSTALL_HINT = formatOptionalPeerInstallHint(
7476
+ var TAILWIND_VITE_INSTALL_HINT = _chunkLYLEZIG3cjs.formatOptionalPeerInstallHint.call(void 0,
7485
7477
  "@tailwindcss/vite",
7486
7478
  "enable built-in Tailwind CSS support",
7487
7479
  { dev: true }
@@ -7494,7 +7486,7 @@ async function loadTailwindVitePlugin(options = {}, importTailwind = () => impor
7494
7486
  if (options.announce) _chunk5QIKR7RRcjs.logger.info("\u{1F4E6} Enabled built-in Tailwind support (@tailwindcss/vite)");
7495
7487
  return plugin;
7496
7488
  } catch (error) {
7497
- if (isMissingPackageError(error, "@tailwindcss/vite")) return createMissingTailwindPlugin();
7489
+ if (_chunkLYLEZIG3cjs.isMissingPackageError.call(void 0, error, "@tailwindcss/vite")) return createMissingTailwindPlugin();
7498
7490
  _chunk5QIKR7RRcjs.logger.warn(
7499
7491
  `Tailwind plugin auto-enable failed${options.label ? ` ${options.label}` : ""}; continuing without it: ${error.message}`
7500
7492
  );
@@ -7525,6 +7517,26 @@ function createMissingTailwindPlugin() {
7525
7517
  }
7526
7518
  _chunkS3JO3N4Hcjs.__name.call(void 0, createMissingTailwindPlugin, "createMissingTailwindPlugin");
7527
7519
 
7520
+ // src/image-runtime.ts
7521
+ var SHARP_INSTALL_HINT = _chunkLYLEZIG3cjs.formatOptionalPeerInstallHint.call(void 0, "sharp", "optimize images");
7522
+ var CLOUDFLARE_IMAGE_PRESETS = /* @__PURE__ */ new Set(["cloudflare", "cloudflare-pages", "cloudflare-module"]);
7523
+ function resolveFarmImageProviderForRuntime(images, options) {
7524
+ const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _296 => _296.provider]), () => ( "auto"));
7525
+ if (provider === "none") return images;
7526
+ const usesSharp = options.dev ? true : provider === "node" || provider === "auto" && !CLOUDFLARE_IMAGE_PRESETS.has(options.preset || "");
7527
+ if (!usesSharp || _chunkLYLEZIG3cjs.isOptionalPeerInstalled.call(void 0, options.root, "sharp")) return images;
7528
+ if (provider === "node") {
7529
+ throw new Error(
7530
+ `images.provider "node" optimizes images with sharp, which is not installed. ${SHARP_INSTALL_HINT}`
7531
+ );
7532
+ }
7533
+ _chunk5QIKR7RRcjs.logger.info(
7534
+ `Image optimization is off because sharp is not installed; images use their original URLs. ${SHARP_INSTALL_HINT}, or set images.provider to "none".`
7535
+ );
7536
+ return Object.freeze({ ...images, provider: "none" });
7537
+ }
7538
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmImageProviderForRuntime, "resolveFarmImageProviderForRuntime");
7539
+
7528
7540
  // src/schema-step-types.ts
7529
7541
  function validateSchemaSteps(owner, schema, steps) {
7530
7542
  if (steps === void 0) return;
@@ -7534,7 +7546,7 @@ function validateSchemaSteps(owner, schema, steps) {
7534
7546
  const models = _chunkJSROZYYOcjs.resolveSchemaModels.call(void 0, owner, schema);
7535
7547
  const ids = /* @__PURE__ */ new Set();
7536
7548
  for (const step of steps) {
7537
- const where = `${owner} migration "${_optionalChain([step, 'optionalAccess', _296 => _296.id])}"`;
7549
+ const where = `${owner} migration "${_optionalChain([step, 'optionalAccess', _297 => _297.id])}"`;
7538
7550
  if (!step || typeof step.id !== "string" || step.id.trim() === "") {
7539
7551
  throw new TypeError(`${owner}: every migration step needs a non-empty \`id\`.`);
7540
7552
  }
@@ -7623,7 +7635,7 @@ ${lines.join("\n")}`);
7623
7635
  _chunkS3JO3N4Hcjs.__name.call(void 0, _FarmPluginOptionsError, "FarmPluginOptionsError");
7624
7636
  var FarmPluginOptionsError = _FarmPluginOptionsError;
7625
7637
  function formatIssuePath(path18) {
7626
- if (!_optionalChain([path18, 'optionalAccess', _297 => _297.length])) return "";
7638
+ if (!_optionalChain([path18, 'optionalAccess', _298 => _298.length])) return "";
7627
7639
  return path18.map((segment) => {
7628
7640
  const key = typeof segment === "object" && segment !== null ? segment.key : segment;
7629
7641
  return typeof key === "symbol" ? key.toString() : String(key);
@@ -7637,11 +7649,11 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, isPromiseLike, "isPromiseLike");
7637
7649
  function isPluginOptionsSchema(value) {
7638
7650
  if (typeof value !== "object" && typeof value !== "function" || value === null) return false;
7639
7651
  const standard = value["~standard"];
7640
- return typeof _optionalChain([standard, 'optionalAccess', _298 => _298.validate]) === "function";
7652
+ return typeof _optionalChain([standard, 'optionalAccess', _299 => _299.validate]) === "function";
7641
7653
  }
7642
7654
  _chunkS3JO3N4Hcjs.__name.call(void 0, isPluginOptionsSchema, "isPluginOptionsSchema");
7643
7655
  function parsePluginOptions(schema, options) {
7644
- const standard = _optionalChain([schema, 'optionalAccess', _299 => _299["~standard"]]);
7656
+ const standard = _optionalChain([schema, 'optionalAccess', _300 => _300["~standard"]]);
7645
7657
  if (!standard || typeof standard.validate !== "function") {
7646
7658
  throw new TypeError(
7647
7659
  "A plugin's `options` needs a Standard Schema, such as a Zod, Valibot, or ArkType schema."
@@ -7701,9 +7713,9 @@ function normalizeRuntimeEndpointRequestPath(pathname) {
7701
7713
  _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeRuntimeEndpointRequestPath, "normalizeRuntimeEndpointRequestPath");
7702
7714
  function farmPluginMayAffectRuntimePath(plugin, pathname) {
7703
7715
  const runtime = plugin.runtime;
7704
- const endpoints = _optionalChain([runtime, 'optionalAccess', _300 => _300.endpoints]);
7716
+ const endpoints = _optionalChain([runtime, 'optionalAccess', _301 => _301.endpoints]);
7705
7717
  const hasUnscopedRequestHooks = Boolean(
7706
- plugin.init || plugin.ready || plugin.shutdown || _optionalChain([runtime, 'optionalAccess', _301 => _301.context]) || _optionalChain([runtime, 'optionalAccess', _302 => _302.before]) || _optionalChain([runtime, 'optionalAccess', _303 => _303.after]) || _optionalChain([runtime, 'optionalAccess', _304 => _304.error]) || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML || plugin.beforeRequest || plugin.afterResponse
7718
+ plugin.init || plugin.ready || plugin.shutdown || _optionalChain([runtime, 'optionalAccess', _302 => _302.context]) || _optionalChain([runtime, 'optionalAccess', _303 => _303.before]) || _optionalChain([runtime, 'optionalAccess', _304 => _304.after]) || _optionalChain([runtime, 'optionalAccess', _305 => _305.error]) || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML || plugin.beforeRequest || plugin.afterResponse
7707
7719
  );
7708
7720
  if (hasUnscopedRequestHooks) return true;
7709
7721
  if (Array.isArray(endpoints) && endpoints.length > 0) {
@@ -7715,7 +7727,7 @@ function farmPluginMayAffectRuntimePath(plugin, pathname) {
7715
7727
  ) === normalizedPathname
7716
7728
  );
7717
7729
  }
7718
- return Boolean(plugin.setup || _optionalChain([runtime, 'optionalAccess', _305 => _305.start]) || _optionalChain([runtime, 'optionalAccess', _306 => _306.close]));
7730
+ return Boolean(plugin.setup || _optionalChain([runtime, 'optionalAccess', _306 => _306.start]) || _optionalChain([runtime, 'optionalAccess', _307 => _307.close]));
7719
7731
  }
7720
7732
  _chunkS3JO3N4Hcjs.__name.call(void 0, farmPluginMayAffectRuntimePath, "farmPluginMayAffectRuntimePath");
7721
7733
 
@@ -7849,7 +7861,7 @@ var _PluginManager = class _PluginManager {
7849
7861
  const endpoints = [];
7850
7862
  const owners = /* @__PURE__ */ new Map();
7851
7863
  for (const plugin of this.getSortedPlugins()) {
7852
- const configured = _optionalChain([plugin, 'access', _307 => _307.runtime, 'optionalAccess', _308 => _308.endpoints]);
7864
+ const configured = _optionalChain([plugin, 'access', _308 => _308.runtime, 'optionalAccess', _309 => _309.endpoints]);
7853
7865
  if (configured === void 0) continue;
7854
7866
  if (!Array.isArray(configured)) {
7855
7867
  throw new TypeError(`Farm plugin "${plugin.name}" runtime.endpoints must be an array`);
@@ -7920,7 +7932,7 @@ var _PluginManager = class _PluginManager {
7920
7932
  const values = {};
7921
7933
  const owners = /* @__PURE__ */ new Map();
7922
7934
  for (const plugin of this.getSortedPlugins()) {
7923
- const createContext = _optionalChain([plugin, 'access', _309 => _309.runtime, 'optionalAccess', _310 => _310.context]);
7935
+ const createContext = _optionalChain([plugin, 'access', _310 => _310.runtime, 'optionalAccess', _311 => _311.context]);
7924
7936
  if (!createContext) continue;
7925
7937
  const result = await createContext(
7926
7938
  this.createRuntimeBaseEvent(plugin, request2, options, waitUntil)
@@ -7946,7 +7958,7 @@ var _PluginManager = class _PluginManager {
7946
7958
  }
7947
7959
  async runRuntimeErrorHooks(request2, error, ctx, durationMs, options, waitUntil) {
7948
7960
  for (const plugin of this.getSortedPlugins()) {
7949
- const onError = _optionalChain([plugin, 'access', _311 => _311.runtime, 'optionalAccess', _312 => _312.error]);
7961
+ const onError = _optionalChain([plugin, 'access', _312 => _312.runtime, 'optionalAccess', _313 => _313.error]);
7950
7962
  if (!onError) continue;
7951
7963
  try {
7952
7964
  await onError({
@@ -7990,19 +8002,19 @@ var _PluginManager = class _PluginManager {
7990
8002
  case "config":
7991
8003
  if (plugin.configure) {
7992
8004
  hooks.push(
7993
- (config, context) => _optionalChain([plugin, 'access', _313 => _313.configure, 'optionalCall', _314 => _314(config, context)])
8005
+ (config, context) => _optionalChain([plugin, 'access', _314 => _314.configure, 'optionalCall', _315 => _315(config, context)])
7994
8006
  );
7995
8007
  }
7996
8008
  break;
7997
8009
  case "ready":
7998
- if (_optionalChain([plugin, 'access', _315 => _315.runtime, 'optionalAccess', _316 => _316.start])) {
7999
- hooks.push((context) => _optionalChain([plugin, 'access', _317 => _317.runtime, 'optionalAccess', _318 => _318.start, 'optionalCall', _319 => _319(withState(context))]));
8010
+ if (_optionalChain([plugin, 'access', _316 => _316.runtime, 'optionalAccess', _317 => _317.start])) {
8011
+ hooks.push((context) => _optionalChain([plugin, 'access', _318 => _318.runtime, 'optionalAccess', _319 => _319.start, 'optionalCall', _320 => _320(withState(context))]));
8000
8012
  }
8001
8013
  break;
8002
8014
  case "shutdown":
8003
- if (_optionalChain([plugin, 'access', _320 => _320.runtime, 'optionalAccess', _321 => _321.close])) {
8015
+ if (_optionalChain([plugin, 'access', _321 => _321.runtime, 'optionalAccess', _322 => _322.close])) {
8004
8016
  hooks.push(
8005
- (payload, context) => _optionalChain([plugin, 'access', _322 => _322.runtime, 'optionalAccess', _323 => _323.close, 'optionalCall', _324 => _324({
8017
+ (payload, context) => _optionalChain([plugin, 'access', _323 => _323.runtime, 'optionalAccess', _324 => _324.close, 'optionalCall', _325 => _325({
8006
8018
  ...withState(context),
8007
8019
  reason: payload.reason
8008
8020
  })])
@@ -8010,93 +8022,93 @@ var _PluginManager = class _PluginManager {
8010
8022
  }
8011
8023
  break;
8012
8024
  case "routeDiscovered":
8013
- if (_optionalChain([plugin, 'access', _325 => _325.router, 'optionalAccess', _326 => _326.discovered])) {
8025
+ if (_optionalChain([plugin, 'access', _326 => _326.router, 'optionalAccess', _327 => _327.discovered])) {
8014
8026
  hooks.push(
8015
- (route, context) => _optionalChain([plugin, 'access', _327 => _327.router, 'optionalAccess', _328 => _328.discovered, 'optionalCall', _329 => _329(route, withState(context))])
8027
+ (route, context) => _optionalChain([plugin, 'access', _328 => _328.router, 'optionalAccess', _329 => _329.discovered, 'optionalCall', _330 => _330(route, withState(context))])
8016
8028
  );
8017
8029
  }
8018
8030
  break;
8019
8031
  case "middlewareDiscovered":
8020
- if (_optionalChain([plugin, 'access', _330 => _330.router, 'optionalAccess', _331 => _331.discovered])) {
8032
+ if (_optionalChain([plugin, 'access', _331 => _331.router, 'optionalAccess', _332 => _332.discovered])) {
8021
8033
  hooks.push(
8022
- (route, context) => _optionalChain([plugin, 'access', _332 => _332.router, 'optionalAccess', _333 => _333.discovered, 'optionalCall', _334 => _334({ kind: "middleware", ...route }, withState(context))])
8034
+ (route, context) => _optionalChain([plugin, 'access', _333 => _333.router, 'optionalAccess', _334 => _334.discovered, 'optionalCall', _335 => _335({ kind: "middleware", ...route }, withState(context))])
8023
8035
  );
8024
8036
  }
8025
8037
  break;
8026
8038
  case "apiRouteDiscovered":
8027
- if (_optionalChain([plugin, 'access', _335 => _335.router, 'optionalAccess', _336 => _336.discovered])) {
8039
+ if (_optionalChain([plugin, 'access', _336 => _336.router, 'optionalAccess', _337 => _337.discovered])) {
8028
8040
  hooks.push(
8029
- (route, context) => _optionalChain([plugin, 'access', _337 => _337.router, 'optionalAccess', _338 => _338.discovered, 'optionalCall', _339 => _339({ kind: "api", ...route }, withState(context))])
8041
+ (route, context) => _optionalChain([plugin, 'access', _338 => _338.router, 'optionalAccess', _339 => _339.discovered, 'optionalCall', _340 => _340({ kind: "api", ...route }, withState(context))])
8030
8042
  );
8031
8043
  }
8032
8044
  break;
8033
8045
  case "routesGenerated":
8034
- if (_optionalChain([plugin, 'access', _340 => _340.router, 'optionalAccess', _341 => _341.generated])) {
8046
+ if (_optionalChain([plugin, 'access', _341 => _341.router, 'optionalAccess', _342 => _342.generated])) {
8035
8047
  hooks.push(
8036
- (routes, context) => _optionalChain([plugin, 'access', _342 => _342.router, 'optionalAccess', _343 => _343.generated, 'optionalCall', _344 => _344(routes, withState(context))])
8048
+ (routes, context) => _optionalChain([plugin, 'access', _343 => _343.router, 'optionalAccess', _344 => _344.generated, 'optionalCall', _345 => _345(routes, withState(context))])
8037
8049
  );
8038
8050
  }
8039
8051
  break;
8040
8052
  case "beforeRouteMatch":
8041
- if (_optionalChain([plugin, 'access', _345 => _345.router, 'optionalAccess', _346 => _346.before])) {
8053
+ if (_optionalChain([plugin, 'access', _346 => _346.router, 'optionalAccess', _347 => _347.before])) {
8042
8054
  hooks.push(
8043
- (route, context) => _optionalChain([plugin, 'access', _347 => _347.router, 'optionalAccess', _348 => _348.before, 'optionalCall', _349 => _349(route, withState(context))])
8055
+ (route, context) => _optionalChain([plugin, 'access', _348 => _348.router, 'optionalAccess', _349 => _349.before, 'optionalCall', _350 => _350(route, withState(context))])
8044
8056
  );
8045
8057
  }
8046
8058
  break;
8047
8059
  case "afterRouteMatch":
8048
- if (_optionalChain([plugin, 'access', _350 => _350.router, 'optionalAccess', _351 => _351.after])) {
8060
+ if (_optionalChain([plugin, 'access', _351 => _351.router, 'optionalAccess', _352 => _352.after])) {
8049
8061
  hooks.push(
8050
- (result, context) => _optionalChain([plugin, 'access', _352 => _352.router, 'optionalAccess', _353 => _353.after, 'optionalCall', _354 => _354(result, withState(context))])
8062
+ (result, context) => _optionalChain([plugin, 'access', _353 => _353.router, 'optionalAccess', _354 => _354.after, 'optionalCall', _355 => _355(result, withState(context))])
8051
8063
  );
8052
8064
  }
8053
8065
  break;
8054
8066
  case "beforeRender":
8055
- if (_optionalChain([plugin, 'access', _355 => _355.render, 'optionalAccess', _356 => _356.before])) {
8067
+ if (_optionalChain([plugin, 'access', _356 => _356.render, 'optionalAccess', _357 => _357.before])) {
8056
8068
  hooks.push(
8057
- (render, context) => _optionalChain([plugin, 'access', _357 => _357.render, 'optionalAccess', _358 => _358.before, 'optionalCall', _359 => _359(render, withState(context))])
8069
+ (render, context) => _optionalChain([plugin, 'access', _358 => _358.render, 'optionalAccess', _359 => _359.before, 'optionalCall', _360 => _360(render, withState(context))])
8058
8070
  );
8059
8071
  }
8060
8072
  break;
8061
8073
  case "afterRender":
8062
- if (_optionalChain([plugin, 'access', _360 => _360.render, 'optionalAccess', _361 => _361.html])) {
8074
+ if (_optionalChain([plugin, 'access', _361 => _361.render, 'optionalAccess', _362 => _362.html])) {
8063
8075
  hooks.push(
8064
- (html, render, context) => _optionalChain([plugin, 'access', _362 => _362.render, 'optionalAccess', _363 => _363.html, 'optionalCall', _364 => _364(html, render, withState(context))])
8076
+ (html, render, context) => _optionalChain([plugin, 'access', _363 => _363.render, 'optionalAccess', _364 => _364.html, 'optionalCall', _365 => _365(html, render, withState(context))])
8065
8077
  );
8066
8078
  }
8067
8079
  break;
8068
8080
  case "beforeBundle":
8069
- if (_optionalChain([plugin, 'access', _365 => _365.build, 'optionalAccess', _366 => _366.before])) {
8081
+ if (_optionalChain([plugin, 'access', _366 => _366.build, 'optionalAccess', _367 => _367.before])) {
8070
8082
  hooks.push(
8071
- (bundle, context) => _optionalChain([plugin, 'access', _367 => _367.build, 'optionalAccess', _368 => _368.before, 'optionalCall', _369 => _369(bundle, withState(context))])
8083
+ (bundle, context) => _optionalChain([plugin, 'access', _368 => _368.build, 'optionalAccess', _369 => _369.before, 'optionalCall', _370 => _370(bundle, withState(context))])
8072
8084
  );
8073
8085
  }
8074
8086
  break;
8075
8087
  case "beforeNitroBuild":
8076
- if (_optionalChain([plugin, 'access', _370 => _370.build, 'optionalAccess', _371 => _371.configure])) {
8088
+ if (_optionalChain([plugin, 'access', _371 => _371.build, 'optionalAccess', _372 => _372.configure])) {
8077
8089
  hooks.push(
8078
- (buildConfig, context) => _optionalChain([plugin, 'access', _372 => _372.build, 'optionalAccess', _373 => _373.configure, 'optionalCall', _374 => _374(buildConfig, withState(context))])
8090
+ (buildConfig, context) => _optionalChain([plugin, 'access', _373 => _373.build, 'optionalAccess', _374 => _374.configure, 'optionalCall', _375 => _375(buildConfig, withState(context))])
8079
8091
  );
8080
8092
  }
8081
8093
  break;
8082
8094
  case "afterBundle":
8083
- if (_optionalChain([plugin, 'access', _375 => _375.build, 'optionalAccess', _376 => _376.after])) {
8095
+ if (_optionalChain([plugin, 'access', _376 => _376.build, 'optionalAccess', _377 => _377.after])) {
8084
8096
  hooks.push(
8085
- (result, context) => _optionalChain([plugin, 'access', _377 => _377.build, 'optionalAccess', _378 => _378.after, 'optionalCall', _379 => _379(result, withState(context))])
8097
+ (result, context) => _optionalChain([plugin, 'access', _378 => _378.build, 'optionalAccess', _379 => _379.after, 'optionalCall', _380 => _380(result, withState(context))])
8086
8098
  );
8087
8099
  }
8088
8100
  break;
8089
8101
  case "devServerCreated":
8090
- if (_optionalChain([plugin, 'access', _380 => _380.dev, 'optionalAccess', _381 => _381.server])) {
8102
+ if (_optionalChain([plugin, 'access', _381 => _381.dev, 'optionalAccess', _382 => _382.server])) {
8091
8103
  hooks.push(
8092
- (server, context) => _optionalChain([plugin, 'access', _382 => _382.dev, 'optionalAccess', _383 => _383.server, 'optionalCall', _384 => _384(server, withState(context))])
8104
+ (server, context) => _optionalChain([plugin, 'access', _383 => _383.dev, 'optionalAccess', _384 => _384.server, 'optionalCall', _385 => _385(server, withState(context))])
8093
8105
  );
8094
8106
  }
8095
8107
  break;
8096
8108
  case "hmrUpdate":
8097
- if (_optionalChain([plugin, 'access', _385 => _385.dev, 'optionalAccess', _386 => _386.update])) {
8109
+ if (_optionalChain([plugin, 'access', _386 => _386.dev, 'optionalAccess', _387 => _387.update])) {
8098
8110
  hooks.push(
8099
- (update, context) => _optionalChain([plugin, 'access', _387 => _387.dev, 'optionalAccess', _388 => _388.update, 'optionalCall', _389 => _389(update, withState(context))])
8111
+ (update, context) => _optionalChain([plugin, 'access', _388 => _388.dev, 'optionalAccess', _389 => _389.update, 'optionalCall', _390 => _390(update, withState(context))])
8100
8112
  );
8101
8113
  }
8102
8114
  break;
@@ -8142,7 +8154,7 @@ var _PluginManager = class _PluginManager {
8142
8154
  hasRuntimeHook(hookName) {
8143
8155
  const cached = this.runtimeHookPresence.get(hookName);
8144
8156
  if (cached !== void 0) return cached;
8145
- const present = this.plugins.some((plugin) => typeof _optionalChain([plugin, 'access', _390 => _390.runtime, 'optionalAccess', _391 => _391[hookName]]) === "function");
8157
+ const present = this.plugins.some((plugin) => typeof _optionalChain([plugin, 'access', _391 => _391.runtime, 'optionalAccess', _392 => _392[hookName]]) === "function");
8146
8158
  this.runtimeHookPresence.set(hookName, present);
8147
8159
  return present;
8148
8160
  }
@@ -8221,7 +8233,7 @@ var _PluginManager = class _PluginManager {
8221
8233
  async beginRuntimeRequest(request2, options = {}) {
8222
8234
  await this.startRuntime();
8223
8235
  const startedAt = Date.now();
8224
- const waitUntil = options.waitUntil ? (promise) => _optionalChain([options, 'access', _392 => _392.waitUntil, 'optionalCall', _393 => _393(Promise.resolve(promise))]) : (promise) => {
8236
+ const waitUntil = options.waitUntil ? (promise) => _optionalChain([options, 'access', _393 => _393.waitUntil, 'optionalCall', _394 => _394(Promise.resolve(promise))]) : (promise) => {
8225
8237
  void Promise.resolve(promise).catch(() => {
8226
8238
  });
8227
8239
  };
@@ -8254,7 +8266,7 @@ var _PluginManager = class _PluginManager {
8254
8266
  );
8255
8267
  let response;
8256
8268
  for (const plugin of this.getSortedPlugins()) {
8257
- const before = _optionalChain([plugin, 'access', _394 => _394.runtime, 'optionalAccess', _395 => _395.before]);
8269
+ const before = _optionalChain([plugin, 'access', _395 => _395.runtime, 'optionalAccess', _396 => _396.before]);
8258
8270
  if (!before) continue;
8259
8271
  const result = await before({
8260
8272
  ...this.createRuntimeBaseEvent(plugin, activeRequest, activeOptions, waitUntil),
@@ -8300,7 +8312,7 @@ var _PluginManager = class _PluginManager {
8300
8312
  let response = initialResponse;
8301
8313
  try {
8302
8314
  for (const plugin of this.getSortedPlugins()) {
8303
- const after = _optionalChain([plugin, 'access', _396 => _396.runtime, 'optionalAccess', _397 => _397.after]);
8315
+ const after = _optionalChain([plugin, 'access', _397 => _397.runtime, 'optionalAccess', _398 => _398.after]);
8304
8316
  if (!after) continue;
8305
8317
  const result = await after({
8306
8318
  ...this.createRuntimeBaseEvent(
@@ -8389,7 +8401,7 @@ var _PluginManager = class _PluginManager {
8389
8401
  /** @internal Runs hooks for only the plugins selected by the runtime adapter. */
8390
8402
  async runHookParallelFiltered(hookName, include, ...args) {
8391
8403
  if (hookName === "shutdown" && !this.runtimeShutdownHooksRunning) {
8392
- await this.closeRuntime(_optionalChain([args, 'access', _398 => _398[0], 'optionalAccess', _399 => _399.reason]));
8404
+ await this.closeRuntime(_optionalChain([args, 'access', _399 => _399[0], 'optionalAccess', _400 => _400.reason]));
8393
8405
  return false;
8394
8406
  }
8395
8407
  const plugins = this.getSortedPlugins().filter(include);
@@ -8475,7 +8487,7 @@ function createPluginFactory(definition) {
8475
8487
  configure: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (config, context) => configure(config, { ...context, options }), "configure")
8476
8488
  } : {},
8477
8489
  setup(context) {
8478
- const state = _optionalChain([setup, 'optionalCall', _400 => _400({ ...context, options })]);
8490
+ const state = _optionalChain([setup, 'optionalCall', _401 => _401({ ...context, options })]);
8479
8491
  return state instanceof Promise ? state.then(resolveState) : resolveState(state);
8480
8492
  }
8481
8493
  });
@@ -8516,10 +8528,10 @@ function declarePluginSchema(plugin) {
8516
8528
  models: Object.keys(models).filter((key) => !models[key].external),
8517
8529
  ...plugin.dependsOn ? { dependsOn: plugin.dependsOn.map(_chunkQBPXNZGVcjs.pluginShortName) } : {},
8518
8530
  ...plugin.version ? { version: plugin.version } : {},
8519
- ..._optionalChain([plugin, 'access', _401 => _401.migrations, 'optionalAccess', _402 => _402.length]) ? { migrations: plugin.migrations } : {},
8520
- dialect: _optionalChain([database, 'optionalAccess', _403 => _403.dialect]),
8531
+ ..._optionalChain([plugin, 'access', _402 => _402.migrations, 'optionalAccess', _403 => _403.length]) ? { migrations: plugin.migrations } : {},
8532
+ dialect: _optionalChain([database, 'optionalAccess', _404 => _404.dialect]),
8521
8533
  resolveClient: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (config) => {
8522
- if (_optionalChain([database, 'optionalAccess', _404 => _404.client]) !== void 0 && database.client !== null) {
8534
+ if (_optionalChain([database, 'optionalAccess', _405 => _405.client]) !== void 0 && database.client !== null) {
8523
8535
  const client2 = typeof database.client === "function" ? await database.client() : database.client;
8524
8536
  if (client2 === void 0 || client2 === null) {
8525
8537
  throw new Error(`The ${name} plugin's \`database.client\` returned no connection.`);
@@ -8573,7 +8585,7 @@ function resolveFarmAppClientEntry(root = process.cwd(), srcDir = "src") {
8573
8585
  }
8574
8586
  _chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmAppClientEntry, "resolveFarmAppClientEntry");
8575
8587
  function resolveFarmClientPlugins(plugins, _root) {
8576
- if (!_optionalChain([plugins, 'optionalAccess', _405 => _405.length])) return [];
8588
+ if (!_optionalChain([plugins, 'optionalAccess', _406 => _406.length])) return [];
8577
8589
  return plugins.flatMap((plugin) => {
8578
8590
  if (!plugin.client) return [];
8579
8591
  assertClientLifecycle(plugin.client, plugin.name);
@@ -8653,7 +8665,7 @@ function assertLifecycleObject(value, pluginName, location, allowedKeys) {
8653
8665
  throw new TypeError(`Client plugin "${pluginName}" has an unknown ${location}.${key} option`);
8654
8666
  }
8655
8667
  const descriptor = Object.getOwnPropertyDescriptor(value, key);
8656
- if (!_optionalChain([descriptor, 'optionalAccess', _406 => _406.enumerable])) {
8668
+ if (!_optionalChain([descriptor, 'optionalAccess', _407 => _407.enumerable])) {
8657
8669
  throw new TypeError(`Client plugin "${pluginName}" ${location}.${key} must be enumerable`);
8658
8670
  }
8659
8671
  if (!("value" in descriptor)) {
@@ -8777,7 +8789,7 @@ function assertPublicData(value, pluginName) {
8777
8789
  throwPublicDataError(pluginName, pathSegments, "cannot contain symbol keys");
8778
8790
  }
8779
8791
  const descriptor = Object.getOwnPropertyDescriptor(current, key);
8780
- if (!_optionalChain([descriptor, 'optionalAccess', _407 => _407.enumerable])) {
8792
+ if (!_optionalChain([descriptor, 'optionalAccess', _408 => _408.enumerable])) {
8781
8793
  throwPublicDataError(
8782
8794
  pluginName,
8783
8795
  [...pathSegments, key],
@@ -8823,8 +8835,8 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, isArrayIndex, "isArrayIndex");
8823
8835
 
8824
8836
  var ADAPTER_EXTENSIONS = ["ts", "tsx", "js", "jsx", "mts", "mjs"];
8825
8837
  function resolveFarmClientCacheAdapterEntry(root, cache) {
8826
- const client = _optionalChain([cache, 'optionalAccess', _408 => _408.client]);
8827
- const adapter = _optionalChain([client, 'optionalAccess', _409 => _409.adapter]);
8838
+ const client = _optionalChain([cache, 'optionalAccess', _409 => _409.client]);
8839
+ const adapter = _optionalChain([client, 'optionalAccess', _410 => _410.adapter]);
8828
8840
  if (adapter === void 0) return void 0;
8829
8841
  if (typeof adapter !== "string" || adapter.trim().length === 0) {
8830
8842
  throw new Error(
@@ -8839,8 +8851,8 @@ function resolveFarmClientCacheAdapterEntry(root, cache) {
8839
8851
  );
8840
8852
  }
8841
8853
  const options = {};
8842
- if (_optionalChain([client, 'optionalAccess', _410 => _410.version]) !== void 0) options.version = client.version;
8843
- if (_optionalChain([client, 'optionalAccess', _411 => _411.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
8854
+ if (_optionalChain([client, 'optionalAccess', _411 => _411.version]) !== void 0) options.version = client.version;
8855
+ if (_optionalChain([client, 'optionalAccess', _412 => _412.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
8844
8856
  return { importPath: found.replace(/\\/g, "/"), options };
8845
8857
  }
8846
8858
  _chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmClientCacheAdapterEntry, "resolveFarmClientCacheAdapterEntry");
@@ -8942,7 +8954,7 @@ function createFarmLayoutElement(Component, pattern, children, params) {
8942
8954
  function shouldBypassFarmRouterForDottedPath(pathname, routeManager, baseDirs, generatedPaths = []) {
8943
8955
  if (!pathname.includes(".") || pathname.endsWith(".html")) return false;
8944
8956
  const matchesAppRoute = Boolean(
8945
- _optionalChain([routeManager, 'optionalAccess', _412 => _412.matchRoute, 'call', _413 => _413(pathname), 'optionalAccess', _414 => _414.route]) || _optionalChain([routeManager, 'optionalAccess', _415 => _415.matchMetadataRoute, 'call', _416 => _416(pathname)]) || _optionalChain([routeManager, 'optionalAccess', _417 => _417.matchMetadataImage, 'call', _418 => _418(pathname)]) || generatedPaths.includes(pathname)
8957
+ _optionalChain([routeManager, 'optionalAccess', _413 => _413.matchRoute, 'call', _414 => _414(pathname), 'optionalAccess', _415 => _415.route]) || _optionalChain([routeManager, 'optionalAccess', _416 => _416.matchMetadataRoute, 'call', _417 => _417(pathname)]) || _optionalChain([routeManager, 'optionalAccess', _418 => _418.matchMetadataImage, 'call', _419 => _419(pathname)]) || generatedPaths.includes(pathname)
8946
8958
  );
8947
8959
  return !matchesAppRoute || devServableFileExists(pathname, baseDirs);
8948
8960
  }
@@ -8971,7 +8983,7 @@ var DOCS_ENGINE_APP_OWNABLE_PATHS = /* @__PURE__ */ new Set([
8971
8983
  ]);
8972
8984
  function farmAppOwnsDocsEnginePath(pathname, options) {
8973
8985
  if (!DOCS_ENGINE_APP_OWNABLE_PATHS.has(pathname)) return false;
8974
- return options.generatedPaths.includes(pathname) || Boolean(_optionalChain([options, 'access', _419 => _419.routeManager, 'optionalAccess', _420 => _420.matchMetadataRoute, 'call', _421 => _421(pathname)])) || devServableFileExists(pathname, [options.publicDir]);
8986
+ return options.generatedPaths.includes(pathname) || Boolean(_optionalChain([options, 'access', _420 => _420.routeManager, 'optionalAccess', _421 => _421.matchMetadataRoute, 'call', _422 => _422(pathname)])) || devServableFileExists(pathname, [options.publicDir]);
8975
8987
  }
8976
8988
  _chunkS3JO3N4Hcjs.__name.call(void 0, farmAppOwnsDocsEnginePath, "farmAppOwnsDocsEnginePath");
8977
8989
  function devServableFileExists(pathname, baseDirs) {
@@ -9078,14 +9090,14 @@ function analyzeClientBoundary(program, publicKeys) {
9078
9090
  _chunkS3JO3N4Hcjs.__name.call(void 0, analyzeClientBoundary, "analyzeClientBoundary");
9079
9091
  function readNodeBuiltinSource(node) {
9080
9092
  if (node.type === "ImportDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExportAllDeclaration" || node.type === "ImportExpression") {
9081
- const value = _optionalChain([node, 'access', _422 => _422.source, 'optionalAccess', _423 => _423.value]);
9093
+ const value = _optionalChain([node, 'access', _423 => _423.source, 'optionalAccess', _424 => _424.value]);
9082
9094
  return typeof value === "string" && value.startsWith("node:") ? value : void 0;
9083
9095
  }
9084
9096
  if (node.type === "CallExpression") {
9085
9097
  const callee = node.callee;
9086
- if (_optionalChain([callee, 'optionalAccess', _424 => _424.type]) === "Identifier" && callee.name === "require") {
9087
- const arg = _optionalChain([node, 'access', _425 => _425.arguments, 'optionalAccess', _426 => _426[0]]);
9088
- const value = _optionalChain([arg, 'optionalAccess', _427 => _427.type]) === "Literal" ? arg.value : void 0;
9098
+ if (_optionalChain([callee, 'optionalAccess', _425 => _425.type]) === "Identifier" && callee.name === "require") {
9099
+ const arg = _optionalChain([node, 'access', _426 => _426.arguments, 'optionalAccess', _427 => _427[0]]);
9100
+ const value = _optionalChain([arg, 'optionalAccess', _428 => _428.type]) === "Literal" ? arg.value : void 0;
9089
9101
  return typeof value === "string" && value.startsWith("node:") ? value : void 0;
9090
9102
  }
9091
9103
  }
@@ -9095,7 +9107,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, readNodeBuiltinSource, "readNodeBuiltinSou
9095
9107
  function readProcessEnvKey(node) {
9096
9108
  if (node.type !== "MemberExpression") return void 0;
9097
9109
  const object = node.object;
9098
- if (!object || object.type !== "MemberExpression" || _optionalChain([object, 'access', _428 => _428.object, 'optionalAccess', _429 => _429.type]) !== "Identifier" || object.object.name !== "process" || _optionalChain([object, 'access', _430 => _430.property, 'optionalAccess', _431 => _431.name]) !== "env") {
9110
+ if (!object || object.type !== "MemberExpression" || _optionalChain([object, 'access', _429 => _429.object, 'optionalAccess', _430 => _430.type]) !== "Identifier" || object.object.name !== "process" || _optionalChain([object, 'access', _431 => _431.property, 'optionalAccess', _432 => _432.name]) !== "env") {
9099
9111
  return void 0;
9100
9112
  }
9101
9113
  const property = node.property;
@@ -9160,7 +9172,7 @@ function farmImageImportsPlugin() {
9160
9172
  async transform(code, id) {
9161
9173
  const filePath = id.split("?", 1)[0];
9162
9174
  if (id.includes("?") || !STATIC_IMAGE_RE.test(filePath)) return null;
9163
- const defaultExport = _optionalChain([code, 'access', _432 => _432.match, 'call', _433 => _433(/^\s*export\s+default\s+(.+?);?\s*$/s), 'optionalAccess', _434 => _434[1]]);
9175
+ const defaultExport = _optionalChain([code, 'access', _433 => _433.match, 'call', _434 => _434(/^\s*export\s+default\s+(.+?);?\s*$/s), 'optionalAccess', _435 => _435[1]]);
9164
9176
  if (!defaultExport) return null;
9165
9177
  return createStaticImageModule(filePath, `const src = ${defaultExport};`);
9166
9178
  }
@@ -9221,7 +9233,7 @@ var FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE = [
9221
9233
  ];
9222
9234
  function getFarmClientOptimizeDepsInclude(renderer) {
9223
9235
  return Array.from(
9224
- /* @__PURE__ */ new Set([...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE, ..._optionalChain([renderer, 'optionalAccess', _435 => _435.optimizeDeps]) || []])
9236
+ /* @__PURE__ */ new Set([...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE, ..._optionalChain([renderer, 'optionalAccess', _436 => _436.optimizeDeps]) || []])
9225
9237
  );
9226
9238
  }
9227
9239
  _chunkS3JO3N4Hcjs.__name.call(void 0, getFarmClientOptimizeDepsInclude, "getFarmClientOptimizeDepsInclude");
@@ -9246,7 +9258,7 @@ function createFarmClientOptimizeDepsConfig(entries, renderer) {
9246
9258
  // Farm's HTML boots through a virtual module and imports route UI lazily.
9247
9259
  // Explicit entries let Vite finish that crawl before a navigation can
9248
9260
  // rotate the optimizer hash underneath a hydrated React runtime.
9249
- ..._optionalChain([entries, 'optionalAccess', _436 => _436.length]) ? { entries: [...entries] } : {}
9261
+ ..._optionalChain([entries, 'optionalAccess', _437 => _437.length]) ? { entries: [...entries] } : {}
9250
9262
  };
9251
9263
  }
9252
9264
  _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmClientOptimizeDepsConfig, "createFarmClientOptimizeDepsConfig");
@@ -9276,8 +9288,8 @@ function mergeAlias(farmValue, userValue) {
9276
9288
  }
9277
9289
  _chunkS3JO3N4Hcjs.__name.call(void 0, mergeAlias, "mergeAlias");
9278
9290
  function mergeFarmViteConfig(farmConfig, userConfig = {}) {
9279
- const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _437 => _437.optimizeDeps, 'optionalAccess', _438 => _438.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _439 => _439.optimizeDeps, 'optionalAccess', _440 => _440.noDiscovery])));
9280
- const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _441 => _441.optimizeDeps, 'optionalAccess', _442 => _442.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _443 => _443.optimizeDeps, 'optionalAccess', _444 => _444.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _445 => _445.optimizeDeps, 'optionalAccess', _446 => _446.holdUntilCrawlEnd]))));
9291
+ const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _438 => _438.optimizeDeps, 'optionalAccess', _439 => _439.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _440 => _440.optimizeDeps, 'optionalAccess', _441 => _441.noDiscovery])));
9292
+ const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _442 => _442.optimizeDeps, 'optionalAccess', _443 => _443.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _444 => _444.optimizeDeps, 'optionalAccess', _445 => _445.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _446 => _446.optimizeDeps, 'optionalAccess', _447 => _447.holdUntilCrawlEnd]))));
9281
9293
  return {
9282
9294
  ...farmConfig,
9283
9295
  ...userConfig,
@@ -9289,9 +9301,9 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
9289
9301
  resolve: {
9290
9302
  ...farmConfig.resolve,
9291
9303
  ...userConfig.resolve,
9292
- alias: mergeAlias(_optionalChain([farmConfig, 'access', _447 => _447.resolve, 'optionalAccess', _448 => _448.alias]), _optionalChain([userConfig, 'access', _449 => _449.resolve, 'optionalAccess', _450 => _450.alias])),
9304
+ alias: mergeAlias(_optionalChain([farmConfig, 'access', _448 => _448.resolve, 'optionalAccess', _449 => _449.alias]), _optionalChain([userConfig, 'access', _450 => _450.resolve, 'optionalAccess', _451 => _451.alias])),
9293
9305
  dedupe: Array.from(
9294
- /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _451 => _451.resolve, 'optionalAccess', _452 => _452.dedupe]) || [], ..._optionalChain([userConfig, 'access', _453 => _453.resolve, 'optionalAccess', _454 => _454.dedupe]) || []])
9306
+ /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _452 => _452.resolve, 'optionalAccess', _453 => _453.dedupe]) || [], ..._optionalChain([userConfig, 'access', _454 => _454.resolve, 'optionalAccess', _455 => _455.dedupe]) || []])
9295
9307
  )
9296
9308
  },
9297
9309
  optimizeDeps: {
@@ -9301,21 +9313,21 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
9301
9313
  holdUntilCrawlEnd,
9302
9314
  include: Array.from(
9303
9315
  /* @__PURE__ */ new Set([
9304
- ..._optionalChain([farmConfig, 'access', _455 => _455.optimizeDeps, 'optionalAccess', _456 => _456.include]) || [],
9305
- ..._optionalChain([userConfig, 'access', _457 => _457.optimizeDeps, 'optionalAccess', _458 => _458.include]) || []
9316
+ ..._optionalChain([farmConfig, 'access', _456 => _456.optimizeDeps, 'optionalAccess', _457 => _457.include]) || [],
9317
+ ..._optionalChain([userConfig, 'access', _458 => _458.optimizeDeps, 'optionalAccess', _459 => _459.include]) || []
9306
9318
  ])
9307
9319
  ),
9308
9320
  exclude: Array.from(
9309
9321
  /* @__PURE__ */ new Set([
9310
- ..._optionalChain([farmConfig, 'access', _459 => _459.optimizeDeps, 'optionalAccess', _460 => _460.exclude]) || [],
9311
- ..._optionalChain([userConfig, 'access', _461 => _461.optimizeDeps, 'optionalAccess', _462 => _462.exclude]) || []
9322
+ ..._optionalChain([farmConfig, 'access', _460 => _460.optimizeDeps, 'optionalAccess', _461 => _461.exclude]) || [],
9323
+ ..._optionalChain([userConfig, 'access', _462 => _462.optimizeDeps, 'optionalAccess', _463 => _463.exclude]) || []
9312
9324
  ])
9313
9325
  )
9314
9326
  },
9315
9327
  ssr: {
9316
9328
  ...farmConfig.ssr,
9317
9329
  ...userConfig.ssr,
9318
- noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _463 => _463.ssr, 'optionalAccess', _464 => _464.noExternal]), _optionalChain([userConfig, 'access', _465 => _465.ssr, 'optionalAccess', _466 => _466.noExternal]))
9330
+ noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _464 => _464.ssr, 'optionalAccess', _465 => _465.noExternal]), _optionalChain([userConfig, 'access', _466 => _466.ssr, 'optionalAccess', _467 => _467.noExternal]))
9319
9331
  }
9320
9332
  };
9321
9333
  }
@@ -9369,7 +9381,7 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}) {
9369
9381
  ...farmConfig.build,
9370
9382
  rollupOptions: {
9371
9383
  ...userBundlerOptions,
9372
- ..._optionalChain([farmConfig, 'access', _467 => _467.build, 'optionalAccess', _468 => _468.rollupOptions])
9384
+ ..._optionalChain([farmConfig, 'access', _468 => _468.build, 'optionalAccess', _469 => _469.rollupOptions])
9373
9385
  }
9374
9386
  },
9375
9387
  css: farmConfig.css || userCss ? { ...farmConfig.css, ...userCss } : void 0,
@@ -9377,7 +9389,7 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}) {
9377
9389
  esbuild: typeof userEsbuild === "object" && farmConfig.esbuild !== false ? { ...userEsbuild, ...farmConfig.esbuild } : _nullishCoalesce(farmConfig.esbuild, () => ( userEsbuild)),
9378
9390
  ssr: {
9379
9391
  ...merged.ssr,
9380
- external: mergeExternal(_optionalChain([farmConfig, 'access', _469 => _469.ssr, 'optionalAccess', _470 => _470.external]), _optionalChain([userConfig, 'access', _471 => _471.ssr, 'optionalAccess', _472 => _472.external]))
9392
+ external: mergeExternal(_optionalChain([farmConfig, 'access', _470 => _470.ssr, 'optionalAccess', _471 => _471.external]), _optionalChain([userConfig, 'access', _472 => _472.ssr, 'optionalAccess', _473 => _473.external]))
9381
9393
  }
9382
9394
  };
9383
9395
  }
@@ -9450,13 +9462,13 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, reportOpenAPIDevGenerationResult, "reportO
9450
9462
  // src/vite.ts
9451
9463
  var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
9452
9464
  function farmLlmsTxtGeneratedPaths(config) {
9453
- const llms = _chunkISTFC3MZcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _473 => _473.agent, 'optionalAccess', _474 => _474.llmsTxt]));
9465
+ const llms = _chunkISTFC3MZcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _474 => _474.agent, 'optionalAccess', _475 => _475.llmsTxt]));
9454
9466
  if (!llms.enabled) return [];
9455
9467
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
9456
9468
  }
9457
9469
  _chunkS3JO3N4Hcjs.__name.call(void 0, farmLlmsTxtGeneratedPaths, "farmLlmsTxtGeneratedPaths");
9458
9470
  function farmAgentGeneratedPaths(config) {
9459
- const crawlers = _chunkISTFC3MZcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _475 => _475.agent, 'optionalAccess', _476 => _476.crawlers]));
9471
+ const crawlers = _chunkISTFC3MZcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _476 => _476.agent, 'optionalAccess', _477 => _477.crawlers]));
9460
9472
  return [...farmLlmsTxtGeneratedPaths(config), ...crawlers.enabled ? ["/robots.txt"] : []];
9461
9473
  }
9462
9474
  _chunkS3JO3N4Hcjs.__name.call(void 0, farmAgentGeneratedPaths, "farmAgentGeneratedPaths");
@@ -9494,7 +9506,7 @@ function loadFarmDocsSearchDevRuntime() {
9494
9506
  }
9495
9507
  _chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmDocsSearchDevRuntime, "loadFarmDocsSearchDevRuntime");
9496
9508
  function loadFarmOpenAPIDevRuntime() {
9497
- return import("./manager-G4B2IPYE.cjs");
9509
+ return import("./manager-XZ5TX7AO.cjs");
9498
9510
  }
9499
9511
  _chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmOpenAPIDevRuntime, "loadFarmOpenAPIDevRuntime");
9500
9512
  function loadFarmWorkflowsDevRuntime() {
@@ -9502,7 +9514,7 @@ function loadFarmWorkflowsDevRuntime() {
9502
9514
  }
9503
9515
  _chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmWorkflowsDevRuntime, "loadFarmWorkflowsDevRuntime");
9504
9516
  function loadFarmDevtoolsSnapshotRuntime() {
9505
- return import("./devtools-6DQHO7EK.cjs");
9517
+ return import("./devtools-UHRSZ7VA.cjs");
9506
9518
  }
9507
9519
  _chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmDevtoolsSnapshotRuntime, "loadFarmDevtoolsSnapshotRuntime");
9508
9520
  function loadFarmDevtoolsUIRuntime() {
@@ -9518,7 +9530,7 @@ function farmI18nClientBridgePlugin() {
9518
9530
  name: "farm:i18n-client-bridge",
9519
9531
  enforce: "pre",
9520
9532
  resolveId(id, _importer, options) {
9521
- if (id === "@farm.js/core/i18n/server" && !_optionalChain([options, 'optionalAccess', _477 => _477.ssr])) {
9533
+ if (id === "@farm.js/core/i18n/server" && !_optionalChain([options, 'optionalAccess', _478 => _478.ssr])) {
9522
9534
  return FARM_I18N_CLIENT_BRIDGE_ID;
9523
9535
  }
9524
9536
  return null;
@@ -9532,14 +9544,29 @@ function farmI18nClientBridgePlugin() {
9532
9544
  _chunkS3JO3N4Hcjs.__name.call(void 0, farmI18nClientBridgePlugin, "farmI18nClientBridgePlugin");
9533
9545
  var FARM_SERVER_ONLY_ENTRIES = /* @__PURE__ */ new Set(["@farm.js/core/og"]);
9534
9546
  function farmServerOnlyEntriesPlugin() {
9547
+ let root = process.cwd();
9548
+ let vercelOgInstalled = false;
9535
9549
  return {
9536
9550
  name: "farm:server-only-entries",
9537
9551
  enforce: "pre",
9552
+ configResolved(config) {
9553
+ root = config.root;
9554
+ },
9538
9555
  resolveId(id, importer, options) {
9539
- if (_optionalChain([options, 'optionalAccess', _478 => _478.ssr]) || !FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
9540
- this.error(
9541
- `${id} is server-only and cannot be imported into client code${importer ? ` (imported by ${importer})` : ""}. Use it from an API route or another server module.`
9542
- );
9556
+ if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
9557
+ const importedBy = importer ? ` (imported by ${importer})` : "";
9558
+ if (!_optionalChain([options, 'optionalAccess', _479 => _479.ssr])) {
9559
+ this.error(
9560
+ `${id} is server-only and cannot be imported into client code${importedBy}. Use it from an API route or another server module.`
9561
+ );
9562
+ }
9563
+ vercelOgInstalled || (vercelOgInstalled = _chunkLYLEZIG3cjs.isOptionalPeerInstalled.call(void 0, root, "@vercel/og"));
9564
+ if (!vercelOgInstalled) {
9565
+ this.error(
9566
+ `${id} needs @vercel/og, which is not installed${importedBy}. ${_chunkLYLEZIG3cjs.VERCEL_OG_INSTALL_HINT}`
9567
+ );
9568
+ }
9569
+ return null;
9543
9570
  }
9544
9571
  };
9545
9572
  }
@@ -9578,7 +9605,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
9578
9605
  }
9579
9606
  _chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmI18nStaticHead, "renderFarmI18nStaticHead");
9580
9607
  function getPublicEnvDefine(config) {
9581
- const publicEnv = _optionalChain([config, 'access', _479 => _479.env, 'optionalAccess', _480 => _480.public]);
9608
+ const publicEnv = _optionalChain([config, 'access', _480 => _480.env, 'optionalAccess', _481 => _481.public]);
9582
9609
  if (!isResolvedEnvScope(publicEnv)) {
9583
9610
  return {};
9584
9611
  }
@@ -9619,7 +9646,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request2
9619
9646
  return;
9620
9647
  }
9621
9648
  if (res.headersSent) {
9622
- _optionalChain([res, 'access', _481 => _481.destroy, 'optionalCall', _482 => _482(error instanceof Error ? error : new Error(String(error)))]);
9649
+ _optionalChain([res, 'access', _482 => _482.destroy, 'optionalCall', _483 => _483(error instanceof Error ? error : new Error(String(error)))]);
9623
9650
  return;
9624
9651
  }
9625
9652
  res.statusCode = 500;
@@ -9718,7 +9745,7 @@ function interceptFarmDevPageResponse(options) {
9718
9745
  const originalWrite = res.write.bind(res);
9719
9746
  const originalEnd = res.end.bind(res);
9720
9747
  const originalWriteHead = res.writeHead.bind(res);
9721
- const originalFlushHeaders = _optionalChain([res, 'access', _483 => _483.flushHeaders, 'optionalAccess', _484 => _484.bind, 'call', _485 => _485(res)]);
9748
+ const originalFlushHeaders = _optionalChain([res, 'access', _484 => _484.flushHeaders, 'optionalAccess', _485 => _485.bind, 'call', _486 => _486(res)]);
9722
9749
  let afterResponseCalled = false;
9723
9750
  let interceptedEnd = false;
9724
9751
  const htmlChunks = [];
@@ -9758,7 +9785,7 @@ function interceptFarmDevPageResponse(options) {
9758
9785
  const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
9759
9786
  if (shouldBufferResponse) {
9760
9787
  const callback = args.find((arg) => typeof arg === "function");
9761
- _optionalChain([callback, 'optionalCall', _486 => _486()]);
9788
+ _optionalChain([callback, 'optionalCall', _487 => _487()]);
9762
9789
  return true;
9763
9790
  }
9764
9791
  const writeResult = originalWrite(chunk, ...args);
@@ -9873,14 +9900,14 @@ function getEnvDefines(config, configEnv) {
9873
9900
  _chunkYFPGHF5Fcjs.getPublicFarmImageConfig.call(void 0, _chunkYFPGHF5Fcjs.resolveFarmImageConfig.call(void 0, config.images))
9874
9901
  )
9875
9902
  };
9876
- if (_optionalChain([configEnv, 'optionalAccess', _487 => _487.isSsrBuild])) {
9903
+ if (_optionalChain([configEnv, 'optionalAccess', _488 => _488.isSsrBuild])) {
9877
9904
  defines.__FARM_ENV__ = JSON.stringify(_chunkVEKFLAQMcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
9878
9905
  }
9879
9906
  return defines;
9880
9907
  }
9881
9908
  _chunkS3JO3N4Hcjs.__name.call(void 0, getEnvDefines, "getEnvDefines");
9882
9909
  function getFarmAPIBaseURLDefine(config) {
9883
- const baseURL = _optionalChain([config, 'access', _488 => _488.api, 'optionalAccess', _489 => _489.baseURL]);
9910
+ const baseURL = _optionalChain([config, 'access', _489 => _489.api, 'optionalAccess', _490 => _490.baseURL]);
9884
9911
  return typeof baseURL === "string" && baseURL ? baseURL : _chunkS3A45T7Fcjs.DEFAULT_FARM_API_BASE_PATH;
9885
9912
  }
9886
9913
  _chunkS3JO3N4Hcjs.__name.call(void 0, getFarmAPIBaseURLDefine, "getFarmAPIBaseURLDefine");
@@ -9970,9 +9997,9 @@ function transformIsolatedClientBoundaryModule(options) {
9970
9997
  transformedExports++;
9971
9998
  }, "addWrapper");
9972
9999
  for (const node of body) {
9973
- if (_optionalChain([node, 'optionalAccess', _490 => _490.type]) === "ExportDefaultDeclaration" && node.declaration) {
10000
+ if (_optionalChain([node, 'optionalAccess', _491 => _491.type]) === "ExportDefaultDeclaration" && node.declaration) {
9974
10001
  const declaration2 = node.declaration;
9975
- if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _491 => _491.id, 'optionalAccess', _492 => _492.name])) {
10002
+ if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _492 => _492.id, 'optionalAccess', _493 => _493.name])) {
9976
10003
  replacements.push({
9977
10004
  start: node.start,
9978
10005
  end: node.end,
@@ -9990,14 +10017,14 @@ function transformIsolatedClientBoundaryModule(options) {
9990
10017
  }
9991
10018
  continue;
9992
10019
  }
9993
- if (_optionalChain([node, 'optionalAccess', _493 => _493.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
10020
+ if (_optionalChain([node, 'optionalAccess', _494 => _494.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
9994
10021
  const declaration = node.declaration;
9995
10022
  const declaredNames = [];
9996
- if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _494 => _494.id, 'optionalAccess', _495 => _495.name])) {
10023
+ if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _495 => _495.id, 'optionalAccess', _496 => _496.name])) {
9997
10024
  declaredNames.push(declaration.id.name);
9998
10025
  } else if (declaration.type === "VariableDeclaration") {
9999
10026
  for (const declarator of declaration.declarations || []) {
10000
- if (_optionalChain([declarator, 'access', _496 => _496.id, 'optionalAccess', _497 => _497.type]) === "Identifier") declaredNames.push(declarator.id.name);
10027
+ if (_optionalChain([declarator, 'access', _497 => _497.id, 'optionalAccess', _498 => _498.type]) === "Identifier") declaredNames.push(declarator.id.name);
10001
10028
  }
10002
10029
  }
10003
10030
  const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
@@ -10061,7 +10088,7 @@ function warnClientBoundaryOnce(context, id, code, config) {
10061
10088
  } catch (e27) {
10062
10089
  return;
10063
10090
  }
10064
- const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _498 => _498.env, 'optionalAccess', _499 => _499.public]), () => ( {}))));
10091
+ const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _499 => _499.env, 'optionalAccess', _500 => _500.public]), () => ( {}))));
10065
10092
  const findings = analyzeClientBoundary(program, publicKeys);
10066
10093
  if (findings.envKeys.length === 0 && findings.publicEnvKeys.length === 0 && findings.builtinImports.length === 0) {
10067
10094
  return;
@@ -10112,8 +10139,8 @@ function farmPlugin(options = {}, initialPluginManager) {
10112
10139
  name: "farm",
10113
10140
  config(userConfig, configEnv) {
10114
10141
  isBuild = configEnv.command === "build";
10115
- const layerAliases = _chunkY4YMF2NQcjs.getFarmLayerAliases.call(void 0, options.layers);
10116
- const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _500 => _500.resolve, 'optionalAccess', _501 => _501.alias]), "@") ? {} : createFarmSourceAlias(options.root || process.cwd(), options.srcDir);
10142
+ const layerAliases = _chunkVPTDD5XFcjs.getFarmLayerAliases.call(void 0, options.layers);
10143
+ const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _501 => _501.resolve, 'optionalAccess', _502 => _502.alias]), "@") ? {} : createFarmSourceAlias(options.root || process.cwd(), options.srcDir);
10117
10144
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
10118
10145
  return {
10119
10146
  // Honor Farm's publicDir so the dev server serves the same static
@@ -10142,7 +10169,7 @@ function farmPlugin(options = {}, initialPluginManager) {
10142
10169
  serverFnTransformActive = config.plugins.some(
10143
10170
  (plugin) => plugin.name === SERVER_FN_TRANSFORM_PLUGIN
10144
10171
  );
10145
- if (_optionalChain([options, 'access', _502 => _502.experimental, 'optionalAccess', _503 => _503.serverActions]) === true && !serverFnTransformActive) {
10172
+ if (_optionalChain([options, 'access', _503 => _503.experimental, 'optionalAccess', _504 => _504.serverActions]) === true && !serverFnTransformActive) {
10146
10173
  _chunk5QIKR7RRcjs.logger.warn(
10147
10174
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
10148
10175
  );
@@ -10170,7 +10197,7 @@ function farmPlugin(options = {}, initialPluginManager) {
10170
10197
  );
10171
10198
  await farmApp.initialize();
10172
10199
  const farmConfig = farmApp.getConfig();
10173
- if (_optionalChain([farmConfig, 'access', _504 => _504.agent, 'optionalAccess', _505 => _505.noindexPreviews])) {
10200
+ if (_optionalChain([farmConfig, 'access', _505 => _505.agent, 'optionalAccess', _506 => _506.noindexPreviews])) {
10174
10201
  server.middlewares.use((_req, res, next) => {
10175
10202
  if (_chunkCXP5U3RWcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
10176
10203
  res.setHeader("X-Robots-Tag", _chunkISTFC3MZcjs.FARM_PREVIEW_ROBOTS_TAG);
@@ -10180,6 +10207,7 @@ function farmPlugin(options = {}, initialPluginManager) {
10180
10207
  }
10181
10208
  const apiServerBasePath = _chunkWPYFSQKKcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
10182
10209
  const serverConfig = _chunkEM6SBQKMcjs.resolveFarmServerConfig.call(void 0, farmConfig.server);
10210
+ globalThis.__FARM_IMAGE_CONFIG__ = _chunkYFPGHF5Fcjs.getPublicFarmImageConfig.call(void 0, farmConfig.images);
10183
10211
  let imageHandler = null;
10184
10212
  if (farmConfig.images.provider !== "none") {
10185
10213
  const { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } = await import("./image/sharp.cjs");
@@ -10189,7 +10217,7 @@ function farmPlugin(options = {}, initialPluginManager) {
10189
10217
  validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
10190
10218
  // Vite owns this address. Unlike request.url, it cannot be replaced by
10191
10219
  // a caller-controlled Host header.
10192
- trustedLocalOrigin: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => _optionalChain([server, 'access', _506 => _506.resolvedUrls, 'optionalAccess', _507 => _507.local, 'access', _508 => _508[0]]), "trustedLocalOrigin"),
10220
+ trustedLocalOrigin: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => _optionalChain([server, 'access', _507 => _507.resolvedUrls, 'optionalAccess', _508 => _508.local, 'access', _509 => _509[0]]), "trustedLocalOrigin"),
10193
10221
  onError(error) {
10194
10222
  _chunk5QIKR7RRcjs.logger.error(
10195
10223
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
@@ -10197,7 +10225,7 @@ function farmPlugin(options = {}, initialPluginManager) {
10197
10225
  }
10198
10226
  });
10199
10227
  }
10200
- const sourceRoots = _chunkY4YMF2NQcjs.getFarmSourceRoots.call(void 0, farmConfig);
10228
+ const sourceRoots = _chunkVPTDD5XFcjs.getFarmSourceRoots.call(void 0, farmConfig);
10201
10229
  server.watcher.add(sourceRoots.map((source) => path17.join(source.root, source.srcDir)));
10202
10230
  if (farmConfig.i18n.enabled) {
10203
10231
  server.watcher.add(
@@ -10209,15 +10237,15 @@ function farmPlugin(options = {}, initialPluginManager) {
10209
10237
  const workflowConfig = farmConfig.workflows;
10210
10238
  const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
10211
10239
  const getExtraRouteTypes = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => [
10212
- ..._optionalChain([options, 'access', _509 => _509.openapi, 'optionalAccess', _510 => _510.enabled]) && options.openapi.route ? [options.openapi.route] : [],
10213
- ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _511 => _511.getFarmDocsRouteTypeEntries, 'call', _512 => _512(farmConfig.docs)]), () => ( []))
10240
+ ..._optionalChain([options, 'access', _510 => _510.openapi, 'optionalAccess', _511 => _511.enabled]) && options.openapi.route ? [options.openapi.route] : [],
10241
+ ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _512 => _512.getFarmDocsRouteTypeEntries, 'call', _513 => _513(farmConfig.docs)]), () => ( []))
10214
10242
  ], "getExtraRouteTypes");
10215
10243
  const appDirSlugs = sourceRoots.map(
10216
10244
  (source) => path17.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
10217
10245
  );
10218
10246
  const generateTypeArtifacts = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
10219
10247
  try {
10220
- const result = await _chunkSO7CRMP6cjs.generateFarmTypeArtifacts.call(void 0, {
10248
+ const result = await _chunkDW34V5SMcjs.generateFarmTypeArtifacts.call(void 0, {
10221
10249
  root: farmConfig.root,
10222
10250
  srcDir: farmConfig.srcDir,
10223
10251
  layers: farmConfig.layers,
@@ -10257,7 +10285,7 @@ function farmPlugin(options = {}, initialPluginManager) {
10257
10285
  (source) => path17.join(source.root, source.srcDir).replace(/\\/g, "/")
10258
10286
  );
10259
10287
  const layerConfigFiles = new Set(
10260
- farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _513 => _513.configFile, 'optionalAccess', _514 => _514.replace, 'call', _515 => _515(/\\/g, "/")])).filter((file) => Boolean(file))
10288
+ farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _514 => _514.configFile, 'optionalAccess', _515 => _515.replace, 'call', _516 => _516(/\\/g, "/")])).filter((file) => Boolean(file))
10261
10289
  );
10262
10290
  const routeModuleExtensions = /* @__PURE__ */ new Set([
10263
10291
  ..._chunkPSV6XKPOcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
@@ -10336,7 +10364,7 @@ function farmPlugin(options = {}, initialPluginManager) {
10336
10364
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
10337
10365
  }
10338
10366
  if (isI18nCatalogFile(file)) {
10339
- _optionalChain([farmApp, 'optionalAccess', _516 => _516.getI18nRuntime, 'call', _517 => _517(), 'access', _518 => _518.reload, 'call', _519 => _519(), 'access', _520 => _520.then, 'call', _521 => _521(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _522 => _522.catch, 'call', _523 => _523((error) => _chunk5QIKR7RRcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
10367
+ _optionalChain([farmApp, 'optionalAccess', _517 => _517.getI18nRuntime, 'call', _518 => _518(), 'access', _519 => _519.reload, 'call', _520 => _520(), 'access', _521 => _521.then, 'call', _522 => _522(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _523 => _523.catch, 'call', _524 => _524((error) => _chunk5QIKR7RRcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
10340
10368
  }
10341
10369
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile2(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
10342
10370
  if (isRouteRefreshEvent) {
@@ -10349,15 +10377,15 @@ function farmPlugin(options = {}, initialPluginManager) {
10349
10377
  const reloadsMiddleware = pendingRouteRefreshIncludesMiddleware;
10350
10378
  pendingRouteRefreshIncludesMiddleware = false;
10351
10379
  Promise.all([
10352
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _524 => _524(`${ev} ${file}`)]),
10353
- reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _525 => _525.reload, 'call', _526 => _526()]) : void 0
10380
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _525 => _525(`${ev} ${file}`)]),
10381
+ reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _526 => _526.reload, 'call', _527 => _527()]) : void 0
10354
10382
  ]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunk5QIKR7RRcjs.logger.warn(`Route refresh failed: ${error.message}`));
10355
10383
  }, 50);
10356
10384
  }
10357
10385
  }
10358
10386
  });
10359
10387
  });
10360
- const appDirs = _chunkY4YMF2NQcjs.getFarmAppDirectories.call(void 0, farmConfig);
10388
+ const appDirs = _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, farmConfig);
10361
10389
  const routeManager = farmApp.getRouteManager();
10362
10390
  const discoveredRoutes = [];
10363
10391
  for (const [pattern, entry] of routeManager.getRoutes()) {
@@ -10384,7 +10412,7 @@ function farmPlugin(options = {}, initialPluginManager) {
10384
10412
  layoutCount: discoveredRoutes.filter((r) => r.kind === "layout").length
10385
10413
  });
10386
10414
  }
10387
- apiRouteManager = new (0, _chunkB3WK4DTXcjs.APIRouteManager)(appDirs, server, {
10415
+ apiRouteManager = new (0, _chunkIMBMOEWTcjs.APIRouteManager)(appDirs, server, {
10388
10416
  plugins: farmConfig.plugins,
10389
10417
  i18n: farmApp.getI18nRuntime(),
10390
10418
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -10439,11 +10467,11 @@ function farmPlugin(options = {}, initialPluginManager) {
10439
10467
  });
10440
10468
  }
10441
10469
  }
10442
- if (_optionalChain([options, 'access', _527 => _527.openapi, 'optionalAccess', _528 => _528.enabled])) {
10470
+ if (_optionalChain([options, 'access', _528 => _528.openapi, 'optionalAccess', _529 => _529.enabled])) {
10443
10471
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
10444
10472
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
10445
10473
  mode: "development",
10446
- apiBaseURL: typeof _optionalChain([options, 'access', _529 => _529.api, 'optionalAccess', _530 => _530.baseURL]) === "string" ? options.api.baseURL : void 0
10474
+ apiBaseURL: typeof _optionalChain([options, 'access', _530 => _530.api, 'optionalAccess', _531 => _531.baseURL]) === "string" ? options.api.baseURL : void 0
10447
10475
  });
10448
10476
  const spec = await openAPIManager.generateSpec();
10449
10477
  reportOpenAPIDevGenerationResult(spec);
@@ -10482,13 +10510,13 @@ function farmPlugin(options = {}, initialPluginManager) {
10482
10510
  ),
10483
10511
  loadModule: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (specifier) => {
10484
10512
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
10485
- if (specifier === _optionalChain([farmConfig, 'access', _531 => _531.docs, 'access', _532 => _532.adapter, 'optionalAccess', _533 => _533.server]) && _optionalChain([resolved, 'optionalAccess', _534 => _534.id])) {
10513
+ if (specifier === _optionalChain([farmConfig, 'access', _532 => _532.docs, 'access', _533 => _533.adapter, 'optionalAccess', _534 => _534.server]) && _optionalChain([resolved, 'optionalAccess', _535 => _535.id])) {
10486
10514
  return import(
10487
10515
  /* @vite-ignore */
10488
10516
  _url.pathToFileURL.call(void 0, resolved.id).href
10489
10517
  );
10490
10518
  }
10491
- return _chunkBMWDEBXOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _535 => _535.id]), () => ( specifier)));
10519
+ return _chunkBMWDEBXOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _536 => _536.id]), () => ( specifier)));
10492
10520
  }, "loadModule")
10493
10521
  }) : farmDocsDevRuntime.createFarmDocsHandler(farmConfig.docs, {
10494
10522
  root: farmConfig.root,
@@ -10503,7 +10531,7 @@ function farmPlugin(options = {}, initialPluginManager) {
10503
10531
  )
10504
10532
  }) : null;
10505
10533
  const wrapFarmDocsResponseWithLayouts = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (request2, response) => {
10506
- if (request2.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _536 => _536.headers, 'access', _537 => _537.get, 'call', _538 => _538("content-type"), 'optionalAccess', _539 => _539.toLowerCase, 'call', _540 => _540(), 'access', _541 => _541.includes, 'call', _542 => _542("text/html")])) {
10534
+ if (request2.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _537 => _537.headers, 'access', _538 => _538.get, 'call', _539 => _539("content-type"), 'optionalAccess', _540 => _540.toLowerCase, 'call', _541 => _541(), 'access', _542 => _542.includes, 'call', _543 => _543("text/html")])) {
10507
10535
  return response;
10508
10536
  }
10509
10537
  const pathname = new URL(request2.url).pathname;
@@ -10524,7 +10552,7 @@ function farmPlugin(options = {}, initialPluginManager) {
10524
10552
  headers: response.headers
10525
10553
  });
10526
10554
  }
10527
- const docsRenderer = _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _543 => _543.getConfig, 'call', _544 => _544()]), () => ( options))).renderer);
10555
+ const docsRenderer = _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _544 => _544.getConfig, 'call', _545 => _545()]), () => ( options))).renderer);
10528
10556
  const [rendererRuntime, layoutModules] = await Promise.all([
10529
10557
  _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, docsRenderer) ? import("./renderer/react/server.cjs") : _chunkBMWDEBXOcjs.loadFarmDevModule.call(void 0, server, docsRenderer.server),
10530
10558
  Promise.all(
@@ -10553,7 +10581,7 @@ function farmPlugin(options = {}, initialPluginManager) {
10553
10581
  ])
10554
10582
  );
10555
10583
  const inlineValue = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (value) => JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e"), "inlineValue");
10556
- const pageModulePath = _optionalChain([matchedRoute, 'access', _545 => _545.route, 'optionalAccess', _546 => _546.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
10584
+ const pageModulePath = _optionalChain([matchedRoute, 'access', _546 => _546.route, 'optionalAccess', _547 => _547.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
10557
10585
  const bootstrapScript = `<script>
10558
10586
  window.__FARM_PROPS__ = ${inlineValue({ params })};
10559
10587
  window.__FARM_ROUTE_SLOTS__ = [];
@@ -10647,7 +10675,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
10647
10675
  }, "dispatch")
10648
10676
  },
10649
10677
  (request2) => {
10650
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _547 => _547.getConfig, 'call', _548 => _548()]), () => ( options));
10678
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _548 => _548.getConfig, 'call', _549 => _549()]), () => ( options));
10651
10679
  const currentServerConfig = _chunkEM6SBQKMcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
10652
10680
  return _chunk5ZSWG4UXcjs.resolveFarmRequestURL.call(void 0, request2, {
10653
10681
  trustProxy: currentServerConfig.trustProxy
@@ -10658,7 +10686,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
10658
10686
  withAPIRequestTracing(async (req, res, next) => {
10659
10687
  const requestUrl = req.url || "/";
10660
10688
  const requestMethod = req.method || "GET";
10661
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _549 => _549.getConfig, 'call', _550 => _550()]), () => ( options));
10689
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _550 => _550.getConfig, 'call', _551 => _551()]), () => ( options));
10662
10690
  const currentServerConfig = _chunkEM6SBQKMcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
10663
10691
  const parsedRequestUrl = _chunk5ZSWG4UXcjs.resolveFarmRequestURL.call(void 0, req, {
10664
10692
  trustProxy: currentServerConfig.trustProxy
@@ -10748,7 +10776,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
10748
10776
  return;
10749
10777
  }
10750
10778
  const runAppMiddlewareForContentRoute = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async () => {
10751
- if (!_optionalChain([middlewareManager, 'optionalAccess', _551 => _551.hasMiddleware, 'call', _552 => _552()])) return false;
10779
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _552 => _552.hasMiddleware, 'call', _553 => _553()])) return false;
10752
10780
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
10753
10781
  return runFarmMiddlewareWithNavigation(
10754
10782
  farmApp.getServerRenderer(),
@@ -10759,7 +10787,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
10759
10787
  );
10760
10788
  }, "runAppMiddlewareForContentRoute");
10761
10789
  const openAPIRequestPathname = openAPIManager ? _chunkI57LW5VZcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
10762
- if (openAPIManager && _optionalChain([options, 'access', _553 => _553.openapi, 'optionalAccess', _554 => _554.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
10790
+ if (openAPIManager && _optionalChain([options, 'access', _554 => _554.openapi, 'optionalAccess', _555 => _555.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
10763
10791
  if (await runAppMiddlewareForContentRoute()) return;
10764
10792
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
10765
10793
  res.statusCode = 405;
@@ -10776,7 +10804,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
10776
10804
  res.end(requestMethod === "HEAD" ? void 0 : body);
10777
10805
  return;
10778
10806
  }
10779
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _555 => _555.openapi, 'optionalAccess', _556 => _556.route])) {
10807
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _556 => _556.openapi, 'optionalAccess', _557 => _557.route])) {
10780
10808
  if (await runAppMiddlewareForContentRoute()) return;
10781
10809
  const docsHandler = openAPIManager.getDocsRouteHandler(parsedRequestUrl.origin);
10782
10810
  return docsHandler(req, res);
@@ -10816,7 +10844,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
10816
10844
  config: farmApp.getConfig().mdx,
10817
10845
  resolveSource: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (pathname2) => {
10818
10846
  const match = farmApp.getRouteManager().matchRoute(pathname2);
10819
- const sourcePath = _optionalChain([match, 'access', _557 => _557.route, 'optionalAccess', _558 => _558.markdownSourcePath]) || (match.route && _chunkAH7HOAQ3cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
10847
+ const sourcePath = _optionalChain([match, 'access', _558 => _558.route, 'optionalAccess', _559 => _559.markdownSourcePath]) || (match.route && _chunkAH7HOAQ3cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
10820
10848
  if (!sourcePath) {
10821
10849
  return null;
10822
10850
  }
@@ -10924,7 +10952,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
10924
10952
  "beforeRequest",
10925
10953
  (plugin) => {
10926
10954
  const owner = _chunkZ5HIWVDPcjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
10927
- return plugin.name !== _chunkYZTASLPQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _559 => _559.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
10955
+ return plugin.name !== _chunkYZTASLPQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _560 => _560.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
10928
10956
  },
10929
10957
  req,
10930
10958
  res
@@ -11054,7 +11082,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11054
11082
  const apiHandler = apiRouteManager.getHandler({ throwOnError: true });
11055
11083
  const hasExplicitAPIRoute = hasMatchedApiRoute || Boolean(apiRouteManager.matchRoute(pathname2));
11056
11084
  if (apiHandler && hasExplicitAPIRoute) {
11057
- const apiRoutePattern = _optionalChain([matchedApiRoute, 'optionalAccess', _560 => _560.route, 'access', _561 => _561.path]) || _optionalChain([apiRouteManager, 'access', _562 => _562.matchRoute, 'call', _563 => _563(pathname2), 'optionalAccess', _564 => _564.route, 'access', _565 => _565.path]) || urlPath2;
11085
+ const apiRoutePattern = _optionalChain([matchedApiRoute, 'optionalAccess', _561 => _561.route, 'access', _562 => _562.path]) || _optionalChain([apiRouteManager, 'access', _563 => _563.matchRoute, 'call', _564 => _564(pathname2), 'optionalAccess', _565 => _565.route, 'access', _566 => _566.path]) || urlPath2;
11058
11086
  _chunkE3UK5IIBcjs.emitFarmEvent.call(void 0, {
11059
11087
  type: "route.matched",
11060
11088
  pathname: pathname2,
@@ -11144,7 +11172,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11144
11172
  return;
11145
11173
  }
11146
11174
  }
11147
- if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _566 => _566.isFarmDocsAPIRequest, 'call', _567 => _567(pathname2)])) {
11175
+ if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _567 => _567.isFarmDocsAPIRequest, 'call', _568 => _568(pathname2)])) {
11148
11176
  try {
11149
11177
  const url = `http://${req.headers.host || "localhost:3000"}${req.url}`;
11150
11178
  const headers = new Headers();
@@ -11217,18 +11245,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11217
11245
  res.end(JSON.stringify({ error: "API route not found", pathname: pathname2 }));
11218
11246
  return;
11219
11247
  }
11220
- if (_optionalChain([req, 'access', _568 => _568.url, 'optionalAccess', _569 => _569.startsWith, 'call', _570 => _570("/@")]) || _optionalChain([req, 'access', _571 => _571.url, 'optionalAccess', _572 => _572.startsWith, 'call', _573 => _573("/node_modules")])) {
11248
+ if (_optionalChain([req, 'access', _569 => _569.url, 'optionalAccess', _570 => _570.startsWith, 'call', _571 => _571("/@")]) || _optionalChain([req, 'access', _572 => _572.url, 'optionalAccess', _573 => _573.startsWith, 'call', _574 => _574("/node_modules")])) {
11221
11249
  return next();
11222
11250
  }
11223
11251
  if (shouldBypassFarmRouterForDottedPath(
11224
11252
  requestPathname,
11225
- _optionalChain([farmApp, 'optionalAccess', _574 => _574.getRouteManager, 'call', _575 => _575()]),
11253
+ _optionalChain([farmApp, 'optionalAccess', _575 => _575.getRouteManager, 'call', _576 => _576()]),
11226
11254
  [server.config.publicDir, server.config.root],
11227
11255
  farmAgentGeneratedPaths(farmConfig)
11228
11256
  )) {
11229
11257
  return next();
11230
11258
  }
11231
- if (_optionalChain([req, 'access', _576 => _576.url, 'optionalAccess', _577 => _577.startsWith, 'call', _578 => _578("/__farm/page-data")])) {
11259
+ if (_optionalChain([req, 'access', _577 => _577.url, 'optionalAccess', _578 => _578.startsWith, 'call', _579 => _579("/__farm/page-data")])) {
11232
11260
  const urlObj = parsedRequestUrl;
11233
11261
  const targetPath = urlObj.searchParams.get("path") || "/";
11234
11262
  try {
@@ -11256,7 +11284,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11256
11284
  });
11257
11285
  let middlewareMap = /* @__PURE__ */ new Map();
11258
11286
  let middlewareContext = /* @__PURE__ */ new Map();
11259
- if (_optionalChain([middlewareManager, 'optionalAccess', _579 => _579.hasMiddleware, 'call', _580 => _580()])) {
11287
+ if (_optionalChain([middlewareManager, 'optionalAccess', _580 => _580.hasMiddleware, 'call', _581 => _581()])) {
11260
11288
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
11261
11289
  const handled = await runFarmMiddlewareWithNavigation(
11262
11290
  farmApp.getServerRenderer(),
@@ -11284,10 +11312,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11284
11312
  if (pm) {
11285
11313
  await pm.runHookParallel("afterRouteMatch", {
11286
11314
  pathname: targetPath,
11287
- matched: !!_optionalChain([match, 'optionalAccess', _581 => _581.route]),
11288
- routePattern: _optionalChain([match, 'optionalAccess', _582 => _582.route, 'optionalAccess', _583 => _583.pattern]) || null,
11289
- params: _optionalChain([match, 'optionalAccess', _584 => _584.params]) || {},
11290
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _585 => _585.layouts]) || []).map((l) => l.pattern)
11315
+ matched: !!_optionalChain([match, 'optionalAccess', _582 => _582.route]),
11316
+ routePattern: _optionalChain([match, 'optionalAccess', _583 => _583.route, 'optionalAccess', _584 => _584.pattern]) || null,
11317
+ params: _optionalChain([match, 'optionalAccess', _585 => _585.params]) || {},
11318
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _586 => _586.layouts]) || []).map((l) => l.pattern)
11291
11319
  });
11292
11320
  }
11293
11321
  if (!match) {
@@ -11424,7 +11452,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11424
11452
  pageShouldHydrate: shouldHydrate,
11425
11453
  layoutShouldHydrate: shouldHydrateLayout,
11426
11454
  islandStrategy: hydrationIslandStrategy,
11427
- rendering: _chunkSO7CRMP6cjs.resolveRouteRenderingConfig.call(void 0, routeModule)
11455
+ rendering: _chunkDW34V5SMcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
11428
11456
  });
11429
11457
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
11430
11458
  const layoutStartIndex = getSharedLayoutPrefixLength(
@@ -11438,7 +11466,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11438
11466
  middlewareContext,
11439
11467
  () => renderer.renderNavigationFragment({
11440
11468
  PageComponent: routeModule.default,
11441
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _586 => _586.default]),
11469
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _587 => _587.default]),
11442
11470
  pageProps: routeProps,
11443
11471
  params,
11444
11472
  layouts: layouts.map((layout, index) => ({
@@ -11544,14 +11572,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11544
11572
  trustProxy: currentServerConfig.trustProxy
11545
11573
  }).pathname;
11546
11574
  const routeManager2 = farmApp.getRouteManager();
11547
- const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _587 => _587.hasHook, 'call', _588 => _588("beforeRouteMatch")]), () => ( false));
11548
- const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _589 => _589.hasHook, 'call', _590 => _590("afterRouteMatch")]), () => ( false));
11549
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _591 => _591.hasHook, 'call', _592 => _592("beforeRequest")]), () => ( false));
11550
- const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _593 => _593.hasHook, 'call', _594 => _594("beforeRender")]), () => ( false));
11551
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _595 => _595.hasHook, 'call', _596 => _596("afterResponse")]), () => ( false));
11552
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _597 => _597.hasHook, 'call', _598 => _598("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _599 => _599.hasHook, 'call', _600 => _600("afterRender")]), () => ( false)));
11553
- const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _601 => _601.hasRuntimeRequestHooks, 'call', _602 => _602()]), () => ( false));
11554
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _603 => _603.hasRuntimeHook, 'call', _604 => _604("after")]), () => ( false));
11575
+ const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _588 => _588.hasHook, 'call', _589 => _589("beforeRouteMatch")]), () => ( false));
11576
+ const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _590 => _590.hasHook, 'call', _591 => _591("afterRouteMatch")]), () => ( false));
11577
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _592 => _592.hasHook, 'call', _593 => _593("beforeRequest")]), () => ( false));
11578
+ const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _594 => _594.hasHook, 'call', _595 => _595("beforeRender")]), () => ( false));
11579
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _596 => _596.hasHook, 'call', _597 => _597("afterResponse")]), () => ( false));
11580
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _598 => _598.hasHook, 'call', _599 => _599("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _600 => _600.hasHook, 'call', _601 => _601("afterRender")]), () => ( false)));
11581
+ const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _602 => _602.hasRuntimeRequestHooks, 'call', _603 => _603()]), () => ( false));
11582
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _604 => _604.hasRuntimeHook, 'call', _605 => _605("after")]), () => ( false));
11555
11583
  const requestedMatch = routeManager2.matchRoute(requestedPathname);
11556
11584
  let runtimeSession;
11557
11585
  if (pm && hasRuntimeRequestHooks) {
@@ -11562,8 +11590,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11562
11590
  kind: "page",
11563
11591
  route: {
11564
11592
  pathname: requestedPathname,
11565
- pattern: _optionalChain([requestedMatch, 'optionalAccess', _605 => _605.route, 'optionalAccess', _606 => _606.pattern]) || null,
11566
- params: _optionalChain([requestedMatch, 'optionalAccess', _607 => _607.params]) || {}
11593
+ pattern: _optionalChain([requestedMatch, 'optionalAccess', _606 => _606.route, 'optionalAccess', _607 => _607.pattern]) || null,
11594
+ params: _optionalChain([requestedMatch, 'optionalAccess', _608 => _608.params]) || {}
11567
11595
  }
11568
11596
  }
11569
11597
  );
@@ -11596,17 +11624,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11596
11624
  if (pm && hasAfterRouteMatchHook) {
11597
11625
  await pm.runHookParallel("afterRouteMatch", {
11598
11626
  pathname,
11599
- matched: !!_optionalChain([routeMatch, 'optionalAccess', _608 => _608.route]),
11600
- routePattern: _optionalChain([routeMatch, 'optionalAccess', _609 => _609.route, 'optionalAccess', _610 => _610.pattern]) || null,
11601
- params: _optionalChain([routeMatch, 'optionalAccess', _611 => _611.params]) || {},
11602
- layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _612 => _612.layouts]) || []).map((l) => l.pattern)
11627
+ matched: !!_optionalChain([routeMatch, 'optionalAccess', _609 => _609.route]),
11628
+ routePattern: _optionalChain([routeMatch, 'optionalAccess', _610 => _610.route, 'optionalAccess', _611 => _611.pattern]) || null,
11629
+ params: _optionalChain([routeMatch, 'optionalAccess', _612 => _612.params]) || {},
11630
+ layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _613 => _613.layouts]) || []).map((l) => l.pattern)
11603
11631
  });
11604
11632
  }
11605
11633
  const renderPayload = {
11606
11634
  pathname,
11607
11635
  method,
11608
- routePattern: _optionalChain([routeMatch, 'optionalAccess', _613 => _613.route, 'optionalAccess', _614 => _614.pattern]) || null,
11609
- params: _optionalChain([routeMatch, 'optionalAccess', _615 => _615.params]) || {}
11636
+ routePattern: _optionalChain([routeMatch, 'optionalAccess', _614 => _614.route, 'optionalAccess', _615 => _615.pattern]) || null,
11637
+ params: _optionalChain([routeMatch, 'optionalAccess', _616 => _616.params]) || {}
11610
11638
  };
11611
11639
  const shouldInterceptResponse = Boolean(
11612
11640
  pm && (hasAfterResponseHook || hasHTMLTransformHook || runtimeSession && hasRuntimeAfterHook)
@@ -11628,7 +11656,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11628
11656
  emitError: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (error) => emitPluginError("response-end", error, { pathname }), "emitError")
11629
11657
  }) : void 0;
11630
11658
  try {
11631
- if (_optionalChain([middlewareManager, 'optionalAccess', _616 => _616.hasMiddleware, 'call', _617 => _617()])) {
11659
+ if (_optionalChain([middlewareManager, 'optionalAccess', _617 => _617.hasMiddleware, 'call', _618 => _618()])) {
11632
11660
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
11633
11661
  const handled = await runFarmMiddlewareWithNavigation(
11634
11662
  farmApp.getServerRenderer(),
@@ -11638,7 +11666,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11638
11666
  () => middlewareManager.execute(req, res)
11639
11667
  );
11640
11668
  if (handled) {
11641
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _618 => _618.isEnded, 'call', _619 => _619()])) {
11669
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _619 => _619.isEnded, 'call', _620 => _620()])) {
11642
11670
  const duration = Date.now() - startTime;
11643
11671
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
11644
11672
  }
@@ -11650,7 +11678,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11650
11678
  req.url || "/",
11651
11679
  `http://${req.headers.host || "localhost:3000"}`
11652
11680
  ).pathname;
11653
- const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _620 => _620.matchRoute, 'call', _621 => _621(currentPathname), 'optionalAccess', _622 => _622.route]));
11681
+ const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _621 => _621.matchRoute, 'call', _622 => _622(currentPathname), 'optionalAccess', _623 => _623.route]));
11654
11682
  await pm.runHookParallelFiltered(
11655
11683
  "beforeRequest",
11656
11684
  (plugin) => !hasLocalPageRoute || plugin.name !== _chunkYZTASLPQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
@@ -11658,8 +11686,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11658
11686
  res
11659
11687
  );
11660
11688
  }
11661
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _623 => _623.isEnded, 'call', _624 => _624()])) {
11662
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _625 => _625.isEnded, 'call', _626 => _626()])) {
11689
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _624 => _624.isEnded, 'call', _625 => _625()])) {
11690
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _626 => _626.isEnded, 'call', _627 => _627()])) {
11663
11691
  const duration = Date.now() - startTime;
11664
11692
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
11665
11693
  }
@@ -11717,25 +11745,25 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11717
11745
  if (imageModule) return imageModule;
11718
11746
  }
11719
11747
  if (_chunk6V4TDWECcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
11720
- const renderer = _optionalChain([farmApp, 'optionalAccess', _627 => _627.getConfig, 'call', _628 => _628(), 'access', _629 => _629.renderer]) || _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, options.renderer);
11721
- return generateProgrammaticRouteModule(id, _optionalChain([server, 'optionalAccess', _630 => _630.config, 'access', _631 => _631.root]) || options.root, renderer);
11748
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _628 => _628.getConfig, 'call', _629 => _629(), 'access', _630 => _630.renderer]) || _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, options.renderer);
11749
+ return generateProgrammaticRouteModule(id, _optionalChain([server, 'optionalAccess', _631 => _631.config, 'access', _632 => _632.root]) || options.root, renderer);
11722
11750
  }
11723
11751
  if (isFarmClientVirtualId(id)) {
11724
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _632 => _632.getConfig, 'call', _633 => _633()]);
11725
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _634 => _634.renderer]) || _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, options.renderer);
11726
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _635 => _635.integrations]) || options.integrations;
11727
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _636 => _636.root]) || _optionalChain([server, 'optionalAccess', _637 => _637.config, 'access', _638 => _638.root]) || process.cwd();
11728
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _639 => _639.docs]);
11752
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _633 => _633.getConfig, 'call', _634 => _634()]);
11753
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _635 => _635.renderer]) || _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, options.renderer);
11754
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _636 => _636.integrations]) || options.integrations;
11755
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _637 => _637.root]) || _optionalChain([server, 'optionalAccess', _638 => _638.config, 'access', _639 => _639.root]) || process.cwd();
11756
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _640 => _640.docs]);
11729
11757
  const adapterOwnsDocsRuntime = Boolean(
11730
- _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _640 => _640.adapter, 'optionalAccess', _641 => _641.server]) && docs.adapter.react
11758
+ _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _641 => _641.adapter, 'optionalAccess', _642 => _642.server]) && docs.adapter.react
11731
11759
  );
11732
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _642 => _642.devtools]), () => ( _chunkYJRZR7VUcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
11760
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _643 => _643.devtools]), () => ( _chunkYJRZR7VUcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
11733
11761
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
11734
- _optionalChain([docs, 'optionalAccess', _643 => _643.enabled]) ? loadFarmDocsDevRuntime() : null,
11735
- _optionalChain([docs, 'optionalAccess', _644 => _644.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
11762
+ _optionalChain([docs, 'optionalAccess', _644 => _644.enabled]) ? loadFarmDocsDevRuntime() : null,
11763
+ _optionalChain([docs, 'optionalAccess', _645 => _645.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
11736
11764
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
11737
11765
  ]);
11738
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _645 => _645.isFarmDocsSearchEnabled, 'call', _646 => _646(docs)]), () => ( false));
11766
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _646 => _646.isFarmDocsSearchEnabled, 'call', _647 => _647(docs)]), () => ( false));
11739
11767
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
11740
11768
  docsSearchEnabled,
11741
11769
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
@@ -11744,9 +11772,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11744
11772
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkQBPXNZGVcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
11745
11773
  const integrationProviders = _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) ? _chunkZ5HIWVDPcjs.getIntegrationProviders.call(void 0, integrations) : [];
11746
11774
  const isolatedHydrationMode = resolveFarmIsolatedClientHydrationMode(
11747
- _optionalChain([resolvedConfig, 'optionalAccess', _647 => _647.experimental, 'optionalAccess', _648 => _648.isolatedClientHydration]),
11775
+ _optionalChain([resolvedConfig, 'optionalAccess', _648 => _648.experimental, 'optionalAccess', _649 => _649.isolatedClientHydration]),
11748
11776
  {
11749
- serverComponents: _optionalChain([resolvedConfig, 'optionalAccess', _649 => _649.experimental, 'optionalAccess', _650 => _650.serverComponents]) === true,
11777
+ serverComponents: _optionalChain([resolvedConfig, 'optionalAccess', _650 => _650.experimental, 'optionalAccess', _651 => _651.serverComponents]) === true,
11750
11778
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
11751
11779
  }
11752
11780
  );
@@ -11754,22 +11782,22 @@ window.__FARM_MANIFEST__ = ${inlineValue({
11754
11782
  integrationProviders,
11755
11783
  [
11756
11784
  ..._chunkZ5HIWVDPcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
11757
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _651 => _651.getFarmDocsDocumentNavigationMatchers, 'call', _652 => _652(docs)]), () => ( []))
11785
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _652 => _652.getFarmDocsDocumentNavigationMatchers, 'call', _653 => _653(docs)]), () => ( []))
11758
11786
  ],
11759
11787
  generatedDocsSearchRuntime,
11760
11788
  `${generatedDevtoolsClientRuntime}
11761
11789
  ${generatedDevIndicatorsClientRuntime}`,
11762
- _optionalChain([resolvedConfig, 'optionalAccess', _653 => _653.plugins]) || [],
11790
+ _optionalChain([resolvedConfig, 'optionalAccess', _654 => _654.plugins]) || [],
11763
11791
  root,
11764
- _optionalChain([resolvedConfig, 'optionalAccess', _654 => _654.srcDir]) || options.srcDir || "src",
11765
- _optionalChain([resolvedConfig, 'optionalAccess', _655 => _655.publicRuntimeConfig]) || options.publicRuntimeConfig,
11766
- _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _656 => _656.adapter, 'optionalAccess', _657 => _657.react]) : void 0,
11792
+ _optionalChain([resolvedConfig, 'optionalAccess', _655 => _655.srcDir]) || options.srcDir || "src",
11793
+ _optionalChain([resolvedConfig, 'optionalAccess', _656 => _656.publicRuntimeConfig]) || options.publicRuntimeConfig,
11794
+ _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _657 => _657.adapter, 'optionalAccess', _658 => _658.react]) : void 0,
11767
11795
  renderer,
11768
- isolatedHydrationMode === "enabled" || _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _658 => _658.getRouteManager, 'call', _659 => _659(), 'access', _660 => _660.getIsolatedClientBoundaryModules, 'call', _661 => _661(root)])))), 'optionalAccess', _662 => _662.size]) > 0,
11769
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _663 => _663.trailingSlash]), () => ( false)),
11770
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _664 => _664.basePath]), () => ( "/")),
11796
+ isolatedHydrationMode === "enabled" || _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _659 => _659.getRouteManager, 'call', _660 => _660(), 'access', _661 => _661.getIsolatedClientBoundaryModules, 'call', _662 => _662(root)])))), 'optionalAccess', _663 => _663.size]) > 0,
11797
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _664 => _664.trailingSlash]), () => ( false)),
11798
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _665 => _665.basePath]), () => ( "/")),
11771
11799
  generateClientCachePersistenceCode(
11772
- resolveFarmClientCacheAdapterEntry(root, _optionalChain([resolvedConfig, 'optionalAccess', _665 => _665.cache]))
11800
+ resolveFarmClientCacheAdapterEntry(root, _optionalChain([resolvedConfig, 'optionalAccess', _666 => _666.cache]))
11773
11801
  ),
11774
11802
  _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) ? _chunk75WGQVQAcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0
11775
11803
  );
@@ -11778,7 +11806,7 @@ ${generatedDevIndicatorsClientRuntime}`,
11778
11806
  return generateServerCode();
11779
11807
  }
11780
11808
  if (id === "/@farm/manifest") {
11781
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _666 => _666.getRouteManager, 'call', _667 => _667()]);
11809
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _667 => _667.getRouteManager, 'call', _668 => _668()]);
11782
11810
  if (!routeManager) {
11783
11811
  return `
11784
11812
  export const getManifest = () => ({
@@ -11793,7 +11821,7 @@ export const getManifest = () => ({
11793
11821
  const manifest = routeManager.generateClientManifest(server.config.root);
11794
11822
  const globalStylesheetHref = resolveDevGlobalStylesheetHref(
11795
11823
  server.config.root,
11796
- _optionalChain([farmApp, 'optionalAccess', _668 => _668.getConfig, 'call', _669 => _669(), 'access', _670 => _670.srcDir])
11824
+ _optionalChain([farmApp, 'optionalAccess', _669 => _669.getConfig, 'call', _670 => _670(), 'access', _671 => _671.srcDir])
11797
11825
  );
11798
11826
  const fullManifest = {
11799
11827
  clientEntry: "/@farm/client.js",
@@ -11844,17 +11872,17 @@ export const manifest = getManifest();
11844
11872
  }
11845
11873
  },
11846
11874
  async transform(code, id, transformOptions) {
11847
- if (!_optionalChain([transformOptions, 'optionalAccess', _671 => _671.ssr])) {
11848
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _672 => _672.getConfig, 'call', _673 => _673()]), () => ( options));
11849
- if (_optionalChain([currentConfig, 'access', _674 => _674.experimental, 'optionalAccess', _675 => _675.serverActions]) !== true || !serverFnTransformActive) {
11875
+ if (!_optionalChain([transformOptions, 'optionalAccess', _672 => _672.ssr])) {
11876
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _673 => _673.getConfig, 'call', _674 => _674()]), () => ( options));
11877
+ if (_optionalChain([currentConfig, 'access', _675 => _675.experimental, 'optionalAccess', _676 => _676.serverActions]) !== true || !serverFnTransformActive) {
11850
11878
  const violation = findClientServerFnViolation(code, id);
11851
11879
  if (violation) {
11852
11880
  this.error(formatServerFnBoundaryError(violation, id));
11853
11881
  }
11854
11882
  }
11855
11883
  }
11856
- if (!_optionalChain([transformOptions, 'optionalAccess', _676 => _676.ssr]) && shouldInspectClientBoundary(id, code)) {
11857
- warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _677 => _677.getConfig, 'call', _678 => _678()]), () => ( options)));
11884
+ if (!_optionalChain([transformOptions, 'optionalAccess', _677 => _677.ssr]) && shouldInspectClientBoundary(id, code)) {
11885
+ warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _678 => _678.getConfig, 'call', _679 => _679()]), () => ( options)));
11858
11886
  }
11859
11887
  if (typeof imageImports.transform === "function") {
11860
11888
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -11869,13 +11897,13 @@ export const manifest = getManifest();
11869
11897
  id,
11870
11898
  transformOptions
11871
11899
  );
11872
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _679 => _679.code, 'optionalAccess', _680 => _680.toString, 'call', _681 => _681()]);
11900
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _680 => _680.code, 'optionalAccess', _681 => _681.toString, 'call', _682 => _682()]);
11873
11901
  if (fontCode) {
11874
11902
  transformedCode = fontCode;
11875
11903
  transformed = true;
11876
11904
  }
11877
11905
  }
11878
- if (_optionalChain([transformOptions, 'optionalAccess', _682 => _682.ssr]) && server) {
11906
+ if (_optionalChain([transformOptions, 'optionalAccess', _683 => _683.ssr]) && server) {
11879
11907
  const rewrittenImports = rewriteEarlySsrRelativeImports({
11880
11908
  code: transformedCode,
11881
11909
  id,
@@ -11895,12 +11923,12 @@ export const manifest = getManifest();
11895
11923
  }
11896
11924
  transformedCode = stripUseClientDirective(transformedCode);
11897
11925
  transformed = true;
11898
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _683 => _683.getConfig, 'call', _684 => _684()]), () => ( options));
11926
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _684 => _684.getConfig, 'call', _685 => _685()]), () => ( options));
11899
11927
  let isolatedModuleReference = null;
11900
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _685 => _685.config, 'access', _686 => _686.root]) || process.cwd();
11928
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _686 => _686.config, 'access', _687 => _687.root]) || process.cwd();
11901
11929
  const cleanId = id.split("?", 1)[0];
11902
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _687 => _687.getRouteManager, 'call', _688 => _688(), 'access', _689 => _689.getIsolatedClientBoundaryModules, 'call', _690 => _690(root)])));
11903
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _691 => _691.has, 'call', _692 => _692(path17.resolve(cleanId))]) === true;
11930
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _688 => _688.getRouteManager, 'call', _689 => _689(), 'access', _690 => _690.getIsolatedClientBoundaryModules, 'call', _691 => _691(root)])));
11931
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _692 => _692.has, 'call', _693 => _693(path17.resolve(cleanId))]) === true;
11904
11932
  if (_chunkPSV6XKPOcjs.isReactRenderer.call(void 0, _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && isIsolatableClientBoundarySource(clientBoundarySource)) {
11905
11933
  isolatedModuleReference = _chunk5QIKR7RRcjs.toViteModuleId.call(void 0, cleanId, root);
11906
11934
  const transformedBoundary = transformIsolatedClientBoundaryModule({
@@ -11937,7 +11965,7 @@ export const manifest = getManifest();
11937
11965
  );
11938
11966
  return;
11939
11967
  }` : "";
11940
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _693 => _693.ssr]) || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
11968
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _694 => _694.ssr]) || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
11941
11969
  if (import.meta.hot) {
11942
11970
  import.meta.hot.accept((newModule) => {
11943
11971
  ${isolatedHmrUpdate}
@@ -11991,14 +12019,14 @@ if (import.meta.hot) {
11991
12019
  }
11992
12020
  _chunk5QIKR7RRcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
11993
12021
  _chunk5QIKR7RRcjs.logger.info("Pre-rendering SSG pages...");
11994
- const outDir = path17.join(_optionalChain([server, 'optionalAccess', _694 => _694.config, 'access', _695 => _695.root]) || process.cwd(), options.outDir || "dist");
12022
+ const outDir = path17.join(_optionalChain([server, 'optionalAccess', _695 => _695.config, 'access', _696 => _696.root]) || process.cwd(), options.outDir || "dist");
11995
12023
  const clientDir = path17.join(outDir, "client");
11996
12024
  for (const page of ssgPages) {
11997
12025
  try {
11998
12026
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
11999
12027
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
12000
12028
  const mod = await routeManager.loadRouteModule(page.filePath);
12001
- if (!_optionalChain([mod, 'optionalAccess', _696 => _696.default])) return;
12029
+ if (!_optionalChain([mod, 'optionalAccess', _697 => _697.default])) return;
12002
12030
  const { layouts } = routeManager.matchRoute(page.urlPath);
12003
12031
  const layoutModules = await Promise.all(
12004
12032
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -12030,7 +12058,7 @@ if (import.meta.hot) {
12030
12058
  const i18nSnapshot = _chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0, );
12031
12059
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
12032
12060
  const fullHtml = `<!DOCTYPE html>
12033
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _697 => _697.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
12061
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _698 => _698.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
12034
12062
  <head>
12035
12063
  <meta charset="utf-8">
12036
12064
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -12088,23 +12116,23 @@ if (import.meta.hot) {
12088
12116
  });
12089
12117
  }
12090
12118
  }
12091
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _698 => _698.getConfig, 'call', _699 => _699()]);
12119
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _699 => _699.getConfig, 'call', _700 => _700()]);
12092
12120
  const normalizedFile = file.replace(/\\/g, "/");
12093
- if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkY4YMF2NQcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
12121
+ if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
12094
12122
  (appDir) => normalizedFile.startsWith(`${_chunk5QIKR7RRcjs.toPosixPath.call(void 0, appDir)}/api/`)
12095
12123
  )) {
12096
12124
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
12097
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _700 => _700(`updated ${file}`)]);
12125
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _701 => _701(`updated ${file}`)]);
12098
12126
  server2.ws.send({ type: "full-reload", path: "*" });
12099
12127
  return [];
12100
12128
  }
12101
- const currentSrcRoot = currentFarmConfig ? _chunkY4YMF2NQcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path17.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
12129
+ const currentSrcRoot = currentFarmConfig ? _chunkVPTDD5XFcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path17.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
12102
12130
  if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunk6V4TDWECcjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
12103
12131
  logUpdate("PAGE", `updated ${path17.basename(file)}`);
12104
12132
  for (const mod of modules) {
12105
12133
  server2.moduleGraph.invalidateModule(mod);
12106
12134
  }
12107
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _701 => _701(`updated ${file}`)]);
12135
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _702 => _702(`updated ${file}`)]);
12108
12136
  server2.ws.send({
12109
12137
  type: "full-reload",
12110
12138
  path: "*"
@@ -12117,17 +12145,17 @@ if (import.meta.hot) {
12117
12145
  for (const mod of modules) {
12118
12146
  server2.moduleGraph.invalidateModule(mod);
12119
12147
  }
12120
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _702 => _702(`updated ${file}`)]);
12148
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _703 => _703(`updated ${file}`)]);
12121
12149
  server2.ws.send({
12122
12150
  type: "full-reload",
12123
12151
  path: "*"
12124
12152
  });
12125
12153
  return [];
12126
12154
  }
12127
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _703 => _703.experimental, 'optionalAccess', _704 => _704.isolatedClientHydration]);
12128
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _705 => _705.getRouteManager, 'call', _706 => _706()]);
12155
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _704 => _704.experimental, 'optionalAccess', _705 => _705.isolatedClientHydration]);
12156
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _706 => _706.getRouteManager, 'call', _707 => _707()]);
12129
12157
  const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
12130
- const tracksAsyncOwnerIslands = _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _707 => _707.renderer])) && planRouteManager !== void 0;
12158
+ const tracksAsyncOwnerIslands = _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _708 => _708.renderer])) && planRouteManager !== void 0;
12131
12159
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
12132
12160
  const routeManager = planRouteManager;
12133
12161
  if (routeManager) {
@@ -12187,7 +12215,7 @@ if (import.meta.hot) {
12187
12215
  }
12188
12216
  return [];
12189
12217
  }
12190
- _optionalChain([farmApp, 'optionalAccess', _708 => _708.getRouteManager, 'call', _709 => _709(), 'access', _710 => _710.invalidateClientManifest, 'call', _711 => _711()]);
12218
+ _optionalChain([farmApp, 'optionalAccess', _709 => _709.getRouteManager, 'call', _710 => _710(), 'access', _711 => _711.invalidateClientManifest, 'call', _712 => _712()]);
12191
12219
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
12192
12220
  if (manifestModule) {
12193
12221
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -12556,12 +12584,12 @@ async function parseRouteModuleProps2(routeModule, input) {
12556
12584
  }
12557
12585
  const schemas = routeModule.__farmRouteSchemas;
12558
12586
  const params = parseRouteModuleSchema2(
12559
- _optionalChain([schemas, 'optionalAccess', _712 => _712.params]),
12587
+ _optionalChain([schemas, 'optionalAccess', _713 => _713.params]),
12560
12588
  input.props.params,
12561
12589
  "params",
12562
12590
  input.routePath
12563
12591
  );
12564
- const search = parseRouteModuleSchema2(_optionalChain([schemas, 'optionalAccess', _713 => _713.search]), input.search, "search", input.routePath);
12592
+ const search = parseRouteModuleSchema2(_optionalChain([schemas, 'optionalAccess', _714 => _714.search]), input.search, "search", input.routePath);
12565
12593
  return {
12566
12594
  ...input.props,
12567
12595
  params,
@@ -14157,8 +14185,8 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, generateClientManifest, "generateClientMan
14157
14185
  async function defineConfig(config = {}) {
14158
14186
  const tailwindVitePlugin = await loadTailwindVitePlugin();
14159
14187
  const appRoot = path17.resolve(config.root || process.cwd());
14160
- if (_optionalChain([config, 'access', _714 => _714.extends, 'optionalAccess', _715 => _715.length])) {
14161
- const { config: layeredConfig } = await import("./layers-E4WPJNY5.cjs").then(
14188
+ if (_optionalChain([config, 'access', _715 => _715.extends, 'optionalAccess', _716 => _716.length])) {
14189
+ const { config: layeredConfig } = await import("./layers-4PNE2HOY.cjs").then(
14162
14190
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
14163
14191
  root: appRoot,
14164
14192
  mode: process.env.NODE_ENV === "production" ? "production" : "development"
@@ -14167,6 +14195,7 @@ async function defineConfig(config = {}) {
14167
14195
  config = layeredConfig;
14168
14196
  }
14169
14197
  config.renderer = _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, config.renderer);
14198
+ config.images = resolveFarmImageProviderForRuntime(config.images, { root: appRoot, dev: true });
14170
14199
  const rendererVitePlugins = await _chunkPSV6XKPOcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
14171
14200
  ssr: true
14172
14201
  });
@@ -14257,13 +14286,13 @@ async function defineConfig(config = {}) {
14257
14286
  if (!serverStarted) {
14258
14287
  serverStarted = true;
14259
14288
  const elapsed = Date.now() - startTime;
14260
- const address = _optionalChain([server, 'access', _716 => _716.httpServer, 'optionalAccess', _717 => _717.address, 'call', _718 => _718()]);
14289
+ const address = _optionalChain([server, 'access', _717 => _717.httpServer, 'optionalAccess', _718 => _718.address, 'call', _719 => _719()]);
14261
14290
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
14262
14291
  const hostConfig = server.config.server.host;
14263
14292
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
14264
14293
  console.log("");
14265
14294
  console.log(
14266
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk2HCEC2YOcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
14295
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkVXCA7RZPcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
14267
14296
  );
14268
14297
  console.log("");
14269
14298
  console.log(
@@ -14311,7 +14340,7 @@ async function defineConfig(config = {}) {
14311
14340
  ...createFarmClientOptimizeDepsConfig(
14312
14341
  createFarmClientOptimizeDepsEntries(
14313
14342
  appRoot,
14314
- _chunkY4YMF2NQcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
14343
+ _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
14315
14344
  ),
14316
14345
  config.renderer
14317
14346
  ),
@@ -14351,7 +14380,7 @@ async function defineConfig(config = {}) {
14351
14380
  dedupe: [...config.renderer.dedupe || []],
14352
14381
  // Stub out problematic server-only modules during dev mode
14353
14382
  alias: {
14354
- ..._chunkY4YMF2NQcjs.getFarmLayerAliases.call(void 0, config.layers),
14383
+ ..._chunkVPTDD5XFcjs.getFarmLayerAliases.call(void 0, config.layers),
14355
14384
  ...createFarmSourceAlias(appRoot, config.srcDir),
14356
14385
  // Nitro internals that should not be resolved in browser
14357
14386
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
@@ -14415,4 +14444,6 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, defineConfig, "defineConfig");
14415
14444
 
14416
14445
 
14417
14446
 
14418
- exports.getFarmClientHydrationPlanOptions = getFarmClientHydrationPlanOptions; exports.describeSuppressedAsyncHydration = describeSuppressedAsyncHydration; exports.resolveFarmIsolatedClientHydrationMode = resolveFarmIsolatedClientHydrationMode; exports.getClientModuleMetadata = getClientModuleMetadata; exports.getClientModuleHydrationPlan = getClientModuleHydrationPlan; exports.createMarkdownPageHydrationPlanner = createMarkdownPageHydrationPlanner; exports.enforceFarmIsolatedHydrationRouteBudget = enforceFarmIsolatedHydrationRouteBudget; exports.RouteManager = RouteManager; exports.resolveFarmNotFoundComponentPath = resolveFarmNotFoundComponentPath; exports.farmFontImportsPlugin = farmFontImportsPlugin; exports.mergeFarmFontCss = mergeFarmFontCss; exports.DEFAULT_NOT_FOUND_STYLES = DEFAULT_NOT_FOUND_STYLES; exports.generateFarmIntegrationProviderClientCode = generateFarmIntegrationProviderClientCode; exports.generateFarmIntegrationProviderServerModules = generateFarmIntegrationProviderServerModules; exports.ServerRenderer = ServerRenderer; exports.FarmApp = FarmApp; exports.createFarmApp = createFarmApp; exports.FarmPluginOptionsError = FarmPluginOptionsError; exports.farmPluginMayAffectRuntimePath = farmPluginMayAffectRuntimePath; exports.loadTailwindVitePlugin = loadTailwindVitePlugin; exports.generateFarmClientPluginEntryCode = generateFarmClientPluginEntryCode; exports.resolveFarmClientCacheAdapterEntry = resolveFarmClientCacheAdapterEntry; exports.generateClientCachePersistenceCode = generateClientCachePersistenceCode; exports.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE = FARM_LAYOUT_ELEMENT_CLIENT_SOURCE; exports.createFarmClientOptimizeDepsEntries = createFarmClientOptimizeDepsEntries; exports.createFarmClientOptimizeDepsConfig = createFarmClientOptimizeDepsConfig; exports.createFarmSourceAlias = createFarmSourceAlias; exports.mergeFarmViteConfig = mergeFarmViteConfig; exports.mergeFarmProductionViteConfig = mergeFarmProductionViteConfig; exports.createFarmThemeCssPlugin = createFarmThemeCssPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig; exports.FARM_NODE_RESPONSE_END_PENDING = FARM_NODE_RESPONSE_END_PENDING; exports.FarmRuntimeShutdownError = FarmRuntimeShutdownError; exports.PluginManager = PluginManager; exports.definePlugin = definePlugin;
14447
+
14448
+
14449
+ exports.getFarmClientHydrationPlanOptions = getFarmClientHydrationPlanOptions; exports.describeSuppressedAsyncHydration = describeSuppressedAsyncHydration; exports.resolveFarmIsolatedClientHydrationMode = resolveFarmIsolatedClientHydrationMode; exports.getClientModuleMetadata = getClientModuleMetadata; exports.getClientModuleHydrationPlan = getClientModuleHydrationPlan; exports.createMarkdownPageHydrationPlanner = createMarkdownPageHydrationPlanner; exports.enforceFarmIsolatedHydrationRouteBudget = enforceFarmIsolatedHydrationRouteBudget; exports.RouteManager = RouteManager; exports.resolveFarmNotFoundComponentPath = resolveFarmNotFoundComponentPath; exports.farmFontImportsPlugin = farmFontImportsPlugin; exports.mergeFarmFontCss = mergeFarmFontCss; exports.DEFAULT_NOT_FOUND_STYLES = DEFAULT_NOT_FOUND_STYLES; exports.generateFarmIntegrationProviderClientCode = generateFarmIntegrationProviderClientCode; exports.generateFarmIntegrationProviderServerModules = generateFarmIntegrationProviderServerModules; exports.ServerRenderer = ServerRenderer; exports.FarmApp = FarmApp; exports.createFarmApp = createFarmApp; exports.FarmPluginOptionsError = FarmPluginOptionsError; exports.farmPluginMayAffectRuntimePath = farmPluginMayAffectRuntimePath; exports.loadTailwindVitePlugin = loadTailwindVitePlugin; exports.SHARP_INSTALL_HINT = SHARP_INSTALL_HINT; exports.resolveFarmImageProviderForRuntime = resolveFarmImageProviderForRuntime; exports.generateFarmClientPluginEntryCode = generateFarmClientPluginEntryCode; exports.resolveFarmClientCacheAdapterEntry = resolveFarmClientCacheAdapterEntry; exports.generateClientCachePersistenceCode = generateClientCachePersistenceCode; exports.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE = FARM_LAYOUT_ELEMENT_CLIENT_SOURCE; exports.createFarmClientOptimizeDepsEntries = createFarmClientOptimizeDepsEntries; exports.createFarmClientOptimizeDepsConfig = createFarmClientOptimizeDepsConfig; exports.createFarmSourceAlias = createFarmSourceAlias; exports.mergeFarmViteConfig = mergeFarmViteConfig; exports.mergeFarmProductionViteConfig = mergeFarmProductionViteConfig; exports.createFarmThemeCssPlugin = createFarmThemeCssPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig; exports.FARM_NODE_RESPONSE_END_PENDING = FARM_NODE_RESPONSE_END_PENDING; exports.FarmRuntimeShutdownError = FarmRuntimeShutdownError; exports.PluginManager = PluginManager; exports.definePlugin = definePlugin;