@farm.js/core 0.1.39 → 0.1.41

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 (374) hide show
  1. package/dist/{agent-mcp-HcTYQmNX.d.ts → agent-mcp-BOqIxJLI.d.mts} +8 -2
  2. package/dist/{agent-mcp-BhneNPb4.d.mts → agent-mcp-D0eZKfci.d.ts} +8 -2
  3. package/dist/{agent-mcp-handler-OLRMZONF.mjs → agent-mcp-handler-HVV5LNXF.mjs} +6 -6
  4. package/dist/{agent-mcp-handler-MRGP3WJ3.cjs → agent-mcp-handler-YKG7KVCY.cjs} +7 -7
  5. package/dist/agent-runtime.cjs +10 -6
  6. package/dist/agent-runtime.d.mts +6 -8
  7. package/dist/agent-runtime.d.ts +6 -8
  8. package/dist/agent-runtime.mjs +9 -5
  9. package/dist/api/client.cjs +3 -3
  10. package/dist/api/client.d.mts +3 -3
  11. package/dist/api/client.d.ts +3 -3
  12. package/dist/api/client.mjs +2 -2
  13. package/dist/api/route-manager.cjs +15 -13
  14. package/dist/api/route-manager.d.mts +8 -10
  15. package/dist/api/route-manager.d.ts +8 -10
  16. package/dist/api/route-manager.mjs +14 -12
  17. package/dist/api/runtime.cjs +12 -10
  18. package/dist/api/runtime.d.mts +7 -9
  19. package/dist/api/runtime.d.ts +7 -9
  20. package/dist/api/runtime.mjs +11 -9
  21. package/dist/{api-client-CyFtZFJ4.d.ts → api-client-BJv9mTbO.d.ts} +2 -2
  22. package/dist/{api-client-BjMmY8OD.d.mts → api-client-Dk9QOLwr.d.mts} +2 -2
  23. package/dist/api.cjs +17 -15
  24. package/dist/api.d.mts +10 -12
  25. package/dist/api.d.ts +10 -12
  26. package/dist/api.mjs +16 -14
  27. package/dist/{app-DVzmmbNO.d.mts → app-CzTSMJaf.d.mts} +12 -5
  28. package/dist/{app-CMkoghtp.d.ts → app-DM8e1z3G.d.ts} +12 -5
  29. package/dist/app-markdown.cjs +7 -6
  30. package/dist/app-markdown.d.mts +7 -9
  31. package/dist/app-markdown.d.ts +7 -9
  32. package/dist/app-markdown.mjs +6 -5
  33. package/dist/cache.cjs +6 -3
  34. package/dist/cache.d.mts +23 -2
  35. package/dist/cache.d.ts +23 -2
  36. package/dist/cache.mjs +5 -2
  37. package/dist/{chunk-EGCTIS5F.mjs → chunk-24SP5TGU.mjs} +1 -1
  38. package/dist/{chunk-2ZYGC6SS.cjs → chunk-25LPIZSX.cjs} +3 -3
  39. package/dist/{chunk-ARC7I3O2.mjs → chunk-26RUNDIR.mjs} +1 -1
  40. package/dist/{chunk-472NCAZ7.cjs → chunk-2FUIT2G2.cjs} +3 -3
  41. package/dist/{chunk-YFYUYWL7.cjs → chunk-32TZ3QTP.cjs} +723 -454
  42. package/dist/{chunk-CQMVIOYP.mjs → chunk-35WS7P2V.mjs} +29 -131
  43. package/dist/{chunk-QTXBII4Z.cjs → chunk-3TB5QGUW.cjs} +5 -5
  44. package/dist/chunk-45QJHGZM.cjs +1063 -0
  45. package/dist/{chunk-677THUVP.mjs → chunk-4C7KTKX7.mjs} +1 -1
  46. package/dist/{chunk-FUZEBRP3.mjs → chunk-4GP3XZ4Z.mjs} +5 -3
  47. package/dist/{chunk-KTSUBU2E.mjs → chunk-4KQDHTWX.mjs} +2 -2
  48. package/dist/chunk-4TLUFAIP.cjs +92 -0
  49. package/dist/chunk-4U5XZDLG.cjs +80 -0
  50. package/dist/{chunk-P664ZVTV.mjs → chunk-4ZZNPK25.mjs} +2 -2
  51. package/dist/{chunk-KIIMAWOJ.cjs → chunk-5NAVKJCZ.cjs} +35 -105
  52. package/dist/{chunk-LSKZMJMP.cjs → chunk-64SBBZDU.cjs} +38 -1
  53. package/dist/chunk-6BWKJ6QS.cjs +43 -0
  54. package/dist/{chunk-JSROZYYO.cjs → chunk-6D24SDKO.cjs} +1 -20
  55. package/dist/chunk-6IZWX6ES.cjs +74 -0
  56. package/dist/{chunk-QRKIMN7T.mjs → chunk-6LVRDOAW.mjs} +32 -6
  57. package/dist/{chunk-YWN746US.cjs → chunk-6MVFHNYZ.cjs} +85 -54
  58. package/dist/{chunk-VWBHM3F6.mjs → chunk-6PKXK4TY.mjs} +3 -3
  59. package/dist/chunk-6QOLZITB.cjs +22 -0
  60. package/dist/{chunk-OAHTRMIC.mjs → chunk-724JLMS4.mjs} +11 -11
  61. package/dist/chunk-7GNWGLWB.mjs +14 -0
  62. package/dist/{chunk-34UCJRQO.cjs → chunk-7RNAKBWF.cjs} +2 -2
  63. package/dist/{chunk-U6QLDL3G.mjs → chunk-7UEEHAW7.mjs} +1 -1
  64. package/dist/{chunk-UPJLHLJU.cjs → chunk-ALPWLT27.cjs} +4 -4
  65. package/dist/{chunk-ATSDUUFK.mjs → chunk-AX7S67YV.mjs} +33 -40
  66. package/dist/{chunk-MSSFIQGM.mjs → chunk-B2GSRB3P.mjs} +41 -10
  67. package/dist/chunk-BGGWKZ2V.mjs +6096 -0
  68. package/dist/{chunk-H5CLOUZS.cjs → chunk-BMOBTMDR.cjs} +5 -5
  69. package/dist/{chunk-Q2KB32T4.mjs → chunk-BPNRQ5BA.mjs} +6 -6
  70. package/dist/{chunk-E2ROOWQC.cjs → chunk-BPOTSHDO.cjs} +24 -87
  71. package/dist/chunk-BRYPZIMB.mjs +6 -0
  72. package/dist/{chunk-WFRT7JPX.mjs → chunk-BYQVROIP.mjs} +2 -2
  73. package/dist/{chunk-HALDNTIV.mjs → chunk-BYR3RQPB.mjs} +10 -73
  74. package/dist/{chunk-5PWXMJOH.cjs → chunk-C5KVWHIH.cjs} +36 -36
  75. package/dist/chunk-CALY6QG6.mjs +963 -0
  76. package/dist/{chunk-WC5UV2HQ.cjs → chunk-CBXBGM72.cjs} +2 -2
  77. package/dist/{chunk-WW46B6HA.cjs → chunk-CGR525MJ.cjs} +84 -45
  78. package/dist/{chunk-6V4TDWEC.cjs → chunk-CGVPXIRN.cjs} +18 -1
  79. package/dist/chunk-COABSY3U.mjs +196 -0
  80. package/dist/chunk-CZS6OACQ.mjs +63 -0
  81. package/dist/{chunk-SGBJ247Q.cjs → chunk-D4ROBNTK.cjs} +2 -2
  82. package/dist/{chunk-WEW2JVA4.cjs → chunk-D5IHNDHI.cjs} +6 -6
  83. package/dist/{chunk-QG775BRV.cjs → chunk-D64OPY6A.cjs} +72 -54
  84. package/dist/{chunk-QUCXCDE2.cjs → chunk-EH3464KF.cjs} +1 -1
  85. package/dist/{chunk-75HN5IZ3.mjs → chunk-ENOBPDKZ.mjs} +21 -19
  86. package/dist/{chunk-HD5CF3OE.mjs → chunk-ETPEZLS3.mjs} +2 -2
  87. package/dist/{chunk-HRETEZ2Z.cjs → chunk-EX4MKHXN.cjs} +37 -35
  88. package/dist/{chunk-TO4GJ56K.cjs → chunk-FEYQCYT7.cjs} +58 -18
  89. package/dist/chunk-FGH3ZXTP.mjs +1063 -0
  90. package/dist/{chunk-CUM5NYL5.mjs → chunk-FIAPD365.mjs} +1 -1
  91. package/dist/{chunk-HYTZYOW2.mjs → chunk-FJGIVDA5.mjs} +1197 -7906
  92. package/dist/chunk-FVPXT2JR.cjs +63 -0
  93. package/dist/{chunk-MYIZXDZA.mjs → chunk-FWCGUVVL.mjs} +1 -1
  94. package/dist/{chunk-D2ULAULS.cjs → chunk-FXFKIJDA.cjs} +9 -7
  95. package/dist/{chunk-RW63BOV7.cjs → chunk-GB7LDGY5.cjs} +2 -2
  96. package/dist/chunk-GC3EM6H4.mjs +80 -0
  97. package/dist/{chunk-E3UK5IIB.cjs → chunk-GS3WR5HX.cjs} +5 -3
  98. package/dist/{chunk-QFW2IH5E.mjs → chunk-GZTUT75U.mjs} +5 -2
  99. package/dist/chunk-H3EGVQE5.mjs +22 -0
  100. package/dist/chunk-HANGSYMB.mjs +67 -0
  101. package/dist/{chunk-RSOJ7DRT.mjs → chunk-HCSVR4YZ.mjs} +1 -58
  102. package/dist/{chunk-QYMZOOC5.mjs → chunk-HJ64F4GS.mjs} +12 -44
  103. package/dist/{chunk-P3PLW4FR.mjs → chunk-HKFBMHCD.mjs} +4 -4
  104. package/dist/{chunk-BXDJXFQG.cjs → chunk-I5MG3TKE.cjs} +4 -4
  105. package/dist/{chunk-VNGH5MLF.mjs → chunk-I6UVKUYK.mjs} +1 -1
  106. package/dist/{chunk-EPYU2EBL.mjs → chunk-IF4NU2NG.mjs} +1 -1
  107. package/dist/{chunk-WXJLNP33.cjs → chunk-IFWSR7YZ.cjs} +9 -7
  108. package/dist/{chunk-IVLZZZEI.mjs → chunk-IM7DY3ED.mjs} +1 -1
  109. package/dist/{chunk-W36M2BQ4.mjs → chunk-IN6RCKLL.mjs} +6 -5
  110. package/dist/{chunk-F5QO4FNE.mjs → chunk-INQ64HTJ.mjs} +43 -11
  111. package/dist/{chunk-SDOTRX3V.cjs → chunk-JEIG3EWE.cjs} +8 -8
  112. package/dist/{chunk-UWPLULNK.mjs → chunk-JGHCKIRI.mjs} +84 -24
  113. package/dist/{chunk-BFJTHYTN.mjs → chunk-JIYYX7WU.mjs} +10 -8
  114. package/dist/{chunk-CIOT4HGT.cjs → chunk-JOTUZIM4.cjs} +14 -14
  115. package/dist/{chunk-SKVTP5PR.mjs → chunk-JOW4HDJO.mjs} +1 -62
  116. package/dist/{chunk-6MVFL3R5.cjs → chunk-JR4QCLJY.cjs} +1 -58
  117. package/dist/{chunk-CGBDNNSM.cjs → chunk-KEXK442I.cjs} +44 -12
  118. package/dist/{chunk-FUCSUGDM.cjs → chunk-KF6VDJH7.cjs} +3 -3
  119. package/dist/{chunk-EA5K5BKU.mjs → chunk-KNHBTJP6.mjs} +18 -1
  120. package/dist/{chunk-MVL2RAJW.mjs → chunk-KYN5ODF6.mjs} +1 -1
  121. package/dist/{chunk-LMPAPBUA.cjs → chunk-L6A26QT5.cjs} +36 -68
  122. package/dist/{chunk-RVXFINNS.cjs → chunk-L6HYACBE.cjs} +31 -31
  123. package/dist/chunk-LFHCG2DU.mjs +43 -0
  124. package/dist/{chunk-5OKBARDN.cjs → chunk-LIZTLA5F.cjs} +12 -11
  125. package/dist/{chunk-HXRYZWTA.mjs → chunk-LLUA2LSC.mjs} +3 -3
  126. package/dist/{chunk-B5J2YVG7.cjs → chunk-LYIZHJTK.cjs} +2 -2
  127. package/dist/{chunk-3UEVPCGW.mjs → chunk-MEASUNVY.mjs} +6 -1
  128. package/dist/{chunk-FZ6YYU2W.mjs → chunk-MGMF4VP7.mjs} +38 -1
  129. package/dist/{chunk-CNNOLE4O.mjs → chunk-MHHCLYXU.mjs} +1 -1
  130. package/dist/{chunk-HRSAQ23K.cjs → chunk-MHN4UR5U.cjs} +4 -4
  131. package/dist/{chunk-3LOLJTFV.cjs → chunk-MN4TQJ3W.cjs} +11 -11
  132. package/dist/{chunk-PGZDEPTM.cjs → chunk-MY5PZYAD.cjs} +10 -10
  133. package/dist/{chunk-ZXH4TS3F.cjs → chunk-NBPNUQYO.cjs} +3 -64
  134. package/dist/{chunk-VXEEATVD.cjs → chunk-NFG4PUPI.cjs} +2 -2
  135. package/dist/{chunk-INL3THCU.mjs → chunk-O7USYJ4U.mjs} +1 -1
  136. package/dist/{chunk-4ZFL5GFN.cjs → chunk-OILHPMFX.cjs} +86 -26
  137. package/dist/{chunk-AJQTP4OO.mjs → chunk-OJ7JP7RJ.mjs} +1 -1
  138. package/dist/chunk-OQ4YXWH4.cjs +6097 -0
  139. package/dist/{chunk-DMEPTZTI.mjs → chunk-P2UJF4SS.mjs} +47 -7
  140. package/dist/{chunk-T5OJPTVN.cjs → chunk-P4TYB4SF.cjs} +2 -2
  141. package/dist/chunk-P7XDC7UJ.mjs +92 -0
  142. package/dist/{chunk-SHLXACIO.cjs → chunk-PJ42JESY.cjs} +1 -9
  143. package/dist/{chunk-5ULKUBIA.cjs → chunk-PN676AZF.cjs} +6 -6
  144. package/dist/{chunk-YKZRDB5Z.mjs → chunk-PYHPXPSW.mjs} +2 -2
  145. package/dist/{chunk-KMTGADN3.mjs → chunk-QCVIRVHE.mjs} +1 -9
  146. package/dist/{chunk-5D2JIPLH.cjs → chunk-QEILRWVV.cjs} +36 -138
  147. package/dist/{chunk-XKG2BLFN.cjs → chunk-QIBP5EFA.cjs} +18 -35
  148. package/dist/{chunk-ZUPXLIGB.mjs → chunk-R65GCA6A.mjs} +647 -378
  149. package/dist/{chunk-BWIQR4DH.cjs → chunk-RHGK2JEN.cjs} +56 -63
  150. package/dist/{chunk-AS2VPMEE.cjs → chunk-ROQ4C4LJ.cjs} +1465 -8174
  151. package/dist/{chunk-QV4VE2OW.mjs → chunk-S6ENKNNG.mjs} +5 -3
  152. package/dist/{chunk-RWFLWR5J.cjs → chunk-S7MTDRYA.cjs} +17 -15
  153. package/dist/{chunk-PVZE2JGJ.mjs → chunk-SGB4IW7K.mjs} +43 -25
  154. package/dist/{chunk-GKBWWRBG.mjs → chunk-SVPGWJZF.mjs} +12 -12
  155. package/dist/{chunk-EKN7NSZO.cjs → chunk-SZLNU3GJ.cjs} +8 -5
  156. package/dist/chunk-TI7UANHI.cjs +77 -0
  157. package/dist/{chunk-6BK3K2GB.mjs → chunk-UIDWEU7M.mjs} +83 -44
  158. package/dist/{chunk-MLY2RP5R.mjs → chunk-ULQOP5UI.mjs} +6 -2
  159. package/dist/chunk-UNJZGVPU.cjs +6 -0
  160. package/dist/{chunk-5BWWFHR2.mjs → chunk-UQUEANTY.mjs} +3 -3
  161. package/dist/chunk-VDRM36QB.cjs +963 -0
  162. package/dist/chunk-VHRS3MCW.cjs +196 -0
  163. package/dist/{chunk-SOP2EAA6.mjs → chunk-VLPII2JJ.mjs} +1 -1
  164. package/dist/{chunk-RG4A6LB2.cjs → chunk-VNPXKF3G.cjs} +7 -7
  165. package/dist/chunk-VQDBNVOO.cjs +14 -0
  166. package/dist/chunk-VQGKD7RV.mjs +25 -0
  167. package/dist/{chunk-6HB6V3R7.mjs → chunk-VTBXE6QG.mjs} +10 -27
  168. package/dist/{chunk-ZMSZZXOR.mjs → chunk-WDMIW6Q6.mjs} +0 -19
  169. package/dist/{chunk-NBBEQLOK.cjs → chunk-WLHA5USH.cjs} +9 -9
  170. package/dist/{chunk-BZHXGVMA.mjs → chunk-WMBRZI5V.mjs} +5 -3
  171. package/dist/{chunk-4WVJLURN.mjs → chunk-WMHG64DA.mjs} +1 -1
  172. package/dist/{chunk-JCYYXBAJ.cjs → chunk-WROEFVNO.cjs} +3 -3
  173. package/dist/{chunk-A657YSP4.cjs → chunk-WSOBCAYO.cjs} +37 -35
  174. package/dist/{chunk-IWZKTWHZ.cjs → chunk-WU7ZS3EM.cjs} +7 -2
  175. package/dist/{chunk-J63ZH5OQ.cjs → chunk-X3GMHKO3.cjs} +2 -2
  176. package/dist/{chunk-POSPE3IO.mjs → chunk-X3NGFVRF.mjs} +61 -21
  177. package/dist/{chunk-VT4WFRHA.mjs → chunk-XUC6CFLE.mjs} +1 -1
  178. package/dist/chunk-Y5RG6B7S.mjs +77 -0
  179. package/dist/{chunk-EIPC3FDA.cjs → chunk-YWCYV7QC.cjs} +9 -5
  180. package/dist/{chunk-WLL43JMO.mjs → chunk-YYQVGKO5.mjs} +7 -5
  181. package/dist/chunk-YZAKIXRL.cjs +67 -0
  182. package/dist/chunk-ZQRCSUSB.cjs +25 -0
  183. package/dist/{chunk-6XWDE2P2.cjs → chunk-ZTP3BJG6.cjs} +64 -24
  184. package/dist/{chunk-ZMMBIVQM.mjs → chunk-ZZGQD7A4.mjs} +16 -86
  185. package/dist/{client-plugins-CsCuCLBz.d.mts → client-plugins-CkYwvDJ0.d.mts} +2545 -2665
  186. package/dist/{client-plugins-D0ke-Hc8.d.ts → client-plugins-DfeKd0sD.d.ts} +2545 -2665
  187. package/dist/client-plugins.d.mts +6 -8
  188. package/dist/client-plugins.d.ts +6 -8
  189. package/dist/client.cjs +5 -5
  190. package/dist/client.d.mts +12 -13
  191. package/dist/client.d.ts +12 -13
  192. package/dist/client.mjs +4 -4
  193. package/dist/client.react-server.mjs +2 -0
  194. package/dist/config.d.mts +6 -8
  195. package/dist/config.d.ts +6 -8
  196. package/dist/{devtools-LW4QQ5J3.cjs → devtools-2YHAJYH6.cjs} +21 -18
  197. package/dist/{devtools-5AFIPVUJ.mjs → devtools-N3QLRIQU.mjs} +20 -17
  198. package/dist/docs.cjs +23 -20
  199. package/dist/docs.d.mts +7 -9
  200. package/dist/docs.d.ts +7 -9
  201. package/dist/docs.mjs +22 -19
  202. package/dist/{endpoint-CA-TNX60.d.ts → endpoint-BOE0IAaG.d.ts} +6 -3
  203. package/dist/{endpoint-CCHFqyTE.d.mts → endpoint-DGZRZHux.d.mts} +6 -3
  204. package/dist/environment/vite.cjs +6 -2
  205. package/dist/environment/vite.d.mts +11 -2
  206. package/dist/environment/vite.d.ts +11 -2
  207. package/dist/environment/vite.mjs +5 -1
  208. package/dist/headers.cjs +4 -4
  209. package/dist/headers.mjs +3 -3
  210. package/dist/image/server.cjs +7 -3
  211. package/dist/image/server.d.mts +10 -2
  212. package/dist/image/server.d.ts +10 -2
  213. package/dist/image/server.mjs +6 -2
  214. package/dist/image/sharp.cjs +12 -10
  215. package/dist/image/sharp.d.mts +1 -1
  216. package/dist/image/sharp.d.ts +1 -1
  217. package/dist/image/sharp.mjs +4 -2
  218. package/dist/{image-config-Duob7wER.d.ts → image-config-BpH1q5R8.d.mts} +4 -1
  219. package/dist/{image-config-Duob7wER.d.mts → image-config-BpH1q5R8.d.ts} +4 -1
  220. package/dist/image.d.mts +1 -1
  221. package/dist/image.d.ts +1 -1
  222. package/dist/index.cjs +90 -68
  223. package/dist/index.d.mts +28 -145
  224. package/dist/index.d.ts +28 -145
  225. package/dist/index.mjs +103 -81
  226. package/dist/{integration-api-BPJo5oXb.d.ts → integration-api-BuPHMeKz.d.ts} +2 -2
  227. package/dist/{integration-api-0y4FXJpC.d.mts → integration-api-DWyMmvrR.d.mts} +2 -2
  228. package/dist/integration-orm-P2II2EBK.cjs +14 -0
  229. package/dist/{integration-orm-KV5B3BGZ.mjs → integration-orm-RBKCIQYZ.mjs} +4 -3
  230. package/dist/integrations.cjs +7 -5
  231. package/dist/integrations.d.mts +8 -10
  232. package/dist/integrations.d.ts +8 -10
  233. package/dist/integrations.mjs +6 -4
  234. package/dist/internal/app-markdown-runtime.cjs +6 -5
  235. package/dist/internal/app-markdown-runtime.d.mts +7 -9
  236. package/dist/internal/app-markdown-runtime.d.ts +7 -9
  237. package/dist/internal/app-markdown-runtime.mjs +5 -4
  238. package/dist/internal/build-runtime.cjs +57 -56
  239. package/dist/internal/build-runtime.d.mts +8 -10
  240. package/dist/internal/build-runtime.d.ts +8 -10
  241. package/dist/internal/build-runtime.mjs +56 -55
  242. package/dist/internal/cli-runtime.cjs +37 -31
  243. package/dist/internal/cli-runtime.mjs +37 -31
  244. package/dist/internal/client-error-overlay.cjs +4 -4
  245. package/dist/internal/client-error-overlay.mjs +1 -1
  246. package/dist/internal/compression-runtime.d.mts +6 -8
  247. package/dist/internal/compression-runtime.d.ts +6 -8
  248. package/dist/internal/config-runtime.cjs +21 -18
  249. package/dist/internal/config-runtime.d.mts +7 -9
  250. package/dist/internal/config-runtime.d.ts +7 -9
  251. package/dist/internal/config-runtime.mjs +20 -17
  252. package/dist/internal/docs-precompiled-runtime.cjs +3 -3
  253. package/dist/internal/docs-precompiled-runtime.mjs +2 -2
  254. package/dist/internal/infra-analytics-runtime.cjs +7 -7
  255. package/dist/internal/infra-analytics-runtime.mjs +5 -5
  256. package/dist/internal/metadata-image-runtime.cjs +4 -3
  257. package/dist/internal/metadata-image-runtime.mjs +3 -2
  258. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  259. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  260. package/dist/internal/production-node-env.cjs +2 -2
  261. package/dist/internal/production-node-env.mjs +1 -1
  262. package/dist/internal/production-runtime.cjs +53 -28
  263. package/dist/internal/production-runtime.d.mts +46 -15
  264. package/dist/internal/production-runtime.d.ts +46 -15
  265. package/dist/internal/production-runtime.mjs +57 -32
  266. package/dist/layers-CM5i6T7z.d.mts +55 -0
  267. package/dist/layers-CM5i6T7z.d.ts +55 -0
  268. package/dist/markdown.cjs +4 -4
  269. package/dist/markdown.d.mts +6 -8
  270. package/dist/markdown.d.ts +6 -8
  271. package/dist/markdown.mjs +3 -3
  272. package/dist/middleware.cjs +16 -10
  273. package/dist/middleware.d.mts +8 -10
  274. package/dist/middleware.d.ts +8 -10
  275. package/dist/middleware.mjs +19 -13
  276. package/dist/navigation.cjs +4 -4
  277. package/dist/navigation.d.mts +9 -10
  278. package/dist/navigation.d.ts +9 -10
  279. package/dist/navigation.mjs +3 -3
  280. package/dist/{nitro-MPZJGPXK.mjs → nitro-KDACKNHU.mjs} +3 -2
  281. package/dist/{nitro-7F65EZZS.cjs → nitro-NPGU6VBT.cjs} +4 -3
  282. package/dist/observability.cjs +2 -2
  283. package/dist/observability.mjs +1 -1
  284. package/dist/plugin-DBBZ4JI2.cjs +32 -0
  285. package/dist/plugin-SYMK7PQ2.mjs +32 -0
  286. package/dist/plugin.cjs +56 -43
  287. package/dist/plugin.d.mts +25 -8
  288. package/dist/plugin.d.ts +25 -8
  289. package/dist/plugin.mjs +57 -44
  290. package/dist/{production-runtime-DfRP0cV0.d.mts → production-runtime-BTkXQdYy.d.mts} +17 -3
  291. package/dist/{production-runtime-BaI3WHnV.d.ts → production-runtime-DFC7pgbp.d.ts} +17 -3
  292. package/dist/query/client.cjs +2 -2
  293. package/dist/query/client.mjs +3 -3
  294. package/dist/{render-plan-Dg8RBYFa.d.mts → render-plan-5rFeWmk7.d.mts} +1 -1
  295. package/dist/{render-plan-CfIdJKAf.d.ts → render-plan-BoAK9xFC.d.ts} +1 -1
  296. package/dist/renderer-client.d.mts +8 -9
  297. package/dist/renderer-client.d.ts +8 -9
  298. package/dist/{request-DfE02G_A.d.mts → request-BxBWigtl.d.mts} +1 -1
  299. package/dist/{request-CEbHIIl4.d.ts → request-fciwmd3n.d.ts} +1 -1
  300. package/dist/request.cjs +3 -3
  301. package/dist/request.d.mts +7 -9
  302. package/dist/request.d.ts +7 -9
  303. package/dist/request.mjs +2 -2
  304. package/dist/{route-rendering-C4oHbv6C.d.ts → route-rendering-BCM1QzEf.d.mts} +1 -1
  305. package/dist/{route-rendering-BHyOfXjD.d.mts → route-rendering-BLZT0IP0.d.ts} +1 -1
  306. package/dist/{router-uRN_29Em.d.ts → router-CkheNX3-.d.ts} +1 -1
  307. package/dist/{router-DwhA61SB.d.mts → router-DyZJWc1_.d.mts} +1 -1
  308. package/dist/routes.cjs +6 -5
  309. package/dist/routes.d.mts +6 -8
  310. package/dist/routes.d.ts +6 -8
  311. package/dist/routes.mjs +5 -4
  312. package/dist/{runtime-COk03hmx.d.ts → runtime-DfU4sKa5.d.ts} +3 -3
  313. package/dist/{runtime-BEdHhN4C.d.mts → runtime-wexvUN5J.d.mts} +3 -3
  314. package/dist/{schema-dev-notice-Y7MQEFGN.cjs → schema-dev-notice-5JPE67AI.cjs} +6 -4
  315. package/dist/{schema-dev-notice-O67CPXJ6.mjs → schema-dev-notice-WLPZ6WKU.mjs} +4 -2
  316. package/dist/server-action-security.cjs +4 -3
  317. package/dist/server-action-security.mjs +3 -2
  318. package/dist/server-client-bridge-DKWDl5NB.d.mts +7 -0
  319. package/dist/server-client-bridge-DKWDl5NB.d.ts +7 -0
  320. package/dist/server-fn-client.d.mts +3 -3
  321. package/dist/server-fn-client.d.ts +3 -3
  322. package/dist/server-fn.cjs +8 -7
  323. package/dist/server-fn.d.mts +1 -1
  324. package/dist/server-fn.d.ts +1 -1
  325. package/dist/server-fn.mjs +7 -6
  326. package/dist/server-plugins.cjs +5 -5
  327. package/dist/server-plugins.d.mts +7 -9
  328. package/dist/server-plugins.d.ts +7 -9
  329. package/dist/server-plugins.mjs +4 -4
  330. package/dist/server-query-client.d.mts +1 -1
  331. package/dist/server-query-client.d.ts +1 -1
  332. package/dist/server-query.cjs +9 -8
  333. package/dist/server-query.d.mts +1 -1
  334. package/dist/server-query.d.ts +1 -1
  335. package/dist/server-query.mjs +8 -7
  336. package/dist/server.cjs +97 -73
  337. package/dist/server.d.mts +18 -13
  338. package/dist/server.d.ts +18 -13
  339. package/dist/server.mjs +82 -58
  340. package/dist/{spa-router-DrVOBVGg.d.ts → spa-router-CcejECnG.d.ts} +2 -2
  341. package/dist/{spa-router-w4aFOuyn.d.mts → spa-router-DgsMXqfX.d.mts} +2 -2
  342. package/dist/ssg-1FGaFISl.d.ts +184 -0
  343. package/dist/ssg-Bg4bMMhM.d.mts +184 -0
  344. package/dist/storage.cjs +6 -2
  345. package/dist/storage.d.mts +9 -1
  346. package/dist/storage.d.ts +9 -1
  347. package/dist/storage.mjs +5 -1
  348. package/dist/testing.cjs +20 -18
  349. package/dist/testing.d.mts +7 -9
  350. package/dist/testing.d.ts +7 -9
  351. package/dist/testing.mjs +16 -14
  352. package/dist/theme/server.cjs +4 -4
  353. package/dist/theme/server.mjs +3 -3
  354. package/dist/{utils-Dhuqwmd2.d.ts → utils-8wtTYiH4.d.mts} +1 -1
  355. package/dist/{utils-BtYehqeU.d.mts → utils-Dxbh6Hgj.d.ts} +1 -1
  356. package/dist/version.cjs +2 -2
  357. package/dist/version.mjs +1 -1
  358. package/dist/vite.cjs +75 -46
  359. package/dist/vite.d.mts +130 -11
  360. package/dist/vite.d.ts +130 -11
  361. package/dist/vite.mjs +76 -47
  362. package/dist/{workflows-jZ4BcdoZ.d.ts → workflows-IWP1ddBm.d.mts} +5 -2
  363. package/dist/{workflows-jZ4BcdoZ.d.mts → workflows-IWP1ddBm.d.ts} +5 -2
  364. package/dist/workflows.cjs +4 -3
  365. package/dist/workflows.d.mts +1 -1
  366. package/dist/workflows.d.ts +1 -1
  367. package/dist/workflows.mjs +3 -2
  368. package/package.json +3 -1
  369. package/dist/chunk-3SDFA7UF.cjs +0 -701
  370. package/dist/chunk-DAO7JGTS.mjs +0 -73
  371. package/dist/chunk-E5GNDG5F.mjs +0 -701
  372. package/dist/chunk-SYQ3MOWW.cjs +0 -73
  373. package/dist/chunk-ULASELLA.cjs +0 -48
  374. package/dist/integration-orm-55F7CII5.cjs +0 -13
