@farm.js/core 0.1.37 → 0.1.38

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 (242) hide show
  1. package/dist/{agent-mcp-BC0bAGVF.d.mts → agent-mcp-BwKlpnc7.d.mts} +1 -1
  2. package/dist/{agent-mcp-jyDHbQKe.d.ts → agent-mcp-De1imoMS.d.ts} +1 -1
  3. package/dist/{agent-mcp-handler-SJAHFSPI.cjs → agent-mcp-handler-MRGP3WJ3.cjs} +5 -5
  4. package/dist/{agent-mcp-handler-LPJ2CADR.mjs → agent-mcp-handler-OLRMZONF.mjs} +4 -4
  5. package/dist/agent-runtime.cjs +2 -2
  6. package/dist/agent-runtime.d.mts +1 -1
  7. package/dist/agent-runtime.d.ts +1 -1
  8. package/dist/agent-runtime.mjs +1 -1
  9. package/dist/api/client.cjs +3 -3
  10. package/dist/api/client.mjs +2 -2
  11. package/dist/api/route-manager.cjs +5 -5
  12. package/dist/api/route-manager.d.mts +3 -3
  13. package/dist/api/route-manager.d.ts +3 -3
  14. package/dist/api/route-manager.mjs +4 -4
  15. package/dist/api/runtime.cjs +4 -4
  16. package/dist/api/runtime.d.mts +2 -2
  17. package/dist/api/runtime.d.ts +2 -2
  18. package/dist/api/runtime.mjs +3 -3
  19. package/dist/api.cjs +7 -7
  20. package/dist/api.d.mts +3 -3
  21. package/dist/api.d.ts +3 -3
  22. package/dist/api.mjs +6 -6
  23. package/dist/{app-Cbkj9ufe.d.mts → app-CFZt-srr.d.mts} +21 -3
  24. package/dist/{app-CKO3iN1c.d.ts → app-kT_QXTdx.d.ts} +21 -3
  25. package/dist/app-markdown.cjs +4 -4
  26. package/dist/app-markdown.d.mts +2 -2
  27. package/dist/app-markdown.d.ts +2 -2
  28. package/dist/app-markdown.mjs +3 -3
  29. package/dist/{chunk-LOFKRKO7.cjs → chunk-2DD4JMQC.cjs} +113 -22
  30. package/dist/chunk-2ZYGC6SS.cjs +576 -0
  31. package/dist/{chunk-75X755YZ.cjs → chunk-34UCJRQO.cjs} +2 -2
  32. package/dist/{chunk-CVH2BXPY.cjs → chunk-3LOLJTFV.cjs} +6 -6
  33. package/dist/{chunk-4GPOC4LN.cjs → chunk-472NCAZ7.cjs} +3 -3
  34. package/dist/{chunk-WT4TGLXT.cjs → chunk-4E5QXOCL.cjs} +6 -6
  35. package/dist/{chunk-7DWNJI73.cjs → chunk-4IE345DM.cjs} +37 -19
  36. package/dist/{chunk-O6WAEAX3.mjs → chunk-5BWWFHR2.mjs} +70 -15
  37. package/dist/{chunk-6LGFV2CQ.cjs → chunk-5OKBARDN.cjs} +2 -2
  38. package/dist/{chunk-3IP27TCG.cjs → chunk-5PWXMJOH.cjs} +19 -19
  39. package/dist/chunk-6BK3K2GB.mjs +318 -0
  40. package/dist/{chunk-HEVMCTSR.mjs → chunk-6HB6V3R7.mjs} +1 -1
  41. package/dist/{chunk-NICDYKBS.cjs → chunk-6XWDE2P2.cjs} +22 -4
  42. package/dist/{chunk-Z7LA7MHQ.mjs → chunk-7FPTZLKH.mjs} +1 -1
  43. package/dist/{chunk-JPNFPAZ4.mjs → chunk-7PEP3BUT.mjs} +1 -1
  44. package/dist/{chunk-XOPOIFTJ.mjs → chunk-A3EAIURZ.mjs} +25 -7
  45. package/dist/{chunk-LBDP3YT3.mjs → chunk-ARC7I3O2.mjs} +1 -1
  46. package/dist/{chunk-LBGILORX.mjs → chunk-B6G5CKMC.mjs} +101 -10
  47. package/dist/{chunk-MCIZVNOQ.mjs → chunk-BZHXGVMA.mjs} +1 -1
  48. package/dist/{chunk-KDTBF3UU.mjs → chunk-CNNOLE4O.mjs} +1 -1
  49. package/dist/{chunk-TDNWPAVR.mjs → chunk-CUM5NYL5.mjs} +1 -1
  50. package/dist/{chunk-HITLGIAO.cjs → chunk-CY2ZQ5C6.cjs} +7 -6
  51. package/dist/{chunk-KPFKMDM7.mjs → chunk-DRLKAXDM.mjs} +1 -1
  52. package/dist/{chunk-VR4GD5I3.cjs → chunk-EIPC3FDA.cjs} +12 -4
  53. package/dist/{chunk-K3SAEIM3.mjs → chunk-EKF7KDFD.mjs} +1 -1
  54. package/dist/{chunk-B5PFZLKV.cjs → chunk-EKN7NSZO.cjs} +25 -8
  55. package/dist/{chunk-ATWHHSY2.cjs → chunk-EMO6K4YY.cjs} +4 -4
  56. package/dist/{chunk-6SJ2KJTA.mjs → chunk-EPYU2EBL.mjs} +1 -1
  57. package/dist/{chunk-PTZ2TVNE.cjs → chunk-H5CLOUZS.cjs} +5 -5
  58. package/dist/{chunk-DTSROJ5J.mjs → chunk-HD5CF3OE.mjs} +1 -1
  59. package/dist/{chunk-IAIYV4RZ.mjs → chunk-HXRYZWTA.mjs} +1 -1
  60. package/dist/{chunk-Z5BEWYVO.mjs → chunk-IBUQWVYA.mjs} +16 -0
  61. package/dist/{chunk-HMRSWN47.mjs → chunk-INL3THCU.mjs} +1 -1
  62. package/dist/{chunk-FBOJ55OM.mjs → chunk-IVLZZZEI.mjs} +1 -1
  63. package/dist/{chunk-ENLZ4R3Y.mjs → chunk-J7K2NZD6.mjs} +7 -6
  64. package/dist/{chunk-NFMDCAOS.mjs → chunk-JCKYH4LG.mjs} +2 -2
  65. package/dist/{chunk-PMQHMWZU.cjs → chunk-JCYYXBAJ.cjs} +3 -3
  66. package/dist/{chunk-LPFV45AY.cjs → chunk-KCQBAKIY.cjs} +9 -9
  67. package/dist/{chunk-FGRYBX5X.mjs → chunk-KHKLMNI5.mjs} +1 -1
  68. package/dist/{chunk-NQ6QFZWD.cjs → chunk-KKSTAEMY.cjs} +1 -1
  69. package/dist/{chunk-7O5M4UKW.cjs → chunk-L4DD7ODZ.cjs} +2 -2
  70. package/dist/{chunk-YCKO6FRS.mjs → chunk-LI2F57NI.mjs} +1 -1
  71. package/dist/{chunk-TW4GYDBJ.mjs → chunk-MLY2RP5R.mjs} +10 -2
  72. package/dist/{chunk-5BXGGEC7.cjs → chunk-N32CC42M.cjs} +5 -5
  73. package/dist/{chunk-BHY547NB.cjs → chunk-NBBEQLOK.cjs} +9 -9
  74. package/dist/{chunk-WQ7T2263.mjs → chunk-OAHTRMIC.mjs} +3 -3
  75. package/dist/{chunk-K4I4O5TS.mjs → chunk-OCIEZME4.mjs} +790 -671
  76. package/dist/{chunk-UH6QN5NL.mjs → chunk-P664ZVTV.mjs} +2 -2
  77. package/dist/{chunk-TE2G5ION.cjs → chunk-PGZDEPTM.cjs} +88 -33
  78. package/dist/{chunk-3KGDJLJK.mjs → chunk-POSPE3IO.mjs} +19 -1
  79. package/dist/{chunk-3A4KGQYI.cjs → chunk-Q3NXS4MU.cjs} +16 -14
  80. package/dist/{chunk-TPLJVC7E.mjs → chunk-QFW2IH5E.mjs} +23 -6
  81. package/dist/{chunk-S3VWVTVA.mjs → chunk-QRKIMN7T.mjs} +13 -1
  82. package/dist/chunk-QTXBII4Z.cjs +632 -0
  83. package/dist/{chunk-CI6E3UOH.cjs → chunk-RG4A6LB2.cjs} +7 -7
  84. package/dist/{chunk-7SQ5SGYZ.cjs → chunk-RW63BOV7.cjs} +2 -2
  85. package/dist/{chunk-U6MPZ35Q.cjs → chunk-RWFLWR5J.cjs} +8 -8
  86. package/dist/{chunk-EUV4YR3V.cjs → chunk-SGBJ247Q.cjs} +18 -2
  87. package/dist/{chunk-J3ANCZKA.mjs → chunk-SKVTP5PR.mjs} +1 -1
  88. package/dist/{chunk-6TJITR2B.cjs → chunk-TGFQVLLF.cjs} +870 -751
  89. package/dist/{chunk-4P6ULFMD.mjs → chunk-TUBTR2OP.mjs} +221 -102
  90. package/dist/{chunk-EMMQ64QW.cjs → chunk-TYJALEHQ.cjs} +2 -2
  91. package/dist/{chunk-WRPHYQVY.mjs → chunk-TYMMBFN2.mjs} +1 -1
  92. package/dist/chunk-U6QLDL3G.mjs +576 -0
  93. package/dist/{chunk-OW67PDDS.cjs → chunk-ULASELLA.cjs} +13 -1
  94. package/dist/{chunk-WWIKMBRN.mjs → chunk-VNGH5MLF.mjs} +17 -1
  95. package/dist/{chunk-NNSAQX3U.mjs → chunk-VT4WFRHA.mjs} +1 -1
  96. package/dist/{chunk-UJZLSXUB.cjs → chunk-VU6AAZVY.cjs} +17 -1
  97. package/dist/{chunk-ADOAUDQ6.cjs → chunk-VXEEATVD.cjs} +2 -2
  98. package/dist/{chunk-RRMVL6CJ.mjs → chunk-W36M2BQ4.mjs} +1 -1
  99. package/dist/{chunk-4WQ6PGSJ.cjs → chunk-WEW2JVA4.cjs} +4 -4
  100. package/dist/{chunk-4E5WBPEG.mjs → chunk-WFRT7JPX.mjs} +8 -533
  101. package/dist/{chunk-VXAWRDK7.mjs → chunk-WLL43JMO.mjs} +1 -1
  102. package/dist/chunk-WW46B6HA.cjs +318 -0
  103. package/dist/{chunk-D3C5LBQY.cjs → chunk-WXJLNP33.cjs} +2 -2
  104. package/dist/{chunk-NDILNQ4L.cjs → chunk-XKG2BLFN.cjs} +2 -2
  105. package/dist/{chunk-W2YDNK66.cjs → chunk-XKVVMZP5.cjs} +2 -2
  106. package/dist/{chunk-Q5FYSK45.cjs → chunk-YR2VBEMO.cjs} +619 -500
  107. package/dist/{chunk-EXG5LD6B.mjs → chunk-ZJD2PN6Z.mjs} +10 -8
  108. package/dist/{chunk-G2TEB74S.cjs → chunk-ZXH4TS3F.cjs} +2 -2
  109. package/dist/{client-plugins-C8DjftDF.d.ts → client-plugins-BvlNhGEB.d.ts} +40 -7
  110. package/dist/{client-plugins-CV4eJ9De.d.mts → client-plugins-DUrIYX9B.d.mts} +40 -7
  111. package/dist/client-plugins.d.mts +1 -1
  112. package/dist/client-plugins.d.ts +1 -1
  113. package/dist/client.cjs +5 -5
  114. package/dist/client.d.mts +5 -5
  115. package/dist/client.d.ts +5 -5
  116. package/dist/client.mjs +4 -4
  117. package/dist/config.d.mts +1 -1
  118. package/dist/config.d.ts +1 -1
  119. package/dist/{devtools-KVOY2TCZ.mjs → devtools-JYJNOLPQ.mjs} +7 -5
  120. package/dist/{devtools-JXFQNWSH.cjs → devtools-VQWJANJV.cjs} +8 -6
  121. package/dist/docs.cjs +11 -9
  122. package/dist/docs.d.mts +20 -2
  123. package/dist/docs.d.ts +20 -2
  124. package/dist/docs.mjs +10 -8
  125. package/dist/headers.cjs +6 -4
  126. package/dist/headers.d.mts +11 -1
  127. package/dist/headers.d.ts +11 -1
  128. package/dist/headers.mjs +5 -3
  129. package/dist/index.cjs +52 -39
  130. package/dist/index.d.mts +15 -15
  131. package/dist/index.d.ts +15 -15
  132. package/dist/index.mjs +52 -39
  133. package/dist/integrations.cjs +4 -2
  134. package/dist/integrations.d.mts +1 -1
  135. package/dist/integrations.d.ts +1 -1
  136. package/dist/integrations.mjs +3 -1
  137. package/dist/internal/app-markdown-runtime.cjs +3 -3
  138. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  139. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  140. package/dist/internal/app-markdown-runtime.mjs +2 -2
  141. package/dist/internal/build-runtime.cjs +28 -27
  142. package/dist/internal/build-runtime.d.mts +3 -3
  143. package/dist/internal/build-runtime.d.ts +3 -3
  144. package/dist/internal/build-runtime.mjs +27 -26
  145. package/dist/internal/cli-runtime.cjs +10 -8
  146. package/dist/internal/cli-runtime.mjs +9 -7
  147. package/dist/internal/client-error-overlay.cjs +4 -4
  148. package/dist/internal/client-error-overlay.mjs +1 -1
  149. package/dist/internal/compression-runtime.d.mts +1 -1
  150. package/dist/internal/compression-runtime.d.ts +1 -1
  151. package/dist/internal/config-runtime.cjs +8 -6
  152. package/dist/internal/config-runtime.d.mts +2 -2
  153. package/dist/internal/config-runtime.d.ts +2 -2
  154. package/dist/internal/config-runtime.mjs +7 -5
  155. package/dist/internal/docs-precompiled-runtime.cjs +19 -13
  156. package/dist/internal/docs-precompiled-runtime.d.mts +5 -0
  157. package/dist/internal/docs-precompiled-runtime.d.ts +5 -0
  158. package/dist/internal/docs-precompiled-runtime.mjs +14 -8
  159. package/dist/internal/infra-analytics-runtime.cjs +5 -5
  160. package/dist/internal/infra-analytics-runtime.mjs +3 -3
  161. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  162. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  163. package/dist/internal/production-node-env.cjs +6 -2
  164. package/dist/internal/production-node-env.d.mts +10 -1
  165. package/dist/internal/production-node-env.d.ts +10 -1
  166. package/dist/internal/production-node-env.mjs +5 -1
  167. package/dist/internal/production-runtime.cjs +34 -14
  168. package/dist/internal/production-runtime.d.mts +51 -11
  169. package/dist/internal/production-runtime.d.ts +51 -11
  170. package/dist/internal/production-runtime.mjs +36 -16
  171. package/dist/markdown.cjs +8 -2
  172. package/dist/markdown.d.mts +1 -1
  173. package/dist/markdown.d.ts +1 -1
  174. package/dist/markdown.mjs +7 -1
  175. package/dist/middleware.cjs +9 -7
  176. package/dist/middleware.d.mts +24 -4
  177. package/dist/middleware.d.ts +24 -4
  178. package/dist/middleware.mjs +9 -7
  179. package/dist/navigation.cjs +4 -4
  180. package/dist/navigation.d.mts +4 -4
  181. package/dist/navigation.d.ts +4 -4
  182. package/dist/navigation.mjs +3 -3
  183. package/dist/plugin.cjs +21 -20
  184. package/dist/plugin.d.mts +1 -1
  185. package/dist/plugin.d.ts +1 -1
  186. package/dist/plugin.mjs +20 -19
  187. package/dist/{production-runtime-Du_FHb2-.d.mts → production-runtime-BQ4_WLwQ.d.mts} +1 -1
  188. package/dist/{production-runtime-C2kkrPVZ.d.ts → production-runtime-D2aMyzjr.d.ts} +1 -1
  189. package/dist/query/client.cjs +2 -2
  190. package/dist/query/client.mjs +1 -1
  191. package/dist/{render-plan-BnnPTpus.d.ts → render-plan-25p4hrj4.d.ts} +1 -1
  192. package/dist/{render-plan-Cgx7v8tJ.d.mts → render-plan-DtkXMN8D.d.mts} +1 -1
  193. package/dist/renderer-client.d.mts +3 -3
  194. package/dist/renderer-client.d.ts +3 -3
  195. package/dist/renderer.d.mts +13 -4
  196. package/dist/renderer.d.ts +13 -4
  197. package/dist/{request-sKayKcop.d.mts → request-DgCkIdcn.d.mts} +4 -2
  198. package/dist/{request-BNWr7r5e.d.ts → request-jF4jwx8f.d.ts} +4 -2
  199. package/dist/request.cjs +3 -3
  200. package/dist/request.d.mts +2 -2
  201. package/dist/request.d.ts +2 -2
  202. package/dist/request.mjs +2 -2
  203. package/dist/{route-rendering-Bx4Auw6Q.d.ts → route-rendering-Bji6S6a_.d.ts} +1 -1
  204. package/dist/{route-rendering-DWFp3Yq4.d.mts → route-rendering-CSBF78Ya.d.mts} +1 -1
  205. package/dist/{router-BK6K42Ij.d.mts → router-B09Ui3Qm.d.mts} +1 -1
  206. package/dist/{router-DnW_2tQi.d.ts → router-CPB9cXtG.d.ts} +1 -1
  207. package/dist/routes.d.mts +1 -1
  208. package/dist/routes.d.ts +1 -1
  209. package/dist/{runtime-DJDaCMd_.d.mts → runtime-CM6E6yuI.d.mts} +1 -1
  210. package/dist/{runtime-CA3Ei5k_.d.ts → runtime-EDMwLdjv.d.ts} +1 -1
  211. package/dist/server-fn.cjs +3 -3
  212. package/dist/server-fn.mjs +2 -2
  213. package/dist/server-plugins.cjs +5 -5
  214. package/dist/server-plugins.d.mts +2 -2
  215. package/dist/server-plugins.d.ts +2 -2
  216. package/dist/server-plugins.mjs +4 -4
  217. package/dist/server-query.cjs +4 -4
  218. package/dist/server-query.mjs +3 -3
  219. package/dist/server.cjs +47 -46
  220. package/dist/server.d.mts +7 -7
  221. package/dist/server.d.ts +7 -7
  222. package/dist/server.mjs +25 -24
  223. package/dist/{spa-router-Mwbd7g2L.d.ts → spa-router-B_N8XgVu.d.ts} +2 -2
  224. package/dist/{spa-router-D6fUA4Rn.d.mts → spa-router-Cgimzfbi.d.mts} +2 -2
  225. package/dist/testing.cjs +5 -5
  226. package/dist/testing.d.mts +1 -1
  227. package/dist/testing.d.ts +1 -1
  228. package/dist/testing.mjs +4 -4
  229. package/dist/theme/server.cjs +4 -4
  230. package/dist/theme/server.mjs +3 -3
  231. package/dist/{utils-BwVcAfUR.d.ts → utils-BNxAKAuT.d.ts} +1 -1
  232. package/dist/{utils-p9Hs-jCc.d.mts → utils-DZciYXYl.d.mts} +1 -1
  233. package/dist/version.cjs +2 -2
  234. package/dist/version.mjs +1 -1
  235. package/dist/vite.cjs +21 -20
  236. package/dist/vite.d.mts +1 -1
  237. package/dist/vite.d.ts +1 -1
  238. package/dist/vite.mjs +20 -19
  239. package/package.json +1 -1
  240. package/dist/chunk-655RLQQL.mjs +0 -43
  241. package/dist/chunk-MRMI32SN.cjs +0 -1157
  242. package/dist/chunk-MT763TDW.cjs +0 -43
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-FUZEBRP3.mjs";
7
7
  import {
8
8
  getCurrentRequestOrNull
9
- } from "./chunk-3KGDJLJK.mjs";
9
+ } from "./chunk-POSPE3IO.mjs";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-LPEX4YW6.mjs";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-CBBLJMR5.mjs";
13
13
  import {
14
14
  resolveFarmRequestURL
15
- } from "./chunk-3KGDJLJK.mjs";
15
+ } from "./chunk-POSPE3IO.mjs";
16
16
  import {
17
17
  __name
18
18
  } from "./chunk-LPEX4YW6.mjs";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-JM5XPKWH.mjs";
