@farm.js/core 0.1.27 → 0.1.29

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 (235) hide show
  1. package/dist/agent-runtime.d.mts +3 -2
  2. package/dist/agent-runtime.d.ts +3 -2
  3. package/dist/api/client.cjs +4 -6
  4. package/dist/api/client.d.mts +1 -0
  5. package/dist/api/client.d.ts +1 -0
  6. package/dist/api/client.mjs +3 -5
  7. package/dist/api/route-manager.cjs +9 -8
  8. package/dist/api/route-manager.d.mts +2 -1
  9. package/dist/api/route-manager.d.ts +2 -1
  10. package/dist/api/route-manager.mjs +8 -7
  11. package/dist/api/runtime.cjs +7 -6
  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 -5
  15. package/dist/api.cjs +12 -11
  16. package/dist/api.d.mts +19 -4
  17. package/dist/api.d.ts +19 -4
  18. package/dist/api.mjs +11 -10
  19. package/dist/{app-BfzZdjgX.d.mts → app-DAuUTIZf.d.mts} +3 -3
  20. package/dist/app-markdown.cjs +6 -5
  21. package/dist/app-markdown.d.mts +4 -3
  22. package/dist/app-markdown.d.ts +4 -3
  23. package/dist/app-markdown.mjs +5 -4
  24. package/dist/{app-CXK7Prrt.d.ts → app-sUJ3jnTZ.d.ts} +3 -3
  25. package/dist/cache-invalidation-BD0z_lfu.d.mts +4 -0
  26. package/dist/cache-invalidation-BD0z_lfu.d.ts +4 -0
  27. package/dist/cache.cjs +6 -4
  28. package/dist/cache.d.mts +11 -6
  29. package/dist/cache.d.ts +11 -6
  30. package/dist/cache.mjs +7 -5
  31. package/dist/{chunk-N6UROPT7.mjs → chunk-2FQHH5SC.mjs} +12 -13
  32. package/dist/{chunk-UUYF3CHN.mjs → chunk-2N5PX3LS.mjs} +2 -2
  33. package/dist/{chunk-H6G5INWM.cjs → chunk-2SDO73HK.cjs} +14 -156
  34. package/dist/{chunk-4FHDV7VM.mjs → chunk-2UABTL3Y.mjs} +2 -2
  35. package/dist/{chunk-LAHZ7LZA.cjs → chunk-3FCFQP5V.cjs} +32 -20
  36. package/dist/{chunk-3TQWUUNP.cjs → chunk-3LUF2PE2.cjs} +10 -5
  37. package/dist/{chunk-SYGGPS4A.mjs → chunk-4IEPYMHF.mjs} +3 -3
  38. package/dist/{chunk-WD5PNSOB.mjs → chunk-4V7GIE2U.mjs} +6 -4
  39. package/dist/{chunk-UWTQTZFN.mjs → chunk-5KDPVSS3.mjs} +271 -155
  40. package/dist/{chunk-I7PUUDGY.cjs → chunk-63H6BKXG.cjs} +2 -2
  41. package/dist/{chunk-ZSO5GWGD.cjs → chunk-6CNX6Q3K.cjs} +168 -51
  42. package/dist/{chunk-3PTVHMLD.mjs → chunk-6G3ZZ2IE.mjs} +1 -1
  43. package/dist/{chunk-QBPXNZGV.cjs → chunk-6MVFL3R5.cjs} +25 -6
  44. package/dist/{chunk-FG5H2VCJ.mjs → chunk-6ZCMSZ5U.mjs} +2 -2
  45. package/dist/{chunk-YZBV7733.cjs → chunk-74T3CEA7.cjs} +397 -281
  46. package/dist/{chunk-ZMN3H73H.cjs → chunk-75DYEVXI.cjs} +13 -11
  47. package/dist/{chunk-WIVTGKLY.mjs → chunk-7CXKSRKL.mjs} +18 -11
  48. package/dist/{chunk-POXI72VV.mjs → chunk-ATXI6LGT.mjs} +148 -31
  49. package/dist/{chunk-NL3ZSMZB.cjs → chunk-BJPBQNIE.cjs} +12 -12
  50. package/dist/{chunk-Q4BHBO6V.mjs → chunk-BXFWA23T.mjs} +2 -2
  51. package/dist/{chunk-MBFURXAC.mjs → chunk-BZ3CHOFX.mjs} +1 -1
  52. package/dist/{chunk-TDWFCC2T.cjs → chunk-BZAGKCKB.cjs} +2 -2
  53. package/dist/chunk-CNOQY6Z7.mjs +156 -0
  54. package/dist/{chunk-DW34V5SM.cjs → chunk-CTV2TTNP.cjs} +4 -4
  55. package/dist/{chunk-HG237IEY.mjs → chunk-D234YWNA.mjs} +1 -1
  56. package/dist/{chunk-YXM74XOW.cjs → chunk-D4JE5NNV.cjs} +12 -12
  57. package/dist/{chunk-O2LV5XDG.mjs → chunk-DGXN3L4D.mjs} +20 -8
  58. package/dist/{chunk-4UNKCNSL.mjs → chunk-E76XC6ZG.mjs} +2 -2
  59. package/dist/{chunk-QQQNJS2E.mjs → chunk-E7UN576T.mjs} +1 -1
  60. package/dist/{chunk-G3HRIVEY.cjs → chunk-ES4B2IXW.cjs} +2 -2
  61. package/dist/{chunk-JQGDQO2I.cjs → chunk-EXLKRR4U.cjs} +10 -10
  62. package/dist/chunk-FJ3M4CUX.cjs +46 -0
  63. package/dist/chunk-FXEF4PPL.mjs +47 -0
  64. package/dist/{chunk-WD4YXVLV.mjs → chunk-GZYH4OER.mjs} +1 -1
  65. package/dist/{chunk-DX4VKYAJ.cjs → chunk-I26CZYPV.cjs} +6 -4
  66. package/dist/{chunk-F6SJAKFJ.mjs → chunk-IV6CQY7O.mjs} +12 -154
  67. package/dist/{chunk-6D242YGO.mjs → chunk-JATSG2ZO.mjs} +1 -1
  68. package/dist/{chunk-KAERLFD3.cjs → chunk-JFHKNFEO.cjs} +30 -23
  69. package/dist/{chunk-U74A3P2P.cjs → chunk-JLRDISQL.cjs} +7 -7
  70. package/dist/{chunk-BYODCJD6.cjs → chunk-K7CELQLK.cjs} +12 -13
  71. package/dist/{chunk-Y4YWHNKU.cjs → chunk-KH7BN726.cjs} +9 -9
  72. package/dist/{chunk-3IL5UC5I.cjs → chunk-KZLND3D2.cjs} +2 -2
  73. package/dist/{chunk-TKDY6AJP.mjs → chunk-MKMBQSNQ.mjs} +1 -1
  74. package/dist/{chunk-OCE65DDM.mjs → chunk-MNUGPHLN.mjs} +1 -1
  75. package/dist/{chunk-WJKVTJJR.cjs → chunk-NPPL5YDT.cjs} +2 -2
  76. package/dist/{chunk-HF5SIACK.cjs → chunk-NXG66MR7.cjs} +3 -3
  77. package/dist/chunk-NYJMY3JA.cjs +156 -0
  78. package/dist/{chunk-VVJCWBIE.mjs → chunk-O3DTUAX2.mjs} +2 -2
  79. package/dist/{chunk-R6AIILII.cjs → chunk-OZVEHHMA.cjs} +15 -14
  80. package/dist/{chunk-FPW4W3VW.mjs → chunk-PQD2AI3B.mjs} +1 -1
  81. package/dist/{chunk-C7OUJ6JI.cjs → chunk-PZNCMPJF.cjs} +3 -3
  82. package/dist/{chunk-QI7WQSMI.cjs → chunk-Q5JFU33Q.cjs} +4 -4
  83. package/dist/{chunk-52SH7TKB.mjs → chunk-QG5HNS7P.mjs} +2 -2
  84. package/dist/{chunk-CEYUWDWA.mjs → chunk-QZCT2CQ4.mjs} +10 -5
  85. package/dist/{chunk-FZC7EEPM.mjs → chunk-RSOJ7DRT.mjs} +26 -7
  86. package/dist/{chunk-QMV4QELL.mjs → chunk-S5GDHOE4.mjs} +4 -2
  87. package/dist/{chunk-CRQPYWLK.cjs → chunk-SORB3MAR.cjs} +14 -14
  88. package/dist/{chunk-I4J452B7.cjs → chunk-VHJGDMCG.cjs} +3 -3
  89. package/dist/{chunk-B6ZCT36X.cjs → chunk-WNLBF77X.cjs} +4 -4
  90. package/dist/{chunk-FOT7LZEO.cjs → chunk-WPPX4G7Q.cjs} +1 -1
  91. package/dist/{chunk-UNSKL6BI.cjs → chunk-X4ZV4QC5.cjs} +266 -228
  92. package/dist/{chunk-6EG7U4NF.mjs → chunk-X7WVQMIB.mjs} +1 -1
  93. package/dist/chunk-XD32KALF.cjs +47 -0
  94. package/dist/{chunk-RDV44SED.mjs → chunk-XJJVLDM6.mjs} +15 -14
  95. package/dist/{chunk-DQMTHWPI.cjs → chunk-XLTV4VOG.cjs} +21 -16
  96. package/dist/{chunk-5SPPCN5J.mjs → chunk-XNPDONUH.mjs} +1 -1
  97. package/dist/{chunk-UOXGA6TO.mjs → chunk-YDQZGSDS.mjs} +1 -1
  98. package/dist/{chunk-JT25KHDI.mjs → chunk-YMUE7L3D.mjs} +18 -13
  99. package/dist/chunk-Z3HATSKO.mjs +46 -0
  100. package/dist/{chunk-C3VRMB6H.cjs → chunk-ZCU4NZ3M.cjs} +6 -6
  101. package/dist/{chunk-NPFGGBM5.cjs → chunk-ZDILFMWN.cjs} +13 -13
  102. package/dist/{chunk-OGHTEYXS.mjs → chunk-ZYVFAOBT.mjs} +72 -34
  103. package/dist/{client-plugins-1GS4zubE.d.mts → client-plugins-BX2ptm4H.d.mts} +42 -34
  104. package/dist/{client-plugins-B1Za6F5x.d.ts → client-plugins-BmxM5KW_.d.ts} +42 -34
  105. package/dist/client-plugins.d.mts +3 -2
  106. package/dist/client-plugins.d.ts +3 -2
  107. package/dist/client.cjs +11 -12
  108. package/dist/client.d.mts +6 -5
  109. package/dist/client.d.ts +6 -5
  110. package/dist/client.mjs +10 -11
  111. package/dist/config.d.mts +3 -2
  112. package/dist/config.d.ts +3 -2
  113. package/dist/{devtools-CQJ3H6MX.cjs → devtools-GGVPZHJX.cjs} +96 -21
  114. package/dist/{devtools-6RN6KHTW.mjs → devtools-THVNPI2M.mjs} +80 -5
  115. package/dist/{devtools-client-4WAPJY5L.cjs → devtools-client-CXQ6PXI6.cjs} +1 -1
  116. package/dist/{devtools-client-LEUIHHAS.mjs → devtools-client-HJS2T34Y.mjs} +1 -1
  117. package/dist/docs.cjs +9 -8
  118. package/dist/docs.mjs +8 -7
  119. package/dist/index.cjs +61 -57
  120. package/dist/index.d.mts +26 -15
  121. package/dist/index.d.ts +26 -15
  122. package/dist/index.mjs +69 -65
  123. package/dist/integrations.d.mts +3 -2
  124. package/dist/integrations.d.ts +3 -2
  125. package/dist/internal/app-markdown-runtime.cjs +5 -4
  126. package/dist/internal/app-markdown-runtime.d.mts +4 -3
  127. package/dist/internal/app-markdown-runtime.d.ts +4 -3
  128. package/dist/internal/app-markdown-runtime.mjs +4 -3
  129. package/dist/internal/build-runtime.cjs +26 -23
  130. package/dist/internal/build-runtime.d.mts +5 -4
  131. package/dist/internal/build-runtime.d.ts +5 -4
  132. package/dist/internal/build-runtime.mjs +25 -22
  133. package/dist/internal/cli-runtime.cjs +15 -13
  134. package/dist/internal/cli-runtime.mjs +14 -12
  135. package/dist/internal/client-error-overlay.cjs +4 -4
  136. package/dist/internal/client-error-overlay.mjs +1 -1
  137. package/dist/internal/client-runtime.cjs +5 -1
  138. package/dist/internal/client-runtime.d.mts +1 -0
  139. package/dist/internal/client-runtime.d.ts +1 -0
  140. package/dist/internal/client-runtime.mjs +4 -0
  141. package/dist/internal/compression-runtime.cjs +3 -2
  142. package/dist/internal/compression-runtime.d.mts +6 -3
  143. package/dist/internal/compression-runtime.d.ts +6 -3
  144. package/dist/internal/compression-runtime.mjs +2 -1
  145. package/dist/internal/config-runtime.cjs +7 -6
  146. package/dist/internal/config-runtime.d.mts +4 -3
  147. package/dist/internal/config-runtime.d.ts +4 -3
  148. package/dist/internal/config-runtime.mjs +6 -5
  149. package/dist/internal/product-telemetry-runtime.cjs +10 -6
  150. package/dist/internal/product-telemetry-runtime.mjs +9 -5
  151. package/dist/internal/production-runtime.cjs +29 -13
  152. package/dist/internal/production-runtime.d.mts +36 -8
  153. package/dist/internal/production-runtime.d.ts +36 -8
  154. package/dist/internal/production-runtime.mjs +32 -16
  155. package/dist/markdown.cjs +4 -3
  156. package/dist/markdown.d.mts +3 -2
  157. package/dist/markdown.d.ts +3 -2
  158. package/dist/markdown.mjs +3 -2
  159. package/dist/{metadata-B9mCxKgp.d.mts → metadata-DsEaK7mQ.d.mts} +1 -1
  160. package/dist/{metadata-7LKgQEWF.d.ts → metadata-fwZ3gfG6.d.ts} +1 -1
  161. package/dist/middleware.cjs +6 -5
  162. package/dist/middleware.d.mts +4 -3
  163. package/dist/middleware.d.ts +4 -3
  164. package/dist/middleware.mjs +5 -4
  165. package/dist/navigation.cjs +5 -5
  166. package/dist/navigation.d.mts +5 -4
  167. package/dist/navigation.d.ts +5 -4
  168. package/dist/navigation.mjs +4 -4
  169. package/dist/plugin.cjs +25 -20
  170. package/dist/plugin.d.mts +3 -2
  171. package/dist/plugin.d.ts +3 -2
  172. package/dist/plugin.mjs +25 -20
  173. package/dist/{production-runtime-DramhI0c.d.mts → production-runtime-Baqgwtvc.d.mts} +1 -1
  174. package/dist/{production-runtime-B3xnY6fI.d.ts → production-runtime-DNkpFnmg.d.ts} +1 -1
  175. package/dist/query/client.cjs +6 -6
  176. package/dist/query/client.mjs +2 -2
  177. package/dist/{render-plan-CtQB-zHS.d.mts → render-plan-DhwQnmmX.d.mts} +1 -1
  178. package/dist/{render-plan-CpW32tOL.d.ts → render-plan-rkIK9wd9.d.ts} +1 -1
  179. package/dist/renderer-client.cjs +13 -14
  180. package/dist/renderer-client.d.mts +4 -3
  181. package/dist/renderer-client.d.ts +4 -3
  182. package/dist/renderer-client.mjs +6 -7
  183. package/dist/{request-BVGGeQv4.d.ts → request-BcY4RYPC.d.ts} +1 -1
  184. package/dist/{request-DlLVBKe3.d.mts → request-CFy1BltJ.d.mts} +1 -1
  185. package/dist/request.d.mts +4 -3
  186. package/dist/request.d.ts +4 -3
  187. package/dist/{route-rendering-DChYLNdh.d.mts → route-rendering-BkS0TBlB.d.mts} +1 -1
  188. package/dist/{route-rendering-BdEldajn.d.ts → route-rendering-D4XpMjam.d.ts} +1 -1
  189. package/dist/{router-D5htHn_M.d.mts → router-C4zPlC3V.d.mts} +1 -1
  190. package/dist/{router-D0Az-1Nu.d.ts → router-Cq7BcZxg.d.ts} +1 -1
  191. package/dist/routes.cjs +6 -5
  192. package/dist/routes.d.mts +3 -2
  193. package/dist/routes.d.ts +3 -2
  194. package/dist/routes.mjs +5 -4
  195. package/dist/server-fn-client.d.mts +1 -0
  196. package/dist/server-fn-client.d.ts +1 -0
  197. package/dist/server-fn.cjs +6 -5
  198. package/dist/server-fn.d.mts +1 -0
  199. package/dist/server-fn.d.ts +1 -0
  200. package/dist/server-fn.mjs +5 -4
  201. package/dist/server-plugins.cjs +3 -2
  202. package/dist/server-plugins.d.mts +3 -2
  203. package/dist/server-plugins.d.ts +3 -2
  204. package/dist/server-plugins.mjs +2 -1
  205. package/dist/server-query-client.cjs +5 -7
  206. package/dist/server-query-client.d.mts +1 -0
  207. package/dist/server-query-client.d.ts +1 -0
  208. package/dist/server-query-client.mjs +4 -6
  209. package/dist/server-query.cjs +7 -6
  210. package/dist/server-query.d.mts +1 -0
  211. package/dist/server-query.d.ts +1 -0
  212. package/dist/server-query.mjs +6 -5
  213. package/dist/server.cjs +72 -57
  214. package/dist/server.d.mts +10 -9
  215. package/dist/server.d.ts +10 -9
  216. package/dist/server.mjs +56 -41
  217. package/dist/{spa-router-DmwP_7QL.d.ts → spa-router-B1HI3X9k.d.ts} +2 -2
  218. package/dist/{spa-router-DVfSJZ5o.d.mts → spa-router-DzPZH-AO.d.mts} +2 -2
  219. package/dist/testing.cjs +14 -13
  220. package/dist/testing.d.mts +2 -1
  221. package/dist/testing.d.ts +2 -1
  222. package/dist/testing.mjs +11 -10
  223. package/dist/{utils-B_Rmr0-n.d.mts → utils-CEBktlBG.d.mts} +1 -1
  224. package/dist/{utils-Dv0OuLtF.d.ts → utils-DMD1Hzta.d.ts} +1 -1
  225. package/dist/version.cjs +2 -2
  226. package/dist/version.mjs +1 -1
  227. package/dist/vite.cjs +21 -19
  228. package/dist/vite.d.mts +3 -2
  229. package/dist/vite.d.ts +3 -2
  230. package/dist/vite.mjs +20 -18
  231. package/package.json +1 -1
  232. package/dist/{chunk-YOYF2E4U.mjs → chunk-LNZ7JZUS.mjs} +0 -0
  233. package/dist/{chunk-N4RLRSWW.cjs → chunk-SUIBNSNO.cjs} +0 -0
  234. package/dist/{chunk-TIKNUAU7.mjs → chunk-VUMAE7NC.mjs} +3 -3
  235. package/dist/{chunk-WM6HL7E7.cjs → chunk-ZHVYQL3H.cjs} +2 -2
