emdash 0.38.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1394) hide show
  1. package/dist/action-token-On1sot_c.mjs +26 -0
  2. package/dist/action-token-On1sot_c.mjs.map +1 -0
  3. package/dist/activation-CaMfdBt1.mjs +382 -0
  4. package/dist/activation-CaMfdBt1.mjs.map +1 -0
  5. package/dist/adapters-Cq10K4_c.d.mts +171 -0
  6. package/dist/adapters-Cq10K4_c.d.mts.map +1 -0
  7. package/dist/after-PcEvMY_6.mjs +96 -0
  8. package/dist/after-PcEvMY_6.mjs.map +1 -0
  9. package/dist/allowed-origins-1Sa-2wZK.mjs +116 -0
  10. package/dist/allowed-origins-1Sa-2wZK.mjs.map +1 -0
  11. package/dist/api/route-utils.d.mts +4 -3
  12. package/dist/api/route-utils.d.mts.map +1 -1
  13. package/dist/api/route-utils.mjs +45 -30
  14. package/dist/api/route-utils.mjs.map +1 -1
  15. package/dist/api/schemas/index.d.mts +2 -2
  16. package/dist/api/schemas/index.mjs +7 -6
  17. package/dist/api-DmjKxPCY.mjs +4831 -0
  18. package/dist/api-DmjKxPCY.mjs.map +1 -0
  19. package/dist/api-tokens-BIXItFKV.mjs +163 -0
  20. package/dist/api-tokens-BIXItFKV.mjs.map +1 -0
  21. package/dist/apply-drpfmqrR.mjs +1005 -0
  22. package/dist/apply-drpfmqrR.mjs.map +1 -0
  23. package/dist/artifact-fetch-COiMhVgk.mjs +813 -0
  24. package/dist/artifact-fetch-COiMhVgk.mjs.map +1 -0
  25. package/dist/astro/index.d.mts +14 -12
  26. package/dist/astro/index.d.mts.map +1 -1
  27. package/dist/astro/index.mjs +99 -15
  28. package/dist/astro/index.mjs.map +1 -1
  29. package/dist/astro/middleware/auth.d.mts +12 -10
  30. package/dist/astro/middleware/auth.d.mts.map +1 -1
  31. package/dist/astro/middleware/auth.mjs +20 -11
  32. package/dist/astro/middleware/auth.mjs.map +1 -1
  33. package/dist/astro/middleware/media-usage-write-fence.mjs +5 -5
  34. package/dist/astro/middleware/redirect.mjs +11 -11
  35. package/dist/astro/middleware/request-context.d.mts +1 -1
  36. package/dist/astro/middleware/request-context.d.mts.map +1 -1
  37. package/dist/astro/middleware/request-context.mjs +154 -28
  38. package/dist/astro/middleware/request-context.mjs.map +1 -1
  39. package/dist/astro/middleware/setup.mjs +1 -1
  40. package/dist/astro/middleware.d.mts +13 -10
  41. package/dist/astro/middleware.d.mts.map +1 -1
  42. package/dist/astro/middleware.mjs +114 -3062
  43. package/dist/astro/middleware.mjs.map +1 -1
  44. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +10 -9
  45. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs.map +1 -1
  46. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +10 -9
  47. package/dist/astro/routes/api/admin/allowed-domains/index.mjs.map +1 -1
  48. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +5 -5
  49. package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
  50. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +6 -6
  51. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +13 -12
  52. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs.map +1 -1
  53. package/dist/astro/routes/api/admin/byline-fields/index.mjs +13 -12
  54. package/dist/astro/routes/api/admin/byline-fields/index.mjs.map +1 -1
  55. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +13 -12
  56. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs.map +1 -1
  57. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +22 -21
  58. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
  59. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +22 -21
  60. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
  61. package/dist/astro/routes/api/admin/bylines/index.mjs +22 -21
  62. package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
  63. package/dist/astro/routes/api/admin/comments/_id_/status.d.mts.map +1 -1
  64. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +21 -54
  65. package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
  66. package/dist/astro/routes/api/admin/comments/_id_.mjs +8 -8
  67. package/dist/astro/routes/api/admin/comments/bulk.mjs +15 -14
  68. package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -1
  69. package/dist/astro/routes/api/admin/comments/counts.mjs +8 -8
  70. package/dist/astro/routes/api/admin/comments/index.mjs +15 -14
  71. package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -1
  72. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +6 -6
  73. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +5 -5
  74. package/dist/astro/routes/api/admin/media-usage/activation.mjs +17 -16
  75. package/dist/astro/routes/api/admin/media-usage/activation.mjs.map +1 -1
  76. package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +19 -18
  77. package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs.map +1 -1
  78. package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +19 -18
  79. package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs.map +1 -1
  80. package/dist/astro/routes/api/admin/media-usage/progress.mjs +17 -17
  81. package/dist/astro/routes/api/admin/media-usage/repair.mjs +21 -20
  82. package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
  83. package/dist/astro/routes/api/admin/media-usage/work/index.mjs +19 -18
  84. package/dist/astro/routes/api/admin/media-usage/work/index.mjs.map +1 -1
  85. package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +19 -18
  86. package/dist/astro/routes/api/admin/media-usage/work/retry.mjs.map +1 -1
  87. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +5 -5
  88. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +5 -5
  89. package/dist/astro/routes/api/admin/plugins/_id_/disable.d.mts.map +1 -1
  90. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +9 -69
  91. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
  92. package/dist/astro/routes/api/admin/plugins/_id_/enable.d.mts.map +1 -1
  93. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +9 -72
  94. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
  95. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +66 -62
  96. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
  97. package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +6 -6
  98. package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +65 -62
  99. package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
  100. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +70 -64
  101. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
  102. package/dist/astro/routes/api/admin/plugins/_id_/update.d.mts.map +1 -1
  103. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +87 -66
  104. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
  105. package/dist/astro/routes/api/admin/plugins/index.mjs +66 -62
  106. package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
  107. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +4 -4
  108. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +65 -62
  109. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
  110. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.d.mts.map +1 -1
  111. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +85 -66
  112. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
  113. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +65 -62
  114. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
  115. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +70 -64
  116. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
  117. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.d.mts.map +1 -1
  118. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +90 -69
  119. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
  120. package/dist/astro/routes/api/admin/plugins/registry/artifact.d.mts.map +1 -1
  121. package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +9 -8
  122. package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
  123. package/dist/astro/routes/api/admin/plugins/registry/install.d.mts.map +1 -1
  124. package/dist/astro/routes/api/admin/plugins/registry/install.mjs +77 -66
  125. package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
  126. package/dist/astro/routes/api/admin/plugins/registry/verify.d.mts.map +1 -1
  127. package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +67 -64
  128. package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
  129. package/dist/astro/routes/api/admin/plugins/updates.d.mts.map +1 -1
  130. package/dist/astro/routes/api/admin/plugins/updates.mjs +66 -63
  131. package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
  132. package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.d.mts +8 -0
  133. package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.d.mts.map +1 -0
  134. package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +27 -0
  135. package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs.map +1 -0
  136. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +65 -62
  137. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
  138. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +4 -4
  139. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +65 -62
  140. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
  141. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +4 -4
  142. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +3 -3
  143. package/dist/astro/routes/api/admin/users/_id_/index.mjs +11 -10
  144. package/dist/astro/routes/api/admin/users/_id_/index.mjs.map +1 -1
  145. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +5 -5
  146. package/dist/astro/routes/api/admin/users/index.mjs +10 -9
  147. package/dist/astro/routes/api/admin/users/index.mjs.map +1 -1
  148. package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -5
  149. package/dist/astro/routes/api/auth/invite/accept.mjs +3 -3
  150. package/dist/astro/routes/api/auth/invite/complete.mjs +15 -14
  151. package/dist/astro/routes/api/auth/invite/complete.mjs.map +1 -1
  152. package/dist/astro/routes/api/auth/invite/index.mjs +12 -11
  153. package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -1
  154. package/dist/astro/routes/api/auth/invite/register-options.mjs +14 -13
  155. package/dist/astro/routes/api/auth/invite/register-options.mjs.map +1 -1
  156. package/dist/astro/routes/api/auth/logout.mjs +4 -4
  157. package/dist/astro/routes/api/auth/magic-link/send.mjs +14 -13
  158. package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
  159. package/dist/astro/routes/api/auth/magic-link/verify.mjs +4 -4
  160. package/dist/astro/routes/api/auth/me.mjs +11 -10
  161. package/dist/astro/routes/api/auth/me.mjs.map +1 -1
  162. package/dist/astro/routes/api/auth/mode.mjs +4 -4
  163. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +4 -4
  164. package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
  165. package/dist/astro/routes/api/auth/passkey/_id_.mjs +10 -9
  166. package/dist/astro/routes/api/auth/passkey/_id_.mjs.map +1 -1
  167. package/dist/astro/routes/api/auth/passkey/index.mjs +3 -3
  168. package/dist/astro/routes/api/auth/passkey/options.mjs +16 -15
  169. package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -1
  170. package/dist/astro/routes/api/auth/passkey/register/options.mjs +14 -13
  171. package/dist/astro/routes/api/auth/passkey/register/options.mjs.map +1 -1
  172. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +15 -14
  173. package/dist/astro/routes/api/auth/passkey/register/verify.mjs.map +1 -1
  174. package/dist/astro/routes/api/auth/passkey/verify.mjs +15 -14
  175. package/dist/astro/routes/api/auth/passkey/verify.mjs.map +1 -1
  176. package/dist/astro/routes/api/auth/signup/complete.mjs +15 -14
  177. package/dist/astro/routes/api/auth/signup/complete.mjs.map +1 -1
  178. package/dist/astro/routes/api/auth/signup/request.mjs +14 -13
  179. package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
  180. package/dist/astro/routes/api/auth/signup/verify.mjs +3 -3
  181. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts.map +1 -1
  182. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +15 -211
  183. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
  184. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +18 -17
  185. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs.map +1 -1
  186. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +4 -4
  187. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +15 -14
  188. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
  189. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +5 -5
  190. package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +15 -14
  191. package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs.map +1 -1
  192. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +4 -4
  193. package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.d.mts +8 -0
  194. package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.d.mts.map +1 -0
  195. package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +35 -0
  196. package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs.map +1 -0
  197. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +16 -15
  198. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -1
  199. package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts +9 -2
  200. package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts.map +1 -1
  201. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +25 -18
  202. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
  203. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +27 -25
  204. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
  205. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +27 -25
  206. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
  207. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +5 -5
  208. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +4 -4
  209. package/dist/astro/routes/api/content/_collection_/_id_/schedule.d.mts.map +1 -1
  210. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +23 -15
  211. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
  212. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +23 -21
  213. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
  214. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +4 -4
  215. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +23 -15
  216. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
  217. package/dist/astro/routes/api/content/_collection_/_id_.mjs +15 -14
  218. package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
  219. package/dist/astro/routes/api/content/_collection_/authors.mjs +4 -4
  220. package/dist/astro/routes/api/content/_collection_/index.mjs +12 -11
  221. package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
  222. package/dist/astro/routes/api/content/_collection_/trash.mjs +11 -10
  223. package/dist/astro/routes/api/content/_collection_/trash.mjs.map +1 -1
  224. package/dist/astro/routes/api/dashboard.mjs +14 -12
  225. package/dist/astro/routes/api/dashboard.mjs.map +1 -1
  226. package/dist/astro/routes/api/dev/emails.mjs +4 -4
  227. package/dist/astro/routes/api/health.d.mts +8 -0
  228. package/dist/astro/routes/api/health.d.mts.map +1 -0
  229. package/dist/astro/routes/api/health.mjs +21 -0
  230. package/dist/astro/routes/api/health.mjs.map +1 -0
  231. package/dist/astro/routes/api/import/probe.d.mts +3 -3
  232. package/dist/astro/routes/api/import/probe.mjs +25 -23
  233. package/dist/astro/routes/api/import/probe.mjs.map +1 -1
  234. package/dist/astro/routes/api/import/wordpress/analyze.mjs +5 -5
  235. package/dist/astro/routes/api/import/wordpress/execute.d.mts +13 -11
  236. package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -1
  237. package/dist/astro/routes/api/import/wordpress/execute.mjs +20 -20
  238. package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -10
  239. package/dist/astro/routes/api/import/wordpress/media.d.mts.map +1 -1
  240. package/dist/astro/routes/api/import/wordpress/media.mjs +15 -14
  241. package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -1
  242. package/dist/astro/routes/api/import/wordpress/prepare.mjs +14 -13
  243. package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
  244. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +13 -11
  245. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts.map +1 -1
  246. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +18 -17
  247. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
  248. package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
  249. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +25 -23
  250. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -1
  251. package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
  252. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +13 -11
  253. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts.map +1 -1
  254. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +36 -34
  255. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
  256. package/dist/astro/routes/api/manifest.mjs +17 -9
  257. package/dist/astro/routes/api/manifest.mjs.map +1 -1
  258. package/dist/astro/routes/api/mcp.d.mts.map +1 -1
  259. package/dist/astro/routes/api/mcp.mjs +167 -101
  260. package/dist/astro/routes/api/mcp.mjs.map +1 -1
  261. package/dist/astro/routes/api/media/_id_/confirm.mjs +15 -14
  262. package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
  263. package/dist/astro/routes/api/media/_id_/replace.mjs +12 -11
  264. package/dist/astro/routes/api/media/_id_/replace.mjs.map +1 -1
  265. package/dist/astro/routes/api/media/_id_/upload.mjs +8 -8
  266. package/dist/astro/routes/api/media/_id_/usage.mjs +23 -22
  267. package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
  268. package/dist/astro/routes/api/media/_id_.mjs +22 -21
  269. package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
  270. package/dist/astro/routes/api/media/asset/_id_/_filename_.d.mts +8 -0
  271. package/dist/astro/routes/api/media/asset/_id_/_filename_.d.mts.map +1 -0
  272. package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +52 -0
  273. package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs.map +1 -0
  274. package/dist/astro/routes/api/media/file/_...key_.mjs +3 -3
  275. package/dist/astro/routes/api/media/folders/_id_.mjs +12 -11
  276. package/dist/astro/routes/api/media/folders/_id_.mjs.map +1 -1
  277. package/dist/astro/routes/api/media/folders/index.mjs +12 -11
  278. package/dist/astro/routes/api/media/folders/index.mjs.map +1 -1
  279. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +4 -4
  280. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +4 -4
  281. package/dist/astro/routes/api/media/providers/index.mjs +4 -4
  282. package/dist/astro/routes/api/media/upload-url.mjs +14 -13
  283. package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
  284. package/dist/astro/routes/api/media.mjs +26 -25
  285. package/dist/astro/routes/api/media.mjs.map +1 -1
  286. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +15 -14
  287. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
  288. package/dist/astro/routes/api/menus/_name_/items.mjs +15 -14
  289. package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
  290. package/dist/astro/routes/api/menus/_name_/reorder.mjs +15 -14
  291. package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
  292. package/dist/astro/routes/api/menus/_name_/translations.mjs +15 -14
  293. package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
  294. package/dist/astro/routes/api/menus/_name_.mjs +15 -14
  295. package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
  296. package/dist/astro/routes/api/menus/index.mjs +15 -14
  297. package/dist/astro/routes/api/menus/index.mjs.map +1 -1
  298. package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
  299. package/dist/astro/routes/api/oauth/device/authorize.mjs +7 -7
  300. package/dist/astro/routes/api/oauth/device/code.mjs +10 -10
  301. package/dist/astro/routes/api/oauth/device/token.mjs +9 -9
  302. package/dist/astro/routes/api/oauth/register.mjs +4 -4
  303. package/dist/astro/routes/api/oauth/token/refresh.mjs +7 -7
  304. package/dist/astro/routes/api/oauth/token/revoke.mjs +7 -7
  305. package/dist/astro/routes/api/oauth/token.mjs +7 -7
  306. package/dist/astro/routes/api/openapi.json.mjs +28 -23
  307. package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
  308. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts +2 -1
  309. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts.map +1 -1
  310. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +22 -40
  311. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs.map +1 -1
  312. package/dist/astro/routes/api/redirects/404s/index.mjs +18 -15
  313. package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
  314. package/dist/astro/routes/api/redirects/404s/summary.mjs +18 -15
  315. package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
  316. package/dist/astro/routes/api/redirects/_id_.d.mts.map +1 -1
  317. package/dist/astro/routes/api/redirects/_id_.mjs +20 -23
  318. package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
  319. package/dist/astro/routes/api/redirects/index.d.mts.map +1 -1
  320. package/dist/astro/routes/api/redirects/index.mjs +19 -20
  321. package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
  322. package/dist/astro/routes/api/relations/_id_/index.mjs +27 -25
  323. package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
  324. package/dist/astro/routes/api/relations/_id_/translations.mjs +21 -20
  325. package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -1
  326. package/dist/astro/routes/api/relations/index.mjs +27 -25
  327. package/dist/astro/routes/api/relations/index.mjs.map +1 -1
  328. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +4 -4
  329. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +5 -5
  330. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +65 -62
  331. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
  332. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +65 -62
  333. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
  334. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +65 -62
  335. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
  336. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +65 -62
  337. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
  338. package/dist/astro/routes/api/schema/collections/index.mjs +65 -62
  339. package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
  340. package/dist/astro/routes/api/schema/collections/reorder.mjs +65 -62
  341. package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
  342. package/dist/astro/routes/api/schema/index.mjs +16 -16
  343. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +65 -62
  344. package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
  345. package/dist/astro/routes/api/schema/orphans/index.mjs +65 -62
  346. package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
  347. package/dist/astro/routes/api/search/enable.mjs +16 -15
  348. package/dist/astro/routes/api/search/enable.mjs.map +1 -1
  349. package/dist/astro/routes/api/search/index.mjs +17 -15
  350. package/dist/astro/routes/api/search/index.mjs.map +1 -1
  351. package/dist/astro/routes/api/search/rebuild.mjs +16 -15
  352. package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
  353. package/dist/astro/routes/api/search/stats.mjs +10 -10
  354. package/dist/astro/routes/api/search/suggest.mjs +15 -14
  355. package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
  356. package/dist/astro/routes/api/sections/_slug_.mjs +15 -14
  357. package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
  358. package/dist/astro/routes/api/sections/index.mjs +15 -14
  359. package/dist/astro/routes/api/sections/index.mjs.map +1 -1
  360. package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +9 -9
  361. package/dist/astro/routes/api/settings/backups/archives/index.mjs +8 -8
  362. package/dist/astro/routes/api/settings/backups/export.mjs +9 -9
  363. package/dist/astro/routes/api/settings/backups/index.mjs +10 -10
  364. package/dist/astro/routes/api/settings/email.mjs +6 -6
  365. package/dist/astro/routes/api/settings.mjs +22 -20
  366. package/dist/astro/routes/api/settings.mjs.map +1 -1
  367. package/dist/astro/routes/api/setup/admin-verify.mjs +16 -15
  368. package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
  369. package/dist/astro/routes/api/setup/admin.mjs +15 -14
  370. package/dist/astro/routes/api/setup/admin.mjs.map +1 -1
  371. package/dist/astro/routes/api/setup/dev-bypass.mjs +42 -40
  372. package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
  373. package/dist/astro/routes/api/setup/dev-reset.mjs +4 -4
  374. package/dist/astro/routes/api/setup/index.mjs +43 -40
  375. package/dist/astro/routes/api/setup/index.mjs.map +1 -1
  376. package/dist/astro/routes/api/setup/status.mjs +5 -5
  377. package/dist/astro/routes/api/snapshot.mjs +11 -11
  378. package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +23 -22
  379. package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -1
  380. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +23 -22
  381. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
  382. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +23 -22
  383. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
  384. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +23 -22
  385. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
  386. package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +22 -21
  387. package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -1
  388. package/dist/astro/routes/api/taxonomies/_name_.mjs +23 -22
  389. package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
  390. package/dist/astro/routes/api/taxonomies/index.mjs +23 -22
  391. package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
  392. package/dist/astro/routes/api/themes/preview.mjs +8 -8
  393. package/dist/astro/routes/api/typegen.mjs +6 -6
  394. package/dist/astro/routes/api/visual-editing/action-token.d.mts +8 -0
  395. package/dist/astro/routes/api/visual-editing/action-token.d.mts.map +1 -0
  396. package/dist/astro/routes/api/visual-editing/action-token.mjs +25 -0
  397. package/dist/astro/routes/api/visual-editing/action-token.mjs.map +1 -0
  398. package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.d.mts +8 -0
  399. package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.d.mts.map +1 -0
  400. package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +37 -0
  401. package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs.map +1 -0
  402. package/dist/astro/routes/api/visual-editing/toolbar-labels.d.mts +8 -0
  403. package/dist/astro/routes/api/visual-editing/toolbar-labels.d.mts.map +1 -0
  404. package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +20 -0
  405. package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs.map +1 -0
  406. package/dist/astro/routes/api/well-known/auth.mjs +2 -2
  407. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
  408. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
  409. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +12 -11
  410. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
  411. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +16 -15
  412. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
  413. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +16 -15
  414. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
  415. package/dist/astro/routes/api/widget-areas/_name_.mjs +10 -10
  416. package/dist/astro/routes/api/widget-areas/index.mjs +16 -15
  417. package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
  418. package/dist/astro/routes/api/widget-components.mjs +4 -4
  419. package/dist/astro/routes/robots.txt.mjs +13 -12
  420. package/dist/astro/routes/robots.txt.mjs.map +1 -1
  421. package/dist/astro/routes/sitemap-_collection_.xml.d.mts.map +1 -1
  422. package/dist/astro/routes/sitemap-_collection_.xml.mjs +23 -19
  423. package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
  424. package/dist/astro/routes/sitemap.xml.mjs +14 -13
  425. package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
  426. package/dist/astro/types.d.mts +61 -23
  427. package/dist/astro/types.d.mts.map +1 -1
  428. package/dist/auth/providers/github.d.mts +1 -1
  429. package/dist/auth/providers/google.d.mts +1 -1
  430. package/dist/authoritative-records-DbqshfKD.mjs +5172 -0
  431. package/dist/authoritative-records-DbqshfKD.mjs.map +1 -0
  432. package/dist/authorize-BXpfMpp0.mjs +40 -0
  433. package/dist/authorize-BXpfMpp0.mjs.map +1 -0
  434. package/dist/backup-BsPQdwnS.mjs +246 -0
  435. package/dist/backup-BsPQdwnS.mjs.map +1 -0
  436. package/dist/base64-DvnNgP7e.mjs +63 -0
  437. package/dist/base64-DvnNgP7e.mjs.map +1 -0
  438. package/dist/byline-Doh-wt99.mjs +906 -0
  439. package/dist/byline-Doh-wt99.mjs.map +1 -0
  440. package/dist/byline-fields-CsrdvaLV.mjs +123 -0
  441. package/dist/byline-fields-CsrdvaLV.mjs.map +1 -0
  442. package/dist/byline-registry-D6lWzXk6.mjs +406 -0
  443. package/dist/byline-registry-D6lWzXk6.mjs.map +1 -0
  444. package/dist/bylines-Cop0hkoy.mjs +214 -0
  445. package/dist/bylines-Cop0hkoy.mjs.map +1 -0
  446. package/dist/bylines-kpBzHPr8.mjs +232 -0
  447. package/dist/bylines-kpBzHPr8.mjs.map +1 -0
  448. package/dist/cache-B0pOlXdM.mjs +108 -0
  449. package/dist/cache-B0pOlXdM.mjs.map +1 -0
  450. package/dist/capture-triggers-gxQxnxrJ.mjs +362 -0
  451. package/dist/capture-triggers-gxQxnxrJ.mjs.map +1 -0
  452. package/dist/challenge-store-CkRdSdd8.mjs +51 -0
  453. package/dist/challenge-store-CkRdSdd8.mjs.map +1 -0
  454. package/dist/checksum-Bsi2D9M1.mjs +162 -0
  455. package/dist/checksum-Bsi2D9M1.mjs.map +1 -0
  456. package/dist/chrome-tags-D7LGB91U.mjs +24 -0
  457. package/dist/chrome-tags-D7LGB91U.mjs.map +1 -0
  458. package/dist/chunks-BmWyou79.mjs +25 -0
  459. package/dist/chunks-BmWyou79.mjs.map +1 -0
  460. package/dist/cli/index.mjs +889 -102
  461. package/dist/cli/index.mjs.map +1 -1
  462. package/dist/client/cf-access.d.mts +1 -1
  463. package/dist/client/index.d.mts +2 -2
  464. package/dist/client/index.mjs +2 -2
  465. package/dist/collection-deletion-C3Xixmkx.mjs +436 -0
  466. package/dist/collection-deletion-C3Xixmkx.mjs.map +1 -0
  467. package/dist/collection-slugs-cache-D9auiKmI.mjs +85 -0
  468. package/dist/collection-slugs-cache-D9auiKmI.mjs.map +1 -0
  469. package/dist/comment-DcT8qdPK.mjs +313 -0
  470. package/dist/comment-DcT8qdPK.mjs.map +1 -0
  471. package/dist/comment-reaction-DY5-y8Y5.mjs +85 -0
  472. package/dist/comment-reaction-DY5-y8Y5.mjs.map +1 -0
  473. package/dist/comments-B67VRNGw.mjs +204 -0
  474. package/dist/comments-B67VRNGw.mjs.map +1 -0
  475. package/dist/comments-BVzzt6x5.mjs +99 -0
  476. package/dist/comments-BVzzt6x5.mjs.map +1 -0
  477. package/dist/components-DIl9Qzh6.mjs +108 -0
  478. package/dist/components-DIl9Qzh6.mjs.map +1 -0
  479. package/dist/config-B2acLeC5.mjs +242 -0
  480. package/dist/config-B2acLeC5.mjs.map +1 -0
  481. package/dist/config-CGVeT8Hc.mjs +73 -0
  482. package/dist/config-CGVeT8Hc.mjs.map +1 -0
  483. package/dist/config-D3HhLON3.d.mts +39 -0
  484. package/dist/config-D3HhLON3.d.mts.map +1 -0
  485. package/dist/config-DS7e4EZ9.d.mts +6387 -0
  486. package/dist/config-DS7e4EZ9.d.mts.map +1 -0
  487. package/dist/content-DZ3B5qtA.mjs +2216 -0
  488. package/dist/content-DZ3B5qtA.mjs.map +1 -0
  489. package/dist/content-list-query-CbPdzsna.d.mts +26 -0
  490. package/dist/content-list-query-CbPdzsna.d.mts.map +1 -0
  491. package/dist/content-policy-CM4skrNi.mjs +46 -0
  492. package/dist/content-policy-CM4skrNi.mjs.map +1 -0
  493. package/dist/content-refresh-BHLHJgyt.mjs +3599 -0
  494. package/dist/content-refresh-BHLHJgyt.mjs.map +1 -0
  495. package/dist/content-repair-BVll5WNl.mjs +440 -0
  496. package/dist/content-repair-BVll5WNl.mjs.map +1 -0
  497. package/dist/context-B195kjqZ.mjs +1835 -0
  498. package/dist/context-B195kjqZ.mjs.map +1 -0
  499. package/dist/cron-BcR3RN4K.mjs +282 -0
  500. package/dist/cron-BcR3RN4K.mjs.map +1 -0
  501. package/dist/dashboard-CZD4G7k_.mjs +151 -0
  502. package/dist/dashboard-CZD4G7k_.mjs.map +1 -0
  503. package/dist/database/migration-lock.d.mts +37 -0
  504. package/dist/database/migration-lock.d.mts.map +1 -0
  505. package/dist/database/migration-lock.mjs +76 -0
  506. package/dist/database/migration-lock.mjs.map +1 -0
  507. package/dist/database/pg-migration-lock.d.mts +1 -1
  508. package/dist/database/pg-migration-lock.mjs +1 -1
  509. package/dist/database/pg-migration-lock.mjs.map +1 -1
  510. package/dist/datetime-normalization-PeiEdcRY.mjs +187 -0
  511. package/dist/datetime-normalization-PeiEdcRY.mjs.map +1 -0
  512. package/dist/db/index.d.mts +3 -3
  513. package/dist/db/index.mjs +4 -3
  514. package/dist/db/index.mjs.map +1 -1
  515. package/dist/db/libsql-migrations.d.mts +1 -1
  516. package/dist/db/libsql-migrations.mjs +7 -6
  517. package/dist/db/libsql-migrations.mjs.map +1 -1
  518. package/dist/db/libsql.d.mts +1 -1
  519. package/dist/db/postgres-migrations.d.mts +1 -1
  520. package/dist/db/postgres-migrations.mjs +7 -6
  521. package/dist/db/postgres-migrations.mjs.map +1 -1
  522. package/dist/db/postgres.d.mts +1 -1
  523. package/dist/db/sqlite-migrations.d.mts +1 -1
  524. package/dist/db/sqlite-migrations.mjs +7 -6
  525. package/dist/db/sqlite-migrations.mjs.map +1 -1
  526. package/dist/db/sqlite.d.mts +1 -1
  527. package/dist/db/sqlite.mjs +1 -1
  528. package/dist/db-errors-CBD5yMro.mjs +55 -0
  529. package/dist/db-errors-CBD5yMro.mjs.map +1 -0
  530. package/dist/default-BtlxWgh9.mjs +81 -0
  531. package/dist/default-BtlxWgh9.mjs.map +1 -0
  532. package/dist/deferred-tasks-Ba9fphlE.d.mts +9 -0
  533. package/dist/deferred-tasks-Ba9fphlE.d.mts.map +1 -0
  534. package/dist/dev-typegen-CZaPLl3V.mjs +29 -0
  535. package/dist/dev-typegen-CZaPLl3V.mjs.map +1 -0
  536. package/dist/device-flow-3E5l0fpH.mjs +466 -0
  537. package/dist/device-flow-3E5l0fpH.mjs.map +1 -0
  538. package/dist/dialect-helpers-CtYdsX4W.mjs +307 -0
  539. package/dist/dialect-helpers-CtYdsX4W.mjs.map +1 -0
  540. package/dist/direct-executor-ZI8E01Yt.mjs +104 -0
  541. package/dist/direct-executor-ZI8E01Yt.mjs.map +1 -0
  542. package/dist/dist-2hDLsLeq.mjs +810 -0
  543. package/dist/dist-2hDLsLeq.mjs.map +1 -0
  544. package/dist/email-console-gc-E3Eqj.mjs +50 -0
  545. package/dist/email-console-gc-E3Eqj.mjs.map +1 -0
  546. package/dist/emdash-runtime-DZGinqTL.mjs +4041 -0
  547. package/dist/emdash-runtime-DZGinqTL.mjs.map +1 -0
  548. package/dist/enrich-C2Mk0lwE.mjs +194 -0
  549. package/dist/enrich-C2Mk0lwE.mjs.map +1 -0
  550. package/dist/entry-lock-D3C99MXS.mjs +1520 -0
  551. package/dist/entry-lock-D3C99MXS.mjs.map +1 -0
  552. package/dist/entry-lock-D9rnj2Lu.mjs +163 -0
  553. package/dist/entry-lock-D9rnj2Lu.mjs.map +1 -0
  554. package/dist/entry-lock-DX7QkqEg.d.mts +3503 -0
  555. package/dist/entry-lock-DX7QkqEg.d.mts.map +1 -0
  556. package/dist/entry-locks-CO_KaoU5.mjs +167 -0
  557. package/dist/entry-locks-CO_KaoU5.mjs.map +1 -0
  558. package/dist/error-CCTCskie.mjs +90 -0
  559. package/dist/error-CCTCskie.mjs.map +1 -0
  560. package/dist/errors-W3PA8HqB.mjs +447 -0
  561. package/dist/errors-W3PA8HqB.mjs.map +1 -0
  562. package/dist/escape-DN4Qmjsl.mjs +9 -0
  563. package/dist/escape-DN4Qmjsl.mjs.map +1 -0
  564. package/dist/field-defs-cache-B337z8UJ.mjs +77 -0
  565. package/dist/field-defs-cache-B337z8UJ.mjs.map +1 -0
  566. package/dist/focal-point-Gr34o-4o.mjs +23 -0
  567. package/dist/focal-point-Gr34o-4o.mjs.map +1 -0
  568. package/dist/fts-manager-DMb0sbIQ.mjs +413 -0
  569. package/dist/fts-manager-DMb0sbIQ.mjs.map +1 -0
  570. package/dist/hash-CLVFzWvx.mjs +37 -0
  571. package/dist/hash-CLVFzWvx.mjs.map +1 -0
  572. package/dist/hook-result-KY1jq21o.d.mts +31 -0
  573. package/dist/hook-result-KY1jq21o.d.mts.map +1 -0
  574. package/dist/hreflang-BgS2FqhH.d.mts +50 -0
  575. package/dist/hreflang-BgS2FqhH.d.mts.map +1 -0
  576. package/dist/hreflang-CrJwqoeb.mjs +105 -0
  577. package/dist/hreflang-CrJwqoeb.mjs.map +1 -0
  578. package/dist/http-route-dispatch-DAKlanXb.mjs +339 -0
  579. package/dist/http-route-dispatch-DAKlanXb.mjs.map +1 -0
  580. package/dist/identity-DRGSHEEr.mjs +35 -0
  581. package/dist/identity-DRGSHEEr.mjs.map +1 -0
  582. package/dist/import-DFr5B_hC.mjs +2020 -0
  583. package/dist/import-DFr5B_hC.mjs.map +1 -0
  584. package/dist/index-CDwKDkTq.d.mts +623 -0
  585. package/dist/index-CDwKDkTq.d.mts.map +1 -0
  586. package/dist/index.d.mts +27 -22
  587. package/dist/index.mjs +101 -89
  588. package/dist/init-lock-4eRRB4Le.mjs +56 -0
  589. package/dist/init-lock-4eRRB4Le.mjs.map +1 -0
  590. package/dist/install-finalization-5Os-QZ-2.mjs +58 -0
  591. package/dist/install-finalization-5Os-QZ-2.mjs.map +1 -0
  592. package/dist/lifecycle-7e-Lt_kX.mjs +25 -0
  593. package/dist/lifecycle-7e-Lt_kX.mjs.map +1 -0
  594. package/dist/load-Cu5bvCZh.mjs +28 -0
  595. package/dist/load-Cu5bvCZh.mjs.map +1 -0
  596. package/dist/loader-t4TxaFiQ.mjs +1004 -0
  597. package/dist/loader-t4TxaFiQ.mjs.map +1 -0
  598. package/dist/manifest-builder-D31UoJCu.mjs +189 -0
  599. package/dist/manifest-builder-D31UoJCu.mjs.map +1 -0
  600. package/dist/manifest-schema-Bkh8SeHd.mjs +491 -0
  601. package/dist/manifest-schema-Bkh8SeHd.mjs.map +1 -0
  602. package/dist/media/image-endpoint.mjs +1 -1
  603. package/dist/media/index.d.mts +1 -1
  604. package/dist/media/index.mjs +4 -4
  605. package/dist/media/local-runtime.d.mts +14 -12
  606. package/dist/media/local-runtime.d.mts.map +1 -1
  607. package/dist/media/local-runtime.mjs +12 -11
  608. package/dist/media/local-runtime.mjs.map +1 -1
  609. package/dist/media-TBlKCwo7.mjs +334 -0
  610. package/dist/media-TBlKCwo7.mjs.map +1 -0
  611. package/dist/media-allowlist-s60eAIf6.mjs +44 -0
  612. package/dist/media-allowlist-s60eAIf6.mjs.map +1 -0
  613. package/dist/media-folders-ClIRLUQv.mjs +210 -0
  614. package/dist/media-folders-ClIRLUQv.mjs.map +1 -0
  615. package/dist/media-url-DY_ijO3B.mjs +43 -0
  616. package/dist/media-url-DY_ijO3B.mjs.map +1 -0
  617. package/dist/media-usage-C4NolTpQ.mjs +1833 -0
  618. package/dist/media-usage-C4NolTpQ.mjs.map +1 -0
  619. package/dist/media-usage-activation-CAhmb14O.mjs +78 -0
  620. package/dist/media-usage-activation-CAhmb14O.mjs.map +1 -0
  621. package/dist/media-usage-work-Cu5DqewW.mjs +586 -0
  622. package/dist/media-usage-work-Cu5DqewW.mjs.map +1 -0
  623. package/dist/media-usage-work-DJr3rOEN.mjs +152 -0
  624. package/dist/media-usage-work-DJr3rOEN.mjs.map +1 -0
  625. package/dist/media-usage-write-fence-DW5oHT7q.mjs +42 -0
  626. package/dist/media-usage-write-fence-DW5oHT7q.mjs.map +1 -0
  627. package/dist/menus-DbgU9z5Q.mjs +3732 -0
  628. package/dist/menus-DbgU9z5Q.mjs.map +1 -0
  629. package/dist/menus-Wy8m5NcH.mjs +753 -0
  630. package/dist/menus-Wy8m5NcH.mjs.map +1 -0
  631. package/dist/migrations/index.d.mts +2 -2
  632. package/dist/migrations/index.d.mts.map +1 -1
  633. package/dist/migrations/index.mjs +6 -5
  634. package/dist/mime-CCYRC4r1.mjs +36 -0
  635. package/dist/mime-CCYRC4r1.mjs.map +1 -0
  636. package/dist/mode-CkmOhFqj.mjs +23 -0
  637. package/dist/mode-CkmOhFqj.mjs.map +1 -0
  638. package/dist/node-sqlite-compat-vpVaILnb.mjs +46 -0
  639. package/dist/node-sqlite-compat-vpVaILnb.mjs.map +1 -0
  640. package/dist/normalize-dChXQjwS.mjs +191 -0
  641. package/dist/normalize-dChXQjwS.mjs.map +1 -0
  642. package/dist/oauth-authorization-DZ-R-hmx.mjs +274 -0
  643. package/dist/oauth-authorization-DZ-R-hmx.mjs.map +1 -0
  644. package/dist/oauth-clients-BMPA8vjl.mjs +266 -0
  645. package/dist/oauth-clients-BMPA8vjl.mjs.map +1 -0
  646. package/dist/oauth-state-store-0gIdb48-.mjs +50 -0
  647. package/dist/oauth-state-store-0gIdb48-.mjs.map +1 -0
  648. package/dist/oauth-user-lookup-ChVW4UWu.mjs +26 -0
  649. package/dist/oauth-user-lookup-ChVW4UWu.mjs.map +1 -0
  650. package/dist/object-cache/memory.d.mts +1 -1
  651. package/dist/object-cache-DlSVbn5Y.mjs +534 -0
  652. package/dist/object-cache-DlSVbn5Y.mjs.map +1 -0
  653. package/dist/options-D5WcorD5.mjs +200 -0
  654. package/dist/options-D5WcorD5.mjs.map +1 -0
  655. package/dist/options-DAknChnw.d.mts +77 -0
  656. package/dist/options-DAknChnw.d.mts.map +1 -0
  657. package/dist/page/index.d.mts +2 -2
  658. package/dist/page/index.mjs +12 -11
  659. package/dist/page/index.mjs.map +1 -1
  660. package/dist/parse-Cr379Av9.mjs +81 -0
  661. package/dist/parse-Cr379Av9.mjs.map +1 -0
  662. package/dist/parse-tj9XLNO_.d.mts +165 -0
  663. package/dist/parse-tj9XLNO_.d.mts.map +1 -0
  664. package/dist/passkey-config-BD-wMaCf.mjs +46 -0
  665. package/dist/passkey-config-BD-wMaCf.mjs.map +1 -0
  666. package/dist/patterns-Do3iqi7N.mjs +145 -0
  667. package/dist/patterns-Do3iqi7N.mjs.map +1 -0
  668. package/dist/placeholder-CubPFn_L.d.mts +306 -0
  669. package/dist/placeholder-CubPFn_L.d.mts.map +1 -0
  670. package/dist/plugin-test-runtime.d.mts +97 -0
  671. package/dist/plugin-test-runtime.d.mts.map +1 -0
  672. package/dist/plugin-test-runtime.mjs +105 -0
  673. package/dist/plugin-types.d.mts +53 -15
  674. package/dist/plugin-types.d.mts.map +1 -1
  675. package/dist/plugin-types.mjs +18 -1
  676. package/dist/plugin-types.mjs.map +1 -0
  677. package/dist/plugin-utils.d.mts +12 -10
  678. package/dist/plugin-utils.d.mts.map +1 -1
  679. package/dist/plugins/adapt-sandbox-entry.d.mts +12 -10
  680. package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
  681. package/dist/plugins/adapt-sandbox-entry.mjs +18 -13
  682. package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
  683. package/dist/plugins/host.d.mts +7 -0
  684. package/dist/plugins/host.mjs +45 -0
  685. package/dist/plugins/http-wire.d.mts +25 -0
  686. package/dist/plugins/http-wire.d.mts.map +1 -0
  687. package/dist/plugins/http-wire.mjs +148 -0
  688. package/dist/plugins/http-wire.mjs.map +1 -0
  689. package/dist/plugins/secret-redactor.d.mts +9 -0
  690. package/dist/plugins/secret-redactor.d.mts.map +1 -0
  691. package/dist/plugins/secret-redactor.mjs +51 -0
  692. package/dist/plugins/secret-redactor.mjs.map +1 -0
  693. package/dist/plugins-DHurtdXQ.mjs +277 -0
  694. package/dist/plugins-DHurtdXQ.mjs.map +1 -0
  695. package/dist/policy-lyZnjpwz.mjs +45 -0
  696. package/dist/policy-lyZnjpwz.mjs.map +1 -0
  697. package/dist/portable-text-oAwodbPS.mjs +286 -0
  698. package/dist/portable-text-oAwodbPS.mjs.map +1 -0
  699. package/dist/preview-Cup2bj8c.mjs +107 -0
  700. package/dist/preview-Cup2bj8c.mjs.map +1 -0
  701. package/dist/protocol-C1CNiKX4.d.mts +61 -0
  702. package/dist/protocol-C1CNiKX4.d.mts.map +1 -0
  703. package/dist/public-submission-Cs-pFMQK.mjs +245 -0
  704. package/dist/public-submission-Cs-pFMQK.mjs.map +1 -0
  705. package/dist/public-url-BWVHsfQv.mjs +101 -0
  706. package/dist/public-url-BWVHsfQv.mjs.map +1 -0
  707. package/dist/query-D-lxiOgn.mjs +890 -0
  708. package/dist/query-D-lxiOgn.mjs.map +1 -0
  709. package/dist/query-D7kHKOws.mjs +41 -0
  710. package/dist/query-D7kHKOws.mjs.map +1 -0
  711. package/dist/rate-limit-CqJn-w4h.mjs +120 -0
  712. package/dist/rate-limit-CqJn-w4h.mjs.map +1 -0
  713. package/dist/redirect-BrChFPIu.mjs +17 -0
  714. package/dist/redirect-BrChFPIu.mjs.map +1 -0
  715. package/dist/redirect-D2Yo-b6S.mjs +415 -0
  716. package/dist/redirect-D2Yo-b6S.mjs.map +1 -0
  717. package/dist/redirects-BCiTaIQ-.mjs +146 -0
  718. package/dist/redirects-BCiTaIQ-.mjs.map +1 -0
  719. package/dist/redirects-ByItliuu.mjs +644 -0
  720. package/dist/redirects-ByItliuu.mjs.map +1 -0
  721. package/dist/registry/testing.d.mts +14 -0
  722. package/dist/registry/testing.d.mts.map +1 -0
  723. package/dist/registry/testing.mjs +255 -0
  724. package/dist/registry/testing.mjs.map +1 -0
  725. package/dist/registry-CkuPoZs7.mjs +1222 -0
  726. package/dist/registry-CkuPoZs7.mjs.map +1 -0
  727. package/dist/relation-XTAtOpJO.mjs +334 -0
  728. package/dist/relation-XTAtOpJO.mjs.map +1 -0
  729. package/dist/relations-B4w-G5U9.mjs +309 -0
  730. package/dist/relations-B4w-G5U9.mjs.map +1 -0
  731. package/dist/relations-O63JWBRj.mjs +403 -0
  732. package/dist/relations-O63JWBRj.mjs.map +1 -0
  733. package/dist/request-cache-DaMhSQdx.mjs +104 -0
  734. package/dist/request-cache-DaMhSQdx.mjs.map +1 -0
  735. package/dist/request-context.d.mts +1 -1
  736. package/dist/request-meta-C8yl_sIs.mjs +141 -0
  737. package/dist/request-meta-C8yl_sIs.mjs.map +1 -0
  738. package/dist/resolve-BJIS8wKr.mjs +199 -0
  739. package/dist/resolve-BJIS8wKr.mjs.map +1 -0
  740. package/dist/route-wire-D66L2oaZ.mjs +197 -0
  741. package/dist/route-wire-D66L2oaZ.mjs.map +1 -0
  742. package/dist/routes-DYsTe-oR.mjs +321 -0
  743. package/dist/routes-DYsTe-oR.mjs.map +1 -0
  744. package/dist/runner-3gfxRsJG.d.mts +68 -0
  745. package/dist/runner-3gfxRsJG.d.mts.map +1 -0
  746. package/dist/runner-ClrleR8A.mjs +5502 -0
  747. package/dist/runner-ClrleR8A.mjs.map +1 -0
  748. package/dist/runtime.d.mts +13 -11
  749. package/dist/runtime.d.mts.map +1 -1
  750. package/dist/runtime.mjs +6 -6
  751. package/dist/schema-CPhPM9Do.mjs +420 -0
  752. package/dist/schema-CPhPM9Do.mjs.map +1 -0
  753. package/dist/schema-DEERRrKS.mjs +9 -0
  754. package/dist/schema-DEERRrKS.mjs.map +1 -0
  755. package/dist/scopes-Bn8_rCSt.mjs +27 -0
  756. package/dist/scopes-Bn8_rCSt.mjs.map +1 -0
  757. package/dist/search-lami_Ota.mjs +448 -0
  758. package/dist/search-lami_Ota.mjs.map +1 -0
  759. package/dist/secrets-DNgVgz_e.mjs +341 -0
  760. package/dist/secrets-DNgVgz_e.mjs.map +1 -0
  761. package/dist/sections-BIpd4Cxf.mjs +346 -0
  762. package/dist/sections-BIpd4Cxf.mjs.map +1 -0
  763. package/dist/seed/index.d.mts +2 -2
  764. package/dist/seed/index.mjs +35 -33
  765. package/dist/seo/index.d.mts +3 -3
  766. package/dist/seo/index.mjs +26 -24
  767. package/dist/seo/index.mjs.map +1 -1
  768. package/dist/seo-BtU70b7l.mjs +114 -0
  769. package/dist/seo-BtU70b7l.mjs.map +1 -0
  770. package/dist/seo-_4qmazxz.mjs +133 -0
  771. package/dist/seo-_4qmazxz.mjs.map +1 -0
  772. package/dist/service-Bpy5iTX0.mjs +150 -0
  773. package/dist/service-Bpy5iTX0.mjs.map +1 -0
  774. package/dist/session-user-BQeS2Mrb.mjs +51 -0
  775. package/dist/session-user-BQeS2Mrb.mjs.map +1 -0
  776. package/dist/settings-DmroR53o.mjs +420 -0
  777. package/dist/settings-DmroR53o.mjs.map +1 -0
  778. package/dist/settings-g2F2a3Ub.mjs +51 -0
  779. package/dist/settings-g2F2a3Ub.mjs.map +1 -0
  780. package/dist/setup-complete-BrZaXpVV.mjs +26 -0
  781. package/dist/setup-complete-BrZaXpVV.mjs.map +1 -0
  782. package/dist/setup-nonce-Cb9-884O.mjs +25 -0
  783. package/dist/setup-nonce-Cb9-884O.mjs.map +1 -0
  784. package/dist/single-flight-cache-B5O2qhO1.mjs +104 -0
  785. package/dist/single-flight-cache-B5O2qhO1.mjs.map +1 -0
  786. package/dist/site-url-DjhYCaep.mjs +16 -0
  787. package/dist/site-url-DjhYCaep.mjs.map +1 -0
  788. package/dist/slugify-T5GHH42D.mjs +17 -0
  789. package/dist/slugify-T5GHH42D.mjs.map +1 -0
  790. package/dist/snapshot-C32Xuv3o.mjs +233 -0
  791. package/dist/snapshot-C32Xuv3o.mjs.map +1 -0
  792. package/dist/ssrf-Co1GGFZz.mjs +406 -0
  793. package/dist/ssrf-Co1GGFZz.mjs.map +1 -0
  794. package/dist/state-C7gCoiHr.mjs +153 -0
  795. package/dist/state-C7gCoiHr.mjs.map +1 -0
  796. package/dist/status-DLoBmcDz.mjs +30 -0
  797. package/dist/status-DLoBmcDz.mjs.map +1 -0
  798. package/dist/storage/local.d.mts +1 -1
  799. package/dist/storage/local.mjs +1 -1
  800. package/dist/storage/s3.d.mts +1 -1
  801. package/dist/storage/s3.mjs +1 -1
  802. package/dist/storage-query-CPctdMKX.d.mts +1519 -0
  803. package/dist/storage-query-CPctdMKX.d.mts.map +1 -0
  804. package/dist/target-CUKlGrXb.mjs +27 -0
  805. package/dist/target-CUKlGrXb.mjs.map +1 -0
  806. package/dist/taxonomies-BpqpXJUE.mjs +707 -0
  807. package/dist/taxonomies-BpqpXJUE.mjs.map +1 -0
  808. package/dist/taxonomies-ClCo4IGO.mjs +899 -0
  809. package/dist/taxonomies-ClCo4IGO.mjs.map +1 -0
  810. package/dist/taxonomy-Dj1vpw5E.mjs +508 -0
  811. package/dist/taxonomy-Dj1vpw5E.mjs.map +1 -0
  812. package/dist/tokens-Ns02GAma.mjs +171 -0
  813. package/dist/tokens-Ns02GAma.mjs.map +1 -0
  814. package/dist/transaction-BcJO4Tmc.mjs +29 -0
  815. package/dist/transaction-BcJO4Tmc.mjs.map +1 -0
  816. package/dist/transport-B8P1xsqk.mjs +136 -0
  817. package/dist/transport-B8P1xsqk.mjs.map +1 -0
  818. package/dist/transport-BLHZZcD_.d.mts +42 -0
  819. package/dist/transport-BLHZZcD_.d.mts.map +1 -0
  820. package/dist/trusted-proxy-Cg7SuD15.mjs +51 -0
  821. package/dist/trusted-proxy-Cg7SuD15.mjs.map +1 -0
  822. package/dist/turnstile-DWCSh_Qc.mjs +53 -0
  823. package/dist/turnstile-DWCSh_Qc.mjs.map +1 -0
  824. package/dist/types-B3RkqvDW.mjs +156 -0
  825. package/dist/types-B3RkqvDW.mjs.map +1 -0
  826. package/dist/types-BkUg2yHx.mjs +92 -0
  827. package/dist/types-BkUg2yHx.mjs.map +1 -0
  828. package/dist/types-BtuppOTV.mjs +16 -0
  829. package/dist/types-BtuppOTV.mjs.map +1 -0
  830. package/dist/types-CCR3ivXE.d.mts +363 -0
  831. package/dist/types-CCR3ivXE.d.mts.map +1 -0
  832. package/dist/types-CSHgU_-_.mjs +18 -0
  833. package/dist/types-CSHgU_-_.mjs.map +1 -0
  834. package/dist/types-CbwqGOXm.d.mts +766 -0
  835. package/dist/types-CbwqGOXm.d.mts.map +1 -0
  836. package/dist/types-D4RGIc2I.d.mts +198 -0
  837. package/dist/types-D4RGIc2I.d.mts.map +1 -0
  838. package/dist/types-DEHidMEk.d.mts +1637 -0
  839. package/dist/types-DEHidMEk.d.mts.map +1 -0
  840. package/dist/types-DQeU2SR7.d.mts +279 -0
  841. package/dist/types-DQeU2SR7.d.mts.map +1 -0
  842. package/dist/types-DxQWoQLA.d.mts +264 -0
  843. package/dist/types-DxQWoQLA.d.mts.map +1 -0
  844. package/dist/types-FBBnGZ2Y.d.mts +198 -0
  845. package/dist/types-FBBnGZ2Y.d.mts.map +1 -0
  846. package/dist/types-ZCnlropY.mjs +69 -0
  847. package/dist/types-ZCnlropY.mjs.map +1 -0
  848. package/dist/types-_Qtyawiy.d.mts +124 -0
  849. package/dist/types-_Qtyawiy.d.mts.map +1 -0
  850. package/dist/types-gC6FAoa_.d.mts +75 -0
  851. package/dist/types-gC6FAoa_.d.mts.map +1 -0
  852. package/dist/types-k--LneIF.mjs +22 -0
  853. package/dist/types-k--LneIF.mjs.map +1 -0
  854. package/dist/upload-attempts-2xdnoKGe.mjs +27 -0
  855. package/dist/upload-attempts-2xdnoKGe.mjs.map +1 -0
  856. package/dist/url-pattern-3m3reMzr.mjs +33 -0
  857. package/dist/url-pattern-3m3reMzr.mjs.map +1 -0
  858. package/dist/user-DroRntkx.mjs +171 -0
  859. package/dist/user-DroRntkx.mjs.map +1 -0
  860. package/dist/utils-CC2oNGV8.mjs +435 -0
  861. package/dist/utils-CC2oNGV8.mjs.map +1 -0
  862. package/dist/validate-BCP9HNDn.mjs +384 -0
  863. package/dist/validate-BCP9HNDn.mjs.map +1 -0
  864. package/dist/validate-CyQ7I3xF.d.mts +410 -0
  865. package/dist/validate-CyQ7I3xF.d.mts.map +1 -0
  866. package/dist/validate-DANX1-Qi.mjs +120 -0
  867. package/dist/validate-DANX1-Qi.mjs.map +1 -0
  868. package/dist/validation-DBy6WF94.mjs +216 -0
  869. package/dist/validation-DBy6WF94.mjs.map +1 -0
  870. package/dist/version-B57E4Uo7.mjs +7 -0
  871. package/dist/version-B57E4Uo7.mjs.map +1 -0
  872. package/dist/widgets-wQ7Xcgq8.mjs +126 -0
  873. package/dist/widgets-wQ7Xcgq8.mjs.map +1 -0
  874. package/dist/wxr-taxonomies-DIHfvEDt.mjs +406 -0
  875. package/dist/wxr-taxonomies-DIHfvEDt.mjs.map +1 -0
  876. package/dist/wxr-taxonomies-DU2ZSiGc.d.mts +34 -0
  877. package/dist/wxr-taxonomies-DU2ZSiGc.d.mts.map +1 -0
  878. package/dist/zod-generator-D_yHIWfs.mjs +329 -0
  879. package/dist/zod-generator-D_yHIWfs.mjs.map +1 -0
  880. package/package.json +36 -11
  881. package/src/api/errors.ts +16 -0
  882. package/src/api/handlers/backup.ts +11 -5
  883. package/src/api/handlers/content.ts +160 -6
  884. package/src/api/handlers/dashboard.ts +31 -1
  885. package/src/api/handlers/index.ts +3 -0
  886. package/src/api/handlers/manifest.ts +4 -6
  887. package/src/api/handlers/marketplace.ts +99 -15
  888. package/src/api/handlers/media-upload.ts +31 -4
  889. package/src/api/handlers/plugin-settings.ts +35 -3
  890. package/src/api/handlers/redirects.ts +221 -138
  891. package/src/api/handlers/registry.ts +62 -21
  892. package/src/api/handlers/revision.ts +14 -26
  893. package/src/api/handlers/snapshot.ts +4 -1
  894. package/src/api/handlers/taxonomies.ts +70 -5
  895. package/src/api/handlers/validation.ts +120 -19
  896. package/src/api/openapi/document.ts +34 -17
  897. package/src/api/schemas/content.ts +26 -14
  898. package/src/api/schemas/entry-lock.ts +9 -0
  899. package/src/api/schemas/search.ts +4 -0
  900. package/src/api/types.ts +2 -0
  901. package/src/astro/integration/index.ts +16 -3
  902. package/src/astro/integration/routes.ts +84 -0
  903. package/src/astro/integration/runtime.ts +31 -23
  904. package/src/astro/integration/virtual-modules.ts +4 -0
  905. package/src/astro/integration/vite-config.ts +1 -0
  906. package/src/astro/middleware/auth.ts +25 -4
  907. package/src/astro/middleware/request-context.ts +28 -10
  908. package/src/astro/middleware.ts +17 -1
  909. package/src/astro/prefetch.ts +2 -2
  910. package/src/astro/routes/api/admin/comments/[id]/status.ts +22 -58
  911. package/src/astro/routes/api/admin/plugins/[id]/disable.ts +2 -15
  912. package/src/astro/routes/api/admin/plugins/[id]/enable.ts +2 -25
  913. package/src/astro/routes/api/admin/plugins/[id]/uninstall.ts +1 -0
  914. package/src/astro/routes/api/admin/plugins/[id]/update.ts +23 -4
  915. package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +12 -2
  916. package/src/astro/routes/api/admin/plugins/registry/[id]/uninstall.ts +1 -0
  917. package/src/astro/routes/api/admin/plugins/registry/[id]/update.ts +29 -10
  918. package/src/astro/routes/api/admin/plugins/registry/artifact.ts +8 -2
  919. package/src/astro/routes/api/admin/plugins/registry/install.ts +15 -4
  920. package/src/astro/routes/api/admin/plugins/registry/verify.ts +2 -1
  921. package/src/astro/routes/api/admin/plugins/updates.ts +6 -1
  922. package/src/astro/routes/api/admin/scheduled-policy-rejections/[collection]/[id].ts +34 -0
  923. package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +4 -259
  924. package/src/astro/routes/api/content/[collection]/[id]/plugin-extensions/[pluginId]/[kind]/[extensionId].ts +29 -0
  925. package/src/astro/routes/api/content/[collection]/[id]/publish.ts +10 -3
  926. package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +10 -1
  927. package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +5 -1
  928. package/src/astro/routes/api/health.ts +23 -0
  929. package/src/astro/routes/api/manifest.ts +14 -4
  930. package/src/astro/routes/api/mcp.ts +2 -1
  931. package/src/astro/routes/api/media/asset/[id]/[filename].ts +50 -0
  932. package/src/astro/routes/api/plugins/[pluginId]/[...path].ts +13 -81
  933. package/src/astro/routes/api/redirects/[id].ts +0 -3
  934. package/src/astro/routes/api/redirects/index.ts +0 -2
  935. package/src/astro/routes/api/search/index.ts +1 -0
  936. package/src/astro/routes/api/visual-editing/action-token.ts +36 -0
  937. package/src/astro/routes/api/visual-editing/content/[collection]/[id]/publish.ts +32 -0
  938. package/src/astro/routes/api/visual-editing/toolbar-labels.ts +16 -0
  939. package/src/astro/routes/sitemap-[collection].xml.ts +7 -4
  940. package/src/astro/types.ts +70 -9
  941. package/src/cli/commands/bundle-utils.ts +19 -19
  942. package/src/cli/commands/bundle.ts +9 -6
  943. package/src/cli/commands/content.ts +1 -1
  944. package/src/cli/commands/doctor.ts +25 -0
  945. package/src/cli/commands/export-seed.ts +193 -56
  946. package/src/cli/commands/migrate.ts +71 -23
  947. package/src/cli/commands/publish.ts +2 -2
  948. package/src/comments/public-submission.ts +246 -0
  949. package/src/comments/service.ts +59 -12
  950. package/src/components/EmDashHead.astro +1 -0
  951. package/src/components/widgets/Archives.astro +6 -5
  952. package/src/config/secrets.ts +25 -11
  953. package/src/content/known-fields.ts +44 -0
  954. package/src/database/connection.ts +5 -1
  955. package/src/database/content-datetime.ts +123 -0
  956. package/src/database/datetime-storage.ts +452 -0
  957. package/src/database/dialect-helpers.ts +36 -1
  958. package/src/database/migration-lock.ts +140 -0
  959. package/src/database/migrations/078_menu_item_translation_groups.ts +15 -0
  960. package/src/database/migrations/079_datetime_normalization.ts +13 -0
  961. package/src/database/migrations/080_content_translation_locale_unique.ts +88 -0
  962. package/src/database/migrations/081_redirect_write_guards.ts +257 -0
  963. package/src/database/migrations/082_taxonomy_translation_locale_unique.ts +49 -0
  964. package/src/database/migrations/runner.ts +57 -15
  965. package/src/database/pg-migration-lock.ts +2 -2
  966. package/src/database/repositories/byline.ts +9 -0
  967. package/src/database/repositories/comment.ts +86 -0
  968. package/src/database/repositories/content.ts +391 -69
  969. package/src/database/repositories/media.ts +35 -4
  970. package/src/database/repositories/menu.ts +1 -0
  971. package/src/database/repositories/options.ts +46 -4
  972. package/src/database/repositories/redirect.ts +259 -64
  973. package/src/database/repositories/revision.ts +116 -17
  974. package/src/database/repositories/taxonomy.ts +34 -0
  975. package/src/database/repositories/types.ts +2 -0
  976. package/src/database/types.ts +11 -0
  977. package/src/datetime-normalization.ts +311 -0
  978. package/src/db/node-sqlite-compat.ts +3 -2
  979. package/src/emdash-runtime.ts +1925 -422
  980. package/src/fields/image.ts +2 -0
  981. package/src/i18n/config.ts +6 -6
  982. package/src/i18n/resolve.ts +54 -11
  983. package/src/index.ts +87 -0
  984. package/src/loader.ts +14 -0
  985. package/src/mcp/server.ts +194 -64
  986. package/src/media/usage/extractor.ts +50 -15
  987. package/src/media/usage/types.ts +1 -1
  988. package/src/menus/index.ts +49 -16
  989. package/src/migrations/direct-executor.ts +40 -2
  990. package/src/migrations/index.ts +1 -0
  991. package/src/migrations/protocol.ts +11 -1
  992. package/src/plugin-test-runtime.ts +17 -0
  993. package/src/plugin-types.ts +119 -21
  994. package/src/plugins/adapt-sandbox-entry.ts +34 -27
  995. package/src/plugins/content-access.ts +170 -0
  996. package/src/plugins/content-policy.ts +74 -0
  997. package/src/plugins/context.ts +742 -150
  998. package/src/plugins/cron.ts +18 -10
  999. package/src/plugins/define-plugin.ts +55 -54
  1000. package/src/plugins/editor-draft.ts +257 -0
  1001. package/src/plugins/hooks.ts +129 -2
  1002. package/src/plugins/host.ts +29 -0
  1003. package/src/plugins/http-route-dispatch.ts +389 -0
  1004. package/src/plugins/http-wire.ts +180 -0
  1005. package/src/plugins/index.ts +88 -3
  1006. package/src/plugins/install-finalization.ts +77 -0
  1007. package/src/plugins/lifecycle.ts +47 -0
  1008. package/src/plugins/manifest-schema.ts +314 -58
  1009. package/src/plugins/media.ts +166 -0
  1010. package/src/plugins/request-meta.ts +12 -2
  1011. package/src/plugins/route-wire.ts +304 -0
  1012. package/src/plugins/routes.ts +38 -5
  1013. package/src/plugins/sandbox/index.ts +4 -0
  1014. package/src/plugins/sandbox/proxy.ts +129 -0
  1015. package/src/plugins/sandbox/types.ts +67 -5
  1016. package/src/plugins/secret-redactor.ts +65 -0
  1017. package/src/plugins/settings.ts +303 -0
  1018. package/src/plugins/state.ts +26 -0
  1019. package/src/plugins/types.ts +488 -15
  1020. package/src/query.ts +55 -1
  1021. package/src/registry/authoritative-records.ts +26 -0
  1022. package/src/registry/config.ts +70 -22
  1023. package/src/registry/testing.ts +100 -0
  1024. package/src/registry/types.ts +7 -64
  1025. package/src/scheduled-publish.ts +70 -3
  1026. package/src/schema/index.ts +1 -0
  1027. package/src/schema/registry.ts +45 -1
  1028. package/src/schema/types.ts +7 -0
  1029. package/src/schema/zod-generator.ts +5 -13
  1030. package/src/search/fts-manager.ts +3 -3
  1031. package/src/search/query.ts +32 -5
  1032. package/src/search/types.ts +8 -0
  1033. package/src/seed/apply.ts +37 -3
  1034. package/src/seed/types.ts +6 -1
  1035. package/src/seo/hreflang.ts +9 -6
  1036. package/src/settings/index.ts +53 -11
  1037. package/src/visual-editing/action-token.ts +31 -0
  1038. package/src/visual-editing/toolbar-bootstrap.ts +31 -6
  1039. package/src/visual-editing/toolbar.ts +103 -12
  1040. package/src/widgets/archives.ts +10 -9
  1041. package/src/widgets/index.ts +11 -1
  1042. package/dist/activation-DyNTe_Tl.mjs +0 -382
  1043. package/dist/activation-DyNTe_Tl.mjs.map +0 -1
  1044. package/dist/adapters-DCEgOBXi.d.mts +0 -171
  1045. package/dist/adapters-DCEgOBXi.d.mts.map +0 -1
  1046. package/dist/after-CBU2vkoO.mjs +0 -96
  1047. package/dist/after-CBU2vkoO.mjs.map +0 -1
  1048. package/dist/allowed-origins-GFUVavRj.mjs +0 -116
  1049. package/dist/allowed-origins-GFUVavRj.mjs.map +0 -1
  1050. package/dist/api-BvxJmnFY.mjs +0 -10094
  1051. package/dist/api-BvxJmnFY.mjs.map +0 -1
  1052. package/dist/api-tokens-xpGqMHrC.mjs +0 -163
  1053. package/dist/api-tokens-xpGqMHrC.mjs.map +0 -1
  1054. package/dist/apply-DLmM3R7f.mjs +0 -984
  1055. package/dist/apply-DLmM3R7f.mjs.map +0 -1
  1056. package/dist/artifact-fetch-P2JXVwOq.mjs +0 -972
  1057. package/dist/artifact-fetch-P2JXVwOq.mjs.map +0 -1
  1058. package/dist/authorize-C2QHlWSS.mjs +0 -40
  1059. package/dist/authorize-C2QHlWSS.mjs.map +0 -1
  1060. package/dist/backup-oS8ft5Cm.mjs +0 -241
  1061. package/dist/backup-oS8ft5Cm.mjs.map +0 -1
  1062. package/dist/base64-CvLhUKQv.mjs +0 -63
  1063. package/dist/base64-CvLhUKQv.mjs.map +0 -1
  1064. package/dist/bundle-CL0JjIPx.mjs +0 -663
  1065. package/dist/bundle-CL0JjIPx.mjs.map +0 -1
  1066. package/dist/byline-Vdi85CsZ.mjs +0 -902
  1067. package/dist/byline-Vdi85CsZ.mjs.map +0 -1
  1068. package/dist/byline-fields-DPVRFMz2.mjs +0 -123
  1069. package/dist/byline-fields-DPVRFMz2.mjs.map +0 -1
  1070. package/dist/byline-registry-BxDGIO0I.mjs +0 -406
  1071. package/dist/byline-registry-BxDGIO0I.mjs.map +0 -1
  1072. package/dist/bylines-BX8QhcTk.mjs +0 -232
  1073. package/dist/bylines-BX8QhcTk.mjs.map +0 -1
  1074. package/dist/bylines-w-E1IEQd.mjs +0 -214
  1075. package/dist/bylines-w-E1IEQd.mjs.map +0 -1
  1076. package/dist/cache--7HKu5Xm.mjs +0 -108
  1077. package/dist/cache--7HKu5Xm.mjs.map +0 -1
  1078. package/dist/capture-triggers-CeAsC76Z.mjs +0 -362
  1079. package/dist/capture-triggers-CeAsC76Z.mjs.map +0 -1
  1080. package/dist/challenge-store-BIOak-tp.mjs +0 -51
  1081. package/dist/challenge-store-BIOak-tp.mjs.map +0 -1
  1082. package/dist/chrome-tags-DzDQBCjX.mjs +0 -24
  1083. package/dist/chrome-tags-DzDQBCjX.mjs.map +0 -1
  1084. package/dist/chunks-VG_tyqnP.mjs +0 -25
  1085. package/dist/chunks-VG_tyqnP.mjs.map +0 -1
  1086. package/dist/collection-deletion-BCwaWTDw.mjs +0 -436
  1087. package/dist/collection-deletion-BCwaWTDw.mjs.map +0 -1
  1088. package/dist/collection-slugs-cache-7lTmNzeA.mjs +0 -85
  1089. package/dist/collection-slugs-cache-7lTmNzeA.mjs.map +0 -1
  1090. package/dist/comment-reaction-CDyvPQRj.mjs +0 -85
  1091. package/dist/comment-reaction-CDyvPQRj.mjs.map +0 -1
  1092. package/dist/comment-vxOzWbZN.mjs +0 -255
  1093. package/dist/comment-vxOzWbZN.mjs.map +0 -1
  1094. package/dist/comments-VzmVLyaC.mjs +0 -204
  1095. package/dist/comments-VzmVLyaC.mjs.map +0 -1
  1096. package/dist/components-CL6Wkdk-.mjs +0 -108
  1097. package/dist/components-CL6Wkdk-.mjs.map +0 -1
  1098. package/dist/config--eWjQJE5.mjs +0 -217
  1099. package/dist/config--eWjQJE5.mjs.map +0 -1
  1100. package/dist/config-C3EBstHi.mjs +0 -72
  1101. package/dist/config-C3EBstHi.mjs.map +0 -1
  1102. package/dist/config-CGAhyOjP.d.mts +0 -6653
  1103. package/dist/config-CGAhyOjP.d.mts.map +0 -1
  1104. package/dist/config-ChFzshGd.d.mts +0 -34
  1105. package/dist/config-ChFzshGd.d.mts.map +0 -1
  1106. package/dist/content-CNfMWuhY.mjs +0 -1841
  1107. package/dist/content-CNfMWuhY.mjs.map +0 -1
  1108. package/dist/content-list-query-B8d4UQp9.d.mts +0 -26
  1109. package/dist/content-list-query-B8d4UQp9.d.mts.map +0 -1
  1110. package/dist/content-refresh-GTMyi2Xy.mjs +0 -3588
  1111. package/dist/content-refresh-GTMyi2Xy.mjs.map +0 -1
  1112. package/dist/content-repair-CIMt5C0U.mjs +0 -440
  1113. package/dist/content-repair-CIMt5C0U.mjs.map +0 -1
  1114. package/dist/context-C9PB8vGd.mjs +0 -1308
  1115. package/dist/context-C9PB8vGd.mjs.map +0 -1
  1116. package/dist/cron-DHAy9oyq.mjs +0 -277
  1117. package/dist/cron-DHAy9oyq.mjs.map +0 -1
  1118. package/dist/dashboard-BNSvAN8A.mjs +0 -140
  1119. package/dist/dashboard-BNSvAN8A.mjs.map +0 -1
  1120. package/dist/db-errors-Cl-sKYTm.mjs +0 -55
  1121. package/dist/db-errors-Cl-sKYTm.mjs.map +0 -1
  1122. package/dist/default-ByZ0JqZo.mjs +0 -81
  1123. package/dist/default-ByZ0JqZo.mjs.map +0 -1
  1124. package/dist/deferred-tasks-Cu4NSJpa.d.mts +0 -9
  1125. package/dist/deferred-tasks-Cu4NSJpa.d.mts.map +0 -1
  1126. package/dist/dev-typegen-DHT7lcMU.mjs +0 -29
  1127. package/dist/dev-typegen-DHT7lcMU.mjs.map +0 -1
  1128. package/dist/device-flow-Cf6bhCCT.mjs +0 -466
  1129. package/dist/device-flow-Cf6bhCCT.mjs.map +0 -1
  1130. package/dist/dialect-helpers-BcQvkHgn.mjs +0 -283
  1131. package/dist/dialect-helpers-BcQvkHgn.mjs.map +0 -1
  1132. package/dist/direct-executor-yAyUGSqB.mjs +0 -85
  1133. package/dist/direct-executor-yAyUGSqB.mjs.map +0 -1
  1134. package/dist/dist-BAsh8dbf.mjs +0 -810
  1135. package/dist/dist-BAsh8dbf.mjs.map +0 -1
  1136. package/dist/email-console-DNup1Fku.mjs +0 -50
  1137. package/dist/email-console-DNup1Fku.mjs.map +0 -1
  1138. package/dist/enrich-t2Xvjdqa.mjs +0 -194
  1139. package/dist/enrich-t2Xvjdqa.mjs.map +0 -1
  1140. package/dist/entry-lock-BEr8gDkG.mjs +0 -163
  1141. package/dist/entry-lock-BEr8gDkG.mjs.map +0 -1
  1142. package/dist/entry-lock-CGAtrwAR.d.mts +0 -3409
  1143. package/dist/entry-lock-CGAtrwAR.d.mts.map +0 -1
  1144. package/dist/entry-lock-DIYHAaSw.mjs +0 -1281
  1145. package/dist/entry-lock-DIYHAaSw.mjs.map +0 -1
  1146. package/dist/entry-locks-BEcX7ET0.mjs +0 -167
  1147. package/dist/entry-locks-BEcX7ET0.mjs.map +0 -1
  1148. package/dist/error-BDcFyoRt.mjs +0 -90
  1149. package/dist/error-BDcFyoRt.mjs.map +0 -1
  1150. package/dist/errors-DvMdNrgf.mjs +0 -434
  1151. package/dist/errors-DvMdNrgf.mjs.map +0 -1
  1152. package/dist/escape-B3asJC6W.mjs +0 -9
  1153. package/dist/escape-B3asJC6W.mjs.map +0 -1
  1154. package/dist/field-defs-cache-Cf5FHK0M.mjs +0 -77
  1155. package/dist/field-defs-cache-Cf5FHK0M.mjs.map +0 -1
  1156. package/dist/focal-point-BeWFo6Xx.mjs +0 -23
  1157. package/dist/focal-point-BeWFo6Xx.mjs.map +0 -1
  1158. package/dist/fts-manager-iddym8cd.mjs +0 -413
  1159. package/dist/fts-manager-iddym8cd.mjs.map +0 -1
  1160. package/dist/hash-BRweX6jz.mjs +0 -37
  1161. package/dist/hash-BRweX6jz.mjs.map +0 -1
  1162. package/dist/hook-result-BrshYHLx.d.mts +0 -31
  1163. package/dist/hook-result-BrshYHLx.d.mts.map +0 -1
  1164. package/dist/hreflang-CQpu5bMy.d.mts +0 -48
  1165. package/dist/hreflang-CQpu5bMy.d.mts.map +0 -1
  1166. package/dist/hreflang-DshnweTC.mjs +0 -103
  1167. package/dist/hreflang-DshnweTC.mjs.map +0 -1
  1168. package/dist/identity-CjGKDq8J.mjs +0 -35
  1169. package/dist/identity-CjGKDq8J.mjs.map +0 -1
  1170. package/dist/import-D96g2otw.mjs +0 -2020
  1171. package/dist/import-D96g2otw.mjs.map +0 -1
  1172. package/dist/index-1ECYpfiF.d.mts +0 -278
  1173. package/dist/index-1ECYpfiF.d.mts.map +0 -1
  1174. package/dist/init-lock-CFNBe_iH.mjs +0 -56
  1175. package/dist/init-lock-CFNBe_iH.mjs.map +0 -1
  1176. package/dist/load-DPtY9cZo.mjs +0 -28
  1177. package/dist/load-DPtY9cZo.mjs.map +0 -1
  1178. package/dist/loader-WJi6GFRn.mjs +0 -1004
  1179. package/dist/loader-WJi6GFRn.mjs.map +0 -1
  1180. package/dist/manifest-builder-BfNlGQIA.mjs +0 -189
  1181. package/dist/manifest-builder-BfNlGQIA.mjs.map +0 -1
  1182. package/dist/manifest-schema-CILooI5J.mjs +0 -301
  1183. package/dist/manifest-schema-CILooI5J.mjs.map +0 -1
  1184. package/dist/media-BBm8Wg3f.mjs +0 -318
  1185. package/dist/media-BBm8Wg3f.mjs.map +0 -1
  1186. package/dist/media-C1EIZKh1.mjs +0 -464
  1187. package/dist/media-C1EIZKh1.mjs.map +0 -1
  1188. package/dist/media-allowlist-elXJgb_K.mjs +0 -44
  1189. package/dist/media-allowlist-elXJgb_K.mjs.map +0 -1
  1190. package/dist/media-folders-DASfX_DH.mjs +0 -210
  1191. package/dist/media-folders-DASfX_DH.mjs.map +0 -1
  1192. package/dist/media-upload-C7_AQJ5v.mjs +0 -147
  1193. package/dist/media-upload-C7_AQJ5v.mjs.map +0 -1
  1194. package/dist/media-url-8dVl1loq.mjs +0 -43
  1195. package/dist/media-url-8dVl1loq.mjs.map +0 -1
  1196. package/dist/media-usage-C1EswMTq.mjs +0 -1833
  1197. package/dist/media-usage-C1EswMTq.mjs.map +0 -1
  1198. package/dist/media-usage-activation-CrHNltlL.mjs +0 -78
  1199. package/dist/media-usage-activation-CrHNltlL.mjs.map +0 -1
  1200. package/dist/media-usage-work-C5B1zT1c.mjs +0 -586
  1201. package/dist/media-usage-work-C5B1zT1c.mjs.map +0 -1
  1202. package/dist/media-usage-work-IkQx_Yz6.mjs +0 -152
  1203. package/dist/media-usage-work-IkQx_Yz6.mjs.map +0 -1
  1204. package/dist/media-usage-write-fence-B9anjOSg.mjs +0 -42
  1205. package/dist/media-usage-write-fence-B9anjOSg.mjs.map +0 -1
  1206. package/dist/menus-D8mC4eaN.mjs +0 -3989
  1207. package/dist/menus-D8mC4eaN.mjs.map +0 -1
  1208. package/dist/menus-UdwjHZJC.mjs +0 -752
  1209. package/dist/menus-UdwjHZJC.mjs.map +0 -1
  1210. package/dist/mime-DYpsOAny.mjs +0 -36
  1211. package/dist/mime-DYpsOAny.mjs.map +0 -1
  1212. package/dist/mode-Dm4BHhRH.mjs +0 -23
  1213. package/dist/mode-Dm4BHhRH.mjs.map +0 -1
  1214. package/dist/node-sqlite-compat-2sezm-Zd.mjs +0 -46
  1215. package/dist/node-sqlite-compat-2sezm-Zd.mjs.map +0 -1
  1216. package/dist/normalize-4nkKGsuW.mjs +0 -191
  1217. package/dist/normalize-4nkKGsuW.mjs.map +0 -1
  1218. package/dist/oauth-authorization-BxE_lURD.mjs +0 -274
  1219. package/dist/oauth-authorization-BxE_lURD.mjs.map +0 -1
  1220. package/dist/oauth-clients-DJIdOdq0.mjs +0 -266
  1221. package/dist/oauth-clients-DJIdOdq0.mjs.map +0 -1
  1222. package/dist/oauth-state-store-CsdxP57n.mjs +0 -50
  1223. package/dist/oauth-state-store-CsdxP57n.mjs.map +0 -1
  1224. package/dist/oauth-user-lookup-HzzW-dkF.mjs +0 -26
  1225. package/dist/oauth-user-lookup-HzzW-dkF.mjs.map +0 -1
  1226. package/dist/object-cache-DVKnyOfy.mjs +0 -534
  1227. package/dist/object-cache-DVKnyOfy.mjs.map +0 -1
  1228. package/dist/options-D1FBiAv1.mjs +0 -172
  1229. package/dist/options-D1FBiAv1.mjs.map +0 -1
  1230. package/dist/options-D8Y0VHc7.d.mts +0 -227
  1231. package/dist/options-D8Y0VHc7.d.mts.map +0 -1
  1232. package/dist/parse-WRg5C3NX.mjs +0 -81
  1233. package/dist/parse-WRg5C3NX.mjs.map +0 -1
  1234. package/dist/passkey-config-qIdO-wF6.mjs +0 -46
  1235. package/dist/passkey-config-qIdO-wF6.mjs.map +0 -1
  1236. package/dist/patterns-DC8CLptu.mjs +0 -145
  1237. package/dist/patterns-DC8CLptu.mjs.map +0 -1
  1238. package/dist/placeholder-COrvARyD.d.mts +0 -306
  1239. package/dist/placeholder-COrvARyD.d.mts.map +0 -1
  1240. package/dist/policy-XCfb-IE9.mjs +0 -45
  1241. package/dist/policy-XCfb-IE9.mjs.map +0 -1
  1242. package/dist/portable-text-BS3d5n-0.mjs +0 -286
  1243. package/dist/portable-text-BS3d5n-0.mjs.map +0 -1
  1244. package/dist/preview-BxwsGgGp.mjs +0 -107
  1245. package/dist/preview-BxwsGgGp.mjs.map +0 -1
  1246. package/dist/protocol-CLn58-nw.d.mts +0 -52
  1247. package/dist/protocol-CLn58-nw.d.mts.map +0 -1
  1248. package/dist/public-url-FWWAvnre.mjs +0 -101
  1249. package/dist/public-url-FWWAvnre.mjs.map +0 -1
  1250. package/dist/query-DygOte9M.mjs +0 -890
  1251. package/dist/query-DygOte9M.mjs.map +0 -1
  1252. package/dist/query-gtXT03Wc.mjs +0 -41
  1253. package/dist/query-gtXT03Wc.mjs.map +0 -1
  1254. package/dist/rate-limit-CQUPm0dh.mjs +0 -120
  1255. package/dist/rate-limit-CQUPm0dh.mjs.map +0 -1
  1256. package/dist/redirect-D1cWafi6.mjs +0 -17
  1257. package/dist/redirect-D1cWafi6.mjs.map +0 -1
  1258. package/dist/redirect-DId44BS1.mjs +0 -326
  1259. package/dist/redirect-DId44BS1.mjs.map +0 -1
  1260. package/dist/redirects-DN-ZE33W.mjs +0 -579
  1261. package/dist/redirects-DN-ZE33W.mjs.map +0 -1
  1262. package/dist/registry-DTqaqxed.mjs +0 -1195
  1263. package/dist/registry-DTqaqxed.mjs.map +0 -1
  1264. package/dist/relation-DxgCHOBw.mjs +0 -334
  1265. package/dist/relation-DxgCHOBw.mjs.map +0 -1
  1266. package/dist/relations-KKDSLUwS.mjs +0 -403
  1267. package/dist/relations-KKDSLUwS.mjs.map +0 -1
  1268. package/dist/relations-rOmbndUJ.mjs +0 -309
  1269. package/dist/relations-rOmbndUJ.mjs.map +0 -1
  1270. package/dist/request-cache-DAZZmesc.mjs +0 -104
  1271. package/dist/request-cache-DAZZmesc.mjs.map +0 -1
  1272. package/dist/request-meta-BgjUQLQ-.mjs +0 -140
  1273. package/dist/request-meta-BgjUQLQ-.mjs.map +0 -1
  1274. package/dist/resolve-Cy0aWSRj.mjs +0 -176
  1275. package/dist/resolve-Cy0aWSRj.mjs.map +0 -1
  1276. package/dist/runner-CfwysRM0.d.mts +0 -67
  1277. package/dist/runner-CfwysRM0.d.mts.map +0 -1
  1278. package/dist/runner-nEzvnogG.mjs +0 -4800
  1279. package/dist/runner-nEzvnogG.mjs.map +0 -1
  1280. package/dist/schema-CRu38Pr5.mjs +0 -9
  1281. package/dist/schema-CRu38Pr5.mjs.map +0 -1
  1282. package/dist/schema-DifxndJx.mjs +0 -420
  1283. package/dist/schema-DifxndJx.mjs.map +0 -1
  1284. package/dist/scopes-D5A1OZbq.mjs +0 -27
  1285. package/dist/scopes-D5A1OZbq.mjs.map +0 -1
  1286. package/dist/search-DEPFSBFq.mjs +0 -439
  1287. package/dist/search-DEPFSBFq.mjs.map +0 -1
  1288. package/dist/secrets-CdfzLdoO.mjs +0 -330
  1289. package/dist/secrets-CdfzLdoO.mjs.map +0 -1
  1290. package/dist/sections-3X52kmIR.mjs +0 -346
  1291. package/dist/sections-3X52kmIR.mjs.map +0 -1
  1292. package/dist/seo-Bw68KxRc.mjs +0 -133
  1293. package/dist/seo-Bw68KxRc.mjs.map +0 -1
  1294. package/dist/seo-C4AmbsMU.mjs +0 -114
  1295. package/dist/seo-C4AmbsMU.mjs.map +0 -1
  1296. package/dist/service-J_-Vgo7R.mjs +0 -195
  1297. package/dist/service-J_-Vgo7R.mjs.map +0 -1
  1298. package/dist/session-user-CbnMMwk6.mjs +0 -51
  1299. package/dist/session-user-CbnMMwk6.mjs.map +0 -1
  1300. package/dist/settings-AnEFYICn.mjs +0 -51
  1301. package/dist/settings-AnEFYICn.mjs.map +0 -1
  1302. package/dist/settings-DcMjREe5.mjs +0 -258
  1303. package/dist/settings-DcMjREe5.mjs.map +0 -1
  1304. package/dist/setup-complete-BClXXTvr.mjs +0 -26
  1305. package/dist/setup-complete-BClXXTvr.mjs.map +0 -1
  1306. package/dist/setup-nonce-BheRa4RG.mjs +0 -25
  1307. package/dist/setup-nonce-BheRa4RG.mjs.map +0 -1
  1308. package/dist/single-flight-cache-jaswDzmQ.mjs +0 -104
  1309. package/dist/single-flight-cache-jaswDzmQ.mjs.map +0 -1
  1310. package/dist/site-url-Bqf-ea3N.mjs +0 -16
  1311. package/dist/site-url-Bqf-ea3N.mjs.map +0 -1
  1312. package/dist/slugify-B994zkXC.mjs +0 -17
  1313. package/dist/slugify-B994zkXC.mjs.map +0 -1
  1314. package/dist/snapshot-C4CtXntb.mjs +0 -232
  1315. package/dist/snapshot-C4CtXntb.mjs.map +0 -1
  1316. package/dist/ssrf-gl4gFNhw.mjs +0 -406
  1317. package/dist/ssrf-gl4gFNhw.mjs.map +0 -1
  1318. package/dist/state-1F6IOhdQ.mjs +0 -136
  1319. package/dist/state-1F6IOhdQ.mjs.map +0 -1
  1320. package/dist/status-Cenfk_r5.mjs +0 -30
  1321. package/dist/status-Cenfk_r5.mjs.map +0 -1
  1322. package/dist/target-CRzeTs8G.mjs +0 -27
  1323. package/dist/target-CRzeTs8G.mjs.map +0 -1
  1324. package/dist/taxonomies-BOdxuZpV.mjs +0 -844
  1325. package/dist/taxonomies-BOdxuZpV.mjs.map +0 -1
  1326. package/dist/taxonomies-NcFDq5Gg.mjs +0 -707
  1327. package/dist/taxonomies-NcFDq5Gg.mjs.map +0 -1
  1328. package/dist/taxonomy-DP1vny4K.mjs +0 -492
  1329. package/dist/taxonomy-DP1vny4K.mjs.map +0 -1
  1330. package/dist/tokens-CDk8ox9p.mjs +0 -171
  1331. package/dist/tokens-CDk8ox9p.mjs.map +0 -1
  1332. package/dist/transaction-0KOpOyMu.mjs +0 -29
  1333. package/dist/transaction-0KOpOyMu.mjs.map +0 -1
  1334. package/dist/transport-BVn4tVb9.d.mts +0 -42
  1335. package/dist/transport-BVn4tVb9.d.mts.map +0 -1
  1336. package/dist/transport-DP0JI-8i.mjs +0 -136
  1337. package/dist/transport-DP0JI-8i.mjs.map +0 -1
  1338. package/dist/trusted-proxy-BTM6UxqD.mjs +0 -51
  1339. package/dist/trusted-proxy-BTM6UxqD.mjs.map +0 -1
  1340. package/dist/types-2n848aVW.d.mts +0 -198
  1341. package/dist/types-2n848aVW.d.mts.map +0 -1
  1342. package/dist/types-A2cN6a4a.mjs +0 -3
  1343. package/dist/types-BMXnRIrX.mjs +0 -144
  1344. package/dist/types-BMXnRIrX.mjs.map +0 -1
  1345. package/dist/types-BouXpOsa.d.mts +0 -1446
  1346. package/dist/types-BouXpOsa.d.mts.map +0 -1
  1347. package/dist/types-ByG2coLw.mjs +0 -16
  1348. package/dist/types-ByG2coLw.mjs.map +0 -1
  1349. package/dist/types-CQPWhPxE.mjs +0 -92
  1350. package/dist/types-CQPWhPxE.mjs.map +0 -1
  1351. package/dist/types-DEfNJ__A.d.mts +0 -75
  1352. package/dist/types-DEfNJ__A.d.mts.map +0 -1
  1353. package/dist/types-DKcKSbtB.d.mts +0 -273
  1354. package/dist/types-DKcKSbtB.d.mts.map +0 -1
  1355. package/dist/types-DRYs7uTL.d.mts +0 -198
  1356. package/dist/types-DRYs7uTL.d.mts.map +0 -1
  1357. package/dist/types-DaEg7KX2.d.mts +0 -363
  1358. package/dist/types-DaEg7KX2.d.mts.map +0 -1
  1359. package/dist/types-LU8utpP_.d.mts +0 -262
  1360. package/dist/types-LU8utpP_.d.mts.map +0 -1
  1361. package/dist/types-VpYfPUxN.d.mts +0 -124
  1362. package/dist/types-VpYfPUxN.d.mts.map +0 -1
  1363. package/dist/types-c9GP7Dj5.mjs +0 -18
  1364. package/dist/types-c9GP7Dj5.mjs.map +0 -1
  1365. package/dist/types-tJWDK__M.d.mts +0 -756
  1366. package/dist/types-tJWDK__M.d.mts.map +0 -1
  1367. package/dist/upload-attempts-C6S2y-lp.mjs +0 -27
  1368. package/dist/upload-attempts-C6S2y-lp.mjs.map +0 -1
  1369. package/dist/url-pattern-UYtxVTuj.mjs +0 -33
  1370. package/dist/url-pattern-UYtxVTuj.mjs.map +0 -1
  1371. package/dist/user-DIsIXogT.mjs +0 -171
  1372. package/dist/user-DIsIXogT.mjs.map +0 -1
  1373. package/dist/utils-BicP5Qbg.mjs +0 -435
  1374. package/dist/utils-BicP5Qbg.mjs.map +0 -1
  1375. package/dist/validate-BpwoDOgt.mjs +0 -120
  1376. package/dist/validate-BpwoDOgt.mjs.map +0 -1
  1377. package/dist/validate-D8VPn4Hv.mjs +0 -384
  1378. package/dist/validate-D8VPn4Hv.mjs.map +0 -1
  1379. package/dist/validate-Df6Dvwbw.d.mts +0 -405
  1380. package/dist/validate-Df6Dvwbw.d.mts.map +0 -1
  1381. package/dist/validation-CzMJn9Ku.mjs +0 -155
  1382. package/dist/validation-CzMJn9Ku.mjs.map +0 -1
  1383. package/dist/version-CK67_SXX.mjs +0 -7
  1384. package/dist/version-CK67_SXX.mjs.map +0 -1
  1385. package/dist/widgets-RFVAxQl3.mjs +0 -122
  1386. package/dist/widgets-RFVAxQl3.mjs.map +0 -1
  1387. package/dist/wxr-taxonomies-BX4yQL9s.d.mts +0 -34
  1388. package/dist/wxr-taxonomies-BX4yQL9s.d.mts.map +0 -1
  1389. package/dist/wxr-taxonomies-Csdp7yde.mjs +0 -406
  1390. package/dist/wxr-taxonomies-Csdp7yde.mjs.map +0 -1
  1391. package/dist/zod-generator-CNRGdnBY.mjs +0 -331
  1392. package/dist/zod-generator-CNRGdnBY.mjs.map +0 -1
  1393. /package/dist/{api-tokens-B_lfpmH3.mjs → api-tokens-DS1VzN7_.mjs} +0 -0
  1394. /package/dist/{ssrf-TQhaljuI.mjs → ssrf-BRpTDMV6.mjs} +0 -0
