emdash 1.4.0 → 1.5.0

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 (1916) hide show
  1. package/dist/action-token-CKphU6ur.mjs +26 -0
  2. package/dist/action-token-CKphU6ur.mjs.map +1 -0
  3. package/dist/activation-X5iMalte.mjs +387 -0
  4. package/dist/activation-X5iMalte.mjs.map +1 -0
  5. package/dist/adapters-DFsc9XjW.d.mts +173 -0
  6. package/dist/adapters-DFsc9XjW.d.mts.map +1 -0
  7. package/dist/after-B3AvMfBQ.mjs +50 -0
  8. package/dist/after-B3AvMfBQ.mjs.map +1 -0
  9. package/dist/allowed-origins-BFDNF-05.mjs +116 -0
  10. package/dist/allowed-origins-BFDNF-05.mjs.map +1 -0
  11. package/dist/api/route-utils.d.mts +4 -4
  12. package/dist/api/route-utils.d.mts.map +1 -1
  13. package/dist/api/route-utils.mjs +7 -64
  14. package/dist/api/route-utils.mjs.map +1 -1
  15. package/dist/api/schemas/index.d.mts +2 -2
  16. package/dist/api/schemas/index.mjs +7 -12
  17. package/dist/api-tokens-B-p5eI6J.mjs +9 -0
  18. package/dist/api-tokens-B-p5eI6J.mjs.map +1 -0
  19. package/dist/api-tokens-D27OQ0oQ.mjs +173 -0
  20. package/dist/api-tokens-D27OQ0oQ.mjs.map +1 -0
  21. package/dist/apply-Culv7QJl.mjs +1774 -0
  22. package/dist/apply-Culv7QJl.mjs.map +1 -0
  23. package/dist/approvals-oLE5G5jw.mjs +460 -0
  24. package/dist/approvals-oLE5G5jw.mjs.map +1 -0
  25. package/dist/artifact-fetch-ByK_1pck.mjs +659 -0
  26. package/dist/artifact-fetch-ByK_1pck.mjs.map +1 -0
  27. package/dist/artifacts-BXKMIV2F.mjs +323 -0
  28. package/dist/artifacts-BXKMIV2F.mjs.map +1 -0
  29. package/dist/astro/index.d.mts +17 -15
  30. package/dist/astro/index.d.mts.map +1 -1
  31. package/dist/astro/index.mjs +217 -24
  32. package/dist/astro/index.mjs.map +1 -1
  33. package/dist/astro/middleware/auth.d.mts +15 -13
  34. package/dist/astro/middleware/auth.d.mts.map +1 -1
  35. package/dist/astro/middleware/auth.mjs +59 -24
  36. package/dist/astro/middleware/auth.mjs.map +1 -1
  37. package/dist/astro/middleware/media-usage-write-fence.d.mts.map +1 -1
  38. package/dist/astro/middleware/media-usage-write-fence.mjs +5 -7
  39. package/dist/astro/middleware/media-usage-write-fence.mjs.map +1 -1
  40. package/dist/astro/middleware/redirect.d.mts.map +1 -1
  41. package/dist/astro/middleware/redirect.mjs +18 -26
  42. package/dist/astro/middleware/redirect.mjs.map +1 -1
  43. package/dist/astro/middleware/request-context.d.mts.map +1 -1
  44. package/dist/astro/middleware/request-context.mjs +122 -79
  45. package/dist/astro/middleware/request-context.mjs.map +1 -1
  46. package/dist/astro/middleware/setup.mjs +1 -1
  47. package/dist/astro/middleware.d.mts +15 -13
  48. package/dist/astro/middleware.d.mts.map +1 -1
  49. package/dist/astro/middleware.mjs +62 -158
  50. package/dist/astro/middleware.mjs.map +1 -1
  51. package/dist/astro/routes/PluginRegistry.d.mts +1 -5
  52. package/dist/astro/routes/PluginRegistry.d.mts.map +1 -1
  53. package/dist/astro/routes/PluginRegistry.mjs +11 -10
  54. package/dist/astro/routes/PluginRegistry.mjs.map +1 -1
  55. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +3 -18
  56. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs.map +1 -1
  57. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +3 -18
  58. package/dist/astro/routes/api/admin/allowed-domains/index.mjs.map +1 -1
  59. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +2 -8
  60. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs.map +1 -1
  61. package/dist/astro/routes/api/admin/api-tokens/index.mjs +4 -9
  62. package/dist/astro/routes/api/admin/api-tokens/index.mjs.map +1 -1
  63. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +3 -8
  64. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs.map +1 -1
  65. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +5 -21
  66. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -1
  67. package/dist/astro/routes/api/admin/byline-fields/index.mjs +5 -21
  68. package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -1
  69. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +5 -21
  70. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -1
  71. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +8 -32
  72. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
  73. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +8 -32
  74. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
  75. package/dist/astro/routes/api/admin/bylines/index.mjs +8 -31
  76. package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
  77. package/dist/astro/routes/api/admin/comments/_id_/status.d.mts.map +1 -1
  78. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +9 -25
  79. package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
  80. package/dist/astro/routes/api/admin/comments/_id_.d.mts.map +1 -1
  81. package/dist/astro/routes/api/admin/comments/_id_.mjs +12 -12
  82. package/dist/astro/routes/api/admin/comments/_id_.mjs.map +1 -1
  83. package/dist/astro/routes/api/admin/comments/bulk.d.mts.map +1 -1
  84. package/dist/astro/routes/api/admin/comments/bulk.mjs +16 -25
  85. package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -1
  86. package/dist/astro/routes/api/admin/comments/counts.mjs +3 -10
  87. package/dist/astro/routes/api/admin/comments/counts.mjs.map +1 -1
  88. package/dist/astro/routes/api/admin/comments/index.mjs +5 -23
  89. package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -1
  90. package/dist/astro/routes/api/admin/core-update.mjs +160 -10
  91. package/dist/astro/routes/api/admin/core-update.mjs.map +1 -1
  92. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +4 -8
  93. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs.map +1 -1
  94. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -6
  95. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs.map +1 -1
  96. package/dist/astro/routes/api/admin/media-usage/activation.mjs +6 -25
  97. package/dist/astro/routes/api/admin/media-usage/activation.mjs.map +1 -1
  98. package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +6 -26
  99. package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs.map +1 -1
  100. package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +6 -26
  101. package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs.map +1 -1
  102. package/dist/astro/routes/api/admin/media-usage/progress.mjs +4 -29
  103. package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -1
  104. package/dist/astro/routes/api/admin/media-usage/repair.mjs +5 -36
  105. package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
  106. package/dist/astro/routes/api/admin/media-usage/work/index.mjs +6 -26
  107. package/dist/astro/routes/api/admin/media-usage/work/index.mjs.map +1 -1
  108. package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +6 -26
  109. package/dist/astro/routes/api/admin/media-usage/work/retry.mjs.map +1 -1
  110. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +3 -7
  111. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs.map +1 -1
  112. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +3 -7
  113. package/dist/astro/routes/api/admin/oauth-clients/index.mjs.map +1 -1
  114. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +4 -10
  115. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
  116. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +4 -10
  117. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
  118. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +3 -86
  119. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
  120. package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +4 -8
  121. package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs.map +1 -1
  122. package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +4 -85
  123. package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
  124. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +5 -85
  125. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
  126. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +9 -96
  127. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
  128. package/dist/astro/routes/api/admin/plugins/index.mjs +3 -86
  129. package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
  130. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -8
  131. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs.map +1 -1
  132. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +3 -85
  133. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
  134. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +9 -96
  135. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
  136. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +3 -85
  137. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
  138. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +7 -85
  139. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
  140. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +14 -97
  141. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
  142. package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +6 -10
  143. package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
  144. package/dist/astro/routes/api/admin/plugins/registry/install.mjs +11 -88
  145. package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
  146. package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +4 -8
  147. package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs.map +1 -1
  148. package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +8 -86
  149. package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
  150. package/dist/astro/routes/api/admin/plugins/updates.mjs +7 -85
  151. package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
  152. package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +4 -8
  153. package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs.map +1 -1
  154. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +3 -85
  155. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
  156. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -8
  157. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs.map +1 -1
  158. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +3 -85
  159. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
  160. package/dist/astro/routes/api/admin/transfer/_...path_.mjs +1 -5
  161. package/dist/astro/routes/api/admin/transfer/_...path_.mjs.map +1 -1
  162. package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +6 -49
  163. package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs.map +1 -1
  164. package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +6 -49
  165. package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs.map +1 -1
  166. package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +8 -51
  167. package/dist/astro/routes/api/admin/transfer/approvals/index.mjs.map +1 -1
  168. package/dist/astro/routes/api/admin/transfer/capabilities.mjs +8 -50
  169. package/dist/astro/routes/api/admin/transfer/capabilities.mjs.map +1 -1
  170. package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +7 -51
  171. package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs.map +1 -1
  172. package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +8 -52
  173. package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs.map +1 -1
  174. package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +8 -52
  175. package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs.map +1 -1
  176. package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +7 -51
  177. package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs.map +1 -1
  178. package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +8 -52
  179. package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs.map +1 -1
  180. package/dist/astro/routes/api/admin/transfer/exports/index.mjs +9 -53
  181. package/dist/astro/routes/api/admin/transfer/exports/index.mjs.map +1 -1
  182. package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +7 -51
  183. package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs.map +1 -1
  184. package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +7 -51
  185. package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs.map +1 -1
  186. package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +9 -52
  187. package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs.map +1 -1
  188. package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +7 -51
  189. package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs.map +1 -1
  190. package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +10 -53
  191. package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs.map +1 -1
  192. package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +8 -51
  193. package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs.map +1 -1
  194. package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +7 -51
  195. package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs.map +1 -1
  196. package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +9 -53
  197. package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs.map +1 -1
  198. package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +7 -51
  199. package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs.map +1 -1
  200. package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +7 -51
  201. package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs.map +1 -1
  202. package/dist/astro/routes/api/admin/transfer/imports/index.mjs +11 -53
  203. package/dist/astro/routes/api/admin/transfer/imports/index.mjs.map +1 -1
  204. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -6
  205. package/dist/astro/routes/api/admin/users/_id_/disable.mjs.map +1 -1
  206. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -5
  207. package/dist/astro/routes/api/admin/users/_id_/enable.mjs.map +1 -1
  208. package/dist/astro/routes/api/admin/users/_id_/index.mjs +4 -19
  209. package/dist/astro/routes/api/admin/users/_id_/index.mjs.map +1 -1
  210. package/dist/astro/routes/api/admin/users/_id_/send-recovery.d.mts.map +1 -1
  211. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +11 -10
  212. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs.map +1 -1
  213. package/dist/astro/routes/api/admin/users/index.mjs +3 -18
  214. package/dist/astro/routes/api/admin/users/index.mjs.map +1 -1
  215. package/dist/astro/routes/api/auth/dev-bypass.d.mts.map +1 -1
  216. package/dist/astro/routes/api/auth/dev-bypass.mjs +10 -7
  217. package/dist/astro/routes/api/auth/dev-bypass.mjs.map +1 -1
  218. package/dist/astro/routes/api/auth/handover.mjs +3 -9
  219. package/dist/astro/routes/api/auth/handover.mjs.map +1 -1
  220. package/dist/astro/routes/api/auth/invite/accept.mjs +1 -5
  221. package/dist/astro/routes/api/auth/invite/accept.mjs.map +1 -1
  222. package/dist/astro/routes/api/auth/invite/complete.d.mts.map +1 -1
  223. package/dist/astro/routes/api/auth/invite/complete.mjs +11 -26
  224. package/dist/astro/routes/api/auth/invite/complete.mjs.map +1 -1
  225. package/dist/astro/routes/api/auth/invite/index.d.mts.map +1 -1
  226. package/dist/astro/routes/api/auth/invite/index.mjs +13 -23
  227. package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -1
  228. package/dist/astro/routes/api/auth/invite/register-options.d.mts.map +1 -1
  229. package/dist/astro/routes/api/auth/invite/register-options.mjs +9 -23
  230. package/dist/astro/routes/api/auth/invite/register-options.mjs.map +1 -1
  231. package/dist/astro/routes/api/auth/logout.mjs +2 -6
  232. package/dist/astro/routes/api/auth/logout.mjs.map +1 -1
  233. package/dist/astro/routes/api/auth/magic-link/send.d.mts.map +1 -1
  234. package/dist/astro/routes/api/auth/magic-link/send.mjs +15 -26
  235. package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
  236. package/dist/astro/routes/api/auth/magic-link/verify.mjs +5 -20
  237. package/dist/astro/routes/api/auth/magic-link/verify.mjs.map +1 -1
  238. package/dist/astro/routes/api/auth/me.d.mts +3 -1
  239. package/dist/astro/routes/api/auth/me.d.mts.map +1 -1
  240. package/dist/astro/routes/api/auth/me.mjs +30 -30
  241. package/dist/astro/routes/api/auth/me.mjs.map +1 -1
  242. package/dist/astro/routes/api/auth/mode.mjs +2 -6
  243. package/dist/astro/routes/api/auth/mode.mjs.map +1 -1
  244. package/dist/astro/routes/api/auth/oauth/_provider_/callback.d.mts.map +1 -1
  245. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +6 -14
  246. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs.map +1 -1
  247. package/dist/astro/routes/api/auth/oauth/_provider_.d.mts.map +1 -1
  248. package/dist/astro/routes/api/auth/oauth/_provider_.mjs +3 -4
  249. package/dist/astro/routes/api/auth/oauth/_provider_.mjs.map +1 -1
  250. package/dist/astro/routes/api/auth/passkey/_id_.mjs +3 -18
  251. package/dist/astro/routes/api/auth/passkey/_id_.mjs.map +1 -1
  252. package/dist/astro/routes/api/auth/passkey/index.mjs +1 -5
  253. package/dist/astro/routes/api/auth/passkey/index.mjs.map +1 -1
  254. package/dist/astro/routes/api/auth/passkey/options.d.mts.map +1 -1
  255. package/dist/astro/routes/api/auth/passkey/options.mjs +12 -26
  256. package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -1
  257. package/dist/astro/routes/api/auth/passkey/register/options.d.mts.map +1 -1
  258. package/dist/astro/routes/api/auth/passkey/register/options.mjs +9 -23
  259. package/dist/astro/routes/api/auth/passkey/register/options.mjs.map +1 -1
  260. package/dist/astro/routes/api/auth/passkey/register/verify.d.mts.map +1 -1
  261. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +10 -24
  262. package/dist/astro/routes/api/auth/passkey/register/verify.mjs.map +1 -1
  263. package/dist/astro/routes/api/auth/passkey/verify.d.mts.map +1 -1
  264. package/dist/astro/routes/api/auth/passkey/verify.mjs +11 -26
  265. package/dist/astro/routes/api/auth/passkey/verify.mjs.map +1 -1
  266. package/dist/astro/routes/api/auth/signup/complete.d.mts.map +1 -1
  267. package/dist/astro/routes/api/auth/signup/complete.mjs +11 -26
  268. package/dist/astro/routes/api/auth/signup/complete.mjs.map +1 -1
  269. package/dist/astro/routes/api/auth/signup/request.d.mts.map +1 -1
  270. package/dist/astro/routes/api/auth/signup/request.mjs +9 -24
  271. package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
  272. package/dist/astro/routes/api/auth/signup/verify.mjs +1 -5
  273. package/dist/astro/routes/api/auth/signup/verify.mjs.map +1 -1
  274. package/dist/astro/routes/api/calendar.mjs +5 -19
  275. package/dist/astro/routes/api/calendar.mjs.map +1 -1
  276. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +5 -19
  277. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
  278. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +8 -26
  279. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs.map +1 -1
  280. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -6
  281. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs.map +1 -1
  282. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +14 -24
  283. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
  284. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -6
  285. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs.map +1 -1
  286. package/dist/astro/routes/api/content/_collection_/_id_/lock.d.mts.map +1 -1
  287. package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +9 -24
  288. package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs.map +1 -1
  289. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -7
  290. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs.map +1 -1
  291. package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +2 -13
  292. package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs.map +1 -1
  293. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +13 -43
  294. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -1
  295. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +7 -23
  296. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
  297. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +5 -45
  298. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
  299. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +5 -45
  300. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
  301. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +4 -7
  302. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs.map +1 -1
  303. package/dist/astro/routes/api/content/_collection_/_id_/revisions/editors.d.mts +8 -0
  304. package/dist/astro/routes/api/content/_collection_/_id_/revisions/editors.d.mts.map +1 -0
  305. package/dist/astro/routes/api/content/_collection_/_id_/revisions/editors.mjs +16 -0
  306. package/dist/astro/routes/api/content/_collection_/_id_/revisions/editors.mjs.map +1 -0
  307. package/dist/astro/routes/api/content/_collection_/_id_/revisions.d.mts +2 -1
  308. package/dist/astro/routes/api/content/_collection_/_id_/revisions.d.mts.map +1 -1
  309. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +28 -7
  310. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs.map +1 -1
  311. package/dist/astro/routes/api/content/_collection_/_id_/room.d.mts +8 -0
  312. package/dist/astro/routes/api/content/_collection_/_id_/room.d.mts.map +1 -0
  313. package/dist/astro/routes/api/content/_collection_/_id_/room.mjs +29 -0
  314. package/dist/astro/routes/api/content/_collection_/_id_/room.mjs.map +1 -0
  315. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +11 -24
  316. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
  317. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts.map +1 -1
  318. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +32 -38
  319. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
  320. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -6
  321. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs.map +1 -1
  322. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +7 -23
  323. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
  324. package/dist/astro/routes/api/content/_collection_/_id_.d.mts.map +1 -1
  325. package/dist/astro/routes/api/content/_collection_/_id_.mjs +28 -52
  326. package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
  327. package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -6
  328. package/dist/astro/routes/api/content/_collection_/authors.mjs.map +1 -1
  329. package/dist/astro/routes/api/content/_collection_/index.mjs +5 -19
  330. package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
  331. package/dist/astro/routes/api/content/_collection_/trash.mjs +4 -19
  332. package/dist/astro/routes/api/content/_collection_/trash.mjs.map +1 -1
  333. package/dist/astro/routes/api/dashboard.mjs +141 -21
  334. package/dist/astro/routes/api/dashboard.mjs.map +1 -1
  335. package/dist/astro/routes/api/dev/emails.mjs +2 -6
  336. package/dist/astro/routes/api/dev/emails.mjs.map +1 -1
  337. package/dist/astro/routes/api/dev/scheduled-tasks.mjs +4 -125
  338. package/dist/astro/routes/api/dev/scheduled-tasks.mjs.map +1 -1
  339. package/dist/astro/routes/api/health.mjs +3 -7
  340. package/dist/astro/routes/api/health.mjs.map +1 -1
  341. package/dist/astro/routes/api/import/probe.d.mts +4 -4
  342. package/dist/astro/routes/api/import/probe.mjs +6 -37
  343. package/dist/astro/routes/api/import/probe.mjs.map +1 -1
  344. package/dist/astro/routes/api/import/wordpress/analyze.d.mts +5 -3
  345. package/dist/astro/routes/api/import/wordpress/analyze.d.mts.map +1 -1
  346. package/dist/astro/routes/api/import/wordpress/analyze.mjs +9 -9
  347. package/dist/astro/routes/api/import/wordpress/analyze.mjs.map +1 -1
  348. package/dist/astro/routes/api/import/wordpress/execute.d.mts +32 -15
  349. package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -1
  350. package/dist/astro/routes/api/import/wordpress/execute.mjs +146 -45
  351. package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
  352. package/dist/astro/routes/api/import/wordpress/media.d.mts +16 -14
  353. package/dist/astro/routes/api/import/wordpress/media.d.mts.map +1 -1
  354. package/dist/astro/routes/api/import/wordpress/media.mjs +11 -27
  355. package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -1
  356. package/dist/astro/routes/api/import/wordpress/prepare.mjs +8 -24
  357. package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
  358. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +16 -14
  359. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts.map +1 -1
  360. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +12 -39
  361. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
  362. package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
  363. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +6 -37
  364. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -1
  365. package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
  366. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +16 -14
  367. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts.map +1 -1
  368. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +187 -58
  369. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
  370. package/dist/astro/routes/api/manifest.d.mts.map +1 -1
  371. package/dist/astro/routes/api/manifest.mjs +32 -13
  372. package/dist/astro/routes/api/manifest.mjs.map +1 -1
  373. package/dist/astro/routes/api/mcp.mjs +130 -125
  374. package/dist/astro/routes/api/mcp.mjs.map +1 -1
  375. package/dist/astro/routes/api/media/_id_/confirm.d.mts.map +1 -1
  376. package/dist/astro/routes/api/media/_id_/confirm.mjs +50 -30
  377. package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
  378. package/dist/astro/routes/api/media/_id_/replace.mjs +5 -20
  379. package/dist/astro/routes/api/media/_id_/replace.mjs.map +1 -1
  380. package/dist/astro/routes/api/media/_id_/upload.mjs +6 -10
  381. package/dist/astro/routes/api/media/_id_/upload.mjs.map +1 -1
  382. package/dist/astro/routes/api/media/_id_/usage.mjs +6 -38
  383. package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
  384. package/dist/astro/routes/api/media/_id_.mjs +5 -36
  385. package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
  386. package/dist/astro/routes/api/media/asset/_id_/_filename_.d.mts.map +1 -1
  387. package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +4 -7
  388. package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs.map +1 -1
  389. package/dist/astro/routes/api/media/file/_...key_.d.mts.map +1 -1
  390. package/dist/astro/routes/api/media/file/_...key_.mjs +5 -12
  391. package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -1
  392. package/dist/astro/routes/api/media/folders/_id_.mjs +5 -20
  393. package/dist/astro/routes/api/media/folders/_id_.mjs.map +1 -1
  394. package/dist/astro/routes/api/media/folders/index.mjs +5 -20
  395. package/dist/astro/routes/api/media/folders/index.mjs.map +1 -1
  396. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -6
  397. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs.map +1 -1
  398. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -6
  399. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs.map +1 -1
  400. package/dist/astro/routes/api/media/providers/index.mjs +2 -6
  401. package/dist/astro/routes/api/media/providers/index.mjs.map +1 -1
  402. package/dist/astro/routes/api/media/upload-url.mjs +8 -23
  403. package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
  404. package/dist/astro/routes/api/media.mjs +20 -43
  405. package/dist/astro/routes/api/media.mjs.map +1 -1
  406. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +8 -26
  407. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
  408. package/dist/astro/routes/api/menus/_name_/items.mjs +8 -26
  409. package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
  410. package/dist/astro/routes/api/menus/_name_/reorder.mjs +8 -26
  411. package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
  412. package/dist/astro/routes/api/menus/_name_/translations.mjs +7 -26
  413. package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
  414. package/dist/astro/routes/api/menus/_name_.mjs +8 -26
  415. package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
  416. package/dist/astro/routes/api/menus/index.mjs +8 -26
  417. package/dist/astro/routes/api/menus/index.mjs.map +1 -1
  418. package/dist/astro/routes/api/oauth/authorize.mjs +5 -6
  419. package/dist/astro/routes/api/oauth/authorize.mjs.map +1 -1
  420. package/dist/astro/routes/api/oauth/device/authorize.d.mts.map +1 -1
  421. package/dist/astro/routes/api/oauth/device/authorize.mjs +3 -9
  422. package/dist/astro/routes/api/oauth/device/authorize.mjs.map +1 -1
  423. package/dist/astro/routes/api/oauth/device/code.mjs +6 -13
  424. package/dist/astro/routes/api/oauth/device/code.mjs.map +1 -1
  425. package/dist/astro/routes/api/oauth/device/token.mjs +5 -12
  426. package/dist/astro/routes/api/oauth/device/token.mjs.map +1 -1
  427. package/dist/astro/routes/api/oauth/register.mjs +4 -9
  428. package/dist/astro/routes/api/oauth/register.mjs.map +1 -1
  429. package/dist/astro/routes/api/oauth/token/refresh.mjs +3 -9
  430. package/dist/astro/routes/api/oauth/token/refresh.mjs.map +1 -1
  431. package/dist/astro/routes/api/oauth/token/revoke.mjs +3 -9
  432. package/dist/astro/routes/api/oauth/token/revoke.mjs.map +1 -1
  433. package/dist/astro/routes/api/oauth/token.mjs +4 -9
  434. package/dist/astro/routes/api/oauth/token.mjs.map +1 -1
  435. package/dist/astro/routes/api/openapi.json.mjs +15 -31
  436. package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
  437. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +2 -13
  438. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs.map +1 -1
  439. package/dist/astro/routes/api/redirects/404s/index.mjs +5 -28
  440. package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
  441. package/dist/astro/routes/api/redirects/404s/summary.mjs +5 -28
  442. package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
  443. package/dist/astro/routes/api/redirects/_id_.mjs +6 -29
  444. package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
  445. package/dist/astro/routes/api/redirects/index.mjs +6 -29
  446. package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
  447. package/dist/astro/routes/api/relations/_id_/index.mjs +5 -45
  448. package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
  449. package/dist/astro/routes/api/relations/index.mjs +5 -45
  450. package/dist/astro/routes/api/relations/index.mjs.map +1 -1
  451. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -6
  452. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs.map +1 -1
  453. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +7 -23
  454. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs.map +1 -1
  455. package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +5 -86
  456. package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs.map +1 -1
  457. package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs +5 -86
  458. package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs.map +1 -1
  459. package/dist/astro/routes/api/schema/block-types/index.mjs +5 -86
  460. package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -1
  461. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +5 -86
  462. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
  463. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +5 -86
  464. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
  465. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +5 -86
  466. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
  467. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +5 -86
  468. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
  469. package/dist/astro/routes/api/schema/collections/index.mjs +5 -86
  470. package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
  471. package/dist/astro/routes/api/schema/collections/reorder.mjs +5 -86
  472. package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
  473. package/dist/astro/routes/api/schema/index.mjs +4 -22
  474. package/dist/astro/routes/api/schema/index.mjs.map +1 -1
  475. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +5 -86
  476. package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
  477. package/dist/astro/routes/api/schema/orphans/index.mjs +3 -85
  478. package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
  479. package/dist/astro/routes/api/search/enable.mjs +5 -27
  480. package/dist/astro/routes/api/search/enable.mjs.map +1 -1
  481. package/dist/astro/routes/api/search/index.mjs +4 -26
  482. package/dist/astro/routes/api/search/index.mjs.map +1 -1
  483. package/dist/astro/routes/api/search/rebuild.mjs +5 -27
  484. package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
  485. package/dist/astro/routes/api/search/stats.mjs +3 -15
  486. package/dist/astro/routes/api/search/stats.mjs.map +1 -1
  487. package/dist/astro/routes/api/search/suggest.mjs +4 -26
  488. package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
  489. package/dist/astro/routes/api/sections/_slug_.mjs +5 -26
  490. package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
  491. package/dist/astro/routes/api/sections/index.mjs +5 -26
  492. package/dist/astro/routes/api/sections/index.mjs.map +1 -1
  493. package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +4 -10
  494. package/dist/astro/routes/api/settings/backups/archives/_name_.mjs.map +1 -1
  495. package/dist/astro/routes/api/settings/backups/archives/index.mjs +3 -10
  496. package/dist/astro/routes/api/settings/backups/archives/index.mjs.map +1 -1
  497. package/dist/astro/routes/api/settings/backups/export.mjs +4 -10
  498. package/dist/astro/routes/api/settings/backups/export.mjs.map +1 -1
  499. package/dist/astro/routes/api/settings/backups/index.mjs +5 -11
  500. package/dist/astro/routes/api/settings/backups/index.mjs.map +1 -1
  501. package/dist/astro/routes/api/settings/domain-notify.d.mts.map +1 -1
  502. package/dist/astro/routes/api/settings/domain-notify.mjs +14 -14
  503. package/dist/astro/routes/api/settings/domain-notify.mjs.map +1 -1
  504. package/dist/astro/routes/api/settings/domain.mjs +8 -27
  505. package/dist/astro/routes/api/settings/domain.mjs.map +1 -1
  506. package/dist/astro/routes/api/settings/email.d.mts +2 -1
  507. package/dist/astro/routes/api/settings/email.d.mts.map +1 -1
  508. package/dist/astro/routes/api/settings/email.mjs +124 -16
  509. package/dist/astro/routes/api/settings/email.mjs.map +1 -1
  510. package/dist/astro/routes/api/settings.mjs +7 -35
  511. package/dist/astro/routes/api/settings.mjs.map +1 -1
  512. package/dist/astro/routes/api/setup/admin-verify.d.mts.map +1 -1
  513. package/dist/astro/routes/api/setup/admin-verify.mjs +13 -29
  514. package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
  515. package/dist/astro/routes/api/setup/admin.d.mts.map +1 -1
  516. package/dist/astro/routes/api/setup/admin.mjs +10 -24
  517. package/dist/astro/routes/api/setup/admin.mjs.map +1 -1
  518. package/dist/astro/routes/api/setup/dev-bypass.d.mts.map +1 -1
  519. package/dist/astro/routes/api/setup/dev-bypass.mjs +13 -57
  520. package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
  521. package/dist/astro/routes/api/setup/dev-reset.mjs +2 -6
  522. package/dist/astro/routes/api/setup/dev-reset.mjs.map +1 -1
  523. package/dist/astro/routes/api/setup/index.mjs +14 -64
  524. package/dist/astro/routes/api/setup/index.mjs.map +1 -1
  525. package/dist/astro/routes/api/setup/status.mjs +3 -7
  526. package/dist/astro/routes/api/setup/status.mjs.map +1 -1
  527. package/dist/astro/routes/api/site/domain-proof.mjs +2 -21
  528. package/dist/astro/routes/api/site/domain-proof.mjs.map +1 -1
  529. package/dist/astro/routes/api/snapshot.mjs +6 -13
  530. package/dist/astro/routes/api/snapshot.mjs.map +1 -1
  531. package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +7 -34
  532. package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -1
  533. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +7 -34
  534. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
  535. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +8 -34
  536. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
  537. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +7 -34
  538. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
  539. package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +5 -32
  540. package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -1
  541. package/dist/astro/routes/api/taxonomies/_name_.mjs +8 -34
  542. package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
  543. package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +13 -46
  544. package/dist/astro/routes/api/taxonomies/bulk-tag.mjs.map +1 -1
  545. package/dist/astro/routes/api/taxonomies/index.mjs +8 -34
  546. package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
  547. package/dist/astro/routes/api/themes/preview.mjs +4 -10
  548. package/dist/astro/routes/api/themes/preview.mjs.map +1 -1
  549. package/dist/astro/routes/api/typegen.mjs +3 -7
  550. package/dist/astro/routes/api/typegen.mjs.map +1 -1
  551. package/dist/astro/routes/api/visual-editing/action-token.mjs +3 -10
  552. package/dist/astro/routes/api/visual-editing/action-token.mjs.map +1 -1
  553. package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +3 -26
  554. package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs.map +1 -1
  555. package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +1 -5
  556. package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs.map +1 -1
  557. package/dist/astro/routes/api/well-known/auth.d.mts.map +1 -1
  558. package/dist/astro/routes/api/well-known/auth.mjs +4 -3
  559. package/dist/astro/routes/api/well-known/auth.mjs.map +1 -1
  560. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
  561. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
  562. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +8 -30
  563. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
  564. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +10 -31
  565. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
  566. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +9 -30
  567. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
  568. package/dist/astro/routes/api/widget-areas/_name_.mjs +7 -18
  569. package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
  570. package/dist/astro/routes/api/widget-areas/index.mjs +9 -30
  571. package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
  572. package/dist/astro/routes/api/widget-components.mjs +2 -6
  573. package/dist/astro/routes/api/widget-components.mjs.map +1 -1
  574. package/dist/astro/routes/robots.txt.d.mts.map +1 -1
  575. package/dist/astro/routes/robots.txt.mjs +6 -24
  576. package/dist/astro/routes/robots.txt.mjs.map +1 -1
  577. package/dist/astro/routes/sitemap-_collection_.xml.mjs +11 -25
  578. package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
  579. package/dist/astro/routes/sitemap.xml.d.mts.map +1 -1
  580. package/dist/astro/routes/sitemap.xml.mjs +5 -23
  581. package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
  582. package/dist/astro/types.d.mts +45 -21
  583. package/dist/astro/types.d.mts.map +1 -1
  584. package/dist/audit-T3NRtoQ5.mjs +127 -0
  585. package/dist/audit-T3NRtoQ5.mjs.map +1 -0
  586. package/dist/auth/providers/github.d.mts +1 -1
  587. package/dist/auth/providers/google.d.mts +1 -1
  588. package/dist/auth/providers/microsoft.d.mts +1 -1
  589. package/dist/authoritative-records-Cd5BVXRs.mjs +5183 -0
  590. package/dist/authoritative-records-Cd5BVXRs.mjs.map +1 -0
  591. package/dist/authorize-B-4ogCQG.mjs +74 -0
  592. package/dist/authorize-B-4ogCQG.mjs.map +1 -0
  593. package/dist/backup-BQhg3MEK.mjs +246 -0
  594. package/dist/backup-BQhg3MEK.mjs.map +1 -0
  595. package/dist/base64-GXviT28w.mjs +63 -0
  596. package/dist/base64-GXviT28w.mjs.map +1 -0
  597. package/dist/block-types-BTzqdEZV.mjs +132 -0
  598. package/dist/block-types-BTzqdEZV.mjs.map +1 -0
  599. package/dist/block-values-DzZIh7WN.mjs +215 -0
  600. package/dist/block-values-DzZIh7WN.mjs.map +1 -0
  601. package/dist/byline--sweE_MZ.mjs +930 -0
  602. package/dist/byline--sweE_MZ.mjs.map +1 -0
  603. package/dist/byline-fields-Czdq4Yad.mjs +123 -0
  604. package/dist/byline-fields-Czdq4Yad.mjs.map +1 -0
  605. package/dist/byline-registry-Cr7kjrxM.mjs +406 -0
  606. package/dist/byline-registry-Cr7kjrxM.mjs.map +1 -0
  607. package/dist/bylines-DnuH3H8z.mjs +234 -0
  608. package/dist/bylines-DnuH3H8z.mjs.map +1 -0
  609. package/dist/bylines-txlwgzIK.mjs +150 -0
  610. package/dist/bylines-txlwgzIK.mjs.map +1 -0
  611. package/dist/cache-BjnpmIpb.mjs +151 -0
  612. package/dist/cache-BjnpmIpb.mjs.map +1 -0
  613. package/dist/canonical-Cb-rJGRU.mjs +174 -0
  614. package/dist/canonical-Cb-rJGRU.mjs.map +1 -0
  615. package/dist/capture-triggers-BZmIEdX2.mjs +362 -0
  616. package/dist/capture-triggers-BZmIEdX2.mjs.map +1 -0
  617. package/dist/challenge-store-B0PoBBqW.mjs +51 -0
  618. package/dist/challenge-store-B0PoBBqW.mjs.map +1 -0
  619. package/dist/checksum-CH9TyM-N.mjs +162 -0
  620. package/dist/checksum-CH9TyM-N.mjs.map +1 -0
  621. package/dist/chrome-tags-BocDVqqx.mjs +24 -0
  622. package/dist/chrome-tags-BocDVqqx.mjs.map +1 -0
  623. package/dist/chunks-DRnEstVb.mjs +25 -0
  624. package/dist/chunks-DRnEstVb.mjs.map +1 -0
  625. package/dist/cli/index.mjs +892 -93
  626. package/dist/cli/index.mjs.map +1 -1
  627. package/dist/client/cf-access.d.mts +1 -1
  628. package/dist/client/index.d.mts +70 -70
  629. package/dist/client/index.d.mts.map +1 -1
  630. package/dist/client/index.mjs +15 -6
  631. package/dist/client/index.mjs.map +1 -1
  632. package/dist/collection-slugs-cache-CYMrqHZ6.mjs +91 -0
  633. package/dist/collection-slugs-cache-CYMrqHZ6.mjs.map +1 -0
  634. package/dist/comment-BGeXmJ8F.mjs +335 -0
  635. package/dist/comment-BGeXmJ8F.mjs.map +1 -0
  636. package/dist/comment-reaction-ty-JEDYR.mjs +85 -0
  637. package/dist/comment-reaction-ty-JEDYR.mjs.map +1 -0
  638. package/dist/comments-ByrrLvZL.mjs +99 -0
  639. package/dist/comments-ByrrLvZL.mjs.map +1 -0
  640. package/dist/comments-DqhARoef.mjs +195 -0
  641. package/dist/comments-DqhARoef.mjs.map +1 -0
  642. package/dist/components-u2HE5Mu9.mjs +112 -0
  643. package/dist/components-u2HE5Mu9.mjs.map +1 -0
  644. package/dist/config-B4F2ttAZ.d.mts +7230 -0
  645. package/dist/config-B4F2ttAZ.d.mts.map +1 -0
  646. package/dist/config-BnrtMvHW.mjs +228 -0
  647. package/dist/config-BnrtMvHW.mjs.map +1 -0
  648. package/dist/config-DEse9gaE.d.mts +41 -0
  649. package/dist/config-DEse9gaE.d.mts.map +1 -0
  650. package/dist/connection-BaIVuaDX.mjs +36 -0
  651. package/dist/connection-BaIVuaDX.mjs.map +1 -0
  652. package/dist/content-Dxztag5t.mjs +2270 -0
  653. package/dist/content-Dxztag5t.mjs.map +1 -0
  654. package/dist/content-list-query-yYbBU-dB.d.mts +26 -0
  655. package/dist/content-list-query-yYbBU-dB.d.mts.map +1 -0
  656. package/dist/content-policy-Drm9sqdA.mjs +68 -0
  657. package/dist/content-policy-Drm9sqdA.mjs.map +1 -0
  658. package/dist/content-repair-2PdahlgZ.mjs +443 -0
  659. package/dist/content-repair-2PdahlgZ.mjs.map +1 -0
  660. package/dist/content-save-KMll0S7E.mjs +202 -0
  661. package/dist/content-save-KMll0S7E.mjs.map +1 -0
  662. package/dist/context-C3OZjexd.mjs +2225 -0
  663. package/dist/context-C3OZjexd.mjs.map +1 -0
  664. package/dist/credits-C8uXoWfN.mjs +110 -0
  665. package/dist/credits-C8uXoWfN.mjs.map +1 -0
  666. package/dist/cron-CrjBjDuy.mjs +310 -0
  667. package/dist/cron-CrjBjDuy.mjs.map +1 -0
  668. package/dist/db/index.d.mts +3 -3
  669. package/dist/db/index.mjs +1 -4
  670. package/dist/db/index.mjs.map +1 -1
  671. package/dist/db/libsql-migrations.d.mts +1 -1
  672. package/dist/db/libsql-migrations.mjs +2 -7
  673. package/dist/db/libsql-migrations.mjs.map +1 -1
  674. package/dist/db/libsql.d.mts +1 -1
  675. package/dist/db/postgres-migrations.d.mts +1 -1
  676. package/dist/db/postgres-migrations.mjs +2 -7
  677. package/dist/db/postgres-migrations.mjs.map +1 -1
  678. package/dist/db/postgres.d.mts +1 -1
  679. package/dist/db/sqlite-migrations.d.mts +1 -1
  680. package/dist/db/sqlite-migrations.mjs +2 -7
  681. package/dist/db/sqlite-migrations.mjs.map +1 -1
  682. package/dist/db/sqlite.d.mts +1 -1
  683. package/dist/db/sqlite.mjs +1 -1
  684. package/dist/default-DPoN3H5H.mjs +81 -0
  685. package/dist/default-DPoN3H5H.mjs.map +1 -0
  686. package/dist/deferred-tasks-uSx5qCFn.d.mts +10 -0
  687. package/dist/deferred-tasks-uSx5qCFn.d.mts.map +1 -0
  688. package/dist/deferred-tasks-yv85msJv.mjs +52 -0
  689. package/dist/deferred-tasks-yv85msJv.mjs.map +1 -0
  690. package/dist/destination-BNL1K7Mz.mjs +18 -0
  691. package/dist/destination-BNL1K7Mz.mjs.map +1 -0
  692. package/dist/dev-typegen-BVQAguf4.mjs +29 -0
  693. package/dist/dev-typegen-BVQAguf4.mjs.map +1 -0
  694. package/dist/device-flow-hT8lKWXq.mjs +519 -0
  695. package/dist/device-flow-hT8lKWXq.mjs.map +1 -0
  696. package/dist/dialect-helpers-DqUMP9fJ.mjs +350 -0
  697. package/dist/dialect-helpers-DqUMP9fJ.mjs.map +1 -0
  698. package/dist/digest-xYRiuW_E.mjs +194 -0
  699. package/dist/digest-xYRiuW_E.mjs.map +1 -0
  700. package/dist/direct-executor-CZ2SH1bq.mjs +117 -0
  701. package/dist/direct-executor-CZ2SH1bq.mjs.map +1 -0
  702. package/dist/dist-kxThYgdL.mjs +810 -0
  703. package/dist/dist-kxThYgdL.mjs.map +1 -0
  704. package/dist/email-console-CochjAlh.mjs +50 -0
  705. package/dist/email-console-CochjAlh.mjs.map +1 -0
  706. package/dist/email-locale-BoxaIPG8.mjs +25 -0
  707. package/dist/email-locale-BoxaIPG8.mjs.map +1 -0
  708. package/dist/email-smtp-BnHR_Ccx.mjs +643 -0
  709. package/dist/email-smtp-BnHR_Ccx.mjs.map +1 -0
  710. package/dist/emdash-runtime-CXsdCQnM.mjs +5262 -0
  711. package/dist/emdash-runtime-CXsdCQnM.mjs.map +1 -0
  712. package/dist/enrich-BReo_COC.mjs +203 -0
  713. package/dist/enrich-BReo_COC.mjs.map +1 -0
  714. package/dist/entry-lock-BfnhlRhC.mjs +207 -0
  715. package/dist/entry-lock-BfnhlRhC.mjs.map +1 -0
  716. package/dist/entry-lock-DsVhZcJN.mjs +1228 -0
  717. package/dist/entry-lock-DsVhZcJN.mjs.map +1 -0
  718. package/dist/entry-locks-D_kjygT1.mjs +173 -0
  719. package/dist/entry-locks-D_kjygT1.mjs.map +1 -0
  720. package/dist/env-types-CXI9uaMU.mjs +38 -0
  721. package/dist/env-types-CXI9uaMU.mjs.map +1 -0
  722. package/dist/error-DcDNU7hZ.mjs +92 -0
  723. package/dist/error-DcDNU7hZ.mjs.map +1 -0
  724. package/dist/errors-BYdjOimY.mjs +18 -0
  725. package/dist/errors-BYdjOimY.mjs.map +1 -0
  726. package/dist/errors-CJ6711al.mjs +120 -0
  727. package/dist/errors-CJ6711al.mjs.map +1 -0
  728. package/dist/errors-CwYHYcWF.mjs +502 -0
  729. package/dist/errors-CwYHYcWF.mjs.map +1 -0
  730. package/dist/escape-YSAGQRHa.mjs +9 -0
  731. package/dist/escape-YSAGQRHa.mjs.map +1 -0
  732. package/dist/fence-C3MLClBo.mjs +162 -0
  733. package/dist/fence-C3MLClBo.mjs.map +1 -0
  734. package/dist/field-defs-cache-Cpk0eFsQ.mjs +79 -0
  735. package/dist/field-defs-cache-Cpk0eFsQ.mjs.map +1 -0
  736. package/dist/field-map-6o9hPcRl.mjs +84 -0
  737. package/dist/field-map-6o9hPcRl.mjs.map +1 -0
  738. package/dist/focal-point-Cup37tLI.mjs +23 -0
  739. package/dist/focal-point-Cup37tLI.mjs.map +1 -0
  740. package/dist/fts-manager-B3iLXCGz.mjs +500 -0
  741. package/dist/fts-manager-B3iLXCGz.mjs.map +1 -0
  742. package/dist/gc-D24C-KP7.mjs +62 -0
  743. package/dist/gc-D24C-KP7.mjs.map +1 -0
  744. package/dist/hash-SY9Nq5FH.mjs +37 -0
  745. package/dist/hash-SY9Nq5FH.mjs.map +1 -0
  746. package/dist/hook-result-BU5rI-6M.d.mts +31 -0
  747. package/dist/hook-result-BU5rI-6M.d.mts.map +1 -0
  748. package/dist/hook-result-CO4E3zDv.mjs +3854 -0
  749. package/dist/hook-result-CO4E3zDv.mjs.map +1 -0
  750. package/dist/hreflang-Bzvlo9Ci.mjs +105 -0
  751. package/dist/hreflang-Bzvlo9Ci.mjs.map +1 -0
  752. package/dist/hreflang-Ds0WbBOu.d.mts +51 -0
  753. package/dist/hreflang-Ds0WbBOu.d.mts.map +1 -0
  754. package/dist/http-route-dispatch-BsjkWBZF.mjs +348 -0
  755. package/dist/http-route-dispatch-BsjkWBZF.mjs.map +1 -0
  756. package/dist/identity-CahxkBZC.mjs +35 -0
  757. package/dist/identity-CahxkBZC.mjs.map +1 -0
  758. package/dist/index-BauU0yTw.d.mts +261 -0
  759. package/dist/index-BauU0yTw.d.mts.map +1 -0
  760. package/dist/index.d.mts +26 -25
  761. package/dist/index.mjs +2111 -120
  762. package/dist/index.mjs.map +1 -0
  763. package/dist/init-lock-Dn7efXfy.mjs +56 -0
  764. package/dist/init-lock-Dn7efXfy.mjs.map +1 -0
  765. package/dist/install-finalization-CIl610wT.mjs +58 -0
  766. package/dist/install-finalization-CIl610wT.mjs.map +1 -0
  767. package/dist/json-recordset-CrS6ZqMk.mjs +12 -0
  768. package/dist/json-recordset-CrS6ZqMk.mjs.map +1 -0
  769. package/dist/json-schema-CBcJlGcY.mjs +15 -0
  770. package/dist/json-schema-CBcJlGcY.mjs.map +1 -0
  771. package/dist/keys-DJ62Wt5b.mjs +61 -0
  772. package/dist/keys-DJ62Wt5b.mjs.map +1 -0
  773. package/dist/kinds-D7_f3Qu3.mjs +974 -0
  774. package/dist/kinds-D7_f3Qu3.mjs.map +1 -0
  775. package/dist/lifecycle-DPCkpFHV.mjs +49 -0
  776. package/dist/lifecycle-DPCkpFHV.mjs.map +1 -0
  777. package/dist/limits-Bv6mXNM-.mjs +44 -0
  778. package/dist/limits-Bv6mXNM-.mjs.map +1 -0
  779. package/dist/load-r9P0fsRH.mjs +36 -0
  780. package/dist/load-r9P0fsRH.mjs.map +1 -0
  781. package/dist/loader-CSEfTKzr.mjs +1537 -0
  782. package/dist/loader-CSEfTKzr.mjs.map +1 -0
  783. package/dist/loops-BxzrcxPO.mjs +217 -0
  784. package/dist/loops-BxzrcxPO.mjs.map +1 -0
  785. package/dist/manifest-builder-BLWqITXR.mjs +196 -0
  786. package/dist/manifest-builder-BLWqITXR.mjs.map +1 -0
  787. package/dist/manifest-schema-BRpk5V7x.mjs +497 -0
  788. package/dist/manifest-schema-BRpk5V7x.mjs.map +1 -0
  789. package/dist/marketplace-5YFgYPVr.mjs +257 -0
  790. package/dist/marketplace-5YFgYPVr.mjs.map +1 -0
  791. package/dist/marketplace-zPVE4UY5.mjs +965 -0
  792. package/dist/marketplace-zPVE4UY5.mjs.map +1 -0
  793. package/dist/media/image-endpoint.d.mts.map +1 -1
  794. package/dist/media/image-endpoint.mjs +2 -1
  795. package/dist/media/image-endpoint.mjs.map +1 -1
  796. package/dist/media/index.d.mts +10 -5
  797. package/dist/media/index.d.mts.map +1 -1
  798. package/dist/media/index.mjs +4 -4
  799. package/dist/media/index.mjs.map +1 -1
  800. package/dist/media/local-runtime.d.mts +17 -15
  801. package/dist/media/local-runtime.d.mts.map +1 -1
  802. package/dist/media/local-runtime.mjs +3 -20
  803. package/dist/media/local-runtime.mjs.map +1 -1
  804. package/dist/media-C5fg1Xte.d.mts +203 -0
  805. package/dist/media-C5fg1Xte.d.mts.map +1 -0
  806. package/dist/media-CPETKjop.mjs +424 -0
  807. package/dist/media-CPETKjop.mjs.map +1 -0
  808. package/dist/media-Cid3xIHk.mjs +294 -0
  809. package/dist/media-Cid3xIHk.mjs.map +1 -0
  810. package/dist/media-DJaAAYI2.mjs +2805 -0
  811. package/dist/media-DJaAAYI2.mjs.map +1 -0
  812. package/dist/media-allowlist-B7JwNf-U.mjs +75 -0
  813. package/dist/media-allowlist-B7JwNf-U.mjs.map +1 -0
  814. package/dist/media-folders-BI7B7XUM.mjs +210 -0
  815. package/dist/media-folders-BI7B7XUM.mjs.map +1 -0
  816. package/dist/media-url-xWuPVfqO.mjs +43 -0
  817. package/dist/media-url-xWuPVfqO.mjs.map +1 -0
  818. package/dist/media-usage-SwtWPxy4.mjs +282 -0
  819. package/dist/media-usage-SwtWPxy4.mjs.map +1 -0
  820. package/dist/media-usage-activation-BTa1H4wE.mjs +78 -0
  821. package/dist/media-usage-activation-BTa1H4wE.mjs.map +1 -0
  822. package/dist/media-usage-work-BxHWfbKq.mjs +1036 -0
  823. package/dist/media-usage-work-BxHWfbKq.mjs.map +1 -0
  824. package/dist/media-usage-work-DYenZS8y.mjs +151 -0
  825. package/dist/media-usage-work-DYenZS8y.mjs.map +1 -0
  826. package/dist/menu-FtSf33fF.mjs +420 -0
  827. package/dist/menu-FtSf33fF.mjs.map +1 -0
  828. package/dist/menus--MSfZ5Eu.mjs +433 -0
  829. package/dist/menus--MSfZ5Eu.mjs.map +1 -0
  830. package/dist/menus-C8h6Jtpu.mjs +92 -0
  831. package/dist/menus-C8h6Jtpu.mjs.map +1 -0
  832. package/dist/menus-CpFAi_LK.mjs +434 -0
  833. package/dist/menus-CpFAi_LK.mjs.map +1 -0
  834. package/dist/migrations/index.d.mts +1 -1
  835. package/dist/migrations/index.mjs +2 -6
  836. package/dist/mime-Dx6aHTsR.mjs +82 -0
  837. package/dist/mime-Dx6aHTsR.mjs.map +1 -0
  838. package/dist/mode-D6Qg_-2J.mjs +23 -0
  839. package/dist/mode-D6Qg_-2J.mjs.map +1 -0
  840. package/dist/node-sqlite-compat-DvYkqx7Q.mjs +63 -0
  841. package/dist/node-sqlite-compat-DvYkqx7Q.mjs.map +1 -0
  842. package/dist/normalize-qcU0SKGf.mjs +220 -0
  843. package/dist/normalize-qcU0SKGf.mjs.map +1 -0
  844. package/dist/oauth-authorization-CBxtOboy.mjs +287 -0
  845. package/dist/oauth-authorization-CBxtOboy.mjs.map +1 -0
  846. package/dist/oauth-clients-HLGHmHqI.mjs +266 -0
  847. package/dist/oauth-clients-HLGHmHqI.mjs.map +1 -0
  848. package/dist/oauth-state-store-B4YAveSb.mjs +80 -0
  849. package/dist/oauth-state-store-B4YAveSb.mjs.map +1 -0
  850. package/dist/oauth-user-lookup-CTYMaKlq.mjs +26 -0
  851. package/dist/oauth-user-lookup-CTYMaKlq.mjs.map +1 -0
  852. package/dist/object-cache/memory.d.mts +1 -1
  853. package/dist/object-cache-DeATK4vw.mjs +805 -0
  854. package/dist/object-cache-DeATK4vw.mjs.map +1 -0
  855. package/dist/options-BJZMHnpx.d.mts +81 -0
  856. package/dist/options-BJZMHnpx.d.mts.map +1 -0
  857. package/dist/options-CMocxAku.mjs +208 -0
  858. package/dist/options-CMocxAku.mjs.map +1 -0
  859. package/dist/ownership-46c5NS0I.mjs +12 -0
  860. package/dist/ownership-46c5NS0I.mjs.map +1 -0
  861. package/dist/page/index.d.mts +2 -2
  862. package/dist/page/index.d.mts.map +1 -1
  863. package/dist/page/index.mjs +23 -27
  864. package/dist/page/index.mjs.map +1 -1
  865. package/dist/parse-B1E5cdyD.mjs +82 -0
  866. package/dist/parse-B1E5cdyD.mjs.map +1 -0
  867. package/dist/parse-Clt6wmpy.d.mts +178 -0
  868. package/dist/parse-Clt6wmpy.d.mts.map +1 -0
  869. package/dist/parts-CMwESQ6e.mjs +68 -0
  870. package/dist/parts-CMwESQ6e.mjs.map +1 -0
  871. package/dist/passkey-config-DiVZI-cx.mjs +46 -0
  872. package/dist/passkey-config-DiVZI-cx.mjs.map +1 -0
  873. package/dist/paths-NrYImb_h.mjs +77 -0
  874. package/dist/paths-NrYImb_h.mjs.map +1 -0
  875. package/dist/patterns-BxMSQThP.mjs +174 -0
  876. package/dist/patterns-BxMSQThP.mjs.map +1 -0
  877. package/dist/placeholder-B0vI-EQ9.d.mts +316 -0
  878. package/dist/placeholder-B0vI-EQ9.d.mts.map +1 -0
  879. package/dist/plan-CSb3BdFS.mjs +135 -0
  880. package/dist/plan-CSb3BdFS.mjs.map +1 -0
  881. package/dist/plugin-settings-HdYYRFi3.mjs +162 -0
  882. package/dist/plugin-settings-HdYYRFi3.mjs.map +1 -0
  883. package/dist/plugin-test-runtime.d.mts +23 -16
  884. package/dist/plugin-test-runtime.d.mts.map +1 -1
  885. package/dist/plugin-test-runtime.mjs +10 -125
  886. package/dist/plugin-tool-name-CCXxYq3K.mjs +27 -0
  887. package/dist/plugin-tool-name-CCXxYq3K.mjs.map +1 -0
  888. package/dist/plugin-types.d.mts +2 -2
  889. package/dist/plugin-utils.d.mts +15 -13
  890. package/dist/plugin-utils.d.mts.map +1 -1
  891. package/dist/plugins/adapt-sandbox-entry.d.mts +15 -13
  892. package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
  893. package/dist/plugins/adapt-sandbox-entry.mjs +6 -4
  894. package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
  895. package/dist/plugins/host.d.mts +13 -6
  896. package/dist/plugins/host.d.mts.map +1 -0
  897. package/dist/plugins/host.mjs +10 -62
  898. package/dist/plugins-Bc70Xs37.mjs +261 -0
  899. package/dist/plugins-Bc70Xs37.mjs.map +1 -0
  900. package/dist/policy-C-ngDrxa.mjs +56 -0
  901. package/dist/policy-C-ngDrxa.mjs.map +1 -0
  902. package/dist/portable-text-T17rOqF7.mjs +454 -0
  903. package/dist/portable-text-T17rOqF7.mjs.map +1 -0
  904. package/dist/protocol-CmSX4cXv.d.mts +65 -0
  905. package/dist/protocol-CmSX4cXv.d.mts.map +1 -0
  906. package/dist/public-plugin-api-routes-_xsWTlwE.mjs +316 -0
  907. package/dist/public-plugin-api-routes-_xsWTlwE.mjs.map +1 -0
  908. package/dist/public-submission-ui3pFYtq.mjs +253 -0
  909. package/dist/public-submission-ui3pFYtq.mjs.map +1 -0
  910. package/dist/public-url-DMRZPAiW.mjs +123 -0
  911. package/dist/public-url-DMRZPAiW.mjs.map +1 -0
  912. package/dist/query-C1K9PzUc.mjs +41 -0
  913. package/dist/query-C1K9PzUc.mjs.map +1 -0
  914. package/dist/query-DdmHrvie.mjs +1201 -0
  915. package/dist/query-DdmHrvie.mjs.map +1 -0
  916. package/dist/query-EVjg8-Bq.mjs +37 -0
  917. package/dist/query-EVjg8-Bq.mjs.map +1 -0
  918. package/dist/range-BaF0521t.mjs +51 -0
  919. package/dist/range-BaF0521t.mjs.map +1 -0
  920. package/dist/rate-limit-6MngP0_m.mjs +127 -0
  921. package/dist/rate-limit-6MngP0_m.mjs.map +1 -0
  922. package/dist/receipt-BFm5eaN7.mjs +43 -0
  923. package/dist/receipt-BFm5eaN7.mjs.map +1 -0
  924. package/dist/redirect-ChcHI1KC.mjs +466 -0
  925. package/dist/redirect-ChcHI1KC.mjs.map +1 -0
  926. package/dist/redirect-EpidEf_5.mjs +19 -0
  927. package/dist/redirect-EpidEf_5.mjs.map +1 -0
  928. package/dist/redirect-paths-B9cXh9Wv.mjs +36 -0
  929. package/dist/redirect-paths-B9cXh9Wv.mjs.map +1 -0
  930. package/dist/redirects-D3zHoxhn.mjs +446 -0
  931. package/dist/redirects-D3zHoxhn.mjs.map +1 -0
  932. package/dist/redirects-dFPJ0HrD.mjs +148 -0
  933. package/dist/redirects-dFPJ0HrD.mjs.map +1 -0
  934. package/dist/registry/testing.mjs +2 -3
  935. package/dist/registry/testing.mjs.map +1 -1
  936. package/dist/registry-CDzYrAFY.mjs +6074 -0
  937. package/dist/registry-CDzYrAFY.mjs.map +1 -0
  938. package/dist/registry-Cf9vkVxW.mjs +1449 -0
  939. package/dist/registry-Cf9vkVxW.mjs.map +1 -0
  940. package/dist/registry-mZi_lxtT.mjs +755 -0
  941. package/dist/registry-mZi_lxtT.mjs.map +1 -0
  942. package/dist/relations-Eyop_U4o.mjs +798 -0
  943. package/dist/relations-Eyop_U4o.mjs.map +1 -0
  944. package/dist/request-cache-BYMs-BGX.mjs +104 -0
  945. package/dist/request-cache-BYMs-BGX.mjs.map +1 -0
  946. package/dist/request-context.d.mts +16 -3
  947. package/dist/request-context.d.mts.map +1 -1
  948. package/dist/request-context.mjs +22 -1
  949. package/dist/request-context.mjs.map +1 -1
  950. package/dist/request-meta-DsSkOdO0.mjs +141 -0
  951. package/dist/request-meta-DsSkOdO0.mjs.map +1 -0
  952. package/dist/resolve-Z5YK_6ew.mjs +199 -0
  953. package/dist/resolve-Z5YK_6ew.mjs.map +1 -0
  954. package/dist/resolve-s7ANHtFx.mjs +92 -0
  955. package/dist/resolve-s7ANHtFx.mjs.map +1 -0
  956. package/dist/rev-B6HS7337.mjs +50 -0
  957. package/dist/rev-B6HS7337.mjs.map +1 -0
  958. package/dist/revision-D7EedSdU.mjs +503 -0
  959. package/dist/revision-D7EedSdU.mjs.map +1 -0
  960. package/dist/rooms/index.d.mts +48 -0
  961. package/dist/rooms/index.d.mts.map +1 -0
  962. package/dist/rooms/index.mjs +6 -0
  963. package/dist/rooms/node/index.d.mts +25 -0
  964. package/dist/rooms/node/index.d.mts.map +1 -0
  965. package/dist/rooms/node/index.mjs +583 -0
  966. package/dist/rooms/node/index.mjs.map +1 -0
  967. package/dist/rooms/notifications.d.mts +47 -0
  968. package/dist/rooms/notifications.d.mts.map +1 -0
  969. package/dist/rooms/notifications.mjs +125 -0
  970. package/dist/rooms/notifications.mjs.map +1 -0
  971. package/dist/rooms/room.d.mts +76 -0
  972. package/dist/rooms/room.d.mts.map +1 -0
  973. package/dist/rooms/room.mjs +1257 -0
  974. package/dist/rooms/room.mjs.map +1 -0
  975. package/dist/rooms/site.d.mts +23 -0
  976. package/dist/rooms/site.d.mts.map +1 -0
  977. package/dist/rooms/site.mjs +146 -0
  978. package/dist/rooms/site.mjs.map +1 -0
  979. package/dist/rooms-CSNLTJsG.mjs +331 -0
  980. package/dist/rooms-CSNLTJsG.mjs.map +1 -0
  981. package/dist/rooms-CVsLla78.mjs +169 -0
  982. package/dist/rooms-CVsLla78.mjs.map +1 -0
  983. package/dist/rooms-CyXG83RZ.d.mts +4653 -0
  984. package/dist/rooms-CyXG83RZ.d.mts.map +1 -0
  985. package/dist/route-cache-CBpXPq-N.mjs +30 -0
  986. package/dist/route-cache-CBpXPq-N.mjs.map +1 -0
  987. package/dist/route-cache-DkhMwAIC.mjs +20 -0
  988. package/dist/route-cache-DkhMwAIC.mjs.map +1 -0
  989. package/dist/route-wire-DKSTaEz_.mjs +197 -0
  990. package/dist/route-wire-DKSTaEz_.mjs.map +1 -0
  991. package/dist/routes-QcHRiebw.mjs +272 -0
  992. package/dist/routes-QcHRiebw.mjs.map +1 -0
  993. package/dist/runner-4BfB04Rg.mjs +6950 -0
  994. package/dist/runner-4BfB04Rg.mjs.map +1 -0
  995. package/dist/runner-CAHS_KER.d.mts +79 -0
  996. package/dist/runner-CAHS_KER.d.mts.map +1 -0
  997. package/dist/runtime-holder-0g6pqbzx.mjs +36 -0
  998. package/dist/runtime-holder-0g6pqbzx.mjs.map +1 -0
  999. package/dist/runtime.d.mts +16 -14
  1000. package/dist/runtime.d.mts.map +1 -1
  1001. package/dist/runtime.mjs +1 -9
  1002. package/dist/runtime.mjs.map +1 -1
  1003. package/dist/scheduler-health-C5HEg2Yl.mjs +31 -0
  1004. package/dist/scheduler-health-C5HEg2Yl.mjs.map +1 -0
  1005. package/dist/schema/project-env-types.mjs +7 -54
  1006. package/dist/schema/project-env-types.mjs.map +1 -1
  1007. package/dist/schema-DS7ooMmp.mjs +13 -0
  1008. package/dist/schema-DS7ooMmp.mjs.map +1 -0
  1009. package/dist/schema-Mjtj7n1t.mjs +815 -0
  1010. package/dist/schema-Mjtj7n1t.mjs.map +1 -0
  1011. package/dist/scopes-BaR6WUyq.mjs +34 -0
  1012. package/dist/scopes-BaR6WUyq.mjs.map +1 -0
  1013. package/dist/search-B9RFgr0N.mjs +450 -0
  1014. package/dist/search-B9RFgr0N.mjs.map +1 -0
  1015. package/dist/secrets-C4UrjPiG.mjs +369 -0
  1016. package/dist/secrets-C4UrjPiG.mjs.map +1 -0
  1017. package/dist/sections-Bfa0oF8Q.mjs +129 -0
  1018. package/dist/sections-Bfa0oF8Q.mjs.map +1 -0
  1019. package/dist/sections-Bn2C6we7.mjs +222 -0
  1020. package/dist/sections-Bn2C6we7.mjs.map +1 -0
  1021. package/dist/seed/index.d.mts +3 -3
  1022. package/dist/seed/index.mjs +6 -53
  1023. package/dist/seo/index.d.mts +8 -6
  1024. package/dist/seo/index.d.mts.map +1 -1
  1025. package/dist/seo/index.mjs +10 -41
  1026. package/dist/seo/index.mjs.map +1 -1
  1027. package/dist/seo-DPW6k5_-.mjs +188 -0
  1028. package/dist/seo-DPW6k5_-.mjs.map +1 -0
  1029. package/dist/service-B4mHMku9.mjs +150 -0
  1030. package/dist/service-B4mHMku9.mjs.map +1 -0
  1031. package/dist/session-user-CF2jNfj7.mjs +61 -0
  1032. package/dist/session-user-CF2jNfj7.mjs.map +1 -0
  1033. package/dist/settings-4r88LLIM.mjs +66 -0
  1034. package/dist/settings-4r88LLIM.mjs.map +1 -0
  1035. package/dist/settings-BB2xxz3Y.mjs +74 -0
  1036. package/dist/settings-BB2xxz3Y.mjs.map +1 -0
  1037. package/dist/settings-BTkGl-bX.mjs +413 -0
  1038. package/dist/settings-BTkGl-bX.mjs.map +1 -0
  1039. package/dist/settings-y8Jx8b7g.mjs +157 -0
  1040. package/dist/settings-y8Jx8b7g.mjs.map +1 -0
  1041. package/dist/setup-complete-BGRiC59t.mjs +65 -0
  1042. package/dist/setup-complete-BGRiC59t.mjs.map +1 -0
  1043. package/dist/setup-nonce-D43FsOgZ.mjs +25 -0
  1044. package/dist/setup-nonce-D43FsOgZ.mjs.map +1 -0
  1045. package/dist/single-flight-cache-BCP1Tvcm.mjs +104 -0
  1046. package/dist/single-flight-cache-BCP1Tvcm.mjs.map +1 -0
  1047. package/dist/site-domain-CFX7g6ik.mjs +131 -0
  1048. package/dist/site-domain-CFX7g6ik.mjs.map +1 -0
  1049. package/dist/site-settings-C0D9fv7e.mjs +50 -0
  1050. package/dist/site-settings-C0D9fv7e.mjs.map +1 -0
  1051. package/dist/site-title-C0JVN6en.mjs +14 -0
  1052. package/dist/site-title-C0JVN6en.mjs.map +1 -0
  1053. package/dist/site-url-DzVnHJ8j.mjs +45 -0
  1054. package/dist/site-url-DzVnHJ8j.mjs.map +1 -0
  1055. package/dist/sitemap-name-Ja_Cvwx9.mjs +26 -0
  1056. package/dist/sitemap-name-Ja_Cvwx9.mjs.map +1 -0
  1057. package/dist/slug-CO2jtUda.mjs +16 -0
  1058. package/dist/slug-CO2jtUda.mjs.map +1 -0
  1059. package/dist/slugify-sxuydlHd.mjs +22 -0
  1060. package/dist/slugify-sxuydlHd.mjs.map +1 -0
  1061. package/dist/snapshot-C9OWUtFr.mjs +466 -0
  1062. package/dist/snapshot-C9OWUtFr.mjs.map +1 -0
  1063. package/dist/snapshot-CR5tan8p.mjs +184 -0
  1064. package/dist/snapshot-CR5tan8p.mjs.map +1 -0
  1065. package/dist/ssrf-Lj1KZxYt.mjs +406 -0
  1066. package/dist/ssrf-Lj1KZxYt.mjs.map +1 -0
  1067. package/dist/stage-ChbGIslu.mjs +662 -0
  1068. package/dist/stage-ChbGIslu.mjs.map +1 -0
  1069. package/dist/staged-BN8pRZwX.mjs +686 -0
  1070. package/dist/staged-BN8pRZwX.mjs.map +1 -0
  1071. package/dist/state-DtcE0eN3.mjs +178 -0
  1072. package/dist/state-DtcE0eN3.mjs.map +1 -0
  1073. package/dist/status-vvme29qV.mjs +30 -0
  1074. package/dist/status-vvme29qV.mjs.map +1 -0
  1075. package/dist/storage/local.d.mts +1 -1
  1076. package/dist/storage/local.mjs +2 -2
  1077. package/dist/storage/s3.d.mts +1 -1
  1078. package/dist/storage/s3.mjs +1 -1
  1079. package/dist/storage-query-BDUX3Cef.d.mts +1608 -0
  1080. package/dist/storage-query-BDUX3Cef.d.mts.map +1 -0
  1081. package/dist/tar-CAvEHFbE.mjs +449 -0
  1082. package/dist/tar-CAvEHFbE.mjs.map +1 -0
  1083. package/dist/target-BM_6fT9m.mjs +27 -0
  1084. package/dist/target-BM_6fT9m.mjs.map +1 -0
  1085. package/dist/taxonomies-BMuFLd53.mjs +722 -0
  1086. package/dist/taxonomies-BMuFLd53.mjs.map +1 -0
  1087. package/dist/taxonomies-ClkYcmcH.mjs +937 -0
  1088. package/dist/taxonomies-ClkYcmcH.mjs.map +1 -0
  1089. package/dist/taxonomy-s1GcBCRo.mjs +593 -0
  1090. package/dist/taxonomy-s1GcBCRo.mjs.map +1 -0
  1091. package/dist/tokens-Cpm6FIKJ.mjs +171 -0
  1092. package/dist/tokens-Cpm6FIKJ.mjs.map +1 -0
  1093. package/dist/transaction-SKrr6u84.mjs +44 -0
  1094. package/dist/transaction-SKrr6u84.mjs.map +1 -0
  1095. package/dist/transfer-B3CsI5MG.mjs +8963 -0
  1096. package/dist/transfer-B3CsI5MG.mjs.map +1 -0
  1097. package/dist/transfer-DqUiK3ca.mjs +166 -0
  1098. package/dist/transfer-DqUiK3ca.mjs.map +1 -0
  1099. package/dist/transfer-download-CWPfhL91.mjs +33 -0
  1100. package/dist/transfer-download-CWPfhL91.mjs.map +1 -0
  1101. package/dist/transformations-ClH4dJeM.mjs +196 -0
  1102. package/dist/transformations-ClH4dJeM.mjs.map +1 -0
  1103. package/dist/transport-C6Ps8ejN.mjs +144 -0
  1104. package/dist/transport-C6Ps8ejN.mjs.map +1 -0
  1105. package/dist/transport-D4hWYmO_.d.mts +42 -0
  1106. package/dist/transport-D4hWYmO_.d.mts.map +1 -0
  1107. package/dist/trusted-proxy-CWX1sqgb.mjs +51 -0
  1108. package/dist/trusted-proxy-CWX1sqgb.mjs.map +1 -0
  1109. package/dist/turnstile-B6zM50Mh.mjs +58 -0
  1110. package/dist/turnstile-B6zM50Mh.mjs.map +1 -0
  1111. package/dist/types-BBH-w_KS.mjs +133 -0
  1112. package/dist/types-BBH-w_KS.mjs.map +1 -0
  1113. package/dist/types-Ba3bWb9D.mjs +37 -0
  1114. package/dist/types-Ba3bWb9D.mjs.map +1 -0
  1115. package/dist/types-BmBK2cqf.mjs +201 -0
  1116. package/dist/types-BmBK2cqf.mjs.map +1 -0
  1117. package/dist/types-C0M6z2A4.mjs +16 -0
  1118. package/dist/types-C0M6z2A4.mjs.map +1 -0
  1119. package/dist/types-CG1dR_Cm.d.mts +934 -0
  1120. package/dist/types-CG1dR_Cm.d.mts.map +1 -0
  1121. package/dist/types-CImd8MBY.d.mts +1756 -0
  1122. package/dist/types-CImd8MBY.d.mts.map +1 -0
  1123. package/dist/types-CML-oGr6.d.mts +293 -0
  1124. package/dist/types-CML-oGr6.d.mts.map +1 -0
  1125. package/dist/types-CZO9f_vJ.d.mts +381 -0
  1126. package/dist/types-CZO9f_vJ.d.mts.map +1 -0
  1127. package/dist/types-CpFfDrGH.mjs +18 -0
  1128. package/dist/types-CpFfDrGH.mjs.map +1 -0
  1129. package/dist/types-D2zSjG0c.mjs +63 -0
  1130. package/dist/types-D2zSjG0c.mjs.map +1 -0
  1131. package/dist/types-DLKviL1s.d.mts +93 -0
  1132. package/dist/types-DLKviL1s.d.mts.map +1 -0
  1133. package/dist/types-Df0R58Wu.mjs +77 -0
  1134. package/dist/types-Df0R58Wu.mjs.map +1 -0
  1135. package/dist/types-DwNwhyWP.d.mts +227 -0
  1136. package/dist/types-DwNwhyWP.d.mts.map +1 -0
  1137. package/dist/types-DwZgl0Zn.d.mts +366 -0
  1138. package/dist/types-DwZgl0Zn.d.mts.map +1 -0
  1139. package/dist/types-Dyb_OuSw.d.mts +125 -0
  1140. package/dist/types-Dyb_OuSw.d.mts.map +1 -0
  1141. package/dist/types-iOnPkHRk.d.mts +209 -0
  1142. package/dist/types-iOnPkHRk.d.mts.map +1 -0
  1143. package/dist/ui-comments.d.mts +66 -0
  1144. package/dist/ui-search.d.mts +75 -0
  1145. package/dist/ui-webmcp-search.d.mts +29 -0
  1146. package/dist/ui.d.mts +576 -0
  1147. package/dist/upload-attempts-5Ot7-vsw.mjs +32 -0
  1148. package/dist/upload-attempts-5Ot7-vsw.mjs.map +1 -0
  1149. package/dist/url-BVdd-tah.mjs +104 -0
  1150. package/dist/url-BVdd-tah.mjs.map +1 -0
  1151. package/dist/url-ZCjpMO-q.mjs +74 -0
  1152. package/dist/url-ZCjpMO-q.mjs.map +1 -0
  1153. package/dist/url-pattern-BQT-sGmD.mjs +41 -0
  1154. package/dist/url-pattern-BQT-sGmD.mjs.map +1 -0
  1155. package/dist/urls-Cq_hUk4P.mjs +79 -0
  1156. package/dist/urls-Cq_hUk4P.mjs.map +1 -0
  1157. package/dist/user-C4km6fox.mjs +184 -0
  1158. package/dist/user-C4km6fox.mjs.map +1 -0
  1159. package/dist/utils-Cpo0_V09.d.mts +374 -0
  1160. package/dist/utils-Cpo0_V09.d.mts.map +1 -0
  1161. package/dist/utils-DMDmdhU3.mjs +450 -0
  1162. package/dist/utils-DMDmdhU3.mjs.map +1 -0
  1163. package/dist/validate-BNupiQtz.mjs +524 -0
  1164. package/dist/validate-BNupiQtz.mjs.map +1 -0
  1165. package/dist/validate-DBfkJa3O.d.mts +472 -0
  1166. package/dist/validate-DBfkJa3O.d.mts.map +1 -0
  1167. package/dist/validation-W_efZFgP.mjs +204 -0
  1168. package/dist/validation-W_efZFgP.mjs.map +1 -0
  1169. package/dist/version-C61rw8-y.mjs +9 -0
  1170. package/dist/version-C61rw8-y.mjs.map +1 -0
  1171. package/dist/version-DhGLeLRo.mjs +7 -0
  1172. package/dist/version-DhGLeLRo.mjs.map +1 -0
  1173. package/dist/version-eqLBDtcz.mjs +49 -0
  1174. package/dist/version-eqLBDtcz.mjs.map +1 -0
  1175. package/dist/video-My3h7vwE.mjs +18 -0
  1176. package/dist/video-My3h7vwE.mjs.map +1 -0
  1177. package/dist/virtual-modules-BZKqvjRC.mjs +568 -0
  1178. package/dist/virtual-modules-BZKqvjRC.mjs.map +1 -0
  1179. package/dist/widgets-DAdni19y.mjs +134 -0
  1180. package/dist/widgets-DAdni19y.mjs.map +1 -0
  1181. package/dist/wxr-DDPJOgkM.mjs +1054 -0
  1182. package/dist/wxr-DDPJOgkM.mjs.map +1 -0
  1183. package/dist/wxr-taxonomies-B0U2fJgs.mjs +735 -0
  1184. package/dist/wxr-taxonomies-B0U2fJgs.mjs.map +1 -0
  1185. package/dist/wxr-taxonomies-CyP2k4-Q.d.mts +34 -0
  1186. package/dist/wxr-taxonomies-CyP2k4-Q.d.mts.map +1 -0
  1187. package/dist/zod-generator-ChRSYUix.mjs +425 -0
  1188. package/dist/zod-generator-ChRSYUix.mjs.map +1 -0
  1189. package/package.json +81 -33
  1190. package/src/api/content-save.ts +281 -0
  1191. package/src/api/error.ts +6 -2
  1192. package/src/api/errors.ts +11 -0
  1193. package/src/api/handlers/content.ts +43 -8
  1194. package/src/api/handlers/entry-lock.ts +69 -14
  1195. package/src/api/handlers/marketplace.ts +8 -2
  1196. package/src/api/handlers/media-allowlist.ts +56 -0
  1197. package/src/api/handlers/media-upload.ts +9 -1
  1198. package/src/api/handlers/plugins.ts +4 -4
  1199. package/src/api/handlers/registry.ts +33 -21
  1200. package/src/api/handlers/relations.ts +20 -4
  1201. package/src/api/handlers/revision.ts +29 -0
  1202. package/src/api/handlers/rooms.ts +233 -0
  1203. package/src/api/handlers/site-domain.ts +1 -1
  1204. package/src/api/handlers/snapshot.ts +90 -30
  1205. package/src/api/handlers/staged-references.ts +14 -0
  1206. package/src/api/list-preconditions.ts +101 -0
  1207. package/src/api/openapi/document.ts +5 -5
  1208. package/src/api/parse.ts +3 -2
  1209. package/src/api/public-url.ts +21 -0
  1210. package/src/api/schemas/auth.ts +57 -1
  1211. package/src/api/schemas/content.ts +14 -0
  1212. package/src/api/schemas/entry-lock.ts +6 -1
  1213. package/src/api/schemas/import.ts +6 -0
  1214. package/src/api/schemas/index.ts +1 -0
  1215. package/src/api/schemas/media.ts +20 -0
  1216. package/src/api/schemas/rooms.ts +27 -0
  1217. package/src/api/schemas/schema.ts +9 -1
  1218. package/src/api/schemas/settings.ts +2 -0
  1219. package/src/api/site-title.ts +13 -0
  1220. package/src/api/types.ts +3 -0
  1221. package/src/astro/integration/index.ts +19 -5
  1222. package/src/astro/integration/routes.ts +15 -5
  1223. package/src/astro/integration/runtime.ts +32 -0
  1224. package/src/astro/integration/virtual-modules.ts +80 -17
  1225. package/src/astro/integration/vite-config.ts +136 -0
  1226. package/src/astro/middleware/auth.ts +44 -16
  1227. package/src/astro/middleware/media-usage-write-fence.ts +4 -0
  1228. package/src/astro/middleware/redirect.ts +11 -1
  1229. package/src/astro/middleware/request-context.ts +57 -27
  1230. package/src/astro/middleware.ts +44 -29
  1231. package/src/astro/routes/PluginRegistry.tsx +21 -17
  1232. package/src/astro/routes/api/admin/comments/[id]/status.ts +9 -1
  1233. package/src/astro/routes/api/admin/comments/[id].ts +10 -3
  1234. package/src/astro/routes/api/admin/comments/bulk.ts +18 -4
  1235. package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +1 -1
  1236. package/src/astro/routes/api/admin/plugins/registry/install.ts +1 -1
  1237. package/src/astro/routes/api/admin/users/[id]/send-recovery.ts +9 -2
  1238. package/src/astro/routes/api/auth/dev-bypass.ts +20 -1
  1239. package/src/astro/routes/api/auth/invite/complete.ts +2 -1
  1240. package/src/astro/routes/api/auth/invite/index.ts +9 -2
  1241. package/src/astro/routes/api/auth/invite/register-options.ts +2 -1
  1242. package/src/astro/routes/api/auth/magic-link/send.ts +9 -2
  1243. package/src/astro/routes/api/auth/me.ts +38 -17
  1244. package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +6 -11
  1245. package/src/astro/routes/api/auth/oauth/[provider].ts +6 -11
  1246. package/src/astro/routes/api/auth/passkey/options.ts +2 -1
  1247. package/src/astro/routes/api/auth/passkey/register/options.ts +2 -1
  1248. package/src/astro/routes/api/auth/passkey/register/verify.ts +2 -1
  1249. package/src/astro/routes/api/auth/passkey/verify.ts +2 -1
  1250. package/src/astro/routes/api/auth/signup/complete.ts +2 -1
  1251. package/src/astro/routes/api/auth/signup/request.ts +2 -1
  1252. package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +2 -2
  1253. package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +1 -0
  1254. package/src/astro/routes/api/content/[collection]/[id]/lock.ts +6 -3
  1255. package/src/astro/routes/api/content/[collection]/[id]/preview-url.ts +6 -2
  1256. package/src/astro/routes/api/content/[collection]/[id]/revisions/editors.ts +30 -0
  1257. package/src/astro/routes/api/content/[collection]/[id]/revisions.ts +37 -1
  1258. package/src/astro/routes/api/content/[collection]/[id]/room.ts +43 -0
  1259. package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +3 -1
  1260. package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +54 -2
  1261. package/src/astro/routes/api/content/[collection]/[id].ts +22 -73
  1262. package/src/astro/routes/api/import/wordpress/analyze.ts +11 -0
  1263. package/src/astro/routes/api/import/wordpress/execute.ts +193 -15
  1264. package/src/astro/routes/api/import/wordpress/media.ts +6 -1
  1265. package/src/astro/routes/api/import/wordpress/rewrite-urls.ts +9 -5
  1266. package/src/astro/routes/api/import/wordpress-plugin/execute.ts +22 -16
  1267. package/src/astro/routes/api/manifest.ts +40 -5
  1268. package/src/astro/routes/api/media/[id]/confirm.ts +42 -14
  1269. package/src/astro/routes/api/media/asset/[id]/[filename].ts +1 -0
  1270. package/src/astro/routes/api/media/file/[...key].ts +1 -0
  1271. package/src/astro/routes/api/media/upload-url.ts +1 -1
  1272. package/src/astro/routes/api/media.ts +14 -4
  1273. package/src/astro/routes/api/oauth/device/authorize.ts +0 -2
  1274. package/src/astro/routes/api/revisions/[revisionId]/restore.ts +1 -1
  1275. package/src/astro/routes/api/settings/domain-notify.ts +9 -2
  1276. package/src/astro/routes/api/settings/email.ts +197 -8
  1277. package/src/astro/routes/api/setup/admin-verify.ts +2 -1
  1278. package/src/astro/routes/api/setup/admin.ts +2 -1
  1279. package/src/astro/routes/api/setup/dev-bypass.ts +3 -1
  1280. package/src/astro/routes/api/setup/index.ts +5 -2
  1281. package/src/astro/routes/api/well-known/auth.ts +2 -1
  1282. package/src/astro/routes/api/widget-areas/[name]/reorder.ts +1 -1
  1283. package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +2 -2
  1284. package/src/astro/routes/api/widget-areas/[name]/widgets.ts +1 -1
  1285. package/src/astro/routes/api/widget-areas/[name].ts +1 -1
  1286. package/src/astro/routes/api/widget-areas/index.ts +1 -1
  1287. package/src/astro/routes/robots.txt.ts +9 -10
  1288. package/src/astro/routes/sitemap-[collection].xml.ts +5 -6
  1289. package/src/astro/routes/sitemap.xml.ts +2 -6
  1290. package/src/astro/runtime-holder.ts +41 -0
  1291. package/src/astro/types.ts +42 -5
  1292. package/src/auth/oauth-env.ts +35 -0
  1293. package/src/bylines/field-defs-cache.ts +9 -4
  1294. package/src/cli/commands/export-seed.ts +4 -3
  1295. package/src/cli/commands/import/wordpress.ts +158 -56
  1296. package/src/cli/commands/import.ts +139 -0
  1297. package/src/cli/commands/login.ts +26 -1
  1298. package/src/cli/commands/schema.ts +2 -2
  1299. package/src/cli/commands/seed.ts +3 -3
  1300. package/src/cli/credentials.ts +58 -17
  1301. package/src/cli/index.ts +4 -1
  1302. package/src/cli/wxr/parser.ts +15 -13
  1303. package/src/client/index.ts +38 -24
  1304. package/src/client/portable-text.ts +390 -192
  1305. package/src/client/transport.ts +14 -4
  1306. package/src/comments/public-submission.ts +7 -0
  1307. package/src/comments/route-cache.ts +39 -0
  1308. package/src/components/Columns.astro +2 -4
  1309. package/src/components/CommentForm.astro +6 -0
  1310. package/src/components/Comments.astro +5 -1
  1311. package/src/components/Cover.astro +2 -4
  1312. package/src/components/EmDashHead.astro +9 -7
  1313. package/src/components/EmDashImage.astro +161 -34
  1314. package/src/components/EmDashMedia.astro +36 -31
  1315. package/src/components/Embed.astro +49 -17
  1316. package/src/components/Gallery.astro +6 -2
  1317. package/src/components/Image.astro +15 -3
  1318. package/src/components/InlinePortableTextEditor.tsx +1 -0
  1319. package/src/components/LiveSearch.astro +23 -1
  1320. package/src/components/PortableText.astro +5 -8
  1321. package/src/components/marks/Link.astro +7 -0
  1322. package/src/components/widgets/Archives.astro +6 -2
  1323. package/src/components/widgets/Categories.astro +7 -2
  1324. package/src/components/widgets/RecentPosts.astro +23 -13
  1325. package/src/components/widgets/Search.astro +3 -1
  1326. package/src/components/widgets/Tags.astro +7 -2
  1327. package/src/config/options-schema.ts +124 -0
  1328. package/src/content/converters/video.ts +6 -65
  1329. package/src/database/dialect-helpers.ts +57 -0
  1330. package/src/database/migrations/092_plugin_kv_options.ts +93 -0
  1331. package/src/database/migrations/093_menu_item_orphans.ts +21 -0
  1332. package/src/database/migrations/094_media_usage_file_url_reindex.ts +57 -0
  1333. package/src/database/migrations/095_plugin_storage_unique_scope.ts +134 -0
  1334. package/src/database/migrations/096_revision_kind_and_editors.ts +29 -0
  1335. package/src/database/migrations/097_room_storage.ts +43 -0
  1336. package/src/database/migrations/content-sized.ts +16 -0
  1337. package/src/database/migrations/policy.ts +6 -1
  1338. package/src/database/migrations/runner.ts +37 -8
  1339. package/src/database/plugin-storage-index-name.ts +29 -0
  1340. package/src/database/repositories/byline.ts +94 -89
  1341. package/src/database/repositories/content.ts +162 -13
  1342. package/src/database/repositories/entry-locks.ts +35 -29
  1343. package/src/database/repositories/media-usage.ts +1 -1
  1344. package/src/database/repositories/media.ts +23 -0
  1345. package/src/database/repositories/menu.ts +30 -3
  1346. package/src/database/repositories/redirect.ts +116 -46
  1347. package/src/database/repositories/revision.ts +216 -20
  1348. package/src/database/repositories/seo.ts +2 -0
  1349. package/src/database/repositories/taxonomy.ts +91 -27
  1350. package/src/database/repositories/user.ts +34 -0
  1351. package/src/database/transaction.ts +23 -2
  1352. package/src/database/types.ts +23 -1
  1353. package/src/emdash-runtime.ts +1048 -240
  1354. package/src/i18n/resolve.ts +10 -0
  1355. package/src/import/index.ts +0 -12
  1356. package/src/import/menus.ts +202 -151
  1357. package/src/import/registry.ts +30 -1
  1358. package/src/index.ts +10 -0
  1359. package/src/loader.ts +109 -26
  1360. package/src/mcp/server.ts +103 -29
  1361. package/src/media/enrich.ts +20 -4
  1362. package/src/media/image-endpoint.ts +1 -0
  1363. package/src/media/mime.ts +1 -0
  1364. package/src/media/placeholder.ts +4 -0
  1365. package/src/media/portable-text-file-refs.ts +98 -0
  1366. package/src/media/responsive.ts +29 -1
  1367. package/src/media/types.ts +2 -0
  1368. package/src/media/url.ts +15 -0
  1369. package/src/media/usage/content-snapshots.ts +111 -34
  1370. package/src/media/usage/extractor.ts +42 -8
  1371. package/src/media/usage/types.ts +5 -0
  1372. package/src/object-cache/index.ts +382 -19
  1373. package/src/page/jsonld.ts +26 -11
  1374. package/src/plugins/adapt-sandbox-entry.ts +2 -0
  1375. package/src/plugins/content-policy.ts +36 -2
  1376. package/src/plugins/context.ts +17 -7
  1377. package/src/plugins/cron.ts +6 -3
  1378. package/src/plugins/define-plugin.ts +5 -1
  1379. package/src/plugins/editor-draft.ts +9 -3
  1380. package/src/plugins/email-smtp.ts +936 -0
  1381. package/src/plugins/hooks.ts +34 -8
  1382. package/src/plugins/host.ts +2 -0
  1383. package/src/plugins/http-route-dispatch.ts +3 -1
  1384. package/src/plugins/lifecycle.ts +25 -1
  1385. package/src/plugins/manager.ts +3 -0
  1386. package/src/plugins/sandbox/types.ts +10 -1
  1387. package/src/plugins/storage-indexes.ts +64 -55
  1388. package/src/plugins/types.ts +16 -1
  1389. package/src/query.ts +72 -7
  1390. package/src/redirects/cache.ts +3 -2
  1391. package/src/redirects/loops.ts +20 -4
  1392. package/src/redirects/patterns.ts +16 -0
  1393. package/src/request-context.ts +29 -1
  1394. package/src/rooms/document.ts +99 -0
  1395. package/src/rooms/hash.ts +19 -0
  1396. package/src/rooms/index.ts +28 -0
  1397. package/src/rooms/kysely-store.ts +279 -0
  1398. package/src/rooms/limits.ts +41 -0
  1399. package/src/rooms/merge.ts +115 -0
  1400. package/src/rooms/node/index.ts +30 -0
  1401. package/src/rooms/node/registry.ts +232 -0
  1402. package/src/rooms/node/signals.ts +89 -0
  1403. package/src/rooms/node/upgrades.ts +210 -0
  1404. package/src/rooms/notifications.ts +157 -0
  1405. package/src/rooms/parts.ts +74 -0
  1406. package/src/rooms/room.ts +1559 -0
  1407. package/src/rooms/site.ts +185 -0
  1408. package/src/rooms/snapshot.ts +11 -0
  1409. package/src/rooms/types.ts +298 -0
  1410. package/src/scheduled-publish.ts +18 -5
  1411. package/src/schema/registry.ts +14 -3
  1412. package/src/schema/types.ts +10 -2
  1413. package/src/search/errors.ts +22 -0
  1414. package/src/search/fts-manager.ts +21 -6
  1415. package/src/search/index.ts +2 -0
  1416. package/src/seed/apply.ts +109 -48
  1417. package/src/seed/index.ts +1 -1
  1418. package/src/seed/load.ts +9 -0
  1419. package/src/seed/types.ts +20 -11
  1420. package/src/seo/hreflang.ts +5 -4
  1421. package/src/seo/index.ts +10 -4
  1422. package/src/seo/title-field.ts +19 -0
  1423. package/src/settings/index.ts +36 -3
  1424. package/src/settings/types.ts +7 -0
  1425. package/src/taxonomies/index.ts +55 -25
  1426. package/src/transfer/analyze/target.ts +5 -0
  1427. package/src/transfer/domain.ts +23 -0
  1428. package/src/transfer/export/readers.ts +6 -2
  1429. package/src/transfer/format/columns.ts +4 -0
  1430. package/src/transfer/format/settings.ts +1 -0
  1431. package/src/transfer/import/scaffold.ts +66 -8
  1432. package/src/ui.ts +18 -19
  1433. package/src/virtual-modules.d.ts +20 -3
  1434. package/src/visual-editing/toolbar.ts +73 -51
  1435. package/src/widgets/recent-posts.ts +13 -0
  1436. package/dist/action-token-SK8zyN7w.mjs +0 -26
  1437. package/dist/action-token-SK8zyN7w.mjs.map +0 -1
  1438. package/dist/activation-CGlyigmg.mjs +0 -387
  1439. package/dist/activation-CGlyigmg.mjs.map +0 -1
  1440. package/dist/adapters-D9a1PfqH.d.mts +0 -173
  1441. package/dist/adapters-D9a1PfqH.d.mts.map +0 -1
  1442. package/dist/after-32yNRvd2.mjs +0 -99
  1443. package/dist/after-32yNRvd2.mjs.map +0 -1
  1444. package/dist/allowed-origins-CEug-p0t.mjs +0 -116
  1445. package/dist/allowed-origins-CEug-p0t.mjs.map +0 -1
  1446. package/dist/api--PYoyeTo.mjs +0 -5098
  1447. package/dist/api--PYoyeTo.mjs.map +0 -1
  1448. package/dist/api-tokens-DqSlkDVI.mjs +0 -9
  1449. package/dist/api-tokens-DqSlkDVI.mjs.map +0 -1
  1450. package/dist/api-tokens-GNCsIegW.mjs +0 -173
  1451. package/dist/api-tokens-GNCsIegW.mjs.map +0 -1
  1452. package/dist/apply-DVnupNeS.mjs +0 -1760
  1453. package/dist/apply-DVnupNeS.mjs.map +0 -1
  1454. package/dist/approvals-DTtYSB27.mjs +0 -460
  1455. package/dist/approvals-DTtYSB27.mjs.map +0 -1
  1456. package/dist/artifact-fetch-DIh7iyOV.mjs +0 -659
  1457. package/dist/artifact-fetch-DIh7iyOV.mjs.map +0 -1
  1458. package/dist/artifacts-Dvdp2KK-.mjs +0 -323
  1459. package/dist/artifacts-Dvdp2KK-.mjs.map +0 -1
  1460. package/dist/audit-B8XE-0UV.mjs +0 -127
  1461. package/dist/audit-B8XE-0UV.mjs.map +0 -1
  1462. package/dist/authoritative-records-CQlB3JzE.mjs +0 -5183
  1463. package/dist/authoritative-records-CQlB3JzE.mjs.map +0 -1
  1464. package/dist/authorize-NJgp8kLI.mjs +0 -74
  1465. package/dist/authorize-NJgp8kLI.mjs.map +0 -1
  1466. package/dist/backup-8rPSJ28a.mjs +0 -246
  1467. package/dist/backup-8rPSJ28a.mjs.map +0 -1
  1468. package/dist/base64-BQBZwXCx.mjs +0 -63
  1469. package/dist/base64-BQBZwXCx.mjs.map +0 -1
  1470. package/dist/block-types-BbOrfnWs.mjs +0 -132
  1471. package/dist/block-types-BbOrfnWs.mjs.map +0 -1
  1472. package/dist/block-values-Dg0-8PPS.mjs +0 -215
  1473. package/dist/block-values-Dg0-8PPS.mjs.map +0 -1
  1474. package/dist/byline-DHJS-GGb.mjs +0 -994
  1475. package/dist/byline-DHJS-GGb.mjs.map +0 -1
  1476. package/dist/byline-fields-CiR8FvvF.mjs +0 -280
  1477. package/dist/byline-fields-CiR8FvvF.mjs.map +0 -1
  1478. package/dist/byline-fields-D6KYsEa7.mjs +0 -123
  1479. package/dist/byline-fields-D6KYsEa7.mjs.map +0 -1
  1480. package/dist/byline-registry-BhzpO41z.mjs +0 -406
  1481. package/dist/byline-registry-BhzpO41z.mjs.map +0 -1
  1482. package/dist/bylines-Bsg5cH4S.mjs +0 -234
  1483. package/dist/bylines-Bsg5cH4S.mjs.map +0 -1
  1484. package/dist/bylines-f_ZEc6Sn.mjs +0 -150
  1485. package/dist/bylines-f_ZEc6Sn.mjs.map +0 -1
  1486. package/dist/cache-5DHbpEWu.mjs +0 -151
  1487. package/dist/cache-5DHbpEWu.mjs.map +0 -1
  1488. package/dist/canonical-BudtH-Fx.mjs +0 -174
  1489. package/dist/canonical-BudtH-Fx.mjs.map +0 -1
  1490. package/dist/capture-triggers-BezAvWcB.mjs +0 -362
  1491. package/dist/capture-triggers-BezAvWcB.mjs.map +0 -1
  1492. package/dist/challenge-store-B1C0V4b3.mjs +0 -51
  1493. package/dist/challenge-store-B1C0V4b3.mjs.map +0 -1
  1494. package/dist/checksum-CEqvfxGX.mjs +0 -162
  1495. package/dist/checksum-CEqvfxGX.mjs.map +0 -1
  1496. package/dist/chrome-tags-BIKBMZYO.mjs +0 -24
  1497. package/dist/chrome-tags-BIKBMZYO.mjs.map +0 -1
  1498. package/dist/chunks-DiW8VMwz.mjs +0 -25
  1499. package/dist/chunks-DiW8VMwz.mjs.map +0 -1
  1500. package/dist/collection-slugs-cache-DIrLjqH-.mjs +0 -91
  1501. package/dist/collection-slugs-cache-DIrLjqH-.mjs.map +0 -1
  1502. package/dist/comment-DB74Zpa4.mjs +0 -335
  1503. package/dist/comment-DB74Zpa4.mjs.map +0 -1
  1504. package/dist/comment-reaction-BScxIWUn.mjs +0 -85
  1505. package/dist/comment-reaction-BScxIWUn.mjs.map +0 -1
  1506. package/dist/comments-Cor_zKml.mjs +0 -195
  1507. package/dist/comments-Cor_zKml.mjs.map +0 -1
  1508. package/dist/comments-yiRFx3w5.mjs +0 -99
  1509. package/dist/comments-yiRFx3w5.mjs.map +0 -1
  1510. package/dist/components-Brp__9xo.mjs +0 -112
  1511. package/dist/components-Brp__9xo.mjs.map +0 -1
  1512. package/dist/config-D44_8G9J.d.mts +0 -41
  1513. package/dist/config-D44_8G9J.d.mts.map +0 -1
  1514. package/dist/config-DBU6iUQB.mjs +0 -228
  1515. package/dist/config-DBU6iUQB.mjs.map +0 -1
  1516. package/dist/config-sDhZvkLR.d.mts +0 -6835
  1517. package/dist/config-sDhZvkLR.d.mts.map +0 -1
  1518. package/dist/connection-BtEN_lP9.mjs +0 -36
  1519. package/dist/connection-BtEN_lP9.mjs.map +0 -1
  1520. package/dist/content-BKHUVsE5.mjs +0 -2112
  1521. package/dist/content-BKHUVsE5.mjs.map +0 -1
  1522. package/dist/content-list-query-ByP4jRpZ.d.mts +0 -26
  1523. package/dist/content-list-query-ByP4jRpZ.d.mts.map +0 -1
  1524. package/dist/content-policy-BmE0MPZY.mjs +0 -46
  1525. package/dist/content-policy-BmE0MPZY.mjs.map +0 -1
  1526. package/dist/content-repair-Ukdxoq-R.mjs +0 -442
  1527. package/dist/content-repair-Ukdxoq-R.mjs.map +0 -1
  1528. package/dist/context-CzjejcsE.mjs +0 -2089
  1529. package/dist/context-CzjejcsE.mjs.map +0 -1
  1530. package/dist/credits-BKREepht.mjs +0 -110
  1531. package/dist/credits-BKREepht.mjs.map +0 -1
  1532. package/dist/cron-D7obTIfk.mjs +0 -306
  1533. package/dist/cron-D7obTIfk.mjs.map +0 -1
  1534. package/dist/dashboard-ynr1qJWM.mjs +0 -168
  1535. package/dist/dashboard-ynr1qJWM.mjs.map +0 -1
  1536. package/dist/default-C0W-PhAp.mjs +0 -81
  1537. package/dist/default-C0W-PhAp.mjs.map +0 -1
  1538. package/dist/deferred-tasks-wlMFJL95.d.mts +0 -10
  1539. package/dist/deferred-tasks-wlMFJL95.d.mts.map +0 -1
  1540. package/dist/destination-DR3IHjmy.mjs +0 -18
  1541. package/dist/destination-DR3IHjmy.mjs.map +0 -1
  1542. package/dist/dev-typegen-EBni_pOQ.mjs +0 -29
  1543. package/dist/dev-typegen-EBni_pOQ.mjs.map +0 -1
  1544. package/dist/device-flow-D1U392GC.mjs +0 -519
  1545. package/dist/device-flow-D1U392GC.mjs.map +0 -1
  1546. package/dist/dialect-helpers-B1XN2HGB.mjs +0 -314
  1547. package/dist/dialect-helpers-B1XN2HGB.mjs.map +0 -1
  1548. package/dist/digest-DJ1tHCgy.mjs +0 -194
  1549. package/dist/digest-DJ1tHCgy.mjs.map +0 -1
  1550. package/dist/direct-executor-Bs2g0ake.mjs +0 -117
  1551. package/dist/direct-executor-Bs2g0ake.mjs.map +0 -1
  1552. package/dist/dist-BUmWMTbN.mjs +0 -810
  1553. package/dist/dist-BUmWMTbN.mjs.map +0 -1
  1554. package/dist/email-console-FFVJWb9N.mjs +0 -50
  1555. package/dist/email-console-FFVJWb9N.mjs.map +0 -1
  1556. package/dist/email-locale-Bs3HFdnq.mjs +0 -25
  1557. package/dist/email-locale-Bs3HFdnq.mjs.map +0 -1
  1558. package/dist/emdash-runtime-C8T-pZpS.mjs +0 -4425
  1559. package/dist/emdash-runtime-C8T-pZpS.mjs.map +0 -1
  1560. package/dist/enrich-DFlfnd3u.mjs +0 -194
  1561. package/dist/enrich-DFlfnd3u.mjs.map +0 -1
  1562. package/dist/entry-lock-BulbgPBX.d.mts +0 -4568
  1563. package/dist/entry-lock-BulbgPBX.d.mts.map +0 -1
  1564. package/dist/entry-lock-CRVmruM0.mjs +0 -1211
  1565. package/dist/entry-lock-CRVmruM0.mjs.map +0 -1
  1566. package/dist/entry-lock-D-zJQ4q6.mjs +0 -163
  1567. package/dist/entry-lock-D-zJQ4q6.mjs.map +0 -1
  1568. package/dist/entry-locks-CJ9uhqg1.mjs +0 -167
  1569. package/dist/entry-locks-CJ9uhqg1.mjs.map +0 -1
  1570. package/dist/env-types-BE3bCvfP.mjs +0 -38
  1571. package/dist/env-types-BE3bCvfP.mjs.map +0 -1
  1572. package/dist/error-BCMgPxdn.mjs +0 -90
  1573. package/dist/error-BCMgPxdn.mjs.map +0 -1
  1574. package/dist/errors-8gJqv-XV.mjs +0 -492
  1575. package/dist/errors-8gJqv-XV.mjs.map +0 -1
  1576. package/dist/errors-B4f4It-2.mjs +0 -120
  1577. package/dist/errors-B4f4It-2.mjs.map +0 -1
  1578. package/dist/escape-lsNq38PP.mjs +0 -9
  1579. package/dist/escape-lsNq38PP.mjs.map +0 -1
  1580. package/dist/fence-Dagicj14.mjs +0 -162
  1581. package/dist/fence-Dagicj14.mjs.map +0 -1
  1582. package/dist/field-map-BSXdNGt5.mjs +0 -84
  1583. package/dist/field-map-BSXdNGt5.mjs.map +0 -1
  1584. package/dist/focal-point-CgCcr1Ca.mjs +0 -23
  1585. package/dist/focal-point-CgCcr1Ca.mjs.map +0 -1
  1586. package/dist/fts-manager-6861qcwk.mjs +0 -489
  1587. package/dist/fts-manager-6861qcwk.mjs.map +0 -1
  1588. package/dist/gc-CNkXB3mE.mjs +0 -75
  1589. package/dist/gc-CNkXB3mE.mjs.map +0 -1
  1590. package/dist/hash-BJaeek87.mjs +0 -37
  1591. package/dist/hash-BJaeek87.mjs.map +0 -1
  1592. package/dist/hook-result-f8t7hIuu.d.mts +0 -31
  1593. package/dist/hook-result-f8t7hIuu.d.mts.map +0 -1
  1594. package/dist/hreflang-8dUOJAPJ.d.mts +0 -50
  1595. package/dist/hreflang-8dUOJAPJ.d.mts.map +0 -1
  1596. package/dist/hreflang-BW5A4FLK.mjs +0 -105
  1597. package/dist/hreflang-BW5A4FLK.mjs.map +0 -1
  1598. package/dist/http-route-dispatch-rXKvTNm9.mjs +0 -342
  1599. package/dist/http-route-dispatch-rXKvTNm9.mjs.map +0 -1
  1600. package/dist/identity-CPRRSovU.mjs +0 -35
  1601. package/dist/identity-CPRRSovU.mjs.map +0 -1
  1602. package/dist/import-yVbfPyfd.mjs +0 -2126
  1603. package/dist/import-yVbfPyfd.mjs.map +0 -1
  1604. package/dist/index-VM7Fzxwe.d.mts +0 -260
  1605. package/dist/index-VM7Fzxwe.d.mts.map +0 -1
  1606. package/dist/init-lock-BGmew3r1.mjs +0 -56
  1607. package/dist/init-lock-BGmew3r1.mjs.map +0 -1
  1608. package/dist/install-finalization-RU6VrHOX.mjs +0 -58
  1609. package/dist/install-finalization-RU6VrHOX.mjs.map +0 -1
  1610. package/dist/json-recordset-D0WhN2UA.mjs +0 -12
  1611. package/dist/json-recordset-D0WhN2UA.mjs.map +0 -1
  1612. package/dist/json-schema-v_D_pPNG.mjs +0 -15
  1613. package/dist/json-schema-v_D_pPNG.mjs.map +0 -1
  1614. package/dist/keys-CifIkT0N.mjs +0 -61
  1615. package/dist/keys-CifIkT0N.mjs.map +0 -1
  1616. package/dist/kinds-B_Qcl5pz.mjs +0 -974
  1617. package/dist/kinds-B_Qcl5pz.mjs.map +0 -1
  1618. package/dist/lifecycle-B8d7Rdqx.mjs +0 -25
  1619. package/dist/lifecycle-B8d7Rdqx.mjs.map +0 -1
  1620. package/dist/load-D4xtzm6h.mjs +0 -28
  1621. package/dist/load-D4xtzm6h.mjs.map +0 -1
  1622. package/dist/loader-DhnedqY4.mjs +0 -1478
  1623. package/dist/loader-DhnedqY4.mjs.map +0 -1
  1624. package/dist/loops-B2YS-Zzr.mjs +0 -205
  1625. package/dist/loops-B2YS-Zzr.mjs.map +0 -1
  1626. package/dist/manifest-builder-g1FLviel.mjs +0 -196
  1627. package/dist/manifest-builder-g1FLviel.mjs.map +0 -1
  1628. package/dist/manifest-schema-DNb4XmTS.mjs +0 -497
  1629. package/dist/manifest-schema-DNb4XmTS.mjs.map +0 -1
  1630. package/dist/marketplace-CqbgeIa7.mjs +0 -257
  1631. package/dist/marketplace-CqbgeIa7.mjs.map +0 -1
  1632. package/dist/media-BR4_t-Wd.mjs +0 -416
  1633. package/dist/media-BR4_t-Wd.mjs.map +0 -1
  1634. package/dist/media-CikS-q6E.mjs +0 -294
  1635. package/dist/media-CikS-q6E.mjs.map +0 -1
  1636. package/dist/media-DepNLhPq.mjs +0 -383
  1637. package/dist/media-DepNLhPq.mjs.map +0 -1
  1638. package/dist/media-allowlist-BMBLqyWh.mjs +0 -45
  1639. package/dist/media-allowlist-BMBLqyWh.mjs.map +0 -1
  1640. package/dist/media-folders-CI0Wydfo.mjs +0 -210
  1641. package/dist/media-folders-CI0Wydfo.mjs.map +0 -1
  1642. package/dist/media-url-BQgKvpQ5.mjs +0 -43
  1643. package/dist/media-url-BQgKvpQ5.mjs.map +0 -1
  1644. package/dist/media-usage-X1_20MY-.mjs +0 -282
  1645. package/dist/media-usage-X1_20MY-.mjs.map +0 -1
  1646. package/dist/media-usage-activation-bWusy3M2.mjs +0 -78
  1647. package/dist/media-usage-activation-bWusy3M2.mjs.map +0 -1
  1648. package/dist/media-usage-work-B2RaoJIa.mjs +0 -151
  1649. package/dist/media-usage-work-B2RaoJIa.mjs.map +0 -1
  1650. package/dist/media-usage-work-BCK2J-v_.mjs +0 -1036
  1651. package/dist/media-usage-work-BCK2J-v_.mjs.map +0 -1
  1652. package/dist/menus-B0Qqv_cS.mjs +0 -837
  1653. package/dist/menus-B0Qqv_cS.mjs.map +0 -1
  1654. package/dist/menus-oypxT1pI.mjs +0 -3802
  1655. package/dist/menus-oypxT1pI.mjs.map +0 -1
  1656. package/dist/menus-uEAxWAm1.mjs +0 -92
  1657. package/dist/menus-uEAxWAm1.mjs.map +0 -1
  1658. package/dist/mime-D1We9jUx.mjs +0 -81
  1659. package/dist/mime-D1We9jUx.mjs.map +0 -1
  1660. package/dist/mode-C-D3qICy.mjs +0 -23
  1661. package/dist/mode-C-D3qICy.mjs.map +0 -1
  1662. package/dist/node-sqlite-compat-CrKzRr0J.mjs +0 -63
  1663. package/dist/node-sqlite-compat-CrKzRr0J.mjs.map +0 -1
  1664. package/dist/normalize-Cx-bNwhP.mjs +0 -220
  1665. package/dist/normalize-Cx-bNwhP.mjs.map +0 -1
  1666. package/dist/oauth-authorization-CPLgBrdo.mjs +0 -287
  1667. package/dist/oauth-authorization-CPLgBrdo.mjs.map +0 -1
  1668. package/dist/oauth-clients-BT0Pg-MO.mjs +0 -266
  1669. package/dist/oauth-clients-BT0Pg-MO.mjs.map +0 -1
  1670. package/dist/oauth-state-store-BndCfRum.mjs +0 -50
  1671. package/dist/oauth-state-store-BndCfRum.mjs.map +0 -1
  1672. package/dist/oauth-user-lookup-BDgF6IVG.mjs +0 -26
  1673. package/dist/oauth-user-lookup-BDgF6IVG.mjs.map +0 -1
  1674. package/dist/object-cache-DmKr09La.mjs +0 -603
  1675. package/dist/object-cache-DmKr09La.mjs.map +0 -1
  1676. package/dist/options-BUUgroHg.d.mts +0 -81
  1677. package/dist/options-BUUgroHg.d.mts.map +0 -1
  1678. package/dist/options-DhrI7eMv.mjs +0 -208
  1679. package/dist/options-DhrI7eMv.mjs.map +0 -1
  1680. package/dist/ownership-MiyA7qKO.mjs +0 -12
  1681. package/dist/ownership-MiyA7qKO.mjs.map +0 -1
  1682. package/dist/parse-B_b6gZxG.mjs +0 -81
  1683. package/dist/parse-B_b6gZxG.mjs.map +0 -1
  1684. package/dist/parse-Dndx1QmN.d.mts +0 -176
  1685. package/dist/parse-Dndx1QmN.d.mts.map +0 -1
  1686. package/dist/passkey-config-D2Lua5__.mjs +0 -46
  1687. package/dist/passkey-config-D2Lua5__.mjs.map +0 -1
  1688. package/dist/paths-biDzFTY2.mjs +0 -77
  1689. package/dist/paths-biDzFTY2.mjs.map +0 -1
  1690. package/dist/patterns-CryGz_EV.mjs +0 -159
  1691. package/dist/patterns-CryGz_EV.mjs.map +0 -1
  1692. package/dist/placeholder-CSKu5OkD.d.mts +0 -314
  1693. package/dist/placeholder-CSKu5OkD.d.mts.map +0 -1
  1694. package/dist/plan-CCoqxNoU.mjs +0 -135
  1695. package/dist/plan-CCoqxNoU.mjs.map +0 -1
  1696. package/dist/plugin-tool-name-DDUgN_0p.mjs +0 -27
  1697. package/dist/plugin-tool-name-DDUgN_0p.mjs.map +0 -1
  1698. package/dist/plugins-COJ2L49n.mjs +0 -261
  1699. package/dist/plugins-COJ2L49n.mjs.map +0 -1
  1700. package/dist/policy-BPugqmeV.mjs +0 -53
  1701. package/dist/policy-BPugqmeV.mjs.map +0 -1
  1702. package/dist/portable-text-BH4zgkSm.mjs +0 -311
  1703. package/dist/portable-text-BH4zgkSm.mjs.map +0 -1
  1704. package/dist/preview-DLexxwp3.mjs +0 -107
  1705. package/dist/preview-DLexxwp3.mjs.map +0 -1
  1706. package/dist/protocol-PoAfD_9W.d.mts +0 -65
  1707. package/dist/protocol-PoAfD_9W.d.mts.map +0 -1
  1708. package/dist/public-plugin-api-routes-CMljrTby.mjs +0 -316
  1709. package/dist/public-plugin-api-routes-CMljrTby.mjs.map +0 -1
  1710. package/dist/public-submission-ayqoyee4.mjs +0 -251
  1711. package/dist/public-submission-ayqoyee4.mjs.map +0 -1
  1712. package/dist/public-url-Bt98vysr.mjs +0 -101
  1713. package/dist/public-url-Bt98vysr.mjs.map +0 -1
  1714. package/dist/query-BFHjCzSh.mjs +0 -37
  1715. package/dist/query-BFHjCzSh.mjs.map +0 -1
  1716. package/dist/query-D62NntCZ.mjs +0 -1146
  1717. package/dist/query-D62NntCZ.mjs.map +0 -1
  1718. package/dist/query-LmPY2y0C.mjs +0 -41
  1719. package/dist/query-LmPY2y0C.mjs.map +0 -1
  1720. package/dist/range-CYfeXgGK.mjs +0 -51
  1721. package/dist/range-CYfeXgGK.mjs.map +0 -1
  1722. package/dist/rate-limit-C04Llsoc.mjs +0 -127
  1723. package/dist/rate-limit-C04Llsoc.mjs.map +0 -1
  1724. package/dist/receipt-BUsQCOeM.mjs +0 -43
  1725. package/dist/receipt-BUsQCOeM.mjs.map +0 -1
  1726. package/dist/redirect-CQAV7mCo.mjs +0 -19
  1727. package/dist/redirect-CQAV7mCo.mjs.map +0 -1
  1728. package/dist/redirect-DjLdw427.mjs +0 -423
  1729. package/dist/redirect-DjLdw427.mjs.map +0 -1
  1730. package/dist/redirect-paths-DOaVBp6E.mjs +0 -36
  1731. package/dist/redirect-paths-DOaVBp6E.mjs.map +0 -1
  1732. package/dist/redirects-Cpq1catN.mjs +0 -446
  1733. package/dist/redirects-Cpq1catN.mjs.map +0 -1
  1734. package/dist/redirects-CyvvZrCJ.mjs +0 -148
  1735. package/dist/redirects-CyvvZrCJ.mjs.map +0 -1
  1736. package/dist/registry-B0-O575m.mjs +0 -8374
  1737. package/dist/registry-B0-O575m.mjs.map +0 -1
  1738. package/dist/relations-WIOojTL4.mjs +0 -789
  1739. package/dist/relations-WIOojTL4.mjs.map +0 -1
  1740. package/dist/request-cache-5z2WzWmh.mjs +0 -104
  1741. package/dist/request-cache-5z2WzWmh.mjs.map +0 -1
  1742. package/dist/request-meta-bwZ_NsvU.mjs +0 -141
  1743. package/dist/request-meta-bwZ_NsvU.mjs.map +0 -1
  1744. package/dist/resolve-BNnm8EkB.mjs +0 -102
  1745. package/dist/resolve-BNnm8EkB.mjs.map +0 -1
  1746. package/dist/resolve-DdNXBJSr.mjs +0 -199
  1747. package/dist/resolve-DdNXBJSr.mjs.map +0 -1
  1748. package/dist/revision-Dx7Uth1X.mjs +0 -374
  1749. package/dist/revision-Dx7Uth1X.mjs.map +0 -1
  1750. package/dist/route-cache-QSOyDEw0.mjs +0 -20
  1751. package/dist/route-cache-QSOyDEw0.mjs.map +0 -1
  1752. package/dist/route-wire-Ca_HWCZ5.mjs +0 -197
  1753. package/dist/route-wire-Ca_HWCZ5.mjs.map +0 -1
  1754. package/dist/routes-avqgc-8r.mjs +0 -272
  1755. package/dist/routes-avqgc-8r.mjs.map +0 -1
  1756. package/dist/runner-Bkkfk4O8.mjs +0 -6669
  1757. package/dist/runner-Bkkfk4O8.mjs.map +0 -1
  1758. package/dist/runner-Dfgp6-S_.d.mts +0 -73
  1759. package/dist/runner-Dfgp6-S_.d.mts.map +0 -1
  1760. package/dist/schema-B-3rntlX.mjs +0 -815
  1761. package/dist/schema-B-3rntlX.mjs.map +0 -1
  1762. package/dist/schema-BqBlUZtb.mjs +0 -13
  1763. package/dist/schema-BqBlUZtb.mjs.map +0 -1
  1764. package/dist/scopes-DNaY7Ey0.mjs +0 -34
  1765. package/dist/scopes-DNaY7Ey0.mjs.map +0 -1
  1766. package/dist/search-BPWTnpnD.mjs +0 -450
  1767. package/dist/search-BPWTnpnD.mjs.map +0 -1
  1768. package/dist/secrets-Dswzrz3k.mjs +0 -369
  1769. package/dist/secrets-Dswzrz3k.mjs.map +0 -1
  1770. package/dist/sections-rSao6rBG.mjs +0 -346
  1771. package/dist/sections-rSao6rBG.mjs.map +0 -1
  1772. package/dist/seo-B_H_pqOd.mjs +0 -133
  1773. package/dist/seo-B_H_pqOd.mjs.map +0 -1
  1774. package/dist/seo-ClB-dw9w.mjs +0 -188
  1775. package/dist/seo-ClB-dw9w.mjs.map +0 -1
  1776. package/dist/service-DpiUQVpp.mjs +0 -150
  1777. package/dist/service-DpiUQVpp.mjs.map +0 -1
  1778. package/dist/session-user-DiE4JKPP.mjs +0 -61
  1779. package/dist/session-user-DiE4JKPP.mjs.map +0 -1
  1780. package/dist/settings--XlUdUaI.mjs +0 -66
  1781. package/dist/settings--XlUdUaI.mjs.map +0 -1
  1782. package/dist/settings-D932YP2-.mjs +0 -519
  1783. package/dist/settings-D932YP2-.mjs.map +0 -1
  1784. package/dist/settings-Dd1uivmQ.mjs +0 -73
  1785. package/dist/settings-Dd1uivmQ.mjs.map +0 -1
  1786. package/dist/setup-complete-qsJYWutC.mjs +0 -65
  1787. package/dist/setup-complete-qsJYWutC.mjs.map +0 -1
  1788. package/dist/setup-nonce-CBFgUFXw.mjs +0 -25
  1789. package/dist/setup-nonce-CBFgUFXw.mjs.map +0 -1
  1790. package/dist/single-flight-cache-D0EaGbN1.mjs +0 -104
  1791. package/dist/single-flight-cache-D0EaGbN1.mjs.map +0 -1
  1792. package/dist/site-domain-oRGS_JfA.mjs +0 -131
  1793. package/dist/site-domain-oRGS_JfA.mjs.map +0 -1
  1794. package/dist/site-settings-DRHfX7bq.mjs +0 -50
  1795. package/dist/site-settings-DRHfX7bq.mjs.map +0 -1
  1796. package/dist/site-url-MB685I5X.mjs +0 -45
  1797. package/dist/site-url-MB685I5X.mjs.map +0 -1
  1798. package/dist/sitemap-name-B8QP8wud.mjs +0 -26
  1799. package/dist/sitemap-name-B8QP8wud.mjs.map +0 -1
  1800. package/dist/slug-aVnUV4SL.mjs +0 -16
  1801. package/dist/slug-aVnUV4SL.mjs.map +0 -1
  1802. package/dist/slugify-BDEG9pLk.mjs +0 -22
  1803. package/dist/slugify-BDEG9pLk.mjs.map +0 -1
  1804. package/dist/snapshot-BjaXDZQ5.mjs +0 -414
  1805. package/dist/snapshot-BjaXDZQ5.mjs.map +0 -1
  1806. package/dist/ssrf-BcYjyM4M.mjs +0 -406
  1807. package/dist/ssrf-BcYjyM4M.mjs.map +0 -1
  1808. package/dist/ssrf-DM0E-D_8.mjs +0 -1
  1809. package/dist/stage-CZQnXM_G.mjs +0 -662
  1810. package/dist/stage-CZQnXM_G.mjs.map +0 -1
  1811. package/dist/staged-ByBmPFtX.mjs +0 -686
  1812. package/dist/staged-ByBmPFtX.mjs.map +0 -1
  1813. package/dist/state-CFbGZziM.mjs +0 -178
  1814. package/dist/state-CFbGZziM.mjs.map +0 -1
  1815. package/dist/status-BFNdxzKc.mjs +0 -30
  1816. package/dist/status-BFNdxzKc.mjs.map +0 -1
  1817. package/dist/storage-query-BFp06Y0s.d.mts +0 -1627
  1818. package/dist/storage-query-BFp06Y0s.d.mts.map +0 -1
  1819. package/dist/tar-DFjExb9X.mjs +0 -449
  1820. package/dist/tar-DFjExb9X.mjs.map +0 -1
  1821. package/dist/target-CWZs2-o6.mjs +0 -27
  1822. package/dist/target-CWZs2-o6.mjs.map +0 -1
  1823. package/dist/taxonomies-5SR76j11.mjs +0 -937
  1824. package/dist/taxonomies-5SR76j11.mjs.map +0 -1
  1825. package/dist/taxonomies-B__VmCKQ.mjs +0 -703
  1826. package/dist/taxonomies-B__VmCKQ.mjs.map +0 -1
  1827. package/dist/taxonomy-CMI5fczd.mjs +0 -563
  1828. package/dist/taxonomy-CMI5fczd.mjs.map +0 -1
  1829. package/dist/tokens-BnhSnGwJ.mjs +0 -171
  1830. package/dist/tokens-BnhSnGwJ.mjs.map +0 -1
  1831. package/dist/transaction-CkoQ5wqQ.mjs +0 -29
  1832. package/dist/transaction-CkoQ5wqQ.mjs.map +0 -1
  1833. package/dist/transfer-BbKfufJ4.mjs +0 -166
  1834. package/dist/transfer-BbKfufJ4.mjs.map +0 -1
  1835. package/dist/transfer-DTGblAj2.mjs +0 -8910
  1836. package/dist/transfer-DTGblAj2.mjs.map +0 -1
  1837. package/dist/transfer-download-D9LQEDX0.mjs +0 -33
  1838. package/dist/transfer-download-D9LQEDX0.mjs.map +0 -1
  1839. package/dist/transformations-Bx4lYY0Y.mjs +0 -196
  1840. package/dist/transformations-Bx4lYY0Y.mjs.map +0 -1
  1841. package/dist/transport-Dm5QzpT_.d.mts +0 -42
  1842. package/dist/transport-Dm5QzpT_.d.mts.map +0 -1
  1843. package/dist/transport-Dzpn5b3i.mjs +0 -137
  1844. package/dist/transport-Dzpn5b3i.mjs.map +0 -1
  1845. package/dist/trusted-proxy-BU3Nx9g1.mjs +0 -51
  1846. package/dist/trusted-proxy-BU3Nx9g1.mjs.map +0 -1
  1847. package/dist/turnstile-Cs2wfkJG.mjs +0 -58
  1848. package/dist/turnstile-Cs2wfkJG.mjs.map +0 -1
  1849. package/dist/types-BAsCk5KU.d.mts +0 -87
  1850. package/dist/types-BAsCk5KU.d.mts.map +0 -1
  1851. package/dist/types-BuvSwT9Y.d.mts +0 -375
  1852. package/dist/types-BuvSwT9Y.d.mts.map +0 -1
  1853. package/dist/types-C4KT3Md2.d.mts +0 -293
  1854. package/dist/types-C4KT3Md2.d.mts.map +0 -1
  1855. package/dist/types-CVXHwIBB.d.mts +0 -125
  1856. package/dist/types-CVXHwIBB.d.mts.map +0 -1
  1857. package/dist/types-C_asjp1J.mjs +0 -201
  1858. package/dist/types-C_asjp1J.mjs.map +0 -1
  1859. package/dist/types-CadaL_k8.d.mts +0 -366
  1860. package/dist/types-CadaL_k8.d.mts.map +0 -1
  1861. package/dist/types-CgfFGfO5.mjs +0 -16
  1862. package/dist/types-CgfFGfO5.mjs.map +0 -1
  1863. package/dist/types-Cj0_yZkn.mjs +0 -18
  1864. package/dist/types-Cj0_yZkn.mjs.map +0 -1
  1865. package/dist/types-CjftrmZR.d.mts +0 -1741
  1866. package/dist/types-CjftrmZR.d.mts.map +0 -1
  1867. package/dist/types-DKwRUA-x.d.mts +0 -916
  1868. package/dist/types-DKwRUA-x.d.mts.map +0 -1
  1869. package/dist/types-DwhEvIVb.mjs +0 -133
  1870. package/dist/types-DwhEvIVb.mjs.map +0 -1
  1871. package/dist/types-GwAyS5SH.d.mts +0 -227
  1872. package/dist/types-GwAyS5SH.d.mts.map +0 -1
  1873. package/dist/types-qHVygneX.mjs +0 -77
  1874. package/dist/types-qHVygneX.mjs.map +0 -1
  1875. package/dist/types-sUHaH7lC.mjs +0 -37
  1876. package/dist/types-sUHaH7lC.mjs.map +0 -1
  1877. package/dist/types-uU2YNYSt.d.mts +0 -209
  1878. package/dist/types-uU2YNYSt.d.mts.map +0 -1
  1879. package/dist/update-check-ABBJgg6M.mjs +0 -161
  1880. package/dist/update-check-ABBJgg6M.mjs.map +0 -1
  1881. package/dist/upload-attempts-DPFC4COv.mjs +0 -32
  1882. package/dist/upload-attempts-DPFC4COv.mjs.map +0 -1
  1883. package/dist/url-DTfGDJhI.mjs +0 -104
  1884. package/dist/url-DTfGDJhI.mjs.map +0 -1
  1885. package/dist/url-pattern-QATUE_rv.mjs +0 -41
  1886. package/dist/url-pattern-QATUE_rv.mjs.map +0 -1
  1887. package/dist/user-By8SzQxS.mjs +0 -171
  1888. package/dist/user-By8SzQxS.mjs.map +0 -1
  1889. package/dist/utils-D5uOi6WS.mjs +0 -450
  1890. package/dist/utils-D5uOi6WS.mjs.map +0 -1
  1891. package/dist/utils-Szp4iBQB.d.mts +0 -376
  1892. package/dist/utils-Szp4iBQB.d.mts.map +0 -1
  1893. package/dist/validate-DDvxy6qG.d.mts +0 -468
  1894. package/dist/validate-DDvxy6qG.d.mts.map +0 -1
  1895. package/dist/validate-Dz-TIOFB.mjs +0 -524
  1896. package/dist/validate-Dz-TIOFB.mjs.map +0 -1
  1897. package/dist/validation-Fc9ZSUS_.mjs +0 -221
  1898. package/dist/validation-Fc9ZSUS_.mjs.map +0 -1
  1899. package/dist/version-BZj18Q7G.mjs +0 -9
  1900. package/dist/version-BZj18Q7G.mjs.map +0 -1
  1901. package/dist/version-Bu6Nlbb5.mjs +0 -7
  1902. package/dist/version-Bu6Nlbb5.mjs.map +0 -1
  1903. package/dist/version-DqB7LIO7.mjs +0 -49
  1904. package/dist/version-DqB7LIO7.mjs.map +0 -1
  1905. package/dist/video-DytCnw3L.mjs +0 -54
  1906. package/dist/video-DytCnw3L.mjs.map +0 -1
  1907. package/dist/virtual-modules-DO954n7P.mjs +0 -515
  1908. package/dist/virtual-modules-DO954n7P.mjs.map +0 -1
  1909. package/dist/widgets-BUx_Mf2q.mjs +0 -134
  1910. package/dist/widgets-BUx_Mf2q.mjs.map +0 -1
  1911. package/dist/wxr-taxonomies-DbJtWrWM.mjs +0 -454
  1912. package/dist/wxr-taxonomies-DbJtWrWM.mjs.map +0 -1
  1913. package/dist/wxr-taxonomies-Dy2i2ON3.d.mts +0 -34
  1914. package/dist/wxr-taxonomies-Dy2i2ON3.d.mts.map +0 -1
  1915. package/dist/zod-generator--nlM0930.mjs +0 -425
  1916. package/dist/zod-generator--nlM0930.mjs.map +0 -1
