@farm.js/core 0.1.36 → 0.1.38

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 (272) hide show
  1. package/dist/{agent-mcp-BVExL8rZ.d.mts → agent-mcp-BwKlpnc7.d.mts} +1 -1
  2. package/dist/{agent-mcp-luzfXK-P.d.ts → agent-mcp-De1imoMS.d.ts} +1 -1
  3. package/dist/{agent-mcp-handler-SJAHFSPI.cjs → agent-mcp-handler-MRGP3WJ3.cjs} +5 -5
  4. package/dist/{agent-mcp-handler-LPJ2CADR.mjs → agent-mcp-handler-OLRMZONF.mjs} +4 -4
  5. package/dist/agent-runtime.cjs +3 -3
  6. package/dist/agent-runtime.d.mts +1 -1
  7. package/dist/agent-runtime.d.ts +1 -1
  8. package/dist/agent-runtime.mjs +2 -2
  9. package/dist/api/client.cjs +3 -3
  10. package/dist/api/client.mjs +2 -2
  11. package/dist/api/route-manager.cjs +6 -6
  12. package/dist/api/route-manager.d.mts +3 -3
  13. package/dist/api/route-manager.d.ts +3 -3
  14. package/dist/api/route-manager.mjs +5 -5
  15. package/dist/api/runtime.cjs +4 -4
  16. package/dist/api/runtime.d.mts +2 -2
  17. package/dist/api/runtime.d.ts +2 -2
  18. package/dist/api/runtime.mjs +3 -3
  19. package/dist/api.cjs +9 -8
  20. package/dist/api.d.mts +3 -3
  21. package/dist/api.d.ts +3 -3
  22. package/dist/api.mjs +8 -7
  23. package/dist/{app-BukwkFIu.d.mts → app-CFZt-srr.d.mts} +21 -3
  24. package/dist/{app-Yfa2dsFy.d.ts → app-kT_QXTdx.d.ts} +21 -3
  25. package/dist/app-markdown.cjs +6 -4
  26. package/dist/app-markdown.d.mts +3 -3
  27. package/dist/app-markdown.d.ts +3 -3
  28. package/dist/app-markdown.mjs +5 -3
  29. package/dist/{chunk-ADEA7PN3.cjs → chunk-2DD4JMQC.cjs} +113 -22
  30. package/dist/chunk-2ZYGC6SS.cjs +576 -0
  31. package/dist/{chunk-JZVADIOD.cjs → chunk-34UCJRQO.cjs} +2 -2
  32. package/dist/{chunk-D2BB47NB.cjs → chunk-3LOLJTFV.cjs} +6 -6
  33. package/dist/{chunk-KXWRO25S.cjs → chunk-472NCAZ7.cjs} +3 -3
  34. package/dist/chunk-4E5QXOCL.cjs +109 -0
  35. package/dist/{chunk-Z2HLU4IX.cjs → chunk-4GWRFP22.cjs} +23 -2
  36. package/dist/{chunk-VQLJWDVW.cjs → chunk-4IE345DM.cjs} +37 -19
  37. package/dist/{chunk-O6WAEAX3.mjs → chunk-5BWWFHR2.mjs} +70 -15
  38. package/dist/{chunk-JNUWCDTF.cjs → chunk-5D2JIPLH.cjs} +2 -2
  39. package/dist/{chunk-BO36SELV.cjs → chunk-5OKBARDN.cjs} +2 -2
  40. package/dist/{chunk-AO6RYU5N.cjs → chunk-5PWXMJOH.cjs} +30 -22
  41. package/dist/{chunk-AHGECQEW.mjs → chunk-666CKENS.mjs} +1 -1
  42. package/dist/chunk-6BK3K2GB.mjs +318 -0
  43. package/dist/{chunk-O6I6VWKK.mjs → chunk-6HB6V3R7.mjs} +1 -1
  44. package/dist/{chunk-UXFQ3UDA.cjs → chunk-6XWDE2P2.cjs} +61 -4
  45. package/dist/{chunk-VILIPRS6.mjs → chunk-7FPTZLKH.mjs} +1 -1
  46. package/dist/{chunk-SC2WYWPF.mjs → chunk-7PEP3BUT.mjs} +3 -3
  47. package/dist/{chunk-4E5AEDKY.mjs → chunk-A3EAIURZ.mjs} +25 -7
  48. package/dist/{chunk-YDQZGSDS.mjs → chunk-ARC7I3O2.mjs} +1 -1
  49. package/dist/{chunk-LSZAVSGY.mjs → chunk-B6G5CKMC.mjs} +101 -10
  50. package/dist/{chunk-3KZS4SUS.mjs → chunk-BZHXGVMA.mjs} +1 -1
  51. package/dist/{chunk-KN7K4VQN.mjs → chunk-CNNOLE4O.mjs} +1 -1
  52. package/dist/{chunk-4GLOOWKE.mjs → chunk-CQMVIOYP.mjs} +1 -1
  53. package/dist/{chunk-2ELDTQRN.mjs → chunk-CUM5NYL5.mjs} +1 -1
  54. package/dist/{chunk-HITLGIAO.cjs → chunk-CY2ZQ5C6.cjs} +7 -6
  55. package/dist/{chunk-PZNL3WEG.mjs → chunk-DMEPTZTI.mjs} +22 -11
  56. package/dist/{chunk-QORUJDIV.mjs → chunk-DRLKAXDM.mjs} +2 -2
  57. package/dist/{chunk-DQQOKWYA.cjs → chunk-EIPC3FDA.cjs} +12 -4
  58. package/dist/{chunk-HOXTWRGB.mjs → chunk-EKF7KDFD.mjs} +5 -2
  59. package/dist/{chunk-42NHY7HW.cjs → chunk-EKN7NSZO.cjs} +62 -14
  60. package/dist/{chunk-YKX5BK66.cjs → chunk-EMO6K4YY.cjs} +7 -7
  61. package/dist/{chunk-6SJ2KJTA.mjs → chunk-EPYU2EBL.mjs} +1 -1
  62. package/dist/{chunk-D227TIEN.cjs → chunk-FWE7LEQC.cjs} +13 -13
  63. package/dist/{chunk-PTZ2TVNE.cjs → chunk-H5CLOUZS.cjs} +5 -5
  64. package/dist/{chunk-DTSROJ5J.mjs → chunk-HD5CF3OE.mjs} +1 -1
  65. package/dist/{chunk-35GKZR22.mjs → chunk-HXRYZWTA.mjs} +1 -1
  66. package/dist/{chunk-JG6DJF5A.mjs → chunk-HZFM2LWQ.mjs} +22 -1
  67. package/dist/{chunk-MKYBIIAQ.mjs → chunk-IBUQWVYA.mjs} +17 -1
  68. package/dist/{chunk-F2SE2VDO.mjs → chunk-IHQIOZLC.mjs} +1 -1
  69. package/dist/{chunk-W7LF2J2S.mjs → chunk-INL3THCU.mjs} +1 -1
  70. package/dist/{chunk-WZ77PUAM.mjs → chunk-IVLZZZEI.mjs} +1 -1
  71. package/dist/{chunk-ENLZ4R3Y.mjs → chunk-J7K2NZD6.mjs} +7 -6
  72. package/dist/{chunk-BPOF5U4N.mjs → chunk-JCKYH4LG.mjs} +10 -7
  73. package/dist/{chunk-77GNHH2Z.cjs → chunk-JCYYXBAJ.cjs} +3 -3
  74. package/dist/{chunk-C4SPBWFM.cjs → chunk-JEZO6VUR.cjs} +10 -1
  75. package/dist/{chunk-ZWM5KGAA.cjs → chunk-KCQBAKIY.cjs} +23 -20
  76. package/dist/{chunk-OTC5BDGO.mjs → chunk-KHKLMNI5.mjs} +12 -7
  77. package/dist/{chunk-DZ5ZVB2K.cjs → chunk-KKSTAEMY.cjs} +1 -1
  78. package/dist/{chunk-N2NAS2AM.cjs → chunk-L4DD7ODZ.cjs} +2 -2
  79. package/dist/{chunk-YSCV4SJF.cjs → chunk-L5H2GSUC.cjs} +4 -4
  80. package/dist/{chunk-OO7GXVSR.mjs → chunk-LI2F57NI.mjs} +1 -1
  81. package/dist/{chunk-NRSN7G7E.mjs → chunk-MLY2RP5R.mjs} +10 -2
  82. package/dist/{chunk-BPMATOP2.cjs → chunk-N32CC42M.cjs} +25 -20
  83. package/dist/{chunk-FNO7A7CM.cjs → chunk-NBBEQLOK.cjs} +34 -16
  84. package/dist/{chunk-XCMCS4DA.mjs → chunk-ND2CWPOD.mjs} +2 -2
  85. package/dist/{chunk-GQRWBCWK.mjs → chunk-OAHTRMIC.mjs} +13 -5
  86. package/dist/{chunk-35WV46VL.mjs → chunk-OCIEZME4.mjs} +876 -685
  87. package/dist/{chunk-UH6QN5NL.mjs → chunk-P664ZVTV.mjs} +2 -2
  88. package/dist/{chunk-TE2G5ION.cjs → chunk-PGZDEPTM.cjs} +88 -33
  89. package/dist/{chunk-FDR64H6B.mjs → chunk-POSPE3IO.mjs} +59 -2
  90. package/dist/{chunk-UVW64BCB.cjs → chunk-Q3NXS4MU.cjs} +16 -14
  91. package/dist/{chunk-4WCZJQUO.mjs → chunk-QFW2IH5E.mjs} +57 -9
  92. package/dist/{chunk-5SJWVY6R.mjs → chunk-QHSH7IH4.mjs} +9 -0
  93. package/dist/chunk-QRKIMN7T.mjs +48 -0
  94. package/dist/chunk-QTXBII4Z.cjs +632 -0
  95. package/dist/{chunk-CI6E3UOH.cjs → chunk-RG4A6LB2.cjs} +7 -7
  96. package/dist/{chunk-BJPBQNIE.cjs → chunk-RW63BOV7.cjs} +2 -2
  97. package/dist/{chunk-FO427P6I.cjs → chunk-RWFLWR5J.cjs} +10 -10
  98. package/dist/{chunk-FFFW3OQ7.cjs → chunk-S6FJO323.cjs} +2 -2
  99. package/dist/{chunk-EUV4YR3V.cjs → chunk-SGBJ247Q.cjs} +18 -2
  100. package/dist/chunk-SGBZPZUW.mjs +75 -0
  101. package/dist/{chunk-2NNMOPDN.mjs → chunk-SKVTP5PR.mjs} +4 -1
  102. package/dist/{chunk-2YTDKNH3.cjs → chunk-TGFQVLLF.cjs} +956 -765
  103. package/dist/{chunk-IHNIDL6H.cjs → chunk-TO4GJ56K.cjs} +22 -11
  104. package/dist/{chunk-276VJSM6.mjs → chunk-TUBTR2OP.mjs} +250 -118
  105. package/dist/{chunk-GQ3Z3IZI.cjs → chunk-TYJALEHQ.cjs} +18 -18
  106. package/dist/chunk-TYMMBFN2.mjs +109 -0
  107. package/dist/chunk-U6QLDL3G.mjs +576 -0
  108. package/dist/{chunk-U4KT7QP3.cjs → chunk-ULASELLA.cjs} +26 -1
  109. package/dist/chunk-UXHS27O6.cjs +75 -0
  110. package/dist/{chunk-WWIKMBRN.mjs → chunk-VNGH5MLF.mjs} +17 -1
  111. package/dist/{chunk-EZDQRNQ7.mjs → chunk-VT4WFRHA.mjs} +23 -5
  112. package/dist/{chunk-CBJJH36A.cjs → chunk-VU6AAZVY.cjs} +20 -4
  113. package/dist/{chunk-27ZWSI3W.cjs → chunk-VXEEATVD.cjs} +2 -2
  114. package/dist/{chunk-EWET4D2Y.mjs → chunk-W36M2BQ4.mjs} +3 -3
  115. package/dist/{chunk-4WQ6PGSJ.cjs → chunk-WEW2JVA4.cjs} +4 -4
  116. package/dist/{chunk-4E5WBPEG.mjs → chunk-WFRT7JPX.mjs} +8 -533
  117. package/dist/{chunk-T4OGRVNS.mjs → chunk-WLL43JMO.mjs} +2 -2
  118. package/dist/chunk-WW46B6HA.cjs +318 -0
  119. package/dist/{chunk-TKSCR644.cjs → chunk-WXJLNP33.cjs} +2 -2
  120. package/dist/{chunk-S6VYG6XU.cjs → chunk-XKG2BLFN.cjs} +2 -2
  121. package/dist/{chunk-4NU4GGTC.cjs → chunk-XKVVMZP5.cjs} +6 -3
  122. package/dist/{chunk-NMHWYWDR.cjs → chunk-YR2VBEMO.cjs} +658 -526
  123. package/dist/{chunk-OHLSEQ57.mjs → chunk-ZJD2PN6Z.mjs} +10 -8
  124. package/dist/{chunk-3BU22U3M.cjs → chunk-ZXH4TS3F.cjs} +5 -2
  125. package/dist/{client-plugins-r1mOtSC1.d.ts → client-plugins-BvlNhGEB.d.ts} +54 -7
  126. package/dist/{client-plugins-C3mK9Pol.d.mts → client-plugins-DUrIYX9B.d.mts} +54 -7
  127. package/dist/client-plugins.d.mts +1 -1
  128. package/dist/client-plugins.d.ts +1 -1
  129. package/dist/client.cjs +8 -8
  130. package/dist/client.d.mts +5 -5
  131. package/dist/client.d.ts +5 -5
  132. package/dist/client.mjs +7 -7
  133. package/dist/config.d.mts +1 -1
  134. package/dist/config.d.ts +1 -1
  135. package/dist/{devtools-ERIKFEXX.mjs → devtools-JYJNOLPQ.mjs} +8 -6
  136. package/dist/{devtools-JZJJY5CK.cjs → devtools-VQWJANJV.cjs} +9 -7
  137. package/dist/docs.cjs +12 -10
  138. package/dist/docs.d.mts +20 -2
  139. package/dist/docs.d.ts +20 -2
  140. package/dist/docs.mjs +11 -9
  141. package/dist/headers.cjs +6 -4
  142. package/dist/headers.d.mts +11 -1
  143. package/dist/headers.d.ts +11 -1
  144. package/dist/headers.mjs +5 -3
  145. package/dist/i18n/client.cjs +11 -11
  146. package/dist/i18n/client.mjs +3 -3
  147. package/dist/index.cjs +62 -46
  148. package/dist/index.d.mts +16 -16
  149. package/dist/index.d.ts +16 -16
  150. package/dist/index.mjs +62 -46
  151. package/dist/integrations.cjs +5 -3
  152. package/dist/integrations.d.mts +1 -1
  153. package/dist/integrations.d.ts +1 -1
  154. package/dist/integrations.mjs +4 -2
  155. package/dist/internal/app-markdown-runtime.cjs +5 -3
  156. package/dist/internal/app-markdown-runtime.d.mts +19 -5
  157. package/dist/internal/app-markdown-runtime.d.ts +19 -5
  158. package/dist/internal/app-markdown-runtime.mjs +4 -2
  159. package/dist/internal/build-runtime.cjs +33 -30
  160. package/dist/internal/build-runtime.d.mts +3 -3
  161. package/dist/internal/build-runtime.d.ts +3 -3
  162. package/dist/internal/build-runtime.mjs +32 -29
  163. package/dist/internal/cli-runtime.cjs +14 -12
  164. package/dist/internal/cli-runtime.mjs +13 -11
  165. package/dist/internal/client-error-overlay.cjs +4 -4
  166. package/dist/internal/client-error-overlay.mjs +1 -1
  167. package/dist/internal/client-runtime.cjs +2 -2
  168. package/dist/internal/client-runtime.mjs +1 -1
  169. package/dist/internal/compression-runtime.d.mts +1 -1
  170. package/dist/internal/compression-runtime.d.ts +1 -1
  171. package/dist/internal/config-runtime.cjs +9 -7
  172. package/dist/internal/config-runtime.d.mts +2 -2
  173. package/dist/internal/config-runtime.d.ts +2 -2
  174. package/dist/internal/config-runtime.mjs +8 -6
  175. package/dist/internal/docs-precompiled-runtime.cjs +19 -13
  176. package/dist/internal/docs-precompiled-runtime.d.mts +5 -0
  177. package/dist/internal/docs-precompiled-runtime.d.ts +5 -0
  178. package/dist/internal/docs-precompiled-runtime.mjs +14 -8
  179. package/dist/internal/infra-analytics-runtime.cjs +5 -5
  180. package/dist/internal/infra-analytics-runtime.mjs +3 -3
  181. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  182. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  183. package/dist/internal/production-node-env.cjs +6 -2
  184. package/dist/internal/production-node-env.d.mts +10 -1
  185. package/dist/internal/production-node-env.d.ts +10 -1
  186. package/dist/internal/production-node-env.mjs +5 -1
  187. package/dist/internal/production-runtime.cjs +39 -54
  188. package/dist/internal/production-runtime.d.mts +51 -11
  189. package/dist/internal/production-runtime.d.ts +51 -11
  190. package/dist/internal/production-runtime.mjs +39 -54
  191. package/dist/markdown.cjs +8 -2
  192. package/dist/markdown.d.mts +1 -1
  193. package/dist/markdown.d.ts +1 -1
  194. package/dist/markdown.mjs +7 -1
  195. package/dist/middleware.cjs +10 -8
  196. package/dist/middleware.d.mts +27 -5
  197. package/dist/middleware.d.ts +27 -5
  198. package/dist/middleware.mjs +10 -8
  199. package/dist/navigation.cjs +7 -7
  200. package/dist/navigation.d.mts +4 -4
  201. package/dist/navigation.d.ts +4 -4
  202. package/dist/navigation.mjs +6 -6
  203. package/dist/plugin.cjs +25 -23
  204. package/dist/plugin.d.mts +1 -1
  205. package/dist/plugin.d.ts +1 -1
  206. package/dist/plugin.mjs +24 -22
  207. package/dist/{production-runtime-CCeVZXst.d.mts → production-runtime-BQ4_WLwQ.d.mts} +1 -1
  208. package/dist/{production-runtime-DPnsggY3.d.ts → production-runtime-D2aMyzjr.d.ts} +1 -1
  209. package/dist/query/client.cjs +9 -9
  210. package/dist/query/client.mjs +4 -4
  211. package/dist/{render-plan-Cw4f5E_R.d.ts → render-plan-25p4hrj4.d.ts} +1 -1
  212. package/dist/{render-plan-BuGaPFe6.d.mts → render-plan-DtkXMN8D.d.mts} +1 -1
  213. package/dist/renderer-client.cjs +12 -12
  214. package/dist/renderer-client.d.mts +3 -3
  215. package/dist/renderer-client.d.ts +3 -3
  216. package/dist/renderer-client.mjs +4 -4
  217. package/dist/renderer.d.mts +13 -4
  218. package/dist/renderer.d.ts +13 -4
  219. package/dist/{request-CsGARcAw.d.mts → request-DgCkIdcn.d.mts} +4 -2
  220. package/dist/{request-Bkg-hERy.d.ts → request-jF4jwx8f.d.ts} +4 -2
  221. package/dist/request.cjs +3 -3
  222. package/dist/request.d.mts +2 -2
  223. package/dist/request.d.ts +2 -2
  224. package/dist/request.mjs +2 -2
  225. package/dist/{route-rendering-BUZMH_64.d.ts → route-rendering-Bji6S6a_.d.ts} +1 -1
  226. package/dist/{route-rendering-f11yh5dp.d.mts → route-rendering-CSBF78Ya.d.mts} +1 -1
  227. package/dist/{router-Cp6yRE8A.d.mts → router-B09Ui3Qm.d.mts} +1 -1
  228. package/dist/{router-B8CR9GbD.d.ts → router-CPB9cXtG.d.ts} +1 -1
  229. package/dist/routes.cjs +2 -2
  230. package/dist/routes.d.mts +1 -1
  231. package/dist/routes.d.ts +1 -1
  232. package/dist/routes.mjs +1 -1
  233. package/dist/{runtime-CAEv36S_.d.mts → runtime-CM6E6yuI.d.mts} +1 -1
  234. package/dist/{runtime-CQVsT330.d.ts → runtime-EDMwLdjv.d.ts} +1 -1
  235. package/dist/server-fn.cjs +3 -3
  236. package/dist/server-fn.mjs +2 -2
  237. package/dist/server-plugins.cjs +5 -5
  238. package/dist/server-plugins.d.mts +2 -2
  239. package/dist/server-plugins.d.ts +2 -2
  240. package/dist/server-plugins.mjs +4 -4
  241. package/dist/server-query.cjs +4 -4
  242. package/dist/server-query.mjs +3 -3
  243. package/dist/server.cjs +51 -49
  244. package/dist/server.d.mts +7 -7
  245. package/dist/server.d.ts +7 -7
  246. package/dist/server.mjs +29 -27
  247. package/dist/{spa-router-BuciWGCZ.d.ts → spa-router-B_N8XgVu.d.ts} +2 -2
  248. package/dist/{spa-router-DwbqGkGj.d.mts → spa-router-Cgimzfbi.d.mts} +2 -2
  249. package/dist/testing.cjs +8 -8
  250. package/dist/testing.d.mts +1 -1
  251. package/dist/testing.d.ts +1 -1
  252. package/dist/testing.mjs +6 -6
  253. package/dist/theme/server.cjs +4 -4
  254. package/dist/theme/server.mjs +3 -3
  255. package/dist/{utils-CaoWKtYM.d.ts → utils-BNxAKAuT.d.ts} +1 -1
  256. package/dist/{utils-B9V0S_yL.d.mts → utils-DZciYXYl.d.mts} +1 -1
  257. package/dist/version.cjs +2 -2
  258. package/dist/version.mjs +1 -1
  259. package/dist/vite.cjs +25 -23
  260. package/dist/vite.d.mts +1 -1
  261. package/dist/vite.d.ts +1 -1
  262. package/dist/vite.mjs +24 -22
  263. package/package.json +1 -1
  264. package/types/middleware.d.ts +5 -1
  265. package/dist/chunk-655RLQQL.mjs +0 -43
  266. package/dist/chunk-FXEF4PPL.mjs +0 -47
  267. package/dist/chunk-IZY3V5XW.mjs +0 -23
  268. package/dist/chunk-MRMI32SN.cjs +0 -1157
  269. package/dist/chunk-MT763TDW.cjs +0 -43
  270. package/dist/chunk-XD32KALF.cjs +0 -47
  271. /package/dist/{chunk-SJNMVDDF.cjs → chunk-FUCSUGDM.cjs} +0 -0
  272. /package/dist/{chunk-UDNPLXW7.mjs → chunk-MYIZXDZA.mjs} +0 -0