@@ -1,1446 +0,0 @@
1
- import { r as ContentFieldFilters } from "./content-list-query-B8d4UQp9.mjs";
2
- import { f as FieldType } from "./types-DKcKSbtB.mjs";
3
- import { z } from "astro/zod";
4
- import { Permission } from "@emdash-cms/auth";
5
- import { CAPABILITY_RENAMES, CurrentPluginCapability, DeclaredAccess, DeprecatedPluginCapability, ManifestHookEntry as ManifestHookEntry$1, ManifestRouteEntry as ManifestRouteEntry$1, PluginCapability, PluginMcpManifestConfig, PluginStorageConfig, StorageCollectionConfig, isDeprecatedCapability, normalizeCapabilities, normalizeCapability } from "@emdash-cms/plugin-types";
6
- import "react/jsx-runtime";
7
- import { JSX } from "astro/jsx-runtime";
8
-
9
- //#region ../blocks/dist/validation-5vL6669b.d.ts
10
- //#region src/types.d.ts
11
- interface ConfirmDialog {
12
- title: string;
13
- text: string;
14
- confirm: string;
15
- deny: string;
16
- style?: "danger";
17
- }
18
- interface ButtonElement {
19
- type: "button";
20
- action_id: string;
21
- label: string;
22
- style?: "primary" | "danger" | "secondary";
23
- value?: unknown;
24
- confirm?: ConfirmDialog;
25
- }
26
- interface TextInputElement {
27
- type: "text_input";
28
- action_id: string;
29
- label: string;
30
- placeholder?: string;
31
- initial_value?: string;
32
- multiline?: boolean;
33
- }
34
- interface NumberInputElement {
35
- type: "number_input";
36
- action_id: string;
37
- label: string;
38
- initial_value?: number;
39
- min?: number;
40
- max?: number;
41
- }
42
- interface SelectElement {
43
- type: "select";
44
- action_id: string;
45
- label: string;
46
- options: Array<{
47
- label: string;
48
- value: string;
49
- }>;
50
- initial_value?: string;
51
- /** Plugin route that returns `{ items: Array<{ id, name }> }` to populate options dynamically */
52
- optionsRoute?: string;
53
- }
54
- interface ToggleElement {
55
- type: "toggle";
56
- action_id: string;
57
- label: string;
58
- description?: string;
59
- initial_value?: boolean;
60
- }
61
- interface SecretInputElement {
62
- type: "secret_input";
63
- action_id: string;
64
- label: string;
65
- placeholder?: string;
66
- has_value?: boolean;
67
- }
68
- interface CheckboxElement {
69
- type: "checkbox";
70
- action_id: string;
71
- label: string;
72
- options: Array<{
73
- label: string;
74
- value: string;
75
- }>;
76
- initial_value?: string[];
77
- }
78
- interface DateInputElement {
79
- type: "date_input";
80
- action_id: string;
81
- label: string;
82
- initial_value?: string;
83
- placeholder?: string;
84
- }
85
- interface ComboboxElement {
86
- type: "combobox";
87
- action_id: string;
88
- label: string;
89
- options: Array<{
90
- label: string;
91
- value: string;
92
- }>;
93
- initial_value?: string;
94
- placeholder?: string;
95
- }
96
- interface RadioElement {
97
- type: "radio";
98
- action_id: string;
99
- label: string;
100
- options: Array<{
101
- label: string;
102
- value: string;
103
- }>;
104
- initial_value?: string;
105
- }
106
- /**
107
- * Sub-field types allowed inside a RepeaterElement. Limited to the scalar
108
- * inputs the admin widget currently renders inline.
109
- */
110
- type RepeaterSubField = TextInputElement | NumberInputElement | SelectElement | ToggleElement;
111
- /**
112
- * Array-of-objects field. Renders as a list of collapsible cards with inline
113
- * add/remove and drag-and-drop reordering. Sub-fields are scalar Block Kit
114
- * elements keyed by their `action_id`.
115
- *
116
- * Admin-authoring only: this element is rendered by the admin widget so plugin
117
- * blocks can capture repeating data. The runtime block renderer
118
- * (`renderElement`) deliberately returns `null` for `repeater` — repeater
119
- * values are persisted on the parent block and consumed by the plugin's own
120
- * runtime component, not re-rendered as a stand-alone block.
121
- */
122
- interface RepeaterElement {
123
- type: "repeater";
124
- action_id: string;
125
- label: string;
126
- /** Singular label used in the UI (e.g. "FAQ" → "Add FAQ"). */
127
- item_label?: string;
128
- fields: RepeaterSubField[];
129
- min_items?: number;
130
- max_items?: number;
131
- /**
132
- * Default rows for the field. Note: the admin widget seeds new rows from
133
- * the sub-field types (empty string / `false`), not from `initial_value`;
134
- * plugins should populate persisted state via the form `values` payload
135
- * instead of relying on `initial_value` for pre-filled rows.
136
- */
137
- initial_value?: Array<Record<string, unknown>>;
138
- }
139
- /**
140
- * Picks an item from the media library (or uploads a new one). The stored value
141
- * is the selected asset's URL string, so this element is value-compatible with a
142
- * plain `text_input` — existing content continues to work after swapping.
143
- */
144
- interface MediaPickerElement {
145
- type: "media_picker";
146
- action_id: string;
147
- label: string;
148
- /** Mime-type prefix filter (e.g. "image/"). Defaults to "image/". */
149
- mime_type_filter?: string;
150
- initial_value?: string;
151
- placeholder?: string;
152
- }
153
- type Element = ButtonElement | TextInputElement | NumberInputElement | SelectElement | ToggleElement | SecretInputElement | CheckboxElement | DateInputElement | ComboboxElement | RadioElement | RepeaterElement | MediaPickerElement;
154
- //#endregion
155
- //#region src/plugins/types.d.ts
156
- /**
157
- * Query filter operators
158
- */
159
- interface RangeFilter {
160
- gt?: number | string;
161
- gte?: number | string;
162
- lt?: number | string;
163
- lte?: number | string;
164
- }
165
- interface InFilter {
166
- in: Array<string | number>;
167
- }
168
- interface StartsWithFilter {
169
- startsWith: string;
170
- }
171
- /**
172
- * Where clause value types
173
- */
174
- type WhereValue = string | number | boolean | null | RangeFilter | InFilter | StartsWithFilter;
175
- /**
176
- * Where clause for storage queries
177
- */
178
- type WhereClause = Record<string, WhereValue>;
179
- /**
180
- * Query options for storage.query()
181
- */
182
- interface QueryOptions {
183
- where?: WhereClause;
184
- orderBy?: Record<string, "asc" | "desc">;
185
- limit?: number;
186
- cursor?: string;
187
- }
188
- /**
189
- * Paginated result (used by storage.query, content.list, media.list)
190
- */
191
- interface PaginatedResult<T> {
192
- items: T[];
193
- cursor?: string;
194
- hasMore: boolean;
195
- }
196
- interface VersionedValue<T = unknown> {
197
- value: T;
198
- /** Opaque host revision, valid only for the key from which it was read. */
199
- revision: string;
200
- }
201
- type ConditionalWriteResult = {
202
- applied: true;
203
- revision: string;
204
- } | {
205
- applied: false;
206
- };
207
- interface ConditionalDeleteResult {
208
- applied: boolean;
209
- }
210
- /**
211
- * A single per-field integer delta for {@link StorageCollection.updateIf}.
212
- *
213
- * `inc`/`dec` values must be safe integers, enforced at runtime with
214
- * `Number.isSafeInteger` (which also rejects `NaN`/`Infinity`), because a TS
215
- * `number` cannot forbid float literals. Deltas are applied entirely in-SQL
216
- * over the stored value with `COALESCE(<value>, 0) ± n`, so a delta on a
217
- * missing or JSON-`null` field starts from `0` (never corrupts the document).
218
- *
219
- * `updateIf` does NOT clamp: a `dec` can drive a field negative when the
220
- * `where` guard doesn't cover the delta magnitude (e.g. stock `2` with
221
- * `where: { stock: { gte: 1 } }` and `delta: { stock: { dec: 3 } }` → `-1`,
222
- * `applied: true`). The guard is the caller's responsibility — pair a `dec: k`
223
- * with a `gte: k` guard to prevent underflow.
224
- */
225
- type NumericDelta = {
226
- inc: number;
227
- } | {
228
- dec: number;
229
- };
230
- /**
231
- * Arguments to {@link StorageCollection.updateIf}.
232
- *
233
- * `where` reuses the {@link QueryOptions} `WhereClause` verbatim — the guard is
234
- * evaluated in-SQL with the same numeric-correct, total comparisons as
235
- * `query()`. An empty `where: {}` emits no guard, i.e. it matches the row
236
- * unconditionally (update-if-row-exists) — a footgun in the no-oversell case,
237
- * where a real predicate (e.g. `{ stock: { gte: 1 } }`) is what you want.
238
- *
239
- * At least one of `set` / `delta` must be present (a runtime error is thrown
240
- * otherwise). A field may not appear in both `set` and `delta` in the same
241
- * call. `set` and `delta` are separate arguments (not a union) so a wholesale
242
- * value that happens to look like `{ inc: 5 }` is never mistaken for a delta.
243
- */
244
- interface UpdateIfArgs<T> {
245
- /**
246
- * Guard evaluated in-SQL; identical semantics to `query({ where })`. An
247
- * empty `{}` means "match the row unconditionally (no guard)".
248
- */
249
- where: WhereClause;
250
- /** Wholesale field values merged into the stored JSON document. */
251
- set?: Partial<T>;
252
- /** Per-field integer deltas applied in-SQL (`COALESCE(base, 0) ± n`). */
253
- delta?: { [K in keyof T]?: NumericDelta };
254
- }
255
- /**
256
- * Result of {@link StorageCollection.updateIf}.
257
- *
258
- * `applied: false` intentionally conflates "row absent" and "guard failed": a
259
- * single-statement guarded `UPDATE` cannot distinguish them, and the caller
260
- * should not need to. `updateIf` is update-only — it never inserts a missing
261
- * row.
262
- */
263
- type UpdateIfResult<T> = {
264
- applied: true;
265
- data: T;
266
- } | {
267
- applied: false;
268
- };
269
- /**
270
- * Storage collection interface - the API exposed to plugins
271
- * No async iterators - all operations return promises with pagination
272
- */
273
- interface StorageCollection<T = unknown> {
274
- get(id: string): Promise<T | null>;
275
- put(id: string, data: T): Promise<void>;
276
- delete(id: string): Promise<boolean>;
277
- exists(id: string): Promise<boolean>;
278
- /** A stored JSON null returns an envelope with value: null; only an absent row returns null. */
279
- getVersioned(id: string): Promise<VersionedValue<T> | null>;
280
- /** A null expected revision creates only when absent. Errors reject; conflicts return applied: false. */
281
- compareAndSet(id: string, expectedRevision: string | null, data: T): Promise<ConditionalWriteResult>;
282
- compareAndDelete(id: string, expectedRevision: string): Promise<ConditionalDeleteResult>;
283
- getMany(ids: string[]): Promise<Map<string, T>>;
284
- putMany(items: Array<{
285
- id: string;
286
- data: T;
287
- }>): Promise<void>;
288
- deleteMany(ids: string[]): Promise<number>;
289
- query(options?: QueryOptions): Promise<PaginatedResult<{
290
- id: string;
291
- data: T;
292
- }>>;
293
- count(where?: WhereClause): Promise<number>;
294
- /**
295
- * Predicate-guarded atomic update. Applies `set`/`delta` to the row `id`
296
- * only if it exists and the `where` guard matches, in a single guarded
297
- * `UPDATE … RETURNING`. This is the no-oversell primitive: the guard and the
298
- * arithmetic live in one statement, so N concurrent guarded decrements
299
- * serialize correctly. `applied: false` means the row was absent OR the
300
- * guard failed (the two are intentionally indistinguishable). Non-object
301
- * documents, invalid counters and unsafe arithmetic results also fail the
302
- * guard. Never inserts.
303
- *
304
- * Serialization failures and deadlocks throw `StorageSerializationError`.
305
- * Retry the write with a bounded policy; restart an explicit transaction
306
- * before retrying its operations.
307
- */
308
- updateIf(id: string, args: UpdateIfArgs<T>): Promise<UpdateIfResult<T>>;
309
- }
310
- /**
311
- * Plugin storage context - typed based on declared collections
312
- */
313
- type PluginStorage<T extends PluginStorageConfig> = { [K in keyof T]: StorageCollection };
314
- /**
315
- * KV store interface - unified replacement for settings + options
316
- *
317
- * Convention:
318
- * - `settings:*` - User-configurable preferences (shown in admin UI)
319
- * - `state:*` - Internal plugin state (not shown to users)
320
- */
321
- interface KVAccess {
322
- get<T>(key: string): Promise<T | null>;
323
- getVersioned<T>(key: string): Promise<VersionedValue<T> | null>;
324
- /** A null expected revision creates only when absent. Errors reject; conflicts return applied: false. */
325
- compareAndSet(key: string, expectedRevision: string | null, value: unknown): Promise<ConditionalWriteResult>;
326
- compareAndDelete(key: string, expectedRevision: string): Promise<ConditionalDeleteResult>;
327
- set(key: string, value: unknown): Promise<void>;
328
- delete(key: string): Promise<boolean>;
329
- list(prefix?: string): Promise<Array<{
330
- key: string;
331
- value: unknown;
332
- }>>;
333
- }
334
- /**
335
- * SEO metadata for a content item, as stored in the core SEO panel.
336
- *
337
- * Only present on items in collections with `has_seo = 1`. For collections
338
- * without SEO enabled, `ContentItem.seo` is `undefined`.
339
- */
340
- interface ContentItemSeo {
341
- title: string | null;
342
- description: string | null;
343
- image: string | null;
344
- canonical: string | null;
345
- noIndex: boolean;
346
- }
347
- /**
348
- * SEO input accepted by content write operations.
349
- *
350
- * All fields are optional — only fields that are present overwrite existing
351
- * values. An empty object is treated as a no-op.
352
- */
353
- interface ContentItemSeoInput {
354
- title?: string | null;
355
- description?: string | null;
356
- image?: string | null;
357
- canonical?: string | null;
358
- noIndex?: boolean;
359
- }
360
- /**
361
- * Content item returned from content API
362
- */
363
- interface ContentItem {
364
- id: string;
365
- type: string;
366
- slug: string | null;
367
- status: string;
368
- locale: string | null;
369
- data: Record<string, unknown>;
370
- /**
371
- * SEO metadata, populated when the collection has SEO enabled
372
- * (`has_seo = 1`). `undefined` for non-SEO collections.
373
- */
374
- seo?: ContentItemSeo;
375
- createdAt: string;
376
- updatedAt: string;
377
- publishedAt: string | null;
378
- /** Scheduled publication time, if set (e.g. scheduled items or scheduled draft changes). */
379
- scheduledAt?: string | null;
380
- }
381
- interface ContentListWhere {
382
- /** Exact match on `status` (e.g. `"published"`, `"draft"`). */
383
- status?: string;
384
- /** Exact match on `locale` (e.g. `"en"`, `"fr-CA"`). */
385
- locale?: string;
386
- /** AND-combined filters over custom fields explicitly marked as indexed. */
387
- fieldFilters?: ContentFieldFilters;
388
- }
389
- /**
390
- * Content list options
391
- */
392
- interface ContentListOptions {
393
- limit?: number;
394
- cursor?: string;
395
- orderBy?: Record<string, "asc" | "desc">;
396
- where?: ContentListWhere;
397
- }
398
- /**
399
- * Input accepted by `content.create` / `content.update`.
400
- *
401
- * Most entries are field slugs mapped to their values. The reserved `seo`
402
- * key is extracted and routed to the core SEO panel (the `_emdash_seo`
403
- * table), matching the shape accepted by the REST API. Passing `seo` for a
404
- * collection that does not have SEO enabled throws a validation error.
405
- */
406
- type ContentWriteInput = Record<string, unknown> & {
407
- seo?: ContentItemSeoInput;
408
- };
409
- /** Options accepted by `content.create`. */
410
- interface ContentCreateOptions {
411
- /** Locale for the new content row. Defaults to the configured site locale, then `en`. */
412
- locale?: string;
413
- }
414
- /**
415
- * Taxonomy definition returned from the taxonomy API (e.g. "category", "tag").
416
- */
417
- interface TaxonomyDefInfo {
418
- name: string;
419
- label: string;
420
- labelSingular: string | null;
421
- hierarchical: boolean;
422
- /** Collections this taxonomy is attached to (e.g. `["posts"]`). */
423
- collections: string[];
424
- locale: string;
425
- }
426
- /**
427
- * Taxonomy term returned from the taxonomy API. Flat shape — for hierarchical
428
- * taxonomies the tree is reconstructed via `parentId` (which stores the
429
- * parent's locale-agnostic `translationGroup`).
430
- */
431
- interface TaxonomyTermInfo {
432
- id: string;
433
- /** Taxonomy name this term belongs to (e.g. "category"). */
434
- taxonomy: string;
435
- slug: string;
436
- label: string;
437
- parentId: string | null;
438
- /** Term metadata as edited in the admin (`description` etc.). */
439
- data: Record<string, unknown> | null;
440
- locale: string;
441
- translationGroup: string | null;
442
- }
443
- /**
444
- * Options accepted by taxonomy read operations. Omitting `locale` returns
445
- * rows for every locale.
446
- */
447
- interface TaxonomyReadOptions {
448
- locale?: string;
449
- }
450
- /**
451
- * Content access interface - capability-gated
452
- */
453
- interface ContentAccess {
454
- get(collection: string, id: string): Promise<ContentItem | null>;
455
- list(collection: string, options?: ContentListOptions): Promise<PaginatedResult<ContentItem>>;
456
- create?(collection: string, data: ContentWriteInput, options?: ContentCreateOptions): Promise<ContentItem>;
457
- update?(collection: string, id: string, data: ContentWriteInput): Promise<ContentItem>;
458
- delete?(collection: string, id: string): Promise<boolean>;
459
- }
460
- /**
461
- * Taxonomy access interface — capability-gated on `taxonomies:read`.
462
- * Read-only: there is no plugin-facing taxonomy write API.
463
- */
464
- interface TaxonomyAccess {
465
- /** List taxonomy definitions. */
466
- getAll(options?: TaxonomyReadOptions): Promise<TaxonomyDefInfo[]>;
467
- /** All terms of a taxonomy, ordered by label. */
468
- getTerms(taxonomy: string, options?: TaxonomyReadOptions): Promise<TaxonomyTermInfo[]>;
469
- /** Terms assigned to a content entry, optionally scoped to one taxonomy. */
470
- getEntryTerms(collection: string, entryId: string, options?: TaxonomyReadOptions & {
471
- taxonomy?: string;
472
- }): Promise<TaxonomyTermInfo[]>;
473
- }
474
- /**
475
- * Full content access with write operations
476
- */
477
- interface ContentAccessWithWrite extends ContentAccess {
478
- create(collection: string, data: ContentWriteInput, options?: ContentCreateOptions): Promise<ContentItem>;
479
- update(collection: string, id: string, data: ContentWriteInput): Promise<ContentItem>;
480
- delete(collection: string, id: string): Promise<boolean>;
481
- }
482
- /**
483
- * Media item returned from media API
484
- */
485
- interface MediaItem {
486
- id: string;
487
- filename: string;
488
- mimeType: string;
489
- size: number | null;
490
- url: string;
491
- createdAt: string;
492
- }
493
- /**
494
- * Media list options
495
- */
496
- interface MediaListOptions {
497
- limit?: number;
498
- cursor?: string;
499
- mimeType?: string;
500
- }
501
- /**
502
- * Media access interface - capability-gated
503
- */
504
- interface MediaAccess {
505
- get(id: string): Promise<MediaItem | null>;
506
- list(options?: MediaListOptions): Promise<PaginatedResult<MediaItem>>;
507
- getUploadUrl?(filename: string, contentType: string): Promise<{
508
- uploadUrl: string;
509
- mediaId: string;
510
- }>;
511
- /**
512
- * Upload media bytes directly. Preferred in sandboxed mode where
513
- * plugins cannot make external requests to a presigned URL.
514
- * Returns the created media item.
515
- */
516
- upload?(filename: string, contentType: string, bytes: ArrayBuffer): Promise<{
517
- mediaId: string;
518
- storageKey: string;
519
- url: string;
520
- }>;
521
- delete?(id: string): Promise<boolean>;
522
- }
523
- /**
524
- * Full media access with write operations
525
- */
526
- interface MediaAccessWithWrite extends MediaAccess {
527
- getUploadUrl(filename: string, contentType: string): Promise<{
528
- uploadUrl: string;
529
- mediaId: string;
530
- }>;
531
- upload(filename: string, contentType: string, bytes: ArrayBuffer): Promise<{
532
- mediaId: string;
533
- storageKey: string;
534
- url: string;
535
- }>;
536
- delete(id: string): Promise<boolean>;
537
- }
538
- /**
539
- * HTTP client interface - requires network:fetch capability
540
- */
541
- interface HttpAccess {
542
- fetch(url: string, init?: RequestInit): Promise<Response>;
543
- }
544
- /**
545
- * Logger interface - always available
546
- */
547
- interface LogAccess {
548
- debug(message: string, data?: unknown): void;
549
- info(message: string, data?: unknown): void;
550
- warn(message: string, data?: unknown): void;
551
- error(message: string, data?: unknown): void;
552
- }
553
- /**
554
- * Site information available to all plugins
555
- */
556
- interface SiteInfo {
557
- /** Site name (from settings) */
558
- name: string;
559
- /** Site URL (from settings or request) */
560
- url: string;
561
- /** Site locale (from settings, defaults to "en") */
562
- locale: string;
563
- /**
564
- * Astro's `trailingSlash` routing policy, from the host's Astro config.
565
- * Plugins that build absolute URLs (sitemap, canonical, hreflang) should
566
- * honor this so the URLs they emit match what the site serves. `createSiteInfo`
567
- * always populates it (defaulting to `"ignore"`, Astro's default); it is
568
- * optional on the type so pre-existing `SiteInfo` construction stays valid.
569
- */
570
- trailingSlash?: "always" | "never" | "ignore";
571
- }
572
- /**
573
- * Read-only user information exposed to plugins.
574
- * Sensitive fields (password hashes, sessions, passkeys) are excluded.
575
- */
576
- interface UserInfo {
577
- id: string;
578
- email: string;
579
- name: string | null;
580
- role: number;
581
- createdAt: string;
582
- }
583
- /**
584
- * User access interface - requires read:users capability
585
- */
586
- interface UserAccess {
587
- /** Get a user by ID */
588
- get(id: string): Promise<UserInfo | null>;
589
- /** Get a user by email */
590
- getByEmail(email: string): Promise<UserInfo | null>;
591
- /** List users with optional filters */
592
- list(opts?: {
593
- role?: number;
594
- limit?: number;
595
- cursor?: string;
596
- }): Promise<{
597
- items: UserInfo[];
598
- nextCursor?: string;
599
- }>;
600
- }
601
- /**
602
- * The unified plugin context - same shape for all hooks and routes
603
- */
604
- interface PluginContext<TStorage extends PluginStorageConfig = PluginStorageConfig> {
605
- /** Plugin metadata */
606
- plugin: {
607
- id: string;
608
- version: string;
609
- };
610
- /** Storage collections - only if plugin declares storage */
611
- storage: PluginStorage<TStorage>;
612
- /** Key-value store for config and state */
613
- kv: KVAccess;
614
- /** Content access - only if read:content or write:content capability */
615
- content?: ContentAccess | ContentAccessWithWrite;
616
- /** Taxonomy access (read-only) - only if taxonomies:read capability */
617
- taxonomies?: TaxonomyAccess;
618
- /** Media access - only if read:media or write:media capability */
619
- media?: MediaAccess | MediaAccessWithWrite;
620
- /** HTTP client - only if network:fetch capability */
621
- http?: HttpAccess;
622
- /** Logger - always available */
623
- log: LogAccess;
624
- /** Site information - always available */
625
- site: SiteInfo;
626
- /** URL helper - generates absolute URLs from paths. Always available. */
627
- url(path: string): string;
628
- /** User access - only if read:users capability */
629
- users?: UserAccess;
630
- /** Cron task scheduling - always available, scoped to plugin */
631
- cron?: CronAccess;
632
- /** Email access - only if email:send capability and a provider is configured */
633
- email?: EmailAccess;
634
- }
635
- /**
636
- * Cron access interface �� always available on plugin context, scoped to plugin.
637
- */
638
- interface CronAccess {
639
- /** Schedule a recurring or one-shot task */
640
- schedule(name: string, opts: {
641
- schedule: string;
642
- data?: Record<string, unknown>;
643
- }): Promise<void>;
644
- /** Cancel a scheduled task */
645
- cancel(name: string): Promise<void>;
646
- /** List this plugin's scheduled tasks */
647
- list(): Promise<CronTaskInfo[]>;
648
- }
649
- /**
650
- * Task info returned from CronAccess.list()
651
- */
652
- interface CronTaskInfo {
653
- name: string;
654
- schedule: string;
655
- nextRunAt: string;
656
- lastRunAt: string | null;
657
- }
658
- /**
659
- * Event passed to the `cron` hook handler
660
- */
661
- interface CronEvent {
662
- name: string;
663
- data?: Record<string, unknown>;
664
- scheduledAt: string;
665
- }
666
- /**
667
- * Cron hook handler type
668
- */
669
- type CronHandler = (event: CronEvent, ctx: PluginContext) => Promise<void>;
670
- /**
671
- * Email access interface — requires `email:send` capability.
672
- * Undefined when no `email:deliver` provider is configured.
673
- *
674
- * Related capabilities:
675
- * - `email:send` — grants ctx.email (this interface)
676
- * - `email:provide` — allows registering the `email:deliver` exclusive hook
677
- * - `email:intercept` — allows registering `email:beforeSend` / `email:afterSend` hooks
678
- */
679
- interface EmailAccess {
680
- send(message: EmailMessage): Promise<void>;
681
- }
682
- /**
683
- * Email message shape
684
- */
685
- interface EmailMessage {
686
- to: string;
687
- subject: string;
688
- text: string;
689
- html?: string;
690
- }
691
- /**
692
- * Event passed to email:beforeSend hooks (middleware — transform, validate, cancel)
693
- */
694
- interface EmailBeforeSendEvent {
695
- message: EmailMessage;
696
- /** Where the email originated — "system" for auth emails, plugin ID for plugin emails */
697
- source: string;
698
- }
699
- /**
700
- * Event passed to email:deliver hook (exclusive — exactly one provider delivers)
701
- */
702
- interface EmailDeliverEvent {
703
- message: EmailMessage;
704
- source: string;
705
- }
706
- /**
707
- * Event passed to email:afterSend hooks (logging, analytics, fire-and-forget)
708
- */
709
- interface EmailAfterSendEvent {
710
- message: EmailMessage;
711
- source: string;
712
- }
713
- /**
714
- * Handler type for email:beforeSend hooks.
715
- * Returns modified message, or false to cancel delivery.
716
- */
717
- type EmailBeforeSendHandler = (event: EmailBeforeSendEvent, ctx: PluginContext) => Promise<EmailMessage | false>;
718
- /**
719
- * Handler type for email:deliver hooks (exclusive provider).
720
- */
721
- type EmailDeliverHandler = (event: EmailDeliverEvent, ctx: PluginContext) => Promise<void>;
722
- /**
723
- * Handler type for email:afterSend hooks (fire-and-forget).
724
- */
725
- type EmailAfterSendHandler = (event: EmailAfterSendEvent, ctx: PluginContext) => Promise<void>;
726
- /**
727
- * Collection comment settings (read from _emdash_collections)
728
- */
729
- interface CollectionCommentSettings {
730
- commentsEnabled: boolean;
731
- commentsModeration: "all" | "first_time" | "none";
732
- commentsClosedAfterDays: number;
733
- commentsAutoApproveUsers: boolean;
734
- }
735
- /**
736
- * Event passed to comment:beforeCreate hooks (middleware — transform, enrich, reject)
737
- */
738
- interface CommentBeforeCreateEvent {
739
- comment: {
740
- collection: string;
741
- contentId: string;
742
- parentId: string | null;
743
- authorName: string;
744
- authorEmail: string;
745
- authorUserId: string | null;
746
- body: string;
747
- ipHash: string | null;
748
- userAgent: string | null;
749
- };
750
- /** Metadata bag — plugins can attach signals for the moderator */
751
- metadata: Record<string, unknown>;
752
- }
753
- /**
754
- * Event passed to comment:moderate hook (exclusive — decides initial status)
755
- */
756
- interface CommentModerateEvent {
757
- comment: CommentBeforeCreateEvent["comment"];
758
- metadata: Record<string, unknown>;
759
- collectionSettings: CollectionCommentSettings;
760
- /** Number of prior approved comments from this email address */
761
- priorApprovedCount: number;
762
- }
763
- /**
764
- * Moderation decision returned by the comment:moderate handler
765
- */
766
- interface ModerationDecision {
767
- status: "approved" | "pending" | "spam";
768
- /** Optional reason for admin visibility */
769
- reason?: string;
770
- }
771
- /**
772
- * Stored comment shape (full record with id, status, timestamps)
773
- */
774
- interface StoredComment {
775
- id: string;
776
- collection: string;
777
- contentId: string;
778
- parentId: string | null;
779
- authorName: string;
780
- authorEmail: string;
781
- authorUserId: string | null;
782
- body: string;
783
- status: string;
784
- moderationMetadata: Record<string, unknown> | null;
785
- createdAt: string;
786
- updatedAt: string;
787
- }
788
- /**
789
- * Event passed to comment:afterCreate hooks (fire-and-forget)
790
- */
791
- interface CommentAfterCreateEvent {
792
- comment: StoredComment;
793
- metadata: Record<string, unknown>;
794
- /** The content item the comment is on */
795
- content: {
796
- id: string;
797
- collection: string;
798
- slug: string;
799
- title?: string;
800
- };
801
- /** The content author (for notifications) */
802
- contentAuthor?: {
803
- id: string;
804
- name: string | null;
805
- email: string;
806
- };
807
- }
808
- /**
809
- * Event passed to comment:afterModerate hooks (fire-and-forget, admin status change)
810
- */
811
- interface CommentAfterModerateEvent {
812
- comment: StoredComment;
813
- previousStatus: string;
814
- newStatus: string;
815
- /** The admin who moderated */
816
- moderator: {
817
- id: string;
818
- name: string | null;
819
- };
820
- }
821
- /**
822
- * Handler type for comment:beforeCreate hooks.
823
- * Returns modified event, or false to reject the comment.
824
- */
825
- type CommentBeforeCreateHandler = (event: CommentBeforeCreateEvent, ctx: PluginContext) => Promise<CommentBeforeCreateEvent | false | void>;
826
- /**
827
- * Handler type for comment:moderate hook (exclusive provider).
828
- */
829
- type CommentModerateHandler = (event: CommentModerateEvent, ctx: PluginContext) => Promise<ModerationDecision>;
830
- /**
831
- * Handler type for comment:afterCreate hooks (fire-and-forget).
832
- */
833
- type CommentAfterCreateHandler = (event: CommentAfterCreateEvent, ctx: PluginContext) => Promise<void>;
834
- /**
835
- * Handler type for comment:afterModerate hooks (fire-and-forget).
836
- */
837
- type CommentAfterModerateHandler = (event: CommentAfterModerateEvent, ctx: PluginContext) => Promise<void>;
838
- /**
839
- * Hook configuration
840
- */
841
- interface HookConfig<THandler> {
842
- /** Explicit ordering - lower numbers run first (default: 100) */
843
- priority?: number;
844
- /** Max execution time in ms (default: 5000) */
845
- timeout?: number;
846
- /** Run after these plugins */
847
- dependencies?: string[];
848
- /** Error handling policy */
849
- errorPolicy?: "continue" | "abort";
850
- /**
851
- * Mark this hook as exclusive — only one plugin can be the active provider.
852
- * Exclusive hooks skip the priority pipeline and dispatch only to the
853
- * admin-selected provider. Used for email:deliver, search, image optimization, etc.
854
- */
855
- exclusive?: boolean;
856
- /** The hook handler */
857
- handler: THandler;
858
- }
859
- /**
860
- * Acting user that triggered a content hook. Present for authenticated
861
- * saves; absent for unauthenticated or internal writes.
862
- */
863
- interface ActorInfo {
864
- readonly id: string;
865
- readonly role: number;
866
- }
867
- /**
868
- * Content hook event
869
- */
870
- interface ContentHookEvent {
871
- content: Record<string, unknown>;
872
- collection: string;
873
- isNew: boolean;
874
- /**
875
- * ID of the existing item on `content:beforeSave` for an update. Absent on
876
- * creates, where the ID is assigned when the save completes, and on
877
- * `content:afterSave`, where `content.id` carries it.
878
- */
879
- id?: string;
880
- /**
881
- * The acting user for this save. Carries the same authenticated identity
882
- * used to set the revision author, so plugins (e.g. audit logs) can record
883
- * who made the change.
884
- */
885
- actor?: ActorInfo;
886
- }
887
- /**
888
- * Content delete hook event
889
- */
890
- interface ContentDeleteEvent {
891
- id: string;
892
- collection: string;
893
- /** `true` when the content is permanently deleted (not just trashed). */
894
- permanent: boolean;
895
- }
896
- /**
897
- * Content state-change hook event (fired after publish, unpublish, restore,
898
- * schedule, or unschedule).
899
- */
900
- interface ContentStateChangeEvent {
901
- content: Record<string, unknown>;
902
- collection: string;
903
- }
904
- /**
905
- * Content publish/unpublish hook event.
906
- */
907
- type ContentPublishStateChangeEvent = ContentStateChangeEvent;
908
- /**
909
- * Content restore hook event.
910
- */
911
- type ContentRestoreStateChangeEvent = ContentStateChangeEvent;
912
- /**
913
- * Content schedule/unschedule hook event.
914
- */
915
- type ContentScheduleStateChangeEvent = ContentStateChangeEvent;
916
- /**
917
- * Media hook event
918
- */
919
- interface MediaUploadEvent {
920
- file: {
921
- name: string;
922
- type: string;
923
- size: number;
924
- };
925
- }
926
- /**
927
- * Media after upload event
928
- */
929
- interface MediaAfterUploadEvent {
930
- media: MediaItem;
931
- }
932
- /**
933
- * Lifecycle hook event
934
- */
935
- interface LifecycleEvent {}
936
- /**
937
- * Uninstall hook event
938
- */
939
- interface UninstallEvent {
940
- deleteData: boolean;
941
- }
942
- type ContentBeforeSaveHandler = (event: ContentHookEvent, ctx: PluginContext) => Promise<Record<string, unknown> | void>;
943
- type ContentAfterSaveHandler = (event: ContentHookEvent, ctx: PluginContext) => Promise<void>;
944
- type ContentBeforeDeleteHandler = (event: ContentDeleteEvent, ctx: PluginContext) => Promise<boolean | void>;
945
- type ContentAfterDeleteHandler = (event: ContentDeleteEvent, ctx: PluginContext) => Promise<void>;
946
- type ContentAfterPublishHandler = (event: ContentPublishStateChangeEvent, ctx: PluginContext) => Promise<void>;
947
- type ContentAfterUnpublishHandler = (event: ContentPublishStateChangeEvent, ctx: PluginContext) => Promise<void>;
948
- type ContentAfterRestoreHandler = (event: ContentRestoreStateChangeEvent, ctx: PluginContext) => Promise<void>;
949
- type ContentAfterScheduleHandler = (event: ContentScheduleStateChangeEvent, ctx: PluginContext) => Promise<void>;
950
- type ContentAfterUnscheduleHandler = (event: ContentScheduleStateChangeEvent, ctx: PluginContext) => Promise<void>;
951
- type MediaBeforeUploadHandler = (event: MediaUploadEvent, ctx: PluginContext) => Promise<{
952
- name: string;
953
- type: string;
954
- size: number;
955
- } | void>;
956
- type MediaAfterUploadHandler = (event: MediaAfterUploadEvent, ctx: PluginContext) => Promise<void>;
957
- type LifecycleHandler = (event: LifecycleEvent, ctx: PluginContext) => Promise<void>;
958
- type UninstallHandler = (event: UninstallEvent, ctx: PluginContext) => Promise<void>;
959
- /** Placement targets for page fragment contributions */
960
- type PagePlacement = "head" | "body:start" | "body:end";
961
- /**
962
- * A single breadcrumb trail item. Used by `PublicPageContext.breadcrumbs`
963
- * so themes can publish breadcrumb trails that SEO plugins consume.
964
- */
965
- interface BreadcrumbItem {
966
- /** Display name for this crumb (e.g. "Home", "Blog", "My Post"). */
967
- name: string;
968
- /** Absolute or root-relative URL for this crumb. */
969
- url: string;
970
- }
971
- /**
972
- * Describes the page being rendered. Passed to page hooks so plugins
973
- * can decide what to contribute without fetching content themselves.
974
- */
975
- interface PublicPageContext {
976
- url: string;
977
- path: string;
978
- locale: string | null;
979
- kind: "content" | "custom";
980
- pageType: string;
981
- /** Full document title for the rendered page */
982
- title: string | null;
983
- /** Page-only title for OG/Twitter/JSON-LD headline output */
984
- pageTitle?: string | null;
985
- description: string | null;
986
- canonical: string | null;
987
- image: string | null;
988
- content?: {
989
- collection: string;
990
- id: string;
991
- slug: string | null;
992
- };
993
- /** SEO meta for base metadata generation in EmDashHead */
994
- seo?: {
995
- ogTitle?: string | null;
996
- ogDescription?: string | null;
997
- ogImage?: string | null;
998
- robots?: string | null;
999
- };
1000
- /** Article metadata for Open Graph article: tags */
1001
- articleMeta?: {
1002
- publishedTime?: string | null;
1003
- modifiedTime?: string | null;
1004
- author?: string | null;
1005
- };
1006
- /** Site name for structured data and og:site_name */
1007
- siteName?: string;
1008
- /**
1009
- * Optional breadcrumb trail for this page, root first. When set,
1010
- * SEO plugins should use this verbatim rather than deriving a trail
1011
- * from `path`. Themes typically populate this at the point they
1012
- * build the context (e.g. from a content hierarchy walk, taxonomy
1013
- * lookup, or per-`pageType` routing logic).
1014
- *
1015
- * Semantics for consumers:
1016
- * - `undefined` — theme has no opinion; consumer falls back to
1017
- * its own derivation.
1018
- * - `[]` — this page has no breadcrumbs (e.g. homepage); consumer
1019
- * should skip `BreadcrumbList` emission entirely.
1020
- * - Non-empty array — used verbatim for `BreadcrumbList` output.
1021
- */
1022
- breadcrumbs?: BreadcrumbItem[];
1023
- /** Public-facing site URL (origin) for structured data */
1024
- siteUrl?: string;
1025
- }
1026
- interface PageMetadataEvent {
1027
- page: PublicPageContext;
1028
- }
1029
- /**
1030
- * Allowed rel values for link contributions.
1031
- * This is a security-critical allowlist -- sandboxed plugins can only inject
1032
- * link tags with these rel values. Adding "stylesheet", "prefetch", "prerender"
1033
- * etc. would allow sandboxed plugins to inject external resources.
1034
- */
1035
- type PageMetadataLinkRel = "canonical" | "alternate" | "author" | "license" | "nlweb" | "site.standard.document";
1036
- type PageMetadataContribution = {
1037
- kind: "meta";
1038
- name: string;
1039
- content: string;
1040
- key?: string;
1041
- } | {
1042
- kind: "property";
1043
- property: string;
1044
- content: string;
1045
- key?: string;
1046
- } | {
1047
- kind: "link";
1048
- rel: PageMetadataLinkRel;
1049
- href: string;
1050
- hreflang?: string;
1051
- key?: string;
1052
- } | {
1053
- kind: "jsonld";
1054
- id?: string;
1055
- graph: Record<string, unknown> | Array<Record<string, unknown>>;
1056
- };
1057
- type PageMetadataHandler = (event: PageMetadataEvent, ctx: PluginContext) => PageMetadataContribution | PageMetadataContribution[] | null | Promise<PageMetadataContribution | PageMetadataContribution[] | null>;
1058
- interface PageFragmentEvent {
1059
- page: PublicPageContext;
1060
- }
1061
- type PageFragmentContribution = {
1062
- kind: "external-script";
1063
- placement: PagePlacement;
1064
- src: string;
1065
- async?: boolean;
1066
- defer?: boolean;
1067
- attributes?: Record<string, string>;
1068
- key?: string;
1069
- } | {
1070
- kind: "inline-script";
1071
- placement: PagePlacement;
1072
- code: string;
1073
- attributes?: Record<string, string>;
1074
- key?: string;
1075
- } | {
1076
- kind: "html";
1077
- placement: PagePlacement;
1078
- html: string;
1079
- key?: string;
1080
- };
1081
- type PageFragmentHandler = (event: PageFragmentEvent, ctx: PluginContext) => PageFragmentContribution | PageFragmentContribution[] | null | Promise<PageFragmentContribution | PageFragmentContribution[] | null>;
1082
- /**
1083
- * Plugin hooks definition
1084
- */
1085
- interface PluginHooks {
1086
- "plugin:install"?: HookConfig<LifecycleHandler> | LifecycleHandler;
1087
- "plugin:activate"?: HookConfig<LifecycleHandler> | LifecycleHandler;
1088
- "plugin:deactivate"?: HookConfig<LifecycleHandler> | LifecycleHandler;
1089
- "plugin:uninstall"?: HookConfig<UninstallHandler> | UninstallHandler;
1090
- "content:beforeSave"?: HookConfig<ContentBeforeSaveHandler> | ContentBeforeSaveHandler;
1091
- "content:afterSave"?: HookConfig<ContentAfterSaveHandler> | ContentAfterSaveHandler;
1092
- "content:beforeDelete"?: HookConfig<ContentBeforeDeleteHandler> | ContentBeforeDeleteHandler;
1093
- "content:afterDelete"?: HookConfig<ContentAfterDeleteHandler> | ContentAfterDeleteHandler;
1094
- "content:afterPublish"?: HookConfig<ContentAfterPublishHandler> | ContentAfterPublishHandler;
1095
- "content:afterUnpublish"?: HookConfig<ContentAfterUnpublishHandler> | ContentAfterUnpublishHandler;
1096
- "content:afterRestore"?: HookConfig<ContentAfterRestoreHandler> | ContentAfterRestoreHandler;
1097
- "content:afterSchedule"?: HookConfig<ContentAfterScheduleHandler> | ContentAfterScheduleHandler;
1098
- "content:afterUnschedule"?: HookConfig<ContentAfterUnscheduleHandler> | ContentAfterUnscheduleHandler;
1099
- "media:beforeUpload"?: HookConfig<MediaBeforeUploadHandler> | MediaBeforeUploadHandler;
1100
- "media:afterUpload"?: HookConfig<MediaAfterUploadHandler> | MediaAfterUploadHandler;
1101
- cron?: HookConfig<CronHandler> | CronHandler;
1102
- "email:beforeSend"?: HookConfig<EmailBeforeSendHandler> | EmailBeforeSendHandler;
1103
- "email:deliver"?: HookConfig<EmailDeliverHandler> | EmailDeliverHandler;
1104
- "email:afterSend"?: HookConfig<EmailAfterSendHandler> | EmailAfterSendHandler;
1105
- "comment:beforeCreate"?: HookConfig<CommentBeforeCreateHandler> | CommentBeforeCreateHandler;
1106
- "comment:moderate"?: HookConfig<CommentModerateHandler> | CommentModerateHandler;
1107
- "comment:afterCreate"?: HookConfig<CommentAfterCreateHandler> | CommentAfterCreateHandler;
1108
- "comment:afterModerate"?: HookConfig<CommentAfterModerateHandler> | CommentAfterModerateHandler;
1109
- "page:metadata"?: HookConfig<PageMetadataHandler> | PageMetadataHandler;
1110
- "page:fragments"?: HookConfig<PageFragmentHandler> | PageFragmentHandler;
1111
- }
1112
- /**
1113
- * Hook names
1114
- */
1115
- /**
1116
- * Hook name in a manifest. Core's exhaustive union of recognised hook names,
1117
- * derived from the `PluginHooks` registry. The serialised manifest carries
1118
- * these as opaque strings; this stricter type is only used for type-checking
1119
- * inside core. `ManifestHookEntry` is re-exported from
1120
- * `@emdash-cms/plugin-types` near the top of this file.
1121
- */
1122
- type HookName = keyof PluginHooks;
1123
- /**
1124
- * Resolved hook with normalized config
1125
- */
1126
- interface ResolvedHook<THandler> {
1127
- priority: number;
1128
- timeout: number;
1129
- dependencies: string[];
1130
- errorPolicy: "continue" | "abort";
1131
- /** Whether this hook is exclusive (provider pattern) */
1132
- exclusive: boolean;
1133
- handler: THandler;
1134
- pluginId: string;
1135
- }
1136
- /**
1137
- * Geographic location information derived from the request.
1138
- * Available when running on Cloudflare Workers (via the `cf` object).
1139
- */
1140
- interface GeoInfo {
1141
- country: string | null;
1142
- region: string | null;
1143
- city: string | null;
1144
- }
1145
- /**
1146
- * Normalized request metadata available to plugin route handlers.
1147
- * Extracted from request headers and platform-specific properties.
1148
- */
1149
- interface RequestMeta {
1150
- ip: string | null;
1151
- userAgent: string | null;
1152
- referer: string | null;
1153
- geo: GeoInfo | null;
1154
- }
1155
- /**
1156
- * Route handler context extends plugin context with request-specific data
1157
- */
1158
- interface RouteContext<TInput = unknown> extends PluginContext {
1159
- /** Validated input from request body */
1160
- input: TInput;
1161
- /** Original request */
1162
- request: Request;
1163
- /** Normalized request metadata (IP, user agent, geo) */
1164
- requestMeta: RequestMeta;
1165
- /**
1166
- * Authenticated caller, if the route is private. The host has already
1167
- * authenticated and authorized this user before dispatch, so the value
1168
- * is trustworthy — unlike a user id read from the request body.
1169
- *
1170
- * `undefined` for public routes (which skip auth entirely) and for
1171
- * token-authed requests where no user is bound to the token.
1172
- *
1173
- * Not gated by the `users:read` capability: this is the caller's own
1174
- * identity for the current request, not a user directory lookup.
1175
- */
1176
- user?: UserInfo;
1177
- }
1178
- /**
1179
- * Route definition
1180
- */
1181
- interface PluginRoute<TInput = unknown> {
1182
- /** Zod schema for input validation */
1183
- input?: z.ZodType<TInput>;
1184
- /**
1185
- * Mark this route as publicly accessible (no authentication required).
1186
- * Public routes skip session/token auth and CSRF checks.
1187
- */
1188
- public?: boolean;
1189
- /** RBAC permission required to invoke the route. Legacy routes default to plugins:manage. */
1190
- permission?: Permission;
1191
- /**
1192
- * `Cache-Control` header value for successful GET responses, e.g.
1193
- * `"public, max-age=60, stale-while-revalidate=300"`. Only honored on
1194
- * routes that are also `public: true` — authenticated responses always
1195
- * keep the default `private, no-store`. Errors are never cached.
1196
- */
1197
- cacheControl?: string;
1198
- /** Route handler */
1199
- handler: (ctx: RouteContext<TInput>) => Promise<unknown>;
1200
- }
1201
- interface PluginMcpToolDefinition {
1202
- description: string;
1203
- route: string;
1204
- input: z.ZodType;
1205
- output?: z.ZodType;
1206
- destructive?: boolean;
1207
- }
1208
- interface PluginMcpConfig {
1209
- tools: Record<string, PluginMcpToolDefinition>;
1210
- }
1211
- /**
1212
- * Admin page definition
1213
- */
1214
- interface PluginAdminPage {
1215
- path: string;
1216
- label: string;
1217
- icon?: string;
1218
- }
1219
- /**
1220
- * Dashboard widget definition
1221
- */
1222
- interface PluginDashboardWidget {
1223
- id: string;
1224
- size?: "full" | "half" | "third";
1225
- title?: string;
1226
- }
1227
- /**
1228
- * Settings field types (for admin UI generation)
1229
- */
1230
- type SettingFieldType = "string" | "number" | "boolean" | "select" | "secret" | "url" | "email";
1231
- interface BaseSettingField {
1232
- type: SettingFieldType;
1233
- label: string;
1234
- description?: string;
1235
- }
1236
- interface StringSettingField extends BaseSettingField {
1237
- type: "string";
1238
- default?: string;
1239
- multiline?: boolean;
1240
- }
1241
- interface NumberSettingField extends BaseSettingField {
1242
- type: "number";
1243
- default?: number;
1244
- min?: number;
1245
- max?: number;
1246
- }
1247
- interface BooleanSettingField extends BaseSettingField {
1248
- type: "boolean";
1249
- default?: boolean;
1250
- }
1251
- interface SelectSettingField extends BaseSettingField {
1252
- type: "select";
1253
- options: Array<{
1254
- value: string;
1255
- label: string;
1256
- }>;
1257
- default?: string;
1258
- }
1259
- interface SecretSettingField extends BaseSettingField {
1260
- type: "secret";
1261
- }
1262
- interface UrlSettingField extends BaseSettingField {
1263
- type: "url";
1264
- default?: string;
1265
- placeholder?: string;
1266
- }
1267
- interface EmailSettingField extends BaseSettingField {
1268
- type: "email";
1269
- default?: string;
1270
- placeholder?: string;
1271
- }
1272
- type SettingField = StringSettingField | NumberSettingField | BooleanSettingField | SelectSettingField | SecretSettingField | UrlSettingField | EmailSettingField;
1273
- /**
1274
- * Block Kit element for block editing fields.
1275
- * This is the `Element` discriminated union from `@emdash-cms/blocks`.
1276
- * Plugin authors should use `@emdash-cms/blocks` builder functions to create these.
1277
- */
1278
- type PortableTextBlockField = Element;
1279
- /**
1280
- * Configuration for a Portable Text block type contributed by a plugin
1281
- */
1282
- interface PortableTextBlockConfig {
1283
- /** Block type name (must match the `_type` in Portable Text) */
1284
- type: string;
1285
- /** Human-readable label shown in slash commands and modals */
1286
- label: string;
1287
- /** Icon key (e.g., "video", "code", "link", "link-external") */
1288
- icon?: string;
1289
- /** Description shown in slash command menu */
1290
- description?: string;
1291
- /** Placeholder text for the URL input */
1292
- placeholder?: string;
1293
- /** Block Kit form fields for the editing UI. If declared, replaces the simple URL input. */
1294
- fields?: PortableTextBlockField[];
1295
- /**
1296
- * Optional. Display category in the slash menu. Defaults to "Embeds".
1297
- *
1298
- * Plugin authors should pick a meaningful category that reflects what the
1299
- * block actually is — e.g. "Sections", "Marketing", "Media", "Embeds",
1300
- * "Layout". Blocks with the same category are grouped together in the
1301
- * editor's slash menu.
1302
- */
1303
- category?: string;
1304
- }
1305
- /**
1306
- * Configuration for a field widget type contributed by a plugin.
1307
- * A field widget provides a custom editing UI for a schema field.
1308
- * The field references the widget via `widget: "pluginId:widgetName"`.
1309
- */
1310
- interface FieldWidgetConfig {
1311
- /** Widget name (without plugin ID prefix) */
1312
- name: string;
1313
- /** Human-readable label for the admin UI */
1314
- label: string;
1315
- /** Which field types this widget can edit (e.g., ["json", "string"]) */
1316
- fieldTypes: FieldType[];
1317
- /** Block Kit elements for sandboxed rendering. Omit for trusted plugins using React. */
1318
- elements?: Element[];
1319
- }
1320
- /**
1321
- * Admin configuration
1322
- */
1323
- interface PluginAdminConfig {
1324
- /** Module specifier for admin UI exports (e.g., "@emdash-cms/plugin-audit-log/admin") */
1325
- entry?: string;
1326
- /** Settings schema for auto-generated UI */
1327
- settingsSchema?: Record<string, SettingField>;
1328
- /** Admin pages */
1329
- pages?: PluginAdminPage[];
1330
- /** Dashboard widgets */
1331
- widgets?: PluginDashboardWidget[];
1332
- /** Portable Text block types this plugin provides */
1333
- portableTextBlocks?: PortableTextBlockConfig[];
1334
- /** Field widget types this plugin provides */
1335
- fieldWidgets?: FieldWidgetConfig[];
1336
- }
1337
- /**
1338
- * Plugin definition - input to definePlugin()
1339
- */
1340
- interface PluginDefinition<TStorage extends PluginStorageConfig = PluginStorageConfig> {
1341
- /** Unique plugin identifier */
1342
- id: string;
1343
- /** Plugin version (semver) */
1344
- version: string;
1345
- /** Declared capabilities */
1346
- capabilities?: PluginCapability[];
1347
- /** Allowed hosts for network:fetch (wildcards supported: *.example.com) */
1348
- allowedHosts?: string[];
1349
- /** Storage collections with indexes */
1350
- storage?: TStorage;
1351
- /** Hooks */
1352
- hooks?: PluginHooks;
1353
- /** API routes */
1354
- routes?: Record<string, PluginRoute>;
1355
- /** Routes explicitly exposed as agent-callable MCP tools. */
1356
- mcp?: PluginMcpConfig;
1357
- /** Admin UI configuration */
1358
- admin?: PluginAdminConfig;
1359
- }
1360
- /**
1361
- * Resolved plugin - after definePlugin() processing
1362
- */
1363
- interface ResolvedPlugin<TStorage extends PluginStorageConfig = PluginStorageConfig> {
1364
- id: string;
1365
- version: string;
1366
- capabilities: PluginCapability[];
1367
- allowedHosts: string[];
1368
- storage: TStorage;
1369
- hooks: ResolvedPluginHooks;
1370
- routes: Record<string, PluginRoute>;
1371
- mcp?: PluginMcpConfig;
1372
- admin: PluginAdminConfig;
1373
- }
1374
- /**
1375
- * Resolved hooks with normalized config
1376
- */
1377
- interface ResolvedPluginHooks {
1378
- "plugin:install"?: ResolvedHook<LifecycleHandler>;
1379
- "plugin:activate"?: ResolvedHook<LifecycleHandler>;
1380
- "plugin:deactivate"?: ResolvedHook<LifecycleHandler>;
1381
- "plugin:uninstall"?: ResolvedHook<UninstallHandler>;
1382
- "content:beforeSave"?: ResolvedHook<ContentBeforeSaveHandler>;
1383
- "content:afterSave"?: ResolvedHook<ContentAfterSaveHandler>;
1384
- "content:beforeDelete"?: ResolvedHook<ContentBeforeDeleteHandler>;
1385
- "content:afterDelete"?: ResolvedHook<ContentAfterDeleteHandler>;
1386
- "content:afterPublish"?: ResolvedHook<ContentAfterPublishHandler>;
1387
- "content:afterUnpublish"?: ResolvedHook<ContentAfterUnpublishHandler>;
1388
- "content:afterRestore"?: ResolvedHook<ContentAfterRestoreHandler>;
1389
- "content:afterSchedule"?: ResolvedHook<ContentAfterScheduleHandler>;
1390
- "content:afterUnschedule"?: ResolvedHook<ContentAfterUnscheduleHandler>;
1391
- "media:beforeUpload"?: ResolvedHook<MediaBeforeUploadHandler>;
1392
- "media:afterUpload"?: ResolvedHook<MediaAfterUploadHandler>;
1393
- cron?: ResolvedHook<CronHandler>;
1394
- "email:beforeSend"?: ResolvedHook<EmailBeforeSendHandler>;
1395
- "email:deliver"?: ResolvedHook<EmailDeliverHandler>;
1396
- "email:afterSend"?: ResolvedHook<EmailAfterSendHandler>;
1397
- "comment:beforeCreate"?: ResolvedHook<CommentBeforeCreateHandler>;
1398
- "comment:moderate"?: ResolvedHook<CommentModerateHandler>;
1399
- "comment:afterCreate"?: ResolvedHook<CommentAfterCreateHandler>;
1400
- "comment:afterModerate"?: ResolvedHook<CommentAfterModerateHandler>;
1401
- "page:metadata"?: ResolvedHook<PageMetadataHandler>;
1402
- "page:fragments"?: ResolvedHook<PageFragmentHandler>;
1403
- }
1404
- /**
1405
- * What a plugin exports from its /admin entrypoint
1406
- * Uses generic component type to avoid React dependency
1407
- */
1408
- interface PluginAdminExports {
1409
- widgets?: Record<string, JSX.Element>;
1410
- pages?: Record<string, JSX.Element>;
1411
- fields?: Record<string, JSX.Element>;
1412
- }
1413
- /**
1414
- * Plugin manifest — the metadata portion of a plugin bundle, used for
1415
- * sandboxed plugins loaded from the marketplace.
1416
- *
1417
- * This interface is core's stricter version of the manifest contract: it
1418
- * uses the exhaustive `HookName` union and core's typed `PluginAdminConfig`.
1419
- * The wire-shape lives in `@emdash-cms/plugin-types` as `PluginManifest`
1420
- * with looser types (so the registry CLI can serialise hook names it
1421
- * doesn't know about). Both must stay structurally compatible: every value
1422
- * of this type must be assignable to the shared one. The static assertion
1423
- * below catches any drift at compile time.
1424
- */
1425
- interface PluginManifest {
1426
- id: string;
1427
- version: string;
1428
- /**
1429
- * The trust contract (see `@emdash-cms/plugin-types`). Authoritative;
1430
- * `capabilities`/`allowedHosts` are derived from it at the parse boundary
1431
- * via `reconcileManifestAccess`. Optional during the wire-format migration.
1432
- */
1433
- declaredAccess?: DeclaredAccess;
1434
- capabilities: PluginCapability[];
1435
- allowedHosts: string[];
1436
- storage: PluginStorageConfig;
1437
- /** Hook declarations — either plain name strings or structured objects */
1438
- hooks: Array<ManifestHookEntry$1 | HookName>;
1439
- /** Route declarations — either plain name strings or structured objects */
1440
- routes: Array<ManifestRouteEntry$1 | string>;
1441
- mcp?: PluginMcpManifestConfig;
1442
- admin: PluginAdminConfig;
1443
- }
1444
- //#endregion
1445
- export { MediaAfterUploadHandler as $, ContentScheduleStateChangeEvent as A, ResolvedHook as At, EmailDeliverEvent as B, TaxonomyReadOptions as Bt, ContentBeforeDeleteHandler as C, PluginRoute as Ct, ContentHookEvent as D, PublicPageContext as Dt, ContentDeleteEvent as E, PortableTextBlockField as Et, DeprecatedPluginCapability as F, StorageCollection as Ft, HookName as G, UpdateIfResult as Gt, EmailMessage as H, UninstallEvent as Ht, EmailAfterSendEvent as I, StorageCollectionConfig as It, LifecycleEvent as J, WhereClause as Jt, HttpAccess as K, UserInfo as Kt, EmailAfterSendHandler as L, StoredComment as Lt, CronEvent as M, ResolvedPluginHooks as Mt, CronHandler as N, RouteContext as Nt, ContentPublishStateChangeEvent as O, QueryOptions as Ot, CurrentPluginCapability as P, SettingField as Pt, MediaAfterUploadEvent as Q, Element as Qt, EmailBeforeSendEvent as R, TaxonomyAccess as Rt, ContentAfterUnscheduleHandler as S, PluginMcpManifestConfig as St, ContentCreateOptions as T, PortableTextBlockConfig as Tt, FieldWidgetConfig as U, UninstallHandler as Ut, EmailDeliverHandler as V, TaxonomyTermInfo as Vt, HookConfig as W, UpdateIfArgs as Wt, LogAccess as X, normalizeCapabilities as Xt, LifecycleHandler as Y, isDeprecatedCapability as Yt, MediaAccess as Z, normalizeCapability as Zt, ContentAfterPublishHandler as _, PluginCapability as _t, CommentAfterCreateEvent as a, PageFragmentContribution as at, ContentAfterScheduleHandler as b, PluginHooks as bt, CommentAfterModerateHandler as c, PageMetadataContribution as ct, CommentModerateEvent as d, PageMetadataLinkRel as dt, MediaBeforeUploadHandler as et, CommentModerateHandler as f, PagePlacement as ft, ContentAfterDeleteHandler as g, PluginAdminPage as gt, ContentAccess as h, PluginAdminExports as ht, CollectionCommentSettings as i, NumericDelta as it, ContentStateChangeEvent as j, ResolvedPlugin as jt, ContentRestoreStateChangeEvent as k, RequestMeta as kt, CommentBeforeCreateEvent as l, PageMetadataEvent as lt, ConditionalWriteResult as m, PluginAdminConfig as mt, BreadcrumbItem as n, MediaUploadEvent as nt, CommentAfterCreateHandler as o, PageFragmentEvent as ot, ConditionalDeleteResult as p, PaginatedResult as pt, KVAccess as q, VersionedValue as qt, CAPABILITY_RENAMES as r, ModerationDecision as rt, CommentAfterModerateEvent as s, PageFragmentHandler as st, ActorInfo as t, MediaItem as tt, CommentBeforeCreateHandler as u, PageMetadataHandler as ut, ContentAfterRestoreHandler as v, PluginContext as vt, ContentBeforeSaveHandler as w, PluginStorageConfig as wt, ContentAfterUnpublishHandler as x, PluginManifest as xt, ContentAfterSaveHandler as y, PluginDefinition as yt, EmailBeforeSendHandler as z, TaxonomyDefInfo as zt };
1446
- //# sourceMappingURL=types-BouXpOsa.d.mts.map