@farm.js/core 0.1.15 → 0.1.17

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 (180) hide show
  1. package/dist/agent-runtime.d.mts +5 -2
  2. package/dist/agent-runtime.d.ts +5 -2
  3. package/dist/api/client.cjs +62 -28
  4. package/dist/api/client.d.mts +3 -2
  5. package/dist/api/client.d.ts +3 -2
  6. package/dist/api/client.mjs +3 -3
  7. package/dist/api/route-manager.cjs +69 -32
  8. package/dist/api/route-manager.d.mts +5 -2
  9. package/dist/api/route-manager.d.ts +5 -2
  10. package/dist/api/route-manager.mjs +5 -5
  11. package/dist/api/runtime.cjs +65 -29
  12. package/dist/api/runtime.d.mts +3 -2
  13. package/dist/api/runtime.d.ts +3 -2
  14. package/dist/api/runtime.mjs +6 -3
  15. package/dist/{api-client-C8d7BZNp.d.mts → api-client-Cx54IR5g.d.mts} +2 -1
  16. package/dist/{api-client-BWrEbxfO.d.ts → api-client-DykpaKcY.d.ts} +2 -1
  17. package/dist/api.cjs +106 -33
  18. package/dist/api.d.mts +7 -4
  19. package/dist/api.d.ts +7 -4
  20. package/dist/api.mjs +8 -8
  21. package/dist/{app-wIYse61b.d.ts → app-BHY_10Lm.d.ts} +3 -3
  22. package/dist/{app-B3nVSjen.d.mts → app-BMk0do23.d.mts} +3 -3
  23. package/dist/app-markdown.d.mts +6 -3
  24. package/dist/app-markdown.d.ts +6 -3
  25. package/dist/app-markdown.mjs +3 -3
  26. package/dist/cache.cjs +62 -28
  27. package/dist/cache.d.mts +11 -1
  28. package/dist/cache.d.ts +11 -1
  29. package/dist/cache.mjs +1 -1
  30. package/dist/{chunk-FOGLGRDS.mjs → chunk-4OOBRCJX.mjs} +122 -8
  31. package/dist/{chunk-JRF3C33L.mjs → chunk-56DAX2BE.mjs} +172 -53
  32. package/dist/{chunk-B76DT5Y6.mjs → chunk-57J3Y7Y3.mjs} +1 -1
  33. package/dist/{chunk-MOQNHLTS.mjs → chunk-5QOEPUYE.mjs} +5 -2
  34. package/dist/{chunk-HKLRP3BN.mjs → chunk-5SPPCN5J.mjs} +1 -1
  35. package/dist/{chunk-LUC2FAGW.mjs → chunk-6VQIKZZO.mjs} +1 -1
  36. package/dist/{chunk-7ZWL7XOU.mjs → chunk-76DG3LF3.mjs} +1 -1
  37. package/dist/{chunk-EWDK36MM.mjs → chunk-A72YEUZ3.mjs} +1 -1
  38. package/dist/{chunk-ZHOIQC6U.mjs → chunk-ATERBVHQ.mjs} +2 -2
  39. package/dist/{chunk-27JNCYEK.mjs → chunk-EN7WTEAY.mjs} +2 -2
  40. package/dist/{chunk-IGO2HEV7.mjs → chunk-F6SJAKFJ.mjs} +62 -28
  41. package/dist/{chunk-GSDIZACQ.mjs → chunk-FG5H2VCJ.mjs} +2 -2
  42. package/dist/{chunk-LZK5CXDW.mjs → chunk-KLSSO6YD.mjs} +2 -2
  43. package/dist/{chunk-KUO3GBPK.mjs → chunk-L6V3P73N.mjs} +1 -1
  44. package/dist/{chunk-FBHGHMOA.mjs → chunk-MVIWBEJF.mjs} +37 -27
  45. package/dist/{chunk-KTGFMHET.mjs → chunk-N6UROPT7.mjs} +1 -1
  46. package/dist/{chunk-NDD2YVGU.mjs → chunk-NRVGEI5I.mjs} +10 -3
  47. package/dist/{chunk-GNTPTTLA.mjs → chunk-QGVJVSNX.mjs} +5 -5
  48. package/dist/{chunk-6SCB2MXB.mjs → chunk-SXHV42UQ.mjs} +16 -1
  49. package/dist/{chunk-OWTIOHON.mjs → chunk-SYGGPS4A.mjs} +2 -2
  50. package/dist/{chunk-NC333MFA.mjs → chunk-TSWW5BVH.mjs} +7 -4
  51. package/dist/{chunk-LK6FGAQR.mjs → chunk-UDBJCUPA.mjs} +7 -4
  52. package/dist/{chunk-NJ47VORC.mjs → chunk-UTBVHYS3.mjs} +2 -2
  53. package/dist/{chunk-76MNRHTS.mjs → chunk-UUYF3CHN.mjs} +2 -2
  54. package/dist/{chunk-S3QW3BIS.mjs → chunk-WD4YXVLV.mjs} +99 -6
  55. package/dist/{chunk-W7IVHTOP.mjs → chunk-WD5PNSOB.mjs} +16 -3
  56. package/dist/{chunk-DPZUDPVJ.mjs → chunk-XP777LRD.mjs} +1 -1
  57. package/dist/{chunk-KATQ6I56.mjs → chunk-XWAYMDLB.mjs} +1 -1
  58. package/dist/{chunk-UE75PB52.mjs → chunk-YD4J4XCI.mjs} +1 -1
  59. package/dist/{chunk-Q3MDL7TM.mjs → chunk-ZCNJKLA2.mjs} +30 -11
  60. package/dist/{client-plugins-CslwYp3E.d.ts → client-plugins-C089bQhN.d.ts} +16 -4
  61. package/dist/{client-plugins-C1EgdoJM.d.mts → client-plugins-JXXmZliS.d.mts} +16 -4
  62. package/dist/client-plugins.d.mts +5 -2
  63. package/dist/client-plugins.d.ts +5 -2
  64. package/dist/client.cjs +62 -28
  65. package/dist/client.d.mts +8 -7
  66. package/dist/client.d.ts +8 -7
  67. package/dist/client.mjs +6 -6
  68. package/dist/config.d.mts +5 -2
  69. package/dist/config.d.ts +5 -2
  70. package/dist/cron.mjs +2 -2
  71. package/dist/{devtools-PCGEBRSC.mjs → devtools-UFVTMQX5.mjs} +7 -7
  72. package/dist/docs.cjs +83 -4
  73. package/dist/docs.mjs +9 -9
  74. package/dist/{route-CHBaW55F.d.ts → endpoint-1zA994xL.d.ts} +3 -128
  75. package/dist/{route-C6UClI1z.d.mts → endpoint-DAc96i93.d.mts} +3 -128
  76. package/dist/env.cjs +135 -8
  77. package/dist/env.d.mts +22 -2
  78. package/dist/env.d.ts +22 -2
  79. package/dist/env.mjs +4 -1
  80. package/dist/index.cjs +516 -105
  81. package/dist/index.d.mts +16 -15
  82. package/dist/index.d.ts +16 -15
  83. package/dist/index.mjs +46 -34
  84. package/dist/integrations.d.mts +5 -2
  85. package/dist/integrations.d.ts +5 -2
  86. package/dist/internal/app-markdown-runtime.d.mts +5 -2
  87. package/dist/internal/app-markdown-runtime.d.ts +5 -2
  88. package/dist/internal/app-markdown-runtime.mjs +2 -2
  89. package/dist/internal/build-runtime.cjs +600 -284
  90. package/dist/internal/build-runtime.d.mts +7 -4
  91. package/dist/internal/build-runtime.d.ts +7 -4
  92. package/dist/internal/build-runtime.mjs +23 -23
  93. package/dist/internal/cli-runtime.cjs +143 -33
  94. package/dist/internal/cli-runtime.mjs +13 -13
  95. package/dist/internal/client-error-overlay.cjs +1 -1
  96. package/dist/internal/client-error-overlay.mjs +1 -1
  97. package/dist/internal/compression-runtime.d.mts +5 -2
  98. package/dist/internal/compression-runtime.d.ts +5 -2
  99. package/dist/internal/config-runtime.cjs +80 -4
  100. package/dist/internal/config-runtime.d.mts +6 -3
  101. package/dist/internal/config-runtime.d.ts +6 -3
  102. package/dist/internal/config-runtime.mjs +7 -7
  103. package/dist/internal/product-telemetry-runtime.cjs +1 -1
  104. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  105. package/dist/internal/production-runtime.cjs +101 -41
  106. package/dist/internal/production-runtime.d.mts +11 -8
  107. package/dist/internal/production-runtime.d.ts +11 -8
  108. package/dist/internal/production-runtime.mjs +6 -6
  109. package/dist/markdown.cjs +16 -1
  110. package/dist/markdown.mjs +1 -1
  111. package/dist/{metadata-BsUcOEXg.d.ts → metadata-BcNJP4fq.d.ts} +1 -1
  112. package/dist/{metadata-B1bxCPUY.d.mts → metadata-C1Z9vLbb.d.mts} +1 -1
  113. package/dist/middleware.cjs +10 -3
  114. package/dist/middleware.d.mts +7 -4
  115. package/dist/middleware.d.ts +7 -4
  116. package/dist/middleware.mjs +4 -4
  117. package/dist/{nitro-ICBP5APY.mjs → nitro-CVZ36JM5.mjs} +8 -5
  118. package/dist/plugin.cjs +358 -106
  119. package/dist/plugin.d.mts +5 -2
  120. package/dist/plugin.d.ts +5 -2
  121. package/dist/plugin.mjs +19 -19
  122. package/dist/{production-runtime-BDllolVh.d.mts → production-runtime-jcrTlRTb.d.mts} +1 -1
  123. package/dist/{production-runtime-CsNn2-zx.d.ts → production-runtime-oKmC0WU-.d.ts} +1 -1
  124. package/dist/{render-plan-CNUlzylR.d.mts → render-plan-BLIfc4jt.d.mts} +1 -1
  125. package/dist/{render-plan-EG4hNFjy.d.ts → render-plan-DOB9cV-h.d.ts} +1 -1
  126. package/dist/renderer-client.cjs +62 -28
  127. package/dist/renderer-client.d.mts +5 -4
  128. package/dist/renderer-client.d.ts +5 -4
  129. package/dist/renderer-client.mjs +3 -3
  130. package/dist/{request-Blh_f7Z3.d.mts → request-Cr53NRHr.d.mts} +1 -1
  131. package/dist/{request-DsVSQVfD.d.ts → request-Dt2gNuQD.d.ts} +1 -1
  132. package/dist/request.d.mts +6 -3
  133. package/dist/request.d.ts +6 -3
  134. package/dist/route-B0XrsrFk.d.mts +128 -0
  135. package/dist/route-DOEpbyWZ.d.ts +128 -0
  136. package/dist/{route-rendering-hUETRCbM.d.ts → route-rendering-CWYd8Mv1.d.ts} +1 -1
  137. package/dist/{route-rendering-LT4XSoQK.d.mts → route-rendering-CeFBEAoZ.d.mts} +1 -1
  138. package/dist/routes.cjs +68 -31
  139. package/dist/routes.d.mts +5 -3
  140. package/dist/routes.d.ts +5 -3
  141. package/dist/routes.mjs +2 -2
  142. package/dist/server-fn-client.d.mts +3 -2
  143. package/dist/server-fn-client.d.ts +3 -2
  144. package/dist/server-fn.cjs +212 -32
  145. package/dist/server-fn.d.mts +72 -1
  146. package/dist/server-fn.d.ts +72 -1
  147. package/dist/server-fn.mjs +13 -2
  148. package/dist/server-plugins.d.mts +6 -3
  149. package/dist/server-plugins.d.ts +6 -3
  150. package/dist/server-query-client.cjs +62 -28
  151. package/dist/server-query-client.d.mts +1 -0
  152. package/dist/server-query-client.d.ts +1 -0
  153. package/dist/server-query-client.mjs +4 -4
  154. package/dist/server-query.cjs +131 -32
  155. package/dist/server-query.d.mts +6 -1
  156. package/dist/server-query.d.ts +6 -1
  157. package/dist/server-query.mjs +4 -3
  158. package/dist/server.cjs +393 -84
  159. package/dist/server.d.mts +9 -8
  160. package/dist/server.d.ts +9 -8
  161. package/dist/server.mjs +22 -22
  162. package/dist/{spa-router-csKR9Ebj.d.mts → spa-router-CQWiYGxS.d.mts} +2 -2
  163. package/dist/{spa-router-Y_2FSJQK.d.ts → spa-router-Wjiw-8hB.d.ts} +2 -2
  164. package/dist/testing.cjs +73 -32
  165. package/dist/testing.d.mts +5 -3
  166. package/dist/testing.d.ts +5 -3
  167. package/dist/testing.mjs +11 -7
  168. package/dist/{utils-jISOE9SD.d.ts → utils-B0XJmG_b.d.ts} +1 -1
  169. package/dist/{utils-DR2wfZAn.d.mts → utils-uUxF0K0P.d.mts} +1 -1
  170. package/dist/version.cjs +1 -1
  171. package/dist/version.mjs +1 -1
  172. package/dist/vite.cjs +500 -252
  173. package/dist/vite.d.mts +5 -2
  174. package/dist/vite.d.ts +5 -2
  175. package/dist/vite.mjs +19 -19
  176. package/dist/workflows.mjs +2 -2
  177. package/package.json +2 -2
  178. package/dist/{chunk-VO5SCWF5.mjs → chunk-BNGS6KJ6.mjs} +0 -0
  179. package/dist/{chunk-MUUZJLCI.mjs → chunk-EGJDUF4Q.mjs} +3 -3
  180. package/dist/{chunk-4L7SZOHZ.mjs → chunk-YHOCRI4H.mjs} +3 -3
