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

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 (269) hide show
  1. package/dist/after.cjs.map +1 -0
  2. package/dist/agent-runtime.cjs +7 -3
  3. package/dist/agent-runtime.cjs.map +1 -0
  4. package/dist/agent-runtime.d.mts +2 -2
  5. package/dist/agent-runtime.d.ts +2 -2
  6. package/dist/agent-runtime.mjs +2 -1
  7. package/dist/agent-runtime.mjs.map +1 -1
  8. package/dist/api/route-manager.cjs.map +1 -0
  9. package/dist/api/route-manager.d.mts +2 -2
  10. package/dist/api/route-manager.d.ts +2 -2
  11. package/dist/api/runtime.cjs.map +1 -0
  12. package/dist/api.cjs +26 -1
  13. package/dist/api.cjs.map +1 -0
  14. package/dist/api.d.mts +3 -3
  15. package/dist/api.d.ts +3 -3
  16. package/dist/api.mjs +2 -2
  17. package/dist/{app-CIOx3LvY.d.ts → app-CGjrKNoN.d.ts} +4 -4
  18. package/dist/{app-DBd6437H.d.mts → app-DOcLs_iq.d.mts} +4 -4
  19. package/dist/app-markdown.cjs +21 -0
  20. package/dist/app-markdown.cjs.map +1 -0
  21. package/dist/app-markdown.d.mts +19 -4
  22. package/dist/app-markdown.d.ts +19 -4
  23. package/dist/app-markdown.mjs +7 -1
  24. package/dist/cache.cjs.map +1 -0
  25. package/dist/{chunk-VMCHLH3Y.mjs → chunk-26BCDVJS.mjs} +19 -1
  26. package/dist/chunk-26BCDVJS.mjs.map +1 -0
  27. package/dist/{chunk-FP5Q67FO.mjs → chunk-2HYYZCCI.mjs} +308 -19
  28. package/dist/chunk-2HYYZCCI.mjs.map +1 -0
  29. package/dist/{chunk-WKDAA6V2.mjs → chunk-3BTAMIQE.mjs} +100 -41
  30. package/dist/chunk-3BTAMIQE.mjs.map +1 -0
  31. package/dist/{chunk-WD2EBM3I.mjs → chunk-3CQJV3NC.mjs} +2 -2
  32. package/dist/{chunk-I3OOUWO5.mjs → chunk-3GDRV7SG.mjs} +2 -2
  33. package/dist/{chunk-YIBV77KZ.mjs → chunk-4WLAVHCY.mjs} +2 -2
  34. package/dist/{chunk-KDP5ZSWP.mjs → chunk-7PS5NKOM.mjs} +26 -11
  35. package/dist/chunk-7PS5NKOM.mjs.map +1 -0
  36. package/dist/{chunk-X4SFHKFH.mjs → chunk-BU65A3LZ.mjs} +10 -6
  37. package/dist/chunk-BU65A3LZ.mjs.map +1 -0
  38. package/dist/{chunk-WMJGA32P.mjs → chunk-BXVOHG6B.mjs} +27 -2
  39. package/dist/{chunk-WMJGA32P.mjs.map → chunk-BXVOHG6B.mjs.map} +1 -1
  40. package/dist/{chunk-BZAIS65C.mjs → chunk-DIHNOVZZ.mjs} +40 -13
  41. package/dist/chunk-DIHNOVZZ.mjs.map +1 -0
  42. package/dist/{chunk-ISSFLGJ5.mjs → chunk-FDWECN3W.mjs} +8 -4
  43. package/dist/chunk-FDWECN3W.mjs.map +1 -0
  44. package/dist/chunk-FDWXXTWR.mjs +114 -0
  45. package/dist/chunk-FDWXXTWR.mjs.map +1 -0
  46. package/dist/{chunk-FSIXEIOB.mjs → chunk-L7FSTPGS.mjs} +2 -2
  47. package/dist/{chunk-J3MPQ4MQ.mjs → chunk-LG4XB6RN.mjs} +2 -2
  48. package/dist/{chunk-J3MPQ4MQ.mjs.map → chunk-LG4XB6RN.mjs.map} +1 -1
  49. package/dist/{chunk-AAC66ILR.mjs → chunk-LXXG3K2Y.mjs} +61 -2
  50. package/dist/chunk-LXXG3K2Y.mjs.map +1 -0
  51. package/dist/{chunk-GJ7W6LNK.mjs → chunk-N5RK4LK6.mjs} +3 -3
  52. package/dist/{chunk-D7F7YZ7L.mjs → chunk-NCVFPT67.mjs} +100 -40
  53. package/dist/{chunk-D7F7YZ7L.mjs.map → chunk-NCVFPT67.mjs.map} +1 -1
  54. package/dist/{chunk-UMUWR5XA.mjs → chunk-PURU7FXR.mjs} +2 -2
  55. package/dist/{chunk-2SKCXYLB.mjs → chunk-QQCCBMTH.mjs} +60 -6
  56. package/dist/chunk-QQCCBMTH.mjs.map +1 -0
  57. package/dist/chunk-RKUPOYQV.mjs +28 -0
  58. package/dist/chunk-RKUPOYQV.mjs.map +1 -0
  59. package/dist/{chunk-52BR7LTX.mjs → chunk-STSPSJUI.mjs} +3 -3
  60. package/dist/{chunk-EPDIF432.mjs → chunk-UOGX6UNO.mjs} +37 -17
  61. package/dist/chunk-UOGX6UNO.mjs.map +1 -0
  62. package/dist/{chunk-IZBX2TEU.mjs → chunk-VQG3QWWK.mjs} +2 -2
  63. package/dist/{chunk-35NPLKQJ.mjs → chunk-XWM2C267.mjs} +21 -105
  64. package/dist/chunk-XWM2C267.mjs.map +1 -0
  65. package/dist/{chunk-7ZVN3YZI.mjs → chunk-Z5ARESQG.mjs} +43 -1
  66. package/dist/chunk-Z5ARESQG.mjs.map +1 -0
  67. package/dist/client/lifecycle.cjs.map +1 -0
  68. package/dist/client/lifecycle.mjs +2 -2
  69. package/dist/{client-plugins-B6-07YmP.d.mts → client-plugins-BqtHoJ9C.d.mts} +91 -3
  70. package/dist/{client-plugins-By6MVUX-.d.ts → client-plugins-DYprkCKN.d.ts} +91 -3
  71. package/dist/client-plugins.cjs +1 -1
  72. package/dist/client-plugins.cjs.map +1 -0
  73. package/dist/client-plugins.d.mts +2 -2
  74. package/dist/client-plugins.d.ts +2 -2
  75. package/dist/client-plugins.mjs +2 -2
  76. package/dist/client.cjs +61 -16
  77. package/dist/client.cjs.map +1 -0
  78. package/dist/client.d.mts +5 -5
  79. package/dist/client.d.ts +5 -5
  80. package/dist/client.mjs +7 -7
  81. package/dist/config.cjs.map +1 -0
  82. package/dist/config.d.mts +2 -2
  83. package/dist/config.d.ts +2 -2
  84. package/dist/cron.cjs +48 -12
  85. package/dist/cron.cjs.map +1 -0
  86. package/dist/cron.mjs +2 -1
  87. package/dist/deferred.cjs.map +1 -0
  88. package/dist/deployment.cjs.map +1 -0
  89. package/dist/{devtools-XWZX6CCL.mjs → devtools-24N3U5IG.mjs} +9 -7
  90. package/dist/{devtools-XWZX6CCL.mjs.map → devtools-24N3U5IG.mjs.map} +1 -1
  91. package/dist/docs.cjs +7 -3
  92. package/dist/docs.cjs.map +1 -0
  93. package/dist/docs.mjs +9 -7
  94. package/dist/env-types.cjs.map +1 -0
  95. package/dist/env.cjs.map +1 -0
  96. package/dist/environment/vite.cjs.map +1 -0
  97. package/dist/environment.cjs.map +1 -0
  98. package/dist/font.cjs.map +1 -0
  99. package/dist/headers.cjs.map +1 -0
  100. package/dist/i18n/client.cjs.map +1 -0
  101. package/dist/i18n/index.cjs.map +1 -0
  102. package/dist/i18n/server.cjs.map +1 -0
  103. package/dist/image/server.cjs +99 -40
  104. package/dist/image/server.cjs.map +1 -0
  105. package/dist/image/server.d.mts +6 -0
  106. package/dist/image/server.d.ts +6 -0
  107. package/dist/image/server.mjs +1 -1
  108. package/dist/image/sharp.cjs +1 -0
  109. package/dist/image/sharp.cjs.map +1 -0
  110. package/dist/image/sharp.d.mts +1 -1
  111. package/dist/image/sharp.d.ts +1 -1
  112. package/dist/image/sharp.mjs +1 -1
  113. package/dist/image/sharp.mjs.map +1 -1
  114. package/dist/image.cjs.map +1 -0
  115. package/dist/index.cjs +943 -231
  116. package/dist/index.cjs.map +1 -0
  117. package/dist/index.d.mts +11 -11
  118. package/dist/index.d.ts +11 -11
  119. package/dist/index.mjs +38 -24
  120. package/dist/index.mjs.map +1 -1
  121. package/dist/instrumentation.cjs.map +1 -0
  122. package/dist/{integration-orm-LLW6WZNK.mjs → integration-orm-G5BPBT5X.mjs} +3 -3
  123. package/dist/integrations.cjs +168 -5
  124. package/dist/integrations.cjs.map +1 -0
  125. package/dist/integrations.d.mts +2 -2
  126. package/dist/integrations.d.ts +2 -2
  127. package/dist/integrations.mjs +10 -3
  128. package/dist/internal/build-runtime.cjs +745 -139
  129. package/dist/internal/build-runtime.cjs.map +1 -0
  130. package/dist/internal/build-runtime.d.mts +4 -4
  131. package/dist/internal/build-runtime.d.ts +4 -4
  132. package/dist/internal/build-runtime.mjs +16 -14
  133. package/dist/internal/client-runtime.cjs +7 -2
  134. package/dist/internal/client-runtime.cjs.map +1 -0
  135. package/dist/internal/client-runtime.mjs +8 -3
  136. package/dist/internal/client-runtime.mjs.map +1 -1
  137. package/dist/internal/config-runtime.cjs +59 -42
  138. package/dist/internal/config-runtime.cjs.map +1 -0
  139. package/dist/internal/config-runtime.d.mts +3 -3
  140. package/dist/internal/config-runtime.d.ts +3 -3
  141. package/dist/internal/config-runtime.mjs +8 -6
  142. package/dist/internal/isolated-boundary.cjs.map +1 -0
  143. package/dist/internal/metadata-image-runtime.cjs.map +1 -0
  144. package/dist/internal/product-telemetry-runtime.cjs +52 -5
  145. package/dist/internal/product-telemetry-runtime.cjs.map +1 -0
  146. package/dist/internal/product-telemetry-runtime.d.mts +12 -1
  147. package/dist/internal/product-telemetry-runtime.d.ts +12 -1
  148. package/dist/internal/product-telemetry-runtime.mjs +50 -5
  149. package/dist/internal/product-telemetry-runtime.mjs.map +1 -1
  150. package/dist/internal/production-node-env.cjs.map +1 -0
  151. package/dist/internal/production-runtime.cjs +56 -10
  152. package/dist/internal/production-runtime.cjs.map +1 -0
  153. package/dist/internal/production-runtime.d.mts +8 -8
  154. package/dist/internal/production-runtime.d.ts +8 -8
  155. package/dist/internal/production-runtime.mjs +2 -2
  156. package/dist/markdown.cjs.map +1 -0
  157. package/dist/{metadata-route-8_V3UonT.d.ts → metadata-route-D2be_0kC.d.ts} +17 -2
  158. package/dist/{metadata-route-CWP_HjGU.d.mts → metadata-route-Dw5CrDIZ.d.mts} +17 -2
  159. package/dist/middleware.cjs.map +1 -0
  160. package/dist/middleware.d.mts +4 -4
  161. package/dist/middleware.d.ts +4 -4
  162. package/dist/navigation.cjs.map +1 -0
  163. package/dist/{nitro-EGRNOB5P.mjs → nitro-YJEP3FWM.mjs} +4 -3
  164. package/dist/{nitro-EGRNOB5P.mjs.map → nitro-YJEP3FWM.mjs.map} +1 -1
  165. package/dist/observability.cjs.map +1 -0
  166. package/dist/plugin.cjs +599 -104
  167. package/dist/plugin.cjs.map +1 -0
  168. package/dist/plugin.d.mts +2 -2
  169. package/dist/plugin.d.ts +2 -2
  170. package/dist/plugin.mjs +13 -11
  171. package/dist/{production-runtime-CdmzsDax.d.ts → production-runtime-CTqpD1C8.d.ts} +2 -2
  172. package/dist/{production-runtime-BGRH1dKG.d.mts → production-runtime-HNqNZd4D.d.mts} +2 -2
  173. package/dist/query/client.cjs.map +1 -0
  174. package/dist/query/index.cjs.map +1 -0
  175. package/dist/query/parsers.cjs.map +1 -0
  176. package/dist/query/server.cjs.map +1 -0
  177. package/dist/{render-plan-DLxJYAA5.d.mts → render-plan-COscpW-i.d.mts} +1 -1
  178. package/dist/{render-plan-0GeHiGVZ.d.ts → render-plan-Z4kSxaT_.d.ts} +1 -1
  179. package/dist/renderer/react/client.cjs.map +1 -0
  180. package/dist/renderer/react/server.cjs.map +1 -0
  181. package/dist/renderer/react/vite.cjs.map +1 -0
  182. package/dist/renderer-client.cjs +26 -1
  183. package/dist/renderer-client.cjs.map +1 -0
  184. package/dist/renderer-client.d.mts +4 -4
  185. package/dist/renderer-client.d.ts +4 -4
  186. package/dist/renderer-client.mjs +2 -2
  187. package/dist/renderer.cjs.map +1 -0
  188. package/dist/{request-BstWbZ6O.d.ts → request-BEDb2jE9.d.ts} +1 -1
  189. package/dist/{request-BCNXSXLh.d.mts → request-CbIAqJY9.d.mts} +1 -1
  190. package/dist/request.cjs.map +1 -0
  191. package/dist/request.d.mts +3 -3
  192. package/dist/request.d.ts +3 -3
  193. package/dist/router.cjs.map +1 -0
  194. package/dist/routes.cjs.map +1 -0
  195. package/dist/routes.d.mts +2 -2
  196. package/dist/routes.d.ts +2 -2
  197. package/dist/server-action-security.cjs +117 -104
  198. package/dist/server-action-security.cjs.map +1 -0
  199. package/dist/server-action-security.mjs +2 -1
  200. package/dist/server-fn-client.cjs.map +1 -0
  201. package/dist/server-fn.cjs.map +1 -0
  202. package/dist/server-fn.mjs +3 -2
  203. package/dist/server-plugins.cjs.map +1 -0
  204. package/dist/server-plugins.d.mts +3 -3
  205. package/dist/server-plugins.d.ts +3 -3
  206. package/dist/server-query-client.cjs +26 -1
  207. package/dist/server-query-client.cjs.map +1 -0
  208. package/dist/server-query-client.mjs +3 -3
  209. package/dist/server-query.cjs.map +1 -0
  210. package/dist/server-query.mjs +4 -3
  211. package/dist/server.cjs +686 -170
  212. package/dist/server.cjs.map +1 -0
  213. package/dist/server.d.mts +8 -8
  214. package/dist/server.d.ts +8 -8
  215. package/dist/server.mjs +16 -14
  216. package/dist/server.mjs.map +1 -1
  217. package/dist/{spa-router-COgu4txb.d.ts → spa-router-CjeQites.d.ts} +1 -1
  218. package/dist/{spa-router-BeyAVSc6.d.mts → spa-router-FJbNou1a.d.mts} +1 -1
  219. package/dist/storage.cjs +7 -3
  220. package/dist/storage.cjs.map +1 -0
  221. package/dist/storage.mjs +1 -1
  222. package/dist/testing.cjs.map +1 -0
  223. package/dist/testing.d.mts +2 -2
  224. package/dist/testing.d.ts +2 -2
  225. package/dist/testing.mjs +2 -1
  226. package/dist/testing.mjs.map +1 -1
  227. package/dist/theme/client.cjs.map +1 -0
  228. package/dist/theme/index.cjs.map +1 -0
  229. package/dist/theme/runtime.cjs.map +1 -0
  230. package/dist/theme/server.cjs.map +1 -0
  231. package/dist/{utils-DL2VwDQl.d.mts → utils-BiMJv9Ys.d.mts} +1 -1
  232. package/dist/{utils-DkU2c_1B.d.ts → utils-BpnKRFv9.d.ts} +1 -1
  233. package/dist/version.cjs +1 -1
  234. package/dist/version.cjs.map +1 -0
  235. package/dist/version.mjs +1 -1
  236. package/dist/vite.cjs +599 -104
  237. package/dist/vite.cjs.map +1 -0
  238. package/dist/vite.d.mts +2 -2
  239. package/dist/vite.d.ts +2 -2
  240. package/dist/vite.mjs +13 -11
  241. package/dist/{workflows-ChyK_oTu.d.mts → workflows-BantWytQ.d.mts} +7 -0
  242. package/dist/{workflows-ChyK_oTu.d.ts → workflows-BantWytQ.d.ts} +7 -0
  243. package/dist/workflows.cjs +73 -5
  244. package/dist/workflows.cjs.map +1 -0
  245. package/dist/workflows.d.mts +1 -1
  246. package/dist/workflows.d.ts +1 -1
  247. package/dist/workflows.mjs +2 -1
  248. package/package.json +17 -17
  249. package/dist/chunk-2SKCXYLB.mjs.map +0 -1
  250. package/dist/chunk-35NPLKQJ.mjs.map +0 -1
  251. package/dist/chunk-7ZVN3YZI.mjs.map +0 -1
  252. package/dist/chunk-AAC66ILR.mjs.map +0 -1
  253. package/dist/chunk-BZAIS65C.mjs.map +0 -1
  254. package/dist/chunk-EPDIF432.mjs.map +0 -1
  255. package/dist/chunk-FP5Q67FO.mjs.map +0 -1
  256. package/dist/chunk-ISSFLGJ5.mjs.map +0 -1
  257. package/dist/chunk-KDP5ZSWP.mjs.map +0 -1
  258. package/dist/chunk-VMCHLH3Y.mjs.map +0 -1
  259. package/dist/chunk-WKDAA6V2.mjs.map +0 -1
  260. package/dist/chunk-X4SFHKFH.mjs.map +0 -1
  261. /package/dist/{chunk-WD2EBM3I.mjs.map → chunk-3CQJV3NC.mjs.map} +0 -0
  262. /package/dist/{chunk-I3OOUWO5.mjs.map → chunk-3GDRV7SG.mjs.map} +0 -0
  263. /package/dist/{chunk-YIBV77KZ.mjs.map → chunk-4WLAVHCY.mjs.map} +0 -0
  264. /package/dist/{chunk-FSIXEIOB.mjs.map → chunk-L7FSTPGS.mjs.map} +0 -0
  265. /package/dist/{chunk-GJ7W6LNK.mjs.map → chunk-N5RK4LK6.mjs.map} +0 -0
  266. /package/dist/{chunk-UMUWR5XA.mjs.map → chunk-PURU7FXR.mjs.map} +0 -0
  267. /package/dist/{chunk-52BR7LTX.mjs.map → chunk-STSPSJUI.mjs.map} +0 -0
  268. /package/dist/{chunk-IZBX2TEU.mjs.map → chunk-VQG3QWWK.mjs.map} +0 -0
  269. /package/dist/{integration-orm-LLW6WZNK.mjs.map → integration-orm-G5BPBT5X.mjs.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/client/lifecycle.ts","../../src/client/runtime-error-overlay.ts","../../src/client/plugin.ts"],"sourcesContent":["\"use client\";\n\nexport { defineClient } from \"./plugin\";\nexport type {\n FarmClientNavigationAction,\n FarmClientNavigationErrorEvent,\n FarmClientNavigationEvent,\n FarmClientNavigationLoadedEvent,\n FarmClientNavigationResolvedEvent,\n FarmClientNavigationSession,\n FarmClientPlugin,\n FarmClientPluginCloseEvent,\n FarmClientPluginRouter,\n FarmClientPluginSetupEvent,\n FarmClientPluginStateEvent,\n} from \"./plugin\";\n","\"use client\";\n\nimport {\n originalPositionFor,\n sourceContentFor,\n TraceMap,\n type SourceMapInput,\n} from \"@jridgewell/trace-mapping\";\nimport { DEFAULT_ERROR_STYLES } from \"../components/error-styles\";\nimport { FARM_VERSION } from \"../version\";\nimport { isChunkLoadError } from \"./chunk-recovery\";\n\nexport interface FarmRuntimeErrorLocation {\n href: string;\n pathname: string;\n search: string;\n hash: string;\n}\n\nexport interface FarmRuntimeErrorOverlayContext {\n phase: string;\n location: FarmRuntimeErrorLocation;\n sourceEvent?: Event;\n}\n\nexport interface FarmRuntimeErrorOverlayOptions {\n window: Window;\n farmVersion?: string;\n reload?: () => void;\n fetch?: typeof fetch;\n}\n\nexport interface FarmRuntimeErrorOverlay {\n show(error: unknown, context: FarmRuntimeErrorOverlayContext): void;\n dismiss(): void;\n destroy(): void;\n}\n\ninterface NormalizedRuntimeError {\n name: string;\n message: string;\n stack?: string;\n}\n\ninterface BrowserSourceLocation {\n url: string;\n displayPath: string;\n line: number;\n column: number;\n stackLine?: string;\n}\n\ninterface BrowserSourceLine {\n number?: number;\n content: string;\n highlight?: boolean;\n}\n\ninterface BrowserSourceFrame {\n path: string;\n line?: number;\n column?: number;\n lines: BrowserSourceLine[];\n unavailable?: boolean;\n}\n\ninterface RuntimeErrorRecord {\n error: NormalizedRuntimeError;\n context: FarmRuntimeErrorOverlayContext;\n fingerprint: string;\n occurrences: number;\n sourceLocation?: BrowserSourceLocation;\n sourceFrame: BrowserSourceFrame;\n}\n\nconst OVERLAY_STYLES = `\n:host {\n position: fixed;\n inset: 0;\n z-index: 2147483647;\n display: block;\n width: 100%;\n height: 100%;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.farm-runtime-error__viewport {\n width: 100%;\n height: 100%;\n overflow: auto;\n overscroll-behavior: contain;\n}\n\n.farm-runtime-error__viewport .farm-default-error {\n min-height: 100%;\n padding: clamp(22px, 4vh, 36px) 24px;\n}\n\n.farm-runtime-error__viewport .farm-default-error__code {\n font-size: clamp(96px, 10vw, 120px);\n line-height: 0.92;\n}\n\n.farm-runtime-error__viewport .farm-default-error__eyebrow {\n margin-top: 22px;\n margin-bottom: 18px;\n}\n\n.farm-runtime-error__viewport .farm-default-error__summary {\n margin-bottom: 20px;\n}\n\n.farm-runtime-error__viewport .farm-default-error__row {\n min-height: 48px;\n}\n\n.farm-runtime-error__viewport .farm-default-error__details {\n padding-top: 16px;\n padding-bottom: 14px;\n}\n\n.farm-runtime-error__viewport .farm-default-error__details-header {\n margin-bottom: 8px;\n}\n\n.farm-runtime-error__viewport .farm-default-error__source-path {\n padding-top: 9px;\n padding-bottom: 9px;\n}\n\n.farm-runtime-error__viewport .farm-default-error__source-code {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n\n.farm-runtime-error__viewport .farm-default-error__meta {\n margin-top: 10px;\n}\n\n.farm-runtime-error__viewport .farm-default-error__actions {\n margin-top: 20px;\n}\n\n.farm-runtime-error__occurrences {\n display: inline-flex;\n align-items: center;\n min-height: 24px;\n margin-right: auto;\n padding: 0 8px;\n border: 1px solid var(--farm-error-line);\n color: var(--farm-error-muted);\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n\n.farm-runtime-error__occurrences[hidden],\n.farm-runtime-error__action[hidden] {\n display: none;\n}\n\n.farm-runtime-error__copy {\n min-width: 166px;\n}\n\n.farm-runtime-error__action:focus {\n outline: 1px solid var(--farm-error-fg);\n outline-offset: 2px;\n}\n\n.farm-runtime-error__viewport .farm-default-error__panel {\n border: 0;\n box-shadow: inset 0 0 0 0.5px var(--farm-error-line-strong);\n}\n\n.farm-runtime-error__github-icon {\n display: block;\n width: 18px;\n height: 18px;\n flex: 0 0 auto;\n margin-right: 10px;\n color: currentColor;\n}\n\n.farm-runtime-error__message-value {\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n}\n\n.farm-runtime-error__inline-code {\n color: var(--farm-error-source-marker);\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 0.94em;\n font-weight: 600;\n line-height: inherit;\n overflow-wrap: anywhere;\n}\n\n@media (max-width: 620px) {\n .farm-runtime-error__occurrences {\n margin-right: 0;\n }\n\n .farm-runtime-error__viewport .farm-default-error__content,\n .farm-runtime-error__viewport .farm-default-error__panel,\n .farm-runtime-error__viewport .farm-default-error__details,\n .farm-runtime-error__viewport .farm-default-error__source,\n .farm-runtime-error__viewport .farm-default-error__actions {\n min-width: 0;\n max-width: 100%;\n }\n\n .farm-runtime-error__viewport .farm-default-error__actions {\n width: 100%;\n }\n\n .farm-runtime-error__viewport .farm-default-error__action {\n min-width: 0;\n }\n\n .farm-runtime-error__viewport .farm-default-error__code {\n font-size: 80px;\n }\n}\n\n@media (max-height: 760px) {\n .farm-runtime-error__viewport .farm-default-error {\n place-items: start center;\n padding-top: 12px;\n padding-bottom: 12px;\n }\n\n .farm-runtime-error__viewport .farm-default-error__code {\n font-size: 88px;\n }\n\n .farm-runtime-error__viewport .farm-default-error__eyebrow {\n margin-top: 14px;\n margin-bottom: 12px;\n }\n\n .farm-runtime-error__viewport .farm-default-error__summary {\n margin-bottom: 14px;\n }\n\n .farm-runtime-error__viewport .farm-default-error__row {\n min-height: 42px;\n }\n\n .farm-runtime-error__viewport .farm-default-error__details {\n padding-top: 12px;\n padding-bottom: 10px;\n }\n\n .farm-runtime-error__viewport .farm-default-error__actions {\n margin-top: 10px;\n }\n}\n`;\n\nconst OVERLAY_MARKUP = `\n<div class=\"farm-runtime-error__viewport\" data-farm-runtime-error-viewport>\n <main class=\"farm-default-error\" data-farm-runtime-error role=\"alertdialog\" aria-modal=\"true\" aria-labelledby=\"farm-runtime-error-title\" aria-describedby=\"farm-runtime-error-description\">\n <div class=\"farm-default-error__content\">\n <p class=\"farm-default-error__code\" aria-hidden=\"true\">500</p>\n <p class=\"farm-default-error__eyebrow\">Runtime error</p>\n <header class=\"farm-default-error__summary\">\n <h1 id=\"farm-runtime-error-title\" class=\"farm-default-error__title\">Application failed in the browser</h1>\n </header>\n <section class=\"farm-default-error__panel\" aria-label=\"Error information\">\n <div class=\"farm-default-error__row\">\n <span class=\"farm-default-error__label\">Error type</span>\n <span class=\"farm-default-error__value\" data-farm-runtime-error-type></span>\n </div>\n <div class=\"farm-default-error__row\">\n <span class=\"farm-default-error__label\">Error message</span>\n <span id=\"farm-runtime-error-description\" class=\"farm-default-error__value farm-runtime-error__message-value\" data-farm-runtime-error-message></span>\n </div>\n <div class=\"farm-default-error__row\">\n <span class=\"farm-default-error__label\">Location</span>\n <span class=\"farm-default-error__value\" data-farm-runtime-error-location></span>\n </div>\n <section class=\"farm-default-error__details\" aria-labelledby=\"farm-runtime-error-details-title\">\n <div class=\"farm-default-error__details-header\">\n <h2 id=\"farm-runtime-error-details-title\" class=\"farm-default-error__details-title\">Details</h2>\n <span class=\"farm-runtime-error__occurrences\" data-farm-runtime-error-occurrences hidden></span>\n <button class=\"farm-default-error__copy farm-runtime-error__copy\" type=\"button\" data-farm-runtime-error-copy>\n <span data-farm-runtime-error-copy-label>Copy debug report</span>\n <span class=\"farm-default-error__sr-only\" aria-live=\"polite\" data-farm-runtime-error-copy-status></span>\n </button>\n </div>\n <div data-farm-runtime-error-source></div>\n <p class=\"farm-default-error__meta\" data-farm-runtime-error-meta></p>\n </section>\n </section>\n <div class=\"farm-default-error__actions\">\n <a class=\"farm-default-error__action farm-default-error__action--primary farm-runtime-error__action\" data-farm-runtime-error-issue target=\"_blank\" rel=\"noopener noreferrer\"><svg class=\"farm-runtime-error__github-icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M12 .7a11.5 11.5 0 0 0-3.64 22.41c.58.1.79-.25.79-.56v-2.23c-3.22.7-3.9-1.37-3.9-1.37-.52-1.34-1.28-1.69-1.28-1.69-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.57-.29-5.27-1.29-5.27-5.68 0-1.26.45-2.28 1.18-3.09-.12-.29-.51-1.47.11-3.05 0 0 .96-.31 3.16 1.18A10.95 10.95 0 0 1 12 6.1c.98 0 1.95.13 2.87.39 2.2-1.49 3.16-1.18 3.16-1.18.62 1.58.23 2.76.11 3.05.74.81 1.18 1.83 1.18 3.09 0 4.4-2.71 5.38-5.29 5.67.42.36.79 1.07.79 2.16v3.27c0 .31.21.67.8.56A11.5 11.5 0 0 0 12 .7Z\" /></svg><span>Open GitHub issue</span></a>\n <button class=\"farm-default-error__action farm-runtime-error__action\" type=\"button\" data-farm-runtime-error-reload>Reload page</button>\n <button class=\"farm-default-error__action farm-runtime-error__action\" type=\"button\" data-farm-runtime-error-dismiss>Dismiss</button>\n </div>\n </div>\n </main>\n</div>\n`;\n\nclass DefaultFarmRuntimeErrorOverlay implements FarmRuntimeErrorOverlay {\n private readonly options: FarmRuntimeErrorOverlayOptions;\n private readonly document: Document;\n private readonly host: HTMLDivElement;\n private readonly shadow: ShadowRoot;\n private readonly dismissedFingerprints = new Set<string>();\n private readonly themeObserver: MutationObserver;\n private readonly colorSchemeQuery?: MediaQueryList;\n private current?: RuntimeErrorRecord;\n private previousFocus?: Element | null;\n private renderSequence = 0;\n private copyResetTimer?: number;\n private destroyed = false;\n\n constructor(options: FarmRuntimeErrorOverlayOptions) {\n this.options = options;\n this.document = options.window.document;\n this.host = this.document.createElement(\"div\");\n this.host.dataset.farmRuntimeErrorOverlay = \"\";\n this.host.hidden = true;\n this.shadow = this.host.attachShadow({ mode: \"open\" });\n this.shadow.innerHTML = `<style>${DEFAULT_ERROR_STYLES}${OVERLAY_STYLES}</style>${OVERLAY_MARKUP}`;\n\n this.getElement<HTMLButtonElement>(\"[data-farm-runtime-error-reload]\").addEventListener(\n \"click\",\n this.handleReload,\n );\n this.getElement<HTMLButtonElement>(\"[data-farm-runtime-error-dismiss]\").addEventListener(\n \"click\",\n this.handleDismiss,\n );\n this.getElement<HTMLButtonElement>(\"[data-farm-runtime-error-copy]\").addEventListener(\n \"click\",\n this.handleCopy,\n );\n this.shadow.addEventListener(\"keydown\", this.handleKeyDown);\n\n this.themeObserver = new MutationObserver(this.updateTheme);\n this.themeObserver.observe(this.document.documentElement, {\n attributes: true,\n attributeFilter: [\"class\", \"data-theme\", \"data-color-scheme\", \"style\"],\n });\n if (this.document.body) {\n this.themeObserver.observe(this.document.body, {\n attributes: true,\n attributeFilter: [\"class\", \"data-theme\", \"data-color-scheme\", \"style\"],\n });\n }\n\n this.colorSchemeQuery = options.window.matchMedia?.(\"(prefers-color-scheme: dark)\");\n this.colorSchemeQuery?.addEventListener?.(\"change\", this.updateTheme);\n this.updateTheme();\n }\n\n show(errorLike: unknown, context: FarmRuntimeErrorOverlayContext): void {\n if (this.destroyed || isChunkLoadError(errorLike) || isChunkLoadError(context.sourceEvent)) {\n return;\n }\n\n const error = normalizeRuntimeError(errorLike);\n const sourceLocation = resolveBrowserSourceLocation(\n error,\n context.sourceEvent,\n this.options.window,\n );\n if (sourceLocation && isBrowserExtensionUrl(sourceLocation.url)) return;\n if (isRecoverableReactHydrationError(error, context, sourceLocation)) return;\n\n const fingerprint = createErrorFingerprint(error, context, sourceLocation);\n if (this.dismissedFingerprints.has(fingerprint)) return;\n\n if (this.current?.fingerprint === fingerprint) {\n this.current.occurrences += 1;\n this.renderOccurrences(this.current.occurrences);\n return;\n }\n\n const record: RuntimeErrorRecord = {\n error,\n context,\n fingerprint,\n occurrences: 1,\n sourceLocation,\n sourceFrame: createFallbackSourceFrame(error, sourceLocation),\n };\n this.current = record;\n const sequence = ++this.renderSequence;\n this.render(record);\n this.mount();\n\n if (sourceLocation) {\n void loadBrowserSourceFrame(sourceLocation, this.options)\n .then((sourceFrame) => {\n if (\n !sourceFrame ||\n this.destroyed ||\n sequence !== this.renderSequence ||\n this.current !== record\n ) {\n return;\n }\n record.sourceFrame = sourceFrame;\n this.renderSourceFrame(sourceFrame);\n this.renderIssueLink(record);\n })\n .catch(() => {});\n }\n }\n\n dismiss(): void {\n if (this.destroyed || this.host.hidden) return;\n if (this.current) this.dismissedFingerprints.add(this.current.fingerprint);\n this.host.hidden = true;\n this.renderSequence += 1;\n if (this.previousFocus instanceof HTMLElement && this.previousFocus.isConnected) {\n this.previousFocus.focus();\n }\n this.previousFocus = undefined;\n }\n\n destroy(): void {\n if (this.destroyed) return;\n this.destroyed = true;\n this.renderSequence += 1;\n this.themeObserver.disconnect();\n this.colorSchemeQuery?.removeEventListener?.(\"change\", this.updateTheme);\n this.shadow.removeEventListener(\"keydown\", this.handleKeyDown);\n if (this.copyResetTimer !== undefined) {\n this.options.window.clearTimeout(this.copyResetTimer);\n }\n this.host.remove();\n this.current = undefined;\n }\n\n private mount(): void {\n if (!this.host.isConnected) {\n (this.document.body || this.document.documentElement).appendChild(this.host);\n }\n const wasHidden = this.host.hidden;\n this.host.hidden = false;\n if (wasHidden) {\n this.previousFocus = this.document.activeElement;\n this.options.window.setTimeout(() => {\n if (!this.host.hidden && !this.destroyed) {\n this.getElement<HTMLAnchorElement>(\"[data-farm-runtime-error-issue]\").focus({\n preventScroll: true,\n });\n }\n }, 0);\n }\n }\n\n private render(record: RuntimeErrorRecord): void {\n this.getElement(\"[data-farm-runtime-error-type]\").textContent = formatErrorType(\n record.error,\n record.context.phase,\n );\n renderErrorMessage(\n this.getElement(\"[data-farm-runtime-error-message]\"),\n record.error.message,\n this.document,\n );\n this.getElement(\"[data-farm-runtime-error-location]\").textContent =\n `${record.context.location.pathname}${record.context.location.search}` || \"/\";\n this.getElement(\"[data-farm-runtime-error-meta]\").textContent =\n `Farm.js v${this.options.farmVersion || FARM_VERSION} · development · browser`;\n this.renderIssueLink(record);\n this.renderOccurrences(record.occurrences);\n this.renderSourceFrame(record.sourceFrame);\n this.resetCopyStatus();\n }\n\n private renderOccurrences(occurrences: number): void {\n const badge = this.getElement<HTMLElement>(\"[data-farm-runtime-error-occurrences]\");\n badge.hidden = occurrences < 2;\n badge.textContent = occurrences < 2 ? \"\" : `Repeated ×${occurrences}`;\n }\n\n private renderIssueLink(record: RuntimeErrorRecord): void {\n this.getElement<HTMLAnchorElement>(\"[data-farm-runtime-error-issue]\").href =\n createGithubIssueUrl(record, this.options.window, this.options.farmVersion || FARM_VERSION);\n }\n\n private renderSourceFrame(sourceFrame: BrowserSourceFrame): void {\n const container = this.getElement<HTMLElement>(\"[data-farm-runtime-error-source]\");\n container.replaceChildren();\n\n const source = this.document.createElement(\"div\");\n source.className = \"farm-default-error__source\";\n\n const path = this.document.createElement(\"p\");\n path.className = \"farm-default-error__source-path\";\n path.textContent = formatSourcePath(sourceFrame);\n source.appendChild(path);\n\n const pre = this.document.createElement(\"pre\");\n pre.className = \"farm-default-error__source-code\";\n pre.tabIndex = 0;\n const code = this.document.createElement(\"code\");\n for (const line of sourceFrame.lines) {\n const row = this.document.createElement(\"span\");\n row.className = `farm-default-error__source-line${line.highlight ? \" farm-default-error__source-line--active\" : \"\"}`;\n\n const gutter = this.document.createElement(\"span\");\n gutter.className = \"farm-default-error__source-gutter\";\n gutter.textContent = `${line.highlight ? \">\" : \" \"} ${line.number ?? \"\"}`;\n\n const text = this.document.createElement(\"span\");\n text.className = \"farm-default-error__source-text\";\n text.textContent = line.content || \" \";\n\n row.append(gutter, text);\n code.appendChild(row);\n }\n pre.appendChild(code);\n source.appendChild(pre);\n container.appendChild(source);\n }\n\n private readonly handleReload = () => {\n (this.options.reload || (() => this.options.window.location.reload()))();\n };\n\n private readonly handleDismiss = () => {\n this.dismiss();\n };\n\n private readonly handleCopy = async () => {\n if (!this.current) return;\n const report = createFarmRuntimeErrorDebugReport(\n this.current,\n this.options.window,\n this.options.farmVersion || FARM_VERSION,\n );\n const label = this.getElement<HTMLElement>(\"[data-farm-runtime-error-copy-label]\");\n const status = this.getElement<HTMLElement>(\"[data-farm-runtime-error-copy-status]\");\n\n try {\n await copyText(report, this.options.window, this.document);\n label.textContent = \"Copied\";\n status.textContent = \"Debug report copied\";\n if (this.copyResetTimer !== undefined) {\n this.options.window.clearTimeout(this.copyResetTimer);\n }\n this.copyResetTimer = this.options.window.setTimeout(() => this.resetCopyStatus(), 1800);\n } catch {\n status.textContent = \"Unable to copy the debug report\";\n }\n };\n\n private readonly handleKeyDown = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n if (keyboardEvent.key === \"Escape\") {\n keyboardEvent.preventDefault();\n this.dismiss();\n return;\n }\n if (keyboardEvent.key !== \"Tab\") return;\n\n const controls = Array.from(\n this.shadow.querySelectorAll<HTMLElement>(\"a[href], button:not([hidden]):not([disabled])\"),\n );\n if (controls.length === 0) return;\n const first = controls[0];\n const last = controls[controls.length - 1];\n const active = this.shadow.activeElement;\n\n if (keyboardEvent.shiftKey && active === first) {\n keyboardEvent.preventDefault();\n last.focus();\n } else if (!keyboardEvent.shiftKey && active === last) {\n keyboardEvent.preventDefault();\n first.focus();\n }\n };\n\n private readonly updateTheme = () => {\n this.getElement<HTMLElement>(\"[data-farm-runtime-error-viewport]\").dataset.theme =\n resolveDocumentTheme(this.document, this.options.window);\n };\n\n private resetCopyStatus(): void {\n this.getElement(\"[data-farm-runtime-error-copy-label]\").textContent = \"Copy debug report\";\n this.getElement(\"[data-farm-runtime-error-copy-status]\").textContent = \"\";\n }\n\n private getElement<T extends Element = HTMLElement>(selector: string): T {\n const element = this.shadow.querySelector<T>(selector);\n if (!element) throw new Error(`Farm runtime error overlay is missing ${selector}`);\n return element;\n }\n}\n\nexport function createFarmRuntimeErrorOverlay(\n options: FarmRuntimeErrorOverlayOptions,\n): FarmRuntimeErrorOverlay {\n return new DefaultFarmRuntimeErrorOverlay(options);\n}\n\nfunction normalizeRuntimeError(errorLike: unknown): NormalizedRuntimeError {\n if (errorLike instanceof Error) {\n return {\n name: errorLike.name || \"Error\",\n message: errorLike.message || \"An unknown browser error occurred.\",\n stack: errorLike.stack,\n };\n }\n\n if (errorLike && typeof errorLike === \"object\") {\n const error = errorLike as Record<string, unknown>;\n const name = typeof error.name === \"string\" && error.name ? error.name : \"Error\";\n const message =\n typeof error.message === \"string\" && error.message\n ? error.message\n : typeof error.reason === \"string\" && error.reason\n ? error.reason\n : stringifyUnknown(errorLike);\n return {\n name,\n message: message || \"An unknown browser error occurred.\",\n stack: typeof error.stack === \"string\" ? error.stack : undefined,\n };\n }\n\n return {\n name: \"Error\",\n message: stringifyUnknown(errorLike) || \"An unknown browser error occurred.\",\n };\n}\n\nfunction stringifyUnknown(value: unknown): string {\n if (typeof value === \"string\") return value;\n if (value == null) return \"\";\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n}\n\nfunction resolveBrowserSourceLocation(\n error: NormalizedRuntimeError,\n sourceEvent: Event | undefined,\n clientWindow: Window,\n): BrowserSourceLocation | undefined {\n if (sourceEvent && \"filename\" in sourceEvent) {\n const event = sourceEvent as ErrorEvent;\n if (event.filename && event.lineno) {\n return createSourceLocation(event.filename, event.lineno, event.colno || 1, clientWindow);\n }\n }\n\n if (!error.stack) return undefined;\n for (const stackLine of error.stack.split(\"\\n\").slice(1)) {\n const match = stackLine\n .trim()\n .match(/\\(?((?:[a-z][a-z\\d+.-]*):\\/\\/[^)\\s]+|\\/[^)\\s]+):(\\d+):(\\d+)\\)?$/i);\n if (!match) continue;\n return {\n ...createSourceLocation(match[1], Number(match[2]), Number(match[3]), clientWindow),\n stackLine: stackLine.trim(),\n };\n }\n return undefined;\n}\n\nfunction createSourceLocation(\n url: string,\n line: number,\n column: number,\n clientWindow: Window,\n): BrowserSourceLocation {\n let displayPath = url;\n try {\n const parsed = new URL(url, clientWindow.location.href);\n displayPath = parsed.origin === clientWindow.location.origin ? parsed.pathname : parsed.href;\n } catch {}\n\n return { url, displayPath, line, column };\n}\n\nfunction createFallbackSourceFrame(\n error: NormalizedRuntimeError,\n location?: BrowserSourceLocation,\n): BrowserSourceFrame {\n const firstStackLine =\n location?.stackLine || error.stack?.split(\"\\n\").find((line) => line.trim().startsWith(\"at \"));\n return {\n path: location?.displayPath || \"Browser stack\",\n line: location?.line,\n column: location?.column,\n unavailable: true,\n lines: [\n {\n number: location?.line,\n content: firstStackLine?.trim() || error.message,\n highlight: true,\n },\n ],\n };\n}\n\nasync function loadBrowserSourceFrame(\n location: BrowserSourceLocation,\n options: FarmRuntimeErrorOverlayOptions,\n): Promise<BrowserSourceFrame | undefined> {\n const request = options.fetch || options.window.fetch?.bind(options.window);\n if (!request) return undefined;\n\n let sourceUrl: URL;\n try {\n sourceUrl = new URL(location.url, options.window.location.href);\n } catch {\n return undefined;\n }\n if (\n sourceUrl.origin !== options.window.location.origin ||\n (sourceUrl.protocol !== \"http:\" && sourceUrl.protocol !== \"https:\")\n ) {\n return undefined;\n }\n\n try {\n const response = await request(sourceUrl.href, {\n headers: { Accept: \"text/plain, application/javascript\" },\n });\n if (!response.ok) return undefined;\n const source = await response.text();\n if (source.length > 1_000_000) return undefined;\n\n const mappedFrame = await createMappedSourceFrame(\n source,\n sourceUrl,\n location,\n request,\n options.window,\n );\n if (mappedFrame) return mappedFrame;\n\n return createSourceFrame(source, location.displayPath, location.line, location.column);\n } catch {\n return undefined;\n }\n}\n\nasync function createMappedSourceFrame(\n generatedSource: string,\n generatedUrl: URL,\n location: BrowserSourceLocation,\n request: typeof fetch,\n clientWindow: Window,\n): Promise<BrowserSourceFrame | undefined> {\n const traceMap = await loadTraceMap(generatedSource, generatedUrl, request, clientWindow);\n if (!traceMap) return undefined;\n\n const original = originalPositionFor(traceMap, {\n line: location.line,\n column: Math.max(0, location.column - 1),\n });\n if (!original.source || original.line == null) return undefined;\n\n const originalSource = sourceContentFor(traceMap, original.source);\n if (originalSource == null) return undefined;\n\n const originalLines = originalSource.split(/\\r?\\n/);\n const generatedLine = generatedSource.split(/\\r?\\n/)[location.line - 1] || \"\";\n const line = refineOriginalLine(generatedLine, originalLines, original.line);\n const lineContent = originalLines[line - 1] || \"\";\n const trimmedGeneratedLine = generatedLine.trim();\n const column =\n line !== original.line && trimmedGeneratedLine && lineContent.includes(trimmedGeneratedLine)\n ? lineContent.indexOf(trimmedGeneratedLine) + 1\n : (original.column ?? 0) + 1;\n\n return createSourceFrame(\n originalSource,\n formatDisplaySourceUrl(original.source, clientWindow),\n line,\n column,\n );\n}\n\nasync function loadTraceMap(\n generatedSource: string,\n generatedUrl: URL,\n request: typeof fetch,\n clientWindow: Window,\n): Promise<TraceMap | undefined> {\n const matches = Array.from(generatedSource.matchAll(/\\/\\/[#@]\\s*sourceMappingURL=([^\\s]+)/g));\n const reference = matches[matches.length - 1]?.[1];\n if (!reference) return undefined;\n\n let sourceMapJson: string;\n if (reference.startsWith(\"data:\")) {\n sourceMapJson = decodeSourceMapDataUrl(reference, clientWindow);\n } else {\n const sourceMapUrl = new URL(reference, generatedUrl);\n if (sourceMapUrl.origin !== clientWindow.location.origin) return undefined;\n const response = await request(sourceMapUrl.href, {\n headers: { Accept: \"application/json, text/plain\" },\n });\n if (!response.ok) return undefined;\n sourceMapJson = await response.text();\n if (sourceMapJson.length > 2_000_000) return undefined;\n }\n\n return new TraceMap(JSON.parse(sourceMapJson) as SourceMapInput, generatedUrl.href);\n}\n\nfunction decodeSourceMapDataUrl(value: string, clientWindow: Window): string {\n const separator = value.indexOf(\",\");\n if (separator < 0) throw new Error(\"Invalid inline source map\");\n const metadata = value.slice(0, separator);\n const payload = value.slice(separator + 1);\n if (!metadata.includes(\";base64\")) return decodeURIComponent(payload);\n\n const binary = clientWindow.atob(payload);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n return new TextDecoder().decode(bytes);\n}\n\nfunction refineOriginalLine(\n generatedLine: string,\n originalLines: string[],\n mappedLine: number,\n): number {\n const normalizedGeneratedLine = normalizeSourceLine(generatedLine);\n if (normalizedGeneratedLine.length < 8) return mappedLine;\n\n let bestMatch = mappedLine;\n let bestDistance = Number.POSITIVE_INFINITY;\n for (let index = 0; index < originalLines.length; index += 1) {\n if (normalizeSourceLine(originalLines[index]) !== normalizedGeneratedLine) continue;\n const line = index + 1;\n const distance = Math.abs(line - mappedLine);\n if (distance < bestDistance) {\n bestMatch = line;\n bestDistance = distance;\n }\n }\n return bestMatch;\n}\n\nfunction normalizeSourceLine(value: string): string {\n return value.trim().replace(/\\s+/g, \" \");\n}\n\nfunction createSourceFrame(\n source: string,\n path: string,\n line: number,\n column: number,\n): BrowserSourceFrame | undefined {\n const lines = source.split(/\\r?\\n/);\n if (line < 1 || line > lines.length) return undefined;\n const start = Math.max(1, line - 2);\n const end = Math.min(lines.length, line + 2);\n const frameLines: BrowserSourceLine[] = [];\n for (let number = start; number <= end; number += 1) {\n frameLines.push({\n number,\n content: lines[number - 1] || \" \",\n highlight: number === line,\n });\n }\n\n return { path, line, column, lines: frameLines };\n}\n\nfunction formatDisplaySourceUrl(url: string, clientWindow: Window): string {\n try {\n const parsed = new URL(url, clientWindow.location.href);\n return parsed.origin === clientWindow.location.origin ? parsed.pathname : parsed.href;\n } catch {\n return url.replace(/[?#].*$/, \"\");\n }\n}\n\nfunction isBrowserExtensionUrl(url: string): boolean {\n try {\n return [\n \"chrome-extension:\",\n \"moz-extension:\",\n \"safari-web-extension:\",\n \"ms-browser-extension:\",\n ].includes(new URL(url).protocol);\n } catch {\n return /^(?:chrome|moz|safari-web|ms-browser)-extension:\\/\\//i.test(url);\n }\n}\n\nfunction isRecoverableReactHydrationError(\n error: NormalizedRuntimeError,\n context: FarmRuntimeErrorOverlayContext,\n location?: BrowserSourceLocation,\n): boolean {\n if (context.phase !== \"window\") return false;\n\n const isKnownRecoverableMessage = [\n /^Hydration failed because the server rendered (?:text|HTML) didn't match the client\\b/i,\n /^Text content does not match server-rendered HTML\\b/i,\n /^There was an error while hydrating but React was able to recover\\b/i,\n ].some((pattern) => pattern.test(error.message));\n if (!isKnownRecoverableMessage) return false;\n\n return /(?:react-dom(?:_client)?(?:\\.development)?\\.js|react-dom\\/|throwOnHydrationMismatch|onRecoverableError)/i.test(\n `${location?.url || \"\"}\\n${error.stack || \"\"}`,\n );\n}\n\nfunction renderErrorMessage(container: Element, message: string, document: Document): void {\n const fragments: Node[] = [];\n const codePattern = /`([^`\\n]+)`|\\b[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*){2,}\\b/g;\n let offset = 0;\n\n for (const match of message.matchAll(codePattern)) {\n const index = match.index ?? 0;\n if (index > offset) fragments.push(document.createTextNode(message.slice(offset, index)));\n\n const code = document.createElement(\"code\");\n code.className = \"farm-runtime-error__inline-code\";\n code.textContent = match[1] || match[0];\n fragments.push(code);\n offset = index + match[0].length;\n }\n\n if (offset < message.length) fragments.push(document.createTextNode(message.slice(offset)));\n container.replaceChildren(...fragments);\n}\n\nfunction createErrorFingerprint(\n error: NormalizedRuntimeError,\n context: FarmRuntimeErrorOverlayContext,\n location?: BrowserSourceLocation,\n): string {\n return [\n context.phase,\n context.location.pathname,\n error.name,\n error.message,\n location?.displayPath || \"\",\n location?.line || \"\",\n error.stack?.split(\"\\n\")[1]?.trim() || \"\",\n ].join(\"\\u0000\");\n}\n\nfunction formatPhase(phase: string): string {\n return phase\n .replace(/^plugin:/, \"Plugin · \")\n .replace(/-/g, \" \")\n .replace(/\\b\\w/g, (character) => character.toUpperCase());\n}\n\nfunction formatErrorType(error: NormalizedRuntimeError, phase: string): string {\n const category =\n phase === \"hydration\"\n ? \"Hydration\"\n : phase === \"navigation\"\n ? \"Navigation\"\n : phase === \"setup\" || phase.startsWith(\"plugin:\")\n ? \"Plugin\"\n : phase === \"performance\"\n ? \"Performance\"\n : \"Runtime\";\n const name = error.name.trim() || \"Error\";\n return `${category} ${name}`;\n}\n\nfunction formatSourcePath(sourceFrame: BrowserSourceFrame): string {\n if (!sourceFrame.line) return sourceFrame.path;\n return `${sourceFrame.path}:${sourceFrame.line}:${sourceFrame.column || 1}${\n sourceFrame.unavailable ? \" · source preview unavailable\" : \"\"\n }`;\n}\n\nfunction resolveDocumentTheme(document: Document, clientWindow: Window): \"light\" | \"dark\" {\n for (const element of [document.documentElement, document.body]) {\n if (!element) continue;\n const explicit =\n element.getAttribute(\"data-theme\") || element.getAttribute(\"data-color-scheme\");\n if (explicit === \"dark\" || element.classList.contains(\"dark\")) return \"dark\";\n if (explicit === \"light\" || element.classList.contains(\"light\")) return \"light\";\n }\n\n const colorScheme = clientWindow.getComputedStyle?.(document.documentElement).colorScheme;\n if (colorScheme?.includes(\"dark\") && !colorScheme.includes(\"light\")) return \"dark\";\n return clientWindow.matchMedia?.(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n}\n\nfunction createFarmRuntimeErrorDebugReport(\n record: RuntimeErrorRecord,\n clientWindow: Window,\n farmVersion: string,\n): string {\n const source = record.sourceFrame.lines\n .map(\n (line) =>\n `${line.highlight ? \">\" : \" \"} ${line.number ? String(line.number).padStart(4, \" \") : \" \"} | ${line.content}`,\n )\n .join(\"\\n\");\n const viewport = `${clientWindow.innerWidth}×${clientWindow.innerHeight}`;\n\n return [\n \"# Farm.js client runtime debug report\",\n \"\",\n \"## Error\",\n `- Type: ${formatErrorType(record.error, record.context.phase)}`,\n `- Message: ${record.error.message}`,\n `- Phase: ${formatPhase(record.context.phase)}`,\n `- Page: ${record.context.location.href}`,\n `- Occurrences: ${record.occurrences}`,\n \"\",\n \"## Browser runtime\",\n `- Farm.js: ${farmVersion}`,\n `- User agent: ${clientWindow.navigator.userAgent}`,\n `- Viewport: ${viewport}`,\n `- Online: ${clientWindow.navigator.onLine === false ? \"no\" : \"yes\"}`,\n \"\",\n \"## Source\",\n `\\`${formatSourcePath(record.sourceFrame)}\\``,\n \"\",\n \"```text\",\n source,\n \"```\",\n \"\",\n \"## Stack trace\",\n \"```text\",\n record.error.stack || \"Stack trace unavailable.\",\n \"```\",\n \"\",\n \"## Diagnostic request\",\n \"Identify the most likely root cause from the message, source frame, and stack trace. Explain the smallest safe fix and how to verify it.\",\n ].join(\"\\n\");\n}\n\nfunction createGithubIssueUrl(\n record: RuntimeErrorRecord,\n clientWindow: Window,\n farmVersion: string,\n): string {\n const source = record.sourceFrame.lines\n .map(\n (line) =>\n `${line.highlight ? \">\" : \" \"} ${line.number ? String(line.number).padStart(4, \" \") : \" \"} | ${line.content}`,\n )\n .join(\"\\n\");\n const body = truncateText(\n [\n \"## Runtime error report\",\n \"\",\n \"> This report was prefilled by the Farm.js development error overlay. Review it and remove sensitive information before submitting.\",\n \"\",\n \"### Error\",\n `- Type: ${formatErrorType(record.error, record.context.phase)}`,\n `- Message: ${record.error.message}`,\n `- Phase: ${formatPhase(record.context.phase)}`,\n `- Page path: ${record.context.location.pathname}`,\n `- Occurrences: ${record.occurrences}`,\n `- Farm.js: ${farmVersion}`,\n `- Browser: ${clientWindow.navigator.userAgent}`,\n `- Viewport: ${clientWindow.innerWidth}×${clientWindow.innerHeight}`,\n `- Online: ${clientWindow.navigator.onLine === false ? \"no\" : \"yes\"}`,\n \"\",\n \"### Source\",\n `\\`${formatSourcePath(record.sourceFrame)}\\``,\n \"\",\n \"```text\",\n source,\n \"```\",\n \"\",\n \"### Stack trace\",\n \"```text\",\n record.error.stack || \"Stack trace unavailable.\",\n \"```\",\n \"\",\n \"### Expected behavior\",\n \"Describe what you expected to happen and the steps needed to reproduce the failure.\",\n \"\",\n \"### Diagnostic request\",\n \"Identify the most likely root cause from the message, source frame, and stack trace. Explain the smallest safe fix and how to verify it.\",\n ].join(\"\\n\"),\n 6_000,\n );\n const issueUrl = new URL(\"https://github.com/farming-labs/farm.js/issues/new\");\n issueUrl.searchParams.set(\"title\", truncateText(`[runtime error] ${record.error.message}`, 120));\n issueUrl.searchParams.set(\"body\", body);\n return issueUrl.href;\n}\n\nfunction truncateText(value: string, maxLength: number): string {\n if (value.length <= maxLength) return value;\n return `${value.slice(0, maxLength - 24)}\\n\\n[report truncated]`;\n}\n\nasync function copyText(value: string, clientWindow: Window, document: Document): Promise<void> {\n if (clientWindow.navigator.clipboard && clientWindow.isSecureContext) {\n await clientWindow.navigator.clipboard.writeText(value);\n return;\n }\n\n const area = document.createElement(\"textarea\");\n area.value = value;\n area.readOnly = true;\n area.style.position = \"fixed\";\n area.style.opacity = \"0\";\n document.body.appendChild(area);\n area.select();\n const copied = document.execCommand(\"copy\");\n area.remove();\n if (!copied) throw new Error(\"Copy command was rejected\");\n}\n","\"use client\";\n\nimport {\n createFarmRuntimeErrorOverlay,\n type FarmRuntimeErrorOverlay,\n} from \"./runtime-error-overlay\";\n\ntype MaybePromise<T> = T | Promise<T>;\n\nexport type FarmClientPluginEnforce = \"pre\" | \"post\";\nexport type FarmClientNavigationAction = \"push\" | \"replace\" | \"pop\";\nexport type FarmClientHydrationMode = \"hydrate\" | \"render\";\n\nexport interface FarmClientLocation {\n href: string;\n pathname: string;\n search: string;\n hash: string;\n}\n\nexport interface FarmClientPluginRouter {\n navigate(href: string, options?: Record<string, unknown>): MaybePromise<void>;\n /** Re-render the current URL from fresh server data without replacing the document shell. */\n refresh?(options?: Record<string, unknown>): MaybePromise<void>;\n prefetch?(href: string): MaybePromise<void>;\n clearCache?(): void;\n getNavigationState?(): unknown;\n}\n\nexport interface FarmClientPluginMetadata {\n name: string;\n version?: string;\n}\n\nexport interface FarmClientPluginSetupEvent<TPublic = undefined> {\n plugin: FarmClientPluginMetadata;\n public: Readonly<TPublic>;\n router: FarmClientPluginRouter;\n isDev: boolean;\n isProd: boolean;\n deploymentId?: string;\n}\n\nexport interface FarmClientPluginStateEvent<\n TState = unknown,\n TPublic = undefined,\n> extends FarmClientPluginSetupEvent<TPublic> {\n state: TState;\n}\n\nexport interface FarmClientHydrationSession {\n container: Element;\n location: FarmClientLocation;\n mode: FarmClientHydrationMode;\n startedAt: number;\n}\n\nexport interface FarmClientHydrationEvent<TState = unknown, TPublic = undefined>\n extends FarmClientPluginStateEvent<TState, TPublic>, FarmClientHydrationSession {}\n\nexport interface FarmClientHydrationCompleteEvent<\n TState = unknown,\n TPublic = undefined,\n> extends FarmClientHydrationEvent<TState, TPublic> {\n durationMs: number;\n recovered: boolean;\n}\n\nexport interface FarmClientNavigationSession {\n id: string;\n from: FarmClientLocation | null;\n to: FarmClientLocation;\n action: FarmClientNavigationAction;\n signal: AbortSignal;\n startedAt: number;\n route?: {\n pattern?: string | null;\n params?: Record<string, string>;\n };\n}\n\nexport interface FarmClientNavigationEvent<TState = unknown, TPublic = undefined>\n extends FarmClientPluginStateEvent<TState, TPublic>, FarmClientNavigationSession {}\n\nexport interface FarmClientNavigationLoadedEvent<\n TState = unknown,\n TPublic = undefined,\n> extends FarmClientNavigationEvent<TState, TPublic> {\n durationMs: number;\n data?: unknown;\n}\n\nexport interface FarmClientNavigationResolvedEvent<\n TState = unknown,\n TPublic = undefined,\n> extends FarmClientNavigationEvent<TState, TPublic> {\n durationMs: number;\n}\n\nexport interface FarmClientNavigationErrorEvent<\n TState = unknown,\n TPublic = undefined,\n> extends FarmClientNavigationResolvedEvent<TState, TPublic> {\n error: unknown;\n}\n\nexport type FarmClientPluginErrorPhase =\n | \"setup\"\n | \"hydration\"\n | \"navigation\"\n | \"window\"\n | \"unhandled-rejection\"\n | \"performance\"\n | `plugin:${string}`\n | (string & {});\n\nexport interface FarmClientPluginErrorEvent<\n TState = unknown,\n TPublic = undefined,\n> extends FarmClientPluginStateEvent<TState, TPublic> {\n error: unknown;\n phase: FarmClientPluginErrorPhase;\n location: FarmClientLocation;\n navigation?: FarmClientNavigationSession;\n}\n\nexport interface FarmClientPerformanceEvent<\n TState = unknown,\n TPublic = undefined,\n> extends FarmClientPluginStateEvent<TState, TPublic> {\n entry: PerformanceEntry;\n location: FarmClientLocation;\n}\n\nexport interface FarmClientPluginCloseEvent<\n TState = unknown,\n TPublic = undefined,\n> extends FarmClientPluginStateEvent<TState, TPublic> {\n reason: \"pagehide\" | \"hmr\" | \"manual\" | (string & {});\n}\n\nexport interface FarmClientPlugin<TState = unknown, TPublic = undefined> {\n setup?(event: FarmClientPluginSetupEvent<TPublic>): MaybePromise<TState>;\n hydration?: {\n before?(event: FarmClientHydrationEvent<TState, TPublic>): MaybePromise<void>;\n after?(event: FarmClientHydrationCompleteEvent<TState, TPublic>): MaybePromise<void>;\n };\n navigation?: {\n before?(event: FarmClientNavigationEvent<TState, TPublic>): MaybePromise<void>;\n loaded?(event: FarmClientNavigationLoadedEvent<TState, TPublic>): MaybePromise<void>;\n resolved?(event: FarmClientNavigationResolvedEvent<TState, TPublic>): MaybePromise<void>;\n rendered?(event: FarmClientNavigationResolvedEvent<TState, TPublic>): MaybePromise<void>;\n error?(event: FarmClientNavigationErrorEvent<TState, TPublic>): MaybePromise<void>;\n };\n error?(event: FarmClientPluginErrorEvent<TState, TPublic>): MaybePromise<void>;\n performance?(event: FarmClientPerformanceEvent<TState, TPublic>): MaybePromise<void>;\n close?(event: FarmClientPluginCloseEvent<TState, TPublic>): MaybePromise<void>;\n}\n\nexport interface FarmClientPluginRegistration<TPublic = undefined> {\n name: string;\n version?: string;\n enforce?: FarmClientPluginEnforce;\n definition: FarmClientPlugin<any, TPublic>;\n public?: TPublic;\n}\n\n/**\n * Define the lifecycle for an application's auto-discovered `src/client.ts`\n * entry. The identity helper preserves state inference while keeping the\n * module entirely in the browser bundle.\n */\nexport function defineClient<TState = unknown, TPublic = undefined>(\n definition: FarmClientPlugin<TState, TPublic>,\n): FarmClientPlugin<TState, TPublic> {\n return definition;\n}\n\nexport interface FarmClientPluginManagerOptions {\n router: FarmClientPluginRouter;\n isDev?: boolean;\n isProd?: boolean;\n deploymentId?: string;\n window?: Window;\n}\n\ninterface FarmClientPluginInstance {\n registration: FarmClientPluginRegistration<any>;\n plugin: FarmClientPlugin<any, any>;\n state: unknown;\n}\n\nconst PERFORMANCE_ENTRY_TYPES = [\n \"navigation\",\n \"paint\",\n \"largest-contentful-paint\",\n \"layout-shift\",\n \"event\",\n];\n\nexport class FarmClientPluginManager {\n private readonly registrations: FarmClientPluginRegistration[];\n private readonly options: FarmClientPluginManagerOptions;\n private readonly instances: FarmClientPluginInstance[] = [];\n private readonly performanceObservers: PerformanceObserver[] = [];\n private startPromise?: Promise<void>;\n private closePromise?: Promise<void>;\n private currentNavigation?: {\n controller: AbortController;\n session: FarmClientNavigationSession;\n };\n private navigationSequence = 0;\n private starting = false;\n private started = false;\n private closed = false;\n private readonly reportedErrors = new WeakSet<object>();\n private readonly runtimeErrorOverlay?: FarmRuntimeErrorOverlay;\n\n private readonly handleWindowError = (event: ErrorEvent) => {\n const error = event.error ?? new Error(event.message || \"Unknown browser error\");\n void this.reportError(error, \"window\", undefined, this.getLocation(), event);\n };\n\n private readonly handleUnhandledRejection = (event: PromiseRejectionEvent) => {\n void this.reportError(\n event.reason,\n \"unhandled-rejection\",\n undefined,\n this.getLocation(),\n event,\n );\n };\n\n private readonly handlePageHide = () => {\n void this.close(\"pagehide\");\n };\n\n constructor(\n registrations: readonly FarmClientPluginRegistration[],\n options: FarmClientPluginManagerOptions,\n ) {\n this.registrations = sortRegistrations(registrations);\n this.options = {\n ...options,\n isDev: options.isDev ?? false,\n isProd: options.isProd ?? !options.isDev,\n window: options.window ?? (typeof window !== \"undefined\" ? window : undefined),\n };\n if (this.options.isDev && this.options.window) {\n this.runtimeErrorOverlay = createFarmRuntimeErrorOverlay({\n window: this.options.window,\n });\n }\n }\n\n start(): Promise<void> {\n if (this.startPromise) return this.startPromise;\n\n this.startPromise = Promise.resolve().then(() => this.startInternal());\n return this.startPromise;\n }\n\n async beginHydration(input: {\n container: Element;\n mode: FarmClientHydrationMode;\n }): Promise<FarmClientHydrationSession> {\n await this.start();\n const session: FarmClientHydrationSession = {\n ...input,\n location: this.getLocation(),\n startedAt: now(),\n };\n\n await this.runHook(\"hydration.before\", (instance) =>\n instance.plugin.hydration?.before?.({\n ...this.createStateEvent(instance),\n ...session,\n }),\n );\n\n return session;\n }\n\n async completeHydration(\n session: FarmClientHydrationSession,\n options: { recovered?: boolean } = {},\n ): Promise<void> {\n await this.runHook(\"hydration.after\", (instance) =>\n instance.plugin.hydration?.after?.({\n ...this.createStateEvent(instance),\n ...session,\n durationMs: now() - session.startedAt,\n recovered: options.recovered ?? false,\n }),\n );\n }\n\n async failHydration(session: FarmClientHydrationSession, error: unknown): Promise<void> {\n await this.reportError(error, \"hydration\", undefined, session.location);\n }\n\n async beginNavigation(input: {\n from?: string | URL | FarmClientLocation | null;\n to: string | URL | FarmClientLocation;\n action: FarmClientNavigationAction;\n route?: FarmClientNavigationSession[\"route\"];\n }): Promise<FarmClientNavigationSession> {\n await this.start();\n this.currentNavigation?.controller.abort(\"superseded\");\n\n const controller = new AbortController();\n const session: FarmClientNavigationSession = {\n id: `navigation:${++this.navigationSequence}`,\n from:\n input.from === null\n ? null\n : toClientLocation(input.from ?? this.getLocation().href, this.getBaseUrl()),\n to: toClientLocation(input.to, this.getBaseUrl()),\n action: input.action,\n signal: controller.signal,\n startedAt: now(),\n route: input.route,\n };\n\n this.currentNavigation = { controller, session };\n await this.runHook(\"navigation.before\", (instance) =>\n instance.plugin.navigation?.before?.({\n ...this.createStateEvent(instance),\n ...session,\n }),\n );\n\n return session;\n }\n\n async markNavigationLoaded(session: FarmClientNavigationSession, data?: unknown): Promise<void> {\n if (session.signal.aborted) return;\n await this.runHook(\"navigation.loaded\", (instance) =>\n instance.plugin.navigation?.loaded?.({\n ...this.createStateEvent(instance),\n ...session,\n data,\n durationMs: now() - session.startedAt,\n }),\n );\n }\n\n cancelNavigation(session?: FarmClientNavigationSession, reason: unknown = \"canceled\"): void {\n const current = this.currentNavigation;\n if (!current || (session && current.session !== session)) return;\n current.controller.abort(reason);\n this.currentNavigation = undefined;\n }\n\n async resolveNavigation(session: FarmClientNavigationSession): Promise<void> {\n if (session.signal.aborted) return;\n await this.runHook(\"navigation.resolved\", (instance) =>\n instance.plugin.navigation?.resolved?.({\n ...this.createStateEvent(instance),\n ...session,\n durationMs: now() - session.startedAt,\n }),\n );\n }\n\n scheduleNavigationRendered(session: FarmClientNavigationSession): Promise<void> {\n if (session.signal.aborted) return Promise.resolve();\n const clientWindow = this.options.window;\n const schedule = clientWindow?.requestAnimationFrame\n ? (callback: () => void) =>\n clientWindow.requestAnimationFrame(() => clientWindow.requestAnimationFrame(callback))\n : (callback: () => void) => setTimeout(callback, 0);\n\n return new Promise((resolve) => {\n schedule(() => {\n if (session.signal.aborted || this.closed) {\n resolve();\n return;\n }\n void this.runHook(\"navigation.rendered\", (instance) =>\n instance.plugin.navigation?.rendered?.({\n ...this.createStateEvent(instance),\n ...session,\n durationMs: now() - session.startedAt,\n }),\n ).finally(() => {\n if (this.currentNavigation?.session === session) {\n this.currentNavigation = undefined;\n }\n resolve();\n });\n });\n });\n }\n\n async failNavigation(session: FarmClientNavigationSession, error: unknown): Promise<void> {\n if (!session.signal.aborted) {\n await this.runHook(\"navigation.error\", (instance) =>\n instance.plugin.navigation?.error?.({\n ...this.createStateEvent(instance),\n ...session,\n durationMs: now() - session.startedAt,\n error,\n }),\n );\n await this.reportError(error, \"navigation\", session, session.to);\n }\n\n if (this.currentNavigation?.session === session) {\n this.currentNavigation = undefined;\n }\n }\n\n async reportError(\n error: unknown,\n phase: FarmClientPluginErrorPhase,\n navigation?: FarmClientNavigationSession,\n location = this.getLocation(),\n sourceEvent?: Event,\n ): Promise<void> {\n if (this.closed) return;\n if (isObject(error)) {\n if (this.reportedErrors.has(error)) return;\n this.reportedErrors.add(error);\n }\n\n if (!this.started && !this.starting) await this.start();\n await this.runErrorHooks({ error, phase, navigation, location }, undefined, sourceEvent);\n }\n\n close(reason: FarmClientPluginCloseEvent[\"reason\"] = \"manual\"): Promise<void> {\n if (this.closePromise) return this.closePromise;\n this.closePromise = this.closeInternal(reason);\n return this.closePromise;\n }\n\n getPlugins(): readonly FarmClientPluginMetadata[] {\n return this.instances.map(({ registration }) => ({\n name: registration.name,\n version: registration.version,\n }));\n }\n\n private async startInternal(): Promise<void> {\n if (this.started || this.closed) return;\n this.starting = true;\n\n try {\n for (const registration of this.registrations) {\n try {\n const definition = registration.definition;\n if (!definition || typeof definition !== \"object\") {\n throw new TypeError(\n `Client plugin \"${registration.name}\" does not define a lifecycle object`,\n );\n }\n\n const instance: FarmClientPluginInstance = {\n registration,\n plugin: definition,\n state: undefined,\n };\n instance.state = await definition.setup?.(this.createSetupEvent(instance));\n this.instances.push(instance);\n } catch (error) {\n this.logHookError(registration.name, \"setup\", error);\n await this.runErrorHooks({\n error,\n phase: \"setup\",\n location: this.getLocation(),\n });\n }\n }\n\n this.started = true;\n this.installBrowserListeners();\n this.installPerformanceObservers();\n } finally {\n this.starting = false;\n }\n }\n\n private installBrowserListeners(): void {\n const clientWindow = this.options.window;\n if (!clientWindow) return;\n\n if (this.runtimeErrorOverlay || this.instances.some(({ plugin }) => plugin.error)) {\n clientWindow.addEventListener(\"error\", this.handleWindowError);\n clientWindow.addEventListener(\"unhandledrejection\", this.handleUnhandledRejection);\n }\n clientWindow.addEventListener(\"pagehide\", this.handlePageHide, {\n once: true,\n });\n }\n\n private installPerformanceObservers(): void {\n if (!this.instances.some(({ plugin }) => plugin.performance)) return;\n const Observer = typeof PerformanceObserver !== \"undefined\" ? PerformanceObserver : undefined;\n if (!Observer) return;\n\n const supported = new Set(Observer.supportedEntryTypes || []);\n for (const type of PERFORMANCE_ENTRY_TYPES) {\n if (!supported.has(type)) continue;\n try {\n const observer = new Observer((list: PerformanceObserverEntryList) => {\n for (const entry of list.getEntries()) {\n void this.runHook(\"performance\", (instance) =>\n instance.plugin.performance?.({\n ...this.createStateEvent(instance),\n entry,\n location: this.getLocation(),\n }),\n );\n }\n });\n observer.observe({ type, buffered: true });\n this.performanceObservers.push(observer);\n } catch (error) {\n void this.reportError(error, \"performance\");\n }\n }\n }\n\n private async closeInternal(reason: FarmClientPluginCloseEvent[\"reason\"]): Promise<void> {\n if (this.closed) return;\n if (this.startPromise) await this.startPromise;\n this.closed = true;\n this.currentNavigation?.controller.abort(reason);\n this.currentNavigation = undefined;\n\n const clientWindow = this.options.window;\n clientWindow?.removeEventListener(\"error\", this.handleWindowError);\n clientWindow?.removeEventListener(\"unhandledrejection\", this.handleUnhandledRejection);\n clientWindow?.removeEventListener(\"pagehide\", this.handlePageHide);\n for (const observer of this.performanceObservers) observer.disconnect();\n this.performanceObservers.length = 0;\n this.runtimeErrorOverlay?.destroy();\n\n for (const instance of [...this.instances].reverse()) {\n try {\n await instance.plugin.close?.({\n ...this.createStateEvent(instance),\n reason,\n });\n } catch (error) {\n this.logHookError(instance.registration.name, \"close\", error);\n }\n }\n }\n\n private async runHook(\n hook: string,\n invoke: (instance: FarmClientPluginInstance) => MaybePromise<void> | undefined,\n ): Promise<void> {\n for (const instance of this.instances) {\n try {\n await invoke(instance);\n } catch (error) {\n this.logHookError(instance.registration.name, hook, error);\n await this.runErrorHooks(\n {\n error,\n phase: `plugin:${hook}`,\n location: this.getLocation(),\n },\n instance,\n );\n }\n }\n }\n\n private async runErrorHooks(\n event: Pick<FarmClientPluginErrorEvent, \"error\" | \"phase\" | \"location\" | \"navigation\">,\n excluded?: FarmClientPluginInstance,\n sourceEvent?: Event,\n ): Promise<void> {\n this.runtimeErrorOverlay?.show(event.error, {\n phase: event.phase,\n location: event.location,\n sourceEvent,\n });\n for (const instance of this.instances) {\n if (instance === excluded || !instance.plugin.error) continue;\n try {\n await instance.plugin.error({\n ...this.createStateEvent(instance),\n ...event,\n });\n } catch (error) {\n this.logHookError(instance.registration.name, \"error\", error);\n }\n }\n }\n\n private createSetupEvent(\n instance: Pick<FarmClientPluginInstance, \"registration\">,\n ): FarmClientPluginSetupEvent<any> {\n return {\n plugin: {\n name: instance.registration.name,\n version: instance.registration.version,\n },\n public: readonlyPublicData(instance.registration.public),\n router: this.options.router,\n isDev: Boolean(this.options.isDev),\n isProd: Boolean(this.options.isProd),\n deploymentId: this.options.deploymentId,\n };\n }\n\n private createStateEvent(\n instance: FarmClientPluginInstance,\n ): FarmClientPluginStateEvent<any, any> {\n return {\n ...this.createSetupEvent(instance),\n state: instance.state,\n };\n }\n\n private getLocation(): FarmClientLocation {\n const href = this.options.window?.location.href ?? \"http://localhost/\";\n return toClientLocation(href, href);\n }\n\n private getBaseUrl(): string {\n return this.options.window?.location.href ?? \"http://localhost/\";\n }\n\n private logHookError(name: string, hook: string, error: unknown): void {\n console.error(`[Farm.js] Client plugin \"${name}\" failed in ${hook}:`, error);\n }\n}\n\nexport function createClientPluginManager(\n registrations: readonly FarmClientPluginRegistration[],\n options: FarmClientPluginManagerOptions,\n): FarmClientPluginManager {\n return new FarmClientPluginManager(registrations, options);\n}\n\nfunction sortRegistrations(\n registrations: readonly FarmClientPluginRegistration[],\n): FarmClientPluginRegistration[] {\n const rank = (enforce?: FarmClientPluginEnforce) =>\n enforce === \"pre\" ? 0 : enforce === \"post\" ? 2 : 1;\n return registrations\n .map((registration, index) => ({ registration, index }))\n .sort(\n (left, right) =>\n rank(left.registration.enforce) - rank(right.registration.enforce) ||\n left.index - right.index,\n )\n .map(({ registration }) => registration);\n}\n\nfunction toClientLocation(\n input: string | URL | FarmClientLocation,\n base: string,\n): FarmClientLocation {\n if (typeof input === \"object\" && \"href\" in input && \"pathname\" in input) {\n return {\n href: input.href,\n pathname: input.pathname,\n search: input.search,\n hash: input.hash,\n };\n }\n\n const url = new URL(input, base);\n return {\n href: url.href,\n pathname: url.pathname,\n search: url.search,\n hash: url.hash,\n };\n}\n\nfunction readonlyPublicData<T>(value: T | undefined): Readonly<T> {\n if (value && typeof value === \"object\") {\n return Object.freeze(value);\n }\n return value as Readonly<T>;\n}\n\nfunction now(): number {\n return typeof performance !== \"undefined\" ? performance.now() : Date.now();\n}\n\nfunction isObject(value: unknown): value is object {\n return (typeof value === \"object\" && value !== null) || typeof value === \"function\";\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,2BAKO;;;ACqKA,SAAS,aACd,YACmC;AACnC,SAAO;AACT;AAJgB;","names":[]}
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  defineClient
4
- } from "../chunk-UMUWR5XA.mjs";
4
+ } from "../chunk-PURU7FXR.mjs";
5
5
  import "../chunk-FXG2PS27.mjs";
