@farm.js/core 0.1.0-beta.96 → 0.1.0-beta.97

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 (311) hide show
  1. package/dist/after.cjs +1 -1
  2. package/dist/after.mjs +1 -1
  3. package/dist/agent-runtime.d.mts +3 -2
  4. package/dist/agent-runtime.d.ts +3 -2
  5. package/dist/api/route-manager.cjs +43 -4
  6. package/dist/api/route-manager.d.mts +4 -3
  7. package/dist/api/route-manager.d.ts +4 -3
  8. package/dist/api/route-manager.mjs +6 -6
  9. package/dist/api/runtime.cjs +43 -4
  10. package/dist/api/runtime.d.mts +1 -1
  11. package/dist/api/runtime.d.ts +1 -1
  12. package/dist/api/runtime.mjs +4 -4
  13. package/dist/api.cjs +239 -70
  14. package/dist/api.d.mts +7 -6
  15. package/dist/api.d.ts +7 -6
  16. package/dist/api.mjs +17 -11
  17. package/dist/{app-CIIEvA4r.d.ts → app-CIOx3LvY.d.ts} +4 -4
  18. package/dist/{app-O4AEC1OH.d.mts → app-DBd6437H.d.mts} +4 -4
  19. package/dist/app-markdown.d.mts +4 -3
  20. package/dist/app-markdown.d.ts +4 -3
  21. package/dist/cache.cjs +42 -4
  22. package/dist/cache.d.mts +68 -1
  23. package/dist/cache.d.ts +68 -1
  24. package/dist/cache.mjs +3 -3
  25. package/dist/{chunk-AXVJCMVF.mjs → chunk-2HDOV47R.mjs} +3 -3
  26. package/dist/chunk-2HDOV47R.mjs.map +1 -0
  27. package/dist/{chunk-RBRLLZL5.mjs → chunk-34IAPZBG.mjs} +16 -3
  28. package/dist/chunk-34IAPZBG.mjs.map +1 -0
  29. package/dist/{chunk-VV24CC42.mjs → chunk-35NPLKQJ.mjs} +2 -2
  30. package/dist/{chunk-MM46HTX6.mjs → chunk-3TWQERDE.mjs} +4 -3
  31. package/dist/chunk-3TWQERDE.mjs.map +1 -0
  32. package/dist/{chunk-RWYRFCLG.mjs → chunk-4X57GXQA.mjs} +2 -2
  33. package/dist/{chunk-3I55IGXU.mjs → chunk-52BR7LTX.mjs} +14 -15
  34. package/dist/chunk-52BR7LTX.mjs.map +1 -0
  35. package/dist/{chunk-RAGSHKDC.mjs → chunk-6EJHNHH4.mjs} +38 -3
  36. package/dist/chunk-6EJHNHH4.mjs.map +1 -0
  37. package/dist/{chunk-ZFNK77WN.mjs → chunk-6JNGOC37.mjs} +2 -2
  38. package/dist/{after.cjs.map → chunk-6JNGOC37.mjs.map} +1 -1
  39. package/dist/{chunk-MOW47IF5.mjs → chunk-6UYVU46O.mjs} +2 -2
  40. package/dist/{chunk-7MABZJIM.mjs → chunk-7PYVLJ4J.mjs} +1 -1
  41. package/dist/chunk-7PYVLJ4J.mjs.map +1 -0
  42. package/dist/{chunk-54XSGLKT.mjs → chunk-D7F7YZ7L.mjs} +93 -67
  43. package/dist/chunk-D7F7YZ7L.mjs.map +1 -0
  44. package/dist/{chunk-SCFX4UTD.mjs → chunk-EHTUKVSW.mjs} +1 -1
  45. package/dist/chunk-EHTUKVSW.mjs.map +1 -0
  46. package/dist/{chunk-LZTGDH3H.mjs → chunk-EPDIF432.mjs} +424 -10
  47. package/dist/chunk-EPDIF432.mjs.map +1 -0
  48. package/dist/{chunk-GZHKWHCH.mjs → chunk-FP5Q67FO.mjs} +167 -96
  49. package/dist/chunk-FP5Q67FO.mjs.map +1 -0
  50. package/dist/{chunk-HHZAOTQD.mjs → chunk-GJ7W6LNK.mjs} +7 -6
  51. package/dist/chunk-GJ7W6LNK.mjs.map +1 -0
  52. package/dist/{chunk-RLGUZ3HS.mjs → chunk-I3OOUWO5.mjs} +3 -3
  53. package/dist/{chunk-LKKMI7JG.mjs → chunk-IZBX2TEU.mjs} +153 -68
  54. package/dist/chunk-IZBX2TEU.mjs.map +1 -0
  55. package/dist/{chunk-74QPONAN.mjs → chunk-J3MPQ4MQ.mjs} +2 -2
  56. package/dist/{chunk-74QPONAN.mjs.map → chunk-J3MPQ4MQ.mjs.map} +1 -1
  57. package/dist/{chunk-ODJGAWDH.mjs → chunk-JV7JUD7Q.mjs} +4 -4
  58. package/dist/{chunk-Q3OX763A.mjs → chunk-LXDASSTE.mjs} +2 -2
  59. package/dist/{chunk-ZRBCBOEX.mjs → chunk-N2FY2QZ7.mjs} +28 -3
  60. package/dist/chunk-N2FY2QZ7.mjs.map +1 -0
  61. package/dist/{chunk-MRVJCLYQ.mjs → chunk-PSQ7N4XP.mjs} +4 -2
  62. package/dist/chunk-PSQ7N4XP.mjs.map +1 -0
  63. package/dist/{chunk-HVG3HLQZ.mjs → chunk-Q7WGOOAI.mjs} +3 -3
  64. package/dist/{chunk-WTYAPO5I.mjs → chunk-RCNWMEBT.mjs} +3 -2
  65. package/dist/{chunk-WTYAPO5I.mjs.map → chunk-RCNWMEBT.mjs.map} +1 -1
  66. package/dist/{chunk-3INDBMUU.mjs → chunk-TGDIACZT.mjs} +2 -2
  67. package/dist/{chunk-WB75GIX2.mjs → chunk-TQTB33JS.mjs} +14 -3
  68. package/dist/chunk-TQTB33JS.mjs.map +1 -0
  69. package/dist/{chunk-WMAYETRD.mjs → chunk-TT3E2JOF.mjs} +3 -3
  70. package/dist/{chunk-FVAM43KI.mjs → chunk-UMUWR5XA.mjs} +2 -2
  71. package/dist/{chunk-VOUJW4FL.mjs → chunk-WD2EBM3I.mjs} +70 -15
  72. package/dist/chunk-WD2EBM3I.mjs.map +1 -0
  73. package/dist/{chunk-ZPG6SNHH.mjs → chunk-WMJGA32P.mjs} +47 -5
  74. package/dist/chunk-WMJGA32P.mjs.map +1 -0
  75. package/dist/{chunk-TKQCJMY7.mjs → chunk-X4SFHKFH.mjs} +7 -4
  76. package/dist/{chunk-TKQCJMY7.mjs.map → chunk-X4SFHKFH.mjs.map} +1 -1
  77. package/dist/{chunk-Q7GPJZCO.mjs → chunk-YIBV77KZ.mjs} +26 -7
  78. package/dist/chunk-YIBV77KZ.mjs.map +1 -0
  79. package/dist/client/lifecycle.mjs +2 -2
  80. package/dist/{client-mcMC334J.d.mts → client-DWoLZ3QU.d.mts} +52 -5
  81. package/dist/{client-d5ONQ-Pd.d.ts → client-DuQuQC1h.d.ts} +52 -5
  82. package/dist/client-cache-BMxuFqwH.d.ts +18 -0
  83. package/dist/client-cache-CCK-fCe0.d.mts +18 -0
  84. package/dist/{client-plugins-BvClItiL.d.mts → client-plugins-B6-07YmP.d.mts} +52 -99
  85. package/dist/{client-plugins-B9Sq-iMg.d.ts → client-plugins-By6MVUX-.d.ts} +52 -99
  86. package/dist/client-plugins.cjs +1 -1
  87. package/dist/client-plugins.d.mts +3 -2
  88. package/dist/client-plugins.d.ts +3 -2
  89. package/dist/client-plugins.mjs +2 -2
  90. package/dist/client.cjs +757 -104
  91. package/dist/client.d.mts +124 -16
  92. package/dist/client.d.ts +124 -16
  93. package/dist/client.mjs +28 -14
  94. package/dist/config.d.mts +3 -2
  95. package/dist/config.d.ts +3 -2
  96. package/dist/{devtools-S52RRRMN.mjs → devtools-XWZX6CCL.mjs} +5 -5
  97. package/dist/{devtools-client-EOVDBPOI.mjs → devtools-client-Z7QQA3Q2.mjs} +2 -2
  98. package/dist/{devtools-ui-NJKFORTG.mjs → devtools-ui-2HG5M4EL.mjs} +3 -1
  99. package/dist/devtools-ui-2HG5M4EL.mjs.map +1 -0
  100. package/dist/docs.cjs +24 -5
  101. package/dist/docs.mjs +5 -5
  102. package/dist/i18n/server.cjs +13 -2
  103. package/dist/i18n/server.d.mts +2 -2
  104. package/dist/i18n/server.d.ts +2 -2
  105. package/dist/i18n/server.mjs +1 -1
  106. package/dist/index.cjs +1578 -772
  107. package/dist/index.d.mts +28 -20
  108. package/dist/index.d.ts +28 -20
  109. package/dist/index.mjs +53 -33
  110. package/dist/index.mjs.map +1 -1
  111. package/dist/integration-api-BT024nuJ.d.mts +97 -0
  112. package/dist/integration-api-BT024nuJ.d.ts +97 -0
  113. package/dist/integrations.d.mts +3 -2
  114. package/dist/integrations.d.ts +3 -2
  115. package/dist/internal/build-runtime.cjs +710 -532
  116. package/dist/internal/build-runtime.d.mts +5 -4
  117. package/dist/internal/build-runtime.d.ts +5 -4
  118. package/dist/internal/build-runtime.mjs +15 -15
  119. package/dist/internal/client-runtime.cjs +1 -1
  120. package/dist/internal/client-runtime.mjs +2 -2
  121. package/dist/internal/config-runtime.cjs +4 -1
  122. package/dist/internal/config-runtime.d.mts +4 -3
  123. package/dist/internal/config-runtime.d.ts +4 -3
  124. package/dist/internal/config-runtime.mjs +4 -4
  125. package/dist/internal/product-telemetry-runtime.cjs +1 -1
  126. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  127. package/dist/internal/production-runtime.cjs +29 -3
  128. package/dist/internal/production-runtime.d.mts +8 -7
  129. package/dist/internal/production-runtime.d.ts +8 -7
  130. package/dist/internal/production-runtime.mjs +5 -5
  131. package/dist/{metadata-route-yV4U6X8h.d.ts → metadata-route-8_V3UonT.d.ts} +1 -1
  132. package/dist/{metadata-route-p4K1l92V.d.mts → metadata-route-CWP_HjGU.d.mts} +1 -1
  133. package/dist/middleware.cjs +28 -2
  134. package/dist/middleware.d.mts +5 -4
  135. package/dist/middleware.d.ts +5 -4
  136. package/dist/middleware.mjs +4 -4
  137. package/dist/navigation.cjs +3 -1
  138. package/dist/navigation.mjs +3 -3
  139. package/dist/observability.cjs +27 -2
  140. package/dist/observability.mjs +1 -1
  141. package/dist/plugin.cjs +474 -334
  142. package/dist/plugin.d.mts +3 -2
  143. package/dist/plugin.d.ts +3 -2
  144. package/dist/plugin.mjs +12 -12
  145. package/dist/{production-runtime-IkB0Qj4i.d.mts → production-runtime-BGRH1dKG.d.mts} +1 -1
  146. package/dist/{production-runtime-0JTch4_d.d.ts → production-runtime-CdmzsDax.d.ts} +1 -1
  147. package/dist/query/client.cjs +11 -3
  148. package/dist/query/client.mjs +12 -4
  149. package/dist/query/client.mjs.map +1 -1
  150. package/dist/{render-plan-Dc8CjNI7.d.ts → render-plan-0GeHiGVZ.d.ts} +1 -1
  151. package/dist/{render-plan-CU31j-Jk.d.mts → render-plan-DLxJYAA5.d.mts} +1 -1
  152. package/dist/renderer-client.cjs +140 -26
  153. package/dist/renderer-client.d.mts +7 -6
  154. package/dist/renderer-client.d.ts +7 -6
  155. package/dist/renderer-client.mjs +16 -19
  156. package/dist/renderer-client.mjs.map +1 -1
  157. package/dist/{request-BXa1KY8i.d.mts → request-BCNXSXLh.d.mts} +1 -1
  158. package/dist/{request-CUUBujZt.d.ts → request-BstWbZ6O.d.ts} +1 -1
  159. package/dist/request.d.mts +4 -3
  160. package/dist/request.d.ts +4 -3
  161. package/dist/{route-Y8lfz1wF.d.ts → route-4pd-EVtw.d.ts} +45 -50
  162. package/dist/{route-Cq3aObmj.d.mts → route-CvEr4Uc9.d.mts} +45 -50
  163. package/dist/routes.cjs +27 -2
  164. package/dist/routes.d.mts +3 -2
  165. package/dist/routes.d.ts +3 -2
  166. package/dist/routes.mjs +4 -4
  167. package/dist/{runtime-j1S3sDTh.d.ts → runtime-BgDQzBiu.d.ts} +1 -0
  168. package/dist/{runtime-DDwvDtS4.d.mts → runtime-CV2UCV-5.d.mts} +1 -0
  169. package/dist/server-action-security.mjs +2 -2
  170. package/dist/server-fn-client.cjs +34 -2
  171. package/dist/server-fn-client.d.mts +6 -0
  172. package/dist/server-fn-client.d.ts +6 -0
  173. package/dist/server-fn-client.mjs +1 -1
  174. package/dist/server-fn.cjs +42 -4
  175. package/dist/server-fn.mjs +5 -5
  176. package/dist/server-plugins.d.mts +4 -3
  177. package/dist/server-plugins.d.ts +4 -3
  178. package/dist/server-query-client.cjs +146 -27
  179. package/dist/server-query-client.d.mts +3 -3
  180. package/dist/server-query-client.d.ts +3 -3
  181. package/dist/server-query-client.mjs +7 -7
  182. package/dist/{server-query-runtime-3zAj77yv.d.ts → server-query-runtime-DXRNhX_3.d.ts} +2 -0
  183. package/dist/{server-query-runtime-B50KAcj5.d.mts → server-query-runtime-aP52iuL5.d.mts} +2 -0
  184. package/dist/server-query.cjs +44 -5
  185. package/dist/server-query.d.mts +4 -0
  186. package/dist/server-query.d.ts +4 -0
  187. package/dist/server-query.mjs +7 -7
  188. package/dist/server.cjs +499 -355
  189. package/dist/server.d.mts +11 -10
  190. package/dist/server.d.ts +11 -10
  191. package/dist/server.mjs +16 -16
  192. package/dist/{spa-router-CyLkwst6.d.mts → spa-router-BeyAVSc6.d.mts} +1 -1
  193. package/dist/{spa-router-BkqGXaV_.d.ts → spa-router-COgu4txb.d.ts} +1 -1
  194. package/dist/testing.cjs +27 -2
  195. package/dist/testing.d.mts +3 -2
  196. package/dist/testing.d.ts +3 -2
  197. package/dist/testing.mjs +8 -8
  198. package/dist/{utils-NKR6SoNv.d.mts → utils-DL2VwDQl.d.mts} +1 -1
  199. package/dist/{utils-B2OHrb9F.d.ts → utils-DkU2c_1B.d.ts} +1 -1
  200. package/dist/version.cjs +1 -1
  201. package/dist/version.mjs +1 -1
  202. package/dist/vite.cjs +482 -338
  203. package/dist/vite.d.mts +3 -2
  204. package/dist/vite.d.ts +3 -2
  205. package/dist/vite.mjs +16 -12
  206. package/package.json +17 -17
  207. package/types/client.d.ts +87 -1
  208. package/dist/agent-runtime.cjs.map +0 -1
  209. package/dist/api/route-manager.cjs.map +0 -1
  210. package/dist/api/runtime.cjs.map +0 -1
  211. package/dist/api.cjs.map +0 -1
  212. package/dist/app-markdown.cjs.map +0 -1
  213. package/dist/cache.cjs.map +0 -1
  214. package/dist/chunk-3I55IGXU.mjs.map +0 -1
  215. package/dist/chunk-54XSGLKT.mjs.map +0 -1
  216. package/dist/chunk-7MABZJIM.mjs.map +0 -1
  217. package/dist/chunk-AXVJCMVF.mjs.map +0 -1
  218. package/dist/chunk-GZHKWHCH.mjs.map +0 -1
  219. package/dist/chunk-HHZAOTQD.mjs.map +0 -1
  220. package/dist/chunk-LKKMI7JG.mjs.map +0 -1
  221. package/dist/chunk-LZTGDH3H.mjs.map +0 -1
  222. package/dist/chunk-MM46HTX6.mjs.map +0 -1
  223. package/dist/chunk-MRVJCLYQ.mjs.map +0 -1
  224. package/dist/chunk-Q7GPJZCO.mjs.map +0 -1
  225. package/dist/chunk-RAGSHKDC.mjs.map +0 -1
  226. package/dist/chunk-RBRLLZL5.mjs.map +0 -1
  227. package/dist/chunk-SCFX4UTD.mjs.map +0 -1
  228. package/dist/chunk-VOUJW4FL.mjs.map +0 -1
  229. package/dist/chunk-WB75GIX2.mjs.map +0 -1
  230. package/dist/chunk-ZFNK77WN.mjs.map +0 -1
  231. package/dist/chunk-ZPG6SNHH.mjs.map +0 -1
  232. package/dist/chunk-ZRBCBOEX.mjs.map +0 -1
  233. package/dist/client/lifecycle.cjs.map +0 -1
  234. package/dist/client-cache-CopR_MaI.d.mts +0 -6
  235. package/dist/client-cache-Djy_TlE8.d.ts +0 -6
  236. package/dist/client-plugins.cjs.map +0 -1
  237. package/dist/client.cjs.map +0 -1
  238. package/dist/config.cjs.map +0 -1
  239. package/dist/cron.cjs.map +0 -1
  240. package/dist/deferred.cjs.map +0 -1
  241. package/dist/deployment.cjs.map +0 -1
  242. package/dist/devtools-ui-NJKFORTG.mjs.map +0 -1
  243. package/dist/docs.cjs.map +0 -1
  244. package/dist/env-types.cjs.map +0 -1
  245. package/dist/env.cjs.map +0 -1
  246. package/dist/environment/vite.cjs.map +0 -1
  247. package/dist/environment.cjs.map +0 -1
  248. package/dist/font.cjs.map +0 -1
  249. package/dist/headers.cjs.map +0 -1
  250. package/dist/i18n/client.cjs.map +0 -1
  251. package/dist/i18n/index.cjs.map +0 -1
  252. package/dist/i18n/server.cjs.map +0 -1
  253. package/dist/image/server.cjs.map +0 -1
  254. package/dist/image/sharp.cjs.map +0 -1
  255. package/dist/image.cjs.map +0 -1
  256. package/dist/index.cjs.map +0 -1
  257. package/dist/instrumentation.cjs.map +0 -1
  258. package/dist/integrations.cjs.map +0 -1
  259. package/dist/internal/build-runtime.cjs.map +0 -1
  260. package/dist/internal/client-runtime.cjs.map +0 -1
  261. package/dist/internal/config-runtime.cjs.map +0 -1
  262. package/dist/internal/isolated-boundary.cjs.map +0 -1
  263. package/dist/internal/metadata-image-runtime.cjs.map +0 -1
  264. package/dist/internal/product-telemetry-runtime.cjs.map +0 -1
  265. package/dist/internal/production-node-env.cjs.map +0 -1
  266. package/dist/internal/production-runtime.cjs.map +0 -1
  267. package/dist/markdown.cjs.map +0 -1
  268. package/dist/middleware.cjs.map +0 -1
  269. package/dist/navigation.cjs.map +0 -1
  270. package/dist/observability.cjs.map +0 -1
  271. package/dist/plugin.cjs.map +0 -1
  272. package/dist/query/client.cjs.map +0 -1
  273. package/dist/query/index.cjs.map +0 -1
  274. package/dist/query/parsers.cjs.map +0 -1
  275. package/dist/query/server.cjs.map +0 -1
  276. package/dist/renderer/react/client.cjs.map +0 -1
  277. package/dist/renderer/react/server.cjs.map +0 -1
  278. package/dist/renderer/react/vite.cjs.map +0 -1
  279. package/dist/renderer-client.cjs.map +0 -1
  280. package/dist/renderer.cjs.map +0 -1
  281. package/dist/request.cjs.map +0 -1
  282. package/dist/router.cjs.map +0 -1
  283. package/dist/routes.cjs.map +0 -1
  284. package/dist/server-action-security.cjs.map +0 -1
  285. package/dist/server-fn-client.cjs.map +0 -1
  286. package/dist/server-fn.cjs.map +0 -1
  287. package/dist/server-plugins.cjs.map +0 -1
  288. package/dist/server-query-client.cjs.map +0 -1
  289. package/dist/server-query.cjs.map +0 -1
  290. package/dist/server.cjs.map +0 -1
  291. package/dist/storage.cjs.map +0 -1
  292. package/dist/testing.cjs.map +0 -1
  293. package/dist/theme/client.cjs.map +0 -1
  294. package/dist/theme/index.cjs.map +0 -1
  295. package/dist/theme/runtime.cjs.map +0 -1
  296. package/dist/theme/server.cjs.map +0 -1
  297. package/dist/version.cjs.map +0 -1
  298. package/dist/vite.cjs.map +0 -1
  299. package/dist/workflows.cjs.map +0 -1
  300. /package/dist/{chunk-VV24CC42.mjs.map → chunk-35NPLKQJ.mjs.map} +0 -0
  301. /package/dist/{chunk-RWYRFCLG.mjs.map → chunk-4X57GXQA.mjs.map} +0 -0
  302. /package/dist/{chunk-MOW47IF5.mjs.map → chunk-6UYVU46O.mjs.map} +0 -0
  303. /package/dist/{chunk-RLGUZ3HS.mjs.map → chunk-I3OOUWO5.mjs.map} +0 -0
  304. /package/dist/{chunk-ODJGAWDH.mjs.map → chunk-JV7JUD7Q.mjs.map} +0 -0
  305. /package/dist/{chunk-Q3OX763A.mjs.map → chunk-LXDASSTE.mjs.map} +0 -0
  306. /package/dist/{chunk-HVG3HLQZ.mjs.map → chunk-Q7WGOOAI.mjs.map} +0 -0
  307. /package/dist/{chunk-3INDBMUU.mjs.map → chunk-TGDIACZT.mjs.map} +0 -0
  308. /package/dist/{chunk-WMAYETRD.mjs.map → chunk-TT3E2JOF.mjs.map} +0 -0
  309. /package/dist/{chunk-FVAM43KI.mjs.map → chunk-UMUWR5XA.mjs.map} +0 -0
  310. /package/dist/{devtools-S52RRRMN.mjs.map → devtools-XWZX6CCL.mjs.map} +0 -0
  311. /package/dist/{devtools-client-EOVDBPOI.mjs.map → devtools-client-Z7QQA3Q2.mjs.map} +0 -0