@@ -1,2089 +0,0 @@
1
- import { n as validateJsonFieldName, t as validateIdentifier } from "./validate-DANX1-Qi.mjs";
2
- import { _ as pluginDataUpdateGuard, g as pluginDataOrderExpr, h as pluginDataExtractExpr, u as isPostgres, v as pluginDataWriteExpr } from "./dialect-helpers-B1XN2HGB.mjs";
3
- import { r as getI18nConfig, u as resolveContentCreateLocale } from "./config-Cs_AwWXI.mjs";
4
- import { i as serializeConditionalValue, n as assertStorageKey, r as assertStorageRevision, t as OptionsRepository } from "./options-DhrI7eMv.mjs";
5
- import { t as ContentRepository } from "./content-BKHUVsE5.mjs";
6
- import { n as localeMatches } from "./query-BFHjCzSh.mjs";
7
- import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-DiW8VMwz.mjs";
8
- import { a as InvalidCursorError, l as decodeCursor, o as MAX_CURSOR_LENGTH, u as encodeCursor } from "./types-DwhEvIVb.mjs";
9
- import { r as normalizeRevisionLimit, t as RevisionRepository } from "./revision-Dx7Uth1X.mjs";
10
- import { t as withTransaction } from "./transaction-CkoQ5wqQ.mjs";
11
- import { t as isValidFocalPointUpdate } from "./focal-point-CgCcr1Ca.mjs";
12
- import { t as MediaRepository } from "./media-DepNLhPq.mjs";
13
- import { t as UserRepository } from "./user-By8SzQxS.mjs";
14
- import { t as TaxonomyRepository } from "./taxonomy-CMI5fczd.mjs";
15
- import { t as CommentRepository } from "./comment-DB74Zpa4.mjs";
16
- import { a as resolveLocalizedContentRoutePath } from "./resolve-DdNXBJSr.mjs";
17
- import { t as RedirectRepository } from "./redirect-DjLdw427.mjs";
18
- import { n as normalizeMime, t as matchesMimeAllowlist } from "./mime-D1We9jUx.mjs";
19
- import { t as enrichImageMetadata } from "./enrich-DFlfnd3u.mjs";
20
- import { t as EntryLockRepository } from "./entry-locks-CJ9uhqg1.mjs";
21
- import { t as SeoRepository } from "./seo-B_H_pqOd.mjs";
22
- import { v as findTaxonomyStructure, x as selectTaxonomyDefs } from "./loader-DhnedqY4.mjs";
23
- import { W as markContentMediaUsageCollectionStaleSafely, n as SchemaRegistry } from "./registry-B0-O575m.mjs";
24
- import { n as handleMediaDelete } from "./media-CikS-q6E.mjs";
25
- import { createPluginSecretRedactor } from "./plugins/secret-redactor.mjs";
26
- import { c as invalidateSiteSettingsCache, p as createSettingsAccess } from "./settings-D932YP2-.mjs";
27
- import { s as handleTermCreate } from "./taxonomies-5SR76j11.mjs";
28
- import { o as stripCredentialHeaders, r as resolveAndValidateExternalUrl, t as SsrfError } from "./ssrf-BcYjyM4M.mjs";
29
- import { f as updateRedirectBody, t as createRedirectBody } from "./redirects-CyvvZrCJ.mjs";
30
- import { t as CONTENT_TYPE_RE } from "./media-BR4_t-Wd.mjs";
31
- import { t as GLOBAL_UPLOAD_ALLOWLIST } from "./media-allowlist-BMBLqyWh.mjs";
32
- import { a as handleRedirectCreate, c as handleRedirectList, l as handleRedirectUpdate, o as handleRedirectDelete } from "./redirects-Cpq1catN.mjs";
33
- import { t as resolveBylineCredits } from "./credits-BKREepht.mjs";
34
- import { t as CronAccessImpl } from "./cron-D7obTIfk.mjs";
35
- import { bufferPluginHttpRequest, pluginHttpRedirectAction, pluginHttpResponseFromWire, pluginHttpResponseToWire, rewritePluginHttpRedirect } from "./plugins/http-wire.mjs";
36
- import { sql } from "kysely";
37
- import { ulid } from "ulidx";
38
- import mime from "mime/lite";
39
-
40
- //#region src/plugins/storage-query.ts
41
- /**
42
- * Error thrown when querying non-indexed fields
43
- */
44
- var StorageQueryError = class extends Error {
45
- constructor(message, field, suggestion) {
46
- super(message);
47
- this.field = field;
48
- this.suggestion = suggestion;
49
- this.name = "StorageQueryError";
50
- }
51
- };
52
- /**
53
- * Error thrown when a guarded `updateIf` loses a concurrent race by aborting
54
- * rather than resolving to `{ applied: false }`.
55
- *
56
- * `updateIf`'s `{ applied: false }` contract (row absent OR guard failed)
57
- * assumes READ COMMITTED — the default. There, a losing concurrent writer
58
- * re-evaluates the guard against the winner's freshly committed row and
59
- * cleanly resolves to `{ applied: false }`. Two aborts escape that contract:
60
- *
61
- * - `40001` (serialization_failure), only above READ COMMITTED, where the
62
- * loser cannot re-read against a newer snapshot.
63
- * - `40P01` (deadlock_detected), at any isolation level, when transactions
64
- * take row locks in opposite order.
65
- *
66
- * This error surfaces either abort so the caller can retry the write.
67
- *
68
- * The no-oversell SAFETY invariant holds either way: a losing writer NEVER
69
- * applies its update — it either sees `{ applied: false }` or throws here.
70
- */
71
- var StorageSerializationError = class extends Error {
72
- code = "STORAGE_SERIALIZATION_FAILURE";
73
- retryable = true;
74
- /** The Postgres SQLSTATE that triggered this error (`40001` / `40P01`). */
75
- sqlState;
76
- constructor(message, options) {
77
- super(message, { cause: options?.cause });
78
- this.name = "StorageSerializationError";
79
- this.sqlState = options?.sqlState;
80
- }
81
- };
82
- /**
83
- * Check if a value is a range filter
84
- */
85
- function isRangeFilter(value) {
86
- if (typeof value !== "object" || value === null) return false;
87
- return "gt" in value || "gte" in value || "lt" in value || "lte" in value;
88
- }
89
- /**
90
- * Check if a value is an IN filter
91
- */
92
- function isInFilter(value) {
93
- if (typeof value !== "object" || value === null) return false;
94
- return "in" in value && Array.isArray(value.in);
95
- }
96
- /**
97
- * Check if a value is a startsWith filter
98
- */
99
- function isStartsWithFilter(value) {
100
- if (typeof value !== "object" || value === null) return false;
101
- return "startsWith" in value && typeof value.startsWith === "string";
102
- }
103
- /**
104
- * Escape LIKE pattern metacharacters so a startsWith prefix matches
105
- * literally. Without this, `%` and `_` in the prefix act as wildcards
106
- * (e.g. `{ startsWith: "50%" }` would match "50x off").
107
- */
108
- function escapeLikePattern(value) {
109
- return value.replaceAll("\\", "\\\\").replaceAll("%", "\\%").replaceAll("_", "\\_");
110
- }
111
- /**
112
- * Get the set of indexed fields from index declarations
113
- */
114
- function getIndexedFields(indexes) {
115
- const fields = /* @__PURE__ */ new Set();
116
- for (const index of indexes) if (Array.isArray(index)) for (const field of index) fields.add(field);
117
- else fields.add(index);
118
- return fields;
119
- }
120
- /**
121
- * Validate that all fields in a where clause are indexed
122
- */
123
- function validateWhereClause(where, indexedFields, pluginId, collection) {
124
- for (const field of Object.keys(where)) if (!indexedFields.has(field)) throw new StorageQueryError(`Cannot query on non-indexed field '${field}'.`, field, `Add '${field}' to storage.${collection}.indexes in plugin '${pluginId}' to enable this query.`);
125
- }
126
- /**
127
- * Validate orderBy fields are indexed
128
- */
129
- function validateOrderByClause(orderBy, indexedFields, pluginId, collection) {
130
- for (const field of Object.keys(orderBy)) if (!indexedFields.has(field)) throw new StorageQueryError(`Cannot order by non-indexed field '${field}'.`, field, `Add '${field}' to storage.${collection}.indexes in plugin '${pluginId}' to enable ordering by this field.`);
131
- }
132
- /**
133
- * SQL expression for extracting a queryable field from the `_plugin_storage.data`
134
- * column.
135
- *
136
- * Delegates to `pluginDataExtractExpr`, which validates the field name before
137
- * interpolation and applies the dialect-correct extraction: a `::jsonb` cast on
138
- * Postgres (the `data` column is `text`) plus an optional type-guarded
139
- * `::numeric` cast so numeric comparisons don't fall back to lexical text
140
- * ordering.
141
- */
142
- function jsonExtract(db, field, options) {
143
- return pluginDataExtractExpr(db, field, options);
144
- }
145
- /**
146
- * SQL expression for ordering by a `_plugin_storage.data` field.
147
- *
148
- * Delegates to `pluginDataOrderExpr`, which orders over the jsonb-native value
149
- * on Postgres so numeric fields sort numerically (not lexically) while staying
150
- * total across heterogeneous data. SQLite keeps `json_extract` (already numeric).
151
- */
152
- function jsonOrderExtract(db, field) {
153
- return pluginDataOrderExpr(db, field);
154
- }
155
- /**
156
- * Build a WHERE clause condition for a single field
157
- */
158
- function buildCondition(db, field, value) {
159
- const extractFor = (numeric) => jsonExtract(db, field, { numeric });
160
- if (value === null) return {
161
- sql: `${extractFor(false)} IS NULL`,
162
- params: []
163
- };
164
- if (typeof value === "number") return {
165
- sql: `${extractFor(true)} = ?`,
166
- params: [value]
167
- };
168
- if (typeof value === "string") return {
169
- sql: `${extractFor(false)} = ?`,
170
- params: [value]
171
- };
172
- if (typeof value === "boolean") return {
173
- sql: `${extractFor(false)} = ?`,
174
- params: [value]
175
- };
176
- if (isInFilter(value)) {
177
- const numeric = value.in.length > 0 && value.in.every((v) => typeof v === "number");
178
- const placeholders = value.in.map(() => "?").join(", ");
179
- return {
180
- sql: `${extractFor(numeric)} IN (${placeholders})`,
181
- params: value.in
182
- };
183
- }
184
- if (isStartsWithFilter(value)) return {
185
- sql: `${extractFor(false)} LIKE ? ESCAPE '\\'`,
186
- params: [`${escapeLikePattern(value.startsWith)}%`]
187
- };
188
- if (isRangeFilter(value)) {
189
- const conditions = [];
190
- const params = [];
191
- const pushBound = (op, bound) => {
192
- conditions.push(`${extractFor(typeof bound === "number")} ${op} ?`);
193
- params.push(bound);
194
- };
195
- if (value.gt !== void 0) pushBound(">", value.gt);
196
- if (value.gte !== void 0) pushBound(">=", value.gte);
197
- if (value.lt !== void 0) pushBound("<", value.lt);
198
- if (value.lte !== void 0) pushBound("<=", value.lte);
199
- if (conditions.length === 0) throw new StorageQueryError(`Range filter for field '${field}' has no defined bound`, field, "Provide at least one of gt, gte, lt, or lte, or omit the field.");
200
- return {
201
- sql: conditions.join(" AND "),
202
- params
203
- };
204
- }
205
- throw new StorageQueryError(`Unknown filter type for field '${field}'`);
206
- }
207
- /**
208
- * Build a complete WHERE clause from a WhereClause object
209
- */
210
- function buildWhereClause(db, where) {
211
- const conditions = [];
212
- const params = [];
213
- for (const [field, value] of Object.entries(where)) {
214
- const condition = buildCondition(db, field, value);
215
- if (!condition.sql) continue;
216
- conditions.push(condition.sql);
217
- params.push(...condition.params);
218
- }
219
- if (conditions.length === 0) return {
220
- sql: "",
221
- params: []
222
- };
223
- return {
224
- sql: conditions.join(" AND "),
225
- params
226
- };
227
- }
228
-
229
- //#endregion
230
- //#region src/plugins/storage-update.ts
231
- function isRecord$1(value) {
232
- return typeof value === "object" && value !== null && !Array.isArray(value);
233
- }
234
- function requireRecord(value, label) {
235
- if (!isRecord$1(value)) throw new TypeError(`${label} must be an object`);
236
- const prototype = Object.getPrototypeOf(value);
237
- if (prototype !== Object.prototype && prototype !== null) throw new TypeError(`${label} must be a plain object`);
238
- return value;
239
- }
240
- function operand(value) {
241
- if (typeof value === "string" || typeof value === "number" && Number.isFinite(value)) return value;
242
- throw new TypeError("Storage guard operands must be strings or finite numbers");
243
- }
244
- function normalizeFilter(value) {
245
- if (value === null || typeof value === "boolean") return value;
246
- if (typeof value === "string" || typeof value === "number") return operand(value);
247
- const filter = requireRecord(value, "Storage guard filter");
248
- const values = filter.in;
249
- if (Array.isArray(values)) return { in: Array.from(values, operand) };
250
- const prefix = filter.startsWith;
251
- if (typeof prefix === "string") return { startsWith: prefix };
252
- const range = {};
253
- for (const key of [
254
- "gt",
255
- "gte",
256
- "lt",
257
- "lte"
258
- ]) if (key in filter) {
259
- const bound = filter[key];
260
- range[key] = bound === void 0 ? void 0 : operand(bound);
261
- }
262
- return range;
263
- }
264
- function parseStorageUpdate(value) {
265
- const args = requireRecord(value, "Storage update arguments");
266
- if (Object.keys(args).some((key) => key !== "where" && key !== "set" && key !== "delta")) throw new TypeError("Unknown storage update argument");
267
- const where = {};
268
- for (const [field, filter] of Object.entries(requireRecord(args.where, "Storage where guard"))) {
269
- validateJsonFieldName(field);
270
- where[field] = normalizeFilter(filter);
271
- }
272
- const set = args.set === void 0 ? {} : requireRecord(args.set, "Storage set");
273
- const delta = args.delta === void 0 ? {} : requireRecord(args.delta, "Storage delta");
274
- const setEntries = [];
275
- for (const [field, entry] of Object.entries(set)) {
276
- if (entry === void 0) continue;
277
- validateJsonFieldName(field);
278
- const serialized = JSON.stringify(entry);
279
- if (serialized === void 0) throw new TypeError("Storage set values must be JSON serializable");
280
- const normalized = JSON.parse(serialized);
281
- setEntries.push([field, normalized]);
282
- }
283
- const setFields = new Set(setEntries.map(([field]) => field));
284
- const deltaEntries = [];
285
- for (const [field, entry] of Object.entries(delta)) {
286
- if (entry === void 0) continue;
287
- validateJsonFieldName(field);
288
- if (setFields.has(field)) throw new TypeError("Storage field appears in both set and delta");
289
- const spec = requireRecord(entry, "Storage numeric delta");
290
- const keys = Object.keys(spec);
291
- const key = keys[0];
292
- if (keys.length !== 1 || key !== "inc" && key !== "dec") throw new TypeError("Storage delta must contain exactly one of inc or dec");
293
- const amount = spec[key];
294
- if (typeof amount !== "number" || !Number.isSafeInteger(amount)) throw new TypeError("Storage delta must be a safe integer");
295
- deltaEntries.push([field, key === "dec" ? -amount : amount]);
296
- }
297
- if (setEntries.length + deltaEntries.length === 0) throw new TypeError("Storage update requires at least one of set or delta");
298
- return {
299
- where,
300
- setEntries,
301
- deltaEntries
302
- };
303
- }
304
-
305
- //#endregion
306
- //#region src/database/repositories/plugin-storage.ts
307
- /**
308
- * SQLSTATEs a losing concurrent `updateIf` writer can abort with.
309
- *
310
- * `40001` (serialization_failure) is raised only above READ COMMITTED, where
311
- * the loser cannot re-evaluate its guard against a newer snapshot. `40P01`
312
- * (deadlock_detected) is not tied to isolation level: it needs only two
313
- * transactions taking row locks in opposite order, which a caller reaches at
314
- * READ COMMITTED by wrapping several `updateIf` calls in one transaction.
315
- */
316
- const SERIALIZATION_SQLSTATES = new Set(["40001", "40P01"]);
317
- function errSqlState(err) {
318
- if (typeof err !== "object" || err === null) return void 0;
319
- const code = err.code;
320
- if (typeof code === "string") return code;
321
- const cause = err.cause;
322
- if (typeof cause === "object" && cause !== null) {
323
- const causeCode = cause.code;
324
- if (typeof causeCode === "string") return causeCode;
325
- }
326
- }
327
- function mapSerializationFailure(err) {
328
- const sqlState = errSqlState(err);
329
- if (sqlState !== void 0 && SERIALIZATION_SQLSTATES.has(sqlState)) return new StorageSerializationError("Storage write must be retried. Restart the transaction before retrying when using an explicit transaction.", {
330
- cause: err,
331
- sqlState
332
- });
333
- return err;
334
- }
335
- /**
336
- * Interleave a `?`-placeholder SQL string with its params into a single
337
- * boolean raw expression. Used as a WHERE predicate directly — wrapping it
338
- * in `(...) = 1` breaks on Postgres, which has a strict boolean type (#920).
339
- */
340
- function rawWhereExpr(sqlText, params) {
341
- const parts = [];
342
- let paramIndex = 0;
343
- const sqlParts = sqlText.split("?");
344
- for (let i = 0; i < sqlParts.length; i++) {
345
- if (i > 0) parts.push(sql`${params[paramIndex++]}`);
346
- if (sqlParts[i]) parts.push(sql.raw(sqlParts[i]));
347
- }
348
- return sql`(${sql.join(parts, sql.raw(""))})`;
349
- }
350
- /**
351
- * Plugin Storage Repository
352
- *
353
- * Implements the StorageCollection interface for a specific plugin and collection.
354
- */
355
- /**
356
- * Rank a sort expression so NULLs get a deterministic position.
357
- *
358
- * A missing key in a schemaless document extracts as NULL, which sorts
359
- * differently per dialect (SQLite first, Postgres last) and makes every
360
- * comparison against it UNKNOWN. Sorting on this rank ahead of the value puts
361
- * NULLs in the same place on both dialects and keeps the seek operands
362
- * non-NULL.
363
- */
364
- function nullRank(expr) {
365
- return sql`(case when ${expr} is null then 1 else 0 end)`;
366
- }
367
- /**
368
- * Comparison value for an orderBy cursor, matching the type of the ordered
369
- * JSON expression.
370
- *
371
- * On Postgres the order expression is jsonb, so non-missing cursor values are
372
- * cast to jsonb. This is important for explicit JSON `null`: the bound value
373
- * must be the jsonb `null` scalar, not SQL NULL, because Postgres
374
- * `data::jsonb->'field'` returns jsonb `null` for an explicit null and SQL NULL
375
- * for a missing key. SQLite extracts SQL NULL for both cases, so a missing
376
- * boundary and an explicit null both bind SQL NULL.
377
- */
378
- function cursorFieldValue(db, boundary) {
379
- if (boundary.missing) return sql`null`;
380
- if (isPostgres(db)) return sql`${sql.val(JSON.stringify(boundary.value))}::jsonb`;
381
- return sql.val(boundary.value);
382
- }
383
- function isRecord(value) {
384
- return typeof value === "object" && value !== null && !Array.isArray(value);
385
- }
386
- function sortBoundaries(data, orderFields) {
387
- const record = isRecord(data) ? data : void 0;
388
- return orderFields.map((field) => {
389
- if (record !== void 0 && Object.hasOwn(record, field)) return {
390
- value: record[field],
391
- missing: false
392
- };
393
- return { missing: true };
394
- });
395
- }
396
- function isScalarSortBoundary(boundary) {
397
- if (boundary.missing) return true;
398
- const value = boundary.value;
399
- return value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
400
- }
401
- var PluginStorageRepository = class {
402
- indexedFields;
403
- constructor(db, pluginId, collection, indexes) {
404
- this.db = db;
405
- this.pluginId = pluginId;
406
- this.collection = collection;
407
- this.indexedFields = getIndexedFields(indexes);
408
- }
409
- /**
410
- * Get a document by ID
411
- */
412
- async get(id) {
413
- const row = await this.db.selectFrom("_plugin_storage").select("data").where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection).where("id", "=", id).executeTakeFirst();
414
- if (!row) return null;
415
- return JSON.parse(row.data);
416
- }
417
- /**
418
- * Store a document
419
- */
420
- async put(id, data) {
421
- const now = (/* @__PURE__ */ new Date()).toISOString();
422
- const jsonData = JSON.stringify(data);
423
- const revision = crypto.randomUUID();
424
- await this.db.insertInto("_plugin_storage").values({
425
- plugin_id: this.pluginId,
426
- collection: this.collection,
427
- id,
428
- data: jsonData,
429
- revision,
430
- created_at: now,
431
- updated_at: now
432
- }).onConflict((oc) => oc.columns([
433
- "plugin_id",
434
- "collection",
435
- "id"
436
- ]).doUpdateSet({
437
- data: jsonData,
438
- revision,
439
- updated_at: now
440
- })).execute();
441
- }
442
- async getVersioned(id) {
443
- assertStorageKey(id);
444
- const row = await this.db.selectFrom("_plugin_storage").select(["data", "revision"]).where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection).where("id", "=", id).executeTakeFirst();
445
- if (!row) return null;
446
- return {
447
- value: JSON.parse(row.data),
448
- revision: row.revision
449
- };
450
- }
451
- async compareAndSet(id, expectedRevision, data) {
452
- assertStorageKey(id);
453
- if (expectedRevision !== null) assertStorageRevision(expectedRevision);
454
- const jsonData = serializeConditionalValue(data);
455
- const revision = crypto.randomUUID();
456
- const now = (/* @__PURE__ */ new Date()).toISOString();
457
- const row = expectedRevision === null ? await this.db.insertInto("_plugin_storage").values({
458
- plugin_id: this.pluginId,
459
- collection: this.collection,
460
- id,
461
- data: jsonData,
462
- revision,
463
- created_at: now,
464
- updated_at: now
465
- }).onConflict((oc) => oc.columns([
466
- "plugin_id",
467
- "collection",
468
- "id"
469
- ]).doNothing()).returning("revision").executeTakeFirst() : await this.db.updateTable("_plugin_storage").set({
470
- data: jsonData,
471
- revision,
472
- updated_at: now
473
- }).where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection).where("id", "=", id).where("revision", "=", expectedRevision).returning("revision").executeTakeFirst();
474
- return row ? {
475
- applied: true,
476
- revision: row.revision
477
- } : { applied: false };
478
- }
479
- async compareAndDelete(id, expectedRevision) {
480
- assertStorageKey(id);
481
- assertStorageRevision(expectedRevision);
482
- return { applied: await this.db.deleteFrom("_plugin_storage").where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection).where("id", "=", id).where("revision", "=", expectedRevision).returning("id").executeTakeFirst() !== void 0 };
483
- }
484
- /**
485
- * Delete a document
486
- */
487
- async delete(id) {
488
- return ((await this.db.deleteFrom("_plugin_storage").where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection).where("id", "=", id).executeTakeFirst()).numDeletedRows ?? 0) > 0;
489
- }
490
- /**
491
- * Check if a document exists
492
- */
493
- async exists(id) {
494
- return !!await this.db.selectFrom("_plugin_storage").select("id").where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection).where("id", "=", id).executeTakeFirst();
495
- }
496
- /**
497
- * Get multiple documents by ID
498
- */
499
- async getMany(ids) {
500
- if (ids.length === 0) return /* @__PURE__ */ new Map();
501
- const result = /* @__PURE__ */ new Map();
502
- for (const batch of chunks(ids, SQL_BATCH_SIZE)) {
503
- const rows = await this.db.selectFrom("_plugin_storage").select(["id", "data"]).where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection).where("id", "in", batch).execute();
504
- for (const row of rows) result.set(row.id, JSON.parse(row.data));
505
- }
506
- return result;
507
- }
508
- /**
509
- * Store multiple documents
510
- */
511
- async putMany(items) {
512
- if (items.length === 0) return;
513
- const now = (/* @__PURE__ */ new Date()).toISOString();
514
- await withTransaction(this.db, async (trx) => {
515
- for (const item of items) {
516
- const jsonData = JSON.stringify(item.data);
517
- const revision = crypto.randomUUID();
518
- await trx.insertInto("_plugin_storage").values({
519
- plugin_id: this.pluginId,
520
- collection: this.collection,
521
- id: item.id,
522
- data: jsonData,
523
- revision,
524
- created_at: now,
525
- updated_at: now
526
- }).onConflict((oc) => oc.columns([
527
- "plugin_id",
528
- "collection",
529
- "id"
530
- ]).doUpdateSet({
531
- data: jsonData,
532
- revision,
533
- updated_at: now
534
- })).execute();
535
- }
536
- });
537
- }
538
- /**
539
- * Delete multiple documents
540
- */
541
- async deleteMany(ids) {
542
- if (ids.length === 0) return 0;
543
- return withTransaction(this.db, async (trx) => {
544
- let deleted = 0;
545
- for (const batch of chunks(ids, SQL_BATCH_SIZE)) {
546
- const result = await trx.deleteFrom("_plugin_storage").where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection).where("id", "in", batch).executeTakeFirst();
547
- deleted += Number(result.numDeletedRows ?? 0);
548
- }
549
- return deleted;
550
- });
551
- }
552
- /**
553
- * Query documents with filters
554
- */
555
- async query(options = {}) {
556
- const { where = {}, orderBy = {}, cursor } = options;
557
- const limit = Math.max(1, Math.min(options.limit ?? 50, 100));
558
- validateWhereClause(where, this.indexedFields, this.pluginId, this.collection);
559
- if (Object.keys(orderBy).length > 0) validateOrderByClause(orderBy, this.indexedFields, this.pluginId, this.collection);
560
- let query = this.db.selectFrom("_plugin_storage").select([
561
- "id",
562
- "data",
563
- "created_at"
564
- ]).where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection);
565
- const whereResult = buildWhereClause(this.db, where);
566
- if (whereResult.sql) query = query.where(rawWhereExpr(whereResult.sql, whereResult.params));
567
- const orderEntries = Object.entries(orderBy);
568
- const orderDirections = new Set(orderEntries.map(([, direction]) => direction));
569
- const descending = orderEntries.length > 0 && orderEntries[0][1] === "desc";
570
- const sortExpr = (field) => sql`${sql.raw(jsonOrderExtract(this.db, field))}`;
571
- if (cursor) {
572
- const decoded = decodeCursor(cursor);
573
- if (orderEntries.length === 0) query = query.where(({ eb }) => eb(sql`(created_at, id)`, ">", sql`(${decoded.orderValue}, ${decoded.id})`));
574
- else {
575
- if (orderDirections.size > 1) throw new StorageQueryError("Cursor pagination requires every orderBy field to share one direction.", Object.keys(orderBy).join(", "), "Sort every field the same way, or page without a cursor.");
576
- const op = descending ? sql`<` : sql`>`;
577
- const cursorSortValues = decoded.sortValues;
578
- const useCursorValues = cursorSortValues !== void 0 && cursorSortValues.length === orderEntries.length && (isPostgres(this.db) || cursorSortValues.every(isScalarSortBoundary));
579
- const cursorExpr = (field) => sql`(select ${sql.raw(jsonOrderExtract(this.db, field))} from _plugin_storage where plugin_id = ${this.pluginId} and collection = ${this.collection} and id = ${decoded.id})`;
580
- if (!useCursorValues) {
581
- if (!await this.db.selectFrom("_plugin_storage").select(sql`1`.as("one")).where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection).where("id", "=", decoded.id).executeTakeFirst()) throw new InvalidCursorError(cursor);
582
- }
583
- const fields = orderEntries.map(([field], index) => {
584
- const own = sortExpr(field);
585
- const theirs = useCursorValues ? cursorFieldValue(this.db, cursorSortValues[index]) : cursorExpr(field);
586
- return {
587
- equal: sql`(${nullRank(own)} = ${nullRank(theirs)} and (${nullRank(own)} = 1 or ${own} = ${theirs}))`,
588
- after: sql`(${nullRank(own)} ${op} ${nullRank(theirs)} or (${nullRank(own)} = ${nullRank(theirs)} and ${nullRank(own)} = 0 and ${own} ${op} ${theirs}))`
589
- };
590
- });
591
- const terms = fields.map((_, k) => sql`(${sql.join([...fields.slice(0, k).map((f) => f.equal), fields[k].after], sql` and `)})`);
592
- terms.push(sql`(${sql.join([...fields.map((f) => f.equal), sql`id ${op} ${decoded.id}`], sql` and `)})`);
593
- query = query.where(sql`(${sql.join(terms, sql` or `)})`);
594
- }
595
- }
596
- if (orderEntries.length > 0) {
597
- for (const [field, direction] of orderEntries) {
598
- const dir = direction === "desc" ? sql`desc` : sql`asc`;
599
- const expr = sortExpr(field);
600
- query = query.orderBy(sql`${nullRank(expr)} ${dir}`);
601
- query = query.orderBy(sql`${expr} ${dir}`);
602
- }
603
- query = query.orderBy("id", descending ? "desc" : "asc");
604
- } else query = query.orderBy("created_at", "asc").orderBy("id", "asc");
605
- query = query.limit(limit + 1);
606
- const rows = await query.execute();
607
- const hasMore = rows.length > limit;
608
- const items = rows.slice(0, limit).map((row) => ({
609
- id: row.id,
610
- data: JSON.parse(row.data)
611
- }));
612
- let nextCursor;
613
- if (hasMore) {
614
- const lastItem = rows[limit - 1];
615
- if (lastItem) {
616
- let sortValues;
617
- if (orderEntries.length > 0) {
618
- const candidate = sortBoundaries(JSON.parse(lastItem.data), orderEntries.map(([field]) => field));
619
- if (candidate.every(isScalarSortBoundary)) sortValues = candidate;
620
- }
621
- nextCursor = encodeCursor(lastItem.created_at, lastItem.id, sortValues);
622
- if (nextCursor.length > MAX_CURSOR_LENGTH) nextCursor = encodeCursor(lastItem.created_at, lastItem.id, void 0);
623
- }
624
- }
625
- return {
626
- items,
627
- cursor: nextCursor,
628
- hasMore
629
- };
630
- }
631
- /**
632
- * Count documents matching a filter
633
- */
634
- async count(where) {
635
- if (where && Object.keys(where).length > 0) validateWhereClause(where, this.indexedFields, this.pluginId, this.collection);
636
- let query = this.db.selectFrom("_plugin_storage").select(sql`COUNT(*)`.as("count")).where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection);
637
- if (where && Object.keys(where).length > 0) {
638
- const whereResult = buildWhereClause(this.db, where);
639
- if (whereResult.sql) query = query.where(rawWhereExpr(whereResult.sql, whereResult.params));
640
- }
641
- const result = await query.executeTakeFirst();
642
- return Number(result?.count ?? 0);
643
- }
644
- async updateIf(id, args) {
645
- if (typeof id !== "string") throw new TypeError("Storage ID must be a string");
646
- const { where, setEntries, deltaEntries } = parseStorageUpdate(args);
647
- for (const value of Object.values(where)) if (isInFilter(value) && value.in.length === 0) return { applied: false };
648
- const now = (/* @__PURE__ */ new Date()).toISOString();
649
- const dataExpr = pluginDataWriteExpr(this.db, setEntries, deltaEntries);
650
- let query = this.db.updateTable("_plugin_storage").set({
651
- data: dataExpr,
652
- updated_at: now
653
- }).where("plugin_id", "=", this.pluginId).where("collection", "=", this.collection).where("id", "=", id).where(pluginDataUpdateGuard(this.db, deltaEntries));
654
- const whereResult = buildWhereClause(this.db, where);
655
- if (whereResult.sql) query = query.where(rawWhereExpr(whereResult.sql, whereResult.params));
656
- let row;
657
- try {
658
- row = await query.returning("data").executeTakeFirst();
659
- } catch (err) {
660
- throw mapSerializationFailure(err);
661
- }
662
- if (!row) return { applied: false };
663
- return {
664
- applied: true,
665
- data: JSON.parse(row.data)
666
- };
667
- }
668
- };
669
-
670
- //#endregion
671
- //#region src/plugins/byline-access.ts
672
- const MAX_BYLINE_ENTRY_IDS = 100;
673
- const DEFAULT_LIST_LIMIT = 50;
674
- const MAX_LIST_LIMIT = 100;
675
- function toBylineInfo(byline) {
676
- return {
677
- id: byline.id,
678
- slug: byline.slug,
679
- displayName: byline.displayName,
680
- bio: byline.bio,
681
- websiteUrl: byline.websiteUrl,
682
- avatarMediaId: byline.avatarMediaId,
683
- locale: byline.locale,
684
- translationGroup: byline.translationGroup ?? byline.id
685
- };
686
- }
687
- function toCreditInfo(credit) {
688
- return {
689
- byline: toBylineInfo(credit.byline),
690
- sortOrder: credit.sortOrder,
691
- roleLabel: credit.roleLabel,
692
- source: credit.source ?? "explicit"
693
- };
694
- }
695
- function clampListLimit(limit) {
696
- if (limit === void 0 || !Number.isFinite(limit)) return DEFAULT_LIST_LIMIT;
697
- return Math.min(Math.max(Math.trunc(limit), 1), MAX_LIST_LIMIT);
698
- }
699
- function selectPublicBylines(db) {
700
- return db.selectFrom("_emdash_bylines").select([
701
- "id",
702
- "slug",
703
- "display_name as displayName",
704
- "bio",
705
- "website_url as websiteUrl",
706
- "avatar_media_id as avatarMediaId",
707
- "locale",
708
- "translation_group as translationGroup",
709
- "created_at as createdAt"
710
- ]);
711
- }
712
- async function loadEntryRefs(db, collection, entryIds) {
713
- const tableName = `ec_${collection}`;
714
- const refs = [];
715
- for (const chunk of chunks(entryIds, SQL_BATCH_SIZE)) {
716
- const result = await sql`
717
- SELECT id, author_id, primary_byline_id, locale FROM ${sql.ref(tableName)}
718
- WHERE id IN (${sql.join(chunk)})
719
- AND deleted_at IS NULL
720
- `.execute(db);
721
- for (const row of result.rows) refs.push({
722
- id: row.id,
723
- authorId: row.author_id,
724
- primaryBylineId: row.primary_byline_id,
725
- locale: row.locale
726
- });
727
- }
728
- return refs;
729
- }
730
- /**
731
- * Create read-only byline access (gated on `bylines:read`).
732
- */
733
- function createBylineAccess(db) {
734
- return {
735
- async get(id) {
736
- const row = await selectPublicBylines(db).where("id", "=", id).executeTakeFirst();
737
- return row ? toBylineInfo(row) : null;
738
- },
739
- async list(options) {
740
- const limit = clampListLimit(options?.limit);
741
- let query = selectPublicBylines(db).orderBy("created_at", "desc").orderBy("id", "desc").limit(limit + 1);
742
- if (options?.locale !== void 0) query = query.where(localeMatches("locale", options.locale));
743
- if (options?.cursor) {
744
- const decoded = decodeCursor(options.cursor);
745
- query = query.where((eb) => eb.or([eb("created_at", "<", decoded.orderValue), eb.and([eb("created_at", "=", decoded.orderValue), eb("id", "<", decoded.id)])]));
746
- }
747
- const rows = await query.execute();
748
- const pageRows = rows.slice(0, limit);
749
- const last = pageRows.at(-1);
750
- return {
751
- items: pageRows.map(toBylineInfo),
752
- hasMore: rows.length > limit,
753
- ...rows.length > limit && last ? { cursor: encodeCursor(last.createdAt, last.id) } : {}
754
- };
755
- },
756
- async getEntriesBylines(collection, entryIds) {
757
- validateIdentifier(collection, "collection");
758
- const uniqueIds = [...new Set(entryIds)];
759
- if (uniqueIds.length > MAX_BYLINE_ENTRY_IDS) throw new Error(`Byline lookups accept at most ${MAX_BYLINE_ENTRY_IDS} entry IDs`);
760
- if (uniqueIds.length === 0) return [];
761
- const credits = await resolveBylineCredits(db, collection, await loadEntryRefs(db, collection, uniqueIds), { hydrateCustomFields: false });
762
- return uniqueIds.map((entryId) => ({
763
- entryId,
764
- bylines: (credits.get(entryId) ?? []).map(toCreditInfo)
765
- }));
766
- }
767
- };
768
- }
769
-
770
- //#endregion
771
- //#region src/plugins/content-access.ts
772
- function createContentAccess(db, accessOptions) {
773
- const contentRepo = new ContentRepository(db);
774
- const seoRepo = new SeoRepository(db);
775
- return {
776
- async get(collection, id) {
777
- const item = await contentRepo.findById(collection, id);
778
- if (!item) return null;
779
- const result = {
780
- id: item.id,
781
- type: item.type,
782
- slug: item.slug,
783
- status: item.status,
784
- data: item.data,
785
- createdAt: item.createdAt,
786
- updatedAt: item.updatedAt,
787
- locale: item.locale,
788
- publishedAt: item.publishedAt,
789
- scheduledAt: item.scheduledAt,
790
- authorId: item.authorId,
791
- translationGroup: item.translationGroup,
792
- liveRevisionId: item.liveRevisionId,
793
- draftRevisionId: item.draftRevisionId,
794
- version: item.version
795
- };
796
- if (await seoRepo.isEnabled(collection)) result.seo = await seoRepo.get(collection, item.id);
797
- return result;
798
- },
799
- async list(collection, options) {
800
- let orderBy;
801
- if (options?.orderBy) {
802
- const first = Object.entries(options.orderBy)[0];
803
- if (first) orderBy = {
804
- field: first[0],
805
- direction: first[1]
806
- };
807
- }
808
- const result = await contentRepo.findMany(collection, {
809
- limit: options?.limit ?? 50,
810
- cursor: options?.cursor,
811
- orderBy,
812
- where: options?.where
813
- });
814
- const items = result.items.map((item) => ({
815
- id: item.id,
816
- type: item.type,
817
- slug: item.slug,
818
- status: item.status,
819
- data: item.data,
820
- createdAt: item.createdAt,
821
- updatedAt: item.updatedAt,
822
- locale: item.locale,
823
- publishedAt: item.publishedAt,
824
- scheduledAt: item.scheduledAt,
825
- authorId: item.authorId,
826
- translationGroup: item.translationGroup,
827
- liveRevisionId: item.liveRevisionId,
828
- draftRevisionId: item.draftRevisionId,
829
- version: item.version
830
- }));
831
- if (items.length > 0 && await seoRepo.isEnabled(collection)) {
832
- const seoMap = await seoRepo.getMany(collection, items.map((item) => item.id));
833
- for (const item of items) {
834
- const seo = seoMap.get(item.id);
835
- if (seo) item.seo = seo;
836
- }
837
- }
838
- return {
839
- items,
840
- cursor: result.nextCursor,
841
- hasMore: !!result.nextCursor
842
- };
843
- },
844
- async getTranslations(collection, id) {
845
- const item = await contentRepo.findById(collection, id);
846
- if (!item) throw new Error(`Content not found: ${collection}/${id}`);
847
- return {
848
- translationGroup: item.translationGroup || item.id,
849
- translations: (item.translationGroup ? await contentRepo.findTranslations(collection, item.translationGroup) : [item]).map((translation) => ({
850
- id: translation.id,
851
- locale: translation.locale,
852
- slug: translation.slug,
853
- status: translation.status,
854
- updatedAt: translation.updatedAt
855
- }))
856
- };
857
- },
858
- async getPublicUrl(collection, id) {
859
- const site = accessOptions?.site;
860
- if (!site?.url) return null;
861
- const [item, collectionInfo] = await Promise.all([contentRepo.findById(collection, id), new SchemaRegistry(db).getCollection(collection)]);
862
- if (!item || item.status !== "published" || !item.slug || !collectionInfo?.routable) return null;
863
- const path = await resolveLocalizedContentRoutePath({
864
- pattern: collectionInfo.urlPattern ?? null,
865
- collection,
866
- slug: item.slug,
867
- id: item.id,
868
- date: item.publishedAt,
869
- locale: item.locale || site.locale,
870
- trailingSlash: site.trailingSlash
871
- });
872
- return path === null ? null : `${site.url}${path}`;
873
- },
874
- ...accessOptions?.revisions ? {
875
- async listRevisions(collection, id, revisionOptions) {
876
- return (await new RevisionRepository(db).findVisibleByEntry(collection, id, { limit: normalizeRevisionLimit(revisionOptions?.limit) })).map(({ authorId: _authorId, ...revision }) => revision);
877
- },
878
- async getRevision(collection, id, revisionId) {
879
- const revision = await new RevisionRepository(db).findVisibleById(collection, id, revisionId);
880
- if (!revision) return null;
881
- const { authorId: _authorId, ...safeRevision } = revision;
882
- return safeRevision;
883
- }
884
- } : {}
885
- };
886
- }
887
-
888
- //#endregion
889
- //#region src/plugins/media.ts
890
- const DEFAULT_PLUGIN_MEDIA_READ_BYTES = 10 * 1024 * 1024;
891
- const MAX_PLUGIN_MEDIA_READ_BYTES = 16 * 1024 * 1024;
892
- function mediaUrl(item) {
893
- return `/_emdash/api/media/asset/${encodeURIComponent(item.id)}/${encodeURIComponent(item.filename)}`;
894
- }
895
- function toPluginMediaItem(item) {
896
- return {
897
- id: item.id,
898
- filename: item.filename,
899
- mimeType: item.mimeType,
900
- size: item.size,
901
- url: mediaUrl(item),
902
- createdAt: item.createdAt,
903
- width: item.width,
904
- height: item.height,
905
- alt: item.alt,
906
- caption: item.caption,
907
- focalX: item.focalX,
908
- focalY: item.focalY,
909
- blurhash: item.blurhash,
910
- dominantColor: item.dominantColor,
911
- folderId: item.folderId ?? null,
912
- status: "ready"
913
- };
914
- }
915
- function resolveByteLimit(maxBytes) {
916
- const limit = maxBytes ?? DEFAULT_PLUGIN_MEDIA_READ_BYTES;
917
- if (!Number.isSafeInteger(limit) || limit <= 0 || limit > MAX_PLUGIN_MEDIA_READ_BYTES) throw new RangeError(`media.readBytes maxBytes must be a positive integer no greater than ${MAX_PLUGIN_MEDIA_READ_BYTES}`);
918
- return limit;
919
- }
920
- async function readStreamWithLimit(body, maxBytes) {
921
- const reader = body.getReader();
922
- const chunks = [];
923
- let size = 0;
924
- try {
925
- while (true) {
926
- const { done, value } = await reader.read();
927
- if (done) break;
928
- size += value.byteLength;
929
- if (size > maxBytes) {
930
- try {
931
- await reader.cancel();
932
- } catch {}
933
- throw new PluginMediaByteLimitError(`Media exceeds the requested ${maxBytes}-byte limit`);
934
- }
935
- chunks.push(value);
936
- }
937
- } finally {
938
- reader.releaseLock();
939
- }
940
- const bytes = new Uint8Array(size);
941
- let offset = 0;
942
- for (const chunk of chunks) {
943
- bytes.set(chunk, offset);
944
- offset += chunk.byteLength;
945
- }
946
- return bytes;
947
- }
948
- var PluginMediaByteLimitError = class extends RangeError {};
949
- async function readPluginMediaBytes(db, storage, id, options) {
950
- if (!storage) throw new Error("Media storage is not configured");
951
- const limit = resolveByteLimit(options?.maxBytes);
952
- const item = await new MediaRepository(db).findById(id);
953
- if (!item || item.status !== "ready") throw new Error("Media item is not ready or does not exist");
954
- let bytes;
955
- try {
956
- bytes = await readStreamWithLimit((await storage.download(item.storageKey)).body, limit);
957
- } catch (error) {
958
- if (error instanceof PluginMediaByteLimitError) throw error;
959
- throw new Error("Failed to read media bytes");
960
- }
961
- return {
962
- bytes,
963
- filename: item.filename,
964
- mimeType: item.mimeType,
965
- size: bytes.byteLength,
966
- ...item.contentHash ? { contentHash: item.contentHash } : {}
967
- };
968
- }
969
- async function updatePluginMediaMetadata(db, id, patch) {
970
- const parsed = parsePluginMediaMetadataPatch(patch);
971
- const item = await new MediaRepository(db).updateReadyMetadata(id, parsed);
972
- if (!item) throw new Error("Media item is not ready or does not exist");
973
- return toPluginMediaItem(item);
974
- }
975
- const MEDIA_METADATA_KEYS = new Set([
976
- "alt",
977
- "caption",
978
- "focalX",
979
- "focalY"
980
- ]);
981
- function parsePluginMediaMetadataPatch(value) {
982
- if (!value || typeof value !== "object" || Array.isArray(value)) throw new TypeError("media.updateMetadata patch must be an object");
983
- const keys = Object.keys(value);
984
- if (keys.length === 0) throw new TypeError("media.updateMetadata must change at least one metadata field");
985
- for (const key of keys) if (!MEDIA_METADATA_KEYS.has(key)) throw new TypeError(`media.updateMetadata cannot change ${key}`);
986
- const alt = Reflect.get(value, "alt");
987
- const caption = Reflect.get(value, "caption");
988
- const focalX = Reflect.get(value, "focalX");
989
- const focalY = Reflect.get(value, "focalY");
990
- if (alt !== void 0 && alt !== null && typeof alt !== "string") throw new TypeError("media.updateMetadata alt must be a string or null");
991
- if (caption !== void 0 && caption !== null && typeof caption !== "string") throw new TypeError("media.updateMetadata caption must be a string or null");
992
- if (focalX !== void 0 && focalX !== null && typeof focalX !== "number") throw new TypeError("media.updateMetadata focalX must be a number or null");
993
- if (focalY !== void 0 && focalY !== null && typeof focalY !== "number") throw new TypeError("media.updateMetadata focalY must be a number or null");
994
- const patch = {};
995
- if (alt !== void 0) patch.alt = alt;
996
- if (caption !== void 0) patch.caption = caption;
997
- if (focalX !== void 0) patch.focalX = focalX;
998
- if (focalY !== void 0) patch.focalY = focalY;
999
- if (!isValidFocalPointUpdate(patch)) throw new TypeError("focalX and focalY must both be valid numbers or both be null");
1000
- return patch;
1001
- }
1002
-
1003
- //#endregion
1004
- //#region src/plugins/route-error.ts
1005
- /**
1006
- * Error class for plugin routes
1007
- * Allows plugins to return structured errors with specific HTTP status codes
1008
- */
1009
- var PluginRouteError = class PluginRouteError extends Error {
1010
- constructor(code, message, status = 400, details) {
1011
- super(message);
1012
- this.code = code;
1013
- this.status = status;
1014
- this.details = details;
1015
- this.name = "PluginRouteError";
1016
- }
1017
- /**
1018
- * Create a bad request error (400)
1019
- */
1020
- static badRequest(message, details) {
1021
- return new PluginRouteError("BAD_REQUEST", message, 400, details);
1022
- }
1023
- /**
1024
- * Create an unauthorized error (401)
1025
- */
1026
- static unauthorized(message = "Unauthorized") {
1027
- return new PluginRouteError("UNAUTHORIZED", message, 401);
1028
- }
1029
- /**
1030
- * Create a forbidden error (403)
1031
- */
1032
- static forbidden(message = "Forbidden") {
1033
- return new PluginRouteError("FORBIDDEN", message, 403);
1034
- }
1035
- /**
1036
- * Create a not found error (404)
1037
- */
1038
- static notFound(message = "Not found") {
1039
- return new PluginRouteError("NOT_FOUND", message, 404);
1040
- }
1041
- /**
1042
- * Create a conflict error (409)
1043
- */
1044
- static conflict(message, details) {
1045
- return new PluginRouteError("CONFLICT", message, 409, details);
1046
- }
1047
- /**
1048
- * Create an internal error (500)
1049
- */
1050
- static internal(message = "Internal error") {
1051
- return new PluginRouteError("INTERNAL_ERROR", message, 500);
1052
- }
1053
- };
1054
- /**
1055
- * Check whether a thrown value is a PluginRouteError.
1056
- *
1057
- * Also matches on shape, not just `instanceof`: under `astro dev`, Vite can load a
1058
- * plugin's `emdash` import as a separate module instance, so the error the plugin
1059
- * throws comes from a different copy of this class.
1060
- */
1061
- function isPluginRouteError(error) {
1062
- if (error instanceof PluginRouteError) return true;
1063
- if (!(error instanceof Error) || error.name !== "PluginRouteError") return false;
1064
- const { code, status } = error;
1065
- return typeof code === "string" && typeof status === "number";
1066
- }
1067
-
1068
- //#endregion
1069
- //#region src/plugins/context.ts
1070
- /**
1071
- * Create KV accessor for a plugin
1072
- * All keys are automatically prefixed with the plugin ID
1073
- */
1074
- function createKVAccess(optionsRepo, pluginId, settings = createSettingsAccess(optionsRepo, pluginId)) {
1075
- const prefix = `plugin:${pluginId}:`;
1076
- return {
1077
- async get(key) {
1078
- if (key.startsWith("settings:")) return settings.get(key.slice(9));
1079
- return optionsRepo.get(`${prefix}${key}`);
1080
- },
1081
- async getVersioned(key) {
1082
- assertStorageKey(key);
1083
- if (key.startsWith("settings:")) return settings.getVersioned(key.slice(9));
1084
- return optionsRepo.getVersioned(`${prefix}${key}`);
1085
- },
1086
- async compareAndSet(key, expectedRevision, value) {
1087
- assertStorageKey(key);
1088
- if (key.startsWith("settings:")) return settings.compareAndSet(key.slice(9), expectedRevision, value);
1089
- return optionsRepo.compareAndSet(`${prefix}${key}`, expectedRevision, value);
1090
- },
1091
- async compareAndDelete(key, expectedRevision) {
1092
- assertStorageKey(key);
1093
- if (key.startsWith("settings:")) return settings.compareAndDelete(key.slice(9), expectedRevision);
1094
- return optionsRepo.compareAndDelete(`${prefix}${key}`, expectedRevision);
1095
- },
1096
- async set(key, value) {
1097
- if (key.startsWith("settings:")) {
1098
- await settings.set(key.slice(9), value);
1099
- return;
1100
- }
1101
- await optionsRepo.set(`${prefix}${key}`, value);
1102
- },
1103
- async delete(key) {
1104
- if (key.startsWith("settings:")) return settings.delete(key.slice(9));
1105
- return optionsRepo.delete(`${prefix}${key}`);
1106
- },
1107
- async list(keyPrefix) {
1108
- const requestedPrefix = keyPrefix ?? "";
1109
- const includesSettings = "settings:".startsWith(requestedPrefix) || requestedPrefix.startsWith("settings:");
1110
- const fullPrefix = `${prefix}${requestedPrefix}`;
1111
- const entriesMap = requestedPrefix.startsWith("settings:") ? /* @__PURE__ */ new Map() : await optionsRepo.getByPrefix(fullPrefix);
1112
- const result = [];
1113
- for (const [fullKey, value] of entriesMap) {
1114
- if (includesSettings && fullKey.startsWith(`${prefix}settings:`)) continue;
1115
- result.push({
1116
- key: fullKey.slice(prefix.length),
1117
- value
1118
- });
1119
- }
1120
- if (includesSettings) {
1121
- const settingPrefix = requestedPrefix.startsWith("settings:") ? requestedPrefix.slice(9) : "";
1122
- for (const entry of await settings.list(settingPrefix)) {
1123
- const key = `settings:${entry.key}`;
1124
- if (key.startsWith(requestedPrefix)) result.push({
1125
- key,
1126
- value: entry.value
1127
- });
1128
- }
1129
- }
1130
- return result;
1131
- }
1132
- };
1133
- }
1134
- /**
1135
- * Create storage collection accessor for a plugin
1136
- * Wraps PluginStorageRepository with the v2 interface (no async iterators)
1137
- */
1138
- function createStorageCollection(db, pluginId, collectionName, indexes) {
1139
- const repo = new PluginStorageRepository(db, pluginId, collectionName, indexes);
1140
- return {
1141
- get: (id) => repo.get(id),
1142
- getVersioned: (id) => repo.getVersioned(id),
1143
- compareAndSet: (id, expectedRevision, data) => repo.compareAndSet(id, expectedRevision, data),
1144
- compareAndDelete: (id, expectedRevision) => repo.compareAndDelete(id, expectedRevision),
1145
- put: (id, data) => repo.put(id, data),
1146
- delete: (id) => repo.delete(id),
1147
- exists: (id) => repo.exists(id),
1148
- getMany: (ids) => repo.getMany(ids),
1149
- putMany: (items) => repo.putMany(items),
1150
- deleteMany: (ids) => repo.deleteMany(ids),
1151
- count: (where) => repo.count(where),
1152
- updateIf: (id, updateArgs) => repo.updateIf(id, updateArgs),
1153
- async query(options) {
1154
- const result = await repo.query({
1155
- where: options?.where,
1156
- orderBy: options?.orderBy,
1157
- limit: options?.limit,
1158
- cursor: options?.cursor
1159
- });
1160
- return {
1161
- items: result.items,
1162
- cursor: result.cursor,
1163
- hasMore: result.hasMore
1164
- };
1165
- }
1166
- };
1167
- }
1168
- /**
1169
- * Create storage accessor with all declared collections
1170
- */
1171
- function createStorageAccess(db, pluginId, storageConfig) {
1172
- const storage = {};
1173
- for (const [collectionName, config] of Object.entries(storageConfig)) storage[collectionName] = createStorageCollection(db, pluginId, collectionName, [...config.indexes, ...config.uniqueIndexes ?? []]);
1174
- return storage;
1175
- }
1176
- /**
1177
- * Extract `seo` from a plugin-supplied content write input and return both
1178
- * parts. Mutates nothing — returns a new field map without the `seo` key.
1179
- */
1180
- function splitSeoFromInput(input) {
1181
- const { seo, ...fields } = input;
1182
- if (seo !== void 0 && (seo === null || typeof seo !== "object" || Array.isArray(seo))) throw new Error("content.seo must be an object");
1183
- return {
1184
- fields,
1185
- seo
1186
- };
1187
- }
1188
- /**
1189
- * Reject writing SEO to a collection that does not have it enabled.
1190
- * Matches the REST API behavior (VALIDATION_ERROR).
1191
- */
1192
- async function assertSeoEnabled(seoRepo, collection, seo) {
1193
- const hasSeo = await seoRepo.isEnabled(collection);
1194
- if (seo !== void 0 && !hasSeo) throw new Error(`Collection "${collection}" does not have SEO enabled. Remove the seo field or enable SEO on this collection.`);
1195
- return hasSeo;
1196
- }
1197
- /**
1198
- * Parse the `collections` JSON column into a string array (`[]` on anything
1199
- * else). Mirrors the guards in the Cloudflare/workerd bridges so an
1200
- * in-process plugin degrades on malformed data instead of crashing.
1201
- */
1202
- function parseCollectionsColumn(value) {
1203
- if (!value) return [];
1204
- try {
1205
- const parsed = JSON.parse(value);
1206
- return Array.isArray(parsed) ? parsed.filter((item) => typeof item === "string") : [];
1207
- } catch {
1208
- return [];
1209
- }
1210
- }
1211
- /** Map a repository `Taxonomy` row to the plugin-facing term shape. */
1212
- function taxonomyToTermInfo(term) {
1213
- return {
1214
- id: term.id,
1215
- taxonomy: term.name,
1216
- slug: term.slug,
1217
- label: term.label,
1218
- parentId: term.parentId,
1219
- data: term.data,
1220
- locale: term.locale,
1221
- translationGroup: term.translationGroup
1222
- };
1223
- }
1224
- function collectionToSchemaInfo(collection) {
1225
- if (!collection) return null;
1226
- return {
1227
- slug: collection.slug,
1228
- label: collection.label,
1229
- labelSingular: collection.labelSingular ?? null,
1230
- description: collection.description ?? null,
1231
- supports: collection.supports,
1232
- hasSeo: collection.hasSeo,
1233
- titleField: collection.titleField ?? null,
1234
- dateField: collection.dateField ?? null,
1235
- urlPattern: collection.urlPattern ?? null,
1236
- routable: collection.routable !== false,
1237
- hidden: collection.hidden,
1238
- fields: collection.fields.map((field) => ({
1239
- slug: field.slug,
1240
- label: field.label,
1241
- type: field.type,
1242
- required: field.required,
1243
- unique: field.unique,
1244
- ...field.defaultValue === void 0 ? {} : { default: field.defaultValue },
1245
- ...field.validation === void 0 ? {} : { validation: field.validation },
1246
- ...field.widget === void 0 ? {} : { widget: field.widget },
1247
- ...field.options === void 0 ? {} : { options: field.options },
1248
- searchable: field.searchable,
1249
- indexed: field.indexed,
1250
- translatable: field.translatable,
1251
- sortOrder: field.sortOrder
1252
- }))
1253
- };
1254
- }
1255
- function createSchemaAccess(db) {
1256
- const registry = new SchemaRegistry(db);
1257
- return {
1258
- async listCollections() {
1259
- const collections = [];
1260
- for (const collection of await registry.listCollectionsWithFields()) {
1261
- const info = collectionToSchemaInfo(collection);
1262
- if (info) collections.push(info);
1263
- }
1264
- return collections;
1265
- },
1266
- async getCollection(slug) {
1267
- return collectionToSchemaInfo(await registry.getCollectionWithFields(slug));
1268
- }
1269
- };
1270
- }
1271
- /**
1272
- * Create read-only taxonomy access (gated on `taxonomies:read`).
1273
- */
1274
- function createTaxonomyAccess(db) {
1275
- const taxonomyRepo = new TaxonomyRepository(db);
1276
- return {
1277
- async getAll(options) {
1278
- return (await selectTaxonomyDefs(db, options?.locale).orderBy("d.name", "asc").execute()).map((row) => ({
1279
- name: row.name,
1280
- label: row.label,
1281
- labelSingular: row.label_singular,
1282
- hierarchical: row.hierarchical === 1,
1283
- collections: parseCollectionsColumn(row.collections),
1284
- locale: row.locale
1285
- }));
1286
- },
1287
- async getTerms(taxonomy, options) {
1288
- return (await taxonomyRepo.findByName(taxonomy, { locale: options?.locale })).map(taxonomyToTermInfo);
1289
- },
1290
- async getEntryTerms(collection, entryId, options) {
1291
- return (await taxonomyRepo.getTermsForEntry(collection, entryId, options?.taxonomy, options?.locale)).map(taxonomyToTermInfo);
1292
- }
1293
- };
1294
- }
1295
- function toPluginComment(comment) {
1296
- if (comment.status === "trash") throw new Error("Trashed comments are not plugin-readable");
1297
- return {
1298
- id: comment.id,
1299
- collection: comment.collection,
1300
- contentId: comment.contentId,
1301
- parentId: comment.parentId,
1302
- authorName: comment.authorName,
1303
- authorEmail: comment.authorEmail,
1304
- body: comment.body,
1305
- status: comment.status,
1306
- ipHash: comment.ipHash,
1307
- userAgent: comment.userAgent,
1308
- moderationMetadata: comment.moderationMetadata,
1309
- createdAt: comment.createdAt,
1310
- updatedAt: comment.updatedAt
1311
- };
1312
- }
1313
- function createCommentAccess(db, moderate) {
1314
- const repo = new CommentRepository(db);
1315
- return {
1316
- async get(id) {
1317
- const comment = await repo.findById(id);
1318
- return !comment || comment.status === "trash" ? null : toPluginComment(comment);
1319
- },
1320
- async list(options = {}) {
1321
- const result = await repo.findForPlugin(options);
1322
- return {
1323
- items: result.items.map(toPluginComment),
1324
- cursor: result.nextCursor,
1325
- hasMore: result.nextCursor !== void 0
1326
- };
1327
- },
1328
- count: (options) => repo.countForPlugin(options),
1329
- ...moderate ? { setStatus: (id, status, options) => moderate(id, status, options.expectedStatus) } : {}
1330
- };
1331
- }
1332
- var RedirectAccessError = class extends Error {
1333
- name = "RedirectAccessError";
1334
- constructor(code, message) {
1335
- super(message);
1336
- this.code = code;
1337
- }
1338
- };
1339
- const REDIRECT_REVISION_PREFIX = "r1.";
1340
- const BASE64_PADDING_RE = /=+$/;
1341
- function encodeRedirectRevision(id, revision) {
1342
- const payload = `${id}\0${revision}`;
1343
- return `${REDIRECT_REVISION_PREFIX}${btoa(payload).replaceAll("+", "-").replaceAll("/", "_").replace(BASE64_PADDING_RE, "")}`;
1344
- }
1345
- function decodeRedirectRevision(id, revision) {
1346
- if (typeof revision !== "string" || !revision.startsWith(REDIRECT_REVISION_PREFIX)) throw new RedirectAccessError("INVALID_PRECONDITION", "Invalid redirect revision");
1347
- try {
1348
- const encoded = revision.slice(3).replaceAll("-", "+").replaceAll("_", "/");
1349
- const padded = encoded.padEnd(Math.ceil(encoded.length / 4) * 4, "=");
1350
- const [revisionId, updatedAt, extra] = atob(padded).split("\0");
1351
- if (revisionId !== id || !updatedAt || extra !== void 0) throw new Error("invalid");
1352
- return updatedAt;
1353
- } catch (error) {
1354
- if (error instanceof RedirectAccessError) throw error;
1355
- throw new RedirectAccessError("INVALID_PRECONDITION", "Invalid redirect revision");
1356
- }
1357
- }
1358
- function toRedirectInfo(redirect) {
1359
- return {
1360
- ...redirect,
1361
- type: redirect.type
1362
- };
1363
- }
1364
- function toVersionedRedirect(record) {
1365
- return {
1366
- redirect: toRedirectInfo(record.redirect),
1367
- _rev: encodeRedirectRevision(record.redirect.id, record.configRevision)
1368
- };
1369
- }
1370
- async function readVersionedRedirect(repo, id) {
1371
- const record = await repo.findVersionedById(id);
1372
- return record ? toVersionedRedirect(record) : null;
1373
- }
1374
- function throwRedirectResult(error) {
1375
- throw new RedirectAccessError(error.code, error.message);
1376
- }
1377
- function assertNoAutomaticRedirectMarker(input) {
1378
- if (typeof input !== "object" || input === null || Array.isArray(input)) throw new RedirectAccessError("VALIDATION_ERROR", "Redirect input must be an object");
1379
- if (Object.hasOwn(input, "auto")) throw new RedirectAccessError("VALIDATION_ERROR", "The automatic redirect marker is managed by EmDash");
1380
- }
1381
- function createRedirectAccess(db, writable = false) {
1382
- const repo = new RedirectRepository(db);
1383
- const readAccess = {
1384
- async list(options = {}) {
1385
- const result = await handleRedirectList(db, options);
1386
- if (!result.success) return throwRedirectResult(result.error);
1387
- return {
1388
- items: result.data.items.map(toRedirectInfo),
1389
- cursor: result.data.nextCursor,
1390
- hasMore: result.data.nextCursor !== void 0
1391
- };
1392
- },
1393
- get: (id) => readVersionedRedirect(repo, id)
1394
- };
1395
- if (!writable) return readAccess;
1396
- return {
1397
- ...readAccess,
1398
- async create(input) {
1399
- assertNoAutomaticRedirectMarker(input);
1400
- const parsed = createRedirectBody.safeParse(input);
1401
- if (!parsed.success) throw new RedirectAccessError("VALIDATION_ERROR", parsed.error.issues[0]?.message ?? "Invalid redirect");
1402
- const result = await handleRedirectCreate(db, parsed.data);
1403
- if (!result.success) return throwRedirectResult(result.error);
1404
- const current = await readVersionedRedirect(repo, result.data.id);
1405
- if (!current) throw new RedirectAccessError("NOT_FOUND", "Created redirect not found");
1406
- return current;
1407
- },
1408
- async update(id, input) {
1409
- assertNoAutomaticRedirectMarker(input);
1410
- const { _rev, ...patch } = input;
1411
- const expectedRevision = decodeRedirectRevision(id, _rev);
1412
- const parsed = updateRedirectBody.safeParse(patch);
1413
- if (!parsed.success) throw new RedirectAccessError("VALIDATION_ERROR", parsed.error.issues[0]?.message ?? "Invalid redirect");
1414
- const result = await handleRedirectUpdate(db, id, parsed.data, { expectedRevision });
1415
- if (!result.success) return throwRedirectResult(result.error);
1416
- const current = await readVersionedRedirect(repo, result.data.id);
1417
- if (!current) throw new RedirectAccessError("NOT_FOUND", "Updated redirect not found");
1418
- return current;
1419
- },
1420
- async delete(id, options) {
1421
- if (typeof options !== "object" || options === null) throw new RedirectAccessError("INVALID_PRECONDITION", "Invalid redirect revision");
1422
- const result = await handleRedirectDelete(db, id, { expectedRevision: decodeRedirectRevision(id, options._rev) });
1423
- if (!result.success) return throwRedirectResult(result.error);
1424
- return result.data.deleted;
1425
- }
1426
- };
1427
- }
1428
- const MAX_TAXONOMY_DELTA_TERMS = 64;
1429
- function taxonomyAccessError(code, message) {
1430
- return Object.assign(new Error(message), { code });
1431
- }
1432
- async function resolveTaxonomyDelta(db, collection, entryId, taxonomy, termIds) {
1433
- if (termIds.length > MAX_TAXONOMY_DELTA_TERMS) throw taxonomyAccessError("VALIDATION_ERROR", `A taxonomy assignment delta can contain at most ${MAX_TAXONOMY_DELTA_TERMS} term IDs`);
1434
- if (termIds.some((id) => typeof id !== "string" || id.length === 0)) throw taxonomyAccessError("VALIDATION_ERROR", "Taxonomy term IDs must be non-empty strings");
1435
- const structure = await findTaxonomyStructure(db, taxonomy);
1436
- if (!structure) throw taxonomyAccessError("NOT_FOUND", `Taxonomy '${taxonomy}' not found`);
1437
- if (!structure.collections.includes(collection)) throw taxonomyAccessError("VALIDATION_ERROR", `Taxonomy '${taxonomy}' is not attached to collection '${collection}'`);
1438
- const entry = await new ContentRepository(db).findById(collection, entryId);
1439
- if (!entry) throw taxonomyAccessError("NOT_FOUND", `Content entry '${entryId}' not found in '${collection}'`);
1440
- const repo = new TaxonomyRepository(db);
1441
- const groups = [];
1442
- for (const id of new Set(termIds)) {
1443
- const term = await repo.findByIdOrTranslationGroup(id);
1444
- if (!term) throw taxonomyAccessError("NOT_FOUND", `Taxonomy term '${id}' not found`);
1445
- if (term.name !== taxonomy) throw taxonomyAccessError("VALIDATION_ERROR", `Taxonomy term '${id}' belongs to '${term.name}', not '${taxonomy}'`);
1446
- groups.push(term.translationGroup ?? term.id);
1447
- }
1448
- return {
1449
- repo,
1450
- groups,
1451
- locale: entry.locale ?? getI18nConfig()?.defaultLocale ?? "en"
1452
- };
1453
- }
1454
- async function readResolvedEntryTerms(repo, collection, entryId, taxonomy, locale) {
1455
- const defaultLocale = getI18nConfig()?.defaultLocale ?? locale;
1456
- return (await repo.getTermAssignmentsForEntry(collection, entryId, taxonomy, locale, defaultLocale)).flatMap(({ term }) => term ? [taxonomyToTermInfo(term)] : []);
1457
- }
1458
- function createTaxonomyAccessWithWrite(db) {
1459
- return {
1460
- ...createTaxonomyAccess(db),
1461
- async createTerm(taxonomy, input) {
1462
- const result = await handleTermCreate(db, taxonomy, input);
1463
- if (!result.success) throw taxonomyAccessError(result.error.code, result.error.message);
1464
- const { term } = result.data;
1465
- return {
1466
- id: term.id,
1467
- taxonomy: term.name,
1468
- slug: term.slug,
1469
- label: term.label,
1470
- parentId: term.parentId,
1471
- data: term.description ? { description: term.description } : null,
1472
- locale: term.locale,
1473
- translationGroup: term.translationGroup
1474
- };
1475
- },
1476
- async addEntryTerms(collection, entryId, taxonomy, termIds) {
1477
- const { repo, groups, locale } = await resolveTaxonomyDelta(db, collection, entryId, taxonomy, termIds);
1478
- await repo.attachGroupsToEntry(collection, entryId, groups);
1479
- return readResolvedEntryTerms(repo, collection, entryId, taxonomy, locale);
1480
- },
1481
- async removeEntryTerms(collection, entryId, taxonomy, termIds) {
1482
- const { repo, groups, locale } = await resolveTaxonomyDelta(db, collection, entryId, taxonomy, termIds);
1483
- await repo.detachGroupsFromEntry(collection, entryId, groups);
1484
- return readResolvedEntryTerms(repo, collection, entryId, taxonomy, locale);
1485
- }
1486
- };
1487
- }
1488
- async function afterContentWrite(recordWrite) {
1489
- if (typeof recordWrite === "function") await recordWrite();
1490
- }
1491
- /**
1492
- * Create full content access with write operations.
1493
- *
1494
- * `create` and `update` accept a reserved `seo` key in their `data`
1495
- * argument. When present, it is routed to the core SEO panel
1496
- * (`_emdash_seo`) via `SeoRepository.upsert`, in the same transaction as
1497
- * the content write. The returned `ContentItem.seo` reflects the resulting
1498
- * SEO state for SEO-enabled collections.
1499
- */
1500
- function createContentAccessWithWrite(db, beforeContentWrite, accessOptions, contentCreate) {
1501
- return {
1502
- ...createContentAccess(db, accessOptions),
1503
- async create(collection, data, options) {
1504
- const locale = resolveContentCreateLocale(options?.locale);
1505
- const recordWrite = await beforeContentWrite?.();
1506
- if (contentCreate) {
1507
- const created = await contentCreate({
1508
- collection,
1509
- input: data,
1510
- options: {
1511
- ...options,
1512
- locale
1513
- }
1514
- });
1515
- await afterContentWrite(recordWrite);
1516
- return created;
1517
- }
1518
- const { fields, seo } = splitSeoFromInput(data);
1519
- let contentMutated = false;
1520
- try {
1521
- const created = await withTransaction(db, async (trx) => {
1522
- const trxContentRepo = new ContentRepository(trx);
1523
- const trxSeoRepo = new SeoRepository(trx);
1524
- const hasSeo = await assertSeoEnabled(trxSeoRepo, collection, seo);
1525
- const item = await trxContentRepo.create({
1526
- type: collection,
1527
- data: fields,
1528
- locale,
1529
- translationOf: options?.translationOf
1530
- });
1531
- contentMutated = true;
1532
- const result = {
1533
- id: item.id,
1534
- type: item.type,
1535
- slug: item.slug,
1536
- status: item.status,
1537
- data: item.data,
1538
- createdAt: item.createdAt,
1539
- updatedAt: item.updatedAt,
1540
- locale: item.locale,
1541
- publishedAt: item.publishedAt,
1542
- scheduledAt: item.scheduledAt
1543
- };
1544
- if (hasSeo) result.seo = seo !== void 0 ? await trxSeoRepo.upsert(collection, item.id, seo) : await trxSeoRepo.get(collection, item.id);
1545
- return result;
1546
- });
1547
- await markContentMediaUsageCollectionStaleSafely(db, collection, "CONTENT_USAGE_STALE");
1548
- await afterContentWrite(recordWrite);
1549
- return created;
1550
- } catch (error) {
1551
- if (contentMutated) await markContentMediaUsageCollectionStaleSafely(db, collection, "CONTENT_USAGE_STALE");
1552
- throw error;
1553
- }
1554
- },
1555
- async update(collection, id, data) {
1556
- const recordWrite = await beforeContentWrite?.();
1557
- const { fields, seo } = splitSeoFromInput(data);
1558
- const hasFieldUpdates = Object.keys(fields).length > 0;
1559
- let contentMutated = false;
1560
- try {
1561
- const updated = await withTransaction(db, async (trx) => {
1562
- const trxContentRepo = new ContentRepository(trx);
1563
- const trxSeoRepo = new SeoRepository(trx);
1564
- const hasSeo = await assertSeoEnabled(trxSeoRepo, collection, seo);
1565
- const item = hasFieldUpdates ? await trxContentRepo.updateDraftAware(collection, id, { data: fields }) : await (async () => {
1566
- const existing = await trxContentRepo.findById(collection, id);
1567
- if (!existing) throw new Error("Content not found");
1568
- return existing;
1569
- })();
1570
- if (hasFieldUpdates) contentMutated = true;
1571
- const result = {
1572
- id: item.id,
1573
- type: item.type,
1574
- slug: item.slug,
1575
- status: item.status,
1576
- data: item.data,
1577
- createdAt: item.createdAt,
1578
- updatedAt: item.updatedAt,
1579
- locale: item.locale,
1580
- publishedAt: item.publishedAt,
1581
- scheduledAt: item.scheduledAt
1582
- };
1583
- if (hasSeo) result.seo = seo !== void 0 ? await trxSeoRepo.upsert(collection, item.id, seo) : await trxSeoRepo.get(collection, item.id);
1584
- return result;
1585
- });
1586
- if (hasFieldUpdates) await markContentMediaUsageCollectionStaleSafely(db, collection, "CONTENT_USAGE_STALE");
1587
- await afterContentWrite(recordWrite);
1588
- return updated;
1589
- } catch (error) {
1590
- if (contentMutated) await markContentMediaUsageCollectionStaleSafely(db, collection, "CONTENT_USAGE_STALE");
1591
- throw error;
1592
- }
1593
- },
1594
- async delete(collection, id) {
1595
- const recordWrite = await beforeContentWrite?.();
1596
- const deleted = await new ContentRepository(db).delete(collection, id);
1597
- if (deleted) {
1598
- await new EntryLockRepository(db).releaseEntry(collection, id);
1599
- await markContentMediaUsageCollectionStaleSafely(db, collection, "CONTENT_USAGE_STALE");
1600
- await afterContentWrite(recordWrite);
1601
- }
1602
- return deleted;
1603
- }
1604
- };
1605
- }
1606
- /**
1607
- * Create read-only media access
1608
- */
1609
- function createMediaAccess(db) {
1610
- const mediaRepo = new MediaRepository(db);
1611
- return {
1612
- async get(id) {
1613
- const item = await mediaRepo.findById(id);
1614
- return item?.status === "ready" ? toPluginMediaItem(item) : null;
1615
- },
1616
- async list(options) {
1617
- const result = await mediaRepo.findMany({
1618
- limit: options?.limit ?? 50,
1619
- cursor: options?.cursor,
1620
- mimeType: options?.mimeType
1621
- });
1622
- return {
1623
- items: result.items.map(toPluginMediaItem),
1624
- cursor: result.nextCursor,
1625
- hasMore: !!result.nextCursor
1626
- };
1627
- }
1628
- };
1629
- }
1630
- function mediaReadDenied() {
1631
- throw new Error("Missing capability: media:read");
1632
- }
1633
- function createBlockedMediaReadAccess() {
1634
- return {
1635
- get: async () => mediaReadDenied(),
1636
- list: async () => mediaReadDenied()
1637
- };
1638
- }
1639
- function allowedUploadType(contentType) {
1640
- if (!CONTENT_TYPE_RE.test(contentType)) throw PluginRouteError.badRequest("Invalid content type");
1641
- const mimeType = normalizeMime(contentType);
1642
- if (!matchesMimeAllowlist(mimeType, GLOBAL_UPLOAD_ALLOWLIST)) throw new PluginRouteError("UNSUPPORTED_MEDIA_TYPE", "File type not allowed", 415);
1643
- return mimeType;
1644
- }
1645
- function uploadStorageKey(filename, mimeType) {
1646
- const keyPrefix = ulid();
1647
- const basename = filename.split("/").pop() ?? filename;
1648
- const dotIdx = basename.lastIndexOf(".");
1649
- const nameExt = dotIdx > 0 ? basename.slice(dotIdx + 1).toLowerCase() : "";
1650
- const nameType = mime.getType(nameExt);
1651
- const nameExtAllowed = nameType !== null && matchesMimeAllowlist(nameType, GLOBAL_UPLOAD_ALLOWLIST);
1652
- const ext = nameType === mimeType ? nameExt : mime.getExtension(mimeType) ?? (nameExtAllowed ? nameExt : null);
1653
- return {
1654
- basename,
1655
- storageKey: ext ? `${keyPrefix}.${ext}` : keyPrefix
1656
- };
1657
- }
1658
- /**
1659
- * Create full media access with write operations.
1660
- *
1661
- * `getUploadUrlFn` is optional: when omitted, `getUploadUrl()` is derived from
1662
- * `storage` (create a pending record + a signed PUT URL), mirroring the REST
1663
- * `/_emdash/api/media/upload-url` endpoint. `upload()` only needs `storage`.
1664
- * If storage is not provided, both throw at call time.
1665
- */
1666
- function createMediaAccessWithWrite(db, getUploadUrlFn, storage) {
1667
- const mediaRepo = new MediaRepository(db);
1668
- const readAccess = createMediaAccess(db);
1669
- const getUploadUrl = getUploadUrlFn ? async (filename, contentType) => getUploadUrlFn(filename, allowedUploadType(contentType)) : async (filename, contentType) => {
1670
- if (!storage) throw new Error("Media getUploadUrl() requires a storage backend. Configure storage in PluginContextFactoryOptions.");
1671
- const mimeType = allowedUploadType(contentType);
1672
- const { basename, storageKey } = uploadStorageKey(filename, mimeType);
1673
- const media = await mediaRepo.createPending({
1674
- filename: basename,
1675
- mimeType,
1676
- storageKey
1677
- });
1678
- return {
1679
- uploadUrl: (await storage.getSignedUploadUrl({
1680
- key: storageKey,
1681
- contentType: mimeType,
1682
- expiresIn: 3600
1683
- })).url,
1684
- mediaId: media.id
1685
- };
1686
- };
1687
- return {
1688
- ...readAccess,
1689
- getUploadUrl,
1690
- async upload(filename, contentType, bytes) {
1691
- if (!storage) throw new Error("Media upload() requires a storage backend. Configure storage in PluginContextFactoryOptions.");
1692
- const mimeType = allowedUploadType(contentType);
1693
- const { basename, storageKey } = uploadStorageKey(filename, mimeType);
1694
- await storage.upload({
1695
- key: storageKey,
1696
- body: new Uint8Array(bytes),
1697
- contentType: mimeType
1698
- });
1699
- const enriched = await enrichImageMetadata(new Uint8Array(bytes), mimeType);
1700
- let media;
1701
- try {
1702
- media = await mediaRepo.create({
1703
- filename: basename,
1704
- mimeType,
1705
- size: bytes.byteLength,
1706
- storageKey,
1707
- status: "ready",
1708
- width: enriched.width,
1709
- height: enriched.height,
1710
- blurhash: enriched.blurhash,
1711
- dominantColor: enriched.dominantColor
1712
- });
1713
- } catch (error) {
1714
- try {
1715
- await storage.delete(storageKey);
1716
- } catch {}
1717
- throw error;
1718
- }
1719
- return {
1720
- mediaId: media.id,
1721
- storageKey,
1722
- url: `/_emdash/api/media/file/${storageKey}`
1723
- };
1724
- },
1725
- async delete(id) {
1726
- const result = await handleMediaDelete(db, id, storage);
1727
- if (!result.success) {
1728
- if (result.error.code === "NOT_FOUND") return false;
1729
- throw new Error(result.error.message);
1730
- }
1731
- invalidateSiteSettingsCache();
1732
- return true;
1733
- }
1734
- };
1735
- }
1736
- /** Maximum number of redirects to follow in plugin HTTP access */
1737
- const MAX_PLUGIN_REDIRECTS = 5;
1738
- function stripTrailingDots(value) {
1739
- let end = value.length;
1740
- while (end > 0 && value.charCodeAt(end - 1) === 46) end--;
1741
- return end === value.length ? value : value.slice(0, end);
1742
- }
1743
- /**
1744
- * Check if a hostname matches any pattern in the allowed list.
1745
- * Patterns: "*" matches all, "*.example.com" matches subdomains AND bare "example.com",
1746
- * "api.example.com" matches exactly.
1747
- */
1748
- function isHostAllowed(host, allowedHosts) {
1749
- const normalizedHost = stripTrailingDots(host.toLowerCase());
1750
- return allowedHosts.some((pattern) => {
1751
- const normalizedPattern = stripTrailingDots(pattern.toLowerCase());
1752
- if (normalizedPattern === "*") return true;
1753
- if (normalizedPattern.startsWith("*.")) {
1754
- const suffix = normalizedPattern.slice(1);
1755
- return normalizedHost.endsWith(suffix) || normalizedHost === normalizedPattern.slice(2);
1756
- }
1757
- return normalizedHost === normalizedPattern;
1758
- });
1759
- }
1760
- function tryParsePluginHttpTarget(url) {
1761
- try {
1762
- return new URL(url);
1763
- } catch {
1764
- return null;
1765
- }
1766
- }
1767
- async function validatePluginHttpTarget(pluginId, url) {
1768
- try {
1769
- return await resolveAndValidateExternalUrl(url);
1770
- } catch (error) {
1771
- const message = error instanceof SsrfError ? error.message : "SSRF validation failed";
1772
- const target = tryParsePluginHttpTarget(url);
1773
- throw new Error(`Plugin "${pluginId}": blocked fetch to "${target ? target.hostname : "invalid URL"}": ${message}`, { cause: error });
1774
- }
1775
- }
1776
- /**
1777
- * Create HTTP access with host validation and SSRF protection.
1778
- *
1779
- * Uses redirect: "manual" to re-validate each redirect target before dispatch.
1780
- */
1781
- function createHttpAccess(pluginId, allowedHosts, fetchImpl = globalThis.fetch) {
1782
- return { async fetch(url, init) {
1783
- if (allowedHosts.length === 0) throw new Error(`Plugin "${pluginId}" has no allowed hosts configured. Add hosts to the plugin's allowedHosts array to enable HTTP requests.`);
1784
- let currentUrl = url;
1785
- let currentInit = init;
1786
- let requestBuffered = false;
1787
- let redirected = false;
1788
- for (let i = 0; i <= MAX_PLUGIN_REDIRECTS; i++) {
1789
- const target = tryParsePluginHttpTarget(currentUrl);
1790
- if (target && !isHostAllowed(target.hostname, allowedHosts)) throw new Error(`Plugin "${pluginId}" is not allowed to fetch from host "${target.hostname}". Allowed hosts: ${allowedHosts.join(", ")}`);
1791
- await validatePluginHttpTarget(pluginId, currentUrl);
1792
- if (!requestBuffered) {
1793
- currentInit = await bufferPluginHttpRequest(currentInit);
1794
- requestBuffered = true;
1795
- }
1796
- const response = await fetchImpl(currentUrl, {
1797
- ...currentInit,
1798
- redirect: "manual"
1799
- });
1800
- const location = response.headers.get("Location");
1801
- if (location === null) return pluginHttpResponseFromWire(await pluginHttpResponseToWire(response, currentUrl, redirected));
1802
- const redirectAction = pluginHttpRedirectAction(response.status, true, currentInit);
1803
- if (redirectAction === "return") return pluginHttpResponseFromWire(await pluginHttpResponseToWire(response, currentUrl, redirected));
1804
- await response.body?.cancel();
1805
- if (redirectAction === "error") throw new Error(`Plugin "${pluginId}": redirect mode is "error"`);
1806
- const previousOrigin = new URL(currentUrl).origin;
1807
- currentUrl = new URL(location, currentUrl).href;
1808
- redirected = true;
1809
- const nextOrigin = new URL(currentUrl).origin;
1810
- currentInit = rewritePluginHttpRedirect(response.status, currentInit);
1811
- if (previousOrigin !== nextOrigin && currentInit) currentInit = stripCredentialHeaders(currentInit);
1812
- }
1813
- throw new Error(`Plugin "${pluginId}": too many redirects (max ${MAX_PLUGIN_REDIRECTS})`);
1814
- } };
1815
- }
1816
- /**
1817
- * Create unrestricted HTTP access (for plugins with network:request:unrestricted capability).
1818
- * No host validation, but applies SSRF protection on redirect targets to
1819
- * prevent plugins from being tricked into reaching internal services.
1820
- */
1821
- function createUnrestrictedHttpAccess(pluginId, fetchImpl = globalThis.fetch) {
1822
- return { async fetch(url, init) {
1823
- let currentUrl = url;
1824
- let currentInit = init;
1825
- let requestBuffered = false;
1826
- let redirected = false;
1827
- for (let i = 0; i <= MAX_PLUGIN_REDIRECTS; i++) {
1828
- await validatePluginHttpTarget(pluginId, currentUrl);
1829
- if (!requestBuffered) {
1830
- currentInit = await bufferPluginHttpRequest(currentInit);
1831
- requestBuffered = true;
1832
- }
1833
- const response = await fetchImpl(currentUrl, {
1834
- ...currentInit,
1835
- redirect: "manual"
1836
- });
1837
- const location = response.headers.get("Location");
1838
- if (location === null) return pluginHttpResponseFromWire(await pluginHttpResponseToWire(response, currentUrl, redirected));
1839
- const redirectAction = pluginHttpRedirectAction(response.status, true, currentInit);
1840
- if (redirectAction === "return") return pluginHttpResponseFromWire(await pluginHttpResponseToWire(response, currentUrl, redirected));
1841
- await response.body?.cancel();
1842
- if (redirectAction === "error") throw new Error(`Plugin "${pluginId}": redirect mode is "error"`);
1843
- const previousOrigin = new URL(currentUrl).origin;
1844
- currentUrl = new URL(location, currentUrl).href;
1845
- redirected = true;
1846
- const nextOrigin = new URL(currentUrl).origin;
1847
- currentInit = rewritePluginHttpRedirect(response.status, currentInit);
1848
- if (previousOrigin !== nextOrigin && currentInit) currentInit = stripCredentialHeaders(currentInit);
1849
- }
1850
- throw new Error(`Plugin "${pluginId}": too many redirects (max ${MAX_PLUGIN_REDIRECTS})`);
1851
- } };
1852
- }
1853
- /**
1854
- * Create logger for a plugin
1855
- */
1856
- function createLogAccess(pluginId, redactor) {
1857
- const prefix = `[plugin:${pluginId}]`;
1858
- const redact = (value) => redactor?.redact(value) ?? value;
1859
- return {
1860
- debug(message, data) {
1861
- if (data !== void 0) console.debug(prefix, redact(message), redact(data));
1862
- else console.debug(prefix, redact(message));
1863
- },
1864
- info(message, data) {
1865
- if (data !== void 0) console.info(prefix, redact(message), redact(data));
1866
- else console.info(prefix, redact(message));
1867
- },
1868
- warn(message, data) {
1869
- if (data !== void 0) console.warn(prefix, redact(message), redact(data));
1870
- else console.warn(prefix, redact(message));
1871
- },
1872
- error(message, data) {
1873
- if (data !== void 0) console.error(prefix, redact(message), redact(data));
1874
- else console.error(prefix, redact(message));
1875
- }
1876
- };
1877
- }
1878
- const TRAILING_SLASH_RE = /\/$/;
1879
- /**
1880
- * Create site info from config and settings. A missing URL becomes an
1881
- * empty string.
1882
- */
1883
- function createSiteInfo(options) {
1884
- return {
1885
- name: options.siteName ?? "",
1886
- url: (options.siteUrl ?? "").replace(TRAILING_SLASH_RE, ""),
1887
- locale: options.locale ?? "en",
1888
- trailingSlash: options.trailingSlash ?? "ignore"
1889
- };
1890
- }
1891
- /**
1892
- * Create a URL helper that generates absolute URLs from relative paths.
1893
- * Validates that path starts with "/" and rejects protocol-relative paths ("//").
1894
- */
1895
- function createUrlHelper(siteUrl) {
1896
- const base = siteUrl.replace(TRAILING_SLASH_RE, "");
1897
- return (path) => {
1898
- if (!path.startsWith("/")) throw new Error(`URL path must start with "/", got: "${path}"`);
1899
- if (path.startsWith("//")) throw new Error(`URL path must not be protocol-relative, got: "${path}"`);
1900
- return `${base}${path}`;
1901
- };
1902
- }
1903
- /**
1904
- * Convert a UserRepository user to the plugin-facing UserInfo shape.
1905
- * Strips sensitive fields (avatarUrl, emailVerified, data).
1906
- */
1907
- function toUserInfo(user) {
1908
- return {
1909
- id: user.id,
1910
- email: user.email,
1911
- name: user.name,
1912
- role: user.role,
1913
- createdAt: user.createdAt
1914
- };
1915
- }
1916
- /**
1917
- * Create read-only user access for plugins.
1918
- * Excludes sensitive fields (password hashes, sessions, passkeys, avatar URL, data).
1919
- */
1920
- function createUserAccess(db) {
1921
- const userRepo = new UserRepository(db);
1922
- return {
1923
- async get(id) {
1924
- const user = await userRepo.findById(id);
1925
- if (!user) return null;
1926
- return toUserInfo(user);
1927
- },
1928
- async getByEmail(email) {
1929
- const user = await userRepo.findByEmail(email);
1930
- if (!user) return null;
1931
- return toUserInfo(user);
1932
- },
1933
- async list(opts) {
1934
- const result = await userRepo.findMany({
1935
- role: opts?.role,
1936
- cursor: opts?.cursor,
1937
- limit: opts?.limit
1938
- });
1939
- return {
1940
- items: result.items.map(toUserInfo),
1941
- nextCursor: result.nextCursor
1942
- };
1943
- }
1944
- };
1945
- }
1946
- /**
1947
- * Factory for creating plugin contexts
1948
- */
1949
- var PluginContextFactory = class {
1950
- resolveDb;
1951
- beforeContentWrite;
1952
- contentCreate;
1953
- contentActions;
1954
- storage;
1955
- getUploadUrl;
1956
- site;
1957
- urlHelper;
1958
- cronReschedule;
1959
- now;
1960
- emailPipeline;
1961
- commentModerate;
1962
- /**
1963
- * Plugin IDs already warned about a missing media-write backend, so the
1964
- * warning fires once per factory instead of on every hook/route context
1965
- * creation (which would spam logs for hook-participating plugins).
1966
- */
1967
- warnedMissingMediaBackend = /* @__PURE__ */ new Set();
1968
- constructor(options) {
1969
- const fixedDb = options.db;
1970
- this.resolveDb = options.getDb ?? (() => fixedDb);
1971
- this.beforeContentWrite = options.beforeContentWrite;
1972
- this.contentCreate = options.contentCreate;
1973
- this.contentActions = options.contentActions;
1974
- this.storage = options.storage;
1975
- this.getUploadUrl = options.getUploadUrl;
1976
- this.site = createSiteInfo(options.siteInfo ?? {});
1977
- this.urlHelper = createUrlHelper(this.site.url);
1978
- this.cronReschedule = options.cronReschedule;
1979
- this.now = options.now ?? (() => /* @__PURE__ */ new Date());
1980
- this.emailPipeline = options.emailPipeline;
1981
- this.commentModerate = options.commentModerate;
1982
- }
1983
- /**
1984
- * Create the unified plugin context
1985
- */
1986
- createContext(plugin) {
1987
- const capabilities = new Set(plugin.capabilities);
1988
- const db = this.resolveDb();
1989
- const optionsRepo = new OptionsRepository(db);
1990
- const secretRedactor = createPluginSecretRedactor();
1991
- const settings = createSettingsAccess(optionsRepo, plugin.id, plugin.admin.settingsSchema ?? {}, void 0, secretRedactor.add);
1992
- const kv = createKVAccess(optionsRepo, plugin.id, settings);
1993
- const log = createLogAccess(plugin.id, secretRedactor);
1994
- const storage = createStorageAccess(db, plugin.id, plugin.storage);
1995
- let content;
1996
- if (capabilities.has("content:write")) content = createContentAccessWithWrite(db, this.beforeContentWrite, {
1997
- site: this.site,
1998
- revisions: capabilities.has("content:revisions:read")
1999
- }, this.contentCreate ? (input) => this.contentCreate(plugin.id, input.collection, input.input, input.options) : void 0);
2000
- else if (capabilities.has("content:read")) content = createContentAccess(db, {
2001
- site: this.site,
2002
- revisions: capabilities.has("content:revisions:read")
2003
- });
2004
- if (capabilities.has("content:publish") && this.contentActions) content = Object.assign(content ?? createContentAccess(db), {
2005
- getVersioned: (collection, id) => this.contentActions.getVersioned(plugin.id, collection, id),
2006
- publish: (collection, id, options) => this.contentActions.publish(plugin.id, collection, id, options),
2007
- unpublish: (collection, id, options) => this.contentActions.unpublish(plugin.id, collection, id, options),
2008
- schedule: (collection, id, options) => this.contentActions.schedule(plugin.id, collection, id, options),
2009
- unschedule: (collection, id, options) => this.contentActions.unschedule(plugin.id, collection, id, options)
2010
- });
2011
- if (capabilities.has("content:restore") && this.contentActions) content = Object.assign(content ?? {
2012
- get: async () => {
2013
- throw new Error("Missing capability: content:read");
2014
- },
2015
- list: async () => {
2016
- throw new Error("Missing capability: content:read");
2017
- }
2018
- }, {
2019
- getTrashedVersioned: (collection, id) => this.contentActions.getTrashedVersioned(plugin.id, collection, id),
2020
- restore: (collection, id, options) => this.contentActions.restore(plugin.id, collection, id, options)
2021
- });
2022
- const schema = capabilities.has("schema:read") ? createSchemaAccess(db) : void 0;
2023
- let taxonomies;
2024
- if (capabilities.has("taxonomies:write")) taxonomies = createTaxonomyAccessWithWrite(db);
2025
- else if (capabilities.has("taxonomies:read")) taxonomies = createTaxonomyAccess(db);
2026
- const bylines = capabilities.has("bylines:read") ? createBylineAccess(db) : void 0;
2027
- let redirects;
2028
- if (capabilities.has("redirects:write")) redirects = createRedirectAccess(db, true);
2029
- else if (capabilities.has("redirects:read")) redirects = createRedirectAccess(db);
2030
- let media;
2031
- if (capabilities.has("media:read") || capabilities.has("media:write") || capabilities.has("media:bytes:read") || capabilities.has("media:metadata:write")) media = capabilities.has("media:read") || capabilities.has("media:write") ? createMediaAccess(db) : createBlockedMediaReadAccess();
2032
- if (capabilities.has("media:write")) if (this.getUploadUrl || this.storage) media = createMediaAccessWithWrite(db, this.getUploadUrl, this.storage);
2033
- else {
2034
- if (!this.warnedMissingMediaBackend.has(plugin.id)) {
2035
- this.warnedMissingMediaBackend.add(plugin.id);
2036
- log.warn("declares the media:write capability but no storage backend is configured; upload() is unavailable.");
2037
- }
2038
- media ??= createMediaAccess(db);
2039
- }
2040
- if (capabilities.has("media:bytes:read") && media) media.readBytes = (id, options) => readPluginMediaBytes(db, this.storage, id, options);
2041
- if (capabilities.has("media:metadata:write") && media) media.updateMetadata = (id, patch) => updatePluginMediaMetadata(db, id, patch);
2042
- let http;
2043
- if (capabilities.has("network:request:unrestricted")) http = createUnrestrictedHttpAccess(plugin.id);
2044
- else if (capabilities.has("network:request")) http = createHttpAccess(plugin.id, plugin.allowedHosts);
2045
- let users;
2046
- if (capabilities.has("users:read")) users = createUserAccess(db);
2047
- let comments;
2048
- if (capabilities.has("comments:moderate")) comments = createCommentAccess(db, (id, status, expectedStatus) => {
2049
- if (!this.commentModerate) throw new Error("Comment moderation is unavailable");
2050
- return this.commentModerate(plugin.id, id, status, expectedStatus);
2051
- });
2052
- else if (capabilities.has("comments:read")) comments = createCommentAccess(db);
2053
- let cron;
2054
- if (this.cronReschedule) cron = new CronAccessImpl(db, plugin.id, this.cronReschedule, this.now);
2055
- let email;
2056
- if (capabilities.has("email:send") && this.emailPipeline?.isAvailable()) {
2057
- const pipeline = this.emailPipeline;
2058
- const pluginId = plugin.id;
2059
- email = { send: (message) => pipeline.send(message, pluginId) };
2060
- }
2061
- return {
2062
- plugin: {
2063
- id: plugin.id,
2064
- version: plugin.version
2065
- },
2066
- storage,
2067
- kv,
2068
- settings,
2069
- content,
2070
- schema,
2071
- taxonomies,
2072
- bylines,
2073
- redirects,
2074
- media,
2075
- http,
2076
- log,
2077
- site: this.site,
2078
- url: this.urlHelper,
2079
- users,
2080
- comments,
2081
- cron,
2082
- email
2083
- };
2084
- }
2085
- };
2086
-
2087
- //#endregion
2088
- export { toBylineInfo as C, createBylineAccess as S, StorageSerializationError as T, parsePluginMediaMetadataPatch as _, createHttpAccess as a, updatePluginMediaMetadata as b, createSchemaAccess as c, createTaxonomyAccessWithWrite as d, createUnrestrictedHttpAccess as f, MAX_PLUGIN_MEDIA_READ_BYTES as g, DEFAULT_PLUGIN_MEDIA_READ_BYTES as h, createContentAccessWithWrite as i, createSiteInfo as l, isPluginRouteError as m, RedirectAccessError as n, createMediaAccess as o, PluginRouteError as p, createCommentAccess as r, createRedirectAccess as s, PluginContextFactory as t, createStorageAccess as u, readPluginMediaBytes as v, PluginStorageRepository as w, createContentAccess as x, toPluginMediaItem as y };
2089
- //# sourceMappingURL=context-CzjejcsE.mjs.map