6
- import "../chunk-J3MPQ4MQ.mjs";
6
+ import "../chunk-LG4XB6RN.mjs";
7
7
  import "../chunk-CGILA3WO.mjs";
8
8
  export {
9
9
  defineClient
@@ -11,7 +11,7 @@ import { FarmMarkdownUserConfig, FarmMarkdownResolvedConfig } from './markdown.m
11
11
  import { FarmObservabilityUserConfig } from './observability.mjs';
12
12
  import * as vite from 'vite';
13
13
  import { ViteDevServer, UserConfig, Plugin, Connect } from 'vite';
14
- import { j as FarmWorkflowsUserConfig, a as FarmServerConfig, F as FarmWorkflowsResolvedConfig, R as ResolvedFarmServerConfig } from './workflows-ChyK_oTu.mjs';
14
+ import { j as FarmWorkflowsUserConfig, a as FarmServerConfig, F as FarmWorkflowsResolvedConfig, R as ResolvedFarmServerConfig } from './workflows-BantWytQ.mjs';
15
15
  import { FarmCronUserConfig, FarmCronResolvedConfig } from './cron.mjs';
16
16
  import { ResolvedFarmEnv, FarmEnvConfig } from './env.mjs';
17
17
  import { b as FarmRedirectStatus } from './navigation-errors-Dvwpzaer.mjs';
@@ -25,6 +25,84 @@ import { FarmLayoutFonts } from './font.mjs';
25
25
  import { _withAfterNodeMiddleware } from './after.mjs';
26
26
  import { F as FarmIslandStrategy } from './island-CfGru1MO.mjs';
27
27
 
28
+ /**
29
+ * Agent-readiness configuration: opt-in primitives that make a Farm site easier
30
+ * for AI agents and crawlers to discover, resolve, and use. Off by default so
31
+ * sites that do not want agent exposure (internal tools, private dashboards) are
32
+ * unaffected.
33
+ */
34
+ /** schema.org JSON-LD emitted in the document head to identify the site. */
35
+ interface FarmAgentJsonLd {
36
+ /**
37
+ * schema.org `@type`. Common values: `"Organization"` for a company or
38
+ * project, `"SoftwareApplication"` for a product, `"WebSite"`, `"Person"`.
39
+ *
40
+ * @default "Organization"
41
+ */
42
+ type?: string;
43
+ /** Entity name. Defaults to the site's Open Graph site name or page title. */
44
+ name?: string;
45
+ /** Canonical URL for the entity. Defaults to the configured `metadataBase`. */
46
+ url?: string;
47
+ /** Short description. Defaults to the page/site metadata description. */
48
+ description?: string;
49
+ /** Logo URL. */
50
+ logo?: string;
51
+ /** URLs that also represent this entity (social profiles, repos) — schema.org `sameAs`. */
52
+ sameAs?: string[];
53
+ /** Additional schema.org properties merged into the emitted object. */
54
+ properties?: Record<string, unknown>;
55
+ }
56
+ interface FarmAgentUserConfig {
57
+ /**
58
+ * Emit schema.org JSON-LD in the document head so agents and crawlers can
59
+ * resolve the site's identity. `true` emits an `Organization` built from the
60
+ * site's metadata; an object customizes the type and fields.
61
+ *
62
+ * @default false
63
+ */
64
+ jsonLd?: boolean | FarmAgentJsonLd;
65
+ }
66
+ interface ResolvedFarmAgentConfig {
67
+ jsonLd: FarmAgentJsonLd | false;
68
+ }
69
+
70
+ /**
71
+ * Integration auth routes accept ordinary form posts, which browsers send
72
+ * cross-site without a CORS preflight. Without an origin check, a third-party
73
+ * page can submit credentials to an app's own sign-in route and plant an
74
+ * attacker-controlled session in the victim's browser (login CSRF), or drive a
75
+ * forced sign-out. This mirrors the server-action origin contract so both
76
+ * entry points reject the same requests.
77
+ */
78
+ type IntegrationOriginRejection = "missing-origin" | "opaque-origin" | "invalid-origin" | "cross-site";
79
+ type IntegrationOriginResult = {
80
+ ok: true;
81
+ } | {
82
+ ok: false;
83
+ reason: IntegrationOriginRejection;
84
+ };
85
+ interface IntegrationOriginPolicy {
86
+ /** Extra trusted origins, using the `serverActions.allowedOrigins` pattern syntax. */
87
+ allowedOrigins?: readonly string[];
88
+ /**
89
+ * Whether a request carrying no origin metadata at all must be rejected.
90
+ *
91
+ * Form posts always carry an Origin header in supported browsers, so
92
+ * state-changing POSTs default to rejecting (`true`). Top-level GET
93
+ * navigations legitimately arrive with no Origin and no Referer — a typed
94
+ * URL or a bookmark — so GET callers pass `false` to avoid breaking them.
95
+ */
96
+ requireOriginMetadata?: boolean;
97
+ }
98
+ /**
99
+ * Resolve configured origin patterns once, at integration construction, so an
100
+ * invalid pattern fails loudly at startup instead of per request.
101
+ */
102
+ declare function resolveIntegrationAllowedOrigins(values: readonly string[] | undefined, label: string): readonly string[];
103
+ declare function validateIntegrationRequestOrigin(request: Request, policy?: IntegrationOriginPolicy): IntegrationOriginResult;
104
+ declare function describeIntegrationOriginRejection(reason: IntegrationOriginRejection): string;
105
+
28
106
  type RuntimeClientFactory<TClient> = () => TClient | Promise<TClient>;
29
107
  type FarmIntegrationOrmSchema = SchemaDefinition<Record<string, AnyModelDefinition>>;
30
108
  type FarmIntegrationOrmClient<TSchema extends FarmIntegrationOrmSchema> = OrmClient<TSchema>;
@@ -660,6 +738,13 @@ type I18nConfig = FarmI18nUserConfig;
660
738
  interface OpenAPIConfig {
661
739
  enabled?: boolean;
662
740
  route?: string;
741
+ /**
742
+ * Path where the raw OpenAPI spec is served as JSON, so agents and API tools
743
+ * can fetch it at a predictable URL. Set to `false` to disable.
744
+ *
745
+ * @default "/openapi.json"
746
+ */
747
+ specRoute?: string | false;
663
748
  title?: string;
664
749
  description?: string;
665
750
  version?: string;
@@ -768,7 +853,8 @@ interface FarmUserConfig extends Omit<FarmConfig, "vite" | "docs" | "env" | "lay
768
853
  vite?: UserConfig | ((config: UserConfig) => UserConfig);
769
854
  [key: string]: any;
770
855
  }
771
- interface ResolvedFarmConfig extends Required<Omit<FarmUserConfig, "extends" | "plugins" | "vite" | "deploy" | "docs" | "md" | "mdx" | "migrations" | "cron" | "workflows" | "api" | "env" | "server" | "serverActions" | "devtools" | "devIndicators" | "images" | "i18n" | "auth" | "performance" | "security" | "theme" | "renderer">> {
856
+ interface ResolvedFarmConfig extends Required<Omit<FarmUserConfig, "extends" | "plugins" | "vite" | "deploy" | "docs" | "md" | "mdx" | "migrations" | "cron" | "workflows" | "api" | "env" | "server" | "serverActions" | "devtools" | "devIndicators" | "images" | "i18n" | "auth" | "performance" | "security" | "theme" | "renderer" | "agent">> {
857
+ agent: ResolvedFarmAgentConfig;
772
858
  /** @internal Tracks whether `context` came from user/layer config instead of the default noop. */
773
859
  [FARM_RESOLVED_CUSTOM_CONTEXT]?: boolean;
774
860
  root: string;
@@ -1802,6 +1888,8 @@ interface FarmConfig {
1802
1888
  serverActions?: FarmServerActionsConfig;
1803
1889
  /** App-wide HTTP security policy. */
1804
1890
  security?: FarmSecurityConfig | ResolvedFarmSecurityConfig;
1891
+ /** Opt-in agent-readiness primitives (JSON-LD and related). Off by default. */
1892
+ agent?: FarmAgentUserConfig;
1805
1893
  images?: FarmImageConfig;
1806
1894
  /** Browser resource scheduling and preload budgets. */
1807
1895
  performance?: FarmPerformanceConfig;
@@ -2269,4 +2357,4 @@ interface SSGCollectionResult {
2269
2357
  ssr: string[];
2270
2358
  }
2271
2359
 
2272
- export { type BuildOptions as $, type AppRoutePattern as A, type BundleResultPayload as B, type FarmContextFactoryInput as C, type FarmIsolatedClientHydrationMode as D, type LoadingProps as E, type FarmRouteRuntimeConfig as F, type ErrorProps as G, type PagePropsWithMiddleware as H, type MetadataProps as I, type LayoutMetadataProps as J, type Page as K, type LayoutProps as L, type Metadata as M, type NitroPreset as N, type Layout as O, type ParsedRoute as P, type Loading as Q, type RouteSegment as R, type ErrorBoundary as S, type StaticPathPrimitive as T, type StaticPathParams as U, type StaticRouteParams as V, type GenerateStaticParams as W, type LayoutModule as X, type FarmRequest as Y, type FarmResponse as Z, type ServerAction as _, type FarmPlugin as a, type FarmPluginRouteRuntimePayload as a$, type SSGPage as a0, type SSGCollectionResult as a1, type FarmLayerEntry as a2, type ResolvedFarmLayer as a3, type FarmSourceRoot as a4, type ResolveFarmLayersOptions as a5, type FarmLayerResolution as a6, resolveFarmLayers as a7, getFarmSourceRoots as a8, getFarmAppDirectories as a9, resolveDeployOutputPath as aA, normalizeDeployTarget as aB, getDeployTargetForPreset as aC, getPresetForDeployTarget as aD, type FarmLayerConfig as aE, type FarmPerformanceConfig as aF, type FarmPreloadMode as aG, type FarmPreloadUserConfig as aH, type ResolvedFarmPreloadConfig as aI, type FarmCspConfig as aJ, type FarmCspDirectives as aK, type FarmCspDirectiveValue as aL, type FarmCspOptions as aM, type FarmSecurityConfig as aN, type ResolvedFarmCspConfig as aO, type FarmAuthConfig as aP, type FarmAuthDatabaseConfig as aQ, type FarmAuthEmailAndPasswordConfig as aR, type FarmAuthSessionConfig as aS, type FarmAuthUserConfig as aT, type PluginRequestContext as aU, type FarmPluginContext as aV, type FarmPluginIntegrationContext as aW, type FarmPluginLifecycle as aX, type FarmRequestPluginContext as aY, type FarmRequestStore as aZ, type FarmPluginRuntimeKind as a_, getFarmLayerAliases as aa, createFarmConfigResolutionPlugin as ab, loadFarmConfigFile as ac, type ReadonlyMiddlewareStore as ad, type FarmMiddlewareConfig as ae, type MiddlewareModule as af, type ResolvedFarmRouteRuntimeConfig as ag, type ResolvedFarmAPIConfig as ah, type ResolvedFarmDevtoolsConfig as ai, type ResolvedFarmDevIndicatorsConfig as aj, type ResolvedFarmAuthConfig as ak, type ResolvedFarmPerformanceConfig as al, type ResolvedFarmSecurityConfig as am, type APIRequestRuntime as an, manageFarmDocumentPreloads as ao, manageFarmHtmlPreloads as ap, manageFarmLinkHeaderPreloads as aq, reportFarmPreloadWarnings as ar, type OpenAPIConfig as as, definePlugin as at, FarmRuntimeShutdownError as au, PluginManager as av, resolveConfig as aw, loadConfig as ax, resolveDeployConfig as ay, resolveMigrationsConfig as az, type FarmRouteRuntime as b, type FarmIntegrationConfigInput as b$, type FarmPluginSetupContext as b0, type FarmPluginStateContext as b1, type FarmPluginRuntimeBaseEvent as b2, type FarmPluginRuntimeContextEvent as b3, type FarmPluginRuntimeBeforeEvent as b4, type FarmPluginRuntimeAfterEvent as b5, type FarmPluginRuntimeErrorEvent as b6, type FarmPluginRuntimeStartEvent as b7, type FarmPluginRuntimeCloseEvent as b8, type FarmPluginRuntimeHooks as b9, type ImageConfig as bA, type I18nConfig as bB, type MiddlewareConfig as bC, type FarmDeployConfig as bD, type ResolvedFarmDeployConfig as bE, type FarmDeployTarget as bF, type FarmIntegrationCategory as bG, type FarmIntegrationSlot as bH, type FarmIntegrationRouteParamValue as bI, type FarmIntegrationRouteParams as bJ, type FarmIntegrationRouteMethod as bK, type FarmIntegrationRouteInputSource as bL, type FarmIntegrationValidationPathSegment as bM, type FarmIntegrationRouteInput as bN, type FarmIntegrationValidationIssue as bO, type FarmIntegrationValidationErrorLike as bP, type FarmIntegrationValidationResult as bQ, type FarmIntegrationStandardValidationResult as bR, type FarmIntegrationInputSchema as bS, type FarmIntegrationRouteInputSchemas as bT, type FarmIntegrationRequestContextStore as bU, FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY as bV, type FarmIntegrationRouteDb as bW, type FarmIntegrationRouteStorageArgs as bX, type FarmIntegrationRouteArgs as bY, type FarmIntegrationConfigContext as bZ, type FarmIntegrationConfigDefinition as b_, type FarmPluginRuntimeRequestOptions as ba, type FarmPluginRuntimeRequestHandler as bb, type FarmPluginRuntimeSession as bc, type FarmPluginDiscoveredRoute as bd, type FarmPluginRouterHooks as be, type FarmPluginRenderHooks as bf, type FarmPluginBuildHooks as bg, type FarmPluginDevHooks as bh, type FarmPluginClientConfig as bi, type RouteDiscoveredPayload as bj, type RoutesGeneratedPayload as bk, type MiddlewareDiscoveredPayload as bl, type APIRouteDiscoveredPayload as bm, type RouteMatchPayload as bn, type RouteMatchResultPayload as bo, type RenderLifecyclePayload as bp, type APIHandlerLifecyclePayload as bq, type ErrorLifecyclePayload as br, type HMRUpdatePayload as bs, type BundleLifecyclePayload as bt, type NitroBuildLifecyclePayload as bu, type ShutdownPayload as bv, type ResolvedFarmConfig as bw, type RedirectConfig as bx, type HeaderConfig as by, type RewriteConfig as bz, type FarmRouteRegions as c, type CreateIntegrationOrmOptions as c$, type FarmIntegrationLifecycleLogLevel as c0, type FarmIntegrationLifecycleLogger as c1, type FarmIntegrationLifecycleContext as c2, type FarmIntegrationLifecycleHook as c3, type FarmIntegrationData as c4, type FarmIntegrationHandlerContext as c5, type FarmIntegrationRouteHookContext as c6, type FarmIntegrationRouteHook as c7, type FarmIntegrationRoute as c8, type FarmTypedIntegrationRoute as c9, type FarmIntegrationEndpointValue as cA, type FarmIntegrationEndpoints as cB, type FarmIntegrationEndpointsFactoryContext as cC, type FarmIntegrationEndpointsFactory as cD, createIntegrationRoute as cE, integrationRoute as cF, type DefinedIntegration as cG, defineIntegration as cH, isFarmIntegration as cI, resolveIntegrationPlugins as cJ, getIntegrationProviders as cK, isFarmIntegrationProviderComponentReference as cL, getIntegrationDocumentNavigationMatchers as cM, getIntegrationSchemas as cN, getRegisteredIntegrationRuntime as cO, getRegisteredIntegrations as cP, getRegisteredIntegrationSchemas as cQ, matchIntegrationRoute as cR, matchRegisteredIntegrationRoute as cS, getRegisteredIntegrationAPIManifest as cT, dispatchIntegrationRequest as cU, type FarmIntegrationOrmSchema as cV, type FarmIntegrationOrmClient as cW, type InferFarmIntegrationOrmField as cX, type InferFarmIntegrationOrmFields as cY, type InferFarmIntegrationOrmSchema as cZ, type InferFarmIntegrationOrmClient as c_, type FarmIntegrationRouteMiddleware as ca, type FarmIntegrationMiddleware as cb, type FarmIntegrationProviderProps as cc, type FarmIntegrationProviderComponentReference as cd, type FarmIntegrationProvider as ce, type FarmIntegrationDocumentNavigation as cf, type FarmIntegrationSchemaFieldType as cg, type FarmIntegrationSchemaReference as ch, type FarmIntegrationSchemaField as ci, type FarmIntegrationSchemaConstraint as cj, type FarmIntegrationSchemaModel as ck, type FarmIntegrationSchemaModelExtension as cl, type FarmIntegrationSchemaModelOverride as cm, type FarmIntegrationSchema as cn, defineIntegrationSchema as co, type FarmIntegrationLogPhase as cp, type FarmIntegrationLogEvent as cq, type FarmIntegrationLogger as cr, type FarmIntegrationPluginOwner as cs, type FarmIntegrationContributedPlugin as ct, type FarmIntegrationsUserConfig as cu, getFarmIntegrationPluginServerRuntime as cv, getFarmIntegrationPluginOwner as cw, type FarmIntegrationRouteFactory as cx, type FarmIntegrationRoutesFactoryContext as cy, type FarmIntegrationRoutesFactory as cz, type FarmRouteMaxDuration as d, rewriteEarlySsrRelativeImports as d$, createIntegrationOrm as d0, resolveIntegrationOrmRuntimeClient as d1, farmIntegrationSchemaToOrmSchema as d2, type IntegrationOrmModelNames as d3, DEFAULT_FARM_API_BASE_PATH as d4, type FarmAPIConfigResolverContext as d5, type FarmAPIConfigValue as d6, type FarmAPIConfig as d7, resolveFarmAPIConfig as d8, normalizeFarmAPIConfig as d9, routeRulesToHeaders as dA, routeRulesToNitroRouteRules as dB, type FarmRouteRuntimeEntryKind as dC, type FarmRouteRenderingMode as dD, type FarmRouteRuntimeManifestEntry as dE, type FarmRouteRuntimeManifest as dF, normalizeFarmRouteRuntimeConfig as dG, mergeFarmRouteRuntimeConfigs as dH, resolveFarmRouteRuntimeConfig as dI, hasFarmRouteRuntimeControls as dJ, getFarmRouteRuntimeConfig as dK, createFarmRouteRuntimeKey as dL, resolveFarmRouteRuleRuntimeConfig as dM, farmRouteRuleMatches as dN, DEFAULT_FARM_DEVTOOLS_SHORTCUT as dO, FARM_DEVTOOLS_PATH as dP, FARM_DEVTOOLS_LAUNCH_PARAM as dQ, type FarmDevtoolsConfig as dR, type FarmDevtoolsUserConfig as dS, resolveFarmDevtoolsConfig as dT, type FarmBuildActivityPosition as dU, type FarmDevIndicatorsConfig as dV, resolveFarmDevIndicatorsConfig as dW, generateFarmDevIndicatorsClientRuntime as dX, type MiddlewareConfig$1 as dY, farmI18nClientBridgePlugin as dZ, withFarmRequestTracing as d_, normalizeFarmAPIBasePath as da, getFarmAPIBaseURL as db, resolveFarmAPIRequestURL as dc, type MiddlewareContext as dd, type MiddlewareFunction as de, type RequestMiddleware as df, type RequestMiddlewareContext as dg, type MiddlewareStore as dh, type MiddlewareChain as di, type CookieJar as dj, type CookieOptions as dk, type RateLimitConfig as dl, type RateLimitIncrementResult as dm, type RateLimitStorage as dn, type RateLimitStatus as dp, type MemoryRateLimitStorageOptions as dq, type NextFunction as dr, type MiddlewareResult as ds, type FarmRouteRuleRenderMode as dt, type FarmRouteRuleRedirect as du, type FarmRouteRuleCors as dv, type FarmRouteRule as dw, type FarmRouteRules as dx, normalizeRouteRules as dy, routeRulesToRedirects as dz, type FarmAppContext as e, transformIsolatedClientBoundaryModule as e0, generateClientCachePersistenceCode as e1, resolveFarmClientCacheAdapterEntry as e2, type ClientCachePersistenceEntryCode as e3, FARM_NODE_RESPONSE_END_PENDING as e4, type PageProps as f, type PluginContextProps as g, type RouteModule as h, type FarmMdxComponents as i, type FarmMdxResolvedConfig as j, type FarmMdxComponent as k, type FarmMdxUserConfig as l, type FarmUserConfig as m, type FarmContextFactory as n, type MiddlewareProps as o, type FarmIntegration as p, type FarmConfig as q, resolveMdxConfig as r, farmPlugin as s, defineConfig as t, type FarmComponentType as u, type PageRouteParams as v, type FarmMigrationCommand as w, type FarmMigrationsConfig as x, type FarmMigrationsUserConfig as y, type ResolvedFarmMigrationsConfig as z };
2360
+ export { type BuildOptions as $, type AppRoutePattern as A, type BundleResultPayload as B, type FarmContextFactoryInput as C, type FarmIsolatedClientHydrationMode as D, type LoadingProps as E, type FarmRouteRuntimeConfig as F, type ErrorProps as G, type PagePropsWithMiddleware as H, type MetadataProps as I, type LayoutMetadataProps as J, type Page as K, type LayoutProps as L, type Metadata as M, type NitroPreset as N, type Layout as O, type ParsedRoute as P, type Loading as Q, type RouteSegment as R, type ErrorBoundary as S, type StaticPathPrimitive as T, type StaticPathParams as U, type StaticRouteParams as V, type GenerateStaticParams as W, type LayoutModule as X, type FarmRequest as Y, type FarmResponse as Z, type ServerAction as _, type FarmPlugin as a, type FarmRequestStore as a$, type SSGPage as a0, type SSGCollectionResult as a1, type FarmLayerEntry as a2, type ResolvedFarmLayer as a3, type FarmSourceRoot as a4, type ResolveFarmLayersOptions as a5, type FarmLayerResolution as a6, resolveFarmLayers as a7, getFarmSourceRoots as a8, getFarmAppDirectories as a9, resolveDeployConfig as aA, resolveMigrationsConfig as aB, resolveDeployOutputPath as aC, normalizeDeployTarget as aD, getDeployTargetForPreset as aE, getPresetForDeployTarget as aF, type FarmLayerConfig as aG, type FarmPerformanceConfig as aH, type FarmPreloadMode as aI, type FarmPreloadUserConfig as aJ, type ResolvedFarmPreloadConfig as aK, type FarmCspConfig as aL, type FarmCspDirectives as aM, type FarmCspDirectiveValue as aN, type FarmCspOptions as aO, type FarmSecurityConfig as aP, type ResolvedFarmCspConfig as aQ, type FarmAuthConfig as aR, type FarmAuthDatabaseConfig as aS, type FarmAuthEmailAndPasswordConfig as aT, type FarmAuthSessionConfig as aU, type FarmAuthUserConfig as aV, type PluginRequestContext as aW, type FarmPluginContext as aX, type FarmPluginIntegrationContext as aY, type FarmPluginLifecycle as aZ, type FarmRequestPluginContext as a_, getFarmLayerAliases as aa, createFarmConfigResolutionPlugin as ab, loadFarmConfigFile as ac, type ReadonlyMiddlewareStore as ad, type FarmMiddlewareConfig as ae, type MiddlewareModule as af, type FarmAgentJsonLd as ag, type ResolvedFarmRouteRuntimeConfig as ah, type ResolvedFarmAPIConfig as ai, type ResolvedFarmDevtoolsConfig as aj, type ResolvedFarmDevIndicatorsConfig as ak, type ResolvedFarmAuthConfig as al, type ResolvedFarmPerformanceConfig as am, type ResolvedFarmSecurityConfig as an, type APIRequestRuntime as ao, manageFarmDocumentPreloads as ap, manageFarmHtmlPreloads as aq, manageFarmLinkHeaderPreloads as ar, reportFarmPreloadWarnings as as, type OpenAPIConfig as at, type FarmAgentUserConfig as au, definePlugin as av, FarmRuntimeShutdownError as aw, PluginManager as ax, resolveConfig as ay, loadConfig as az, type FarmRouteRuntime as b, type FarmIntegrationConfigContext as b$, type FarmPluginRuntimeKind as b0, type FarmPluginRouteRuntimePayload as b1, type FarmPluginSetupContext as b2, type FarmPluginStateContext as b3, type FarmPluginRuntimeBaseEvent as b4, type FarmPluginRuntimeContextEvent as b5, type FarmPluginRuntimeBeforeEvent as b6, type FarmPluginRuntimeAfterEvent as b7, type FarmPluginRuntimeErrorEvent as b8, type FarmPluginRuntimeStartEvent as b9, type HeaderConfig as bA, type RewriteConfig as bB, type ImageConfig as bC, type I18nConfig as bD, type MiddlewareConfig as bE, type FarmDeployConfig as bF, type ResolvedFarmDeployConfig as bG, type FarmDeployTarget as bH, type FarmIntegrationCategory as bI, type FarmIntegrationSlot as bJ, type FarmIntegrationRouteParamValue as bK, type FarmIntegrationRouteParams as bL, type FarmIntegrationRouteMethod as bM, type FarmIntegrationRouteInputSource as bN, type FarmIntegrationValidationPathSegment as bO, type FarmIntegrationRouteInput as bP, type FarmIntegrationValidationIssue as bQ, type FarmIntegrationValidationErrorLike as bR, type FarmIntegrationValidationResult as bS, type FarmIntegrationStandardValidationResult as bT, type FarmIntegrationInputSchema as bU, type FarmIntegrationRouteInputSchemas as bV, type FarmIntegrationRequestContextStore as bW, FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY as bX, type FarmIntegrationRouteDb as bY, type FarmIntegrationRouteStorageArgs as bZ, type FarmIntegrationRouteArgs as b_, type FarmPluginRuntimeCloseEvent as ba, type FarmPluginRuntimeHooks as bb, type FarmPluginRuntimeRequestOptions as bc, type FarmPluginRuntimeRequestHandler as bd, type FarmPluginRuntimeSession as be, type FarmPluginDiscoveredRoute as bf, type FarmPluginRouterHooks as bg, type FarmPluginRenderHooks as bh, type FarmPluginBuildHooks as bi, type FarmPluginDevHooks as bj, type FarmPluginClientConfig as bk, type RouteDiscoveredPayload as bl, type RoutesGeneratedPayload as bm, type MiddlewareDiscoveredPayload as bn, type APIRouteDiscoveredPayload as bo, type RouteMatchPayload as bp, type RouteMatchResultPayload as bq, type RenderLifecyclePayload as br, type APIHandlerLifecyclePayload as bs, type ErrorLifecyclePayload as bt, type HMRUpdatePayload as bu, type BundleLifecyclePayload as bv, type NitroBuildLifecyclePayload as bw, type ShutdownPayload as bx, type ResolvedFarmConfig as by, type RedirectConfig as bz, type FarmRouteRegions as c, type IntegrationOriginRejection as c$, type FarmIntegrationConfigDefinition as c0, type FarmIntegrationConfigInput as c1, type FarmIntegrationLifecycleLogLevel as c2, type FarmIntegrationLifecycleLogger as c3, type FarmIntegrationLifecycleContext as c4, type FarmIntegrationLifecycleHook as c5, type FarmIntegrationData as c6, type FarmIntegrationHandlerContext as c7, type FarmIntegrationRouteHookContext as c8, type FarmIntegrationRouteHook as c9, type FarmIntegrationRoutesFactoryContext as cA, type FarmIntegrationRoutesFactory as cB, type FarmIntegrationEndpointValue as cC, type FarmIntegrationEndpoints as cD, type FarmIntegrationEndpointsFactoryContext as cE, type FarmIntegrationEndpointsFactory as cF, createIntegrationRoute as cG, integrationRoute as cH, type DefinedIntegration as cI, defineIntegration as cJ, isFarmIntegration as cK, resolveIntegrationPlugins as cL, getIntegrationProviders as cM, isFarmIntegrationProviderComponentReference as cN, getIntegrationDocumentNavigationMatchers as cO, getIntegrationSchemas as cP, getRegisteredIntegrationRuntime as cQ, getRegisteredIntegrations as cR, getRegisteredIntegrationSchemas as cS, matchIntegrationRoute as cT, matchRegisteredIntegrationRoute as cU, getRegisteredIntegrationAPIManifest as cV, dispatchIntegrationRequest as cW, describeIntegrationOriginRejection as cX, resolveIntegrationAllowedOrigins as cY, validateIntegrationRequestOrigin as cZ, type IntegrationOriginPolicy as c_, type FarmIntegrationRoute as ca, type FarmTypedIntegrationRoute as cb, type FarmIntegrationRouteMiddleware as cc, type FarmIntegrationMiddleware as cd, type FarmIntegrationProviderProps as ce, type FarmIntegrationProviderComponentReference as cf, type FarmIntegrationProvider as cg, type FarmIntegrationDocumentNavigation as ch, type FarmIntegrationSchemaFieldType as ci, type FarmIntegrationSchemaReference as cj, type FarmIntegrationSchemaField as ck, type FarmIntegrationSchemaConstraint as cl, type FarmIntegrationSchemaModel as cm, type FarmIntegrationSchemaModelExtension as cn, type FarmIntegrationSchemaModelOverride as co, type FarmIntegrationSchema as cp, defineIntegrationSchema as cq, type FarmIntegrationLogPhase as cr, type FarmIntegrationLogEvent as cs, type FarmIntegrationLogger as ct, type FarmIntegrationPluginOwner as cu, type FarmIntegrationContributedPlugin as cv, type FarmIntegrationsUserConfig as cw, getFarmIntegrationPluginServerRuntime as cx, getFarmIntegrationPluginOwner as cy, type FarmIntegrationRouteFactory as cz, type FarmRouteMaxDuration as d, resolveFarmDevtoolsConfig as d$, type IntegrationOriginResult as d0, type FarmIntegrationOrmSchema as d1, type FarmIntegrationOrmClient as d2, type InferFarmIntegrationOrmField as d3, type InferFarmIntegrationOrmFields as d4, type InferFarmIntegrationOrmSchema as d5, type InferFarmIntegrationOrmClient as d6, type CreateIntegrationOrmOptions as d7, createIntegrationOrm as d8, resolveIntegrationOrmRuntimeClient as d9, type MiddlewareResult as dA, type FarmRouteRuleRenderMode as dB, type FarmRouteRuleRedirect as dC, type FarmRouteRuleCors as dD, type FarmRouteRule as dE, type FarmRouteRules as dF, normalizeRouteRules as dG, routeRulesToRedirects as dH, routeRulesToHeaders as dI, routeRulesToNitroRouteRules as dJ, type FarmRouteRuntimeEntryKind as dK, type FarmRouteRenderingMode as dL, type FarmRouteRuntimeManifestEntry as dM, type FarmRouteRuntimeManifest as dN, normalizeFarmRouteRuntimeConfig as dO, mergeFarmRouteRuntimeConfigs as dP, resolveFarmRouteRuntimeConfig as dQ, hasFarmRouteRuntimeControls as dR, getFarmRouteRuntimeConfig as dS, createFarmRouteRuntimeKey as dT, resolveFarmRouteRuleRuntimeConfig as dU, farmRouteRuleMatches as dV, DEFAULT_FARM_DEVTOOLS_SHORTCUT as dW, FARM_DEVTOOLS_PATH as dX, FARM_DEVTOOLS_LAUNCH_PARAM as dY, type FarmDevtoolsConfig as dZ, type FarmDevtoolsUserConfig as d_, farmIntegrationSchemaToOrmSchema as da, type IntegrationOrmModelNames as db, DEFAULT_FARM_API_BASE_PATH as dc, type FarmAPIConfigResolverContext as dd, type FarmAPIConfigValue as de, type FarmAPIConfig as df, resolveFarmAPIConfig as dg, normalizeFarmAPIConfig as dh, normalizeFarmAPIBasePath as di, getFarmAPIBaseURL as dj, resolveFarmAPIRequestURL as dk, type MiddlewareContext as dl, type MiddlewareFunction as dm, type RequestMiddleware as dn, type RequestMiddlewareContext as dp, type MiddlewareStore as dq, type MiddlewareChain as dr, type CookieJar as ds, type CookieOptions as dt, type RateLimitConfig as du, type RateLimitIncrementResult as dv, type RateLimitStorage as dw, type RateLimitStatus as dx, type MemoryRateLimitStorageOptions as dy, type NextFunction as dz, type FarmAppContext as e, type FarmBuildActivityPosition as e0, type FarmDevIndicatorsConfig as e1, resolveFarmDevIndicatorsConfig as e2, generateFarmDevIndicatorsClientRuntime as e3, type MiddlewareConfig$1 as e4, farmI18nClientBridgePlugin as e5, withFarmRequestTracing as e6, rewriteEarlySsrRelativeImports as e7, transformIsolatedClientBoundaryModule as e8, generateClientCachePersistenceCode as e9, resolveFarmClientCacheAdapterEntry as ea, type ClientCachePersistenceEntryCode as eb, FARM_NODE_RESPONSE_END_PENDING as ec, type PageProps as f, type PluginContextProps as g, type RouteModule as h, type FarmMdxComponents as i, type FarmMdxResolvedConfig as j, type FarmMdxComponent as k, type FarmMdxUserConfig as l, type FarmUserConfig as m, type FarmContextFactory as n, type MiddlewareProps as o, type FarmIntegration as p, type FarmConfig as q, resolveMdxConfig as r, farmPlugin as s, defineConfig as t, type FarmComponentType as u, type PageRouteParams as v, type FarmMigrationCommand as w, type FarmMigrationsConfig as x, type FarmMigrationsUserConfig as y, type ResolvedFarmMigrationsConfig as z };
@@ -11,7 +11,7 @@ import { FarmMarkdownUserConfig, FarmMarkdownResolvedConfig } from './markdown.j
11
11
  import { FarmObservabilityUserConfig } from './observability.js';
12
12
  import * as vite from 'vite';
13
13
  import { ViteDevServer, UserConfig, Plugin, Connect } from 'vite';
14
- import { j as FarmWorkflowsUserConfig, a as FarmServerConfig, F as FarmWorkflowsResolvedConfig, R as ResolvedFarmServerConfig } from './workflows-ChyK_oTu.js';
14
+ import { j as FarmWorkflowsUserConfig, a as FarmServerConfig, F as FarmWorkflowsResolvedConfig, R as ResolvedFarmServerConfig } from './workflows-BantWytQ.js';
15
15
  import { FarmCronUserConfig, FarmCronResolvedConfig } from './cron.js';
16
16
  import { ResolvedFarmEnv, FarmEnvConfig } from './env.js';
17
17
  import { b as FarmRedirectStatus } from './navigation-errors-Dvwpzaer.js';
@@ -25,6 +25,84 @@ import { FarmLayoutFonts } from './font.js';
25
25
  import { _withAfterNodeMiddleware } from './after.js';
26
26
  import { F as FarmIslandStrategy } from './island-CfGru1MO.js';
27
27
 
28
+ /**
29
+ * Agent-readiness configuration: opt-in primitives that make a Farm site easier
30
+ * for AI agents and crawlers to discover, resolve, and use. Off by default so
31
+ * sites that do not want agent exposure (internal tools, private dashboards) are
32
+ * unaffected.
33
+ */
34
+ /** schema.org JSON-LD emitted in the document head to identify the site. */
35
+ interface FarmAgentJsonLd {
36
+ /**
37
+ * schema.org `@type`. Common values: `"Organization"` for a company or
38
+ * project, `"SoftwareApplication"` for a product, `"WebSite"`, `"Person"`.
39
+ *
40
+ * @default "Organization"
41
+ */
42
+ type?: string;
43
+ /** Entity name. Defaults to the site's Open Graph site name or page title. */
44
+ name?: string;
45
+ /** Canonical URL for the entity. Defaults to the configured `metadataBase`. */
46
+ url?: string;
47
+ /** Short description. Defaults to the page/site metadata description. */
48
+ description?: string;
49
+ /** Logo URL. */
50
+ logo?: string;
51
+ /** URLs that also represent this entity (social profiles, repos) — schema.org `sameAs`. */
52
+ sameAs?: string[];
53
+ /** Additional schema.org properties merged into the emitted object. */
54
+ properties?: Record<string, unknown>;
55
+ }
56
+ interface FarmAgentUserConfig {
57
+ /**
58
+ * Emit schema.org JSON-LD in the document head so agents and crawlers can
59
+ * resolve the site's identity. `true` emits an `Organization` built from the
60
+ * site's metadata; an object customizes the type and fields.
61
+ *
62
+ * @default false
63
+ */
64
+ jsonLd?: boolean | FarmAgentJsonLd;
65
+ }
66
+ interface ResolvedFarmAgentConfig {
67
+ jsonLd: FarmAgentJsonLd | false;
68
+ }
69
+
70
+ /**
71
+ * Integration auth routes accept ordinary form posts, which browsers send
72
+ * cross-site without a CORS preflight. Without an origin check, a third-party
73
+ * page can submit credentials to an app's own sign-in route and plant an
74
+ * attacker-controlled session in the victim's browser (login CSRF), or drive a
75
+ * forced sign-out. This mirrors the server-action origin contract so both
76
+ * entry points reject the same requests.
77
+ */
78
+ type IntegrationOriginRejection = "missing-origin" | "opaque-origin" | "invalid-origin" | "cross-site";
79
+ type IntegrationOriginResult = {
80
+ ok: true;
81
+ } | {
82
+ ok: false;
83
+ reason: IntegrationOriginRejection;
84
+ };
85
+ interface IntegrationOriginPolicy {
86
+ /** Extra trusted origins, using the `serverActions.allowedOrigins` pattern syntax. */
87
+ allowedOrigins?: readonly string[];
88
+ /**
89
+ * Whether a request carrying no origin metadata at all must be rejected.
90
+ *
91
+ * Form posts always carry an Origin header in supported browsers, so
92
+ * state-changing POSTs default to rejecting (`true`). Top-level GET
93
+ * navigations legitimately arrive with no Origin and no Referer — a typed
94
+ * URL or a bookmark — so GET callers pass `false` to avoid breaking them.
95
+ */
96
+ requireOriginMetadata?: boolean;
97
+ }
98
+ /**
99
+ * Resolve configured origin patterns once, at integration construction, so an
100
+ * invalid pattern fails loudly at startup instead of per request.
101
+ */
102
+ declare function resolveIntegrationAllowedOrigins(values: readonly string[] | undefined, label: string): readonly string[];
103
+ declare function validateIntegrationRequestOrigin(request: Request, policy?: IntegrationOriginPolicy): IntegrationOriginResult;
104
+ declare function describeIntegrationOriginRejection(reason: IntegrationOriginRejection): string;
105
+
28
106
  type RuntimeClientFactory<TClient> = () => TClient | Promise<TClient>;
29
107
  type FarmIntegrationOrmSchema = SchemaDefinition<Record<string, AnyModelDefinition>>;
30
108
  type FarmIntegrationOrmClient<TSchema extends FarmIntegrationOrmSchema> = OrmClient<TSchema>;
@@ -660,6 +738,13 @@ type I18nConfig = FarmI18nUserConfig;
660
738
  interface OpenAPIConfig {
661
739
  enabled?: boolean;
662
740
  route?: string;
741
+ /**
742
+ * Path where the raw OpenAPI spec is served as JSON, so agents and API tools
743
+ * can fetch it at a predictable URL. Set to `false` to disable.
744
+ *
745
+ * @default "/openapi.json"
746
+ */
747
+ specRoute?: string | false;
663
748
  title?: string;
664
749
  description?: string;
665
750
  version?: string;
@@ -768,7 +853,8 @@ interface FarmUserConfig extends Omit<FarmConfig, "vite" | "docs" | "env" | "lay
768
853
  vite?: UserConfig | ((config: UserConfig) => UserConfig);
769
854
  [key: string]: any;
770
855
  }
771
- interface ResolvedFarmConfig extends Required<Omit<FarmUserConfig, "extends" | "plugins" | "vite" | "deploy" | "docs" | "md" | "mdx" | "migrations" | "cron" | "workflows" | "api" | "env" | "server" | "serverActions" | "devtools" | "devIndicators" | "images" | "i18n" | "auth" | "performance" | "security" | "theme" | "renderer">> {
856
+ interface ResolvedFarmConfig extends Required<Omit<FarmUserConfig, "extends" | "plugins" | "vite" | "deploy" | "docs" | "md" | "mdx" | "migrations" | "cron" | "workflows" | "api" | "env" | "server" | "serverActions" | "devtools" | "devIndicators" | "images" | "i18n" | "auth" | "performance" | "security" | "theme" | "renderer" | "agent">> {
857
+ agent: ResolvedFarmAgentConfig;
772
858
  /** @internal Tracks whether `context` came from user/layer config instead of the default noop. */
773
859
  [FARM_RESOLVED_CUSTOM_CONTEXT]?: boolean;
774
860
  root: string;
@@ -1802,6 +1888,8 @@ interface FarmConfig {
1802
1888
  serverActions?: FarmServerActionsConfig;
1803
1889
  /** App-wide HTTP security policy. */
1804
1890
  security?: FarmSecurityConfig | ResolvedFarmSecurityConfig;
1891
+ /** Opt-in agent-readiness primitives (JSON-LD and related). Off by default. */
1892
+ agent?: FarmAgentUserConfig;
1805
1893
  images?: FarmImageConfig;
1806
1894
  /** Browser resource scheduling and preload budgets. */
1807
1895
  performance?: FarmPerformanceConfig;
@@ -2269,4 +2357,4 @@ interface SSGCollectionResult {
2269
2357
  ssr: string[];
2270
2358
  }
2271
2359
 
2272
- export { type BuildOptions as $, type AppRoutePattern as A, type BundleResultPayload as B, type FarmContextFactoryInput as C, type FarmIsolatedClientHydrationMode as D, type LoadingProps as E, type FarmRouteRuntimeConfig as F, type ErrorProps as G, type PagePropsWithMiddleware as H, type MetadataProps as I, type LayoutMetadataProps as J, type Page as K, type LayoutProps as L, type Metadata as M, type NitroPreset as N, type Layout as O, type ParsedRoute as P, type Loading as Q, type RouteSegment as R, type ErrorBoundary as S, type StaticPathPrimitive as T, type StaticPathParams as U, type StaticRouteParams as V, type GenerateStaticParams as W, type LayoutModule as X, type FarmRequest as Y, type FarmResponse as Z, type ServerAction as _, type FarmPlugin as a, type FarmPluginRouteRuntimePayload as a$, type SSGPage as a0, type SSGCollectionResult as a1, type FarmLayerEntry as a2, type ResolvedFarmLayer as a3, type FarmSourceRoot as a4, type ResolveFarmLayersOptions as a5, type FarmLayerResolution as a6, resolveFarmLayers as a7, getFarmSourceRoots as a8, getFarmAppDirectories as a9, resolveDeployOutputPath as aA, normalizeDeployTarget as aB, getDeployTargetForPreset as aC, getPresetForDeployTarget as aD, type FarmLayerConfig as aE, type FarmPerformanceConfig as aF, type FarmPreloadMode as aG, type FarmPreloadUserConfig as aH, type ResolvedFarmPreloadConfig as aI, type FarmCspConfig as aJ, type FarmCspDirectives as aK, type FarmCspDirectiveValue as aL, type FarmCspOptions as aM, type FarmSecurityConfig as aN, type ResolvedFarmCspConfig as aO, type FarmAuthConfig as aP, type FarmAuthDatabaseConfig as aQ, type FarmAuthEmailAndPasswordConfig as aR, type FarmAuthSessionConfig as aS, type FarmAuthUserConfig as aT, type PluginRequestContext as aU, type FarmPluginContext as aV, type FarmPluginIntegrationContext as aW, type FarmPluginLifecycle as aX, type FarmRequestPluginContext as aY, type FarmRequestStore as aZ, type FarmPluginRuntimeKind as a_, getFarmLayerAliases as aa, createFarmConfigResolutionPlugin as ab, loadFarmConfigFile as ac, type ReadonlyMiddlewareStore as ad, type FarmMiddlewareConfig as ae, type MiddlewareModule as af, type ResolvedFarmRouteRuntimeConfig as ag, type ResolvedFarmAPIConfig as ah, type ResolvedFarmDevtoolsConfig as ai, type ResolvedFarmDevIndicatorsConfig as aj, type ResolvedFarmAuthConfig as ak, type ResolvedFarmPerformanceConfig as al, type ResolvedFarmSecurityConfig as am, type APIRequestRuntime as an, manageFarmDocumentPreloads as ao, manageFarmHtmlPreloads as ap, manageFarmLinkHeaderPreloads as aq, reportFarmPreloadWarnings as ar, type OpenAPIConfig as as, definePlugin as at, FarmRuntimeShutdownError as au, PluginManager as av, resolveConfig as aw, loadConfig as ax, resolveDeployConfig as ay, resolveMigrationsConfig as az, type FarmRouteRuntime as b, type FarmIntegrationConfigInput as b$, type FarmPluginSetupContext as b0, type FarmPluginStateContext as b1, type FarmPluginRuntimeBaseEvent as b2, type FarmPluginRuntimeContextEvent as b3, type FarmPluginRuntimeBeforeEvent as b4, type FarmPluginRuntimeAfterEvent as b5, type FarmPluginRuntimeErrorEvent as b6, type FarmPluginRuntimeStartEvent as b7, type FarmPluginRuntimeCloseEvent as b8, type FarmPluginRuntimeHooks as b9, type ImageConfig as bA, type I18nConfig as bB, type MiddlewareConfig as bC, type FarmDeployConfig as bD, type ResolvedFarmDeployConfig as bE, type FarmDeployTarget as bF, type FarmIntegrationCategory as bG, type FarmIntegrationSlot as bH, type FarmIntegrationRouteParamValue as bI, type FarmIntegrationRouteParams as bJ, type FarmIntegrationRouteMethod as bK, type FarmIntegrationRouteInputSource as bL, type FarmIntegrationValidationPathSegment as bM, type FarmIntegrationRouteInput as bN, type FarmIntegrationValidationIssue as bO, type FarmIntegrationValidationErrorLike as bP, type FarmIntegrationValidationResult as bQ, type FarmIntegrationStandardValidationResult as bR, type FarmIntegrationInputSchema as bS, type FarmIntegrationRouteInputSchemas as bT, type FarmIntegrationRequestContextStore as bU, FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY as bV, type FarmIntegrationRouteDb as bW, type FarmIntegrationRouteStorageArgs as bX, type FarmIntegrationRouteArgs as bY, type FarmIntegrationConfigContext as bZ, type FarmIntegrationConfigDefinition as b_, type FarmPluginRuntimeRequestOptions as ba, type FarmPluginRuntimeRequestHandler as bb, type FarmPluginRuntimeSession as bc, type FarmPluginDiscoveredRoute as bd, type FarmPluginRouterHooks as be, type FarmPluginRenderHooks as bf, type FarmPluginBuildHooks as bg, type FarmPluginDevHooks as bh, type FarmPluginClientConfig as bi, type RouteDiscoveredPayload as bj, type RoutesGeneratedPayload as bk, type MiddlewareDiscoveredPayload as bl, type APIRouteDiscoveredPayload as bm, type RouteMatchPayload as bn, type RouteMatchResultPayload as bo, type RenderLifecyclePayload as bp, type APIHandlerLifecyclePayload as bq, type ErrorLifecyclePayload as br, type HMRUpdatePayload as bs, type BundleLifecyclePayload as bt, type NitroBuildLifecyclePayload as bu, type ShutdownPayload as bv, type ResolvedFarmConfig as bw, type RedirectConfig as bx, type HeaderConfig as by, type RewriteConfig as bz, type FarmRouteRegions as c, type CreateIntegrationOrmOptions as c$, type FarmIntegrationLifecycleLogLevel as c0, type FarmIntegrationLifecycleLogger as c1, type FarmIntegrationLifecycleContext as c2, type FarmIntegrationLifecycleHook as c3, type FarmIntegrationData as c4, type FarmIntegrationHandlerContext as c5, type FarmIntegrationRouteHookContext as c6, type FarmIntegrationRouteHook as c7, type FarmIntegrationRoute as c8, type FarmTypedIntegrationRoute as c9, type FarmIntegrationEndpointValue as cA, type FarmIntegrationEndpoints as cB, type FarmIntegrationEndpointsFactoryContext as cC, type FarmIntegrationEndpointsFactory as cD, createIntegrationRoute as cE, integrationRoute as cF, type DefinedIntegration as cG, defineIntegration as cH, isFarmIntegration as cI, resolveIntegrationPlugins as cJ, getIntegrationProviders as cK, isFarmIntegrationProviderComponentReference as cL, getIntegrationDocumentNavigationMatchers as cM, getIntegrationSchemas as cN, getRegisteredIntegrationRuntime as cO, getRegisteredIntegrations as cP, getRegisteredIntegrationSchemas as cQ, matchIntegrationRoute as cR, matchRegisteredIntegrationRoute as cS, getRegisteredIntegrationAPIManifest as cT, dispatchIntegrationRequest as cU, type FarmIntegrationOrmSchema as cV, type FarmIntegrationOrmClient as cW, type InferFarmIntegrationOrmField as cX, type InferFarmIntegrationOrmFields as cY, type InferFarmIntegrationOrmSchema as cZ, type InferFarmIntegrationOrmClient as c_, type FarmIntegrationRouteMiddleware as ca, type FarmIntegrationMiddleware as cb, type FarmIntegrationProviderProps as cc, type FarmIntegrationProviderComponentReference as cd, type FarmIntegrationProvider as ce, type FarmIntegrationDocumentNavigation as cf, type FarmIntegrationSchemaFieldType as cg, type FarmIntegrationSchemaReference as ch, type FarmIntegrationSchemaField as ci, type FarmIntegrationSchemaConstraint as cj, type FarmIntegrationSchemaModel as ck, type FarmIntegrationSchemaModelExtension as cl, type FarmIntegrationSchemaModelOverride as cm, type FarmIntegrationSchema as cn, defineIntegrationSchema as co, type FarmIntegrationLogPhase as cp, type FarmIntegrationLogEvent as cq, type FarmIntegrationLogger as cr, type FarmIntegrationPluginOwner as cs, type FarmIntegrationContributedPlugin as ct, type FarmIntegrationsUserConfig as cu, getFarmIntegrationPluginServerRuntime as cv, getFarmIntegrationPluginOwner as cw, type FarmIntegrationRouteFactory as cx, type FarmIntegrationRoutesFactoryContext as cy, type FarmIntegrationRoutesFactory as cz, type FarmRouteMaxDuration as d, rewriteEarlySsrRelativeImports as d$, createIntegrationOrm as d0, resolveIntegrationOrmRuntimeClient as d1, farmIntegrationSchemaToOrmSchema as d2, type IntegrationOrmModelNames as d3, DEFAULT_FARM_API_BASE_PATH as d4, type FarmAPIConfigResolverContext as d5, type FarmAPIConfigValue as d6, type FarmAPIConfig as d7, resolveFarmAPIConfig as d8, normalizeFarmAPIConfig as d9, routeRulesToHeaders as dA, routeRulesToNitroRouteRules as dB, type FarmRouteRuntimeEntryKind as dC, type FarmRouteRenderingMode as dD, type FarmRouteRuntimeManifestEntry as dE, type FarmRouteRuntimeManifest as dF, normalizeFarmRouteRuntimeConfig as dG, mergeFarmRouteRuntimeConfigs as dH, resolveFarmRouteRuntimeConfig as dI, hasFarmRouteRuntimeControls as dJ, getFarmRouteRuntimeConfig as dK, createFarmRouteRuntimeKey as dL, resolveFarmRouteRuleRuntimeConfig as dM, farmRouteRuleMatches as dN, DEFAULT_FARM_DEVTOOLS_SHORTCUT as dO, FARM_DEVTOOLS_PATH as dP, FARM_DEVTOOLS_LAUNCH_PARAM as dQ, type FarmDevtoolsConfig as dR, type FarmDevtoolsUserConfig as dS, resolveFarmDevtoolsConfig as dT, type FarmBuildActivityPosition as dU, type FarmDevIndicatorsConfig as dV, resolveFarmDevIndicatorsConfig as dW, generateFarmDevIndicatorsClientRuntime as dX, type MiddlewareConfig$1 as dY, farmI18nClientBridgePlugin as dZ, withFarmRequestTracing as d_, normalizeFarmAPIBasePath as da, getFarmAPIBaseURL as db, resolveFarmAPIRequestURL as dc, type MiddlewareContext as dd, type MiddlewareFunction as de, type RequestMiddleware as df, type RequestMiddlewareContext as dg, type MiddlewareStore as dh, type MiddlewareChain as di, type CookieJar as dj, type CookieOptions as dk, type RateLimitConfig as dl, type RateLimitIncrementResult as dm, type RateLimitStorage as dn, type RateLimitStatus as dp, type MemoryRateLimitStorageOptions as dq, type NextFunction as dr, type MiddlewareResult as ds, type FarmRouteRuleRenderMode as dt, type FarmRouteRuleRedirect as du, type FarmRouteRuleCors as dv, type FarmRouteRule as dw, type FarmRouteRules as dx, normalizeRouteRules as dy, routeRulesToRedirects as dz, type FarmAppContext as e, transformIsolatedClientBoundaryModule as e0, generateClientCachePersistenceCode as e1, resolveFarmClientCacheAdapterEntry as e2, type ClientCachePersistenceEntryCode as e3, FARM_NODE_RESPONSE_END_PENDING as e4, type PageProps as f, type PluginContextProps as g, type RouteModule as h, type FarmMdxComponents as i, type FarmMdxResolvedConfig as j, type FarmMdxComponent as k, type FarmMdxUserConfig as l, type FarmUserConfig as m, type FarmContextFactory as n, type MiddlewareProps as o, type FarmIntegration as p, type FarmConfig as q, resolveMdxConfig as r, farmPlugin as s, defineConfig as t, type FarmComponentType as u, type PageRouteParams as v, type FarmMigrationCommand as w, type FarmMigrationsConfig as x, type FarmMigrationsUserConfig as y, type ResolvedFarmMigrationsConfig as z };
2360
+ export { type BuildOptions as $, type AppRoutePattern as A, type BundleResultPayload as B, type FarmContextFactoryInput as C, type FarmIsolatedClientHydrationMode as D, type LoadingProps as E, type FarmRouteRuntimeConfig as F, type ErrorProps as G, type PagePropsWithMiddleware as H, type MetadataProps as I, type LayoutMetadataProps as J, type Page as K, type LayoutProps as L, type Metadata as M, type NitroPreset as N, type Layout as O, type ParsedRoute as P, type Loading as Q, type RouteSegment as R, type ErrorBoundary as S, type StaticPathPrimitive as T, type StaticPathParams as U, type StaticRouteParams as V, type GenerateStaticParams as W, type LayoutModule as X, type FarmRequest as Y, type FarmResponse as Z, type ServerAction as _, type FarmPlugin as a, type FarmRequestStore as a$, type SSGPage as a0, type SSGCollectionResult as a1, type FarmLayerEntry as a2, type ResolvedFarmLayer as a3, type FarmSourceRoot as a4, type ResolveFarmLayersOptions as a5, type FarmLayerResolution as a6, resolveFarmLayers as a7, getFarmSourceRoots as a8, getFarmAppDirectories as a9, resolveDeployConfig as aA, resolveMigrationsConfig as aB, resolveDeployOutputPath as aC, normalizeDeployTarget as aD, getDeployTargetForPreset as aE, getPresetForDeployTarget as aF, type FarmLayerConfig as aG, type FarmPerformanceConfig as aH, type FarmPreloadMode as aI, type FarmPreloadUserConfig as aJ, type ResolvedFarmPreloadConfig as aK, type FarmCspConfig as aL, type FarmCspDirectives as aM, type FarmCspDirectiveValue as aN, type FarmCspOptions as aO, type FarmSecurityConfig as aP, type ResolvedFarmCspConfig as aQ, type FarmAuthConfig as aR, type FarmAuthDatabaseConfig as aS, type FarmAuthEmailAndPasswordConfig as aT, type FarmAuthSessionConfig as aU, type FarmAuthUserConfig as aV, type PluginRequestContext as aW, type FarmPluginContext as aX, type FarmPluginIntegrationContext as aY, type FarmPluginLifecycle as aZ, type FarmRequestPluginContext as a_, getFarmLayerAliases as aa, createFarmConfigResolutionPlugin as ab, loadFarmConfigFile as ac, type ReadonlyMiddlewareStore as ad, type FarmMiddlewareConfig as ae, type MiddlewareModule as af, type FarmAgentJsonLd as ag, type ResolvedFarmRouteRuntimeConfig as ah, type ResolvedFarmAPIConfig as ai, type ResolvedFarmDevtoolsConfig as aj, type ResolvedFarmDevIndicatorsConfig as ak, type ResolvedFarmAuthConfig as al, type ResolvedFarmPerformanceConfig as am, type ResolvedFarmSecurityConfig as an, type APIRequestRuntime as ao, manageFarmDocumentPreloads as ap, manageFarmHtmlPreloads as aq, manageFarmLinkHeaderPreloads as ar, reportFarmPreloadWarnings as as, type OpenAPIConfig as at, type FarmAgentUserConfig as au, definePlugin as av, FarmRuntimeShutdownError as aw, PluginManager as ax, resolveConfig as ay, loadConfig as az, type FarmRouteRuntime as b, type FarmIntegrationConfigContext as b$, type FarmPluginRuntimeKind as b0, type FarmPluginRouteRuntimePayload as b1, type FarmPluginSetupContext as b2, type FarmPluginStateContext as b3, type FarmPluginRuntimeBaseEvent as b4, type FarmPluginRuntimeContextEvent as b5, type FarmPluginRuntimeBeforeEvent as b6, type FarmPluginRuntimeAfterEvent as b7, type FarmPluginRuntimeErrorEvent as b8, type FarmPluginRuntimeStartEvent as b9, type HeaderConfig as bA, type RewriteConfig as bB, type ImageConfig as bC, type I18nConfig as bD, type MiddlewareConfig as bE, type FarmDeployConfig as bF, type ResolvedFarmDeployConfig as bG, type FarmDeployTarget as bH, type FarmIntegrationCategory as bI, type FarmIntegrationSlot as bJ, type FarmIntegrationRouteParamValue as bK, type FarmIntegrationRouteParams as bL, type FarmIntegrationRouteMethod as bM, type FarmIntegrationRouteInputSource as bN, type FarmIntegrationValidationPathSegment as bO, type FarmIntegrationRouteInput as bP, type FarmIntegrationValidationIssue as bQ, type FarmIntegrationValidationErrorLike as bR, type FarmIntegrationValidationResult as bS, type FarmIntegrationStandardValidationResult as bT, type FarmIntegrationInputSchema as bU, type FarmIntegrationRouteInputSchemas as bV, type FarmIntegrationRequestContextStore as bW, FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY as bX, type FarmIntegrationRouteDb as bY, type FarmIntegrationRouteStorageArgs as bZ, type FarmIntegrationRouteArgs as b_, type FarmPluginRuntimeCloseEvent as ba, type FarmPluginRuntimeHooks as bb, type FarmPluginRuntimeRequestOptions as bc, type FarmPluginRuntimeRequestHandler as bd, type FarmPluginRuntimeSession as be, type FarmPluginDiscoveredRoute as bf, type FarmPluginRouterHooks as bg, type FarmPluginRenderHooks as bh, type FarmPluginBuildHooks as bi, type FarmPluginDevHooks as bj, type FarmPluginClientConfig as bk, type RouteDiscoveredPayload as bl, type RoutesGeneratedPayload as bm, type MiddlewareDiscoveredPayload as bn, type APIRouteDiscoveredPayload as bo, type RouteMatchPayload as bp, type RouteMatchResultPayload as bq, type RenderLifecyclePayload as br, type APIHandlerLifecyclePayload as bs, type ErrorLifecyclePayload as bt, type HMRUpdatePayload as bu, type BundleLifecyclePayload as bv, type NitroBuildLifecyclePayload as bw, type ShutdownPayload as bx, type ResolvedFarmConfig as by, type RedirectConfig as bz, type FarmRouteRegions as c, type IntegrationOriginRejection as c$, type FarmIntegrationConfigDefinition as c0, type FarmIntegrationConfigInput as c1, type FarmIntegrationLifecycleLogLevel as c2, type FarmIntegrationLifecycleLogger as c3, type FarmIntegrationLifecycleContext as c4, type FarmIntegrationLifecycleHook as c5, type FarmIntegrationData as c6, type FarmIntegrationHandlerContext as c7, type FarmIntegrationRouteHookContext as c8, type FarmIntegrationRouteHook as c9, type FarmIntegrationRoutesFactoryContext as cA, type FarmIntegrationRoutesFactory as cB, type FarmIntegrationEndpointValue as cC, type FarmIntegrationEndpoints as cD, type FarmIntegrationEndpointsFactoryContext as cE, type FarmIntegrationEndpointsFactory as cF, createIntegrationRoute as cG, integrationRoute as cH, type DefinedIntegration as cI, defineIntegration as cJ, isFarmIntegration as cK, resolveIntegrationPlugins as cL, getIntegrationProviders as cM, isFarmIntegrationProviderComponentReference as cN, getIntegrationDocumentNavigationMatchers as cO, getIntegrationSchemas as cP, getRegisteredIntegrationRuntime as cQ, getRegisteredIntegrations as cR, getRegisteredIntegrationSchemas as cS, matchIntegrationRoute as cT, matchRegisteredIntegrationRoute as cU, getRegisteredIntegrationAPIManifest as cV, dispatchIntegrationRequest as cW, describeIntegrationOriginRejection as cX, resolveIntegrationAllowedOrigins as cY, validateIntegrationRequestOrigin as cZ, type IntegrationOriginPolicy as c_, type FarmIntegrationRoute as ca, type FarmTypedIntegrationRoute as cb, type FarmIntegrationRouteMiddleware as cc, type FarmIntegrationMiddleware as cd, type FarmIntegrationProviderProps as ce, type FarmIntegrationProviderComponentReference as cf, type FarmIntegrationProvider as cg, type FarmIntegrationDocumentNavigation as ch, type FarmIntegrationSchemaFieldType as ci, type FarmIntegrationSchemaReference as cj, type FarmIntegrationSchemaField as ck, type FarmIntegrationSchemaConstraint as cl, type FarmIntegrationSchemaModel as cm, type FarmIntegrationSchemaModelExtension as cn, type FarmIntegrationSchemaModelOverride as co, type FarmIntegrationSchema as cp, defineIntegrationSchema as cq, type FarmIntegrationLogPhase as cr, type FarmIntegrationLogEvent as cs, type FarmIntegrationLogger as ct, type FarmIntegrationPluginOwner as cu, type FarmIntegrationContributedPlugin as cv, type FarmIntegrationsUserConfig as cw, getFarmIntegrationPluginServerRuntime as cx, getFarmIntegrationPluginOwner as cy, type FarmIntegrationRouteFactory as cz, type FarmRouteMaxDuration as d, resolveFarmDevtoolsConfig as d$, type IntegrationOriginResult as d0, type FarmIntegrationOrmSchema as d1, type FarmIntegrationOrmClient as d2, type InferFarmIntegrationOrmField as d3, type InferFarmIntegrationOrmFields as d4, type InferFarmIntegrationOrmSchema as d5, type InferFarmIntegrationOrmClient as d6, type CreateIntegrationOrmOptions as d7, createIntegrationOrm as d8, resolveIntegrationOrmRuntimeClient as d9, type MiddlewareResult as dA, type FarmRouteRuleRenderMode as dB, type FarmRouteRuleRedirect as dC, type FarmRouteRuleCors as dD, type FarmRouteRule as dE, type FarmRouteRules as dF, normalizeRouteRules as dG, routeRulesToRedirects as dH, routeRulesToHeaders as dI, routeRulesToNitroRouteRules as dJ, type FarmRouteRuntimeEntryKind as dK, type FarmRouteRenderingMode as dL, type FarmRouteRuntimeManifestEntry as dM, type FarmRouteRuntimeManifest as dN, normalizeFarmRouteRuntimeConfig as dO, mergeFarmRouteRuntimeConfigs as dP, resolveFarmRouteRuntimeConfig as dQ, hasFarmRouteRuntimeControls as dR, getFarmRouteRuntimeConfig as dS, createFarmRouteRuntimeKey as dT, resolveFarmRouteRuleRuntimeConfig as dU, farmRouteRuleMatches as dV, DEFAULT_FARM_DEVTOOLS_SHORTCUT as dW, FARM_DEVTOOLS_PATH as dX, FARM_DEVTOOLS_LAUNCH_PARAM as dY, type FarmDevtoolsConfig as dZ, type FarmDevtoolsUserConfig as d_, farmIntegrationSchemaToOrmSchema as da, type IntegrationOrmModelNames as db, DEFAULT_FARM_API_BASE_PATH as dc, type FarmAPIConfigResolverContext as dd, type FarmAPIConfigValue as de, type FarmAPIConfig as df, resolveFarmAPIConfig as dg, normalizeFarmAPIConfig as dh, normalizeFarmAPIBasePath as di, getFarmAPIBaseURL as dj, resolveFarmAPIRequestURL as dk, type MiddlewareContext as dl, type MiddlewareFunction as dm, type RequestMiddleware as dn, type RequestMiddlewareContext as dp, type MiddlewareStore as dq, type MiddlewareChain as dr, type CookieJar as ds, type CookieOptions as dt, type RateLimitConfig as du, type RateLimitIncrementResult as dv, type RateLimitStorage as dw, type RateLimitStatus as dx, type MemoryRateLimitStorageOptions as dy, type NextFunction as dz, type FarmAppContext as e, type FarmBuildActivityPosition as e0, type FarmDevIndicatorsConfig as e1, resolveFarmDevIndicatorsConfig as e2, generateFarmDevIndicatorsClientRuntime as e3, type MiddlewareConfig$1 as e4, farmI18nClientBridgePlugin as e5, withFarmRequestTracing as e6, rewriteEarlySsrRelativeImports as e7, transformIsolatedClientBoundaryModule as e8, generateClientCachePersistenceCode as e9, resolveFarmClientCacheAdapterEntry as ea, type ClientCachePersistenceEntryCode as eb, FARM_NODE_RESPONSE_END_PENDING as ec, type PageProps as f, type PluginContextProps as g, type RouteModule as h, type FarmMdxComponents as i, type FarmMdxResolvedConfig as j, type FarmMdxComponent as k, type FarmMdxUserConfig as l, type FarmUserConfig as m, type FarmContextFactory as n, type MiddlewareProps as o, type FarmIntegration as p, type FarmConfig as q, resolveMdxConfig as r, farmPlugin as s, defineConfig as t, type FarmComponentType as u, type PageRouteParams as v, type FarmMigrationCommand as w, type FarmMigrationsConfig as x, type FarmMigrationsUserConfig as y, type ResolvedFarmMigrationsConfig as z };
@@ -465,7 +465,7 @@ body {
465
465
  `;
466
466
 
467
467
  // package.json
468
- var version = "0.1.0-beta.97";
468
+ var version = "0.1.0-beta.99";
469
469
 
470
470
  // src/version.ts
471
471
  var FARM_VERSION = version;