@@ -49,7 +49,7 @@ import {
49
49
  FARM_DEVTOOLS_LAUNCH_PARAM,
50
50
  FARM_DEVTOOLS_PATH,
51
51
  resolveFarmDevtoolsConfig
52
- } from "./chunk-7MABZJIM.mjs";
52
+ } from "./chunk-7PYVLJ4J.mjs";
53
53
  import {
54
54
  normalizeRouteRules
55
55
  } from "./chunk-7T2QYWDH.mjs";
@@ -96,7 +96,7 @@ import {
96
96
  } from "./chunk-BZAIS65C.mjs";
97
97
  import {
98
98
  resolveServerActionsConfig
99
- } from "./chunk-VV24CC42.mjs";
99
+ } from "./chunk-35NPLKQJ.mjs";
100
100
  import {
101
101
  _setDefaultFarmThemeConfig,
102
102
  getTheme
@@ -129,7 +129,7 @@ import {
129
129
  } from "./chunk-ISSFLGJ5.mjs";
130
130
  import {
131
131
  MiddlewareManager
132
- } from "./chunk-RWYRFCLG.mjs";
132
+ } from "./chunk-4X57GXQA.mjs";
133
133
  import {
134
134
  _clearCurrentMiddlewareContext,
135
135
  _clearCurrentMiddlewareData,
@@ -141,20 +141,20 @@ import {
141
141
  } from "./chunk-YUE4CJNB.mjs";
142
142
  import {
143
143
  _withAfterNodeMiddleware
144
- } from "./chunk-ZFNK77WN.mjs";
144
+ } from "./chunk-6JNGOC37.mjs";
145
145
  import {
146
146
  APIRouteManager,
147
147
  discoverProgrammaticRoutePaths,
148
148
  findProgrammaticRouteFiles,
149
149
  loadProgrammaticRouteManifests
150
- } from "./chunk-WMAYETRD.mjs";
150
+ } from "./chunk-TT3E2JOF.mjs";
151
151
  import {
152
152
  _runWithFarmI18nRequest,
153
153
  _setDefaultFarmI18nRuntime,
154
154
  createFarmI18nRuntime,
155
155
  getFarmI18nClientSnapshot,
156
156
  readFarmI18nCatalogs
157
- } from "./chunk-WB75GIX2.mjs";
157
+ } from "./chunk-TQTB33JS.mjs";
158
158
  import {
159
159
  resolveFarmI18nConfig
160
160
  } from "./chunk-STV7A2LH.mjs";
