@farm.js/core 0.1.37 → 0.1.39

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 (250) hide show
  1. package/dist/{agent-mcp-BC0bAGVF.d.mts → agent-mcp-BhneNPb4.d.mts} +1 -1
  2. package/dist/{agent-mcp-jyDHbQKe.d.ts → agent-mcp-HcTYQmNX.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 +3 -3
  6. package/dist/agent-runtime.d.mts +1 -1
  7. package/dist/agent-runtime.d.ts +1 -1
  8. package/dist/agent-runtime.mjs +2 -2
  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-CKO3iN1c.d.ts → app-CMkoghtp.d.ts} +21 -3
  24. package/dist/{app-Cbkj9ufe.d.mts → app-DVzmmbNO.d.mts} +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-2ZYGC6SS.cjs +576 -0
  30. package/dist/{chunk-75X755YZ.cjs → chunk-34UCJRQO.cjs} +2 -2
  31. package/dist/{chunk-CVH2BXPY.cjs → chunk-3LOLJTFV.cjs} +6 -6
  32. package/dist/{chunk-4GPOC4LN.cjs → chunk-472NCAZ7.cjs} +3 -3
  33. package/dist/{chunk-O6WAEAX3.mjs → chunk-5BWWFHR2.mjs} +70 -15
  34. package/dist/{chunk-6LGFV2CQ.cjs → chunk-5OKBARDN.cjs} +2 -2
  35. package/dist/{chunk-3IP27TCG.cjs → chunk-5PWXMJOH.cjs} +19 -19
  36. package/dist/{chunk-WT4TGLXT.cjs → chunk-5ULKUBIA.cjs} +6 -6
  37. package/dist/{chunk-WRPHYQVY.mjs → chunk-677THUVP.mjs} +1 -1
  38. package/dist/chunk-6BK3K2GB.mjs +318 -0
  39. package/dist/{chunk-HEVMCTSR.mjs → chunk-6HB6V3R7.mjs} +1 -1
  40. package/dist/{chunk-NICDYKBS.cjs → chunk-6XWDE2P2.cjs} +22 -4
  41. package/dist/{chunk-CXEN47J3.mjs → chunk-73WX6PRY.mjs} +25 -0
  42. package/dist/{chunk-EXG5LD6B.mjs → chunk-75HN5IZ3.mjs} +21 -9
  43. package/dist/{chunk-7O5M4UKW.cjs → chunk-A657YSP4.cjs} +2 -2
  44. package/dist/{chunk-LBDP3YT3.mjs → chunk-ARC7I3O2.mjs} +1 -1
  45. package/dist/{chunk-Q5FYSK45.cjs → chunk-AS2VPMEE.cjs} +640 -521
  46. package/dist/{chunk-Z5BEWYVO.mjs → chunk-ATSDUUFK.mjs} +27 -1
  47. package/dist/{chunk-EMMQ64QW.cjs → chunk-B5J2YVG7.cjs} +16 -16
  48. package/dist/{chunk-FWE7LEQC.cjs → chunk-BD3D7EZV.cjs} +4 -4
  49. package/dist/{chunk-Z7LA7MHQ.mjs → chunk-BFJTHYTN.mjs} +1 -1
  50. package/dist/{chunk-UJZLSXUB.cjs → chunk-BWIQR4DH.cjs} +30 -4
  51. package/dist/{chunk-W2YDNK66.cjs → chunk-BXDJXFQG.cjs} +4 -4
  52. package/dist/{chunk-MCIZVNOQ.mjs → chunk-BZHXGVMA.mjs} +1 -1
  53. package/dist/{chunk-7DWNJI73.cjs → chunk-CIOT4HGT.cjs} +37 -19
  54. package/dist/{chunk-KDTBF3UU.mjs → chunk-CNNOLE4O.mjs} +1 -1
  55. package/dist/{chunk-TDNWPAVR.mjs → chunk-CUM5NYL5.mjs} +1 -1
  56. package/dist/{chunk-HITLGIAO.cjs → chunk-CY2ZQ5C6.cjs} +7 -6
  57. package/dist/{chunk-KPFKMDM7.mjs → chunk-EGCTIS5F.mjs} +2 -2
  58. package/dist/{chunk-VR4GD5I3.cjs → chunk-EIPC3FDA.cjs} +12 -4
  59. package/dist/{chunk-B5PFZLKV.cjs → chunk-EKN7NSZO.cjs} +25 -8
  60. package/dist/{chunk-6SJ2KJTA.mjs → chunk-EPYU2EBL.mjs} +1 -1
  61. package/dist/{chunk-LBGILORX.mjs → chunk-GKBWWRBG.mjs} +101 -10
  62. package/dist/{chunk-PTZ2TVNE.cjs → chunk-H5CLOUZS.cjs} +5 -5
  63. package/dist/{chunk-DTSROJ5J.mjs → chunk-HD5CF3OE.mjs} +1 -1
  64. package/dist/{chunk-3A4KGQYI.cjs → chunk-HRETEZ2Z.cjs} +27 -15
  65. package/dist/{chunk-ATWHHSY2.cjs → chunk-HRSAQ23K.cjs} +7 -7
  66. package/dist/{chunk-IAIYV4RZ.mjs → chunk-HXRYZWTA.mjs} +1 -1
  67. package/dist/{chunk-4P6ULFMD.mjs → chunk-HYTZYOW2.mjs} +222 -103
  68. package/dist/{chunk-HMRSWN47.mjs → chunk-INL3THCU.mjs} +1 -1
  69. package/dist/{chunk-FBOJ55OM.mjs → chunk-IVLZZZEI.mjs} +1 -1
  70. package/dist/{chunk-ENLZ4R3Y.mjs → chunk-J7K2NZD6.mjs} +7 -6
  71. package/dist/{chunk-PMQHMWZU.cjs → chunk-JCYYXBAJ.cjs} +3 -3
  72. package/dist/{chunk-K3SAEIM3.mjs → chunk-KTSUBU2E.mjs} +2 -2
  73. package/dist/{chunk-LPFV45AY.cjs → chunk-LMPAPBUA.cjs} +19 -19
  74. package/dist/{chunk-EK4QAEFZ.cjs → chunk-LZESP4IR.cjs} +25 -0
  75. package/dist/{chunk-TW4GYDBJ.mjs → chunk-MLY2RP5R.mjs} +10 -2
  76. package/dist/{chunk-BHY547NB.cjs → chunk-NBBEQLOK.cjs} +9 -9
  77. package/dist/{chunk-WQ7T2263.mjs → chunk-OAHTRMIC.mjs} +3 -3
  78. package/dist/{chunk-HZFM2LWQ.mjs → chunk-P3PLW4FR.mjs} +34 -2
  79. package/dist/{chunk-UH6QN5NL.mjs → chunk-P664ZVTV.mjs} +2 -2
  80. package/dist/{chunk-TE2G5ION.cjs → chunk-PGZDEPTM.cjs} +88 -33
  81. package/dist/{chunk-3KGDJLJK.mjs → chunk-POSPE3IO.mjs} +19 -1
  82. package/dist/{chunk-FGRYBX5X.mjs → chunk-PVZE2JGJ.mjs} +2 -2
  83. package/dist/{chunk-TPLJVC7E.mjs → chunk-QFW2IH5E.mjs} +23 -6
  84. package/dist/{chunk-5BXGGEC7.cjs → chunk-QG775BRV.cjs} +17 -17
  85. package/dist/{chunk-S3VWVTVA.mjs → chunk-QRKIMN7T.mjs} +13 -1
  86. package/dist/chunk-QTXBII4Z.cjs +632 -0
  87. package/dist/{chunk-NQ6QFZWD.cjs → chunk-QUCXCDE2.cjs} +1 -1
  88. package/dist/{chunk-NFMDCAOS.mjs → chunk-QYMZOOC5.mjs} +3 -3
  89. package/dist/{chunk-CI6E3UOH.cjs → chunk-RG4A6LB2.cjs} +7 -7
  90. package/dist/{chunk-LOFKRKO7.cjs → chunk-RVXFINNS.cjs} +113 -22
  91. package/dist/{chunk-7SQ5SGYZ.cjs → chunk-RW63BOV7.cjs} +2 -2
  92. package/dist/{chunk-U6MPZ35Q.cjs → chunk-RWFLWR5J.cjs} +8 -8
  93. package/dist/{chunk-EUV4YR3V.cjs → chunk-SGBJ247Q.cjs} +18 -2
  94. package/dist/{chunk-J3ANCZKA.mjs → chunk-SKVTP5PR.mjs} +1 -1
  95. package/dist/{chunk-YCKO6FRS.mjs → chunk-SOP2EAA6.mjs} +1 -1
  96. package/dist/{chunk-ND2CWPOD.mjs → chunk-TS4JHGUJ.mjs} +1 -1
  97. package/dist/chunk-U6QLDL3G.mjs +576 -0
  98. package/dist/{chunk-OW67PDDS.cjs → chunk-ULASELLA.cjs} +13 -1
  99. package/dist/{chunk-4GWRFP22.cjs → chunk-UPJLHLJU.cjs} +35 -3
  100. package/dist/{chunk-WWIKMBRN.mjs → chunk-VNGH5MLF.mjs} +17 -1
  101. package/dist/{chunk-NNSAQX3U.mjs → chunk-VT4WFRHA.mjs} +1 -1
  102. package/dist/{chunk-JPNFPAZ4.mjs → chunk-VWBHM3F6.mjs} +2 -2
  103. package/dist/{chunk-ADOAUDQ6.cjs → chunk-VXEEATVD.cjs} +2 -2
  104. package/dist/{chunk-RRMVL6CJ.mjs → chunk-W36M2BQ4.mjs} +1 -1
  105. package/dist/{chunk-4WQ6PGSJ.cjs → chunk-WEW2JVA4.cjs} +4 -4
  106. package/dist/{chunk-4E5WBPEG.mjs → chunk-WFRT7JPX.mjs} +8 -533
  107. package/dist/{chunk-VXAWRDK7.mjs → chunk-WLL43JMO.mjs} +1 -1
  108. package/dist/chunk-WW46B6HA.cjs +318 -0
  109. package/dist/{chunk-D3C5LBQY.cjs → chunk-WXJLNP33.cjs} +2 -2
  110. package/dist/{chunk-NDILNQ4L.cjs → chunk-XKG2BLFN.cjs} +2 -2
  111. package/dist/{chunk-6TJITR2B.cjs → chunk-YFYUYWL7.cjs} +870 -751
  112. package/dist/{chunk-XOPOIFTJ.mjs → chunk-YKZRDB5Z.mjs} +25 -7
  113. package/dist/{chunk-K4I4O5TS.mjs → chunk-ZUPXLIGB.mjs} +790 -671
  114. package/dist/{chunk-G2TEB74S.cjs → chunk-ZXH4TS3F.cjs} +2 -2
  115. package/dist/{client-plugins-CV4eJ9De.d.mts → client-plugins-CsCuCLBz.d.mts} +58 -7
  116. package/dist/{client-plugins-C8DjftDF.d.ts → client-plugins-D0ke-Hc8.d.ts} +58 -7
  117. package/dist/client-plugins.d.mts +1 -1
  118. package/dist/client-plugins.d.ts +1 -1
  119. package/dist/client.cjs +7 -7
  120. package/dist/client.d.mts +5 -5
  121. package/dist/client.d.ts +5 -5
  122. package/dist/client.mjs +6 -6
  123. package/dist/config.d.mts +1 -1
  124. package/dist/config.d.ts +1 -1
  125. package/dist/{devtools-KVOY2TCZ.mjs → devtools-5AFIPVUJ.mjs} +8 -6
  126. package/dist/{devtools-JXFQNWSH.cjs → devtools-LW4QQ5J3.cjs} +9 -7
  127. package/dist/docs.cjs +12 -10
  128. package/dist/docs.d.mts +20 -2
  129. package/dist/docs.d.ts +20 -2
  130. package/dist/docs.mjs +11 -9
  131. package/dist/headers.cjs +6 -4
  132. package/dist/headers.d.mts +11 -1
  133. package/dist/headers.d.ts +11 -1
  134. package/dist/headers.mjs +5 -3
  135. package/dist/index.cjs +55 -42
  136. package/dist/index.d.mts +15 -15
  137. package/dist/index.d.ts +15 -15
  138. package/dist/index.mjs +55 -42
  139. package/dist/integrations.cjs +5 -3
  140. package/dist/integrations.d.mts +1 -1
  141. package/dist/integrations.d.ts +1 -1
  142. package/dist/integrations.mjs +4 -2
  143. package/dist/internal/app-markdown-runtime.cjs +3 -3
  144. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  145. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  146. package/dist/internal/app-markdown-runtime.mjs +2 -2
  147. package/dist/internal/build-runtime.cjs +30 -29
  148. package/dist/internal/build-runtime.d.mts +3 -3
  149. package/dist/internal/build-runtime.d.ts +3 -3
  150. package/dist/internal/build-runtime.mjs +29 -28
  151. package/dist/internal/cli-runtime.cjs +11 -9
  152. package/dist/internal/cli-runtime.mjs +10 -8
  153. package/dist/internal/client-error-overlay.cjs +4 -4
  154. package/dist/internal/client-error-overlay.mjs +1 -1
  155. package/dist/internal/compression-runtime.d.mts +1 -1
  156. package/dist/internal/compression-runtime.d.ts +1 -1
  157. package/dist/internal/config-runtime.cjs +9 -7
  158. package/dist/internal/config-runtime.d.mts +2 -2
  159. package/dist/internal/config-runtime.d.ts +2 -2
  160. package/dist/internal/config-runtime.mjs +8 -6
  161. package/dist/internal/docs-precompiled-runtime.cjs +19 -13
  162. package/dist/internal/docs-precompiled-runtime.d.mts +5 -0
  163. package/dist/internal/docs-precompiled-runtime.d.ts +5 -0
  164. package/dist/internal/docs-precompiled-runtime.mjs +14 -8
  165. package/dist/internal/infra-analytics-runtime.cjs +5 -5
  166. package/dist/internal/infra-analytics-runtime.mjs +3 -3
  167. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  168. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  169. package/dist/internal/production-node-env.cjs +6 -2
  170. package/dist/internal/production-node-env.d.mts +10 -1
  171. package/dist/internal/production-node-env.d.ts +10 -1
  172. package/dist/internal/production-node-env.mjs +5 -1
  173. package/dist/internal/production-runtime.cjs +38 -16
  174. package/dist/internal/production-runtime.d.mts +51 -11
  175. package/dist/internal/production-runtime.d.ts +51 -11
  176. package/dist/internal/production-runtime.mjs +40 -18
  177. package/dist/markdown.cjs +8 -2
  178. package/dist/markdown.d.mts +1 -1
  179. package/dist/markdown.d.ts +1 -1
  180. package/dist/markdown.mjs +7 -1
  181. package/dist/middleware.cjs +10 -8
  182. package/dist/middleware.d.mts +24 -4
  183. package/dist/middleware.d.ts +24 -4
  184. package/dist/middleware.mjs +10 -8
  185. package/dist/navigation.cjs +6 -6
  186. package/dist/navigation.d.mts +4 -4
  187. package/dist/navigation.d.ts +4 -4
  188. package/dist/navigation.mjs +5 -5
  189. package/dist/plugin.cjs +23 -22
  190. package/dist/plugin.d.mts +1 -1
  191. package/dist/plugin.d.ts +1 -1
  192. package/dist/plugin.mjs +22 -21
  193. package/dist/{production-runtime-C2kkrPVZ.d.ts → production-runtime-BaI3WHnV.d.ts} +1 -1
  194. package/dist/{production-runtime-Du_FHb2-.d.mts → production-runtime-DfRP0cV0.d.mts} +1 -1
  195. package/dist/query/client.cjs +8 -8
  196. package/dist/query/client.mjs +3 -3
  197. package/dist/{render-plan-BnnPTpus.d.ts → render-plan-CfIdJKAf.d.ts} +1 -1
  198. package/dist/{render-plan-Cgx7v8tJ.d.mts → render-plan-Dg8RBYFa.d.mts} +1 -1
  199. package/dist/renderer-client.cjs +5 -5
  200. package/dist/renderer-client.d.mts +3 -3
  201. package/dist/renderer-client.d.ts +3 -3
  202. package/dist/renderer-client.mjs +2 -2
  203. package/dist/renderer.d.mts +13 -4
  204. package/dist/renderer.d.ts +13 -4
  205. package/dist/{request-BNWr7r5e.d.ts → request-CEbHIIl4.d.ts} +4 -2
  206. package/dist/{request-sKayKcop.d.mts → request-DfE02G_A.d.mts} +4 -2
  207. package/dist/request.cjs +3 -3
  208. package/dist/request.d.mts +2 -2
  209. package/dist/request.d.ts +2 -2
  210. package/dist/request.mjs +2 -2
  211. package/dist/{route-rendering-DWFp3Yq4.d.mts → route-rendering-BHyOfXjD.d.mts} +1 -1
  212. package/dist/{route-rendering-Bx4Auw6Q.d.ts → route-rendering-C4oHbv6C.d.ts} +1 -1
  213. package/dist/{router-BK6K42Ij.d.mts → router-DwhA61SB.d.mts} +1 -1
  214. package/dist/{router-DnW_2tQi.d.ts → router-uRN_29Em.d.ts} +1 -1
  215. package/dist/routes.d.mts +1 -1
  216. package/dist/routes.d.ts +1 -1
  217. package/dist/{runtime-DJDaCMd_.d.mts → runtime-BEdHhN4C.d.mts} +1 -1
  218. package/dist/{runtime-CA3Ei5k_.d.ts → runtime-COk03hmx.d.ts} +1 -1
  219. package/dist/server-fn.cjs +3 -3
  220. package/dist/server-fn.mjs +2 -2
  221. package/dist/server-plugins.cjs +5 -5
  222. package/dist/server-plugins.d.mts +2 -2
  223. package/dist/server-plugins.d.ts +2 -2
  224. package/dist/server-plugins.mjs +4 -4
  225. package/dist/server-query.cjs +4 -4
  226. package/dist/server-query.mjs +3 -3
  227. package/dist/server.cjs +49 -48
  228. package/dist/server.d.mts +7 -7
  229. package/dist/server.d.ts +7 -7
  230. package/dist/server.mjs +27 -26
  231. package/dist/{spa-router-Mwbd7g2L.d.ts → spa-router-DrVOBVGg.d.ts} +2 -2
  232. package/dist/{spa-router-D6fUA4Rn.d.mts → spa-router-w4aFOuyn.d.mts} +2 -2
  233. package/dist/testing.cjs +5 -5
  234. package/dist/testing.d.mts +1 -1
  235. package/dist/testing.d.ts +1 -1
  236. package/dist/testing.mjs +4 -4
  237. package/dist/theme/server.cjs +4 -4
  238. package/dist/theme/server.mjs +3 -3
  239. package/dist/{utils-p9Hs-jCc.d.mts → utils-BtYehqeU.d.mts} +1 -1
  240. package/dist/{utils-BwVcAfUR.d.ts → utils-Dhuqwmd2.d.ts} +1 -1
  241. package/dist/version.cjs +2 -2
  242. package/dist/version.mjs +1 -1
  243. package/dist/vite.cjs +23 -22
  244. package/dist/vite.d.mts +1 -1
  245. package/dist/vite.d.ts +1 -1
  246. package/dist/vite.mjs +22 -21
  247. package/package.json +1 -1
  248. package/dist/chunk-655RLQQL.mjs +0 -43
  249. package/dist/chunk-MRMI32SN.cjs +0 -1157
  250. package/dist/chunk-MT763TDW.cjs +0 -43