@@ -1,13 +1,9 @@
1
1
  import {
2
2
  isFarmMetadataNoIndex
3
- } from "./chunk-DTSROJ5J.mjs";
3
+ } from "./chunk-HD5CF3OE.mjs";
4
4
  import {
5
5
  matchesFarmMarkdownRoutePattern
6
- } from "./chunk-WWIKMBRN.mjs";
7
- import {
8
- _markFarmOwnedResponse,
9
- _withFarmResponseHeaders
10
- } from "./chunk-Z3HATSKO.mjs";
6
+ } from "./chunk-VNGH5MLF.mjs";
11
7
  import {
12
8
  applyFarmBasePath
13
9
  } from "./chunk-4RB44K6Z.mjs";
@@ -212,519 +208,6 @@ function isRecord(value) {
212
208
  }
213
209
  __name(isRecord, "isRecord");
214
210
 
215
- // src/security.ts
216
- function resolveFarmSecurityConfig(input) {
217
- if (input === void 0) return { csp: false };
218
- if (!isPlainRecord(input)) {
219
- throw new TypeError("security must be an object containing the csp option.");
220
- }
221
- if (Object.prototype.hasOwnProperty.call(input, "contentSecurityPolicy")) {
222
- throw new TypeError(
223
- "security.contentSecurityPolicy is not supported. Use security.csp instead."
224
- );
225
- }
226
- const csp = input.csp;
227
- if (csp === void 0 || csp === false) return { csp: false };
228
- if (typeof csp === "string") {
229
- return {
230
- csp: {
231
- value: validateSerializedCsp(csp),
232
- reportOnly: false,
233
- nonce: false
234
- }
235
- };
236
- }
237
- if (!isPlainRecord(csp)) {
238
- throw new TypeError("security.csp must be a policy string, false, or an options object.");
239
- }
240
- const reportOnly = validateReportOnly(csp.reportOnly);
241
- const nonce = validateNonce(csp.nonce);
242
- if (Object.prototype.hasOwnProperty.call(csp, "value")) {
243
- if (Object.prototype.hasOwnProperty.call(csp, "policy") || Object.prototype.hasOwnProperty.call(csp, "directives")) {
244
- throw new TypeError(
245
- "Resolved security.csp values cannot include policy or directives options."
246
- );
247
- }
248
- return {
249
- csp: {
250
- value: validateSerializedCsp(csp.value),
251
- reportOnly,
252
- nonce
253
- }
254
- };
255
- }
256
- const { policy, directives } = csp;
257
- if (policy !== void 0 && directives !== void 0) {
258
- throw new TypeError("security.csp accepts either policy or directives, not both.");
259
- }
260
- if (policy === void 0 && directives === void 0) {
261
- throw new TypeError("security.csp requires a policy string or directives object.");
262
- }
263
- return {
264
- csp: {
265
- value: policy !== void 0 ? validateSerializedCsp(policy) : serializeFarmCspDirectives(directives),
266
- reportOnly,
267
- nonce
268
- }
269
- };
270
- }
271
- __name(resolveFarmSecurityConfig, "resolveFarmSecurityConfig");
272
- function serializeFarmCspDirectives(directives) {
273
- if (!isPlainRecord(directives)) {
274
- throw new TypeError("security.csp.directives must be an object.");
275
- }
276
- const serialized = [];
277
- const normalizedNames = /* @__PURE__ */ new Set();
278
- for (const [configuredName, configuredValue] of Object.entries(directives)) {
279
- if (configuredValue === false || configuredValue === null || configuredValue === void 0) {
280
- continue;
281
- }
282
- const name = normalizeDirectiveName(configuredName);
283
- if (normalizedNames.has(name)) {
284
- throw new TypeError(`security.csp contains the duplicate directive ${JSON.stringify(name)}.`);
285
- }
286
- normalizedNames.add(name);
287
- const values = configuredValue === true ? [] : (Array.isArray(configuredValue) ? configuredValue : [configuredValue]).map(
288
- validateDirectiveValue
289
- );
290
- serialized.push(values.length > 0 ? `${name} ${values.join(" ")}` : name);
291
- }
292
- if (serialized.length === 0) {
293
- throw new TypeError("security.csp.directives must contain at least one enabled directive.");
294
- }
295
- return serialized.join("; ");
296
- }
297
- __name(serializeFarmCspDirectives, "serializeFarmCspDirectives");
298
- function getFarmSecurityHeader(security, nonce) {
299
- if (!security.csp) return void 0;
300
- if (security.csp.nonce && !nonce) return void 0;
301
- return {
302
- key: security.csp.reportOnly ? "Content-Security-Policy-Report-Only" : "Content-Security-Policy",
303
- value: nonce ? applyFarmCspNonceToPolicy(security.csp.value, nonce) : security.csp.value
304
- };
305
- }
306
- __name(getFarmSecurityHeader, "getFarmSecurityHeader");
307
- function createFarmCspNonce(security) {
308
- if (!security.csp || !security.csp.nonce) return void 0;
309
- const bytes = new Uint8Array(16);
310
- globalThis.crypto.getRandomValues(bytes);
311
- return Array.from(bytes, (value) => value.toString(16).padStart(2, "0")).join("");
312
- }
313
- __name(createFarmCspNonce, "createFarmCspNonce");
314
- function applyFarmCspNonceToPolicy(policy, nonce) {
315
- validateCspNonce(nonce);
316
- return applyFarmCspScriptSourcesToPolicy(policy, [`'nonce-${nonce}'`]);
317
- }
318
- __name(applyFarmCspNonceToPolicy, "applyFarmCspNonceToPolicy");
319
- function applyFarmCspHashesToPolicy(policy, hashes) {
320
- const sources = hashes.map((hash) => {
321
- if (!/^sha(?:256|384|512)-[A-Za-z0-9+/]+={0,2}$/.test(hash)) {
322
- throw new TypeError(`Invalid CSP script hash: ${JSON.stringify(hash)}.`);
323
- }
324
- return `'${hash}'`;
325
- });
326
- return applyFarmCspScriptSourcesToPolicy(policy, sources);
327
- }
328
- __name(applyFarmCspHashesToPolicy, "applyFarmCspHashesToPolicy");
329
- function applyFarmCspScriptSourcesToPolicy(policy, sources) {
330
- const uniqueSources = [...new Set(sources)];
331
- if (uniqueSources.length === 0) return policy;
332
- const segments = policy.split(";").map((segment) => segment.trim()).filter(Boolean);
333
- const names = segments.map((segment) => segment.split(/\s+/, 1)[0].toLowerCase());
334
- const governingName = names.includes("script-src-elem") ? "script-src-elem" : names.includes("script-src") ? "script-src" : names.includes("default-src") ? "default-src" : void 0;
335
- if (!governingName) return `${policy}; script-src ${uniqueSources.join(" ")}`;
336
- return segments.map((segment, index) => {
337
- if (names[index] !== governingName) return segment;
338
- const existing = new Set(segment.split(/\s+/));
339
- const missing = uniqueSources.filter((source) => !existing.has(source));
340
- return missing.length > 0 ? `${segment} ${missing.join(" ")}` : segment;
341
- }).join("; ");
342
- }
343
- __name(applyFarmCspScriptSourcesToPolicy, "applyFarmCspScriptSourcesToPolicy");
344
- function addFarmCspNonceToScriptTags(html, nonce) {
345
- validateCspNonce(nonce);
346
- return createFarmCspNonceRewriter(nonce).write(html, true);
347
- }
348
- __name(addFarmCspNonceToScriptTags, "addFarmCspNonceToScriptTags");
349
- function removeFarmCspNoncesFromScriptTags(html) {
350
- return createFarmScriptTagRewriter(stripScriptNonceAttribute).write(html, true);
351
- }
352
- __name(removeFarmCspNoncesFromScriptTags, "removeFarmCspNoncesFromScriptTags");
353
- async function createFarmCspScriptHashes(html) {
354
- const hashes = [];
355
- const seen = /* @__PURE__ */ new Set();
356
- for (const content of collectFarmInlineScriptContents(html)) {
357
- const digest = await globalThis.crypto.subtle.digest(
358
- "SHA-256",
359
- new TextEncoder().encode(content)
360
- );
361
- let binary = "";
362
- for (const byte of new Uint8Array(digest)) binary += String.fromCharCode(byte);
363
- const hash = `sha256-${globalThis.btoa(binary)}`;
364
- if (!seen.has(hash)) {
365
- seen.add(hash);
366
- hashes.push(hash);
367
- }
368
- }
369
- return hashes;
370
- }
371
- __name(createFarmCspScriptHashes, "createFarmCspScriptHashes");
372
- async function applyFarmCspHashesToHtml(html, security) {
373
- if (!security.csp || !security.csp.nonce) return void 0;
374
- const staticHtml = removeFarmCspNoncesFromScriptTags(html);
375
- const hashes = await createFarmCspScriptHashes(staticHtml);
376
- return {
377
- html: staticHtml,
378
- header: {
379
- key: security.csp.reportOnly ? "Content-Security-Policy-Report-Only" : "Content-Security-Policy",
380
- value: applyFarmCspHashesToPolicy(security.csp.value, hashes)
381
- }
382
- };
383
- }
384
- __name(applyFarmCspHashesToHtml, "applyFarmCspHashesToHtml");
385
- function applyFarmCspNonceToResponse(response, security) {
386
- if (!security.csp || !security.csp.nonce) return response;
387
- if (!response.headers.get("content-type")?.toLowerCase().includes("text/html")) return response;
388
- const nonce = createFarmCspNonce(security);
389
- const securityHeader = getFarmSecurityHeader(security, nonce);
390
- if (!response.body) {
391
- return _withFarmResponseHeaders(response, (headers2) => {
392
- headers2.set(securityHeader.key, securityHeader.value);
393
- headers2.delete("content-length");
394
- });
395
- }
396
- const headers = new Headers(response.headers);
397
- headers.set(securityHeader.key, securityHeader.value);
398
- headers.delete("content-length");
399
- const decoder = new TextDecoder();
400
- const encoder = new TextEncoder();
401
- const rewriter = createFarmCspNonceRewriter(nonce);
402
- const body = response.body.pipeThrough(
403
- new TransformStream({
404
- transform(chunk, controller) {
405
- const output = rewriter.write(decoder.decode(chunk, { stream: true }));
406
- if (output) controller.enqueue(encoder.encode(output));
407
- },
408
- flush(controller) {
409
- const output = rewriter.write(decoder.decode(), true);
410
- if (output) controller.enqueue(encoder.encode(output));
411
- }
412
- })
413
- );
414
- return _markFarmOwnedResponse(
415
- new Response(body, {
416
- status: response.status,
417
- statusText: response.statusText,
418
- headers
419
- })
420
- );
421
- }
422
- __name(applyFarmCspNonceToResponse, "applyFarmCspNonceToResponse");
423
- function farmCspBlocksFrameworkInlineScripts(security) {
424
- if (!security.csp) return false;
425
- if (security.csp.nonce) return false;
426
- const directives = parseCspDirectives(security.csp.value);
427
- const governing = directives.get("script-src-elem") ?? directives.get("script-src") ?? directives.get("default-src");
428
- if (!governing) return false;
429
- const sources = governing.map((source) => source.toLowerCase());
430
- const disablesUnsafeInline = sources.some(
431
- (value) => value === "'strict-dynamic'" || value.startsWith("'nonce-") || value.startsWith("'sha256-") || value.startsWith("'sha384-") || value.startsWith("'sha512-")
432
- );
433
- return !sources.includes("'unsafe-inline'") || disablesUnsafeInline;
434
- }
435
- __name(farmCspBlocksFrameworkInlineScripts, "farmCspBlocksFrameworkInlineScripts");
436
- function parseCspDirectives(value) {
437
- const directives = /* @__PURE__ */ new Map();
438
- for (const segment of value.split(";")) {
439
- const parts = segment.trim().split(/\s+/).filter(Boolean);
440
- if (parts.length === 0) continue;
441
- const name = parts[0].toLowerCase();
442
- if (!directives.has(name)) directives.set(name, parts.slice(1));
443
- }
444
- return directives;
445
- }
446
- __name(parseCspDirectives, "parseCspDirectives");
447
- function normalizeDirectiveName(value) {
448
- const name = value.trim().replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
449
- if (!/^[a-z][a-z0-9-]*$/.test(name)) {
450
- throw new TypeError(`Invalid security.csp directive name: ${JSON.stringify(value)}.`);
451
- }
452
- return name;
453
- }
454
- __name(normalizeDirectiveName, "normalizeDirectiveName");
455
- function validateDirectiveValue(value) {
456
- if (typeof value !== "string") {
457
- throw new TypeError("security.csp directive values must be strings or booleans.");
458
- }
459
- const normalized = value.trim();
460
- if (!normalized || /[;\r\n]/.test(normalized) || normalized.includes("\0")) {
461
- throw new TypeError(`Invalid security.csp directive value: ${JSON.stringify(value)}.`);
462
- }
463
- return normalized;
464
- }
465
- __name(validateDirectiveValue, "validateDirectiveValue");
466
- function validateSerializedCsp(value) {
467
- if (typeof value !== "string") {
468
- throw new TypeError("security.csp policy must be a non-empty single-line string.");
469
- }
470
- const normalized = value.trim().replace(/;+$/g, "").trim();
471
- if (!normalized || /[\r\n]/.test(normalized) || normalized.includes("\0")) {
472
- throw new TypeError("security.csp policy must be a non-empty single-line string.");
473
- }
474
- return normalized;
475
- }
476
- __name(validateSerializedCsp, "validateSerializedCsp");
477
- function validateReportOnly(value) {
478
- if (value === void 0) return false;
479
- if (typeof value !== "boolean") {
480
- throw new TypeError("security.csp.reportOnly must be a boolean.");
481
- }
482
- return value;
483
- }
484
- __name(validateReportOnly, "validateReportOnly");
485
- function validateNonce(value) {
486
- if (value === void 0) return false;
487
- if (typeof value !== "boolean") {
488
- throw new TypeError("security.csp.nonce must be a boolean.");
489
- }
490
- return value;
491
- }
492
- __name(validateNonce, "validateNonce");
493
- function validateCspNonce(value) {
494
- if (!/^[A-Za-z0-9+/_-]+={0,2}$/.test(value)) {
495
- throw new TypeError("A CSP nonce must be a base64 or base64url value.");
496
- }
497
- }
498
- __name(validateCspNonce, "validateCspNonce");
499
- function createFarmCspNonceRewriter(nonce) {
500
- validateCspNonce(nonce);
501
- return createFarmScriptTagRewriter((tag) => stampScriptTag(tag, nonce));
502
- }
503
- __name(createFarmCspNonceRewriter, "createFarmCspNonceRewriter");
504
- function createFarmScriptTagRewriter(transformScriptTag) {
505
- let pending = "";
506
- let rawTextElement;
507
- return {
508
- write(chunk, final = false) {
509
- pending += chunk;
510
- let output = "";
511
- while (pending) {
512
- if (rawTextElement) {
513
- if (rawTextElement === "plaintext") {
514
- output += pending;
515
- pending = "";
516
- break;
517
- }
518
- const closing = `</${rawTextElement}`;
519
- const start2 = findRawTextEnd(pending, rawTextElement);
520
- if (start2 === -1) {
521
- if (final) {
522
- output += pending;
523
- pending = "";
524
- } else {
525
- const keep = matchingSuffixLength(pending, closing);
526
- output += pending.slice(0, pending.length - keep);
527
- pending = pending.slice(pending.length - keep);
528
- }
529
- break;
530
- }
531
- output += pending.slice(0, start2);
532
- pending = pending.slice(start2);
533
- const end2 = findHtmlTagEnd(pending);
534
- if (end2 === -1) {
535
- if (final) {
536
- output += pending;
537
- pending = "";
538
- }
539
- break;
540
- }
541
- output += pending.slice(0, end2 + 1);
542
- pending = pending.slice(end2 + 1);
543
- rawTextElement = void 0;
544
- continue;
545
- }
546
- const start = pending.indexOf("<");
547
- if (start === -1) {
548
- output += pending;
549
- pending = "";
550
- break;
551
- }
552
- output += pending.slice(0, start);
553
- pending = pending.slice(start);
554
- if (pending.startsWith("<!--")) {
555
- const end2 = pending.indexOf("-->", 4);
556
- if (end2 === -1) {
557
- if (final) {
558
- output += pending;
559
- pending = "";
560
- }
561
- break;
562
- }
563
- output += pending.slice(0, end2 + 3);
564
- pending = pending.slice(end2 + 3);
565
- continue;
566
- }
567
- if (!final && "<!--".startsWith(pending)) break;
568
- const tagNameMatch = pending.match(/^<\/?([a-z][a-z0-9:-]*)\b/i);
569
- if (!tagNameMatch) {
570
- if (!final && /^<\/?[a-z][a-z0-9:-]*$/i.test(pending)) break;
571
- output += pending[0];
572
- pending = pending.slice(1);
573
- continue;
574
- }
575
- const end = findHtmlTagEnd(pending);
576
- if (end === -1) {
577
- if (!final) break;
578
- output += pending;
579
- pending = "";
580
- break;
581
- }
582
- const tag = pending.slice(0, end + 1);
583
- const tagName = tagNameMatch[1].toLowerCase();
584
- const isClosing = pending.startsWith("</");
585
- const isSelfClosing = /\/\s*>$/.test(tag);
586
- output += !isClosing && tagName === "script" ? transformScriptTag(tag) : tag;
587
- pending = pending.slice(end + 1);
588
- if (!isClosing && !isSelfClosing && rawTextElements.has(tagName)) {
589
- rawTextElement = tagName;
590
- }
591
- }
592
- return output;
593
- }
594
- };
595
- }
596
- __name(createFarmScriptTagRewriter, "createFarmScriptTagRewriter");
597
- var rawTextElements = /* @__PURE__ */ new Map([
598
- ["iframe", /<\/iframe(?=[\s/>]|$)/gi],
599
- ["noembed", /<\/noembed(?=[\s/>]|$)/gi],
600
- ["noframes", /<\/noframes(?=[\s/>]|$)/gi],
601
- ["plaintext", null],
602
- ["script", /<\/script(?=[\s/>]|$)/gi],
603
- ["style", /<\/style(?=[\s/>]|$)/gi],
604
- ["textarea", /<\/textarea(?=[\s/>]|$)/gi],
605
- ["title", /<\/title(?=[\s/>]|$)/gi],
606
- ["xmp", /<\/xmp(?=[\s/>]|$)/gi]
607
- ]);
608
- function stampScriptTag(tag, nonce) {
609
- const opening = tag.match(/^<script\b/i)?.[0];
610
- if (!opening) return tag;
611
- const attributes = stripScriptNonceAttribute(tag).slice(opening.length, -1);
612
- return `<script nonce="${nonce}"${attributes}>`;
613
- }
614
- __name(stampScriptTag, "stampScriptTag");
615
- function stripScriptNonceAttribute(tag) {
616
- let normalized = tag;
617
- let range = findScriptTagAttributeRange(normalized, "nonce");
618
- while (range) {
619
- normalized = normalized.slice(0, range.start) + normalized.slice(range.end);
620
- range = findScriptTagAttributeRange(normalized, "nonce");
621
- }
622
- return normalized;
623
- }
624
- __name(stripScriptNonceAttribute, "stripScriptNonceAttribute");
625
- function collectFarmInlineScriptContents(html) {
626
- const contents = [];
627
- let offset = 0;
628
- while (offset < html.length) {
629
- const start = html.indexOf("<", offset);
630
- if (start === -1) break;
631
- if (html.startsWith("<!--", start)) {
632
- const commentEnd = html.indexOf("-->", start + 4);
633
- offset = commentEnd === -1 ? html.length : commentEnd + 3;
634
- continue;
635
- }
636
- const remaining = html.slice(start);
637
- const tagNameMatch = remaining.match(/^<\/?([a-z][a-z0-9:-]*)\b/i);
638
- if (!tagNameMatch) {
639
- offset = start + 1;
640
- continue;
641
- }
642
- const tagEnd = findHtmlTagEnd(remaining);
643
- if (tagEnd === -1) break;
644
- const tag = remaining.slice(0, tagEnd + 1);
645
- const tagName = tagNameMatch[1].toLowerCase();
646
- const isClosing = remaining.startsWith("</");
647
- const isSelfClosing = /\/\s*>$/.test(tag);
648
- offset = start + tagEnd + 1;
649
- if (isClosing || isSelfClosing || !rawTextElements.has(tagName)) continue;
650
- if (tagName === "plaintext") break;
651
- const closingStart = findRawTextEnd(html, tagName, offset);
652
- const contentEnd = closingStart === -1 ? html.length : closingStart;
653
- if (tagName === "script" && !findScriptTagAttributeRange(tag, "src")) {
654
- contents.push(html.slice(offset, contentEnd));
655
- }
656
- if (closingStart === -1) break;
657
- const closingEnd = findHtmlTagEnd(html.slice(contentEnd));
658
- if (closingEnd === -1) break;
659
- offset = contentEnd + closingEnd + 1;
660
- }
661
- return contents;
662
- }
663
- __name(collectFarmInlineScriptContents, "collectFarmInlineScriptContents");
664
- function findScriptTagAttributeRange(tag, expectedName) {
665
- const opening = tag.match(/^<script\b/i)?.[0];
666
- if (!opening) return void 0;
667
- let offset = opening.length;
668
- while (offset < tag.length - 1) {
669
- const whitespaceStart = offset;
670
- while (/\s/.test(tag[offset] || "")) offset++;
671
- if (tag[offset] === "/" || tag[offset] === ">" || offset >= tag.length - 1) break;
672
- const nameStart = offset;
673
- while (offset < tag.length && !/[\s=/>]/.test(tag[offset])) offset++;
674
- const name = tag.slice(nameStart, offset).toLowerCase();
675
- while (/\s/.test(tag[offset] || "")) offset++;
676
- if (tag[offset] === "=") {
677
- offset++;
678
- while (/\s/.test(tag[offset] || "")) offset++;
679
- const quote = tag[offset] === '"' || tag[offset] === "'" ? tag[offset++] : void 0;
680
- if (quote) {
681
- while (offset < tag.length && tag[offset] !== quote) offset++;
682
- if (tag[offset] === quote) offset++;
683
- } else {
684
- while (offset < tag.length && !/[\s>]/.test(tag[offset])) offset++;
685
- }
686
- }
687
- if (name === expectedName) return { start: whitespaceStart, end: offset };
688
- }
689
- return void 0;
690
- }
691
- __name(findScriptTagAttributeRange, "findScriptTagAttributeRange");
692
- function findRawTextEnd(input, tagName, offset = 0) {
693
- const closing = rawTextElements.get(tagName);
694
- closing.lastIndex = offset;
695
- return closing.exec(input)?.index ?? -1;
696
- }
697
- __name(findRawTextEnd, "findRawTextEnd");
698
- function matchingSuffixLength(input, token) {
699
- const limit = Math.min(token.length - 1, input.length);
700
- for (let length = limit; length > 0; length--) {
701
- if (token.startsWith(input.slice(-length).toLowerCase())) return length;
702
- }
703
- return 0;
704
- }
705
- __name(matchingSuffixLength, "matchingSuffixLength");
706
- function findHtmlTagEnd(tag) {
707
- let quote;
708
- for (let index = 1; index < tag.length; index++) {
709
- const character = tag[index];
710
- if (quote) {
711
- if (character === quote) quote = void 0;
712
- } else if (character === '"' || character === "'") {
713
- quote = character;
714
- } else if (character === ">") {
715
- return index;
716
- }
717
- }
718
- return -1;
719
- }
720
- __name(findHtmlTagEnd, "findHtmlTagEnd");
721
- function isPlainRecord(value) {
722
- if (!value || typeof value !== "object" || Array.isArray(value)) return false;
723
- const prototype = Object.getPrototypeOf(value);
724
- return prototype === Object.prototype || prototype === null;
725
- }
726
- __name(isPlainRecord, "isPlainRecord");
727
-
728
211
  // src/preload.ts