@@ -198,7 +198,7 @@ import {
198
198
  import {
199
199
  isFarmAPIPathname,
200
200
  resolvePluginRoutes
201
- } from "./chunk-MM46HTX6.mjs";
201
+ } from "./chunk-3TWQERDE.mjs";
202
202
  import {
203
203
  resolveFarmAPIServerBasePath
204
204
  } from "./chunk-O2IGROSM.mjs";
@@ -237,15 +237,15 @@ import {
237
237
  createFarmCacheKey,
238
238
  getFarmDataCache,
239
239
  normalizeRevalidatePath
240
- } from "./chunk-AXVJCMVF.mjs";
240
+ } from "./chunk-2HDOV47R.mjs";
241
241
  import {
242
242
  configureFarmObservability,
243
243
  emitFarmEvent,
244
244
  runWithFarmRequestSpan
245
- } from "./chunk-ZRBCBOEX.mjs";
245
+ } from "./chunk-N2FY2QZ7.mjs";
246
246
  import {
247
247
  FARM_VERSION
248
- } from "./chunk-74QPONAN.mjs";
248
+ } from "./chunk-J3MPQ4MQ.mjs";
249
249
  import {
250
250
  FARM_CONFIG_REWRITES_PLUGIN_NAME
251
251
  } from "./chunk-PHN22XB2.mjs";
