emdash 1.3.0 → 1.3.1

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 (1451) hide show
  1. package/dist/action-token-B1ds4laA.mjs +26 -0
  2. package/dist/action-token-B1ds4laA.mjs.map +1 -0
  3. package/dist/activation-sGF9br3X.mjs +387 -0
  4. package/dist/activation-sGF9br3X.mjs.map +1 -0
  5. package/dist/adapters-BOMSX9PU.d.mts +173 -0
  6. package/dist/adapters-BOMSX9PU.d.mts.map +1 -0
  7. package/dist/allowed-origins-CovsTkm3.mjs +116 -0
  8. package/dist/allowed-origins-CovsTkm3.mjs.map +1 -0
  9. package/dist/api/route-utils.d.mts +4 -4
  10. package/dist/api/route-utils.mjs +59 -57
  11. package/dist/api/route-utils.mjs.map +1 -1
  12. package/dist/api/schemas/index.d.mts +1 -1
  13. package/dist/api/schemas/index.mjs +11 -11
  14. package/dist/api-C_LxFnOm.mjs +5077 -0
  15. package/dist/api-C_LxFnOm.mjs.map +1 -0
  16. package/dist/api-tokens-DQ9Ee-vP.mjs +173 -0
  17. package/dist/api-tokens-DQ9Ee-vP.mjs.map +1 -0
  18. package/dist/apply-CLjfxvyH.mjs +1758 -0
  19. package/dist/apply-CLjfxvyH.mjs.map +1 -0
  20. package/dist/approvals-ocK89i4H.mjs +460 -0
  21. package/dist/approvals-ocK89i4H.mjs.map +1 -0
  22. package/dist/artifact-fetch-CgvvpoWQ.mjs +659 -0
  23. package/dist/artifact-fetch-CgvvpoWQ.mjs.map +1 -0
  24. package/dist/artifacts-DwOYYBQm.mjs +323 -0
  25. package/dist/artifacts-DwOYYBQm.mjs.map +1 -0
  26. package/dist/astro/image-endpoint.mjs +12 -2
  27. package/dist/astro/image-endpoint.mjs.map +1 -1
  28. package/dist/astro/index.d.mts +14 -14
  29. package/dist/astro/index.mjs +23 -12
  30. package/dist/astro/index.mjs.map +1 -1
  31. package/dist/astro/middleware/auth.d.mts +12 -12
  32. package/dist/astro/middleware/auth.mjs +10 -10
  33. package/dist/astro/middleware/media-usage-write-fence.mjs +5 -5
  34. package/dist/astro/middleware/redirect.d.mts.map +1 -1
  35. package/dist/astro/middleware/redirect.mjs +128 -48
  36. package/dist/astro/middleware/redirect.mjs.map +1 -1
  37. package/dist/astro/middleware/request-context.d.mts.map +1 -1
  38. package/dist/astro/middleware/request-context.mjs +12 -8
  39. package/dist/astro/middleware/request-context.mjs.map +1 -1
  40. package/dist/astro/middleware/setup.mjs +1 -1
  41. package/dist/astro/middleware.d.mts +12 -12
  42. package/dist/astro/middleware.d.mts.map +1 -1
  43. package/dist/astro/middleware.mjs +134 -124
  44. package/dist/astro/middleware.mjs.map +1 -1
  45. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +16 -16
  46. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +16 -16
  47. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +6 -6
  48. package/dist/astro/routes/api/admin/api-tokens/index.mjs +7 -7
  49. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +7 -7
  50. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +19 -19
  51. package/dist/astro/routes/api/admin/byline-fields/index.mjs +19 -19
  52. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +19 -19
  53. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +29 -28
  54. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
  55. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +29 -28
  56. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
  57. package/dist/astro/routes/api/admin/bylines/index.mjs +29 -28
  58. package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
  59. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +21 -21
  60. package/dist/astro/routes/api/admin/comments/_id_.mjs +8 -8
  61. package/dist/astro/routes/api/admin/comments/bulk.mjs +20 -20
  62. package/dist/astro/routes/api/admin/comments/counts.mjs +8 -8
  63. package/dist/astro/routes/api/admin/comments/index.mjs +20 -20
  64. package/dist/astro/routes/api/admin/core-update.mjs +7 -7
  65. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +6 -6
  66. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +5 -5
  67. package/dist/astro/routes/api/admin/media-usage/activation.mjs +22 -22
  68. package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +23 -23
  69. package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +23 -23
  70. package/dist/astro/routes/api/admin/media-usage/progress.mjs +27 -26
  71. package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -1
  72. package/dist/astro/routes/api/admin/media-usage/repair.mjs +33 -32
  73. package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
  74. package/dist/astro/routes/api/admin/media-usage/work/index.mjs +23 -23
  75. package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +23 -23
  76. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
  77. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
  78. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +8 -8
  79. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +8 -8
  80. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +81 -79
  81. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
  82. package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +7 -7
  83. package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +80 -78
  84. package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
  85. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +80 -78
  86. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
  87. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +91 -89
  88. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
  89. package/dist/astro/routes/api/admin/plugins/index.mjs +81 -79
  90. package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
  91. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +7 -7
  92. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +80 -78
  93. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
  94. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +90 -88
  95. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
  96. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +80 -78
  97. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
  98. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +80 -78
  99. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
  100. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +92 -90
  101. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
  102. package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +9 -9
  103. package/dist/astro/routes/api/admin/plugins/registry/install.mjs +82 -80
  104. package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
  105. package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +7 -7
  106. package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +81 -79
  107. package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
  108. package/dist/astro/routes/api/admin/plugins/updates.mjs +80 -78
  109. package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
  110. package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +6 -6
  111. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +80 -78
  112. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
  113. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +7 -7
  114. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +80 -78
  115. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
  116. package/dist/astro/routes/api/admin/transfer/_...path_.mjs +4 -4
  117. package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +45 -43
  118. package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs.map +1 -1
  119. package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +45 -43
  120. package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs.map +1 -1
  121. package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +47 -45
  122. package/dist/astro/routes/api/admin/transfer/approvals/index.mjs.map +1 -1
  123. package/dist/astro/routes/api/admin/transfer/capabilities.mjs +47 -45
  124. package/dist/astro/routes/api/admin/transfer/capabilities.mjs.map +1 -1
  125. package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +47 -45
  126. package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs.map +1 -1
  127. package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +48 -46
  128. package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs.map +1 -1
  129. package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +48 -46
  130. package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs.map +1 -1
  131. package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +47 -45
  132. package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs.map +1 -1
  133. package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +48 -46
  134. package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs.map +1 -1
  135. package/dist/astro/routes/api/admin/transfer/exports/index.mjs +49 -47
  136. package/dist/astro/routes/api/admin/transfer/exports/index.mjs.map +1 -1
  137. package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +47 -45
  138. package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs.map +1 -1
  139. package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +47 -45
  140. package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs.map +1 -1
  141. package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +49 -47
  142. package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs.map +1 -1
  143. package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +47 -45
  144. package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs.map +1 -1
  145. package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +49 -47
  146. package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs.map +1 -1
  147. package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +47 -45
  148. package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs.map +1 -1
  149. package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +47 -45
  150. package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs.map +1 -1
  151. package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +49 -47
  152. package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs.map +1 -1
  153. package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +47 -45
  154. package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs.map +1 -1
  155. package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +47 -45
  156. package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs.map +1 -1
  157. package/dist/astro/routes/api/admin/transfer/imports/index.mjs +49 -47
  158. package/dist/astro/routes/api/admin/transfer/imports/index.mjs.map +1 -1
  159. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +5 -5
  160. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +4 -4
  161. package/dist/astro/routes/api/admin/users/_id_/index.mjs +17 -17
  162. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +6 -6
  163. package/dist/astro/routes/api/admin/users/index.mjs +16 -16
  164. package/dist/astro/routes/api/auth/dev-bypass.mjs +6 -6
  165. package/dist/astro/routes/api/auth/handover.mjs +6 -6
  166. package/dist/astro/routes/api/auth/invite/accept.mjs +4 -4
  167. package/dist/astro/routes/api/auth/invite/complete.mjs +21 -21
  168. package/dist/astro/routes/api/auth/invite/index.mjs +18 -18
  169. package/dist/astro/routes/api/auth/invite/register-options.mjs +19 -19
  170. package/dist/astro/routes/api/auth/logout.mjs +5 -5
  171. package/dist/astro/routes/api/auth/magic-link/send.mjs +20 -20
  172. package/dist/astro/routes/api/auth/magic-link/verify.mjs +17 -17
  173. package/dist/astro/routes/api/auth/me.mjs +17 -17
  174. package/dist/astro/routes/api/auth/mode.mjs +5 -5
  175. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +8 -8
  176. package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
  177. package/dist/astro/routes/api/auth/passkey/_id_.mjs +16 -16
  178. package/dist/astro/routes/api/auth/passkey/index.mjs +4 -4
  179. package/dist/astro/routes/api/auth/passkey/options.mjs +21 -21
  180. package/dist/astro/routes/api/auth/passkey/register/options.mjs +19 -19
  181. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +20 -20
  182. package/dist/astro/routes/api/auth/passkey/verify.mjs +21 -21
  183. package/dist/astro/routes/api/auth/signup/complete.mjs +21 -21
  184. package/dist/astro/routes/api/auth/signup/request.mjs +19 -19
  185. package/dist/astro/routes/api/auth/signup/verify.mjs +4 -4
  186. package/dist/astro/routes/api/calendar.mjs +17 -17
  187. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +13 -13
  188. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +21 -21
  189. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +5 -5
  190. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +20 -20
  191. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +5 -5
  192. package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +19 -19
  193. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +6 -6
  194. package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +12 -12
  195. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +36 -35
  196. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -1
  197. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +20 -20
  198. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +40 -39
  199. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
  200. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +40 -39
  201. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
  202. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -6
  203. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +5 -5
  204. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +20 -20
  205. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts.map +1 -1
  206. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +40 -32
  207. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
  208. package/dist/astro/routes/api/content/_collection_/_id_/translations.d.mts.map +1 -1
  209. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +9 -5
  210. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs.map +1 -1
  211. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +20 -20
  212. package/dist/astro/routes/api/content/_collection_/_id_.mjs +20 -20
  213. package/dist/astro/routes/api/content/_collection_/authors.mjs +5 -5
  214. package/dist/astro/routes/api/content/_collection_/index.mjs +17 -17
  215. package/dist/astro/routes/api/content/_collection_/trash.mjs +17 -17
  216. package/dist/astro/routes/api/dashboard.mjs +21 -15
  217. package/dist/astro/routes/api/dashboard.mjs.map +1 -1
  218. package/dist/astro/routes/api/dev/emails.mjs +5 -5
  219. package/dist/astro/routes/api/dev/scheduled-tasks.mjs +119 -117
  220. package/dist/astro/routes/api/dev/scheduled-tasks.mjs.map +1 -1
  221. package/dist/astro/routes/api/health.mjs +6 -6
  222. package/dist/astro/routes/api/import/probe.d.mts +3 -3
  223. package/dist/astro/routes/api/import/probe.mjs +31 -29
  224. package/dist/astro/routes/api/import/probe.mjs.map +1 -1
  225. package/dist/astro/routes/api/import/wordpress/analyze.mjs +8 -8
  226. package/dist/astro/routes/api/import/wordpress/execute.d.mts +13 -13
  227. package/dist/astro/routes/api/import/wordpress/execute.mjs +31 -30
  228. package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
  229. package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -12
  230. package/dist/astro/routes/api/import/wordpress/media.mjs +21 -21
  231. package/dist/astro/routes/api/import/wordpress/prepare.mjs +22 -22
  232. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +13 -13
  233. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +32 -31
  234. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
  235. package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
  236. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +31 -29
  237. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -1
  238. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +13 -13
  239. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +42 -40
  240. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
  241. package/dist/astro/routes/api/manifest.mjs +6 -6
  242. package/dist/astro/routes/api/mcp.mjs +117 -100
  243. package/dist/astro/routes/api/mcp.mjs.map +1 -1
  244. package/dist/astro/routes/api/media/_id_/confirm.mjs +21 -21
  245. package/dist/astro/routes/api/media/_id_/replace.mjs +18 -18
  246. package/dist/astro/routes/api/media/_id_/upload.mjs +9 -9
  247. package/dist/astro/routes/api/media/_id_/usage.mjs +35 -34
  248. package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
  249. package/dist/astro/routes/api/media/_id_.mjs +33 -32
  250. package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
  251. package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +6 -6
  252. package/dist/astro/routes/api/media/file/_...key_.mjs +21 -13
  253. package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -1
  254. package/dist/astro/routes/api/media/folders/_id_.mjs +18 -18
  255. package/dist/astro/routes/api/media/folders/index.mjs +18 -18
  256. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +5 -5
  257. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +5 -5
  258. package/dist/astro/routes/api/media/providers/index.mjs +5 -5
  259. package/dist/astro/routes/api/media/upload-url.mjs +20 -20
  260. package/dist/astro/routes/api/media.mjs +37 -36
  261. package/dist/astro/routes/api/media.mjs.map +1 -1
  262. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +22 -21
  263. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
  264. package/dist/astro/routes/api/menus/_name_/items.mjs +22 -21
  265. package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
  266. package/dist/astro/routes/api/menus/_name_/reorder.mjs +22 -21
  267. package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
  268. package/dist/astro/routes/api/menus/_name_/translations.mjs +22 -21
  269. package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
  270. package/dist/astro/routes/api/menus/_name_.mjs +22 -21
  271. package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
  272. package/dist/astro/routes/api/menus/index.mjs +22 -21
  273. package/dist/astro/routes/api/menus/index.mjs.map +1 -1
  274. package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
  275. package/dist/astro/routes/api/oauth/device/authorize.mjs +8 -8
  276. package/dist/astro/routes/api/oauth/device/code.mjs +11 -11
  277. package/dist/astro/routes/api/oauth/device/token.mjs +10 -10
  278. package/dist/astro/routes/api/oauth/register.mjs +7 -7
  279. package/dist/astro/routes/api/oauth/token/refresh.mjs +8 -8
  280. package/dist/astro/routes/api/oauth/token/revoke.mjs +8 -8
  281. package/dist/astro/routes/api/oauth/token.mjs +8 -8
  282. package/dist/astro/routes/api/openapi.json.mjs +22 -22
  283. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +12 -12
  284. package/dist/astro/routes/api/redirects/404s/index.mjs +23 -22
  285. package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
  286. package/dist/astro/routes/api/redirects/404s/summary.mjs +23 -22
  287. package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
  288. package/dist/astro/routes/api/redirects/_id_.mjs +24 -23
  289. package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
  290. package/dist/astro/routes/api/redirects/index.mjs +24 -23
  291. package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
  292. package/dist/astro/routes/api/relations/_id_/index.mjs +40 -39
  293. package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
  294. package/dist/astro/routes/api/relations/index.mjs +40 -39
  295. package/dist/astro/routes/api/relations/index.mjs.map +1 -1
  296. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +5 -5
  297. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +19 -19
  298. package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +80 -78
  299. package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs.map +1 -1
  300. package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs +80 -78
  301. package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs.map +1 -1
  302. package/dist/astro/routes/api/schema/block-types/index.mjs +80 -78
  303. package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -1
  304. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +80 -78
  305. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
  306. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +80 -78
  307. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
  308. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +80 -78
  309. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
  310. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +80 -78
  311. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
  312. package/dist/astro/routes/api/schema/collections/index.mjs +80 -78
  313. package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
  314. package/dist/astro/routes/api/schema/collections/reorder.mjs +80 -78
  315. package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
  316. package/dist/astro/routes/api/schema/index.mjs +20 -19
  317. package/dist/astro/routes/api/schema/index.mjs.map +1 -1
  318. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +80 -78
  319. package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
  320. package/dist/astro/routes/api/schema/orphans/index.mjs +80 -78
  321. package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
  322. package/dist/astro/routes/api/search/enable.mjs +23 -22
  323. package/dist/astro/routes/api/search/enable.mjs.map +1 -1
  324. package/dist/astro/routes/api/search/index.mjs +22 -21
  325. package/dist/astro/routes/api/search/index.mjs.map +1 -1
  326. package/dist/astro/routes/api/search/rebuild.mjs +23 -22
  327. package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
  328. package/dist/astro/routes/api/search/stats.mjs +12 -11
  329. package/dist/astro/routes/api/search/stats.mjs.map +1 -1
  330. package/dist/astro/routes/api/search/suggest.mjs +22 -21
  331. package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
  332. package/dist/astro/routes/api/sections/_slug_.mjs +22 -21
  333. package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
  334. package/dist/astro/routes/api/sections/index.mjs +22 -21
  335. package/dist/astro/routes/api/sections/index.mjs.map +1 -1
  336. package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +7 -7
  337. package/dist/astro/routes/api/settings/backups/archives/index.mjs +7 -7
  338. package/dist/astro/routes/api/settings/backups/export.mjs +7 -7
  339. package/dist/astro/routes/api/settings/backups/index.mjs +8 -8
  340. package/dist/astro/routes/api/settings/domain-notify.mjs +9 -9
  341. package/dist/astro/routes/api/settings/domain.mjs +22 -20
  342. package/dist/astro/routes/api/settings/domain.mjs.map +1 -1
  343. package/dist/astro/routes/api/settings/email.mjs +6 -6
  344. package/dist/astro/routes/api/settings.mjs +29 -27
  345. package/dist/astro/routes/api/settings.mjs.map +1 -1
  346. package/dist/astro/routes/api/setup/admin-verify.mjs +23 -23
  347. package/dist/astro/routes/api/setup/admin.mjs +20 -20
  348. package/dist/astro/routes/api/setup/dev-bypass.mjs +52 -50
  349. package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
  350. package/dist/astro/routes/api/setup/dev-reset.mjs +4 -4
  351. package/dist/astro/routes/api/setup/index.mjs +58 -56
  352. package/dist/astro/routes/api/setup/index.mjs.map +1 -1
  353. package/dist/astro/routes/api/setup/status.mjs +6 -6
  354. package/dist/astro/routes/api/site/domain-proof.mjs +16 -14
  355. package/dist/astro/routes/api/site/domain-proof.mjs.map +1 -1
  356. package/dist/astro/routes/api/snapshot.mjs +8 -8
  357. package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +30 -29
  358. package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -1
  359. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +30 -29
  360. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
  361. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +30 -29
  362. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
  363. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +30 -29
  364. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
  365. package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +28 -27
  366. package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -1
  367. package/dist/astro/routes/api/taxonomies/_name_.mjs +30 -29
  368. package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
  369. package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +44 -43
  370. package/dist/astro/routes/api/taxonomies/bulk-tag.mjs.map +1 -1
  371. package/dist/astro/routes/api/taxonomies/index.mjs +30 -29
  372. package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
  373. package/dist/astro/routes/api/themes/preview.mjs +6 -6
  374. package/dist/astro/routes/api/typegen.mjs +6 -6
  375. package/dist/astro/routes/api/visual-editing/action-token.mjs +6 -6
  376. package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +21 -21
  377. package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +4 -4
  378. package/dist/astro/routes/api/well-known/auth.mjs +1 -1
  379. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
  380. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
  381. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +19 -19
  382. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +24 -23
  383. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
  384. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +24 -23
  385. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
  386. package/dist/astro/routes/api/widget-areas/_name_.mjs +13 -12
  387. package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
  388. package/dist/astro/routes/api/widget-areas/index.mjs +24 -23
  389. package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
  390. package/dist/astro/routes/api/widget-components.mjs +5 -5
  391. package/dist/astro/routes/robots.txt.mjs +15 -13
  392. package/dist/astro/routes/robots.txt.mjs.map +1 -1
  393. package/dist/astro/routes/sitemap-_collection_.xml.mjs +19 -17
  394. package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
  395. package/dist/astro/routes/sitemap.xml.mjs +16 -14
  396. package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
  397. package/dist/astro/types.d.mts +17 -17
  398. package/dist/audit-B8XE-0UV.mjs +127 -0
  399. package/dist/audit-B8XE-0UV.mjs.map +1 -0
  400. package/dist/auth/providers/github.d.mts +1 -1
  401. package/dist/auth/providers/google.d.mts +1 -1
  402. package/dist/auth/providers/microsoft.d.mts +1 -1
  403. package/dist/authoritative-records-LPtrIGOY.mjs +5183 -0
  404. package/dist/authoritative-records-LPtrIGOY.mjs.map +1 -0
  405. package/dist/authorize-CoDsRRp5.mjs +74 -0
  406. package/dist/authorize-CoDsRRp5.mjs.map +1 -0
  407. package/dist/backup-2Wj-hTCN.mjs +246 -0
  408. package/dist/backup-2Wj-hTCN.mjs.map +1 -0
  409. package/dist/block-types-C3gJEe7l.mjs +132 -0
  410. package/dist/block-types-C3gJEe7l.mjs.map +1 -0
  411. package/dist/block-values-CgbMtSGU.mjs +215 -0
  412. package/dist/block-values-CgbMtSGU.mjs.map +1 -0
  413. package/dist/byline-CzGZC2Zs.mjs +922 -0
  414. package/dist/byline-CzGZC2Zs.mjs.map +1 -0
  415. package/dist/byline-fields-B1qHvRps.mjs +280 -0
  416. package/dist/byline-fields-B1qHvRps.mjs.map +1 -0
  417. package/dist/byline-fields-vYd_4Q1e.mjs +123 -0
  418. package/dist/byline-fields-vYd_4Q1e.mjs.map +1 -0
  419. package/dist/byline-registry-BhzpO41z.mjs +406 -0
  420. package/dist/byline-registry-BhzpO41z.mjs.map +1 -0
  421. package/dist/bylines-BF555iIz.mjs +150 -0
  422. package/dist/bylines-BF555iIz.mjs.map +1 -0
  423. package/dist/bylines-DJx6IWWi.mjs +234 -0
  424. package/dist/bylines-DJx6IWWi.mjs.map +1 -0
  425. package/dist/cache-BWzswWB-.mjs +151 -0
  426. package/dist/cache-BWzswWB-.mjs.map +1 -0
  427. package/dist/canonical-DjF_z6GI.mjs +174 -0
  428. package/dist/canonical-DjF_z6GI.mjs.map +1 -0
  429. package/dist/capture-triggers-D7g3fOZj.mjs +362 -0
  430. package/dist/capture-triggers-D7g3fOZj.mjs.map +1 -0
  431. package/dist/challenge-store-Cfjdvw86.mjs +51 -0
  432. package/dist/challenge-store-Cfjdvw86.mjs.map +1 -0
  433. package/dist/checksum-BF4acJwn.mjs +162 -0
  434. package/dist/checksum-BF4acJwn.mjs.map +1 -0
  435. package/dist/chrome-tags-BDs29G3g.mjs +24 -0
  436. package/dist/chrome-tags-BDs29G3g.mjs.map +1 -0
  437. package/dist/chunks-CYBOL-zn.mjs +25 -0
  438. package/dist/chunks-CYBOL-zn.mjs.map +1 -0
  439. package/dist/cli/index.mjs +67 -65
  440. package/dist/cli/index.mjs.map +1 -1
  441. package/dist/client/cf-access.d.mts +1 -1
  442. package/dist/client/index.d.mts +48 -48
  443. package/dist/client/index.d.mts.map +1 -1
  444. package/dist/client/index.mjs +4 -3
  445. package/dist/client/index.mjs.map +1 -1
  446. package/dist/collection-slugs-cache-B2J5aESO.mjs +91 -0
  447. package/dist/collection-slugs-cache-B2J5aESO.mjs.map +1 -0
  448. package/dist/comment-DV7dybcs.mjs +335 -0
  449. package/dist/comment-DV7dybcs.mjs.map +1 -0
  450. package/dist/comment-reaction-CWwqiT6x.mjs +85 -0
  451. package/dist/comment-reaction-CWwqiT6x.mjs.map +1 -0
  452. package/dist/comments-DVjWJm8X.mjs +99 -0
  453. package/dist/comments-DVjWJm8X.mjs.map +1 -0
  454. package/dist/comments-Q-ILHCEI.mjs +195 -0
  455. package/dist/comments-Q-ILHCEI.mjs.map +1 -0
  456. package/dist/components-DnOmvvgg.mjs +112 -0
  457. package/dist/components-DnOmvvgg.mjs.map +1 -0
  458. package/dist/config-9IzA83_U.d.mts +6811 -0
  459. package/dist/config-9IzA83_U.d.mts.map +1 -0
  460. package/dist/config-BdQzFtmR.mjs +228 -0
  461. package/dist/config-BdQzFtmR.mjs.map +1 -0
  462. package/dist/config-Cs2RBkJ6.d.mts +41 -0
  463. package/dist/config-Cs2RBkJ6.d.mts.map +1 -0
  464. package/dist/config-Cs_AwWXI.mjs +106 -0
  465. package/dist/config-Cs_AwWXI.mjs.map +1 -0
  466. package/dist/connection-CiXgZyCY.mjs +36 -0
  467. package/dist/connection-CiXgZyCY.mjs.map +1 -0
  468. package/dist/content-Dt0Os_WQ.mjs +2109 -0
  469. package/dist/content-Dt0Os_WQ.mjs.map +1 -0
  470. package/dist/content-list-query-BK26u9Ly.d.mts +26 -0
  471. package/dist/content-list-query-BK26u9Ly.d.mts.map +1 -0
  472. package/dist/content-policy-BLDbNJOb.mjs +46 -0
  473. package/dist/content-policy-BLDbNJOb.mjs.map +1 -0
  474. package/dist/content-repair-CjwbLy4m.mjs +442 -0
  475. package/dist/content-repair-CjwbLy4m.mjs.map +1 -0
  476. package/dist/context-ErV7UdQY.mjs +2089 -0
  477. package/dist/context-ErV7UdQY.mjs.map +1 -0
  478. package/dist/credits-BRyjafiF.mjs +110 -0
  479. package/dist/credits-BRyjafiF.mjs.map +1 -0
  480. package/dist/cron-Bm5xa7tv.mjs +306 -0
  481. package/dist/cron-Bm5xa7tv.mjs.map +1 -0
  482. package/dist/dashboard-DVxQ5XiI.mjs +168 -0
  483. package/dist/dashboard-DVxQ5XiI.mjs.map +1 -0
  484. package/dist/database/migration-lock.mjs +1 -1
  485. package/dist/db/index.d.mts +3 -3
  486. package/dist/db/index.mjs +2 -2
  487. package/dist/db/libsql-migrations.d.mts +1 -1
  488. package/dist/db/libsql-migrations.mjs +5 -5
  489. package/dist/db/libsql.d.mts +1 -1
  490. package/dist/db/postgres-migrations.d.mts +1 -1
  491. package/dist/db/postgres-migrations.mjs +5 -5
  492. package/dist/db/postgres.d.mts +1 -1
  493. package/dist/db/sqlite-migrations.d.mts +1 -1
  494. package/dist/db/sqlite-migrations.mjs +5 -5
  495. package/dist/db/sqlite.d.mts +1 -1
  496. package/dist/db/sqlite.mjs +1 -1
  497. package/dist/db-errors-unnO6yiZ.mjs +65 -0
  498. package/dist/db-errors-unnO6yiZ.mjs.map +1 -0
  499. package/dist/default-B9Tf2n94.mjs +81 -0
  500. package/dist/default-B9Tf2n94.mjs.map +1 -0
  501. package/dist/deferred-tasks-CpPEqsga.d.mts +9 -0
  502. package/dist/deferred-tasks-CpPEqsga.d.mts.map +1 -0
  503. package/dist/destination-DR3IHjmy.mjs +18 -0
  504. package/dist/destination-DR3IHjmy.mjs.map +1 -0
  505. package/dist/dev-typegen-ZeWYV8Jp.mjs +29 -0
  506. package/dist/dev-typegen-ZeWYV8Jp.mjs.map +1 -0
  507. package/dist/device-flow-BbYNZ9Xi.mjs +521 -0
  508. package/dist/device-flow-BbYNZ9Xi.mjs.map +1 -0
  509. package/dist/digest-DlBa7kJl.mjs +194 -0
  510. package/dist/digest-DlBa7kJl.mjs.map +1 -0
  511. package/dist/direct-executor-5T8gkhvA.mjs +117 -0
  512. package/dist/direct-executor-5T8gkhvA.mjs.map +1 -0
  513. package/dist/dist-DY0aOmAP.mjs +810 -0
  514. package/dist/dist-DY0aOmAP.mjs.map +1 -0
  515. package/dist/email-console-v3OM8It-.mjs +50 -0
  516. package/dist/email-console-v3OM8It-.mjs.map +1 -0
  517. package/dist/email-locale-CoZo-oZx.mjs +25 -0
  518. package/dist/email-locale-CoZo-oZx.mjs.map +1 -0
  519. package/dist/emdash-runtime-DwezbIqQ.mjs +4392 -0
  520. package/dist/emdash-runtime-DwezbIqQ.mjs.map +1 -0
  521. package/dist/enrich-C3XIJi0O.mjs +194 -0
  522. package/dist/enrich-C3XIJi0O.mjs.map +1 -0
  523. package/dist/entry-lock-CY7XpdSw.d.mts +4568 -0
  524. package/dist/entry-lock-CY7XpdSw.d.mts.map +1 -0
  525. package/dist/entry-lock-DDuWaAiP.mjs +1211 -0
  526. package/dist/entry-lock-DDuWaAiP.mjs.map +1 -0
  527. package/dist/entry-lock-D_Og9Gy3.mjs +163 -0
  528. package/dist/entry-lock-D_Og9Gy3.mjs.map +1 -0
  529. package/dist/entry-locks-Cp8_BcQQ.mjs +167 -0
  530. package/dist/entry-locks-Cp8_BcQQ.mjs.map +1 -0
  531. package/dist/env-types-Br8uywYA.mjs +38 -0
  532. package/dist/env-types-Br8uywYA.mjs.map +1 -0
  533. package/dist/error-CT2SsX5S.mjs +90 -0
  534. package/dist/error-CT2SsX5S.mjs.map +1 -0
  535. package/dist/errors-BMaCpLeS.mjs +479 -0
  536. package/dist/errors-BMaCpLeS.mjs.map +1 -0
  537. package/dist/errors-DlJwot7q.mjs +120 -0
  538. package/dist/errors-DlJwot7q.mjs.map +1 -0
  539. package/dist/escape-BfbDyuQ-.mjs +9 -0
  540. package/dist/escape-BfbDyuQ-.mjs.map +1 -0
  541. package/dist/fence-BOD3SxZG.mjs +162 -0
  542. package/dist/fence-BOD3SxZG.mjs.map +1 -0
  543. package/dist/field-defs-cache-C7sR7ZeU.mjs +77 -0
  544. package/dist/field-defs-cache-C7sR7ZeU.mjs.map +1 -0
  545. package/dist/field-map-C_rDXfdJ.mjs +84 -0
  546. package/dist/field-map-C_rDXfdJ.mjs.map +1 -0
  547. package/dist/focal-point-CgCcr1Ca.mjs +23 -0
  548. package/dist/focal-point-CgCcr1Ca.mjs.map +1 -0
  549. package/dist/fts-manager-BzFo0xx6.mjs +483 -0
  550. package/dist/fts-manager-BzFo0xx6.mjs.map +1 -0
  551. package/dist/gc-B_c3DPpi.mjs +75 -0
  552. package/dist/gc-B_c3DPpi.mjs.map +1 -0
  553. package/dist/hash-A-o2ZX8O.mjs +37 -0
  554. package/dist/hash-A-o2ZX8O.mjs.map +1 -0
  555. package/dist/hook-result-f8t7hIuu.d.mts +31 -0
  556. package/dist/hook-result-f8t7hIuu.d.mts.map +1 -0
  557. package/dist/hreflang-BpUK9Lcu.mjs +105 -0
  558. package/dist/hreflang-BpUK9Lcu.mjs.map +1 -0
  559. package/dist/hreflang-D07R-RbI.d.mts +50 -0
  560. package/dist/hreflang-D07R-RbI.d.mts.map +1 -0
  561. package/dist/http-route-dispatch-C2Ep2Uf6.mjs +342 -0
  562. package/dist/http-route-dispatch-C2Ep2Uf6.mjs.map +1 -0
  563. package/dist/identity-BivQ8wkV.mjs +35 -0
  564. package/dist/identity-BivQ8wkV.mjs.map +1 -0
  565. package/dist/import-B4UvHNJz.mjs +2126 -0
  566. package/dist/import-B4UvHNJz.mjs.map +1 -0
  567. package/dist/index-C37Ty40w.d.mts +623 -0
  568. package/dist/index-C37Ty40w.d.mts.map +1 -0
  569. package/dist/index.d.mts +23 -23
  570. package/dist/index.mjs +112 -110
  571. package/dist/install-finalization-BbYaB4wj.mjs +58 -0
  572. package/dist/install-finalization-BbYaB4wj.mjs.map +1 -0
  573. package/dist/json-recordset-BjYIWFkV.mjs +12 -0
  574. package/dist/json-recordset-BjYIWFkV.mjs.map +1 -0
  575. package/dist/json-schema-Cde7le0s.mjs +15 -0
  576. package/dist/json-schema-Cde7le0s.mjs.map +1 -0
  577. package/dist/keys-CusTXpw-.mjs +61 -0
  578. package/dist/keys-CusTXpw-.mjs.map +1 -0
  579. package/dist/kinds-DogmNB6n.mjs +974 -0
  580. package/dist/kinds-DogmNB6n.mjs.map +1 -0
  581. package/dist/lifecycle-BLCoCz4T.mjs +25 -0
  582. package/dist/lifecycle-BLCoCz4T.mjs.map +1 -0
  583. package/dist/load-Dds3KhXr.mjs +28 -0
  584. package/dist/load-Dds3KhXr.mjs.map +1 -0
  585. package/dist/loader-D4w4XE7q.mjs +1420 -0
  586. package/dist/loader-D4w4XE7q.mjs.map +1 -0
  587. package/dist/loops-IYgzQdQu.mjs +205 -0
  588. package/dist/loops-IYgzQdQu.mjs.map +1 -0
  589. package/dist/manifest-builder-CGF5kujD.mjs +196 -0
  590. package/dist/manifest-builder-CGF5kujD.mjs.map +1 -0
  591. package/dist/manifest-schema-B0BxPSjB.mjs +497 -0
  592. package/dist/manifest-schema-B0BxPSjB.mjs.map +1 -0
  593. package/dist/marketplace-DNvEGLqU.mjs +257 -0
  594. package/dist/marketplace-DNvEGLqU.mjs.map +1 -0
  595. package/dist/media/image-endpoint.d.mts +3 -2
  596. package/dist/media/image-endpoint.d.mts.map +1 -1
  597. package/dist/media/image-endpoint.mjs +17 -8
  598. package/dist/media/image-endpoint.mjs.map +1 -1
  599. package/dist/media/index.d.mts +1 -1
  600. package/dist/media/index.mjs +7 -6
  601. package/dist/media/index.mjs.map +1 -1
  602. package/dist/media/local-runtime.d.mts +14 -14
  603. package/dist/media/local-runtime.d.mts.map +1 -1
  604. package/dist/media/local-runtime.mjs +18 -13
  605. package/dist/media/local-runtime.mjs.map +1 -1
  606. package/dist/media-BL9MRrSG.mjs +294 -0
  607. package/dist/media-BL9MRrSG.mjs.map +1 -0
  608. package/dist/media-B_x5B9EA.mjs +373 -0
  609. package/dist/media-B_x5B9EA.mjs.map +1 -0
  610. package/dist/media-allowlist-CpmqBbIQ.mjs +45 -0
  611. package/dist/media-allowlist-CpmqBbIQ.mjs.map +1 -0
  612. package/dist/media-folders-CNs_A_B-.mjs +210 -0
  613. package/dist/media-folders-CNs_A_B-.mjs.map +1 -0
  614. package/dist/media-qTTHVkls.mjs +416 -0
  615. package/dist/media-qTTHVkls.mjs.map +1 -0
  616. package/dist/media-url-GJboA1fl.mjs +43 -0
  617. package/dist/media-url-GJboA1fl.mjs.map +1 -0
  618. package/dist/media-usage-ClWgrX0d.mjs +282 -0
  619. package/dist/media-usage-ClWgrX0d.mjs.map +1 -0
  620. package/dist/media-usage-activation-B8Fjtq0h.mjs +78 -0
  621. package/dist/media-usage-activation-B8Fjtq0h.mjs.map +1 -0
  622. package/dist/media-usage-work-L8-Au4j-.mjs +1036 -0
  623. package/dist/media-usage-work-L8-Au4j-.mjs.map +1 -0
  624. package/dist/media-usage-work-LXgze5j9.mjs +151 -0
  625. package/dist/media-usage-work-LXgze5j9.mjs.map +1 -0
  626. package/dist/menus-BAxcbsbv.mjs +818 -0
  627. package/dist/menus-BAxcbsbv.mjs.map +1 -0
  628. package/dist/menus-BI6oBXco.mjs +92 -0
  629. package/dist/menus-BI6oBXco.mjs.map +1 -0
  630. package/dist/menus-fvGFd4m6.mjs +3725 -0
  631. package/dist/menus-fvGFd4m6.mjs.map +1 -0
  632. package/dist/migrations/index.d.mts +1 -1
  633. package/dist/migrations/index.mjs +4 -4
  634. package/dist/mime-DwhtRyUt.mjs +81 -0
  635. package/dist/mime-DwhtRyUt.mjs.map +1 -0
  636. package/dist/mode-DIDSUwuN.mjs +23 -0
  637. package/dist/mode-DIDSUwuN.mjs.map +1 -0
  638. package/dist/node-sqlite-compat-Ddr_mlR9.mjs +63 -0
  639. package/dist/node-sqlite-compat-Ddr_mlR9.mjs.map +1 -0
  640. package/dist/normalize-Ip_hFAm8.mjs +216 -0
  641. package/dist/normalize-Ip_hFAm8.mjs.map +1 -0
  642. package/dist/oauth-authorization-CcMgeT8R.mjs +274 -0
  643. package/dist/oauth-authorization-CcMgeT8R.mjs.map +1 -0
  644. package/dist/oauth-clients-C_osi0PU.mjs +266 -0
  645. package/dist/oauth-clients-C_osi0PU.mjs.map +1 -0
  646. package/dist/oauth-state-store-DGLP-6CK.mjs +50 -0
  647. package/dist/oauth-state-store-DGLP-6CK.mjs.map +1 -0
  648. package/dist/oauth-user-lookup-z77Ee0Hm.mjs +26 -0
  649. package/dist/oauth-user-lookup-z77Ee0Hm.mjs.map +1 -0
  650. package/dist/object-cache/memory.d.mts +1 -1
  651. package/dist/object-cache-EjasjtoQ.mjs +586 -0
  652. package/dist/object-cache-EjasjtoQ.mjs.map +1 -0
  653. package/dist/options-CmUpkyKW.d.mts +81 -0
  654. package/dist/options-CmUpkyKW.d.mts.map +1 -0
  655. package/dist/ownership-DCk5NutQ.mjs +12 -0
  656. package/dist/ownership-DCk5NutQ.mjs.map +1 -0
  657. package/dist/page/index.d.mts +2 -2
  658. package/dist/page/index.mjs +14 -12
  659. package/dist/page/index.mjs.map +1 -1
  660. package/dist/parse-2W-E2f7w.mjs +81 -0
  661. package/dist/parse-2W-E2f7w.mjs.map +1 -0
  662. package/dist/parse-6pN8Xqg5.d.mts +176 -0
  663. package/dist/parse-6pN8Xqg5.d.mts.map +1 -0
  664. package/dist/passkey-config-DTTZB6EI.mjs +46 -0
  665. package/dist/passkey-config-DTTZB6EI.mjs.map +1 -0
  666. package/dist/paths-CQA62503.mjs +77 -0
  667. package/dist/paths-CQA62503.mjs.map +1 -0
  668. package/dist/patterns-CryGz_EV.mjs +159 -0
  669. package/dist/patterns-CryGz_EV.mjs.map +1 -0
  670. package/dist/placeholder-BlfXkucE.d.mts +313 -0
  671. package/dist/placeholder-BlfXkucE.d.mts.map +1 -0
  672. package/dist/plan-B95eiwnF.mjs +135 -0
  673. package/dist/plan-B95eiwnF.mjs.map +1 -0
  674. package/dist/plugin-test-runtime.d.mts +14 -14
  675. package/dist/plugin-test-runtime.d.mts.map +1 -1
  676. package/dist/plugin-test-runtime.mjs +121 -119
  677. package/dist/plugin-tool-name-BDA7m4Xa.mjs +27 -0
  678. package/dist/plugin-tool-name-BDA7m4Xa.mjs.map +1 -0
  679. package/dist/plugin-types.d.mts +2 -2
  680. package/dist/plugin-utils.d.mts +12 -12
  681. package/dist/plugins/adapt-sandbox-entry.d.mts +12 -12
  682. package/dist/plugins/adapt-sandbox-entry.mjs +4 -4
  683. package/dist/plugins/host.d.mts +5 -5
  684. package/dist/plugins/host.mjs +57 -55
  685. package/dist/plugins-BhxLJ008.mjs +261 -0
  686. package/dist/plugins-BhxLJ008.mjs.map +1 -0
  687. package/dist/policy-DOJ2sPqB.mjs +53 -0
  688. package/dist/policy-DOJ2sPqB.mjs.map +1 -0
  689. package/dist/portable-text-RCMpCj47.mjs +311 -0
  690. package/dist/portable-text-RCMpCj47.mjs.map +1 -0
  691. package/dist/preview-DFwL5APO.mjs +107 -0
  692. package/dist/preview-DFwL5APO.mjs.map +1 -0
  693. package/dist/protocol-B-ztxp_y.d.mts +65 -0
  694. package/dist/protocol-B-ztxp_y.d.mts.map +1 -0
  695. package/dist/public-plugin-api-routes-ik4fPZMv.mjs +316 -0
  696. package/dist/public-plugin-api-routes-ik4fPZMv.mjs.map +1 -0
  697. package/dist/public-submission-C5JZIykp.mjs +251 -0
  698. package/dist/public-submission-C5JZIykp.mjs.map +1 -0
  699. package/dist/public-url-CQwzRljH.mjs +101 -0
  700. package/dist/public-url-CQwzRljH.mjs.map +1 -0
  701. package/dist/query-BFHjCzSh.mjs +37 -0
  702. package/dist/query-BFHjCzSh.mjs.map +1 -0
  703. package/dist/query-DuwyFr5Z.mjs +41 -0
  704. package/dist/query-DuwyFr5Z.mjs.map +1 -0
  705. package/dist/query-eR_Nz70M.mjs +1157 -0
  706. package/dist/query-eR_Nz70M.mjs.map +1 -0
  707. package/dist/range-BQWPjWgQ.mjs +51 -0
  708. package/dist/range-BQWPjWgQ.mjs.map +1 -0
  709. package/dist/rate-limit-mPKeQ3sm.mjs +127 -0
  710. package/dist/rate-limit-mPKeQ3sm.mjs.map +1 -0
  711. package/dist/receipt-CmUpyuW5.mjs +43 -0
  712. package/dist/receipt-CmUpyuW5.mjs.map +1 -0
  713. package/dist/redirect-BtiMkehU.mjs +19 -0
  714. package/dist/redirect-BtiMkehU.mjs.map +1 -0
  715. package/dist/redirect-DcmNMvOs.mjs +423 -0
  716. package/dist/redirect-DcmNMvOs.mjs.map +1 -0
  717. package/dist/redirect-paths-K5i3xYfR.mjs +36 -0
  718. package/dist/redirect-paths-K5i3xYfR.mjs.map +1 -0
  719. package/dist/redirects-BA_TvtuH.mjs +148 -0
  720. package/dist/redirects-BA_TvtuH.mjs.map +1 -0
  721. package/dist/redirects-BIrRvgn4.mjs +446 -0
  722. package/dist/redirects-BIrRvgn4.mjs.map +1 -0
  723. package/dist/registry/testing.mjs +3 -3
  724. package/dist/registry-DymfZkAN.mjs +8374 -0
  725. package/dist/registry-DymfZkAN.mjs.map +1 -0
  726. package/dist/relations-DrEs3Sc1.mjs +789 -0
  727. package/dist/relations-DrEs3Sc1.mjs.map +1 -0
  728. package/dist/request-cache-5z2WzWmh.mjs +104 -0
  729. package/dist/request-cache-5z2WzWmh.mjs.map +1 -0
  730. package/dist/request-context.d.mts +12 -1
  731. package/dist/request-context.d.mts.map +1 -1
  732. package/dist/request-context.mjs.map +1 -1
  733. package/dist/request-meta-o8RIf9pa.mjs +141 -0
  734. package/dist/request-meta-o8RIf9pa.mjs.map +1 -0
  735. package/dist/resolve-CVy9xgy_.mjs +102 -0
  736. package/dist/resolve-CVy9xgy_.mjs.map +1 -0
  737. package/dist/resolve-DdNXBJSr.mjs +199 -0
  738. package/dist/resolve-DdNXBJSr.mjs.map +1 -0
  739. package/dist/revision-Dx7Uth1X.mjs +374 -0
  740. package/dist/revision-Dx7Uth1X.mjs.map +1 -0
  741. package/dist/route-cache-DAG5dPhh.mjs +20 -0
  742. package/dist/route-cache-DAG5dPhh.mjs.map +1 -0
  743. package/dist/route-wire-Xbsu8Vih.mjs +197 -0
  744. package/dist/route-wire-Xbsu8Vih.mjs.map +1 -0
  745. package/dist/routes-YQkSOsws.mjs +272 -0
  746. package/dist/routes-YQkSOsws.mjs.map +1 -0
  747. package/dist/runner-CLorw5vo.mjs +6669 -0
  748. package/dist/runner-CLorw5vo.mjs.map +1 -0
  749. package/dist/runner-g1A9P-wD.d.mts +73 -0
  750. package/dist/runner-g1A9P-wD.d.mts.map +1 -0
  751. package/dist/runtime.d.mts +13 -13
  752. package/dist/runtime.mjs +6 -5
  753. package/dist/runtime.mjs.map +1 -1
  754. package/dist/schema/project-env-types.mjs +49 -47
  755. package/dist/schema/project-env-types.mjs.map +1 -1
  756. package/dist/schema-Bss8qImF.mjs +13 -0
  757. package/dist/schema-Bss8qImF.mjs.map +1 -0
  758. package/dist/schema-C036pqEw.mjs +815 -0
  759. package/dist/schema-C036pqEw.mjs.map +1 -0
  760. package/dist/scopes-C_SoYl9x.mjs +34 -0
  761. package/dist/scopes-C_SoYl9x.mjs.map +1 -0
  762. package/dist/search-uNqCgePJ.mjs +450 -0
  763. package/dist/search-uNqCgePJ.mjs.map +1 -0
  764. package/dist/sections-BLusMa96.mjs +346 -0
  765. package/dist/sections-BLusMa96.mjs.map +1 -0
  766. package/dist/seed/index.d.mts +2 -2
  767. package/dist/seed/index.mjs +47 -45
  768. package/dist/seo/index.d.mts +3 -3
  769. package/dist/seo/index.mjs +32 -30
  770. package/dist/seo/index.mjs.map +1 -1
  771. package/dist/seo-BodxIpws.mjs +188 -0
  772. package/dist/seo-BodxIpws.mjs.map +1 -0
  773. package/dist/seo-DaMYIQY8.mjs +133 -0
  774. package/dist/seo-DaMYIQY8.mjs.map +1 -0
  775. package/dist/service-BuM1BRsA.mjs +150 -0
  776. package/dist/service-BuM1BRsA.mjs.map +1 -0
  777. package/dist/session-user-2DpQDMKw.mjs +61 -0
  778. package/dist/session-user-2DpQDMKw.mjs.map +1 -0
  779. package/dist/settings-B3ZmPF_8.mjs +73 -0
  780. package/dist/settings-B3ZmPF_8.mjs.map +1 -0
  781. package/dist/settings-P5hwPX6_.mjs +66 -0
  782. package/dist/settings-P5hwPX6_.mjs.map +1 -0
  783. package/dist/settings-yIqoN-Ok.mjs +519 -0
  784. package/dist/settings-yIqoN-Ok.mjs.map +1 -0
  785. package/dist/setup-complete-eu6MUQnt.mjs +65 -0
  786. package/dist/setup-complete-eu6MUQnt.mjs.map +1 -0
  787. package/dist/setup-nonce-CyPOapqY.mjs +25 -0
  788. package/dist/setup-nonce-CyPOapqY.mjs.map +1 -0
  789. package/dist/site-domain-8lEJl_0U.mjs +131 -0
  790. package/dist/site-domain-8lEJl_0U.mjs.map +1 -0
  791. package/dist/site-settings-uPkW0e6o.mjs +50 -0
  792. package/dist/site-settings-uPkW0e6o.mjs.map +1 -0
  793. package/dist/site-url-25SGVXwL.mjs +45 -0
  794. package/dist/site-url-25SGVXwL.mjs.map +1 -0
  795. package/dist/sitemap-name-DTK7CYnY.mjs +26 -0
  796. package/dist/sitemap-name-DTK7CYnY.mjs.map +1 -0
  797. package/dist/slug-BEDl2IJY.mjs +16 -0
  798. package/dist/slug-BEDl2IJY.mjs.map +1 -0
  799. package/dist/slugify-BDEG9pLk.mjs +22 -0
  800. package/dist/slugify-BDEG9pLk.mjs.map +1 -0
  801. package/dist/snapshot-CvkIBRLY.mjs +414 -0
  802. package/dist/snapshot-CvkIBRLY.mjs.map +1 -0
  803. package/dist/ssrf-mcCKMH6B.mjs +406 -0
  804. package/dist/ssrf-mcCKMH6B.mjs.map +1 -0
  805. package/dist/stage-BQfGzGOy.mjs +662 -0
  806. package/dist/stage-BQfGzGOy.mjs.map +1 -0
  807. package/dist/staged-B5vQGeSf.mjs +686 -0
  808. package/dist/staged-B5vQGeSf.mjs.map +1 -0
  809. package/dist/state-dO6t6OxV.mjs +178 -0
  810. package/dist/state-dO6t6OxV.mjs.map +1 -0
  811. package/dist/status-DSURZwKS.mjs +30 -0
  812. package/dist/status-DSURZwKS.mjs.map +1 -0
  813. package/dist/storage/local.d.mts +1 -1
  814. package/dist/storage/local.mjs +2 -2
  815. package/dist/storage/s3.d.mts +1 -1
  816. package/dist/storage/s3.mjs +1 -1
  817. package/dist/storage-query-Cy0SZ8iG.d.mts +1619 -0
  818. package/dist/storage-query-Cy0SZ8iG.d.mts.map +1 -0
  819. package/dist/tar-DWzcUZ_Q.mjs +449 -0
  820. package/dist/tar-DWzcUZ_Q.mjs.map +1 -0
  821. package/dist/target-C9htUbrT.mjs +27 -0
  822. package/dist/target-C9htUbrT.mjs.map +1 -0
  823. package/dist/taxonomies-By2aGvq2.mjs +729 -0
  824. package/dist/taxonomies-By2aGvq2.mjs.map +1 -0
  825. package/dist/taxonomies-CVRd_jz0.mjs +937 -0
  826. package/dist/taxonomies-CVRd_jz0.mjs.map +1 -0
  827. package/dist/taxonomy-BG_xu2Qf.mjs +563 -0
  828. package/dist/taxonomy-BG_xu2Qf.mjs.map +1 -0
  829. package/dist/tokens-U5vzgSrM.mjs +171 -0
  830. package/dist/tokens-U5vzgSrM.mjs.map +1 -0
  831. package/dist/transaction-CkoQ5wqQ.mjs +29 -0
  832. package/dist/transaction-CkoQ5wqQ.mjs.map +1 -0
  833. package/dist/transfer-DA0OSfaT.mjs +8873 -0
  834. package/dist/transfer-DA0OSfaT.mjs.map +1 -0
  835. package/dist/transfer-Pyf3d7ka.mjs +166 -0
  836. package/dist/transfer-Pyf3d7ka.mjs.map +1 -0
  837. package/dist/transfer-download-cX7SuWEy.mjs +33 -0
  838. package/dist/transfer-download-cX7SuWEy.mjs.map +1 -0
  839. package/dist/transformations-DczubD4j.mjs +196 -0
  840. package/dist/transformations-DczubD4j.mjs.map +1 -0
  841. package/dist/transport-Dm5QzpT_.d.mts +42 -0
  842. package/dist/transport-Dm5QzpT_.d.mts.map +1 -0
  843. package/dist/transport-DtIrjEFO.mjs +137 -0
  844. package/dist/transport-DtIrjEFO.mjs.map +1 -0
  845. package/dist/trusted-proxy-CDRd5Kmw.mjs +51 -0
  846. package/dist/trusted-proxy-CDRd5Kmw.mjs.map +1 -0
  847. package/dist/turnstile-Ct5YuFNY.mjs +58 -0
  848. package/dist/turnstile-Ct5YuFNY.mjs.map +1 -0
  849. package/dist/types-Bgujop4S.d.mts +374 -0
  850. package/dist/types-Bgujop4S.d.mts.map +1 -0
  851. package/dist/types-BirHUEXt.mjs +18 -0
  852. package/dist/types-BirHUEXt.mjs.map +1 -0
  853. package/dist/types-BqJgTL_y.d.mts +293 -0
  854. package/dist/types-BqJgTL_y.d.mts.map +1 -0
  855. package/dist/types-C-lrOt9T.d.mts +87 -0
  856. package/dist/types-C-lrOt9T.d.mts.map +1 -0
  857. package/dist/types-CCEHAhOv.d.mts +916 -0
  858. package/dist/types-CCEHAhOv.d.mts.map +1 -0
  859. package/dist/types-CLVwYRBr.d.mts +227 -0
  860. package/dist/types-CLVwYRBr.d.mts.map +1 -0
  861. package/dist/types-C_asjp1J.mjs +201 -0
  862. package/dist/types-C_asjp1J.mjs.map +1 -0
  863. package/dist/types-CadaL_k8.d.mts +366 -0
  864. package/dist/types-CadaL_k8.d.mts.map +1 -0
  865. package/dist/types-DVbTb4Hk.mjs +77 -0
  866. package/dist/types-DVbTb4Hk.mjs.map +1 -0
  867. package/dist/types-Ddku19Zw.d.mts +209 -0
  868. package/dist/types-Ddku19Zw.d.mts.map +1 -0
  869. package/dist/types-DwhEvIVb.mjs +133 -0
  870. package/dist/types-DwhEvIVb.mjs.map +1 -0
  871. package/dist/types-FIiGQ3PE.mjs +16 -0
  872. package/dist/types-FIiGQ3PE.mjs.map +1 -0
  873. package/dist/types-OauzCOY0.mjs +37 -0
  874. package/dist/types-OauzCOY0.mjs.map +1 -0
  875. package/dist/types-mQGTpP-4.d.mts +1741 -0
  876. package/dist/types-mQGTpP-4.d.mts.map +1 -0
  877. package/dist/types-nbjz3Mgm.d.mts +125 -0
  878. package/dist/types-nbjz3Mgm.d.mts.map +1 -0
  879. package/dist/update-check-hW32-0pf.mjs +161 -0
  880. package/dist/update-check-hW32-0pf.mjs.map +1 -0
  881. package/dist/upload-attempts-Bpik1TLF.mjs +32 -0
  882. package/dist/upload-attempts-Bpik1TLF.mjs.map +1 -0
  883. package/dist/url-DTfGDJhI.mjs +104 -0
  884. package/dist/url-DTfGDJhI.mjs.map +1 -0
  885. package/dist/url-pattern-CJeCyNij.mjs +41 -0
  886. package/dist/url-pattern-CJeCyNij.mjs.map +1 -0
  887. package/dist/user-nQInBZbE.mjs +171 -0
  888. package/dist/user-nQInBZbE.mjs.map +1 -0
  889. package/dist/utils-govudc_U.mjs +442 -0
  890. package/dist/utils-govudc_U.mjs.map +1 -0
  891. package/dist/validate-BxLvcDYh.mjs +524 -0
  892. package/dist/validate-BxLvcDYh.mjs.map +1 -0
  893. package/dist/validate-mnoVfASU.d.mts +468 -0
  894. package/dist/validate-mnoVfASU.d.mts.map +1 -0
  895. package/dist/validation-DQDEvh87.mjs +221 -0
  896. package/dist/validation-DQDEvh87.mjs.map +1 -0
  897. package/dist/version-BOFfLiVT.mjs +49 -0
  898. package/dist/version-BOFfLiVT.mjs.map +1 -0
  899. package/dist/version-Dcvx_C9g.mjs +7 -0
  900. package/dist/version-Dcvx_C9g.mjs.map +1 -0
  901. package/dist/version-DzTJ3gD7.mjs +9 -0
  902. package/dist/version-DzTJ3gD7.mjs.map +1 -0
  903. package/dist/video-BX7AI5nJ.mjs +54 -0
  904. package/dist/video-BX7AI5nJ.mjs.map +1 -0
  905. package/dist/virtual-modules-CU29aip9.mjs +515 -0
  906. package/dist/virtual-modules-CU29aip9.mjs.map +1 -0
  907. package/dist/widgets-HIeFmZxt.mjs +121 -0
  908. package/dist/widgets-HIeFmZxt.mjs.map +1 -0
  909. package/dist/wxr-taxonomies-Dy2i2ON3.d.mts +34 -0
  910. package/dist/wxr-taxonomies-Dy2i2ON3.d.mts.map +1 -0
  911. package/dist/wxr-taxonomies-DyOGhl8W.mjs +454 -0
  912. package/dist/wxr-taxonomies-DyOGhl8W.mjs.map +1 -0
  913. package/dist/zod-generator-VxCPVDpo.mjs +425 -0
  914. package/dist/zod-generator-VxCPVDpo.mjs.map +1 -0
  915. package/package.json +5 -5
  916. package/src/api/handlers/bulk-tag.ts +11 -3
  917. package/src/api/handlers/bylines.ts +6 -2
  918. package/src/api/handlers/content.ts +107 -7
  919. package/src/api/handlers/dashboard.ts +13 -6
  920. package/src/api/handlers/menus.ts +24 -10
  921. package/src/api/handlers/relations.ts +15 -1
  922. package/src/api/handlers/taxonomies.ts +27 -17
  923. package/src/astro/image-endpoint.ts +23 -2
  924. package/src/astro/integration/vite-config.ts +16 -8
  925. package/src/astro/middleware/redirect.ts +158 -63
  926. package/src/astro/middleware/request-context.ts +1 -0
  927. package/src/astro/middleware.ts +17 -4
  928. package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +4 -1
  929. package/src/astro/routes/api/content/[collection]/[id]/translations.ts +14 -1
  930. package/src/astro/routes/api/dashboard.ts +2 -0
  931. package/src/astro/routes/api/media/file/[...key].ts +13 -3
  932. package/src/auth/types.ts +6 -0
  933. package/src/cli/commands/export-seed.ts +6 -4
  934. package/src/cli/commands/login.ts +2 -4
  935. package/src/client/index.ts +1 -0
  936. package/src/client/transport.ts +11 -7
  937. package/src/components/EmDashImage.astro +14 -2
  938. package/src/components/InlinePortableTextEditor.tsx +4 -1
  939. package/src/database/migrations/content-sized.ts +82 -0
  940. package/src/database/migrations/policy.ts +28 -2
  941. package/src/database/migrations/runner.ts +48 -0
  942. package/src/database/repositories/byline.ts +73 -17
  943. package/src/database/repositories/comment.ts +17 -7
  944. package/src/database/repositories/content.ts +79 -19
  945. package/src/database/repositories/menu.ts +77 -11
  946. package/src/database/repositories/taxonomy-def.ts +9 -2
  947. package/src/database/repositories/taxonomy.ts +47 -14
  948. package/src/database/repositories/types.ts +11 -0
  949. package/src/emdash-runtime.ts +37 -10
  950. package/src/fields/image.ts +1 -0
  951. package/src/i18n/config.ts +58 -10
  952. package/src/i18n/normalize.ts +16 -2
  953. package/src/i18n/query.ts +47 -0
  954. package/src/i18n/resolve.ts +8 -3
  955. package/src/import/wxr-taxonomies.ts +3 -2
  956. package/src/loader.ts +80 -22
  957. package/src/mcp/server.ts +28 -1
  958. package/src/media/caption.ts +30 -0
  959. package/src/media/image-endpoint.ts +13 -6
  960. package/src/media/local-runtime.ts +3 -0
  961. package/src/media/normalize.ts +15 -8
  962. package/src/media/responsive.ts +12 -2
  963. package/src/media/types.ts +16 -3
  964. package/src/menus/index.ts +21 -11
  965. package/src/migrations/manifest.ts +1 -0
  966. package/src/plugins/byline-access.ts +3 -1
  967. package/src/plugins/context.ts +1 -2
  968. package/src/plugins/storage-indexes.ts +7 -3
  969. package/src/query.ts +23 -13
  970. package/src/redirects/artifacts.ts +39 -5
  971. package/src/references/field-map.ts +6 -4
  972. package/src/request-context.ts +8 -0
  973. package/src/schema/collection-slugs-cache.ts +31 -17
  974. package/src/schema/registry.ts +9 -0
  975. package/src/schema/zod-generator.ts +2 -1
  976. package/src/search/fts-manager.ts +98 -28
  977. package/src/search/query.ts +31 -64
  978. package/src/seed/apply.ts +191 -87
  979. package/src/seed/types.ts +3 -1
  980. package/src/settings/index.ts +135 -35
  981. package/src/settings/version.ts +54 -0
  982. package/src/taxonomies/index.ts +95 -52
  983. package/src/taxonomies/term-counts.ts +2 -1
  984. package/src/utils/db-errors.ts +15 -0
  985. package/src/virtual-modules.d.ts +1 -0
  986. package/dist/action-token-SK8zyN7w.mjs +0 -26
  987. package/dist/action-token-SK8zyN7w.mjs.map +0 -1
  988. package/dist/activation-Dim4YMM7.mjs +0 -387
  989. package/dist/activation-Dim4YMM7.mjs.map +0 -1
  990. package/dist/adapters-F_xorvWv.d.mts +0 -173
  991. package/dist/adapters-F_xorvWv.d.mts.map +0 -1
  992. package/dist/allowed-origins-CEug-p0t.mjs +0 -116
  993. package/dist/allowed-origins-CEug-p0t.mjs.map +0 -1
  994. package/dist/api-D-7BNHoz.mjs +0 -5025
  995. package/dist/api-D-7BNHoz.mjs.map +0 -1
  996. package/dist/api-tokens-Bx38ZCQp.mjs +0 -173
  997. package/dist/api-tokens-Bx38ZCQp.mjs.map +0 -1
  998. package/dist/apply-T7ATgzCh.mjs +0 -1702
  999. package/dist/apply-T7ATgzCh.mjs.map +0 -1
  1000. package/dist/approvals-D-m6wvGl.mjs +0 -460
  1001. package/dist/approvals-D-m6wvGl.mjs.map +0 -1
  1002. package/dist/artifact-fetch-DIh7iyOV.mjs +0 -659
  1003. package/dist/artifact-fetch-DIh7iyOV.mjs.map +0 -1
  1004. package/dist/artifacts-htGyfCSt.mjs +0 -307
  1005. package/dist/artifacts-htGyfCSt.mjs.map +0 -1
  1006. package/dist/audit-_gieLVGU.mjs +0 -127
  1007. package/dist/audit-_gieLVGU.mjs.map +0 -1
  1008. package/dist/authoritative-records-CQlB3JzE.mjs +0 -5183
  1009. package/dist/authoritative-records-CQlB3JzE.mjs.map +0 -1
  1010. package/dist/authorize-DPFBGbE6.mjs +0 -74
  1011. package/dist/authorize-DPFBGbE6.mjs.map +0 -1
  1012. package/dist/backup-3FgVxiDJ.mjs +0 -246
  1013. package/dist/backup-3FgVxiDJ.mjs.map +0 -1
  1014. package/dist/block-types-CYcG56JB.mjs +0 -132
  1015. package/dist/block-types-CYcG56JB.mjs.map +0 -1
  1016. package/dist/block-values-gCX4HBSl.mjs +0 -215
  1017. package/dist/block-values-gCX4HBSl.mjs.map +0 -1
  1018. package/dist/byline-BR1qhyiw.mjs +0 -909
  1019. package/dist/byline-BR1qhyiw.mjs.map +0 -1
  1020. package/dist/byline-fields-4ClDC88c.mjs +0 -123
  1021. package/dist/byline-fields-4ClDC88c.mjs.map +0 -1
  1022. package/dist/byline-fields-BLXZnX7N.mjs +0 -280
  1023. package/dist/byline-fields-BLXZnX7N.mjs.map +0 -1
  1024. package/dist/byline-registry-dvt4N3xV.mjs +0 -406
  1025. package/dist/byline-registry-dvt4N3xV.mjs.map +0 -1
  1026. package/dist/bylines-CVOvRUL7.mjs +0 -234
  1027. package/dist/bylines-CVOvRUL7.mjs.map +0 -1
  1028. package/dist/bylines-DxOs9B7z.mjs +0 -150
  1029. package/dist/bylines-DxOs9B7z.mjs.map +0 -1
  1030. package/dist/cache-CEU9wo_h.mjs +0 -151
  1031. package/dist/cache-CEU9wo_h.mjs.map +0 -1
  1032. package/dist/canonical-BudtH-Fx.mjs +0 -174
  1033. package/dist/canonical-BudtH-Fx.mjs.map +0 -1
  1034. package/dist/capture-triggers-CT6dK9zd.mjs +0 -362
  1035. package/dist/capture-triggers-CT6dK9zd.mjs.map +0 -1
  1036. package/dist/challenge-store-C17BYx2-.mjs +0 -51
  1037. package/dist/challenge-store-C17BYx2-.mjs.map +0 -1
  1038. package/dist/checksum-CEqvfxGX.mjs +0 -162
  1039. package/dist/checksum-CEqvfxGX.mjs.map +0 -1
  1040. package/dist/chrome-tags-BIKBMZYO.mjs +0 -24
  1041. package/dist/chrome-tags-BIKBMZYO.mjs.map +0 -1
  1042. package/dist/chunks-xC4UD5-S.mjs +0 -25
  1043. package/dist/chunks-xC4UD5-S.mjs.map +0 -1
  1044. package/dist/collection-slugs-cache-e09QeJQt.mjs +0 -85
  1045. package/dist/collection-slugs-cache-e09QeJQt.mjs.map +0 -1
  1046. package/dist/comment-UvIWDKcW.mjs +0 -325
  1047. package/dist/comment-UvIWDKcW.mjs.map +0 -1
  1048. package/dist/comment-reaction-dGp6_FRo.mjs +0 -85
  1049. package/dist/comment-reaction-dGp6_FRo.mjs.map +0 -1
  1050. package/dist/comments-pej-_BUO.mjs +0 -195
  1051. package/dist/comments-pej-_BUO.mjs.map +0 -1
  1052. package/dist/comments-yiRFx3w5.mjs +0 -99
  1053. package/dist/comments-yiRFx3w5.mjs.map +0 -1
  1054. package/dist/components-Brp__9xo.mjs +0 -112
  1055. package/dist/components-Brp__9xo.mjs.map +0 -1
  1056. package/dist/config-Bsm_u_oE.d.mts +0 -6799
  1057. package/dist/config-Bsm_u_oE.d.mts.map +0 -1
  1058. package/dist/config-CFMojMFK.d.mts +0 -39
  1059. package/dist/config-CFMojMFK.d.mts.map +0 -1
  1060. package/dist/config-CvmjJcVw.mjs +0 -73
  1061. package/dist/config-CvmjJcVw.mjs.map +0 -1
  1062. package/dist/config-DBU6iUQB.mjs +0 -228
  1063. package/dist/config-DBU6iUQB.mjs.map +0 -1
  1064. package/dist/connection-BtEN_lP9.mjs +0 -36
  1065. package/dist/connection-BtEN_lP9.mjs.map +0 -1
  1066. package/dist/content-DQSRZTVw.mjs +0 -2075
  1067. package/dist/content-DQSRZTVw.mjs.map +0 -1
  1068. package/dist/content-list-query-CYKcY6Vi.d.mts +0 -26
  1069. package/dist/content-list-query-CYKcY6Vi.d.mts.map +0 -1
  1070. package/dist/content-policy-Dm32n9C6.mjs +0 -46
  1071. package/dist/content-policy-Dm32n9C6.mjs.map +0 -1
  1072. package/dist/content-repair-DNh5--x5.mjs +0 -442
  1073. package/dist/content-repair-DNh5--x5.mjs.map +0 -1
  1074. package/dist/context-BYptmCN0.mjs +0 -2090
  1075. package/dist/context-BYptmCN0.mjs.map +0 -1
  1076. package/dist/credits-B9iORdWB.mjs +0 -110
  1077. package/dist/credits-B9iORdWB.mjs.map +0 -1
  1078. package/dist/cron-D7obTIfk.mjs +0 -306
  1079. package/dist/cron-D7obTIfk.mjs.map +0 -1
  1080. package/dist/dashboard-D0jcgBD7.mjs +0 -167
  1081. package/dist/dashboard-D0jcgBD7.mjs.map +0 -1
  1082. package/dist/db-errors-CBD5yMro.mjs +0 -55
  1083. package/dist/db-errors-CBD5yMro.mjs.map +0 -1
  1084. package/dist/default-C0W-PhAp.mjs +0 -81
  1085. package/dist/default-C0W-PhAp.mjs.map +0 -1
  1086. package/dist/deferred-tasks-ZvUECSzI.d.mts +0 -9
  1087. package/dist/deferred-tasks-ZvUECSzI.d.mts.map +0 -1
  1088. package/dist/destination-r2zIAZ2S.mjs +0 -18
  1089. package/dist/destination-r2zIAZ2S.mjs.map +0 -1
  1090. package/dist/dev-typegen-EBni_pOQ.mjs +0 -29
  1091. package/dist/dev-typegen-EBni_pOQ.mjs.map +0 -1
  1092. package/dist/device-flow-BkFKBoAn.mjs +0 -521
  1093. package/dist/device-flow-BkFKBoAn.mjs.map +0 -1
  1094. package/dist/digest-DJ1tHCgy.mjs +0 -194
  1095. package/dist/digest-DJ1tHCgy.mjs.map +0 -1
  1096. package/dist/direct-executor-Cbxzg4qe.mjs +0 -117
  1097. package/dist/direct-executor-Cbxzg4qe.mjs.map +0 -1
  1098. package/dist/dist-Cfu8mMBs.mjs +0 -810
  1099. package/dist/dist-Cfu8mMBs.mjs.map +0 -1
  1100. package/dist/email-console-FFVJWb9N.mjs +0 -50
  1101. package/dist/email-console-FFVJWb9N.mjs.map +0 -1
  1102. package/dist/email-locale-BJ8DjTzZ.mjs +0 -25
  1103. package/dist/email-locale-BJ8DjTzZ.mjs.map +0 -1
  1104. package/dist/emdash-runtime-DVi7vtXC.mjs +0 -4379
  1105. package/dist/emdash-runtime-DVi7vtXC.mjs.map +0 -1
  1106. package/dist/enrich-Duu4sV3a.mjs +0 -194
  1107. package/dist/enrich-Duu4sV3a.mjs.map +0 -1
  1108. package/dist/entry-lock-C7VX0NGK.d.mts +0 -4568
  1109. package/dist/entry-lock-C7VX0NGK.d.mts.map +0 -1
  1110. package/dist/entry-lock-DLxCffFW.mjs +0 -163
  1111. package/dist/entry-lock-DLxCffFW.mjs.map +0 -1
  1112. package/dist/entry-lock-Df6-XhIu.mjs +0 -1211
  1113. package/dist/entry-lock-Df6-XhIu.mjs.map +0 -1
  1114. package/dist/entry-locks-DJAqVweV.mjs +0 -167
  1115. package/dist/entry-locks-DJAqVweV.mjs.map +0 -1
  1116. package/dist/env-types-C3FCVBWe.mjs +0 -38
  1117. package/dist/env-types-C3FCVBWe.mjs.map +0 -1
  1118. package/dist/error-CVWeIOku.mjs +0 -90
  1119. package/dist/error-CVWeIOku.mjs.map +0 -1
  1120. package/dist/errors-B4f4It-2.mjs +0 -120
  1121. package/dist/errors-B4f4It-2.mjs.map +0 -1
  1122. package/dist/errors-BOYNdIo3.mjs +0 -479
  1123. package/dist/errors-BOYNdIo3.mjs.map +0 -1
  1124. package/dist/escape-lsNq38PP.mjs +0 -9
  1125. package/dist/escape-lsNq38PP.mjs.map +0 -1
  1126. package/dist/fence-C3MUitUN.mjs +0 -162
  1127. package/dist/fence-C3MUitUN.mjs.map +0 -1
  1128. package/dist/field-defs-cache-Dez5iWJJ.mjs +0 -77
  1129. package/dist/field-defs-cache-Dez5iWJJ.mjs.map +0 -1
  1130. package/dist/field-map-Bft9LKak.mjs +0 -83
  1131. package/dist/field-map-Bft9LKak.mjs.map +0 -1
  1132. package/dist/focal-point-JX8kcOTQ.mjs +0 -23
  1133. package/dist/focal-point-JX8kcOTQ.mjs.map +0 -1
  1134. package/dist/fts-manager-Beg3e4bI.mjs +0 -443
  1135. package/dist/fts-manager-Beg3e4bI.mjs.map +0 -1
  1136. package/dist/gc-ByyAYiYE.mjs +0 -75
  1137. package/dist/gc-ByyAYiYE.mjs.map +0 -1
  1138. package/dist/hash-BJaeek87.mjs +0 -37
  1139. package/dist/hash-BJaeek87.mjs.map +0 -1
  1140. package/dist/hook-result-BrdLyOdI.d.mts +0 -31
  1141. package/dist/hook-result-BrdLyOdI.d.mts.map +0 -1
  1142. package/dist/hreflang-C8Jb-hrf.mjs +0 -105
  1143. package/dist/hreflang-C8Jb-hrf.mjs.map +0 -1
  1144. package/dist/hreflang-CY_F5OjF.d.mts +0 -50
  1145. package/dist/hreflang-CY_F5OjF.d.mts.map +0 -1
  1146. package/dist/http-route-dispatch-CyeW6iPv.mjs +0 -342
  1147. package/dist/http-route-dispatch-CyeW6iPv.mjs.map +0 -1
  1148. package/dist/identity-Cael5uTT.mjs +0 -35
  1149. package/dist/identity-Cael5uTT.mjs.map +0 -1
  1150. package/dist/import-BUXjdZUn.mjs +0 -2126
  1151. package/dist/import-BUXjdZUn.mjs.map +0 -1
  1152. package/dist/index-BB9sVisO.d.mts +0 -623
  1153. package/dist/index-BB9sVisO.d.mts.map +0 -1
  1154. package/dist/install-finalization-3JX5qQEA.mjs +0 -58
  1155. package/dist/install-finalization-3JX5qQEA.mjs.map +0 -1
  1156. package/dist/json-recordset-BUjxhr77.mjs +0 -12
  1157. package/dist/json-recordset-BUjxhr77.mjs.map +0 -1
  1158. package/dist/json-schema-v_D_pPNG.mjs +0 -15
  1159. package/dist/json-schema-v_D_pPNG.mjs.map +0 -1
  1160. package/dist/keys-CifIkT0N.mjs +0 -61
  1161. package/dist/keys-CifIkT0N.mjs.map +0 -1
  1162. package/dist/kinds-B_Qcl5pz.mjs +0 -974
  1163. package/dist/kinds-B_Qcl5pz.mjs.map +0 -1
  1164. package/dist/lifecycle-7vUJeFRe.mjs +0 -25
  1165. package/dist/lifecycle-7vUJeFRe.mjs.map +0 -1
  1166. package/dist/load-CdAG9wz-.mjs +0 -28
  1167. package/dist/load-CdAG9wz-.mjs.map +0 -1
  1168. package/dist/loader-CswroUbe.mjs +0 -1380
  1169. package/dist/loader-CswroUbe.mjs.map +0 -1
  1170. package/dist/loops-uA4iTOzd.mjs +0 -205
  1171. package/dist/loops-uA4iTOzd.mjs.map +0 -1
  1172. package/dist/manifest-builder-B8zjuH3f.mjs +0 -189
  1173. package/dist/manifest-builder-B8zjuH3f.mjs.map +0 -1
  1174. package/dist/manifest-schema-DNb4XmTS.mjs +0 -497
  1175. package/dist/manifest-schema-DNb4XmTS.mjs.map +0 -1
  1176. package/dist/marketplace-CqbgeIa7.mjs +0 -257
  1177. package/dist/marketplace-CqbgeIa7.mjs.map +0 -1
  1178. package/dist/media--dJRU6i2.mjs +0 -294
  1179. package/dist/media--dJRU6i2.mjs.map +0 -1
  1180. package/dist/media-1WC65OCB.mjs +0 -416
  1181. package/dist/media-1WC65OCB.mjs.map +0 -1
  1182. package/dist/media-Bws9f18T.mjs +0 -373
  1183. package/dist/media-Bws9f18T.mjs.map +0 -1
  1184. package/dist/media-allowlist-BJB7MFx6.mjs +0 -45
  1185. package/dist/media-allowlist-BJB7MFx6.mjs.map +0 -1
  1186. package/dist/media-folders-Dn3C16B8.mjs +0 -210
  1187. package/dist/media-folders-Dn3C16B8.mjs.map +0 -1
  1188. package/dist/media-url-BQgKvpQ5.mjs +0 -43
  1189. package/dist/media-url-BQgKvpQ5.mjs.map +0 -1
  1190. package/dist/media-usage-CF0WVcLO.mjs +0 -282
  1191. package/dist/media-usage-CF0WVcLO.mjs.map +0 -1
  1192. package/dist/media-usage-activation-C9HwVw5w.mjs +0 -78
  1193. package/dist/media-usage-activation-C9HwVw5w.mjs.map +0 -1
  1194. package/dist/media-usage-work-CkLa5-nc.mjs +0 -1036
  1195. package/dist/media-usage-work-CkLa5-nc.mjs.map +0 -1
  1196. package/dist/media-usage-work-m3AWTmmC.mjs +0 -151
  1197. package/dist/media-usage-work-m3AWTmmC.mjs.map +0 -1
  1198. package/dist/menus-BCVSSp1z.mjs +0 -753
  1199. package/dist/menus-BCVSSp1z.mjs.map +0 -1
  1200. package/dist/menus-BSzwObhV.mjs +0 -92
  1201. package/dist/menus-BSzwObhV.mjs.map +0 -1
  1202. package/dist/menus-Cl4kwdt7.mjs +0 -3721
  1203. package/dist/menus-Cl4kwdt7.mjs.map +0 -1
  1204. package/dist/mime-B5M9R53H.mjs +0 -81
  1205. package/dist/mime-B5M9R53H.mjs.map +0 -1
  1206. package/dist/mode-C-D3qICy.mjs +0 -23
  1207. package/dist/mode-C-D3qICy.mjs.map +0 -1
  1208. package/dist/node-sqlite-compat-CrKzRr0J.mjs +0 -63
  1209. package/dist/node-sqlite-compat-CrKzRr0J.mjs.map +0 -1
  1210. package/dist/normalize-BuWa0lvd.mjs +0 -191
  1211. package/dist/normalize-BuWa0lvd.mjs.map +0 -1
  1212. package/dist/oauth-authorization-TpEJrYB7.mjs +0 -274
  1213. package/dist/oauth-authorization-TpEJrYB7.mjs.map +0 -1
  1214. package/dist/oauth-clients-BT0Pg-MO.mjs +0 -266
  1215. package/dist/oauth-clients-BT0Pg-MO.mjs.map +0 -1
  1216. package/dist/oauth-state-store-CHMn_mwc.mjs +0 -50
  1217. package/dist/oauth-state-store-CHMn_mwc.mjs.map +0 -1
  1218. package/dist/oauth-user-lookup-BDgF6IVG.mjs +0 -26
  1219. package/dist/oauth-user-lookup-BDgF6IVG.mjs.map +0 -1
  1220. package/dist/object-cache-Bo6DGaC9.mjs +0 -586
  1221. package/dist/object-cache-Bo6DGaC9.mjs.map +0 -1
  1222. package/dist/options-DJWaq3Ie.d.mts +0 -81
  1223. package/dist/options-DJWaq3Ie.d.mts.map +0 -1
  1224. package/dist/ownership-MiyA7qKO.mjs +0 -12
  1225. package/dist/ownership-MiyA7qKO.mjs.map +0 -1
  1226. package/dist/parse-CWHOFc6z.d.mts +0 -176
  1227. package/dist/parse-CWHOFc6z.d.mts.map +0 -1
  1228. package/dist/parse-DgQ2NABT.mjs +0 -81
  1229. package/dist/parse-DgQ2NABT.mjs.map +0 -1
  1230. package/dist/passkey-config-D0kdzEao.mjs +0 -46
  1231. package/dist/passkey-config-D0kdzEao.mjs.map +0 -1
  1232. package/dist/paths-biDzFTY2.mjs +0 -77
  1233. package/dist/paths-biDzFTY2.mjs.map +0 -1
  1234. package/dist/patterns-CMNnYCgf.mjs +0 -159
  1235. package/dist/patterns-CMNnYCgf.mjs.map +0 -1
  1236. package/dist/placeholder-D41vk11_.d.mts +0 -306
  1237. package/dist/placeholder-D41vk11_.d.mts.map +0 -1
  1238. package/dist/plan-CCoqxNoU.mjs +0 -135
  1239. package/dist/plan-CCoqxNoU.mjs.map +0 -1
  1240. package/dist/plugin-tool-name-DDUgN_0p.mjs +0 -27
  1241. package/dist/plugin-tool-name-DDUgN_0p.mjs.map +0 -1
  1242. package/dist/plugins-COJ2L49n.mjs +0 -261
  1243. package/dist/plugins-COJ2L49n.mjs.map +0 -1
  1244. package/dist/policy-DLQ--Hnm.mjs +0 -45
  1245. package/dist/policy-DLQ--Hnm.mjs.map +0 -1
  1246. package/dist/portable-text-BH4zgkSm.mjs +0 -311
  1247. package/dist/portable-text-BH4zgkSm.mjs.map +0 -1
  1248. package/dist/preview-DLexxwp3.mjs +0 -107
  1249. package/dist/preview-DLexxwp3.mjs.map +0 -1
  1250. package/dist/protocol-79kUO7jP.d.mts +0 -65
  1251. package/dist/protocol-79kUO7jP.d.mts.map +0 -1
  1252. package/dist/public-plugin-api-routes-BuAMJ8nN.mjs +0 -316
  1253. package/dist/public-plugin-api-routes-BuAMJ8nN.mjs.map +0 -1
  1254. package/dist/public-submission-Di3TsgzX.mjs +0 -251
  1255. package/dist/public-submission-Di3TsgzX.mjs.map +0 -1
  1256. package/dist/public-url-Bt98vysr.mjs +0 -101
  1257. package/dist/public-url-Bt98vysr.mjs.map +0 -1
  1258. package/dist/query-CpnRlBh8.mjs +0 -1156
  1259. package/dist/query-CpnRlBh8.mjs.map +0 -1
  1260. package/dist/query-haKvLAWl.mjs +0 -41
  1261. package/dist/query-haKvLAWl.mjs.map +0 -1
  1262. package/dist/range-CYfeXgGK.mjs +0 -51
  1263. package/dist/range-CYfeXgGK.mjs.map +0 -1
  1264. package/dist/rate-limit-Xp4d0NBY.mjs +0 -127
  1265. package/dist/rate-limit-Xp4d0NBY.mjs.map +0 -1
  1266. package/dist/receipt-BUsQCOeM.mjs +0 -43
  1267. package/dist/receipt-BUsQCOeM.mjs.map +0 -1
  1268. package/dist/redirect-CQAV7mCo.mjs +0 -19
  1269. package/dist/redirect-CQAV7mCo.mjs.map +0 -1
  1270. package/dist/redirect-DiS_3mA4.mjs +0 -423
  1271. package/dist/redirect-DiS_3mA4.mjs.map +0 -1
  1272. package/dist/redirect-paths-CNYq7w80.mjs +0 -36
  1273. package/dist/redirect-paths-CNYq7w80.mjs.map +0 -1
  1274. package/dist/redirects-BEVSRMa2.mjs +0 -148
  1275. package/dist/redirects-BEVSRMa2.mjs.map +0 -1
  1276. package/dist/redirects-BHpy-VsZ.mjs +0 -446
  1277. package/dist/redirects-BHpy-VsZ.mjs.map +0 -1
  1278. package/dist/registry-TUVaid9Z.mjs +0 -8369
  1279. package/dist/registry-TUVaid9Z.mjs.map +0 -1
  1280. package/dist/relations-CA_QuMTU.mjs +0 -776
  1281. package/dist/relations-CA_QuMTU.mjs.map +0 -1
  1282. package/dist/request-cache-C4CIo5ad.mjs +0 -104
  1283. package/dist/request-cache-C4CIo5ad.mjs.map +0 -1
  1284. package/dist/request-meta-bwZ_NsvU.mjs +0 -141
  1285. package/dist/request-meta-bwZ_NsvU.mjs.map +0 -1
  1286. package/dist/resolve-D-kqyKns.mjs +0 -199
  1287. package/dist/resolve-D-kqyKns.mjs.map +0 -1
  1288. package/dist/resolve-DwNM-CXl.mjs +0 -101
  1289. package/dist/resolve-DwNM-CXl.mjs.map +0 -1
  1290. package/dist/revision-BVp8S0e_.mjs +0 -374
  1291. package/dist/revision-BVp8S0e_.mjs.map +0 -1
  1292. package/dist/route-cache-QSOyDEw0.mjs +0 -20
  1293. package/dist/route-cache-QSOyDEw0.mjs.map +0 -1
  1294. package/dist/route-wire-Ca_HWCZ5.mjs +0 -197
  1295. package/dist/route-wire-Ca_HWCZ5.mjs.map +0 -1
  1296. package/dist/routes-BerZFrvV.mjs +0 -272
  1297. package/dist/routes-BerZFrvV.mjs.map +0 -1
  1298. package/dist/runner-BObHz5FC.d.mts +0 -68
  1299. package/dist/runner-BObHz5FC.d.mts.map +0 -1
  1300. package/dist/runner-C5NeAkBQ.mjs +0 -6595
  1301. package/dist/runner-C5NeAkBQ.mjs.map +0 -1
  1302. package/dist/schema-C4OBuv6Z.mjs +0 -13
  1303. package/dist/schema-C4OBuv6Z.mjs.map +0 -1
  1304. package/dist/schema-DJRfvM_o.mjs +0 -815
  1305. package/dist/schema-DJRfvM_o.mjs.map +0 -1
  1306. package/dist/scopes-BU03K7Uo.mjs +0 -34
  1307. package/dist/scopes-BU03K7Uo.mjs.map +0 -1
  1308. package/dist/search-DfVzks89.mjs +0 -450
  1309. package/dist/search-DfVzks89.mjs.map +0 -1
  1310. package/dist/sections-BMy4JVUz.mjs +0 -346
  1311. package/dist/sections-BMy4JVUz.mjs.map +0 -1
  1312. package/dist/seo-ClB-dw9w.mjs +0 -188
  1313. package/dist/seo-ClB-dw9w.mjs.map +0 -1
  1314. package/dist/seo-VZYOEy8f.mjs +0 -133
  1315. package/dist/seo-VZYOEy8f.mjs.map +0 -1
  1316. package/dist/service-Bo_usgSk.mjs +0 -150
  1317. package/dist/service-Bo_usgSk.mjs.map +0 -1
  1318. package/dist/session-user-DlpPdf8L.mjs +0 -61
  1319. package/dist/session-user-DlpPdf8L.mjs.map +0 -1
  1320. package/dist/settings-CWb84sDm.mjs +0 -452
  1321. package/dist/settings-CWb84sDm.mjs.map +0 -1
  1322. package/dist/settings-DS914jjE.mjs +0 -66
  1323. package/dist/settings-DS914jjE.mjs.map +0 -1
  1324. package/dist/settings-Dd1uivmQ.mjs +0 -73
  1325. package/dist/settings-Dd1uivmQ.mjs.map +0 -1
  1326. package/dist/setup-complete-BuNxAUiN.mjs +0 -65
  1327. package/dist/setup-complete-BuNxAUiN.mjs.map +0 -1
  1328. package/dist/setup-nonce-BnEAX0iy.mjs +0 -25
  1329. package/dist/setup-nonce-BnEAX0iy.mjs.map +0 -1
  1330. package/dist/site-domain-Bq5j5bVg.mjs +0 -131
  1331. package/dist/site-domain-Bq5j5bVg.mjs.map +0 -1
  1332. package/dist/site-settings-DRHfX7bq.mjs +0 -50
  1333. package/dist/site-settings-DRHfX7bq.mjs.map +0 -1
  1334. package/dist/site-url-MB685I5X.mjs +0 -45
  1335. package/dist/site-url-MB685I5X.mjs.map +0 -1
  1336. package/dist/sitemap-name-BTg2NJJv.mjs +0 -26
  1337. package/dist/sitemap-name-BTg2NJJv.mjs.map +0 -1
  1338. package/dist/slug-aVnUV4SL.mjs +0 -16
  1339. package/dist/slug-aVnUV4SL.mjs.map +0 -1
  1340. package/dist/slugify-bu2-jKia.mjs +0 -22
  1341. package/dist/slugify-bu2-jKia.mjs.map +0 -1
  1342. package/dist/snapshot-DYsG4uOq.mjs +0 -414
  1343. package/dist/snapshot-DYsG4uOq.mjs.map +0 -1
  1344. package/dist/ssrf-BcYjyM4M.mjs +0 -406
  1345. package/dist/ssrf-BcYjyM4M.mjs.map +0 -1
  1346. package/dist/stage-D8DWgPcO.mjs +0 -662
  1347. package/dist/stage-D8DWgPcO.mjs.map +0 -1
  1348. package/dist/staged-CD_imitH.mjs +0 -686
  1349. package/dist/staged-CD_imitH.mjs.map +0 -1
  1350. package/dist/state-CFbGZziM.mjs +0 -178
  1351. package/dist/state-CFbGZziM.mjs.map +0 -1
  1352. package/dist/status-BFNdxzKc.mjs +0 -30
  1353. package/dist/status-BFNdxzKc.mjs.map +0 -1
  1354. package/dist/storage-query-DRyu3bSU.d.mts +0 -1615
  1355. package/dist/storage-query-DRyu3bSU.d.mts.map +0 -1
  1356. package/dist/tar-DFjExb9X.mjs +0 -449
  1357. package/dist/tar-DFjExb9X.mjs.map +0 -1
  1358. package/dist/target-CWZs2-o6.mjs +0 -27
  1359. package/dist/target-CWZs2-o6.mjs.map +0 -1
  1360. package/dist/taxonomies-ChnU7Mc8.mjs +0 -697
  1361. package/dist/taxonomies-ChnU7Mc8.mjs.map +0 -1
  1362. package/dist/taxonomies-Dd9JJv_a.mjs +0 -939
  1363. package/dist/taxonomies-Dd9JJv_a.mjs.map +0 -1
  1364. package/dist/taxonomy-C_C_LBAU.mjs +0 -550
  1365. package/dist/taxonomy-C_C_LBAU.mjs.map +0 -1
  1366. package/dist/tokens-BnhSnGwJ.mjs +0 -171
  1367. package/dist/tokens-BnhSnGwJ.mjs.map +0 -1
  1368. package/dist/transaction-BVYIo_yu.mjs +0 -29
  1369. package/dist/transaction-BVYIo_yu.mjs.map +0 -1
  1370. package/dist/transfer-ClH6w6BV.mjs +0 -8873
  1371. package/dist/transfer-ClH6w6BV.mjs.map +0 -1
  1372. package/dist/transfer-WmWiR3xf.mjs +0 -166
  1373. package/dist/transfer-WmWiR3xf.mjs.map +0 -1
  1374. package/dist/transfer-download--ofRj9Cw.mjs +0 -33
  1375. package/dist/transfer-download--ofRj9Cw.mjs.map +0 -1
  1376. package/dist/transformations-Bx4lYY0Y.mjs +0 -196
  1377. package/dist/transformations-Bx4lYY0Y.mjs.map +0 -1
  1378. package/dist/transport-BjbqNiPI.mjs +0 -136
  1379. package/dist/transport-BjbqNiPI.mjs.map +0 -1
  1380. package/dist/transport-DxiXnbXk.d.mts +0 -42
  1381. package/dist/transport-DxiXnbXk.d.mts.map +0 -1
  1382. package/dist/trusted-proxy-BU3Nx9g1.mjs +0 -51
  1383. package/dist/trusted-proxy-BU3Nx9g1.mjs.map +0 -1
  1384. package/dist/turnstile-CJwvsOqw.mjs +0 -58
  1385. package/dist/turnstile-CJwvsOqw.mjs.map +0 -1
  1386. package/dist/types-BA3ey2QH.d.mts +0 -87
  1387. package/dist/types-BA3ey2QH.d.mts.map +0 -1
  1388. package/dist/types-BGmQ0uXs.mjs +0 -201
  1389. package/dist/types-BGmQ0uXs.mjs.map +0 -1
  1390. package/dist/types-Bwpzb5o6.d.mts +0 -227
  1391. package/dist/types-Bwpzb5o6.d.mts.map +0 -1
  1392. package/dist/types-CNB-dj6F.d.mts +0 -289
  1393. package/dist/types-CNB-dj6F.d.mts.map +0 -1
  1394. package/dist/types-CgfFGfO5.mjs +0 -16
  1395. package/dist/types-CgfFGfO5.mjs.map +0 -1
  1396. package/dist/types-Cj0_yZkn.mjs +0 -18
  1397. package/dist/types-Cj0_yZkn.mjs.map +0 -1
  1398. package/dist/types-D2NEXtgB.mjs +0 -127
  1399. package/dist/types-D2NEXtgB.mjs.map +0 -1
  1400. package/dist/types-DCFavOii.d.mts +0 -916
  1401. package/dist/types-DCFavOii.d.mts.map +0 -1
  1402. package/dist/types-DHO7Pd25.d.mts +0 -366
  1403. package/dist/types-DHO7Pd25.d.mts.map +0 -1
  1404. package/dist/types-DvqVxZXa.d.mts +0 -125
  1405. package/dist/types-DvqVxZXa.d.mts.map +0 -1
  1406. package/dist/types-QoPHm-2w.d.mts +0 -1741
  1407. package/dist/types-QoPHm-2w.d.mts.map +0 -1
  1408. package/dist/types-RLgeIpnF.d.mts +0 -374
  1409. package/dist/types-RLgeIpnF.d.mts.map +0 -1
  1410. package/dist/types-qHVygneX.mjs +0 -77
  1411. package/dist/types-qHVygneX.mjs.map +0 -1
  1412. package/dist/types-sUHaH7lC.mjs +0 -37
  1413. package/dist/types-sUHaH7lC.mjs.map +0 -1
  1414. package/dist/types-slSqujQL.d.mts +0 -204
  1415. package/dist/types-slSqujQL.d.mts.map +0 -1
  1416. package/dist/update-check-BxNg9T6N.mjs +0 -161
  1417. package/dist/update-check-BxNg9T6N.mjs.map +0 -1
  1418. package/dist/upload-attempts-DPFC4COv.mjs +0 -32
  1419. package/dist/upload-attempts-DPFC4COv.mjs.map +0 -1
  1420. package/dist/url-Dn3IStq8.mjs +0 -104
  1421. package/dist/url-Dn3IStq8.mjs.map +0 -1
  1422. package/dist/url-pattern-QATUE_rv.mjs +0 -41
  1423. package/dist/url-pattern-QATUE_rv.mjs.map +0 -1
  1424. package/dist/user-BlCTKVAm.mjs +0 -171
  1425. package/dist/user-BlCTKVAm.mjs.map +0 -1
  1426. package/dist/utils-TPt7w2cS.mjs +0 -442
  1427. package/dist/utils-TPt7w2cS.mjs.map +0 -1
  1428. package/dist/validate-DxYhJQA-.mjs +0 -524
  1429. package/dist/validate-DxYhJQA-.mjs.map +0 -1
  1430. package/dist/validate-emKxGC5F.d.mts +0 -468
  1431. package/dist/validate-emKxGC5F.d.mts.map +0 -1
  1432. package/dist/validation-Ckq4vsVg.mjs +0 -220
  1433. package/dist/validation-Ckq4vsVg.mjs.map +0 -1
  1434. package/dist/version-BZj18Q7G.mjs +0 -9
  1435. package/dist/version-BZj18Q7G.mjs.map +0 -1
  1436. package/dist/version-DHmGpcch.mjs +0 -7
  1437. package/dist/version-DHmGpcch.mjs.map +0 -1
  1438. package/dist/video-DytCnw3L.mjs +0 -54
  1439. package/dist/video-DytCnw3L.mjs.map +0 -1
  1440. package/dist/virtual-modules-DO954n7P.mjs +0 -515
  1441. package/dist/virtual-modules-DO954n7P.mjs.map +0 -1
  1442. package/dist/widgets-DA5XmvVC.mjs +0 -121
  1443. package/dist/widgets-DA5XmvVC.mjs.map +0 -1
  1444. package/dist/wxr-taxonomies-CrMonejI.d.mts +0 -34
  1445. package/dist/wxr-taxonomies-CrMonejI.d.mts.map +0 -1
  1446. package/dist/wxr-taxonomies-RgRG0d5e.mjs +0 -453
  1447. package/dist/wxr-taxonomies-RgRG0d5e.mjs.map +0 -1
  1448. package/dist/zod-generator-D0JKy94C.mjs +0 -424
  1449. package/dist/zod-generator-D0JKy94C.mjs.map +0 -1
  1450. /package/dist/{api-tokens-CdP49zVF.mjs → api-tokens-C7l0GUAF.mjs} +0 -0
  1451. /package/dist/{ssrf-DM0E-D_8.mjs → ssrf-BBXcxG-f.mjs} +0 -0