729
212
  var DEFAULT_PRELOAD_CONFIG = {
730
213
  mode: "enforce",
@@ -977,7 +460,7 @@ function findHtmlLinkElements(html) {
977
460
  rawTextTag.lastIndex = start;
978
461
  const rawText = rawTextTag.exec(lowerHtml);
979
462
  if (rawText?.[1]) {
980
- const openingEnd = findHtmlTagEnd2(html, start);
463
+ const openingEnd = findHtmlTagEnd(html, start);
981
464
  if (openingEnd === -1) break;
982
465
  if (rawText[1] === "svg" && html[openingEnd - 2] === "/") {
983
466
  cursor = openingEnd;
@@ -992,13 +475,13 @@ function findHtmlLinkElements(html) {
992
475
  cursor = html.length;
993
476
  continue;
994
477
  }
995
- const closingEnd = findHtmlTagEnd2(html, closingStart);
478
+ const closingEnd = findHtmlTagEnd(html, closingStart);
996
479
  cursor = closingEnd === -1 ? html.length : closingEnd;
997
480
  continue;
998
481
  }
999
482
  linkTag.lastIndex = start;
1000
483
  if (linkTag.test(html)) {
1001
- const end = findHtmlTagEnd2(html, start);
484
+ const end = findHtmlTagEnd(html, start);
1002
485
  if (end === -1) break;
1003
486
  elements.push({ start, end, value: html.slice(start, end) });
1004
487
  cursor = end;
@@ -1006,7 +489,7 @@ function findHtmlLinkElements(html) {
1006
489
  }
1007
490
  ordinaryTag.lastIndex = start;
1008
491
  if (ordinaryTag.test(html)) {
1009
- const end = findHtmlTagEnd2(html, start);
492
+ const end = findHtmlTagEnd(html, start);
1010
493
  cursor = end === -1 ? html.length : end;
1011
494
  continue;
1012
495
  }
@@ -1042,7 +525,7 @@ function findHtmlClosingTag(html, tagName, start) {
1042
525
  return -1;
1043
526
  }
1044
527
  __name(findHtmlClosingTag, "findHtmlClosingTag");
1045
- function findHtmlTagEnd2(html, start) {
528
+ function findHtmlTagEnd(html, start) {
1046
529
  let quote;
1047
530
  for (let index = start + 1; index < html.length; index += 1) {
1048
531
  const character = html[index];
@@ -1056,7 +539,7 @@ function findHtmlTagEnd2(html, start) {
1056
539
  }
1057
540
  return -1;
1058
541
  }
1059
- __name(findHtmlTagEnd2, "findHtmlTagEnd");
542
+ __name(findHtmlTagEnd, "findHtmlTagEnd");
1060
543
  function removeHtmlLinkElements(html, elements, removed) {
1061
544
  let cursor = 0;
1062
545
  let output = "";
@@ -1138,14 +621,6 @@ export {
1138
621
  createFarmAgentRobots,
1139
622
  resolveFarmAgentSitemap,
1140
623
  createFarmDefaultSitemap,
1141
- resolveFarmSecurityConfig,
1142
- getFarmSecurityHeader,
1143
- createFarmCspNonce,
1144
- addFarmCspNonceToScriptTags,
1145
- applyFarmCspHashesToHtml,
1146
- applyFarmCspNonceToResponse,
1147
- farmCspBlocksFrameworkInlineScripts,
1148
- createFarmCspNonceRewriter,
1149
624
  resolveFarmPerformanceConfig,
1150
625
  manageFarmHtmlPreloads,
1151
626
  manageFarmLinkHeaderPreloads,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  findProgrammaticRouteFilesInDir
3
- } from "./chunk-UDNPLXW7.mjs";
3
+ } from "./chunk-MYIZXDZA.mjs";
4
4
  import {
5
5
  isFarmAPIRouteFileName
6
6
  } from "./chunk-CU625VAY.mjs";
@@ -17,7 +17,7 @@ import {
17
17
  matchAPIRouteAtBasePath,
18
18
  mergePluginAPIRoutes,
19
19
  resolveAPIRouteEndpoint
20
- } from "./chunk-O6I6VWKK.mjs";
20
+ } from "./chunk-6HB6V3R7.mjs";
21
21
  import {
22
22
  registerAPIRouteShape
23
23
  } from "./chunk-W3B4PKAW.mjs";