@@ -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,
@@ -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);
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  MiddlewareManager
3
- } from "./chunk-NFMDCAOS.mjs";
3
+ } from "./chunk-QYMZOOC5.mjs";
4
4
  import {
5
5
  matchesMiddlewarePredicate
6
- } from "./chunk-HZFM2LWQ.mjs";
6
+ } from "./chunk-P3PLW4FR.mjs";
7
7
  import {
8
8
  resolveFarmI18nConfig
9
9
  } from "./chunk-BCMSYSN2.mjs";
@@ -7,14 +7,14 @@ 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
 
14
14
 
15
15
 
16
16
 
17
- var _chunk4GWRFP22cjs = require('./chunk-4GWRFP22.cjs');
17
+ var _chunkUPJLHLJUcjs = require('./chunk-UPJLHLJU.cjs');
18
18
 
19
19
 
20
20
  var _chunkM2L4MYDQcjs = require('./chunk-M2L4MYDQ.cjs');
@@ -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();
@@ -106,7 +106,7 @@ function createContext(req, res, viteServer, parent, server, toRoutePathname) {
106
106
  response: res,
107
107
  url,
108
108
  pathname: url.pathname,
109
- routePathname: _chunk4GWRFP22cjs.toMiddlewareRoutePathname.call(void 0, url.pathname, toRoutePathname),
109
+ routePathname: _chunkUPJLHLJUcjs.toMiddlewareRoutePathname.call(void 0, url.pathname, toRoutePathname),
110
110
  searchParams: url.searchParams,
111
111
  method: req.method || "GET",
112
112
  params: {},
@@ -142,7 +142,7 @@ function createContext(req, res, viteServer, parent, server, toRoutePathname) {
142
142
  const newUrl = new URL(rewriteUrl, ctx.url);
143
143
  ctx.url = newUrl;
144
144
  ctx.pathname = newUrl.pathname;
145
- ctx.routePathname = _chunk4GWRFP22cjs.toMiddlewareRoutePathname.call(void 0, newUrl.pathname, toRoutePathname);
145
+ ctx.routePathname = _chunkUPJLHLJUcjs.toMiddlewareRoutePathname.call(void 0, newUrl.pathname, toRoutePathname);
146
146
  ctx.searchParams = newUrl.searchParams;
147
147
  ctx.route = newUrl.pathname;
148
148
  req.url = rewriteUrl;
@@ -249,7 +249,7 @@ var _MiddlewareManager = class _MiddlewareManager {
249
249
  for (const [index, entry] of entries.entries()) {
250
250
  const handlers = this.getConfigHandlers(entry);
251
251
  const middlewareConfig = this.toMiddlewareConfig(entry);
252
- _chunk4GWRFP22cjs.compileMiddlewareConfig.call(void 0, middlewareConfig);
252
+ _chunkUPJLHLJUcjs.compileMiddlewareConfig.call(void 0, middlewareConfig);
253
253
  if (handlers.length === 0) {
254
254
  this.globalConfig = middlewareConfig;
255
255
  continue;
@@ -272,7 +272,7 @@ var _MiddlewareManager = class _MiddlewareManager {
272
272
  const discovered = [];
273
273
  await this.discoverInDirectory(appDir, "/", "", discovered);
274
274
  for (const entry of discovered) {
275
- _chunk4GWRFP22cjs.compileMiddlewareRoute.call(void 0, entry.middleware);
275
+ _chunkUPJLHLJUcjs.compileMiddlewareRoute.call(void 0, entry.middleware);
276
276
  middlewareByDirectory.set(entry.location.directory, entry);
277
277
  }
278
278
  }
@@ -337,12 +337,12 @@ 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
  }
344
344
  if (normalized.config) {
345
- _chunk4GWRFP22cjs.compileMiddlewareConfig.call(void 0, normalized.config);
345
+ _chunkUPJLHLJUcjs.compileMiddlewareConfig.call(void 0, normalized.config);
346
346
  }
347
347
  return {
348
348
  path: routePath,
@@ -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);
@@ -381,7 +381,7 @@ var _MiddlewareManager = class _MiddlewareManager {
381
381
  ...this.configMiddleware.map((mw) => ({ mw, routeMatch: { matched: true } })),
382
382
  ...this.middleware.map((mw) => ({
383
383
  mw,
384
- routeMatch: _chunk4GWRFP22cjs.matchesMiddlewareRouteAt.call(void 0, toMiddlewarePathnames(routePathname), mw)
384
+ routeMatch: _chunkUPJLHLJUcjs.matchesMiddlewareRouteAt.call(void 0, toMiddlewarePathnames(routePathname), mw)
385
385
  })).filter((entry) => entry.routeMatch.matched)
386
386
  ];
387
387
  if (applicable.length === 0) {
@@ -407,17 +407,17 @@ 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;
414
414
  const passPathnames = toMiddlewarePathnames(passPathname);
415
- if (globalConfig && !_chunk4GWRFP22cjs.matchesMiddlewareConfigAt.call(void 0, passPathnames, globalConfig, ctx).matched) {
415
+ if (globalConfig && !_chunkUPJLHLJUcjs.matchesMiddlewareConfigAt.call(void 0, passPathnames, globalConfig, ctx).matched) {
416
416
  return;
417
417
  }
418
418
  pass = allMiddleware.filter((mw) => !ran.has(mw)).map((mw) => ({
419
419
  mw,
420
- routeMatch: mw.source === "config" ? { matched: true } : _chunk4GWRFP22cjs.matchesMiddlewareRouteAt.call(void 0, passPathnames, mw)
420
+ routeMatch: mw.source === "config" ? { matched: true } : _chunkUPJLHLJUcjs.matchesMiddlewareRouteAt.call(void 0, passPathnames, mw)
421
421
  })).filter((entry) => entry.routeMatch.matched);
422
422
  }
423
423
  }
@@ -528,7 +528,7 @@ var _MiddlewareManager = class _MiddlewareManager {
528
528
  * Check if pathname matches middleware config
529
529
  */
530
530
  matchesConfig(pathname, config, ctx) {
531
- return _chunk4GWRFP22cjs.matchesMiddlewareConfigAt.call(void 0, this.toMiddlewarePathnames(pathname), config, ctx);
531
+ return _chunkUPJLHLJUcjs.matchesMiddlewareConfigAt.call(void 0, this.toMiddlewarePathnames(pathname), config, ctx);
532
532
  }
533
533
  /**
534
534
  * Reload middleware (for HMR)
@@ -304,6 +304,13 @@ function appendOpenGraph(tags, input, metadataBase, page) {
304
304
  appendMetaProperty(tags, "og:image:alt", image.alt);
305
305
  appendMetaProperty(tags, "og:image:type", image.type);
306
306
  }
307
+ for (const video of normalizeMetadataVideos(openGraph.videos, metadataBase)) {
308
+ appendMetaProperty(tags, "og:video", video.url);
309
+ appendMetaProperty(tags, "og:video:secure_url", video.secureUrl);
310
+ appendMetaProperty(tags, "og:video:type", video.type);
311
+ appendMetaProperty(tags, "og:video:width", video.width);
312
+ appendMetaProperty(tags, "og:video:height", video.height);
313
+ }
307
314
  if (openGraph.type === "article") {
308
315
  appendMetaProperty(tags, "article:published_time", normalizeDate(openGraph.publishedTime));
309
316
  appendMetaProperty(tags, "article:modified_time", normalizeDate(openGraph.modifiedTime));
@@ -432,6 +439,24 @@ function normalizeMetadataImages(value, metadataBase) {
432
439
  }).filter((item) => item !== null);
433
440
  }
434
441
  _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeMetadataImages, "normalizeMetadataImages");
442
+ function normalizeMetadataVideos(value, metadataBase) {
443
+ return normalizeArray(value).map((item) => {
444
+ if (typeof item === "string") {
445
+ return { url: resolveMetadataUrl(item, metadataBase) || item };
446
+ }
447
+ if (!isRecord(item)) return null;
448
+ const url = resolveMetadataUrl(item.url, metadataBase);
449
+ if (!url) return null;
450
+ return {
451
+ url,
452
+ secureUrl: resolveMetadataUrl(item.secureUrl, metadataBase) || void 0,
453
+ width: normalizeNumber(item.width),
454
+ height: normalizeNumber(item.height),
455
+ type: typeof item.type === "string" ? item.type : void 0
456
+ };
457
+ }).filter((item) => item !== null);
458
+ }
459
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeMetadataVideos, "normalizeMetadataVideos");
435
460
  function normalizeArray(value) {
436
461
  if (value == null) return [];
437
462
  return Array.isArray(value) ? value : [value];
@@ -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
  };
@@ -7,7 +7,7 @@ var _chunkD7JTOLFKcjs = require('./chunk-D7JTOLFK.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunk7SQ5SGYZcjs = require('./chunk-7SQ5SGYZ.cjs');
10
+ var _chunkRW63BOV7cjs = require('./chunk-RW63BOV7.cjs');
11
11
 
12
12
 
13
13
  var _chunkLTNGXMQ6cjs = require('./chunk-LTNGXMQ6.cjs');
@@ -149,9 +149,9 @@ function useMutationLifecycle(target, options = {}) {
149
149
  };
150
150
  });
151
151
  const mutationTarget = targetRef.current;
152
- const isAPITarget = _chunk7SQ5SGYZcjs.isAPIRouteRef.call(void 0, mutationTarget);
152
+ const isAPITarget = _chunkRW63BOV7cjs.isAPIRouteRef.call(void 0, mutationTarget);
153
153
  const sharedOptimistic = !preparationFailed && !isAPITarget ? _optionalChain([currentOptions, 'access', _3 => _3.request, 'optionalAccess', _4 => _4.optimistic]) : void 0;
154
- const sharedSnapshots = _optionalChain([sharedOptimistic, 'optionalAccess', _5 => _5.update, 'optionalAccess', _6 => _6.length]) ? _chunk7SQ5SGYZcjs.applyServerFnOptimisticUpdates.call(void 0, sharedOptimistic.update) : [];
154
+ const sharedSnapshots = _optionalChain([sharedOptimistic, 'optionalAccess', _5 => _5.update, 'optionalAccess', _6 => _6.length]) ? _chunkRW63BOV7cjs.applyServerFnOptimisticUpdates.call(void 0, sharedOptimistic.update) : [];
155
155
  try {
156
156
  if (preparationFailed) throw preparationError;
157
157
  let data;
@@ -178,9 +178,9 @@ function useMutationLifecycle(target, options = {}) {
178
178
  throw cause;
179
179
  }
180
180
  }
181
- _chunk7SQ5SGYZcjs.settleServerFnOptimisticUpdates.call(void 0, sharedSnapshots, "commit");
181
+ _chunkRW63BOV7cjs.settleServerFnOptimisticUpdates.call(void 0, sharedSnapshots, "commit");
182
182
  if (!isAPITarget && _optionalChain([currentOptions, 'access', _9 => _9.request, 'optionalAccess', _10 => _10.invalidate])) {
183
- for (const key of _chunk7SQ5SGYZcjs.resolveServerFnInvalidateTargets.call(void 0, currentOptions.request.invalidate)) {
183
+ for (const key of _chunkRW63BOV7cjs.resolveServerFnInvalidateTargets.call(void 0, currentOptions.request.invalidate)) {
184
184
  _chunkZEG3OPIBcjs.notifyFarmCacheInvalidation.call(void 0, key);
185
185
  }
186
186
  }
@@ -215,7 +215,7 @@ function useMutationLifecycle(target, options = {}) {
215
215
  }
216
216
  return data;
217
217
  } catch (cause) {
218
- _chunk7SQ5SGYZcjs.settleServerFnOptimisticUpdates.call(void 0,
218
+ _chunkRW63BOV7cjs.settleServerFnOptimisticUpdates.call(void 0,
219
219
  sharedSnapshots,
220
220
  _optionalChain([sharedOptimistic, 'optionalAccess', _11 => _11.rollbackOnError]) ? "rollback" : "invalidate"
221
221
  );
@@ -391,7 +391,7 @@ function useFetcher(target, options = {}) {
391
391
  const Form = _react.useMemo.call(void 0, () => {
392
392
  const FetcherForm = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, ({ action, method, encType, onSubmit, ...props }) => {
393
393
  const targetValue = targetRef.current;
394
- const metadata = _chunk7SQ5SGYZcjs.getAPIRouteRefMetadata.call(void 0, targetValue);
394
+ const metadata = _chunkRW63BOV7cjs.getAPIRouteRefMetadata.call(void 0, targetValue);
395
395
  const nativeAction = _nullishCoalesce(action, () => ( resolveFetcherFormAction(targetValue, metadata)));
396
396
  const nativeMethod = _nullishCoalesce(method, () => ( (metadata && (metadata.method === "GET" || metadata.method === "POST") ? metadata.method.toLowerCase() : metadata ? "post" : void 0)));
397
397
  const functionAction = typeof nativeAction === "function";
@@ -460,10 +460,10 @@ function mapFetcherFormData(target, formData, options) {
460
460
  if (options.mapFormData) {
461
461
  return options.mapFormData(formData, context);
462
462
  }
463
- if (!_chunk7SQ5SGYZcjs.isAPIRouteRef.call(void 0, target)) {
463
+ if (!_chunkRW63BOV7cjs.isAPIRouteRef.call(void 0, target)) {
464
464
  return formData;
465
465
  }
466
- const method = _optionalChain([_chunk7SQ5SGYZcjs.getAPIRouteRefMetadata.call(void 0, target), 'optionalAccess', _14 => _14.method]);
466
+ const method = _optionalChain([_chunkRW63BOV7cjs.getAPIRouteRefMetadata.call(void 0, target), 'optionalAccess', _14 => _14.method]);
467
467
  const query = method === "GET" || method === "HEAD";
468
468
  const encoding = _nullishCoalesce(_optionalChain([context, 'access', _15 => _15.submitter, 'optionalAccess', _16 => _16.getAttribute, 'call', _17 => _17("formenctype")]), () => ( _optionalChain([context, 'access', _18 => _18.form, 'optionalAccess', _19 => _19.enctype])));
469
469
  if (!query && (_optionalChain([encoding, 'optionalAccess', _20 => _20.toLowerCase, 'call', _21 => _21()]) === "multipart/form-data" || Array.from(formData.values()).some((value) => typeof value !== "string"))) {
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-IOEH4VWN.mjs";
10
10
  import {
11
11
  APIRouteConflictError
12
- } from "./chunk-VXAWRDK7.mjs";
12
+ } from "./chunk-WLL43JMO.mjs";
13
13
  import {
14
14
  findProgrammaticRouteFilesInDir
15
15
  } from "./chunk-MYIZXDZA.mjs";
@@ -23,7 +23,7 @@ import {
23
23
  matchAPIRouteAtBasePath,
24
24
  mergePluginAPIRoutes,
25
25
  resolveAPIRouteEndpoint
26
- } from "./chunk-HEVMCTSR.mjs";
26
+ } from "./chunk-6HB6V3R7.mjs";
27
27
  import {
28
28
  isProgrammaticRoutesFileName
29
29
  } from "./chunk-EA5K5BKU.mjs";
@@ -47,7 +47,7 @@ import {
47
47
  } from "./chunk-Z2RZJZIZ.mjs";
48
48
  import {
49
49
  resolveFarmRequestURL
50
- } from "./chunk-3KGDJLJK.mjs";
50
+ } from "./chunk-POSPE3IO.mjs";
51
51
  import {
52
52
  AmbiguousRouteError,
53
53
  assertUniqueRouteParameters,
@@ -66,6 +66,37 @@ function parseColonParam(segment) {
66
66
  };
67
67
  }
68
68
  __name(parseColonParam, "parseColonParam");
69
+ var MATCHER_PARAM_NAME = /^[\p{L}\p{N}_$-]+$/u;
70
+ var MATCHER_REGEX_SYNTAX = /[()[\]|\\{}^$?]/;
71
+ var MATCHER_BRACKET_PARAM = /^\[\[\.\.\.(.+)\]\]$|^\[\.\.\.(.+)\]$|^\[(.+)\]$/;
72
+ function isSupportedMatcherSegment(segment) {
73
+ if (segment === "*" || segment === "**") return true;
74
+ if (segment.startsWith(":")) return MATCHER_PARAM_NAME.test(parseColonParam(segment).name);
75
+ const bracket = MATCHER_BRACKET_PARAM.exec(segment);
76
+ if (bracket) return MATCHER_PARAM_NAME.test(bracket[1] ?? bracket[2] ?? bracket[3]);
77
+ return !MATCHER_REGEX_SYNTAX.test(segment);
78
+ }
79
+ __name(isSupportedMatcherSegment, "isSupportedMatcherSegment");
80
+ function isLiteralMatcherSegment(segment) {
81
+ return !MATCHER_REGEX_SYNTAX.test(segment) && !segment.includes("*") && !segment.startsWith(":");
82
+ }
83
+ __name(isLiteralMatcherSegment, "isLiteralMatcherSegment");
84
+ function assertSupportedMiddlewareMatcher(pattern) {
85
+ if (pattern === "*" || pattern === "/(.*)") return;
86
+ const subtree = pattern.endsWith("(.*)");
87
+ const path = subtree ? pattern.slice(0, -4) : pattern;
88
+ const segments = path.split("/").filter(Boolean);
89
+ if (segments.every(subtree ? isLiteralMatcherSegment : isSupportedMatcherSegment)) return;
90
+ throw new Error(
91
+ `Middleware matcher "${pattern}" is not a supported string pattern, so it would never match a request and the middleware would not run. String matchers do not accept regular-expression syntax such as groups, alternation, character classes, or lookaheads. Pass a RegExp instead, for example \`matcher: /^\\/(?!api|_next).*/\`, or use the supported forms: /path/:param, /path/:param*, /path/[param], /path/[...param], /path/*, /path/**, or a trailing (.*) such as /path(.*).`
92
+ );
93
+ }
94
+ __name(assertSupportedMiddlewareMatcher, "assertSupportedMiddlewareMatcher");
95
+ function compileConfigPattern(pattern, compile) {
96
+ if (typeof pattern === "string") assertSupportedMiddlewareMatcher(pattern);
97
+ return compile(pattern);
98
+ }
99
+ __name(compileConfigPattern, "compileConfigPattern");
69
100
  function compilePathPattern(pattern, trailingSlash = false) {
70
101
  const params = [];
71
102
  const segments = pattern.split("/").filter(Boolean);
@@ -140,9 +171,9 @@ __name(compilePattern, "compilePattern");
140
171
  function compileMiddlewareConfig(config) {
141
172
  const compiled = {
142
173
  matcher: config.matcher ? toMatcherList(config.matcher).map(
143
- (matcher) => typeof matcher === "function" ? matcher : compileMatcherPattern(matcher)
174
+ (matcher) => typeof matcher === "function" ? matcher : compileConfigPattern(matcher, compileMatcherPattern)
144
175
  ) : void 0,
145
- exclude: config.exclude?.map(compilePattern)
176
+ exclude: config.exclude?.map((pattern) => compileConfigPattern(pattern, compilePattern))
146
177
  };
147
178
  compiledConfigCache.set(config, {
148
179
  compiled,
@@ -250,6 +281,7 @@ export {
250
281
  compileMiddlewareRoute,
251
282
  matchesMiddlewareRoute,
252
283
  matchesMiddlewareRouteAt,
284
+ assertSupportedMiddlewareMatcher,
253
285
  compileMiddlewareConfig,
254
286
  matchesMiddlewarePredicate,
255
287
  toMiddlewareRoutePathname,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  collectFarmLlmsTxtPages
3
- } from "./chunk-DTSROJ5J.mjs";
3
+ } from "./chunk-HD5CF3OE.mjs";
4
4
  import {
5
5
  getFarmMarkdownMirrorPath,
6
6
  isFarmMarkdownMirrorExposed
7
- } from "./chunk-WWIKMBRN.mjs";
7
+ } from "./chunk-VNGH5MLF.mjs";
8
8
  import {
9
9
  _listFarmMCPCatalogs,
10
10
  _listFarmRegisteredMCPServers