@farm.js/core 0.1.70 → 0.1.72

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-handler-6T2Z7TB6.cjs → agent-mcp-handler-KE4J3W7S.cjs} +4 -4
  2. package/dist/{agent-mcp-handler-CPU354QQ.mjs → agent-mcp-handler-VIT4GOSR.mjs} +3 -3
  3. package/dist/{agent-mcp.d-DulgFLBt.d.ts → agent-mcp.d-BO3rZXEM.d.ts} +15 -5
  4. package/dist/{agent-mcp.d-TAs1ES2F.d.mts → agent-mcp.d-Cwff7lcA.d.mts} +15 -5
  5. package/dist/agent-runtime.d.mts +3 -3
  6. package/dist/agent-runtime.d.ts +3 -3
  7. package/dist/{analyzer-QGRBLETM.mjs → analyzer-5Q75LTIL.mjs} +2 -2
  8. package/dist/analyzer-UJG4MIZW.cjs +16 -0
  9. package/dist/api/node.d.mts +5 -5
  10. package/dist/api/node.d.ts +5 -5
  11. package/dist/api/route-manager.cjs +7 -6
  12. package/dist/api/route-manager.d.mts +7 -7
  13. package/dist/api/route-manager.d.ts +7 -7
  14. package/dist/api/route-manager.mjs +6 -5
  15. package/dist/api/runtime.d.mts +4 -4
  16. package/dist/api/runtime.d.ts +4 -4
  17. package/dist/api.cjs +8 -7
  18. package/dist/api.d.mts +8 -8
  19. package/dist/api.d.ts +8 -8
  20. package/dist/api.mjs +7 -6
  21. package/dist/{app-manifest.d-C-nf3Vmm.d.ts → app-manifest.d-DwjGkYlP.d.ts} +1 -1
  22. package/dist/{app-manifest.d-6zXb90o6.d.mts → app-manifest.d-USD_IbFd.d.mts} +1 -1
  23. package/dist/app-markdown.cjs +5 -3
  24. package/dist/app-markdown.d.mts +5 -5
  25. package/dist/app-markdown.d.ts +5 -5
  26. package/dist/app-markdown.mjs +4 -2
  27. package/dist/{app.d-C2xeMIYT.d.ts → app.d-DAmF2MAk.d.ts} +52 -8
  28. package/dist/{app.d-DF0aundc.d.mts → app.d-fW06_h8h.d.mts} +52 -8
  29. package/dist/{chunk-7A3URI2F.mjs → chunk-2EVESLP3.mjs} +8 -1
  30. package/dist/{chunk-JRF2SKCD.mjs → chunk-3JN5M3T5.mjs} +259 -61
  31. package/dist/{chunk-XYVPTTUT.cjs → chunk-3WG7GJQL.cjs} +11 -6
  32. package/dist/{chunk-K66JILV3.cjs → chunk-5LOARKDP.cjs} +2 -2
  33. package/dist/{chunk-I7NUT24Z.cjs → chunk-5R4Q5FN7.cjs} +2 -2
  34. package/dist/{chunk-BPUVDCGG.cjs → chunk-5X6OHJEE.cjs} +15 -3
  35. package/dist/{chunk-RMOU3PR4.mjs → chunk-5XFKWHZD.mjs} +293 -66
  36. package/dist/{chunk-A2TH5MKE.mjs → chunk-645ENY7W.mjs} +3 -3
  37. package/dist/{chunk-NYF7A4UW.mjs → chunk-77VNYVVX.mjs} +1 -1
  38. package/dist/{chunk-32SYRIQ7.cjs → chunk-7QCJDYZQ.cjs} +3 -3
  39. package/dist/{chunk-QZHTDVH4.mjs → chunk-AUAMXI6N.mjs} +1 -1
  40. package/dist/{chunk-5R3JQPWD.mjs → chunk-AYVGD3PK.mjs} +1 -1
  41. package/dist/{chunk-IEN2EFE5.cjs → chunk-BE7AQXJB.cjs} +346 -148
  42. package/dist/{chunk-CCHJWJGP.mjs → chunk-BSXKZPFE.mjs} +204 -98
  43. package/dist/{chunk-2MR4MABG.cjs → chunk-C5AM2XDN.cjs} +54 -4
  44. package/dist/{chunk-M6U6E4F7.cjs → chunk-CBLRSZQL.cjs} +557 -330
  45. package/dist/{chunk-BBPDJGCU.cjs → chunk-CYOTNHDF.cjs} +2 -2
  46. package/dist/{chunk-5IJRJWJS.mjs → chunk-DGNMXL2O.mjs} +11 -1
  47. package/dist/{chunk-3EXCZJEN.mjs → chunk-DS7JGFW5.mjs} +13 -1
  48. package/dist/{chunk-EDZU7YRK.mjs → chunk-E2V7RRFL.mjs} +2 -2
  49. package/dist/{chunk-K7JMTAFH.cjs → chunk-E3LE6EZH.cjs} +20 -10
  50. package/dist/{chunk-DIHBWZDZ.cjs → chunk-ET6WW3FY.cjs} +636 -355
  51. package/dist/{chunk-65FPDDT4.cjs → chunk-EXN4DTVF.cjs} +2 -2
  52. package/dist/{chunk-K4UGCUXX.cjs → chunk-FSSONJRV.cjs} +7 -7
  53. package/dist/{chunk-Y2SZVIVH.cjs → chunk-GPICBTDV.cjs} +8 -1
  54. package/dist/{chunk-FJ5YCERM.cjs → chunk-HLMUWKAP.cjs} +466 -359
  55. package/dist/{chunk-A7HCBHMC.cjs → chunk-IWCYRDRQ.cjs} +3 -3
  56. package/dist/{chunk-R7254L3R.mjs → chunk-J5ASGNKF.mjs} +23 -0
  57. package/dist/{chunk-75E5FDX2.mjs → chunk-JMFTKNBA.mjs} +10 -10
  58. package/dist/{chunk-TLSSIYAL.mjs → chunk-KQAB5LML.mjs} +10 -3
  59. package/dist/{chunk-NSZY3EWG.cjs → chunk-L6E4SHUB.cjs} +31 -8
  60. package/dist/{chunk-OCNV4CI2.cjs → chunk-MQ4DYVFS.cjs} +26 -0
  61. package/dist/{chunk-4AC4PXZO.cjs → chunk-N3XO5AL5.cjs} +2 -2
  62. package/dist/{chunk-2AM26UGI.cjs → chunk-NLBK37HI.cjs} +5 -4
  63. package/dist/{chunk-R2ZHU37O.mjs → chunk-NLRAQXAA.mjs} +26 -0
  64. package/dist/{chunk-NA77GEIU.mjs → chunk-NV26EGMC.mjs} +51 -1
  65. package/dist/{chunk-LECZ5DPZ.cjs → chunk-OSEQL34Q.cjs} +2 -2
  66. package/dist/{chunk-3WS5AZ3R.mjs → chunk-OSMUE5ST.mjs} +8 -3
  67. package/dist/{chunk-JFPKARWM.cjs → chunk-PMU4U2W2.cjs} +1 -0
  68. package/dist/{chunk-KPMLDT3B.mjs → chunk-QUYAGU65.mjs} +581 -300
  69. package/dist/{chunk-N62IYXYD.mjs → chunk-RFWWXEIF.mjs} +1 -1
  70. package/dist/{chunk-E77IA5IF.mjs → chunk-RLFGKJQ6.mjs} +1 -1
  71. package/dist/{chunk-3AUINHFG.mjs → chunk-TNYC3TYP.mjs} +3 -2
  72. package/dist/{chunk-VG6HYT5K.cjs → chunk-TP4RAV7Y.cjs} +9 -9
  73. package/dist/{chunk-JFVT5ZZV.mjs → chunk-VAWDGGW3.mjs} +1 -1
  74. package/dist/{chunk-MU5V7XHL.mjs → chunk-VJSXPN3W.mjs} +3 -0
  75. package/dist/{chunk-DU4VHHPJ.mjs → chunk-VO55MMBX.mjs} +1 -1
  76. package/dist/{chunk-LDVJIBGN.mjs → chunk-VT25ERQK.mjs} +1 -1
  77. package/dist/{chunk-HAXFV2CD.mjs → chunk-WIJF3PBM.mjs} +1 -1
  78. package/dist/{chunk-QEWWKYDL.cjs → chunk-YCNHUIPR.cjs} +17 -10
  79. package/dist/{chunk-FILXOEWD.cjs → chunk-YXIQYWOK.cjs} +2 -2
  80. package/dist/{chunk-THG2TVDH.mjs → chunk-YZLEOMMA.mjs} +3 -3
  81. package/dist/{chunk-PJQ5W356.mjs → chunk-Z5ZZAGIH.mjs} +1 -0
  82. package/dist/{chunk-MZLJFNMH.cjs → chunk-ZDZUFD67.cjs} +1 -1
  83. package/dist/{chunk-Q5HMVGR5.cjs → chunk-ZFEJ2SF2.cjs} +13 -13
  84. package/dist/{chunk-LNVGXUL3.cjs → chunk-ZMSVKVI3.cjs} +3 -0
  85. package/dist/{client-component.d-DNbC4oWI.d.ts → client-component.d-9J7CkTWW.d.ts} +2 -2
  86. package/dist/{client-component.d-Bk5qKJM-.d.mts → client-component.d-ciHeCxr-.d.mts} +2 -2
  87. package/dist/{client-plugins.d-DwUqh4gp.d.ts → client-plugins.d-CUOhfapO.d.ts} +12 -8
  88. package/dist/{client-plugins.d-Pi9nG0W0.d.mts → client-plugins.d-JnRz5a1o.d.mts} +12 -8
  89. package/dist/client-plugins.d.mts +3 -3
  90. package/dist/client-plugins.d.ts +3 -3
  91. package/dist/client.cjs +1 -1
  92. package/dist/client.d.mts +8 -8
  93. package/dist/client.d.ts +8 -8
  94. package/dist/client.mjs +1 -1
  95. package/dist/config.d.mts +3 -3
  96. package/dist/config.d.ts +3 -3
  97. package/dist/desktop.d.mts +4 -4
  98. package/dist/desktop.d.ts +4 -4
  99. package/dist/{devtools-CB43AHEP.mjs → devtools-7JPQMSTQ.mjs} +4 -4
  100. package/dist/{devtools-L5DUNDF3.cjs → devtools-IZFUYWPG.cjs} +5 -5
  101. package/dist/docs.cjs +6 -6
  102. package/dist/docs.d.mts +4 -4
  103. package/dist/docs.d.ts +4 -4
  104. package/dist/docs.mjs +5 -5
  105. package/dist/environment/vite.cjs +3 -3
  106. package/dist/environment/vite.mjs +2 -2
  107. package/dist/{headers.d-CE6OWB-n.d.ts → headers.d-CqpTL_fZ.d.ts} +2 -2
  108. package/dist/{headers.d-DED1hHh4.d.mts → headers.d-rbbTKGaN.d.mts} +2 -2
  109. package/dist/i18n/client.cjs +3 -2
  110. package/dist/i18n/client.d.mts +2 -2
  111. package/dist/i18n/client.d.ts +2 -2
  112. package/dist/i18n/client.mjs +2 -1
  113. package/dist/i18n/index.cjs +3 -2
  114. package/dist/i18n/index.d.mts +3 -3
  115. package/dist/i18n/index.d.ts +3 -3
  116. package/dist/i18n/index.mjs +2 -1
  117. package/dist/i18n/server.cjs +6 -5
  118. package/dist/i18n/server.d.mts +5 -5
  119. package/dist/i18n/server.d.ts +5 -5
  120. package/dist/i18n/server.mjs +5 -4
  121. package/dist/index.cjs +29 -27
  122. package/dist/{index.d-c9UwIqDy.d.ts → index.d-CMKvzHLW.d.ts} +1 -1
  123. package/dist/{index.d-CbvOjJcp.d.mts → index.d-D_B2D9Il.d.mts} +1 -1
  124. package/dist/index.d.mts +24 -24
  125. package/dist/index.d.ts +24 -24
  126. package/dist/index.mjs +28 -26
  127. package/dist/integrations/orm.d.mts +3 -3
  128. package/dist/integrations/orm.d.ts +3 -3
  129. package/dist/integrations.d.mts +3 -3
  130. package/dist/integrations.d.ts +3 -3
  131. package/dist/internal/app-markdown-runtime.cjs +4 -2
  132. package/dist/internal/app-markdown-runtime.d.mts +13 -5
  133. package/dist/internal/app-markdown-runtime.d.ts +13 -5
  134. package/dist/internal/app-markdown-runtime.mjs +3 -1
  135. package/dist/internal/build-runtime.cjs +26 -26
  136. package/dist/internal/build-runtime.d.mts +5 -5
  137. package/dist/internal/build-runtime.d.ts +5 -5
  138. package/dist/internal/build-runtime.mjs +25 -25
  139. package/dist/internal/cli-runtime.cjs +9 -7
  140. package/dist/internal/cli-runtime.mjs +8 -6
  141. package/dist/internal/client-error-overlay.cjs +4 -4
  142. package/dist/internal/client-error-overlay.mjs +1 -1
  143. package/dist/internal/client-runtime.cjs +2 -2
  144. package/dist/internal/client-runtime.d.mts +6 -6
  145. package/dist/internal/client-runtime.d.ts +6 -6
  146. package/dist/internal/client-runtime.mjs +3 -3
  147. package/dist/internal/compression-runtime.d.mts +3 -3
  148. package/dist/internal/compression-runtime.d.ts +3 -3
  149. package/dist/internal/config-runtime.cjs +6 -6
  150. package/dist/internal/config-runtime.d.mts +6 -6
  151. package/dist/internal/config-runtime.d.ts +6 -6
  152. package/dist/internal/config-runtime.mjs +5 -5
  153. package/dist/internal/infra-analytics-runtime.cjs +8 -8
  154. package/dist/internal/infra-analytics-runtime.mjs +6 -6
  155. package/dist/internal/native-server-fns.cjs +4 -4
  156. package/dist/internal/native-server-fns.mjs +3 -3
  157. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  158. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  159. package/dist/internal/production-runtime.cjs +15 -15
  160. package/dist/internal/production-runtime.d.mts +41 -24
  161. package/dist/internal/production-runtime.d.ts +41 -24
  162. package/dist/internal/production-runtime.mjs +14 -14
  163. package/dist/internal/vercel-edge-middleware.d.mts +2 -2
  164. package/dist/internal/vercel-edge-middleware.d.ts +2 -2
  165. package/dist/markdown.d.mts +3 -3
  166. package/dist/markdown.d.ts +3 -3
  167. package/dist/middleware.cjs +3 -3
  168. package/dist/middleware.d.mts +4 -4
  169. package/dist/middleware.d.ts +4 -4
  170. package/dist/middleware.mjs +2 -2
  171. package/dist/mobile.d.mts +3 -3
  172. package/dist/mobile.d.ts +3 -3
  173. package/dist/{mount.d-DngLY7NL.d.ts → mount.d-B0XMxDRh.d.ts} +1 -1
  174. package/dist/{mount.d-BvWxf8ZE.d.mts → mount.d-ImEO7q8a.d.mts} +1 -1
  175. package/dist/{navigation-delegate.d-CMyl1h2l.d.mts → navigation-delegate.d-83Q7ksf7.d.mts} +1 -1
  176. package/dist/{navigation-delegate.d-zZogiDfa.d.ts → navigation-delegate.d-RRx1CSlb.d.ts} +1 -1
  177. package/dist/navigation.d.mts +6 -6
  178. package/dist/navigation.d.ts +6 -6
  179. package/dist/{nitro-Y3LGITW3.cjs → nitro-2LMOMIST.cjs} +2 -2
  180. package/dist/{nitro-NSTXT7LB.mjs → nitro-72TFIGGO.mjs} +1 -1
  181. package/dist/{plugin-F2O4BFTK.cjs → plugin-5PIQQVRP.cjs} +2 -2
  182. package/dist/{plugin-VEBRN7A3.mjs → plugin-QZT747YW.mjs} +1 -1
  183. package/dist/plugin.cjs +20 -20
  184. package/dist/plugin.d.mts +6 -6
  185. package/dist/plugin.d.ts +6 -6
  186. package/dist/plugin.mjs +19 -19
  187. package/dist/{production-runtime.d-B0IeWWyO.d.mts → production-runtime.d-Bcu37SCo.d.mts} +1 -1
  188. package/dist/{production-runtime.d-q3aHIv5Y.d.ts → production-runtime.d-qPj3XRET.d.ts} +1 -1
  189. package/dist/{render-plan.d-DQj2bzd2.d.ts → render-plan.d-Ds2sXJ5m.d.ts} +1 -1
  190. package/dist/{render-plan.d-Di1znBDW.d.mts → render-plan.d-wP8nTeRV.d.mts} +1 -1
  191. package/dist/renderer-client.cjs +3 -2
  192. package/dist/renderer-client.d.mts +6 -6
  193. package/dist/renderer-client.d.ts +6 -6
  194. package/dist/renderer-client.mjs +2 -1
  195. package/dist/{request.d-CJWzfDYJ.d.mts → request.d-F3h7K37m.d.mts} +1 -1
  196. package/dist/{request.d-C5vyoYeL.d.ts → request.d-zpSn6pu_.d.ts} +1 -1
  197. package/dist/request.d.mts +4 -4
  198. package/dist/request.d.ts +4 -4
  199. package/dist/{resolver.d-9iKC79CU.d.mts → resolver.d-DJgzbdsp.d.mts} +1 -1
  200. package/dist/{resolver.d-CY6mEa_F.d.ts → resolver.d-yaHcGCCG.d.ts} +1 -1
  201. package/dist/{route-rendering.d-DhsY5M2I.d.ts → route-rendering.d-BL0_AdKj.d.ts} +1 -1
  202. package/dist/{route-rendering.d-C-et2TZ1.d.mts → route-rendering.d-Mw0ZKG2e.d.mts} +1 -1
  203. package/dist/{router.d-CJB-Ntni.d.ts → router.d-BwXigemZ.d.ts} +1 -1
  204. package/dist/{router.d-BMDS5s5X.d.mts → router.d-NGVsU11T.d.mts} +1 -1
  205. package/dist/{routes.d-D3aJw1H5.d.mts → routes.d-CCccJRrp.d.mts} +1 -1
  206. package/dist/{routes.d-K-Qg79AA.d.ts → routes.d-b7khoRoU.d.ts} +1 -1
  207. package/dist/routes.d.mts +3 -3
  208. package/dist/routes.d.ts +3 -3
  209. package/dist/{routing.d-BxOZ2YWc.d.ts → routing.d-BhPgtN_S.d.ts} +2 -1
  210. package/dist/{routing.d-DwSUVZbF.d.mts → routing.d-D67HQmnv.d.mts} +2 -1
  211. package/dist/{rsc-pipeline-NJKLZ3YE.cjs → rsc-pipeline-BNXYMG4G.cjs} +6 -6
  212. package/dist/{rsc-pipeline-AXQJCCHI.mjs → rsc-pipeline-DHYZLWSF.mjs} +5 -5
  213. package/dist/{runtime-DMW6DDOI.cjs → runtime-IWOT6ZVC.cjs} +7 -7
  214. package/dist/{runtime-JXNEKOSE.mjs → runtime-XPYKUNL3.mjs} +5 -5
  215. package/dist/{runtime.d-BonodRI9.d.mts → runtime.d-BA3MzhXz.d.mts} +1 -1
  216. package/dist/{runtime.d-nUz0HAL4.d.mts → runtime.d-CTAXWZby.d.mts} +2 -2
  217. package/dist/{runtime.d-uw4123iI.d.ts → runtime.d-OBIZWpx1.d.ts} +1 -1
  218. package/dist/{runtime.d-B_uPfMjA.d.ts → runtime.d-PUA5qBnd.d.ts} +2 -2
  219. package/dist/server-plugins.d.mts +5 -5
  220. package/dist/server-plugins.d.ts +5 -5
  221. package/dist/server.cjs +40 -40
  222. package/dist/server.d.mts +14 -14
  223. package/dist/server.d.ts +14 -14
  224. package/dist/server.mjs +22 -22
  225. package/dist/{spa-router.d-rha3M95y.d.mts → spa-router.d-BG2XzE5p.d.mts} +3 -3
  226. package/dist/{spa-router.d-l0d9pPZj.d.ts → spa-router.d-DrYT944-.d.ts} +3 -3
  227. package/dist/testing.cjs +6 -5
  228. package/dist/testing.d.mts +3 -3
  229. package/dist/testing.d.ts +3 -3
  230. package/dist/testing.mjs +6 -5
  231. package/dist/{types.d-wVRlLtBf.d.mts → types.d-euATAbE4.d.mts} +4 -0
  232. package/dist/{types.d-wVRlLtBf.d.ts → types.d-euATAbE4.d.ts} +4 -0
  233. package/dist/{utils.d-BzuTobEc.d.mts → utils.d-C1k9BJeD.d.mts} +1 -1
  234. package/dist/{utils.d-BK-PTOF8.d.ts → utils.d-DcF4wxey.d.ts} +1 -1
  235. package/dist/version.cjs +2 -2
  236. package/dist/version.mjs +1 -1
  237. package/dist/vite.cjs +20 -20
  238. package/dist/vite.d.mts +9 -7
  239. package/dist/vite.d.ts +9 -7
  240. package/dist/vite.mjs +19 -19
  241. package/package.json +2 -2
  242. package/dist/analyzer-GUIRJWZH.cjs +0 -16
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-423SSBYQ.mjs";
16
16
  import {
17
17
  FARM_VERSION
18
- } from "./chunk-NYF7A4UW.mjs";
18
+ } from "./chunk-77VNYVVX.mjs";
19
19
 