@@ -1,15 +1,20 @@
1
+ import {
2
+ emitFarmEvent
3
+ } from "./chunk-FUZEBRP3.mjs";
4
+ import {
5
+ getActiveFarmI18nSnapshot
6
+ } from "./chunk-C4NCTZLM.mjs";
7
+ import {
8
+ createFarmCacheKey,
9
+ createRouteDataCacheKey,
10
+ getFunctionCacheIdentity
11
+ } from "./chunk-CNOQY6Z7.mjs";
1
12
  import {
2
13
  encodeFarmCacheInvalidations,
3
14
  notifyFarmCacheInvalidation,
4
15
  notifyFarmCacheTask,
5
16
  subscribeFarmCacheInvalidation
6
17
  } from "./chunk-4SIYUGRY.mjs";
7
- import {
8
- getActiveFarmI18nSnapshot
9
- } from "./chunk-C4NCTZLM.mjs";
10
- import {
11
- emitFarmEvent
12
- } from "./chunk-FUZEBRP3.mjs";
13
18
  import {
14
19
  __name
15
20
  } from "./chunk-LPEX4YW6.mjs";
@@ -812,10 +817,6 @@ function createRouteDataCacheTag(key) {
812
817
  return `route-data:${createRouteDataCacheKey(key)}`;
813
818
  }