@@ -0,0 +1,1619 @@
1
+ import { f as UpdateContentInput, i as ContentItem, l as FindManyOptions, s as CreateContentInput, t as BylineSummary, u as FindManyResult } from "./types-BqJgTL_y.mjs";
2
+ import { t as Database } from "./types-CCEHAhOv.mjs";
3
+ import { $ as ContentSchedulePolicyEvent, An as StorageCollection, Bt as PageMetadataContribution, Cn as ResolvedPlugin, D as ContentAccess, Dn as SettingField, Dt as MediaAccess, E as ConditionalWriteResult, En as SchemaAccess, G as ContentItem$1, Gt as PaginatedResult, H as ContentCreateOptions, Hn as UpdateIfResult, J as ContentPolicyEvent, Kn as VersionedValue, Lt as PageFragmentContribution, Mt as MediaItem$1, Nt as MediaMetadataPatch, O as ContentAccessWithWrite, On as SettingsAccess, Pn as TaxonomyAccessWithWrite, Q as ContentSaveHookDetails, Qt as PluginContentCreateCallback, Rt as PageFragmentEvent, St as HttpAccess, T as ConditionalDeleteResult, Un as UserInfo, Vt as PageMetadataEvent, Wn as VersionedContentItem, Xt as PluginComment, Zt as PluginCommentStatus, _ as CommentAfterModerateEvent, an as PluginManifest, at as CronEvent, gt as EmailMessage, h as CommentAfterCreateEvent, hn as RedirectAccessWithWrite, it as CronAccess, jt as MediaBytes, kn as SiteInfo, m as CommentAccess, mn as RedirectAccess, pn as QueryOptions, qn as WhereClause, r as BylineAccess, rt as ContentWriteInput, st as CronTaskInfo, t as ActorInfo, xn as RequestMeta, y as CommentBeforeCreateEvent } from "./types-mQGTpP-4.mjs";
4
+ import { t as OptionsRepository } from "./options-CmUpkyKW.mjs";
5
+ import { p as Storage } from "./types-CLVwYRBr.mjs";
6
+ import { Kysely } from "kysely";
7
+ import { PluginUiContext } from "@emdash-cms/blocks/server";
8
+
9
+ //#region src/config/secrets.d.ts
10
+ /**
11
+ * A parsed encryption key with its kid (key id) fingerprint.
12
+ *
13
+ * `kid` is the first 8 chars of the SHA-256 hash of the decoded key bytes
14
+ * (lowercase hex), used to tag envelopes so the decryptor can pick the right
15
+ * key during rotation.
16
+ */
17
+ interface ParsedEncryptionKey {
18
+ /** 8-char lowercase hex fingerprint derived from the decoded key bytes. */
19
+ kid: string;
20
+ /** The 32 raw key bytes, ready for `crypto.subtle.importKey`. */
21
+ key: Uint8Array;
22
+ /** The original env-var-formatted string (kept for re-emit; never log). */
23
+ raw: string;
24
+ }
25
+ /** Environment-variable shape consulted by the resolver. */
26
+ interface SecretsEnv {
27
+ /**
28
+ * Read by `validateEncryptionKeyAtStartup` and the plugin-secret encryption
29
+ * layer. **Not** consulted by `resolveSecrets`,
30
+ * so a malformed value can't 500 the preview/comment hot paths.
31
+ */
32
+ EMDASH_ENCRYPTION_KEY?: string;
33
+ EMDASH_PREVIEW_SECRET?: string;
34
+ /** Legacy alias; new docs point at EMDASH_PREVIEW_SECRET. */
35
+ PREVIEW_SECRET?: string;
36
+ EMDASH_IP_SALT?: string;
37
+ /**
38
+ * Legacy fallback. Prior code derived the IP salt from
39
+ * `EMDASH_AUTH_SECRET || AUTH_SECRET || "emdash-ip-salt"`. We preserve
40
+ * the env-var fallback (so existing installs keep their stable salt)
41
+ * but no longer read it from `import.meta.env` in route handlers.
42
+ */
43
+ EMDASH_AUTH_SECRET?: string;
44
+ /** Legacy alias. */
45
+ AUTH_SECRET?: string;
46
+ }
47
+ /**
48
+ * Resolve the encryption keys used for plugin secret settings.
49
+ *
50
+ * This is deliberately separate from `resolveSecrets`: plugin settings are
51
+ * not on the anonymous request path, and a missing or malformed key must only
52
+ * fail operations that need encrypted plugin settings.
53
+ */
54
+ declare function resolvePluginEncryptionKeys(env?: SecretsEnv): Promise<ParsedEncryptionKey[] | null>;
55
+ //#endregion
56
+ //#region src/datetime-normalization.d.ts
57
+ interface DatetimeFieldDescriptor {
58
+ slug: string;
59
+ type: "datetime" | "repeater";
60
+ datetimeSubFields?: readonly string[];
61
+ }
62
+ //#endregion
63
+ //#region src/database/content-datetime.d.ts
64
+ interface UrlFieldDescriptor {
65
+ slug: string;
66
+ urlSubFields?: readonly string[];
67
+ }
68
+ interface DatetimeContext {
69
+ timezone: string;
70
+ fields: DatetimeFieldDescriptor[];
71
+ urlFields: UrlFieldDescriptor[];
72
+ writableFieldSlugs: ReadonlySet<string>;
73
+ }
74
+ /**
75
+ * Datetime contexts by collection slug, shared so that a bulk write reads each
76
+ * collection's context once. A cached context doesn't see later writes to the
77
+ * `site:timezone` setting or to field definitions, so share one only across
78
+ * work that makes neither.
79
+ */
80
+ type DatetimeContextCache = Map<string, Promise<DatetimeContext>>;
81
+ //#endregion
82
+ //#region src/database/repositories/content.d.ts
83
+ type ContentRevisionPrecondition = Pick<ContentItem, "version" | "updatedAt">;
84
+ /**
85
+ * Repository for content CRUD operations
86
+ *
87
+ * Content is stored in per-collection tables (ec_posts, ec_pages, etc.)
88
+ * Each field becomes a real column in the table.
89
+ */
90
+ declare class ContentRepository {
91
+ private db;
92
+ private readonly datetimeContexts?;
93
+ private readonly datetimes;
94
+ constructor(db: Kysely<Database>, datetimeContexts?: DatetimeContextCache | undefined);
95
+ private assertAliasAwareSlugAvailable;
96
+ /**
97
+ * Create a new content item
98
+ */
99
+ create(input: CreateContentInput): Promise<ContentItem>;
100
+ /**
101
+ * Generate a unique slug for a content item within a collection.
102
+ *
103
+ * Checks the collection table for existing slugs that match `baseSlug`
104
+ * (optionally scoped to a locale) and appends a numeric suffix (`-1`,
105
+ * `-2`, etc.) on collision to guarantee uniqueness.
106
+ *
107
+ * Returns null when slug normalization cannot produce a value.
108
+ */
109
+ generateUniqueSlug(type: string, text: string, locale?: string): Promise<string | null>;
110
+ /**
111
+ * Duplicate a content item
112
+ * Creates a new draft copy with "(Copy)" appended to the title.
113
+ * A slug is auto-generated from the new title by the handler layer.
114
+ */
115
+ duplicate(type: string, id: string, authorId?: string): Promise<ContentItem>;
116
+ /**
117
+ * Find content by ID
118
+ */
119
+ findById(type: string, id: string): Promise<ContentItem | null>;
120
+ findManyByIds(type: string, ids: string[], options?: {
121
+ includeTrashed?: boolean;
122
+ }): Promise<Map<string, ContentItem>>;
123
+ findManyBySlugsInLocale(type: string, slugs: string[], locale: string, options?: {
124
+ includeTrashed?: boolean;
125
+ publishedOnly?: boolean;
126
+ }): Promise<Map<string, ContentItem>>;
127
+ /**
128
+ * Find content by id, including trashed (soft-deleted) items.
129
+ * Used by restore endpoint for ownership checks.
130
+ *
131
+ * `deletedAt` rides along because the row is already in hand: a caller that
132
+ * has to know whether the row is trashed before touching anything else would
133
+ * otherwise pay a second read for a column this row already carries.
134
+ */
135
+ findByIdIncludingTrashed(type: string, id: string): Promise<(ContentItem & {
136
+ deletedAt: string | null;
137
+ }) | null>;
138
+ /**
139
+ * Find content by ID or slug. Tries ID first if it looks like a ULID,
140
+ * otherwise tries slug. Falls back to the other if the first lookup misses.
141
+ */
142
+ findByIdOrSlug(type: string, identifier: string, locale?: string): Promise<ContentItem | null>;
143
+ /**
144
+ * Find content by ID or slug, including trashed (soft-deleted) items.
145
+ * Used by restore/permanent-delete endpoints.
146
+ */
147
+ findByIdOrSlugIncludingTrashed(type: string, identifier: string, locale?: string): Promise<ContentItem | null>;
148
+ isTrashed(type: string, id: string): Promise<boolean>;
149
+ private _findByIdOrSlug;
150
+ /**
151
+ * Find content by slug
152
+ */
153
+ findBySlug(type: string, slug: string, locale?: string): Promise<ContentItem | null>;
154
+ /**
155
+ * Find content by slug, including trashed (soft-deleted) items.
156
+ * Used by restore/permanent-delete endpoints.
157
+ */
158
+ findBySlugIncludingTrashed(type: string, slug: string, locale?: string): Promise<ContentItem | null>;
159
+ /**
160
+ * Find many content items with filtering and pagination
161
+ */
162
+ findMany(type: string, options?: FindManyOptions): Promise<FindManyResult<ContentItem>>;
163
+ /**
164
+ * Update content
165
+ */
166
+ update(type: string, id: string, input: UpdateContentInput): Promise<ContentItem>;
167
+ restoreRevision(type: string, id: string, revisionData: Record<string, unknown>, authorId: string): Promise<{
168
+ item: ContentItem;
169
+ revisionId: string;
170
+ }>;
171
+ restoreDraftRevision(type: string, id: string, revisionData: Record<string, unknown>, authorId: string): Promise<string | null>;
172
+ /**
173
+ * Update plugin-authored fields without letting content columns diverge
174
+ * from the revision pointers that publication promotes.
175
+ */
176
+ updateDraftAware(type: string, id: string, input: UpdateContentInput): Promise<ContentItem>;
177
+ private deleteUnstagedRevision;
178
+ private replaceDraftRevisionForUpdate;
179
+ /**
180
+ * Copy non-translatable field values to every other entry in the
181
+ * translation group, trashed entries included.
182
+ *
183
+ * Only the fields present in `data` are copied. With `previous`, `data` is
184
+ * the entry's complete new state and only the fields whose value differs
185
+ * from `previous` are copied, an absent field as null. An entry that already
186
+ * holds every copied value is left untouched, so its `updated_at` does not
187
+ * move.
188
+ *
189
+ * On collections with revisions a changed entry also gets a new live
190
+ * revision, because republishing and unpublishing read that revision rather
191
+ * than the columns. A pending draft takes a value only where it still holds
192
+ * the entry's previous value, so an unpublished edit to the field survives.
193
+ */
194
+ syncNonTranslatableFields(type: string, sourceId: string, translationGroup: string, data: Record<string, unknown>, options?: {
195
+ previous?: Record<string, unknown>;
196
+ }): Promise<void>;
197
+ private syncSiblingValues;
198
+ /**
199
+ * Delete content (soft delete - moves to trash)
200
+ */
201
+ delete(type: string, id: string): Promise<boolean>;
202
+ /**
203
+ * Restore content from trash
204
+ *
205
+ * The entry comes back as a draft with no schedule. The live version is not
206
+ * copied into a draft revision: collections without revisions save to the
207
+ * columns, and a draft revision would hide those saves.
208
+ */
209
+ restore(type: string, id: string, expectedRevision?: ContentRevisionPrecondition): Promise<ContentItem | null>;
210
+ /**
211
+ * Permanently delete content (cannot be undone)
212
+ */
213
+ /**
214
+ * Permanently delete a soft-deleted content row.
215
+ *
216
+ * Returns `true` only when a soft-deleted (trashed) row was removed.
217
+ * Returns `false` when no row exists OR when the row exists but is live —
218
+ * the caller is responsible for distinguishing these cases (typically via
219
+ * a follow-up `findByIdOrSlugIncludingTrashed` to surface NOT_FOUND vs
220
+ * NOT_TRASHED). The `AND deleted_at IS NOT NULL` clause is the safety net
221
+ * that prevents permanent delete from bypassing the trash workflow.
222
+ */
223
+ permanentDelete(type: string, id: string): Promise<boolean>;
224
+ /**
225
+ * Find trashed content items
226
+ */
227
+ findTrashed(type: string, options?: Omit<FindManyOptions, "where"> & {
228
+ where?: {
229
+ locale?: string;
230
+ };
231
+ }): Promise<FindManyResult<ContentItem & {
232
+ deletedAt: string;
233
+ }>>;
234
+ /**
235
+ * Count trashed content items
236
+ */
237
+ countTrashed(type: string, options?: {
238
+ locale?: string;
239
+ }): Promise<number>;
240
+ /**
241
+ * Apply the optional `q` filter.
242
+ *
243
+ * When the handler sets `useFts` (collection has a healthy FTS5 index
244
+ * covering the display columns; SQLite only), the filter is served from
245
+ * the index: a token-prefix MATCH against `_emdash_fts_<slug>` OR'd with
246
+ * an index-served `slug GLOB 'term*'` prefix (the slug is not in the FTS
247
+ * index). Both sides are index-backed, so SQLite's OR optimization avoids
248
+ * the full-table scan the LIKE fallback needs (#1517). The trade-off is
249
+ * search semantics: token-prefix matching instead of arbitrary substring.
250
+ *
251
+ * Fallback (Postgres, search disabled, or no usable terms): case-
252
+ * insensitive substring LIKE across the handler-resolved `searchColumns`
253
+ * (OR'd). User input is treated literally (LIKE wildcards escaped) and
254
+ * `lower()` is applied on both sides for SQLite/Postgres parity.
255
+ */
256
+ private applySearchFilter;
257
+ /**
258
+ * Apply the optional inclusive date-range filter. The field is mapped
259
+ * through `DATE_FILTER_COLUMNS` (a closed whitelist), and bounds compare
260
+ * lexicographically against the stored ISO 8601 timestamps. A `publishedAt`
261
+ * range naturally excludes never-published rows (their column is NULL).
262
+ */
263
+ private applyDateFilter;
264
+ /**
265
+ * Apply the optional byline filter as a correlated (NOT) EXISTS against
266
+ * `_emdash_content_bylines`.
267
+ *
268
+ * Correlating from the content table preserves the outer sort index so
269
+ * `LIMIT` can short-circuit. `mode: "none"` tests the junction rather than
270
+ * `primary_byline_id` because the two are written in the same call but
271
+ * are not atomically consistent, so the junction is authoritative.
272
+ *
273
+ * Whether a credit *renders* is locale-scoped; whether one *exists* is
274
+ * not. Both are needed: the first decides what the filter matches, the
275
+ * second decides whether the author fallback applies at all.
276
+ */
277
+ private applyBylineFilter;
278
+ /**
279
+ * Count content items
280
+ */
281
+ count(type: string, where?: FindManyOptions["where"]): Promise<number>;
282
+ private countWithResolvedFilters;
283
+ /**
284
+ * Distinct, non-null `author_id` values across the collection's live
285
+ * (non-trashed) content. Used to populate the admin author filter with
286
+ * only the users who have actually authored entries, rather than the
287
+ * full user directory (which requires admin privileges to read).
288
+ */
289
+ findDistinctAuthorIds(type: string): Promise<string[]>;
290
+ getStats(type: string, now?: Date): Promise<{
291
+ total: number;
292
+ published: number;
293
+ draft: number;
294
+ scheduled: number;
295
+ overdueScheduled: number;
296
+ }>;
297
+ /**
298
+ * Schedule content for future publishing
299
+ *
300
+ * Sets status to 'scheduled' and stores the scheduled publish time.
301
+ * The content will be auto-published when the scheduled time is reached.
302
+ */
303
+ schedule(type: string, id: string, scheduledAt: string, currentTime?: Date, expectedRevision?: ContentRevisionPrecondition): Promise<ContentItem>;
304
+ /**
305
+ * Unschedule content
306
+ *
307
+ * Clears the scheduled time. Published posts stay published;
308
+ * draft/scheduled posts revert to 'draft'.
309
+ */
310
+ unschedule(type: string, id: string, expectedRevision?: ContentRevisionPrecondition): Promise<ContentItem>;
311
+ /**
312
+ * Find content that is ready to be published
313
+ *
314
+ * Returns all content where scheduled_at <= now, regardless of status.
315
+ * This covers both draft-scheduled posts (status='scheduled') and
316
+ * published posts with scheduled draft changes (status='published').
317
+ *
318
+ * `limit` (optional) caps how many due rows are returned, oldest-due first.
319
+ * The scheduled-publishing sweep passes a limit so a large backlog can't
320
+ * fan out unbounded publish/webhook work in a single tick (and blow a Worker
321
+ * invocation's CPU/subrequest budget); the remainder drains on later ticks.
322
+ */
323
+ findReadyToPublish(type: string, limit?: number, currentTime?: Date, after?: {
324
+ scheduledAt: string;
325
+ id: string;
326
+ }): Promise<ContentItem[]>;
327
+ findTranslationIds(type: string, translationGroup: string): Promise<string[]>;
328
+ findTranslationIdsForGroups(type: string, translationGroups: string[]): Promise<Map<string, string[]>>;
329
+ /**
330
+ * Find all translations in a translation group
331
+ */
332
+ findTranslations(type: string, translationGroup: string): Promise<ContentItem[]>;
333
+ /**
334
+ * Whether any row still shares `translationGroup`, trashed rows included.
335
+ * Group-keyed satellite data (term assignments, reference edges) is owned by
336
+ * the group, not by a single locale row, so a purge may only cascade to it
337
+ * once nothing is left to own it — and a trashed sibling is still restorable.
338
+ */
339
+ hasTranslationsIncludingTrashed(type: string, translationGroup: string, options?: {
340
+ excludeId?: string;
341
+ }): Promise<boolean>;
342
+ /**
343
+ * Batch variant of {@link findTranslations}: every (non-deleted) locale
344
+ * variant for any of `translationGroups`, in one `WHERE translation_group IN
345
+ * (...)` query chunked at `SQL_BATCH_SIZE` for D1's bind-parameter limit.
346
+ * Lets callers resolve many edge groups without an N+1 per group. The caller
347
+ * groups the flat result by `translationGroup` itself.
348
+ *
349
+ * `translation_group` leads the sort so the ordering follows
350
+ * `idx_{table}_del_tg_locale` past its `deleted_at` equality; callers group by
351
+ * `translationGroup`, so the per-group locale order they rely on is preserved.
352
+ *
353
+ * `publishedOnly` restricts the result to `status = 'published'` — reference
354
+ * reads pass this for callers without `content:read_drafts` so draft/scheduled
355
+ * entries never leak through an edge traversal.
356
+ *
357
+ * A reference edge stores only a collection slug (no SQL FK), so the table may
358
+ * have been dropped since the edge was written. That is a tolerated dangling
359
+ * state, not an error: a missing table resolves to no rows, mirroring how the
360
+ * content read handlers treat `isMissingTableError`.
361
+ */
362
+ findTranslationsForGroups(type: string, translationGroups: string[], options?: {
363
+ publishedOnly?: boolean;
364
+ }): Promise<ContentItem[]>;
365
+ /**
366
+ * Batch variant of {@link findByIdOrSlug}: resolve many identifiers (each an
367
+ * id OR a slug) within `type` in a constant number of queries — one `WHERE id
368
+ * IN (...)` and one `WHERE slug IN (...)`, each chunked at `SQL_BATCH_SIZE`.
369
+ * Returns a map from the input identifier to its resolved item; identifiers
370
+ * that match nothing are absent. Used on write paths that accept a list of
371
+ * references, so a single request doesn't fan out to an N+1 of point lookups.
372
+ *
373
+ * Resolution mirrors {@link findByIdOrSlug}: a ULID-shaped identifier prefers
374
+ * the id match and falls back to slug; anything else prefers the slug match
375
+ * and falls back to id. Slug matches collapse to the lowest-locale variant
376
+ * (`ORDER BY locale ASC`), matching the slug-without-locale lookup.
377
+ */
378
+ findManyByIdOrSlug(type: string, identifiers: string[]): Promise<Map<string, ContentItem>>;
379
+ /**
380
+ * Publish the current draft
381
+ *
382
+ * Promotes draft_revision_id to live_revision_id and clears draft pointer.
383
+ * Syncs the draft revision's data into the content table columns so the
384
+ * content table always reflects the published version.
385
+ * If no draft revision exists, creates one from current data and publishes it.
386
+ * When `promoteRevision` is false, publishes the current content-table data
387
+ * by changing lifecycle metadata only.
388
+ *
389
+ * `publishedAt` (optional) overrides the publication timestamp. If omitted,
390
+ * the existing `published_at` is preserved (idempotent re-publish keeps the
391
+ * original date) and falls back to the current time on first publish. Pass
392
+ * an explicit value to backdate a publish (e.g. when migrating content from
393
+ * another CMS).
394
+ *
395
+ * `requireDue` gates the final update on the row still being due.
396
+ * `expectedScheduledAt` additionally fences changes made after a sweep
397
+ * selected the row but before publication preparation began.
398
+ */
399
+ publish(type: string, id: string, publishedAt?: string, requireDue?: boolean, expectedScheduledAt?: string, promoteRevision?: boolean, requireSlug?: boolean, expectedRevision?: ContentRevisionPrecondition, currentTime?: Date): Promise<ContentItem>;
400
+ /**
401
+ * Unpublish content
402
+ *
403
+ * Removes live pointer and cancels any pending schedule, but preserves the
404
+ * draft and publication date. If no draft exists and `draftFromLive` is set,
405
+ * creates one from the live version so the content isn't lost. Collections
406
+ * without revisions save to the columns, and a draft revision would hide
407
+ * those saves.
408
+ */
409
+ unpublish(type: string, id: string, expectedRevision?: ContentRevisionPrecondition, draftFromLive?: boolean): Promise<ContentItem>;
410
+ /**
411
+ * Set the draft revision pointer for a content item.
412
+ *
413
+ * Used by seed/import paths that stage a new revision's data before
414
+ * promoting it to live via `publish()`.
415
+ *
416
+ * Validates that the content item exists and is not soft-deleted, that
417
+ * the revision exists, and that the revision belongs to the same
418
+ * collection and entry. Without these checks, a caller could leave the
419
+ * content row pointing at a missing or unrelated revision.
420
+ */
421
+ setDraftRevision(type: string, id: string, revisionId: string): Promise<void>;
422
+ replaceDraftRevision(type: string, id: string, revisionId: string, expected: Pick<ContentItem, "version" | "liveRevisionId" | "draftRevisionId">): Promise<boolean>;
423
+ /**
424
+ * Discard pending draft changes
425
+ *
426
+ * Clears draft_revision_id. The content table columns already hold the
427
+ * published version, so no data sync is needed.
428
+ */
429
+ discardDraft(type: string, id: string, expectedRevision?: ContentRevisionPrecondition): Promise<ContentItem>;
430
+ /**
431
+ * Count content items with a pending schedule.
432
+ * Includes both draft-scheduled (status='scheduled') and published
433
+ * posts with scheduled draft changes (status='published', scheduled_at set).
434
+ */
435
+ countScheduled(type: string): Promise<number>;
436
+ /**
437
+ * Map database row to ContentItem
438
+ * Extracts system columns and puts content fields in data
439
+ * Excludes null values from data to match input semantics
440
+ */
441
+ private mapRow;
442
+ private normalizeFilterScalar;
443
+ private normalizeFieldFilter;
444
+ private collectionExists;
445
+ private resolveFieldFilters;
446
+ private applyFieldFilters;
447
+ /**
448
+ * Map order field names to database columns.
449
+ * Only allows known fields to prevent column enumeration via crafted orderBy values.
450
+ */
451
+ private mapOrderField;
452
+ private resolveOrderField;
453
+ }
454
+ //#endregion
455
+ //#region src/media/focal-point.d.ts
456
+ interface FocalPointUpdate {
457
+ focalX?: number | null;
458
+ focalY?: number | null;
459
+ }
460
+ //#endregion
461
+ //#region src/database/repositories/media.d.ts
462
+ type MediaStatus = "pending" | "ready" | "failed";
463
+ interface MediaItem {
464
+ id: string;
465
+ filename: string;
466
+ mimeType: string;
467
+ size: number | null;
468
+ width: number | null;
469
+ height: number | null;
470
+ focalX: number | null;
471
+ focalY: number | null;
472
+ alt: string | null;
473
+ caption: string | null;
474
+ storageKey: string;
475
+ status: MediaStatus;
476
+ contentHash: string | null;
477
+ blurhash: string | null;
478
+ dominantColor: string | null;
479
+ createdAt: string;
480
+ authorId: string | null;
481
+ folderId?: string | null;
482
+ }
483
+ interface CreateMediaInput {
484
+ filename: string;
485
+ mimeType: string;
486
+ size?: number;
487
+ width?: number;
488
+ height?: number;
489
+ alt?: string;
490
+ caption?: string;
491
+ storageKey: string;
492
+ contentHash?: string;
493
+ blurhash?: string;
494
+ dominantColor?: string;
495
+ status?: MediaStatus;
496
+ authorId?: string;
497
+ folderId?: string | null;
498
+ }
499
+ interface FindManyMediaOptions {
500
+ limit?: number;
501
+ cursor?: string;
502
+ /** Filter by MIME type. Pass a string for a single prefix/exact, or an array to match any. Strings ending with "/" are treated as LIKE prefix matches; others are exact equality. */
503
+ mimeType?: string | readonly string[];
504
+ status?: MediaStatus | "all";
505
+ /** Case-insensitive substring matched against the filename (covers filename and extension). */
506
+ q?: string;
507
+ /** Omit for all media, pass null for the Main library, or pass a folder ID. */
508
+ folderId?: string | null;
509
+ }
510
+ interface UpdateMediaInput extends FocalPointUpdate {
511
+ alt?: string | null;
512
+ caption?: string | null;
513
+ width?: number;
514
+ height?: number;
515
+ folderId?: string | null;
516
+ }
517
+ interface ReplaceReadyMediaInput {
518
+ size: number;
519
+ width: number;
520
+ height: number;
521
+ contentHash: string;
522
+ }
523
+ interface FindMediaPageOptions extends Omit<FindManyMediaOptions, "cursor"> {
524
+ page: number;
525
+ }
526
+ interface MediaPageResult {
527
+ items: MediaItem[];
528
+ totalCount: number;
529
+ }
530
+ /**
531
+ * Media repository for database operations
532
+ */
533
+ declare class MediaRepository {
534
+ private db;
535
+ constructor(db: Kysely<Database>);
536
+ /**
537
+ * Create a new media item
538
+ */
539
+ create(input: CreateMediaInput): Promise<MediaItem>;
540
+ /**
541
+ * Create a pending media item (for signed URL upload flow)
542
+ */
543
+ createPending(input: {
544
+ filename: string;
545
+ mimeType: string;
546
+ size?: number;
547
+ storageKey: string;
548
+ contentHash?: string;
549
+ authorId?: string;
550
+ folderId?: string | null;
551
+ }): Promise<MediaItem>;
552
+ createUploadAttempt(mediaId: string, storageKey: string): Promise<void>;
553
+ /**
554
+ * Register a stored object for cleanup before its media row is removed,
555
+ * so a failed storage delete is retried by the cleanup sweep instead of
556
+ * leaving the object unreferenced and unreachable.
557
+ */
558
+ trackStorageKeyForCleanup(mediaId: string, storageKey: string): Promise<void>;
559
+ hasUploadAttempt(storageKey: string): Promise<boolean>;
560
+ claimUploadAttemptForCleanup(storageKey: string): Promise<boolean>;
561
+ deleteUploadAttempt(storageKey: string): Promise<void>;
562
+ deferUploadAttemptCleanup(storageKey: string): Promise<void>;
563
+ deleteCompletedUploadAttempts(): Promise<number>;
564
+ findUploadAttemptsForCleanup(maxAgeMs?: number, limit?: number): Promise<string[]>;
565
+ publishPendingStorageKey(id: string, expectedStorageKey: string, storageKey: string, contentHash?: string): Promise<boolean>;
566
+ /**
567
+ * Confirm upload (mark as ready)
568
+ */
569
+ confirmUpload(id: string, metadata?: {
570
+ width?: number;
571
+ height?: number;
572
+ size?: number;
573
+ blurhash?: string;
574
+ dominantColor?: string;
575
+ contentHash?: string | null;
576
+ }, expectedStorageKey?: string): Promise<MediaItem | null>;
577
+ /**
578
+ * Mark upload as failed
579
+ */
580
+ markFailed(id: string, expectedStorageKey?: string): Promise<MediaItem | null>;
581
+ /**
582
+ * Find the pending media row minted for a signed upload URL.
583
+ */
584
+ findPendingByStorageKey(storageKey: string): Promise<MediaItem | null>;
585
+ /**
586
+ * Find media by ID
587
+ */
588
+ findById(id: string): Promise<MediaItem | null>;
589
+ /**
590
+ * Find media by filename
591
+ * Useful for idempotent imports
592
+ */
593
+ findByFilename(filename: string): Promise<MediaItem | null>;
594
+ findAvailableFilename(filename: string): Promise<string>;
595
+ /**
596
+ * Find media by content hash
597
+ * Used for deduplication - same content = same hash
598
+ */
599
+ findByContentHash(contentHash: string): Promise<MediaItem | null>;
600
+ /**
601
+ * Find many media items with cursor pagination
602
+ *
603
+ * Uses keyset pagination (cursor-based) for consistent results.
604
+ * The cursor encodes the created_at and id of the last item.
605
+ */
606
+ findMany(options?: FindManyMediaOptions): Promise<FindManyResult<MediaItem>>;
607
+ findPage(options: FindMediaPageOptions): Promise<MediaPageResult>;
608
+ /**
609
+ * Update media metadata
610
+ */
611
+ update(id: string, input: UpdateMediaInput): Promise<MediaItem | null>;
612
+ updateReadyMetadata(id: string, input: Pick<UpdateMediaInput, "alt" | "caption" | "focalX" | "focalY">): Promise<MediaItem | null>;
613
+ replaceReadyFile(id: string, expectedStorageKey: string, input: ReplaceReadyMediaInput): Promise<MediaItem | null>;
614
+ /**
615
+ * Delete media item
616
+ */
617
+ deleteWithStorageKey(id: string): Promise<string | null>;
618
+ isStorageKeyReferenced(storageKey: string): Promise<boolean>;
619
+ delete(id: string): Promise<boolean>;
620
+ /**
621
+ * Count media items
622
+ */
623
+ count(mimeType?: string | readonly string[]): Promise<number>;
624
+ private applyListFilters;
625
+ /**
626
+ * Delete pending uploads older than the given age.
627
+ * Pending uploads that were never confirmed indicate abandoned upload flows.
628
+ *
629
+ * Returns the storage keys of deleted rows so callers can remove the
630
+ * corresponding files from object storage.
631
+ */
632
+ cleanupPendingUploads(maxAgeMs?: number): Promise<string[]>;
633
+ /**
634
+ * Convert database row to MediaItem
635
+ */
636
+ private rowToItem;
637
+ }
638
+ //#endregion
639
+ //#region src/database/repositories/plugin-storage.d.ts
640
+ declare class PluginStorageRepository<T = unknown> implements StorageCollection<T> {
641
+ private db;
642
+ private pluginId;
643
+ private collection;
644
+ private indexedFields;
645
+ constructor(db: Kysely<Database>, pluginId: string, collection: string, indexes: Array<string | string[]>);
646
+ /**
647
+ * Get a document by ID
648
+ */
649
+ get(id: string): Promise<T | null>;
650
+ /**
651
+ * Store a document
652
+ */
653
+ put(id: string, data: T): Promise<void>;
654
+ getVersioned(id: string): Promise<VersionedValue<T> | null>;
655
+ compareAndSet(id: string, expectedRevision: string | null, data: T): Promise<ConditionalWriteResult>;
656
+ compareAndDelete(id: string, expectedRevision: string): Promise<ConditionalDeleteResult>;
657
+ /**
658
+ * Delete a document
659
+ */
660
+ delete(id: string): Promise<boolean>;
661
+ /**
662
+ * Check if a document exists
663
+ */
664
+ exists(id: string): Promise<boolean>;
665
+ /**
666
+ * Get multiple documents by ID
667
+ */
668
+ getMany(ids: string[]): Promise<Map<string, T>>;
669
+ /**
670
+ * Store multiple documents
671
+ */
672
+ putMany(items: Array<{
673
+ id: string;
674
+ data: T;
675
+ }>): Promise<void>;
676
+ /**
677
+ * Delete multiple documents
678
+ */
679
+ deleteMany(ids: string[]): Promise<number>;
680
+ /**
681
+ * Query documents with filters
682
+ */
683
+ query(options?: QueryOptions): Promise<PaginatedResult<{
684
+ id: string;
685
+ data: T;
686
+ }>>;
687
+ /**
688
+ * Count documents matching a filter
689
+ */
690
+ count(where?: WhereClause): Promise<number>;
691
+ updateIf(id: string, args: unknown): Promise<UpdateIfResult<T>>;
692
+ }
693
+ //#endregion
694
+ //#region src/plugins/hooks.d.ts
695
+ type HookNameV2 = "plugin:install" | "plugin:activate" | "plugin:deactivate" | "plugin:uninstall" | "content:beforeSave" | "content:afterSave" | "content:beforeDelete" | "content:afterDelete" | "content:beforePublish" | "content:beforeSchedule" | "content:beforeUnpublish" | "content:afterPublish" | "content:afterUnpublish" | "content:afterRestore" | "content:afterSchedule" | "content:afterUnschedule" | "media:beforeUpload" | "media:afterUpload" | "cron" | "email:beforeSend" | "email:deliver" | "email:afterSend" | "comment:beforeCreate" | "comment:moderate" | "comment:afterCreate" | "comment:afterModerate" | "byline:afterSave" | "byline:afterDelete" | "page:metadata" | "page:fragments";
696
+ type ContentPolicyHookName = "content:beforePublish" | "content:beforeSchedule" | "content:beforeUnpublish";
697
+ type ContentPolicyRunResult = {
698
+ cancellation?: {
699
+ pluginId: string;
700
+ reason: string;
701
+ };
702
+ results: HookResult<void>[];
703
+ };
704
+ /**
705
+ * Hook execution result
706
+ */
707
+ interface HookResult<T> {
708
+ success: boolean;
709
+ value?: T;
710
+ error?: Error;
711
+ pluginId: string;
712
+ duration: number;
713
+ }
714
+ /**
715
+ * Hook pipeline for executing hooks in order
716
+ */
717
+ declare class HookPipeline {
718
+ private hooks;
719
+ private pluginMap;
720
+ private contextFactory;
721
+ /** Stored so setContextFactory can merge incrementally. */
722
+ private contextFactoryOptions;
723
+ /** Hook names where at least one handler declared exclusive: true */
724
+ private exclusiveHookNames;
725
+ /**
726
+ * Selected provider plugin ID for each exclusive hook.
727
+ * Set by the PluginManager after resolution.
728
+ */
729
+ private exclusiveSelections;
730
+ constructor(plugins: ResolvedPlugin[], factoryOptions?: PluginContextFactoryOptions);
731
+ /**
732
+ * Set or update the context factory options.
733
+ *
734
+ * When called on a pipeline that already has a factory, the new options
735
+ * are merged on top of the existing ones so that callers don't need to
736
+ * repeat every field (e.g. adding `cronReschedule` without losing
737
+ * `storage` / `getUploadUrl`).
738
+ */
739
+ setContextFactory(options: Partial<PluginContextFactoryOptions>): void;
740
+ /**
741
+ * Get context for a plugin
742
+ */
743
+ private getContext;
744
+ /**
745
+ * Get typed hooks for a specific hook name.
746
+ * The internal map stores ResolvedHook<unknown>, but we know each name
747
+ * maps to a specific handler type via HookHandlerMap.
748
+ *
749
+ * Exclusive hooks that have a selected provider are filtered out — they
750
+ * should only run via invokeExclusiveHook(), not in the regular pipeline.
751
+ */
752
+ private getTypedHooks;
753
+ /**
754
+ * Register all hooks from plugins.
755
+ *
756
+ * Registers each hook name individually to preserve type safety. The
757
+ * internal map stores ResolvedHook<unknown> since it's keyed by string,
758
+ * but getTypedHooks() restores the correct handler type on retrieval.
759
+ */
760
+ private registerPlugins;
761
+ /**
762
+ * Maps hook names to the capability required to register them.
763
+ *
764
+ * Hooks not listed here have no capability requirement (e.g. lifecycle
765
+ * hooks, cron). Any plugin declaring a listed hook without the required
766
+ * capability will have that hook silently skipped at registration time.
767
+ */
768
+ private static readonly HOOK_REQUIRED_CAPABILITY;
769
+ /**
770
+ * Register a single plugin's hook by name
771
+ */
772
+ private registerPluginHook;
773
+ /**
774
+ * Register a single hook
775
+ */
776
+ private registerHook;
777
+ /**
778
+ * Sort hooks by priority and dependencies
779
+ */
780
+ private sortHooks;
781
+ /**
782
+ * Execute a hook with timeout
783
+ */
784
+ private executeWithTimeout;
785
+ /**
786
+ * Run plugin:install hooks
787
+ */
788
+ runPluginInstall(pluginId: string): Promise<HookResult<void>[]>;
789
+ /**
790
+ * Run plugin:activate hooks
791
+ */
792
+ runPluginActivate(pluginId: string): Promise<HookResult<void>[]>;
793
+ /**
794
+ * Run plugin:deactivate hooks
795
+ */
796
+ runPluginDeactivate(pluginId: string): Promise<HookResult<void>[]>;
797
+ /**
798
+ * Run plugin:uninstall hooks
799
+ */
800
+ runPluginUninstall(pluginId: string, deleteData: boolean): Promise<HookResult<void>[]>;
801
+ private runLifecycleHook;
802
+ /**
803
+ * Run content:beforeSave hooks
804
+ * Returns modified content from the pipeline. `id` is the existing item's
805
+ * ID when updating. `actor` is the authenticated user that triggered the
806
+ * save, when one is available.
807
+ */
808
+ runContentBeforeSave(content: Record<string, unknown>, collection: string, isNew: boolean, id?: string, actor?: ActorInfo, details?: ContentSaveHookDetails): Promise<{
809
+ content: Record<string, unknown>;
810
+ results: HookResult<Record<string, unknown>>[];
811
+ }>;
812
+ /**
813
+ * Run content:afterSave hooks
814
+ */
815
+ runContentAfterSave(content: Record<string, unknown>, collection: string, isNew: boolean, actor?: ActorInfo, excludePluginId?: string, details?: ContentSaveHookDetails): Promise<HookResult<void>[]>;
816
+ /**
817
+ * Run content:beforeDelete hooks
818
+ * Returns whether deletion is allowed
819
+ */
820
+ runContentBeforeDelete(id: string, collection: string): Promise<{
821
+ allowed: boolean;
822
+ results: HookResult<boolean>[];
823
+ }>;
824
+ /**
825
+ * Run content:afterDelete hooks
826
+ */
827
+ runContentAfterDelete(id: string, collection: string, permanent: boolean): Promise<HookResult<void>[]>;
828
+ runContentPolicy(name: "content:beforePublish", event: ContentPolicyEvent): Promise<ContentPolicyRunResult>;
829
+ runContentPolicy(name: "content:beforeSchedule", event: ContentSchedulePolicyEvent): Promise<ContentPolicyRunResult>;
830
+ runContentPolicy(name: "content:beforeUnpublish", event: ContentPolicyEvent): Promise<ContentPolicyRunResult>;
831
+ runContentPolicy(name: ContentPolicyHookName, event: ContentPolicyEvent | ContentSchedulePolicyEvent): Promise<ContentPolicyRunResult>;
832
+ private runContentPolicyHooks;
833
+ /**
834
+ * Run content state-change hooks that all share the same event shape.
835
+ */
836
+ private runContentStateChangeHook;
837
+ /**
838
+ * Run content:afterPublish hooks (fire-and-forget).
839
+ */
840
+ runContentAfterPublish(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
841
+ /**
842
+ * Run content:afterUnpublish hooks (fire-and-forget).
843
+ */
844
+ runContentAfterUnpublish(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
845
+ /**
846
+ * Run content:afterRestore hooks (fire-and-forget).
847
+ */
848
+ runContentAfterRestore(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
849
+ /**
850
+ * Run content:afterSchedule hooks (fire-and-forget).
851
+ */
852
+ runContentAfterSchedule(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
853
+ /**
854
+ * Run content:afterUnschedule hooks (fire-and-forget).
855
+ */
856
+ runContentAfterUnschedule(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
857
+ /**
858
+ * Run media:beforeUpload hooks
859
+ */
860
+ runMediaBeforeUpload(file: {
861
+ name: string;
862
+ type: string;
863
+ size: number;
864
+ }): Promise<{
865
+ file: {
866
+ name: string;
867
+ type: string;
868
+ size: number;
869
+ };
870
+ results: HookResult<{
871
+ name: string;
872
+ type: string;
873
+ size: number;
874
+ }>[];
875
+ }>;
876
+ /**
877
+ * Run media:afterUpload hooks
878
+ */
879
+ runMediaAfterUpload(media: {
880
+ id: string;
881
+ filename: string;
882
+ mimeType: string;
883
+ size: number | null;
884
+ url: string;
885
+ createdAt: string;
886
+ }): Promise<HookResult<void>[]>;
887
+ /**
888
+ * Invoke the cron hook for a specific plugin.
889
+ *
890
+ * Unlike other hooks which broadcast to all plugins, the cron hook is
891
+ * dispatched only to the target plugin — the one that owns the task.
892
+ */
893
+ invokeCronHook(pluginId: string, event: CronEvent): Promise<HookResult<void>>;
894
+ /**
895
+ * Run email:beforeSend hooks (middleware pipeline).
896
+ *
897
+ * Each handler receives the message and returns a modified message or
898
+ * `false` to cancel delivery. The pipeline chains message transformations —
899
+ * each handler receives the output of the previous one.
900
+ */
901
+ runEmailBeforeSend(message: EmailMessage, source: string): Promise<{
902
+ message: EmailMessage | false;
903
+ results: HookResult<EmailMessage | false>[];
904
+ }>;
905
+ /**
906
+ * Run email:afterSend hooks (fire-and-forget).
907
+ *
908
+ * Errors are logged but don't propagate — they don't affect the caller.
909
+ */
910
+ runEmailAfterSend(message: EmailMessage, source: string): Promise<HookResult<void>[]>;
911
+ /**
912
+ * Run comment:beforeCreate hooks (middleware pipeline).
913
+ *
914
+ * Each handler receives the event and returns a modified event or
915
+ * `false` to reject the comment. The pipeline chains transformations —
916
+ * each handler receives the output of the previous one.
917
+ */
918
+ runCommentBeforeCreate(event: CommentBeforeCreateEvent): Promise<CommentBeforeCreateEvent | false>;
919
+ /**
920
+ * Run comment:afterCreate hooks (fire-and-forget).
921
+ *
922
+ * Errors are logged but don't propagate — they don't affect the caller.
923
+ */
924
+ runCommentAfterCreate(event: CommentAfterCreateEvent): Promise<void>;
925
+ /**
926
+ * Run comment:afterModerate hooks (fire-and-forget).
927
+ *
928
+ * Errors are logged but don't propagate — they don't affect the caller.
929
+ */
930
+ runCommentAfterModerate(event: CommentAfterModerateEvent): Promise<void>;
931
+ /** Run byline:afterSave hooks. Errors are logged and never propagate. */
932
+ runBylineAfterSave(byline: BylineSummary, isNew: boolean): Promise<void>;
933
+ /** Run byline:afterDelete hooks. Errors are logged and never propagate. */
934
+ runBylineAfterDelete(byline: BylineSummary): Promise<void>;
935
+ private runLoggedHook;
936
+ /**
937
+ * Run page:metadata hooks. Each handler returns contributions that are
938
+ * merged by the metadata collector. Errors are logged but don't propagate.
939
+ */
940
+ runPageMetadata(event: PageMetadataEvent): Promise<Array<{
941
+ pluginId: string;
942
+ contributions: PageMetadataContribution[];
943
+ }>>;
944
+ /**
945
+ * Run page:fragments hooks. Only trusted plugins should be registered
946
+ * for this hook. Errors are logged but don't propagate.
947
+ */
948
+ runPageFragments(event: PageFragmentEvent): Promise<Array<{
949
+ pluginId: string;
950
+ contributions: PageFragmentContribution[];
951
+ }>>;
952
+ /**
953
+ * Check if any hooks are registered for a given name
954
+ */
955
+ hasHooks(name: HookNameV2): boolean;
956
+ /**
957
+ * Get hook count for debugging
958
+ */
959
+ getHookCount(name: HookNameV2): number;
960
+ /**
961
+ * Get all registered hook names
962
+ */
963
+ getRegisteredHooks(): HookNameV2[];
964
+ /**
965
+ * Returns hook names where at least one handler declared exclusive: true
966
+ */
967
+ getRegisteredExclusiveHooks(): string[];
968
+ /**
969
+ * Check if a hook is exclusive
970
+ */
971
+ isExclusiveHook(name: string): boolean;
972
+ /**
973
+ * Set the selected provider for an exclusive hook.
974
+ * Called by PluginManager after resolution.
975
+ */
976
+ setExclusiveSelection(hookName: string, pluginId: string): void;
977
+ /**
978
+ * Clear the selected provider for an exclusive hook.
979
+ */
980
+ clearExclusiveSelection(hookName: string): void;
981
+ /**
982
+ * Get the selected provider for an exclusive hook (if any).
983
+ */
984
+ getExclusiveSelection(hookName: string): string | undefined;
985
+ /**
986
+ * Get all plugins that registered a handler for a given exclusive hook.
987
+ */
988
+ getExclusiveHookProviders(hookName: string): Array<{
989
+ pluginId: string;
990
+ }>;
991
+ /**
992
+ * Get all plugins that registered a non-exclusive handler for a given
993
+ * hook (e.g. `email:beforeSend`, `email:afterSend`), preserving priority
994
+ * order. Partitions with `getExclusiveHookProviders()`, which returns
995
+ * plugins whose registration is marked `exclusive: true`.
996
+ */
997
+ getHookProviders(hookName: string): Array<{
998
+ pluginId: string;
999
+ }>;
1000
+ /**
1001
+ * Invoke an exclusive hook — dispatch only to the selected provider.
1002
+ * Returns null if no provider is selected or if the selected hook
1003
+ * is not found in the pipeline.
1004
+ *
1005
+ * This is a generic dispatch used by the email pipeline and other
1006
+ * exclusive hook consumers. The handler type is unknown — callers
1007
+ * must know the expected signature.
1008
+ *
1009
+ * Errors are isolated: a failing handler returns an error result
1010
+ * instead of propagating the exception to the caller.
1011
+ */
1012
+ invokeExclusiveHook(hookName: string, event: unknown): Promise<{
1013
+ result: unknown;
1014
+ pluginId: string;
1015
+ error?: Error;
1016
+ duration: number;
1017
+ } | null>;
1018
+ }
1019
+ /**
1020
+ * Create a hook pipeline from plugins
1021
+ */
1022
+ declare function createHookPipeline(plugins: ResolvedPlugin[], factoryOptions?: PluginContextFactoryOptions): HookPipeline;
1023
+ //#endregion
1024
+ //#region src/plugins/email.d.ts
1025
+ /**
1026
+ * EmailPipeline orchestrates email delivery through the plugin hook system.
1027
+ *
1028
+ * The pipeline runs in three stages:
1029
+ * 1. email:beforeSend — middleware hooks that can transform or cancel messages
1030
+ * 2. email:deliver — exclusive hook dispatching to the selected provider
1031
+ * 3. email:afterSend — fire-and-forget hooks for logging/analytics
1032
+ */
1033
+ declare class EmailPipeline {
1034
+ private pipeline;
1035
+ constructor(pipeline: HookPipeline);
1036
+ /**
1037
+ * Replace the underlying hook pipeline.
1038
+ *
1039
+ * Called by the runtime when rebuilding the hook pipeline after a
1040
+ * plugin is enabled or disabled, so the email pipeline dispatches
1041
+ * to the current set of active hooks.
1042
+ */
1043
+ setPipeline(pipeline: HookPipeline): void;
1044
+ /**
1045
+ * Send an email through the full pipeline.
1046
+ *
1047
+ * @param message - The email to send
1048
+ * @param source - Where the email originated ("system" for auth, plugin ID for plugins)
1049
+ * @throws EmailNotConfiguredError if no provider is selected
1050
+ * @throws EmailRecursionError if called re-entrantly from within a hook
1051
+ * @throws Error if the provider handler throws
1052
+ */
1053
+ send(message: EmailMessage, source: string): Promise<void>;
1054
+ /**
1055
+ * Inner send implementation, separated from the recursion guard.
1056
+ */
1057
+ private sendInner;
1058
+ /**
1059
+ * Check if an email provider is configured and available.
1060
+ *
1061
+ * Returns true if an email:deliver provider is selected in the exclusive
1062
+ * hook system. Plugins and auth code use this to decide whether to show
1063
+ * "send invite" vs "copy invite link" UI.
1064
+ */
1065
+ isAvailable(): boolean;
1066
+ }
1067
+ //#endregion
1068
+ //#region src/plugins/settings.d.ts
1069
+ interface EncryptedPluginSetting {
1070
+ $emdash: "plugin-setting";
1071
+ v: 1;
1072
+ kid: string;
1073
+ iv: string;
1074
+ ciphertext: string;
1075
+ }
1076
+ declare class PluginSettingEncryptionError extends Error {
1077
+ readonly name = "PluginSettingEncryptionError";
1078
+ readonly code: "PLUGIN_SETTING_ENCRYPTION_KEY_MISSING" | "PLUGIN_SETTING_ENCRYPTION_KEY_UNKNOWN" | "PLUGIN_SETTING_ENCRYPTION_FAILED" | "PLUGIN_SETTING_DECRYPTION_FAILED";
1079
+ constructor(code: PluginSettingEncryptionError["code"], message: string);
1080
+ }
1081
+ declare function isEncryptedPluginSetting(value: unknown): value is EncryptedPluginSetting;
1082
+ declare function encryptPluginSetting(pluginId: string, key: string, value: string, keys?: ParsedEncryptionKey[] | null): Promise<EncryptedPluginSetting>;
1083
+ declare function decodePluginSettingValue<T = unknown>(pluginId: string, key: string, value: unknown, schema: Record<string, SettingField>, keys?: ParsedEncryptionKey[] | null, onSecret?: (key: string, value: string) => void): Promise<T>;
1084
+ declare function createSettingsAccess(optionsRepo: OptionsRepository, pluginId: string, schema?: Record<string, SettingField>, keys?: ParsedEncryptionKey[] | null, onSecret?: (key: string, value: string) => void): SettingsAccess;
1085
+ //#endregion
1086
+ //#region src/plugins/content-access.d.ts
1087
+ declare function createContentAccess(db: Kysely<Database>, accessOptions?: {
1088
+ site?: SiteInfo;
1089
+ revisions?: boolean;
1090
+ }): ContentAccess;
1091
+ //#endregion
1092
+ //#region src/plugins/context.d.ts
1093
+ declare function createSchemaAccess(db: Kysely<Database>): SchemaAccess;
1094
+ declare function createCommentAccess(db: Kysely<Database>, moderate?: (id: string, status: PluginCommentStatus, expectedStatus: PluginCommentStatus) => Promise<PluginComment>): CommentAccess;
1095
+ declare class RedirectAccessError extends Error {
1096
+ readonly code: string;
1097
+ readonly name = "RedirectAccessError";
1098
+ constructor(code: string, message: string);
1099
+ }
1100
+ declare function createRedirectAccess(db: Kysely<Database>): RedirectAccess;
1101
+ declare function createRedirectAccess(db: Kysely<Database>, writable: true): RedirectAccessWithWrite;
1102
+ /**
1103
+ * Called immediately before a plugin content write; it throws to refuse the
1104
+ * write. When it returns a function, that function is called once the write
1105
+ * has succeeded.
1106
+ */
1107
+ type ContentWriteGuard = () => Promise<void | (() => Promise<void>)>;
1108
+ /**
1109
+ * Create full content access with write operations.
1110
+ *
1111
+ * `create` and `update` accept a reserved `seo` key in their `data`
1112
+ * argument. When present, it is routed to the core SEO panel
1113
+ * (`_emdash_seo`) via `SeoRepository.upsert`, in the same transaction as
1114
+ * the content write. The returned `ContentItem.seo` reflects the resulting
1115
+ * SEO state for SEO-enabled collections.
1116
+ */
1117
+ declare function createContentAccessWithWrite(db: Kysely<Database>, beforeContentWrite?: ContentWriteGuard, accessOptions?: {
1118
+ site?: SiteInfo;
1119
+ revisions?: boolean;
1120
+ }, contentCreate?: (data: {
1121
+ collection: string;
1122
+ input: ContentWriteInput;
1123
+ options?: ContentCreateOptions;
1124
+ }) => Promise<ContentItem$1>): ContentAccessWithWrite;
1125
+ /**
1126
+ * Create read-only media access
1127
+ */
1128
+ declare function createMediaAccess(db: Kysely<Database>): MediaAccess;
1129
+ /**
1130
+ * Create HTTP access with host validation and SSRF protection.
1131
+ *
1132
+ * Uses redirect: "manual" to re-validate each redirect target before dispatch.
1133
+ */
1134
+ declare function createHttpAccess(pluginId: string, allowedHosts: string[], fetchImpl?: typeof fetch): HttpAccess;
1135
+ /**
1136
+ * Create unrestricted HTTP access (for plugins with network:request:unrestricted capability).
1137
+ * No host validation, but applies SSRF protection on redirect targets to
1138
+ * prevent plugins from being tricked into reaching internal services.
1139
+ */
1140
+ declare function createUnrestrictedHttpAccess(pluginId: string, fetchImpl?: typeof fetch): HttpAccess;
1141
+ /**
1142
+ * Options for creating site info
1143
+ */
1144
+ interface SiteInfoOptions {
1145
+ /** Site name from options table */
1146
+ siteName?: string;
1147
+ /** Site URL, resolved by the runtime in the same order as links in emails */
1148
+ siteUrl?: string;
1149
+ /** Site locale from options table */
1150
+ locale?: string;
1151
+ /** Astro's `trailingSlash` config (from `virtual:emdash/config`). */
1152
+ trailingSlash?: "always" | "never" | "ignore";
1153
+ }
1154
+ interface PluginContextFactoryOptions {
1155
+ db: Kysely<Database>;
1156
+ beforeContentWrite?: ContentWriteGuard;
1157
+ contentCreate?: PluginContentCreateCallback;
1158
+ contentActions?: ContentActionCallbacks;
1159
+ /**
1160
+ * Resolver for the database connection, preferred over `db` when present.
1161
+ * Called per `createContext()` so connection-backed adapters (e.g. Postgres
1162
+ * over Hyperdrive) get the current request/event-scoped connection from ALS
1163
+ * rather than a snapshot of the per-isolate singleton — reusing the
1164
+ * singleton's socket from a later event trips workerd's cross-request I/O
1165
+ * guard. When omitted, `db` is used directly (correct for stateless
1166
+ * adapters like D1 and Node SQLite). `db` remains required as the fallback.
1167
+ */
1168
+ getDb?: () => Kysely<Database>;
1169
+ /**
1170
+ * Storage backend for direct media uploads.
1171
+ * If not provided, upload() will throw.
1172
+ */
1173
+ storage?: Storage;
1174
+ /**
1175
+ * Explicit provider for `ctx.media.getUploadUrl()`. Optional: when omitted
1176
+ * but `storage` is configured, the factory derives a working `getUploadUrl()`
1177
+ * (and `upload()`) from storage. Only when neither `getUploadUrl` nor
1178
+ * `storage` is present do media write operations become unavailable.
1179
+ */
1180
+ getUploadUrl?: (filename: string, contentType: string) => Promise<{
1181
+ uploadUrl: string;
1182
+ mediaId: string;
1183
+ }>;
1184
+ /**
1185
+ * Site information for ctx.site and ctx.url().
1186
+ * If not provided, site info will have empty defaults.
1187
+ */
1188
+ siteInfo?: SiteInfoOptions;
1189
+ /**
1190
+ * Callback to notify the cron scheduler that the next due time may have changed.
1191
+ * If not provided, ctx.cron will not be available.
1192
+ */
1193
+ cronReschedule?: () => void;
1194
+ /** Clock used to calculate the first run of recurring plugin tasks. */
1195
+ now?: () => Date;
1196
+ /**
1197
+ * Email pipeline instance for ctx.email.
1198
+ * If not provided (or no provider configured), ctx.email will be undefined.
1199
+ */
1200
+ emailPipeline?: EmailPipeline;
1201
+ /**
1202
+ * Pre-resolved list of trusted proxy header names (from the runtime
1203
+ * `EmDashConfig.trustedProxyHeaders` or the env var). Plugin route
1204
+ * handlers pass this to `extractRequestMeta` so plugins see the same
1205
+ * client IP the core auth path does.
1206
+ */
1207
+ trustedProxyHeaders?: string[];
1208
+ commentModerate?: (pluginId: string, id: string, status: PluginCommentStatus, expectedStatus: PluginCommentStatus) => Promise<PluginComment>;
1209
+ }
1210
+ interface ContentActionCallbacks {
1211
+ /** Register a sandbox invocation before it can call a content action. */
1212
+ begin?(pluginId: string, invocationId: string, invalidateContentCache?: (tags: string[]) => Promise<void>): void;
1213
+ /** Release queued after-hooks; `final: false` keeps late actions self-scheduling after timeout. */
1214
+ flush(pluginId: string, invocationId?: string, final?: boolean): Promise<void>;
1215
+ getVersioned(pluginId: string, collection: string, id: string): Promise<VersionedContentItem | null>;
1216
+ publish(pluginId: string, collection: string, id: string, options: {
1217
+ _rev: string;
1218
+ }, invocationId?: string, invalidateContentCache?: (tags: string[]) => Promise<void>): Promise<VersionedContentItem>;
1219
+ unpublish(pluginId: string, collection: string, id: string, options: {
1220
+ _rev: string;
1221
+ }, invocationId?: string, invalidateContentCache?: (tags: string[]) => Promise<void>): Promise<VersionedContentItem>;
1222
+ schedule(pluginId: string, collection: string, id: string, options: {
1223
+ scheduledAt: string;
1224
+ _rev: string;
1225
+ }, invocationId?: string, invalidateContentCache?: (tags: string[]) => Promise<void>): Promise<VersionedContentItem>;
1226
+ unschedule(pluginId: string, collection: string, id: string, options: {
1227
+ _rev: string;
1228
+ }, invocationId?: string, invalidateContentCache?: (tags: string[]) => Promise<void>): Promise<VersionedContentItem>;
1229
+ getTrashedVersioned(pluginId: string, collection: string, id: string): Promise<VersionedContentItem | null>;
1230
+ restore(pluginId: string, collection: string, id: string, options: {
1231
+ _rev: string;
1232
+ }, invocationId?: string, invalidateContentCache?: (tags: string[]) => Promise<void>): Promise<VersionedContentItem>;
1233
+ }
1234
+ //#endregion
1235
+ //#region src/plugins/sandbox/types.d.ts
1236
+ /**
1237
+ * Resource limits for sandboxed plugins.
1238
+ * Enforced by the sandbox runtime (e.g., Worker Loader).
1239
+ */
1240
+ interface ResourceLimits {
1241
+ /** CPU time per invocation in milliseconds (default: 50ms) */
1242
+ cpuMs?: number;
1243
+ /** Memory limit in MB (default: 128MB) */
1244
+ memoryMb?: number;
1245
+ /** Maximum subrequests per invocation (default: 10) */
1246
+ subrequests?: number;
1247
+ /** Wall-clock time limit in milliseconds (default: 30000ms) */
1248
+ wallTimeMs?: number;
1249
+ }
1250
+ /**
1251
+ * Storage interface for loading plugin code.
1252
+ * Could be R2, local filesystem, or any other storage backend.
1253
+ */
1254
+ interface PluginCodeStorage {
1255
+ /** Get plugin bundle code by path */
1256
+ get(path: string): Promise<string | null>;
1257
+ /** Check if a bundle exists */
1258
+ exists(path: string): Promise<boolean>;
1259
+ }
1260
+ /**
1261
+ * Serialized email message for sandbox RPC transport.
1262
+ * Matches the core EmailMessage type but uses only serializable fields.
1263
+ */
1264
+ interface SandboxEmailMessage {
1265
+ to: string;
1266
+ cc?: string[];
1267
+ replyTo?: string;
1268
+ subject: string;
1269
+ text: string;
1270
+ html?: string;
1271
+ }
1272
+ /**
1273
+ * Callback for sending email from a sandboxed plugin.
1274
+ * The sandbox runner wires this up from the EmailPipeline.
1275
+ *
1276
+ * @param message - The email message to send
1277
+ * @param pluginId - The sending plugin's ID (used as source)
1278
+ */
1279
+ type SandboxEmailSendCallback = (message: SandboxEmailMessage, pluginId: string) => Promise<void>;
1280
+ type SandboxCommentModerateCallback = (pluginId: string, id: string, status: PluginCommentStatus, expectedStatus: PluginCommentStatus) => Promise<PluginComment>;
1281
+ type SandboxContentCreateCallback = (pluginId: string, collection: string, data: ContentWriteInput, options?: ContentCreateOptions & {
1282
+ originHook?: "content:beforeSave" | "content:afterSave";
1283
+ sandboxOrigin?: true;
1284
+ }) => Promise<ContentItem$1>;
1285
+ type SandboxHttpFetchCallback = typeof fetch;
1286
+ /**
1287
+ * Options for creating a sandbox runner
1288
+ */
1289
+ interface SandboxOptions {
1290
+ /** Storage interface for loading plugin code */
1291
+ storage?: PluginCodeStorage;
1292
+ /** Database for bridge operations */
1293
+ db: Kysely<Database>;
1294
+ /**
1295
+ * Called immediately before a sandboxed plugin content mutation; it throws
1296
+ * to refuse the write. When it returns a function, the bridge calls that
1297
+ * function once the write has succeeded.
1298
+ */
1299
+ beforeContentWrite?: () => Promise<void | (() => Promise<void>)>;
1300
+ /** Runtime-owned taxonomy mutation surface used by sandbox bridges. */
1301
+ taxonomyWrite?: TaxonomyAccessWithWrite;
1302
+ contentActions?: ContentActionCallbacks;
1303
+ /** Clock used to calculate recurring plugin task schedules. */
1304
+ now?: () => Date;
1305
+ /** Default resource limits */
1306
+ limits?: ResourceLimits;
1307
+ /** Site info for plugin context (injected into wrapper at generation time) */
1308
+ siteInfo?: {
1309
+ name: string;
1310
+ url: string;
1311
+ locale: string;
1312
+ trailingSlash?: "always" | "never" | "ignore";
1313
+ };
1314
+ /** Email send callback, wired from the EmailPipeline by the runtime */
1315
+ emailSend?: SandboxEmailSendCallback;
1316
+ commentModerate?: SandboxCommentModerateCallback;
1317
+ /** Optional host HTTP transport used by test hosts and custom runtimes. */
1318
+ httpFetch?: SandboxHttpFetchCallback;
1319
+ /**
1320
+ * Media storage adapter for sandboxed plugin byte reads, uploads, and deletes.
1321
+ * Each operation remains gated by its own media capability.
1322
+ */
1323
+ mediaStorage?: {
1324
+ upload(options: {
1325
+ key: string;
1326
+ body: Uint8Array;
1327
+ contentType: string;
1328
+ }): Promise<unknown>;
1329
+ download(key: string): Promise<{
1330
+ body: ReadableStream<Uint8Array>;
1331
+ contentType: string;
1332
+ size: number;
1333
+ }>;
1334
+ delete(key: string): Promise<unknown>;
1335
+ };
1336
+ /** Worker Loader name suffix. The plugin's logical ID remains unchanged. */
1337
+ isolateKey?: string;
1338
+ }
1339
+ /**
1340
+ * Handle to a sandboxed plugin running inside an isolate. Returned
1341
+ * by `SandboxRunner.load` and held by the runtime's cache so hooks /
1342
+ * routes can be invoked across the isolate boundary. Distinct from
1343
+ * the author-facing `SandboxedPlugin` type in `emdash/plugin`, which
1344
+ * describes the source-level shape of a plugin's default export.
1345
+ */
1346
+ interface SandboxedPluginInstance {
1347
+ /** Unique identifier: `${manifest.id}:${manifest.version}` */
1348
+ readonly id: string;
1349
+ /**
1350
+ * Invoke a hook in the sandboxed plugin.
1351
+ *
1352
+ * @param hookName - Name of the hook (e.g., "content:beforeSave")
1353
+ * @param event - Event data to pass to the hook
1354
+ * @returns Hook result (transformed content, void, etc.)
1355
+ */
1356
+ invokeHook(hookName: string, event: unknown): Promise<unknown>;
1357
+ /**
1358
+ * Invoke an API route in the sandboxed plugin.
1359
+ *
1360
+ * @param routeName - Name of the route
1361
+ * @param input - Validated input data
1362
+ * @param request - Serialized request info for context
1363
+ * @returns Route response data
1364
+ */
1365
+ invokeRoute(routeName: string, input: unknown, request: SerializedRequest, options?: SandboxInvocationOptions): Promise<unknown>;
1366
+ /**
1367
+ * Change whether the plugin may access host services.
1368
+ * Deactivation revokes credentials synchronously; reactivation issues fresh credentials.
1369
+ */
1370
+ setActive?(active: boolean): void;
1371
+ /**
1372
+ * Terminate the sandboxed plugin.
1373
+ * Releases resources and prevents further invocations.
1374
+ */
1375
+ terminate(): Promise<void>;
1376
+ }
1377
+ interface SandboxInvocationOptions {
1378
+ invalidateContentCache?: (tags: string[]) => Promise<void>;
1379
+ }
1380
+ /**
1381
+ * Serialized request for RPC transport.
1382
+ * Worker Loader can't pass Request objects directly.
1383
+ */
1384
+ interface SerializedRequest {
1385
+ url: string;
1386
+ method: string;
1387
+ headers: Record<string, string>;
1388
+ /** Normalized request metadata extracted before RPC serialization */
1389
+ meta: RequestMeta;
1390
+ /** Host-attested context for a validated Block Kit request. */
1391
+ ui?: PluginUiContext;
1392
+ /**
1393
+ * Authenticated caller for private routes, resolved by the host before
1394
+ * dispatch. Undefined for public routes and unbound machine tokens.
1395
+ */
1396
+ user?: UserInfo;
1397
+ }
1398
+ declare const SANDBOX_ROUTE_ERROR_DEFINITIONS: {
1399
+ readonly MEDIA_USAGE_ACTIVATION_IN_PROGRESS: {
1400
+ readonly message: "Media usage activation is in progress";
1401
+ readonly status: 503;
1402
+ };
1403
+ readonly MEDIA_USAGE_ACTIVATION_CHECK_FAILED: {
1404
+ readonly message: "Unable to verify media usage activation state";
1405
+ readonly status: 503;
1406
+ };
1407
+ readonly TRANSFER_IMPORT_IN_PROGRESS: {
1408
+ readonly message: "A site import is in progress or incomplete; writes are disabled";
1409
+ readonly status: 503;
1410
+ };
1411
+ readonly TRANSFER_FENCE_CHECK_FAILED: {
1412
+ readonly message: "Unable to verify whether site writes are allowed";
1413
+ readonly status: 503;
1414
+ };
1415
+ };
1416
+ type SandboxRouteErrorCode = keyof typeof SANDBOX_ROUTE_ERROR_DEFINITIONS;
1417
+ interface SandboxRouteErrorDetails {
1418
+ code: SandboxRouteErrorCode;
1419
+ message: string;
1420
+ status: 503;
1421
+ }
1422
+ interface SandboxRouteErrorEnvelope {
1423
+ __emdashSandboxRouteError: true;
1424
+ error: SandboxRouteErrorDetails;
1425
+ }
1426
+ declare function getSandboxRouteErrorDetails(error: unknown): SandboxRouteErrorDetails | null;
1427
+ declare function createSandboxRouteError(code: SandboxRouteErrorCode): Error & SandboxRouteErrorDetails;
1428
+ declare function createSandboxRouteErrorEnvelope(error: unknown): SandboxRouteErrorEnvelope | null;
1429
+ declare function getSandboxRouteErrorEnvelope(value: unknown): SandboxRouteErrorEnvelope | null;
1430
+ /**
1431
+ * Sandbox runner interface.
1432
+ * Platform adapters implement this to provide plugin isolation.
1433
+ */
1434
+ interface SandboxRunner {
1435
+ /**
1436
+ * Check if sandboxing is available on this platform.
1437
+ * Returns false for platforms that don't support isolation.
1438
+ */
1439
+ isAvailable(): boolean;
1440
+ /**
1441
+ * Check if the sandbox runtime is currently healthy.
1442
+ * For in-process runners this always returns true.
1443
+ * For sidecar-based runners (workerd), returns false if the
1444
+ * child process has crashed and hasn't been restarted yet.
1445
+ */
1446
+ isHealthy(): boolean;
1447
+ /**
1448
+ * Why the runner cannot run plugins, once isAvailable() or isHealthy()
1449
+ * has returned false. A lowercase clause without a final period: callers
1450
+ * append it to their own message after a colon.
1451
+ *
1452
+ * Making this required breaks runners implemented outside this repository.
1453
+ */
1454
+ unavailableReason?(): string;
1455
+ /**
1456
+ * Load a sandboxed plugin from code.
1457
+ *
1458
+ * @param manifest - Plugin manifest with metadata and capabilities
1459
+ * @param code - The bundled plugin JavaScript code
1460
+ * @returns A sandboxed plugin instance
1461
+ * @throws If sandboxing is not available or plugin can't be loaded
1462
+ */
1463
+ load(manifest: PluginManifest, code: string): Promise<SandboxedPluginInstance>;
1464
+ /**
1465
+ * Set the email send callback for sandboxed plugins.
1466
+ * Called after the EmailPipeline is created, since the pipeline
1467
+ * doesn't exist when the sandbox runner is constructed.
1468
+ */
1469
+ setEmailSend(callback: SandboxEmailSendCallback | null): void;
1470
+ setCommentModerate?(callback: SandboxCommentModerateCallback | null): void;
1471
+ setContentCreate?(callback: SandboxContentCreateCallback | null): void;
1472
+ setContentActions?(callback: ContentActionCallbacks | null): void;
1473
+ /** Wake a long-lived scheduler after a sandboxed plugin changes its tasks. */
1474
+ setCronReschedule?(callback: (() => void) | null): void;
1475
+ /**
1476
+ * Terminate all loaded sandboxed plugins.
1477
+ * Called during shutdown or when reconfiguring.
1478
+ */
1479
+ terminateAll(): Promise<void>;
1480
+ }
1481
+ /**
1482
+ * Error thrown when the sandbox runtime is unavailable.
1483
+ * This happens when the sidecar process has crashed or hasn't started.
1484
+ */
1485
+ declare class SandboxUnavailableError extends Error {
1486
+ constructor(pluginId: string, reason: string);
1487
+ }
1488
+ /**
1489
+ * Factory function type for creating sandbox runners.
1490
+ * Exported by platform adapters (e.g., @emdash-cms/cloudflare/sandbox).
1491
+ *
1492
+ * @example
1493
+ * ```typescript
1494
+ * // In @emdash-cms/cloudflare/sandbox
1495
+ * export const createSandboxRunner: SandboxRunnerFactory = (options) => {
1496
+ * return new CloudflareSandboxRunner(options);
1497
+ * };
1498
+ * ```
1499
+ */
1500
+ type SandboxRunnerFactory = (options: SandboxOptions) => SandboxRunner;
1501
+ //#endregion
1502
+ //#region src/plugins/cron.d.ts
1503
+ /**
1504
+ * Callback to invoke a plugin's cron hook.
1505
+ * Provided by PluginManager so CronExecutor stays decoupled from the hook pipeline.
1506
+ */
1507
+ type InvokeCronHookFn = (pluginId: string, event: CronEvent) => Promise<void>;
1508
+ /**
1509
+ * Callback to notify the scheduler that the next due time may have changed.
1510
+ */
1511
+ type RescheduleFn = () => void;
1512
+ /**
1513
+ * Executes overdue cron tasks.
1514
+ *
1515
+ * Called by the platform driver: the NodeCronScheduler timer on Node, or the
1516
+ * Worker's `scheduled()` handler (via runScheduledTasks) on Cloudflare.
1517
+ * Stateless — all state lives in the database.
1518
+ */
1519
+ declare class CronExecutor {
1520
+ private invokeCronHook;
1521
+ private readonly now;
1522
+ /**
1523
+ * Resolves the database connection to use for this tick. A resolver (not a
1524
+ * captured instance) so connection-backed adapters work across events: on
1525
+ * Cloudflare the `scheduled()` handler installs an event-scoped connection
1526
+ * in ALS, and this resolves to it instead of the per-isolate singleton
1527
+ * whose socket belongs to an earlier request. Accepts a plain `Kysely` too
1528
+ * (wrapped in a constant resolver) for callers/tests that don't need ALS.
1529
+ */
1530
+ private readonly resolveDb;
1531
+ constructor(db: Kysely<Database> | (() => Kysely<Database>), invokeCronHook: InvokeCronHookFn, now?: () => Date);
1532
+ private get db();
1533
+ /**
1534
+ * Process all overdue tasks.
1535
+ *
1536
+ * 1. Atomically claim tasks whose next_run_at <= now, status = idle, enabled = 1.
1537
+ * 2. For each claimed task, invoke the plugin's cron hook.
1538
+ * 3. On success: compute next_run_at and reset to idle, or delete one-shots.
1539
+ * 4. On failure: reset to idle (retry on next tick).
1540
+ */
1541
+ tick(): Promise<number>;
1542
+ /**
1543
+ * Recover tasks stuck in 'running' for more than STALE_LOCK_MINUTES.
1544
+ * These likely crashed mid-execution.
1545
+ */
1546
+ recoverStaleLocks(): Promise<number>;
1547
+ /**
1548
+ * Get the next due time across all enabled tasks.
1549
+ * Returns null if no tasks are scheduled.
1550
+ */
1551
+ getNextDueTime(): Promise<string | null>;
1552
+ }
1553
+ /**
1554
+ * Per-plugin cron API implementation.
1555
+ * Scoped to a single plugin ID — plugins cannot see or modify other plugins' tasks.
1556
+ */
1557
+ declare class CronAccessImpl implements CronAccess {
1558
+ private db;
1559
+ private pluginId;
1560
+ private reschedule;
1561
+ private readonly now;
1562
+ constructor(db: Kysely<Database>, pluginId: string, reschedule: RescheduleFn, now?: () => Date);
1563
+ schedule(name: string, opts: {
1564
+ schedule: string;
1565
+ data?: Record<string, unknown>;
1566
+ }): Promise<void>;
1567
+ cancel(name: string): Promise<void>;
1568
+ list(): Promise<CronTaskInfo[]>;
1569
+ }
1570
+ //#endregion
1571
+ //#region src/plugins/byline-access.d.ts
1572
+ /**
1573
+ * Create read-only byline access (gated on `bylines:read`).
1574
+ */
1575
+ declare function createBylineAccess(db: Kysely<Database>): BylineAccess;
1576
+ //#endregion
1577
+ //#region src/plugins/media.d.ts
1578
+ declare const DEFAULT_PLUGIN_MEDIA_READ_BYTES: number;
1579
+ declare const MAX_PLUGIN_MEDIA_READ_BYTES: number;
1580
+ declare function toPluginMediaItem(item: MediaItem): MediaItem$1;
1581
+ declare function readPluginMediaBytes(db: Kysely<Database>, storage: Pick<Storage, "download"> | undefined, id: string, options?: {
1582
+ maxBytes?: number;
1583
+ }): Promise<MediaBytes>;
1584
+ declare function updatePluginMediaMetadata(db: Kysely<Database>, id: string, patch: MediaMetadataPatch): Promise<MediaItem$1>;
1585
+ declare function parsePluginMediaMetadataPatch(value: unknown): MediaMetadataPatch;
1586
+ //#endregion
1587
+ //#region src/plugins/storage-query.d.ts
1588
+ /**
1589
+ * Error thrown when a guarded `updateIf` loses a concurrent race by aborting
1590
+ * rather than resolving to `{ applied: false }`.
1591
+ *
1592
+ * `updateIf`'s `{ applied: false }` contract (row absent OR guard failed)
1593
+ * assumes READ COMMITTED — the default. There, a losing concurrent writer
1594
+ * re-evaluates the guard against the winner's freshly committed row and
1595
+ * cleanly resolves to `{ applied: false }`. Two aborts escape that contract:
1596
+ *
1597
+ * - `40001` (serialization_failure), only above READ COMMITTED, where the
1598
+ * loser cannot re-read against a newer snapshot.
1599
+ * - `40P01` (deadlock_detected), at any isolation level, when transactions
1600
+ * take row locks in opposite order.
1601
+ *
1602
+ * This error surfaces either abort so the caller can retry the write.
1603
+ *
1604
+ * The no-oversell SAFETY invariant holds either way: a losing writer NEVER
1605
+ * applies its update — it either sees `{ applied: false }` or throws here.
1606
+ */
1607
+ declare class StorageSerializationError extends Error {
1608
+ readonly code = "STORAGE_SERIALIZATION_FAILURE";
1609
+ readonly retryable = true;
1610
+ /** The Postgres SQLSTATE that triggered this error (`40001` / `40P01`). */
1611
+ readonly sqlState?: string;
1612
+ constructor(message: string, options?: {
1613
+ cause?: unknown;
1614
+ sqlState?: string;
1615
+ });
1616
+ }
1617
+ //#endregion
1618
+ export { MediaItem as $, ContentActionCallbacks as A, createContentAccess as B, SandboxUnavailableError as C, createSandboxRouteErrorEnvelope as D, createSandboxRouteError as E, createHttpAccess as F, encryptPluginSetting as G, PluginSettingEncryptionError as H, createMediaAccess as I, HookPipeline as J, isEncryptedPluginSetting as K, createRedirectAccess as L, RedirectAccessError as M, createCommentAccess as N, getSandboxRouteErrorDetails as O, createContentAccessWithWrite as P, CreateMediaInput as Q, createSchemaAccess as R, SandboxRunnerFactory as S, SerializedRequest as T, createSettingsAccess as U, EncryptedPluginSetting as V, decodePluginSettingValue as W, createHookPipeline as X, HookResult as Y, PluginStorageRepository as Z, SandboxOptions as _, readPluginMediaBytes as a, SandboxRouteErrorEnvelope as b, createBylineAccess as c, SandboxCommentModerateCallback as d, MediaRepository as et, SandboxContentCreateCallback as f, SandboxInvocationOptions as g, SandboxHttpFetchCallback as h, parsePluginMediaMetadataPatch as i, resolvePluginEncryptionKeys as it, ContentWriteGuard as j, getSandboxRouteErrorEnvelope as k, CronAccessImpl as l, SandboxEmailSendCallback as m, DEFAULT_PLUGIN_MEDIA_READ_BYTES as n, ContentRepository as nt, toPluginMediaItem as o, SandboxEmailMessage as p, EmailPipeline as q, MAX_PLUGIN_MEDIA_READ_BYTES as r, DatetimeContextCache as rt, updatePluginMediaMetadata as s, StorageSerializationError as t, FocalPointUpdate as tt, CronExecutor as u, SandboxRouteErrorCode as v, SandboxedPluginInstance as w, SandboxRunner as x, SandboxRouteErrorDetails as y, createUnrestrictedHttpAccess as z };
1619
+ //# sourceMappingURL=storage-query-Cy0SZ8iG.d.mts.map