@@ -305,10 +305,11 @@ var ROUTE_PROP_LABELS = /* @__PURE__ */ new Map([
305
305
  ["middlewareData", "middleware request data"],
306
306
  ["context", "request context"]
307
307
  ]);
308
- function resolveConfiguredRouteRenderingConfig(mod, source) {
308
+ function resolveConfiguredRouteRenderingConfig(mod, source, options) {
309
+ const pprEnabled = options?.experimentalPPR === true;
309
310
  const directiveConfig = parseRouteRenderingDirective(source);
310
311
  let ssg = directiveConfig?.ssg ?? false;
311
- let ppr = directiveConfig?.ppr ?? false;
312
+ let requestedPPR = directiveConfig?.ppr ?? false;
312
313
  let revalidate = directiveConfig?.revalidate;
313
314
  const moduleDynamic = normalizeDynamicMode(mod?.dynamic);
314
315
  const dynamic = moduleDynamic ?? directiveConfig?.dynamic;
@@ -318,12 +319,12 @@ function resolveConfiguredRouteRenderingConfig(mod, source) {
318
319
  ssg = mod.ssg === true;
319
320
  }
320
321
  if (hasExplicitPPR) {
321
- ppr = mod?.ppr === true || mod?.experimental_ppr === true;
322
+ requestedPPR = mod?.ppr === true || mod?.experimental_ppr === true;
322
323
  }
323
324
  if (typeof mod?.revalidate === "number") {
324
325
  if (mod.revalidate > 0) {
325
326
  revalidate = mod.revalidate;
326
- if (!hasExplicitSsg && !ppr) {
327
+ if (!hasExplicitSsg && !requestedPPR) {
327
328
  ssg = true;
328
329
  }
329
330
  } else {
@@ -337,23 +338,24 @@ function resolveConfiguredRouteRenderingConfig(mod, source) {
337
338
  }
338
339
  if (moduleDynamic === "force-static" || moduleDynamic === "error") {
339
340
  ssg = true;
340
- ppr = false;
341
+ requestedPPR = false;
341
342
  } else if (moduleDynamic === "force-dynamic") {
342
343
  ssg = false;
343
- ppr = false;
344
+ requestedPPR = false;
344
345
  revalidate = void 0;
345
346
  }
347
+ const ppr = pprEnabled && !ssg && requestedPPR;
346
348
  return {
347
349
  ssg,
348
- ppr: ssg ? false : ppr,
350
+ ppr,
349
351
  revalidate: ssg || ppr ? revalidate : void 0,
350
352
  dynamic,
351
353
  directive: directiveConfig?.directive
352
354
  };
353
355
  }
354
356
  __name(resolveConfiguredRouteRenderingConfig, "resolveConfiguredRouteRenderingConfig");
355
- function resolveRouteRenderingConfig(mod, source) {
356
- const rendering = resolveConfiguredRouteRenderingConfig(mod, source);
357
+ function resolveRouteRenderingConfig(mod, source, options) {
358
+ const rendering = resolveConfiguredRouteRenderingConfig(mod, source, options);
357
359
  if (!rendering.ssg || !source) {
358
360
  return rendering;
359
361
  }
@@ -368,9 +370,9 @@ function resolveRouteRenderingConfig(mod, source) {
368
370
  };
369
371
  }
370
372
  __name(resolveRouteRenderingConfig, "resolveRouteRenderingConfig");
371
- async function resolveRouteRenderingConfigFromFile(mod, filePath) {
373
+ async function resolveRouteRenderingConfigFromFile(mod, filePath, options) {
372
374
  const source = await readFile(filePath, "utf8").catch(() => void 0);
373
- return resolveRouteRenderingConfig(mod, source);
375
+ return resolveRouteRenderingConfig(mod, source, options);
374
376
  }
375
377
  __name(resolveRouteRenderingConfigFromFile, "resolveRouteRenderingConfigFromFile");
376
378
  function analyzeStaticRouteCandidate(mod, source, options = {}) {
@@ -905,8 +907,8 @@ function getRevalidateInterval(mod) {
905
907
  return resolveRouteRenderingConfig(mod).revalidate;
906
908
  }
907
909
  __name(getRevalidateInterval, "getRevalidateInterval");
908
- function hasPPR(mod) {
909
- return resolveRouteRenderingConfig(mod).ppr;
910
+ function hasPPR(mod, options) {
911
+ return resolveRouteRenderingConfig(mod, void 0, options).ppr;
910
912
  }
911
913
  __name(hasPPR, "hasPPR");
912
914
  function generateSSGManifest(pages) {
@@ -1258,7 +1260,7 @@ function getIslandStrategyExport(content) {
1258
1260
  __name(getIslandStrategyExport, "getIslandStrategyExport");
1259
1261
  function stripUseClientDirective(content) {
1260
1262
  return content.replace(
1261
- /^((?:\s|\/\/[^\n]*(?:\n|$)|\/\*[\s\S]*?\*\/)*)(["'])use client\2\s*;?\s*/,
1263
+ /^((?:\s|\/\/[^\n]*(?:\n|$)|\/\*[\s\S]*?\*\/|(?:"[^"\n]*"|'[^'\n]*')\s*;?)*)(["'])use client\2\s*;?\s*/,
1262
1264
  "$1"
1263
1265
  );
1264
1266
  }
@@ -5460,7 +5462,8 @@ var _ServerRenderer = class _ServerRenderer {
5460
5462
  }
5461
5463
  const renderingConfig = await resolveRouteRenderingConfigFromFile(
5462
5464
  routeModule,
5463
- route.modulePath
5465
+ route.modulePath,
5466
+ { experimentalPPR: this.config.experimental?.ppr === true }
5464
5467
  );
5465
5468
  const pprBypassReason = renderingConfig.ppr ? this.getPPRShellBypassReason(req, middlewareMap, middlewareContext, pluginExposedContext) : void 0;
5466
5469
  const canCachePPRShell = renderingConfig.ppr && !pprBypassReason;
@@ -6165,6 +6168,11 @@ var _ServerRenderer = class _ServerRenderer {
6165
6168
  );
6166
6169
  res.statusCode = options.statusCode;
6167
6170
  res.setHeader("Content-Type", "text/html; charset=utf-8");
6171
+ res.setHeader("Cache-Control", "private, no-store");
6172
+ res.setHeader("X-Content-Type-Options", "nosniff");
6173
+ if (typeof res.removeHeader === "function") {
6174
+ res.removeHeader("X-Farm-PPR");
6175
+ }
6168
6176
  res.write(this.createFullHTML(html, false, options.pathname));
6169
6177
  res.end();
6170
6178
  return true;
@@ -6891,6 +6899,7 @@ var _FarmApp = class _FarmApp {
6891
6899
  serverComponents: config.experimental?.serverComponents ?? false,
6892
6900
  serverActions: config.experimental?.serverActions ?? false,
6893
6901
  isolatedClientHydration: config.experimental?.isolatedClientHydration ?? "off",
6902
+ ppr: config.experimental?.ppr ?? false,
6894
6903
  ...config.experimental
6895
6904
  },
6896
6905
  vite: config.vite || {}
@@ -7879,13 +7888,60 @@ function isArrayIndex(key) {
7879
7888
  }
7880
7889
  __name(isArrayIndex, "isArrayIndex");
7881
7890
 
7891
+ // src/client-cache-persistence-build.ts
7892
+ import fs6 from "fs";
7893
+ import path10 from "path";
7894
+ var ADAPTER_EXTENSIONS = ["ts", "tsx", "js", "jsx", "mts", "mjs"];
7895
+ function resolveFarmClientCacheAdapterEntry(root, cache) {
7896
+ const client = cache?.client;
7897
+ const adapter = client?.adapter;
7898
+ if (adapter === void 0) return void 0;
7899
+ if (typeof adapter !== "string" || adapter.trim().length === 0) {
7900
+ throw new Error(
7901
+ 'cache.client.adapter must be a module path string, for example "./src/cache-adapter".'
7902
+ );
7903
+ }
7904
+ const resolved = path10.resolve(root, adapter);
7905
+ const found = resolveAdapterFile(resolved);
7906
+ if (!found) {
7907
+ throw new Error(
7908
+ `cache.client.adapter was not found: ${adapter} (resolved to ${resolved}). Point it at a client module whose default export is created with defineClientCacheAdapter().`
7909
+ );
7910
+ }
7911
+ const options = {};
7912
+ if (client?.version !== void 0) options.version = client.version;
7913
+ if (client?.flushDelayMs !== void 0) options.flushDelayMs = client.flushDelayMs;
7914
+ return { importPath: found.replace(/\\/g, "/"), options };
7915
+ }
7916
+ __name(resolveFarmClientCacheAdapterEntry, "resolveFarmClientCacheAdapterEntry");
7917
+ function resolveAdapterFile(resolved) {
7918
+ if (fs6.existsSync(resolved) && fs6.statSync(resolved).isFile()) return resolved;
7919
+ for (const extension of ADAPTER_EXTENSIONS) {
7920
+ const candidate = `${resolved}.${extension}`;
7921
+ if (fs6.existsSync(candidate) && fs6.statSync(candidate).isFile()) return candidate;
7922
+ }
7923
+ return void 0;
7924
+ }
7925
+ __name(resolveAdapterFile, "resolveAdapterFile");
7926
+ function generateClientCachePersistenceCode(entry) {
7927
+ if (!entry) return { imports: "", init: "" };
7928
+ return {
7929
+ imports: [
7930
+ `import * as __farmClientCacheAdapterModule from ${JSON.stringify(entry.importPath)};`,
7931
+ `import { initConfiguredClientCachePersistence as __farmInitClientCachePersistence } from "@farm.js/core/client";`
7932
+ ].join("\n"),
7933
+ init: `__farmInitClientCachePersistence(__farmClientCacheAdapterModule, ${JSON.stringify(entry.options)});`
7934
+ };
7935
+ }
7936
+ __name(generateClientCachePersistenceCode, "generateClientCachePersistenceCode");
7937
+
7882
7938
  // src/type-artifacts.ts
7883
7939
  import { existsSync as existsSync6, mkdirSync as mkdirSync4, readFileSync as readFileSync3, unlinkSync } from "fs";
7884
7940
  import { dirname as dirname4, isAbsolute as isAbsolute4, join as join5, resolve as resolve6 } from "path";
7885
7941
 
7886
7942
  // src/routing/generate-route-types.ts
7887
- import * as path10 from "path";
7888
- import * as fs6 from "fs";
7943
+ import * as path11 from "path";
7944
+ import * as fs7 from "fs";
7889
7945
  function routeSegmentsToTsTypeLiteral(segments) {
7890
7946
  if (segments.length === 0) return '"/"';
7891
7947
  const hasDynamic = segments.some((s) => s.startsWith("["));
@@ -7935,12 +7991,12 @@ function createRoutePattern(route) {
7935
7991
  __name(createRoutePattern, "createRoutePattern");
7936
7992
  var DEFAULT_OUT_FILE = "farm-routes.d.ts";
7937
7993
  async function generateRouteTypes(options) {
7938
- const root = path10.resolve(options.root);
7994
+ const root = path11.resolve(options.root);
7939
7995
  const srcDir = options.srcDir || "src";
7940
7996
  const outFile = options.outFile || DEFAULT_OUT_FILE;
7941
- const outPath = path10.isAbsolute(outFile) ? outFile : path10.join(root, srcDir, outFile);
7997
+ const outPath = path11.isAbsolute(outFile) ? outFile : path11.join(root, srcDir, outFile);
7942
7998
  const content = await createRouteTypeDeclarations(options, outPath);
7943
- fs6.mkdirSync(path10.dirname(outPath), { recursive: true });
7999
+ fs7.mkdirSync(path11.dirname(outPath), { recursive: true });
7944
8000
  writeFileIfChanged(outPath, content);
7945
8001
  return outPath;
7946
8002
  }
@@ -7955,8 +8011,8 @@ async function createRouteTypeDeclarations(options, outPath) {
7955
8011
  const routeModulePatterns = /* @__PURE__ */ new Set();
7956
8012
  const glob = await import("fast-glob");
7957
8013
  for (const source of sourceRoots) {
7958
- const appDir = path10.join(source.root, source.srcDir, "app");
7959
- if (fs6.existsSync(appDir)) {
8014
+ const appDir = path11.join(source.root, source.srcDir, "app");
8015
+ if (fs7.existsSync(appDir)) {
7960
8016
  const routeModuleFiles = await glob.default(
7961
8017
  `**/{page,layout,loading,error}.{${componentExtensions.join(",")},md,mdx}`,
7962
8018
  {
@@ -7992,7 +8048,7 @@ async function createRouteTypeDeclarations(options, outPath) {
7992
8048
  const routePathType = suppressLintOnLink ? "string" : renderTypeUnion(typeLiterals);
7993
8049
  const routePatternType = suppressLintOnLink ? "string" : renderTypeUnion(patternLiterals);
7994
8050
  const routeModulePatternType = renderTypeUnion(routeModulePatternLiterals);
7995
- const routeTypesImportPath = `./${path10.basename(outPath).replace(/\.d\.ts$/, "")}`;
8051
+ const routeTypesImportPath = `./${path11.basename(outPath).replace(/\.d\.ts$/, "")}`;
7996
8052
  const linkAugmentationBlock = suppressLintOnLink ? "" : `
7997
8053
  declare module "@farm.js/core/client" {
7998
8054
  interface LinkDefaultRoute {
@@ -8043,11 +8099,11 @@ __name(createRouteTypeDeclarations, "createRouteTypeDeclarations");
8043
8099
 
8044
8100
  // src/image-types.ts
8045
8101
  import { mkdirSync as mkdirSync2 } from "fs";
8046
- import path11 from "path";
8102
+ import path12 from "path";
8047
8103
  var FARM_STATIC_IMAGE_EXTENSIONS = ["avif", "gif", "jpeg", "jpg", "png", "webp"];
8048
8104
  function generateFarmImageTypes(options) {
8049
- const outputPath = options.outFile ? path11.resolve(options.root, options.outFile) : path11.join(options.root, options.srcDir || "src", "farm-images.d.ts");
8050
- mkdirSync2(path11.dirname(outputPath), { recursive: true });
8105
+ const outputPath = options.outFile ? path12.resolve(options.root, options.outFile) : path12.join(options.root, options.srcDir || "src", "farm-images.d.ts");
8106
+ mkdirSync2(path12.dirname(outputPath), { recursive: true });
8051
8107
  writeFileIfChanged(outputPath, createFarmImageTypeDeclarations());
8052
8108
  return outputPath;
8053
8109
  }
@@ -8075,8 +8131,8 @@ declare module "*?url" {
8075
8131
  __name(createFarmImageTypeDeclarations, "createFarmImageTypeDeclarations");
8076
8132
 
8077
8133
  // src/content-types.ts
8078
- import * as fs7 from "fs";
8079
- import * as path12 from "path";
8134
+ import * as fs8 from "fs";
8135
+ import * as path13 from "path";
8080
8136
  var CONFIG_FILENAMES = [
8081
8137
  "farm.config.ts",
8082
8138
  "farm.config.tsx",
@@ -8096,10 +8152,10 @@ var CONFIG_FILENAMES = [
8096
8152
  "config.cjs"
8097
8153
  ];
8098
8154
  function createContentTypeDeclarations(options, outPath) {
8099
- const root = path12.resolve(options.root);
8155
+ const root = path13.resolve(options.root);
8100
8156
  const projectConfig = findConfigPath(root, options.configPath);
8101
8157
  const configPaths = [
8102
- ...(options.layerConfigPaths ?? []).filter((value) => fs7.existsSync(value)),
8158
+ ...(options.layerConfigPaths ?? []).filter((value) => fs8.existsSync(value)),
8103
8159
  ...projectConfig ? [projectConfig] : []
8104
8160
  ];
8105
8161
  if (configPaths.length === 0) return createEmptyContentTypes();
@@ -8169,18 +8225,18 @@ export {};
8169
8225
  __name(createEmptyContentTypes, "createEmptyContentTypes");
8170
8226
  function findConfigPath(root, configPath) {
8171
8227
  if (configPath) {
8172
- const resolvedPath = path12.isAbsolute(configPath) ? configPath : path12.join(root, configPath);
8173
- return fs7.existsSync(resolvedPath) ? resolvedPath : null;
8228
+ const resolvedPath = path13.isAbsolute(configPath) ? configPath : path13.join(root, configPath);
8229
+ return fs8.existsSync(resolvedPath) ? resolvedPath : null;
8174
8230
  }
8175
8231
  for (const filename of CONFIG_FILENAMES) {
8176
- const resolvedPath = path12.join(root, filename);
8177
- if (fs7.existsSync(resolvedPath)) return resolvedPath;
8232
+ const resolvedPath = path13.join(root, filename);
8233
+ if (fs8.existsSync(resolvedPath)) return resolvedPath;
8178
8234
  }
8179
8235
  return null;
8180
8236
  }
8181
8237
  __name(findConfigPath, "findConfigPath");
8182
8238
  function toTypeImportPath(outPath, targetPath) {
8183
- const relativePath = path12.relative(path12.dirname(outPath), targetPath).replace(/\\/g, "/").replace(/\.(tsx?|jsx?|mjs|cjs|mts|cts)$/, "");
8239
+ const relativePath = path13.relative(path13.dirname(outPath), targetPath).replace(/\\/g, "/").replace(/\.(tsx?|jsx?|mjs|cjs|mts|cts)$/, "");
8184
8240
  return relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
8185
8241
  }
8186
8242
  __name(toTypeImportPath, "toTypeImportPath");
@@ -8477,13 +8533,13 @@ function collectLegacyTypeArtifacts(root, srcDir, stalePaths) {
8477
8533
  __name(collectLegacyTypeArtifacts, "collectLegacyTypeArtifacts");
8478
8534
 
8479
8535
  // src/vite.ts
8480
- import * as fs9 from "fs";
8481
- import * as path17 from "path";
8536
+ import * as fs10 from "fs";
8537
+ import * as path18 from "path";
8482
8538
  import { pathToFileURL as pathToFileURL3 } from "url";
8483
8539
 
8484
8540
  // src/dev-static.ts
8485
- import * as fs8 from "fs";
8486
- import * as path13 from "path";
8541
+ import * as fs9 from "fs";
8542
+ import * as path14 from "path";
8487
8543
  function shouldBypassFarmRouterForDottedPath(pathname, routeManager, baseDirs) {
8488
8544
  if (!pathname.includes(".") || pathname.endsWith(".html")) return false;
8489
8545
  const matchesAppRoute = Boolean(
@@ -8503,11 +8559,11 @@ function devServableFileExists(pathname, baseDirs) {
8503
8559
  if (!relativePathname) return false;
8504
8560
  for (const baseDir of baseDirs) {
8505
8561
  if (typeof baseDir !== "string" || baseDir.length === 0) continue;
8506
- const resolvedBase = path13.resolve(baseDir);
8507
- const candidate = path13.resolve(resolvedBase, relativePathname);
8508
- if (!candidate.startsWith(resolvedBase + path13.sep)) continue;
8562
+ const resolvedBase = path14.resolve(baseDir);
8563
+ const candidate = path14.resolve(resolvedBase, relativePathname);
8564
+ if (!candidate.startsWith(resolvedBase + path14.sep)) continue;
8509
8565
  try {
8510
- if (fs8.existsSync(candidate) && fs8.statSync(candidate).isFile()) {
8566
+ if (fs9.existsSync(candidate) && fs9.statSync(candidate).isFile()) {
8511
8567
  return true;
8512
8568
  }
8513
8569
  } catch {
@@ -8522,6 +8578,7 @@ var SERVER_FN_FACTORIES = ["createServerQuery", "createServerFn"];
8522
8578
  var FARM_CORE_IMPORT_RE = /import\s*(?!type\b)(?:[\w$]+\s*,\s*)?\{([^}]*)\}\s*from\s*(["'])@farm\.js\/core(?:\/[\w./-]+)?\2/g;
8523
8579
  function findClientServerFnViolation(code, id) {
8524
8580
  if (id.startsWith("\0") || id.startsWith("virtual:") || id.includes("node_modules")) return null;
8581
+ if (/\.(md|mdx)(\?|$)/.test(id)) return null;
8525
8582
  if (!code.includes("@farm.js/core")) return null;
8526
8583
  for (const match of code.matchAll(FARM_CORE_IMPORT_RE)) {
8527
8584
  const specifiers = match[1];
@@ -8547,7 +8604,7 @@ __name(formatServerFnBoundaryError, "formatServerFnBoundaryError");
8547
8604
 
8548
8605
  // src/image-vite.ts
8549
8606
  import { readFile as readFile4 } from "fs/promises";
8550
- import path14 from "path";
8607
+ import path15 from "path";
8551
8608
  import { imageSize as imageSize2 } from "image-size";
8552
8609
  var FARM_IMAGE_ID_PREFIX = "\0farm:image:";
8553
8610
  var STATIC_IMAGE_RE = /\.(?:avif|gif|jpe?g|png|webp)$/i;
@@ -8615,7 +8672,7 @@ async function createBlurDataURL(bytes) {
8615
8672
  __name(createBlurDataURL, "createBlurDataURL");
8616
8673
 
8617
8674
  // src/server/vite-config.ts
8618
- import path15 from "path";
8675
+ import path16 from "path";
8619
8676
  var FARM_CLIENT_ENTRY_PATTERN = "**/{page,layout,loading,error,not-found,default}.{js,jsx,ts,tsx}";
8620
8677
  var FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE = [
8621
8678
  "react",
@@ -8639,9 +8696,9 @@ function getFarmClientOptimizeDepsInclude(renderer) {
8639
8696
  }
8640
8697
  __name(getFarmClientOptimizeDepsInclude, "getFarmClientOptimizeDepsInclude");
8641
8698
  function createFarmClientOptimizeDepsEntries(projectRoot, appDirectories) {
8642
- const resolvedProjectRoot = path15.resolve(projectRoot);
8699
+ const resolvedProjectRoot = path16.resolve(projectRoot);
8643
8700
  return appDirectories.map((appDirectory) => {
8644
- const relativeAppDirectory = path15.relative(resolvedProjectRoot, path15.resolve(appDirectory)).replace(/\\/g, "/");
8701
+ const relativeAppDirectory = path16.relative(resolvedProjectRoot, path16.resolve(appDirectory)).replace(/\\/g, "/");
8645
8702
  const prefix = relativeAppDirectory || ".";
8646
8703
  return `${prefix}/${FARM_CLIENT_ENTRY_PATTERN}`;
8647
8704
  });
@@ -8665,7 +8722,7 @@ function createFarmClientOptimizeDepsConfig(entries, renderer) {
8665
8722
  __name(createFarmClientOptimizeDepsConfig, "createFarmClientOptimizeDepsConfig");
8666
8723
  function createFarmSourceAlias(projectRoot, srcDir = "src") {
8667
8724
  return {
8668
- "@": path15.resolve(projectRoot, srcDir)
8725
+ "@": path16.resolve(projectRoot, srcDir)
8669
8726
  };
8670
8727
  }
8671
8728
  __name(createFarmSourceAlias, "createFarmSourceAlias");
@@ -8758,7 +8815,7 @@ ${FARM_DARK_VARIANT}
8758
8815
  __name(createFarmThemeCssPlugin, "createFarmThemeCssPlugin");
8759
8816
 
8760
8817
  // src/integration-provider-build.ts
8761
- import path16 from "path";
8818
+ import path17 from "path";
8762
8819
  function generateFarmIntegrationProviderClientCode(providers, root) {
8763
8820
  const renderedProviders = providers.filter(
8764
8821
  (provider) => provider.component || provider.type === "clerk"
@@ -8839,7 +8896,7 @@ function generateFarmIntegrationProviderServerModules(providers, root) {
8839
8896
  __name(generateFarmIntegrationProviderServerModules, "generateFarmIntegrationProviderServerModules");
8840
8897
  function resolveProviderModule(moduleId, root) {
8841
8898
  if (!moduleId.startsWith(".")) return moduleId;
8842
- return toViteModuleId(path16.resolve(root, moduleId), root);
8899
+ return toViteModuleId(path17.resolve(root, moduleId), root);
8843
8900
  }
8844
8901
  __name(resolveProviderModule, "resolveProviderModule");
8845
8902
 
@@ -8900,6 +8957,7 @@ var createEmptyTypeArtifactSelection = /* @__PURE__ */ __name(() => ({
8900
8957
  i18n: false
8901
8958
  }), "createEmptyTypeArtifactSelection");
8902
8959
  var FARM_I18N_CLIENT_BRIDGE_ID = "\0farm-i18n-client-bridge";
8960
+ var warnedDeprecatedDevtoolsDashboard = false;
8903
8961
  var EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME = `
8904
8962
  function isFarmDocsSearchPage() {
8905
8963
  return false;
@@ -8926,15 +8984,15 @@ function loadFarmWorkflowsDevRuntime() {
8926
8984
  }
8927
8985
  __name(loadFarmWorkflowsDevRuntime, "loadFarmWorkflowsDevRuntime");
8928
8986
  function loadFarmDevtoolsSnapshotRuntime() {
8929
- return import("./devtools-S52RRRMN.mjs");
8987
+ return import("./devtools-XWZX6CCL.mjs");
8930
8988
  }
8931
8989
  __name(loadFarmDevtoolsSnapshotRuntime, "loadFarmDevtoolsSnapshotRuntime");
8932
8990
  function loadFarmDevtoolsUIRuntime() {
8933
- return import("./devtools-ui-NJKFORTG.mjs");
8991
+ return import("./devtools-ui-2HG5M4EL.mjs");
8934
8992
  }
8935
8993
  __name(loadFarmDevtoolsUIRuntime, "loadFarmDevtoolsUIRuntime");
8936
8994
  function loadFarmDevtoolsClientRuntime() {
8937
- return import("./devtools-client-EOVDBPOI.mjs");
8995
+ return import("./devtools-client-Z7QQA3Q2.mjs");
8938
8996
  }
8939
8997
  __name(loadFarmDevtoolsClientRuntime, "loadFarmDevtoolsClientRuntime");
8940
8998
  function farmI18nClientBridgePlugin() {
@@ -9318,11 +9376,11 @@ function isPotentialProgrammaticRouteSourceFile(normalizedFile, srcDirSlug) {
9318
9376
  }
9319
9377
  __name(isPotentialProgrammaticRouteSourceFile, "isPotentialProgrammaticRouteSourceFile");
9320
9378
  function fileContainsProgrammaticPageRoute(file) {
9321
- if (!fs9.existsSync(file)) {
9379
+ if (!fs10.existsSync(file)) {
9322
9380
  return false;
9323
9381
  }
9324
9382
  try {
9325
- return scanProgrammaticPagePaths(fs9.readFileSync(file, "utf8")).length > 0;
9383
+ return scanProgrammaticPagePaths(fs10.readFileSync(file, "utf8")).length > 0;
9326
9384
  } catch {
9327
9385
  return false;
9328
9386
  }
@@ -9330,7 +9388,7 @@ function fileContainsProgrammaticPageRoute(file) {
9330
9388
  __name(fileContainsProgrammaticPageRoute, "fileContainsProgrammaticPageRoute");
9331
9389
  function rewriteEarlySsrRelativeImports(options) {
9332
9390
  const cleanId = options.id.split("?", 1)[0];
9333
- if (!path17.isAbsolute(cleanId) || cleanId.replace(/\\/g, "/").includes("/node_modules/")) {
9391
+ if (!path18.isAbsolute(cleanId) || cleanId.replace(/\\/g, "/").includes("/node_modules/")) {
9334
9392
  return null;
9335
9393
  }
9336
9394
  const replacements = [];
@@ -9350,7 +9408,7 @@ function rewriteEarlySsrRelativeImports(options) {
9350
9408
  const suffixIndex = source.value.search(/[?#]/);
9351
9409
  const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
9352
9410
  const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
9353
- const resolvedPath = path17.resolve(path17.dirname(cleanId), sourcePath);
9411
+ const resolvedPath = path18.resolve(path18.dirname(cleanId), sourcePath);
9354
9412
  replacements.push({
9355
9413
  start: source.start,
9356
9414
  end: source.end,
@@ -9512,7 +9570,7 @@ function farmPlugin(options = {}, initialPluginManager) {
9512
9570
  ...layerRoots.length ? {
9513
9571
  server: {
9514
9572
  fs: {
9515
- allow: [path17.resolve(options.root || process.cwd()), ...layerRoots]
9573
+ allow: [path18.resolve(options.root || process.cwd()), ...layerRoots]
9516
9574
  }
9517
9575
  }
9518
9576
  } : {}
@@ -9543,13 +9601,13 @@ function farmPlugin(options = {}, initialPluginManager) {
9543
9601
  },
9544
9602
  server
9545
9603
  );
9546
- const globalsCSSPath = path17.join(server.config.root, "src/app/globals.css");
9547
- if (!fs9.existsSync(globalsCSSPath)) {
9548
- const appDir = path17.join(server.config.root, "src/app");
9549
- if (!fs9.existsSync(appDir)) {
9550
- fs9.mkdirSync(appDir, { recursive: true });
9604
+ const globalsCSSPath = path18.join(server.config.root, "src/app/globals.css");
9605
+ if (!fs10.existsSync(globalsCSSPath)) {
9606
+ const appDir = path18.join(server.config.root, "src/app");
9607
+ if (!fs10.existsSync(appDir)) {
9608
+ fs10.mkdirSync(appDir, { recursive: true });
9551
9609
  }
9552
- fs9.writeFileSync(globalsCSSPath, defaultGlobalCSS);
9610
+ fs10.writeFileSync(globalsCSSPath, defaultGlobalCSS);
9553
9611
  }
9554
9612
  await farmApp.initialize();
9555
9613
  const farmConfig = farmApp.getConfig();
@@ -9570,10 +9628,10 @@ function farmPlugin(options = {}, initialPluginManager) {
9570
9628
  });
9571
9629
  }
9572
9630
  const sourceRoots = getFarmSourceRoots(farmConfig);
9573
- server.watcher.add(sourceRoots.map((source) => path17.join(source.root, source.srcDir)));
9631
+ server.watcher.add(sourceRoots.map((source) => path18.join(source.root, source.srcDir)));
9574
9632
  if (farmConfig.i18n.enabled) {
9575
9633
  server.watcher.add(
9576
- farmConfig.i18n.messages.includes("{locale}") ? path17.dirname(farmConfig.i18n.messages) : farmConfig.i18n.messages
9634
+ farmConfig.i18n.messages.includes("{locale}") ? path18.dirname(farmConfig.i18n.messages) : farmConfig.i18n.messages
9577
9635
  );
9578
9636
  }
9579
9637
  const workflowConfig = farmConfig.workflows;
@@ -9583,7 +9641,7 @@ function farmPlugin(options = {}, initialPluginManager) {
9583
9641
  ...farmDocsDevRuntime?.getFarmDocsRouteTypeEntries(farmConfig.docs) ?? []
9584
9642
  ], "getExtraRouteTypes");
9585
9643
  const appDirSlugs = sourceRoots.map(
9586
- (source) => path17.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
9644
+ (source) => path18.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
9587
9645
  );
9588
9646
  const generateTypeArtifacts = /* @__PURE__ */ __name(async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
9589
9647
  try {
@@ -9624,7 +9682,7 @@ function farmPlugin(options = {}, initialPluginManager) {
9624
9682
  }, "generateTypeArtifacts");
9625
9683
  await generateTypeArtifacts("startup");
9626
9684
  const srcDirSlugs = sourceRoots.map(
9627
- (source) => path17.join(source.root, source.srcDir).replace(/\\/g, "/")
9685
+ (source) => path18.join(source.root, source.srcDir).replace(/\\/g, "/")
9628
9686
  );
9629
9687
  const layerConfigFiles = new Set(
9630
9688
  farmConfig.layers.map((layer) => layer.configFile?.replace(/\\/g, "/")).filter((file) => Boolean(file))
@@ -9745,7 +9803,7 @@ function farmPlugin(options = {}, initialPluginManager) {
9745
9803
  await apiRouteManager.discoverRoutes();
9746
9804
  let discoveredWorkflows = [];
9747
9805
  const hasWorkflowDirectory = workflowConfig.enabled && workflowConfig.dirs.some(
9748
- (dir) => fs9.existsSync(path17.isAbsolute(dir) ? dir : path17.join(farmConfig.root, dir))
9806
+ (dir) => fs10.existsSync(path18.isAbsolute(dir) ? dir : path18.join(farmConfig.root, dir))
9749
9807
  );
9750
9808
  if (hasWorkflowDirectory) {
9751
9809
  const { createFarmWorkflowRequestHandler, discoverFarmWorkflows } = await loadFarmWorkflowsDevRuntime();
@@ -10010,12 +10068,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
10010
10068
  }
10011
10069
  }
10012
10070
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
10013
- if ((requestMethod === "GET" || requestMethod === "HEAD") && farmDocsFontPath && fs9.existsSync(farmDocsFontPath)) {
10071
+ if ((requestMethod === "GET" || requestMethod === "HEAD") && farmDocsFontPath && fs10.existsSync(farmDocsFontPath)) {
10014
10072
  res.statusCode = 200;
10015
10073
  res.setHeader("Content-Type", "font/woff2");
10016
10074
  res.setHeader("Cache-Control", "public, max-age=31536000, immutable");
10017
10075
  if (requestMethod === "HEAD") res.end();
10018
- else fs9.createReadStream(farmDocsFontPath).pipe(res);
10076
+ else fs10.createReadStream(farmDocsFontPath).pipe(res);
10019
10077
  return;
10020
10078
  }
10021
10079
  if (requestMethod === "GET" && (requestPathname === FARM_DEVTOOLS_PATH || requestPathname === `${FARM_DEVTOOLS_PATH}.json`)) {
@@ -10071,6 +10129,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
10071
10129
  if (requestPathname.endsWith(".json")) {
10072
10130
  res.end(JSON.stringify(snapshot, null, 2));
10073
10131
  } else {
10132
+ if (!warnedDeprecatedDevtoolsDashboard) {
10133
+ warnedDeprecatedDevtoolsDashboard = true;
10134
+ logger.warn(
10135
+ "The built-in DevTools dashboard is deprecated. Install @farm.js/devtools and add devtools() to plugins in farm.config.ts."
10136
+ );
10137
+ }
10074
10138
  const { renderFarmDevtoolsHtml } = await loadFarmDevtoolsUIRuntime();
10075
10139
  res.end(renderFarmDevtoolsHtml(snapshot));
10076
10140
  }
@@ -10113,7 +10177,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
10113
10177
  return null;
10114
10178
  }
10115
10179
  return {
10116
- source: await fs9.promises.readFile(sourcePath, "utf8"),
10180
+ source: await fs10.promises.readFile(sourcePath, "utf8"),
10117
10181
  filePath: sourcePath
10118
10182
  };
10119
10183
  }, "resolveSource")
@@ -10997,7 +11061,10 @@ ${generatedDevIndicatorsClientRuntime}`,
10997
11061
  renderer,
10998
11062
  isolatedHydrationMode === "enabled",
10999
11063
  resolvedConfig?.trailingSlash ?? false,
11000
- resolvedConfig?.basePath ?? "/"
11064
+ resolvedConfig?.basePath ?? "/",
11065
+ generateClientCachePersistenceCode(
11066
+ resolveFarmClientCacheAdapterEntry(root, resolvedConfig?.cache)
11067
+ )
11001
11068
  );
11002
11069
  }
11003
11070
  if (id === "/@farm/server") {
@@ -11136,7 +11203,7 @@ export const manifest = getManifest();
11136
11203
  const root = currentConfig.root || server?.config.root || process.cwd();
11137
11204
  const cleanId = id.split("?", 1)[0];
11138
11205
  const selectedIsolatedModules = options.isolatedClientBoundaryModules ?? farmApp?.getRouteManager().getIsolatedClientBoundaryModules(root);
11139
- const selectedForIsolatedHydration = selectedIsolatedModules?.has(path17.resolve(cleanId)) === true;
11206
+ const selectedForIsolatedHydration = selectedIsolatedModules?.has(path18.resolve(cleanId)) === true;
11140
11207
  if (isolatedHydrationEnabled && selectedForIsolatedHydration && isIsolatableClientBoundarySource(clientBoundarySource)) {
11141
11208
  isolatedModuleReference = toViteModuleId(cleanId, root);
11142
11209
  const transformedBoundary = transformIsolatedClientBoundaryModule({
@@ -11227,8 +11294,8 @@ if (import.meta.hot) {
11227
11294
  }
11228
11295
  logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
11229
11296
  logger.info("Pre-rendering SSG pages...");
11230
- const outDir = path17.join(server?.config.root || process.cwd(), options.outDir || "dist");
11231
- const clientDir = path17.join(outDir, "client");
11297
+ const outDir = path18.join(server?.config.root || process.cwd(), options.outDir || "dist");
11298
+ const clientDir = path18.join(outDir, "client");
11232
11299
  for (const page of ssgPages) {
11233
11300
  try {
11234
11301
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
@@ -11280,9 +11347,9 @@ if (import.meta.hot) {
11280
11347
  <script type="module" src="/assets/client.js"></script>
11281
11348
  </body>
11282
11349
  </html>`;
11283
- const outputPath = page.urlPath === "/" ? path17.join(clientDir, "index.html") : path17.join(clientDir, page.urlPath + ".html");
11284
- fs9.mkdirSync(path17.dirname(outputPath), { recursive: true });
11285
- fs9.writeFileSync(outputPath, fullHtml);
11350
+ const outputPath = page.urlPath === "/" ? path18.join(clientDir, "index.html") : path18.join(clientDir, page.urlPath + ".html");
11351
+ fs10.mkdirSync(path18.dirname(outputPath), { recursive: true });
11352
+ fs10.writeFileSync(outputPath, fullHtml);
11286
11353
  const revalidateInfo = page.revalidate ? ` (revalidate: ${page.revalidate}s)` : "";
11287
11354
  logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
11288
11355
  });
@@ -11290,8 +11357,8 @@ if (import.meta.hot) {
11290
11357
  logger.error(` \u2717 ${page.urlPath}: ${error}`);
11291
11358
  }
11292
11359
  }
11293
- const manifestPath = path17.join(outDir, "__ssg_manifest.json");
11294
- fs9.writeFileSync(
11360
+ const manifestPath = path18.join(outDir, "__ssg_manifest.json");
11361
+ fs10.writeFileSync(
11295
11362
  manifestPath,
11296
11363
  JSON.stringify(
11297
11364
  ssgPages.map((p) => ({
@@ -11334,9 +11401,9 @@ if (import.meta.hot) {
11334
11401
  server2.ws.send({ type: "full-reload", path: "*" });
11335
11402
  return [];
11336
11403
  }
11337
- const currentSrcRoot = currentFarmConfig ? getFarmSourceRoots(currentFarmConfig).map((source) => path17.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
11404
+ const currentSrcRoot = currentFarmConfig ? getFarmSourceRoots(currentFarmConfig).map((source) => path18.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
11338
11405
  if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && isProgrammaticRoutesFileName(normalizedFile)) {
11339
- logUpdate("PAGE", `updated ${path17.basename(file)}`);
11406
+ logUpdate("PAGE", `updated ${path18.basename(file)}`);
11340
11407
  for (const mod of modules) {
11341
11408
  server2.moduleGraph.invalidateModule(mod);
11342
11409
  }
@@ -11759,7 +11826,7 @@ function parseRouteModuleSchema2(schema, value, label, routePath) {
11759
11826
  }
11760
11827
  }
11761
11828
  __name(parseRouteModuleSchema2, "parseRouteModuleSchema");
11762
- function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/") {
11829
+ function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }) {
11763
11830
  const providerClientCode = generateFarmIntegrationProviderClientCode(integrationProviders, root);
11764
11831
  const clientPluginEntry = generateFarmClientPluginEntryCode(
11765
11832
  plugins,
@@ -11815,6 +11882,7 @@ import {
11815
11882
  } from '@farm.js/core/deployment'
11816
11883
  ${providerClientCode.imports}
11817
11884
  ${clientPluginEntry.imports}
11885
+ ${clientCachePersistence.imports}
11818
11886
  ${docsSearchClientRuntime}
11819
11887
  ${devtoolsClientRuntime}
11820
11888
  ${docsAdapterImportBlock}
@@ -11830,6 +11898,7 @@ const integrationDocumentNavigationMatchers = ${JSON.stringify(documentNavigatio
11830
11898
  setFarmBasePath(${JSON.stringify(basePath)});
11831
11899
  setFarmTrailingSlashPreference(${JSON.stringify(trailingSlash)});
11832
11900
  installChunkErrorRecovery();
11901
+ ${clientCachePersistence.init}
11833
11902
 
11834
11903
  let reactRoot = null;
11835
11904
  ${isolatedHydrationRuntime}
@@ -13213,7 +13282,7 @@ function generateClientManifest(bundle) {
13213
13282
  __name(generateClientManifest, "generateClientManifest");
13214
13283
  async function defineConfig(config = {}) {
13215
13284
  const tailwindcss = (await import("@tailwindcss/vite")).default;
13216
- const appRoot = path17.resolve(config.root || process.cwd());
13285
+ const appRoot = path18.resolve(config.root || process.cwd());
13217
13286
  if (config.extends?.length) {
13218
13287
  const { config: layeredConfig } = await import("./layers-KJI5XUAP.mjs").then(
13219
13288
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
@@ -13454,6 +13523,8 @@ export {
13454
13523
  FarmApp,
13455
13524
  createFarmApp,
13456
13525
  generateFarmClientPluginEntryCode,
13526
+ resolveFarmClientCacheAdapterEntry,
13527
+ generateClientCachePersistenceCode,
13457
13528
  generateRouteTypes,
13458
13529
  generateFarmImageTypes,
13459
13530
  createFarmImageTypeDeclarations,
@@ -13477,4 +13548,4 @@ export {
13477
13548
  PluginManager,
13478
13549
  definePlugin
13479
13550
  };
13480
- //# sourceMappingURL=chunk-GZHKWHCH.mjs.map
13551
+ //# sourceMappingURL=chunk-FP5Q67FO.mjs.map