814
819
  __name(createRouteDataCacheTag, "createRouteDataCacheTag");
815
- function createRouteDataCacheKey(key) {
816
- return createFarmCacheKey(Array.isArray(key) ? key : [key]);
817
- }
818
- __name(createRouteDataCacheKey, "createRouteDataCacheKey");
819
820
  function normalizeRevalidatePath(routePath) {
820
821
  if (typeof routePath !== "string") {
821
822
  throw new TypeError("revalidatePath expects a path string.");
@@ -840,10 +841,6 @@ function normalizeRevalidatePath(routePath) {
840
841
  return normalized || "/";
841
842
  }
842
843
  __name(normalizeRevalidatePath, "normalizeRevalidatePath");
843
- function createFarmCacheKey(parts) {
844
- return stableSerialize(parts);
845
- }
846
- __name(createFarmCacheKey, "createFarmCacheKey");
847
844
  function normalizeRevalidate(revalidate) {
848
845
  if (revalidate === false || revalidate === void 0) {
849
846
  return revalidate;
@@ -934,143 +931,6 @@ function assertFarmCacheInvalidationTarget(target) {
934
931
  throw new TypeError("Cache invalidation targets must contain a string/array key, path, or tag.");
935
932
  }
936
933
  __name(assertFarmCacheInvalidationTarget, "assertFarmCacheInvalidationTarget");
937
- function getFunctionCacheIdentity(fn) {
938
- const name = fn.name || "anonymous";
939
- return `${name}:${hashFunctionSource(String(fn))}`;
940
- }
941
- __name(getFunctionCacheIdentity, "getFunctionCacheIdentity");
942
- function hashFunctionSource(source) {
943
- let hash = 2166136261;
944
- for (let index = 0; index < source.length; index++) {
945
- hash ^= source.charCodeAt(index);
946
- hash = Math.imul(hash, 16777619);
947
- }
948
- return (hash >>> 0).toString(36);
949
- }
950
- __name(hashFunctionSource, "hashFunctionSource");
951
- function compareCodepoint(a, b) {
952
- return a < b ? -1 : a > b ? 1 : 0;
953
- }
954
- __name(compareCodepoint, "compareCodepoint");
955
- function serializeBinaryBytes(bytes) {
956
- return Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
957
- }
958
- __name(serializeBinaryBytes, "serializeBinaryBytes");
959
- function serializeCanonicalStringEntries(entries, seen) {
960
- const valuesByKey = /* @__PURE__ */ new Map();
961
- for (const [key, item] of entries) {
962
- const values = valuesByKey.get(key);
963
- if (values) values.push(item);
964
- else valuesByKey.set(key, [item]);
965
- }
966
- return Array.from(valuesByKey.keys()).sort(compareCodepoint).flatMap(
967
- (key) => valuesByKey.get(key).map((item) => `[${stableSerialize(key, seen)},${stableSerialize(item, seen)}]`)
968
- ).join(",");
969
- }
970
- __name(serializeCanonicalStringEntries, "serializeCanonicalStringEntries");
971
- function isPlainCacheKeyObject(value) {
972
- const prototype = Object.getPrototypeOf(value);
973
- if (prototype === null) return true;
974
- const constructor = Object.getOwnPropertyDescriptor(prototype, "constructor")?.value;
975
- return Object.getPrototypeOf(prototype) === null && typeof constructor === "function" && constructor.name === "Object";
976
- }
977
- __name(isPlainCacheKeyObject, "isPlainCacheKeyObject");
978
- function getCacheKeyValueType(value) {
979
- const prototype = Object.getPrototypeOf(value);
980
- const constructor = prototype ? Object.getOwnPropertyDescriptor(prototype, "constructor")?.value : void 0;
981
- if (typeof constructor === "function" && constructor.name) {
982
- return constructor.name;
983
- }
984
- return Object.prototype.toString.call(value).slice(8, -1) || "object";
985
- }
986
- __name(getCacheKeyValueType, "getCacheKeyValueType");
987
- function stableSerialize(value, seen = /* @__PURE__ */ new WeakSet()) {
988
- if (value === null) return "null";
989
- if (value === void 0) return "undefined";
990
- const valueType = typeof value;
991
- if (valueType === "string") return JSON.stringify(value);
992
- if (valueType === "number" || valueType === "boolean" || valueType === "bigint") {
993
- return `${valueType}:${String(value)}`;
994
- }
995
- if (valueType === "symbol") {
996
- return `symbol:${String(value)}`;
997
- }
998
- if (valueType === "function") {
999
- return `function:${getFunctionCacheIdentity(value)}`;
1000
- }
1001
- if (value instanceof Date) {
1002
- return Number.isNaN(value.getTime()) ? "date:invalid" : `date:${value.toISOString()}`;
1003
- }
1004
- if (value instanceof URL) {
1005
- return `url:${value.toString()}`;
1006
- }
1007
- if (value instanceof RegExp) {
1008
- return `regexp:${value.toString()}`;
1009
- }
1010
- if (value instanceof ArrayBuffer) {
1011
- return `arraybuffer:${serializeBinaryBytes(new Uint8Array(value))}`;
1012
- }
1013
- if (typeof SharedArrayBuffer !== "undefined" && value instanceof SharedArrayBuffer) {
1014
- return `sharedarraybuffer:${serializeBinaryBytes(new Uint8Array(value))}`;
1015
- }
1016
- if (ArrayBuffer.isView(value)) {
1017
- const viewType = Object.prototype.toString.call(value).slice(8, -1);
1018
- const bytes = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
1019
- return `binary:${viewType}:${serializeBinaryBytes(bytes)}`;
1020
- }
1021
- if (value && typeof value === "object") {
1022
- if (seen.has(value)) {
1023
- return "[Circular]";
1024
- }
1025
- seen.add(value);
1026
- if (Array.isArray(value)) {
1027
- const items = [];
1028
- for (let index = 0; index < value.length; index++) {
1029
- items.push(
1030
- Object.prototype.hasOwnProperty.call(value, index) ? stableSerialize(value[index], seen) : "[Hole]"
1031
- );
1032
- }
1033
- seen.delete(value);
1034
- return `[${items.join(",")}]`;
1035
- }
1036
- if (value instanceof Set) {
1037
- const items = Array.from(value, (item) => stableSerialize(item, seen)).sort(compareCodepoint);
1038
- seen.delete(value);
1039
- return `set:[${items.join(",")}]`;
1040
- }
1041
- if (value instanceof Map) {
1042
- const items = Array.from(
1043
- value,
1044
- ([key, item]) => `[${stableSerialize(key, seen)},${stableSerialize(item, seen)}]`
1045
- ).sort(compareCodepoint);
1046
- seen.delete(value);
1047
- return `map:[${items.join(",")}]`;
1048
- }
1049
- if (value instanceof URLSearchParams) {
1050
- const serialized2 = serializeCanonicalStringEntries(value, seen);
1051
- seen.delete(value);
1052
- return `urlsearchparams:[${serialized2}]`;
1053
- }
1054
- if (value instanceof Headers) {
1055
- const serialized2 = serializeCanonicalStringEntries(value, seen);
1056
- seen.delete(value);
1057
- return `headers:[${serialized2}]`;
1058
- }
1059
- if (!isPlainCacheKeyObject(value)) {
1060
- throw new TypeError(
1061
- `Cache keys do not support ${getCacheKeyValueType(value)} values. Convert the value to an explicit stable string or structured key before caching.`
1062
- );
1063
- }
1064
- const entries = Object.entries(value).sort(
1065
- ([a], [b]) => compareCodepoint(a, b)
1066
- );
1067
- const serialized = entries.map(([key, item]) => `${JSON.stringify(key)}:${stableSerialize(item, seen)}`).join(",");
1068
- seen.delete(value);
1069
- return `{${serialized}}`;
1070
- }
1071
- return String(value);
1072
- }
1073
- __name(stableSerialize, "stableSerialize");
1074
934
 
1075
935
  export {
1076
936
  createFarmCacheInvalidationStream,
@@ -1088,7 +948,5 @@ export {
1088
948
  applyFarmCacheInvalidationTargets,
1089
949
  createPathCacheTag,
1090
950
  createRouteDataCacheTag,
1091
- createRouteDataCacheKey,
1092
- normalizeRevalidatePath,
1093
- createFarmCacheKey
951
+ normalizeRevalidatePath
1094
952
  };
@@ -16,7 +16,7 @@ import {
16
16
  FARM_METADATA_ATTRIBUTE,
17
17
  renderMetadataHead,
18
18
  resolveMetadataTitle
19
- } from "./chunk-CEYUWDWA.mjs";
19
+ } from "./chunk-QZCT2CQ4.mjs";
20
20
  import {
21
21
  createFarmDeploymentMismatchError,
22
22
  createFarmDeploymentRequestHeaders,
@@ -3,7 +3,8 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkQBPXNZGVcjs = require('./chunk-QBPXNZGV.cjs');
6
+
7
+ var _chunk6MVFL3R5cjs = require('./chunk-6MVFL3R5.cjs');
7
8
 
8
9
 
9
10
  var _chunkYJRZR7VUcjs = require('./chunk-YJRZR7VU.cjs');
@@ -28,7 +29,7 @@ var _chunkPSV6XKPOcjs = require('./chunk-PSV6XKPO.cjs');
28
29
 
29
30
 
30
31
 
31
- var _chunkDQMTHWPIcjs = require('./chunk-DQMTHWPI.cjs');
32
+ var _chunkXLTV4VOGcjs = require('./chunk-XLTV4VOG.cjs');
32
33
 
33
34
 
34
35
  var _chunkYFPGHF5Fcjs = require('./chunk-YFPGHF5F.cjs');
@@ -47,7 +48,7 @@ var _chunkVEKFLAQMcjs = require('./chunk-VEKFLAQM.cjs');
47
48
  var _chunkOHY2ZWUGcjs = require('./chunk-OHY2ZWUG.cjs');
48
49
 
49
50
 
50
- var _chunkZSO5GWGDcjs = require('./chunk-ZSO5GWGD.cjs');
51
+ var _chunk6CNX6Q3Kcjs = require('./chunk-6CNX6Q3K.cjs');
51
52
 
52
53
 
53
54
  var _chunkUYIHRDE4cjs = require('./chunk-UYIHRDE4.cjs');
@@ -88,12 +89,9 @@ var _chunkI57LW5VZcjs = require('./chunk-I57LW5VZ.cjs');
88
89
 
89
90
  var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
90
91
 
91
- // src/config.ts
92
- var _path = require('path'); var _path2 = _interopRequireDefault(_path);
93
-
94
92
  // src/mcp-config.ts
95
93
  var _module = require('module');
96
-
94
+ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
97
95
  var _url = require('url');
98
96
  function resolveFarmMCPConfig(input) {
99
97
  if (input === false || input === void 0) return { enabled: false };
@@ -128,14 +126,20 @@ async function resolveFarmMCPPlugin(config, options) {
128
126
  }
129
127
  _chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmMCPPlugin, "resolveFarmMCPPlugin");
130
128
 
129
+ // src/config.ts
130
+
131
+
131
132
  // src/agent-config.ts
132
- function resolveFarmAgentConfig(input) {
133
+ var DEFAULT_JSON_LD = { type: "WebSite" };
134
+ function resolveFarmAgentConfig(input, context = {}) {
133
135
  const jsonLd = _optionalChain([input, 'optionalAccess', _ => _.jsonLd]);
134
136
  return {
135
- jsonLd: !jsonLd ? false : jsonLd === true ? {} : jsonLd,
136
- noindexPreviews: _chunkDQMTHWPIcjs.resolveFarmNoindexPreviews.call(void 0, _optionalChain([input, 'optionalAccess', _2 => _2.noindexPreviews])),
137
- llmsTxt: _chunkDQMTHWPIcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([input, 'optionalAccess', _3 => _3.llmsTxt])),
138
- crawlers: _chunkDQMTHWPIcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([input, 'optionalAccess', _4 => _4.crawlers])),
137
+ jsonLd: jsonLd === void 0 ? { ...DEFAULT_JSON_LD } : !jsonLd ? false : jsonLd === true ? {} : jsonLd,
138
+ noindexPreviews: _chunkXLTV4VOGcjs.resolveFarmNoindexPreviews.call(void 0, _optionalChain([input, 'optionalAccess', _2 => _2.noindexPreviews])),
139
+ // The docs engine answers /llms.txt with its own pages; a default here would replace it.
140
+ // llms-full.txt renders every listed page, so it stays opt-in.
141
+ llmsTxt: _chunkXLTV4VOGcjs.resolveFarmLlmsTxtConfig.call(void 0, _nullishCoalesce(_optionalChain([input, 'optionalAccess', _3 => _3.llmsTxt]), () => ( (context.docs ? false : { full: false })))),
142
+ crawlers: _chunkXLTV4VOGcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([input, 'optionalAccess', _4 => _4.crawlers])),
139
143
  apiCatalog: resolveFarmApiCatalogEnabled(_optionalChain([input, 'optionalAccess', _5 => _5.apiCatalog]))
140
144
  };
141
145
  }
@@ -684,9 +688,9 @@ async function resolveConfig(userConfig, mode) {
684
688
  const routeRules = _chunkQ5B3KJBPcjs.normalizeRouteRules.call(void 0, userConfig.routeRules);
685
689
  const routeRuleRedirects = _chunkQ5B3KJBPcjs.routeRulesToRedirects.call(void 0, routeRules);
686
690
  const routeRuleHeaders = _chunkQ5B3KJBPcjs.routeRulesToHeaders.call(void 0, routeRules);
687
- const security = _chunkDQMTHWPIcjs.resolveFarmSecurityConfig.call(void 0, userConfig.security);
688
- const securityHeader = _chunkDQMTHWPIcjs.getFarmSecurityHeader.call(void 0, security);
689
- if (_chunkDQMTHWPIcjs.farmCspBlocksFrameworkInlineScripts.call(void 0, security)) {
691
+ const security = _chunkXLTV4VOGcjs.resolveFarmSecurityConfig.call(void 0, userConfig.security);
692
+ const securityHeader = _chunkXLTV4VOGcjs.getFarmSecurityHeader.call(void 0, security);
693
+ if (_chunkXLTV4VOGcjs.farmCspBlocksFrameworkInlineScripts.call(void 0, security)) {
690
694
  _chunk5QIKR7RRcjs.logger.warn(
691
695
  "security.csp blocks the inline scripts Farm injects for theming and hydration. Set security.csp.nonce to true for managed dynamic nonces and prerendered hashes, or make the governing script directive allow 'unsafe-inline' without a nonce, hash, or 'strict-dynamic' source."
692
696
  );
@@ -694,20 +698,21 @@ async function resolveConfig(userConfig, mode) {
694
698
  const deploy = resolveDeployConfig(userConfig);
695
699
  const root = userConfig.root || process.cwd();
696
700
  const srcDir = userConfig.srcDir || "src";
701
+ _chunk6MVFL3R5cjs.setFarmProjectSourceDir.call(void 0, root, srcDir);
697
702
  const docs = await resolveDocsConfig(userConfig.docs, { root, srcDir });
698
- const md = _chunkZSO5GWGDcjs.resolveMarkdownConfig.call(void 0, userConfig.md);
703
+ const md = _chunk6CNX6Q3Kcjs.resolveMarkdownConfig.call(void 0, userConfig.md);
699
704
  const mdx = _chunkOHY2ZWUGcjs.resolveMdxConfig.call(void 0, userConfig.mdx);
700
705
  const env = _chunkVEKFLAQMcjs.resolveEnv.call(void 0, userConfig.env, process.env);
701
706
  _chunkVEKFLAQMcjs.setEnv.call(void 0, env);
702
707
  const api = await _chunkS3A45T7Fcjs.resolveFarmAPIConfig.call(void 0, userConfig.api, { root, mode, env });
703
- const auth = _chunkQBPXNZGVcjs.resolveFarmAuthConfig.call(void 0, userConfig.auth);
708
+ const auth = _chunk6MVFL3R5cjs.resolveFarmAuthConfig.call(void 0, userConfig.auth);
704
709
  const mcp = resolveFarmMCPConfig(userConfig.mcp);
705
710
  if (auth.enabled && _optionalChain([userConfig, 'access', _23 => _23.integrations, 'optionalAccess', _24 => _24.auth])) {
706
711
  throw new Error(
707
712
  "Choose either the top-level `auth` config or `integrations.auth`; they cannot both own the auth route."
708
713
  );
709
714
  }
710
- const nativeAuthIntegration = await _chunkQBPXNZGVcjs.resolveFarmAuthIntegration.call(void 0, auth, {
715
+ const nativeAuthIntegration = await _chunk6MVFL3R5cjs.resolveFarmAuthIntegration.call(void 0, auth, {
711
716
  root,
712
717
  mode
713
718
  });
@@ -769,7 +774,7 @@ async function resolveConfig(userConfig, mode) {
769
774
  ppr: false,
770
775
  ...userConfig.experimental
771
776
  },
772
- agent: resolveFarmAgentConfig(userConfig.agent),
777
+ agent: resolveFarmAgentConfig(userConfig.agent, { docs: docs.enabled }),
773
778
  plugins: [
774
779
  ..._chunkZ5HIWVDPcjs.resolveIntegrationPlugins.call(void 0, integrations),
775
780
  ...nativeMCPPlugin ? [nativeMCPPlugin] : [],
@@ -786,7 +791,7 @@ async function resolveConfig(userConfig, mode) {
786
791
  ], "headers"),
787
792
  routeRules,
788
793
  images: _chunkYFPGHF5Fcjs.resolveFarmImageConfig.call(void 0, userConfig.images),
789
- performance: _chunkDQMTHWPIcjs.resolveFarmPerformanceConfig.call(void 0, userConfig.performance),
794
+ performance: _chunkXLTV4VOGcjs.resolveFarmPerformanceConfig.call(void 0, userConfig.performance),
790
795
  theme: _chunkOI6CMLWXcjs.resolveFarmThemeConfig.call(void 0, userConfig.theme, basePath),
791
796
  publicDir: userConfig.publicDir || "public",
792
797
  i18n: _chunkHBTUGXHScjs.resolveFarmI18nConfig.call(void 0, userConfig.i18n, { root, mode, basePath }),
@@ -801,13 +806,13 @@ async function resolveConfig(userConfig, mode) {
801
806
  distDir: userConfig.distDir || ".farm",
802
807
  generateBuildId,
803
808
  compress: _nullishCoalesce(userConfig.compress, () => ( true)),
804
- devIndicators: _chunkQBPXNZGVcjs.resolveFarmDevIndicatorsConfig.call(void 0, userConfig.devIndicators, mode),
809
+ devIndicators: _chunk6MVFL3R5cjs.resolveFarmDevIndicatorsConfig.call(void 0, userConfig.devIndicators, mode),
805
810
  serverRuntimeConfig: userConfig.serverRuntimeConfig || {},
806
811
  publicRuntimeConfig: userConfig.publicRuntimeConfig || {},
807
812
  env,
808
813
  vite: typeof userConfig.vite === "function" ? userConfig.vite({}) : userConfig.vite || {}
809
814
  };
810
- _chunkQBPXNZGVcjs.assertPluginDependencies.call(void 0, resolved.plugins, resolved.integrations);
815
+ _chunk6MVFL3R5cjs.assertPluginDependencies.call(void 0, resolved.plugins, resolved.integrations);
811
816
  return resolved;
812
817
  }
813
818
  _chunkS3JO3N4Hcjs.__name.call(void 0, resolveConfig, "resolveConfig");
@@ -891,4 +896,6 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, loadConfig, "loadConfig");
891
896
 
892
897
 
893
898
 
894
- exports.hasCustomFarmRouteContext = hasCustomFarmRouteContext; exports.isResolvedFarmConfig = isResolvedFarmConfig; exports.normalizeDeployTarget = normalizeDeployTarget; exports.getPresetForDeployTarget = getPresetForDeployTarget; exports.getDeployTargetForPreset = getDeployTargetForPreset; exports.getDefaultDeployOutputDir = getDefaultDeployOutputDir; exports.resolveDeployOutputPath = resolveDeployOutputPath; exports.resolveDeployConfig = resolveDeployConfig; exports.resolveMigrationsConfig = resolveMigrationsConfig; exports.resolveDocsConfig = resolveDocsConfig; exports.resolveConfig = resolveConfig; exports.loadConfig = loadConfig;
899
+
900
+
901
+ exports.resolveFarmMCPConfig = resolveFarmMCPConfig; exports.resolveFarmMCPPlugin = resolveFarmMCPPlugin; exports.hasCustomFarmRouteContext = hasCustomFarmRouteContext; exports.isResolvedFarmConfig = isResolvedFarmConfig; exports.normalizeDeployTarget = normalizeDeployTarget; exports.getPresetForDeployTarget = getPresetForDeployTarget; exports.getDeployTargetForPreset = getDeployTargetForPreset; exports.getDefaultDeployOutputDir = getDefaultDeployOutputDir; exports.resolveDeployOutputPath = resolveDeployOutputPath; exports.resolveDeployConfig = resolveDeployConfig; exports.resolveMigrationsConfig = resolveMigrationsConfig; exports.resolveDocsConfig = resolveDocsConfig; exports.resolveConfig = resolveConfig; exports.loadConfig = loadConfig;
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkCRQPYWLKcjs = require('./chunk-CRQPYWLK.cjs');
3
+ var _chunkSORB3MARcjs = require('./chunk-SORB3MAR.cjs');
4
4
 
5
5
 
6
- var _chunkB6ZCT36Xcjs = require('./chunk-B6ZCT36X.cjs');
6
+ var _chunkWNLBF77Xcjs = require('./chunk-WNLBF77X.cjs');
7
7
 
8
8
 
9
9
  var _chunkI57LW5VZcjs = require('./chunk-I57LW5VZ.cjs');
@@ -13,7 +13,7 @@ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
13
13
 
14
14
  // src/navigation.ts
15
15
  function useRouter2() {
16
- const router = _chunkCRQPYWLKcjs.useRouter.call(void 0, );
16
+ const router = _chunkSORB3MARcjs.useRouter.call(void 0, );
17
17
  return {
18
18
  push: router.push,
19
19
  replace: router.replace,
@@ -21,21 +21,21 @@ function useRouter2() {
21
21
  forward: router.forward,
22
22
  refresh() {
23
23
  if (typeof window === "undefined") return Promise.resolve();
24
- return _chunkB6ZCT36Xcjs.getRouter.call(void 0, ).refresh();
24
+ return _chunkWNLBF77Xcjs.getRouter.call(void 0, ).refresh();
25
25
  },
26
26
  prefetch(href) {
27
27
  if (typeof window === "undefined") return Promise.resolve();
28
- return _chunkB6ZCT36Xcjs.getRouter.call(void 0, ).prefetch(_chunkI57LW5VZcjs.applyFarmBasePath.call(void 0, href));
28
+ return _chunkWNLBF77Xcjs.getRouter.call(void 0, ).prefetch(_chunkI57LW5VZcjs.applyFarmBasePath.call(void 0, href));
29
29
  }
30
30
  };
31
31
  }
32
32
  _chunkS3JO3N4Hcjs.__name.call(void 0, useRouter2, "useRouter");
33
33
  function usePathname() {
34
- return _chunkCRQPYWLKcjs.useRouter.call(void 0, ).pathname;
34
+ return _chunkSORB3MARcjs.useRouter.call(void 0, ).pathname;
35
35
  }
36
36
  _chunkS3JO3N4Hcjs.__name.call(void 0, usePathname, "usePathname");
37
37
  function useSearchParams() {
38
- return _chunkCRQPYWLKcjs.useRouter.call(void 0, ).searchParams;
38
+ return _chunkSORB3MARcjs.useRouter.call(void 0, ).searchParams;
39
39
  }
40
40
  _chunkS3JO3N4Hcjs.__name.call(void 0, useSearchParams, "useSearchParams");
41
41
 
@@ -13,6 +13,9 @@ var _chunkXGC343EYcjs = require('./chunk-XGC343EY.cjs');
13
13
  var _chunkE3UK5IIBcjs = require('./chunk-E3UK5IIB.cjs');
14
14
 
15
15
 
16
+ var _chunkFJ3M4CUXcjs = require('./chunk-FJ3M4CUX.cjs');
17
+
18
+
16
19
 
17
20
 
18
21
  var _chunkOX6O6WVAcjs = require('./chunk-OX6O6WVA.cjs');
@@ -637,21 +640,17 @@ function applyProductionMiddlewareHeaders(response, middlewareHeaders) {
637
640
  if (!middlewareHeaders || Array.from(middlewareHeaders.keys()).length === 0) {
638
641
  return response;
639
642
  }
640
- const headers = new Headers(response.headers);
641
643
  const getSetCookie = middlewareHeaders.getSetCookie;
642
644
  const setCookies = getSetCookie ? getSetCookie.call(middlewareHeaders) : middlewareHeaders.get("set-cookie") ? [middlewareHeaders.get("set-cookie")] : [];
643
- for (const [key, value] of middlewareHeaders) {
644
- if (key.toLowerCase() === "set-cookie") continue;
645
- if (headers.has(key)) continue;
646
- headers.set(key, value);
647
- }
648
- for (const cookie of setCookies) {
649
- headers.append("Set-Cookie", cookie);
650
- }
651
- return new Response(response.body, {
652
- status: response.status,
653
- statusText: response.statusText,
654
- headers
645
+ return _chunkFJ3M4CUXcjs._withFarmResponseHeaders.call(void 0, response, (headers) => {
646
+ for (const [key, value] of middlewareHeaders) {
647
+ if (key.toLowerCase() === "set-cookie") continue;
648
+ if (headers.has(key)) continue;
649
+ headers.set(key, value);
650
+ }
651
+ for (const cookie of setCookies) {
652
+ headers.append("Set-Cookie", cookie);
653
+ }
655
654
  });
656
655
  }
657
656
  _chunkS3JO3N4Hcjs.__name.call(void 0, applyProductionMiddlewareHeaders, "applyProductionMiddlewareHeaders");
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkI7PUUDGYcjs = require('./chunk-I7PUUDGY.cjs');
4
+ var _chunk63H6BKXGcjs = require('./chunk-63H6BKXG.cjs');
5
5
 
6
6
 
7
7
  var _chunkSK35NQKKcjs = require('./chunk-SK35NQKK.cjs');
8
8
 
9
9
 
10
- var _chunkH6G5INWMcjs = require('./chunk-H6G5INWM.cjs');
10
+ var _chunkNYJMY3JAcjs = require('./chunk-NYJMY3JA.cjs');
11
11
 
12
12
 
13
13
  var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
@@ -40,7 +40,7 @@ var serverQueryClientState = _nullishCoalesce(serverQueryClientGlobal[FARM_SERVE
40
40
  _nullishCoalesce(serverQueryClientState.latestOwners, () => ( (serverQueryClientState.latestOwners = /* @__PURE__ */ new Map())));
41
41
  _nullishCoalesce(serverQueryClientState.owners, () => ( (serverQueryClientState.owners = /* @__PURE__ */ new Set())));
42
42
  function isServerQueryOwnerSuperseded(owner, key) {
43
- const cache = _chunkI7PUUDGYcjs.getFarmClientDataCache.call(void 0, );
43
+ const cache = _chunk63H6BKXGcjs.getFarmClientDataCache.call(void 0, );
44
44
  const resolved = cache.resolveKey(key);
45
45
  for (const superseded of _nullishCoalesce(owner.supersededKeys, () => ( []))) {
46
46
  if (cache.resolveKey(superseded) === resolved) return true;
@@ -50,7 +50,7 @@ function isServerQueryOwnerSuperseded(owner, key) {
50
50
  _chunkS3JO3N4Hcjs.__name.call(void 0, isServerQueryOwnerSuperseded, "isServerQueryOwnerSuperseded");
51
51
  function claimServerQueryKey(owner, key) {
52
52
  if (isServerQueryOwnerSuperseded(owner, key)) return false;
53
- const resolved = _chunkI7PUUDGYcjs.getFarmClientDataCache.call(void 0, ).resolveKey(key);
53
+ const resolved = _chunk63H6BKXGcjs.getFarmClientDataCache.call(void 0, ).resolveKey(key);
54
54
  for (const older of serverQueryClientState.owners) {
55
55
  if (older === owner) break;
56
56
  older.supersededKeys.add(resolved);
@@ -83,7 +83,7 @@ function beginFarmServerQueryAction(actionId, args) {
83
83
  _chunkS3JO3N4Hcjs.__name.call(void 0, beginFarmServerQueryAction, "beginFarmServerQueryAction");
84
84
  function completeFarmServerQueryAction(invocation, value) {
85
85
  if (!_chunkSK35NQKKcjs.isFarmServerQueryResult.call(void 0, value)) return value;
86
- const cache = _chunkI7PUUDGYcjs.getFarmClientDataCache.call(void 0, );
86
+ const cache = _chunk63H6BKXGcjs.getFarmClientDataCache.call(void 0, );
87
87
  const metadata = value.__farmServerQuery;
88
88
  if (!shouldApplyFarmServerQueryActionResult(invocation)) {
89
89
  return value.data;
@@ -125,11 +125,11 @@ function createServerQueryCallKey(query, input) {
125
125
  id = ++serverQueryClientState.nextFunctionId;
126
126
  serverQueryClientState.functionIds.set(query, id);
127
127
  }
128
- return _chunkH6G5INWMcjs.createFarmCacheKey.call(void 0, ["server-query-call", id, input]);
128
+ return _chunkNYJMY3JAcjs.createFarmCacheKey.call(void 0, ["server-query-call", id, input]);
129
129
  }
130
130
  _chunkS3JO3N4Hcjs.__name.call(void 0, createServerQueryCallKey, "createServerQueryCallKey");
131
131
  async function fetchServerQuery(query, input, options = {}) {
132
- const cache = _chunkI7PUUDGYcjs.getFarmClientDataCache.call(void 0, );
132
+ const cache = _chunk63H6BKXGcjs.getFarmClientDataCache.call(void 0, );
133
133
  const provisionalKey = createServerQueryCallKey(query, input);
134
134
  const entry = cache.get(provisionalKey);
135
135
  const stale = cache.isStale(provisionalKey);
@@ -151,11 +151,11 @@ function prefetchServerQuery(query, input, options = {}) {
151
151
  _chunkS3JO3N4Hcjs.__name.call(void 0, prefetchServerQuery, "prefetchServerQuery");
152
152
  async function executeServerQuery(query, input, provisionalKey, options) {
153
153
  assertNotRawServerQueryInBrowser(query);
154
- const cache = _chunkI7PUUDGYcjs.getFarmClientDataCache.call(void 0, );
154
+ const cache = _chunk63H6BKXGcjs.getFarmClientDataCache.call(void 0, );
155
155
  const inflight = cache.getInflight(provisionalKey);
156
156
  if (inflight && !options.force) return inflight;
157
157
  const owner = {
158
- invalidations: _chunkI7PUUDGYcjs.trackFarmClientCacheInvalidations.call(void 0, cache),
158
+ invalidations: _chunk63H6BKXGcjs.trackFarmClientCacheInvalidations.call(void 0, cache),
159
159
  supersededKeys: /* @__PURE__ */ new Set()
160
160
  };
161
161
  serverQueryClientState.latestOwners.set(provisionalKey, owner);
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkWM6HL7E7cjs = require('./chunk-WM6HL7E7.cjs');
3
+ var _chunkZHVYQL3Hcjs = require('./chunk-ZHVYQL3H.cjs');
4
4
 
5
5
 
6
6
  var _chunkHBTUGXHScjs = require('./chunk-HBTUGXHS.cjs');
@@ -415,7 +415,7 @@ function farmMiddlewarePlugin(options = {}) {
415
415
  mode: server.config.mode === "production" ? "production" : "development",
416
416
  basePath: _nullishCoalesce(options.basePath, () => ( "/"))
417
417
  });
418
- manager = new (0, _chunkWM6HL7E7cjs.MiddlewareManager)(
418
+ manager = new (0, _chunkZHVYQL3Hcjs.MiddlewareManager)(
419
419
  getMiddlewareAppDirectory(server.config.root, srcDir),
420
420
  server,
421
421
  void 0,
@@ -7,7 +7,7 @@ import {
7
7
  notifyHistoryChange,
8
8
  readPageState,
9
9
  subscribeHistoryChange
10
- } from "./chunk-6D242YGO.mjs";
10
+ } from "./chunk-JATSG2ZO.mjs";
11
11
  import {
12
12
  getFarmI18nClientState
13
13
  } from "./chunk-TOVMYGYW.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MiddlewareManager
3
- } from "./chunk-TIKNUAU7.mjs";
3
+ } from "./chunk-VUMAE7NC.mjs";
4
4
  import {
5
5
  resolveFarmI18nConfig
6
6
  } from "./chunk-YMCXWPWK.mjs";
@@ -3,7 +3,7 @@
3
3
  var _chunkOWOUTKIJcjs = require('./chunk-OWOUTKIJ.cjs');
4
4
 
5
5
 
6
- var _chunkDQMTHWPIcjs = require('./chunk-DQMTHWPI.cjs');
6
+ var _chunkXLTV4VOGcjs = require('./chunk-XLTV4VOG.cjs');
7
7
 
8
8
 
9
9
  var _chunkJ63ZH5OQcjs = require('./chunk-J63ZH5OQ.cjs');
@@ -210,7 +210,7 @@ function createFarmMetadataRouteResponse(kind, value, routeModule = {}, options
210
210
  if (isResponse(value)) {
211
211
  return method === "HEAD" ? _chunkTKJZFIMLcjs.omitFarmResponseBody.call(void 0, value) : value;
212
212
  }
213
- const body = kind === "sitemap" ? serializeSitemap(value) : kind === "robots" ? serializeRobots(value) : kind === "llms" || kind === "llms-full" ? _chunkDQMTHWPIcjs.serializeFarmLlmsTxt.call(void 0, value) : serializeManifest(value);
213
+ const body = kind === "sitemap" ? serializeSitemap(value) : kind === "robots" ? serializeRobots(value) : kind === "llms" || kind === "llms-full" ? _chunkXLTV4VOGcjs.serializeFarmLlmsTxt.call(void 0, value) : serializeManifest(value);
214
214
  const contentType = kind === "sitemap" ? "application/xml; charset=utf-8" : kind === "robots" || kind === "llms" || kind === "llms-full" ? "text/plain; charset=utf-8" : "application/manifest+json; charset=utf-8";
215
215
  return new Response(method === "HEAD" ? null : body, {
216
216
  headers: {
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkZSO5GWGDcjs = require('./chunk-ZSO5GWGD.cjs');
4
+ var _chunk6CNX6Q3Kcjs = require('./chunk-6CNX6Q3K.cjs');
5
5
 
6
6
 
7
7
  var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
@@ -116,7 +116,7 @@ async function createFarmMarkdownSourceResponse(options) {
116
116
  }
117
117
  const url = new URL(options.request.url);
118
118
  const hasMarkdownExtension = url.pathname.toLowerCase().endsWith(".md");
119
- if (!hasMarkdownExtension && !_chunkZSO5GWGDcjs.requestAcceptsMarkdown.call(void 0, options.request.headers.get("accept"))) {
119
+ if (!hasMarkdownExtension && !_chunk6CNX6Q3Kcjs.requestAcceptsMarkdown.call(void 0, options.request.headers.get("accept"))) {
120
120
  return null;
121
121
  }
122
122
  const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname);
@@ -134,7 +134,7 @@ async function createFarmMarkdownSourceResponse(options) {
134
134
  if (!hasMarkdownExtension) {
135
135
  headers.set("Vary", "Accept");
136
136
  }
137
- return _chunkZSO5GWGDcjs.createFarmMarkdownViewResponse.call(void 0, {
137
+ return _chunk6CNX6Q3Kcjs.createFarmMarkdownViewResponse.call(void 0, {
138
138
  request: options.request,
139
139
  requestUrl: url,
140
140
  markdown: source.source,