@@ -3599,6 +3599,19 @@ function normalizeMarkdownRoute(route) {
3599
3599
  }
3600
3600
  __name(normalizeMarkdownRoute, "normalizeMarkdownRoute");
3601
3601
 
3602
+ // src/utils/runtime-env.ts
3603
+ function getFarmRuntimeBindings() {
3604
+ const runtimeBindings = globalThis.__env__;
3605
+ return runtimeBindings && typeof runtimeBindings === "object" ? runtimeBindings : void 0;
3606
+ }
3607
+ __name(getFarmRuntimeBindings, "getFarmRuntimeBindings");
3608
+ function readFarmEnvironmentValue(name) {
3609
+ const runtimeValue = getFarmRuntimeBindings()?.[name];
3610
+ if (typeof runtimeValue === "string") return runtimeValue;
3611
+ return typeof process !== "undefined" ? process.env?.[name] : void 0;
3612
+ }
3613
+ __name(readFarmEnvironmentValue, "readFarmEnvironmentValue");
3614
+
3602
3615
  // src/utils.ts
3603
3616
  var logger = {
3604
3617
  info: /* @__PURE__ */ __name((message) => console.log(`[info] ${message}`), "info"),
@@ -3819,6 +3832,7 @@ __name(isResolvedCronConfig, "isResolvedCronConfig");
3819
3832
 
3820
3833
  // src/env.ts
3821
3834
  var FARM_ENV_SYMBOL = /* @__PURE__ */ Symbol.for("farm.env");
3835
+ var FARM_ENV_RUNTIME_SYMBOL = /* @__PURE__ */ Symbol.for("farm.env.runtime");
3822
3836
  var farmEnvGlobal = globalThis;
3823
3837
  var currentEnv = getInitialEnv();
3824
3838
  function resolveEnv(config, source = getProcessEnv()) {
@@ -3830,7 +3844,7 @@ function resolveEnv(config, source = getProcessEnv()) {
3830
3844
  }
3831
3845
  __name(resolveEnv, "resolveEnv");
3832
3846
  function setEnv(env2) {
3833
- currentEnv = normalizeResolvedEnv(env2);
3847
+ currentEnv = prepareEnv(env2);
3834
3848
  if (typeof window === "undefined") {
3835
3849
  farmEnvGlobal[FARM_ENV_SYMBOL] = currentEnv;
3836
3850
  }
@@ -3873,7 +3887,7 @@ function createEnvProxy(scope) {
3873
3887
  return void 0;
3874
3888
  }
3875
3889
  const env2 = getEnvScope(scope);
3876
- return env2[property];
3890
+ return scope === "server" ? readServerEnvKey(env2, property) : env2[property];
3877
3891
  },
3878
3892
  ownKeys() {
3879
3893
  return Reflect.ownKeys(getEnvScope(scope));
@@ -3897,12 +3911,74 @@ function createEnvProxy(scope) {
3897
3911
  }
3898
3912
  __name(createEnvProxy, "createEnvProxy");
3899
3913
  function getEnvScope(scope) {
3914
+ const env2 = getCurrentEnv();
3900
3915
  if (scope === "server") {
3901
3916
  assertServerEnvAccess();
3917
+ readRuntimeServerEnv(env2);
3902
3918
  }
3903
- return getCurrentEnv()[scope] || {};
3919
+ return env2[scope] || {};
3904
3920
  }
3905
3921
  __name(getEnvScope, "getEnvScope");
3922
+ function readServerEnvKey(server, key) {
3923
+ const value = server[key];
3924
+ if (value === void 0) {
3925
+ const state = getCurrentEnv()[FARM_ENV_RUNTIME_SYMBOL];
3926
+ if (state && key in state.pending && !state.warned.has(key)) {
3927
+ state.warned.add(key);
3928
+ console.warn(
3929
+ `[Farm] Server env "${key}" was set when this app was built but is not set where the server runs, so it reads as undefined. Farm reads server env at runtime and does not store it in the build output; set "${key}" in the server's environment.`
3930
+ );
3931
+ }
3932
+ }
3933
+ return value;
3934
+ }
3935
+ __name(readServerEnvKey, "readServerEnvKey");
3936
+ function readRuntimeServerEnv(env2) {
3937
+ const state = env2[FARM_ENV_RUNTIME_SYMBOL];
3938
+ if (!state) return;
3939
+ for (const [key, type] of Object.entries(state.pending)) {
3940
+ const raw = readFarmEnvironmentValue(key);
3941
+ if (raw === void 0) continue;
3942
+ env2.server[key] = coerceRuntimeEnvValue(raw, type);
3943
+ delete state.pending[key];
3944
+ }
3945
+ }
3946
+ __name(readRuntimeServerEnv, "readRuntimeServerEnv");
3947
+ function coerceRuntimeEnvValue(raw, type) {
3948
+ if (type === "number") {
3949
+ const value = Number(raw);
3950
+ return raw.trim() !== "" && Number.isFinite(value) ? value : raw;
3951
+ }
3952
+ if (type === "boolean") {
3953
+ if (/^(true|1)$/i.test(raw.trim())) return true;
3954
+ if (/^(false|0|)$/i.test(raw.trim())) return false;
3955
+ return raw;
3956
+ }
3957
+ if (type === "json") {
3958
+ try {
3959
+ return JSON.parse(raw);
3960
+ } catch {
3961
+ return raw;
3962
+ }
3963
+ }
3964
+ return raw;
3965
+ }
3966
+ __name(coerceRuntimeEnvValue, "coerceRuntimeEnvValue");
3967
+ function prepareEnv(env2) {
3968
+ const normalized = normalizeResolvedEnv(env2);
3969
+ const runtime = env2.runtime?.server;
3970
+ if (!isRecord(runtime) || Object.keys(runtime).length === 0) return normalized;
3971
+ const prepared = { server: { ...normalized.server }, public: normalized.public };
3972
+ Object.defineProperty(prepared, FARM_ENV_RUNTIME_SYMBOL, {
3973
+ value: {
3974
+ pending: { ...runtime },
3975
+ warned: /* @__PURE__ */ new Set()
3976
+ },
3977
+ enumerable: false
3978
+ });
3979
+ return prepared;
3980
+ }
3981
+ __name(prepareEnv, "prepareEnv");
3906
3982
  function assertServerEnvAccess() {
3907
3983
  if (typeof window !== "undefined") {
3908
3984
  throw new Error("Farm server env is not available in the browser. Use publicEnv.");
@@ -3933,7 +4009,7 @@ __name(getCurrentEnv, "getCurrentEnv");
3933
4009
  function getInjectedEnv() {
3934
4010
  try {
3935
4011
  if (typeof __FARM_ENV__ !== "undefined" && __FARM_ENV__) {
3936
- return normalizeResolvedEnv(__FARM_ENV__);
4012
+ return prepareEnv(__FARM_ENV__);
3937
4013
  }
3938
4014
  } catch {
3939
4015
  }
@@ -1,8 +1,9 @@
1
- export { b2 as loadConfig, b1 as resolveConfig, b3 as resolveDeployConfig } from '../client-plugins-C1EgdoJM.mjs';
1
+ export { b2 as loadConfig, b1 as resolveConfig, b3 as resolveDeployConfig } from '../client-plugins-JXXmZliS.mjs';
2
2
  import { build, createServer, loadEnv } from 'vite';
3
- export { l as logger } from '../utils-DR2wfZAn.mjs';
3
+ export { l as logger } from '../utils-uUxF0K0P.mjs';
4
4
  import '../lifecycle-DK06VuKP.mjs';
5
- import '../route-C6UClI1z.mjs';
5
+ import '../route-B0XrsrFk.mjs';
6
+ import '../endpoint-DAc96i93.mjs';
6
7
  import '../cache.mjs';
7
8
  import '../renderer.mjs';
8
9
  import '../deployment.mjs';
@@ -28,6 +29,8 @@ import '../server-fn-error-DDh14a0V.mjs';
28
29
  import 'esbuild';
29
30
  import '../image-config-Duob7wER.mjs';
30
31
  import '../types-Z0aotQ8w.mjs';
32
+ import '../server-fn.mjs';
33
+ import '../server-query.mjs';
31
34
  import '../types-DQnyD3VD.mjs';
32
35
  import '../font.mjs';
33
36
  import '../after.mjs';
@@ -1,8 +1,9 @@
1
- export { b2 as loadConfig, b1 as resolveConfig, b3 as resolveDeployConfig } from '../client-plugins-CslwYp3E.js';
1
+ export { b2 as loadConfig, b1 as resolveConfig, b3 as resolveDeployConfig } from '../client-plugins-C089bQhN.js';
2
2
  import { build, createServer, loadEnv } from 'vite';
3
- export { l as logger } from '../utils-jISOE9SD.js';
3
+ export { l as logger } from '../utils-B0XJmG_b.js';
4
4
  import '../lifecycle-DK06VuKP.js';
5
- import '../route-CHBaW55F.js';
5
+ import '../route-DOEpbyWZ.js';
6
+ import '../endpoint-1zA994xL.js';
6
7
  import '../cache.js';
7
8
  import '../renderer.js';
8
9
  import '../deployment.js';
@@ -28,6 +29,8 @@ import '../server-fn-error-DDh14a0V.js';
28
29
  import 'esbuild';
29
30
  import '../image-config-Duob7wER.js';
30
31
  import '../types-Z0aotQ8w.js';
32
+ import '../server-fn.js';
33
+ import '../server-query.js';
31
34
  import '../types-DQnyD3VD.js';
32
35
  import '../font.js';
33
36
  import '../after.js';
@@ -5,23 +5,23 @@ import {
5
5
  loadConfig,
6
6
  resolveConfig,
7
7
  resolveDeployConfig
8
- } from "../chunk-GNTPTTLA.mjs";
8
+ } from "../chunk-QGVJVSNX.mjs";
9
9
  import "../chunk-XZNTNMHT.mjs";
10
10
  import "../chunk-FZC7EEPM.mjs";
11
11
  import "../chunk-JBSVKMC5.mjs";
12
12
  import "../chunk-7WPA7GBZ.mjs";
13
13
  import "../chunk-IILNZK5G.mjs";
14
14
  import "../chunk-OLYK7EAK.mjs";
15
- import "../chunk-Q3MDL7TM.mjs";
15
+ import "../chunk-ZCNJKLA2.mjs";
16
16
  import "../chunk-G2KY33I6.mjs";
17
- import "../chunk-4L7SZOHZ.mjs";
17
+ import "../chunk-YHOCRI4H.mjs";
18
18
  import "../chunk-QCFFHV5H.mjs";
19
- import "../chunk-FOGLGRDS.mjs";
19
+ import "../chunk-4OOBRCJX.mjs";
20
20
  import "../chunk-FA2W42OV.mjs";
21
- import "../chunk-6SCB2MXB.mjs";
22
- import "../chunk-MUUZJLCI.mjs";
23
- import "../chunk-ONUEYC6N.mjs";
21
+ import "../chunk-SXHV42UQ.mjs";
22
+ import "../chunk-EGJDUF4Q.mjs";
24
23
  import "../chunk-2UC36WAC.mjs";
24
+ import "../chunk-ONUEYC6N.mjs";
25
25
  import "../chunk-AELACLOB.mjs";
26
26
  import "../chunk-JLCQGPXE.mjs";
27
27
  import "../chunk-FP2INE7H.mjs";
@@ -57,7 +57,7 @@ function isTrue(value) {
57
57
  __name(isTrue, "isTrue");
58
58
 
59
59
  // package.json
60
- var version = "0.1.15";
60
+ var version = "0.1.17";
61
61
 
62
62
  // src/version.ts
63
63
  var FARM_VERSION = version;
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-BOYNDCZL.mjs";
4
4
  import {
5
5
  FARM_VERSION
6
- } from "../chunk-UE75PB52.mjs";
6
+ } from "../chunk-YD4J4XCI.mjs";
7
7
  import {
8
8
  __name
9
9
  } from "../chunk-LPEX4YW6.mjs";
@@ -2030,6 +2030,8 @@ var _FarmDataCache = class _FarmDataCache {
2030
2030
  constructor(config = {}) {
2031
2031
  this.entries = /* @__PURE__ */ new Map();
2032
2032
  this.inflight = /* @__PURE__ */ new Map();
2033
+ /** Local entries by tag, so tag counts and pruning never scan unrelated entries. */
2034
+ this.entriesByTag = /* @__PURE__ */ new Map();
2033
2035
  this.invalidatedTagVersions = /* @__PURE__ */ new Map();
2034
2036
  this.activeGenerations = /* @__PURE__ */ new Set();
2035
2037
  this.version = 0;
@@ -2048,6 +2050,7 @@ var _FarmDataCache = class _FarmDataCache {
2048
2050
  configure(config = {}) {
2049
2051
  this.generation++;
2050
2052
  this.entries.clear();
2053
+ this.entriesByTag.clear();
2051
2054
  this.inflight.clear();
2052
2055
  this.invalidatedTagVersions.clear();
2053
2056
  this.activeGenerations.clear();
@@ -2214,14 +2217,12 @@ var _FarmDataCache = class _FarmDataCache {
2214
2217
  return entry;
2215
2218
  }
2216
2219
  delete(key) {
2217
- const deleted = this.entries.delete(key);
2218
- if (deleted) this.pruneInvalidatedTagVersions();
2220
+ const deleted = this.deleteLocalEntry(key);
2219
2221
  emitFarmEvent({ type: "cache.delete", key, deleted });
2220
2222
  return deleted;
2221
2223
  }
2222
2224
  async deleteAsync(key) {
2223
- const deleted = this.entries.delete(key);
2224
- if (deleted) this.pruneInvalidatedTagVersions();
2225
+ const deleted = this.deleteLocalEntry(key);
2225
2226
  if (this.adapter) {
2226
2227
  await this.adapter.delete(this.createAdapterKey(key));
2227
2228
  }
@@ -2232,6 +2233,7 @@ var _FarmDataCache = class _FarmDataCache {
2232
2233
  const count = this.entries.size;
2233
2234
  this.generation++;
2234
2235
  this.entries.clear();
2236
+ this.entriesByTag.clear();
2235
2237
  this.inflight.clear();
2236
2238
  this.invalidatedTagVersions.clear();
2237
2239
  this.activeGenerations.clear();
@@ -2317,23 +2319,32 @@ var _FarmDataCache = class _FarmDataCache {
2317
2319
  return cached.value;
2318
2320
  }
2319
2321
  const inflight = this.inflight.get(key);
2320
- if (inflight) {
2322
+ if (inflight && !this.wasInvalidatedSince(inflight.tags, inflight.startVersion)) {
2321
2323
  emitFarmEvent({ type: "cache.dedupe", key });
2322
- return inflight;
2324
+ return inflight.promise;
2323
2325
  }
2324
2326
  const tags = Array.from(normalizeCacheOptionsTags(options));
2325
2327
  const generation = this.generation;
2328
+ const startVersion = this.version;
2326
2329
  const promise = this.fillCacheEntry(key, producer, options, tags, generation).catch((error) => {
2327
2330
  emitFarmEvent({ type: "cache.error", key, operation: "set", error });
2328
2331
  throw error;
2329
2332
  }).finally(() => {
2330
- if (this.inflight.get(key) === promise) {
2333
+ if (this.inflight.get(key)?.promise === promise) {
2331
2334
  this.inflight.delete(key);
2332
2335
  }
2333
2336
  });
2334
- this.inflight.set(key, promise);
2337
+ this.inflight.set(key, { promise, tags, startVersion });
2335
2338
  return promise;
2336
2339
  }
2340
+ /** A fill that started before one of its tags was invalidated cannot satisfy later readers. */
2341
+ wasInvalidatedSince(tags, version) {
2342
+ for (const tag of tags) {
2343
+ const invalidatedVersion = this.invalidatedTagVersions.get(tag);
2344
+ if (invalidatedVersion !== void 0 && invalidatedVersion > version) return true;
2345
+ }
2346
+ return false;
2347
+ }
2337
2348
  async fillCacheEntry(key, producer, options, tags, generation) {
2338
2349
  const adapter = this.adapter;
2339
2350
  const namespace = this.namespace;
@@ -2374,7 +2385,7 @@ var _FarmDataCache = class _FarmDataCache {
2374
2385
  return value;
2375
2386
  } finally {
2376
2387
  this.activeGenerations.delete(activeGeneration);
2377
- this.pruneInvalidatedTagVersions();
2388
+ this.pruneInvalidatedTagVersions(activeGeneration.tags);
2378
2389
  if (leaseToken && adapter?.releaseLease) {
2379
2390
  try {
2380
2391
  await adapter.releaseLease(leaseKey, leaseToken);
@@ -2419,18 +2430,9 @@ var _FarmDataCache = class _FarmDataCache {
2419
2430
  }
2420
2431
  return void 0;
2421
2432
  }
2422
- countEntriesForTag(tag) {
2423
- let count = 0;
2424
- for (const entry of this.entries.values()) {
2425
- if (entry.tags.has(tag)) {
2426
- count++;
2427
- }
2428
- }
2429
- return count;
2430
- }
2431
2433
  countEntriesForTags(tags) {
2432
2434
  let count = 0;
2433
- for (const entry of this.entries.values()) {
2435
+ for (const entry of this.entriesByTag.get(tags[0]) ?? []) {
2434
2436
  if (tags.every((tag) => entry.tags.has(tag))) {
2435
2437
  count++;
2436
2438
  }
@@ -2438,10 +2440,10 @@ var _FarmDataCache = class _FarmDataCache {
2438
2440
  return count;
2439
2441
  }
2440
2442
  invalidateTag(normalizedTag) {
2441
- const count = this.countEntriesForTag(normalizedTag);
2443
+ const count = this.entriesByTag.get(normalizedTag)?.size ?? 0;
2442
2444
  this.invalidatedTagVersions.delete(normalizedTag);
2443
2445
  this.invalidatedTagVersions.set(normalizedTag, ++this.version);
2444
- this.pruneInvalidatedTagVersions();
2446
+ this.pruneInvalidatedTagVersions([normalizedTag]);
2445
2447
  return count;
2446
2448
  }
2447
2449
  toPublicEntry(entry) {
@@ -2471,19 +2473,51 @@ var _FarmDataCache = class _FarmDataCache {
2471
2473
  this.entries.set(key, entry);
2472
2474
  }
2473
2475
  storeLocalEntry(entry) {
2474
- this.entries.delete(entry.key);
2476
+ const removed = [];
2477
+ const replaced = this.detachLocalEntry(entry.key);
2478
+ if (replaced) removed.push(replaced);
2475
2479
  this.entries.set(entry.key, entry);
2480
+ for (const tag of entry.tags) {
2481
+ let tagged = this.entriesByTag.get(tag);
2482
+ if (!tagged) this.entriesByTag.set(tag, tagged = /* @__PURE__ */ new Set());
2483
+ tagged.add(entry);
2484
+ }
2476
2485
  while (this.entries.size > this.maxEntries) {
2477
2486
  const oldestKey = this.entries.keys().next().value;
2478
2487
  if (oldestKey === void 0) break;
2479
- this.entries.delete(oldestKey);
2488
+ removed.push(this.detachLocalEntry(oldestKey));
2480
2489
  }
2481
- this.pruneInvalidatedTagVersions();
2490
+ for (const removedEntry of removed) this.pruneInvalidatedTagVersions(removedEntry.tags);
2482
2491
  }
2483
- pruneInvalidatedTagVersions() {
2484
- tags: for (const [tag, invalidatedVersion] of this.invalidatedTagVersions) {
2485
- for (const entry of this.entries.values()) {
2486
- if (entry.tags.has(tag) && entry.createdVersion < invalidatedVersion) continue tags;
2492
+ deleteLocalEntry(key) {
2493
+ const entry = this.detachLocalEntry(key);
2494
+ if (!entry) return false;
2495
+ this.pruneInvalidatedTagVersions(entry.tags);
2496
+ return true;
2497
+ }
2498
+ detachLocalEntry(key) {
2499
+ const entry = this.entries.get(key);
2500
+ if (!entry) return void 0;
2501
+ this.entries.delete(key);
2502
+ for (const tag of entry.tags) {
2503
+ const tagged = this.entriesByTag.get(tag);
2504
+ if (!tagged) continue;
2505
+ tagged.delete(entry);
2506
+ if (tagged.size === 0) this.entriesByTag.delete(tag);
2507
+ }
2508
+ return entry;
2509
+ }
2510
+ /**
2511
+ * Drop invalidation versions that no local entry or active fill can be stale against.
2512
+ * Callers pass only the tags whose dependents just changed, so the cost is bounded by
2513
+ * the entries sharing those tags rather than by the whole cache.
2514
+ */
2515
+ pruneInvalidatedTagVersions(tags) {
2516
+ tags: for (const tag of tags) {
2517
+ const invalidatedVersion = this.invalidatedTagVersions.get(tag);
2518
+ if (invalidatedVersion === void 0) continue;
2519
+ for (const entry of this.entriesByTag.get(tag) ?? []) {
2520
+ if (entry.createdVersion < invalidatedVersion) continue tags;
2487
2521
  }
2488
2522
  for (const generation of this.activeGenerations) {
2489
2523
  if (generation.tags.has(tag) && generation.createdVersion < invalidatedVersion)
@@ -4397,7 +4431,7 @@ function parseColonParam(segment) {
4397
4431
  };
4398
4432
  }
4399
4433
  __name(parseColonParam, "parseColonParam");
4400
- function compilePathPattern(pattern) {
4434
+ function compilePathPattern(pattern, trailingSlash = false) {
4401
4435
  const params = [];
4402
4436
  const segments = pattern.split("/").filter(Boolean);
4403
4437
  if (segments.length === 0) {
@@ -4433,11 +4467,18 @@ function compilePathPattern(pattern) {
4433
4467
  });
4434
4468
  return {
4435
4469
  kind: "path",
4436
- regex: new RegExp(`^${parts.join("")}$`),
4470
+ regex: new RegExp(`^${parts.join("")}${trailingSlash ? "/?" : ""}$`),
4437
4471
  params
4438
4472
  };
4439
4473
  }
4440
4474
  __name(compilePathPattern, "compilePathPattern");
4475
+ function compileMatcherPattern(pattern) {
4476
+ if (typeof pattern === "string" && pattern !== "*" && !pattern.endsWith("(.*)")) {
4477
+ return compilePathPattern(pattern, true);
4478
+ }
4479
+ return compilePattern(pattern);
4480
+ }
4481
+ __name(compileMatcherPattern, "compileMatcherPattern");
4441
4482
  function compilePattern(pattern) {
4442
4483
  if (pattern instanceof RegExp) {
4443
4484
  return { kind: "regexp", regex: pattern };
@@ -4457,7 +4498,7 @@ __name(compilePattern, "compilePattern");
4457
4498
  function compileMiddlewareConfig(config) {
4458
4499
  const compiled = {
4459
4500
  matcher: config.matcher ? toMatcherList(config.matcher).map(
4460
- (matcher) => typeof matcher === "function" ? matcher : compilePattern(matcher)
4501
+ (matcher) => typeof matcher === "function" ? matcher : compileMatcherPattern(matcher)
4461
4502
  ) : void 0,
4462
4503
  exclude: config.exclude?.map(compilePattern)
4463
4504
  };
@@ -6180,6 +6221,7 @@ function manageFarmHtmlPreloads(html, config) {
6180
6221
  {
6181
6222
  index,
6182
6223
  kind,
6224
+ href: readHtmlAttribute(element.value, "href"),
6183
6225
  highPriority: readHtmlAttribute(element.value, "fetchpriority")?.toLowerCase() === "high"
6184
6226
  }
6185
6227
  ] : [];
@@ -6203,6 +6245,7 @@ function manageFarmLinkHeaderPreloads(value, config) {
6203
6245
  {
6204
6246
  index,
6205
6247
  kind,
6248
+ href: getLinkHeaderTarget(link),
6206
6249
  highPriority: getLinkHeaderParameter(link, "fetchpriority")?.toLowerCase() === "high"
6207
6250
  }
6208
6251
  ] : [];
@@ -6225,6 +6268,7 @@ function manageFarmDocumentPreloads(html, linkHeader, config) {
6225
6268
  candidates.push({
6226
6269
  index,
6227
6270
  kind,
6271
+ href: readHtmlAttribute(element.value, "href"),
6228
6272
  highPriority: readHtmlAttribute(element.value, "fetchpriority")?.toLowerCase() === "high"
6229
6273
  });
6230
6274
  }
@@ -6234,6 +6278,7 @@ function manageFarmDocumentPreloads(html, linkHeader, config) {
6234
6278
  candidates.push({
6235
6279
  index: headerOffset + index,
6236
6280
  kind,
6281
+ href: getLinkHeaderTarget(link),
6237
6282
  highPriority: getLinkHeaderParameter(link, "fetchpriority")?.toLowerCase() === "high"
6238
6283
  });
6239
6284
  }
@@ -6282,24 +6327,33 @@ function selectPreloadsWithinBudget(candidates, config) {
6282
6327
  const removed = /* @__PURE__ */ new Set();
6283
6328
  const warnings = [];
6284
6329
  for (const kind of ["image", "font"]) {
6285
- const matching = candidates.filter((candidate) => candidate.kind === kind);
6330
+ const resources = /* @__PURE__ */ new Map();
6331
+ for (const candidate of candidates) {
6332
+ if (candidate.kind !== kind) continue;
6333
+ const key = candidate.href ?? `#${candidate.index}`;
6334
+ const hints = resources.get(key);
6335
+ if (hints) hints.push(candidate);
6336
+ else resources.set(key, [candidate]);
6337
+ }
6286
6338
  const limit = kind === "image" ? config.maxImages : config.maxFonts;
6287
- if (matching.length <= limit) continue;
6288
- const retained = new Set(
6289
- [...matching].sort(
6290
- (left, right) => Number(right.highPriority) - Number(left.highPriority) || left.index - right.index
6291
- ).slice(0, limit).map((candidate) => candidate.index)
6339
+ if (resources.size <= limit) continue;
6340
+ const ranked = [...resources.values()].map((hints) => ({
6341
+ hints,
6342
+ index: hints[0].index,
6343
+ highPriority: hints.some((hint) => hint.highPriority)
6344
+ })).sort(
6345
+ (left, right) => Number(right.highPriority) - Number(left.highPriority) || left.index - right.index
6292
6346
  );
6293
6347
  if (config.mode === "enforce") {
6294
- for (const candidate of matching) {
6295
- if (!retained.has(candidate.index)) removed.add(candidate.index);
6348
+ for (const resource of ranked.slice(limit)) {
6349
+ for (const hint of resource.hints) removed.add(hint.index);
6296
6350
  }
6297
6351
  }
6298
6352
  warnings.push({
6299
6353
  kind,
6300
- count: matching.length,
6354
+ count: resources.size,
6301
6355
  budget: limit,
6302
- removed: config.mode === "enforce" ? matching.length - retained.size : 0
6356
+ removed: config.mode === "enforce" ? resources.size - limit : 0
6303
6357
  });
6304
6358
  }
6305
6359
  return { removed, warnings };
@@ -6317,6 +6371,12 @@ function getLinkHeaderPreloadKind(link) {
6317
6371
  return normalizePreloadKind(getLinkHeaderParameter(link, "as"));
6318
6372
  }
6319
6373
  __name(getLinkHeaderPreloadKind, "getLinkHeaderPreloadKind");
6374
+ function getLinkHeaderTarget(link) {
6375
+ const start = link.indexOf("<");
6376
+ const end = link.indexOf(">", start + 1);
6377
+ return start === -1 || end === -1 ? void 0 : link.slice(start + 1, end).trim();
6378
+ }
6379
+ __name(getLinkHeaderTarget, "getLinkHeaderTarget");
6320
6380
  function getLinkHeaderParameter(link, name) {
6321
6381
  const uriEnd = link.indexOf(">");
6322
6382
  if (uriEnd === -1) return void 0;
@@ -1,27 +1,28 @@
1
1
  export { _runWithAfterRequest } from '../after.mjs';
2
- export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-LT4XSoQK.mjs';
2
+ export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-CeFBEAoZ.mjs';
3
3
  import { R as ResolvedFarmServerConfig } from '../workflows-CR9ex-gz.mjs';
4
4
  export { a as FarmServerConfig, b as bufferFarmRequestBody, c as cloneFarmRequestWithContext, d as createFarmNodeRequestAbortSignal, e as createFarmRequestBodyErrorResponse, m as matchesFarmIfNoneMatch, r as readFarmRequestBody, f as readNodeRequestBody, g as resolveFarmServerConfig } from '../workflows-CR9ex-gz.mjs';
5
- export { _ as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-Blh_f7Z3.mjs';
6
- import { aw as APIRequestRuntime, w as FarmConfig, I as FarmContextFactoryInput } from '../client-plugins-C1EgdoJM.mjs';
7
- export { aH as applyFarmCspNonceToResponse, az as collectFarmLlmsTxtPages, ay as createFarmAgentRobots, aA as createFarmDefaultLlmsTxt, aB as createFarmLlmsMarkdownReader, ax as createFarmMetadataRouteResponse, aD as manageFarmDocumentPreloads, aE as manageFarmHtmlPreloads, aF as manageFarmLinkHeaderPreloads, aC as renderFarmLlmsFullTxt, aG as reportFarmPreloadWarnings, aI as resolveFarmSecurityConfig } from '../client-plugins-C1EgdoJM.mjs';
5
+ export { _ as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-Cr53NRHr.mjs';
6
+ import { aw as APIRequestRuntime, w as FarmConfig, I as FarmContextFactoryInput } from '../client-plugins-JXXmZliS.mjs';
7
+ export { aH as applyFarmCspNonceToResponse, az as collectFarmLlmsTxtPages, ay as createFarmAgentRobots, aA as createFarmDefaultLlmsTxt, aB as createFarmLlmsMarkdownReader, ax as createFarmMetadataRouteResponse, aD as manageFarmDocumentPreloads, aE as manageFarmHtmlPreloads, aF as manageFarmLinkHeaderPreloads, aC as renderFarmLlmsFullTxt, aG as reportFarmPreloadWarnings, aI as resolveFarmSecurityConfig } from '../client-plugins-JXXmZliS.mjs';
8
8
  export { configureFarmCache, createFarmCacheKey, getFarmDataCache, normalizeRevalidatePath } from '../cache.mjs';
9
9
  import { g as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from '../types-Z0aotQ8w.mjs';
10
10
  export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-DhW0CqZN.mjs';
11
11
  import { F as FarmLocalePathConfig } from '../index-a-8Z5kZU.mjs';
12
12
  export { l as localizeFarmHref, a as localizeFarmPathname, s as stripFarmLocaleFromPathname } from '../index-a-8Z5kZU.mjs';
13
- export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, m as mergeMetadata, r as renderMetadataHead, c as resolveFarmNotFoundMetadata } from '../metadata-B1bxCPUY.mjs';
14
- export { _ as _runWithMiddlewareContext, b as _runWithMiddlewareData, a as applyProductionMiddlewareHeaders, c as createProductionMiddlewareRunner } from '../production-runtime-BDllolVh.mjs';
13
+ export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, m as mergeMetadata, r as renderMetadataHead, c as resolveFarmNotFoundMetadata } from '../metadata-C1Z9vLbb.mjs';
14
+ export { _ as _runWithMiddlewareContext, b as _runWithMiddlewareData, a as applyProductionMiddlewareHeaders, c as createProductionMiddlewareRunner } from '../production-runtime-jcrTlRTb.mjs';
15
15
  export { g as getFarmRedirectError, i as isFarmNotFoundError, a as isFarmRedirectError } from '../navigation-errors-Dvwpzaer.mjs';
16
16
  export { configureFarmObservability, emitFarmEvent, runWithFarmRequestSpan } from '../observability.mjs';
17
17
  export { f as createFarmInstrumentationLifecycle, r as resolveFarmInstrumentationRuntime } from '../instrumentation-runtime-CE06JLHZ.mjs';
18
18
  export { _setDefaultFarmThemeConfig, getTheme } from '../theme/server.mjs';
19
19
  import { c as FarmThemeRuntime, d as FarmThemeConfig, R as ResolvedFarmThemeConfig, a as FarmThemePreference } from '../types-DQnyD3VD.mjs';
20
20
  export { d as applyFarmBasePath, r as resolveFarmTrailingSlashRedirect, s as searchParamsToObject, b as setFarmBasePath, a as setFarmTrailingSlashPreference, c as stripFarmBasePath } from '../base-path-BU16ETmo.mjs';
21
- export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-DR2wfZAn.mjs';
21
+ export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-uUxF0K0P.mjs';
22
22
  import 'node:http';
23
23
  import '../lifecycle-DK06VuKP.mjs';
24
- import '../route-C6UClI1z.mjs';
24
+ import '../route-B0XrsrFk.mjs';
25
+ import '../endpoint-DAc96i93.mjs';
25
26
  import '../renderer.mjs';
26
27
  import '../deployment.mjs';
27
28
  import 'http';
@@ -42,6 +43,8 @@ import '../server-action-security.mjs';
42
43
  import '../server-fn-error-DDh14a0V.mjs';
43
44
  import 'esbuild';
44
45
  import '../image-config-Duob7wER.mjs';
46
+ import '../server-fn.mjs';
47
+ import '../server-query.mjs';
45
48
  import '../font.mjs';
46
49
  import '../island-CfGru1MO.mjs';
47
50
  import '@opentelemetry/api';
@@ -1,27 +1,28 @@
1
1
  export { _runWithAfterRequest } from '../after.js';
2
- export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-hUETRCbM.js';
2
+ export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-CWYd8Mv1.js';
3
3
  import { R as ResolvedFarmServerConfig } from '../workflows-CR9ex-gz.js';
4
4
  export { a as FarmServerConfig, b as bufferFarmRequestBody, c as cloneFarmRequestWithContext, d as createFarmNodeRequestAbortSignal, e as createFarmRequestBodyErrorResponse, m as matchesFarmIfNoneMatch, r as readFarmRequestBody, f as readNodeRequestBody, g as resolveFarmServerConfig } from '../workflows-CR9ex-gz.js';
5
- export { _ as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-DsVSQVfD.js';
6
- import { aw as APIRequestRuntime, w as FarmConfig, I as FarmContextFactoryInput } from '../client-plugins-CslwYp3E.js';
7
- export { aH as applyFarmCspNonceToResponse, az as collectFarmLlmsTxtPages, ay as createFarmAgentRobots, aA as createFarmDefaultLlmsTxt, aB as createFarmLlmsMarkdownReader, ax as createFarmMetadataRouteResponse, aD as manageFarmDocumentPreloads, aE as manageFarmHtmlPreloads, aF as manageFarmLinkHeaderPreloads, aC as renderFarmLlmsFullTxt, aG as reportFarmPreloadWarnings, aI as resolveFarmSecurityConfig } from '../client-plugins-CslwYp3E.js';
5
+ export { _ as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-Dt2gNuQD.js';
6
+ import { aw as APIRequestRuntime, w as FarmConfig, I as FarmContextFactoryInput } from '../client-plugins-C089bQhN.js';
7
+ export { aH as applyFarmCspNonceToResponse, az as collectFarmLlmsTxtPages, ay as createFarmAgentRobots, aA as createFarmDefaultLlmsTxt, aB as createFarmLlmsMarkdownReader, ax as createFarmMetadataRouteResponse, aD as manageFarmDocumentPreloads, aE as manageFarmHtmlPreloads, aF as manageFarmLinkHeaderPreloads, aC as renderFarmLlmsFullTxt, aG as reportFarmPreloadWarnings, aI as resolveFarmSecurityConfig } from '../client-plugins-C089bQhN.js';
8
8
  export { configureFarmCache, createFarmCacheKey, getFarmDataCache, normalizeRevalidatePath } from '../cache.js';
9
9
  import { g as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from '../types-Z0aotQ8w.js';
10
10
  export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-PPEeiJ6M.js';
11
11
  import { F as FarmLocalePathConfig } from '../index-BWVfxIsO.js';
12
12
  export { l as localizeFarmHref, a as localizeFarmPathname, s as stripFarmLocaleFromPathname } from '../index-BWVfxIsO.js';
13
- export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, m as mergeMetadata, r as renderMetadataHead, c as resolveFarmNotFoundMetadata } from '../metadata-BsUcOEXg.js';
14
- export { _ as _runWithMiddlewareContext, b as _runWithMiddlewareData, a as applyProductionMiddlewareHeaders, c as createProductionMiddlewareRunner } from '../production-runtime-CsNn2-zx.js';
13
+ export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, m as mergeMetadata, r as renderMetadataHead, c as resolveFarmNotFoundMetadata } from '../metadata-BcNJP4fq.js';
14
+ export { _ as _runWithMiddlewareContext, b as _runWithMiddlewareData, a as applyProductionMiddlewareHeaders, c as createProductionMiddlewareRunner } from '../production-runtime-oKmC0WU-.js';
15
15
  export { g as getFarmRedirectError, i as isFarmNotFoundError, a as isFarmRedirectError } from '../navigation-errors-Dvwpzaer.js';
16
16
  export { configureFarmObservability, emitFarmEvent, runWithFarmRequestSpan } from '../observability.js';
17
17
  export { f as createFarmInstrumentationLifecycle, r as resolveFarmInstrumentationRuntime } from '../instrumentation-runtime-CE06JLHZ.js';
18
18
  export { _setDefaultFarmThemeConfig, getTheme } from '../theme/server.js';
19
19
  import { c as FarmThemeRuntime, d as FarmThemeConfig, R as ResolvedFarmThemeConfig, a as FarmThemePreference } from '../types-DQnyD3VD.js';
20
20
  export { d as applyFarmBasePath, r as resolveFarmTrailingSlashRedirect, s as searchParamsToObject, b as setFarmBasePath, a as setFarmTrailingSlashPreference, c as stripFarmBasePath } from '../base-path-BU16ETmo.js';
21
- export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-jISOE9SD.js';
21
+ export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-B0XJmG_b.js';
22
22
  import 'node:http';
23
23
  import '../lifecycle-DK06VuKP.js';
24
- import '../route-CHBaW55F.js';
24
+ import '../route-DOEpbyWZ.js';
25
+ import '../endpoint-1zA994xL.js';
25
26
  import '../renderer.js';
26
27
  import '../deployment.js';
27
28
  import 'http';
@@ -42,6 +43,8 @@ import '../server-action-security.js';
42
43
  import '../server-fn-error-DDh14a0V.js';
43
44
  import 'esbuild';
44
45
  import '../image-config-Duob7wER.js';
46
+ import '../server-fn.js';
47
+ import '../server-query.js';
45
48
  import '../font.js';
46
49
  import '../island-CfGru1MO.js';
47
50
  import '@opentelemetry/api';