@@ -1,12 +1,14 @@
1
1
  import {
2
2
  assertNoSchemaListField,
3
+ isDatabaseEnforcedReference
4
+ } from "./chunk-VQGKD7RV.mjs";
5
+ import {
3
6
  assertSupportedPrimaryKeyField,
4
- isDatabaseEnforcedReference,
5
7
  resolveSchemaModels
6
- } from "./chunk-ZMSZZXOR.mjs";
8
+ } from "./chunk-WDMIW6Q6.mjs";
7
9
  import {
8
10
  resolveStorageRuntimeClient
9
- } from "./chunk-UWPLULNK.mjs";
11
+ } from "./chunk-JGHCKIRI.mjs";
10
12
  import {
11
13
  __name
12
14
  } from "./chunk-LPEX4YW6.mjs";
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkFUCSUGDMcjs = require('./chunk-FUCSUGDM.cjs');
3
+ var _chunkKF6VDJH7cjs = require('./chunk-KF6VDJH7.cjs');
4
4
 
5
5
 
6
6
  var _chunk2CQ74SP6cjs = require('./chunk-2CQ74SP6.cjs');
@@ -17,21 +17,23 @@ var _chunkLYLEZIG3cjs = require('./chunk-LYLEZIG3.cjs');
17
17
 