20
20
  // src/mobile/analyzer.ts
21
21
  import { createHash } from "crypto";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-YX6AFPXC.mjs";
7
7
  import {
8
8
  _runWithFarmI18nRequest
9
- } from "./chunk-3AUINHFG.mjs";
9
+ } from "./chunk-TNYC3TYP.mjs";
10
10
  import {
11
11
  explainMissingOptionalPeer
12
12
  } from "./chunk-NR63PD3P.mjs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  readFarmI18nCatalogs
3
- } from "./chunk-DU4VHHPJ.mjs";
3
+ } from "./chunk-VO55MMBX.mjs";
4
4
  import {
5
5
  resolveFarmLocaleRequest
6
- } from "./chunk-7A3URI2F.mjs";
6
+ } from "./chunk-2EVESLP3.mjs";
7
7
  import {
8
8
  _setFarmI18nSnapshotResolver
9
9
  } from "./chunk-M25IONJP.mjs";
@@ -69,6 +69,7 @@ var FarmI18nRuntime = class {
69
69
  defaultLocale: this.config.defaultLocale,
70
70
  routing: this.config.routing,
71
71
  basePath: this.config.basePath,
72
+ trailingSlash: this.config.trailingSlash,
72
73
  cookie: this.config.cookie,
73
74
  direction: getFarmLocaleDirection(resolution.locale, this.config.direction),
74
75
  messages: {
@@ -1,5 +1,7 @@
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
+
4
+
3
5
  var _chunkO32QPFVVcjs = require('./chunk-O32QPFVV.cjs');
4
6
 
5
7
 
@@ -14,10 +16,6 @@ var _chunkLRB5OVRTcjs = require('./chunk-LRB5OVRT.cjs');
14
16
  var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
15
17
 
16
18
 
17
- var _chunkOWQV6MLMcjs = require('./chunk-OWQV6MLM.cjs');
18
-
19
-
20
-
21
19
  var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
22
20
 
23
21
  // src/agent-mcp.ts
@@ -114,8 +112,7 @@ function collectFarmDefaultMCPPages(sources, options) {
114
112
  if (!_chunkC2JOS77Zcjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, source.pattern)) continue;
115
113
  readable.push({ pattern: source.pattern, metadata: _optionalChain([module, 'optionalAccess', _2 => _2.metadata]) });
116
114
  }
117
- const i18n = resolveFarmDefaultMCPI18n(options.i18n, options.basePath);
118
- const toPublicPath = (pathname) => i18n ? _chunkOWQV6MLMcjs.localizeFarmPathname.call(void 0, pathname, i18n.defaultLocale, i18n) : _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, pathname, options.basePath);
115
+ const base = _chunkO32QPFVVcjs.resolveFarmAgentOrigin.call(void 0, options.metadataBase, options.origin);
119
116
  return _chunkO32QPFVVcjs.collectFarmLlmsTxtPages.call(void 0, readable, {
120
117
  origin: options.origin,
121
118
  basePath: options.basePath,
@@ -124,13 +121,16 @@ function collectFarmDefaultMCPPages(sources, options) {
124
121
  path: page.path,
125
122
  title: page.title,
126
123
  // As the sitemap lists it: '/base' without trailingSlash ('/base/' redirects there).
127
- url: `${options.origin}${_chunkDVJM55D2cjs.normalizeFarmTrailingSlashPathname.call(void 0,
128
- toPublicPath(page.path),
124
+ url: `${base}${_chunkDVJM55D2cjs.normalizeFarmTrailingSlashPathname.call(void 0,
125
+ _chunkO32QPFVVcjs.getFarmAgentPagePublicPath.call(void 0, page.path, options),
129
126
  options.trailingSlash === true
130
127
  )}`,
131
128
  ...page.description ? { description: page.description } : {},
132
129
  // A mirror keeps its .md URL whatever trailingSlash says, as llms.txt links it.
133
- markdownUrl: `${options.origin}${toPublicPath(_chunkC2JOS77Zcjs.getFarmMarkdownMirrorPath.call(void 0, page.path))}`
130
+ markdownUrl: `${options.origin}${_chunkO32QPFVVcjs.getFarmAgentPagePublicPath.call(void 0,
131
+ _chunkC2JOS77Zcjs.getFarmMarkdownMirrorPath.call(void 0, page.path),
132
+ options
133
+ )}`
134
134
  }));
135
135
  }
136
136
  function resolveFarmDefaultMCPI18n(i18n, basePath) {
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-VE3FWJBO.mjs";
18
18
  import {
19
19
  resolveDocsConfig
20
- } from "./chunk-3WS5AZ3R.mjs";
20
+ } from "./chunk-OSMUE5ST.mjs";
21
21
  import {
22
22
  getFarmDocsAdapterConfigModule,
23
23
  isSecretDocsConfigKey
@@ -6,11 +6,13 @@ var DEFAULT_DETECTION = ["url", "cookie", "accept-language"];
6
6
  function resolveFarmI18nConfig(input, options = {}) {
7
7
  const root = options.root || process.cwd();
8
8
  const basePath = options.basePath || "/";
9
+ const trailingSlash = options.trailingSlash === true;
9
10
  const strictByDefault = options.mode === "production";
10
11
  if (!input) {
11
12
  return {
12
13
  enabled: false,
13
14
  basePath,
15
+ trailingSlash,
14
16
  locales: ["en"],
15
17
  defaultLocale: "en",
16
18
  messages: path.join(root, "src/messages"),
@@ -65,6 +67,7 @@ function resolveFarmI18nConfig(input, options = {}) {
65
67
  return {
66
68
  enabled: true,
67
69
  basePath,
70
+ trailingSlash,
68
71
  locales,
69
72
  defaultLocale,
70
73
  messages: path.resolve(root, input.messages || "src/messages"),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveFarmI18nMessagePath
3
- } from "./chunk-MU5V7XHL.mjs";
3
+ } from "./chunk-VJSXPN3W.mjs";
4
4
 
5
5
  // src/i18n/catalog.ts
6
6
  import { readFile } from "fs/promises";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-EDPENAVO.mjs";
7
7
  import {
8
8
  resolveFarmI18nConfig
9
- } from "./chunk-MU5V7XHL.mjs";
9
+ } from "./chunk-VJSXPN3W.mjs";
10
10
 
11
11
  // src/middleware/chain.ts
12
12
  var DEFAULT_MEMORY_RATE_LIMIT_ENTRIES = 1e5;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readAliases,
3
3
  resolveFile
4
- } from "./chunk-N62IYXYD.mjs";
4
+ } from "./chunk-RFWWXEIF.mjs";
5
5
  import {
6
6
  transformFarmServerFns
7
7
  } from "./chunk-GNZIAJGB.mjs";
@@ -3,7 +3,10 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkVG6HYT5Kcjs = require('./chunk-VG6HYT5K.cjs');
6
+ var _chunkTP4RAV7Ycjs = require('./chunk-TP4RAV7Y.cjs');
7
+
8
+
9
+ var _chunkO32QPFVVcjs = require('./chunk-O32QPFVV.cjs');
7
10
 
8
11
 
9
12
  var _chunkOWQV6MLMcjs = require('./chunk-OWQV6MLM.cjs');
@@ -40,10 +43,10 @@ async function handleFarmDefaultMCPRequest(request, context) {
40
43
  return transportError(403, "Cross-origin requests are not allowed.");
41
44
  }
42
45
  const protocolHeader = request.headers.get("mcp-protocol-version");
43
- if (protocolHeader && !_chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.includes(protocolHeader.trim())) {
46
+ if (protocolHeader && !_chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.includes(protocolHeader.trim())) {
44
47
  return transportError(
45
48
  400,
46
- `Unsupported MCP-Protocol-Version: ${protocolHeader.slice(0, 32)}. Supported: ${_chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.join(", ")}.`
49
+ `Unsupported MCP-Protocol-Version: ${protocolHeader.slice(0, 32)}. Supported: ${_chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.join(", ")}.`
47
50
  );
48
51
  }
49
52
  const contentType = _nullishCoalesce(request.headers.get("content-type"), () => ( ""));
@@ -99,7 +102,7 @@ async function dispatch(method, params, request, context) {
99
102
  switch (method) {
100
103
  case "initialize": {
101
104
  const requested = isRecord(params) ? params.protocolVersion : void 0;
102
- const protocolVersion = typeof requested === "string" && _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.includes(requested) ? requested : _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS[0];
105
+ const protocolVersion = typeof requested === "string" && _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.includes(requested) ? requested : _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS[0];
103
106
  return {
104
107
  protocolVersion,
105
108
  capabilities: { tools: { listChanged: false } },
@@ -107,7 +110,7 @@ async function dispatch(method, params, request, context) {
107
110
  name: context.server.name,
108
111
  version: context.server.version,
109
112
  ...context.server.title ? { title: context.server.title } : {},
110
- description: _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_DESCRIPTION
113
+ description: _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_DESCRIPTION
111
114
  },
112
115
  instructions: INSTRUCTIONS
113
116
  };
@@ -115,7 +118,7 @@ async function dispatch(method, params, request, context) {
115
118
  case "ping":
116
119
  return {};
117
120
  case "tools/list":
118
- return { tools: _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_TOOLS };
121
+ return { tools: _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_TOOLS };
119
122
  case "tools/call":
120
123
  return callTool(params, request, context);
121
124
  default:
@@ -126,7 +129,7 @@ async function callTool(params, request, context) {
126
129
  if (!isRecord(params) || typeof params.name !== "string") {
127
130
  throw new FarmMCPRequestError(INVALID_PARAMS, "tools/call needs a tool name.");
128
131
  }
129
- const tool = _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_TOOLS.find(({ name }) => name === params.name);
132
+ const tool = _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_TOOLS.find(({ name }) => name === params.name);
130
133
  if (!tool) {
131
134
  throw new FarmMCPRequestError(INVALID_PARAMS, `Unknown tool: ${params.name.slice(0, 64)}`);
132
135
  }
@@ -154,8 +157,9 @@ async function callTool(params, request, context) {
154
157
  const pagePath = toPagePath(
155
158
  path,
156
159
  request.url,
160
+ context.metadataBase,
157
161
  context.basePath,
158
- _chunkVG6HYT5Kcjs.resolveFarmDefaultMCPI18n.call(void 0, context.i18n, context.basePath)
162
+ _chunkTP4RAV7Ycjs.resolveFarmDefaultMCPI18n.call(void 0, context.i18n, context.basePath)
159
163
  );
160
164
  const pages = await context.listPages();
161
165
  const page = pagePath ? pages.find((candidate) => candidate.path === pagePath) : void 0;
@@ -203,14 +207,17 @@ function searchPages(pages, query, limit) {
203
207
  (left, right) => right.score - left.score || left.page.path.localeCompare(right.page.path)
204
208
  ).slice(0, limit).map(({ page }) => page);
205
209
  }
206
- function toPagePath(input, requestUrl, basePath, i18n) {
210
+ function toPagePath(input, requestUrl, metadataBase, basePath, i18n) {
207
211
  let url;
208
212
  try {
209
213
  url = new URL(input.trim(), requestUrl);
210
214
  } catch (e2) {
211
215
  return null;
212
216
  }
213
- if (url.origin !== new URL(requestUrl).origin) return null;
217
+ const requestOrigin = new URL(requestUrl).origin;
218
+ if (url.origin !== requestOrigin && url.origin !== _chunkO32QPFVVcjs.resolveFarmAgentOrigin.call(void 0, metadataBase, requestOrigin)) {
219
+ return null;
220
+ }
214
221
  let path = url.pathname;
215
222
  try {
216
223
  path = decodeURI(path);
@@ -6,7 +6,7 @@ var _chunkACGBXN3Ucjs = require('./chunk-ACGBXN3U.cjs');
6
6
  var _chunk5DX3O6TTcjs = require('./chunk-5DX3O6TT.cjs');
7
7
 
8
8
 
9
- var _chunkLNVGXUL3cjs = require('./chunk-LNVGXUL3.cjs');
9
+ var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
10
10
 
11
11
  // src/middleware/chain.ts
12
12
  var DEFAULT_MEMORY_RATE_LIMIT_ENTRIES = 1e5;
@@ -389,7 +389,7 @@ function farmMiddlewarePlugin(options = {}) {
389
389
  let discoveryComplete = false;
390
390
  let discoveryPromise = null;
391
391
  const discover = async (server) => {
392
- const i18n = _chunkLNVGXUL3cjs.resolveFarmI18nConfig.call(void 0, false, {
392
+ const i18n = _chunkZMSVKVI3cjs.resolveFarmI18nConfig.call(void 0, false, {
393
393
  root: server.config.root,
394
394
  mode: server.config.mode === "production" ? "production" : "development",
395
395
  basePath: _nullishCoalesce(options.basePath, () => ( "/"))
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-IYEY3JWJ.mjs";
10
10
  import {
11
11
  APIRouteConflictError
12
- } from "./chunk-E77IA5IF.mjs";
12
+ } from "./chunk-RLFGKJQ6.mjs";
13
13
  import {
14
14
  findProgrammaticRouteFilesInDir
15
15
  } from "./chunk-TXE4SAMV.mjs";
@@ -42,7 +42,7 @@ import {
42
42
  import {
43
43
  isFarmI18nCatalogFile,
44
44
  resolveFarmI18nConfig
45
- } from "./chunk-MU5V7XHL.mjs";
45
+ } from "./chunk-VJSXPN3W.mjs";
46
46
  import {
47
47
  toPosixPath,
48
48
  toViteModuleId
@@ -55,7 +55,7 @@ import {
55
55
  import {
56
56
  createFarmLocaleCookie,
57
57
  getFarmLocaleVaryHeaders
58
- } from "./chunk-7A3URI2F.mjs";
58
+ } from "./chunk-2EVESLP3.mjs";
59
59
  import {
60
60
  resolveFarmRequestURL
61
61
  } from "./chunk-5OFNUETM.mjs";
@@ -688,6 +688,7 @@ var PluginManager = class {
688
688
  * Runs only `runtime.before` for a request Farm re-routed internally, such as
689
689
  * a configured rewrite, so guards also see the destination URL. The session
690
690
  * opened for `source` keeps its context; context and after hooks don't rerun.
691
+ * `options` describe the destination; the session keeps the source's route.
691
692
  */
692
693
  async runRuntimeBeforeForRewrite(source, request, options = {}) {
693
694
  if (!this.hasRuntimeHook("before")) return request;
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// package.json
2
- var version = "0.1.70";
2
+ var version = "0.1.72";
3
3
 
4
4
  // src/version.ts
5
5
  var FARM_VERSION = version;
@@ -9,7 +9,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
9
9
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
10
10
 
11
11
 
12
- var _chunkK66JILV3cjs = require('./chunk-K66JILV3.cjs');
12
+ var _chunk5LOARKDPcjs = require('./chunk-5LOARKDP.cjs');
13
13
 
14
14
 
15
15
  var _chunkQEJWNXRIcjs = require('./chunk-QEJWNXRI.cjs');
@@ -42,7 +42,7 @@ var _chunkJYNNIGQOcjs = require('./chunk-JYNNIGQO.cjs');
42
42
 
43
43
 
44
44
 
45
- var _chunkLNVGXUL3cjs = require('./chunk-LNVGXUL3.cjs');
45
+ var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
46
46
 
47
47
 
48
48
 
@@ -55,7 +55,7 @@ var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
55
55
 
56
56
 
57
57
 
58
- var _chunkY2SZVIVHcjs = require('./chunk-Y2SZVIVH.cjs');
58
+ var _chunkGPICBTDVcjs = require('./chunk-GPICBTDV.cjs');
59
59
 
60
60
 
61
61
  var _chunkHDPT6OYEcjs = require('./chunk-HDPT6OYE.cjs');
@@ -72,7 +72,7 @@ function createDevI18n(server) {
72
72
  if (!farmConfig.i18n) return void 0;
73
73
  return loadDevI18n(
74
74
  server,
75
- _chunkLNVGXUL3cjs.resolveFarmI18nConfig.call(void 0, farmConfig.i18n, {
75
+ _chunkZMSVKVI3cjs.resolveFarmI18nConfig.call(void 0, farmConfig.i18n, {
76
76
  root: server.config.root,
77
77
  mode: "development",
78
78
  basePath: _nullishCoalesce(farmConfig.basePath, () => ( "/"))
@@ -84,7 +84,7 @@ async function loadDevI18n(server, config) {
84
84
  const runtime = createFarmI18nRuntime(config);
85
85
  await runtime.initialize();
86
86
  _optionalChain([server, 'access', _ => _.watcher, 'optionalAccess', _2 => _2.on, 'optionalCall', _3 => _3("change", (file) => {
87
- if (!_chunkLNVGXUL3cjs.isFarmI18nCatalogFile.call(void 0, config, file)) return;
87
+ if (!_chunkZMSVKVI3cjs.isFarmI18nCatalogFile.call(void 0, config, file)) return;
88
88
  runtime.reload().catch((error) => {
89
89
  console.error("[FARM] Could not reload the i18n catalogs:", error);
90
90
  });
@@ -148,7 +148,7 @@ function farmApiPlugin(options = {}) {
148
148
  const existing = apiRoutesCache.get(routePath);
149
149
  const existingFile = _optionalChain([endpointSources, 'access', _4 => _4.get, 'call', _5 => _5(routePath), 'optionalAccess', _6 => _6.get, 'call', _7 => _7(normalizedMethod)]);
150
150
  if (existingFile) {
151
- throw new (0, _chunkK66JILV3cjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
151
+ throw new (0, _chunk5LOARKDPcjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
152
152
  }
153
153
  if (existing) {
154
154
  if (!existing.methods.includes(normalizedMethod)) {
@@ -323,7 +323,7 @@ function farmApiPlugin(options = {}) {
323
323
  log(`API route discovered: ${availableMethods.join(", ")} ${routePath}`);
324
324
  }
325
325
  } catch (e) {
326
- if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
326
+ if (e instanceof _chunk5LOARKDPcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
327
327
  log(`API route load failed at ${filePath}: ${e.message}`);
328
328
  }
329
329
  }
@@ -350,7 +350,7 @@ function farmApiPlugin(options = {}) {
350
350
  }
351
351
  }
352
352
  } catch (e) {
353
- if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
353
+ if (e instanceof _chunk5LOARKDPcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
354
354
  log(`Root routes.ts load failed: ${e.message}`);
355
355
  }
356
356
  break;
@@ -381,7 +381,7 @@ function farmApiPlugin(options = {}) {
381
381
  }
382
382
  }
383
383
  } catch (e) {
384
- if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
384
+ if (e instanceof _chunk5LOARKDPcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
385
385
  log(`Programmatic routes file load failed at ${routeFile}: ${e.message}`);
386
386
  }
387
387
  }
@@ -446,14 +446,14 @@ function farmApiPlugin(options = {}) {
446
446
  request,
447
447
  (resolution) => {
448
448
  const config = i18n.runtime.config;
449
- const vary = _chunkY2SZVIVHcjs.getFarmLocaleVaryHeaders.call(void 0, config, resolution);
449
+ const vary = _chunkGPICBTDVcjs.getFarmLocaleVaryHeaders.call(void 0, config, resolution);
450
450
  if (vary.length > 0) {
451
451
  const current = String(_nullishCoalesce(res.getHeader("Vary"), () => ( "")));
452
452
  res.setHeader("Vary", [current, ...vary].filter(Boolean).join(", "));
453
453
  }
454
454
  if (resolution.persist) {
455
455
  const cookies = res.getHeader("Set-Cookie");
456
- const cookie = _chunkY2SZVIVHcjs.createFarmLocaleCookie.call(void 0, resolution.locale, config);
456
+ const cookie = _chunkGPICBTDVcjs.createFarmLocaleCookie.call(void 0, resolution.locale, config);
457
457
  res.setHeader(
458
458
  "Set-Cookie",
459
459
  cookies === void 0 ? cookie : [...[cookies].flat().map(String), cookie]
@@ -606,7 +606,7 @@ function farmApiPlugin(options = {}) {
606
606
  log(`API router recreated`);
607
607
  } catch (e) {
608
608
  restoreRouteState(previousState);
609
- if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
609
+ if (e instanceof _chunk5LOARKDPcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
610
610
  log(`Root routes.ts HMR failed: ${e.message}`);
611
611
  }
612
612
  return [];
@@ -644,7 +644,7 @@ function farmApiPlugin(options = {}) {
644
644
  log(`API router recreated`);
645
645
  } catch (e) {
646
646
  restoreRouteState(previousState);
647
- if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
647
+ if (e instanceof _chunk5LOARKDPcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
648
648
  log(`API route HMR failed: ${e.message}`);
649
649
  }
650
650
  return [];
@@ -6,11 +6,13 @@ var DEFAULT_DETECTION = ["url", "cookie", "accept-language"];
6
6
  function resolveFarmI18nConfig(input, options = {}) {
7
7
  const root = options.root || process.cwd();
8
8
  const basePath = options.basePath || "/";
9
+ const trailingSlash = options.trailingSlash === true;
9
10
  const strictByDefault = options.mode === "production";
10
11
  if (!input) {
11
12
  return {
12
13
  enabled: false,
13
14
  basePath,
15
+ trailingSlash,
14
16
  locales: ["en"],
15
17
  defaultLocale: "en",
16
18
  messages: _path2.default.join(root, "src/messages"),
@@ -65,6 +67,7 @@ function resolveFarmI18nConfig(input, options = {}) {
65
67
  return {
66
68
  enabled: true,
67
69
  basePath,
70
+ trailingSlash,
68
71
  locales,
69
72
  defaultLocale,
70
73
  messages: _path2.default.resolve(root, input.messages || "src/messages"),
@@ -1,5 +1,5 @@
1
- import { R as RouteRenderingOptions, D as DirectiveRenderingConfig, a as RouteRenderingConfig } from './route-rendering.d-DhsY5M2I.js';
2
- import { i as RouteModule, bg as SSGCollectionResult, bh as SSGPage } from './client-plugins.d-DwUqh4gp.js';
1
+ import { R as RouteRenderingOptions, D as DirectiveRenderingConfig, a as RouteRenderingConfig } from './route-rendering.d-BL0_AdKj.js';
2
+ import { i as RouteModule, bg as SSGCollectionResult, bh as SSGPage } from './client-plugins.d-CUOhfapO.js';
3
3
  import { F as FarmIslandStrategy } from './island.d-CfGru1MO.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { R as RouteRenderingOptions, D as DirectiveRenderingConfig, a as RouteRenderingConfig } from './route-rendering.d-C-et2TZ1.mjs';
2
- import { i as RouteModule, bg as SSGCollectionResult, bh as SSGPage } from './client-plugins.d-Pi9nG0W0.mjs';
1
+ import { R as RouteRenderingOptions, D as DirectiveRenderingConfig, a as RouteRenderingConfig } from './route-rendering.d-Mw0ZKG2e.mjs';
2
+ import { i as RouteModule, bg as SSGCollectionResult, bh as SSGPage } from './client-plugins.d-JnRz5a1o.mjs';
3
3
  import { F as FarmIslandStrategy } from './island.d-CfGru1MO.mjs';
4
4
 
5
5
  /**
@@ -2,7 +2,7 @@ import { b as FarmClientPlugin } from './lifecycle.d-keQs5Swc.js';
2
2
  import { j as PluginRoutes, k as PluginRoutesFactory, l as RouteMethod, F as FarmIntegrationAPI, b as FarmIntegrationAPIMethod, a as FarmIntegrationAPIBodyFormat, d as FarmIntegrationAPIResponseFormat, c as FarmIntegrationAPIOperation, m as FarmIntegrationRouteOperationCarrier, I as InferIntegrationAPIFromRoutes } from './route.d-hs-_cyHn.js';
3
3
  import { FarmRenderer } from './renderer.js';
4
4
  import { IncomingMessage, ServerResponse } from 'http';
5
- import { F as FarmLocalePathConfig } from './routing.d-BxOZ2YWc.js';
5
+ import { F as FarmLocalePathConfig } from './routing.d-BhPgtN_S.js';
6
6
  import { E as EndpointMCPMetadata, T as TypedEndpoint, R as RouteSchema, d as RouteSchemaOutput, e as RouteSchemaInput, Y as OpenAPISecurityMode } from './endpoint.d-BgHn0lhl.js';
7
7
  import { ServerFn } from './server-fn.js';
8
8
  import { ServerQuery } from './server-query.js';
@@ -22,7 +22,7 @@ import { FarmServerActionsConfig, ResolvedFarmServerActionsConfig } from './serv
22
22
  import { F as FarmServerConfig, R as ResolvedFarmServerConfig } from './server-http.d-rAe7lAQc.js';
23
23
  import { a as FarmLayerEntry, R as ResolvedFarmLayer } from './layers.d-CH0bC4QL.js';
24
24
  import { a as FarmImageConfig, R as ResolvedFarmImageConfig } from './image-config.d-ByhQ0TT7.js';
25
- import { n as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from './types.d-wVRlLtBf.js';
25
+ import { n as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from './types.d-euATAbE4.js';
26
26
  import { FarmCacheUserConfig } from './cache.js';
27
27
  import { P as PlatformBlockCache, d as FarmMobileConfigInput } from './config.d-BKIhJtmr.js';
28
28
  import { R as ResolvedFarmThemeConfig, d as FarmThemeConfig } from './types.d-DQnyD3VD.js';
@@ -485,11 +485,13 @@ interface FarmPluginRenderHooks<TState = unknown, TIntegrationInstance = unknown
485
485
  /**
486
486
  * Runs for every page request, before Farm resolves it: a request a page route matches, or a
487
487
  * GET or HEAD request that no API route, integration route, docs page, or app metadata route
488
- * (such as `sitemap.ts` or a metadata image) answers. That includes a config redirect, a config
489
- * rewrite (once, for the URL as requested), the generated `llms.txt`, `sitemap.xml` and
490
- * `robots.txt`, a Markdown mirror, and the not-found page, so the response may not be a
491
- * rendered page. `render.routePattern` is `null` when no page route matches the URL. It does
492
- * not run when a `runtime.before` hook answered the request.
488
+ * (such as `sitemap.ts` or a metadata image) answers. That includes a config redirect, a
489
+ * route-file `redirect()`, a config rewrite (once, for the URL as requested), the generated
490
+ * `llms.txt`, `sitemap.xml` and `robots.txt`, a Markdown mirror, and the not-found page, so the
491
+ * response may not be a rendered page. `render.routePattern` is `null` when no page route
492
+ * matches the URL. It describes the requested URL even when `runtime.before` returned a
493
+ * replacement `Request`, which Farm routes and renders. It does not run when a
494
+ * `runtime.before` hook answered the request.
493
495
  */
494
496
  before?(render: RenderLifecyclePayload, context: FarmPluginStateContextFor<TState, TIntegrationInstance, TIntegrationBound>): MaybePromise$1<void>;
495
497
  /** Transforms the HTML document a page request answers with; see `before`. */
@@ -651,6 +653,7 @@ declare class PluginManager {
651
653
  * Runs only `runtime.before` for a request Farm re-routed internally, such as
652
654
  * a configured rewrite, so guards also see the destination URL. The session
653
655
  * opened for `source` keeps its context; context and after hooks don't rerun.
656
+ * `options` describe the destination; the session keeps the source's route.
654
657
  */
655
658
  runRuntimeBeforeForRewrite(source: Request, request: Request, options?: FarmPluginRuntimeRequestOptions): Promise<Request | Response>;
656
659
  beginRuntimeRequest(request: Request, options?: FarmPluginRuntimeRequestOptions): Promise<FarmPluginRuntimeSession>;
@@ -2687,7 +2690,8 @@ interface FarmConfig {
2687
2690
  /**
2688
2691
  * Request and MCP tool analytics for a Farm Infra project. On only when the server
2689
2692
  * environment sets `FARMJS_API_KEY` (plus `FARMJS_PROJECT_ID` for a key reaching several
2690
- * projects). Set to false to never send them.
2693
+ * projects). Each request is reported with its route template and the path it asked for,
2694
+ * never its query string. Set to false to never send them.
2691
2695
  */
2692
2696
  analytics?: boolean;
2693
2697
  /**
@@ -2,7 +2,7 @@ import { b as FarmClientPlugin } from './lifecycle.d-keQs5Swc.mjs';
2
2
  import { j as PluginRoutes, k as PluginRoutesFactory, l as RouteMethod, F as FarmIntegrationAPI, b as FarmIntegrationAPIMethod, a as FarmIntegrationAPIBodyFormat, d as FarmIntegrationAPIResponseFormat, c as FarmIntegrationAPIOperation, m as FarmIntegrationRouteOperationCarrier, I as InferIntegrationAPIFromRoutes } from './route.d-DrXkpvcg.mjs';
3
3
  import { FarmRenderer } from './renderer.mjs';
4
4
  import { IncomingMessage, ServerResponse } from 'http';
5
- import { F as FarmLocalePathConfig } from './routing.d-DwSUVZbF.mjs';
5
+ import { F as FarmLocalePathConfig } from './routing.d-D67HQmnv.mjs';
6
6
  import { E as EndpointMCPMetadata, T as TypedEndpoint, R as RouteSchema, d as RouteSchemaOutput, e as RouteSchemaInput, Y as OpenAPISecurityMode } from './endpoint.d-BkMSCRf6.mjs';
7
7
  import { ServerFn } from './server-fn.mjs';
8
8
  import { ServerQuery } from './server-query.mjs';
@@ -22,7 +22,7 @@ import { FarmServerActionsConfig, ResolvedFarmServerActionsConfig } from './serv
22
22
  import { F as FarmServerConfig, R as ResolvedFarmServerConfig } from './server-http.d-rAe7lAQc.mjs';
23
23
  import { a as FarmLayerEntry, R as ResolvedFarmLayer } from './layers.d-CH0bC4QL.mjs';
24
24
  import { a as FarmImageConfig, R as ResolvedFarmImageConfig } from './image-config.d-ByhQ0TT7.mjs';
25
- import { n as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from './types.d-wVRlLtBf.mjs';
25
+ import { n as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from './types.d-euATAbE4.mjs';
26
26
  import { FarmCacheUserConfig } from './cache.mjs';
27
27
  import { P as PlatformBlockCache, d as FarmMobileConfigInput } from './config.d-BKIhJtmr.mjs';
28
28
  import { R as ResolvedFarmThemeConfig, d as FarmThemeConfig } from './types.d-DQnyD3VD.mjs';
@@ -485,11 +485,13 @@ interface FarmPluginRenderHooks<TState = unknown, TIntegrationInstance = unknown
485
485
  /**
486
486
  * Runs for every page request, before Farm resolves it: a request a page route matches, or a
487
487
  * GET or HEAD request that no API route, integration route, docs page, or app metadata route
488
- * (such as `sitemap.ts` or a metadata image) answers. That includes a config redirect, a config
489
- * rewrite (once, for the URL as requested), the generated `llms.txt`, `sitemap.xml` and
490
- * `robots.txt`, a Markdown mirror, and the not-found page, so the response may not be a
491
- * rendered page. `render.routePattern` is `null` when no page route matches the URL. It does
492
- * not run when a `runtime.before` hook answered the request.
488
+ * (such as `sitemap.ts` or a metadata image) answers. That includes a config redirect, a
489
+ * route-file `redirect()`, a config rewrite (once, for the URL as requested), the generated
490
+ * `llms.txt`, `sitemap.xml` and `robots.txt`, a Markdown mirror, and the not-found page, so the
491
+ * response may not be a rendered page. `render.routePattern` is `null` when no page route
492
+ * matches the URL. It describes the requested URL even when `runtime.before` returned a
493
+ * replacement `Request`, which Farm routes and renders. It does not run when a
494
+ * `runtime.before` hook answered the request.
493
495
  */
494
496
  before?(render: RenderLifecyclePayload, context: FarmPluginStateContextFor<TState, TIntegrationInstance, TIntegrationBound>): MaybePromise$1<void>;
495
497
  /** Transforms the HTML document a page request answers with; see `before`. */
@@ -651,6 +653,7 @@ declare class PluginManager {
651
653
  * Runs only `runtime.before` for a request Farm re-routed internally, such as
652
654
  * a configured rewrite, so guards also see the destination URL. The session
653
655
  * opened for `source` keeps its context; context and after hooks don't rerun.
656
+ * `options` describe the destination; the session keeps the source's route.
654
657
  */
655
658
  runRuntimeBeforeForRewrite(source: Request, request: Request, options?: FarmPluginRuntimeRequestOptions): Promise<Request | Response>;
656
659
  beginRuntimeRequest(request: Request, options?: FarmPluginRuntimeRequestOptions): Promise<FarmPluginRuntimeSession>;
@@ -2687,7 +2690,8 @@ interface FarmConfig {
2687
2690
  /**
2688
2691
  * Request and MCP tool analytics for a Farm Infra project. On only when the server
2689
2692
  * environment sets `FARMJS_API_KEY` (plus `FARMJS_PROJECT_ID` for a key reaching several
2690
- * projects). Set to false to never send them.
2693
+ * projects). Each request is reported with its route template and the path it asked for,
2694
+ * never its query string. Set to false to never send them.
2691
2695
  */
2692
2696
  analytics?: boolean;
2693
2697
  /**
@@ -1,13 +1,13 @@
1
1
  export { d as FarmClientHydrationCompleteEvent, e as FarmClientHydrationEvent, f as FarmClientHydrationMode, g as FarmClientHydrationSession, h as FarmClientLocation, i as FarmClientNavigationAction, j as FarmClientNavigationErrorEvent, k as FarmClientNavigationEvent, l as FarmClientNavigationLoadedEvent, m as FarmClientNavigationResolvedEvent, a as FarmClientNavigationSession, n as FarmClientPerformanceEvent, b as FarmClientPlugin, o as FarmClientPluginCloseEvent, p as FarmClientPluginEnforce, q as FarmClientPluginErrorEvent, r as FarmClientPluginErrorPhase, F as FarmClientPluginManager, s as FarmClientPluginManagerOptions, t as FarmClientPluginMetadata, u as FarmClientPluginRegistration, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, c as createClientPluginManager } from './lifecycle.d-keQs5Swc.mjs';
2
- export { F as FarmPlugin, v as FarmPluginContext, ar as FarmRequestPluginContext, as as FarmRequestStore } from './client-plugins.d-Pi9nG0W0.mjs';
2
+ export { F as FarmPlugin, v as FarmPluginContext, ar as FarmRequestPluginContext, as as FarmRequestStore } from './client-plugins.d-JnRz5a1o.mjs';
3
3
  import './route.d-DrXkpvcg.mjs';
4
4
  import './endpoint.d-BkMSCRf6.mjs';
5
5
  import './cache.mjs';
6
6
  import './renderer.mjs';
7
7
  import './deployment.mjs';
8
8
  import 'http';
9
- import './routing.d-DwSUVZbF.mjs';
10
- import './types.d-wVRlLtBf.mjs';
9
+ import './routing.d-D67HQmnv.mjs';
10
+ import './types.d-euATAbE4.mjs';
11
11
  import './server-fn.mjs';
12
12
  import './server-fn-error.d-DrcH9cc1.mjs';
13
13
  import './server-query.mjs';
@@ -1,13 +1,13 @@
1
1
  export { d as FarmClientHydrationCompleteEvent, e as FarmClientHydrationEvent, f as FarmClientHydrationMode, g as FarmClientHydrationSession, h as FarmClientLocation, i as FarmClientNavigationAction, j as FarmClientNavigationErrorEvent, k as FarmClientNavigationEvent, l as FarmClientNavigationLoadedEvent, m as FarmClientNavigationResolvedEvent, a as FarmClientNavigationSession, n as FarmClientPerformanceEvent, b as FarmClientPlugin, o as FarmClientPluginCloseEvent, p as FarmClientPluginEnforce, q as FarmClientPluginErrorEvent, r as FarmClientPluginErrorPhase, F as FarmClientPluginManager, s as FarmClientPluginManagerOptions, t as FarmClientPluginMetadata, u as FarmClientPluginRegistration, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, c as createClientPluginManager } from './lifecycle.d-keQs5Swc.js';
2
- export { F as FarmPlugin, v as FarmPluginContext, ar as FarmRequestPluginContext, as as FarmRequestStore } from './client-plugins.d-DwUqh4gp.js';
2
+ export { F as FarmPlugin, v as FarmPluginContext, ar as FarmRequestPluginContext, as as FarmRequestStore } from './client-plugins.d-CUOhfapO.js';
3
3
  import './route.d-hs-_cyHn.js';
4
4
  import './endpoint.d-BgHn0lhl.js';
5
5
  import './cache.js';
6
6
  import './renderer.js';
7
7
  import './deployment.js';
8
8
  import 'http';
9
- import './routing.d-BxOZ2YWc.js';
10
- import './types.d-wVRlLtBf.js';
9
+ import './routing.d-BhPgtN_S.js';
10
+ import './types.d-euATAbE4.js';
11
11
  import './server-fn.js';
12
12
  import './server-fn-error.d-DrcH9cc1.js';
13
13
  import './server-query.js';
package/dist/client.cjs CHANGED
@@ -86,7 +86,6 @@ require('./chunk-MPU5DOXX.cjs');
86
86
 
87
87
 
88
88
  var _chunkOO7DYIJDcjs = require('./chunk-OO7DYIJD.cjs');
89
- require('./chunk-DVJM55D2.cjs');
90
89
  require('./chunk-OOZEU5KK.cjs');
91
90
 
92
91
 
@@ -105,6 +104,7 @@ require('./chunk-CQL5ZGFU.cjs');
105
104
  require('./chunk-6FXBJPF5.cjs');
106
105
  require('./chunk-DBYNZIIQ.cjs');
107
106
  require('./chunk-NLBHLPEO.cjs');
107
+ require('./chunk-DVJM55D2.cjs');
108
108
  require('./chunk-AOKXITZ6.cjs');
109
109
  require('./chunk-DXUXQP2T.cjs');
110
110
  require('./chunk-UZCMMJJT.cjs');