10
10
  import {
11
11
  getCurrentRequestOrNull
12
- } from "./chunk-3KGDJLJK.mjs";
12
+ } from "./chunk-POSPE3IO.mjs";
13
13
  import {
14
14
  __name
15
15
  } from "./chunk-LPEX4YW6.mjs";
@@ -20,15 +20,16 @@ async function hydrateFarmDocsAdapterRuntime() {
20
20
  async function hydrateFarmDocsAdapterRuntime() {
21
21
  const runtime = window.__FARM_DOCS_ADAPTER__;
22
22
  if (!runtime) return false;
23
- const FarmDocsAdapterReact = await import(${JSON.stringify(reactModule)});
23
+ // The docs server flags pages whose config holds what its JSON copy cannot (icons,
24
+ // MDX components, callbacks); the adapter restores those from the module itself.
25
+ // Fetch it alongside the adapter rather than after it: they don't depend on each other.
26
+ const [FarmDocsAdapterReact, configModule] = await Promise.all([
27
+ import(${JSON.stringify(reactModule)}),
28
+ runtime.configModule ? ${configModule ? `import(${JSON.stringify(configModule)})` : "undefined"} : undefined,
29
+ ]);
24
30
  if (typeof FarmDocsAdapterReact.hydrateFarmDocs !== "function") {
25
31
  throw new Error("The configured Farm docs adapter does not export hydrateFarmDocs().");
26
32
  }
27
- // The docs server flags pages whose config holds what its JSON copy cannot (icons,
28
- // MDX components, callbacks); the adapter restores those from the module itself.
29
- const configModule = runtime.configModule
30
- ? ${configModule ? `await import(${JSON.stringify(configModule)})` : "undefined"}
31
- : undefined;
32
33
  FarmDocsAdapterReact.hydrateFarmDocs({
33
34
  config: runtime.config || {},
34
35
  data: runtime.data,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useRouter
3
- } from "./chunk-JPNFPAZ4.mjs";
3
+ } from "./chunk-7PEP3BUT.mjs";
4
4
  import {
5
5
  getRouter
6
6
  } from "./chunk-ND2CWPOD.mjs";
@@ -3,18 +3,21 @@
3
3
  var _chunkAI7QMY7Ocjs = require('./chunk-AI7QMY7O.cjs');
4
4
 
5
5
 
6
- var _chunkNICDYKBScjs = require('./chunk-NICDYKBS.cjs');
6
+ var _chunk6XWDE2P2cjs = require('./chunk-6XWDE2P2.cjs');
7
+
8
+
9
+ var _chunkULASELLAcjs = require('./chunk-ULASELLA.cjs');
7
10
 
8
11
 
9
12
  var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
10
13
 
11
14
  // src/headers.ts
12
15
  function headers() {
13
- return new Headers(_chunkNICDYKBScjs.getCurrentRequest.call(void 0, ).headers);
16
+ return new Headers(_chunk6XWDE2P2cjs.getCurrentRequest.call(void 0, ).headers);
14
17
  }
15
18
  _chunkS3JO3N4Hcjs.__name.call(void 0, headers, "headers");
16
19
  function cookies() {
17
- const cookieHeader = _chunkNICDYKBScjs.getCurrentRequest.call(void 0, ).headers.get("cookie") || "";
20
+ const cookieHeader = _chunk6XWDE2P2cjs.getCurrentRequest.call(void 0, ).headers.get("cookie") || "";
18
21
  const parsed = _chunkAI7QMY7Ocjs.parseRequestCookieHeader.call(void 0, cookieHeader);
19
22
  return {
20
23
  get(name) {
@@ -35,8 +38,13 @@ function cookies() {
35
38
  };
36
39
  }
37
40
  _chunkS3JO3N4Hcjs.__name.call(void 0, cookies, "cookies");
41
+ function getCspNonce() {
42
+ return _chunkULASELLAcjs._resolveCurrentCspNonce.call(void 0, );
43
+ }
44
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getCspNonce, "getCspNonce");
45
+
38
46
 
39
47
 
40
48
 
41
49
 
42
- exports.headers = headers; exports.cookies = cookies;
50
+ exports.headers = headers; exports.cookies = cookies; exports.getCspNonce = getCspNonce;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MiddlewareManager
3
- } from "./chunk-NFMDCAOS.mjs";
3
+ } from "./chunk-JCKYH4LG.mjs";
4
4
  import {
5
5
  matchesMiddlewarePredicate
6
6
  } from "./chunk-HZFM2LWQ.mjs";
@@ -1,7 +1,9 @@
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 _chunkEUV4YR3Vcjs = require('./chunk-EUV4YR3V.cjs');
4
+
5
+
6
+ var _chunkSGBJ247Qcjs = require('./chunk-SGBJ247Q.cjs');
5
7
 
6
8
 
7
9
  var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
@@ -159,6 +161,7 @@ var PAGE_CHECK_DROPPED_HEADERS = /* @__PURE__ */ new Set([
159
161
  "if-unmodified-since",
160
162
  "range"
161
163
  ]);
164
+ var PAGE_SEGMENT_MARKER = /<div\s[^>]*\bid=["']?__farm_page__["'\s>]/i;
162
165
  async function anonymousVisitorOpensPage(options, url, targetPathname) {
163
166
  const pageUrl = new URL(url);
164
167
  pageUrl.pathname = targetPathname;
@@ -167,6 +170,7 @@ async function anonymousVisitorOpensPage(options, url, targetPathname) {
167
170
  if (!PAGE_CHECK_DROPPED_HEADERS.has(name.toLowerCase())) headers.append(name, value);
168
171
  }
169
172
  headers.set("accept", "text/html");
173
+ headers.set(_chunkSGBJ247Qcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER, _chunkSGBJ247Qcjs._getFarmMarkdownPageCheckToken.call(void 0, ));
170
174
  const response = await options.renderPage(
171
175
  new Request(pageUrl, {
172
176
  method: "GET",
@@ -175,9 +179,12 @@ async function anonymousVisitorOpensPage(options, url, targetPathname) {
175
179
  signal: options.request.signal
176
180
  })
177
181
  );
178
- void _optionalChain([response, 'access', _9 => _9.body, 'optionalAccess', _10 => _10.cancel, 'call', _11 => _11(), 'access', _12 => _12.catch, 'call', _13 => _13(() => {
179
- })]);
180
- return response.status >= 200 && response.status < 300 && Boolean(_optionalChain([response, 'access', _14 => _14.headers, 'access', _15 => _15.get, 'call', _16 => _16("content-type"), 'optionalAccess', _17 => _17.toLowerCase, 'call', _18 => _18(), 'access', _19 => _19.includes, 'call', _20 => _20("text/html")]));
182
+ if (response.status < 200 || response.status >= 300 || !_optionalChain([response, 'access', _9 => _9.headers, 'access', _10 => _10.get, 'call', _11 => _11("content-type"), 'optionalAccess', _12 => _12.toLowerCase, 'call', _13 => _13(), 'access', _14 => _14.includes, 'call', _15 => _15("text/html")])) {
183
+ void _optionalChain([response, 'access', _16 => _16.body, 'optionalAccess', _17 => _17.cancel, 'call', _18 => _18(), 'access', _19 => _19.catch, 'call', _20 => _20(() => {
184
+ })]);
185
+ return false;
186
+ }
187
+ return PAGE_SEGMENT_MARKER.test(await response.text());
181
188
  }
182
189
  _chunkS3JO3N4Hcjs.__name.call(void 0, anonymousVisitorOpensPage, "anonymousVisitorOpensPage");
183
190
  function hasOnlyAnonymousHeaders(headers) {
@@ -197,7 +204,7 @@ async function createFarmMarkdownSourceResponse(options) {
197
204
  }
198
205
  const url = new URL(options.request.url);
199
206
  const hasMarkdownExtension = url.pathname.toLowerCase().endsWith(".md");
200
- if (!hasMarkdownExtension && !_chunkEUV4YR3Vcjs.requestAcceptsMarkdown.call(void 0, options.request.headers.get("accept"))) {
207
+ if (!hasMarkdownExtension && !_chunkSGBJ247Qcjs.requestAcceptsMarkdown.call(void 0, options.request.headers.get("accept"))) {
201
208
  return null;
202
209
  }
203
210
  const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname);
@@ -222,8 +229,18 @@ async function createFarmMarkdownSourceResponse(options) {
222
229
  })
223
230
  );
224
231
  if (publicResponse.headers.get("X-Farm-Markdown-Route") === targetPathname && publicResponse.headers.has("X-Farm-Markdown-Source")) {
225
- publicSourceResponses.add(publicResponse);
226
- return publicResponse;
232
+ let response = publicResponse;
233
+ if (options.request.headers.has("cookie") || options.request.headers.has("authorization")) {
234
+ const headers2 = new Headers(publicResponse.headers);
235
+ headers2.set("Cache-Control", "private, no-store");
236
+ response = new Response(publicResponse.body, {
237
+ status: publicResponse.status,
238
+ statusText: publicResponse.statusText,
239
+ headers: headers2
240
+ });
241
+ }
242
+ publicSourceResponses.add(response);
243
+ return response;
227
244
  }
228
245
  await _optionalChain([publicResponse, 'access', _23 => _23.body, 'optionalAccess', _24 => _24.cancel, 'call', _25 => _25()]);
229
246
  if (!hasMarkdownExtension) return null;
@@ -249,7 +266,7 @@ async function createFarmMarkdownSourceResponse(options) {
249
266
  if (!hasMarkdownExtension) {
250
267
  headers.set("Vary", "Accept");
251
268
  }
252
- return _chunkEUV4YR3Vcjs.createFarmMarkdownViewResponse.call(void 0, {
269
+ return _chunkSGBJ247Qcjs.createFarmMarkdownViewResponse.call(void 0, {
253
270
  request: options.request,
254
271
  requestUrl: url,
255
272
  markdown: source.source,
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkEMMQ64QWcjs = require('./chunk-EMMQ64QW.cjs');
3
+ var _chunkTYJALEHQcjs = require('./chunk-TYJALEHQ.cjs');
4
4
 
5
5
 
6
6
  var _chunkFWE7LEQCcjs = require('./chunk-FWE7LEQC.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 = _chunkEMMQ64QWcjs.useRouter.call(void 0, );
16
+ const router = _chunkTYJALEHQcjs.useRouter.call(void 0, );
17
17
  return {
18
18
  push: router.push,
19
19
  replace: router.replace,
@@ -31,11 +31,11 @@ function useRouter2() {
31
31
  }
32
32
  _chunkS3JO3N4Hcjs.__name.call(void 0, useRouter2, "useRouter");
33
33
  function usePathname() {
34
- return _chunkEMMQ64QWcjs.useRouter.call(void 0, ).pathname;
34
+ return _chunkTYJALEHQcjs.useRouter.call(void 0, ).pathname;
35
35
  }
36
36
  _chunkS3JO3N4Hcjs.__name.call(void 0, usePathname, "usePathname");
37
37
  function useSearchParams() {
38
- return _chunkEMMQ64QWcjs.useRouter.call(void 0, ).searchParams;
38
+ return _chunkTYJALEHQcjs.useRouter.call(void 0, ).searchParams;
39
39
  }
40
40
  _chunkS3JO3N4Hcjs.__name.call(void 0, useSearchParams, "useSearchParams");
41
41
 
@@ -2,7 +2,7 @@ import {
2
2
  FARM_DEFAULT_MCP_DESCRIPTION,
3
3
  FARM_DEFAULT_MCP_PROTOCOL_VERSIONS,
4
4
  FARM_DEFAULT_MCP_TOOLS
5
- } from "./chunk-UH6QN5NL.mjs";
5
+ } from "./chunk-P664ZVTV.mjs";
6
6
  import {
7
7
  stripFarmBasePath
8
8
  } from "./chunk-4RB44K6Z.mjs";
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunk4WQ6PGSJcjs = require('./chunk-4WQ6PGSJ.cjs');
3
+ var _chunkWEW2JVA4cjs = require('./chunk-WEW2JVA4.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunkEUV4YR3Vcjs = require('./chunk-EUV4YR3V.cjs');
7
+ var _chunkSGBJ247Qcjs = require('./chunk-SGBJ247Q.cjs');
8
8
 
9
9
 
10
10
 
@@ -108,10 +108,10 @@ function collectFarmDefaultMCPPages(sources, options) {
108
108
  for (const source of sources) {
109
109
  const module = isRecord(source.module) ? source.module : void 0;
110
110
  if (_optionalChain([module, 'optionalAccess', _ => _.__farmRouteGuard])) continue;
111
- if (!_chunkEUV4YR3Vcjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, source.pattern)) continue;
111
+ if (!_chunkSGBJ247Qcjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, source.pattern)) continue;
112
112
  readable.push({ pattern: source.pattern, metadata: _optionalChain([module, 'optionalAccess', _2 => _2.metadata]) });
113
113
  }
114
- return _chunk4WQ6PGSJcjs.collectFarmLlmsTxtPages.call(void 0, readable, {
114
+ return _chunkWEW2JVA4cjs.collectFarmLlmsTxtPages.call(void 0, readable, {
115
115
  origin: options.origin,
116
116
  basePath: options.basePath,
117
117
  markdown: options.markdown
@@ -121,7 +121,7 @@ function collectFarmDefaultMCPPages(sources, options) {
121
121
  url: `${options.origin}${_chunkI57LW5VZcjs.applyFarmBasePath.call(void 0, page.path, options.basePath)}`,
122
122
  ...page.description ? { description: page.description } : {},
123
123
  markdownUrl: `${options.origin}${_chunkI57LW5VZcjs.applyFarmBasePath.call(void 0,
124
- _chunkEUV4YR3Vcjs.getFarmMarkdownMirrorPath.call(void 0, page.path),
124
+ _chunkSGBJ247Qcjs.getFarmMarkdownMirrorPath.call(void 0, page.path),
125
125
  options.basePath
126
126
  )}`
127
127
  }));
@@ -2,7 +2,7 @@ import {
2
2
  getFarmMarkdownMirrorPath,
3
3
  isFarmMarkdownMirrorExposed,
4
4
  matchesFarmMarkdownRoutePattern
5
- } from "./chunk-WWIKMBRN.mjs";
5
+ } from "./chunk-VNGH5MLF.mjs";
6
6
  import {
7
7
  FARM_INTERNAL_READ_HEADER
8
8
  } from "./chunk-MVL2RAJW.mjs";
@@ -4,7 +4,7 @@ import {
4
4
  _runServerFunctionForCaller,
5
5
  createServerFn,
6
6
  createServerFunctionDescriptor
7
- } from "./chunk-RRMVL6CJ.mjs";
7
+ } from "./chunk-W36M2BQ4.mjs";
8
8
  import {
9
9
  createFarmServerQueryResult
10
10
  } from "./chunk-KGB5UXJJ.mjs";
@@ -2033,6 +2033,21 @@ function resolveIntegrationMiddlewareParams(entry, pathname, config) {
2033
2033
  return null;
2034
2034
  }
2035
2035
  __name(resolveIntegrationMiddlewareParams, "resolveIntegrationMiddlewareParams");
2036
+ function integrationMiddlewareMayHandlePath(integrations, pathname, catchAllProbe) {
2037
+ if (!integrations) return false;
2038
+ const covers = /* @__PURE__ */ __name((entry) => resolveIntegrationMiddlewareParams(entry, pathname, void 0) !== null, "covers");
2039
+ return Object.values(integrations).some(
2040
+ (integration) => isFarmIntegration(integration) && (integration.middleware || []).some((entry) => {
2041
+ if (catchAllProbe === void 0) return covers(entry);
2042
+ if (!entry.matcher) return false;
2043
+ const specific = (Array.isArray(entry.matcher) ? entry.matcher : [entry.matcher]).filter(
2044
+ (matcher) => resolveIntegrationMiddlewareParams({ matcher }, catchAllProbe, void 0) === null
2045
+ );
2046
+ return specific.length > 0 && covers({ matcher: specific });
2047
+ })
2048
+ );
2049
+ }
2050
+ __name(integrationMiddlewareMayHandlePath, "integrationMiddlewareMayHandlePath");
2036
2051
  var FARM_INTEGRATION_API_BASE_PATH_KEY = "__farmAPIServerBasePath";
2037
2052
  var integrationAPIPathnames = /* @__PURE__ */ new WeakMap();
2038
2053
  function getIntegrationAPIPathnames(config) {
@@ -2183,5 +2198,6 @@ export {
2183
2198
  getRegisteredIntegrationAPIManifest,
2184
2199
  dispatchIntegrationRequest,
2185
2200
  dispatchIntegrationRequests,
2201
+ integrationMiddlewareMayHandlePath,
2186
2202
  FARM_INTEGRATION_API_BASE_PATH_KEY
2187
2203
  };
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-SAXPH6G5.mjs";
7
7
  import {
8
8
  resolveFarmRequestURL
9
- } from "./chunk-3KGDJLJK.mjs";
9
+ } from "./chunk-POSPE3IO.mjs";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-LPEX4YW6.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createFarmMarkdownRouteModule
3
- } from "./chunk-TPLJVC7E.mjs";
3
+ } from "./chunk-QFW2IH5E.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-LPEX4YW6.mjs";
@@ -20,15 +20,16 @@ async function hydrateFarmDocsAdapterRuntime() {
20
20
  async function hydrateFarmDocsAdapterRuntime() {
21
21
  const runtime = window.__FARM_DOCS_ADAPTER__;
22
22
  if (!runtime) return false;
23
- const FarmDocsAdapterReact = await import(${JSON.stringify(reactModule)});
23
+ // The docs server flags pages whose config holds what its JSON copy cannot (icons,
24
+ // MDX components, callbacks); the adapter restores those from the module itself.
25
+ // Fetch it alongside the adapter rather than after it: they don't depend on each other.
26
+ const [FarmDocsAdapterReact, configModule] = await Promise.all([
27
+ import(${JSON.stringify(reactModule)}),
28
+ runtime.configModule ? ${configModule ? `import(${JSON.stringify(configModule)})` : "undefined"} : undefined,
29
+ ]);
24
30
  if (typeof FarmDocsAdapterReact.hydrateFarmDocs !== "function") {
25
31
  throw new Error("The configured Farm docs adapter does not export hydrateFarmDocs().");
26
32
  }
27
- // The docs server flags pages whose config holds what its JSON copy cannot (icons,
28
- // MDX components, callbacks); the adapter restores those from the module itself.
29
- const configModule = runtime.configModule
30
- ? ${configModule ? `await import(${JSON.stringify(configModule)})` : "undefined"}
31
- : undefined;
32
33
  FarmDocsAdapterReact.hydrateFarmDocs({
33
34
  config: runtime.config || {},
34
35
  data: runtime.data,
@@ -7,7 +7,7 @@ import {
7
7
  parseMiddlewareCookieHeader,
8
8
  serializeMiddlewareCookie,
9
9
  serializeMiddlewareCookieDeletion
10
- } from "./chunk-J3ANCZKA.mjs";
10
+ } from "./chunk-SKVTP5PR.mjs";
11
11
  import {
12
12
  compileMiddlewareConfig,
13
13
  compileMiddlewareRoute,
@@ -41,7 +41,7 @@ import {
41
41
  } from "./chunk-CBBLJMR5.mjs";
42
42
  import {
43
43
  resolveFarmRequestURL
44
- } from "./chunk-3KGDJLJK.mjs";
44
+ } from "./chunk-POSPE3IO.mjs";
45
45
  import {
46
46
  stripFarmLocaleFromPathname
47
47
  } from "./chunk-L3KT7IXV.mjs";
@@ -12,7 +12,7 @@ var _chunkDVM4FKZLcjs = require('./chunk-DVM4FKZL.cjs');
12
12
  var _chunkOX6O6WVAcjs = require('./chunk-OX6O6WVA.cjs');
13
13
 
14
14
 
15
- var _chunkNICDYKBScjs = require('./chunk-NICDYKBS.cjs');
15
+ var _chunk6XWDE2P2cjs = require('./chunk-6XWDE2P2.cjs');
16
16
 
17
17
 
18
18
  var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
@@ -41,7 +41,7 @@ function createRedirectsPlugin(redirects, {
41
41
  if (overrideBeforeRequest) {
42
42
  await overrideBeforeRequest(req, res, context);
43
43
  }
44
- const url = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req);
44
+ const url = _chunk6XWDE2P2cjs.resolveFarmRequestURL.call(void 0, req);
45
45
  const routePath = _chunkDVM4FKZLcjs.resolveConfigRoutePathname.call(void 0, url.pathname, i18n);
46
46
  const pathname = routePath.pathname;
47
47
  for (const { redirect, pattern } of compiledRedirects) {
@@ -153,7 +153,7 @@ function createHeadersPlugin(headers, {
153
153
  if (overrideBeforeRequest) {
154
154
  await overrideBeforeRequest(req, res, context);
155
155
  }
156
- const url = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req);
156
+ const url = _chunk6XWDE2P2cjs.resolveFarmRequestURL.call(void 0, req);
157
157
  const pathname = _chunkDVM4FKZLcjs.resolveConfigRoutePathname.call(void 0, url.pathname, i18n).pathname;
158
158
  const matchedHeaders = compiledHeaders.filter(({ pattern }) => pattern.regex.test(pathname)).map(({ config }) => config.headers);
159
159
  applyResponseHeaders(res, matchedHeaders);
@@ -7,7 +7,7 @@ var _chunkM7MKQXAFcjs = require('./chunk-M7MKQXAF.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkG2TEB74Scjs = require('./chunk-G2TEB74S.cjs');
10
+ var _chunkZXH4TS3Fcjs = require('./chunk-ZXH4TS3F.cjs');
11
11
 
12
12
 
13
13
 
@@ -41,7 +41,7 @@ var _chunkKNBBQHO2cjs = require('./chunk-KNBBQHO2.cjs');
41
41
  var _chunkOX6O6WVAcjs = require('./chunk-OX6O6WVA.cjs');
42
42
 
43
43
 
44
- var _chunkNICDYKBScjs = require('./chunk-NICDYKBS.cjs');
44
+ var _chunk6XWDE2P2cjs = require('./chunk-6XWDE2P2.cjs');
45
45
 
46
46
 
47
47
  var _chunkBIDYX3SLcjs = require('./chunk-BIDYX3SL.cjs');
@@ -57,7 +57,7 @@ var _CookieJarImpl = class _CookieJarImpl {
57
57
  constructor(req, res) {
58
58
  this.req = req;
59
59
  this.res = res;
60
- this.cookies = _chunkG2TEB74Scjs.parseMiddlewareCookieHeader.call(void 0, req.headers.cookie);
60
+ this.cookies = _chunkZXH4TS3Fcjs.parseMiddlewareCookieHeader.call(void 0, req.headers.cookie);
61
61
  const existing = res.getHeader("Set-Cookie");
62
62
  this.setCookies = Array.isArray(existing) ? existing.map(String) : existing === void 0 ? [] : [String(existing)];
63
63
  }
@@ -66,13 +66,13 @@ var _CookieJarImpl = class _CookieJarImpl {
66
66
  }
67
67
  set(name, value, options = {}) {
68
68
  this.cookies[name] = value;
69
- const cookieString = _chunkG2TEB74Scjs.serializeMiddlewareCookie.call(void 0, name, value, options);
69
+ const cookieString = _chunkZXH4TS3Fcjs.serializeMiddlewareCookie.call(void 0, name, value, options);
70
70
  this.setCookies.push(cookieString);
71
71
  this.res.setHeader("Set-Cookie", this.setCookies);
72
72
  }
73
73
  delete(name, options = {}) {
74
74
  delete this.cookies[name];
75
- this.setCookies.push(_chunkG2TEB74Scjs.serializeMiddlewareCookieDeletion.call(void 0, name, options));
75
+ this.setCookies.push(_chunkZXH4TS3Fcjs.serializeMiddlewareCookieDeletion.call(void 0, name, options));
76
76
  this.res.setHeader("Set-Cookie", this.setCookies);
77
77
  }
78
78
  getAll() {
@@ -82,7 +82,7 @@ var _CookieJarImpl = class _CookieJarImpl {
82
82
  _chunkS3JO3N4Hcjs.__name.call(void 0, _CookieJarImpl, "CookieJarImpl");
83
83
  var CookieJarImpl = _CookieJarImpl;
84
84
  function createContext(req, res, viteServer, parent, server, toRoutePathname) {
85
- const url = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([server, 'optionalAccess', _ => _.trustProxy]) });
85
+ const url = _chunk6XWDE2P2cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([server, 'optionalAccess', _ => _.trustProxy]) });
86
86
  const headers = /* @__PURE__ */ new Map();
87
87
  const data = _optionalChain([parent, 'optionalAccess', _2 => _2.data]) ? new Map(parent.data) : /* @__PURE__ */ new Map();
88
88
  const locals = _optionalChain([parent, 'optionalAccess', _3 => _3.locals]) ? new Map(parent.locals) : /* @__PURE__ */ new Map();
@@ -337,7 +337,7 @@ var _MiddlewareManager = class _MiddlewareManager {
337
337
  _chunkSHLXACIOcjs.toFileModuleUrl.call(void 0, filePath)
338
338
  );
339
339
  }
340
- const normalized = _chunkG2TEB74Scjs.normalizeMiddlewareModule.call(void 0, module, routePath);
340
+ const normalized = _chunkZXH4TS3Fcjs.normalizeMiddlewareModule.call(void 0, module, routePath);
341
341
  if (!normalized) {
342
342
  throw new Error("must export a default handler or a named middleware handler");
343
343
  }
@@ -359,7 +359,7 @@ var _MiddlewareManager = class _MiddlewareManager {
359
359
  * Execute middleware for a request
360
360
  */
361
361
  async execute(req, res) {
362
- const url = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _6 => _6.server, 'optionalAccess', _7 => _7.trustProxy]) });
362
+ const url = _chunk6XWDE2P2cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _6 => _6.server, 'optionalAccess', _7 => _7.trustProxy]) });
363
363
  const pathname = url.pathname;
364
364
  const toRoutePathname = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (value) => _optionalChain([this, 'access', _8 => _8.i18n, 'optionalAccess', _9 => _9.enabled]) ? _chunkBIDYX3SLcjs.stripFarmLocaleFromPathname.call(void 0, value, this.i18n) : _chunkI57LW5VZcjs.stripFarmBasePath.call(void 0, value, _nullishCoalesce(_optionalChain([this, 'access', _10 => _10.i18n, 'optionalAccess', _11 => _11.basePath]), () => ( "/"))), "toRoutePathname");
365
365
  const routePathname = toRoutePathname(pathname);
@@ -407,7 +407,7 @@ var _MiddlewareManager = class _MiddlewareManager {
407
407
  for (; ; ) {
408
408
  for (const entry of pass) yield { ...entry, pathname: passPathname };
409
409
  const rewrittenPathname = toRoutePathname(
410
- _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, { trustProxy }).pathname
410
+ _chunk6XWDE2P2cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy }).pathname
411
411
  );
412
412
  if (rewrittenPathname === passPathname) return;
413
413
  passPathname = rewrittenPathname;
@@ -3,7 +3,7 @@ import {
3
3
  parseMiddlewareCookieHeader,
4
4
  serializeMiddlewareCookie,
5
5
  serializeMiddlewareCookieDeletion
6
- } from "./chunk-J3ANCZKA.mjs";
6
+ } from "./chunk-SKVTP5PR.mjs";
7
7
  import {
8
8
  compileMiddlewareConfig,
9
9
  compileMiddlewareRoute,
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// package.json
2
- var version = "0.1.37";
2
+ var version = "0.1.38";
3
3
 
4
4
  // src/version.ts
5
5
  var FARM_VERSION = version;
@@ -27,7 +27,7 @@ var _chunkE2ROOWQCcjs = require('./chunk-E2ROOWQC.cjs');
27
27
  var _chunkJSROZYYOcjs = require('./chunk-JSROZYYO.cjs');
28
28
 
29
29
 
30
- var _chunkUJZLSXUBcjs = require('./chunk-UJZLSXUB.cjs');
30
+ var _chunkVU6AAZVYcjs = require('./chunk-VU6AAZVY.cjs');
31
31
 
32
32
 
33
33
  var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
@@ -119,7 +119,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, withTimeout, "withTimeout");
119
119
  var formatSeconds = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (ms) => ms < 1e3 ? `${ms}ms` : `${Number((ms / 1e3).toFixed(1))}s`, "formatSeconds");
120
120
  function collectSchemaOwners(config) {
121
121
  const owners = [];
122
- const integrationSchemas = _chunkUJZLSXUBcjs.getIntegrationSchemas.call(void 0, config.integrations);
122
+ const integrationSchemas = _chunkVU6AAZVYcjs.getIntegrationSchemas.call(void 0, config.integrations);
123
123
  let integrationClient;
124
124
  for (const [name, schema] of Object.entries(integrationSchemas)) {
125
125
  owners.push({
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.1.37";
2
+ var version = "0.1.38";
3
3
 
4
4
  // src/version.ts
5
5
  var FARM_VERSION = version;
@@ -3,7 +3,10 @@ import {
3
3
  } from "./chunk-JM5XPKWH.mjs";
4
4
  import {
5
5
  getCurrentRequest
6
- } from "./chunk-3KGDJLJK.mjs";
6
+ } from "./chunk-POSPE3IO.mjs";
7
+ import {
8
+ _resolveCurrentCspNonce
9
+ } from "./chunk-QRKIMN7T.mjs";
7
10
  import {
8
11
  __name
9
12
  } from "./chunk-LPEX4YW6.mjs";
@@ -35,8 +38,13 @@ function cookies() {
35
38
  };
36
39
  }
37
40
  __name(cookies, "cookies");
41
+ function getCspNonce() {
42
+ return _resolveCurrentCspNonce();
43
+ }
44
+ __name(getCspNonce, "getCspNonce");
38
45
 
39
46
  export {
40
47
  headers,
41
- cookies
48
+ cookies,
49
+ getCspNonce
42
50
  };
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkG2TEB74Scjs = require('./chunk-G2TEB74S.cjs');
6
+ var _chunkZXH4TS3Fcjs = require('./chunk-ZXH4TS3F.cjs');
7
7
 
8
8
 
9
9
 
@@ -83,19 +83,19 @@ var WebResponseHeaderMap = _WebResponseHeaderMap;
83
83
  var _WebCookieJar = class _WebCookieJar {
84
84
  constructor(request, headers) {
85
85
  this.headers = headers;
86
- this.cookies = _chunkG2TEB74Scjs.parseMiddlewareCookieHeader.call(void 0, request.headers.get("cookie"));
86
+ this.cookies = _chunkZXH4TS3Fcjs.parseMiddlewareCookieHeader.call(void 0, request.headers.get("cookie"));
87
87
  }
88
88
  get(name) {
89
89
  return this.cookies[name];
90
90
  }
91
91
  set(name, value, options = {}) {
92
92
  this.cookies[name] = value;
93
- const cookieString = _chunkG2TEB74Scjs.serializeMiddlewareCookie.call(void 0, name, value, options);
93
+ const cookieString = _chunkZXH4TS3Fcjs.serializeMiddlewareCookie.call(void 0, name, value, options);
94
94
  this.headers.appendSetCookie(cookieString);
95
95
  }
96
96
  delete(name, options = {}) {
97
97
  delete this.cookies[name];
98
- this.headers.appendSetCookie(_chunkG2TEB74Scjs.serializeMiddlewareCookieDeletion.call(void 0, name, options));
98
+ this.headers.appendSetCookie(_chunkZXH4TS3Fcjs.serializeMiddlewareCookieDeletion.call(void 0, name, options));
99
99
  }
100
100
  getAll() {
101
101
  return { ...this.cookies };
@@ -426,7 +426,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeConfigMiddleware, "normalizeConfi
426
426
  function normalizeFileMiddleware(modules = []) {
427
427
  const entries = [];
428
428
  for (const moduleEntry of modules) {
429
- const normalized = _chunkG2TEB74Scjs.normalizeMiddlewareModule.call(void 0, moduleEntry.module, moduleEntry.path);
429
+ const normalized = _chunkZXH4TS3Fcjs.normalizeMiddlewareModule.call(void 0, moduleEntry.module, moduleEntry.path);
430
430
  if (!normalized) {
431
431
  continue;
432
432
  }