18
18
 
19
19
 
20
- var _chunkXKG2BLFNcjs = require('./chunk-XKG2BLFN.cjs');
20
+ var _chunkQIBP5EFAcjs = require('./chunk-QIBP5EFA.cjs');
21
21
 
22
22
 
23
23
  var _chunkWMAPPDMMcjs = require('./chunk-WMAPPDMM.cjs');
24
24
 
25
25
 
26
- var _chunk6V4TDWECcjs = require('./chunk-6V4TDWEC.cjs');
26
+ var _chunkCGVPXIRNcjs = require('./chunk-CGVPXIRN.cjs');
27
27
 
28
28
 
29
29
 
30
30
  var _chunkSOR334EBcjs = require('./chunk-SOR334EB.cjs');
31
31
 
32
32
 
33
+ var _chunkVQDBNVOOcjs = require('./chunk-VQDBNVOO.cjs');
33
34
 
34
- var _chunkSHLXACIOcjs = require('./chunk-SHLXACIO.cjs');
35
+
36
+ var _chunkPJ42JESYcjs = require('./chunk-PJ42JESY.cjs');
35
37
 
36
38
 
37
39
  var _chunk5QIKR7RRcjs = require('./chunk-5QIKR7RR.cjs');
@@ -102,7 +104,7 @@ var _APIRouteManager = class _APIRouteManager {
102
104
  await this.loadProgrammaticApiRoutes(appDir);
103
105
  }
104
106
  this.routes = new Map(
105
- _chunkXKG2BLFNcjs.mergePluginAPIRoutes.call(void 0, [...this.routes.values()], this.plugins, void 0, {
107
+ _chunkQIBP5EFAcjs.mergePluginAPIRoutes.call(void 0, [...this.routes.values()], this.plugins, void 0, {
106
108
  bodySizeLimit: this.bodySizeLimit,
107
109
  dispatch: this.dispatch
108
110
  }).map((route) => [route.path, route])
@@ -150,7 +152,7 @@ var _APIRouteManager = class _APIRouteManager {
150
152
  const routeModule = await this.loadModule(filePath);
151
153
  const endpoints = {};
152
154
  const availableMethods = [];
153
- for (const method of _chunkXKG2BLFNcjs.API_ROUTE_METHODS) {
155
+ for (const method of _chunkQIBP5EFAcjs.API_ROUTE_METHODS) {
154
156
  if (routeModule[method]) {
155
157
  endpoints[method] = routeModule[method];
156
158
  availableMethods.push(method);
@@ -220,7 +222,7 @@ var _APIRouteManager = class _APIRouteManager {
220
222
  async loadProgrammaticApiRoutes(appDir) {
221
223
  const candidateRoots = [path.dirname(appDir), appDir];
222
224
  const routeFiles = Array.from(
223
- new Set(candidateRoots.flatMap((srcRoot) => _chunkFUCSUGDMcjs.findProgrammaticRouteFilesInDir.call(void 0, srcRoot)))
225
+ new Set(candidateRoots.flatMap((srcRoot) => _chunkKF6VDJH7cjs.findProgrammaticRouteFilesInDir.call(void 0, srcRoot)))
224
226
  );
225
227
  if (routeFiles.length === 0) return;
226
228
  const { getProgrammaticRouteManifest } = await import("./routes.cjs");
@@ -266,11 +268,11 @@ var _APIRouteManager = class _APIRouteManager {
266
268
  }
267
269
  async loadModule(filePath) {
268
270
  if (this.viteServer) {
269
- return await _chunkSHLXACIOcjs.loadFarmDevModule.call(void 0, this.viteServer, filePath);
271
+ return await _chunkPJ42JESYcjs.loadFarmDevModule.call(void 0, this.viteServer, filePath);
270
272
  }
271
273
  return await import(
272
274
  /* @vite-ignore */
273
- _chunkSHLXACIOcjs.toFileModuleUrl.call(void 0, filePath)
275
+ _chunkVQDBNVOOcjs.toFileModuleUrl.call(void 0, filePath)
274
276
  );
275
277
  }
276
278
  addEndpoint(routePath, filePath, method, endpoint, appDir, runtimeConfig = {}) {
@@ -306,7 +308,7 @@ var _APIRouteManager = class _APIRouteManager {
306
308
  this.endpointSources.set(routePath, /* @__PURE__ */ new Map([[normalizedMethod, { appDir, filePath }]]));
307
309
  }
308
310
  addProgrammaticApiRoute(filePath, route, appDir) {
309
- const modulePath = _chunk6V4TDWECcjs.createProgrammaticRouteModuleId.call(void 0, filePath, "api", route.path);
311
+ const modulePath = _chunkCGVPXIRNcjs.createProgrammaticRouteModuleId.call(void 0, filePath, "api", route.path);
310
312
  const runtimeConfig = _chunkSOR334EBcjs.normalizeFarmRouteRuntimeConfig.call(void 0, route, `API route "${route.path}"`);
311
313
  for (const [method, endpoint] of Object.entries(route.methods)) {
312
314
  if (endpoint) {
@@ -332,7 +334,7 @@ var _APIRouteManager = class _APIRouteManager {
332
334
  const url = new URL(request.url);
333
335
  const pathname = url.pathname;
334
336
  const method = request.method.toUpperCase();
335
- const match = _chunkXKG2BLFNcjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
337
+ const match = _chunkQIBP5EFAcjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
336
338
  if (!match) {
337
339
  return new Response(JSON.stringify({ error: "Not Found" }), {
338
340
  status: 404,
@@ -340,19 +342,19 @@ var _APIRouteManager = class _APIRouteManager {
340
342
  });
341
343
  }
342
344
  const { route, params } = match;
343
- const endpoint = _chunkXKG2BLFNcjs.resolveAPIRouteEndpoint.call(void 0, route, method);
345
+ const endpoint = _chunkQIBP5EFAcjs.resolveAPIRouteEndpoint.call(void 0, route, method);
344
346
  if (!endpoint) {
345
347
  return new Response(JSON.stringify({ error: "Method Not Allowed" }), {
346
348
  status: 405,
347
349
  headers: {
348
- Allow: _chunkXKG2BLFNcjs.getAllowedAPIRouteMethods.call(void 0, route).join(", "),
350
+ Allow: _chunkQIBP5EFAcjs.getAllowedAPIRouteMethods.call(void 0, route).join(", "),
349
351
  "Content-Type": "application/json"
350
352
  }
351
353
  });
352
354
  }
353
355
  const invoke = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async () => {
354
356
  try {
355
- return await _chunkXKG2BLFNcjs.invokeAPIRouteEndpoint.call(void 0, endpoint, request, params, this.bodySizeLimit);
357
+ return await _chunkQIBP5EFAcjs.invokeAPIRouteEndpoint.call(void 0, endpoint, request, params, this.bodySizeLimit);
356
358
  } catch (error) {
357
359
  if (options.throwOnError) throw error;
358
360
  console.error(`[API Error] ${pathname}:`, error);
@@ -374,7 +376,7 @@ var _APIRouteManager = class _APIRouteManager {
374
376
  return Boolean(this.matchRoute(pathname));
375
377
  }
376
378
  matchRoute(pathname) {
377
- return _chunkXKG2BLFNcjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
379
+ return _chunkQIBP5EFAcjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
378
380
  }
379
381
  /**
380
382
  * Get all routes for client type generation
@@ -3,7 +3,7 @@ import {
3
3
  parseMiddlewareCookieHeader,
4
4
  serializeMiddlewareCookie,
5
5
  serializeMiddlewareCookieDeletion
6
- } from "./chunk-SKVTP5PR.mjs";
6
+ } from "./chunk-JOW4HDJO.mjs";
7
7
  import {
8
8
  compileMiddlewareConfig,
9
9
  compileMiddlewareRoute,
@@ -11,13 +11,16 @@ import {
11
11
  matchesMiddlewareConfigAt,
12
12
  matchesMiddlewareRouteAt,
13
13
  toMiddlewareRoutePathname
14
- } from "./chunk-P3PLW4FR.mjs";
14
+ } from "./chunk-HKFBMHCD.mjs";
15
15
  import {
16
16
  emitFarmEvent
17
- } from "./chunk-FUZEBRP3.mjs";
17
+ } from "./chunk-4GP3XZ4Z.mjs";
18
18
  import {
19
19
  createFarmAPIMiddlewarePathnames
20
20
  } from "./chunk-BTHHUD7Q.mjs";
21
+ import {
22
+ withFarmRequestClientAddress
23
+ } from "./chunk-ZZGQD7A4.mjs";
21
24
  import {
22
25
  _withFarmResponseHeaders
23
26
  } from "./chunk-Z3HATSKO.mjs";
@@ -234,18 +237,6 @@ function createResponseShim(headers) {
234
237
  };
235
238
  }
236
239
  __name(createResponseShim, "createResponseShim");
237
- function withNodeRequestShape(request, trustProxy, clientAddress) {
238
- const requestWithShape = request;
239
- if (!requestWithShape.socket) {
240
- const forwardedFor = trustProxy ? request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() : void 0;
241
- try {
242
- requestWithShape.socket = { remoteAddress: forwardedFor || clientAddress || void 0 };
243
- } catch {
244
- }
245
- }
246
- return requestWithShape;
247
- }
248
- __name(withNodeRequestShape, "withNodeRequestShape");
249
240
  function createHandledResponse(body, init, headers) {
250
241
  const responseHeaders = new Headers();
251
242
  for (const [key, value] of headers) {
@@ -262,7 +253,7 @@ function createHandledResponse(body, init, headers) {
262
253
  }
263
254
  __name(createHandledResponse, "createHandledResponse");
264
255
  function createWebMiddlewareContext(request, parent, trustProxy = false, clientAddress, toRoutePathname) {
265
- let currentRequest = withNodeRequestShape(request, trustProxy, clientAddress);
256
+ let currentRequest = withFarmRequestClientAddress(request, trustProxy, clientAddress);
266
257
  let handledResponse = null;
267
258
  const url = new URL(currentRequest.url);
268
259
  const data = parent?.data ? new Map(parent.data) : /* @__PURE__ */ new Map();
@@ -317,7 +308,7 @@ function createWebMiddlewareContext(request, parent, trustProxy = false, clientA
317
308
  rewrite(rewriteUrl) {
318
309
  ctx._rewriteUrl = rewriteUrl;
319
310
  const nextUrl = new URL(rewriteUrl, currentRequest.url);
320
- currentRequest = withNodeRequestShape(
311
+ currentRequest = withFarmRequestClientAddress(
321
312
  new Request(nextUrl, currentRequest),
322
313
  trustProxy,
323
314
  clientAddress
@@ -393,8 +384,8 @@ function getConfigHandlers(entry) {
393
384
  }
394
385
  __name(getConfigHandlers, "getConfigHandlers");
395
386
  function toMiddlewareConfig(entry) {
396
- const { matcher, exclude, runtime } = entry;
397
- return { matcher, exclude, runtime };
387
+ const { matcher, exclude, runtime, cache } = entry;
388
+ return { matcher, exclude, runtime, cache };
398
389
  }
399
390
  __name(toMiddlewareConfig, "toMiddlewareConfig");
400
391
  function normalizeConfigMiddleware(config) {
@@ -467,7 +458,8 @@ function emptyResult(request) {
467
458
  data: /* @__PURE__ */ new Map(),
468
459
  context: /* @__PURE__ */ new Map(),
469
460
  headers: new Headers(),
470
- handled: false
461
+ handled: false,
462
+ guarded: false
471
463
  };
472
464
  }
473
465
  __name(emptyResult, "emptyResult");
@@ -516,6 +508,7 @@ function createProductionMiddlewareRunner(options = {}) {
516
508
  }
517
509
  }
518
510
  const ran = /* @__PURE__ */ new Set();
511
+ let guarded = false;
519
512
  function* applicableMiddleware() {
520
513
  for (let pathname = initialPathname, requestPathname = initialRequestPathname, pass = 0; ; pass++) {
521
514
  const pathnames = matchPathnames(pathname, requestPathname);
@@ -541,6 +534,7 @@ function createProductionMiddlewareRunner(options = {}) {
541
534
  continue;
542
535
  }
543
536
  ran.add(entry);
537
+ if (entry.config?.cache !== "public") guarded = true;
544
538
  if (parentData) {
545
539
  contextState = createWebMiddlewareContext(
546
540
  currentRequest,
@@ -583,7 +577,8 @@ function createProductionMiddlewareRunner(options = {}) {
583
577
  data: new Map(ctx.data),
584
578
  context: new Map(ctx.locals),
585
579
  headers: mapToHeaders(contextState.headers),
586
- handled: true
580
+ handled: true,
581
+ guarded
587
582
  };
588
583
  }
589
584
  if (ctx._handled || ctx.response.headersSent || ctx.response.writableEnded) {
@@ -599,7 +594,8 @@ function createProductionMiddlewareRunner(options = {}) {
599
594
  data: new Map(ctx.data),
600
595
  context: new Map(ctx.locals),
601
596
  headers: mapToHeaders(contextState.headers),
602
- handled: true
597
+ handled: true,
598
+ guarded
603
599
  };
604
600
  }
605
601
  emitFarmEvent({
@@ -626,7 +622,8 @@ function createProductionMiddlewareRunner(options = {}) {
626
622
  data: new Map(ctx.data),
627
623
  context: new Map(ctx.locals),
628
624
  headers: mapToHeaders(contextState.headers),
629
- handled: true
625
+ handled: true,
626
+ guarded
630
627
  };
631
628
  }
632
629
  if (isFarmNotFoundError(error)) {
@@ -638,6 +635,7 @@ function createProductionMiddlewareRunner(options = {}) {
638
635
  context: new Map(ctx.locals),
639
636
  headers: mapToHeaders(contextState.headers),
640
637
  handled: true,
638
+ guarded,
641
639
  notFound: true
642
640
  };
643
641
  }
@@ -661,7 +659,8 @@ function createProductionMiddlewareRunner(options = {}) {
661
659
  data: new Map(ctx.data),
662
660
  context: new Map(ctx.locals),
663
661
  headers: mapToHeaders(contextState.headers),
664
- handled: false
662
+ handled: false,
663
+ guarded
665
664
  };
666
665
  }, "runProductionMiddleware");
667
666
  }
@@ -684,9 +683,28 @@ function applyProductionMiddlewareHeaders(response, middlewareHeaders) {
684
683
  });
685
684
  }
686
685
  __name(applyProductionMiddlewareHeaders, "applyProductionMiddlewareHeaders");
686
+ var PRIVATE_CACHE_DIRECTIVE = /(?:^|,)\s*(?:private|no-store)\s*(?:[,=]|$)/i;
687
+ var CDN_CACHE_CONTROL_HEADERS = [
688
+ "cdn-cache-control",
689
+ "vercel-cdn-cache-control",
690
+ "netlify-cdn-cache-control",
691
+ "cloudflare-cdn-cache-control"
692
+ ];
693
+ function _withFarmGuardedResponseCache(response) {
694
+ const shareable = !PRIVATE_CACHE_DIRECTIVE.test(response.headers.get("cache-control") ?? "");
695
+ if (!shareable && !CDN_CACHE_CONTROL_HEADERS.some((name) => response.headers.has(name))) {
696
+ return response;
697
+ }
698
+ return _withFarmResponseHeaders(response, (headers) => {
699
+ if (shareable) headers.set("Cache-Control", "private, no-store");
700
+ for (const name of CDN_CACHE_CONTROL_HEADERS) headers.delete(name);
701
+ });
702
+ }
703
+ __name(_withFarmGuardedResponseCache, "_withFarmGuardedResponseCache");
687
704
 
688
705
  export {
689
706
  matchesMiddlewareConfig2 as matchesMiddlewareConfig,
690
707
  createProductionMiddlewareRunner,
691
- applyProductionMiddlewareHeaders
708
+ applyProductionMiddlewareHeaders,
709
+ _withFarmGuardedResponseCache
692
710
  };
@@ -1,29 +1,29 @@
1
1
  import {
2
2
  FARM_DEFAULT_MCP_TOOLS
3
- } from "./chunk-P664ZVTV.mjs";
3
+ } from "./chunk-4ZZNPK25.mjs";
4
4
  import {
5
5
  DEFAULT_ERROR_STYLES
6
6
  } from "./chunk-XAXTTBUT.mjs";
7
7
  import {
8
8
  serializeFarmLlmsTxt
9
- } from "./chunk-HD5CF3OE.mjs";
9
+ } from "./chunk-ETPEZLS3.mjs";
10
10
  import {
11
11
  stampFarmCspNonce
12
- } from "./chunk-U6QLDL3G.mjs";
12
+ } from "./chunk-7UEEHAW7.mjs";
13
13
  import {
14
14
  emitFarmAgentRead
15
- } from "./chunk-MVL2RAJW.mjs";
15
+ } from "./chunk-KYN5ODF6.mjs";
16
16
  import {
17
17
  resolveFarmThemeConfig
18
18
  } from "./chunk-AELACLOB.mjs";
19
19
  import {
20
20
  integrationMiddlewareMayHandlePath
21
- } from "./chunk-ATSDUUFK.mjs";
21
+ } from "./chunk-AX7S67YV.mjs";
22
22
  import {
23
23
  compileMiddlewareConfig,
24
24
  matchesCompiledMiddlewareConfig,
25
25
  matchesMiddlewareRoute
26
- } from "./chunk-P3PLW4FR.mjs";
26
+ } from "./chunk-HKFBMHCD.mjs";
27
27
  import {
28
28
  omitFarmResponseBody
29
29
  } from "./chunk-5WI2S4CO.mjs";
@@ -31,18 +31,18 @@ import {
31
31
  _listFarmMCPCatalogs,
32
32
  _listFarmRegisteredMCPServers
33
33
  } from "./chunk-ZLAT2CWY.mjs";
34
- import {
35
- createFarmWeakETag,
36
- matchesFarmIfNoneMatch
37
- } from "./chunk-ZMMBIVQM.mjs";
38
34
  import {
39
35
  createFarmAPIMiddlewarePathnames,
40
36
  resolveFarmAPIServerBasePath,
41
37
  resolveFarmAPIServerRoutePath
42
38
  } from "./chunk-BTHHUD7Q.mjs";
39
+ import {
40
+ createFarmWeakETag,
41
+ matchesFarmIfNoneMatch
42
+ } from "./chunk-ZZGQD7A4.mjs";
43
43
  import {
44
44
  FARM_VERSION
45
- } from "./chunk-SOP2EAA6.mjs";
45
+ } from "./chunk-VLPII2JJ.mjs";
46
46
  import {
47
47
  localizeFarmPathname
48
48
  } from "./chunk-L3KT7IXV.mjs";
@@ -112,7 +112,7 @@ function routeBoundaryCoversDirectory(boundaryPattern, directory) {
112
112
  __name(routeBoundaryCoversDirectory, "routeBoundaryCoversDirectory");
113
113
 
114
114
  // src/server/full-document.ts
115
- var CONTENTS_WRAPPER = /^<div\b[^>]*style="display\s*:\s*contents"[^>]*>/i;
115
+ var CONTENTS_WRAPPER = /^<div\b[^>]*style="display\s*:\s*contents;?\s*"[^>]*>/i;
116
116
  var HOISTED_HEAD_ELEMENT = /^(?:<(?:meta|link|base)\b[^>]*>|<title\b[^>]*>[\s\S]*?<\/title>|<script\b[^>]*\basync\b[^>]*><\/script>|<style\b[^>]*\bdata-precedence\b[^>]*>[\s\S]*?<\/style>)/i;
117
117
  function peelDocumentPrefix(markup) {
118
118
  let inner = markup.replace(/^\s+/, "");
@@ -1,9 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
+ var _chunkUNJZGVPUcjs = require('./chunk-UNJZGVPU.cjs');
3
4
 
4
5
 
5
6
 
6
- var _chunkSGBJ247Qcjs = require('./chunk-SGBJ247Q.cjs');
7
+
8
+
9
+ var _chunkD4ROBNTKcjs = require('./chunk-D4ROBNTK.cjs');
7
10
 
8
11
 
9
12
  var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
@@ -170,7 +173,7 @@ async function anonymousVisitorOpensPage(options, url, targetPathname) {
170
173
  if (!PAGE_CHECK_DROPPED_HEADERS.has(name.toLowerCase())) headers.append(name, value);
171
174
  }
172
175
  headers.set("accept", "text/html");
173
- headers.set(_chunkSGBJ247Qcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER, _chunkSGBJ247Qcjs._getFarmMarkdownPageCheckToken.call(void 0, ));
176
+ headers.set(_chunkD4ROBNTKcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER, _chunkD4ROBNTKcjs._getFarmMarkdownPageCheckToken.call(void 0, ));
174
177
  const response = await options.renderPage(
175
178
  new Request(pageUrl, {
176
179
  method: "GET",
@@ -194,7 +197,7 @@ function hasOnlyAnonymousHeaders(headers) {
194
197
  return true;
195
198
  }
196
199
  _chunkS3JO3N4Hcjs.__name.call(void 0, hasOnlyAnonymousHeaders, "hasOnlyAnonymousHeaders");
197
- var FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS = "192.0.2.1";
200
+ var FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS = _chunkUNJZGVPUcjs.FARM_ANONYMOUS_CLIENT_ADDRESS;
198
201
  async function createFarmMarkdownSourceResponse(options) {
199
202
  if (options.request.method !== "GET" && options.request.method !== "HEAD") {
200
203
  return null;
@@ -204,7 +207,7 @@ async function createFarmMarkdownSourceResponse(options) {
204
207
  }
205
208
  const url = new URL(options.request.url);
206
209
  const hasMarkdownExtension = url.pathname.toLowerCase().endsWith(".md");
207
- if (!hasMarkdownExtension && !_chunkSGBJ247Qcjs.requestAcceptsMarkdown.call(void 0, options.request.headers.get("accept"))) {
210
+ if (!hasMarkdownExtension && !_chunkD4ROBNTKcjs.requestAcceptsMarkdown.call(void 0, options.request.headers.get("accept"))) {
208
211
  return null;
209
212
  }
210
213
  const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname);
@@ -266,7 +269,7 @@ async function createFarmMarkdownSourceResponse(options) {
266
269
  if (!hasMarkdownExtension) {
267
270
  headers.set("Vary", "Accept");
268
271
  }
269
- return _chunkSGBJ247Qcjs.createFarmMarkdownViewResponse.call(void 0, {
272
+ return _chunkD4ROBNTKcjs.createFarmMarkdownViewResponse.call(void 0, {
270
273
  request: options.request,
271
274
  requestUrl: url,
272
275
  markdown: source.source,
@@ -0,0 +1,77 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
4
+
5
+ // src/plugin-runtime-endpoint.ts
6
+ function normalizeFarmPluginRuntimeEndpointPath(pathname, label = "Farm plugin runtime endpoint") {
7
+ if (typeof pathname !== "string" || pathname.trim() !== pathname || pathname.length === 0) {
8
+ throw new TypeError(`${label} path must be a non-empty pathname without surrounding spaces`);
9
+ }
10
+ if (!pathname.startsWith("/") || pathname.startsWith("//") || pathname.includes("?") || pathname.includes("#") || pathname.includes("*")) {
11
+ throw new TypeError(`${label} path must be an exact pathname such as "/status"`);
12
+ }
13
+ if (pathname.includes("\\") || Array.from(pathname).some((character) => {
14
+ const code = character.charCodeAt(0);
15
+ return code <= 31 || code >= 127 && code <= 159;
16
+ })) {
17
+ throw new TypeError(`${label} path cannot contain backslashes or control characters`);
18
+ }
19
+ for (const segment of pathname.split("/").slice(1)) {
20
+ let decoded = segment;
21
+ try {
22
+ decoded = decodeURIComponent(segment);
23
+ } catch (e) {
24
+ throw new TypeError(`${label} path contains a malformed percent escape`);
25
+ }
26
+ if (decoded.includes("/") || decoded.includes("\\")) {
27
+ throw new TypeError(`${label} path cannot contain percent-encoded path separators`);
28
+ }
29
+ if (Array.from(decoded).some((character) => {
30
+ const code = character.charCodeAt(0);
31
+ return code <= 31 || code >= 127 && code <= 159;
32
+ })) {
33
+ throw new TypeError(`${label} path cannot contain control characters`);
34
+ }
35
+ if (decoded === "." || decoded === "..") {
36
+ throw new TypeError(`${label} path cannot contain dot segments`);
37
+ }
38
+ }
39
+ return normalizeRuntimeEndpointRequestPath(pathname);
40
+ }
41
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeFarmPluginRuntimeEndpointPath, "normalizeFarmPluginRuntimeEndpointPath");
42
+ function normalizeRuntimeEndpointRequestPath(pathname) {
43
+ return pathname.length > 1 ? pathname.replace(/\/+$/, "") || "/" : pathname;
44
+ }
45
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeRuntimeEndpointRequestPath, "normalizeRuntimeEndpointRequestPath");
46
+ function farmPluginMayAffectRuntimePath(plugin, pathname) {
47
+ const runtime = plugin.runtime;
48
+ const endpoints = _optionalChain([runtime, 'optionalAccess', _ => _.endpoints]);
49
+ const hasUnscopedRequestHooks = Boolean(
50
+ plugin.init || plugin.ready || plugin.shutdown || _optionalChain([runtime, 'optionalAccess', _2 => _2.context]) || _optionalChain([runtime, 'optionalAccess', _3 => _3.before]) || _optionalChain([runtime, 'optionalAccess', _4 => _4.after]) || _optionalChain([runtime, 'optionalAccess', _5 => _5.error]) || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML || plugin.beforeRequest || plugin.afterResponse
51
+ );
52
+ if (hasUnscopedRequestHooks) return true;
53
+ if (Array.isArray(endpoints) && endpoints.length > 0) {
54
+ const normalizedPathname = normalizeRuntimeEndpointRequestPath(pathname);
55
+ return endpoints.some(
56
+ (endpoint) => normalizeFarmPluginRuntimeEndpointPath(
57
+ endpoint.path,
58
+ `Farm plugin "${plugin.name}" runtime endpoint`
59
+ ) === normalizedPathname
60
+ );
61
+ }
62
+ return Boolean(plugin.setup || _optionalChain([runtime, 'optionalAccess', _6 => _6.start]) || _optionalChain([runtime, 'optionalAccess', _7 => _7.close]));
63
+ }
64
+ _chunkS3JO3N4Hcjs.__name.call(void 0, farmPluginMayAffectRuntimePath, "farmPluginMayAffectRuntimePath");
65
+ function _farmPluginsKeepResponsesPrivate(plugins) {
66
+ return plugins.some(
67
+ (plugin) => typeof _optionalChain([plugin, 'optionalAccess', _8 => _8.runtime, 'optionalAccess', _9 => _9.before]) === "function" && plugin.runtime.cache !== "public"
68
+ );
69
+ }
70
+ _chunkS3JO3N4Hcjs.__name.call(void 0, _farmPluginsKeepResponsesPrivate, "_farmPluginsKeepResponsesPrivate");
71
+
72
+
73
+
74
+
75
+
76
+
77
+ exports.normalizeFarmPluginRuntimeEndpointPath = normalizeFarmPluginRuntimeEndpointPath; exports.normalizeRuntimeEndpointRequestPath = normalizeRuntimeEndpointRequestPath; exports.farmPluginMayAffectRuntimePath = farmPluginMayAffectRuntimePath; exports._farmPluginsKeepResponsesPrivate = _farmPluginsKeepResponsesPrivate;